antosdk-apps/MonacoCore/vs/editor/editor.main.js
2021-04-13 20:03:53 +02:00

756 lines
2.4 MiB

/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.23.0(82e8ea39fc101d639262435542c7d43bc20d8aa2)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/(function(){var Q=["require","exports","vs/base/common/lifecycle","vs/editor/common/core/range","vs/nls","vs/nls!vs/editor/editor.main","vs/base/common/event","vs/base/browser/dom","vs/base/common/strings","vs/platform/instantiation/common/instantiation","vs/css!vs/editor/editor.main","vs/platform/theme/common/themeService","vs/base/common/errors","vs/editor/browser/editorExtensions","vs/editor/common/core/position","vs/base/common/async","vs/platform/contextkey/common/contextkey","vs/base/common/platform","vs/editor/common/modes","vs/base/common/arrays","vs/base/common/types","vs/editor/common/core/selection","vs/platform/theme/common/colorRegistry","vs/base/common/cancellation","vs/base/common/uri","vs/editor/common/editorContextKeys","vs/platform/commands/common/commands","vs/base/common/codicons","vs/editor/browser/services/codeEditorService","vs/base/common/color","vs/base/browser/fastDomNode","vs/editor/common/model/textModel","vs/platform/notification/common/notification","vs/platform/registry/common/platform","vs/platform/actions/common/actions","vs/base/browser/browser","vs/editor/common/services/modelService","vs/platform/keybinding/common/keybinding","vs/editor/common/config/editorOptions","vs/base/common/keyCodes","vs/base/common/objects","vs/editor/common/modes/languageConfigurationRegistry","vs/editor/common/controller/cursorCommon","vs/base/common/network","vs/base/common/resources","vs/editor/browser/view/viewPart","vs/platform/configuration/common/configuration","vs/base/browser/ui/aria/aria","vs/base/common/actions","vs/editor/common/view/editorColorRegistry","vs/base/browser/mouseEvent","vs/base/common/map","vs/base/browser/ui/widget","vs/editor/common/model","vs/base/common/iterator","vs/base/browser/event","vs/base/browser/keyboardEvent","vs/editor/common/services/modeService","vs/platform/opener/common/opener","vs/platform/progress/common/progress","vs/base/browser/touch","vs/base/browser/ui/scrollbar/scrollableElement","vs/editor/common/core/editOperation","vs/editor/common/viewModel/viewModel","vs/editor/common/standaloneStrings","vs/platform/accessibility/common/accessibility","vs/base/common/filters","vs/editor/common/services/resolverService","vs/platform/contextview/browser/contextView","vs/editor/browser/config/configuration","vs/editor/browser/core/editorState","vs/base/common/linkedList","vs/base/common/path","vs/base/common/htmlContent","vs/platform/instantiation/common/extensions","vs/editor/common/services/editorWorkerService","vs/editor/common/modes/nullMode","vs/platform/log/common/log","vs/platform/quickinput/common/quickInput","vs/platform/storage/common/storage","vs/platform/theme/common/iconRegistry","vs/base/common/stopwatch","vs/base/common/severity","vs/base/browser/ui/actionbar/actionbar","vs/platform/clipboard/common/clipboardService","vs/platform/markers/common/markers","vs/platform/keybinding/common/keybindingsRegistry","vs/platform/telemetry/common/telemetry","vs/base/common/functional","vs/base/common/hash","vs/base/browser/globalMouseMoveMonitor","vs/editor/common/core/characterClassifier","vs/editor/common/commands/replaceCommand","vs/editor/common/core/stringBuilder","vs/editor/browser/view/dynamicViewOverlay","vs/platform/configuration/common/configurationRegistry","vs/platform/quickinput/common/quickAccess","vs/platform/theme/common/theme","vs/base/browser/ui/tree/tree","vs/base/common/decorators","vs/base/common/numbers","vs/base/common/buffer","vs/base/common/iconLabels","vs/base/browser/ui/iconLabel/iconLabels","vs/base/browser/ui/sash/sash","vs/base/browser/ui/list/listWidget","vs/editor/common/controller/wordCharacterClassifier","vs/editor/common/editorCommon","vs/editor/browser/editorBrowser","vs/editor/common/modes/languageConfiguration","vs/editor/common/view/renderingContext","vs/editor/common/viewModel/viewEventHandler","vs/base/browser/ui/actionbar/actionViewItems","vs/editor/common/core/lineTokens","vs/editor/standalone/common/standaloneThemeService","vs/platform/label/common/label","vs/platform/theme/common/styler","vs/editor/contrib/suggest/suggest","vs/editor/contrib/peekView/peekView","vs/base/common/idGenerator","vs/base/common/range","vs/base/common/scrollable","vs/base/common/uint","vs/base/browser/ui/codicons/codiconStyles","vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/base/parts/quickinput/browser/media/quickInput","vs/editor/common/config/editorZoom","vs/editor/common/core/token","vs/editor/common/model/wordHelper","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/contrib/codeAction/types","vs/editor/contrib/snippet/snippetParser","vs/editor/contrib/gotoSymbol/referencesModel","vs/editor/browser/services/bulkEditService","vs/editor/common/modes/languageFeatureRegistry","vs/editor/common/model/tokensStore","vs/editor/common/controller/cursorWordOperations","vs/editor/common/services/textResourceConfigurationService","vs/platform/instantiation/common/serviceCollection","vs/platform/layout/browser/layoutService","vs/editor/browser/core/markdownRenderer","vs/editor/common/modes/modesRegistry","vs/editor/contrib/find/findModel","vs/editor/browser/widget/codeEditorWidget","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/editor/contrib/codeAction/codeAction","vs/editor/contrib/message/messageController","vs/platform/list/browser/listService","vs/platform/undoRedo/common/undoRedo","vs/base/browser/dnd","vs/base/common/lazy","vs/base/browser/canIUse","vs/base/common/extpath","vs/base/common/diff/diff","vs/base/browser/ui/tree/indexTreeModel","vs/base/browser/ui/tree/objectTreeModel","vs/base/browser/formattedTextRenderer","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/common/labels","vs/base/browser/ui/checkbox/checkbox","vs/base/browser/ui/list/listView","vs/editor/browser/editorDom","vs/editor/common/config/fontInfo","vs/editor/browser/controller/textAreaInput","vs/editor/browser/view/viewLayer","vs/editor/common/model/textModelSearch","vs/editor/common/modes/supports","vs/editor/common/modes/supports/richEditBrackets","vs/editor/common/standalone/standaloneEnums","vs/editor/common/view/viewEvents","vs/editor/common/viewLayout/lineDecorations","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewModel/viewModelEventDispatcher","vs/editor/contrib/folding/foldingRanges","vs/base/browser/ui/iconLabel/iconLabel","vs/base/browser/ui/tree/abstractTree","vs/base/browser/ui/inputbox/inputBox","vs/editor/common/services/markersDecorationService","vs/editor/common/commands/shiftCommand","vs/editor/common/controller/cursorMoveOperations","vs/editor/common/controller/cursorDeleteOperations","vs/editor/common/controller/cursorTypeOperations","vs/editor/contrib/parameterHints/provideSignatureHelp","vs/platform/dialogs/common/dialogs","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/editor/common/config/commonEditorConfig","vs/editor/browser/controller/mouseTarget","vs/editor/browser/controller/coreCommands","vs/platform/actions/browser/menuEntryActionViewItem","vs/platform/workspace/common/workspace","vs/editor/standalone/browser/simpleServices","vs/editor/contrib/snippet/snippetController2","vs/base/browser/iframe","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/assert","vs/base/common/collections","vs/base/browser/ui/tree/treeIcons","vs/base/common/glob","vs/base/common/marshalling","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/common/worker/simpleWorker","vs/base/parts/quickinput/common/quickInput","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/base/browser/ui/contextview/contextview","vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/dropdown/dropdown","vs/css!vs/base/browser/ui/findinput/findInput","vs/css!vs/base/browser/ui/list/list","vs/base/browser/ui/hover/hoverWidget","vs/base/browser/ui/splitview/splitview","vs/base/parts/quickinput/browser/quickInputUtils","vs/editor/browser/config/elementSizeObserver","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/browser/controller/textAreaState","vs/editor/browser/widget/diffNavigator","vs/editor/common/core/rgba","vs/editor/common/editorAction","vs/editor/common/model/textChange","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/standalone/standaloneBase","vs/editor/common/view/overviewZoneManager","vs/editor/common/viewModel/prefixSumComputer","vs/editor/browser/viewParts/margin/margin","vs/editor/contrib/comment/blockCommentCommand","vs/editor/contrib/folding/syntaxRangeProvider","vs/editor/contrib/format/formattingEdit","vs/editor/contrib/gotoSymbol/link/clickLinkGesture","vs/editor/contrib/hover/hoverOperation","vs/editor/contrib/indentation/indentUtils","vs/editor/contrib/smartSelect/bracketSelections","vs/editor/contrib/suggest/resizable","vs/editor/standalone/common/monarch/monarchCommon","vs/base/browser/ui/findinput/findInputCheckboxes","vs/base/browser/ui/tree/objectTree","vs/base/common/keybindingLabels","vs/editor/common/model/editStack","vs/platform/files/common/files","vs/platform/instantiation/common/descriptors","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/controller/cursorAtomicMoveOperations","vs/editor/common/controller/cursorMoveCommands","vs/editor/common/controller/cursor","vs/editor/common/modes/textToHtmlTokenizer","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/contrib/documentSymbols/outlineModel","vs/editor/standalone/common/monarch/monarchLexer","vs/editor/common/services/getSemanticTokens","vs/editor/contrib/codelens/codelens","vs/editor/contrib/colorPicker/color","vs/platform/contextkey/common/contextkeys","vs/platform/keybinding/common/keybindingResolver","vs/editor/common/services/editorWorkerServiceImpl","vs/editor/common/services/semanticTokensProviderStyling","vs/editor/contrib/suggest/suggestWidgetDetails","vs/editor/browser/viewParts/lines/viewLine","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/contrib/quickAccess/editorNavigationQuickAccess","vs/editor/contrib/symbolIcons/symbolIcons","vs/editor/contrib/colorPicker/colorDetector","vs/editor/contrib/format/format","vs/editor/contrib/gotoSymbol/goToSymbol","vs/editor/contrib/codeAction/codeActionCommands","vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/editor/contrib/wordOperations/wordOperations","vs/editor/browser/widget/diffEditorWidget","vs/editor/contrib/find/findController","vs/editor/contrib/gotoError/gotoError","vs/editor/common/services/modelServiceImpl","vs/editor/contrib/gotoSymbol/peek/referencesController","vs/editor/contrib/gotoSymbol/goToCommands","vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/editor/contrib/hover/hover","vs/editor/standalone/browser/standaloneServices","vs/base/browser/ui/list/list","vs/base/browser/ui/list/splice","vs/base/common/diff/diffChange","vs/base/common/navigator","vs/base/common/history","vs/base/common/process","vs/base/browser/ui/list/rangeMap","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/common/comparers","vs/base/browser/ui/tree/compressedObjectTreeModel","vs/base/common/search","vs/base/common/fuzzyScorer","vs/base/browser/ui/list/rowCache","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/base/browser/markdownRenderer","vs/base/common/mime","vs/base/common/uuid","vs/base/parts/storage/common/storage","vs/base/worker/defaultWorkerFactory","vs/css!vs/base/browser/ui/aria/aria","vs/css!vs/base/browser/ui/button/button","vs/base/browser/ui/button/button","vs/css!vs/base/browser/ui/checkbox/checkbox","vs/css!vs/base/browser/ui/codicons/codicon/codicon","vs/css!vs/base/browser/ui/codicons/codicon/codicon-modifiers","vs/css!vs/base/browser/ui/contextview/contextview","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/hover/hover","vs/css!vs/base/browser/ui/iconLabel/iconlabel","vs/css!vs/base/browser/ui/inputbox/inputBox","vs/css!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/css!vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/base/browser/ui/progressbar/progressbar","vs/base/browser/ui/progressbar/progressbar","vs/css!vs/base/browser/ui/sash/sash","vs/css!vs/base/browser/ui/scrollbar/media/scrollbars","vs/base/browser/ui/list/listPaging","vs/css!vs/base/browser/ui/splitview/splitview","vs/css!vs/base/browser/ui/table/table","vs/base/browser/ui/table/tableWidget","vs/css!vs/base/browser/ui/tree/media/tree","vs/css!vs/editor/browser/controller/textAreaHandler","vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","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/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/css!vs/editor/browser/viewParts/minimap/minimap","vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/css!vs/editor/browser/viewParts/rulers/rulers","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/css!vs/editor/browser/viewParts/selections/selections","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/contrib/anchorSelect/anchorSelect","vs/css!vs/editor/contrib/bracketMatching/bracketMatching","vs/css!vs/editor/contrib/codeAction/lightBulbWidget","vs/css!vs/editor/contrib/codelens/codelensWidget","vs/css!vs/editor/contrib/colorPicker/colorPicker","vs/css!vs/editor/contrib/dnd/dnd","vs/css!vs/editor/contrib/find/findWidget","vs/css!vs/editor/contrib/folding/folding","vs/css!vs/editor/contrib/gotoError/media/gotoErrorWidget","vs/css!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/css!vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/css!vs/editor/contrib/links/links","vs/css!vs/editor/contrib/message/messageController","vs/css!vs/editor/contrib/parameterHints/parameterHints","vs/css!vs/editor/contrib/peekView/media/peekViewWidget","vs/css!vs/editor/contrib/rename/renameInputField","vs/css!vs/editor/contrib/snippet/snippetSession","vs/css!vs/editor/contrib/suggest/media/suggest","vs/css!vs/editor/contrib/zoneWidget/zoneWidget","vs/css!vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/css!vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/css!vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/css!vs/editor/standalone/browser/quickInput/standaloneQuickInput","vs/css!vs/editor/standalone/browser/standalone-tokens","vs/css!vs/platform/actions/browser/menuEntryActionViewItem","vs/css!vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/config/charWidthReader","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/viewParts/minimap/minimapCharRenderer","vs/editor/browser/viewParts/minimap/minimapPreBaked","vs/editor/browser/viewParts/minimap/minimapCharRendererFactory","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/commands/surroundSelectionCommand","vs/editor/common/diff/diffComputer","vs/editor/common/model/indentationGuesser","vs/editor/common/model/intervalTree","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/model/textModelEvents","vs/editor/common/modes/abstractMode","vs/editor/common/modes/languageSelector","vs/editor/common/modes/linkComputer","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/common/modes/supports/electricCharacter","vs/editor/common/modes/supports/tokenization","vs/editor/common/modes/tokenizationRegistry","vs/editor/common/services/semanticTokensDto","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/common/view/viewContext","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/model/mirrorTextModel","vs/editor/common/services/editorSimpleWorker","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/viewParts/decorations/decorations","vs/editor/browser/viewParts/linesDecorations/linesDecorations","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/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/caretOperations/moveCaretCommand","vs/editor/contrib/colorPicker/colorPickerModel","vs/editor/contrib/comment/lineCommentCommand","vs/editor/contrib/dnd/dragAndDropCommand","vs/editor/contrib/find/replaceAllCommand","vs/editor/contrib/find/replacePattern","vs/editor/contrib/folding/foldingModel","vs/editor/contrib/folding/hiddenRangeModel","vs/editor/contrib/folding/intializingRangeProvider","vs/editor/contrib/hover/hoverWidgets","vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/copyLinesCommand","vs/editor/contrib/linesOperations/sortLinesCommand","vs/editor/contrib/smartSelect/wordSelections","vs/editor/contrib/suggest/completionModel","vs/editor/contrib/suggest/suggestCommitCharacters","vs/editor/contrib/suggest/suggestOvertypingCapturer","vs/editor/contrib/suggest/wordDistance","vs/editor/standalone/common/monarch/monarchCompile","vs/nls!vs/base/browser/ui/actionbar/actionViewItems","vs/nls!vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes","vs/nls!vs/base/browser/ui/findinput/replaceInput","vs/nls!vs/base/browser/ui/iconLabel/iconLabel","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/browser/ui/menu/menu","vs/nls!vs/base/browser/ui/tree/abstractTree","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/tree/asyncDataTree","vs/nls!vs/base/common/actions","vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/base/browser/ui/findinput/findInput","vs/base/browser/ui/findinput/replaceInput","vs/base/browser/ui/menu/menu","vs/base/parts/quickinput/browser/quickInputBox","vs/nls!vs/base/common/errorMessage","vs/base/common/errorMessage","vs/nls!vs/base/common/keybindingLabels","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/editor/browser/controller/coreCommands","vs/nls!vs/editor/browser/controller/textAreaHandler","vs/nls!vs/editor/browser/core/keybindingCancellation","vs/nls!vs/editor/browser/editorExtensions","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/browser/widget/inlineDiffMargin","vs/editor/browser/widget/inlineDiffMargin","vs/nls!vs/editor/common/config/commonEditorConfig","vs/nls!vs/editor/common/config/editorOptions","vs/editor/common/viewModel/viewModelDecorations","vs/nls!vs/editor/common/editorContextKeys","vs/nls!vs/editor/common/model/editStack","vs/nls!vs/editor/common/modes/modesRegistry","vs/nls!vs/editor/common/standaloneStrings","vs/nls!vs/editor/common/view/editorColorRegistry","vs/nls!vs/editor/contrib/anchorSelect/anchorSelect","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/codeAction/lightBulbWidget","vs/nls!vs/editor/contrib/codelens/codelensController","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/folding/foldingDecorations","vs/nls!vs/editor/contrib/fontZoom/fontZoom","vs/nls!vs/editor/contrib/format/format","vs/nls!vs/editor/contrib/format/formatActions","vs/nls!vs/editor/contrib/gotoError/gotoError","vs/nls!vs/editor/contrib/gotoError/gotoErrorWidget","vs/nls!vs/editor/contrib/gotoSymbol/goToCommands","vs/nls!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesController","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesTree","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/nls!vs/editor/contrib/gotoSymbol/referencesModel","vs/nls!vs/editor/contrib/gotoSymbol/symbolNavigation","vs/nls!vs/editor/contrib/hover/hover","vs/nls!vs/editor/contrib/hover/markdownHoverParticipant","vs/nls!vs/editor/contrib/hover/markerHoverParticipant","vs/nls!vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/nls!vs/editor/contrib/indentation/indentation","vs/nls!vs/editor/contrib/linesOperations/linesOperations","vs/nls!vs/editor/contrib/linkedEditing/linkedEditing","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/peekView/peekView","vs/nls!vs/editor/contrib/quickAccess/gotoLineQuickAccess","vs/nls!vs/editor/contrib/quickAccess/gotoSymbolQuickAccess","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/nls!vs/editor/contrib/suggest/suggestController","vs/nls!vs/editor/contrib/suggest/suggestWidget","vs/nls!vs/editor/contrib/suggest/suggestWidgetDetails","vs/nls!vs/editor/contrib/suggest/suggestWidgetRenderer","vs/nls!vs/editor/contrib/suggest/suggestWidgetStatus","vs/nls!vs/editor/contrib/symbolIcons/symbolIcons","vs/nls!vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/nls!vs/editor/contrib/tokenization/tokenization","vs/nls!vs/editor/contrib/unusualLineTerminators/unusualLineTerminators","vs/nls!vs/editor/contrib/wordHighlighter/wordHighlighter","vs/nls!vs/editor/contrib/wordOperations/wordOperations","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/browser/contextKeyService","vs/nls!vs/platform/contextkey/common/contextkeys","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/quickinput/browser/commandsQuickAccess","vs/nls!vs/platform/quickinput/browser/helpQuickAccess","vs/nls!vs/platform/theme/common/colorRegistry","vs/nls!vs/platform/theme/common/iconRegistry","vs/nls!vs/platform/undoRedo/common/undoRedoService","vs/platform/clipboard/browser/clipboardService","vs/platform/editor/common/editor","vs/platform/extensions/common/extensions","vs/platform/instantiation/common/graph","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/model/textModelTokens","vs/editor/common/controller/cursorColumnSelection","vs/editor/common/controller/oneCursor","vs/editor/common/controller/cursorCollection","vs/editor/common/viewModel/splitLinesCollection","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/folding/indentRangeProvider","vs/editor/contrib/linesOperations/moveLinesCommand","vs/editor/contrib/zoneWidget/zoneWidget","vs/editor/standalone/browser/colorizer","vs/editor/contrib/documentSymbols/documentSymbols","vs/editor/contrib/links/getLinks","vs/editor/contrib/parameterHints/parameterHintsModel","vs/editor/contrib/suggest/suggestAlternatives","vs/editor/contrib/suggest/wordContextKey","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keybinding/common/resolvedKeybindingItem","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/contextview/browser/contextViewService","vs/editor/common/services/webWorker","vs/editor/contrib/gotoError/markerNavigationService","vs/platform/markers/common/markerService","vs/editor/browser/services/openerService","vs/editor/contrib/hover/modesGlyphHover","vs/platform/quickinput/browser/pickerQuickAccess","vs/editor/common/services/getIconClasses","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/common/services/languagesRegistry","vs/editor/common/services/modeServiceImpl","vs/platform/accessibility/common/accessibilityService","vs/platform/configuration/common/configurationModels","vs/platform/contextkey/browser/contextKeyService","vs/platform/browser/contextScopedHistoryWidget","vs/platform/quickinput/browser/helpQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/editor/contrib/codelens/codeLensCache","vs/editor/contrib/suggest/suggestMemory","vs/platform/quickinput/browser/commandsQuickAccess","vs/editor/contrib/quickAccess/commandsQuickAccess","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/services/codeEditorServiceImpl","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/viewParts/indentGuides/indentGuides","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/common/services/markerDecorationsServiceImpl","vs/editor/contrib/codeAction/lightBulbWidget","vs/editor/contrib/codelens/codelensWidget","vs/editor/contrib/colorPicker/colorPickerWidget","vs/editor/contrib/find/findDecorations","vs/editor/contrib/find/findOptionsWidget","vs/editor/contrib/find/findState","vs/editor/contrib/gotoSymbol/peek/referencesTree","vs/editor/contrib/quickAccess/gotoLineQuickAccess","vs/editor/contrib/quickAccess/gotoSymbolQuickAccess","vs/editor/contrib/rename/renameInputField","vs/editor/standalone/browser/standaloneCodeServiceImpl","vs/editor/standalone/common/themes","vs/editor/browser/core/keybindingCancellation","vs/editor/browser/services/markerDecorations","vs/editor/browser/view/viewController","vs/editor/browser/view/viewImpl","vs/editor/contrib/anchorSelect/anchorSelect","vs/editor/contrib/bracketMatching/bracketMatching","vs/editor/contrib/caretOperations/caretOperations","vs/editor/contrib/caretOperations/transpose","vs/editor/contrib/clipboard/clipboard","vs/editor/contrib/codeAction/codeActionMenu","vs/editor/contrib/codeAction/codeActionModel","vs/editor/contrib/codelens/codelensController","vs/editor/contrib/comment/comment","vs/editor/contrib/contextmenu/contextmenu","vs/editor/contrib/cursorUndo/cursorUndo","vs/editor/contrib/dnd/dnd","vs/editor/contrib/fontZoom/fontZoom","vs/editor/contrib/format/formatActions","vs/editor/contrib/gotoSymbol/symbolNavigation","vs/editor/contrib/hover/getHover","vs/editor/contrib/hover/markdownHoverParticipant","vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/editor/contrib/indentation/indentation","vs/editor/contrib/inlineHints/inlineHintsController","vs/editor/contrib/linesOperations/linesOperations","vs/editor/contrib/linkedEditing/linkedEditing","vs/editor/contrib/links/links","vs/editor/contrib/codeAction/codeActionUi","vs/editor/contrib/codeAction/codeActionContributions","vs/editor/contrib/rename/rename","vs/editor/contrib/smartSelect/smartSelect","vs/editor/contrib/tokenization/tokenization","vs/editor/contrib/unusualLineTerminators/unusualLineTerminators","vs/editor/contrib/wordHighlighter/wordHighlighter","vs/editor/contrib/wordPartOperations/wordPartOperations","vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess","vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast","vs/editor/contrib/suggest/suggestWidgetStatus","vs/platform/actions/common/menuService","vs/platform/contextview/browser/contextMenuService","vs/platform/quickinput/browser/quickInput","vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl","vs/platform/severityIcon/common/severityIcon","vs/editor/contrib/gotoError/gotoErrorWidget","vs/editor/browser/widget/diffReview","vs/editor/contrib/find/findWidget","vs/editor/contrib/folding/foldingDecorations","vs/editor/contrib/folding/folding","vs/editor/contrib/hover/markerHoverParticipant","vs/editor/contrib/hover/modesContentHover","vs/editor/contrib/multicursor/multicursor","vs/editor/contrib/parameterHints/parameterHintsWidget","vs/editor/contrib/parameterHints/parameterHints","vs/editor/contrib/suggest/suggestWidgetRenderer","vs/editor/contrib/suggest/suggestWidget","vs/platform/theme/browser/iconsStyleSheet","vs/editor/standalone/browser/standaloneThemeServiceImpl","vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/editor/contrib/colorPicker/colorContributions","vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens","vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch","vs/platform/undoRedo/common/undoRedoService","vs/editor/standalone/browser/standaloneCodeEditor","vs/editor/standalone/browser/standaloneEditor","vs/editor/standalone/browser/standaloneLanguages","vs/editor/editor.api","vs/platform/workspaces/common/workspaces","vs/editor/contrib/snippet/snippetVariables","vs/editor/contrib/snippet/snippetSession","vs/editor/contrib/suggest/suggestModel","vs/editor/contrib/suggest/suggestController","vs/editor/editor.all","vs/base/common/marked/marked","vs/base/common/insane/insane","vs/editor/edcore.main"],J=function(q){for(var e=[],b=0,N=q.length;b<N;b++)e[b]=Q[q[b]];return e};"use strict";var It;(function(q){var e=function(){function N(){this._pendingLoads=0}return N.prototype.attachListeners=function(M,w,S,C){var d=function(){w.removeEventListener("load",g),w.removeEventListener("error",p)},g=function(c){d(),S()},p=function(c){d(),C(c)};w.addEventListener("load",g),w.addEventListener("error",p)},N.prototype._onLoad=function(M,w){this._pendingLoads--,w()},N.prototype._onLoadError=function(M,w,S){this._pendingLoads--,w(S)},N.prototype._insertLinkNode=function(M){this._pendingLoads++;var w=document.head||document.getElementsByTagName("head")[0],S=w.getElementsByTagName("link")||w.getElementsByTagName("script");S.length>0?w.insertBefore(M,S[S.length-1]):w.appendChild(M)},N.prototype.createLinkTag=function(M,w,S,C){var d=this,g=document.createElement("link");g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("data-name",M);var p=function(){return d._onLoad(M,S)},c=function(o){return d._onLoadError(M,C,o)};return this.attachListeners(M,g,p,c),g.setAttribute("href",w),g},N.prototype._linkTagExists=function(M,w){var S,C,d,g,p=document.getElementsByTagName("link");for(S=0,C=p.length;S<C;S++)if(d=p[S].getAttribute("data-name"),g=p[S].getAttribute("href"),d===M||g===w)return!0;return!1},N.prototype.load=function(M,w,S,C){if(this._linkTagExists(M,w)){S();return}var d=this.createLinkTag(M,w,S,C);this._insertLinkNode(d)},N}(),b=function(){function N(){this._cssLoader=new e}return N.prototype.load=function(M,w,S,C){C=C||{};var d=C["vs/css"]||{};if(d.disabled){S({});return}var g=w.toUrl(M+".css");this._cssLoader.load(M,g,function(p){S({})},function(p){typeof S.error=="function"&&S.error("Could not find "+g+" or it was empty")})},N}();q.CSSPlugin=b,define("vs/css",new b)})(It||(It={}));"use strict";var ni=this&&this.__spreadArrays||function(){for(var q=0,e=0,b=arguments.length;e<b;e++)q+=arguments[e].length;for(var N=Array(q),M=0,e=0;e<b;e++)for(var w=arguments[e],S=0,C=w.length;S<C;S++,M++)N[M]=w[S];return N},Nt;(function(q){var e=function(){function C(){this._detected=!1,this._isPseudo=!1}return Object.defineProperty(C.prototype,"isPseudo",{get:function(){return this._detect(),this._isPseudo},enumerable:!0,configurable:!0}),C.prototype._detect=function(){this._detected||(this._detected=!0,this._isPseudo=typeof document!="undefined"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0)},C}();function b(C,d,g){var p;return d.length===0?p=C:p=C.replace(/\{(\d+)\}/g,function(c,o){var s=o[0],a=d[s],u=c;return typeof a=="string"?u=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(u=String(a)),u}),g.isPseudo&&(p="\uFF3B"+p.replace(/[aouei]/g,"$&$&")+"\uFF3D"),p}function N(C,d){var g=C[d];return g||(g=C["*"],g)?g:null}function M(C,d,g){for(var p=[],c=3;c<arguments.length;c++)p[c-3]=arguments[c];return b(g,p,C)}function w(C,d){return function(g,p){var c=Array.prototype.slice.call(arguments,2);return b(C[g],c,d)}}var S=function(){function C(d){var g=this;this._env=d,this.localize=function(p,c){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];return M.apply(void 0,ni([g._env,p,c],o))}}return C.prototype.setPseudoTranslation=function(d){this._env._isPseudo=d},C.prototype.create=function(d,g){return{localize:w(g[d],this._env)}},C.prototype.load=function(d,g,p,c){var o=this;if(c=c||{},!d||d.length===0)p({localize:this.localize});else{var s=c["vs/nls"]||{},a=s.availableLanguages?N(s.availableLanguages,d):null,u=".nls";a!==null&&a!==C.DEFAULT_TAG&&(u=u+"."+a);var r=function(i){Array.isArray(i)?i.localize=w(i,o._env):i.localize=w(i[d],o._env),p(i)};typeof s.loadBundle=="function"?s.loadBundle(d,a,function(i,n){i?g([d+".nls"],r):r(n)}):g([d+u],r)}},C.DEFAULT_TAG="i-default",C}();q.NLSPlugin=S,define("vs/nls",new S(new e))})(Nt||(Nt={})),define(Q[149],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StaticDND=e.DragAndDropData=e.DataTransfers=void 0,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:"text/plain"};class b{constructor(M){this.data=M}update(){}getData(){return this.data}}e.DragAndDropData=b,e.StaticDND={CurrentDragAndDropData:void 0}}),define(Q[30],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class b{constructor(w){this.domNode=w,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(w){this._maxWidth!==w&&(this._maxWidth=w,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(w){this._width!==w&&(this._width=w,this.domNode.style.width=this._width+"px")}setHeight(w){this._height!==w&&(this._height=w,this.domNode.style.height=this._height+"px")}setTop(w){this._top!==w&&(this._top=w,this.domNode.style.top=this._top+"px")}unsetTop(){this._top!==-1&&(this._top=-1,this.domNode.style.top="")}setLeft(w){this._left!==w&&(this._left=w,this.domNode.style.left=this._left+"px")}setBottom(w){this._bottom!==w&&(this._bottom=w,this.domNode.style.bottom=this._bottom+"px")}setRight(w){this._right!==w&&(this._right=w,this.domNode.style.right=this._right+"px")}setFontFamily(w){this._fontFamily!==w&&(this._fontFamily=w,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(w){this._fontWeight!==w&&(this._fontWeight=w,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(w){this._fontSize!==w&&(this._fontSize=w,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(w){this._fontFeatureSettings!==w&&(this._fontFeatureSettings=w,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(w){this._lineHeight!==w&&(this._lineHeight=w,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(w){this._letterSpacing!==w&&(this._letterSpacing=w,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(w){this._className!==w&&(this._className=w,this.domNode.className=this._className)}toggleClassName(w,S){this.domNode.classList.toggle(w,S),this._className=this.domNode.className}setDisplay(w){this._display!==w&&(this._display=w,this.domNode.style.display=this._display)}setPosition(w){this._position!==w&&(this._position=w,this.domNode.style.position=this._position)}setVisibility(w){this._visibility!==w&&(this._visibility=w,this.domNode.style.visibility=this._visibility)}setBackgroundColor(w){this._backgroundColor!==w&&(this._backgroundColor=w,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(w){this._layerHint!==w&&(this._layerHint=w,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(w){this._boxShadow!==w&&(this._boxShadow=w,this.domNode.style.boxShadow=w)}setContain(w){this._contain!==w&&(this._contain=w,this.domNode.style.contain=this._contain)}setAttribute(w,S){this.domNode.setAttribute(w,S)}removeAttribute(w){this.domNode.removeAttribute(w)}appendChild(w){this.domNode.appendChild(w.domNode)}removeChild(w){this.domNode.removeChild(w.domNode)}}e.FastDomNode=b;function N(M){return new b(M)}e.createFastDomNode=N}),define(Q[193],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let b=!1,N=null;function M(S){if(!S.parent||S.parent===S)return null;try{let C=S.location,d=S.parent.location;if(C.origin!=="null"&&d.origin!=="null"&&(C.protocol!==d.protocol||C.hostname!==d.hostname||C.port!==d.port))return b=!0,null}catch(C){return b=!0,null}return S.parent}class w{static getSameOriginWindowChain(){if(!N){N=[];let C=window,d;do d=M(C),d?N.push({window:C,iframeElement:C.frameElement||null}):N.push({window:C,iframeElement:null}),C=d;while(C)}return N.slice(0)}static hasDifferentOriginAncestor(){return N||this.getSameOriginWindowChain(),b}static getPositionOfChildWindowRelativeToAncestorWindow(C,d){if(!d||C===d)return{top:0,left:0};let g=0,p=0,c=this.getSameOriginWindowChain();for(const o of c){if(g+=o.window.scrollY,p+=o.window.scrollX,o.window===d||!o.iframeElement)break;let s=o.iframeElement.getBoundingClientRect();g+=s.top,p+=s.left}return{top:g,left:p}}}e.IframeUtils=w}),define(Q[275],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListError=void 0;class b extends Error{constructor(M,w){super(`ListError [${M}] ${w}`)}}e.ListError=b}),define(Q[276],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class b{constructor(M){this.spliceables=M}splice(M,w,S){this.spliceables.forEach(C=>C.splice(M,w,S))}}e.CombinedSpliceable=b}),define(Q[194],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const b=20;class N{constructor(w,S,C,d,g,p){this._scrollbarSize=Math.round(S),this._oppositeScrollbarSize=Math.round(C),this._arrowSize=Math.round(w),this._visibleSize=d,this._scrollSize=g,this._scrollPosition=p,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new N(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(w){const S=Math.round(w);return this._visibleSize!==S?(this._visibleSize=S,this._refreshComputedValues(),!0):!1}setScrollSize(w){const S=Math.round(w);return this._scrollSize!==S?(this._scrollSize=S,this._refreshComputedValues(),!0):!1}setScrollPosition(w){const S=Math.round(w);return this._scrollPosition!==S?(this._scrollPosition=S,this._refreshComputedValues(),!0):!1}setScrollbarSize(w){this._scrollbarSize=w}static _computeValues(w,S,C,d,g){const p=Math.max(0,C-w),c=Math.max(0,p-2*S),o=d>0&&d>C;if(!o)return{computedAvailableSize:Math.round(p),computedIsNeeded:o,computedSliderSize:Math.round(c),computedSliderRatio:0,computedSliderPosition:0};const s=Math.round(Math.max(b,Math.floor(C*c/d))),a=(c-s)/(d-C),u=g*a;return{computedAvailableSize:Math.round(p),computedIsNeeded:o,computedSliderSize:Math.round(s),computedSliderRatio:a,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const w=N._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=w.computedAvailableSize,this._computedIsNeeded=w.computedIsNeeded,this._computedSliderSize=w.computedSliderSize,this._computedSliderRatio=w.computedSliderRatio,this._computedSliderPosition=w.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(w){if(!this._computedIsNeeded)return 0;const S=w-this._arrowSize-this._computedSliderSize/2;return Math.round(S/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(w){if(!this._computedIsNeeded)return 0;const S=w-this._arrowSize;let C=this._scrollPosition;return S<this._computedSliderPosition?C-=this._visibleSize:C+=this._visibleSize,C}getDesiredScrollPositionFromDelta(w){if(!this._computedIsNeeded)return 0;const S=this._computedSliderPosition+w;return Math.round(S/this._computedSliderRatio)}}e.ScrollbarState=N}),define(Q[98],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WeakMapper=e.TreeError=e.TreeMouseEventTarget=void 0;var b;(function(w){w[w.Unknown=0]="Unknown",w[w.Twistie=1]="Twistie",w[w.Element=2]="Element"})(b=e.TreeMouseEventTarget||(e.TreeMouseEventTarget={}));class N extends Error{constructor(S,C){super(`TreeError [${S}] ${C}`)}}e.TreeError=N;class M{constructor(S){this.fn=S,this._map=new WeakMap}map(S){let C=this._map.get(S);return C||(C=this.fn(S),this._map.set(S,C)),C}}e.WeakMapper=M}),define(Q[19],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asArray=e.pushToEnd=e.pushToStart=e.arrayInsert=e.range=e.flatten=e.firstOrDefault=e.distinctES6=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.coalesce=e.groupBy=e.mergeSort=e.quickSelect=e.findFirstInSorted=e.binarySearch=e.equals=e.tail2=e.tail=void 0;function b(f,v=0){return f[f.length-(1+v)]}e.tail=b;function N(f){if(f.length===0)throw new Error("Invalid tail call");return[f.slice(0,f.length-1),f[f.length-1]]}e.tail2=N;function M(f,v,y=(L,I)=>L===I){if(f===v)return!0;if(!f||!v||f.length!==v.length)return!1;for(let L=0,I=f.length;L<I;L++)if(!y(f[L],v[L]))return!1;return!0}e.equals=M;function w(f,v,y){let L=0,I=f.length-1;for(;L<=I;){const k=(L+I)/2|0,E=y(f[k],v);if(E<0)L=k+1;else if(E>0)I=k-1;else return k}return-(L+1)}e.binarySearch=w;function S(f,v){let y=0,L=f.length;if(L===0)return 0;for(;y<L;){const I=Math.floor((y+L)/2);v(f[I])?L=I:y=I+1}return y}e.findFirstInSorted=S;function C(f,v,y){if(f=f|0,f>=v.length)throw new TypeError("invalid index");let L=v[Math.floor(v.length*Math.random())],I=[],k=[],E=[];for(let T of v){const O=y(T,L);O<0?I.push(T):O>0?k.push(T):E.push(T)}return f<I.length?C(f,I,y):f<I.length+E.length?E[0]:C(f-(I.length+E.length),k,y)}e.quickSelect=C;function d(f,v){return p(f,v,0,f.length-1,[]),f}e.mergeSort=d;function g(f,v,y,L,I,k){let E=y,T=L+1;for(let O=y;O<=I;O++)k[O]=f[O];for(let O=y;O<=I;O++)E>L?f[O]=k[T++]:T>I?f[O]=k[E++]:v(k[T],k[E])<0?f[O]=k[T++]:f[O]=k[E++]}function p(f,v,y,L,I){if(!(L<=y)){const k=y+(L-y)/2|0;p(f,v,y,k,I),p(f,v,k+1,L,I),!(v(f[k],f[k+1])<=0)&&g(f,v,y,k,L,I)}}function c(f,v){const y=[];let L;for(const I of d(f.slice(0),v))!L||v(L[0],I)!==0?(L=[I],y.push(L)):L.push(I);return y}e.groupBy=c;function o(f){return f.filter(v=>!!v)}e.coalesce=o;function s(f){return!Array.isArray(f)||f.length===0}e.isFalsyOrEmpty=s;function a(f){return Array.isArray(f)&&f.length>0}e.isNonEmptyArray=a;function u(f,v){if(!v)return f.filter((L,I)=>f.indexOf(L)===I);const y=Object.create(null);return f.filter(L=>{const I=v(L);return y[I]?!1:(y[I]=!0,!0)})}e.distinct=u;function r(f){const v=new Set;return f.filter(y=>v.has(y)?!1:(v.add(y),!0))}e.distinctES6=r;function i(f,v){return f.length>0?f[0]:v}e.firstOrDefault=i;function n(f){return[].concat(...f)}e.flatten=n;function t(f,v){let y=typeof v=="number"?f:0;typeof v=="number"?y=f:(y=0,v=f);const L=[];if(y<=v)for(let I=y;I<v;I++)L.push(I);else for(let I=y;I>v;I--)L.push(I);return L}e.range=t;function l(f,v,y){const L=f.slice(0,v),I=f.slice(v);return L.concat(y,I)}e.arrayInsert=l;function h(f,v){const y=f.indexOf(v);y>-1&&(f.splice(y,1),f.unshift(v))}e.pushToStart=h;function m(f,v){const y=f.indexOf(v);y>-1&&(f.splice(y,1),f.push(v))}e.pushToEnd=m;function _(f){return Array.isArray(f)?f:[f]}e.asArray=_}),define(Q[195],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ok=void 0;function b(N,M){if(!N)throw new Error(M?`Assertion failed (${M})`:"Assertion Failed")}e.ok=b}),define(Q[196],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=e.forEach=void 0;const b=Object.prototype.hasOwnProperty;function N(w,S){for(let C in w)if(b.call(w,C)&&S({key:C,value:w[C]},function(){delete w[C]})===!1)return}e.forEach=N;class M{constructor(){this.map=new Map}add(S,C){let d=this.map.get(S);d||(d=new Set,this.map.set(S,d)),d.add(C)}delete(S,C){const d=this.map.get(S);!d||(d.delete(C),d.size===0&&this.map.delete(S))}forEach(S,C){const d=this.map.get(S);!d||d.forEach(C)}}e.SetMap=M}),define(Q[29],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function b(C,d){const g=Math.pow(10,d);return Math.round(C*g)/g}class N{constructor(d,g,p,c=1){this.r=Math.min(255,Math.max(0,d))|0,this.g=Math.min(255,Math.max(0,g))|0,this.b=Math.min(255,Math.max(0,p))|0,this.a=b(Math.max(Math.min(1,c),0),3)}static equals(d,g){return d.r===g.r&&d.g===g.g&&d.b===g.b&&d.a===g.a}}e.RGBA=N;class M{constructor(d,g,p,c){this.h=Math.max(Math.min(360,d),0)|0,this.s=b(Math.max(Math.min(1,g),0),3),this.l=b(Math.max(Math.min(1,p),0),3),this.a=b(Math.max(Math.min(1,c),0),3)}static equals(d,g){return d.h===g.h&&d.s===g.s&&d.l===g.l&&d.a===g.a}static fromRGBA(d){const g=d.r/255,p=d.g/255,c=d.b/255,o=d.a,s=Math.max(g,p,c),a=Math.min(g,p,c);let u=0,r=0;const i=(a+s)/2,n=s-a;if(n>0){switch(r=Math.min(i<=.5?n/(2*i):n/(2-2*i),1),s){case g:u=(p-c)/n+(p<c?6:0);break;case p:u=(c-g)/n+2;break;case c:u=(g-p)/n+4;break}u*=60,u=Math.round(u)}return new M(u,r,i,o)}static _hue2rgb(d,g,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(g-d)*6*p:p<1/2?g:p<2/3?d+(g-d)*(2/3-p)*6:d}static toRGBA(d){const g=d.h/360,{s:p,l:c,a:o}=d;let s,a,u;if(p===0)s=a=u=c;else{const r=c<.5?c*(1+p):c+p-c*p,i=2*c-r;s=M._hue2rgb(i,r,g+1/3),a=M._hue2rgb(i,r,g),u=M._hue2rgb(i,r,g-1/3)}return new N(Math.round(s*255),Math.round(a*255),Math.round(u*255),o)}}e.HSLA=M;class w{constructor(d,g,p,c){this.h=Math.max(Math.min(360,d),0)|0,this.s=b(Math.max(Math.min(1,g),0),3),this.v=b(Math.max(Math.min(1,p),0),3),this.a=b(Math.max(Math.min(1,c),0),3)}static equals(d,g){return d.h===g.h&&d.s===g.s&&d.v===g.v&&d.a===g.a}static fromRGBA(d){const g=d.r/255,p=d.g/255,c=d.b/255,o=Math.max(g,p,c),s=Math.min(g,p,c),a=o-s,u=o===0?0:a/o;let r;return a===0?r=0:o===g?r=((p-c)/a%6+6)%6:o===p?r=(c-g)/a+2:r=(g-p)/a+4,new w(Math.round(r*60),u,o,d.a)}static toRGBA(d){const{h:g,s:p,v:c,a:o}=d,s=c*p,a=s*(1-Math.abs(g/60%2-1)),u=c-s;let[r,i,n]=[0,0,0];return g<60?(r=s,i=a):g<120?(r=a,i=s):g<180?(i=s,n=a):g<240?(i=a,n=s):g<300?(r=a,n=s):g<=360&&(r=s,n=a),r=Math.round((r+u)*255),i=Math.round((i+u)*255),n=Math.round((n+u)*255),new N(r,i,n,o)}}e.HSVA=w;class S{constructor(d){if(d)if(d instanceof N)this.rgba=d;else if(d instanceof M)this._hsla=d,this.rgba=M.toRGBA(d);else if(d instanceof w)this._hsva=d,this.rgba=w.toRGBA(d);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(d){return S.Format.CSS.parseHex(d)||S.red}get hsla(){return this._hsla?this._hsla:M.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:w.fromRGBA(this.rgba)}equals(d){return!!d&&N.equals(this.rgba,d.rgba)&&M.equals(this.hsla,d.hsla)&&w.equals(this.hsva,d.hsva)}getRelativeLuminance(){const d=S._relativeLuminanceForComponent(this.rgba.r),g=S._relativeLuminanceForComponent(this.rgba.g),p=S._relativeLuminanceForComponent(this.rgba.b),c=.2126*d+.7152*g+.0722*p;return b(c,4)}static _relativeLuminanceForComponent(d){const g=d/255;return g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(d){const g=this.getRelativeLuminance(),p=d.getRelativeLuminance();return g>p}isDarkerThan(d){const g=this.getRelativeLuminance(),p=d.getRelativeLuminance();return g<p}lighten(d){return new S(new M(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*d,this.hsla.a))}darken(d){return new S(new M(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*d,this.hsla.a))}transparent(d){const{r:g,g:p,b:c,a:o}=this.rgba;return new S(new N(g,p,c,o*d))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new S(new N(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return""+S.Format.CSS.format(this)}static getLighterColor(d,g,p){if(d.isLighterThan(g))return d;p=p||.5;const c=d.getRelativeLuminance(),o=g.getRelativeLuminance();return p=p*(o-c)/o,d.lighten(p)}static getDarkerColor(d,g,p){if(d.isDarkerThan(g))return d;p=p||.5;const c=d.getRelativeLuminance(),o=g.getRelativeLuminance();return p=p*(c-o)/c,d.darken(p)}}e.Color=S,S.white=new S(new N(255,255,255,1)),S.black=new S(new N(0,0,0,1)),S.red=new S(new N(255,0,0,1)),S.blue=new S(new N(0,0,255,1)),S.cyan=new S(new N(0,255,255,1)),S.lightgrey=new S(new N(211,211,211,1)),S.transparent=new S(new N(0,0,0,0)),function(C){let d;(function(g){let p;(function(c){function o(m){return m.rgba.a===1?`rgb(${m.rgba.r}, ${m.rgba.g}, ${m.rgba.b})`:C.Format.CSS.formatRGBA(m)}c.formatRGB=o;function s(m){return`rgba(${m.rgba.r}, ${m.rgba.g}, ${m.rgba.b}, ${+m.rgba.a.toFixed(2)})`}c.formatRGBA=s;function a(m){return m.hsla.a===1?`hsl(${m.hsla.h}, ${(m.hsla.s*100).toFixed(2)}%, ${(m.hsla.l*100).toFixed(2)}%)`:C.Format.CSS.formatHSLA(m)}c.formatHSL=a;function u(m){return`hsla(${m.hsla.h}, ${(m.hsla.s*100).toFixed(2)}%, ${(m.hsla.l*100).toFixed(2)}%, ${m.hsla.a.toFixed(2)})`}c.formatHSLA=u;function r(m){const _=m.toString(16);return _.length!==2?"0"+_:_}function i(m){return`#${r(m.rgba.r)}${r(m.rgba.g)}${r(m.rgba.b)}`}c.formatHex=i;function n(m,_=!1){return _&&m.rgba.a===1?C.Format.CSS.formatHex(m):`#${r(m.rgba.r)}${r(m.rgba.g)}${r(m.rgba.b)}${r(Math.round(m.rgba.a*255))}`}c.formatHexA=n;function t(m){return m.isOpaque()?C.Format.CSS.formatHex(m):C.Format.CSS.formatRGBA(m)}c.format=t;function l(m){const _=m.length;if(_===0||m.charCodeAt(0)!==35)return null;if(_===7){const f=16*h(m.charCodeAt(1))+h(m.charCodeAt(2)),v=16*h(m.charCodeAt(3))+h(m.charCodeAt(4)),y=16*h(m.charCodeAt(5))+h(m.charCodeAt(6));return new C(new N(f,v,y,1))}if(_===9){const f=16*h(m.charCodeAt(1))+h(m.charCodeAt(2)),v=16*h(m.charCodeAt(3))+h(m.charCodeAt(4)),y=16*h(m.charCodeAt(5))+h(m.charCodeAt(6)),L=16*h(m.charCodeAt(7))+h(m.charCodeAt(8));return new C(new N(f,v,y,L/255))}if(_===4){const f=h(m.charCodeAt(1)),v=h(m.charCodeAt(2)),y=h(m.charCodeAt(3));return new C(new N(16*f+f,16*v+v,16*y+y))}if(_===5){const f=h(m.charCodeAt(1)),v=h(m.charCodeAt(2)),y=h(m.charCodeAt(3)),L=h(m.charCodeAt(4));return new C(new N(16*f+f,16*v+v,16*y+y,(16*L+L)/255))}return null}c.parseHex=l;function h(m){switch(m){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(p=g.CSS||(g.CSS={}))})(d=C.Format||(C.Format={}))}(S=e.Color||(e.Color={}))}),define(Q[99],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.memoize=e.createMemoizer=void 0;let b=0;function N(){const w=`$memoize${b++}`;let S;const C=function(g,p,c){let o=null,s=null;if(typeof c.value=="function"?(o="value",s=c.value,s.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof c.get=="function"&&(o="get",s=c.get),!s)throw new Error("not supported");const a=`${w}:${p}`;c[o]=function(...u){return S=this,this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!0,enumerable:!1,writable:!0,value:s.apply(this,u)}),this[a]}};return C.clear=()=>{typeof S!="undefined"&&Object.getOwnPropertyNames(S).forEach(d=>{d.indexOf(w)===0&&delete S[d]})},C}e.createMemoizer=N;function M(w,S,C){return N()(w,S,C)}e.memoize=M}),define(Q[277],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class b{constructor(M,w,S,C){this.originalStart=M,this.originalLength=w,this.modifiedStart=S,this.modifiedLength=C}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=b}),define(Q[12],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.illegalState=e.illegalArgument=e.canceled=e.isPromiseCanceledError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.errorHandler=e.ErrorHandler=void 0;class b{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(o){setTimeout(()=>{throw o.stack?new Error(o.message+`
`+o.stack):o},0)}}emit(o){this.listeners.forEach(s=>{s(o)})}onUnexpectedError(o){this.unexpectedErrorHandler(o),this.emit(o)}onUnexpectedExternalError(o){this.unexpectedErrorHandler(o)}}e.ErrorHandler=b,e.errorHandler=new b;function N(c){C(c)||e.errorHandler.onUnexpectedError(c)}e.onUnexpectedError=N;function M(c){C(c)||e.errorHandler.onUnexpectedExternalError(c)}e.onUnexpectedExternalError=M;function w(c){if(c instanceof Error){let{name:o,message:s}=c;const a=c.stacktrace||c.stack;return{$isError:!0,name:o,message:s,stack:a}}return c}e.transformErrorForSerialization=w;const S="Canceled";function C(c){return c instanceof Error&&c.name===S&&c.message===S}e.isPromiseCanceledError=C;function d(){const c=new Error(S);return c.name=c.message,c}e.canceled=d;function g(c){return c?new Error(`Illegal argument: ${c}`):new Error("Illegal argument")}e.illegalArgument=g;function p(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}e.illegalState=p}),define(Q[88],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function b(N){const M=this;let w=!1,S;return function(){return w||(w=!0,S=N.apply(M,arguments)),S}}e.once=b}),define(Q[119],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class b{constructor(M){this._prefix=M,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=b,e.defaultGenerator=new b("id#")});let kt;(function(){function q(e,b,N){function M(C,d){if(!b[C]){if(!e[C]){var g=typeof require=="function"&&require;if(!d&&g)return g(C,!0);if(w)return w(C,!0);var p=new Error("Cannot find module '"+C+"'");throw p.code="MODULE_NOT_FOUND",p}var c=b[C]={exports:{}};e[C][0].call(c.exports,function(o){var s=e[C][1][o];return M(s||o)},c,c.exports,q,e,b,N)}return b[C].exports}for(var w=typeof require=="function"&&require,S=0;S<N.length;S++)M(N[S]);return M}return q})()({1:[function(q,e,b){"use strict";var N=q("./toMap"),M=["background","base","cite","href","longdesc","src","usemap"];e.exports={uris:N(M)}},{"./toMap":10}],2:[function(q,e,b){"use strict";var N={allowedAttributes:{"*":["title","accesskey"],a:["href","name","target","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};e.exports=N},{}],3:[function(q,e,b){"use strict";var N=q("./toMap"),M=["area","br","col","hr","img","wbr","input","base","basefont","link","meta"];e.exports={voids:N(M)}},{"./toMap":10}],4:[function(q,e,b){"use strict";var N=q("he"),M=q("assignment"),w=q("./parser"),S=q("./sanitizer"),C=q("./defaults");function d(g,p,c){var o=[],s=c===!0?p:M({},C,p),a=S(o,s);return w(g,a),o.join("")}d.defaults=C,e.exports=d,kt=d},{"./defaults":2,"./parser":7,"./sanitizer":8,assignment:6,he:9}],5:[function(q,e,b){"use strict";e.exports=function(M){return typeof M=="string"?M.toLowerCase():M}},{}],6:[function(q,e,b){"use strict";function N(M){for(var w=Array.prototype.slice.call(arguments,1),S,C;w.length;){S=w.shift();for(C in S)S.hasOwnProperty(C)&&(Object.prototype.toString.call(M[C])==="[object Object]"?M[C]=N(M[C],S[C]):M[C]=S[C])}return M}e.exports=N},{}],7:[function(q,e,b){"use strict";var N=q("he"),M=q("./lowercase"),w=q("./attributes"),S=q("./elements"),C=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,d=/^<\s*\/\s*([\w:-]+)[^>]*>/,g=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,p=/^</,c=/^<\s*\//;function o(){var a=[];return a.lastItem=function(){return a[a.length-1]},a}function s(a,u){for(var r=o(),i=a,n;a;)t();v();function t(){n=!0,l();var y=a===i;i=a,y&&(a="")}function l(){a.substr(0,4)==="<!--"?m():c.test(a)?h(d,v):p.test(a)&&h(C,f),_()}function h(y,L){var I=a.match(y);I&&(a=a.substring(I[0].length),I[0].replace(y,L),n=!1)}function m(){var y=a.indexOf("-->");y>=0&&(u.comment&&u.comment(a.substring(4,y)),a=a.substring(y+3),n=!1)}function _(){if(!!n){var y,L=a.indexOf("<");L>=0?(y=a.substring(0,L),a=a.substring(L)):(y=a,a=""),u.chars&&u.chars(y)}}function f(y,L,I,k){var E={},T=M(L),O=S.voids[T]||!!k;I.replace(g,A),O||r.push(T),u.start&&u.start(T,E,O);function A(B,F,D,R,W){D===void 0&&R===void 0&&W===void 0?E[F]=void 0:E[F]=N.decode(D||R||W||"")}}function v(y,L){var I,k=0,E=M(L);if(E)for(k=r.length-1;k>=0&&r[k]!==E;k--);if(k>=0){for(I=r.length-1;I>=k;I--)u.end&&u.end(r[I]);r.length=k}}}e.exports=s},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(q,e,b){"use strict";var N=q("he"),M=q("./lowercase"),w=q("./attributes"),S=q("./elements");function C(d,g){var p,c,o=g||{};return l(),{start:a,end:u,chars:i};function s(h){d.push(h)}function a(h,m,_){var f=M(h);if(c.ignoring){n(f);return}if((o.allowedTags||[]).indexOf(f)===-1){n(f);return}if(o.filter&&!o.filter({tag:f,attrs:m})){n(f);return}s("<"),s(f),Object.keys(m).forEach(v),s(_?"/>":">");function v(y){var L=m[y],I=(o.allowedClasses||{})[f]||[],k=(o.allowedAttributes||{})[f]||[];k=k.concat((o.allowedAttributes||{})["*"]||[]);var E,T=M(y);T==="class"&&k.indexOf(T)===-1?(L=L.split(" ").filter(O).join(" ").trim(),E=L.length):E=k.indexOf(T)!==-1&&(w.uris[T]!==!0||r(L)),E&&(s(" "),s(y),typeof L=="string"&&(s('="'),s(N.encode(L)),s('"')));function O(A){return I&&I.indexOf(A)!==-1}}}function u(h){var m=M(h),_=(o.allowedTags||[]).indexOf(m)!==-1;_&&c.ignoring===!1?(s("</"),s(m),s(">")):t(m)}function r(h){var m=h[0];if(m==="#"||m==="/")return!0;var _=h.indexOf(":");if(_===-1)return!0;var f=h.indexOf("?");if(f!==-1&&_>f)return!0;var v=h.indexOf("#");if(v!==-1&&_>v)return!0;return o.allowedSchemes.some(y);function y(L){return h.indexOf(L+":")===0}}function i(h){c.ignoring===!1&&s(o.transformText?o.transformText(h):h)}function n(h){S.voids[h]||(c.ignoring===!1?c={ignoring:h,depth:1}:c.ignoring===h&&c.depth++)}function t(h){c.ignoring===h&&--c.depth<=0&&l()}function l(){c={ignoring:!1,depth:0}}}e.exports=C},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(q,e,b){"use strict";var N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},M={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},w=/(&amp;|&lt;|&gt;|&quot;|&#39;)/g,S=/[&<>"']/g;function C(c){return N[c]}function d(c){return M[c]}function g(c){return c==null?"":String(c).replace(S,C)}function p(c){return c==null?"":String(c).replace(w,d)}g.options=p.options={},e.exports={encode:g,escape:g,decode:p,unescape:p,version:"1.0.0-browser"}},{}],10:[function(q,e,b){"use strict";function N(w){return w.reduce(M,{})}function M(w,S){return w[S]=!0,w}e.exports=N},{}]},{},[4]),define("vs/base/common/insane/insane",function(){return{insane:kt}}),define(Q[54],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var b;(function(N){function M(h){return h&&typeof h=="object"&&typeof h[Symbol.iterator]=="function"}N.is=M;const w=Object.freeze([]);function S(){return w}N.empty=S;function*C(h){yield h}N.single=C;function d(h){return h||w}N.from=d;function g(h){return!h||h[Symbol.iterator]().next().done===!0}N.isEmpty=g;function p(h){return h[Symbol.iterator]().next().value}N.first=p;function c(h,m){for(const _ of h)if(m(_))return!0;return!1}N.some=c;function o(h,m){for(const _ of h)if(m(_))return _}N.find=o;function*s(h,m){for(const _ of h)m(_)&&(yield _)}N.filter=s;function*a(h,m){for(const _ of h)yield m(_)}N.map=a;function*u(...h){for(const m of h)for(const _ of m)yield _}N.concat=u;function*r(h){for(const m of h)for(const _ of m)yield _}N.concatNested=r;function i(h,m,_){let f=_;for(const v of h)f=m(f,v);return f}N.reduce=i;function*n(h,m,_=h.length){for(m<0&&(m+=h.length),_<0?_+=h.length:_>h.length&&(_=h.length);m<_;m++)yield h[m]}N.slice=n;function t(h,m=Number.POSITIVE_INFINITY){const _=[];if(m===0)return[_,h];const f=h[Symbol.iterator]();for(let v=0;v<m;v++){const y=f.next();if(y.done)return[_,N.empty()];_.push(y.value)}return[_,{[Symbol.iterator](){return f}}]}N.consume=t;function l(h,m,_=(f,v)=>f===v){const f=h[Symbol.iterator](),v=m[Symbol.iterator]();for(;;){const y=f.next(),L=v.next();if(y.done!==L.done)return!1;if(y.done)return!0;if(!_(y.value,L.value))return!1}}N.equals=l})(b=e.Iterable||(e.Iterable={}))}),define(Q[39],J([0,1,12]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedKeybinding=e.ResolvedKeybindingPart=e.ChordKeybinding=e.SimpleKeybinding=e.createSimpleKeybinding=e.createKeybinding=e.KeyChord=e.KeyCodeUtils=void 0;class N{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(r,i){this._keyCodeToStr[r]=i,this._strToKeyCode[i.toLowerCase()]=r}keyCodeToStr(r){return this._keyCodeToStr[r]}strToKeyCode(r){return this._strToKeyCode[r.toLowerCase()]||0}}const M=new N,w=new N,S=new N;(function(){function u(r,i,n=i,t=n){M.define(r,i),w.define(r,n),S.define(r,t)}u(0,"unknown"),u(1,"Backspace"),u(2,"Tab"),u(3,"Enter"),u(4,"Shift"),u(5,"Ctrl"),u(6,"Alt"),u(7,"PauseBreak"),u(8,"CapsLock"),u(9,"Escape"),u(10,"Space"),u(11,"PageUp"),u(12,"PageDown"),u(13,"End"),u(14,"Home"),u(15,"LeftArrow","Left"),u(16,"UpArrow","Up"),u(17,"RightArrow","Right"),u(18,"DownArrow","Down"),u(19,"Insert"),u(20,"Delete"),u(21,"0"),u(22,"1"),u(23,"2"),u(24,"3"),u(25,"4"),u(26,"5"),u(27,"6"),u(28,"7"),u(29,"8"),u(30,"9"),u(31,"A"),u(32,"B"),u(33,"C"),u(34,"D"),u(35,"E"),u(36,"F"),u(37,"G"),u(38,"H"),u(39,"I"),u(40,"J"),u(41,"K"),u(42,"L"),u(43,"M"),u(44,"N"),u(45,"O"),u(46,"P"),u(47,"Q"),u(48,"R"),u(49,"S"),u(50,"T"),u(51,"U"),u(52,"V"),u(53,"W"),u(54,"X"),u(55,"Y"),u(56,"Z"),u(57,"Meta"),u(58,"ContextMenu"),u(59,"F1"),u(60,"F2"),u(61,"F3"),u(62,"F4"),u(63,"F5"),u(64,"F6"),u(65,"F7"),u(66,"F8"),u(67,"F9"),u(68,"F10"),u(69,"F11"),u(70,"F12"),u(71,"F13"),u(72,"F14"),u(73,"F15"),u(74,"F16"),u(75,"F17"),u(76,"F18"),u(77,"F19"),u(78,"NumLock"),u(79,"ScrollLock"),u(80,";",";","OEM_1"),u(81,"=","=","OEM_PLUS"),u(82,",",",","OEM_COMMA"),u(83,"-","-","OEM_MINUS"),u(84,".",".","OEM_PERIOD"),u(85,"/","/","OEM_2"),u(86,"`","`","OEM_3"),u(110,"ABNT_C1"),u(111,"ABNT_C2"),u(87,"[","[","OEM_4"),u(88,"\\","\\","OEM_5"),u(89,"]","]","OEM_6"),u(90,"'","'","OEM_7"),u(91,"OEM_8"),u(92,"OEM_102"),u(93,"NumPad0"),u(94,"NumPad1"),u(95,"NumPad2"),u(96,"NumPad3"),u(97,"NumPad4"),u(98,"NumPad5"),u(99,"NumPad6"),u(100,"NumPad7"),u(101,"NumPad8"),u(102,"NumPad9"),u(103,"NumPad_Multiply"),u(104,"NumPad_Add"),u(105,"NumPad_Separator"),u(106,"NumPad_Subtract"),u(107,"NumPad_Decimal"),u(108,"NumPad_Divide")})();var C;(function(u){function r(h){return M.keyCodeToStr(h)}u.toString=r;function i(h){return M.strToKeyCode(h)}u.fromString=i;function n(h){return w.keyCodeToStr(h)}u.toUserSettingsUS=n;function t(h){return S.keyCodeToStr(h)}u.toUserSettingsGeneral=t;function l(h){return w.strToKeyCode(h)||S.strToKeyCode(h)}u.fromUserSettings=l})(C=e.KeyCodeUtils||(e.KeyCodeUtils={}));function d(u,r){const i=(r&65535)<<16>>>0;return(u|i)>>>0}e.KeyChord=d;function g(u,r){if(u===0)return null;const i=(u&65535)>>>0,n=(u&4294901760)>>>16;return n!==0?new o([p(i,r),p(n,r)]):new o([p(i,r)])}e.createKeybinding=g;function p(u,r){const i=!!(u&2048),n=!!(u&256),t=r===2?n:i,l=!!(u&1024),h=!!(u&512),m=r===2?i:n,_=u&255;return new c(t,l,h,m,_)}e.createSimpleKeybinding=p;class c{constructor(r,i,n,t,l){this.ctrlKey=r,this.shiftKey=i,this.altKey=n,this.metaKey=t,this.keyCode=l}equals(r){return this.ctrlKey===r.ctrlKey&&this.shiftKey===r.shiftKey&&this.altKey===r.altKey&&this.metaKey===r.metaKey&&this.keyCode===r.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new o([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}e.SimpleKeybinding=c;class o{constructor(r){if(r.length===0)throw b.illegalArgument("parts");this.parts=r}}e.ChordKeybinding=o;class s{constructor(r,i,n,t,l,h){this.ctrlKey=r,this.shiftKey=i,this.altKey=n,this.metaKey=t,this.keyLabel=l,this.keyAriaLabel=h}}e.ResolvedKeybindingPart=s;class a{}e.ResolvedKeybinding=a}),define(Q[150],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class b{constructor(M){this.executor=M,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(M){this._error=M}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=b}),define(Q[2],J([0,1,54]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImmortalReference=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.dispose=e.isDisposable=e.MultiDisposeError=e.trackDisposable=void 0;const N=!1;let M=null;if(N){const r="__is_disposable_tracked__";M=new class{trackDisposable(i){const n=new Error("Potentially leaked disposable").stack;setTimeout(()=>{i[r]||console.log(n)},3e3)}markTracked(i){if(i&&i!==s.None)try{i[r]=!0}catch(n){}}}}function w(r){!M||M.markTracked(r)}function S(r){return M&&M.trackDisposable(r),r}e.trackDisposable=S;class C extends Error{constructor(i){super(`Encountered errors while disposing of store. Errors: [${i.join(", ")}]`);this.errors=i}}e.MultiDisposeError=C;function d(r){return typeof r.dispose=="function"&&r.dispose.length===0}e.isDisposable=d;function g(r){if(b.Iterable.is(r)){let i=[];for(const n of r)if(n){w(n);try{n.dispose()}catch(t){i.push(t)}}if(i.length===1)throw i[0];if(i.length>1)throw new C(i);return Array.isArray(r)?[]:r}else if(r)return w(r),r.dispose(),r}e.dispose=g;function p(...r){return r.forEach(w),c(()=>g(r))}e.combinedDisposable=p;function c(r){const i=S({dispose:()=>{w(i),r()}});return i}e.toDisposable=c;class o{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(w(this),this._isDisposed=!0,this.clear())}clear(){try{g(this._toDispose.values())}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return w(i),this._isDisposed?o.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(i),i}}e.DisposableStore=o,o.DISABLE_DISPOSED_WARNING=!1;class s{constructor(){this._store=new o,S(this)}dispose(){w(this),this._store.dispose()}_register(i){if(i===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(i)}}e.Disposable=s,s.None=Object.freeze({dispose(){}});class a{constructor(){this._isDisposed=!1,S(this)}get value(){return this._isDisposed?void 0:this._value}set value(i){var n;this._isDisposed||i===this._value||((n=this._value)===null||n===void 0||n.dispose(),i&&w(i),this._value=i)}clear(){this.value=void 0}dispose(){var i;this._isDisposed=!0,w(this),(i=this._value)===null||i===void 0||i.dispose(),this._value=void 0}}e.MutableDisposable=a;class u{constructor(i){this.object=i}dispose(){}}e.ImmortalReference=u}),define(Q[71],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class b{constructor(w){this.element=w,this.next=b.Undefined,this.prev=b.Undefined}}b.Undefined=new b(void 0);class N{constructor(){this._first=b.Undefined,this._last=b.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===b.Undefined}clear(){this._first=b.Undefined,this._last=b.Undefined,this._size=0}unshift(w){return this._insert(w,!1)}push(w){return this._insert(w,!0)}_insert(w,S){const C=new b(w);if(this._first===b.Undefined)this._first=C,this._last=C;else if(S){const g=this._last;this._last=C,C.prev=g,g.next=C}else{const g=this._first;this._first=C,C.next=g,g.prev=C}this._size+=1;let d=!1;return()=>{d||(d=!0,this._remove(C))}}shift(){if(this._first!==b.Undefined){const w=this._first.element;return this._remove(this._first),w}}pop(){if(this._last!==b.Undefined){const w=this._last.element;return this._remove(this._last),w}}_remove(w){if(w.prev!==b.Undefined&&w.next!==b.Undefined){const S=w.prev;S.next=w.next,w.next.prev=S}else w.prev===b.Undefined&&w.next===b.Undefined?(this._first=b.Undefined,this._last=b.Undefined):w.next===b.Undefined?(this._last=this._last.prev,this._last.next=b.Undefined):w.prev===b.Undefined&&(this._first=this._first.next,this._first.prev=b.Undefined);this._size-=1}*[Symbol.iterator](){let w=this._first;for(;w!==b.Undefined;)yield w.element,w=w.next}}e.LinkedList=N}),function(q,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e():typeof define=="function"&&define.amd?define("vs/base/common/marked/marked",e):(q=typeof globalThis!="undefined"?globalThis:q||self,q.marked=e())}(this,function(){"use strict";function q(Se,we){for(var ye=0;ye<we.length;ye++){var fe=we[ye];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(Se,fe.key,fe)}}function e(Se,we,ye){return we&&q(Se.prototype,we),ye&&q(Se,ye),Se}function b(Se,we){if(!!Se){if(typeof Se=="string")return N(Se,we);var ye=Object.prototype.toString.call(Se).slice(8,-1);if(ye==="Object"&&Se.constructor&&(ye=Se.constructor.name),ye==="Map"||ye==="Set")return Array.from(Se);if(ye==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ye))return N(Se,we)}}function N(Se,we){(we==null||we>Se.length)&&(we=Se.length);for(var ye=0,fe=new Array(we);ye<we;ye++)fe[ye]=Se[ye];return fe}function M(Se,we){var ye;if(typeof Symbol=="undefined"||Se[Symbol.iterator]==null){if(Array.isArray(Se)||(ye=b(Se))||we&&Se&&typeof Se.length=="number"){ye&&(Se=ye);var fe=0;return function(){return fe>=Se.length?{done:!0}:{done:!1,value:Se[fe++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ye=Se[Symbol.iterator](),ye.next.bind(ye)}function w(Se){var we={exports:{}};return Se(we,we.exports),we.exports}var S=w(function(Se){function we(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function ye(fe){Se.exports.defaults=fe}Se.exports={defaults:we(),getDefaults:we,changeDefaults:ye}}),C=/[&<>"']/,d=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,p=/[<>"']|&(?!#?\w+;)/g,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},o=function(we){return c[we]};function s(Se,we){if(we){if(C.test(Se))return Se.replace(d,o)}else if(g.test(Se))return Se.replace(p,o);return Se}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(Se){return Se.replace(a,function(we,ye){return ye=ye.toLowerCase(),ye==="colon"?":":ye.charAt(0)==="#"?ye.charAt(1)==="x"?String.fromCharCode(parseInt(ye.substring(2),16)):String.fromCharCode(+ye.substring(1)):""})}var r=/(^|[^\[])\^/g;function i(Se,we){Se=Se.source||Se,we=we||"";var ye={replace:function(de,ge){return ge=ge.source||ge,ge=ge.replace(r,"$1"),Se=Se.replace(de,ge),ye},getRegex:function(){return new RegExp(Se,we)}};return ye}var n=/[^\w:]/g,t=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(Se,we,ye){if(Se){var fe;try{fe=decodeURIComponent(u(ye)).replace(n,"").toLowerCase()}catch(de){return null}if(fe.indexOf("javascript:")===0||fe.indexOf("vbscript:")===0||fe.indexOf("data:")===0)return null}we&&!t.test(ye)&&(ye=v(we,ye));try{ye=encodeURI(ye).replace(/%25/g,"%")}catch(de){return null}return ye}var h={},m=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,f=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(Se,we){h[" "+Se]||(m.test(Se)?h[" "+Se]=Se+"/":h[" "+Se]=k(Se,"/",!0)),Se=h[" "+Se];var ye=Se.indexOf(":")===-1;return we.substring(0,2)==="//"?ye?we:Se.replace(_,"$1")+we:we.charAt(0)==="/"?ye?we:Se.replace(f,"$1")+we:Se+we}var y={exec:function(){}};function L(Se){for(var we=1,ye,fe;we<arguments.length;we++){ye=arguments[we];for(fe in ye)Object.prototype.hasOwnProperty.call(ye,fe)&&(Se[fe]=ye[fe])}return Se}function I(Se,we){var ye=Se.replace(/\|/g,function(ge,pe,ve){for(var ke=!1,Ne=pe;--Ne>=0&&ve[Ne]==="\\";)ke=!ke;return ke?"|":" |"}),fe=ye.split(/ \|/),de=0;if(fe.length>we)fe.splice(we);else for(;fe.length<we;)fe.push("");for(;de<fe.length;de++)fe[de]=fe[de].trim().replace(/\\\|/g,"|");return fe}function k(Se,we,ye){var fe=Se.length;if(fe===0)return"";for(var de=0;de<fe;){var ge=Se.charAt(fe-de-1);if(ge===we&&!ye)de++;else if(ge!==we&&ye)de++;else break}return Se.substr(0,fe-de)}function E(Se,we){if(Se.indexOf(we[1])===-1)return-1;for(var ye=Se.length,fe=0,de=0;de<ye;de++)if(Se[de]==="\\")de++;else if(Se[de]===we[0])fe++;else if(Se[de]===we[1]&&(fe--,fe<0))return de;return-1}function T(Se){Se&&Se.sanitize&&!Se.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function O(Se,we){if(we<1)return"";for(var ye="";we>1;)we&1&&(ye+=Se),we>>=1,Se+=Se;return ye+Se}var A={escape:s,unescape:u,edit:i,cleanUrl:l,resolveUrl:v,noopTest:y,merge:L,splitCells:I,rtrim:k,findClosingBracket:E,checkSanitizeDeprecation:T,repeatString:O},B=S.defaults,F=A.rtrim,D=A.splitCells,R=A.escape,W=A.findClosingBracket;function x(Se,we,ye){var fe=we.href,de=we.title?R(we.title):null,ge=Se[1].replace(/\\([\[\]])/g,"$1");return Se[0].charAt(0)!=="!"?{type:"link",raw:ye,href:fe,title:de,text:ge}:{type:"image",raw:ye,href:fe,title:de,text:R(ge)}}function K(Se,we){var ye=Se.match(/^(\s+)(?:```)/);if(ye===null)return we;var fe=ye[1];return we.split(`
`).map(function(de){var ge=de.match(/^\s+/);if(ge===null)return de;var pe=ge[0];return pe.length>=fe.length?de.slice(fe.length):de}).join(`
`)}var Y=function(){function Se(ye){this.options=ye||B}var we=Se.prototype;return we.space=function(fe){var de=this.rules.block.newline.exec(fe);if(de)return de[0].length>1?{type:"space",raw:de[0]}:{raw:`
`}},we.code=function(fe){var de=this.rules.block.code.exec(fe);if(de){var ge=de[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:de[0],codeBlockStyle:"indented",text:this.options.pedantic?ge:F(ge,`
`)}}},we.fences=function(fe){var de=this.rules.block.fences.exec(fe);if(de){var ge=de[0],pe=K(ge,de[3]||"");return{type:"code",raw:ge,lang:de[2]?de[2].trim():de[2],text:pe}}},we.heading=function(fe){var de=this.rules.block.heading.exec(fe);if(de){var ge=de[2].trim();if(/#$/.test(ge)){var pe=F(ge,"#");(this.options.pedantic||!pe||/ $/.test(pe))&&(ge=pe.trim())}return{type:"heading",raw:de[0],depth:de[1].length,text:ge}}},we.nptable=function(fe){var de=this.rules.block.nptable.exec(fe);if(de){var ge={type:"table",header:D(de[1].replace(/^ *| *\| *$/g,"")),align:de[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:de[3]?de[3].replace(/\n$/,"").split(`
`):[],raw:de[0]};if(ge.header.length===ge.align.length){var pe=ge.align.length,ve;for(ve=0;ve<pe;ve++)/^ *-+: *$/.test(ge.align[ve])?ge.align[ve]="right":/^ *:-+: *$/.test(ge.align[ve])?ge.align[ve]="center":/^ *:-+ *$/.test(ge.align[ve])?ge.align[ve]="left":ge.align[ve]=null;for(pe=ge.cells.length,ve=0;ve<pe;ve++)ge.cells[ve]=D(ge.cells[ve],ge.header.length);return ge}}},we.hr=function(fe){var de=this.rules.block.hr.exec(fe);if(de)return{type:"hr",raw:de[0]}},we.blockquote=function(fe){var de=this.rules.block.blockquote.exec(fe);if(de){var ge=de[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:de[0],text:ge}}},we.list=function(fe){var de=this.rules.block.list.exec(fe);if(de){var ge=de[0],pe=de[2],ve=pe.length>1,ke={type:"list",raw:ge,ordered:ve,start:ve?+pe.slice(0,-1):"",loose:!1,items:[]},Ne=de[0].match(this.rules.block.item),Te=!1,Oe,Fe,Pe,xe,We,ze,Ke,Be,He=Ne.length;Pe=this.rules.block.listItemStart.exec(Ne[0]);for(var Ve=0;Ve<He;Ve++){if(Oe=Ne[Ve],ge=Oe,Ve!==He-1){if(xe=this.rules.block.listItemStart.exec(Ne[Ve+1]),this.options.pedantic?xe[1].length>Pe[1].length:xe[1].length>Pe[0].length||xe[1].length>3){Ne.splice(Ve,2,Ne[Ve]+`
`+Ne[Ve+1]),Ve--,He--;continue}else(!this.options.pedantic||this.options.smartLists?xe[2][xe[2].length-1]!==pe[pe.length-1]:ve===(xe[2].length===1))&&(We=Ne.slice(Ve+1).join(`
`),ke.raw=ke.raw.substring(0,ke.raw.length-We.length),Ve=He-1);Pe=xe}Fe=Oe.length,Oe=Oe.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Oe.indexOf(`
`)&&(Fe-=Oe.length,Oe=this.options.pedantic?Oe.replace(/^ {1,4}/gm,""):Oe.replace(new RegExp("^ {1,"+Fe+"}","gm"),"")),ze=Te||/\n\n(?!\s*$)/.test(Oe),Ve!==He-1&&(Te=Oe.charAt(Oe.length-1)===`
`,ze||(ze=Te)),ze&&(ke.loose=!0),this.options.gfm&&(Ke=/^\[[ xX]\] /.test(Oe),Be=void 0,Ke&&(Be=Oe[1]!==" ",Oe=Oe.replace(/^\[[ xX]\] +/,""))),ke.items.push({type:"list_item",raw:ge,task:Ke,checked:Be,loose:ze,text:Oe})}return ke}},we.html=function(fe){var de=this.rules.block.html.exec(fe);if(de)return{type:this.options.sanitize?"paragraph":"html",raw:de[0],pre:!this.options.sanitizer&&(de[1]==="pre"||de[1]==="script"||de[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):R(de[0]):de[0]}},we.def=function(fe){var de=this.rules.block.def.exec(fe);if(de){de[3]&&(de[3]=de[3].substring(1,de[3].length-1));var ge=de[1].toLowerCase().replace(/\s+/g," ");return{tag:ge,raw:de[0],href:de[2],title:de[3]}}},we.table=function(fe){var de=this.rules.block.table.exec(fe);if(de){var ge={type:"table",header:D(de[1].replace(/^ *| *\| *$/g,"")),align:de[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:de[3]?de[3].replace(/\n$/,"").split(`
`):[]};if(ge.header.length===ge.align.length){ge.raw=de[0];var pe=ge.align.length,ve;for(ve=0;ve<pe;ve++)/^ *-+: *$/.test(ge.align[ve])?ge.align[ve]="right":/^ *:-+: *$/.test(ge.align[ve])?ge.align[ve]="center":/^ *:-+ *$/.test(ge.align[ve])?ge.align[ve]="left":ge.align[ve]=null;for(pe=ge.cells.length,ve=0;ve<pe;ve++)ge.cells[ve]=D(ge.cells[ve].replace(/^ *\| *| *\| *$/g,""),ge.header.length);return ge}}},we.lheading=function(fe){var de=this.rules.block.lheading.exec(fe);if(de)return{type:"heading",raw:de[0],depth:de[2].charAt(0)==="="?1:2,text:de[1]}},we.paragraph=function(fe){var de=this.rules.block.paragraph.exec(fe);if(de)return{type:"paragraph",raw:de[0],text:de[1].charAt(de[1].length-1)===`
`?de[1].slice(0,-1):de[1]}},we.text=function(fe){var de=this.rules.block.text.exec(fe);if(de)return{type:"text",raw:de[0],text:de[0]}},we.escape=function(fe){var de=this.rules.inline.escape.exec(fe);if(de)return{type:"escape",raw:de[0],text:R(de[1])}},we.tag=function(fe,de,ge){var pe=this.rules.inline.tag.exec(fe);if(pe)return!de&&/^<a /i.test(pe[0])?de=!0:de&&/^<\/a>/i.test(pe[0])&&(de=!1),!ge&&/^<(pre|code|kbd|script)(\s|>)/i.test(pe[0])?ge=!0:ge&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(pe[0])&&(ge=!1),{type:this.options.sanitize?"text":"html",raw:pe[0],inLink:de,inRawBlock:ge,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(pe[0]):R(pe[0]):pe[0]}},we.link=function(fe){var de=this.rules.inline.link.exec(fe);if(de){var ge=de[2].trim();if(!this.options.pedantic&&/^</.test(ge)){if(!/>$/.test(ge))return;var pe=F(ge.slice(0,-1),"\\");if((ge.length-pe.length)%2==0)return}else{var ve=W(de[2],"()");if(ve>-1){var ke=de[0].indexOf("!")===0?5:4,Ne=ke+de[1].length+ve;de[2]=de[2].substring(0,ve),de[0]=de[0].substring(0,Ne).trim(),de[3]=""}}var Te=de[2],Oe="";if(this.options.pedantic){var Fe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Te);Fe&&(Te=Fe[1],Oe=Fe[3])}else Oe=de[3]?de[3].slice(1,-1):"";return Te=Te.trim(),/^</.test(Te)&&(this.options.pedantic&&!/>$/.test(ge)?Te=Te.slice(1):Te=Te.slice(1,-1)),x(de,{href:Te&&Te.replace(this.rules.inline._escapes,"$1"),title:Oe&&Oe.replace(this.rules.inline._escapes,"$1")},de[0])}},we.reflink=function(fe,de){var ge;if((ge=this.rules.inline.reflink.exec(fe))||(ge=this.rules.inline.nolink.exec(fe))){var pe=(ge[2]||ge[1]).replace(/\s+/g," ");if(pe=de[pe.toLowerCase()],!pe||!pe.href){var ve=ge[0].charAt(0);return{type:"text",raw:ve,text:ve}}return x(ge,pe,ge[0])}},we.emStrong=function(fe,de,ge){ge===void 0&&(ge="");var pe=this.rules.inline.emStrong.lDelim.exec(fe);if(!!pe&&!(pe[3]&&ge.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var ve=pe[1]||pe[2]||"";if(!ve||ve&&(ge===""||this.rules.inline.punctuation.exec(ge))){var ke=pe[0].length-1,Ne,Te,Oe=ke,Fe=0,Pe=pe[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Pe.lastIndex=0,de=de.slice(-1*fe.length+ke);(pe=Pe.exec(de))!=null;)if(Ne=pe[1]||pe[2]||pe[3]||pe[4]||pe[5]||pe[6],!!Ne){if(Te=Ne.length,pe[3]||pe[4]){Oe+=Te;continue}else if((pe[5]||pe[6])&&ke%3&&!((ke+Te)%3)){Fe+=Te;continue}if(Oe-=Te,!(Oe>0)){if(Oe+Fe-Te<=0&&!de.slice(Pe.lastIndex).match(Pe)&&(Te=Math.min(Te,Te+Oe+Fe)),Math.min(ke,Te)%2)return{type:"em",raw:fe.slice(0,ke+pe.index+Te+1),text:fe.slice(1,ke+pe.index+Te)};if(Math.min(ke,Te)%2==0)return{type:"strong",raw:fe.slice(0,ke+pe.index+Te+1),text:fe.slice(2,ke+pe.index+Te-1)}}}}}},we.codespan=function(fe){var de=this.rules.inline.code.exec(fe);if(de){var ge=de[2].replace(/\n/g," "),pe=/[^ ]/.test(ge),ve=/^ /.test(ge)&&/ $/.test(ge);return pe&&ve&&(ge=ge.substring(1,ge.length-1)),ge=R(ge,!0),{type:"codespan",raw:de[0],text:ge}}},we.br=function(fe){var de=this.rules.inline.br.exec(fe);if(de)return{type:"br",raw:de[0]}},we.del=function(fe){var de=this.rules.inline.del.exec(fe);if(de)return{type:"del",raw:de[0],text:de[2]}},we.autolink=function(fe,de){var ge=this.rules.inline.autolink.exec(fe);if(ge){var pe,ve;return ge[2]==="@"?(pe=R(this.options.mangle?de(ge[1]):ge[1]),ve="mailto:"+pe):(pe=R(ge[1]),ve=pe),{type:"link",raw:ge[0],text:pe,href:ve,tokens:[{type:"text",raw:pe,text:pe}]}}},we.url=function(fe,de){var ge;if(ge=this.rules.inline.url.exec(fe)){var pe,ve;if(ge[2]==="@")pe=R(this.options.mangle?de(ge[0]):ge[0]),ve="mailto:"+pe;else{var ke;do ke=ge[0],ge[0]=this.rules.inline._backpedal.exec(ge[0])[0];while(ke!==ge[0]);pe=R(ge[0]),ge[1]==="www."?ve="http://"+pe:ve=pe}return{type:"link",raw:ge[0],text:pe,href:ve,tokens:[{type:"text",raw:pe,text:pe}]}}},we.inlineText=function(fe,de,ge){var pe=this.rules.inline.text.exec(fe);if(pe){var ve;return de?ve=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(pe[0]):R(pe[0]):pe[0]:ve=R(this.options.smartypants?ge(pe[0]):pe[0]),{type:"text",raw:pe[0],text:ve}}},Se}(),ee=A.noopTest,se=A.edit,ne=A.merge,le={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ee,table:ee,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};le._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,le._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,le.def=se(le.def).replace("label",le._label).replace("title",le._title).getRegex(),le.bullet=/(?:[*+-]|\d{1,9}[.)])/,le.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,le.item=se(le.item,"gm").replace(/bull/g,le.bullet).getRegex(),le.listItemStart=se(/^( *)(bull)/).replace("bull",le.bullet).getRegex(),le.list=se(le.list).replace(/bull/g,le.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+le.def.source+")").getRegex(),le._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",le._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,le.html=se(le.html,"i").replace("comment",le._comment).replace("tag",le._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),le.paragraph=se(le._paragraph).replace("hr",le.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",le._tag).getRegex(),le.blockquote=se(le.blockquote).replace("paragraph",le.paragraph).getRegex(),le.normal=ne({},le),le.gfm=ne({},le.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),le.gfm.nptable=se(le.gfm.nptable).replace("hr",le.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",le._tag).getRegex(),le.gfm.table=se(le.gfm.table).replace("hr",le.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",le._tag).getRegex(),le.pedantic=ne({},le.normal,{html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",le._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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ee,paragraph:se(le.normal._paragraph).replace("hr",le.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",le.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ee,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ee,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};X._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",X.punctuation=se(X.punctuation).replace(/punctuation/g,X._punctuation).getRegex(),X.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,X.escapedEmSt=/\\\*|\\_/g,X._comment=se(le._comment).replace("(?:-->|$)","-->").getRegex(),X.emStrong.lDelim=se(X.emStrong.lDelim).replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimAst=se(X.emStrong.rDelimAst,"g").replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimUnd=se(X.emStrong.rDelimUnd,"g").replace(/punct/g,X._punctuation).getRegex(),X._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,X._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])?)+(?![-_])/,X.autolink=se(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex(),X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,X.tag=se(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex(),X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,X.link=se(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex(),X.reflink=se(X.reflink).replace("label",X._label).getRegex(),X.reflinkSearch=se(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex(),X.normal=ne({},X),X.pedantic=ne({},X.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:se(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()}),X.gfm=ne({},X.normal,{escape:se(X.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),X.gfm.url=se(X.gfm.url,"i").replace("email",X.gfm._extended_email).getRegex(),X.breaks=ne({},X.gfm,{br:se(X.br).replace("{2,}","*").getRegex(),text:se(X.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var z={block:le,inline:X},P=S.defaults,V=z.block,U=z.inline,H=A.repeatString;function $(Se){return Se.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ie(Se){var we="",ye,fe,de=Se.length;for(ye=0;ye<de;ye++)fe=Se.charCodeAt(ye),Math.random()>.5&&(fe="x"+fe.toString(16)),we+="&#"+fe+";";return we}var oe=function(){function Se(ye){this.tokens=[],this.tokens.links=Object.create(null),this.options=ye||P,this.options.tokenizer=this.options.tokenizer||new Y,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var fe={block:V.normal,inline:U.normal};this.options.pedantic?(fe.block=V.pedantic,fe.inline=U.pedantic):this.options.gfm&&(fe.block=V.gfm,this.options.breaks?fe.inline=U.breaks:fe.inline=U.gfm),this.tokenizer.rules=fe}Se.lex=function(fe,de){var ge=new Se(de);return ge.lex(fe)},Se.lexInline=function(fe,de){var ge=new Se(de);return ge.inlineTokens(fe)};var we=Se.prototype;return we.lex=function(fe){return fe=fe.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(fe,this.tokens,!0),this.inline(this.tokens),this.tokens},we.blockTokens=function(fe,de,ge){de===void 0&&(de=[]),ge===void 0&&(ge=!0),this.options.pedantic&&(fe=fe.replace(/^ +$/gm,""));for(var pe,ve,ke,Ne;fe;){if(pe=this.tokenizer.space(fe)){fe=fe.substring(pe.raw.length),pe.type&&de.push(pe);continue}if(pe=this.tokenizer.code(fe)){fe=fe.substring(pe.raw.length),Ne=de[de.length-1],Ne&&Ne.type==="paragraph"?(Ne.raw+=`
`+pe.raw,Ne.text+=`
`+pe.text):de.push(pe);continue}if(pe=this.tokenizer.fences(fe)){fe=fe.substring(pe.raw.length),de.push(pe);continue}if(pe=this.tokenizer.heading(fe)){fe=fe.substring(pe.raw.length),de.push(pe);continue}if(pe=this.tokenizer.nptable(fe)){fe=fe.substring(pe.raw.length),de.push(pe);continue}if(pe=this.tokenizer.hr(fe)){fe=fe.substring(pe.raw.length),de.push(pe);continue}if(pe=this.tokenizer.blockquote(fe)){fe=fe.substring(pe.raw.length),pe.tokens=this.blockTokens(pe.text,[],ge),de.push(pe);continue}if(pe=this.tokenizer.list(fe)){for(fe=fe.substring(pe.raw.length),ke=pe.items.length,ve=0;ve<ke;ve++)pe.items[ve].tokens=this.blockTokens(pe.items[ve].text,[],!1);de.push(pe);continue}if(pe=this.tokenizer.html(fe)){fe=fe.substring(pe.raw.length),de.push(pe);continue}if(ge&&(pe=this.tokenizer.def(fe))){fe=fe.substring(pe.raw.length),this.tokens.links[pe.tag]||(this.tokens.links[pe.tag]={href:pe.href,title:pe.title});continue}if(pe=this.tokenizer.table(fe)){fe=fe.substring(pe.raw.length),de.push(pe);continue}if(pe=this.tokenizer.lheading(fe)){fe=fe.substring(pe.raw.length),de.push(pe);continue}if(ge&&(pe=this.tokenizer.paragraph(fe))){fe=fe.substring(pe.raw.length),de.push(pe);continue}if(pe=this.tokenizer.text(fe)){fe=fe.substring(pe.raw.length),Ne=de[de.length-1],Ne&&Ne.type==="text"?(Ne.raw+=`
`+pe.raw,Ne.text+=`
`+pe.text):de.push(pe);continue}if(fe){var Te="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(Te);break}else throw new Error(Te)}}return de},we.inline=function(fe){var de,ge,pe,ve,ke,Ne,Te=fe.length;for(de=0;de<Te;de++)switch(Ne=fe[de],Ne.type){case"paragraph":case"text":case"heading":{Ne.tokens=[],this.inlineTokens(Ne.text,Ne.tokens);break}case"table":{for(Ne.tokens={header:[],cells:[]},ve=Ne.header.length,ge=0;ge<ve;ge++)Ne.tokens.header[ge]=[],this.inlineTokens(Ne.header[ge],Ne.tokens.header[ge]);for(ve=Ne.cells.length,ge=0;ge<ve;ge++)for(ke=Ne.cells[ge],Ne.tokens.cells[ge]=[],pe=0;pe<ke.length;pe++)Ne.tokens.cells[ge][pe]=[],this.inlineTokens(ke[pe],Ne.tokens.cells[ge][pe]);break}case"blockquote":{this.inline(Ne.tokens);break}case"list":{for(ve=Ne.items.length,ge=0;ge<ve;ge++)this.inline(Ne.items[ge].tokens);break}}return fe},we.inlineTokens=function(fe,de,ge,pe){de===void 0&&(de=[]),ge===void 0&&(ge=!1),pe===void 0&&(pe=!1);var ve,ke,Ne=fe,Te,Oe,Fe;if(this.tokens.links){var Pe=Object.keys(this.tokens.links);if(Pe.length>0)for(;(Te=this.tokenizer.rules.inline.reflinkSearch.exec(Ne))!=null;)Pe.includes(Te[0].slice(Te[0].lastIndexOf("[")+1,-1))&&(Ne=Ne.slice(0,Te.index)+"["+H("a",Te[0].length-2)+"]"+Ne.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Te=this.tokenizer.rules.inline.blockSkip.exec(Ne))!=null;)Ne=Ne.slice(0,Te.index)+"["+H("a",Te[0].length-2)+"]"+Ne.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Te=this.tokenizer.rules.inline.escapedEmSt.exec(Ne))!=null;)Ne=Ne.slice(0,Te.index)+"++"+Ne.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;fe;){if(Oe||(Fe=""),Oe=!1,ve=this.tokenizer.escape(fe)){fe=fe.substring(ve.raw.length),de.push(ve);continue}if(ve=this.tokenizer.tag(fe,ge,pe)){fe=fe.substring(ve.raw.length),ge=ve.inLink,pe=ve.inRawBlock;var xe=de[de.length-1];xe&&ve.type==="text"&&xe.type==="text"?(xe.raw+=ve.raw,xe.text+=ve.text):de.push(ve);continue}if(ve=this.tokenizer.link(fe)){fe=fe.substring(ve.raw.length),ve.type==="link"&&(ve.tokens=this.inlineTokens(ve.text,[],!0,pe)),de.push(ve);continue}if(ve=this.tokenizer.reflink(fe,this.tokens.links)){fe=fe.substring(ve.raw.length);var We=de[de.length-1];ve.type==="link"?(ve.tokens=this.inlineTokens(ve.text,[],!0,pe),de.push(ve)):We&&ve.type==="text"&&We.type==="text"?(We.raw+=ve.raw,We.text+=ve.text):de.push(ve);continue}if(ve=this.tokenizer.emStrong(fe,Ne,Fe)){fe=fe.substring(ve.raw.length),ve.tokens=this.inlineTokens(ve.text,[],ge,pe),de.push(ve);continue}if(ve=this.tokenizer.codespan(fe)){fe=fe.substring(ve.raw.length),de.push(ve);continue}if(ve=this.tokenizer.br(fe)){fe=fe.substring(ve.raw.length),de.push(ve);continue}if(ve=this.tokenizer.del(fe)){fe=fe.substring(ve.raw.length),ve.tokens=this.inlineTokens(ve.text,[],ge,pe),de.push(ve);continue}if(ve=this.tokenizer.autolink(fe,ie)){fe=fe.substring(ve.raw.length),de.push(ve);continue}if(!ge&&(ve=this.tokenizer.url(fe,ie))){fe=fe.substring(ve.raw.length),de.push(ve);continue}if(ve=this.tokenizer.inlineText(fe,pe,$)){fe=fe.substring(ve.raw.length),ve.raw.slice(-1)!=="_"&&(Fe=ve.raw.slice(-1)),Oe=!0,ke=de[de.length-1],ke&&ke.type==="text"?(ke.raw+=ve.raw,ke.text+=ve.text):de.push(ve);continue}if(fe){var ze="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(ze);break}else throw new Error(ze)}}return de},e(Se,null,[{key:"rules",get:function(){return{block:V,inline:U}}}]),Se}(),ae=S.defaults,G=A.cleanUrl,j=A.escape,te=function(){function Se(ye){this.options=ye||ae}var we=Se.prototype;return we.code=function(fe,de,ge){var pe=(de||"").match(/\S*/)[0];if(this.options.highlight){var ve=this.options.highlight(fe,pe);ve!=null&&ve!==fe&&(ge=!0,fe=ve)}return fe=fe.replace(/\n$/,"")+`
`,pe?'<pre><code class="'+this.options.langPrefix+j(pe,!0)+'">'+(ge?fe:j(fe,!0))+`</code></pre>
`:"<pre><code>"+(ge?fe:j(fe,!0))+`</code></pre>
`},we.blockquote=function(fe){return`<blockquote>
`+fe+`</blockquote>
`},we.html=function(fe){return fe},we.heading=function(fe,de,ge,pe){return this.options.headerIds?"<h"+de+' id="'+this.options.headerPrefix+pe.slug(ge)+'">'+fe+"</h"+de+`>
`:"<h"+de+">"+fe+"</h"+de+`>
`},we.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},we.list=function(fe,de,ge){var pe=de?"ol":"ul",ve=de&&ge!==1?' start="'+ge+'"':"";return"<"+pe+ve+`>
`+fe+"</"+pe+`>
`},we.listitem=function(fe){return"<li>"+fe+`</li>
`},we.checkbox=function(fe){return"<input "+(fe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},we.paragraph=function(fe){return"<p>"+fe+`</p>
`},we.table=function(fe,de){return de&&(de="<tbody>"+de+"</tbody>"),`<table>
<thead>
`+fe+`</thead>
`+de+`</table>
`},we.tablerow=function(fe){return`<tr>
`+fe+`</tr>
`},we.tablecell=function(fe,de){var ge=de.header?"th":"td",pe=de.align?"<"+ge+' align="'+de.align+'">':"<"+ge+">";return pe+fe+"</"+ge+`>
`},we.strong=function(fe){return"<strong>"+fe+"</strong>"},we.em=function(fe){return"<em>"+fe+"</em>"},we.codespan=function(fe){return"<code>"+fe+"</code>"},we.br=function(){return this.options.xhtml?"<br/>":"<br>"},we.del=function(fe){return"<del>"+fe+"</del>"},we.link=function(fe,de,ge){if(fe=G(this.options.sanitize,this.options.baseUrl,fe),fe===null)return ge;var pe='<a href="'+j(fe)+'"';return de&&(pe+=' title="'+de+'"'),pe+=">"+ge+"</a>",pe},we.image=function(fe,de,ge){if(fe=G(this.options.sanitize,this.options.baseUrl,fe),fe===null)return ge;var pe='<img src="'+fe+'" alt="'+ge+'"';return de&&(pe+=' title="'+de+'"'),pe+=this.options.xhtml?"/>":">",pe},we.text=function(fe){return fe},Se}(),Z=function(){function Se(){}var we=Se.prototype;return we.strong=function(fe){return fe},we.em=function(fe){return fe},we.codespan=function(fe){return fe},we.del=function(fe){return fe},we.html=function(fe){return fe},we.text=function(fe){return fe},we.link=function(fe,de,ge){return""+ge},we.image=function(fe,de,ge){return""+ge},we.br=function(){return""},Se}(),ue=function(){function Se(){this.seen={}}var we=Se.prototype;return we.serialize=function(fe){return fe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},we.getNextSafeSlug=function(fe,de){var ge=fe,pe=0;if(this.seen.hasOwnProperty(ge)){pe=this.seen[fe];do pe++,ge=fe+"-"+pe;while(this.seen.hasOwnProperty(ge))}return de||(this.seen[fe]=pe,this.seen[ge]=0),ge},we.slug=function(fe,de){de===void 0&&(de={});var ge=this.serialize(fe);return this.getNextSafeSlug(ge,de.dryrun)},Se}(),he=S.defaults,re=A.unescape,ce=function(){function Se(ye){this.options=ye||he,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Z,this.slugger=new ue}Se.parse=function(fe,de){var ge=new Se(de);return ge.parse(fe)},Se.parseInline=function(fe,de){var ge=new Se(de);return ge.parseInline(fe)};var we=Se.prototype;return we.parse=function(fe,de){de===void 0&&(de=!0);var ge="",pe,ve,ke,Ne,Te,Oe,Fe,Pe,xe,We,ze,Ke,Be,He,Ve,Ue,Ye,je,Xe=fe.length;for(pe=0;pe<Xe;pe++)switch(We=fe[pe],We.type){case"space":continue;case"hr":{ge+=this.renderer.hr();continue}case"heading":{ge+=this.renderer.heading(this.parseInline(We.tokens),We.depth,re(this.parseInline(We.tokens,this.textRenderer)),this.slugger);continue}case"code":{ge+=this.renderer.code(We.text,We.lang,We.escaped);continue}case"table":{for(Pe="",Fe="",Ne=We.header.length,ve=0;ve<Ne;ve++)Fe+=this.renderer.tablecell(this.parseInline(We.tokens.header[ve]),{header:!0,align:We.align[ve]});for(Pe+=this.renderer.tablerow(Fe),xe="",Ne=We.cells.length,ve=0;ve<Ne;ve++){for(Oe=We.tokens.cells[ve],Fe="",Te=Oe.length,ke=0;ke<Te;ke++)Fe+=this.renderer.tablecell(this.parseInline(Oe[ke]),{header:!1,align:We.align[ke]});xe+=this.renderer.tablerow(Fe)}ge+=this.renderer.table(Pe,xe);continue}case"blockquote":{xe=this.parse(We.tokens),ge+=this.renderer.blockquote(xe);continue}case"list":{for(ze=We.ordered,Ke=We.start,Be=We.loose,Ne=We.items.length,xe="",ve=0;ve<Ne;ve++)Ve=We.items[ve],Ue=Ve.checked,Ye=Ve.task,He="",Ve.task&&(je=this.renderer.checkbox(Ue),Be?Ve.tokens.length>0&&Ve.tokens[0].type==="text"?(Ve.tokens[0].text=je+" "+Ve.tokens[0].text,Ve.tokens[0].tokens&&Ve.tokens[0].tokens.length>0&&Ve.tokens[0].tokens[0].type==="text"&&(Ve.tokens[0].tokens[0].text=je+" "+Ve.tokens[0].tokens[0].text)):Ve.tokens.unshift({type:"text",text:je}):He+=je),He+=this.parse(Ve.tokens,Be),xe+=this.renderer.listitem(He,Ye,Ue);ge+=this.renderer.list(xe,ze,Ke);continue}case"html":{ge+=this.renderer.html(We.text);continue}case"paragraph":{ge+=this.renderer.paragraph(this.parseInline(We.tokens));continue}case"text":{for(xe=We.tokens?this.parseInline(We.tokens):We.text;pe+1<Xe&&fe[pe+1].type==="text";)We=fe[++pe],xe+=`
`+(We.tokens?this.parseInline(We.tokens):We.text);ge+=de?this.renderer.paragraph(xe):xe;continue}default:{var $e='Token with "'+We.type+'" type was not found.';if(this.options.silent){console.error($e);return}else throw new Error($e)}}return ge},we.parseInline=function(fe,de){de=de||this.renderer;var ge="",pe,ve,ke=fe.length;for(pe=0;pe<ke;pe++)switch(ve=fe[pe],ve.type){case"escape":{ge+=de.text(ve.text);break}case"html":{ge+=de.html(ve.text);break}case"link":{ge+=de.link(ve.href,ve.title,this.parseInline(ve.tokens,de));break}case"image":{ge+=de.image(ve.href,ve.title,ve.text);break}case"strong":{ge+=de.strong(this.parseInline(ve.tokens,de));break}case"em":{ge+=de.em(this.parseInline(ve.tokens,de));break}case"codespan":{ge+=de.codespan(ve.text);break}case"br":{ge+=de.br();break}case"del":{ge+=de.del(this.parseInline(ve.tokens,de));break}case"text":{ge+=de.text(ve.text);break}default:{var Ne='Token with "'+ve.type+'" type was not found.';if(this.options.silent){console.error(Ne);return}else throw new Error(Ne)}}return ge},Se}(),me=A.merge,Ce=A.checkSanitizeDeprecation,be=A.escape,Le=S.getDefaults,De=S.changeDefaults,Re=S.defaults;function Ee(Se,we,ye){if(typeof Se=="undefined"||Se===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");if(typeof we=="function"&&(ye=we,we=null),we=me({},Ee.defaults,we||{}),Ce(we),ye){var fe=we.highlight,de;try{de=oe.lex(Se,we)}catch(ke){return ye(ke)}var ge=function(Ne){var Te;if(!Ne)try{Te=ce.parse(de,we)}catch(Oe){Ne=Oe}return we.highlight=fe,Ne?ye(Ne):ye(null,Te)};if(!fe||fe.length<3||(delete we.highlight,!de.length))return ge();var pe=0;Ee.walkTokens(de,function(ke){ke.type==="code"&&(pe++,setTimeout(function(){fe(ke.text,ke.lang,function(Ne,Te){if(Ne)return ge(Ne);Te!=null&&Te!==ke.text&&(ke.text=Te,ke.escaped=!0),pe--,pe===0&&ge()})},0))}),pe===0&&ge();return}try{var ve=oe.lex(Se,we);return we.walkTokens&&Ee.walkTokens(ve,we.walkTokens),ce.parse(ve,we)}catch(ke){if(ke.message+=`
Please report this to https://github.com/markedjs/marked.`,we.silent)return"<p>An error occurred:</p><pre>"+be(ke.message+"",!0)+"</pre>";throw ke}}Ee.options=Ee.setOptions=function(Se){return me(Ee.defaults,Se),De(Ee.defaults),Ee},Ee.getDefaults=Le,Ee.defaults=Re,Ee.use=function(Se){var we=me({},Se);if(Se.renderer&&function(){var fe=Ee.defaults.renderer||new te,de=function(ve){var ke=fe[ve];fe[ve]=function(){for(var Ne=arguments.length,Te=new Array(Ne),Oe=0;Oe<Ne;Oe++)Te[Oe]=arguments[Oe];var Fe=Se.renderer[ve].apply(fe,Te);return Fe===!1&&(Fe=ke.apply(fe,Te)),Fe}};for(var ge in Se.renderer)de(ge);we.renderer=fe}(),Se.tokenizer&&function(){var fe=Ee.defaults.tokenizer||new Y,de=function(ve){var ke=fe[ve];fe[ve]=function(){for(var Ne=arguments.length,Te=new Array(Ne),Oe=0;Oe<Ne;Oe++)Te[Oe]=arguments[Oe];var Fe=Se.tokenizer[ve].apply(fe,Te);return Fe===!1&&(Fe=ke.apply(fe,Te)),Fe}};for(var ge in Se.tokenizer)de(ge);we.tokenizer=fe}(),Se.walkTokens){var ye=Ee.defaults.walkTokens;we.walkTokens=function(fe){Se.walkTokens(fe),ye&&ye(fe)}}Ee.setOptions(we)},Ee.walkTokens=function(Se,we){for(var ye=M(Se),fe;!(fe=ye()).done;){var de=fe.value;switch(we(de),de.type){case"table":{for(var ge=M(de.tokens.header),pe;!(pe=ge()).done;){var ve=pe.value;Ee.walkTokens(ve,we)}for(var ke=M(de.tokens.cells),Ne;!(Ne=ke()).done;)for(var Te=Ne.value,Oe=M(Te),Fe;!(Fe=Oe()).done;){var Pe=Fe.value;Ee.walkTokens(Pe,we)}break}case"list":{Ee.walkTokens(de.items,we);break}default:de.tokens&&Ee.walkTokens(de.tokens,we)}}},Ee.parseInline=function(Se,we){if(typeof Se=="undefined"||Se===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");we=me({},Ee.defaults,we||{}),Ce(we);try{var ye=oe.lexInline(Se,we);return we.walkTokens&&Ee.walkTokens(ye,we.walkTokens),ce.parseInline(ye,we)}catch(fe){if(fe.message+=`
Please report this to https://github.com/markedjs/marked.`,we.silent)return"<p>An error occurred:</p><pre>"+be(fe.message+"",!0)+"</pre>";throw fe}},Ee.Parser=ce,Ee.parser=ce.parse,Ee.Renderer=te,Ee.TextRenderer=Z,Ee.Lexer=oe,Ee.lexer=oe.lex,Ee.Tokenizer=Y,Ee.Slugger=ue,Ee.parse=Ee;var Ae=Ee;return Ae}),define(Q[278],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class b{constructor(M,w=0,S=M.length,C=w-1){this.items=M,this.start=w,this.end=S,this.index=C}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}e.ArrayNavigator=b}),define(Q[279],J([0,1,278]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class N{constructor(w=[],S=10){this._initialize(w),this._limit=S,this._onChange()}add(w){this._history.delete(w),this._history.add(w),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(w){return this._history.has(w)}_onChange(){this._reduceToLimit();const w=this._elements;this._navigator=new b.ArrayNavigator(w,0,w.length,w.length)}_reduceToLimit(){const w=this._elements;w.length>this._limit&&this._initialize(w.slice(w.length-this._limit))}_currentPosition(){const w=this._navigator.current();return w?this._elements.indexOf(w):-1}_initialize(w){this._history=new Set;for(const S of w)this._history.add(S)}get _elements(){const w=[];return this._history.forEach(S=>w.push(S)),w}}e.HistoryNavigator=N}),define(Q[100],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovingAverage=e.clamp=void 0;function b(M,w,S){return Math.min(Math.max(M,w),S)}e.clamp=b;class N{constructor(){this._n=1,this._val=0}update(w){return this._val=this._val+(w-this._val)/this._n,this._n+=1,this}get value(){return this._val}}e.MovingAverage=N}),define(Q[17],J([0,1]),function(q,e){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.isLittleEndian=e.OS=e.setImmediate=e.globals=e.userAgent=e.isIOS=e.isWeb=e.isNative=e.isLinux=e.isMacintosh=e.isWindows=e.isPreferringBrowserCodeLoad=e.browserCodeLoadingCacheStrategy=e.isElectronSandboxed=void 0;const N="en";let M=!1,w=!1,S=!1,C=!1,d=!1,g=!1,p=!1,c,o=N,s,a;const u=typeof self=="object"?self:typeof global=="object"?global:{};let r;typeof process!="undefined"?r=process:typeof u.vscode!="undefined"&&(r=u.vscode.process);const i=typeof((b=r==null?void 0:r.versions)===null||b===void 0?void 0:b.electron)=="string"&&r.type==="renderer";if(e.isElectronSandboxed=i&&(r==null?void 0:r.sandboxed),e.browserCodeLoadingCacheStrategy=(()=>{if(e.isElectronSandboxed)return"bypassHeatCheck";const m=r==null?void 0:r.env.ENABLE_VSCODE_BROWSER_CODE_LOADING;if(typeof m=="string")return m==="none"||m==="code"||m==="bypassHeatCheck"||m==="bypassHeatCheckAndEagerCompile"?m:"bypassHeatCheck"})(),e.isPreferringBrowserCodeLoad=typeof e.browserCodeLoadingCacheStrategy=="string",typeof navigator=="object"&&!i)a=navigator.userAgent,M=a.indexOf("Windows")>=0,w=a.indexOf("Macintosh")>=0,p=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,S=a.indexOf("Linux")>=0,g=!0,c=navigator.language,o=c;else if(typeof r=="object"){M=r.platform==="win32",w=r.platform==="darwin",S=r.platform==="linux",C=S&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,c=N,o=N;const m=r.env.VSCODE_NLS_CONFIG;if(m)try{const _=JSON.parse(m),f=_.availableLanguages["*"];c=_.locale,o=f||N,s=_._translationsConfigFile}catch(_){}d=!0}else console.error("Unable to resolve platform.");let n=0;w?n=1:M?n=3:S&&(n=2),e.isWindows=M,e.isMacintosh=w,e.isLinux=S,e.isNative=d,e.isWeb=g,e.isIOS=p,e.userAgent=a,e.globals=u,e.setImmediate=function(){if(e.globals.setImmediate)return e.globals.setImmediate.bind(e.globals);if(typeof e.globals.postMessage=="function"&&!e.globals.importScripts){let f=[];e.globals.addEventListener("message",y=>{if(y.data&&y.data.vscodeSetImmediateId)for(let L=0,I=f.length;L<I;L++){const k=f[L];if(k.id===y.data.vscodeSetImmediateId){f.splice(L,1),k.callback();return}}});let v=0;return y=>{const L=++v;f.push({id:L,callback:y}),e.globals.postMessage({vscodeSetImmediateId:L},"*")}}if(r&&typeof r.nextTick=="function")return r.nextTick.bind(r);const _=Promise.resolve();return f=>_.then(f)}(),e.OS=w||p?2:M?1:3;let t=!0,l=!1;function h(){if(!l){l=!0;const m=new Uint8Array(2);m[0]=1,m[1]=2,t=new Uint16Array(m.buffer)[0]===(2<<8)+1}return t}e.isLittleEndian=h}),define(Q[280],J([0,1,17]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.env=e.cwd=void 0;let N;typeof process!="undefined"?N=process:typeof b.globals.vscode!="undefined"?N={get platform(){return b.globals.vscode.process.platform},get env(){return b.globals.vscode.process.env},nextTick(M){return b.setImmediate(M)},cwd(){return b.globals.vscode.process.env.VSCODE_CWD||b.globals.vscode.process.execPath.substr(0,b.globals.vscode.process.execPath.lastIndexOf(b.globals.vscode.process.platform==="win32"?"\\":"/"))}}:N={get platform(){return b.isWindows?"win32":b.isMacintosh?"darwin":"linux"},nextTick(M){return b.setImmediate(M)},get env(){return Object.create(null)},cwd(){return"/"}},e.cwd=N.cwd,e.env=N.env,e.platform=N.platform}),define(Q[72],J([0,1,280]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sep=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.normalize=e.posix=e.win32=void 0;const N=65,M=97,w=90,S=122,C=46,d=47,g=92,p=58,c=63;class o extends Error{constructor(l,h,m){let _;typeof h=="string"&&h.indexOf("not ")===0?(_="must not be",h=h.replace(/^not /,"")):_="must be";const f=l.indexOf(".")!==-1?"property":"argument";let v=`The "${l}" ${f} ${_} of type ${h}`;v+=`. Received type ${typeof m}`,super(v),this.code="ERR_INVALID_ARG_TYPE"}}function s(t,l){if(typeof t!="string")throw new o(l,"string",t)}function a(t){return t===d||t===g}function u(t){return t===d}function r(t){return t>=N&&t<=w||t>=M&&t<=S}function i(t,l,h,m){let _="",f=0,v=-1,y=0,L=0;for(let I=0;I<=t.length;++I){if(I<t.length)L=t.charCodeAt(I);else{if(m(L))break;L=d}if(m(L)){if(!(v===I-1||y===1))if(y===2){if(_.length<2||f!==2||_.charCodeAt(_.length-1)!==C||_.charCodeAt(_.length-2)!==C){if(_.length>2){const k=_.lastIndexOf(h);k===-1?(_="",f=0):(_=_.slice(0,k),f=_.length-1-_.lastIndexOf(h)),v=I,y=0;continue}else if(_.length!==0){_="",f=0,v=I,y=0;continue}}l&&(_+=_.length>0?`${h}..`:"..",f=2)}else _.length>0?_+=`${h}${t.slice(v+1,I)}`:_=t.slice(v+1,I),f=I-v-1;v=I,y=0}else L===C&&y!==-1?++y:y=-1}return _}function n(t,l){if(l===null||typeof l!="object")throw new o("pathObject","Object",l);const h=l.dir||l.root,m=l.base||`${l.name||""}${l.ext||""}`;return h?h===l.root?`${h}${m}`:`${h}${t}${m}`:m}e.win32={resolve(...t){let l="",h="",m=!1;for(let _=t.length-1;_>=-1;_--){let f;if(_>=0){if(f=t[_],s(f,"path"),f.length===0)continue}else l.length===0?f=b.cwd():(f=b.env[`=${l}`]||b.cwd(),(f===void 0||f.slice(0,2).toLowerCase()!==l.toLowerCase()&&f.charCodeAt(2)===g)&&(f=`${l}\\`));const v=f.length;let y=0,L="",I=!1;const k=f.charCodeAt(0);if(v===1)a(k)&&(y=1,I=!0);else if(a(k))if(I=!0,a(f.charCodeAt(1))){let E=2,T=E;for(;E<v&&!a(f.charCodeAt(E));)E++;if(E<v&&E!==T){const O=f.slice(T,E);for(T=E;E<v&&a(f.charCodeAt(E));)E++;if(E<v&&E!==T){for(T=E;E<v&&!a(f.charCodeAt(E));)E++;(E===v||E!==T)&&(L=`\\\\${O}\\${f.slice(T,E)}`,y=E)}}}else y=1;else r(k)&&f.charCodeAt(1)===p&&(L=f.slice(0,2),y=2,v>2&&a(f.charCodeAt(2))&&(I=!0,y=3));if(L.length>0)if(l.length>0){if(L.toLowerCase()!==l.toLowerCase())continue}else l=L;if(m){if(l.length>0)break}else if(h=`${f.slice(y)}\\${h}`,m=I,I&&l.length>0)break}return h=i(h,!m,"\\",a),m?`${l}\\${h}`:`${l}${h}`||"."},normalize(t){s(t,"path");const l=t.length;if(l===0)return".";let h=0,m,_=!1;const f=t.charCodeAt(0);if(l===1)return u(f)?"\\":t;if(a(f))if(_=!0,a(t.charCodeAt(1))){let y=2,L=y;for(;y<l&&!a(t.charCodeAt(y));)y++;if(y<l&&y!==L){const I=t.slice(L,y);for(L=y;y<l&&a(t.charCodeAt(y));)y++;if(y<l&&y!==L){for(L=y;y<l&&!a(t.charCodeAt(y));)y++;if(y===l)return`\\\\${I}\\${t.slice(L)}\\`;y!==L&&(m=`\\\\${I}\\${t.slice(L,y)}`,h=y)}}}else h=1;else r(f)&&t.charCodeAt(1)===p&&(m=t.slice(0,2),h=2,l>2&&a(t.charCodeAt(2))&&(_=!0,h=3));let v=h<l?i(t.slice(h),!_,"\\",a):"";return v.length===0&&!_&&(v="."),v.length>0&&a(t.charCodeAt(l-1))&&(v+="\\"),m===void 0?_?`\\${v}`:v:_?`${m}\\${v}`:`${m}${v}`},isAbsolute(t){s(t,"path");const l=t.length;if(l===0)return!1;const h=t.charCodeAt(0);return a(h)||l>2&&r(h)&&t.charCodeAt(1)===p&&a(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let l,h;for(let f=0;f<t.length;++f){const v=t[f];s(v,"path"),v.length>0&&(l===void 0?l=h=v:l+=`\\${v}`)}if(l===void 0)return".";let m=!0,_=0;if(typeof h=="string"&&a(h.charCodeAt(0))){++_;const f=h.length;f>1&&a(h.charCodeAt(1))&&(++_,f>2&&(a(h.charCodeAt(2))?++_:m=!1))}if(m){for(;_<l.length&&a(l.charCodeAt(_));)_++;_>=2&&(l=`\\${l.slice(_)}`)}return e.win32.normalize(l)},relative(t,l){if(s(t,"from"),s(l,"to"),t===l)return"";const h=e.win32.resolve(t),m=e.win32.resolve(l);if(h===m||(t=h.toLowerCase(),l=m.toLowerCase(),t===l))return"";let _=0;for(;_<t.length&&t.charCodeAt(_)===g;)_++;let f=t.length;for(;f-1>_&&t.charCodeAt(f-1)===g;)f--;const v=f-_;let y=0;for(;y<l.length&&l.charCodeAt(y)===g;)y++;let L=l.length;for(;L-1>y&&l.charCodeAt(L-1)===g;)L--;const I=L-y,k=v<I?v:I;let E=-1,T=0;for(;T<k;T++){const A=t.charCodeAt(_+T);if(A!==l.charCodeAt(y+T))break;A===g&&(E=T)}if(T!==k){if(E===-1)return m}else{if(I>k){if(l.charCodeAt(y+T)===g)return m.slice(y+T+1);if(T===2)return m.slice(y+T)}v>k&&(t.charCodeAt(_+T)===g?E=T:T===2&&(E=3)),E===-1&&(E=0)}let O="";for(T=_+E+1;T<=f;++T)(T===f||t.charCodeAt(T)===g)&&(O+=O.length===0?"..":"\\..");return y+=E,O.length>0?`${O}${m.slice(y,L)}`:(m.charCodeAt(y)===g&&++y,m.slice(y,L))},toNamespacedPath(t){if(typeof t!="string")return t;if(t.length===0)return"";const l=e.win32.resolve(t);if(l.length<=2)return t;if(l.charCodeAt(0)===g){if(l.charCodeAt(1)===g){const h=l.charCodeAt(2);if(h!==c&&h!==C)return`\\\\?\\UNC\\${l.slice(2)}`}}else if(r(l.charCodeAt(0))&&l.charCodeAt(1)===p&&l.charCodeAt(2)===g)return`\\\\?\\${l}`;return t},dirname(t){s(t,"path");const l=t.length;if(l===0)return".";let h=-1,m=0;const _=t.charCodeAt(0);if(l===1)return a(_)?t:".";if(a(_)){if(h=m=1,a(t.charCodeAt(1))){let y=2,L=y;for(;y<l&&!a(t.charCodeAt(y));)y++;if(y<l&&y!==L){for(L=y;y<l&&a(t.charCodeAt(y));)y++;if(y<l&&y!==L){for(L=y;y<l&&!a(t.charCodeAt(y));)y++;if(y===l)return t;y!==L&&(h=m=y+1)}}}}else r(_)&&t.charCodeAt(1)===p&&(h=l>2&&a(t.charCodeAt(2))?3:2,m=h);let f=-1,v=!0;for(let y=l-1;y>=m;--y)if(a(t.charCodeAt(y))){if(!v){f=y;break}}else v=!1;if(f===-1){if(h===-1)return".";f=h}return t.slice(0,f)},basename(t,l){l!==void 0&&s(l,"ext"),s(t,"path");let h=0,m=-1,_=!0,f;if(t.length>=2&&r(t.charCodeAt(0))&&t.charCodeAt(1)===p&&(h=2),l!==void 0&&l.length>0&&l.length<=t.length){if(l===t)return"";let v=l.length-1,y=-1;for(f=t.length-1;f>=h;--f){const L=t.charCodeAt(f);if(a(L)){if(!_){h=f+1;break}}else y===-1&&(_=!1,y=f+1),v>=0&&(L===l.charCodeAt(v)?--v==-1&&(m=f):(v=-1,m=y))}return h===m?m=y:m===-1&&(m=t.length),t.slice(h,m)}for(f=t.length-1;f>=h;--f)if(a(t.charCodeAt(f))){if(!_){h=f+1;break}}else m===-1&&(_=!1,m=f+1);return m===-1?"":t.slice(h,m)},extname(t){s(t,"path");let l=0,h=-1,m=0,_=-1,f=!0,v=0;t.length>=2&&t.charCodeAt(1)===p&&r(t.charCodeAt(0))&&(l=m=2);for(let y=t.length-1;y>=l;--y){const L=t.charCodeAt(y);if(a(L)){if(!f){m=y+1;break}continue}_===-1&&(f=!1,_=y+1),L===C?h===-1?h=y:v!==1&&(v=1):h!==-1&&(v=-1)}return h===-1||_===-1||v===0||v===1&&h===_-1&&h===m+1?"":t.slice(h,_)},format:n.bind(null,"\\"),parse(t){s(t,"path");const l={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return l;const h=t.length;let m=0,_=t.charCodeAt(0);if(h===1)return a(_)?(l.root=l.dir=t,l):(l.base=l.name=t,l);if(a(_)){if(m=1,a(t.charCodeAt(1))){let E=2,T=E;for(;E<h&&!a(t.charCodeAt(E));)E++;if(E<h&&E!==T){for(T=E;E<h&&a(t.charCodeAt(E));)E++;if(E<h&&E!==T){for(T=E;E<h&&!a(t.charCodeAt(E));)E++;E===h?m=E:E!==T&&(m=E+1)}}}}else if(r(_)&&t.charCodeAt(1)===p){if(h<=2)return l.root=l.dir=t,l;if(m=2,a(t.charCodeAt(2))){if(h===3)return l.root=l.dir=t,l;m=3}}m>0&&(l.root=t.slice(0,m));let f=-1,v=m,y=-1,L=!0,I=t.length-1,k=0;for(;I>=m;--I){if(_=t.charCodeAt(I),a(_)){if(!L){v=I+1;break}continue}y===-1&&(L=!1,y=I+1),_===C?f===-1?f=I:k!==1&&(k=1):f!==-1&&(k=-1)}return y!==-1&&(f===-1||k===0||k===1&&f===y-1&&f===v+1?l.base=l.name=t.slice(v,y):(l.name=t.slice(v,f),l.base=t.slice(v,y),l.ext=t.slice(f,y))),v>0&&v!==m?l.dir=t.slice(0,v-1):l.dir=l.root,l},sep:"\\",delimiter:";",win32:null,posix:null},e.posix={resolve(...t){let l="",h=!1;for(let m=t.length-1;m>=-1&&!h;m--){const _=m>=0?t[m]:b.cwd();s(_,"path"),_.length!==0&&(l=`${_}/${l}`,h=_.charCodeAt(0)===d)}return l=i(l,!h,"/",u),h?`/${l}`:l.length>0?l:"."},normalize(t){if(s(t,"path"),t.length===0)return".";const l=t.charCodeAt(0)===d,h=t.charCodeAt(t.length-1)===d;return t=i(t,!l,"/",u),t.length===0?l?"/":h?"./":".":(h&&(t+="/"),l?`/${t}`:t)},isAbsolute(t){return s(t,"path"),t.length>0&&t.charCodeAt(0)===d},join(...t){if(t.length===0)return".";let l;for(let h=0;h<t.length;++h){const m=t[h];s(m,"path"),m.length>0&&(l===void 0?l=m:l+=`/${m}`)}return l===void 0?".":e.posix.normalize(l)},relative(t,l){if(s(t,"from"),s(l,"to"),t===l||(t=e.posix.resolve(t),l=e.posix.resolve(l),t===l))return"";const h=1,m=t.length,_=m-h,f=1,v=l.length-f,y=_<v?_:v;let L=-1,I=0;for(;I<y;I++){const E=t.charCodeAt(h+I);if(E!==l.charCodeAt(f+I))break;E===d&&(L=I)}if(I===y)if(v>y){if(l.charCodeAt(f+I)===d)return l.slice(f+I+1);if(I===0)return l.slice(f+I)}else _>y&&(t.charCodeAt(h+I)===d?L=I:I===0&&(L=0));let k="";for(I=h+L+1;I<=m;++I)(I===m||t.charCodeAt(I)===d)&&(k+=k.length===0?"..":"/..");return`${k}${l.slice(f+L)}`},toNamespacedPath(t){return t},dirname(t){if(s(t,"path"),t.length===0)return".";const l=t.charCodeAt(0)===d;let h=-1,m=!0;for(let _=t.length-1;_>=1;--_)if(t.charCodeAt(_)===d){if(!m){h=_;break}}else m=!1;return h===-1?l?"/":".":l&&h===1?"//":t.slice(0,h)},basename(t,l){l!==void 0&&s(l,"ext"),s(t,"path");let h=0,m=-1,_=!0,f;if(l!==void 0&&l.length>0&&l.length<=t.length){if(l===t)return"";let v=l.length-1,y=-1;for(f=t.length-1;f>=0;--f){const L=t.charCodeAt(f);if(L===d){if(!_){h=f+1;break}}else y===-1&&(_=!1,y=f+1),v>=0&&(L===l.charCodeAt(v)?--v==-1&&(m=f):(v=-1,m=y))}return h===m?m=y:m===-1&&(m=t.length),t.slice(h,m)}for(f=t.length-1;f>=0;--f)if(t.charCodeAt(f)===d){if(!_){h=f+1;break}}else m===-1&&(_=!1,m=f+1);return m===-1?"":t.slice(h,m)},extname(t){s(t,"path");let l=-1,h=0,m=-1,_=!0,f=0;for(let v=t.length-1;v>=0;--v){const y=t.charCodeAt(v);if(y===d){if(!_){h=v+1;break}continue}m===-1&&(_=!1,m=v+1),y===C?l===-1?l=v:f!==1&&(f=1):l!==-1&&(f=-1)}return l===-1||m===-1||f===0||f===1&&l===m-1&&l===h+1?"":t.slice(l,m)},format:n.bind(null,"/"),parse(t){s(t,"path");const l={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return l;const h=t.charCodeAt(0)===d;let m;h?(l.root="/",m=1):m=0;let _=-1,f=0,v=-1,y=!0,L=t.length-1,I=0;for(;L>=m;--L){const k=t.charCodeAt(L);if(k===d){if(!y){f=L+1;break}continue}v===-1&&(y=!1,v=L+1),k===C?_===-1?_=L:I!==1&&(I=1):_!==-1&&(I=-1)}if(v!==-1){const k=f===0&&h?1:f;_===-1||I===0||I===1&&_===v-1&&_===f+1?l.base=l.name=t.slice(k,v):(l.name=t.slice(k,_),l.base=t.slice(k,v),l.ext=t.slice(_,v))}return f>0?l.dir=t.slice(0,f-1):h&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=b.platform==="win32"?e.win32.normalize:e.posix.normalize,e.resolve=b.platform==="win32"?e.win32.resolve:e.posix.resolve,e.relative=b.platform==="win32"?e.win32.relative:e.posix.relative,e.dirname=b.platform==="win32"?e.win32.dirname:e.posix.dirname,e.basename=b.platform==="win32"?e.win32.basename:e.posix.basename,e.extname=b.platform==="win32"?e.win32.extname:e.posix.extname,e.sep=b.platform==="win32"?e.win32.sep:e.posix.sep}),define(Q[120],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var b;(function(N){function M(d,g){if(d.start>=g.end||g.start>=d.end)return{start:0,end:0};const p=Math.max(d.start,g.start),c=Math.min(d.end,g.end);return c-p<=0?{start:0,end:0}:{start:p,end:c}}N.intersect=M;function w(d){return d.end-d.start<=0}N.isEmpty=w;function S(d,g){return!w(M(d,g))}N.intersects=S;function C(d,g){const p=[],c={start:d.start,end:Math.min(g.start,d.end)},o={start:Math.max(g.end,d.start),end:d.end};return w(c)||p.push(c),w(o)||p.push(o),p}N.relativeComplement=C})(b=e.Range||(e.Range={}))}),define(Q[281],J([0,1,120]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function N(d,g){const p=[];for(let c of g)if(!(d.start>=c.range.end)){if(d.end<c.range.start)break;const o=b.Range.intersect(d,c.range);b.Range.isEmpty(o)||p.push({range:o,size:c.size})}return p}e.groupIntersect=N;function M({start:d,end:g},p){return{start:d+p,end:g+p}}e.shift=M;function w(d){const g=[];let p=null;for(let c of d){const o=c.range.start,s=c.range.end,a=c.size;if(p&&a===p.size){p.range.end=s;continue}p={range:{start:o,end:s},size:a},g.push(p)}return g}e.consolidate=w;function S(...d){return w(d.reduce((g,p)=>g.concat(p),[]))}class C{constructor(){this.groups=[],this._size=0}splice(g,p,c=[]){const o=c.length-p,s=N({start:0,end:g},this.groups),a=N({start:g+p,end:Number.POSITIVE_INFINITY},this.groups).map(r=>({range:M(r.range,o),size:r.size})),u=c.map((r,i)=>({range:{start:g+i,end:g+i+1},size:r.size}));this.groups=S(s,u,a),this._size=this.groups.reduce((r,i)=>r+i.size*(i.range.end-i.range.start),0)}get count(){const g=this.groups.length;return g?this.groups[g-1].range.end:0}get size(){return this._size}indexAt(g){if(g<0)return-1;let p=0,c=0;for(let o of this.groups){const s=o.range.end-o.range.start,a=c+s*o.size;if(g<a)return p+Math.floor((g-c)/o.size);p+=s,c=a}return p}indexAfter(g){return Math.min(this.indexAt(g)+1,this.count)}positionAt(g){if(g<0)return-1;let p=0,c=0;for(let o of this.groups){const s=o.range.end-o.range.start,a=c+s;if(g<a)return p+(g-c)*o.size;p+=s*o.size,c=a}return-1}}e.RangeMap=C}),define(Q[81],J([0,1,17]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const N=b.globals.performance&&typeof b.globals.performance.now=="function";class M{constructor(S){this._highResolution=N&&S,this._startTime=this._now(),this._stopTime=-1}static create(S=!0){return new M(S)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?b.globals.performance.now():Date.now()}}e.StopWatch=M}),define(Q[6],J([0,1,12,2,71,81]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.PauseableEmitter=e.Emitter=e.Event=void 0;var S;(function(a){a.None=()=>N.Disposable.None;function u(A){return(B,F=null,D)=>{let R=!1,W;return W=A(x=>{if(!R)return W?W.dispose():R=!0,B.call(F,x)},null,D),R&&W.dispose(),W}}a.once=u;function r(A,B){return m((F,D=null,R)=>A(W=>F.call(D,B(W)),null,R))}a.map=r;function i(A,B){return m((F,D=null,R)=>A(W=>{B(W),F.call(D,W)},null,R))}a.forEach=i;function n(A,B){return m((F,D=null,R)=>A(W=>B(W)&&F.call(D,W),null,R))}a.filter=n;function t(A){return A}a.signal=t;function l(...A){return(B,F=null,D)=>N.combinedDisposable(...A.map(R=>R(W=>B.call(F,W),null,D)))}a.any=l;function h(A,B,F){let D=F;return r(A,R=>(D=B(D,R),D))}a.reduce=h;function m(A){let B;const F=new p({onFirstListenerAdd(){B=A(F.fire,F)},onLastListenerRemove(){B.dispose()}});return F.event}a.snapshot=m;function _(A,B,F=100,D=!1,R){let W,x,K,Y=0;const ee=new p({leakWarningThreshold:R,onFirstListenerAdd(){W=A(se=>{Y++,x=B(x,se),D&&!K&&(ee.fire(x),x=void 0),clearTimeout(K),K=setTimeout(()=>{const ne=x;x=void 0,K=void 0,(!D||Y>1)&&ee.fire(ne),Y=0},F)})},onLastListenerRemove(){W.dispose()}});return ee.event}a.debounce=_;function f(A){const B=new Date().getTime();return r(u(A),F=>new Date().getTime()-B)}a.stopwatch=f;function v(A){let B=!0,F;return n(A,D=>{const R=B||D!==F;return B=!1,F=D,R})}a.latch=v;function y(A,B=!1,F=[]){let D=F.slice(),R=A(K=>{D?D.push(K):x.fire(K)});const W=()=>{D&&D.forEach(K=>x.fire(K)),D=null},x=new p({onFirstListenerAdd(){R||(R=A(K=>x.fire(K)))},onFirstListenerDidAdd(){D&&(B?setTimeout(W):W())},onLastListenerRemove(){R&&R.dispose(),R=null}});return x.event}a.buffer=y;class L{constructor(B){this.event=B}map(B){return new L(r(this.event,B))}forEach(B){return new L(i(this.event,B))}filter(B){return new L(n(this.event,B))}reduce(B,F){return new L(h(this.event,B,F))}latch(){return new L(v(this.event))}debounce(B,F=100,D=!1,R){return new L(_(this.event,B,F,D,R))}on(B,F,D){return this.event(B,F,D)}once(B,F,D){return u(this.event)(B,F,D)}}function I(A){return new L(A)}a.chain=I;function k(A,B,F=D=>D){const D=(...K)=>x.fire(F(...K)),R=()=>A.on(B,D),W=()=>A.removeListener(B,D),x=new p({onFirstListenerAdd:R,onLastListenerRemove:W});return x.event}a.fromNodeEventEmitter=k;function E(A,B,F=D=>D){const D=(...K)=>x.fire(F(...K)),R=()=>A.addEventListener(B,D),W=()=>A.removeEventListener(B,D),x=new p({onFirstListenerAdd:R,onLastListenerRemove:W});return x.event}a.fromDOMEventEmitter=E;function T(A){const B=new p;let F=!1;return A.then(void 0,()=>null).then(()=>{F?B.fire(void 0):setTimeout(()=>B.fire(void 0),0)}),F=!0,B.event}a.fromPromise=T;function O(A){return new Promise(B=>u(A)(B))}a.toPromise=O})(S=e.Event||(e.Event={}));class C{constructor(u){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${u}_${C._idPool++}`}start(u){this._stopWatch=new w.StopWatch(!0),this._listenerCount=u}stop(){if(this._stopWatch){const u=this._stopWatch.elapsed();this._elapsedOverall+=u,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${u.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}C._idPool=0;let d=-1;class g{constructor(u,r=Math.random().toString(18).slice(2,5)){this.customThreshold=u,this.name=r,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(u){let r=d;if(typeof this.customThreshold=="number"&&(r=this.customThreshold),!(r<=0||u<r)){this._stacks||(this._stacks=new Map);const i=new Error().stack.split(`
`).slice(3).join(`
`),n=this._stacks.get(i)||0;if(this._stacks.set(i,n+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let t,l=0;for(const[h,m]of this._stacks)(!t||l<m)&&(t=h,l=m);console.warn(`[${this.name}] potential listener LEAK detected, having ${u} listeners already. MOST frequent listener (${l}):`),console.warn(t)}return()=>{const t=this._stacks.get(i)||0;this._stacks.set(i,t-1)}}}}class p{constructor(u){var r;this._disposed=!1,this._options=u,this._leakageMon=d>0?new g(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((r=this._options)===null||r===void 0?void 0:r._profName)?new C(this._options._profName):void 0}get event(){return this._event||(this._event=(u,r,i)=>{var n;this._listeners||(this._listeners=new M.LinkedList);const t=this._listeners.isEmpty();t&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const l=this._listeners.push(r?[u,r]:u);t&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,u,r);const h=(n=this._leakageMon)===null||n===void 0?void 0:n.check(this._listeners.size);let m;return m={dispose:()=>{h&&h(),m.dispose=p._noop,this._disposed||(l(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))}},i instanceof N.DisposableStore?i.add(m):Array.isArray(i)&&i.push(m),m}),this._event}fire(u){var r,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new M.LinkedList);for(let n of this._listeners)this._deliveryQueue.push([n,u]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[n,t]=this._deliveryQueue.shift();try{typeof n=="function"?n.call(void 0,t):n[0].call(n[1],t)}catch(l){b.onUnexpectedError(l)}}(i=this._perfMon)===null||i===void 0||i.stop()}}dispose(){var u,r,i;(u=this._listeners)===null||u===void 0||u.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(i=this._leakageMon)===null||i===void 0||i.dispose(),this._disposed=!0}}e.Emitter=p,p._noop=function(){};class c extends p{constructor(u){super(u);this._isPaused=0,this._eventQueue=new M.LinkedList,this._mergeFn=u==null?void 0:u.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const u=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(u))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(u){this._listeners&&(this._isPaused!==0?this._eventQueue.push(u):super.fire(u))}}e.PauseableEmitter=c;class o{constructor(){this.buffers=[]}wrapEvent(u){return(r,i,n)=>u(t=>{const l=this.buffers[this.buffers.length-1];l?l.push(()=>r.call(i,t)):r.call(i,t)},void 0,n)}bufferEvents(u){const r=[];this.buffers.push(r);const i=u();return this.buffers.pop(),r.forEach(n=>n()),i}}e.EventBufferer=o;class s{constructor(){this.listening=!1,this.inputEvent=S.None,this.inputEventListener=N.Disposable.None,this.emitter=new p({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(u){this.inputEvent=u,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=u(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=s}),define(Q[35],J([0,1,6]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandalone=e.isAndroid=e.isElectron=e.isEdgeLegacyWebView=e.isIPad=e.isWebkitWebView=e.isSafari=e.isChrome=e.isWebKit=e.isFirefox=e.getPixelRatio=e.getZoomFactor=e.onDidChangeZoomLevel=e.getTimeSinceLastZoomLevelChanged=e.getZoomLevel=void 0;class N{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new b.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let c=document.createElement("canvas").getContext("2d"),o=window.devicePixelRatio||1,s=c.webkitBackingStorePixelRatio||c.mozBackingStorePixelRatio||c.msBackingStorePixelRatio||c.oBackingStorePixelRatio||c.backingStorePixelRatio||1;return o/s}}N.INSTANCE=new N;function M(){return N.INSTANCE.getZoomLevel()}e.getZoomLevel=M;function w(){return N.INSTANCE.getTimeSinceLastZoomLevelChanged()}e.getTimeSinceLastZoomLevelChanged=w;function S(p){return N.INSTANCE.onDidChangeZoomLevel(p)}e.onDidChangeZoomLevel=S;function C(){return N.INSTANCE.getZoomFactor()}e.getZoomFactor=C;function d(){return N.INSTANCE.getPixelRatio()}e.getPixelRatio=d;const g=navigator.userAgent;e.isFirefox=g.indexOf("Firefox")>=0,e.isWebKit=g.indexOf("AppleWebKit")>=0,e.isChrome=g.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&g.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isIPad=g.indexOf("iPad")>=0||e.isSafari&&navigator.maxTouchPoints>0,e.isEdgeLegacyWebView=g.indexOf("Edge/")>=0&&g.indexOf("WebView/")>=0,e.isElectron=g.indexOf("Electron/")>=0,e.isAndroid=g.indexOf("Android")>=0,e.isStandalone=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches}),define(Q[151],J([0,1,35,17]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=void 0,e.BrowserFeatures={clipboard:{writeText:N.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:N.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>N.isNative||b.isStandalone?0:navigator.keyboard||b.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)}}),define(Q[55],J([0,1,6]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stop=e.stopEvent=e.domEvent=void 0;const N=(S,C,d)=>{const g=c=>p.fire(c),p=new b.Emitter({onFirstListenerAdd:()=>{S.addEventListener(C,g,d)},onLastListenerRemove:()=>{S.removeEventListener(C,g,d)}});return p.event};e.domEvent=N;function M(S){return S.preventDefault(),S.stopPropagation(),S}e.stopEvent=M;function w(S){return b.Event.map(S,M)}e.stop=w}),define(Q[56],J([0,1,35,39,17]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;let w=new Array(230),S=new Array(112);(function(){for(let a=0;a<S.length;a++)S[a]=-1;function s(a,u){w[a]=u,S[u]=a}s(3,7),s(8,1),s(9,2),s(13,3),s(16,4),s(17,5),s(18,6),s(19,7),s(20,8),s(27,9),s(32,10),s(33,11),s(34,12),s(35,13),s(36,14),s(37,15),s(38,16),s(39,17),s(40,18),s(45,19),s(46,20),s(48,21),s(49,22),s(50,23),s(51,24),s(52,25),s(53,26),s(54,27),s(55,28),s(56,29),s(57,30),s(65,31),s(66,32),s(67,33),s(68,34),s(69,35),s(70,36),s(71,37),s(72,38),s(73,39),s(74,40),s(75,41),s(76,42),s(77,43),s(78,44),s(79,45),s(80,46),s(81,47),s(82,48),s(83,49),s(84,50),s(85,51),s(86,52),s(87,53),s(88,54),s(89,55),s(90,56),s(93,58),s(96,93),s(97,94),s(98,95),s(99,96),s(100,97),s(101,98),s(102,99),s(103,100),s(104,101),s(105,102),s(106,103),s(107,104),s(108,105),s(109,106),s(110,107),s(111,108),s(112,59),s(113,60),s(114,61),s(115,62),s(116,63),s(117,64),s(118,65),s(119,66),s(120,67),s(121,68),s(122,69),s(123,70),s(124,71),s(125,72),s(126,73),s(127,74),s(128,75),s(129,76),s(130,77),s(144,78),s(145,79),s(186,80),s(187,81),s(188,82),s(189,83),s(190,84),s(191,85),s(192,86),s(193,110),s(194,111),s(219,87),s(220,88),s(221,89),s(222,90),s(223,91),s(226,92),s(229,109),b.isFirefox?(s(59,80),s(107,81),s(109,83),M.isMacintosh&&s(224,57)):b.isWebKit&&(s(91,57),M.isMacintosh?s(93,57):s(92,57))})();function C(s){if(s.charCode){let a=String.fromCharCode(s.charCode).toUpperCase();return N.KeyCodeUtils.fromString(a)}return w[s.keyCode]||0}const d=M.isMacintosh?256:2048,g=512,p=1024,c=M.isMacintosh?2048:256;class o{constructor(a){this._standardKeyboardEventBrand=!0;let u=a;this.browserEvent=u,this.target=u.target,this.ctrlKey=u.ctrlKey,this.shiftKey=u.shiftKey,this.altKey=u.altKey,this.metaKey=u.metaKey,this.keyCode=C(u),this.code=u.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(a){return this._asKeybinding===a}_computeKeybinding(){let a=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(a=this.keyCode);let u=0;return this.ctrlKey&&(u|=d),this.altKey&&(u|=g),this.shiftKey&&(u|=p),this.metaKey&&(u|=c),u|=a,u}_computeRuntimeKeybinding(){let a=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(a=this.keyCode),new N.SimpleKeybinding(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,a)}}e.StandardKeyboardEvent=o}),define(Q[50],J([0,1,35,193,17]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class w{constructor(d){this.timestamp=Date.now(),this.browserEvent=d,this.leftButton=d.button===0,this.middleButton=d.button===1,this.rightButton=d.button===2,this.buttons=d.buttons,this.target=d.target,this.detail=d.detail||1,d.type==="dblclick"&&(this.detail=2),this.ctrlKey=d.ctrlKey,this.shiftKey=d.shiftKey,this.altKey=d.altKey,this.metaKey=d.metaKey,typeof d.pageX=="number"?(this.posx=d.pageX,this.posy=d.pageY):(this.posx=d.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=d.clientY+document.body.scrollTop+document.documentElement.scrollTop);let g=N.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,d.view);this.posx-=g.left,this.posy-=g.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=w;class S{constructor(d,g=0,p=0){if(this.browserEvent=d||null,this.target=d?d.target||d.targetNode||d.srcElement:null,this.deltaY=p,this.deltaX=g,d){let c=d,o=d;if(typeof c.wheelDeltaY!="undefined")this.deltaY=c.wheelDeltaY/120;else if(typeof o.VERTICAL_AXIS!="undefined"&&o.axis===o.VERTICAL_AXIS)this.deltaY=-o.detail/3;else if(d.type==="wheel"){const s=d;s.deltaMode===s.DOM_DELTA_LINE?b.isFirefox&&!M.isMacintosh?this.deltaY=-d.deltaY/3:this.deltaY=-d.deltaY:this.deltaY=-d.deltaY/40}if(typeof c.wheelDeltaX!="undefined")b.isSafari&&M.isWindows?this.deltaX=-(c.wheelDeltaX/120):this.deltaX=c.wheelDeltaX/120;else if(typeof o.HORIZONTAL_AXIS!="undefined"&&o.axis===o.HORIZONTAL_AXIS)this.deltaX=-d.detail/3;else if(d.type==="wheel"){const s=d;s.deltaMode===s.DOM_DELTA_LINE?b.isFirefox&&!M.isMacintosh?this.deltaX=-d.deltaX/3:this.deltaX=-d.deltaX:this.deltaX=-d.deltaX/40}this.deltaY===0&&this.deltaX===0&&d.wheelDelta&&(this.deltaY=d.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}e.StandardWheelEvent=S}),define(Q[23],J([0,1,6]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const N=Object.freeze(function(C,d){const g=setTimeout(C.bind(d),0);return{dispose(){clearTimeout(g)}}});var M;(function(C){function d(g){return g===C.None||g===C.Cancelled||g instanceof w?!0:!g||typeof g!="object"?!1:typeof g.isCancellationRequested=="boolean"&&typeof g.onCancellationRequested=="function"}C.isCancellationToken=d,C.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:b.Event.None}),C.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:N})})(M=e.CancellationToken||(e.CancellationToken={}));class w{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?N:(this._emitter||(this._emitter=new b.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class S{constructor(d){this._token=void 0,this._parentListener=void 0,this._parentListener=d&&d.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new w),this._token}cancel(){this._token?this._token instanceof w&&this._token.cancel():this._token=M.Cancelled}dispose(d=!1){d&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof w&&this._token.dispose():this._token=M.None}}e.CancellationTokenSource=S});var Ie=this&&this.__awaiter||function(q,e,b,N){function M(w){return w instanceof b?w:new b(function(S){S(w)})}return new(b||(b=Promise))(function(w,S){function C(p){try{g(N.next(p))}catch(c){S(c)}}function d(p){try{g(N.throw(p))}catch(c){S(c)}}function g(p){p.done?w(p.value):M(p.value).then(C,d)}g((N=N.apply(q,e||[])).next())})};define(Q[15],J([0,1,23,12,2]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Promises=e.IdleValue=e.runWhenIdle=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.first=e.disposableTimeout=e.timeout=e.ThrottledDelayer=e.Delayer=e.Throttler=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function w(t){return!!t&&typeof t.then=="function"}e.isThenable=w;function S(t){const l=new b.CancellationTokenSource,h=t(l.token),m=new Promise((_,f)=>{l.token.onCancellationRequested(()=>{f(N.canceled())}),Promise.resolve(h).then(v=>{l.dispose(),_(v)},v=>{l.dispose(),f(v)})});return new class{cancel(){l.cancel()}then(_,f){return m.then(_,f)}catch(_){return this.then(void 0,_)}finally(_){return m.finally(_)}}}e.createCancelablePromise=S;function C(t,l,h){return Promise.race([t,new Promise(m=>l.onCancellationRequested(()=>m(h)))])}e.raceCancellation=C;class d{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(l){if(this.activePromise){if(this.queuedPromiseFactory=l,!this.queuedPromise){const h=()=>{this.queuedPromise=null;const m=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,m};this.queuedPromise=new Promise(m=>{this.activePromise.then(h,h).then(m)})}return new Promise((h,m)=>{this.queuedPromise.then(h,m)})}return this.activePromise=l(),new Promise((h,m)=>{this.activePromise.then(_=>{this.activePromise=null,h(_)},_=>{this.activePromise=null,m(_)})})}}e.Throttler=d;class g{constructor(l){this.defaultDelay=l,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(l,h=this.defaultDelay){return this.task=l,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((m,_)=>{this.doResolve=m,this.doReject=_}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const m=this.task;return this.task=null,m()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},h),this.completionPromise}isTriggered(){return this.timeout!==null}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(N.canceled()),this.completionPromise=null)}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}e.Delayer=g;class p{constructor(l){this.delayer=new g(l),this.throttler=new d}trigger(l,h){return this.delayer.trigger(()=>this.throttler.queue(l),h)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=p;function c(t,l){return l?new Promise((h,m)=>{const _=setTimeout(h,t);l.onCancellationRequested(()=>{clearTimeout(_),m(N.canceled())})}):S(h=>c(t,h))}e.timeout=c;function o(t,l=0){const h=setTimeout(t,l);return M.toDisposable(()=>clearTimeout(h))}e.disposableTimeout=o;function s(t,l=m=>!!m,h=null){let m=0;const _=t.length,f=()=>{if(m>=_)return Promise.resolve(h);const v=t[m++];return Promise.resolve(v()).then(L=>l(L)?Promise.resolve(L):f())};return f()}e.first=s;class a{constructor(l,h){this._token=-1,typeof l=="function"&&typeof h=="number"&&this.setIfNotSet(l,h)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(l,h){this.cancel(),this._token=setTimeout(()=>{this._token=-1,l()},h)}setIfNotSet(l,h){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,l()},h))}}e.TimeoutTimer=a;class u{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(l,h){this.cancel(),this._token=setInterval(()=>{l()},h)}}e.IntervalTimer=u;class r{constructor(l,h){this.timeoutToken=-1,this.runner=l,this.timeout=h,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(l=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,l)}get delay(){return this.timeout}set delay(l){this.timeout=l}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}e.RunOnceScheduler=r,function(){if(typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"){const t=Object.freeze({didTimeout:!0,timeRemaining(){return 15}});e.runWhenIdle=l=>{const h=setTimeout(()=>l(t));let m=!1;return{dispose(){m||(m=!0,clearTimeout(h))}}}}else e.runWhenIdle=(t,l)=>{const h=requestIdleCallback(t,typeof l=="number"?{timeout:l}:void 0);let m=!1;return{dispose(){m||(m=!0,cancelIdleCallback(h))}}}}();class i{constructor(l){this._didRun=!1,this._executor=()=>{try{this._value=l()}catch(h){this._error=h}finally{this._didRun=!0}},this._handle=e.runWhenIdle(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}e.IdleValue=i;var n;(function(t){function l(f){return Ie(this,void 0,void 0,function*(){return typeof Promise.allSettled=="function"?h(f):m(f)})}t.allSettled=l;function h(f){return Ie(this,void 0,void 0,function*(){return Promise.allSettled(f)})}function m(f){return Ie(this,void 0,void 0,function*(){return Promise.all(f.map(v=>v.then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))})}function _(f){return Ie(this,void 0,void 0,function*(){let v;const y=yield Promise.all(f.map(L=>L.then(I=>I,I=>{v||(v=I)})));if(typeof v!="undefined")throw v;return y})}t.settled=_})(n=e.Promises||(e.Promises={}))}),define(Q[282],J([0,1,15,2]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class M extends N.Disposable{constructor(S,C,d){super();this._visibility=S,this._visibleClassName=C,this._invisibleClassName=d,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new b.TimeoutTimer)}applyVisibilitySetting(S){return this._visibility===2?!1:this._visibility===3?!0:S}setShouldBeVisible(S){const C=this.applyVisibilitySetting(S);this._shouldBeVisible!==C&&(this._shouldBeVisible=C,this.ensureVisibility())}setIsNeeded(S){this._isNeeded!==S&&(this._isNeeded=S,this.ensureVisibility())}setDomNode(S){this._domNode=S,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(S){this._revealTimer.cancel(),!!this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(S?" fade":"")))}}e.ScrollbarVisibilityController=M}),define(Q[27],J([0,1,6]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CSSIcon=e.Codicon=e.registerCodicon=e.iconRegistry=void 0;class N{constructor(){this._icons=new Map,this._onDidRegister=new b.Emitter}add(g){const p=this._icons.get(g.id);p?g.description?p.description=g.description:console.error(`Duplicate registration of codicon ${g.id}`):(this._icons.set(g.id,g),this._onDidRegister.fire(g))}get(g){return this._icons.get(g)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const M=new N;e.iconRegistry=M;function w(d,g){return new S(d,g)}e.registerCodicon=w;class S{constructor(g,p,c){this.id=g,this.definition=p,this.description=c,M.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}e.Codicon=S;var C;(function(d){d.iconNameSegment="[A-Za-z0-9]+",d.iconNameExpression="[A-Za-z0-9\\-]+",d.iconModifierExpression="~[A-Za-z]+";const g=new RegExp(`^(${d.iconNameExpression})(${d.iconModifierExpression})?$`);function p(s){if(s instanceof S)return["codicon","codicon-"+s.id];const a=g.exec(s.id);if(!a)return p(S.error);let[,u,r]=a;const i=["codicon","codicon-"+u];return r&&i.push("codicon-modifier-"+r.substr(1)),i}d.asClassNameArray=p;function c(s){return p(s).join(" ")}d.asClassName=c;function o(s){return"."+p(s).join(".")}d.asCSSSelector=o})(C=e.CSSIcon||(e.CSSIcon={})),function(d){d.add=new d("add",{fontCharacter:"\\ea60"}),d.plus=new d("plus",{fontCharacter:"\\ea60"}),d.gistNew=new d("gist-new",{fontCharacter:"\\ea60"}),d.repoCreate=new d("repo-create",{fontCharacter:"\\ea60"}),d.lightbulb=new d("lightbulb",{fontCharacter:"\\ea61"}),d.lightBulb=new d("light-bulb",{fontCharacter:"\\ea61"}),d.repo=new d("repo",{fontCharacter:"\\ea62"}),d.repoDelete=new d("repo-delete",{fontCharacter:"\\ea62"}),d.gistFork=new d("gist-fork",{fontCharacter:"\\ea63"}),d.repoForked=new d("repo-forked",{fontCharacter:"\\ea63"}),d.gitPullRequest=new d("git-pull-request",{fontCharacter:"\\ea64"}),d.gitPullRequestAbandoned=new d("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),d.recordKeys=new d("record-keys",{fontCharacter:"\\ea65"}),d.keyboard=new d("keyboard",{fontCharacter:"\\ea65"}),d.tag=new d("tag",{fontCharacter:"\\ea66"}),d.tagAdd=new d("tag-add",{fontCharacter:"\\ea66"}),d.tagRemove=new d("tag-remove",{fontCharacter:"\\ea66"}),d.person=new d("person",{fontCharacter:"\\ea67"}),d.personAdd=new d("person-add",{fontCharacter:"\\ea67"}),d.personFollow=new d("person-follow",{fontCharacter:"\\ea67"}),d.personOutline=new d("person-outline",{fontCharacter:"\\ea67"}),d.personFilled=new d("person-filled",{fontCharacter:"\\ea67"}),d.gitBranch=new d("git-branch",{fontCharacter:"\\ea68"}),d.gitBranchCreate=new d("git-branch-create",{fontCharacter:"\\ea68"}),d.gitBranchDelete=new d("git-branch-delete",{fontCharacter:"\\ea68"}),d.sourceControl=new d("source-control",{fontCharacter:"\\ea68"}),d.mirror=new d("mirror",{fontCharacter:"\\ea69"}),d.mirrorPublic=new d("mirror-public",{fontCharacter:"\\ea69"}),d.star=new d("star",{fontCharacter:"\\ea6a"}),d.starAdd=new d("star-add",{fontCharacter:"\\ea6a"}),d.starDelete=new d("star-delete",{fontCharacter:"\\ea6a"}),d.starEmpty=new d("star-empty",{fontCharacter:"\\ea6a"}),d.comment=new d("comment",{fontCharacter:"\\ea6b"}),d.commentAdd=new d("comment-add",{fontCharacter:"\\ea6b"}),d.alert=new d("alert",{fontCharacter:"\\ea6c"}),d.warning=new d("warning",{fontCharacter:"\\ea6c"}),d.search=new d("search",{fontCharacter:"\\ea6d"}),d.searchSave=new d("search-save",{fontCharacter:"\\ea6d"}),d.logOut=new d("log-out",{fontCharacter:"\\ea6e"}),d.signOut=new d("sign-out",{fontCharacter:"\\ea6e"}),d.logIn=new d("log-in",{fontCharacter:"\\ea6f"}),d.signIn=new d("sign-in",{fontCharacter:"\\ea6f"}),d.eye=new d("eye",{fontCharacter:"\\ea70"}),d.eyeUnwatch=new d("eye-unwatch",{fontCharacter:"\\ea70"}),d.eyeWatch=new d("eye-watch",{fontCharacter:"\\ea70"}),d.circleFilled=new d("circle-filled",{fontCharacter:"\\ea71"}),d.primitiveDot=new d("primitive-dot",{fontCharacter:"\\ea71"}),d.closeDirty=new d("close-dirty",{fontCharacter:"\\ea71"}),d.debugBreakpoint=new d("debug-breakpoint",{fontCharacter:"\\ea71"}),d.debugBreakpointDisabled=new d("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),d.debugHint=new d("debug-hint",{fontCharacter:"\\ea71"}),d.primitiveSquare=new d("primitive-square",{fontCharacter:"\\ea72"}),d.edit=new d("edit",{fontCharacter:"\\ea73"}),d.pencil=new d("pencil",{fontCharacter:"\\ea73"}),d.info=new d("info",{fontCharacter:"\\ea74"}),d.issueOpened=new d("issue-opened",{fontCharacter:"\\ea74"}),d.gistPrivate=new d("gist-private",{fontCharacter:"\\ea75"}),d.gitForkPrivate=new d("git-fork-private",{fontCharacter:"\\ea75"}),d.lock=new d("lock",{fontCharacter:"\\ea75"}),d.mirrorPrivate=new d("mirror-private",{fontCharacter:"\\ea75"}),d.close=new d("close",{fontCharacter:"\\ea76"}),d.removeClose=new d("remove-close",{fontCharacter:"\\ea76"}),d.x=new d("x",{fontCharacter:"\\ea76"}),d.repoSync=new d("repo-sync",{fontCharacter:"\\ea77"}),d.sync=new d("sync",{fontCharacter:"\\ea77"}),d.clone=new d("clone",{fontCharacter:"\\ea78"}),d.desktopDownload=new d("desktop-download",{fontCharacter:"\\ea78"}),d.beaker=new d("beaker",{fontCharacter:"\\ea79"}),d.microscope=new d("microscope",{fontCharacter:"\\ea79"}),d.vm=new d("vm",{fontCharacter:"\\ea7a"}),d.deviceDesktop=new d("device-desktop",{fontCharacter:"\\ea7a"}),d.file=new d("file",{fontCharacter:"\\ea7b"}),d.fileText=new d("file-text",{fontCharacter:"\\ea7b"}),d.more=new d("more",{fontCharacter:"\\ea7c"}),d.ellipsis=new d("ellipsis",{fontCharacter:"\\ea7c"}),d.kebabHorizontal=new d("kebab-horizontal",{fontCharacter:"\\ea7c"}),d.mailReply=new d("mail-reply",{fontCharacter:"\\ea7d"}),d.reply=new d("reply",{fontCharacter:"\\ea7d"}),d.organization=new d("organization",{fontCharacter:"\\ea7e"}),d.organizationFilled=new d("organization-filled",{fontCharacter:"\\ea7e"}),d.organizationOutline=new d("organization-outline",{fontCharacter:"\\ea7e"}),d.newFile=new d("new-file",{fontCharacter:"\\ea7f"}),d.fileAdd=new d("file-add",{fontCharacter:"\\ea7f"}),d.newFolder=new d("new-folder",{fontCharacter:"\\ea80"}),d.fileDirectoryCreate=new d("file-directory-create",{fontCharacter:"\\ea80"}),d.trash=new d("trash",{fontCharacter:"\\ea81"}),d.trashcan=new d("trashcan",{fontCharacter:"\\ea81"}),d.history=new d("history",{fontCharacter:"\\ea82"}),d.clock=new d("clock",{fontCharacter:"\\ea82"}),d.folder=new d("folder",{fontCharacter:"\\ea83"}),d.fileDirectory=new d("file-directory",{fontCharacter:"\\ea83"}),d.symbolFolder=new d("symbol-folder",{fontCharacter:"\\ea83"}),d.logoGithub=new d("logo-github",{fontCharacter:"\\ea84"}),d.markGithub=new d("mark-github",{fontCharacter:"\\ea84"}),d.github=new d("github",{fontCharacter:"\\ea84"}),d.terminal=new d("terminal",{fontCharacter:"\\ea85"}),d.console=new d("console",{fontCharacter:"\\ea85"}),d.repl=new d("repl",{fontCharacter:"\\ea85"}),d.zap=new d("zap",{fontCharacter:"\\ea86"}),d.symbolEvent=new d("symbol-event",{fontCharacter:"\\ea86"}),d.error=new d("error",{fontCharacter:"\\ea87"}),d.stop=new d("stop",{fontCharacter:"\\ea87"}),d.variable=new d("variable",{fontCharacter:"\\ea88"}),d.symbolVariable=new d("symbol-variable",{fontCharacter:"\\ea88"}),d.array=new d("array",{fontCharacter:"\\ea8a"}),d.symbolArray=new d("symbol-array",{fontCharacter:"\\ea8a"}),d.symbolModule=new d("symbol-module",{fontCharacter:"\\ea8b"}),d.symbolPackage=new d("symbol-package",{fontCharacter:"\\ea8b"}),d.symbolNamespace=new d("symbol-namespace",{fontCharacter:"\\ea8b"}),d.symbolObject=new d("symbol-object",{fontCharacter:"\\ea8b"}),d.symbolMethod=new d("symbol-method",{fontCharacter:"\\ea8c"}),d.symbolFunction=new d("symbol-function",{fontCharacter:"\\ea8c"}),d.symbolConstructor=new d("symbol-constructor",{fontCharacter:"\\ea8c"}),d.symbolBoolean=new d("symbol-boolean",{fontCharacter:"\\ea8f"}),d.symbolNull=new d("symbol-null",{fontCharacter:"\\ea8f"}),d.symbolNumeric=new d("symbol-numeric",{fontCharacter:"\\ea90"}),d.symbolNumber=new d("symbol-number",{fontCharacter:"\\ea90"}),d.symbolStructure=new d("symbol-structure",{fontCharacter:"\\ea91"}),d.symbolStruct=new d("symbol-struct",{fontCharacter:"\\ea91"}),d.symbolParameter=new d("symbol-parameter",{fontCharacter:"\\ea92"}),d.symbolTypeParameter=new d("symbol-type-parameter",{fontCharacter:"\\ea92"}),d.symbolKey=new d("symbol-key",{fontCharacter:"\\ea93"}),d.symbolText=new d("symbol-text",{fontCharacter:"\\ea93"}),d.symbolReference=new d("symbol-reference",{fontCharacter:"\\ea94"}),d.goToFile=new d("go-to-file",{fontCharacter:"\\ea94"}),d.symbolEnum=new d("symbol-enum",{fontCharacter:"\\ea95"}),d.symbolValue=new d("symbol-value",{fontCharacter:"\\ea95"}),d.symbolRuler=new d("symbol-ruler",{fontCharacter:"\\ea96"}),d.symbolUnit=new d("symbol-unit",{fontCharacter:"\\ea96"}),d.activateBreakpoints=new d("activate-breakpoints",{fontCharacter:"\\ea97"}),d.archive=new d("archive",{fontCharacter:"\\ea98"}),d.arrowBoth=new d("arrow-both",{fontCharacter:"\\ea99"}),d.arrowDown=new d("arrow-down",{fontCharacter:"\\ea9a"}),d.arrowLeft=new d("arrow-left",{fontCharacter:"\\ea9b"}),d.arrowRight=new d("arrow-right",{fontCharacter:"\\ea9c"}),d.arrowSmallDown=new d("arrow-small-down",{fontCharacter:"\\ea9d"}),d.arrowSmallLeft=new d("arrow-small-left",{fontCharacter:"\\ea9e"}),d.arrowSmallRight=new d("arrow-small-right",{fontCharacter:"\\ea9f"}),d.arrowSmallUp=new d("arrow-small-up",{fontCharacter:"\\eaa0"}),d.arrowUp=new d("arrow-up",{fontCharacter:"\\eaa1"}),d.bell=new d("bell",{fontCharacter:"\\eaa2"}),d.bold=new d("bold",{fontCharacter:"\\eaa3"}),d.book=new d("book",{fontCharacter:"\\eaa4"}),d.bookmark=new d("bookmark",{fontCharacter:"\\eaa5"}),d.debugBreakpointConditionalUnverified=new d("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),d.debugBreakpointConditional=new d("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),d.debugBreakpointConditionalDisabled=new d("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),d.debugBreakpointDataUnverified=new d("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),d.debugBreakpointData=new d("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),d.debugBreakpointDataDisabled=new d("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),d.debugBreakpointLogUnverified=new d("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),d.debugBreakpointLog=new d("debug-breakpoint-log",{fontCharacter:"\\eaab"}),d.debugBreakpointLogDisabled=new d("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),d.briefcase=new d("briefcase",{fontCharacter:"\\eaac"}),d.broadcast=new d("broadcast",{fontCharacter:"\\eaad"}),d.browser=new d("browser",{fontCharacter:"\\eaae"}),d.bug=new d("bug",{fontCharacter:"\\eaaf"}),d.calendar=new d("calendar",{fontCharacter:"\\eab0"}),d.caseSensitive=new d("case-sensitive",{fontCharacter:"\\eab1"}),d.check=new d("check",{fontCharacter:"\\eab2"}),d.checklist=new d("checklist",{fontCharacter:"\\eab3"}),d.chevronDown=new d("chevron-down",{fontCharacter:"\\eab4"}),d.chevronLeft=new d("chevron-left",{fontCharacter:"\\eab5"}),d.chevronRight=new d("chevron-right",{fontCharacter:"\\eab6"}),d.chevronUp=new d("chevron-up",{fontCharacter:"\\eab7"}),d.chromeClose=new d("chrome-close",{fontCharacter:"\\eab8"}),d.chromeMaximize=new d("chrome-maximize",{fontCharacter:"\\eab9"}),d.chromeMinimize=new d("chrome-minimize",{fontCharacter:"\\eaba"}),d.chromeRestore=new d("chrome-restore",{fontCharacter:"\\eabb"}),d.circleOutline=new d("circle-outline",{fontCharacter:"\\eabc"}),d.debugBreakpointUnverified=new d("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),d.circleSlash=new d("circle-slash",{fontCharacter:"\\eabd"}),d.circuitBoard=new d("circuit-board",{fontCharacter:"\\eabe"}),d.clearAll=new d("clear-all",{fontCharacter:"\\eabf"}),d.clippy=new d("clippy",{fontCharacter:"\\eac0"}),d.closeAll=new d("close-all",{fontCharacter:"\\eac1"}),d.cloudDownload=new d("cloud-download",{fontCharacter:"\\eac2"}),d.cloudUpload=new d("cloud-upload",{fontCharacter:"\\eac3"}),d.code=new d("code",{fontCharacter:"\\eac4"}),d.collapseAll=new d("collapse-all",{fontCharacter:"\\eac5"}),d.colorMode=new d("color-mode",{fontCharacter:"\\eac6"}),d.commentDiscussion=new d("comment-discussion",{fontCharacter:"\\eac7"}),d.compareChanges=new d("compare-changes",{fontCharacter:"\\eafd"}),d.creditCard=new d("credit-card",{fontCharacter:"\\eac9"}),d.dash=new d("dash",{fontCharacter:"\\eacc"}),d.dashboard=new d("dashboard",{fontCharacter:"\\eacd"}),d.database=new d("database",{fontCharacter:"\\eace"}),d.debugContinue=new d("debug-continue",{fontCharacter:"\\eacf"}),d.debugDisconnect=new d("debug-disconnect",{fontCharacter:"\\ead0"}),d.debugPause=new d("debug-pause",{fontCharacter:"\\ead1"}),d.debugRestart=new d("debug-restart",{fontCharacter:"\\ead2"}),d.debugStart=new d("debug-start",{fontCharacter:"\\ead3"}),d.debugStepInto=new d("debug-step-into",{fontCharacter:"\\ead4"}),d.debugStepOut=new d("debug-step-out",{fontCharacter:"\\ead5"}),d.debugStepOver=new d("debug-step-over",{fontCharacter:"\\ead6"}),d.debugStop=new d("debug-stop",{fontCharacter:"\\ead7"}),d.debug=new d("debug",{fontCharacter:"\\ead8"}),d.deviceCameraVideo=new d("device-camera-video",{fontCharacter:"\\ead9"}),d.deviceCamera=new d("device-camera",{fontCharacter:"\\eada"}),d.deviceMobile=new d("device-mobile",{fontCharacter:"\\eadb"}),d.diffAdded=new d("diff-added",{fontCharacter:"\\eadc"}),d.diffIgnored=new d("diff-ignored",{fontCharacter:"\\eadd"}),d.diffModified=new d("diff-modified",{fontCharacter:"\\eade"}),d.diffRemoved=new d("diff-removed",{fontCharacter:"\\eadf"}),d.diffRenamed=new d("diff-renamed",{fontCharacter:"\\eae0"}),d.diff=new d("diff",{fontCharacter:"\\eae1"}),d.discard=new d("discard",{fontCharacter:"\\eae2"}),d.editorLayout=new d("editor-layout",{fontCharacter:"\\eae3"}),d.emptyWindow=new d("empty-window",{fontCharacter:"\\eae4"}),d.exclude=new d("exclude",{fontCharacter:"\\eae5"}),d.extensions=new d("extensions",{fontCharacter:"\\eae6"}),d.eyeClosed=new d("eye-closed",{fontCharacter:"\\eae7"}),d.fileBinary=new d("file-binary",{fontCharacter:"\\eae8"}),d.fileCode=new d("file-code",{fontCharacter:"\\eae9"}),d.fileMedia=new d("file-media",{fontCharacter:"\\eaea"}),d.filePdf=new d("file-pdf",{fontCharacter:"\\eaeb"}),d.fileSubmodule=new d("file-submodule",{fontCharacter:"\\eaec"}),d.fileSymlinkDirectory=new d("file-symlink-directory",{fontCharacter:"\\eaed"}),d.fileSymlinkFile=new d("file-symlink-file",{fontCharacter:"\\eaee"}),d.fileZip=new d("file-zip",{fontCharacter:"\\eaef"}),d.files=new d("files",{fontCharacter:"\\eaf0"}),d.filter=new d("filter",{fontCharacter:"\\eaf1"}),d.flame=new d("flame",{fontCharacter:"\\eaf2"}),d.foldDown=new d("fold-down",{fontCharacter:"\\eaf3"}),d.foldUp=new d("fold-up",{fontCharacter:"\\eaf4"}),d.fold=new d("fold",{fontCharacter:"\\eaf5"}),d.folderActive=new d("folder-active",{fontCharacter:"\\eaf6"}),d.folderOpened=new d("folder-opened",{fontCharacter:"\\eaf7"}),d.gear=new d("gear",{fontCharacter:"\\eaf8"}),d.gift=new d("gift",{fontCharacter:"\\eaf9"}),d.gistSecret=new d("gist-secret",{fontCharacter:"\\eafa"}),d.gist=new d("gist",{fontCharacter:"\\eafb"}),d.gitCommit=new d("git-commit",{fontCharacter:"\\eafc"}),d.gitCompare=new d("git-compare",{fontCharacter:"\\eafd"}),d.gitMerge=new d("git-merge",{fontCharacter:"\\eafe"}),d.githubAction=new d("github-action",{fontCharacter:"\\eaff"}),d.githubAlt=new d("github-alt",{fontCharacter:"\\eb00"}),d.globe=new d("globe",{fontCharacter:"\\eb01"}),d.grabber=new d("grabber",{fontCharacter:"\\eb02"}),d.graph=new d("graph",{fontCharacter:"\\eb03"}),d.gripper=new d("gripper",{fontCharacter:"\\eb04"}),d.heart=new d("heart",{fontCharacter:"\\eb05"}),d.home=new d("home",{fontCharacter:"\\eb06"}),d.horizontalRule=new d("horizontal-rule",{fontCharacter:"\\eb07"}),d.hubot=new d("hubot",{fontCharacter:"\\eb08"}),d.inbox=new d("inbox",{fontCharacter:"\\eb09"}),d.issueClosed=new d("issue-closed",{fontCharacter:"\\eb0a"}),d.issueReopened=new d("issue-reopened",{fontCharacter:"\\eb0b"}),d.issues=new d("issues",{fontCharacter:"\\eb0c"}),d.italic=new d("italic",{fontCharacter:"\\eb0d"}),d.jersey=new d("jersey",{fontCharacter:"\\eb0e"}),d.json=new d("json",{fontCharacter:"\\eb0f"}),d.kebabVertical=new d("kebab-vertical",{fontCharacter:"\\eb10"}),d.key=new d("key",{fontCharacter:"\\eb11"}),d.law=new d("law",{fontCharacter:"\\eb12"}),d.lightbulbAutofix=new d("lightbulb-autofix",{fontCharacter:"\\eb13"}),d.linkExternal=new d("link-external",{fontCharacter:"\\eb14"}),d.link=new d("link",{fontCharacter:"\\eb15"}),d.listOrdered=new d("list-ordered",{fontCharacter:"\\eb16"}),d.listUnordered=new d("list-unordered",{fontCharacter:"\\eb17"}),d.liveShare=new d("live-share",{fontCharacter:"\\eb18"}),d.loading=new d("loading",{fontCharacter:"\\eb19"}),d.location=new d("location",{fontCharacter:"\\eb1a"}),d.mailRead=new d("mail-read",{fontCharacter:"\\eb1b"}),d.mail=new d("mail",{fontCharacter:"\\eb1c"}),d.markdown=new d("markdown",{fontCharacter:"\\eb1d"}),d.megaphone=new d("megaphone",{fontCharacter:"\\eb1e"}),d.mention=new d("mention",{fontCharacter:"\\eb1f"}),d.milestone=new d("milestone",{fontCharacter:"\\eb20"}),d.mortarBoard=new d("mortar-board",{fontCharacter:"\\eb21"}),d.move=new d("move",{fontCharacter:"\\eb22"}),d.multipleWindows=new d("multiple-windows",{fontCharacter:"\\eb23"}),d.mute=new d("mute",{fontCharacter:"\\eb24"}),d.noNewline=new d("no-newline",{fontCharacter:"\\eb25"}),d.note=new d("note",{fontCharacter:"\\eb26"}),d.octoface=new d("octoface",{fontCharacter:"\\eb27"}),d.openPreview=new d("open-preview",{fontCharacter:"\\eb28"}),d.package_=new d("package",{fontCharacter:"\\eb29"}),d.paintcan=new d("paintcan",{fontCharacter:"\\eb2a"}),d.pin=new d("pin",{fontCharacter:"\\eb2b"}),d.play=new d("play",{fontCharacter:"\\eb2c"}),d.run=new d("run",{fontCharacter:"\\eb2c"}),d.plug=new d("plug",{fontCharacter:"\\eb2d"}),d.preserveCase=new d("preserve-case",{fontCharacter:"\\eb2e"}),d.preview=new d("preview",{fontCharacter:"\\eb2f"}),d.project=new d("project",{fontCharacter:"\\eb30"}),d.pulse=new d("pulse",{fontCharacter:"\\eb31"}),d.question=new d("question",{fontCharacter:"\\eb32"}),d.quote=new d("quote",{fontCharacter:"\\eb33"}),d.radioTower=new d("radio-tower",{fontCharacter:"\\eb34"}),d.reactions=new d("reactions",{fontCharacter:"\\eb35"}),d.references=new d("references",{fontCharacter:"\\eb36"}),d.refresh=new d("refresh",{fontCharacter:"\\eb37"}),d.regex=new d("regex",{fontCharacter:"\\eb38"}),d.remoteExplorer=new d("remote-explorer",{fontCharacter:"\\eb39"}),d.remote=new d("remote",{fontCharacter:"\\eb3a"}),d.remove=new d("remove",{fontCharacter:"\\eb3b"}),d.replaceAll=new d("replace-all",{fontCharacter:"\\eb3c"}),d.replace=new d("replace",{fontCharacter:"\\eb3d"}),d.repoClone=new d("repo-clone",{fontCharacter:"\\eb3e"}),d.repoForcePush=new d("repo-force-push",{fontCharacter:"\\eb3f"}),d.repoPull=new d("repo-pull",{fontCharacter:"\\eb40"}),d.repoPush=new d("repo-push",{fontCharacter:"\\eb41"}),d.report=new d("report",{fontCharacter:"\\eb42"}),d.requestChanges=new d("request-changes",{fontCharacter:"\\eb43"}),d.rocket=new d("rocket",{fontCharacter:"\\eb44"}),d.rootFolderOpened=new d("root-folder-opened",{fontCharacter:"\\eb45"}),d.rootFolder=new d("root-folder",{fontCharacter:"\\eb46"}),d.rss=new d("rss",{fontCharacter:"\\eb47"}),d.ruby=new d("ruby",{fontCharacter:"\\eb48"}),d.saveAll=new d("save-all",{fontCharacter:"\\eb49"}),d.saveAs=new d("save-as",{fontCharacter:"\\eb4a"}),d.save=new d("save",{fontCharacter:"\\eb4b"}),d.screenFull=new d("screen-full",{fontCharacter:"\\eb4c"}),d.screenNormal=new d("screen-normal",{fontCharacter:"\\eb4d"}),d.searchStop=new d("search-stop",{fontCharacter:"\\eb4e"}),d.server=new d("server",{fontCharacter:"\\eb50"}),d.settingsGear=new d("settings-gear",{fontCharacter:"\\eb51"}),d.settings=new d("settings",{fontCharacter:"\\eb52"}),d.shield=new d("shield",{fontCharacter:"\\eb53"}),d.smiley=new d("smiley",{fontCharacter:"\\eb54"}),d.sortPrecedence=new d("sort-precedence",{fontCharacter:"\\eb55"}),d.splitHorizontal=new d("split-horizontal",{fontCharacter:"\\eb56"}),d.splitVertical=new d("split-vertical",{fontCharacter:"\\eb57"}),d.squirrel=new d("squirrel",{fontCharacter:"\\eb58"}),d.starFull=new d("star-full",{fontCharacter:"\\eb59"}),d.starHalf=new d("star-half",{fontCharacter:"\\eb5a"}),d.symbolClass=new d("symbol-class",{fontCharacter:"\\eb5b"}),d.symbolColor=new d("symbol-color",{fontCharacter:"\\eb5c"}),d.symbolConstant=new d("symbol-constant",{fontCharacter:"\\eb5d"}),d.symbolEnumMember=new d("symbol-enum-member",{fontCharacter:"\\eb5e"}),d.symbolField=new d("symbol-field",{fontCharacter:"\\eb5f"}),d.symbolFile=new d("symbol-file",{fontCharacter:"\\eb60"}),d.symbolInterface=new d("symbol-interface",{fontCharacter:"\\eb61"}),d.symbolKeyword=new d("symbol-keyword",{fontCharacter:"\\eb62"}),d.symbolMisc=new d("symbol-misc",{fontCharacter:"\\eb63"}),d.symbolOperator=new d("symbol-operator",{fontCharacter:"\\eb64"}),d.symbolProperty=new d("symbol-property",{fontCharacter:"\\eb65"}),d.wrench=new d("wrench",{fontCharacter:"\\eb65"}),d.wrenchSubaction=new d("wrench-subaction",{fontCharacter:"\\eb65"}),d.symbolSnippet=new d("symbol-snippet",{fontCharacter:"\\eb66"}),d.tasklist=new d("tasklist",{fontCharacter:"\\eb67"}),d.telescope=new d("telescope",{fontCharacter:"\\eb68"}),d.textSize=new d("text-size",{fontCharacter:"\\eb69"}),d.threeBars=new d("three-bars",{fontCharacter:"\\eb6a"}),d.thumbsdown=new d("thumbsdown",{fontCharacter:"\\eb6b"}),d.thumbsup=new d("thumbsup",{fontCharacter:"\\eb6c"}),d.tools=new d("tools",{fontCharacter:"\\eb6d"}),d.triangleDown=new d("triangle-down",{fontCharacter:"\\eb6e"}),d.triangleLeft=new d("triangle-left",{fontCharacter:"\\eb6f"}),d.triangleRight=new d("triangle-right",{fontCharacter:"\\eb70"}),d.triangleUp=new d("triangle-up",{fontCharacter:"\\eb71"}),d.twitter=new d("twitter",{fontCharacter:"\\eb72"}),d.unfold=new d("unfold",{fontCharacter:"\\eb73"}),d.unlock=new d("unlock",{fontCharacter:"\\eb74"}),d.unmute=new d("unmute",{fontCharacter:"\\eb75"}),d.unverified=new d("unverified",{fontCharacter:"\\eb76"}),d.verified=new d("verified",{fontCharacter:"\\eb77"}),d.versions=new d("versions",{fontCharacter:"\\eb78"}),d.vmActive=new d("vm-active",{fontCharacter:"\\eb79"}),d.vmOutline=new d("vm-outline",{fontCharacter:"\\eb7a"}),d.vmRunning=new d("vm-running",{fontCharacter:"\\eb7b"}),d.watch=new d("watch",{fontCharacter:"\\eb7c"}),d.whitespace=new d("whitespace",{fontCharacter:"\\eb7d"}),d.wholeWord=new d("whole-word",{fontCharacter:"\\eb7e"}),d.window=new d("window",{fontCharacter:"\\eb7f"}),d.wordWrap=new d("word-wrap",{fontCharacter:"\\eb80"}),d.zoomIn=new d("zoom-in",{fontCharacter:"\\eb81"}),d.zoomOut=new d("zoom-out",{fontCharacter:"\\eb82"}),d.listFilter=new d("list-filter",{fontCharacter:"\\eb83"}),d.listFlat=new d("list-flat",{fontCharacter:"\\eb84"}),d.listSelection=new d("list-selection",{fontCharacter:"\\eb85"}),d.selection=new d("selection",{fontCharacter:"\\eb85"}),d.listTree=new d("list-tree",{fontCharacter:"\\eb86"}),d.debugBreakpointFunctionUnverified=new d("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),d.debugBreakpointFunction=new d("debug-breakpoint-function",{fontCharacter:"\\eb88"}),d.debugBreakpointFunctionDisabled=new d("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),d.debugStackframeActive=new d("debug-stackframe-active",{fontCharacter:"\\eb89"}),d.debugStackframeDot=new d("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),d.debugStackframe=new d("debug-stackframe",{fontCharacter:"\\eb8b"}),d.debugStackframeFocused=new d("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),d.debugBreakpointUnsupported=new d("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),d.symbolString=new d("symbol-string",{fontCharacter:"\\eb8d"}),d.debugReverseContinue=new d("debug-reverse-continue",{fontCharacter:"\\eb8e"}),d.debugStepBack=new d("debug-step-back",{fontCharacter:"\\eb8f"}),d.debugRestartFrame=new d("debug-restart-frame",{fontCharacter:"\\eb90"}),d.callIncoming=new d("call-incoming",{fontCharacter:"\\eb92"}),d.callOutgoing=new d("call-outgoing",{fontCharacter:"\\eb93"}),d.menu=new d("menu",{fontCharacter:"\\eb94"}),d.expandAll=new d("expand-all",{fontCharacter:"\\eb95"}),d.feedback=new d("feedback",{fontCharacter:"\\eb96"}),d.groupByRefType=new d("group-by-ref-type",{fontCharacter:"\\eb97"}),d.ungroupByRefType=new d("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),d.account=new d("account",{fontCharacter:"\\eb99"}),d.bellDot=new d("bell-dot",{fontCharacter:"\\eb9a"}),d.debugConsole=new d("debug-console",{fontCharacter:"\\eb9b"}),d.library=new d("library",{fontCharacter:"\\eb9c"}),d.output=new d("output",{fontCharacter:"\\eb9d"}),d.runAll=new d("run-all",{fontCharacter:"\\eb9e"}),d.syncIgnored=new d("sync-ignored",{fontCharacter:"\\eb9f"}),d.pinned=new d("pinned",{fontCharacter:"\\eba0"}),d.githubInverted=new d("github-inverted",{fontCharacter:"\\eba1"}),d.debugAlt=new d("debug-alt",{fontCharacter:"\\eb91"}),d.serverProcess=new d("server-process",{fontCharacter:"\\eba2"}),d.serverEnvironment=new d("server-environment",{fontCharacter:"\\eba3"}),d.pass=new d("pass",{fontCharacter:"\\eba4"}),d.stopCircle=new d("stop-circle",{fontCharacter:"\\eba5"}),d.playCircle=new d("play-circle",{fontCharacter:"\\eba6"}),d.record=new d("record",{fontCharacter:"\\eba7"}),d.debugAltSmall=new d("debug-alt-small",{fontCharacter:"\\eba8"}),d.vmConnect=new d("vm-connect",{fontCharacter:"\\eba9"}),d.cloud=new d("cloud",{fontCharacter:"\\ebaa"}),d.merge=new d("merge",{fontCharacter:"\\ebab"}),d.exportIcon=new d("export",{fontCharacter:"\\ebac"}),d.graphLeft=new d("graph-left",{fontCharacter:"\\ebad"}),d.magnet=new d("magnet",{fontCharacter:"\\ebae"}),d.notebook=new d("notebook",{fontCharacter:"\\ebaf"}),d.redo=new d("redo",{fontCharacter:"\\ebb0"}),d.checkAll=new d("check-all",{fontCharacter:"\\ebb1"}),d.pinnedDirty=new d("pinned-dirty",{fontCharacter:"\\ebb2"}),d.passFilled=new d("pass-filled",{fontCharacter:"\\ebb3"}),d.circleLargeFilled=new d("circle-large-filled",{fontCharacter:"\\ebb4"}),d.circleLargeOutline=new d("circle-large-outline",{fontCharacter:"\\ebb5"}),d.combine=new d("combine",{fontCharacter:"\\ebb6"}),d.gather=new d("gather",{fontCharacter:"\\ebb6"}),d.table=new d("table",{fontCharacter:"\\ebb7"}),d.variableGroup=new d("variable-group",{fontCharacter:"\\ebb8"}),d.typeHierarchy=new d("type-hierarchy",{fontCharacter:"\\ebb9"}),d.typeHierarchySub=new d("type-hierarchy-sub",{fontCharacter:"\\ebba"}),d.typeHierarchySuper=new d("type-hierarchy-super",{fontCharacter:"\\ebbb"}),d.gitPullRequestCreate=new d("git-pull-request-create",{fontCharacter:"\\ebbc"}),d.runAbove=new d("run-above",{fontCharacter:"\\ebbd"}),d.runBelow=new d("run-below",{fontCharacter:"\\ebbe"}),d.notebookTemplate=new d("notebook-template",{fontCharacter:"\\ebbf"}),d.debugRerun=new d("debug-rerun",{fontCharacter:"\\ebc0"}),d.dropDownButton=new d("drop-down-button",d.chevronDown.definition)}(S=e.Codicon||(e.Codicon={}))}),define(Q[197],J([0,1,27]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.treeItemLoadingIcon=e.treeFilterClearIcon=e.treeFilterOnTypeOffIcon=e.treeFilterOnTypeOnIcon=e.treeItemExpandedIcon=void 0,e.treeItemExpandedIcon=b.registerCodicon("tree-item-expanded",b.Codicon.chevronDown),e.treeFilterOnTypeOnIcon=b.registerCodicon("tree-filter-on-type-on",b.Codicon.listFilter),e.treeFilterOnTypeOffIcon=b.registerCodicon("tree-filter-on-type-off",b.Codicon.listSelection),e.treeFilterClearIcon=b.registerCodicon("tree-filter-clear",b.Codicon.close),e.treeItemLoadingIcon=b.registerCodicon("tree-item-loading",b.Codicon.loading)}),define(Q[283],J([0,1,15]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.compareFileNames=void 0;const N=new b.IdleValue(()=>{const C=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:C,collatorIsNumeric:C.resolvedOptions().numeric}});function M(C,d,g=!1){const p=C||"",c=d||"",o=N.value.collator.compare(p,c);return N.value.collatorIsNumeric&&o===0&&p!==c?p<c?-1:1:o}e.compareFileNames=M;function w(C,d,g){const p=C.toLowerCase(),c=d.toLowerCase(),o=S(C,d,g);if(o)return o;const s=p.endsWith(g),a=c.endsWith(g);if(s!==a)return s?-1:1;const u=M(p,c);return u!==0?u:p.localeCompare(c)}e.compareAnything=w;function S(C,d,g){const p=C.toLowerCase(),c=d.toLowerCase(),o=p.startsWith(g),s=c.startsWith(g);if(o!==s)return o?-1:1;if(o&&s){if(p.length<c.length)return-1;if(p.length>c.length)return 1}return 0}e.compareByPrefix=S}),define(Q[121],J([0,1,6,2]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=void 0;class M{constructor(s,a,u,r,i,n){s=s|0,a=a|0,u=u|0,r=r|0,i=i|0,n=n|0,this.rawScrollLeft=u,this.rawScrollTop=n,s<0&&(s=0),u+s>a&&(u=a-s),u<0&&(u=0),r<0&&(r=0),n+r>i&&(n=i-r),n<0&&(n=0),this.width=s,this.scrollWidth=a,this.scrollLeft=u,this.height=r,this.scrollHeight=i,this.scrollTop=n}equals(s){return this.rawScrollLeft===s.rawScrollLeft&&this.rawScrollTop===s.rawScrollTop&&this.width===s.width&&this.scrollWidth===s.scrollWidth&&this.scrollLeft===s.scrollLeft&&this.height===s.height&&this.scrollHeight===s.scrollHeight&&this.scrollTop===s.scrollTop}withScrollDimensions(s,a){return new M(typeof s.width!="undefined"?s.width:this.width,typeof s.scrollWidth!="undefined"?s.scrollWidth:this.scrollWidth,a?this.rawScrollLeft:this.scrollLeft,typeof s.height!="undefined"?s.height:this.height,typeof s.scrollHeight!="undefined"?s.scrollHeight:this.scrollHeight,a?this.rawScrollTop:this.scrollTop)}withScrollPosition(s){return new M(this.width,this.scrollWidth,typeof s.scrollLeft!="undefined"?s.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof s.scrollTop!="undefined"?s.scrollTop:this.rawScrollTop)}createScrollEvent(s,a){const u=this.width!==s.width,r=this.scrollWidth!==s.scrollWidth,i=this.scrollLeft!==s.scrollLeft,n=this.height!==s.height,t=this.scrollHeight!==s.scrollHeight,l=this.scrollTop!==s.scrollTop;return{inSmoothScrolling:a,oldWidth:s.width,oldScrollWidth:s.scrollWidth,oldScrollLeft:s.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:s.height,oldScrollHeight:s.scrollHeight,oldScrollTop:s.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:u,scrollWidthChanged:r,scrollLeftChanged:i,heightChanged:n,scrollHeightChanged:t,scrollTopChanged:l}}}e.ScrollState=M;class w extends N.Disposable{constructor(s,a){super();this._onScroll=this._register(new b.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=s,this._scheduleAtNextAnimationFrame=a,this._state=new M(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(s){this._smoothScrollDuration=s}validateScrollPosition(s){return this._state.withScrollPosition(s)}getScrollDimensions(){return this._state}setScrollDimensions(s,a){const u=this._state.withScrollDimensions(s,a);this._setState(u,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(s){const a=this._state.withScrollPosition(s);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(a,!1)}setScrollPositionSmooth(s,a){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(s);if(this._smoothScrolling){s={scrollLeft:typeof s.scrollLeft=="undefined"?this._smoothScrolling.to.scrollLeft:s.scrollLeft,scrollTop:typeof s.scrollTop=="undefined"?this._smoothScrolling.to.scrollTop:s.scrollTop};const u=this._state.withScrollPosition(s);if(this._smoothScrolling.to.scrollLeft===u.scrollLeft&&this._smoothScrolling.to.scrollTop===u.scrollTop)return;let r;a?r=new g(this._smoothScrolling.from,u,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,u,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{const u=this._state.withScrollPosition(s);this._smoothScrolling=g.start(this._state,u,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!!this._smoothScrolling){const s=this._smoothScrolling.tick(),a=this._state.withScrollPosition(s);if(this._setState(a,!0),!!this._smoothScrolling){if(s.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}}_setState(s,a){const u=this._state;u.equals(s)||(this._state=s,this._onScroll.fire(this._state.createScrollEvent(u,a)))}}e.Scrollable=w;class S{constructor(s,a,u){this.scrollLeft=s,this.scrollTop=a,this.isDone=u}}e.SmoothScrollingUpdate=S;function C(o,s){const a=s-o;return function(u){return o+a*c(u)}}function d(o,s,a){return function(u){return u<a?o(u/a):s((u-a)/(1-a))}}class g{constructor(s,a,u,r){this.from=s,this.to=a,this.duration=r,this.startTime=u,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){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)}_initAnimation(s,a,u){if(Math.abs(s-a)>2.5*u){let i,n;return s<a?(i=s+.75*u,n=a-.75*u):(i=s-.75*u,n=a+.75*u),d(C(s,i),C(n,a),.33)}return C(s,a)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(s){this.to=s.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(s){const a=(s-this.startTime)/this.duration;if(a<1){const u=this.scrollLeft(a),r=this.scrollTop(a);return new S(u,r,!1)}return new S(this.to.scrollLeft,this.to.scrollTop,!0)}combine(s,a,u){return g.start(s,a,u)}static start(s,a,u){u=u+10;const r=Date.now()-10;return new g(s,a,r,u)}}e.SmoothScrollingOperation=g;function p(o){return Math.pow(o,3)}function c(o){return 1-p(1-o)}}),define(Q[8],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.breakBetweenGraphemeBreakType=e.getGraphemeBreakType=e.singleLetterHash=e.containsUppercaseCharacter=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsEmoji=e.containsRTL=e.decodeUTF8=e.prevCharLength=e.nextCharLength=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpFlags=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.escapeRegExpCharacters=e.escape=e.format=e.isFalsyOrWhitespace=void 0;function b(G){return!G||typeof G!="string"?!0:G.trim().length===0}e.isFalsyOrWhitespace=b;const N=/{(\d+)}/g;function M(G,...j){return j.length===0?G:G.replace(N,function(te,Z){const ue=parseInt(Z,10);return isNaN(ue)||ue<0||ue>=j.length?te:j[ue]})}e.format=M;function w(G){return G.replace(/[<>&]/g,function(j){switch(j){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return j}})}e.escape=w;function S(G){return G.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=S;function C(G,j=" "){const te=d(G,j);return g(te,j)}e.trim=C;function d(G,j){if(!G||!j)return G;const te=j.length;if(te===0||G.length===0)return G;let Z=0;for(;G.indexOf(j,Z)===Z;)Z=Z+te;return G.substring(Z)}e.ltrim=d;function g(G,j){if(!G||!j)return G;const te=j.length,Z=G.length;if(te===0||Z===0)return G;let ue=Z,he=-1;for(;he=G.lastIndexOf(j,ue-1),!(he===-1||he+te!==ue);){if(he===0)return"";ue=he}return G.substring(0,ue)}e.rtrim=g;function p(G){return G.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=p;function c(G){return G.replace(/\*/g,"")}e.stripWildcards=c;function o(G,j,te={}){if(!G)throw new Error("Cannot create regex from empty string");j||(G=S(G)),te.wholeWord&&(/\B/.test(G.charAt(0))||(G="\\b"+G),/\B/.test(G.charAt(G.length-1))||(G=G+"\\b"));let Z="";return te.global&&(Z+="g"),te.matchCase||(Z+="i"),te.multiline&&(Z+="m"),te.unicode&&(Z+="u"),new RegExp(G,Z)}e.createRegExp=o;function s(G){return G.source==="^"||G.source==="^$"||G.source==="$"||G.source==="^\\s*$"?!1:!!(G.exec("")&&G.lastIndex===0)}e.regExpLeadsToEndlessLoop=s;function a(G){return(G.global?"g":"")+(G.ignoreCase?"i":"")+(G.multiline?"m":"")+(G.unicode?"u":"")}e.regExpFlags=a;function u(G){return G.split(/\r\n|\r|\n/)}e.splitLines=u;function r(G){for(let j=0,te=G.length;j<te;j++){const Z=G.charCodeAt(j);if(Z!==32&&Z!==9)return j}return-1}e.firstNonWhitespaceIndex=r;function i(G,j=0,te=G.length){for(let Z=j;Z<te;Z++){const ue=G.charCodeAt(Z);if(ue!==32&&ue!==9)return G.substring(j,Z)}return G.substring(j,te)}e.getLeadingWhitespace=i;function n(G,j=G.length-1){for(let te=j;te>=0;te--){const Z=G.charCodeAt(te);if(Z!==32&&Z!==9)return te}return-1}e.lastNonWhitespaceIndex=n;function t(G,j){return G<j?-1:G>j?1:0}e.compare=t;function l(G,j,te=0,Z=G.length,ue=0,he=j.length){for(;te<Z&&ue<he;te++,ue++){let me=G.charCodeAt(te),Ce=j.charCodeAt(ue);if(me<Ce)return-1;if(me>Ce)return 1}const re=Z-te,ce=he-ue;return re<ce?-1:re>ce?1:0}e.compareSubstring=l;function h(G,j){return m(G,j,0,G.length,0,j.length)}e.compareIgnoreCase=h;function m(G,j,te=0,Z=G.length,ue=0,he=j.length){for(;te<Z&&ue<he;te++,ue++){let me=G.charCodeAt(te),Ce=j.charCodeAt(ue);if(me!==Ce){const be=me-Ce;if(!(be===32&&f(Ce))&&!(be===-32&&f(me)))return _(me)&&_(Ce)?be:l(G.toLowerCase(),j.toLowerCase(),te,Z,ue,he)}}const re=Z-te,ce=he-ue;return re<ce?-1:re>ce?1:0}e.compareSubstringIgnoreCase=m;function _(G){return G>=97&&G<=122}e.isLowerAsciiLetter=_;function f(G){return G>=65&&G<=90}e.isUpperAsciiLetter=f;function v(G){return _(G)||f(G)}function y(G,j){return G.length===j.length&&L(G,j)}e.equalsIgnoreCase=y;function L(G,j,te=G.length){for(let Z=0;Z<te;Z++){const ue=G.charCodeAt(Z),he=j.charCodeAt(Z);if(ue!==he){if(v(ue)&&v(he)){const re=Math.abs(ue-he);if(re!==0&&re!==32)return!1}else if(String.fromCharCode(ue).toLowerCase()!==String.fromCharCode(he).toLowerCase())return!1}}return!0}function I(G,j){const te=j.length;return j.length>G.length?!1:L(G,j,te)}e.startsWithIgnoreCase=I;function k(G,j){let te,Z=Math.min(G.length,j.length);for(te=0;te<Z;te++)if(G.charCodeAt(te)!==j.charCodeAt(te))return te;return Z}e.commonPrefixLength=k;function E(G,j){let te,Z=Math.min(G.length,j.length);const ue=G.length-1,he=j.length-1;for(te=0;te<Z;te++)if(G.charCodeAt(ue-te)!==j.charCodeAt(he-te))return te;return Z}e.commonSuffixLength=E;function T(G){return 55296<=G&&G<=56319}e.isHighSurrogate=T;function O(G){return 56320<=G&&G<=57343}e.isLowSurrogate=O;function A(G,j){return(G-55296<<10)+(j-56320)+65536}e.computeCodePoint=A;function B(G,j,te){const Z=G.charCodeAt(te);if(T(Z)&&te+1<j){const ue=G.charCodeAt(te+1);if(O(ue))return A(Z,ue)}return Z}e.getNextCodePoint=B;function F(G,j){const te=G.charCodeAt(j-1);if(O(te)&&j>1){const Z=G.charCodeAt(j-2);if(T(Z))return A(Z,te)}return te}function D(G,j){const te=oe.getInstance(),Z=j,ue=G.length,he=B(G,ue,j);j+=he>=65536?2:1;let re=te.getGraphemeBreakType(he);for(;j<ue;){const ce=B(G,ue,j),me=te.getGraphemeBreakType(ce);if(ie(re,me))break;j+=ce>=65536?2:1,re=me}return j-Z}e.nextCharLength=D;function R(G,j){const te=oe.getInstance(),Z=j,ue=F(G,j);j-=ue>=65536?2:1;let he=te.getGraphemeBreakType(ue);for(;j>0;){const re=F(G,j),ce=te.getGraphemeBreakType(re);if(ie(ce,he))break;j-=re>=65536?2:1,he=ce}return Z-j}e.prevCharLength=R;function W(G){const j=G.byteLength,te=[];let Z=0;for(;Z<j;){const ue=G[Z];let he;if(ue>=240&&Z+3<j?he=(G[Z++]&7)<<18>>>0|(G[Z++]&63)<<12>>>0|(G[Z++]&63)<<6>>>0|(G[Z++]&63)<<0>>>0:ue>=224&&Z+2<j?he=(G[Z++]&15)<<12>>>0|(G[Z++]&63)<<6>>>0|(G[Z++]&63)<<0>>>0:ue>=192&&Z+1<j?he=(G[Z++]&31)<<6>>>0|(G[Z++]&63)<<0>>>0:he=G[Z++],he>=0&&he<=55295||he>=57344&&he<=65535)te.push(String.fromCharCode(he));else if(he>=65536&&he<=1114111){const re=he-65536,ce=55296+((re&1047552)>>>10),me=56320+((re&1023)>>>0);te.push(String.fromCharCode(ce)),te.push(String.fromCharCode(me))}else te.push(String.fromCharCode(65533))}return te.join("")}e.decodeUTF8=W;const x=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function K(G){return x.test(G)}e.containsRTL=K;const Y=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function ee(G){return Y.test(G)}e.containsEmoji=ee;const se=/^[\t\n\r\x20-\x7E]*$/;function ne(G){return se.test(G)}e.isBasicASCII=ne,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function le(G){return e.UNUSUAL_LINE_TERMINATORS.test(G)}e.containsUnusualLineTerminators=le;function X(G){for(let j=0,te=G.length;j<te;j++)if(z(G.charCodeAt(j)))return!0;return!1}e.containsFullWidthCharacter=X;function z(G){return G=+G,G>=11904&&G<=55215||G>=63744&&G<=64255||G>=65281&&G<=65374}e.isFullWidthCharacter=z;function P(G){return G>=127462&&G<=127487||G===8986||G===8987||G===9200||G===9203||G>=9728&&G<=10175||G===11088||G===11093||G>=127744&&G<=128591||G>=128640&&G<=128764||G>=128992&&G<=129003||G>=129280&&G<=129535||G>=129648&&G<=129750}e.isEmojiImprecise=P,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function V(G){return!!(G&&G.length>0&&G.charCodeAt(0)===65279)}e.startsWithUTF8BOM=V;function U(G,j=!1){return G?(j&&(G=G.replace(/\\./g,"")),G.toLowerCase()!==G):!1}e.containsUppercaseCharacter=U;function H(G){const j=90-65+1;return G=G%(2*j),G<j?String.fromCharCode(97+G):String.fromCharCode(65+G-j)}e.singleLetterHash=H;function $(G){return oe.getInstance().getGraphemeBreakType(G)}e.getGraphemeBreakType=$;function ie(G,j){return G===0?j!==5&&j!==7:G===2&&j===3?!1:G===4||G===2||G===3||j===4||j===2||j===3?!0:!(G===8&&(j===8||j===9||j===11||j===12)||(G===11||G===9)&&(j===9||j===10)||(G===12||G===10)&&j===10||j===5||j===13||j===7||G===1||G===13&&j===14||G===6&&j===6)}e.breakBetweenGraphemeBreakType=ie;class oe{constructor(){this._data=ae()}static getInstance(){return oe._INSTANCE||(oe._INSTANCE=new oe),oe._INSTANCE}getGraphemeBreakType(j){if(j<32)return j===10?3:j===13?2:4;if(j<127)return 0;const te=this._data,Z=te.length/3;let ue=1;for(;ue<=Z;)if(j<te[3*ue])ue=2*ue;else if(j>te[3*ue+1])ue=2*ue+1;else return te[3*ue+2];return 0}}oe._INSTANCE=null;function ae(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}}),define(Q[101],J([0,1,8]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.writeUInt8=e.readUInt8=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.VSBuffer=void 0;const N=typeof Buffer!="undefined",M=typeof TextDecoder!="undefined";let w;class S{constructor(a){this.buffer=a,this.byteLength=this.buffer.byteLength}static wrap(a){return N&&!Buffer.isBuffer(a)&&(a=Buffer.from(a.buffer,a.byteOffset,a.byteLength)),new S(a)}toString(){return N?this.buffer.toString():M?(w||(w=new TextDecoder),w.decode(this.buffer)):b.decodeUTF8(this.buffer)}}e.VSBuffer=S;function C(s,a){return s[a+0]<<0>>>0|s[a+1]<<8>>>0}e.readUInt16LE=C;function d(s,a,u){s[u+0]=a&255,a=a>>>8,s[u+1]=a&255}e.writeUInt16LE=d;function g(s,a){return s[a]*Math.pow(2,24)+s[a+1]*Math.pow(2,16)+s[a+2]*Math.pow(2,8)+s[a+3]}e.readUInt32BE=g;function p(s,a,u){s[u+3]=a,a=a>>>8,s[u+2]=a,a=a>>>8,s[u+1]=a,a=a>>>8,s[u]=a}e.writeUInt32BE=p;function c(s,a){return s[a]}e.readUInt8=c;function o(s,a,u){s[u]=a}e.writeUInt8=o}),define(Q[152],J([0,1,17,8,72]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasDriveLetter=e.isRootOrDriveLetter=e.isWindowsDriveLetter=e.isEqualOrParent=e.toSlashes=void 0;function w(p){return p.replace(/[\\/]/g,M.posix.sep)}e.toSlashes=w;function S(p,c,o,s=M.sep){if(p===c)return!0;if(!p||!c||c.length>p.length)return!1;if(o){if(!N.startsWithIgnoreCase(p,c))return!1;if(c.length===p.length)return!0;let u=c.length;return c.charAt(c.length-1)===s&&u--,p.charAt(u)===s}return c.charAt(c.length-1)!==s&&(c+=s),p.indexOf(c)===0}e.isEqualOrParent=S;function C(p){return p>=65&&p<=90||p>=97&&p<=122}e.isWindowsDriveLetter=C;function d(p){const c=M.normalize(p);return b.isWindows?p.length>3?!1:g(c)&&(p.length===2||c.charCodeAt(2)===92):c===M.posix.sep}e.isRootOrDriveLetter=d;function g(p){return b.isWindows?C(p.charCodeAt(0))&&p.charCodeAt(1)===58:!1}e.hasDriveLetter=g}),define(Q[89],J([0,1,8]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.stringHash=e.doHash=e.hash=void 0;function N(u){return M(u,0)}e.hash=N;function M(u,r){switch(typeof u){case"object":return u===null?w(349,r):Array.isArray(u)?d(u,r):g(u,r);case"string":return C(u,r);case"boolean":return S(u,r);case"number":return w(u,r);case"undefined":return w(937,r);default:return w(617,r)}}e.doHash=M;function w(u,r){return(r<<5)-r+u|0}function S(u,r){return w(u?433:863,r)}function C(u,r){r=w(149417,r);for(let i=0,n=u.length;i<n;i++)r=w(u.charCodeAt(i),r);return r}e.stringHash=C;function d(u,r){return r=w(104579,r),u.reduce((i,n)=>M(n,i),r)}function g(u,r){return r=w(181387,r),Object.keys(u).sort().reduce((i,n)=>(i=C(n,i),M(u[n],i)),r)}function p(u,r,i=32){const n=i-r,t=~((1<<n)-1);return(u<<r|(t&u)>>>n)>>>0}function c(u,r=0,i=u.byteLength,n=0){for(let t=0;t<i;t++)u[r+t]=n}function o(u,r,i="0"){for(;u.length<r;)u=i+u;return u}function s(u,r=32){return u instanceof ArrayBuffer?Array.from(new Uint8Array(u)).map(i=>i.toString(16).padStart(2,"0")).join(""):o((u>>>0).toString(16),r/4)}e.toHexString=s;class a{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(r){const i=r.length;if(i!==0){const n=this._buff;let t=this._buffLen,l=this._leftoverHighSurrogate,h,m;for(l!==0?(h=l,m=-1,l=0):(h=r.charCodeAt(0),m=0);;){let _=h;if(b.isHighSurrogate(h))if(m+1<i){const f=r.charCodeAt(m+1);b.isLowSurrogate(f)?(m++,_=b.computeCodePoint(h,f)):_=65533}else{l=h;break}else b.isLowSurrogate(h)&&(_=65533);if(t=this._push(n,t,_),m++,m<i)h=r.charCodeAt(m);else break}this._buffLen=t,this._leftoverHighSurrogate=l}}_push(r,i,n){return n<128?r[i++]=n:n<2048?(r[i++]=192|(n&1984)>>>6,r[i++]=128|(n&63)>>>0):n<65536?(r[i++]=224|(n&61440)>>>12,r[i++]=128|(n&4032)>>>6,r[i++]=128|(n&63)>>>0):(r[i++]=240|(n&1835008)>>>18,r[i++]=128|(n&258048)>>>12,r[i++]=128|(n&4032)>>>6,r[i++]=128|(n&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,r[0]=r[64+0],r[1]=r[64+1],r[2]=r[64+2]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),s(this._h0)+s(this._h1)+s(this._h2)+s(this._h3)+s(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const r=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(r/4294967296),!1),this._buffDV.setUint32(60,r%4294967296,!1),this._step()}_step(){const r=a._bigBlock32,i=this._buffDV;for(let y=0;y<64;y+=4)r.setUint32(y,i.getUint32(y,!1),!1);for(let y=64;y<320;y+=4)r.setUint32(y,p(r.getUint32(y-12,!1)^r.getUint32(y-32,!1)^r.getUint32(y-56,!1)^r.getUint32(y-64,!1),1),!1);let n=this._h0,t=this._h1,l=this._h2,h=this._h3,m=this._h4,_,f,v;for(let y=0;y<80;y++)y<20?(_=t&l|~t&h,f=1518500249):y<40?(_=t^l^h,f=1859775393):y<60?(_=t&l|t&h|l&h,f=2400959708):(_=t^l^h,f=3395469782),v=p(n,5)+_+m+f+r.getUint32(y*4,!1)&4294967295,m=h,h=l,l=p(t,30),t=n,n=v;this._h0=this._h0+n&4294967295,this._h1=this._h1+t&4294967295,this._h2=this._h2+l&4294967295,this._h3=this._h3+h&4294967295,this._h4=this._h4+m&4294967295}}e.StringSHA1=a,a._bigBlock32=new DataView(new ArrayBuffer(320))}),define(Q[153],J([0,1,277,89]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.MyArray=e.Debug=e.stringDiff=e.StringDiffSequence=void 0;class M{constructor(c){this.source=c}getElements(){const c=this.source,o=new Int32Array(c.length);for(let s=0,a=c.length;s<a;s++)o[s]=c.charCodeAt(s);return o}}e.StringDiffSequence=M;function w(p,c,o){return new g(new M(p),new M(c)).ComputeDiff(o).changes}e.stringDiff=w;class S{static Assert(c,o){if(!c)throw new Error(o)}}e.Debug=S;class C{static Copy(c,o,s,a,u){for(let r=0;r<u;r++)s[a+r]=c[o+r]}static Copy2(c,o,s,a,u){for(let r=0;r<u;r++)s[a+r]=c[o+r]}}e.MyArray=C;class d{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new b.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(c,o){this.m_originalStart=Math.min(this.m_originalStart,c),this.m_modifiedStart=Math.min(this.m_modifiedStart,o),this.m_originalCount++}AddModifiedElement(c,o){this.m_originalStart=Math.min(this.m_originalStart,c),this.m_modifiedStart=Math.min(this.m_modifiedStart,o),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class g{constructor(c,o,s=null){this.ContinueProcessingPredicate=s;const[a,u,r]=g._getElements(c),[i,n,t]=g._getElements(o);this._hasStrings=r&&t,this._originalStringElements=a,this._originalElementsOrHash=u,this._modifiedStringElements=i,this._modifiedElementsOrHash=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(c){return c.length>0&&typeof c[0]=="string"}static _getElements(c){const o=c.getElements();if(g._isStringArray(o)){const s=new Int32Array(o.length);for(let a=0,u=o.length;a<u;a++)s[a]=N.stringHash(o[a],0);return[o,s,!0]}return o instanceof Int32Array?[[],o,!1]:[[],new Int32Array(o),!1]}ElementsAreEqual(c,o){return this._originalElementsOrHash[c]!==this._modifiedElementsOrHash[o]?!1:this._hasStrings?this._originalStringElements[c]===this._modifiedStringElements[o]:!0}OriginalElementsAreEqual(c,o){return this._originalElementsOrHash[c]!==this._originalElementsOrHash[o]?!1:this._hasStrings?this._originalStringElements[c]===this._originalStringElements[o]:!0}ModifiedElementsAreEqual(c,o){return this._modifiedElementsOrHash[c]!==this._modifiedElementsOrHash[o]?!1:this._hasStrings?this._modifiedStringElements[c]===this._modifiedStringElements[o]:!0}ComputeDiff(c){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,c)}_ComputeDiff(c,o,s,a,u){const r=[!1];let i=this.ComputeDiffRecursive(c,o,s,a,r);return u&&(i=this.PrettifyChanges(i)),{quitEarly:r[0],changes:i}}ComputeDiffRecursive(c,o,s,a,u){for(u[0]=!1;c<=o&&s<=a&&this.ElementsAreEqual(c,s);)c++,s++;for(;o>=c&&a>=s&&this.ElementsAreEqual(o,a);)o--,a--;if(c>o||s>a){let h;return s<=a?(S.Assert(c===o+1,"originalStart should only be one more than originalEnd"),h=[new b.DiffChange(c,0,s,a-s+1)]):c<=o?(S.Assert(s===a+1,"modifiedStart should only be one more than modifiedEnd"),h=[new b.DiffChange(c,o-c+1,s,0)]):(S.Assert(c===o+1,"originalStart should only be one more than originalEnd"),S.Assert(s===a+1,"modifiedStart should only be one more than modifiedEnd"),h=[]),h}const r=[0],i=[0],n=this.ComputeRecursionPoint(c,o,s,a,r,i,u),t=r[0],l=i[0];if(n!==null)return n;if(!u[0]){const h=this.ComputeDiffRecursive(c,t,s,l,u);let m=[];return u[0]?m=[new b.DiffChange(t+1,o-(t+1)+1,l+1,a-(l+1)+1)]:m=this.ComputeDiffRecursive(t+1,o,l+1,a,u),this.ConcatenateChanges(h,m)}return[new b.DiffChange(c,o-c+1,s,a-s+1)]}WALKTRACE(c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I){let k=null,E=null,T=new d,O=o,A=s,B=_[0]-y[0]-a,F=-1073741824,D=this.m_forwardHistory.length-1;do{const R=B+c;R===O||R<A&&t[R-1]<t[R+1]?(h=t[R+1],f=h-B-a,h<F&&T.MarkNextChange(),F=h,T.AddModifiedElement(h+1,f),B=R+1-c):(h=t[R-1]+1,f=h-B-a,h<F&&T.MarkNextChange(),F=h-1,T.AddOriginalElement(h,f+1),B=R-1-c),D>=0&&(t=this.m_forwardHistory[D],c=t[0],O=1,A=t.length-1)}while(--D>=-1);if(k=T.getReverseChanges(),I[0]){let R=_[0]+1,W=y[0]+1;if(k!==null&&k.length>0){const x=k[k.length-1];R=Math.max(R,x.getOriginalEnd()),W=Math.max(W,x.getModifiedEnd())}E=[new b.DiffChange(R,m-R+1,W,v-W+1)]}else{T=new d,O=r,A=i,B=_[0]-y[0]-n,F=1073741824,D=L?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=B+u;R===O||R<A&&l[R-1]>=l[R+1]?(h=l[R+1]-1,f=h-B-n,h>F&&T.MarkNextChange(),F=h+1,T.AddOriginalElement(h+1,f+1),B=R+1-u):(h=l[R-1],f=h-B-n,h>F&&T.MarkNextChange(),F=h,T.AddModifiedElement(h+1,f+1),B=R-1-u),D>=0&&(l=this.m_reverseHistory[D],u=l[0],O=1,A=l.length-1)}while(--D>=-1);E=T.getChanges()}return this.ConcatenateChanges(k,E)}ComputeRecursionPoint(c,o,s,a,u,r,i){let n=0,t=0,l=0,h=0,m=0,_=0;c--,s--,u[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=o-c+(a-s),v=f+1,y=new Int32Array(v),L=new Int32Array(v),I=a-s,k=o-c,E=c-s,T=o-a,A=(k-I)%2==0;y[I]=c,L[k]=o,i[0]=!1;for(let B=1;B<=f/2+1;B++){let F=0,D=0;l=this.ClipDiagonalBound(I-B,B,I,v),h=this.ClipDiagonalBound(I+B,B,I,v);for(let W=l;W<=h;W+=2){W===l||W<h&&y[W-1]<y[W+1]?n=y[W+1]:n=y[W-1]+1,t=n-(W-I)-E;const x=n;for(;n<o&&t<a&&this.ElementsAreEqual(n+1,t+1);)n++,t++;if(y[W]=n,n+t>F+D&&(F=n,D=t),!A&&Math.abs(W-k)<=B-1&&n>=L[W])return u[0]=n,r[0]=t,x<=L[W]&&1447>0&&B<=1447+1?this.WALKTRACE(I,l,h,E,k,m,_,T,y,L,n,o,u,t,a,r,A,i):null}const R=(F-c+(D-s)-B)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(F,R))return i[0]=!0,u[0]=F,r[0]=D,R>0&&1447>0&&B<=1447+1?this.WALKTRACE(I,l,h,E,k,m,_,T,y,L,n,o,u,t,a,r,A,i):(c++,s++,[new b.DiffChange(c,o-c+1,s,a-s+1)]);m=this.ClipDiagonalBound(k-B,B,k,v),_=this.ClipDiagonalBound(k+B,B,k,v);for(let W=m;W<=_;W+=2){W===m||W<_&&L[W-1]>=L[W+1]?n=L[W+1]-1:n=L[W-1],t=n-(W-k)-T;const x=n;for(;n>c&&t>s&&this.ElementsAreEqual(n,t);)n--,t--;if(L[W]=n,A&&Math.abs(W-I)<=B&&n<=y[W])return u[0]=n,r[0]=t,x>=y[W]&&1447>0&&B<=1447+1?this.WALKTRACE(I,l,h,E,k,m,_,T,y,L,n,o,u,t,a,r,A,i):null}if(B<=1447){let W=new Int32Array(h-l+2);W[0]=I-l+1,C.Copy2(y,l,W,1,h-l+1),this.m_forwardHistory.push(W),W=new Int32Array(_-m+2),W[0]=k-m+1,C.Copy2(L,m,W,1,_-m+1),this.m_reverseHistory.push(W)}}return this.WALKTRACE(I,l,h,E,k,m,_,T,y,L,n,o,u,t,a,r,A,i)}PrettifyChanges(c){for(let o=0;o<c.length;o++){const s=c[o],a=o<c.length-1?c[o+1].originalStart:this._originalElementsOrHash.length,u=o<c.length-1?c[o+1].modifiedStart:this._modifiedElementsOrHash.length,r=s.originalLength>0,i=s.modifiedLength>0;for(;s.originalStart+s.originalLength<a&&s.modifiedStart+s.modifiedLength<u&&(!r||this.OriginalElementsAreEqual(s.originalStart,s.originalStart+s.originalLength))&&(!i||this.ModifiedElementsAreEqual(s.modifiedStart,s.modifiedStart+s.modifiedLength));)s.originalStart++,s.modifiedStart++;let n=[null];if(o<c.length-1&&this.ChangesOverlap(c[o],c[o+1],n)){c[o]=n[0],c.splice(o+1,1),o--;continue}}for(let o=c.length-1;o>=0;o--){const s=c[o];let a=0,u=0;if(o>0){const l=c[o-1];l.originalLength>0&&(a=l.originalStart+l.originalLength),l.modifiedLength>0&&(u=l.modifiedStart+l.modifiedLength)}const r=s.originalLength>0,i=s.modifiedLength>0;let n=0,t=this._boundaryScore(s.originalStart,s.originalLength,s.modifiedStart,s.modifiedLength);for(let l=1;;l++){const h=s.originalStart-l,m=s.modifiedStart-l;if(h<a||m<u||r&&!this.OriginalElementsAreEqual(h,h+s.originalLength)||i&&!this.ModifiedElementsAreEqual(m,m+s.modifiedLength))break;const _=this._boundaryScore(h,s.originalLength,m,s.modifiedLength);_>t&&(t=_,n=l)}s.originalStart-=n,s.modifiedStart-=n}if(this._hasStrings)for(let o=1,s=c.length;o<s;o++){const a=c[o-1],u=c[o],r=u.originalStart-a.originalStart-a.originalLength,i=a.originalStart,n=u.originalStart+u.originalLength,t=n-i,l=a.modifiedStart,h=u.modifiedStart+u.modifiedLength,m=h-l;if(r<5&&t<20&&m<20){const _=this._findBetterContiguousSequence(i,t,l,m,r);if(_){const[f,v]=_;(f!==a.originalStart+a.originalLength||v!==a.modifiedStart+a.modifiedLength)&&(a.originalLength=f-a.originalStart,a.modifiedLength=v-a.modifiedStart,u.originalStart=f+r,u.modifiedStart=v+r,u.originalLength=n-u.originalStart,u.modifiedLength=h-u.modifiedStart)}}}return c}_findBetterContiguousSequence(c,o,s,a,u){if(o<u||a<u)return null;const r=c+o-u+1,i=s+a-u+1;let n=0,t=0,l=0;for(let h=c;h<r;h++)for(let m=s;m<i;m++){const _=this._contiguousSequenceScore(h,m,u);_>0&&_>n&&(n=_,t=h,l=m)}return n>0?[t,l]:null}_contiguousSequenceScore(c,o,s){let a=0;for(let u=0;u<s;u++){if(!this.ElementsAreEqual(c+u,o+u))return 0;a+=this._originalStringElements[c+u].length}return a}_OriginalIsBoundary(c){return c<=0||c>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[c])}_OriginalRegionIsBoundary(c,o){if(this._OriginalIsBoundary(c)||this._OriginalIsBoundary(c-1))return!0;if(o>0){const s=c+o;if(this._OriginalIsBoundary(s-1)||this._OriginalIsBoundary(s))return!0}return!1}_ModifiedIsBoundary(c){return c<=0||c>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[c])}_ModifiedRegionIsBoundary(c,o){if(this._ModifiedIsBoundary(c)||this._ModifiedIsBoundary(c-1))return!0;if(o>0){const s=c+o;if(this._ModifiedIsBoundary(s-1)||this._ModifiedIsBoundary(s))return!0}return!1}_boundaryScore(c,o,s,a){const u=this._OriginalRegionIsBoundary(c,o)?1:0,r=this._ModifiedRegionIsBoundary(s,a)?1:0;return u+r}ConcatenateChanges(c,o){let s=[];if(c.length===0||o.length===0)return o.length>0?o:c;if(this.ChangesOverlap(c[c.length-1],o[0],s)){const a=new Array(c.length+o.length-1);return C.Copy(c,0,a,0,c.length-1),a[c.length-1]=s[0],C.Copy(o,1,a,c.length,o.length-1),a}else{const a=new Array(c.length+o.length);return C.Copy(c,0,a,0,c.length),C.Copy(o,0,a,c.length,o.length),a}}ChangesOverlap(c,o,s){if(S.Assert(c.originalStart<=o.originalStart,"Left change is not less than or equal to right change"),S.Assert(c.modifiedStart<=o.modifiedStart,"Left change is not less than or equal to right change"),c.originalStart+c.originalLength>=o.originalStart||c.modifiedStart+c.modifiedLength>=o.modifiedStart){const a=c.originalStart;let u=c.originalLength;const r=c.modifiedStart;let i=c.modifiedLength;return c.originalStart+c.originalLength>=o.originalStart&&(u=o.originalStart+o.originalLength-c.originalStart),c.modifiedStart+c.modifiedLength>=o.modifiedStart&&(i=o.modifiedStart+o.modifiedLength-c.modifiedStart),s[0]=new b.DiffChange(a,u,r,i),!0}else return s[0]=null,!1}ClipDiagonalBound(c,o,s,a){if(c>=0&&c<a)return c;const u=s,r=a-s-1,i=o%2==0;if(c<0){const n=u%2==0;return i===n?0:1}else{const n=r%2==0;return i===n?a-1:a-2}}}e.LcsDiff=g}),define(Q[154],J([0,1,98,19,153,6,54]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function C(c){return typeof c=="object"&&"visibility"in c&&"data"in c}e.isFilterResult=C;function d(c){switch(c){case!0:return 1;case!1:return 0;default:return c}}e.getVisibleState=d;function g(c){return typeof c.collapsible=="boolean"}class p{constructor(o,s,a,u={}){this.user=o,this.list=s,this.rootRef=[],this.eventBufferer=new w.EventBufferer,this._onDidChangeCollapseState=new w.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new w.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new w.Emitter,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=typeof u.collapseByDefault=="undefined"?!1:u.collapseByDefault,this.filter=u.filter,this.autoExpandSingleChildren=typeof u.autoExpandSingleChildren=="undefined"?!1:u.autoExpandSingleChildren,this.root={parent:void 0,element:a,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(o,s,a=S.Iterable.empty(),u={}){if(o.length===0)throw new b.TreeError(this.user,"Invalid tree location");u.diffIdentityProvider?this.spliceSmart(u.diffIdentityProvider,o,s,a,u):this.spliceSimple(o,s,a,u)}spliceSmart(o,s,a,u,r,i){var n;u===void 0&&(u=S.Iterable.empty()),i===void 0&&(i=(n=r.diffDepth)!==null&&n!==void 0?n:0);const{parentNode:t}=this.getParentNodeWithListIndex(s),l=[...u],h=s[s.length-1],m=new M.LcsDiff({getElements:()=>t.children.map(L=>o.getId(L.element).toString())},{getElements:()=>[...t.children.slice(0,h),...l,...t.children.slice(h+a)].map(L=>o.getId(L.element).toString())}).ComputeDiff(!1);if(m.quitEarly)return this.spliceSimple(s,a,l,r);const _=s.slice(0,-1),f=(L,I,k)=>{if(i>0)for(let E=0;E<k;E++)L--,I--,this.spliceSmart(o,[..._,L,0],Number.MAX_SAFE_INTEGER,l[I].children,r,i-1)};let v=Math.min(t.children.length,h+a),y=l.length;for(const L of m.changes.sort((I,k)=>k.originalStart-I.originalStart))f(v,y,v-(L.originalStart+L.originalLength)),v=L.originalStart,y=L.modifiedStart-h,this.spliceSimple([..._,v],L.originalLength,S.Iterable.slice(l,y,y+L.modifiedLength),r);f(v,y,v)}spliceSimple(o,s,a=S.Iterable.empty(),{onDidCreateNode:u,onDidDeleteNode:r}){const{parentNode:i,listIndex:n,revealed:t,visible:l}=this.getParentNodeWithListIndex(o),h=[],m=S.Iterable.map(a,A=>this.createTreeNode(A,i,i.visible?1:0,t,h,u)),_=o[o.length-1],f=i.children.length>0;let v=0;for(let A=_;A>=0&&A<i.children.length;A--){const B=i.children[A];if(B.visible){v=B.visibleChildIndex;break}}const y=[];let L=0,I=0;for(const A of m)y.push(A),I+=A.renderNodeCount,A.visible&&(A.visibleChildIndex=v+L++);const k=i.children.splice(_,s,...y);let E=0;for(const A of k)A.visible&&E++;if(E!==0)for(let A=_+y.length;A<i.children.length;A++){const B=i.children[A];B.visible&&(B.visibleChildIndex-=E)}if(i.visibleChildrenCount+=L-E,t&&l){const A=k.reduce((B,F)=>B+(F.visible?F.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(i,I-A),this.list.splice(n,A,h)}if(k.length>0&&r){const A=B=>{r(B),B.children.forEach(A)};k.forEach(A)}const T=i.children.length>0;f!==T&&this.setCollapsible(o.slice(0,-1),T),this._onDidSplice.fire({insertedNodes:y,deletedNodes:k});let O=i;for(;O;){if(O.visibility===2){this.refilter();break}O=O.parent}}rerender(o){if(o.length===0)throw new b.TreeError(this.user,"Invalid tree location");const{node:s,listIndex:a,revealed:u}=this.getTreeNodeWithListIndex(o);s.visible&&u&&this.list.splice(a,1,[s])}has(o){return this.hasTreeNode(o)}getListIndex(o){const{listIndex:s,visible:a,revealed:u}=this.getTreeNodeWithListIndex(o);return a&&u?s:-1}getListRenderCount(o){return this.getTreeNode(o).renderNodeCount}isCollapsible(o){return this.getTreeNode(o).collapsible}setCollapsible(o,s){const a=this.getTreeNode(o);typeof s=="undefined"&&(s=!a.collapsible);const u={collapsible:s};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(o,u))}isCollapsed(o){return this.getTreeNode(o).collapsed}setCollapsed(o,s,a){const u=this.getTreeNode(o);typeof s=="undefined"&&(s=!u.collapsed);const r={collapsed:s,recursive:a||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(o,r))}_setCollapseState(o,s){const{node:a,listIndex:u,revealed:r}=this.getTreeNodeWithListIndex(o),i=this._setListNodeCollapseState(a,u,r,s);if(a!==this.root&&this.autoExpandSingleChildren&&i&&!g(s)&&a.collapsible&&!a.collapsed&&!s.recursive){let n=-1;for(let t=0;t<a.children.length;t++)if(a.children[t].visible)if(n>-1){n=-1;break}else n=t;n>-1&&this._setCollapseState([...o,n],s)}return i}_setListNodeCollapseState(o,s,a,u){const r=this._setNodeCollapseState(o,u,!1);if(!a||!o.visible||!r)return r;const i=o.renderNodeCount,n=this.updateNodeAfterCollapseChange(o),t=i-(s===-1?0:1);return this.list.splice(s+1,t,n.slice(1)),r}_setNodeCollapseState(o,s,a){let u;if(o===this.root?u=!1:(g(s)?(u=o.collapsible!==s.collapsible,o.collapsible=s.collapsible):o.collapsible?(u=o.collapsed!==s.collapsed,o.collapsed=s.collapsed):u=!1,u&&this._onDidChangeCollapseState.fire({node:o,deep:a})),!g(s)&&s.recursive)for(const r of o.children)u=this._setNodeCollapseState(r,s,!0)||u;return u}expandTo(o){this.eventBufferer.bufferEvents(()=>{let s=this.getTreeNode(o);for(;s.parent;)s=s.parent,o=o.slice(0,o.length-1),s.collapsed&&this._setCollapseState(o,{collapsed:!1,recursive:!1})})}refilter(){const o=this.root.renderNodeCount,s=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,o,s)}createTreeNode(o,s,a,u,r,i){const n={parent:s,element:o.element,children:[],depth:s.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof o.collapsible=="boolean"?o.collapsible:typeof o.collapsed!="undefined",collapsed:typeof o.collapsed=="undefined"?this.collapseByDefault:o.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},t=this._filterNode(n,a);n.visibility=t,u&&r.push(n);const l=o.children||S.Iterable.empty(),h=u&&t!==0&&!n.collapsed,m=S.Iterable.map(l,v=>this.createTreeNode(v,n,t,h,r,i));let _=0,f=1;for(const v of m)n.children.push(v),f+=v.renderNodeCount,v.visible&&(v.visibleChildIndex=_++);return n.collapsible=n.collapsible||n.children.length>0,n.visibleChildrenCount=_,n.visible=t===2?_>0:t===1,n.visible?n.collapsed||(n.renderNodeCount=f):(n.renderNodeCount=0,u&&r.pop()),i&&i(n),n}updateNodeAfterCollapseChange(o){const s=o.renderNodeCount,a=[];return this._updateNodeAfterCollapseChange(o,a),this._updateAncestorsRenderNodeCount(o.parent,a.length-s),a}_updateNodeAfterCollapseChange(o,s){if(o.visible===!1)return 0;if(s.push(o),o.renderNodeCount=1,!o.collapsed)for(const a of o.children)o.renderNodeCount+=this._updateNodeAfterCollapseChange(a,s);return this._onDidChangeRenderNodeCount.fire(o),o.renderNodeCount}updateNodeAfterFilterChange(o){const s=o.renderNodeCount,a=[];return this._updateNodeAfterFilterChange(o,o.visible?1:0,a),this._updateAncestorsRenderNodeCount(o.parent,a.length-s),a}_updateNodeAfterFilterChange(o,s,a,u=!0){let r;if(o!==this.root){if(r=this._filterNode(o,s),r===0)return o.visible=!1,o.renderNodeCount=0,!1;u&&a.push(o)}const i=a.length;o.renderNodeCount=o===this.root?0:1;let n=!1;if(!o.collapsed||r!==0){let t=0;for(const l of o.children)n=this._updateNodeAfterFilterChange(l,r,a,u&&!o.collapsed)||n,l.visible&&(l.visibleChildIndex=t++);o.visibleChildrenCount=t}else o.visibleChildrenCount=0;return o!==this.root&&(o.visible=r===2?n:r===1),o.visible?o.collapsed||(o.renderNodeCount+=a.length-i):(o.renderNodeCount=0,u&&a.pop()),this._onDidChangeRenderNodeCount.fire(o),o.visible}_updateAncestorsRenderNodeCount(o,s){if(s!==0)for(;o;)o.renderNodeCount+=s,this._onDidChangeRenderNodeCount.fire(o),o=o.parent}_filterNode(o,s){const a=this.filter?this.filter.filter(o.element,s):1;return typeof a=="boolean"?(o.filterData=void 0,a?1:0):C(a)?(o.filterData=a.data,d(a.visibility)):(o.filterData=void 0,d(a))}hasTreeNode(o,s=this.root){if(!o||o.length===0)return!0;const[a,...u]=o;return a<0||a>s.children.length?!1:this.hasTreeNode(u,s.children[a])}getTreeNode(o,s=this.root){if(!o||o.length===0)return s;const[a,...u]=o;if(a<0||a>s.children.length)throw new b.TreeError(this.user,"Invalid tree location");return this.getTreeNode(u,s.children[a])}getTreeNodeWithListIndex(o){if(o.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:s,listIndex:a,revealed:u,visible:r}=this.getParentNodeWithListIndex(o),i=o[o.length-1];if(i<0||i>s.children.length)throw new b.TreeError(this.user,"Invalid tree location");const n=s.children[i];return{node:n,listIndex:a,revealed:u,visible:r&&n.visible}}getParentNodeWithListIndex(o,s=this.root,a=0,u=!0,r=!0){const[i,...n]=o;if(i<0||i>s.children.length)throw new b.TreeError(this.user,"Invalid tree location");for(let t=0;t<i;t++)a+=s.children[t].renderNodeCount;return u=u&&!s.collapsed,r=r&&s.visible,n.length===0?{parentNode:s,listIndex:a,revealed:u,visible:r}:this.getParentNodeWithListIndex(n,s.children[i],a+1,u,r)}getNode(o=[]){return this.getTreeNode(o)}getNodeLocation(o){const s=[];let a=o;for(;a.parent;)s.push(a.parent.children.indexOf(a)),a=a.parent;return s.reverse()}getParentNodeLocation(o){if(o.length!==0)return o.length===1?[]:N.tail2(o)[0]}}e.IndexTreeModel=p}),define(Q[155],J([0,1,54,154,98,19]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class S{constructor(d,g,p={}){this.user=d,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new N.IndexTreeModel(d,g,null,p),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,p.sorter&&(this.sorter={compare(c,o){return p.sorter.compare(c.element,o.element)}}),this.identityProvider=p.identityProvider}setChildren(d,g=b.Iterable.empty(),p={}){const c=this.getElementLocation(d);this._setChildren(c,this.preserveCollapseState(g),p)}_setChildren(d,g=b.Iterable.empty(),p){const c=new Set,o=new Set,s=u=>{var r;if(u.element!==null){const i=u;if(c.add(i.element),this.nodes.set(i.element,i),this.identityProvider){const n=this.identityProvider.getId(i.element).toString();o.add(n),this.nodesByIdentity.set(n,i)}(r=p.onDidCreateNode)===null||r===void 0||r.call(p,i)}},a=u=>{var r;if(u.element!==null){const i=u;if(c.has(i.element)||this.nodes.delete(i.element),this.identityProvider){const n=this.identityProvider.getId(i.element).toString();o.has(n)||this.nodesByIdentity.delete(n)}(r=p.onDidDeleteNode)===null||r===void 0||r.call(p,i)}};this.model.splice([...d,0],Number.MAX_VALUE,g,Object.assign(Object.assign({},p),{onDidCreateNode:s,onDidDeleteNode:a}))}preserveCollapseState(d=b.Iterable.empty()){return this.sorter&&(d=w.mergeSort([...d],this.sorter.compare.bind(this.sorter))),b.Iterable.map(d,g=>{let p=this.nodes.get(g.element);if(!p&&this.identityProvider){const s=this.identityProvider.getId(g.element).toString();p=this.nodesByIdentity.get(s)}if(!p)return Object.assign(Object.assign({},g),{children:this.preserveCollapseState(g.children)});const c=typeof g.collapsible=="boolean"?g.collapsible:p.collapsible,o=typeof g.collapsed!="undefined"?g.collapsed:p.collapsed;return Object.assign(Object.assign({},g),{collapsible:c,collapsed:o,children:this.preserveCollapseState(g.children)})})}rerender(d){const g=this.getElementLocation(d);this.model.rerender(g)}has(d){return this.nodes.has(d)}getListIndex(d){const g=this.getElementLocation(d);return this.model.getListIndex(g)}getListRenderCount(d){const g=this.getElementLocation(d);return this.model.getListRenderCount(g)}isCollapsible(d){const g=this.getElementLocation(d);return this.model.isCollapsible(g)}setCollapsible(d,g){const p=this.getElementLocation(d);return this.model.setCollapsible(p,g)}isCollapsed(d){const g=this.getElementLocation(d);return this.model.isCollapsed(g)}setCollapsed(d,g,p){const c=this.getElementLocation(d);return this.model.setCollapsed(c,g,p)}expandTo(d){const g=this.getElementLocation(d);this.model.expandTo(g)}refilter(){this.model.refilter()}getNode(d=null){if(d===null)return this.model.getNode(this.model.rootRef);const g=this.nodes.get(d);if(!g)throw new M.TreeError(this.user,`Tree element not found: ${d}`);return g}getNodeLocation(d){return d.element}getParentNodeLocation(d){if(d===null)throw new M.TreeError(this.user,"Invalid getParentNodeLocation call");const g=this.nodes.get(d);if(!g)throw new M.TreeError(this.user,`Tree element not found: ${d}`);const p=this.model.getNodeLocation(g),c=this.model.getParentNodeLocation(p);return this.model.getNode(c).element}getElementLocation(d){if(d===null)return[];const g=this.nodes.get(d);if(!g)throw new M.TreeError(this.user,`Tree element not found: ${d}`);return this.model.getNodeLocation(g)}}e.ObjectTreeModel=S}),define(Q[284],J([0,1,54,6,98,155]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function S(n){const t=[n.element],l=n.incompressible||!1;return{element:{elements:t,incompressible:l},children:b.Iterable.map(b.Iterable.from(n.children),S),collapsible:n.collapsible,collapsed:n.collapsed}}function C(n){const t=[n.element],l=n.incompressible||!1;let h,m;for(;[m,h]=b.Iterable.consume(b.Iterable.from(n.children),2),!(m.length!==1||m[0].incompressible);)n=m[0],t.push(n.element);return{element:{elements:t,incompressible:l},children:b.Iterable.map(b.Iterable.concat(m,h),C),collapsible:n.collapsible,collapsed:n.collapsed}}e.compress=C;function d(n,t=0){let l;return t<n.element.elements.length-1?l=[d(n,t+1)]:l=b.Iterable.map(b.Iterable.from(n.children),h=>d(h,0)),t===0&&n.element.incompressible?{element:n.element.elements[t],children:l,incompressible:!0,collapsible:n.collapsible,collapsed:n.collapsed}:{element:n.element.elements[t],children:l,collapsible:n.collapsible,collapsed:n.collapsed}}function g(n){return d(n,0)}e.decompress=g;function p(n,t,l){return n.element===t?Object.assign(Object.assign({},n),{children:l}):Object.assign(Object.assign({},n),{children:b.Iterable.map(b.Iterable.from(n.children),h=>p(h,t,l))})}const c=n=>({getId(t){return t.elements.map(l=>n.getId(l).toString()).join("\0")}});class o{constructor(t,l,h={}){this.user=t,this.rootRef=null,this.nodes=new Map,this.model=new w.ObjectTreeModel(t,l,h),this.enabled=typeof h.compressionEnabled=="undefined"?!0:h.compressionEnabled,this.identityProvider=h.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(t,l=b.Iterable.empty(),h){const m=h.diffIdentityProvider&&c(h.diffIdentityProvider);if(t===null){const T=b.Iterable.map(l,this.enabled?C:S);this._setChildren(null,T,{diffIdentityProvider:m,diffDepth:Infinity});return}const _=this.nodes.get(t);if(!_)throw new Error("Unknown compressed tree node");const f=this.model.getNode(_),v=this.model.getParentNodeLocation(_),y=this.model.getNode(v),L=g(f),I=p(L,t,l),k=(this.enabled?C:S)(I),E=y.children.map(T=>T===f?k:T);this._setChildren(y.element,E,{diffIdentityProvider:m,diffDepth:f.depth-y.depth})}setCompressionEnabled(t){if(t!==this.enabled){this.enabled=t;const h=this.model.getNode().children,m=b.Iterable.map(h,g),_=b.Iterable.map(m,t?C:S);this._setChildren(null,_,{diffIdentityProvider:this.identityProvider,diffDepth:Infinity})}}_setChildren(t,l,h){const m=new Set,_=v=>{for(const y of v.element.elements)m.add(y),this.nodes.set(y,v.element)},f=v=>{for(const y of v.element.elements)m.has(y)||this.nodes.delete(y)};this.model.setChildren(t,l,Object.assign(Object.assign({},h),{onDidCreateNode:_,onDidDeleteNode:f}))}has(t){return this.nodes.has(t)}getListIndex(t){const l=this.getCompressedNode(t);return this.model.getListIndex(l)}getListRenderCount(t){const l=this.getCompressedNode(t);return this.model.getListRenderCount(l)}getNode(t){if(typeof t=="undefined")return this.model.getNode();const l=this.getCompressedNode(t);return this.model.getNode(l)}getNodeLocation(t){const l=this.model.getNodeLocation(t);return l===null?null:l.elements[l.elements.length-1]}getParentNodeLocation(t){const l=this.getCompressedNode(t),h=this.model.getParentNodeLocation(l);return h===null?null:h.elements[h.elements.length-1]}isCollapsible(t){const l=this.getCompressedNode(t);return this.model.isCollapsible(l)}setCollapsible(t,l){const h=this.getCompressedNode(t);return this.model.setCollapsible(h,l)}isCollapsed(t){const l=this.getCompressedNode(t);return this.model.isCollapsed(l)}setCollapsed(t,l,h){const m=this.getCompressedNode(t);return this.model.setCollapsed(m,l,h)}expandTo(t){const l=this.getCompressedNode(t);this.model.expandTo(l)}rerender(t){const l=this.getCompressedNode(t);this.model.rerender(l)}refilter(){this.model.refilter()}getCompressedNode(t){if(t===null)return null;const l=this.nodes.get(t);if(!l)throw new M.TreeError(this.user,`Tree element not found: ${t}`);return l}}e.CompressedObjectTreeModel=o;const s=n=>n[n.length-1];e.DefaultElementMapper=s;class a{constructor(t,l){this.unwrapper=t,this.node=l}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(t=>new a(this.unwrapper,t))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function u(n,t){return{splice(l,h,m){t.splice(l,h,m.map(_=>n.map(_)))},updateElementHeight(l,h){t.updateElementHeight(l,h)}}}function r(n,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId(l){return t.identityProvider.getId(n(l))}},sorter:t.sorter&&{compare(l,h){return t.sorter.compare(l.elements[0],h.elements[0])}},filter:t.filter&&{filter(l,h){return t.filter.filter(n(l),h)}}})}class i{constructor(t,l,h={}){this.rootRef=null,this.elementMapper=h.elementMapper||e.DefaultElementMapper;const m=_=>this.elementMapper(_.elements);this.nodeMapper=new M.WeakMapper(_=>new a(m,_)),this.model=new o(t,u(this.nodeMapper,l),r(m,h))}get onDidSplice(){return N.Event.map(this.model.onDidSplice,({insertedNodes:t,deletedNodes:l})=>({insertedNodes:t.map(h=>this.nodeMapper.map(h)),deletedNodes:l.map(h=>this.nodeMapper.map(h))}))}get onDidChangeCollapseState(){return N.Event.map(this.model.onDidChangeCollapseState,({node:t,deep:l})=>({node:this.nodeMapper.map(t),deep:l}))}get onDidChangeRenderNodeCount(){return N.Event.map(this.model.onDidChangeRenderNodeCount,t=>this.nodeMapper.map(t))}setChildren(t,l=b.Iterable.empty(),h={}){this.model.setChildren(t,l,h)}setCompressionEnabled(t){this.model.setCompressionEnabled(t)}has(t){return this.model.has(t)}getListIndex(t){return this.model.getListIndex(t)}getListRenderCount(t){return this.model.getListRenderCount(t)}getNode(t){return this.nodeMapper.map(this.model.getNode(t))}getNodeLocation(t){return t.element}getParentNodeLocation(t){return this.model.getParentNodeLocation(t)}isCollapsible(t){return this.model.isCollapsible(t)}setCollapsible(t,l){return this.model.setCollapsible(t,l)}isCollapsed(t){return this.model.isCollapsed(t)}setCollapsed(t,l,h){return this.model.setCollapsed(t,l,h)}expandTo(t){return this.model.expandTo(t)}rerender(t){return this.model.rerender(t)}refilter(){return this.model.refilter()}getCompressedTreeNode(t=null){return this.model.getNode(t)}}e.CompressibleObjectTreeModel=i}),define(Q[285],J([0,1,8]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function N(S,C){if(S&&S[0]!==""){const d=M(S,C,"-"),g=M(S,C,"_");return d&&!g?w(S,C,"-"):!d&&g?w(S,C,"_"):S[0].toUpperCase()===S[0]?C.toUpperCase():S[0].toLowerCase()===S[0]?C.toLowerCase():b.containsUppercaseCharacter(S[0][0])&&C.length>0?C[0].toUpperCase()+C.substr(1):C}else return C}e.buildReplaceStringWithCasePreserved=N;function M(S,C,d){return S[0].indexOf(d)!==-1&&C.indexOf(d)!==-1&&S[0].split(d).length===C.split(d).length}function w(S,C,d){const g=C.split(d),p=S[0].split(d);let c="";return g.forEach((o,s)=>{c+=N([p[s]],o)+d}),c.slice(0,-1)}}),define(Q[82],J([0,1,8]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var N;(function(M){M[M.Ignore=0]="Ignore",M[M.Info=1]="Info",M[M.Warning=2]="Warning",M[M.Error=3]="Error"})(N||(N={})),function(M){const w="error",S="warning",C="warn",d="info";function g(p){return p?b.equalsIgnoreCase(w,p)?M.Error:b.equalsIgnoreCase(S,p)||b.equalsIgnoreCase(C,p)?M.Warning:b.equalsIgnoreCase(d,p)?M.Info:M.Ignore:M.Ignore}M.fromValue=g}(N||(N={})),e.default=N}),define(Q[20],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withNullAsUndefined=e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.validateConstraint=e.validateConstraints=e.isFunction=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isUndefined=e.isBoolean=e.isNumber=e.isObject=e.isString=e.isArray=void 0;function b(n){return Array.isArray(n)}e.isArray=b;function N(n){return typeof n=="string"}e.isString=N;function M(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}e.isObject=M;function w(n){return typeof n=="number"&&!isNaN(n)}e.isNumber=w;function S(n){return n===!0||n===!1}e.isBoolean=S;function C(n){return typeof n=="undefined"}e.isUndefined=C;function d(n){return C(n)||n===null}e.isUndefinedOrNull=d;function g(n,t){if(!n)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}e.assertType=g;function p(n){if(d(n))throw new Error("Assertion Failed: argument is undefined or null");return n}e.assertIsDefined=p;function c(n){return typeof n=="function"}e.isFunction=c;function o(n,t){const l=Math.min(n.length,t.length);for(let h=0;h<l;h++)s(n[h],t[h])}e.validateConstraints=o;function s(n,t){if(N(t)){if(typeof n!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(c(t)){try{if(n instanceof t)return}catch(l){}if(!d(n)&&n.constructor===t||t.length===1&&t.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=s;function a(n){let t=[],l=Object.getPrototypeOf(n);for(;Object.prototype!==l;)t=t.concat(Object.getOwnPropertyNames(l)),l=Object.getPrototypeOf(l);return t}e.getAllPropertyNames=a;function u(n){const t=[];for(const l of a(n))typeof n[l]=="function"&&t.push(l);return t}e.getAllMethodNames=u;function r(n,t){const l=m=>function(){const _=Array.prototype.slice.call(arguments,0);return t(m,_)};let h={};for(const m of n)h[m]=l(m);return h}e.createProxyObject=r;function i(n){return n===null?void 0:n}e.withNullAsUndefined=i}),define(Q[40],J([0,1,20]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrDefault=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function N(c){if(!c||typeof c!="object"||c instanceof RegExp)return c;const o=Array.isArray(c)?[]:{};return Object.keys(c).forEach(s=>{c[s]&&typeof c[s]=="object"?o[s]=N(c[s]):o[s]=c[s]}),o}e.deepClone=N;function M(c){if(!c||typeof c!="object")return c;const o=[c];for(;o.length>0;){const s=o.shift();Object.freeze(s);for(const a in s)if(w.call(s,a)){const u=s[a];typeof u=="object"&&!Object.isFrozen(u)&&o.push(u)}}return c}e.deepFreeze=M;const w=Object.prototype.hasOwnProperty;function S(c,o){return C(c,o,new Set)}e.cloneAndChange=S;function C(c,o,s){if(b.isUndefinedOrNull(c))return c;const a=o(c);if(typeof a!="undefined")return a;if(b.isArray(c)){const u=[];for(const r of c)u.push(C(r,o,s));return u}if(b.isObject(c)){if(s.has(c))throw new Error("Cannot clone recursive data-structure");s.add(c);const u={};for(let r in c)w.call(c,r)&&(u[r]=C(c[r],o,s));return s.delete(c),u}return c}function d(c,o,s=!0){return b.isObject(c)?(b.isObject(o)&&Object.keys(o).forEach(a=>{a in c?s&&(b.isObject(c[a])&&b.isObject(o[a])?d(c[a],o[a],s):c[a]=o[a]):c[a]=o[a]}),c):o}e.mixin=d;function g(c,o){if(c===o)return!0;if(c==null||o===null||o===void 0||typeof c!=typeof o||typeof c!="object"||Array.isArray(c)!==Array.isArray(o))return!1;let s,a;if(Array.isArray(c)){if(c.length!==o.length)return!1;for(s=0;s<c.length;s++)if(!g(c[s],o[s]))return!1}else{const u=[];for(a in c)u.push(a);u.sort();const r=[];for(a in o)r.push(a);if(r.sort(),!g(u,r))return!1;for(s=0;s<u.length;s++)if(!g(c[u[s]],o[u[s]]))return!1}return!0}e.equals=g;function p(c,o,s){const a=o(c);return typeof a=="undefined"?s:a}e.getOrDefault=p}),define(Q[122],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=void 0;function b(M){return M<0?0:M>255?255:M|0}e.toUint8=b;function N(M){return M<0?0:M>4294967295?4294967295:M|0}e.toUint32=N}),define(Q[24],J([0,1,17,72]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const M=/^\w[\w\d+.-]*$/,w=/^\//,S=/^\/\//;function C(f,v){if(!f.scheme&&v)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${f.authority}", path: "${f.path}", query: "${f.query}", fragment: "${f.fragment}"}`);if(f.scheme&&!M.test(f.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(f.path){if(f.authority){if(!w.test(f.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(S.test(f.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function d(f,v){return!f&&!v?"file":f}function g(f,v){switch(f){case"https":case"http":case"file":v?v[0]!==c&&(v=c+v):v=c;break}return v}const p="",c="/",o=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class s{constructor(v,y,L,I,k,E=!1){typeof v=="object"?(this.scheme=v.scheme||p,this.authority=v.authority||p,this.path=v.path||p,this.query=v.query||p,this.fragment=v.fragment||p):(this.scheme=d(v,E),this.authority=y||p,this.path=g(this.scheme,L||p),this.query=I||p,this.fragment=k||p,C(this,E))}static isUri(v){return v instanceof s?!0:v?typeof v.authority=="string"&&typeof v.fragment=="string"&&typeof v.path=="string"&&typeof v.query=="string"&&typeof v.scheme=="string"&&typeof v.fsPath=="string"&&typeof v.with=="function"&&typeof v.toString=="function":!1}get fsPath(){return t(this,!1)}with(v){if(!v)return this;let{scheme:y,authority:L,path:I,query:k,fragment:E}=v;return y===void 0?y=this.scheme:y===null&&(y=p),L===void 0?L=this.authority:L===null&&(L=p),I===void 0?I=this.path:I===null&&(I=p),k===void 0?k=this.query:k===null&&(k=p),E===void 0?E=this.fragment:E===null&&(E=p),y===this.scheme&&L===this.authority&&I===this.path&&k===this.query&&E===this.fragment?this:new u(y,L,I,k,E)}static parse(v,y=!1){const L=o.exec(v);return L?new u(L[2]||p,_(L[4]||p),_(L[5]||p),_(L[7]||p),_(L[9]||p),y):new u(p,p,p,p,p)}static file(v){let y=p;if(b.isWindows&&(v=v.replace(/\\/g,c)),v[0]===c&&v[1]===c){const L=v.indexOf(c,2);L===-1?(y=v.substring(2),v=c):(y=v.substring(2,L),v=v.substring(L)||c)}return new u("file",y,v,p,p)}static from(v){return new u(v.scheme,v.authority,v.path,v.query,v.fragment)}static joinPath(v,...y){if(!v.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let L;return b.isWindows&&v.scheme==="file"?L=s.file(N.win32.join(t(v,!0),...y)).path:L=N.posix.join(v.path,...y),v.with({path:L})}toString(v=!1){return l(this,v)}toJSON(){return this}static revive(v){if(v){if(v instanceof s)return v;{const y=new u(v);return y._formatted=v.external,y._fsPath=v._sep===a?v.fsPath:null,y}}else return v}}e.URI=s;const a=b.isWindows?1:void 0;class u extends s{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=t(this,!1)),this._fsPath}toString(v=!1){return v?l(this,!0):(this._formatted||(this._formatted=l(this,!1)),this._formatted)}toJSON(){const v={$mid:1};return this._fsPath&&(v.fsPath=this._fsPath,v._sep=a),this._formatted&&(v.external=this._formatted),this.path&&(v.path=this.path),this.scheme&&(v.scheme=this.scheme),this.authority&&(v.authority=this.authority),this.query&&(v.query=this.query),this.fragment&&(v.fragment=this.fragment),v}}const r={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function i(f,v){let y,L=-1;for(let I=0;I<f.length;I++){const k=f.charCodeAt(I);if(k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===45||k===46||k===95||k===126||v&&k===47)L!==-1&&(y+=encodeURIComponent(f.substring(L,I)),L=-1),y!==void 0&&(y+=f.charAt(I));else{y===void 0&&(y=f.substr(0,I));const E=r[k];E!==void 0?(L!==-1&&(y+=encodeURIComponent(f.substring(L,I)),L=-1),y+=E):L===-1&&(L=I)}}return L!==-1&&(y+=encodeURIComponent(f.substring(L))),y!==void 0?y:f}function n(f){let v;for(let y=0;y<f.length;y++){const L=f.charCodeAt(y);L===35||L===63?(v===void 0&&(v=f.substr(0,y)),v+=r[L]):v!==void 0&&(v+=f[y])}return v!==void 0?v:f}function t(f,v){let y;return f.authority&&f.path.length>1&&f.scheme==="file"?y=`//${f.authority}${f.path}`:f.path.charCodeAt(0)===47&&(f.path.charCodeAt(1)>=65&&f.path.charCodeAt(1)<=90||f.path.charCodeAt(1)>=97&&f.path.charCodeAt(1)<=122)&&f.path.charCodeAt(2)===58?v?y=f.path.substr(1):y=f.path[1].toLowerCase()+f.path.substr(2):y=f.path,b.isWindows&&(y=y.replace(/\//g,"\\")),y}e.uriToFsPath=t;function l(f,v){const y=v?n:i;let L="",{scheme:I,authority:k,path:E,query:T,fragment:O}=f;if(I&&(L+=I,L+=":"),(k||I==="file")&&(L+=c,L+=c),k){let A=k.indexOf("@");if(A!==-1){const B=k.substr(0,A);k=k.substr(A+1),A=B.indexOf(":"),A===-1?L+=y(B,!1):(L+=y(B.substr(0,A),!1),L+=":",L+=y(B.substr(A+1),!1)),L+="@"}k=k.toLowerCase(),A=k.indexOf(":"),A===-1?L+=y(k,!1):(L+=y(k.substr(0,A),!1),L+=k.substr(A))}if(E){if(E.length>=3&&E.charCodeAt(0)===47&&E.charCodeAt(2)===58){const A=E.charCodeAt(1);A>=65&&A<=90&&(E=`/${String.fromCharCode(A+32)}:${E.substr(3)}`)}else if(E.length>=2&&E.charCodeAt(1)===58){const A=E.charCodeAt(0);A>=65&&A<=90&&(E=`${String.fromCharCode(A+32)}:${E.substr(2)}`)}L+=y(E,!0)}return T&&(L+="?",L+=y(T,!1)),O&&(L+="#",L+=v?O:i(O,!1)),L}function h(f){try{return decodeURIComponent(f)}catch(v){return f.length>3?f.substr(0,3)+h(f.substr(3)):f}}const m=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(f){return f.match(m)?f.replace(m,v=>h(v)):f}}),define(Q[51],J([0,1,24,8]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.ResourceMap=e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class M{constructor(){this._value="",this._pos=0}reset(a){return this._value=a,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(a){const u=a.charCodeAt(0),r=this._value.charCodeAt(this._pos);return u-r}value(){return this._value[this._pos]}}e.StringIterator=M;class w{constructor(a=!0){this._caseSensitive=a}reset(a){return this._value=a,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let a=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(a)this._from++;else break;else a=!1;return this}cmp(a){return this._caseSensitive?N.compareSubstring(a,this._value,0,a.length,this._from,this._to):N.compareSubstringIgnoreCase(a,this._value,0,a.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=w;class S{constructor(a=!0,u=!0){this._splitOnBackslash=a,this._caseSensitive=u}reset(a){return this._value=a.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let a=!0;for(;this._to<this._value.length;this._to++){const u=this._value.charCodeAt(this._to);if(u===47||this._splitOnBackslash&&u===92)if(a)this._from++;else break;else a=!1}return this}cmp(a){return this._caseSensitive?N.compareSubstring(a,this._value,0,a.length,this._from,this._to):N.compareSubstringIgnoreCase(a,this._value,0,a.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=S;class C{constructor(a){this._ignorePathCasing=a,this._states=[],this._stateIdx=0}reset(a){return this._value=a,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new S(!1,!this._ignorePathCasing(a)),this._pathIterator.reset(a.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(a){if(this._states[this._stateIdx]===1)return N.compareIgnoreCase(a,this._value.scheme);if(this._states[this._stateIdx]===2)return N.compareIgnoreCase(a,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(a);if(this._states[this._stateIdx]===4)return N.compare(a,this._value.query);if(this._states[this._stateIdx]===5)return N.compare(a,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=C;class d{isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}}class g{constructor(a){this._iter=a}static forUris(a=()=>!1){return new g(new C(a))}static forStrings(){return new g(new M)}static forConfigKeys(){return new g(new w)}clear(){this._root=void 0}set(a,u){const r=this._iter.reset(a);let i;for(this._root||(this._root=new d,this._root.segment=r.value()),i=this._root;;){const t=r.cmp(i.segment);if(t>0)i.left||(i.left=new d,i.left.segment=r.value()),i=i.left;else if(t<0)i.right||(i.right=new d,i.right.segment=r.value()),i=i.right;else if(r.hasNext())r.next(),i.mid||(i.mid=new d,i.mid.segment=r.value()),i=i.mid;else break}const n=i.value;return i.value=u,i.key=a,n}get(a){var u;return(u=this._getNode(a))===null||u===void 0?void 0:u.value}_getNode(a){const u=this._iter.reset(a);let r=this._root;for(;r;){const i=u.cmp(r.segment);if(i>0)r=r.left;else if(i<0)r=r.right;else if(u.hasNext())u.next(),r=r.mid;else break}return r}has(a){const u=this._getNode(a);return!((u==null?void 0:u.value)===void 0&&(u==null?void 0:u.mid)===void 0)}delete(a){return this._delete(a,!1)}deleteSuperstr(a){return this._delete(a,!0)}_delete(a,u){const r=this._iter.reset(a),i=[];let n=this._root;for(;n;){const t=r.cmp(n.segment);if(t>0)i.push([1,n]),n=n.left;else if(t<0)i.push([-1,n]),n=n.right;else if(r.hasNext())r.next(),i.push([0,n]),n=n.mid;else{for(u?(n.left=void 0,n.mid=void 0,n.right=void 0):n.value=void 0;i.length>0&&n.isEmpty();){let[l,h]=i.pop();switch(l){case 1:h.left=void 0;break;case 0:h.mid=void 0;break;case-1:h.right=void 0;break}n=h}break}}}findSubstr(a){const u=this._iter.reset(a);let r=this._root,i;for(;r;){const n=u.cmp(r.segment);if(n>0)r=r.left;else if(n<0)r=r.right;else if(u.hasNext())u.next(),i=r.value||i,r=r.mid;else break}return r&&r.value||i}findSuperstr(a){const u=this._iter.reset(a);let r=this._root;for(;r;){const i=u.cmp(r.segment);if(i>0)r=r.left;else if(i<0)r=r.right;else if(u.hasNext())u.next(),r=r.mid;else return r.mid?this._entries(r.mid):void 0}}forEach(a){for(const[u,r]of this)a(r,u)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(a){a&&(yield*this._entries(a.left),a.value&&(yield[a.key,a.value]),yield*this._entries(a.mid),yield*this._entries(a.right))}}e.TernarySearchTree=g;class p{constructor(a,u){this[Symbol.toStringTag]="ResourceMap",a instanceof p?(this.map=new Map(a.map),this.toKey=u!=null?u:p.defaultToKey):(this.map=new Map,this.toKey=a!=null?a:p.defaultToKey)}set(a,u){return this.map.set(this.toKey(a),u),this}get(a){return this.map.get(this.toKey(a))}has(a){return this.map.has(this.toKey(a))}get size(){return this.map.size}clear(){this.map.clear()}delete(a){return this.map.delete(this.toKey(a))}forEach(a,u){typeof u!="undefined"&&(a=a.bind(u));for(let[r,i]of this.map)a(i,b.URI.parse(r),this)}values(){return this.map.values()}*keys(){for(let a of this.map.keys())yield b.URI.parse(a)}*entries(){for(let a of this.map.entries())yield[b.URI.parse(a[0]),a[1]]}*[Symbol.iterator](){for(let a of this.map)yield[b.URI.parse(a[0]),a[1]]}}e.ResourceMap=p,p.defaultToKey=s=>s.toString();class c{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var a;return(a=this._head)===null||a===void 0?void 0:a.value}get last(){var a;return(a=this._tail)===null||a===void 0?void 0:a.value}has(a){return this._map.has(a)}get(a,u=0){const r=this._map.get(a);if(!!r)return u!==0&&this.touch(r,u),r.value}set(a,u,r=0){let i=this._map.get(a);if(i)i.value=u,r!==0&&this.touch(i,r);else{switch(i={key:a,value:u,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(a,i),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){const u=this._map.get(a);if(!!u)return this._map.delete(a),this.removeItem(u),this._size--,u.value}shift(){if(!(!this._head&&!this._tail)){if(!this._head||!this._tail)throw new Error("Invalid list");const a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}}forEach(a,u){const r=this._state;let i=this._head;for(;i;){if(u?a.bind(u)(i.value,i.key,this):a(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const a=this,u=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(a._state!==u)throw new Error("LinkedMap got modified during iteration.");if(r){const n={value:r.key,done:!1};return r=r.next,n}else return{value:void 0,done:!0}}};return i}values(){const a=this,u=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(a._state!==u)throw new Error("LinkedMap got modified during iteration.");if(r){const n={value:r.value,done:!1};return r=r.next,n}else return{value:void 0,done:!0}}};return i}entries(){const a=this,u=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(a._state!==u)throw new Error("LinkedMap got modified during iteration.");if(r){const n={value:[r.key,r.value],done:!1};return r=r.next,n}else return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(a){if(!(a>=this.size)){if(a===0){this.clear();return}let u=this._head,r=this.size;for(;u&&r>a;)this._map.delete(u.key),u=u.next,r--;this._head=u,this._size=r,u&&(u.previous=void 0),this._state++}}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(this._head)a.next=this._head,this._head.previous=a;else throw new Error("Invalid list");this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(this._tail)a.previous=this._tail,this._tail.next=a;else throw new Error("Invalid list");this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw new Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw new Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{const u=a.next,r=a.previous;if(!u||!r)throw new Error("Invalid list");u.previous=r,r.next=u}a.next=void 0,a.previous=void 0,this._state++}touch(a,u){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(u!==1&&u!==2)){if(u===1){if(a===this._head)return;const r=a.next,i=a.previous;a===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(u===2){if(a===this._tail)return;const r=a.next,i=a.previous;a===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}}toJSON(){const a=[];return this.forEach((u,r)=>{a.push([r,u])}),a}fromJSON(a){this.clear();for(const[u,r]of a)this.set(u,r)}}e.LinkedMap=c;class o extends c{constructor(a,u=1){super();this._limit=a,this._ratio=Math.min(Math.max(0,u),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get(a,u=2){return super.get(a,u)}peek(a){return super.get(a,0)}set(a,u){return super.set(a,u,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=o}),define(Q[66],J([0,1,51,8]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScore=e.isPatternInWord=e.createMatches=e.anyScore=e.matchesFuzzy=e.matchesWords=e.matchesCamelCase=e.isUpper=e.matchesSubString=e.matchesContiguousSubString=e.matchesPrefix=e.or=void 0;function M(...G){return function(j,te){for(let Z=0,ue=G.length;Z<ue;Z++){const he=G[Z](j,te);if(he)return he}return null}}e.or=M,e.matchesPrefix=w.bind(void 0,!0);function w(G,j,te){if(!te||te.length<j.length)return null;let Z;return G?Z=N.startsWithIgnoreCase(te,j):Z=te.indexOf(j)===0,Z?j.length>0?[{start:0,end:j.length}]:[]:null}function S(G,j){const te=j.toLowerCase().indexOf(G.toLowerCase());return te===-1?null:[{start:te,end:te+G.length}]}e.matchesContiguousSubString=S;function C(G,j){return d(G.toLowerCase(),j.toLowerCase(),0,0)}e.matchesSubString=C;function d(G,j,te,Z){if(te===G.length)return[];if(Z===j.length)return null;if(G[te]===j[Z]){let ue=null;return(ue=d(G,j,te+1,Z+1))?i({start:Z,end:Z+1},ue):null}return d(G,j,te,Z+1)}function g(G){return 97<=G&&G<=122}function p(G){return 65<=G&&G<=90}e.isUpper=p;function c(G){return 48<=G&&G<=57}function o(G){return G===32||G===9||G===10||G===13}const s=new Set;"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(G=>s.add(G.charCodeAt(0)));function a(G){return o(G)||s.has(G)}function u(G,j){return G===j||a(G)&&a(j)}function r(G){return g(G)||p(G)||c(G)}function i(G,j){return j.length===0?j=[G]:G.end===j[0].start?j[0].start=G.start:j.unshift(G),j}function n(G,j){for(let te=j;te<G.length;te++){const Z=G.charCodeAt(te);if(p(Z)||c(Z)||te>0&&!r(G.charCodeAt(te-1)))return te}return G.length}function t(G,j,te,Z){if(te===G.length)return[];if(Z===j.length)return null;if(G[te]!==j[Z].toLowerCase())return null;{let ue=null,he=Z+1;for(ue=t(G,j,te+1,Z+1);!ue&&(he=n(j,he))<j.length;)ue=t(G,j,te+1,he),he++;return ue===null?null:i({start:Z,end:Z+1},ue)}}function l(G){let j=0,te=0,Z=0,ue=0,he=0;for(let be=0;be<G.length;be++)he=G.charCodeAt(be),p(he)&&j++,g(he)&&te++,r(he)&&Z++,c(he)&&ue++;const re=j/G.length,ce=te/G.length,me=Z/G.length,Ce=ue/G.length;return{upperPercent:re,lowerPercent:ce,alphaPercent:me,numericPercent:Ce}}function h(G){const{upperPercent:j,lowerPercent:te}=G;return te===0&&j>.6}function m(G){const{upperPercent:j,lowerPercent:te,alphaPercent:Z,numericPercent:ue}=G;return te>.2&&j<.8&&Z>.6&&ue<.2}function _(G){let j=0,te=0,Z=0,ue=0;for(let he=0;he<G.length;he++)Z=G.charCodeAt(he),p(Z)&&j++,g(Z)&&te++,o(Z)&&ue++;return(j===0||te===0)&&ue===0?G.length<=30:j<=5}function f(G,j){if(!j||(j=j.trim(),j.length===0)||!_(G)||j.length>60)return null;const te=l(j);if(!m(te)){if(!h(te))return null;j=j.toLowerCase()}let Z=null,ue=0;for(G=G.toLowerCase();ue<j.length&&(Z=t(G,j,0,ue))===null;)ue=n(j,ue+1);return Z}e.matchesCamelCase=f;function v(G,j,te=!1){if(!j||j.length===0)return null;let Z=null,ue=0;for(G=G.toLowerCase(),j=j.toLowerCase();ue<j.length&&(Z=y(G,j,0,ue,te))===null;)ue=L(j,ue+1);return Z}e.matchesWords=v;function y(G,j,te,Z,ue){if(te===G.length)return[];if(Z===j.length)return null;if(u(G.charCodeAt(te),j.charCodeAt(Z))){let he=null,re=Z+1;if(he=y(G,j,te+1,Z+1,ue),!ue)for(;!he&&(re=L(j,re))<j.length;)he=y(G,j,te+1,re,ue),re++;return he===null?null:i({start:Z,end:Z+1},he)}else return null}function L(G,j){for(let te=j;te<G.length;te++)if(a(G.charCodeAt(te))||te>0&&a(G.charCodeAt(te-1)))return te;return G.length}const I=M(e.matchesPrefix,f,S),k=M(e.matchesPrefix,f,C),E=new b.LRUCache(1e4);function T(G,j,te=!1){if(typeof G!="string"||typeof j!="string")return null;let Z=E.get(G);Z||(Z=new RegExp(N.convertSimple2RegExpPattern(G),"i"),E.set(G,Z));const ue=Z.exec(j);return ue?[{start:ue.index,end:ue.index+ue[0].length}]:te?k(G,j):I(G,j)}e.matchesFuzzy=T;function O(G,j,te,Z,ue,he){const re=U(G,j,0,Z,ue,0,!0);if(re)return re;let ce=[],me=0,Ce=he;for(let be=0;be<j.length&&be<B;++be){const Le=ue.indexOf(j.charAt(be),Ce);if(Le>=0)me+=1,ce.unshift(Le),Ce=Le+1;else if(ce.length>0)break}return[me,he,...ce]}e.anyScore=O;function A(G){if(typeof G=="undefined")return[];const j=[],te=G[1];for(let Z=G.length-1;Z>1;Z--){const ue=G[Z]+te,he=j[j.length-1];he&&he.end===ue?he.end=ue+1:j.push({start:ue,end:ue+1})}return j}e.createMatches=A;const B=128;function F(){const G=[],j=[];for(let te=0;te<=B;te++)j[te]=0;for(let te=0;te<=B;te++)G.push(j.slice(0));return G}function D(G){const j=[];for(let te=0;te<=G;te++)j[te]=0;return j}const R=D(2*B),W=D(2*B),x=F(),K=F(),Y=F(),ee=!1;function se(G,j,te,Z,ue){function he(ce,me,Ce=" "){for(;ce.length<me;)ce=Ce+ce;return ce}let re=` | |${Z.split("").map(ce=>he(ce,3)).join("|")}
`;for(let ce=0;ce<=te;ce++)ce===0?re+=" |":re+=`${j[ce-1]}|`,re+=G[ce].slice(0,ue+1).map(me=>he(me.toString(),3)).join("|")+`
`;return re}function ne(G,j,te,Z){G=G.substr(j),te=te.substr(Z),console.log(se(K,G,G.length,te,te.length)),console.log(se(Y,G,G.length,te,te.length)),console.log(se(x,G,G.length,te,te.length))}function le(G,j){if(j<0||j>=G.length)return!1;const te=G.codePointAt(j);switch(te){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!N.isEmojiImprecise(te)}}function X(G,j){if(j<0||j>=G.length)return!1;switch(G.charCodeAt(j)){case 32:case 9:return!0;default:return!1}}function z(G,j,te){return j[G]!==te[G]}function P(G,j,te,Z,ue,he,re=!1){for(;j<te&&ue<he;)G[j]===Z[ue]&&(re&&(R[j]=ue),j+=1),ue+=1;return j===te}e.isPatternInWord=P;var V;(function(G){G.Default=[-100,0];function j(te){return!te||te.length===2&&te[0]===-100&&te[1]===0}G.isDefault=j})(V=e.FuzzyScore||(e.FuzzyScore={}));function U(G,j,te,Z,ue,he,re){const ce=G.length>B?B:G.length,me=Z.length>B?B:Z.length;if(!(te>=ce||he>=me||ce-te>me-he)&&!!P(j,te,ce,ue,he,me,!0)){H(ce,me,te,he,j,ue);let Ce=1,be=1,Le=te,De=he;const Re=[!1];for(Ce=1,Le=te;Le<ce;Ce++,Le++){const ye=R[Le],fe=W[Le],de=Le+1<ce?W[Le+1]:me;for(be=ye-he+1,De=ye;De<de;be++,De++){let ge=Number.MIN_SAFE_INTEGER,pe=!1;De<=fe&&(ge=$(G,j,Le,te,Z,ue,De,me,he,x[Ce-1][be-1]===0,Re));let ve=0;ge!==Number.MAX_SAFE_INTEGER&&(pe=!0,ve=ge+K[Ce-1][be-1]);const ke=De>ye,Ne=ke?K[Ce][be-1]+(x[Ce][be-1]>0?-5:0):0,Te=De>ye+1&&x[Ce][be-1]>0,Oe=Te?K[Ce][be-2]+(x[Ce][be-2]>0?-5:0):0;if(Te&&(!ke||Oe>=Ne)&&(!pe||Oe>=ve))K[Ce][be]=Oe,Y[Ce][be]=3,x[Ce][be]=0;else if(ke&&(!pe||Ne>=ve))K[Ce][be]=Ne,Y[Ce][be]=2,x[Ce][be]=0;else if(pe)K[Ce][be]=ve,Y[Ce][be]=1,x[Ce][be]=x[Ce-1][be-1]+1;else throw new Error("not possible")}}if(ee&&ne(G,te,Z,he),!(!Re[0]&&!re)){Ce--,be--;const Ee=[K[Ce][be],he];let Ae=0,Se=0;for(;Ce>=1;){let ye=be;do{const fe=Y[Ce][ye];if(fe===3)ye=ye-2;else if(fe===2)ye=ye-1;else break}while(ye>=1);Ae>1&&j[te+Ce-1]===ue[he+be-1]&&!z(ye+he-1,Z,ue)&&Ae+1>x[Ce][ye]&&(ye=be),ye===be?Ae++:Ae=1,Se||(Se=ye),Ce--,be=ye-1,Ee.push(be)}me===ce&&(Ee[0]+=2);const we=Se-ce;return Ee[0]-=we,Ee}}}e.fuzzyScore=U;function H(G,j,te,Z,ue,he){let re=G-1,ce=j-1;for(;re>=te&&ce>=Z;)ue[re]===he[ce]&&(W[re]=ce,re--),ce--}function $(G,j,te,Z,ue,he,re,ce,me,Ce,be){if(j[te]!==he[re])return Number.MIN_SAFE_INTEGER;let Le=1,De=!1;return re===te-Z?Le=G[te]===ue[re]?7:5:z(re,ue,he)&&(re===0||!z(re-1,ue,he))?(Le=G[te]===ue[re]?7:5,De=!0):le(he,re)&&(re===0||!le(he,re-1))?Le=5:(le(he,re-1)||X(he,re-1))&&(Le=5,De=!0),Le>1&&te===Z&&(be[0]=!0),De||(De=z(re,ue,he)||le(he,re-1)||X(he,re-1)),te===Z?re>me&&(Le-=De?3:5):Ce?Le+=De?2:0:Le+=De?0:1,re+1===ce&&(Le-=De?3:5),Le}function ie(G,j,te,Z,ue,he,re){return oe(G,j,te,Z,ue,he,!0,re)}e.fuzzyScoreGracefulAggressive=ie;function oe(G,j,te,Z,ue,he,re,ce){let me=U(G,j,te,Z,ue,he,ce);if(me&&!re)return me;if(G.length>=3){const Ce=Math.min(7,G.length-1);for(let be=te+1;be<Ce;be++){const Le=ae(G,be);if(Le){const De=U(Le,Le.toLowerCase(),te,Z,ue,he,ce);De&&(De[0]-=3,(!me||De[0]>me[0])&&(me=De))}}}return me}function ae(G,j){if(!(j+1>=G.length)){const te=G[j],Z=G[j+1];if(te!==Z)return G.slice(0,j)+Z+te+G.slice(j+2)}}}),define(Q[286],J([0,1,66,72,17,8]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const S=[void 0,[]];function C(r,i,n=0,t=0){const l=i;return l.values&&l.values.length>1?d(r,l.values,n,t):g(r,i,n,t)}e.scoreFuzzy2=C;function d(r,i,n,t){let l=0;const h=[];for(const m of i){const[_,f]=g(r,m,n,t);if(typeof _!="number")return S;l+=_,h.push(...f)}return[l,p(h)]}function g(r,i,n,t){const l=b.fuzzyScore(i.original,i.originalLowercase,n,r,r.toLowerCase(),t,!0);return l?[l[0],b.createMatches(l)]:S}function p(r){const i=r.sort((l,h)=>l.start-h.start),n=[];let t;for(const l of i)!t||!c(t,l)?(t=l,n.push(l)):(t.start=Math.min(t.start,l.start),t.end=Math.max(t.end,l.end));return n}function c(r,i){return!(r.end<i.start||i.end<r.start)}const o=" ";function s(r){typeof r!="string"&&(r="");const i=r.toLowerCase(),{pathNormalized:n,normalized:t,normalizedLowercase:l}=a(r),h=n.indexOf(N.sep)>=0;let m;const _=r.split(o);if(_.length>1)for(const f of _){const{pathNormalized:v,normalized:y,normalizedLowercase:L}=a(f);y&&(m||(m=[]),m.push({original:f,originalLowercase:f.toLowerCase(),pathNormalized:v,normalized:y,normalizedLowercase:L}))}return{original:r,originalLowercase:i,pathNormalized:n,normalized:t,normalizedLowercase:l,values:m,containsPathSeparator:h}}e.prepareQuery=s;function a(r){let i;M.isWindows?i=r.replace(/\//g,N.sep):i=r.replace(/\\/g,N.sep);const n=w.stripWildcards(i).replace(/\s/g,"");return{pathNormalized:i,normalized:n,normalizedLowercase:n.toLowerCase()}}function u(r){return Array.isArray(r)?s(r.map(i=>i.original).join(o)):s(r.original)}e.pieceToQuery=u}),define(Q[198],J([0,1,8,152,72,51,15]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRelativePattern=e.parse=e.match=e.splitGlobAware=void 0;const C="**",d="/",g="[/\\\\]",p="[^/\\\\]",c=/\//g;function o(R){switch(R){case 0:return"";case 1:return`${p}*?`;default:return`(?:${g}|${p}+${g}|${g}${p}+)*?`}}function s(R,W){if(!R)return[];const x=[];let K=!1,Y=!1,ee="";for(const se of R){switch(se){case W:if(!K&&!Y){x.push(ee),ee="";continue}break;case"{":K=!0;break;case"}":K=!1;break;case"[":Y=!0;break;case"]":Y=!1;break}ee+=se}return ee&&x.push(ee),x}e.splitGlobAware=s;function a(R){if(!R)return"";let W="";const x=s(R,d);if(x.every(K=>K===C))W=".*";else{let K=!1;x.forEach((Y,ee)=>{if(Y===C){K||(W+=o(2),K=!0);return}let se=!1,ne="",le=!1,X="";for(const z of Y){if(z!=="}"&&se){ne+=z;continue}if(le&&(z!=="]"||!X)){let P;z==="-"?P=z:(z==="^"||z==="!")&&!X?P="^":z===d?P="":P=b.escapeRegExpCharacters(z),X+=P;continue}switch(z){case"{":se=!0;continue;case"[":le=!0;continue;case"}":W+=`(?:${s(ne,",").map(U=>a(U)).join("|")})`,se=!1,ne="";break;case"]":W+="["+X+"]",le=!1,X="";break;case"?":W+=p;continue;case"*":W+=o(1);continue;default:W+=b.escapeRegExpCharacters(z)}}ee<x.length-1&&(x[ee+1]!==C||ee+2<x.length)&&(W+=g),K=!1})}return W}const u=/^\*\*\/\*\.[\w\.-]+$/,r=/^\*\*\/([\w\.-]+)\/?$/,i=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,n=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,t=/^\*\*((\/[\w\.-]+)+)\/?$/,l=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,h=new w.LRUCache(1e4),m=function(){return!1},_=function(){return null};function f(R,W){if(!R)return _;let x;typeof R!="string"?x=R.pattern:x=R,x=x.trim();const K=`${x}_${!!W.trimForExclusions}`;let Y=h.get(K);if(Y)return v(Y,R);let ee;if(u.test(x)){const se=x.substr(4);Y=function(ne,le){return typeof ne=="string"&&ne.endsWith(se)?x:null}}else(ee=r.exec(y(x,W)))?Y=L(ee[1],x):(W.trimForExclusions?n:i).test(x)?Y=I(x,W):(ee=t.exec(y(x,W)))?Y=k(ee[1].substr(1),x,!0):(ee=l.exec(y(x,W)))?Y=k(ee[1],x,!1):Y=E(x);return h.set(K,Y),v(Y,R)}function v(R,W){return typeof W=="string"?R:function(x,K){return N.isEqualOrParent(x,W.base)?R(M.relative(W.base,x),K):null}}function y(R,W){return W.trimForExclusions&&R.endsWith("/**")?R.substr(0,R.length-2):R}function L(R,W){const x=`/${R}`,K=`\\${R}`,Y=function(se,ne){return typeof se!="string"?null:ne?ne===R?W:null:se===R||se.endsWith(x)||se.endsWith(K)?W:null},ee=[R];return Y.basenames=ee,Y.patterns=[W],Y.allBasenames=ee,Y}function I(R,W){const x=D(R.slice(1,-1).split(",").map(ne=>f(ne,W)).filter(ne=>ne!==_),R),K=x.length;if(!K)return _;if(K===1)return x[0];const Y=function(ne,le){for(let X=0,z=x.length;X<z;X++)if(x[X](ne,le))return R;return null},ee=x.find(ne=>!!ne.allBasenames);ee&&(Y.allBasenames=ee.allBasenames);const se=x.reduce((ne,le)=>le.allPaths?ne.concat(le.allPaths):ne,[]);return se.length&&(Y.allPaths=se),Y}function k(R,W,x){const K=M.sep===M.posix.sep,Y=K?R:R.replace(c,M.sep),ee=M.sep+Y,se=M.posix.sep+R,ne=x?function(le,X){return typeof le=="string"&&(le===Y||le.endsWith(ee)||!K&&(le===R||le.endsWith(se)))?W:null}:function(le,X){return typeof le=="string"&&(le===Y||!K&&le===R)?W:null};return ne.allPaths=[(x?"*/":"./")+R],ne}function E(R){try{const W=new RegExp(`^${a(R)}$`);return function(x){return W.lastIndex=0,typeof x=="string"&&W.test(x)?R:null}}catch(W){return _}}function T(R,W,x){return!R||typeof W!="string"?!1:O(R)(W,void 0,x)}e.match=T;function O(R,W={}){if(!R)return m;if(typeof R=="string"||A(R)){const x=f(R,W);if(x===_)return m;const K=function(Y,ee){return!!x(Y,ee)};return x.allBasenames&&(K.allBasenames=x.allBasenames),x.allPaths&&(K.allPaths=x.allPaths),K}return B(R,W)}e.parse=O;function A(R){const W=R;return W&&typeof W.base=="string"&&typeof W.pattern=="string"}e.isRelativePattern=A;function B(R,W){const x=D(Object.getOwnPropertyNames(R).map(ne=>F(ne,R[ne],W)).filter(ne=>ne!==_)),K=x.length;if(!K)return _;if(!x.some(ne=>!!ne.requiresSiblings)){if(K===1)return x[0];const ne=function(z,P){for(let V=0,U=x.length;V<U;V++){const H=x[V](z,P);if(H)return H}return null},le=x.find(z=>!!z.allBasenames);le&&(ne.allBasenames=le.allBasenames);const X=x.reduce((z,P)=>P.allPaths?z.concat(P.allPaths):z,[]);return X.length&&(ne.allPaths=X),ne}const Y=function(ne,le,X){let z;for(let P=0,V=x.length;P<V;P++){const U=x[P];U.requiresSiblings&&X&&(le||(le=M.basename(ne)),z||(z=le.substr(0,le.length-M.extname(ne).length)));const H=U(ne,le,z,X);if(H)return H}return null},ee=x.find(ne=>!!ne.allBasenames);ee&&(Y.allBasenames=ee.allBasenames);const se=x.reduce((ne,le)=>le.allPaths?ne.concat(le.allPaths):ne,[]);return se.length&&(Y.allPaths=se),Y}function F(R,W,x){if(W===!1)return _;const K=f(R,x);if(K===_)return _;if(typeof W=="boolean")return K;if(W){const Y=W.when;if(typeof Y=="string"){const ee=(se,ne,le,X)=>{if(!X||!K(se,ne))return null;const z=Y.replace("$(basename)",le),P=X(z);return S.isThenable(P)?P.then(V=>V?R:null):P?R:null};return ee.requiresSiblings=!0,ee}}return K}function D(R,W){const x=R.filter(ne=>!!ne.basenames);if(x.length<2)return R;const K=x.reduce((ne,le)=>{const X=le.basenames;return X?ne.concat(X):ne},[]);let Y;if(W){Y=[];for(let ne=0,le=K.length;ne<le;ne++)Y.push(W)}else Y=x.reduce((ne,le)=>{const X=le.patterns;return X?ne.concat(X):ne},[]);const ee=function(ne,le){if(typeof ne!="string")return null;if(!le){let z;for(z=ne.length;z>0;z--){const P=ne.charCodeAt(z-1);if(P===47||P===92)break}le=ne.substr(z)}const X=K.indexOf(le);return X!==-1?Y[X]:null};ee.basenames=K,ee.patterns=Y,ee.allBasenames=K;const se=R.filter(ne=>!ne.basenames);return se.push(ee),se}}),define(Q[102],J([0,1,27,66,8]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=e.iconStartMarker=void 0,e.iconStartMarker="$(";const w=new RegExp(`\\$\\(${b.CSSIcon.iconNameExpression}(?:${b.CSSIcon.iconModifierExpression})?\\)`,"g"),S=new RegExp(`(\\\\)?${w.source}`,"g");function C(u){return u.replace(S,(r,i)=>i?r:`\\${r}`)}e.escapeIcons=C;const d=new RegExp(`\\\\${w.source}`,"g");function g(u){return u.replace(d,r=>`\\${r}`)}e.markdownEscapeEscapedIcons=g;const p=new RegExp(`(\\s)?(\\\\)?${w.source}(\\s)?`,"g");function c(u){return u.indexOf(e.iconStartMarker)===-1?u:u.replace(p,(r,i,n,t)=>n?r:i||t||"")}e.stripIcons=c;function o(u){const r=u.indexOf(e.iconStartMarker);return r===-1?{text:u}:s(u,r)}e.parseLabelWithIcons=o;function s(u,r){const i=[];let n="";function t(L){if(L){n+=L;for(const I of L)i.push(m)}}let l=-1,h="",m=0,_,f,v=r;const y=u.length;for(t(u.substr(0,r));v<y;)_=u[v],f=u[v+1],_===e.iconStartMarker[0]&&f===e.iconStartMarker[1]?(l=v,t(h),h=e.iconStartMarker,v++):_===")"&&l!==-1?(m+=v-l+1,l=-1,h=""):l!==-1?/^[a-z0-9\-]$/i.test(_)?h+=_:(t(h),l=-1,h=""):t(_),v++;return t(h),{text:n,iconOffsets:i}}function a(u,r,i=!1){const{text:n,iconOffsets:t}=r;if(!t||t.length===0)return N.matchesFuzzy(u,n,i);const l=M.ltrim(n," "),h=n.length-l.length,m=N.matchesFuzzy(u,l,i);if(m)for(const _ of m){const f=t[_.start+h]+h;_.start+=f,_.end+=f}return m}e.matchesFuzzyIconAware=a}),define(Q[73],J([0,1,19,102,12]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeMarkdownSyntaxTokens=e.markedStringsEquals=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=void 0;class w{constructor(a="",u=!1){var r,i;if(this.value=a,typeof this.value!="string")throw M.illegalArgument("value");typeof u=="boolean"?(this.isTrusted=u,this.supportThemeIcons=!1):(this.isTrusted=(r=u.isTrusted)!==null&&r!==void 0?r:void 0,this.supportThemeIcons=(i=u.supportThemeIcons)!==null&&i!==void 0?i:!1)}appendText(a,u=0){return this.value+=p(this.supportThemeIcons?N.escapeIcons(a):a).replace(/([ \t]+)/g,(r,i)=>"&nbsp;".repeat(i.length)).replace(/^>/gm,"\\>").replace(/\n/g,u===1?`\\
`:`
`),this}appendMarkdown(a){return this.value+=a,this}appendCodeblock(a,u){return this.value+="\n```",this.value+=a,this.value+=`
`,this.value+=u,this.value+="\n```\n",this}}e.MarkdownString=w;function S(s){return C(s)?!s.value:Array.isArray(s)?s.every(S):!0}e.isEmptyMarkdownString=S;function C(s){return s instanceof w?!0:s&&typeof s=="object"?typeof s.value=="string"&&(typeof s.isTrusted=="boolean"||s.isTrusted===void 0)&&(typeof s.supportThemeIcons=="boolean"||s.supportThemeIcons===void 0):!1}e.isMarkdownString=C;function d(s,a){return!s&&!a?!0:!s||!a?!1:Array.isArray(s)&&Array.isArray(a)?b.equals(s,a,g):C(s)&&C(a)?g(s,a):!1}e.markedStringsEquals=d;function g(s,a){return s===a?!0:!s||!a?!1:s.value===a.value&&s.isTrusted===a.isTrusted&&s.supportThemeIcons===a.supportThemeIcons}function p(s){return s.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=p;function c(s){return s&&s.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}e.removeMarkdownEscapes=c;function o(s){const a=[],u=s.split("|").map(i=>i.trim());s=u[0];const r=u[1];if(r){const i=/height=(\d+)/.exec(r),n=/width=(\d+)/.exec(r),t=i?i[1]:"",l=n?n[1]:"",h=isFinite(parseInt(l)),m=isFinite(parseInt(t));h&&a.push(`width="${l}"`),m&&a.push(`height="${t}"`)}return{href:s,dimensions:a}}e.parseHrefAndDimensions=o}),define(Q[199],J([0,1,101,24]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=void 0;function M(S){let C=JSON.parse(S);return C=w(C),C}e.parse=M;function w(S,C=0){if(!S||C>200)return S;if(typeof S=="object"){switch(S.$mid){case 1:return N.URI.revive(S);case 2:return new RegExp(S.source,S.flags)}if(S instanceof b.VSBuffer||S instanceof Uint8Array)return S;if(Array.isArray(S))for(let d=0;d<S.length;++d)S[d]=w(S[d],C+1);else for(const d in S)Object.hasOwnProperty.call(S,d)&&(S[d]=w(S[d],C+1))}return S}e.revive=w}),define(Q[43],J([0,1,24,17]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileAccess=e.RemoteAuthorities=e.Schemas=void 0;var M;(function(C){C.inMemory="inmemory",C.vscode="vscode",C.internal="private",C.walkThrough="walkThrough",C.walkThroughSnippet="walkThroughSnippet",C.http="http",C.https="https",C.file="file",C.mailto="mailto",C.untitled="untitled",C.data="data",C.command="command",C.vscodeRemote="vscode-remote",C.vscodeRemoteResource="vscode-remote-resource",C.userData="vscode-userdata",C.vscodeCustomEditor="vscode-custom-editor",C.vscodeNotebook="vscode-notebook",C.vscodeNotebookCell="vscode-notebook-cell",C.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",C.vscodeSettings="vscode-settings",C.vscodeWorkspaceTrust="vscode-workspace-trust",C.webviewPanel="webview-panel",C.vscodeWebview="vscode-webview",C.vscodeWebviewResource="vscode-webview-resource",C.extension="extension",C.vscodeFileResource="vscode-file"})(M=e.Schemas||(e.Schemas={}));class w{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(d){this._preferredWebSchema=d}rewrite(d){if(this._delegate)return this._delegate(d);const g=d.authority;let p=this._hosts[g];p&&p.indexOf(":")!==-1&&(p=`[${p}]`);const c=this._ports[g],o=this._connectionTokens[g];let s=`path=${encodeURIComponent(d.path)}`;return typeof o=="string"&&(s+=`&tkn=${encodeURIComponent(o)}`),b.URI.from({scheme:N.isWeb?this._preferredWebSchema:M.vscodeRemoteResource,authority:`${p}:${c}`,path:"/vscode-remote-resource",query:s})}}e.RemoteAuthorities=new w;class S{constructor(){this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(d,g,p){const c=this.toUri(d,g);return c.scheme===M.vscodeRemote?e.RemoteAuthorities.rewrite(c):N.isNative&&(p||N.isPreferringBrowserCodeLoad)&&c.scheme===M.file?c.with({scheme:M.vscodeFileResource,authority:c.authority||this.FALLBACK_AUTHORITY,query:null,fragment:null}):c}toUri(d,g){return b.URI.isUri(d)?d:b.URI.parse(g.toUrl(d))}}e.FileAccess=new S}),define(Q[7],J([0,1,35,55,56,50,15,12,6,2,17,43,151]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModifierKeyEmitter=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenNoOpener=e.computeScreenAwareSize=e.getElementsByTagName=e.hide=e.show=e.$=e.Namespace=e.reset=e.append=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.EventType=e.isHTMLElement=e.removeCSSRulesContainingSelector=e.createCSSRule=e.createStyleSheet=e.getActiveElement=e.getShadowRoot=e.isInShadowDOM=e.isShadowRoot=e.hasParentWithClass=e.findParentWithClass=e.isAncestor=e.getTotalHeight=e.getContentHeight=e.getContentWidth=e.getTotalWidth=e.StandardWindow=e.getDomNodePagePosition=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.addDisposableThrottledListener=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.addDisposableNonBubblingPointerOutListener=e.addDisposableNonBubblingMouseOutListener=e.addDisposableGenericMouseUpListner=e.addDisposableGenericMouseDownListner=e.addStandardDisposableGenericMouseDownListner=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=void 0;function s(de){for(;de.firstChild;)de.firstChild.remove()}e.clearNode=s;function a(de){var ge;return(ge=de==null?void 0:de.isConnected)!==null&&ge!==void 0?ge:!1}e.isInDOM=a;class u{constructor(ge,pe,ve,ke){this._node=ge,this._type=pe,this._handler=ve,this._options=ke||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){!this._handler||(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function r(de,ge,pe,ve){return new u(de,ge,pe,ve)}e.addDisposableListener=r;function i(de){return function(ge){return de(new w.StandardMouseEvent(ge))}}function n(de){return function(ge){return de(new M.StandardKeyboardEvent(ge))}}let t=function(ge,pe,ve,ke){let Ne=ve;return pe==="click"||pe==="mousedown"?Ne=i(ve):(pe==="keydown"||pe==="keypress"||pe==="keyup")&&(Ne=n(ve)),r(ge,pe,Ne,ke)};e.addStandardDisposableListener=t;let l=function(ge,pe,ve){let ke=i(pe);return h(ge,ke,ve)};e.addStandardDisposableGenericMouseDownListner=l;function h(de,ge,pe){return r(de,p.isIOS&&o.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,ge,pe)}e.addDisposableGenericMouseDownListner=h;function m(de,ge,pe){return r(de,p.isIOS&&o.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,ge,pe)}e.addDisposableGenericMouseUpListner=m;function _(de,ge){return r(de,"mouseout",pe=>{let ve=pe.relatedTarget;for(;ve&&ve!==de;)ve=ve.parentNode;ve!==de&&ge(pe)})}e.addDisposableNonBubblingMouseOutListener=_;function f(de,ge){return r(de,"pointerout",pe=>{let ve=pe.relatedTarget;for(;ve&&ve!==de;)ve=ve.parentNode;ve!==de&&ge(pe)})}e.addDisposableNonBubblingPointerOutListener=f;let v=null;function y(de){if(!v){const ge=pe=>setTimeout(()=>pe(new Date().getTime()),0);v=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||ge}return v.call(self,de)}class L{constructor(ge,pe=0){this._runner=ge,this.priority=pe,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(ge){C.onUnexpectedError(ge)}}static sort(ge,pe){return pe.priority-ge.priority}}(function(){let de=[],ge=null,pe=!1,ve=!1,ke=()=>{for(pe=!1,ge=de,de=[],ve=!0;ge.length>0;)ge.sort(L.sort),ge.shift().execute();ve=!1};e.scheduleAtNextAnimationFrame=(Ne,Te=0)=>{let Oe=new L(Ne,Te);return de.push(Oe),pe||(pe=!0,y(ke)),Oe},e.runAtThisOrScheduleAtNextAnimationFrame=(Ne,Te)=>{if(ve){let Oe=new L(Ne,Te);return ge.push(Oe),Oe}else return e.scheduleAtNextAnimationFrame(Ne,Te)}})();const I=8,k=function(de,ge){return ge};class E extends g.Disposable{constructor(ge,pe,ve,ke=k,Ne=I){super();let Te=null,Oe=0,Fe=this._register(new S.TimeoutTimer),Pe=()=>{Oe=new Date().getTime(),ve(Te),Te=null};this._register(r(ge,pe,xe=>{Te=ke(Te,xe);let We=new Date().getTime()-Oe;We>=Ne?(Fe.cancel(),Pe()):Fe.setIfNotSet(Pe,Ne-We)}))}}function T(de,ge,pe,ve,ke){return new E(de,ge,pe,ve,ke)}e.addDisposableThrottledListener=T;function O(de){return document.defaultView.getComputedStyle(de,null)}e.getComputedStyle=O;function A(de){if(de!==document.body)return new F(de.clientWidth,de.clientHeight);if(p.isIOS&&window.visualViewport){const ge=window.visualViewport.width,pe=window.visualViewport.height-(b.isStandalone?20+4:0);return new F(ge,pe)}if(window.innerWidth&&window.innerHeight)return new F(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new F(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new F(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=A;class B{static convertToPixels(ge,pe){return parseFloat(pe)||0}static getDimension(ge,pe,ve){let ke=O(ge),Ne="0";return ke&&(ke.getPropertyValue?Ne=ke.getPropertyValue(pe):Ne=ke.getAttribute(ve)),B.convertToPixels(ge,Ne)}static getBorderLeftWidth(ge){return B.getDimension(ge,"border-left-width","borderLeftWidth")}static getBorderRightWidth(ge){return B.getDimension(ge,"border-right-width","borderRightWidth")}static getBorderTopWidth(ge){return B.getDimension(ge,"border-top-width","borderTopWidth")}static getBorderBottomWidth(ge){return B.getDimension(ge,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(ge){return B.getDimension(ge,"padding-left","paddingLeft")}static getPaddingRight(ge){return B.getDimension(ge,"padding-right","paddingRight")}static getPaddingTop(ge){return B.getDimension(ge,"padding-top","paddingTop")}static getPaddingBottom(ge){return B.getDimension(ge,"padding-bottom","paddingBottom")}static getMarginLeft(ge){return B.getDimension(ge,"margin-left","marginLeft")}static getMarginTop(ge){return B.getDimension(ge,"margin-top","marginTop")}static getMarginRight(ge){return B.getDimension(ge,"margin-right","marginRight")}static getMarginBottom(ge){return B.getDimension(ge,"margin-bottom","marginBottom")}}class F{constructor(ge,pe){this.width=ge,this.height=pe}with(ge=this.width,pe=this.height){return ge!==this.width||pe!==this.height?new F(ge,pe):this}static is(ge){return typeof ge=="object"&&typeof ge.height=="number"&&typeof ge.width=="number"}static lift(ge){return ge instanceof F?ge:new F(ge.width,ge.height)}static equals(ge,pe){return ge===pe?!0:!ge||!pe?!1:ge.width===pe.width&&ge.height===pe.height}}e.Dimension=F;function D(de){let ge=de.offsetParent,pe=de.offsetTop,ve=de.offsetLeft;for(;(de=de.parentNode)!==null&&de!==document.body&&de!==document.documentElement;){pe-=de.scrollTop;const ke=X(de)?null:O(de);ke&&(ve-=ke.direction!=="rtl"?de.scrollLeft:-de.scrollLeft),de===ge&&(ve+=B.getBorderLeftWidth(de),pe+=B.getBorderTopWidth(de),pe+=de.offsetTop,ve+=de.offsetLeft,ge=de.offsetParent)}return{left:ve,top:pe}}e.getTopLeftOffset=D;function R(de,ge,pe){typeof ge=="number"&&(de.style.width=`${ge}px`),typeof pe=="number"&&(de.style.height=`${pe}px`)}e.size=R;function W(de){let ge=de.getBoundingClientRect();return{left:ge.left+e.StandardWindow.scrollX,top:ge.top+e.StandardWindow.scrollY,width:ge.width,height:ge.height}}e.getDomNodePagePosition=W,e.StandardWindow=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function x(de){let ge=B.getMarginLeft(de)+B.getMarginRight(de);return de.offsetWidth+ge}e.getTotalWidth=x;function K(de){let ge=B.getBorderLeftWidth(de)+B.getBorderRightWidth(de),pe=B.getPaddingLeft(de)+B.getPaddingRight(de);return de.offsetWidth-ge-pe}e.getContentWidth=K;function Y(de){let ge=B.getBorderTopWidth(de)+B.getBorderBottomWidth(de),pe=B.getPaddingTop(de)+B.getPaddingBottom(de);return de.offsetHeight-ge-pe}e.getContentHeight=Y;function ee(de){let ge=B.getMarginTop(de)+B.getMarginBottom(de);return de.offsetHeight+ge}e.getTotalHeight=ee;function se(de,ge){for(;de;){if(de===ge)return!0;de=de.parentNode}return!1}e.isAncestor=se;function ne(de,ge,pe){for(;de&&de.nodeType===de.ELEMENT_NODE;){if(de.classList.contains(ge))return de;if(pe){if(typeof pe=="string"){if(de.classList.contains(pe))return null}else if(de===pe)return null}de=de.parentNode}return null}e.findParentWithClass=ne;function le(de,ge,pe){return!!ne(de,ge,pe)}e.hasParentWithClass=le;function X(de){return de&&!!de.host&&!!de.mode}e.isShadowRoot=X;function z(de){return!!P(de)}e.isInShadowDOM=z;function P(de){for(;de.parentNode;){if(de===document.body)return null;de=de.parentNode}return X(de)?de:null}e.getShadowRoot=P;function V(){let de=document.activeElement;for(;de==null?void 0:de.shadowRoot;)de=de.shadowRoot.activeElement;return de}e.getActiveElement=V;function U(de=document.getElementsByTagName("head")[0]){let ge=document.createElement("style");return ge.type="text/css",ge.media="screen",de.appendChild(ge),ge}e.createStyleSheet=U;let H=null;function $(){return H||(H=U()),H}function ie(de){var ge,pe;return((ge=de==null?void 0:de.sheet)===null||ge===void 0?void 0:ge.rules)?de.sheet.rules:((pe=de==null?void 0:de.sheet)===null||pe===void 0?void 0:pe.cssRules)?de.sheet.cssRules:[]}function oe(de,ge,pe=$()){!pe||!ge||pe.sheet.insertRule(de+"{"+ge+"}",0)}e.createCSSRule=oe;function ae(de,ge=$()){if(!!ge){let pe=ie(ge),ve=[];for(let ke=0;ke<pe.length;ke++)pe[ke].selectorText.indexOf(de)!==-1&&ve.push(ke);for(let ke=ve.length-1;ke>=0;ke--)ge.sheet.deleteRule(ve[ke])}}e.removeCSSRulesContainingSelector=ae;function G(de){return typeof HTMLElement=="object"?de instanceof HTMLElement:de&&typeof de=="object"&&de.nodeType===1&&typeof de.nodeName=="string"}e.isHTMLElement=G,e.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",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",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:b.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:b.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:b.isWebKit?"webkitAnimationIteration":"animationiteration"},e.EventHelper={stop:function(de,ge){de.preventDefault?de.preventDefault():de.returnValue=!1,ge&&(de.stopPropagation?de.stopPropagation():de.cancelBubble=!0)}};function j(de){let ge=[];for(let pe=0;de&&de.nodeType===de.ELEMENT_NODE;pe++)ge[pe]=de.scrollTop,de=de.parentNode;return ge}e.saveParentsScrollTop=j;function te(de,ge){for(let pe=0;de&&de.nodeType===de.ELEMENT_NODE;pe++)de.scrollTop!==ge[pe]&&(de.scrollTop=ge[pe]),de=de.parentNode}e.restoreParentsScrollTop=te;class Z extends g.Disposable{constructor(ge){super();this._onDidFocus=this._register(new d.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new d.Emitter),this.onDidBlur=this._onDidBlur.event;let pe=se(document.activeElement,ge),ve=!1;const ke=()=>{ve=!1,pe||(pe=!0,this._onDidFocus.fire())},Ne=()=>{pe&&(ve=!0,window.setTimeout(()=>{ve&&(ve=!1,pe=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{se(document.activeElement,ge)!==pe&&(pe?Ne():ke())},this._register(N.domEvent(ge,e.EventType.FOCUS,!0)(ke)),this._register(N.domEvent(ge,e.EventType.BLUR,!0)(Ne))}}function ue(de){return new Z(de)}e.trackFocus=ue;function he(de,...ge){if(de.append(...ge),ge.length===1&&typeof ge[0]!="string")return ge[0]}e.append=he;function re(de,...ge){de.innerText="",he(de,...ge)}e.reset=re;const ce=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var me;(function(de){de.HTML="http://www.w3.org/1999/xhtml",de.SVG="http://www.w3.org/2000/svg"})(me=e.Namespace||(e.Namespace={}));function Ce(de,ge,pe,...ve){let ke=ce.exec(ge);if(!ke)throw new Error("Bad use of emmet");pe=Object.assign({},pe||{});let Ne=ke[1]||"div",Te;return de!==me.HTML?Te=document.createElementNS(de,Ne):Te=document.createElement(Ne),ke[3]&&(Te.id=ke[3]),ke[4]&&(Te.className=ke[4].replace(/\./g," ").trim()),Object.keys(pe).forEach(Oe=>{const Fe=pe[Oe];typeof Fe!="undefined"&&(/^on\w+$/.test(Oe)?Te[Oe]=Fe:Oe==="selected"?Fe&&Te.setAttribute(Oe,"true"):Te.setAttribute(Oe,Fe))}),Te.append(...ve),Te}function be(de,ge,...pe){return Ce(me.HTML,de,ge,...pe)}e.$=be,be.SVG=function(de,ge,...pe){return Ce(me.SVG,de,ge,...pe)};function Le(...de){for(let ge of de)ge.style.display="",ge.removeAttribute("aria-hidden")}e.show=Le;function De(...de){for(let ge of de)ge.style.display="none",ge.setAttribute("aria-hidden","true")}e.hide=De;function Re(de){return Array.prototype.slice.call(document.getElementsByTagName(de),0)}e.getElementsByTagName=Re;function Ee(de){const ge=window.devicePixelRatio*de;return Math.max(1,Math.floor(ge))/window.devicePixelRatio}e.computeScreenAwareSize=Ee;function Ae(de){if(b.isElectron||b.isEdgeLegacyWebView)window.open(de);else{let ge=window.open();ge&&(ge.opener=null,ge.location.href=de)}}e.windowOpenNoOpener=Ae;function Se(de){const ge=()=>{de(),pe=e.scheduleAtNextAnimationFrame(ge)};let pe=e.scheduleAtNextAnimationFrame(ge);return g.toDisposable(()=>pe.dispose())}e.animate=Se,c.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function we(de){return de?`url('${c.FileAccess.asBrowserUri(de).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=we;function ye(de){return`'${de.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=ye;class fe extends d.Emitter{constructor(){super();this._subscriptions=new g.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(N.domEvent(window,"keydown",!0)(ge=>{const pe=new M.StandardKeyboardEvent(ge);if(!(pe.keyCode===6&&ge.repeat)){if(ge.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(ge.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(ge.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(ge.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(pe.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=ge.altKey,this._keyStatus.ctrlKey=ge.ctrlKey,this._keyStatus.metaKey=ge.metaKey,this._keyStatus.shiftKey=ge.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=ge,this.fire(this._keyStatus))}})),this._subscriptions.add(N.domEvent(window,"keyup",!0)(ge=>{!ge.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!ge.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!ge.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!ge.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=ge.altKey,this._keyStatus.ctrlKey=ge.ctrlKey,this._keyStatus.metaKey=ge.metaKey,this._keyStatus.shiftKey=ge.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=ge,this.fire(this._keyStatus))})),this._subscriptions.add(N.domEvent(document.body,"mousedown",!0)(ge=>{this._keyStatus.lastKeyPressed=void 0})),this._subscriptions.add(N.domEvent(document.body,"mouseup",!0)(ge=>{this._keyStatus.lastKeyPressed=void 0})),this._subscriptions.add(N.domEvent(document.body,"mousemove",!0)(ge=>{ge.buttons&&(this._keyStatus.lastKeyPressed=void 0)})),this._subscriptions.add(N.domEvent(window,"blur")(ge=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return fe.instance||(fe.instance=new fe),fe.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=fe}),define(Q[156],J([0,1,7]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function N(c,o={}){const s=w(o);return s.textContent=c,s}e.renderText=N;function M(c,o={}){const s=w(o);return C(s,d(c),o.actionHandler),s}e.renderFormattedText=M;function w(c){const o=c.inline?"span":"div",s=document.createElement(o);return c.className&&(s.className=c.className),s}e.createElement=w;class S{constructor(o){this.source=o,this.index=0}eos(){return this.index>=this.source.length}next(){const o=this.peek();return this.advance(),o}peek(){return this.source[this.index]}advance(){this.index++}}function C(c,o,s){let a;if(o.type===2)a=document.createTextNode(o.content||"");else if(o.type===3)a=document.createElement("b");else if(o.type===4)a=document.createElement("i");else if(o.type===5&&s){const u=document.createElement("a");u.href="#",s.disposeables.add(b.addStandardDisposableListener(u,"click",r=>{s.callback(String(o.index),r)})),a=u}else o.type===7?a=document.createElement("br"):o.type===1&&(a=c);a&&c!==a&&c.appendChild(a),a&&Array.isArray(o.children)&&o.children.forEach(u=>{C(a,u,s)})}function d(c){const o={type:1,children:[]};let s=0,a=o;const u=[],r=new S(c);for(;!r.eos();){let i=r.next();const n=i==="\\"&&p(r.peek())!==0;if(n&&(i=r.next()),!n&&g(i)&&i===r.peek()){r.advance(),a.type===2&&(a=u.pop());const t=p(i);if(a.type===t||a.type===5&&t===6)a=u.pop();else{const l={type:t,children:[]};t===5&&(l.index=s,s++),a.children.push(l),u.push(a),a=l}}else if(i===`
`)a.type===2&&(a=u.pop()),a.children.push({type:7});else if(a.type!==2){const t={type:2,content:i};a.children.push(t),u.push(a),a=t}else a.content+=i}return a.type===2&&(a=u.pop()),u.length,o}function g(c){return p(c)!==0}function p(c){switch(c){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}}),define(Q[90],J([0,1,7,193,50,2]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalMouseMoveMonitor=e.standardMouseMoveMerger=void 0;function S(d,g){let p=new M.StandardMouseEvent(g);return p.preventDefault(),{leftButton:p.leftButton,buttons:p.buttons,posx:p.posx,posy:p.posy}}e.standardMouseMoveMerger=S;class C{constructor(){this._hooks=new w.DisposableStore,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(g,p){if(!!this.isMonitoring()){this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const c=this._onStopCallback;this._onStopCallback=null,g&&c&&c(p)}}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(g,p,c,o,s){if(!this.isMonitoring()){this._mouseMoveEventMerger=c,this._mouseMoveCallback=o,this._onStopCallback=s;const a=N.IframeUtils.getSameOriginWindowChain(),u="mousemove",r="mouseup",i=a.map(t=>t.window.document),n=b.getShadowRoot(g);n&&i.unshift(n);for(const t of i)this._hooks.add(b.addDisposableThrottledListener(t,u,l=>{if(l.buttons!==p){this.stopMonitoring(!0);return}this._mouseMoveCallback(l)},(l,h)=>this._mouseMoveEventMerger(l,h))),this._hooks.add(b.addDisposableListener(t,r,l=>this.stopMonitoring(!0)));if(N.IframeUtils.hasDifferentOriginAncestor()){let t=a[a.length-1];this._hooks.add(b.addDisposableListener(t.window.document,"mouseout",l=>{new M.StandardMouseEvent(l).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(b.addDisposableListener(t.window.document,"mouseover",l=>{new M.StandardMouseEvent(l).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(b.addDisposableListener(t.window.document.body,"mouseleave",l=>{this.stopMonitoring(!0)}))}}}}e.GlobalMouseMoveMonitor=C});var Me=this&&this.__decorate||function(q,e,b,N){var M=arguments.length,w=M<3?e:N===null?N=Object.getOwnPropertyDescriptor(e,b):N,S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(q,e,b,N);else for(var C=q.length-1;C>=0;C--)(S=q[C])&&(w=(M<3?S(w):M>3?S(e,b,w):S(e,b))||w);return M>3&&w&&Object.defineProperty(e,b,w),w};define(Q[60],J([0,1,19,2,7,99]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var S;(function(d){d.Tap="-monaco-gesturetap",d.Change="-monaco-gesturechange",d.Start="-monaco-gesturestart",d.End="-monaco-gesturesend",d.Contextmenu="-monaco-gesturecontextmenu"})(S=e.EventType||(e.EventType={}));class C extends N.Disposable{constructor(){super();this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(M.addDisposableListener(document,"touchstart",g=>this.onTouchStart(g),{passive:!1})),this._register(M.addDisposableListener(document,"touchend",g=>this.onTouchEnd(g))),this._register(M.addDisposableListener(document,"touchmove",g=>this.onTouchMove(g),{passive:!1}))}static addTarget(g){return C.isTouchDevice()?(C.INSTANCE||(C.INSTANCE=new C),C.INSTANCE.targets.push(g),{dispose:()=>{C.INSTANCE.targets=C.INSTANCE.targets.filter(p=>p!==g)}}):N.Disposable.None}static ignoreTarget(g){return C.isTouchDevice()?(C.INSTANCE||(C.INSTANCE=new C),C.INSTANCE.ignoreTargets.push(g),{dispose:()=>{C.INSTANCE.ignoreTargets=C.INSTANCE.ignoreTargets.filter(p=>p!==g)}}):N.Disposable.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(g){let p=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let c=0,o=g.targetTouches.length;c<o;c++){let s=g.targetTouches.item(c);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:p,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[p],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};let a=this.newGestureEvent(S.Start,s.target);a.pageX=s.pageX,a.pageY=s.pageY,this.dispatchEvent(a)}this.dispatched&&(g.preventDefault(),g.stopPropagation(),this.dispatched=!1)}onTouchEnd(g){let p=Date.now(),c=Object.keys(this.activeTouches).length;for(let o=0,s=g.changedTouches.length;o<s;o++){let a=g.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(a.identifier))){console.warn("move of an UNKNOWN touch",a);continue}let u=this.activeTouches[a.identifier],r=Date.now()-u.initialTimeStamp;if(r<C.HOLD_DELAY&&Math.abs(u.initialPageX-b.tail(u.rollingPageX))<30&&Math.abs(u.initialPageY-b.tail(u.rollingPageY))<30){let i=this.newGestureEvent(S.Tap,u.initialTarget);i.pageX=b.tail(u.rollingPageX),i.pageY=b.tail(u.rollingPageY),this.dispatchEvent(i)}else if(r>=C.HOLD_DELAY&&Math.abs(u.initialPageX-b.tail(u.rollingPageX))<30&&Math.abs(u.initialPageY-b.tail(u.rollingPageY))<30){let i=this.newGestureEvent(S.Contextmenu,u.initialTarget);i.pageX=b.tail(u.rollingPageX),i.pageY=b.tail(u.rollingPageY),this.dispatchEvent(i)}else if(c===1){let i=b.tail(u.rollingPageX),n=b.tail(u.rollingPageY),t=b.tail(u.rollingTimestamps)-u.rollingTimestamps[0],l=i-u.rollingPageX[0],h=n-u.rollingPageY[0];const m=this.targets.filter(_=>u.initialTarget instanceof Node&&_.contains(u.initialTarget));this.inertia(m,p,Math.abs(l)/t,l>0?1:-1,i,Math.abs(h)/t,h>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(S.End,u.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(g.preventDefault(),g.stopPropagation(),this.dispatched=!1)}newGestureEvent(g,p){let c=document.createEvent("CustomEvent");return c.initEvent(g,!1,!0),c.initialTarget=p,c.tapCount=0,c}dispatchEvent(g){if(g.type===S.Tap){const p=new Date().getTime();let c=0;p-this._lastSetTapCountTime>C.CLEAR_TAP_COUNT_TIME?c=1:c=2,this._lastSetTapCountTime=p,g.tapCount=c}else(g.type===S.Change||g.type===S.Contextmenu)&&(this._lastSetTapCountTime=0);for(let p=0;p<this.ignoreTargets.length;p++)if(g.initialTarget instanceof Node&&this.ignoreTargets[p].contains(g.initialTarget))return;this.targets.forEach(p=>{g.initialTarget instanceof Node&&p.contains(g.initialTarget)&&(p.dispatchEvent(g),this.dispatched=!0)})}inertia(g,p,c,o,s,a,u,r){this.handle=M.scheduleAtNextAnimationFrame(()=>{let i=Date.now(),n=i-p,t=0,l=0,h=!0;c+=C.SCROLL_FRICTION*n,a+=C.SCROLL_FRICTION*n,c>0&&(h=!1,t=o*c*n),a>0&&(h=!1,l=u*a*n);let m=this.newGestureEvent(S.Change);m.translationX=t,m.translationY=l,g.forEach(_=>_.dispatchEvent(m)),h||this.inertia(g,i,c,o,s+t,a,u,r+l)})}onTouchMove(g){let p=Date.now();for(let c=0,o=g.changedTouches.length;c<o;c++){let s=g.changedTouches.item(c);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("end of an UNKNOWN touch",s);continue}let a=this.activeTouches[s.identifier],u=this.newGestureEvent(S.Change,a.initialTarget);u.translationX=s.pageX-b.tail(a.rollingPageX),u.translationY=s.pageY-b.tail(a.rollingPageY),u.pageX=s.pageX,u.pageY=s.pageY,this.dispatchEvent(u),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(s.pageX),a.rollingPageY.push(s.pageY),a.rollingTimestamps.push(p)}this.dispatched&&(g.preventDefault(),g.stopPropagation(),this.dispatched=!1)}}C.SCROLL_FRICTION=-.005,C.HOLD_DELAY=700,C.CLEAR_TAP_COUNT_TIME=400,Me([w.memoize],C,"isTouchDevice",null),e.Gesture=C}),define(Q[103],J([0,1,7,27]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const M=new RegExp(`(\\\\)?\\$\\((${N.CSSIcon.iconNameExpression}(?:${N.CSSIcon.iconModifierExpression})?)\\)`,"g");function w(C){const d=new Array;let g,p=0,c=0;for(;(g=M.exec(C))!==null;){c=g.index||0,d.push(C.substring(p,c)),p=(g.index||0)+g[0].length;const[,o,s]=g;d.push(o?`$(${s})`:S({id:s}))}return p<C.length&&d.push(C.substring(p)),d}e.renderLabelWithIcons=w;function S(C){const d=b.$("span");return d.classList.add(...N.CSSIcon.asClassNameArray(C)),d}e.renderIcon=S}),define(Q[157],J([0,1,40,7,103]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class w{constructor(C,d){this.supportIcons=d,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",C.appendChild(this.domNode)}get element(){return this.domNode}set(C,d=[],g="",p){C||(C=""),p&&(C=w.escapeNewLines(C,d)),!(this.didEverRender&&this.text===C&&this.title===g&&b.equals(this.highlights,d))&&(this.text=C,this.title=g,this.highlights=d,this.render())}render(){const C=[];let d=0;for(const g of this.highlights)if(g.end!==g.start){if(d<g.start){const o=this.text.substring(d,g.start);C.push(N.$("span",void 0,...this.supportIcons?M.renderLabelWithIcons(o):[o])),d=g.end}const p=this.text.substring(g.start,g.end),c=N.$("span.highlight",void 0,...this.supportIcons?M.renderLabelWithIcons(p):[p]);g.extraClasses&&c.classList.add(g.extraClasses),C.push(c),d=g.end}if(d<this.text.length){const g=this.text.substring(d);C.push(N.$("span",void 0,...this.supportIcons?M.renderLabelWithIcons(g):[g]))}N.reset(this.domNode,...C),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(C,d){let g=0,p=0;return C.replace(/\r\n|\r|\n/g,(c,o)=>{p=c===`\r
`?-1:0,o+=g;for(const s of d)s.end<=o||(s.start>=o&&(s.start+=p),s.end>=o&&(s.end+=p));return g+=p,"\u23CE"})}}e.HighlightedLabel=w}),define(Q[287],J([0,1,7]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function N(w){try{w.parentElement&&w.parentElement.removeChild(w)}catch(S){}}class M{constructor(S){this.renderers=S,this.cache=new Map}alloc(S){let C=this.getTemplateCache(S).pop();if(!C){const d=b.$(".monaco-list-row"),p=this.getRenderer(S).renderTemplate(d);C={domNode:d,templateId:S,templateData:p}}return C}release(S){!S||this.releaseRow(S)}releaseRow(S){const{domNode:C,templateId:d}=S;C&&(C.classList.remove("scrolling"),N(C)),this.getTemplateCache(d).push(S)}getTemplateCache(S){let C=this.cache.get(S);return C||(C=[],this.cache.set(S,C)),C}dispose(){this.cache.forEach((S,C)=>{for(const d of S)this.getRenderer(C).disposeTemplate(d.templateData),d.templateData=null}),this.cache.clear()}getRenderer(S){const C=this.renderers.get(S);if(!C)throw new Error(`No renderer found for ${S}`);return C}}e.RowCache=M}),define(Q[52],J([0,1,7,56,50,2,60]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class C extends w.Disposable{onclick(g,p){this._register(b.addDisposableListener(g,b.EventType.CLICK,c=>p(new M.StandardMouseEvent(c))))}onmousedown(g,p){this._register(b.addDisposableListener(g,b.EventType.MOUSE_DOWN,c=>p(new M.StandardMouseEvent(c))))}onmouseover(g,p){this._register(b.addDisposableListener(g,b.EventType.MOUSE_OVER,c=>p(new M.StandardMouseEvent(c))))}onnonbubblingmouseout(g,p){this._register(b.addDisposableNonBubblingMouseOutListener(g,c=>p(new M.StandardMouseEvent(c))))}onkeydown(g,p){this._register(b.addDisposableListener(g,b.EventType.KEY_DOWN,c=>p(new N.StandardKeyboardEvent(c))))}onkeyup(g,p){this._register(b.addDisposableListener(g,b.EventType.KEY_UP,c=>p(new N.StandardKeyboardEvent(c))))}oninput(g,p){this._register(b.addDisposableListener(g,b.EventType.INPUT,p))}onblur(g,p){this._register(b.addDisposableListener(g,b.EventType.BLUR,p))}onfocus(g,p){this._register(b.addDisposableListener(g,b.EventType.FOCUS,p))}ignoreGesture(g){S.Gesture.ignoreTarget(g)}}e.Widget=C}),define(Q[158],J([0,1,90,52,15]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarArrow=e.ARROW_IMG_SIZE=void 0,e.ARROW_IMG_SIZE=11;class w extends N.Widget{constructor(C){super();this._onActivate=C.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=C.bgWidth+"px",this.bgDomNode.style.height=C.bgHeight+"px",typeof C.top!="undefined"&&(this.bgDomNode.style.top="0px"),typeof C.left!="undefined"&&(this.bgDomNode.style.left="0px"),typeof C.bottom!="undefined"&&(this.bgDomNode.style.bottom="0px"),typeof C.right!="undefined"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=C.className,this.domNode.classList.add(...C.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=e.ARROW_IMG_SIZE+"px",this.domNode.style.height=e.ARROW_IMG_SIZE+"px",typeof C.top!="undefined"&&(this.domNode.style.top=C.top+"px"),typeof C.left!="undefined"&&(this.domNode.style.left=C.left+"px"),typeof C.bottom!="undefined"&&(this.domNode.style.bottom=C.bottom+"px"),typeof C.right!="undefined"&&(this.domNode.style.right=C.right+"px"),this._mouseMoveMonitor=this._register(new b.GlobalMouseMoveMonitor),this.onmousedown(this.bgDomNode,d=>this._arrowMouseDown(d)),this.onmousedown(this.domNode,d=>this._arrowMouseDown(d)),this._mousedownRepeatTimer=this._register(new M.IntervalTimer),this._mousedownScheduleRepeatTimer=this._register(new M.TimeoutTimer)}_arrowMouseDown(C){const d=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(d,200),this._mouseMoveMonitor.startMonitoring(C.target,C.buttons,b.standardMouseMoveMerger,g=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),C.preventDefault()}}e.ScrollbarArrow=w}),define(Q[200],J([0,1,7,30,90,158,282,52,17]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const g=140;class p extends C.Widget{constructor(o){super();this._lazyRender=o.lazyRender,this._host=o.host,this._scrollable=o.scrollable,this._scrollByPage=o.scrollByPage,this._scrollbarState=o.scrollbarState,this._visibilityController=this._register(new S.ScrollbarVisibilityController(o.visibility,"visible scrollbar "+o.extraScrollbarClassName,"invisible scrollbar "+o.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new M.GlobalMouseMoveMonitor),this._shouldRender=!0,this.domNode=N.createFastDomNode(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,s=>this._domNodeMouseDown(s))}_createArrow(o){const s=this._register(new w.ScrollbarArrow(o));this.domNode.domNode.appendChild(s.bgDomNode),this.domNode.domNode.appendChild(s.domNode)}_createSlider(o,s,a,u){this.slider=N.createFastDomNode(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(o),this.slider.setLeft(s),typeof a=="number"&&this.slider.setWidth(a),typeof u=="number"&&this.slider.setHeight(u),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,r=>{r.leftButton&&(r.preventDefault(),this._sliderMouseDown(r,()=>{}))}),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(o){return this._scrollbarState.setVisibleSize(o)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(o){return this._scrollbarState.setScrollSize(o)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(o){return this._scrollbarState.setScrollPosition(o)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){!this._shouldRender||(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(o){o.target===this.domNode.domNode&&this._onMouseDown(o)}delegateMouseDown(o){const s=this.domNode.domNode.getClientRects()[0].top,a=s+this._scrollbarState.getSliderPosition(),u=s+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderMousePosition(o);a<=r&&r<=u?o.leftButton&&(o.preventDefault(),this._sliderMouseDown(o,()=>{})):this._onMouseDown(o)}_onMouseDown(o){let s,a;if(o.target===this.domNode.domNode&&typeof o.browserEvent.offsetX=="number"&&typeof o.browserEvent.offsetY=="number")s=o.browserEvent.offsetX,a=o.browserEvent.offsetY;else{const r=b.getDomNodePagePosition(this.domNode.domNode);s=o.posx-r.left,a=o.posy-r.top}const u=this._mouseDownRelativePosition(s,a);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(u):this._scrollbarState.getDesiredScrollPositionFromOffset(u)),o.leftButton&&(o.preventDefault(),this._sliderMouseDown(o,()=>{}))}_sliderMouseDown(o,s){const a=this._sliderMousePosition(o),u=this._sliderOrthogonalMousePosition(o),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(o.target,o.buttons,M.standardMouseMoveMerger,i=>{const n=this._sliderOrthogonalMousePosition(i),t=Math.abs(n-u);if(d.isWindows&&t>g){this._setDesiredScrollPositionNow(r.getScrollPosition());return}const h=this._sliderMousePosition(i)-a;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(h))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),s()}),this._host.onDragStart()}_setDesiredScrollPositionNow(o){const s={};this.writeScrollPosition(s,o),this._scrollable.setScrollPositionNow(s)}updateScrollbarSize(o){this._updateScrollbarSize(o),this._scrollbarState.setScrollbarSize(o),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=p}),define(Q[288],J([0,1,50,200,158,194,27]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;const C=S.registerCodicon("scrollbar-button-left",S.Codicon.triangleLeft),d=S.registerCodicon("scrollbar-button-right",S.Codicon.triangleRight);class g extends N.AbstractScrollbar{constructor(c,o,s){const a=c.getScrollDimensions(),u=c.getCurrentScrollPosition();super({lazyRender:o.lazyRender,host:s,scrollbarState:new w.ScrollbarState(o.horizontalHasArrows?o.arrowSize:0,o.horizontal===2?0:o.horizontalScrollbarSize,o.vertical===2?0:o.verticalScrollbarSize,a.width,a.scrollWidth,u.scrollLeft),visibility:o.horizontal,extraScrollbarClassName:"horizontal",scrollable:c,scrollByPage:o.scrollByPage});if(o.horizontalHasArrows){const r=(o.arrowSize-M.ARROW_IMG_SIZE)/2,i=(o.horizontalScrollbarSize-M.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:C,top:i,left:r,bottom:void 0,right:void 0,bgWidth:o.arrowSize,bgHeight:o.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new b.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:d,top:i,left:void 0,bottom:void 0,right:r,bgWidth:o.arrowSize,bgHeight:o.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new b.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((o.horizontalScrollbarSize-o.horizontalSliderSize)/2),0,void 0,o.horizontalSliderSize)}_updateSlider(c,o){this.slider.setWidth(c),this.slider.setLeft(o)}_renderDomNode(c,o){this.domNode.setWidth(c),this.domNode.setHeight(o),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(c){return this._shouldRender=this._onElementScrollSize(c.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(c.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(c.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(c,o){return c}_sliderMousePosition(c){return c.posx}_sliderOrthogonalMousePosition(c){return c.posy}_updateScrollbarSize(c){this.slider.setHeight(c)}writeScrollPosition(c,o){c.scrollLeft=o}}e.HorizontalScrollbar=g}),define(Q[289],J([0,1,50,200,158,194,27]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;const C=S.registerCodicon("scrollbar-button-up",S.Codicon.triangleUp),d=S.registerCodicon("scrollbar-button-down",S.Codicon.triangleDown);class g extends N.AbstractScrollbar{constructor(c,o,s){const a=c.getScrollDimensions(),u=c.getCurrentScrollPosition();super({lazyRender:o.lazyRender,host:s,scrollbarState:new w.ScrollbarState(o.verticalHasArrows?o.arrowSize:0,o.vertical===2?0:o.verticalScrollbarSize,0,a.height,a.scrollHeight,u.scrollTop),visibility:o.vertical,extraScrollbarClassName:"vertical",scrollable:c,scrollByPage:o.scrollByPage});if(o.verticalHasArrows){const r=(o.arrowSize-M.ARROW_IMG_SIZE)/2,i=(o.verticalScrollbarSize-M.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:C,top:r,left:i,bottom:void 0,right:void 0,bgWidth:o.verticalScrollbarSize,bgHeight:o.arrowSize,onActivate:()=>this._host.onMouseWheel(new b.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:d,top:void 0,left:i,bottom:r,right:void 0,bgWidth:o.verticalScrollbarSize,bgHeight:o.arrowSize,onActivate:()=>this._host.onMouseWheel(new b.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((o.verticalScrollbarSize-o.verticalSliderSize)/2),o.verticalSliderSize,void 0)}_updateSlider(c,o){this.slider.setHeight(c),this.slider.setTop(o)}_renderDomNode(c,o){this.domNode.setWidth(o),this.domNode.setHeight(c),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(c){return this._shouldRender=this._onElementScrollSize(c.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(c.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(c.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(c,o){return o}_sliderMousePosition(c){return c.posy}_sliderOrthogonalMousePosition(c){return c.posx}_updateScrollbarSize(c){this.slider.setWidth(c)}writeScrollPosition(c,o){c.scrollTop=o}}e.VerticalScrollbar=g}),define(Q[44],J([0,1,152,72,24,8,43]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataUri=e.resolvePath=e.normalizePath=e.joinPath=e.dirname=e.basename=e.basenameOrAuthority=e.isEqual=e.extUri=e.ExtUri=e.originalFSPath=void 0;function C(p){return M.uriToFsPath(p,!0)}e.originalFSPath=C;class d{constructor(c){this._ignorePathCasing=c}compare(c,o,s=!1){return c===o?0:w.compare(this.getComparisonKey(c,s),this.getComparisonKey(o,s))}isEqual(c,o,s=!1){return c===o?!0:!c||!o?!1:this.getComparisonKey(c,s)===this.getComparisonKey(o,s)}getComparisonKey(c,o=!1){return c.with({path:this._ignorePathCasing(c)?c.path.toLowerCase():void 0,fragment:o?null:void 0}).toString()}joinPath(c,...o){return M.URI.joinPath(c,...o)}basenameOrAuthority(c){return e.basename(c)||c.authority}basename(c){return N.posix.basename(c.path)}dirname(c){if(c.path.length===0)return c;let o;return c.scheme===S.Schemas.file?o=M.URI.file(N.dirname(C(c))).path:(o=N.posix.dirname(c.path),c.authority&&o.length&&o.charCodeAt(0)!==47&&(console.error(`dirname("${c.toString})) resulted in a relative path`),o="/")),c.with({path:o})}normalizePath(c){if(!c.path.length)return c;let o;return c.scheme===S.Schemas.file?o=M.URI.file(N.normalize(C(c))).path:o=N.posix.normalize(c.path),c.with({path:o})}resolvePath(c,o){if(c.scheme===S.Schemas.file){const s=M.URI.file(N.resolve(C(c),o));return c.with({authority:s.authority,path:s.path})}return o.indexOf("/")===-1&&(o=b.toSlashes(o),/^[a-zA-Z]:(\/|$)/.test(o)&&(o="/"+o)),c.with({path:N.posix.resolve(c.path,o)})}}e.ExtUri=d,e.extUri=new d(()=>!1),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri);var g;(function(p){p.META_DATA_LABEL="label",p.META_DATA_DESCRIPTION="description",p.META_DATA_SIZE="size",p.META_DATA_MIME="mime";function c(o){const s=new Map;o.path.substring(o.path.indexOf(";")+1,o.path.lastIndexOf(";")).split(";").forEach(r=>{const[i,n]=r.split(":");i&&n&&s.set(i,n)});const u=o.path.substring(0,o.path.indexOf(";"));return u&&s.set(p.META_DATA_MIME,u),s}p.parseMetaData=c})(g=e.DataUri||(e.DataUri={}))}),define(Q[290],J([0,1,7,156,12,73,119,684,685,199,40,8,24,43,102,44,50,103,6,55]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdown=void 0;const h=(l=window.trustedTypes)===null||l===void 0?void 0:l.createPolicy("insane",{createHTML(v,y){return d.insane(v,y)}});function m(v,y={},L={}){var I;const k=N.createElement(y),E=function(R){let W;try{W=g.parse(decodeURIComponent(R))}catch(x){}return W?(W=p.cloneAndChange(W,x=>{if(v.uris&&v.uris[x])return o.URI.revive(v.uris[x])}),encodeURIComponent(JSON.stringify(W))):R},T=function(R,W){const x=v.uris&&v.uris[R];if(!x)return R;let K=o.URI.revive(x);return o.URI.parse(R).toString()===K.toString()?R:W?s.FileAccess.asBrowserUri(K).toString(!0):(K.query&&(K=K.with({query:E(K.query)})),K.toString())};let O;const A=new Promise(R=>O=R),B=new C.Renderer;B.image=(R,W,x)=>{let K=[],Y=[];if(R){({href:R,dimensions:K}=w.parseHrefAndDimensions(R)),R=T(R,!0);try{const ee=o.URI.parse(R);y.baseUrl&&ee.scheme===s.Schemas.file&&(R=u.resolvePath(y.baseUrl,R).toString())}catch(ee){}Y.push(`src="${R}"`)}return x&&Y.push(`alt="${x}"`),W&&Y.push(`title="${W}"`),K.length&&(Y=Y.concat(K)),"<img "+Y.join(" ")+">"},B.link=(R,W,x)=>(R===x&&(x=w.removeMarkdownEscapes(x)),R=T(R,!1),y.baseUrl&&(/^\w[\w\d+.-]*:/.test(R)||(R=u.resolvePath(y.baseUrl,R).toString())),W=w.removeMarkdownEscapes(W),R=w.removeMarkdownEscapes(R),!R||R.match(/^data:|javascript:/i)||R.match(/^command:/i)&&!v.isTrusted||R.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?x:(R=R.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),`<a href="#" data-href="${R}" title="${W||R}">${x}</a>`)),B.paragraph=R=>(v.supportThemeIcons&&(R=i.renderLabelWithIcons(R).map(x=>typeof x=="string"?x:x.outerHTML).join("")),`<p>${R}</p>`),y.codeBlockRenderer&&(B.code=(R,W)=>{const x=y.codeBlockRenderer(W,R),K=S.defaultGenerator.nextId(),Y=Promise.all([x,A]).then(ee=>{const se=k.querySelector(`div[data-code="${K}"]`);se&&b.reset(se,ee[0])}).catch(ee=>{});return y.asyncRenderCallback&&Y.then(y.asyncRenderCallback),`<div class="code" data-code="${K}">${c.escape(R)}</div>`}),y.actionHandler&&y.actionHandler.disposeables.add(n.Event.any(t.domEvent(k,"click"),t.domEvent(k,"auxclick"))(R=>{const W=new r.StandardMouseEvent(R);if(!(!W.leftButton&&!W.middleButton)){let x=W.target;if(!(x.tagName!=="A"&&(x=x.parentElement,!x||x.tagName!=="A")))try{const K=x.dataset.href;K&&y.actionHandler.callback(K,W)}catch(K){M.onUnexpectedError(K)}finally{W.preventDefault()}}})),L.sanitizer=R=>(v.isTrusted?R.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?R:"",L.sanitize=!0,L.silent=!0,L.renderer=B;let F=(I=v.value)!==null&&I!==void 0?I:"";F.length>1e5&&(F=`${F.substr(0,1e5)}\u2026`),v.supportThemeIcons&&(F=a.markdownEscapeEscapedIcons(F));const D=C.parse(F,L);if(k.innerHTML=_(v,D),O(),y.asyncRenderCallback)for(const R of k.getElementsByTagName("img")){const W=b.addDisposableListener(R,"load",()=>{W.dispose(),y.asyncRenderCallback()})}return k}e.renderMarkdown=m;function _(v,y){var L;const I=f(v);return(L=h==null?void 0:h.createHTML(y,I))!==null&&L!==void 0?L:d.insane(y,I)}function f(v){const y=[s.Schemas.http,s.Schemas.https,s.Schemas.mailto,s.Schemas.data,s.Schemas.file,s.Schemas.vscodeRemote,s.Schemas.vscodeRemoteResource];return v.isTrusted&&y.push(s.Schemas.command),{allowedSchemes:y,allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter(L){return L.tag==="span"&&v.isTrusted?L.attrs.style&&Object.keys(L.attrs).length===1?!!L.attrs.style.match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):L.attrs.class?!!L.attrs.class.match(/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/):!1:!0}}}}),define(Q[159],J([0,1,24,43,17,44,152]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=e.getBaseLabel=void 0;function C(g){if(!!g){typeof g=="string"&&(g=b.URI.file(g));const p=w.basename(g)||(g.scheme===N.Schemas.file?g.fsPath:g.path);return M.isWindows&&S.isRootOrDriveLetter(p)?d(p):p}}e.getBaseLabel=C;function d(g){return S.hasDriveLetter(g)?g.charAt(0).toUpperCase()+g.slice(1):g}e.normalizeDriveLetter=d}),define(Q[291],J([0,1,72,8,198,43,44]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessMimeTypes=e.registerTextMime=e.MIME_UNKNOWN=e.MIME_TEXT=void 0,e.MIME_TEXT="text/plain",e.MIME_UNKNOWN="application/unknown";let C=[],d=[],g=[];function p(u,r=!1){const i=c(u);C.push(i),i.userConfigured?g.push(i):d.push(i),r&&!i.userConfigured&&C.forEach(n=>{n.mime===i.mime||n.userConfigured||(i.extension&&n.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&n.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&n.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&n.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}e.registerTextMime=p;function c(u){return{id:u.id,mime:u.mime,filename:u.filename,extension:u.extension,filepattern:u.filepattern,firstline:u.firstline,userConfigured:u.userConfigured,filenameLowercase:u.filename?u.filename.toLowerCase():void 0,extensionLowercase:u.extension?u.extension.toLowerCase():void 0,filepatternLowercase:u.filepattern?u.filepattern.toLowerCase():void 0,filepatternOnPath:u.filepattern?u.filepattern.indexOf(b.posix.sep)>=0:!1}}function o(u,r){let i;if(u)switch(u.scheme){case w.Schemas.file:i=u.fsPath;break;case w.Schemas.data:i=S.DataUri.parseMetaData(u).get(S.DataUri.META_DATA_LABEL);break;default:i=u.path}if(!i)return[e.MIME_UNKNOWN];i=i.toLowerCase();const n=b.basename(i),t=s(i,n,g);if(t)return[t,e.MIME_TEXT];const l=s(i,n,d);if(l)return[l,e.MIME_TEXT];if(r){const h=a(r);if(h)return[h,e.MIME_TEXT]}return[e.MIME_UNKNOWN]}e.guessMimeTypes=o;function s(u,r,i){let n=null,t=null,l=null;for(let h=i.length-1;h>=0;h--){const m=i[h];if(r===m.filenameLowercase){n=m;break}if(m.filepattern&&(!t||m.filepattern.length>t.filepattern.length)){const _=m.filepatternOnPath?u:r;M.match(m.filepatternLowercase,_)&&(t=m)}m.extension&&(!l||m.extension.length>l.extension.length)&&r.endsWith(m.extensionLowercase)&&(l=m)}return n?n.mime:t?t.mime:l?l.mime:null}function a(u){if(N.startsWithUTF8BOM(u)&&(u=u.substr(1)),u.length>0)for(let r=C.length-1;r>=0;r--){const i=C[r];if(!!i.firstline){const n=u.match(i.firstline);if(n&&n.length>0)return i.mime}}return null}}),define(Q[292],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0;const b=new Uint8Array(16),N=[];for(let S=0;S<256;S++)N.push(S.toString(16).padStart(2,"0"));let M;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?M=crypto.getRandomValues.bind(crypto):M=function(S){for(let C=0;C<S.length;C++)S[C]=Math.floor(Math.random()*256);return S};function w(){M(b),b[6]=b[6]&15|64,b[8]=b[8]&63|128;let S=0,C="";return C+=N[b[S++]],C+=N[b[S++]],C+=N[b[S++]],C+=N[b[S++]],C+="-",C+=N[b[S++]],C+=N[b[S++]],C+="-",C+=N[b[S++]],C+=N[b[S++]],C+="-",C+=N[b[S++]],C+=N[b[S++]],C+="-",C+=N[b[S++]],C+=N[b[S++]],C+=N[b[S++]],C+=N[b[S++]],C+=N[b[S++]],C+=N[b[S++]],C}e.generateUuid=w}),define(Q[201],J([0,1,12,2,17,20]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const S="$initialize";let C=!1;function d(s){!M.isWeb||(C||(C=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(s.message))}e.logOnceWebWorkerWarning=d;class g{constructor(a){this._workerId=-1,this._handler=a,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(a){this._workerId=a}sendMessage(a,u){let r=String(++this._lastSentReq);return new Promise((i,n)=>{this._pendingReplies[r]={resolve:i,reject:n},this._send({vsWorker:this._workerId,req:r,method:a,args:u})})}handleMessage(a){!a||!a.vsWorker||this._workerId!==-1&&a.vsWorker!==this._workerId||this._handleMessage(a)}_handleMessage(a){if(a.seq){let n=a;if(!this._pendingReplies[n.seq]){console.warn("Got reply to unknown seq");return}let t=this._pendingReplies[n.seq];if(delete this._pendingReplies[n.seq],n.err){let l=n.err;n.err.$isError&&(l=new Error,l.name=n.err.name,l.message=n.err.message,l.stack=n.err.stack),t.reject(l);return}t.resolve(n.res);return}let u=a,r=u.req;this._handler.handleMessage(u.method,u.args).then(n=>{this._send({vsWorker:this._workerId,seq:r,res:n,err:void 0})},n=>{n.detail instanceof Error&&(n.detail=b.transformErrorForSerialization(n.detail)),this._send({vsWorker:this._workerId,seq:r,res:void 0,err:b.transformErrorForSerialization(n)})})}_send(a){let u=[];if(a.req){const r=a;for(let i=0;i<r.args.length;i++)r.args[i]instanceof ArrayBuffer&&u.push(r.args[i])}else{const r=a;r.res instanceof ArrayBuffer&&u.push(r.res)}this._handler.sendMessage(a,u)}}class p extends N.Disposable{constructor(a,u,r){super();let i=null;this._worker=this._register(a.create("vs/base/common/worker/simpleWorker",h=>{this._protocol.handleMessage(h)},h=>{i&&i(h)})),this._protocol=new g({sendMessage:(h,m)=>{this._worker.postMessage(h,m)},handleMessage:(h,m)=>{if(typeof r[h]!="function")return Promise.reject(new Error("Missing method "+h+" on main thread host."));try{return Promise.resolve(r[h].apply(r,m))}catch(_){return Promise.reject(_)}}}),this._protocol.setWorkerId(this._worker.getId());let n=null;typeof self.require!="undefined"&&typeof self.require.getConfig=="function"?n=self.require.getConfig():typeof self.requirejs!="undefined"&&(n=self.requirejs.s.contexts._.config);const t=w.getAllMethodNames(r);this._onModuleLoaded=this._protocol.sendMessage(S,[this._worker.getId(),JSON.parse(JSON.stringify(n)),u,t]);const l=(h,m)=>this._request(h,m);this._lazyProxy=new Promise((h,m)=>{i=m,this._onModuleLoaded.then(_=>{h(w.createProxyObject(_,l))},_=>{m(_),this._onError("Worker failed to load "+u,_)})})}getProxyObject(){return this._lazyProxy}_request(a,u){return new Promise((r,i)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(a,u).then(r,i)},i)})}_onError(a,u){console.error(a),console.info(u)}}e.SimpleWorkerClient=p;class c{constructor(a,u){this._requestHandlerFactory=u,this._requestHandler=null,this._protocol=new g({sendMessage:(r,i)=>{a(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i)})}onmessage(a){this._protocol.handleMessage(a)}_handleMessage(a,u){if(a===S)return this.initialize(u[0],u[1],u[2],u[3]);if(!this._requestHandler||typeof this._requestHandler[a]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+a));try{return Promise.resolve(this._requestHandler[a].apply(this._requestHandler,u))}catch(r){return Promise.reject(r)}}initialize(a,u,r,i){this._protocol.setWorkerId(a);const n=(l,h)=>this._protocol.sendMessage(l,h),t=w.createProxyObject(i,n);return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(t),Promise.resolve(w.getAllMethodNames(this._requestHandler))):(u&&(typeof u.baseUrl!="undefined"&&delete u.baseUrl,typeof u.paths!="undefined"&&typeof u.paths.vs!="undefined"&&delete u.paths.vs,typeof u.trustedTypesPolicy!==void 0&&delete u.trustedTypesPolicy,u.catchError=!0,self.require.config(u)),new Promise((l,h)=>{self.require([r],m=>{if(this._requestHandler=m.create(t),!this._requestHandler){h(new Error("No RequestHandler!"));return}l(w.getAllMethodNames(this._requestHandler))},h)}))}}e.SimpleWorkerServer=c;function o(s){return new c(s,null)}e.create=o}),define(Q[202],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ItemActivation=e.NO_KEY_MODS=void 0,e.NO_KEY_MODS={ctrlCmd:!1,alt:!1};var b;(function(N){N[N.NONE=0]="NONE",N[N.FIRST=1]="FIRST",N[N.SECOND=2]="SECOND",N[N.LAST=3]="LAST"})(b=e.ItemActivation||(e.ItemActivation={}))}),define(Q[293],J([0,1,2,6,15,20]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=void 0;var S;(function(g){g[g.None=0]="None",g[g.Initialized=1]="Initialized",g[g.Closed=2]="Closed"})(S||(S={}));class C extends b.Disposable{constructor(p,c=Object.create(null)){super();this.database=p,this.options=c,this._onDidChangeStorage=this._register(new N.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=S.None,this.cache=new Map,this.flushDelayer=new M.ThrottledDelayer(C.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(p=>this.onDidChangeItemsExternal(p)))}onDidChangeItemsExternal(p){var c,o;(c=p.changed)===null||c===void 0||c.forEach((s,a)=>this.accept(a,s)),(o=p.deleted)===null||o===void 0||o.forEach(s=>this.accept(s,void 0))}accept(p,c){if(this.state!==S.Closed){let o=!1;w.isUndefinedOrNull(c)?o=this.cache.delete(p):this.cache.get(p)!==c&&(this.cache.set(p,c),o=!0),o&&this._onDidChangeStorage.fire(p)}}get(p,c){const o=this.cache.get(p);return w.isUndefinedOrNull(o)?c:o}getBoolean(p,c){const o=this.get(p);return w.isUndefinedOrNull(o)?c:o==="true"}getNumber(p,c){const o=this.get(p);return w.isUndefinedOrNull(o)?c:parseInt(o,10)}set(p,c){return Ie(this,void 0,void 0,function*(){if(this.state!==S.Closed){if(w.isUndefinedOrNull(c))return this.delete(p);const o=String(c);if(this.cache.get(p)!==o)return this.cache.set(p,o),this.pendingInserts.set(p,o),this.pendingDeletes.delete(p),this._onDidChangeStorage.fire(p),this.flushDelayer.trigger(()=>this.flushPending())}})}delete(p){return Ie(this,void 0,void 0,function*(){if(this.state!==S.Closed&&!!this.cache.delete(p))return this.pendingDeletes.has(p)||this.pendingDeletes.add(p),this.pendingInserts.delete(p),this._onDidChangeStorage.fire(p),this.flushDelayer.trigger(()=>this.flushPending())})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return Ie(this,void 0,void 0,function*(){if(!!this.hasPending){const p={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(p).finally(()=>{var c;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(c=this.whenFlushedCallbacks.pop())===null||c===void 0||c()})}})}dispose(){this.flushDelayer.cancel(),this.flushDelayer.dispose(),super.dispose()}}e.Storage=C,C.DEFAULT_FLUSH_DELAY=100;class d{constructor(){this.onDidChangeItemsExternal=N.Event.None,this.items=new Map}updateItems(p){return Ie(this,void 0,void 0,function*(){p.insert&&p.insert.forEach((c,o)=>this.items.set(o,c)),p.delete&&p.delete.forEach(c=>this.items.delete(c))})}}e.InMemoryStorageDatabase=d}),define(Q[294],J([0,1,17,201]),function(q,e,b,N){"use strict";var M;Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const w=(M=window.trustedTypes)===null||M===void 0?void 0:M.createPolicy("defaultWorkerFactory",{createScriptURL:c=>c});function S(c,o){if(b.globals.MonacoEnvironment){if(typeof b.globals.MonacoEnvironment.getWorker=="function")return b.globals.MonacoEnvironment.getWorker(c,o);if(typeof b.globals.MonacoEnvironment.getWorkerUrl=="function"){const s=b.globals.MonacoEnvironment.getWorkerUrl(c,o);return new Worker(w?w.createScriptURL(s):s,{name:o})}}if(typeof q=="function"){const s=q.toUrl("./"+c),a=C(s,o);return new Worker(w?w.createScriptURL(a):a,{name:o})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function C(c,o,s=!1){if(s||/^((http:)|(https:)|(file:))/.test(c)){const a=String(window.location),u=a.substr(0,a.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(s||c.substring(0,u.length)!==u){const r="vs/base/worker/defaultWorkerFactory.js",i=q.toUrl(r).slice(0,-r.length),n=`/*${o}*/self.MonacoEnvironment={baseUrl: '${i}'};importScripts('${c}');/*${o}*/`;if(s)return`data:text/javascript;charset=utf-8,${encodeURIComponent(n)}`;const t=new Blob([n],{type:"application/javascript"});return URL.createObjectURL(t)}}return c+"#"+o}e.getWorkerBootstrapUrl=C;function d(c){return typeof c.then=="function"}class g{constructor(o,s,a,u,r){this.id=s;const i=S("workerMain.js",a);d(i)?this.worker=i:this.worker=Promise.resolve(i),this.postMessage(o,[]),this.worker.then(n=>{n.onmessage=function(t){u(t.data)},n.onmessageerror=r,typeof n.addEventListener=="function"&&n.addEventListener("error",r)})}getId(){return this.id}postMessage(o,s){this.worker&&this.worker.then(a=>a.postMessage(o,s))}dispose(){this.worker&&this.worker.then(o=>o.terminate()),this.worker=null}}class p{constructor(o){this._label=o,this._webWorkerFailedBeforeError=!1}create(o,s,a){let u=++p.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new g(o,u,this._label||"anonymous"+u,s,r=>{N.logOnceWebWorkerWarning(r),this._webWorkerFailedBeforeError=r,a(r)})}}e.DefaultWorkerFactory=p,p.LAST_WORKER_ID=0}),define(Q[203],J([10]),{}),define(Q[295],J([10]),{}),define(Q[47],J([0,1,17,7,295]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const M=2e4;let w,S,C,d,g;function p(a){w=document.createElement("div"),w.className="monaco-aria-container";const u=()=>{const i=document.createElement("div");return i.className="monaco-alert",i.setAttribute("role","alert"),i.setAttribute("aria-atomic","true"),w.appendChild(i),i};S=u(),C=u();const r=()=>{const i=document.createElement("div");return i.className="monaco-status",i.setAttribute("role","complementary"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),w.appendChild(i),i};d=r(),g=r(),a.appendChild(w)}e.setARIAContainer=p;function c(a){!w||(S.textContent!==a?(N.clearNode(C),s(S,a)):(N.clearNode(S),s(C,a)))}e.alert=c;function o(a){!w||(b.isMacintosh?c(a):d.textContent!==a?(N.clearNode(g),s(d,a)):(N.clearNode(d),s(g,a)))}e.status=o;function s(a,u){N.clearNode(a),u.length>M&&(u=u.substr(0,M)),a.textContent=u,a.style.visibility="hidden",a.style.visibility="visible"}}),define(Q[296],J([10]),{}),define(Q[297],J([0,1,56,29,40,6,2,60,103,7,296]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;const p={buttonBackground:N.Color.fromHex("#0E639C"),buttonHoverBackground:N.Color.fromHex("#006BB3"),buttonForeground:N.Color.white};class c extends S.Disposable{constructor(s,a){super();this._onDidClick=this._register(new w.Emitter),this.options=a||Object.create(null),M.mixin(this.options,p,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),s.appendChild(this._element),this._register(C.Gesture.addTarget(this._element)),[g.EventType.CLICK,C.EventType.Tap].forEach(u=>{this._register(g.addDisposableListener(this._element,u,r=>{if(!this.enabled){g.EventHelper.stop(r);return}this._onDidClick.fire(r)}))}),this._register(g.addDisposableListener(this._element,g.EventType.KEY_DOWN,u=>{const r=new b.StandardKeyboardEvent(u);let i=!1;this.enabled&&(r.equals(3)||r.equals(10))?(this._onDidClick.fire(u),i=!0):r.equals(9)&&(this._element.blur(),i=!0),i&&g.EventHelper.stop(r,!0)})),this._register(g.addDisposableListener(this._element,g.EventType.MOUSE_OVER,u=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(g.addDisposableListener(this._element,g.EventType.MOUSE_OUT,u=>{this.applyStyles()})),this.focusTracker=this._register(g.trackFocus(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let s;this.options.secondary?s=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:s=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,s&&(this._element.style.backgroundColor=s)}style(s){this.buttonForeground=s.buttonForeground,this.buttonBackground=s.buttonBackground,this.buttonHoverBackground=s.buttonHoverBackground,this.buttonSecondaryForeground=s.buttonSecondaryForeground,this.buttonSecondaryBackground=s.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=s.buttonSecondaryHoverBackground,this.buttonBorder=s.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let s,a;this.options.secondary?(a=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",s=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(a=this.buttonForeground?this.buttonForeground.toString():"",s=this.buttonBackground?this.buttonBackground.toString():"");const u=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=a,this._element.style.backgroundColor=s,this._element.style.borderWidth=u?"1px":"",this._element.style.borderStyle=u?"solid":"",this._element.style.borderColor=u}}get element(){return this._element}set label(s){this._element.classList.add("monaco-text-button"),this.options.supportIcons?g.reset(this._element,...d.renderLabelWithIcons(s)):this._element.textContent=s,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=s)}set enabled(s){s?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}e.Button=c}),define(Q[298],J([10]),{}),define(Q[160],J([0,1,52,29,6,27,298]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=void 0;const S={inputActiveOptionBorder:N.Color.fromHex("#007ACC00"),inputActiveOptionForeground:N.Color.fromHex("#FFFFFF"),inputActiveOptionBackground:N.Color.fromHex("#0E639C50")};class C extends b.Widget{constructor(g){super();this._onChange=this._register(new M.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new M.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},S),g),this._checked=this._opts.isChecked;const p=["monaco-custom-checkbox"];this._opts.icon&&p.push(...w.CSSIcon.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&p.push(...this._opts.actionClassName.split(" ")),this._checked&&p.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...p),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,c=>{this.checked=!this._checked,this._onChange.fire(!1),c.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,c=>{if(c.keyCode===10||c.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),c.preventDefault();return}this._onKeyDown.fire(c)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(g){this._checked=g,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(g){g.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=g.inputActiveOptionBorder),g.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=g.inputActiveOptionForeground),g.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=g.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}e.Checkbox=C}),define(Q[299],J([10]),{}),define(Q[300],J([10]),{}),define(Q[123],J([0,1,27,299,300]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=void 0;function N(M){let w=M.definition;for(;w instanceof b.Codicon;)w=w.definition;return`.codicon-${M.id}:before { content: '${w.fontCharacter}'; }`}e.formatRule=N}),define(Q[301],J([10]),{}),define(Q[204],J([0,1,7,17,2,120,151,301]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=void 0;var C;(function(c){c[c.AVOID=0]="AVOID",c[c.ALIGN=1]="ALIGN"})(C=e.LayoutAnchorMode||(e.LayoutAnchorMode={}));function d(c,o,s){const a=s.mode===C.ALIGN?s.offset:s.offset+s.size,u=s.mode===C.ALIGN?s.offset+s.size:s.offset;return s.position===0?o<=c-a?a:o<=u?u-o:Math.max(c-o,0):o<=u?u-o:o<=c-a?a:0}e.layout=d;class g extends M.Disposable{constructor(o,s){super();this.container=null,this.delegate=null,this.toDisposeOnClean=M.Disposable.None,this.toDisposeOnSetContainer=M.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=b.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,b.hide(this.view),this.setContainer(o,s),this._register(M.toDisposable(()=>this.setContainer(null,1)))}setContainer(o,s){var a;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(a=this.shadowRootHostElement)===null||a===void 0||a.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),o){if(this.container=o,this.useFixedPosition=s!==1,this.useShadowDOM=s===3,this.useShadowDOM){this.shadowRootHostElement=b.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const r=document.createElement("style");r.textContent=p,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(b.$("slot"))}else this.container.appendChild(this.view);const u=new M.DisposableStore;g.BUBBLE_UP_EVENTS.forEach(r=>{u.add(b.addStandardDisposableListener(this.container,r,i=>{this.onDOMEvent(i,!1)}))}),g.BUBBLE_DOWN_EVENTS.forEach(r=>{u.add(b.addStandardDisposableListener(this.container,r,i=>{this.onDOMEvent(i,!0)},!0))}),this.toDisposeOnSetContainer=u}}show(o){this.isVisible()&&this.hide(),b.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",b.show(this.view),this.toDisposeOnClean=o.render(this.view)||M.Disposable.None,this.delegate=o,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(!!this.isVisible()){if(this.delegate.canRelayout===!1&&!(N.isIOS&&S.BrowserFeatures.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!!this.isVisible()){let o=this.delegate.getAnchor(),s;if(b.isHTMLElement(o)){let m=b.getDomNodePagePosition(o);s={top:m.top,left:m.left,width:m.width,height:m.height}}else s={top:o.y,left:o.x,width:o.width||1,height:o.height||2};const a=b.getTotalWidth(this.view),u=b.getTotalHeight(this.view),r=this.delegate.anchorPosition||0,i=this.delegate.anchorAlignment||0,n=this.delegate.anchorAxisAlignment||0;let t,l;if(n===0){const m={offset:s.top-window.pageYOffset,size:s.height,position:r===0?0:1},_={offset:s.left,size:s.width,position:i===0?0:1,mode:C.ALIGN};t=d(window.innerHeight,u,m)+window.pageYOffset,w.Range.intersects({start:t,end:t+u},{start:m.offset,end:m.offset+m.size})&&(_.mode=C.AVOID),l=d(window.innerWidth,a,_)}else{const m={offset:s.left,size:s.width,position:i===0?0:1},_={offset:s.top,size:s.height,position:r===0?0:1,mode:C.ALIGN};l=d(window.innerWidth,a,m),w.Range.intersects({start:l,end:l+a},{start:m.offset,end:m.offset+m.size})&&(_.mode=C.AVOID),t=d(window.innerHeight,u,_)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(i===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const h=b.getDomNodePagePosition(this.container);this.view.style.top=`${t-(this.useFixedPosition?b.getDomNodePagePosition(this.view).top:h.top)}px`,this.view.style.left=`${l-(this.useFixedPosition?b.getDomNodePagePosition(this.view).left:h.left)}px`,this.view.style.width="initial"}}hide(o){const s=this.delegate;this.delegate=null,(s==null?void 0:s.onHide)&&s.onHide(o),this.toDisposeOnClean.dispose(),b.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(o,s){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(o,document.activeElement):s&&!b.isAncestor(o.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}e.ContextView=g,g.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],g.BUBBLE_DOWN_EVENTS=["click"];let p=`
:host {
all: initial; /* 1st rule so subsequent properties are reset. */
}
@font-face {
font-family: "codicon";
src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");
}
.codicon[class*='codicon-'] {
font: normal normal normal 16px/1 codicon;
display: inline-block;
text-decoration: none;
text-rendering: auto;
text-align: center;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
:host {
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
}
:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
`}),define(Q[302],J([10]),{}),define(Q[205],J([0,1,7,8,29,40,302]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;const S={badgeBackground:M.Color.fromHex("#4D4D4D"),badgeForeground:M.Color.fromHex("#FFFFFF")};class C{constructor(g,p){this.count=0,this.options=p||Object.create(null),w.mixin(this.options,S,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=b.append(g,b.$(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(g){this.count=g,this.render()}setTitleFormat(g){this.titleFormat=g,this.render()}render(){this.element.textContent=N.format(this.countFormat,this.count),this.element.title=N.format(this.titleFormat,this.count),this.applyStyles()}style(g){this.badgeBackground=g.badgeBackground,this.badgeForeground=g.badgeForeground,this.badgeBorder=g.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const g=this.badgeBackground?this.badgeBackground.toString():"",p=this.badgeForeground?this.badgeForeground.toString():"",c=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=g,this.element.style.color=p,this.element.style.borderWidth=c?"1px":"",this.element.style.borderStyle=c?"solid":"",this.element.style.borderColor=c}}}e.CountBadge=C}),define(Q[206],J([10]),{}),define(Q[207],J([10]),{}),define(Q[303],J([10]),{}),define(Q[304],J([10]),{}),define(Q[305],J([10]),{}),define(Q[306],J([10]),{}),define(Q[208],J([10]),{}),define(Q[307],J([10]),{}),define(Q[124],J([0,1,307]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME=void 0,e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME="monaco-mouse-cursor-text"}),define(Q[308],J([10]),{}),define(Q[309],J([0,1,2,29,40,7,15,308]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const C="done",d="active",g="infinite",p="discrete",c={progressBarBackground:N.Color.fromHex("#0E70C0")};class o extends b.Disposable{constructor(a,u){super();this.options=u||Object.create(null),M.mixin(this.options,c,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new S.RunOnceScheduler(()=>w.show(this.element),0)),this.create(a)}create(a){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),a.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(d,g,p),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(a){return this.element.classList.add(C),this.element.classList.contains(g)?(this.bit.style.opacity="0",a?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",a?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(p,C),this.element.classList.add(d,g),this}getContainer(){return this.element}style(a){this.progressBarBackground=a.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const a=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=a}}}e.ProgressBar=o}),define(Q[310],J([10]),{}),define(Q[104],J([0,1,2,17,20,60,50,6,7,55,15,310]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;let c=!1;var o;(function(r){r.North="north",r.South="south",r.East="east",r.West="west"})(o=e.OrthogonalEdge||(e.OrthogonalEdge={}));let s=4;const a=new C.Emitter;class u extends b.Disposable{constructor(i,n,t){super();this.hoverDelayer=this._register(new p.Delayer(300)),this._state=3,this._onDidEnablementChange=this._register(new C.Emitter),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new C.Emitter),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new C.Emitter),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new C.Emitter),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new C.Emitter),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new b.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new b.DisposableStore),this.orthogonalEndSashDisposables=this._register(new b.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new b.DisposableStore),this.el=d.append(i,d.$(".monaco-sash")),t.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${t.orthogonalEdge}`),N.isMacintosh&&this.el.classList.add("mac"),this._register(g.domEvent(this.el,"mousedown")(this.onMouseDown,this)),this._register(g.domEvent(this.el,"dblclick")(this.onMouseDoubleClick,this)),this._register(g.domEvent(this.el,"mouseenter")(()=>u.onMouseEnter(this))),this._register(g.domEvent(this.el,"mouseleave")(()=>u.onMouseLeave(this))),this._register(w.Gesture.addTarget(this.el)),this._register(g.domEvent(this.el,w.EventType.Start)(this.onTouchStart,this)),typeof t.size=="number"?(this.size=t.size,t.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=s,this._register(a.event(l=>{this.size=l,this.layout()}))),this.hidden=!1,this.layoutProvider=n,this.orthogonalStartSash=t.orthogonalStartSash,this.orthogonalEndSash=t.orthogonalEndSash,this.orientation=t.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",c),this.layout()}get state(){return this._state}set state(i){this._state!==i&&(this.el.classList.toggle("disabled",i===0),this.el.classList.toggle("minimum",i===1),this.el.classList.toggle("maximum",i===2),this._state=i,this._onDidEnablementChange.fire(i))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(i){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),i){const n=t=>{this.orthogonalStartDragHandleDisposables.clear(),t!==0&&(this._orthogonalStartDragHandle=d.append(this.el,d.$(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(b.toDisposable(()=>this._orthogonalStartDragHandle.remove())),g.domEvent(this._orthogonalStartDragHandle,"mouseenter")(()=>u.onMouseEnter(i),void 0,this.orthogonalStartDragHandleDisposables),g.domEvent(this._orthogonalStartDragHandle,"mouseleave")(()=>u.onMouseLeave(i),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(i.onDidEnablementChange(n,this)),n(i.state)}this._orthogonalStartSash=i}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(i){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),i){const n=t=>{this.orthogonalEndDragHandleDisposables.clear(),t!==0&&(this._orthogonalEndDragHandle=d.append(this.el,d.$(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(b.toDisposable(()=>this._orthogonalEndDragHandle.remove())),g.domEvent(this._orthogonalEndDragHandle,"mouseenter")(()=>u.onMouseEnter(i),void 0,this.orthogonalEndDragHandleDisposables),g.domEvent(this._orthogonalEndDragHandle,"mouseleave")(()=>u.onMouseLeave(i),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(i.onDidEnablementChange(n,this)),n(i.state)}this._orthogonalEndSash=i}onMouseDown(i){d.EventHelper.stop(i,!1);let n=!1;if(!i.__orthogonalSashEvent){const E=this.getOrthogonalSash(i);E&&(n=!0,i.__orthogonalSashEvent=!0,E.onMouseDown(i))}if(this.linkedSash&&!i.__linkedSashEvent&&(i.__linkedSashEvent=!0,this.linkedSash.onMouseDown(i)),!!this.state){const t=[...d.getElementsByTagName("iframe"),...d.getElementsByTagName("webview")];for(const E of t)E.style.pointerEvents="none";const l=new S.StandardMouseEvent(i),h=l.posx,m=l.posy,_=l.altKey,f={startX:h,currentX:h,startY:m,currentY:m,altKey:_};this.el.classList.add("active"),this._onDidStart.fire(f);const v=d.createStyleSheet(this.el),y=()=>{let E="";n?E="all-scroll":this.orientation===1?this.state===1?E="s-resize":this.state===2?E="n-resize":E=N.isMacintosh?"row-resize":"ns-resize":this.state===1?E="e-resize":this.state===2?E="w-resize":E=N.isMacintosh?"col-resize":"ew-resize",v.textContent=`* { cursor: ${E} !important; }`},L=new b.DisposableStore;y(),n||this.onDidEnablementChange(y,null,L);const I=E=>{d.EventHelper.stop(E,!1);const T=new S.StandardMouseEvent(E),O={startX:h,currentX:T.posx,startY:m,currentY:T.posy,altKey:_};this._onDidChange.fire(O)},k=E=>{d.EventHelper.stop(E,!1),this.el.removeChild(v),this.el.classList.remove("active"),this._onDidEnd.fire(),L.dispose();for(const T of t)T.style.pointerEvents="auto"};g.domEvent(window,"mousemove")(I,null,L),g.domEvent(window,"mouseup")(k,null,L)}}onMouseDoubleClick(i){const n=this.getOrthogonalSash(i);n&&n._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}onTouchStart(i){d.EventHelper.stop(i);const n=[],t=i.pageX,l=i.pageY,h=i.altKey;this._onDidStart.fire({startX:t,currentX:t,startY:l,currentY:l,altKey:h}),n.push(d.addDisposableListener(this.el,w.EventType.Change,m=>{M.isNumber(m.pageX)&&M.isNumber(m.pageY)&&this._onDidChange.fire({startX:t,currentX:m.pageX,startY:l,currentY:m.pageY,altKey:h})})),n.push(d.addDisposableListener(this.el,w.EventType.End,()=>{this._onDidEnd.fire(),b.dispose(n)}))}static onMouseEnter(i,n=!1){i.el.classList.contains("active")?(i.hoverDelayer.cancel(),i.el.classList.add("hover")):i.hoverDelayer.trigger(()=>i.el.classList.add("hover")),!n&&i.linkedSash&&u.onMouseEnter(i.linkedSash,!0)}static onMouseLeave(i,n=!1){i.hoverDelayer.cancel(),i.el.classList.remove("hover"),!n&&i.linkedSash&&u.onMouseLeave(i.linkedSash,!0)}layout(){if(this.orientation===0){const i=this.layoutProvider;this.el.style.left=i.getVerticalSashLeft(this)-this.size/2+"px",i.getVerticalSashTop&&(this.el.style.top=i.getVerticalSashTop(this)+"px"),i.getVerticalSashHeight&&(this.el.style.height=i.getVerticalSashHeight(this)+"px")}else{const i=this.layoutProvider;this.el.style.top=i.getHorizontalSashTop(this)-this.size/2+"px",i.getHorizontalSashLeft&&(this.el.style.left=i.getHorizontalSashLeft(this)+"px"),i.getHorizontalSashWidth&&(this.el.style.width=i.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(i){if(!(!i.target||!(i.target instanceof HTMLElement))&&i.target.classList.contains("orthogonal-drag-handle"))return i.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=u}),define(Q[311],J([10]),{}),define(Q[61],J([0,1,7,30,50,288,289,52,15,6,2,17,121,35,311]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const a=500,u=50,r=!0;class i{constructor(v,y,L){this.timestamp=v,this.deltaX=y,this.deltaY=L,this.score=0}}class n{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let v=1,y=0,L=1,I=this._rear;do{const k=I===this._front?v:Math.pow(2,-L);if(v-=k,y+=this._memory[I].score*k,I===this._front)break;I=(this._capacity+I-1)%this._capacity,L++}while(!0);return y<=.5}accept(v,y,L){const I=new i(v,y,L);I.score=this._computeScore(I),this._front===-1&&this._rear===-1?(this._memory[0]=I,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=I)}_computeScore(v){if(Math.abs(v.deltaX)>0&&Math.abs(v.deltaY)>0)return 1;let y=.5;const L=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(v.deltaX)||!this._isAlmostInt(v.deltaY))&&(y+=.25),Math.min(Math.max(y,0),1)}_isAlmostInt(v){return Math.abs(Math.round(v)-v)<.01}}e.MouseWheelClassifier=n,n.INSTANCE=new n;class t extends C.Widget{constructor(v,y,L){super();this._onScroll=this._register(new g.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new g.Emitter),v.style.overflow="hidden",this._options=_(y),this._scrollable=L,this._register(this._scrollable.onScroll(k=>{this._onWillScroll.fire(k),this._onDidScroll(k),this._onScroll.fire(k)}));const I={onMouseWheel:k=>this._onMouseWheel(k),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new S.VerticalScrollbar(this._scrollable,this._options,I)),this._horizontalScrollbar=this._register(new w.HorizontalScrollbar(this._scrollable,this._options,I)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(v),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=N.createFastDomNode(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=N.createFastDomNode(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=N.createFastDomNode(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,k=>this._onMouseOver(k)),this.onnonbubblingmouseout(this._listenOnDomNode,k=>this._onMouseOut(k)),this._hideTimeout=this._register(new d.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=p.dispose(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(v){this._verticalScrollbar.delegateMouseDown(v)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(v){this._scrollable.setScrollDimensions(v,!1)}updateClassName(v){this._options.className=v,c.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(v){typeof v.handleMouseWheel!="undefined"&&(this._options.handleMouseWheel=v.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof v.mouseWheelScrollSensitivity!="undefined"&&(this._options.mouseWheelScrollSensitivity=v.mouseWheelScrollSensitivity),typeof v.fastScrollSensitivity!="undefined"&&(this._options.fastScrollSensitivity=v.fastScrollSensitivity),typeof v.scrollPredominantAxis!="undefined"&&(this._options.scrollPredominantAxis=v.scrollPredominantAxis),typeof v.horizontalScrollbarSize!="undefined"&&this._horizontalScrollbar.updateScrollbarSize(v.horizontalScrollbarSize),this._options.lazyRender||this._render()}_setListeningToMouseWheel(v){if(this._mouseWheelToDispose.length>0!==v&&(this._mouseWheelToDispose=p.dispose(this._mouseWheelToDispose),v)){const L=I=>{this._onMouseWheel(new M.StandardWheelEvent(I))};this._mouseWheelToDispose.push(b.addDisposableListener(this._listenOnDomNode,b.EventType.MOUSE_WHEEL,L,{passive:!1}))}}_onMouseWheel(v){const y=n.INSTANCE;if(r){const k=window.devicePixelRatio/s.getZoomFactor();c.isWindows||c.isLinux?y.accept(Date.now(),v.deltaX/k,v.deltaY/k):y.accept(Date.now(),v.deltaX,v.deltaY)}let L=!1;if(v.deltaY||v.deltaX){let k=v.deltaY*this._options.mouseWheelScrollSensitivity,E=v.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(k)>=Math.abs(E)?E=0:k=0),this._options.flipAxes&&([k,E]=[E,k]);const T=!c.isMacintosh&&v.browserEvent&&v.browserEvent.shiftKey;(this._options.scrollYToX||T)&&!E&&(E=k,k=0),v.browserEvent&&v.browserEvent.altKey&&(E=E*this._options.fastScrollSensitivity,k=k*this._options.fastScrollSensitivity);const O=this._scrollable.getFutureScrollPosition();let A={};if(k){const B=O.scrollTop-u*k;this._verticalScrollbar.writeScrollPosition(A,B)}if(E){const B=O.scrollLeft-u*E;this._horizontalScrollbar.writeScrollPosition(A,B)}A=this._scrollable.validateScrollPosition(A),(O.scrollLeft!==A.scrollLeft||O.scrollTop!==A.scrollTop)&&(r&&this._options.mouseWheelSmoothScroll&&y.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(A):this._scrollable.setScrollPositionNow(A),L=!0)}let I=L;!I&&this._options.alwaysConsumeMouseWheel&&(I=!0),!I&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(I=!0),I&&(v.preventDefault(),v.stopPropagation())}_onDidScroll(v){this._shouldRender=this._horizontalScrollbar.onDidScroll(v)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(v)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(!!this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const v=this._scrollable.getCurrentScrollPosition(),y=v.scrollTop>0,L=v.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(L?" left":"")),this._topShadowDomNode.setClassName("shadow"+(y?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(y?" top":"")+(L?" left":""))}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(v){this._mouseIsOver=!1,this._hide()}_onMouseOver(v){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),a)}}e.AbstractScrollableElement=t;class l extends t{constructor(v,y){y=y||{},y.mouseWheelSmoothScroll=!1;const L=new o.Scrollable(0,I=>b.scheduleAtNextAnimationFrame(I));super(v,y,L);this._register(L)}setScrollPosition(v){this._scrollable.setScrollPositionNow(v)}}e.ScrollableElement=l;class h extends t{constructor(v,y,L){super(v,y,L)}setScrollPosition(v){v.reuseAnimation?this._scrollable.setScrollPositionSmooth(v,v.reuseAnimation):this._scrollable.setScrollPositionNow(v)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=h;class m extends l{constructor(v,y){super(v,y);this._element=v,this.onScroll(L=>{L.scrollTopChanged&&(this._element.scrollTop=L.scrollTop),L.scrollLeftChanged&&(this._element.scrollLeft=L.scrollLeft)}),this.scanDomNode()}scanDomNode(){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})}}e.DomScrollableElement=m;function _(f){const v={lazyRender:typeof f.lazyRender!="undefined"?f.lazyRender:!1,className:typeof f.className!="undefined"?f.className:"",useShadows:typeof f.useShadows!="undefined"?f.useShadows:!0,handleMouseWheel:typeof f.handleMouseWheel!="undefined"?f.handleMouseWheel:!0,flipAxes:typeof f.flipAxes!="undefined"?f.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof f.consumeMouseWheelIfScrollbarIsNeeded!="undefined"?f.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof f.alwaysConsumeMouseWheel!="undefined"?f.alwaysConsumeMouseWheel:!1,scrollYToX:typeof f.scrollYToX!="undefined"?f.scrollYToX:!1,mouseWheelScrollSensitivity:typeof f.mouseWheelScrollSensitivity!="undefined"?f.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof f.fastScrollSensitivity!="undefined"?f.fastScrollSensitivity:5,scrollPredominantAxis:typeof f.scrollPredominantAxis!="undefined"?f.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof f.mouseWheelSmoothScroll!="undefined"?f.mouseWheelSmoothScroll:!0,arrowSize:typeof f.arrowSize!="undefined"?f.arrowSize:11,listenOnDomNode:typeof f.listenOnDomNode!="undefined"?f.listenOnDomNode:null,horizontal:typeof f.horizontal!="undefined"?f.horizontal:1,horizontalScrollbarSize:typeof f.horizontalScrollbarSize!="undefined"?f.horizontalScrollbarSize:10,horizontalSliderSize:typeof f.horizontalSliderSize!="undefined"?f.horizontalSliderSize:0,horizontalHasArrows:typeof f.horizontalHasArrows!="undefined"?f.horizontalHasArrows:!1,vertical:typeof f.vertical!="undefined"?f.vertical:1,verticalScrollbarSize:typeof f.verticalScrollbarSize!="undefined"?f.verticalScrollbarSize:10,verticalHasArrows:typeof f.verticalHasArrows!="undefined"?f.verticalHasArrows:!1,verticalSliderSize:typeof f.verticalSliderSize!="undefined"?f.verticalSliderSize:0,scrollByPage:typeof f.scrollByPage!="undefined"?f.scrollByPage:!1};return v.horizontalSliderSize=typeof f.horizontalSliderSize!="undefined"?f.horizontalSliderSize:v.horizontalScrollbarSize,v.verticalSliderSize=typeof f.verticalSliderSize!="undefined"?f.verticalSliderSize:v.verticalScrollbarSize,c.isMacintosh&&(v.className+=" mac"),v}}),define(Q[209],J([0,1,7,2,61,303]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderHoverAction=e.HoverWidget=void 0;const w=b.$;class S extends N.Disposable{constructor(){super();this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new M.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}e.HoverWidget=S;function C(d,g,p){const c=b.append(d,w("div.action-container")),o=b.append(c,w("a.action"));o.setAttribute("href","#"),o.setAttribute("role","button"),g.iconClass&&b.append(o,w(`span.icon.${g.iconClass}`));const s=b.append(o,w("span"));return s.textContent=p?`${g.label} (${p})`:g.label,b.addDisposableListener(c,b.EventType.CLICK,a=>{a.stopPropagation(),a.preventDefault(),g.run(c)})}e.renderHoverAction=C}),define(Q[161],J([0,1,40,2,60,6,55,61,121,281,287,99,120,19,149,15,35,7]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const n={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(v){return[v]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class t{constructor(y){this.elements=y}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=t;class l{constructor(y){this.elements=y}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=l;class h{constructor(){this.types=[],this.files=[]}update(y){if(y.types&&this.types.splice(0,this.types.length,...y.types),y.files){this.files.splice(0,this.files.length);for(let L=0;L<y.files.length;L++){const I=y.files.item(L);I&&(I.size||I.type)&&this.files.push(I)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=h;function m(v,y){return Array.isArray(v)&&Array.isArray(y)?s.equals(v,y):v===y}class _{constructor(y){(y==null?void 0:y.getSetSize)?this.getSetSize=y.getSetSize.bind(y):this.getSetSize=(L,I,k)=>k,(y==null?void 0:y.getPosInSet)?this.getPosInSet=y.getPosInSet.bind(y):this.getPosInSet=(L,I)=>I+1,(y==null?void 0:y.getRole)?this.getRole=y.getRole.bind(y):this.getRole=L=>"listitem",(y==null?void 0:y.isChecked)?this.isChecked=y.isChecked.bind(y):this.isChecked=L=>{}}}class f{constructor(y,L,I,k=n){if(this.virtualDelegate=L,this.domId=`list_id_${++f.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new u.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=N.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=N.Disposable.None,this.onDragLeaveTimeout=N.Disposable.None,this.disposables=new N.DisposableStore,this._onDidChangeContentHeight=new w.Emitter,this._horizontalScrolling=!1,k.horizontalScrolling&&k.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new g.RangeMap;for(const T of I)this.renderers.set(T.templateId,T);this.cache=this.disposables.add(new p.RowCache(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof k.mouseSupport=="boolean"?k.mouseSupport:!0),this._horizontalScrolling=b.getOrDefault(k,T=>T.horizontalScrolling,n.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof k.additionalScrollHeight=="undefined"?0:k.additionalScrollHeight,this.accessibilityProvider=new _(k.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",b.getOrDefault(k,T=>T.transformOptimization,n.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(M.Gesture.addTarget(this.rowsContainer)),this.scrollable=new d.Scrollable(b.getOrDefault(k,T=>T.smoothScrolling,!1)?125:0,T=>i.scheduleAtNextAnimationFrame(T)),this.scrollableElement=this.disposables.add(new C.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:b.getOrDefault(k,T=>T.alwaysConsumeMouseWheel,n.alwaysConsumeMouseWheel),horizontal:1,vertical:b.getOrDefault(k,T=>T.verticalScrollMode,n.verticalScrollMode),useShadows:b.getOrDefault(k,T=>T.useShadows,n.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),y.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),S.domEvent(this.rowsContainer,M.EventType.Change)(this.onTouchChange,this,this.disposables),S.domEvent(this.scrollableElement.getDomNode(),"scroll")(T=>T.target.scrollTop=0,null,this.disposables),w.Event.map(S.domEvent(this.domNode,"dragover"),T=>this.toDragEvent(T))(this.onDragOver,this,this.disposables),w.Event.map(S.domEvent(this.domNode,"drop"),T=>this.toDragEvent(T))(this.onDrop,this,this.disposables),S.domEvent(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),S.domEvent(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=b.getOrDefault(k,T=>T.setRowLineHeight,n.setRowLineHeight),this.setRowHeight=b.getOrDefault(k,T=>T.setRowHeight,n.setRowHeight),this.supportDynamicHeights=b.getOrDefault(k,T=>T.supportDynamicHeights,n.supportDynamicHeights),this.dnd=b.getOrDefault(k,T=>T.dnd,n.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(y){if(y!==this._horizontalScrolling){if(y&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=y,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const L of this.items)this.measureItemWidth(L);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:i.getContentWidth(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(y){y.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=y.additionalScrollHeight),y.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(y.smoothScrolling?125:0),y.horizontalScrolling!==void 0&&(this.horizontalScrolling=y.horizontalScrolling)}splice(y,L,I=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(y,L,I)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(y,L,I=[]){const k=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),E={start:y,end:y+L},T=o.Range.intersect(k,E),O=new Map;for(let z=T.start;z<T.end;z++){const P=this.items[z];if(P.dragStartDisposable.dispose(),P.row){let V=O.get(P.templateId);V||(V=[],O.set(P.templateId,V));const U=this.renderers.get(P.templateId);U&&U.disposeElement&&U.disposeElement(P.element,z,P.row.templateData,P.size),V.push(P.row)}P.row=null}const A={start:y+L,end:this.items.length},B=o.Range.intersect(A,k),F=o.Range.relativeComplement(A,k),D=I.map(z=>({id:String(this.itemId++),element:z,templateId:this.virtualDelegate.getTemplateId(z),size:this.virtualDelegate.getHeight(z),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(z),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:N.Disposable.None}));let R;y===0&&L>=this.items.length?(this.rangeMap=new g.RangeMap,this.rangeMap.splice(0,0,D),R=this.items,this.items=D):(this.rangeMap.splice(y,L,D),R=this.items.splice(y,L,...D));const W=I.length-L,x=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),K=g.shift(B,W),Y=o.Range.intersect(x,K);for(let z=Y.start;z<Y.end;z++)this.updateItemInDOM(this.items[z],z);const ee=o.Range.relativeComplement(K,x);for(const z of ee)for(let P=z.start;P<z.end;P++)this.removeItemFromDOM(P);const se=F.map(z=>g.shift(z,W)),le=[{start:y,end:y+I.length},...se].map(z=>o.Range.intersect(x,z)),X=this.getNextToLastElement(le);for(const z of le)for(let P=z.start;P<z.end;P++){const V=this.items[P],U=O.get(V.templateId),H=U==null?void 0:U.pop();this.insertItemInDOM(P,X,H)}for(const z of O.values())for(const P of z)this.cache.release(P);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),R.map(z=>z.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=i.scheduleAtNextAnimationFrame(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!!this.horizontalScrolling){let y=0;for(const L of this.items)typeof L.width!="undefined"&&(y=Math.max(y,L.width));this.scrollWidth=y,this.scrollableElement.setScrollDimensions({scrollWidth:y===0?0:y+10})}}rerender(){if(!!this.supportDynamicHeights){for(const y of this.items)y.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(y){return this.items[y].element}domElement(y){const L=this.items[y].row;return L&&L.domNode}elementHeight(y){return this.items[y].size}elementTop(y){return this.rangeMap.positionAt(y)}indexAt(y){return this.rangeMap.indexAt(y)}indexAfter(y){return this.rangeMap.indexAfter(y)}layout(y,L){let I={height:typeof y=="number"?y:i.getContentHeight(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,I.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(I),typeof L!="undefined"&&(this.renderWidth=L,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof L=="number"?L:i.getContentWidth(this.domNode)}))}render(y,L,I,k,E,T=!1){const O=this.getRenderRange(L,I),A=o.Range.relativeComplement(O,y),B=o.Range.relativeComplement(y,O),F=this.getNextToLastElement(A);if(T){const D=o.Range.intersect(y,O);for(let R=D.start;R<D.end;R++)this.updateItemInDOM(this.items[R],R)}for(const D of A)for(let R=D.start;R<D.end;R++)this.insertItemInDOM(R,F);for(const D of B)for(let R=D.start;R<D.end;R++)this.removeItemFromDOM(R);k!==void 0&&(this.rowsContainer.style.left=`-${k}px`),this.rowsContainer.style.top=`-${L}px`,this.horizontalScrolling&&E!==void 0&&(this.rowsContainer.style.width=`${Math.max(E,this.renderWidth)}px`),this.lastRenderTop=L,this.lastRenderHeight=I}insertItemInDOM(y,L,I){const k=this.items[y];k.row||(k.row=I!=null?I:this.cache.alloc(k.templateId));const E=this.accessibilityProvider.getRole(k.element)||"listitem";k.row.domNode.setAttribute("role",E);const T=this.accessibilityProvider.isChecked(k.element);typeof T!="undefined"&&k.row.domNode.setAttribute("aria-checked",String(!!T)),k.row.domNode.parentElement||(L?this.rowsContainer.insertBefore(k.row.domNode,L):this.rowsContainer.appendChild(k.row.domNode)),this.updateItemInDOM(k,y);const O=this.renderers.get(k.templateId);if(!O)throw new Error(`No renderer found for template id ${k.templateId}`);O&&O.renderElement(k.element,y,k.row.templateData,k.size);const A=this.dnd.getDragURI(k.element);if(k.dragStartDisposable.dispose(),k.row.domNode.draggable=!!A,A){const B=S.domEvent(k.row.domNode,"dragstart");k.dragStartDisposable=B(F=>this.onDragStart(k.element,A,F))}this.horizontalScrolling&&(this.measureItemWidth(k),this.eventuallyUpdateScrollWidth())}measureItemWidth(y){if(!(!y.row||!y.row.domNode)){y.row.domNode.style.width=r.isFirefox?"-moz-fit-content":"fit-content",y.width=i.getContentWidth(y.row.domNode);const L=window.getComputedStyle(y.row.domNode);L.paddingLeft&&(y.width+=parseFloat(L.paddingLeft)),L.paddingRight&&(y.width+=parseFloat(L.paddingRight)),y.row.domNode.style.width=""}}updateItemInDOM(y,L){y.row.domNode.style.top=`${this.elementTop(L)}px`,this.setRowHeight&&(y.row.domNode.style.height=`${y.size}px`),this.setRowLineHeight&&(y.row.domNode.style.lineHeight=`${y.size}px`),y.row.domNode.setAttribute("data-index",`${L}`),y.row.domNode.setAttribute("data-last-element",L===this.length-1?"true":"false"),y.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(y.element,L,this.length))),y.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(y.element,L))),y.row.domNode.setAttribute("id",this.getElementDomId(L)),y.row.domNode.classList.toggle("drop-target",y.dropTarget)}removeItemFromDOM(y){const L=this.items[y];if(L.dragStartDisposable.dispose(),L.row){const I=this.renderers.get(L.templateId);I&&I.disposeElement&&I.disposeElement(L.element,y,L.row.templateData,L.size),this.cache.release(L.row),L.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(y,L){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:y,reuseAnimation:L})}get scrollTop(){return this.getScrollTop()}set scrollTop(y){this.setScrollTop(y)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return w.Event.map(S.domEvent(this.domNode,"click"),y=>this.toMouseEvent(y))}get onMouseDblClick(){return w.Event.map(S.domEvent(this.domNode,"dblclick"),y=>this.toMouseEvent(y))}get onMouseMiddleClick(){return w.Event.filter(w.Event.map(S.domEvent(this.domNode,"auxclick"),y=>this.toMouseEvent(y)),y=>y.browserEvent.button===1)}get onMouseDown(){return w.Event.map(S.domEvent(this.domNode,"mousedown"),y=>this.toMouseEvent(y))}get onContextMenu(){return w.Event.map(S.domEvent(this.domNode,"contextmenu"),y=>this.toMouseEvent(y))}get onTouchStart(){return w.Event.map(S.domEvent(this.domNode,"touchstart"),y=>this.toTouchEvent(y))}get onTap(){return w.Event.map(S.domEvent(this.rowsContainer,M.EventType.Tap),y=>this.toGestureEvent(y))}toMouseEvent(y){const L=this.getItemIndexFromEventTarget(y.target||null),I=typeof L=="undefined"?void 0:this.items[L],k=I&&I.element;return{browserEvent:y,index:L,element:k}}toTouchEvent(y){const L=this.getItemIndexFromEventTarget(y.target||null),I=typeof L=="undefined"?void 0:this.items[L],k=I&&I.element;return{browserEvent:y,index:L,element:k}}toGestureEvent(y){const L=this.getItemIndexFromEventTarget(y.initialTarget||null),I=typeof L=="undefined"?void 0:this.items[L],k=I&&I.element;return{browserEvent:y,index:L,element:k}}toDragEvent(y){const L=this.getItemIndexFromEventTarget(y.target||null),I=typeof L=="undefined"?void 0:this.items[L],k=I&&I.element;return{browserEvent:y,index:L,element:k}}onScroll(y){try{const L=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(L,y.scrollTop,y.height,y.scrollLeft,y.scrollWidth),this.supportDynamicHeights&&this._rerender(y.scrollTop,y.height,y.inSmoothScrolling)}catch(L){throw console.error("Got bad scroll event:",y),L}}onTouchChange(y){y.preventDefault(),y.stopPropagation(),this.scrollTop-=y.translationY}onDragStart(y,L,I){if(!!I.dataTransfer){const k=this.dnd.getDragElements(y);if(I.dataTransfer.effectAllowed="copyMove",I.dataTransfer.setData(a.DataTransfers.RESOURCES,JSON.stringify([L])),I.dataTransfer.setDragImage){let E;this.dnd.getDragLabel&&(E=this.dnd.getDragLabel(k,I)),typeof E=="undefined"&&(E=String(k.length));const T=i.$(".monaco-drag-image");T.textContent=E,document.body.appendChild(T),I.dataTransfer.setDragImage(T,-10,-10),setTimeout(()=>document.body.removeChild(T),0)}this.currentDragData=new t(k),a.StaticDND.CurrentDragAndDropData=new l(k),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,I)}}onDragOver(y){if(y.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),a.StaticDND.CurrentDragAndDropData&&a.StaticDND.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(y.browserEvent),!y.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(a.StaticDND.CurrentDragAndDropData)this.currentDragData=a.StaticDND.CurrentDragAndDropData;else{if(!y.browserEvent.dataTransfer.types)return!1;this.currentDragData=new h}const L=this.dnd.onDragOver(this.currentDragData,y.element,y.index,y.browserEvent);if(this.canDrop=typeof L=="boolean"?L:L.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;y.browserEvent.dataTransfer.dropEffect=typeof L!="boolean"&&L.effect===0?"copy":"move";let I;if(typeof L!="boolean"&&L.feedback?I=L.feedback:typeof y.index=="undefined"?I=[-1]:I=[y.index],I=s.distinct(I).filter(k=>k>=-1&&k<this.length).sort((k,E)=>k-E),I=I[0]===-1?[-1]:I,m(this.currentDragFeedback,I))return!0;if(this.currentDragFeedback=I,this.currentDragFeedbackDisposable.dispose(),I[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=N.toDisposable(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const k of I){const E=this.items[k];E.dropTarget=!0,E.row&&E.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=N.toDisposable(()=>{for(const k of I){const E=this.items[k];E.dropTarget=!1,E.row&&E.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=u.disposableTimeout(()=>this.clearDragOverFeedback(),100)}onDrop(y){if(!!this.canDrop){const L=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,a.StaticDND.CurrentDragAndDropData=void 0,!(!L||!y.browserEvent.dataTransfer)&&(y.browserEvent.preventDefault(),L.update(y.browserEvent.dataTransfer),this.dnd.drop(L,y.element,y.index,y.browserEvent))}}onDragEnd(y){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,a.StaticDND.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(y)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=N.Disposable.None}setupDragAndDropScrollTopAnimation(y){if(!this.dragOverAnimationDisposable){const L=i.getTopLeftOffset(this.domNode).top;this.dragOverAnimationDisposable=i.animate(this.animateDragAndDropScrollTop.bind(this,L))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=u.disposableTimeout(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=y.pageY}animateDragAndDropScrollTop(y){if(this.dragOverMouseY!==void 0){const L=this.dragOverMouseY-y,I=this.renderHeight-35;L<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(L-35))):L>I&&(this.scrollTop+=Math.min(14,Math.floor(.3*(L-I))))}}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(y){const L=this.scrollableElement.getDomNode();let I=y;for(;I instanceof HTMLElement&&I!==this.rowsContainer&&L.contains(I);){const k=I.getAttribute("data-index");if(k){const E=Number(k);if(!isNaN(E))return E}I=I.parentElement}}getRenderRange(y,L){return{start:this.rangeMap.indexAt(y),end:this.rangeMap.indexAfter(y+L-1)}}_rerender(y,L,I){const k=this.getRenderRange(y,L);let E,T;y===this.elementTop(k.start)?(E=k.start,T=0):k.end-k.start>1&&(E=k.start+1,T=this.elementTop(E)-y);let O=0;for(;;){const A=this.getRenderRange(y,L);let B=!1;for(let F=A.start;F<A.end;F++){const D=this.probeDynamicHeight(F);D!==0&&this.rangeMap.splice(F,1,[this.items[F]]),O+=D,B=B||D!==0}if(!B){O!==0&&this.eventuallyUpdateScrollDimensions();const F=o.Range.relativeComplement(k,A);for(const R of F)for(let W=R.start;W<R.end;W++)this.items[W].row&&this.removeItemFromDOM(W);const D=o.Range.relativeComplement(A,k);for(const R of D)for(let W=R.start;W<R.end;W++){const x=W+1,K=x<this.items.length?this.items[x].row:null,Y=K?K.domNode:null;this.insertItemInDOM(W,Y)}for(let R=A.start;R<A.end;R++)this.items[R].row&&this.updateItemInDOM(this.items[R],R);if(typeof E=="number"){const R=this.scrollable.getFutureScrollPosition().scrollTop-y,W=this.elementTop(E)-T+R;this.setScrollTop(W,I)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(y){const L=this.items[y];if(!L.hasDynamicHeight||L.lastDynamicHeightWidth===this.renderWidth||!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(L.element))return 0;const I=L.size;if(!this.setRowHeight&&L.row){let T=L.row.domNode.offsetHeight;return L.size=T,L.lastDynamicHeightWidth=this.renderWidth,T-I}const k=this.cache.alloc(L.templateId);k.domNode.style.height="",this.rowsContainer.appendChild(k.domNode);const E=this.renderers.get(L.templateId);return E&&(E.renderElement(L.element,y,k.templateData,void 0),E.disposeElement&&E.disposeElement(L.element,y,k.templateData,void 0)),L.size=k.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(L.element,L.size),L.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(k.domNode),this.cache.release(k),L.size-I}getNextToLastElement(y){const L=y[y.length-1];if(!L)return null;const I=this.items[L.end];return!I||!I.row?null:I.row.domNode}getElementDomId(y){return`${this.domId}_${y}`}dispose(){if(this.items){for(const y of this.items)if(y.row){const L=this.renderers.get(y.row.templateId);L&&(L.disposeElement&&L.disposeElement(y.element,-1,y.row.templateData,void 0),L.disposeTemplate(y.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),N.dispose(this.disposables)}}f.InstanceCount=0,Me([c.memoize],f.prototype,"onMouseClick",null),Me([c.memoize],f.prototype,"onMouseDblClick",null),Me([c.memoize],f.prototype,"onMouseMiddleClick",null),Me([c.memoize],f.prototype,"onMouseDown",null),Me([c.memoize],f.prototype,"onContextMenu",null),Me([c.memoize],f.prototype,"onTouchStart",null),Me([c.memoize],f.prototype,"onTap",null),e.ListView=f}),define(Q[105],J([0,1,2,20,19,99,17,60,56,6,55,275,161,29,40,276,100,66,47,7,208]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.DefaultStyleController=e.MouseController=e.isSelectionRangeChangeEvent=e.isSelectionSingleChangeEvent=e.DefaultKeyboardNavigationDelegate=e.isMonacoEditor=e.isInputElement=void 0;class l{constructor(z){this.trait=z,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(z){return z}renderElement(z,P,V){const U=this.renderedElements.findIndex(H=>H.templateData===V);if(U>=0){const H=this.renderedElements[U];this.trait.unrender(V),H.index=P}else{const H={index:P,templateData:V};this.renderedElements.push(H)}this.trait.renderIndex(P,V)}splice(z,P,V){const U=[];for(const H of this.renderedElements)H.index<z?U.push(H):H.index>=z+P&&U.push({index:H.index+V-P,templateData:H.templateData});this.renderedElements=U}renderIndexes(z){for(const{index:P,templateData:V}of this.renderedElements)z.indexOf(P)>-1&&this.trait.renderIndex(P,V)}disposeTemplate(z){const P=this.renderedElements.findIndex(V=>V.templateData===z);P<0||this.renderedElements.splice(P,1)}}class h{constructor(z){this._trait=z,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.Emitter,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new l(this)}splice(z,P,V){const U=V.length-P,H=z+P,$=[...this.sortedIndexes.filter(ie=>ie<z),...V.map((ie,oe)=>ie?oe+z:-1).filter(ie=>ie!==-1),...this.sortedIndexes.filter(ie=>ie>=H).map(ie=>ie+U)];this.renderer.splice(z,P,V.length),this._set($,$)}renderIndex(z,P){P.classList.toggle(this._trait,this.contains(z))}unrender(z){z.classList.remove(this._trait)}set(z,P){return this._set(z,[...z].sort(Y),P)}_set(z,P,V){const U=this.indexes,H=this.sortedIndexes;this.indexes=z,this.sortedIndexes=P;const $=x(H,z);return this.renderer.renderIndexes($),this._onChange.fire({indexes:z,browserEvent:V}),U}get(){return this.indexes}contains(z){return M.binarySearch(this.sortedIndexes,z,Y)>=0}dispose(){b.dispose(this._onChange)}}Me([w.memoize],h.prototype,"renderer",null);class m extends h{constructor(z){super("selected");this.setAriaSelected=z}renderIndex(z,P){super.renderIndex(z,P),this.setAriaSelected&&(this.contains(z)?P.setAttribute("aria-selected","true"):P.setAttribute("aria-selected","false"))}}class _{constructor(z,P,V){this.trait=z,this.view=P,this.identityProvider=V}splice(z,P,V){if(!this.identityProvider)return this.trait.splice(z,P,V.map(()=>!1));const U=this.trait.get().map($=>this.identityProvider.getId(this.view.element($)).toString()),H=V.map($=>U.indexOf(this.identityProvider.getId($).toString())>-1);this.trait.splice(z,P,H)}}function f(X){return X.tagName==="INPUT"||X.tagName==="TEXTAREA"}e.isInputElement=f;function v(X){return X.classList.contains("monaco-editor")?!0:X.classList.contains("monaco-list")||!X.parentElement?!1:v(X.parentElement)}e.isMonacoEditor=v;class y{constructor(z,P,V){this.list=z,this.view=P,this.disposables=new b.DisposableStore;const U=V.multipleSelectionSupport!==!1,H=g.Event.chain(p.domEvent(P.domNode,"keydown")).filter($=>!f($.target)).map($=>new d.StandardKeyboardEvent($));H.filter($=>$.keyCode===3).on(this.onEnter,this,this.disposables),H.filter($=>$.keyCode===16).on(this.onUpArrow,this,this.disposables),H.filter($=>$.keyCode===18).on(this.onDownArrow,this,this.disposables),H.filter($=>$.keyCode===11).on(this.onPageUpArrow,this,this.disposables),H.filter($=>$.keyCode===12).on(this.onPageDownArrow,this,this.disposables),H.filter($=>$.keyCode===9).on(this.onEscape,this,this.disposables),U&&H.filter($=>(S.isMacintosh?$.metaKey:$.ctrlKey)&&$.keyCode===31).on(this.onCtrlA,this,this.disposables)}onEnter(z){z.preventDefault(),z.stopPropagation(),this.list.setSelection(this.list.getFocus(),z.browserEvent)}onUpArrow(z){z.preventDefault(),z.stopPropagation(),this.list.focusPrevious(1,!1,z.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onDownArrow(z){z.preventDefault(),z.stopPropagation(),this.list.focusNext(1,!1,z.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageUpArrow(z){z.preventDefault(),z.stopPropagation(),this.list.focusPreviousPage(z.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageDownArrow(z){z.preventDefault(),z.stopPropagation(),this.list.focusNextPage(z.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onCtrlA(z){z.preventDefault(),z.stopPropagation(),this.list.setSelection(M.range(this.list.length),z.browserEvent),this.view.domNode.focus()}onEscape(z){this.list.getSelection().length&&(z.preventDefault(),z.stopPropagation(),this.list.setSelection([],z.browserEvent),this.view.domNode.focus())}dispose(){this.disposables.dispose()}}var L;(function(X){X[X.Idle=0]="Idle",X[X.Typing=1]="Typing"})(L||(L={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(X){return X.ctrlKey||X.metaKey||X.altKey?!1:X.keyCode>=31&&X.keyCode<=56||X.keyCode>=21&&X.keyCode<=30||X.keyCode>=93&&X.keyCode<=102||X.keyCode>=80&&X.keyCode<=90}};class I{constructor(z,P,V,U){this.list=z,this.view=P,this.keyboardNavigationLabelProvider=V,this.delegate=U,this.enabled=!1,this.state=L.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new b.DisposableStore,this.disposables=new b.DisposableStore,this.updateOptions(z.options)}updateOptions(z){(typeof z.enableKeyboardNavigation=="undefined"?!0:!!z.enableKeyboardNavigation)?this.enable():this.disable(),typeof z.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=z.automaticKeyboardNavigation)}enable(){if(!this.enabled){const z=g.Event.chain(p.domEvent(this.view.domNode,"keydown")).filter(U=>!f(U.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(U=>new d.StandardKeyboardEvent(U)).filter(U=>this.delegate.mightProducePrintableCharacter(U)).forEach(U=>{U.stopPropagation(),U.preventDefault()}).map(U=>U.browserEvent.key).event,P=g.Event.debounce(z,()=>null,800);g.Event.reduce(g.Event.any(z,P),(U,H)=>H===null?null:(U||"")+H)(this.onInput,this,this.enabledDisposables),P(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}}disable(){!this.enabled||(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var z;const P=this.list.getFocus();if(P.length>0&&P[0]===this.previouslyFocused){const V=(z=this.list.options.accessibilityProvider)===null||z===void 0?void 0:z.getAriaLabel(this.list.element(P[0]));V&&n.alert(V)}this.previouslyFocused=-1}onInput(z){if(!z){this.state=L.Idle,this.triggered=!1;return}const P=this.list.getFocus(),V=P.length>0?P[0]:0,U=this.state===L.Idle?1:0;this.state=L.Typing;for(let H=0;H<this.list.length;H++){const $=(V+H+U)%this.list.length,ie=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element($)),oe=ie&&ie.toString();if(typeof oe=="undefined"||i.matchesPrefix(z,oe)){this.previouslyFocused=V,this.list.setFocus([$]),this.list.reveal($);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class k{constructor(z,P){this.list=z,this.view=P,this.disposables=new b.DisposableStore,g.Event.chain(p.domEvent(P.domNode,"keydown")).filter(U=>!f(U.target)).map(U=>new d.StandardKeyboardEvent(U)).filter(U=>U.keyCode===2&&!U.ctrlKey&&!U.metaKey&&!U.shiftKey&&!U.altKey).on(this.onTab,this,this.disposables)}onTab(z){if(z.target===this.view.domNode){const P=this.list.getFocus();if(P.length!==0){const V=this.view.domElement(P[0]);if(!!V){const U=V.querySelector("[tabIndex]");if(!(!U||!(U instanceof HTMLElement)||U.tabIndex===-1)){const H=window.getComputedStyle(U);H.visibility==="hidden"||H.display==="none"||(z.preventDefault(),z.stopPropagation(),U.focus())}}}}}dispose(){this.disposables.dispose()}}function E(X){return S.isMacintosh?X.browserEvent.metaKey:X.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=E;function T(X){return X.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=T;function O(X){return X instanceof MouseEvent&&X.button===2}const A={isSelectionSingleChangeEvent:E,isSelectionRangeChangeEvent:T};class B{constructor(z){this.list=z,this.disposables=new b.DisposableStore,this._onPointer=new g.Emitter,this.onPointer=this._onPointer.event,this.multipleSelectionSupport=z.options.multipleSelectionSupport!==!1,this.multipleSelectionSupport&&(this.multipleSelectionController=z.options.multipleSelectionController||A),this.mouseSupport=typeof z.options.mouseSupport=="undefined"||!!z.options.mouseSupport,this.mouseSupport&&(z.onMouseDown(this.onMouseDown,this,this.disposables),z.onContextMenu(this.onContextMenu,this,this.disposables),z.onMouseDblClick(this.onDoubleClick,this,this.disposables),z.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(C.Gesture.addTarget(z.getHTMLElement()))),g.Event.any(z.onMouseClick,z.onMouseMiddleClick,z.onTap)(this.onViewPointer,this,this.disposables)}isSelectionSingleChangeEvent(z){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(z):S.isMacintosh?z.browserEvent.metaKey:z.browserEvent.ctrlKey}isSelectionRangeChangeEvent(z){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(z):z.browserEvent.shiftKey}isSelectionChangeEvent(z){return this.isSelectionSingleChangeEvent(z)||this.isSelectionRangeChangeEvent(z)}onMouseDown(z){v(z.browserEvent.target)||document.activeElement!==z.browserEvent.target&&this.list.domFocus()}onContextMenu(z){if(!v(z.browserEvent.target)){const P=typeof z.index=="undefined"?[]:[z.index];this.list.setFocus(P,z.browserEvent)}}onViewPointer(z){if(!!this.mouseSupport&&!(f(z.browserEvent.target)||v(z.browserEvent.target))){let P=this.list.getFocus()[0];const V=this.list.getSelection();P=P===void 0?V[0]:P;const U=z.index;if(typeof U=="undefined"){this.list.setFocus([],z.browserEvent),this.list.setSelection([],z.browserEvent);return}if(this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(z))return this.changeSelection(z,P);if(this.multipleSelectionSupport&&this.isSelectionChangeEvent(z))return this.changeSelection(z,P);this.list.setFocus([U],z.browserEvent),O(z.browserEvent)||this.list.setSelection([U],z.browserEvent),this._onPointer.fire(z)}}onDoubleClick(z){if(!(f(z.browserEvent.target)||v(z.browserEvent.target))&&!(this.multipleSelectionSupport&&this.isSelectionChangeEvent(z))){const P=this.list.getFocus();this.list.setSelection(P,z.browserEvent)}}changeSelection(z,P){const V=z.index;if(this.isSelectionRangeChangeEvent(z)&&P!==void 0){const U=Math.min(P,V),H=Math.max(P,V),$=M.range(U,H+1),ie=this.list.getSelection(),oe=W(x(ie,[P]),P);if(oe.length===0)return;const ae=x($,K(ie,oe));this.list.setSelection(ae,z.browserEvent)}else if(this.isSelectionSingleChangeEvent(z)){const U=this.list.getSelection(),H=U.filter($=>$!==V);this.list.setFocus([V]),U.length===H.length?this.list.setSelection([...H,V],z.browserEvent):this.list.setSelection(H,z.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=B;class F{constructor(z,P){this.styleElement=z,this.selectorSuffix=P}style(z){const P=this.selectorSuffix&&`.${this.selectorSuffix}`,V=[];z.listBackground&&(z.listBackground.isOpaque()?V.push(`.monaco-list${P} .monaco-list-rows { background: ${z.listBackground}; }`):S.isMacintosh||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),z.listFocusBackground&&(V.push(`.monaco-list${P}:focus .monaco-list-row.focused { background-color: ${z.listFocusBackground}; }`),V.push(`.monaco-list${P}:focus .monaco-list-row.focused:hover { background-color: ${z.listFocusBackground}; }`)),z.listFocusForeground&&V.push(`.monaco-list${P}:focus .monaco-list-row.focused { color: ${z.listFocusForeground}; }`),z.listActiveSelectionBackground&&(V.push(`.monaco-list${P}:focus .monaco-list-row.selected { background-color: ${z.listActiveSelectionBackground}; }`),V.push(`.monaco-list${P}:focus .monaco-list-row.selected:hover { background-color: ${z.listActiveSelectionBackground}; }`)),z.listActiveSelectionForeground&&V.push(`.monaco-list${P}:focus .monaco-list-row.selected { color: ${z.listActiveSelectionForeground}; }`),z.listFocusAndSelectionBackground&&V.push(`
.monaco-drag-image,
.monaco-list${P}:focus .monaco-list-row.selected.focused { background-color: ${z.listFocusAndSelectionBackground}; }
`),z.listFocusAndSelectionForeground&&V.push(`
.monaco-drag-image,
.monaco-list${P}:focus .monaco-list-row.selected.focused { color: ${z.listFocusAndSelectionForeground}; }
`),z.listInactiveFocusForeground&&(V.push(`.monaco-list${P} .monaco-list-row.focused { color: ${z.listInactiveFocusForeground}; }`),V.push(`.monaco-list${P} .monaco-list-row.focused:hover { color: ${z.listInactiveFocusForeground}; }`)),z.listInactiveFocusBackground&&(V.push(`.monaco-list${P} .monaco-list-row.focused { background-color: ${z.listInactiveFocusBackground}; }`),V.push(`.monaco-list${P} .monaco-list-row.focused:hover { background-color: ${z.listInactiveFocusBackground}; }`)),z.listInactiveSelectionBackground&&(V.push(`.monaco-list${P} .monaco-list-row.selected { background-color: ${z.listInactiveSelectionBackground}; }`),V.push(`.monaco-list${P} .monaco-list-row.selected:hover { background-color: ${z.listInactiveSelectionBackground}; }`)),z.listInactiveSelectionForeground&&V.push(`.monaco-list${P} .monaco-list-row.selected { color: ${z.listInactiveSelectionForeground}; }`),z.listHoverBackground&&V.push(`.monaco-list${P}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${z.listHoverBackground}; }`),z.listHoverForeground&&V.push(`.monaco-list${P} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${z.listHoverForeground}; }`),z.listSelectionOutline&&V.push(`.monaco-list${P} .monaco-list-row.selected { outline: 1px dotted ${z.listSelectionOutline}; outline-offset: -1px; }`),z.listFocusOutline&&V.push(`
.monaco-drag-image,
.monaco-list${P}:focus .monaco-list-row.focused { outline: 1px solid ${z.listFocusOutline}; outline-offset: -1px; }
`),z.listInactiveFocusOutline&&V.push(`.monaco-list${P} .monaco-list-row.focused { outline: 1px dotted ${z.listInactiveFocusOutline}; outline-offset: -1px; }`),z.listHoverOutline&&V.push(`.monaco-list${P} .monaco-list-row:hover { outline: 1px dashed ${z.listHoverOutline}; outline-offset: -1px; }`),z.listDropBackground&&V.push(`
.monaco-list${P}.drop-target,
.monaco-list${P} .monaco-list-rows.drop-target,
.monaco-list${P} .monaco-list-row.drop-target { background-color: ${z.listDropBackground} !important; color: inherit !important; }
`),z.listFilterWidgetBackground&&V.push(`.monaco-list-type-filter { background-color: ${z.listFilterWidgetBackground} }`),z.listFilterWidgetOutline&&V.push(`.monaco-list-type-filter { border: 1px solid ${z.listFilterWidgetOutline}; }`),z.listFilterWidgetNoMatchesOutline&&V.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${z.listFilterWidgetNoMatchesOutline}; }`),z.listMatchesShadow&&V.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${z.listMatchesShadow}; }`),z.tableColumnsBorder&&V.push(`
.monaco-table:hover > .monaco-split-view2,
.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
border-color: ${z.tableColumnsBorder};
}`),this.styleElement.textContent=V.join(`
`)}}e.DefaultStyleController=F;const D={listFocusBackground:s.Color.fromHex("#7FB0D0"),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"),treeIndentGuidesStroke:s.Color.fromHex("#a9a9a9"),tableColumnsBorder:s.Color.fromHex("#cccccc").transparent(.2)},R={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function W(X,z){const P=X.indexOf(z);if(P===-1)return[];const V=[];let U=P-1;for(;U>=0&&X[U]===z-(P-U);)V.push(X[U--]);for(V.reverse(),U=P;U<X.length&&X[U]===z+(U-P);)V.push(X[U++]);return V}function x(X,z){const P=[];let V=0,U=0;for(;V<X.length||U<z.length;)if(V>=X.length)P.push(z[U++]);else if(U>=z.length)P.push(X[V++]);else if(X[V]===z[U]){P.push(X[V]),V++,U++;continue}else X[V]<z[U]?P.push(X[V++]):P.push(z[U++]);return P}function K(X,z){const P=[];let V=0,U=0;for(;V<X.length||U<z.length;)if(V>=X.length)P.push(z[U++]);else if(U>=z.length)P.push(X[V++]);else if(X[V]===z[U]){V++,U++;continue}else X[V]<z[U]?P.push(X[V++]):U++;return P}const Y=(X,z)=>X-z;class ee{constructor(z,P){this._templateId=z,this.renderers=P}get templateId(){return this._templateId}renderTemplate(z){return this.renderers.map(P=>P.renderTemplate(z))}renderElement(z,P,V,U){let H=0;for(const $ of this.renderers)$.renderElement(z,P,V[H++],U)}disposeElement(z,P,V,U){let H=0;for(const $ of this.renderers)$.disposeElement&&$.disposeElement(z,P,V[H],U),H+=1}disposeTemplate(z){let P=0;for(const V of this.renderers)V.disposeTemplate(z[P++])}}class se{constructor(z){this.accessibilityProvider=z,this.templateId="a18n"}renderTemplate(z){return z}renderElement(z,P,V){const U=this.accessibilityProvider.getAriaLabel(z);U?V.setAttribute("aria-label",U):V.removeAttribute("aria-label");const H=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(z);typeof H=="number"?V.setAttribute("aria-level",`${H}`):V.removeAttribute("aria-level")}disposeTemplate(z){}}class ne{constructor(z,P){this.list=z,this.dnd=P}getDragElements(z){const P=this.list.getSelectedElements();return P.indexOf(z)>-1?P:[z]}getDragURI(z){return this.dnd.getDragURI(z)}getDragLabel(z,P){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(z,P)}onDragStart(z,P){this.dnd.onDragStart&&this.dnd.onDragStart(z,P)}onDragOver(z,P,V,U){return this.dnd.onDragOver(z,P,V,U)}onDragEnd(z){this.dnd.onDragEnd&&this.dnd.onDragEnd(z)}drop(z,P,V,U){this.dnd.drop(z,P,V,U)}}class le{constructor(z,P,V,U,H=R){var $;this.user=z,this._options=H,this.eventBufferer=new g.EventBufferer,this._ariaLabel="",this.disposables=new b.DisposableStore,this._onDidDispose=new g.Emitter,this.onDidDispose=this._onDidDispose.event;const ie=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?($=this._options.accessibilityProvider)===null||$===void 0?void 0:$.getWidgetRole():"list";this.selection=new m(ie!=="listbox"),this.focus=new h("focused"),a.mixin(H,D,!1);const oe=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=H.accessibilityProvider,this.accessibilityProvider&&(oe.push(new se(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),U=U.map(G=>new ee(G.templateId,[...oe,G]));const ae=Object.assign(Object.assign({},H),{dnd:H.dnd&&new ne(this,H.dnd)});if(this.view=new o.ListView(P,V,U,ae),this.view.domNode.setAttribute("role",ie),H.styleController)this.styleController=H.styleController(this.view.domId);else{const G=t.createStyleSheet(this.view.domNode);this.styleController=new F(G,this.view.domId)}if(this.spliceable=new u.CombinedSpliceable([new _(this.focus,this.view,H.identityProvider),new _(this.selection,this.view,H.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=g.Event.map(p.domEvent(this.view.domNode,"focus",!0),()=>null),this.onDidBlur=g.Event.map(p.domEvent(this.view.domNode,"blur",!0),()=>null),this.disposables.add(new k(this,this.view)),typeof H.keyboardSupport!="boolean"||H.keyboardSupport){const G=new y(this,this.view,H);this.disposables.add(G)}if(H.keyboardNavigationLabelProvider){const G=H.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeLabelController=new I(this,this.view,H.keyboardNavigationLabelProvider,G),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(H),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),H.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return g.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),z=>this.toListEvent(z))}get onDidChangeSelection(){return g.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),z=>this.toListEvent(z))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let z=!1;const P=g.Event.chain(p.domEvent(this.view.domNode,"keydown")).map(H=>new d.StandardKeyboardEvent(H)).filter(H=>z=H.keyCode===58||H.shiftKey&&H.keyCode===68).map(p.stopEvent).filter(()=>!1).event,V=g.Event.chain(p.domEvent(this.view.domNode,"keyup")).forEach(()=>z=!1).map(H=>new d.StandardKeyboardEvent(H)).filter(H=>H.keyCode===58||H.shiftKey&&H.keyCode===68).map(p.stopEvent).map(({browserEvent:H})=>{const $=this.getFocus(),ie=$.length?$[0]:void 0,oe=typeof ie!="undefined"?this.view.element(ie):void 0,ae=typeof ie!="undefined"?this.view.domElement(ie):this.view.domNode;return{index:ie,element:oe,anchor:ae,browserEvent:H}}).event,U=g.Event.chain(this.view.onContextMenu).filter(H=>!z).map(({element:H,index:$,browserEvent:ie})=>({element:H,index:$,anchor:{x:ie.clientX+1,y:ie.clientY},browserEvent:ie})).event;return g.Event.any(P,V,U)}get onKeyDown(){return p.domEvent(this.view.domNode,"keydown")}createMouseController(z){return new B(this)}updateOptions(z={}){this._options=Object.assign(Object.assign({},this._options),z),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this.view.updateOptions(z)}get options(){return this._options}splice(z,P,V=[]){if(z<0||z>this.view.length)throw new c.ListError(this.user,`Invalid start index: ${z}`);if(P<0)throw new c.ListError(this.user,`Invalid delete count: ${P}`);P===0&&V.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(z,P,V))}rerender(){this.view.rerender()}element(z){return this.view.element(z)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(z){this.view.setScrollTop(z)}get ariaLabel(){return this._ariaLabel}set ariaLabel(z){this._ariaLabel=z,this.view.domNode.setAttribute("aria-label",z)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(z,P){this.view.layout(z,P)}setSelection(z,P){for(const V of z)if(V<0||V>=this.length)throw new c.ListError(this.user,`Invalid index ${V}`);this.selection.set(z,P)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(z=>this.view.element(z))}setFocus(z,P){for(const V of z)if(V<0||V>=this.length)throw new c.ListError(this.user,`Invalid index ${V}`);this.focus.set(z,P)}focusNext(z=1,P=!1,V,U){if(this.length!==0){const H=this.focus.get(),$=this.findNextIndex(H.length>0?H[0]+z:0,P,U);$>-1&&this.setFocus([$],V)}}focusPrevious(z=1,P=!1,V,U){if(this.length!==0){const H=this.focus.get(),$=this.findPreviousIndex(H.length>0?H[0]-z:0,P,U);$>-1&&this.setFocus([$],V)}}focusNextPage(z,P){let V=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);V=V===0?0:V-1;const U=this.view.element(V),H=this.getFocusedElements()[0];if(H!==U){const $=this.findPreviousIndex(V,!1,P);$>-1&&H!==this.view.element($)?this.setFocus([$],z):this.setFocus([V],z)}else{const $=this.view.getScrollTop();this.view.setScrollTop($+this.view.renderHeight-this.view.elementHeight(V)),this.view.getScrollTop()!==$&&(this.setFocus([]),setTimeout(()=>this.focusNextPage(z,P),0))}}focusPreviousPage(z,P){let V;const U=this.view.getScrollTop();U===0?V=this.view.indexAt(U):V=this.view.indexAfter(U-1);const H=this.view.element(V),$=this.getFocusedElements()[0];if($!==H){const ie=this.findNextIndex(V,!1,P);ie>-1&&$!==this.view.element(ie)?this.setFocus([ie],z):this.setFocus([V],z)}else{const ie=U;this.view.setScrollTop(U-this.view.renderHeight),this.view.getScrollTop()!==ie&&(this.setFocus([]),setTimeout(()=>this.focusPreviousPage(z,P),0))}}focusLast(z,P){if(this.length!==0){const V=this.findPreviousIndex(this.length-1,!1,P);V>-1&&this.setFocus([V],z)}}focusFirst(z,P){this.focusNth(0,z,P)}focusNth(z,P,V){if(this.length!==0){const U=this.findNextIndex(z,!1,V);U>-1&&this.setFocus([U],P)}}findNextIndex(z,P=!1,V){for(let U=0;U<this.length;U++){if(z>=this.length&&!P)return-1;if(z=z%this.length,!V||V(this.element(z)))return z;z++}return-1}findPreviousIndex(z,P=!1,V){for(let U=0;U<this.length;U++){if(z<0&&!P)return-1;if(z=(this.length+z%this.length)%this.length,!V||V(this.element(z)))return z;z--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(z=>this.view.element(z))}reveal(z,P){if(z<0||z>=this.length)throw new c.ListError(this.user,`Invalid index ${z}`);const V=this.view.getScrollTop(),U=this.view.elementTop(z),H=this.view.elementHeight(z);if(N.isNumber(P)){const $=H-this.view.renderHeight;this.view.setScrollTop($*r.clamp(P,0,1)+U)}else{const $=U+H,ie=V+this.view.renderHeight;U<V&&$>=ie||(U<V?this.view.setScrollTop(U):$>=ie&&this.view.setScrollTop($-this.view.renderHeight))}}getRelativeTop(z){if(z<0||z>=this.length)throw new c.ListError(this.user,`Invalid index ${z}`);const P=this.view.getScrollTop(),V=this.view.elementTop(z),U=this.view.elementHeight(z);if(V<P||V+U>P+this.view.renderHeight)return null;const H=U-this.view.renderHeight;return Math.abs((P-V)/H)}getHTMLElement(){return this.view.domNode}style(z){this.styleController.style(z)}toListEvent({indexes:z,browserEvent:P}){return{indexes:z,elements:z.map(V=>this.view.element(V)),browserEvent:P}}_onFocusChange(){const z=this.focus.get();this.view.domNode.classList.toggle("element-focused",z.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var z;const P=this.focus.get();if(P.length>0){let V;((z=this.accessibilityProvider)===null||z===void 0?void 0:z.getActiveDescendantId)&&(V=this.accessibilityProvider.getActiveDescendantId(this.view.element(P[0]))),this.view.domNode.setAttribute("aria-activedescendant",V||this.view.getElementDomId(P[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const z=this.selection.get();this.view.domNode.classList.toggle("selection-none",z.length===0),this.view.domNode.classList.toggle("selection-single",z.length===1),this.view.domNode.classList.toggle("selection-multiple",z.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Me([w.memoize],le.prototype,"onDidChangeFocus",null),Me([w.memoize],le.prototype,"onDidChangeSelection",null),Me([w.memoize],le.prototype,"onContextMenu",null),e.List=le}),define(Q[312],J([0,1,2,19,105,6,23,208]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class C{constructor(o,s){this.renderer=o,this.modelProvider=s}get templateId(){return this.renderer.templateId}renderTemplate(o){return{data:this.renderer.renderTemplate(o),disposable:b.Disposable.None}}renderElement(o,s,a,u){if(a.disposable&&a.disposable.dispose(),!!a.data){const r=this.modelProvider();if(r.isResolved(o))return this.renderer.renderElement(r.get(o),o,a.data,u);const i=new S.CancellationTokenSource,n=r.resolve(o,i.token);a.disposable={dispose:()=>i.cancel()},this.renderer.renderPlaceholder(o,a.data),n.then(t=>this.renderer.renderElement(t,o,a.data,u))}}disposeTemplate(o){o.disposable&&(o.disposable.dispose(),o.disposable=void 0),o.data&&(this.renderer.disposeTemplate(o.data),o.data=void 0)}}class d{constructor(o,s){this.modelProvider=o,this.accessibilityProvider=s}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(o){const s=this.modelProvider();return s.isResolved(o)?this.accessibilityProvider.getAriaLabel(s.get(o)):null}}function g(c,o){return Object.assign(Object.assign({},o),{accessibilityProvider:o.accessibilityProvider&&new d(c,o.accessibilityProvider)})}class p{constructor(o,s,a,u,r={}){const i=()=>this.model,n=u.map(t=>new C(t,i));this.list=new M.List(o,s,a,n,g(i,r))}updateOptions(o){this.list.updateOptions(o)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return w.Event.map(this.list.onMouseDblClick,({element:o,index:s,browserEvent:a})=>({element:o===void 0?void 0:this._model.get(o),index:s,browserEvent:a}))}get onPointer(){return w.Event.map(this.list.onPointer,({element:o,index:s,browserEvent:a})=>({element:o===void 0?void 0:this._model.get(o),index:s,browserEvent:a}))}get onDidChangeFocus(){return w.Event.map(this.list.onDidChangeFocus,({elements:o,indexes:s,browserEvent:a})=>({elements:o.map(u=>this._model.get(u)),indexes:s,browserEvent:a}))}get onDidChangeSelection(){return w.Event.map(this.list.onDidChangeSelection,({elements:o,indexes:s,browserEvent:a})=>({elements:o.map(u=>this._model.get(u)),indexes:s,browserEvent:a}))}get model(){return this._model}set model(o){this._model=o,this.list.splice(0,this.list.length,N.range(o.length))}getFocus(){return this.list.getFocus()}setSelection(o,s){this.list.setSelection(o,s)}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(o=>this.model.get(o))}style(o){this.list.style(o)}dispose(){this.list.dispose()}}e.PagedList=p}),define(Q[313],J([10]),{}),define(Q[210],J([0,1,2,6,20,100,19,104,29,55,7,61,121,313]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const s={separatorBorder:d.Color.transparent};class a{constructor(h,m,_,f){this.container=h,this.view=m,this.disposable=f,this._cachedVisibleSize=void 0,typeof _=="number"?(this._size=_,this._cachedVisibleSize=void 0,h.classList.add("visible")):(this._size=0,this._cachedVisibleSize=_.cachedVisibleSize)}set size(h){this._size=h}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(h,m){h!==this.visible&&(h?(this.size=w.clamp(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof m=="number"?m:this.size,this.size=0),this.container.classList.toggle("visible",h),this.view.setVisible&&this.view.setVisible(h))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(h){this.container.style.pointerEvents=h?"":"none"}layout(h,m){this.layoutContainer(h),this.view.layout(this.size,h,m)}dispose(){return this.disposable.dispose(),this.view}}class u extends a{layoutContainer(h){this.container.style.top=`${h}px`,this.container.style.height=`${this.size}px`}}class r extends a{layoutContainer(h){this.container.style.left=`${h}px`,this.container.style.width=`${this.size}px`}}var i;(function(l){l[l.Idle=0]="Idle",l[l.Busy=1]="Busy"})(i||(i={}));var n;(function(l){l.Distribute={type:"distribute"};function h(_){return{type:"split",index:_}}l.Split=h;function m(_){return{type:"invisible",cachedVisibleSize:_}}l.Invisible=m})(n=e.Sizing||(e.Sizing={}));class t extends b.Disposable{constructor(h,m={}){var _,f;super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=i.Idle,this._onDidSashChange=this._register(new N.Emitter),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new N.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=M.isUndefined(m.orientation)?0:m.orientation,this.inverseAltBehavior=!!m.inverseAltBehavior,this.proportionalLayout=M.isUndefined(m.proportionalLayout)?!0:!!m.proportionalLayout,this.getSashOrthogonalSize=m.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),h.appendChild(this.el),this.sashContainer=p.append(this.el,p.$(".sash-container")),this.viewContainer=p.$(".split-view-container"),this.scrollable=new o.Scrollable(125,p.scheduleAtNextAnimationFrame),this.scrollableElement=this._register(new c.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(_=m.scrollbarVisibility)!==null&&_!==void 0?_:1:2,horizontal:this.orientation===1?(f=m.scrollbarVisibility)!==null&&f!==void 0?f:1:2},this.scrollable)),this._register(this.scrollableElement.onScroll(v=>{this.viewContainer.scrollTop=v.scrollTop,this.viewContainer.scrollLeft=v.scrollLeft})),p.append(this.el,this.scrollableElement.getDomNode()),this.style(m.styles||s),m.descriptor&&(this.size=m.descriptor.size,m.descriptor.views.forEach((v,y)=>{const L=M.isUndefined(v.visible)||v.visible?v.size:{type:"invisible",cachedVisibleSize:v.size},I=v.view;this.doAddView(I,L,y,!0)}),this.contentSize=this.viewItems.reduce((v,y)=>v+y.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(h){for(const m of this.sashItems)m.sash.orthogonalStartSash=h;this._orthogonalStartSash=h}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(h){for(const m of this.sashItems)m.sash.orthogonalEndSash=h;this._orthogonalEndSash=h}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(h){this._startSnappingEnabled!==h&&(this._startSnappingEnabled=h,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(h){this._endSnappingEnabled!==h&&(this._endSnappingEnabled=h,this.updateSashEnablement())}style(h){h.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",h.separatorBorder.toString()))}addView(h,m,_=this.viewItems.length,f){this.doAddView(h,m,_,f)}layout(h,m){const _=Math.max(this.size,this.contentSize);if(this.size=h,this.layoutContext=m,this.proportions)for(let f=0;f<this.viewItems.length;f++){const v=this.viewItems[f];v.size=w.clamp(Math.round(this.proportions[f]*h),v.minimumSize,v.maximumSize)}else{const f=S.range(this.viewItems.length),v=f.filter(L=>this.viewItems[L].priority===1),y=f.filter(L=>this.viewItems[L].priority===2);this.resize(this.viewItems.length-1,h-_,void 0,v,y)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(h=>h.size/this.contentSize))}onSashStart({sash:h,start:m,alt:_}){for(const L of this.viewItems)L.enabled=!1;const f=this.sashItems.findIndex(L=>L.sash===h),v=b.combinedDisposable(g.domEvent(document.body,"keydown")(L=>y(this.sashDragState.current,L.altKey)),g.domEvent(document.body,"keyup")(()=>y(this.sashDragState.current,!1))),y=(L,I)=>{const k=this.viewItems.map(B=>B.size);let E=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(I=!I),I)if(f===this.sashItems.length-1){const F=this.viewItems[f];E=(F.minimumSize-F.size)/2,T=(F.maximumSize-F.size)/2}else{const F=this.viewItems[f+1];E=(F.size-F.maximumSize)/2,T=(F.size-F.minimumSize)/2}let O,A;if(!I){const B=S.range(f,-1),F=S.range(f+1,this.viewItems.length),D=B.reduce((ne,le)=>ne+(this.viewItems[le].minimumSize-k[le]),0),R=B.reduce((ne,le)=>ne+(this.viewItems[le].viewMaximumSize-k[le]),0),W=F.length===0?Number.POSITIVE_INFINITY:F.reduce((ne,le)=>ne+(k[le]-this.viewItems[le].minimumSize),0),x=F.length===0?Number.NEGATIVE_INFINITY:F.reduce((ne,le)=>ne+(k[le]-this.viewItems[le].viewMaximumSize),0),K=Math.max(D,x),Y=Math.min(W,R),ee=this.findFirstSnapIndex(B),se=this.findFirstSnapIndex(F);if(typeof ee=="number"){const ne=this.viewItems[ee],le=Math.floor(ne.viewMinimumSize/2);O={index:ee,limitDelta:ne.visible?K-le:K+le,size:ne.size}}if(typeof se=="number"){const ne=this.viewItems[se],le=Math.floor(ne.viewMinimumSize/2);A={index:se,limitDelta:ne.visible?Y+le:Y-le,size:ne.size}}}this.sashDragState={start:L,current:L,index:f,sizes:k,minDelta:E,maxDelta:T,alt:I,snapBefore:O,snapAfter:A,disposable:v}};y(m,_)}onSashChange({current:h}){const{index:m,start:_,sizes:f,alt:v,minDelta:y,maxDelta:L,snapBefore:I,snapAfter:k}=this.sashDragState;this.sashDragState.current=h;const E=h-_,T=this.resize(m,E,f,void 0,void 0,y,L,I,k);if(v){const O=m===this.sashItems.length-1,A=this.viewItems.map(x=>x.size),B=O?m:m+1,F=this.viewItems[B],D=F.size-F.maximumSize,R=F.size-F.minimumSize,W=O?m-1:m+1;this.resize(W,-T,A,void 0,void 0,D,R)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(h){this._onDidSashChange.fire(h),this.sashDragState.disposable.dispose(),this.saveProportions();for(const m of this.viewItems)m.enabled=!0}onViewChange(h,m){const _=this.viewItems.indexOf(h);_<0||_>=this.viewItems.length||(m=typeof m=="number"?m:h.size,m=w.clamp(m,h.minimumSize,h.maximumSize),this.inverseAltBehavior&&_>0?(this.resize(_-1,Math.floor((h.size-m)/2)),this.distributeEmptySpace(),this.layoutViews()):(h.size=m,this.relayout([_],void 0)))}resizeView(h,m){if(this.state!==i.Idle)throw new Error("Cant modify splitview");if(this.state=i.Busy,!(h<0||h>=this.viewItems.length)){const _=S.range(this.viewItems.length).filter(L=>L!==h),f=[..._.filter(L=>this.viewItems[L].priority===1),h],v=_.filter(L=>this.viewItems[L].priority===2),y=this.viewItems[h];m=Math.round(m),m=w.clamp(m,y.minimumSize,Math.min(y.maximumSize,this.size)),y.size=m,this.relayout(f,v),this.state=i.Idle}}distributeViewSizes(){const h=[];let m=0;for(const L of this.viewItems)L.maximumSize-L.minimumSize>0&&(h.push(L),m+=L.size);const _=Math.floor(m/h.length);for(const L of h)L.size=w.clamp(_,L.minimumSize,L.maximumSize);const f=S.range(this.viewItems.length),v=f.filter(L=>this.viewItems[L].priority===1),y=f.filter(L=>this.viewItems[L].priority===2);this.relayout(v,y)}getViewSize(h){return h<0||h>=this.viewItems.length?-1:this.viewItems[h].size}doAddView(h,m,_=this.viewItems.length,f){if(this.state!==i.Idle)throw new Error("Cant modify splitview");this.state=i.Busy;const v=p.$(".split-view-view");_===this.viewItems.length?this.viewContainer.appendChild(v):this.viewContainer.insertBefore(v,this.viewContainer.children.item(_));const y=h.onDidChange(O=>this.onViewChange(E,O)),L=b.toDisposable(()=>this.viewContainer.removeChild(v)),I=b.combinedDisposable(y,L);let k;typeof m=="number"?k=m:m.type==="split"?k=this.getViewSize(m.index)/2:m.type==="invisible"?k={cachedVisibleSize:m.cachedVisibleSize}:k=h.minimumSize;const E=this.orientation===0?new u(v,h,k,I):new r(v,h,k,I);if(this.viewItems.splice(_,0,E),this.viewItems.length>1){let O={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const A=this.orientation===0?new C.Sash(this.sashContainer,{getHorizontalSashTop:ne=>this.getSashPosition(ne),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},O),{orientation:1})):new C.Sash(this.sashContainer,{getVerticalSashLeft:ne=>this.getSashPosition(ne),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},O),{orientation:0})),B=this.orientation===0?ne=>({sash:A,start:ne.startY,current:ne.currentY,alt:ne.altKey}):ne=>({sash:A,start:ne.startX,current:ne.currentX,alt:ne.altKey}),D=N.Event.map(A.onDidStart,B)(this.onSashStart,this),W=N.Event.map(A.onDidChange,B)(this.onSashChange,this),K=N.Event.map(A.onDidEnd,()=>this.sashItems.findIndex(ne=>ne.sash===A))(this.onSashEnd,this),Y=A.onDidReset(()=>{const ne=this.sashItems.findIndex(V=>V.sash===A),le=S.range(ne,-1),X=S.range(ne+1,this.viewItems.length),z=this.findFirstSnapIndex(le),P=this.findFirstSnapIndex(X);typeof z=="number"&&!this.viewItems[z].visible||typeof P=="number"&&!this.viewItems[P].visible||this._onDidSashReset.fire(ne)}),ee=b.combinedDisposable(D,W,K,Y,A),se={sash:A,disposable:ee};this.sashItems.splice(_-1,0,se)}v.appendChild(h.element);let T;typeof m!="number"&&m.type==="split"&&(T=[m.index]),f||this.relayout([_],T),this.state=i.Idle,!f&&typeof m!="number"&&m.type==="distribute"&&this.distributeViewSizes()}relayout(h,m){const _=this.viewItems.reduce((f,v)=>f+v.size,0);this.resize(this.viewItems.length-1,this.size-_,void 0,h,m),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(h,m,_=this.viewItems.map(E=>E.size),f,v,y=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,I,k){if(h<0||h>=this.viewItems.length)return 0;const E=S.range(h,-1),T=S.range(h+1,this.viewItems.length);if(v)for(const se of v)S.pushToStart(E,se),S.pushToStart(T,se);if(f)for(const se of f)S.pushToEnd(E,se),S.pushToEnd(T,se);const O=E.map(se=>this.viewItems[se]),A=E.map(se=>_[se]),B=T.map(se=>this.viewItems[se]),F=T.map(se=>_[se]),D=E.reduce((se,ne)=>se+(this.viewItems[ne].minimumSize-_[ne]),0),R=E.reduce((se,ne)=>se+(this.viewItems[ne].maximumSize-_[ne]),0),W=T.length===0?Number.POSITIVE_INFINITY:T.reduce((se,ne)=>se+(_[ne]-this.viewItems[ne].minimumSize),0),x=T.length===0?Number.NEGATIVE_INFINITY:T.reduce((se,ne)=>se+(_[ne]-this.viewItems[ne].maximumSize),0),K=Math.max(D,x,y),Y=Math.min(W,R,L);let ee=!1;if(I){const se=this.viewItems[I.index],ne=m>=I.limitDelta;ee=ne!==se.visible,se.setVisible(ne,I.size)}if(!ee&&k){const se=this.viewItems[k.index],ne=m<k.limitDelta;ee=ne!==se.visible,se.setVisible(ne,k.size)}if(ee)return this.resize(h,m,_,f,v,y,L);m=w.clamp(m,K,Y);for(let se=0,ne=m;se<O.length;se++){const le=O[se],X=w.clamp(A[se]+ne,le.minimumSize,le.maximumSize);ne-=X-A[se],le.size=X}for(let se=0,ne=m;se<B.length;se++){const le=B[se],X=w.clamp(F[se]-ne,le.minimumSize,le.maximumSize);ne+=X-F[se],le.size=X}return m}distributeEmptySpace(h){const m=this.viewItems.reduce((L,I)=>L+I.size,0);let _=this.size-m;const f=S.range(this.viewItems.length-1,-1),v=f.filter(L=>this.viewItems[L].priority===1),y=f.filter(L=>this.viewItems[L].priority===2);for(const L of y)S.pushToStart(f,L);for(const L of v)S.pushToEnd(f,L);typeof h=="number"&&S.pushToEnd(f,h);for(let L=0;_!==0&&L<f.length;L++){const I=this.viewItems[f[L]],k=w.clamp(I.size+_,I.minimumSize,I.maximumSize);_-=k-I.size,I.size=k}}layoutViews(){this.contentSize=this.viewItems.reduce((m,_)=>m+_.size,0);let h=0;for(const m of this.viewItems)m.layout(h,this.layoutContext),h+=m.size;this.sashItems.forEach(m=>m.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let h=!1;const m=this.viewItems.map(I=>h=I.size-I.minimumSize>0||h);h=!1;const _=this.viewItems.map(I=>h=I.maximumSize-I.size>0||h),f=[...this.viewItems].reverse();h=!1;const v=f.map(I=>h=I.size-I.minimumSize>0||h).reverse();h=!1;const y=f.map(I=>h=I.maximumSize-I.size>0||h).reverse();let L=0;for(let I=0;I<this.sashItems.length;I++){const{sash:k}=this.sashItems[I];L+=this.viewItems[I].size;const T=!(m[I]&&y[I+1]),O=!(_[I]&&v[I+1]);if(T&&O){const A=S.range(I,-1),B=S.range(I+1,this.viewItems.length),F=this.findFirstSnapIndex(A),D=this.findFirstSnapIndex(B),R=typeof F=="number"&&!this.viewItems[F].visible,W=typeof D=="number"&&!this.viewItems[D].visible;R&&v[I]&&(L>0||this.startSnappingEnabled)?k.state=1:W&&m[I]&&(L<this.contentSize||this.endSnappingEnabled)?k.state=2:k.state=0}else T&&!O?k.state=1:!T&&O?k.state=2:k.state=3}}getSashPosition(h){let m=0;for(let _=0;_<this.sashItems.length;_++)if(m+=this.viewItems[_].size,this.sashItems[_].sash===h)return m;return 0}findFirstSnapIndex(h){for(const m of h){const _=this.viewItems[m];if(!!_.visible&&_.snap)return m}for(const m of h){const _=this.viewItems[m];if(_.visible&&_.maximumSize-_.minimumSize>0)return;if(!_.visible&&_.snap)return m}}dispose(){super.dispose(),this.viewItems.forEach(h=>h.dispose()),this.viewItems=[],this.sashItems.forEach(h=>h.disposable.dispose()),this.sashItems=[]}}e.SplitView=t}),define(Q[314],J([10]),{}),define(Q[315],J([0,1,105,7,210,6,314]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class S{constructor(c,o,s){this.columns=c,this.getColumnSize=s,this.templateId=S.TemplateId,this.renderedTemplates=new Set;const a=new Map(o.map(u=>[u.templateId,u]));this.renderers=[];for(const u of c){const r=a.get(u.templateId);if(!r)throw new Error(`Table cell renderer for template id ${u.templateId} not found.`);this.renderers.push(r)}}renderTemplate(c){const o=N.append(c,N.$(".monaco-table-tr")),s=[],a=[];for(let r=0;r<this.columns.length;r++){const i=this.renderers[r],n=N.append(o,N.$(".monaco-table-td",{"data-col-index":r}));n.style.width=`${this.getColumnSize(r)}px`,s.push(n),a.push(i.renderTemplate(n))}const u={container:c,cellContainers:s,cellTemplateData:a};return this.renderedTemplates.add(u),u}renderElement(c,o,s,a){for(let u=0;u<this.columns.length;u++){const i=this.columns[u].project(c);this.renderers[u].renderElement(i,o,s.cellTemplateData[u],a)}}disposeElement(c,o,s,a){for(let u=0;u<this.columns.length;u++){const r=this.renderers[u];if(r.disposeElement){const n=this.columns[u].project(c);r.disposeElement(n,o,s.cellTemplateData[u],a)}}}disposeTemplate(c){for(let o=0;o<this.columns.length;o++)this.renderers[o].disposeTemplate(c.cellTemplateData[o]);N.clearNode(c.container),this.renderedTemplates.delete(c)}layoutColumn(c,o){for(const{cellContainers:s}of this.renderedTemplates)s[c].style.width=`${o}px`}}S.TemplateId="row";function C(p){return{getHeight(c){return p.getHeight(c)},getTemplateId(){return S.TemplateId}}}class d{constructor(c,o){this.column=c,this.index=o,this._onDidLayout=new w.Emitter,this.onDidLayout=this._onDidLayout.event,this.element=N.$(".monaco-table-th",{"data-col-index":o,title:c.tooltip},c.label)}get minimumSize(){var c;return(c=this.column.minimumWidth)!==null&&c!==void 0?c:120}get maximumSize(){var c;return(c=this.column.maximumWidth)!==null&&c!==void 0?c:Number.POSITIVE_INFINITY}get onDidChange(){var c;return(c=this.column.onDidChangeWidthConstraints)!==null&&c!==void 0?c:w.Event.None}layout(c){this._onDidLayout.fire([this.index,c])}}class g{constructor(c,o,s,a,u,r){this.virtualDelegate=s,this.domId=`table_id_${++g.InstanceCount}`,this.cachedHeight=0,this.domNode=N.append(o,N.$(`.monaco-table.${this.domId}`));const i=a.map((l,h)=>new d(l,h)),n={size:i.reduce((l,h)=>l+h.column.weight,0),views:i.map(l=>({size:l.column.weight,view:l}))};this.splitview=new M.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:n}),this.splitview.el.style.height=`${s.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${s.headerRowHeight}px`;const t=new S(a,u,l=>this.splitview.getViewSize(l));this.list=new b.List(c,this.domNode,C(s),[t],r),this.columnLayoutDisposable=w.Event.any(...i.map(l=>l.onDidLayout))(([l,h])=>t.layoutColumn(l,h)),this.styleElement=N.createStyleSheet(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(c){this.list.updateOptions(c)}splice(c,o,s=[]){this.list.splice(c,o,s)}getHTMLElement(){return this.domNode}style(c){const o=[];o.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
top: ${this.virtualDelegate.headerRowHeight+1}px;
height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
}`),this.styleElement.textContent=o.join(`
`),this.list.style(c)}getSelectedElements(){return this.list.getSelectedElements()}setSelection(c,o){this.list.setSelection(c,o)}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}e.Table=g,g.InstanceCount=0}),define(Q[316],J([10]),{}),define(Q[125],J([10]),{}),define(Q[211],J([0,1,7,119,125]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClass=void 0;const M={},w=new N.IdGenerator("quick-input-button-icon-");function S(C){if(!!C){let d;const g=C.dark.toString();return M[g]?d=M[g]:(d=w.nextId(),b.createCSSRule(`.${d}`,`background-image: ${b.asCSSUrl(C.light||C.dark)}`),b.createCSSRule(`.vs-dark .${d}, .hc-black .${d}`,`background-image: ${b.asCSSUrl(C.dark)}`),M[g]=d),d}}e.getIconClass=S}),define(Q[317],J([10]),{}),define(Q[318],J([10]),{}),define(Q[319],J([10]),{}),define(Q[320],J([10]),{}),define(Q[321],J([10]),{}),define(Q[322],J([10]),{}),define(Q[323],J([10]),{}),define(Q[324],J([10]),{}),define(Q[325],J([10]),{}),define(Q[326],J([10]),{}),define(Q[327],J([10]),{}),define(Q[328],J([10]),{}),define(Q[329],J([10]),{}),define(Q[330],J([10]),{}),define(Q[331],J([10]),{}),define(Q[332],J([10]),{}),define(Q[333],J([10]),{}),define(Q[334],J([10]),{}),define(Q[335],J([10]),{}),define(Q[336],J([10]),{}),define(Q[337],J([10]),{}),define(Q[338],J([10]),{}),define(Q[339],J([10]),{}),define(Q[340],J([10]),{}),define(Q[341],J([10]),{}),define(Q[342],J([10]),{}),define(Q[343],J([10]),{}),define(Q[344],J([10]),{}),define(Q[345],J([10]),{}),define(Q[346],J([10]),{}),define(Q[347],J([10]),{}),define(Q[348],J([10]),{}),define(Q[349],J([10]),{}),define(Q[350],J([10]),{}),define(Q[351],J([10]),{}),define(Q[352],J([10]),{}),define(Q[353],J([10]),{}),define(Q[354],J([10]),{}),define(Q[355],J([10]),{}),define(Q[356],J([10]),{}),define(Q[357],J([10]),{}),define(Q[358],J([10]),{}),define(Q[359],J([10]),{}),define(Q[360],J([10]),{}),define(Q[361],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=void 0;class b{constructor(S,C){this.chr=S,this.type=C,this.width=0}fulfill(S){this.width=S}}e.CharWidthRequest=b;class N{constructor(S,C){this._bareFontInfo=S,this._requests=C,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const S=document.createElement("div");S.style.position="absolute",S.style.top="-50000px",S.style.width="50000px";const C=document.createElement("div");C.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),C.style.fontWeight=this._bareFontInfo.fontWeight,C.style.fontSize=this._bareFontInfo.fontSize+"px",C.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,C.style.lineHeight=this._bareFontInfo.lineHeight+"px",C.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",S.appendChild(C);const d=document.createElement("div");d.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),d.style.fontWeight="bold",d.style.fontSize=this._bareFontInfo.fontSize+"px",d.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,d.style.lineHeight=this._bareFontInfo.lineHeight+"px",d.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",S.appendChild(d);const g=document.createElement("div");g.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),g.style.fontWeight=this._bareFontInfo.fontWeight,g.style.fontSize=this._bareFontInfo.fontSize+"px",g.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,g.style.lineHeight=this._bareFontInfo.lineHeight+"px",g.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",g.style.fontStyle="italic",S.appendChild(g);const p=[];for(const c of this._requests){let o;c.type===0&&(o=C),c.type===2&&(o=d),c.type===1&&(o=g),o.appendChild(document.createElement("br"));const s=document.createElement("span");N._render(s,c),o.appendChild(s),p.push(s)}this._container=S,this._testElements=p}static _render(S,C){if(C.chr===" "){let d="\xA0";for(let g=0;g<8;g++)d+=d;S.innerText=d}else{let d=C.chr;for(let g=0;g<8;g++)d+=d;S.textContent=d}}_readFromDomElements(){for(let S=0,C=this._requests.length;S<C;S++){const d=this._requests[S],g=this._testElements[S];d.fulfill(g.offsetWidth/256)}}}function M(w,S){new N(w,S).read()}e.readCharWidths=M}),define(Q[212],J([0,1,2]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class N extends b.Disposable{constructor(w,S,C){super();this.referenceDomElement=w,this.changeCallback=C,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,S)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){typeof ResizeObserver!="undefined"?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(w=>{w&&w[0]&&w[0].contentRect?this.observe({width:w[0].contentRect.width,height:w[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):this.measureReferenceDomElementToken===-1&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.measureReferenceDomElementToken!==-1&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(w){this.measureReferenceDomElement(!0,w)}measureReferenceDomElement(w,S){let C=0,d=0;S?(C=S.width,d=S.height):this.referenceDomElement&&(C=this.referenceDomElement.clientWidth,d=this.referenceDomElement.clientHeight),C=Math.max(5,C),d=Math.max(5,d),(this.width!==C||this.height!==d)&&(this.width=C,this.height=d,w&&this.changeCallback())}}e.ElementSizeObserver=N}),define(Q[162],J([0,1,7,90,50,2]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalEditorMouseMoveMonitor=e.EditorPointerEventFactory=e.EditorMouseEventFactory=e.EditorMouseEvent=e.createEditorPagePosition=e.EditorPagePosition=e.ClientCoordinates=e.PageCoordinates=void 0;class S{constructor(u,r){this.x=u,this.y=r}toClientCoordinates(){return new C(this.x-b.StandardWindow.scrollX,this.y-b.StandardWindow.scrollY)}}e.PageCoordinates=S;class C{constructor(u,r){this.clientX=u,this.clientY=r}toPageCoordinates(){return new S(this.clientX+b.StandardWindow.scrollX,this.clientY+b.StandardWindow.scrollY)}}e.ClientCoordinates=C;class d{constructor(u,r,i,n){this.x=u,this.y=r,this.width=i,this.height=n}}e.EditorPagePosition=d;function g(a){const u=b.getDomNodePagePosition(a);return new d(u.left,u.top,u.width,u.height)}e.createEditorPagePosition=g;class p extends M.StandardMouseEvent{constructor(u,r){super(u);this.pos=new S(this.posx,this.posy),this.editorPos=g(r)}}e.EditorMouseEvent=p;class c{constructor(u){this._editorViewDomNode=u}_create(u){return new p(u,this._editorViewDomNode)}onContextMenu(u,r){return b.addDisposableListener(u,"contextmenu",i=>{r(this._create(i))})}onMouseUp(u,r){return b.addDisposableListener(u,"mouseup",i=>{r(this._create(i))})}onMouseDown(u,r){return b.addDisposableListener(u,"mousedown",i=>{r(this._create(i))})}onMouseLeave(u,r){return b.addDisposableNonBubblingMouseOutListener(u,i=>{r(this._create(i))})}onMouseMoveThrottled(u,r,i,n){const t=(l,h)=>i(l,this._create(h));return b.addDisposableThrottledListener(u,"mousemove",r,t,n)}}e.EditorMouseEventFactory=c;class o{constructor(u){this._editorViewDomNode=u}_create(u){return new p(u,this._editorViewDomNode)}onPointerUp(u,r){return b.addDisposableListener(u,"pointerup",i=>{r(this._create(i))})}onPointerDown(u,r){return b.addDisposableListener(u,"pointerdown",i=>{r(this._create(i))})}onPointerLeave(u,r){return b.addDisposableNonBubblingPointerOutListener(u,i=>{r(this._create(i))})}onPointerMoveThrottled(u,r,i,n){const t=(l,h)=>i(l,this._create(h));return b.addDisposableThrottledListener(u,"pointermove",r,t,n)}}e.EditorPointerEventFactory=o;class s extends w.Disposable{constructor(u){super();this._editorViewDomNode=u,this._globalMouseMoveMonitor=this._register(new N.GlobalMouseMoveMonitor),this._keydownListener=null}startMonitoring(u,r,i,n,t){this._keydownListener=b.addStandardDisposableListener(document,"keydown",h=>{h.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,h.browserEvent)},!0);const l=(h,m)=>i(h,new p(m,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(u,r,l,n,h=>{this._keydownListener.dispose(),t(h)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorMouseMoveMonitor=s}),define(Q[362],J([0,1,6,2]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractCodeEditorService=void 0;class M extends N.Disposable{constructor(){super();this._onCodeEditorAdd=this._register(new b.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new b.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new b.Emitter),this._onDiffEditorRemove=this._register(new b.Emitter),this._onDecorationTypeRegistered=this._register(new b.Emitter),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(S){this._codeEditors[S.getId()]=S,this._onCodeEditorAdd.fire(S)}removeCodeEditor(S){delete this._codeEditors[S.getId()]&&this._onCodeEditorRemove.fire(S)}listCodeEditors(){return Object.keys(this._codeEditors).map(S=>this._codeEditors[S])}addDiffEditor(S){this._diffEditors[S.getId()]=S,this._onDiffEditorAdd.fire(S)}removeDiffEditor(S){delete this._diffEditors[S.getId()]&&this._onDiffEditorRemove.fire(S)}listDiffEditors(){return Object.keys(this._diffEditors).map(S=>this._diffEditors[S])}getFocusedCodeEditor(){let S=null;const C=this.listCodeEditors();for(const d of C){if(d.hasTextFocus())return d;d.hasWidgetFocus()&&(S=d)}return S}setModelProperty(S,C,d){const g=S.toString();let p;this._modelProperties.has(g)?p=this._modelProperties.get(g):(p=new Map,this._modelProperties.set(g,p)),p.set(C,d)}getModelProperty(S,C){const d=S.toString();if(this._modelProperties.has(d))return this._modelProperties.get(d).get(C)}}e.AbstractCodeEditorService=M}),define(Q[213],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=void 0,e.allCharCodes=(()=>{const N=[];for(let M=32;M<=126;M++)N.push(M);return N.push(65533),N})();const b=(N,M)=>(N-=32,N<0||N>96?M<=2?(N+96)%96:96-1:N);e.getCharIndex=b}),define(Q[363],J([0,1,213,122]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class M{constructor(S,C){this.scale=C,this.charDataNormal=M.soften(S,12/15),this.charDataLight=M.soften(S,50/60)}static soften(S,C){let d=new Uint8ClampedArray(S.length);for(let g=0,p=S.length;g<p;g++)d[g]=N.toUint8(S[g]*C);return d}renderChar(S,C,d,g,p,c,o,s,a){const u=1*this.scale,r=2*this.scale,i=a?1:r;if(C+u>S.width||d+i>S.height){console.warn("bad render request outside image data");return}const n=s?this.charDataLight:this.charDataNormal,t=b.getCharIndex(g,o),l=S.width*4,h=c.r,m=c.g,_=c.b,f=p.r-h,v=p.g-m,y=p.b-_,L=S.data;let I=t*u*r,k=d*l+C*4;for(let E=0;E<i;E++){let T=k;for(let O=0;O<u;O++){const A=n[I++]/255;L[T++]=h+f*A,L[T++]=m+v*A,L[T++]=_+y*A,T++}k+=l}}blockRenderChar(S,C,d,g,p,c,o){const s=1*this.scale,a=2*this.scale,u=o?1:a;if(C+s>S.width||d+u>S.height){console.warn("bad render request outside image data");return}const r=S.width*4,i=.5,n=p.r,t=p.g,l=p.b,h=g.r-n,m=g.g-t,_=g.b-l,f=n+h*i,v=t+m*i,y=l+_*i,L=S.data;let I=d*r+C*4;for(let k=0;k<u;k++){let E=I;for(let T=0;T<s;T++)L[E++]=f,L[E++]=v,L[E++]=y,E++;I+=r}}}e.MinimapCharRenderer=M}),define(Q[364],J([0,1,88]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prebakedMiniMaps=void 0;const N={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15},M=w=>{const S=new Uint8ClampedArray(w.length/2);for(let C=0;C<w.length;C+=2)S[C>>1]=N[w[C]]<<4|N[w[C+1]]&15;return S};e.prebakedMiniMaps={1:b.once(()=>M("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:b.once(()=>M("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(Q[365],J([0,1,363,213,364,122]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class S{static create(d,g){if(this.lastCreated&&d===this.lastCreated.scale&&g===this.lastFontFamily)return this.lastCreated;let p;return M.prebakedMiniMaps[d]?p=new b.MinimapCharRenderer(M.prebakedMiniMaps[d](),d):p=S.createFromSampleData(S.createSampleData(g).data,d),this.lastFontFamily=g,this.lastCreated=p,p}static createSampleData(d){const g=document.createElement("canvas"),p=g.getContext("2d");g.style.height=`${16}px`,g.height=16,g.width=96*10,g.style.width=96*10+"px",p.fillStyle="#ffffff",p.font=`bold ${16}px ${d}`,p.textBaseline="middle";let c=0;for(const o of N.allCharCodes)p.fillText(String.fromCharCode(o),c,16/2),c+=10;return p.getImageData(0,0,96*10,16)}static createFromSampleData(d,g){const p=16*10*4*96;if(d.length!==p)throw new Error("Unexpected source in MinimapCharRenderer");let c=S._downsample(d,g);return new b.MinimapCharRenderer(c,g)}static _downsampleChar(d,g,p,c,o){const s=1*o,a=2*o;let u=c,r=0;for(let i=0;i<a;i++){const n=i/a*16,t=(i+1)/a*16;for(let l=0;l<s;l++){const h=l/s*10,m=(l+1)/s*10;let _=0,f=0;for(let y=n;y<t;y++){const L=g+Math.floor(y)*3840,I=1-(y-Math.floor(y));for(let k=h;k<m;k++){const E=1-(k-Math.floor(k)),T=L+Math.floor(k)*4,O=E*I;f+=O,_+=d[T]*d[T+3]/255*O}}const v=_/f;r=Math.max(r,v),p[u++]=w.toUint8(v)}}return r}static _downsample(d,g){const p=2*g*1*g,c=p*96,o=new Uint8ClampedArray(c);let s=0,a=0,u=0;for(let r=0;r<96;r++)u=Math.max(u,this._downsampleChar(d,a,o,s,g)),s+=p,a+=10*4;if(u>0){const r=255/u;for(let i=0;i<c;i++)o[i]*=r}return o}}e.MinimapCharRendererFactory=S}),define(Q[126],J([0,1,6]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorZoom=void 0,e.EditorZoom=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new b.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(N){N=Math.min(Math.max(-5,N),20),this._zoomLevel!==N&&(this._zoomLevel=N,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}}),define(Q[163],J([0,1,17,126]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const M=b.isMacintosh?1.5:1.35,w=8;class S{constructor(g){this.zoomLevel=g.zoomLevel,this.pixelRatio=g.pixelRatio,this.fontFamily=String(g.fontFamily),this.fontWeight=String(g.fontWeight),this.fontSize=g.fontSize,this.fontFeatureSettings=g.fontFeatureSettings,this.lineHeight=g.lineHeight|0,this.letterSpacing=g.letterSpacing}static createFromValidatedSettings(g,p,c,o){const s=g.get(37),a=g.get(41),u=g.get(40),r=g.get(39),i=g.get(53),n=g.get(50);return S._create(s,a,u,r,i,n,p,c,o)}static _create(g,p,c,o,s,a,u,r,i){s===0?s=Math.round(M*c):s<w&&(s=w);const n=1+(i?0:N.EditorZoom.getZoomLevel()*.1);return c*=n,s*=n,new S({zoomLevel:u,pixelRatio:r,fontFamily:g,fontWeight:p,fontSize:c,fontFeatureSettings:o,lineHeight:s,letterSpacing:a})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?`"${this.fontFamily}"`:this.fontFamily}}e.BareFontInfo=S,e.SERIALIZED_FONT_INFO_VERSION=1;class C extends S{constructor(g,p){super(g);this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=p,this.isMonospace=g.isMonospace,this.typicalHalfwidthCharacterWidth=g.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=g.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=g.canUseHalfwidthRightwardsArrow,this.spaceWidth=g.spaceWidth,this.middotWidth=g.middotWidth,this.wsmiddotWidth=g.wsmiddotWidth,this.maxDigitWidth=g.maxDigitWidth}equals(g){return this.fontFamily===g.fontFamily&&this.fontWeight===g.fontWeight&&this.fontSize===g.fontSize&&this.fontFeatureSettings===g.fontFeatureSettings&&this.lineHeight===g.lineHeight&&this.letterSpacing===g.letterSpacing&&this.typicalHalfwidthCharacterWidth===g.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===g.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===g.canUseHalfwidthRightwardsArrow&&this.spaceWidth===g.spaceWidth&&this.middotWidth===g.middotWidth&&this.wsmiddotWidth===g.wsmiddotWidth&&this.maxDigitWidth===g.maxDigitWidth}}e.FontInfo=C}),define(Q[91],J([0,1,122]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class N{constructor(S){let C=b.toUint8(S);this._defaultValue=C,this._asciiMap=N._createAsciiMap(C),this._map=new Map}static _createAsciiMap(S){let C=new Uint8Array(256);for(let d=0;d<256;d++)C[d]=S;return C}set(S,C){let d=b.toUint8(C);S>=0&&S<256?this._asciiMap[S]=d:this._map.set(S,d)}get(S){return S>=0&&S<256?this._asciiMap[S]:this._map.get(S)||this._defaultValue}}e.CharacterClassifier=N;class M{constructor(){this._actual=new N(0)}add(S){this._actual.set(S,1)}has(S){return this._actual.get(S)===1}}e.CharacterSet=M}),define(Q[106],J([0,1,91]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=void 0;class N extends b.CharacterClassifier{constructor(S){super(0);for(let C=0,d=S.length;C<d;C++)this.set(S.charCodeAt(C),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=N;function M(w){let S={};return C=>(S.hasOwnProperty(C)||(S[C]=w(C)),S[C])}e.getMapForWordSeparators=M(w=>new N(w))}),define(Q[14],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class b{constructor(M,w){this.lineNumber=M,this.column=w}with(M=this.lineNumber,w=this.column){return M===this.lineNumber&&w===this.column?this:new b(M,w)}delta(M=0,w=0){return this.with(this.lineNumber+M,this.column+w)}equals(M){return b.equals(this,M)}static equals(M,w){return!M&&!w?!0:!!M&&!!w&&M.lineNumber===w.lineNumber&&M.column===w.column}isBefore(M){return b.isBefore(this,M)}static isBefore(M,w){return M.lineNumber<w.lineNumber?!0:w.lineNumber<M.lineNumber?!1:M.column<w.column}isBeforeOrEqual(M){return b.isBeforeOrEqual(this,M)}static isBeforeOrEqual(M,w){return M.lineNumber<w.lineNumber?!0:w.lineNumber<M.lineNumber?!1:M.column<=w.column}static compare(M,w){let S=M.lineNumber|0,C=w.lineNumber|0;if(S===C){let d=M.column|0,g=w.column|0;return d-g}return S-C}clone(){return new b(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(M){return new b(M.lineNumber,M.column)}static isIPosition(M){return M&&typeof M.lineNumber=="number"&&typeof M.column=="number"}}e.Position=b}),define(Q[3],J([0,1,14]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class N{constructor(w,S,C,d){w>C||w===C&&S>d?(this.startLineNumber=C,this.startColumn=d,this.endLineNumber=w,this.endColumn=S):(this.startLineNumber=w,this.startColumn=S,this.endLineNumber=C,this.endColumn=d)}isEmpty(){return N.isEmpty(this)}static isEmpty(w){return w.startLineNumber===w.endLineNumber&&w.startColumn===w.endColumn}containsPosition(w){return N.containsPosition(this,w)}static containsPosition(w,S){return!(S.lineNumber<w.startLineNumber||S.lineNumber>w.endLineNumber||S.lineNumber===w.startLineNumber&&S.column<w.startColumn||S.lineNumber===w.endLineNumber&&S.column>w.endColumn)}containsRange(w){return N.containsRange(this,w)}static containsRange(w,S){return!(S.startLineNumber<w.startLineNumber||S.endLineNumber<w.startLineNumber||S.startLineNumber>w.endLineNumber||S.endLineNumber>w.endLineNumber||S.startLineNumber===w.startLineNumber&&S.startColumn<w.startColumn||S.endLineNumber===w.endLineNumber&&S.endColumn>w.endColumn)}strictContainsRange(w){return N.strictContainsRange(this,w)}static strictContainsRange(w,S){return!(S.startLineNumber<w.startLineNumber||S.endLineNumber<w.startLineNumber||S.startLineNumber>w.endLineNumber||S.endLineNumber>w.endLineNumber||S.startLineNumber===w.startLineNumber&&S.startColumn<=w.startColumn||S.endLineNumber===w.endLineNumber&&S.endColumn>=w.endColumn)}plusRange(w){return N.plusRange(this,w)}static plusRange(w,S){let C,d,g,p;return S.startLineNumber<w.startLineNumber?(C=S.startLineNumber,d=S.startColumn):S.startLineNumber===w.startLineNumber?(C=S.startLineNumber,d=Math.min(S.startColumn,w.startColumn)):(C=w.startLineNumber,d=w.startColumn),S.endLineNumber>w.endLineNumber?(g=S.endLineNumber,p=S.endColumn):S.endLineNumber===w.endLineNumber?(g=S.endLineNumber,p=Math.max(S.endColumn,w.endColumn)):(g=w.endLineNumber,p=w.endColumn),new N(C,d,g,p)}intersectRanges(w){return N.intersectRanges(this,w)}static intersectRanges(w,S){let C=w.startLineNumber,d=w.startColumn,g=w.endLineNumber,p=w.endColumn,c=S.startLineNumber,o=S.startColumn,s=S.endLineNumber,a=S.endColumn;return C<c?(C=c,d=o):C===c&&(d=Math.max(d,o)),g>s?(g=s,p=a):g===s&&(p=Math.min(p,a)),C>g||C===g&&d>p?null:new N(C,d,g,p)}equalsRange(w){return N.equalsRange(this,w)}static equalsRange(w,S){return!!w&&!!S&&w.startLineNumber===S.startLineNumber&&w.startColumn===S.startColumn&&w.endLineNumber===S.endLineNumber&&w.endColumn===S.endColumn}getEndPosition(){return N.getEndPosition(this)}static getEndPosition(w){return new b.Position(w.endLineNumber,w.endColumn)}getStartPosition(){return N.getStartPosition(this)}static getStartPosition(w){return new b.Position(w.startLineNumber,w.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(w,S){return new N(this.startLineNumber,this.startColumn,w,S)}setStartPosition(w,S){return new N(w,S,this.endLineNumber,this.endColumn)}collapseToStart(){return N.collapseToStart(this)}static collapseToStart(w){return new N(w.startLineNumber,w.startColumn,w.startLineNumber,w.startColumn)}static fromPositions(w,S=w){return new N(w.lineNumber,w.column,S.lineNumber,S.column)}static lift(w){return w?new N(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn):null}static isIRange(w){return w&&typeof w.startLineNumber=="number"&&typeof w.startColumn=="number"&&typeof w.endLineNumber=="number"&&typeof w.endColumn=="number"}static areIntersectingOrTouching(w,S){return!(w.endLineNumber<S.startLineNumber||w.endLineNumber===S.startLineNumber&&w.endColumn<S.startColumn||S.endLineNumber<w.startLineNumber||S.endLineNumber===w.startLineNumber&&S.endColumn<w.startColumn)}static areIntersecting(w,S){return!(w.endLineNumber<S.startLineNumber||w.endLineNumber===S.startLineNumber&&w.endColumn<=S.startColumn||S.endLineNumber<w.startLineNumber||S.endLineNumber===w.startLineNumber&&S.endColumn<=w.startColumn)}static compareRangesUsingStarts(w,S){if(w&&S){const g=w.startLineNumber|0,p=S.startLineNumber|0;if(g===p){const c=w.startColumn|0,o=S.startColumn|0;if(c===o){const s=w.endLineNumber|0,a=S.endLineNumber|0;if(s===a){const u=w.endColumn|0,r=S.endColumn|0;return u-r}return s-a}return c-o}return g-p}return(w?1:0)-(S?1:0)}static compareRangesUsingEnds(w,S){return w.endLineNumber===S.endLineNumber?w.endColumn===S.endColumn?w.startLineNumber===S.startLineNumber?w.startColumn-S.startColumn:w.startLineNumber-S.startLineNumber:w.endColumn-S.endColumn:w.endLineNumber-S.endLineNumber}static spansMultipleLines(w){return w.endLineNumber>w.startLineNumber}}e.Range=N}),define(Q[214],J([0,1,8,14,3]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class w{constructor(d,g,p,c,o){this.value=d,this.selectionStart=g,this.selectionEnd=p,this.selectionStartPosition=c,this.selectionEndPosition=o}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(d){return new w(d.getValue(),d.getSelectionStart(),d.getSelectionEnd(),null,null)}collapseSelection(){return new w(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(d,g,p){e._debugComposition&&console.log("writeToTextArea "+d+": "+this.toString()),g.setValue(d,this.value),p&&g.setSelectionRange(d,this.selectionStart,this.selectionEnd)}deduceEditorPosition(d){if(d<=this.selectionStart){const c=this.value.substring(d,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,c,-1)}if(d>=this.selectionEnd){const c=this.value.substring(this.selectionEnd,d);return this._finishDeduceEditorPosition(this.selectionEndPosition,c,1)}const g=this.value.substring(this.selectionStart,d);if(g.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,g,1);const p=this.value.substring(d,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,p,-1)}_finishDeduceEditorPosition(d,g,p){let c=0,o=-1;for(;(o=g.indexOf(`
`,o+1))!==-1;)c++;return[d,p*g.length,c]}static selectedText(d){return new w(d,0,d.length,null,null)}static deduceInput(d,g,p){if(!d)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+d.toString()),console.log("CURRENT STATE: "+g.toString()));let c=d.value,o=d.selectionStart,s=d.selectionEnd,a=g.value,u=g.selectionStart,r=g.selectionEnd;const i=c.substring(s),n=a.substring(r),t=b.commonSuffixLength(i,n);a=a.substring(0,a.length-t),c=c.substring(0,c.length-t);const l=c.substring(0,o),h=a.substring(0,u),m=b.commonPrefixLength(l,h);if(a=a.substring(m),c=c.substring(m),u-=m,o-=m,r-=m,s-=m,e._debugComposition&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+c+">, selectionStart: "+o+", selectionEnd: "+s),console.log("AFTER DIFFING CURRENT STATE: <"+a+">, selectionStart: "+u+", selectionEnd: "+r)),p&&u===r&&c.length>0){let f=null;if(u===a.length?a.startsWith(c)&&(f=a.substring(c.length)):a.endsWith(c)&&(f=a.substring(0,a.length-c.length)),f!==null&&f.length>0&&(/\uFE0F/.test(f)||b.containsEmoji(f)))return{text:f,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(u===r){if(c===a&&o===0&&s===c.length&&u===a.length&&a.indexOf(`
`)===-1&&b.containsFullWidthCharacter(a))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const f=l.length-m;return e._debugComposition&&console.log("REMOVE PREVIOUS: "+(l.length-m)+" chars"),{text:a,replacePrevCharCnt:f,replaceNextCharCnt:0,positionDelta:0}}const _=s-o;return{text:a,replacePrevCharCnt:_,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(d,g){if(!d)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+d.toString()),console.log("CURRENT STATE: "+g.toString())),d.value===g.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:g.selectionEnd-d.selectionEnd};const p=Math.min(b.commonPrefixLength(d.value,g.value),d.selectionEnd),c=Math.min(b.commonSuffixLength(d.value,g.value),d.value.length-d.selectionEnd),o=d.value.substring(p,d.value.length-c),s=g.value.substring(p,g.value.length-c),a=d.selectionStart-p,u=d.selectionEnd-p,r=g.selectionStart-p,i=g.selectionEnd-p;return e._debugComposition&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+o+">, selectionStart: "+a+", selectionEnd: "+u),console.log("AFTER DIFFING CURRENT STATE: <"+s+">, selectionStart: "+r+", selectionEnd: "+i)),{text:s,replacePrevCharCnt:u,replaceNextCharCnt:o.length-u,positionDelta:i-s.length}}}e.TextAreaState=w,w.EMPTY=new w("",0,0,null,null);class S{static _getPageOfLine(d,g){return Math.floor((d-1)/g)}static _getRangeForPage(d,g){const p=d*g,c=p+1,o=p+g;return new M.Range(c,1,o+1,1)}static fromEditorSelection(d,g,p,c,o){const s=S._getPageOfLine(p.startLineNumber,c),a=S._getRangeForPage(s,c),u=S._getPageOfLine(p.endLineNumber,c),r=S._getRangeForPage(u,c),i=a.intersectRanges(new M.Range(1,1,p.startLineNumber,p.startColumn));let n=g.getValueInRange(i,1);const t=g.getLineCount(),l=g.getLineMaxColumn(t),h=r.intersectRanges(new M.Range(p.endLineNumber,p.endColumn,t,l));let m=g.getValueInRange(h,1),_;if(s===u||s+1===u)_=g.getValueInRange(p,1);else{const f=a.intersectRanges(p),v=r.intersectRanges(p);_=g.getValueInRange(f,1)+String.fromCharCode(8230)+g.getValueInRange(v,1)}if(o){const f=500;n.length>f&&(n=n.substring(n.length-f,n.length)),m.length>f&&(m=m.substring(0,f)),_.length>2*f&&(_=_.substring(0,f)+String.fromCharCode(8230)+_.substring(_.length-f,_.length))}return new w(n+_+m,n.length,n.length+_.length,new N.Position(p.startLineNumber,p.startColumn),new N.Position(p.endLineNumber,p.endColumn))}}e.PagedScreenReaderStrategy=S}),define(Q[215],J([0,1,195,6,2,40,3]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const C={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class d extends M.Disposable{constructor(p,c={}){super();this._onDidUpdate=this._register(new N.Emitter),this._editor=p,this._options=w.mixin(c,C,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(o=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(o=>{this.revealFirst=!0})),this._init()}_init(){!!this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(p){this.ranges=[],p&&p.forEach(c=>{!this._options.ignoreCharChanges&&c.charChanges?c.charChanges.forEach(o=>{this.ranges.push({rhs:!0,range:new S.Range(o.modifiedStartLineNumber,o.modifiedStartColumn,o.modifiedEndLineNumber,o.modifiedEndColumn)})}):this.ranges.push({rhs:!0,range:new S.Range(c.modifiedStartLineNumber,1,c.modifiedStartLineNumber,1)})}),this.ranges.sort((c,o)=>c.range.getStartPosition().isBeforeOrEqual(o.range.getStartPosition())?-1:o.range.getStartPosition().isBeforeOrEqual(c.range.getStartPosition())?1:0),this._onDidUpdate.fire(this)}_initIdx(p){let c=!1,o=this._editor.getPosition();if(!o){this.nextIdx=0;return}for(let s=0,a=this.ranges.length;s<a&&!c;s++){let u=this.ranges[s].range;o.isBeforeOrEqual(u.getStartPosition())&&(this.nextIdx=s+(p?0:-1),c=!0)}c||(this.nextIdx=p?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(p,c){if(b.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!!this.canNavigate()){this.nextIdx===-1?this._initIdx(p):p?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let o=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let s=o.range.getStartPosition();this._editor.setPosition(s),this._editor.revealPositionInCenter(s,c)}finally{this.ignoreSelectionChange=!1}}}canNavigate(){return this.ranges&&this.ranges.length>0}next(p=0){this._move(!0,p)}previous(p=0){this._move(!1,p)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}e.DiffNavigator=d}),define(Q[62],J([0,1,3]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class N{static insert(w,S){return{range:new b.Range(w.lineNumber,w.column,w.lineNumber,w.column),text:S,forceMoveMarkers:!0}}static delete(w){return{range:w,text:null}}static replace(w,S){return{range:w,text:S}}static replaceMove(w,S){return{range:w,text:S,forceMoveMarkers:!0}}}e.EditOperation=N}),define(Q[366],J([0,1,8,62,3]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class w{constructor(d,g){this._selection=d,this._cursors=g,this._selectionId=null}getEditOperations(d,g){let p=S(d,this._cursors);for(let c=0,o=p.length;c<o;c++){let s=p[c];g.addEditOperation(s.range,s.text)}this._selectionId=g.trackSelection(this._selection)}computeCursorState(d,g){return g.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=w;function S(C,d){d.sort((s,a)=>s.lineNumber===a.lineNumber?s.column-a.column:s.lineNumber-a.lineNumber);for(let s=d.length-2;s>=0;s--)d[s].lineNumber===d[s+1].lineNumber&&d.splice(s,1);let g=[],p=0,c=0,o=d.length;for(let s=1,a=C.getLineCount();s<=a;s++){let u=C.getLineContent(s),r=u.length+1,i=0;if(!(c<o&&d[c].lineNumber===s&&(i=d[c].column,c++,i===r))&&u.length!==0){let n=b.lastNonWhitespaceIndex(u),t=0;if(n===-1)t=1;else if(n!==u.length-1)t=n+2;else continue;t=Math.max(i,t),g[p++]=N.EditOperation.delete(new M.Range(s,t,s,r))}}return g}e.trimTrailingWhitespace=S}),define(Q[216],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class b{constructor(M,w,S,C){this.r=b._clamp(M),this.g=b._clamp(w),this.b=b._clamp(S),this.a=b._clamp(C)}equals(M){return this.r===M.r&&this.g===M.g&&this.b===M.b&&this.a===M.a}static _clamp(M){return M<0?0:M>255?255:M|0}}e.RGBA8=b,b.Empty=new b(0,0,0,0)}),define(Q[21],J([0,1,14,3]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class M extends N.Range{constructor(S,C,d,g){super(S,C,d,g);this.selectionStartLineNumber=S,this.selectionStartColumn=C,this.positionLineNumber=d,this.positionColumn=g}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(S){return M.selectionsEqual(this,S)}static selectionsEqual(S,C){return S.selectionStartLineNumber===C.selectionStartLineNumber&&S.selectionStartColumn===C.selectionStartColumn&&S.positionLineNumber===C.positionLineNumber&&S.positionColumn===C.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(S,C){return this.getDirection()===0?new M(this.startLineNumber,this.startColumn,S,C):new M(S,C,this.startLineNumber,this.startColumn)}getPosition(){return new b.Position(this.positionLineNumber,this.positionColumn)}setStartPosition(S,C){return this.getDirection()===0?new M(S,C,this.endLineNumber,this.endColumn):new M(this.endLineNumber,this.endColumn,S,C)}static fromPositions(S,C=S){return new M(S.lineNumber,S.column,C.lineNumber,C.column)}static liftSelection(S){return new M(S.selectionStartLineNumber,S.selectionStartColumn,S.positionLineNumber,S.positionColumn)}static selectionsArrEqual(S,C){if(S&&!C||!S&&C)return!1;if(!S&&!C)return!0;if(S.length!==C.length)return!1;for(let d=0,g=S.length;d<g;d++)if(!this.selectionsEqual(S[d],C[d]))return!1;return!0}static isISelection(S){return S&&typeof S.selectionStartLineNumber=="number"&&typeof S.selectionStartColumn=="number"&&typeof S.positionLineNumber=="number"&&typeof S.positionColumn=="number"}static createWithDirection(S,C,d,g,p){return p===0?new M(S,C,d,g):new M(d,g,S,C)}}e.Selection=M}),define(Q[164],J([0,1,35,7,15,6,2,17,8,214,14,21]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var o;(function(i){i.Tap="-monaco-textarea-synthetic-tap"})(o=e.TextAreaSyntethicEvents||(e.TextAreaSyntethicEvents={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class s{constructor(){this._lastState=null}set(n,t){this._lastState={lastCopiedValue:n,data:t}}get(n){return this._lastState&&this._lastState.lastCopiedValue===n?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=s,s.INSTANCE=new s;class a extends S.Disposable{constructor(n,t){super();this.textArea=t,this._onFocus=this._register(new w.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new w.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new w.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new w.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new w.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new w.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new w.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new w.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new w.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new w.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new w.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=n,this._textArea=this._register(new r(t)),this._asyncTriggerCut=this._register(new M.RunOnceScheduler(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new M.RunOnceScheduler(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=g.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let l=null;this._register(N.addStandardDisposableListener(t.domNode,"keydown",f=>{(f.keyCode===109||this._isDoingComposition&&f.keyCode===1)&&f.stopPropagation(),f.equals(9)&&f.preventDefault(),l=f,this._onKeyDown.fire(f)})),this._register(N.addStandardDisposableListener(t.domNode,"keyup",f=>{this._onKeyUp.fire(f)})),this._register(N.addDisposableListener(t.domNode,"compositionstart",f=>{if(g._debugComposition&&console.log("[compositionstart]",f),!this._isDoingComposition){if(this._isDoingComposition=!0,C.isMacintosh&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===f.data&&(l&&l.equals(109)&&(l.code==="ArrowRight"||l.code==="ArrowLeft")||b.isFirefox)){g._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",f),this._textAreaState=new g.TextAreaState(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new p.Position(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),this._onCompositionStart.fire({revealDeltaColumns:-1});return}if(b.isAndroid){this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart});return}this._setAndWriteTextAreaState("compositionstart",g.TextAreaState.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0})}}));const h=f=>{const v=this._textAreaState,y=g.TextAreaState.readFromTextArea(this._textArea);return[y,g.TextAreaState.deduceInput(v,y,f)]},m=()=>{const f=this._textAreaState,v=g.TextAreaState.readFromTextArea(this._textArea);return[v,g.TextAreaState.deduceAndroidCompositionInput(f,v)]},_=f=>{const v=this._textAreaState,y=g.TextAreaState.selectedText(f),L={text:y.value,replacePrevCharCnt:v.selectionEnd-v.selectionStart,replaceNextCharCnt:0,positionDelta:0};return[y,L]};this._register(N.addDisposableListener(t.domNode,"compositionupdate",f=>{if(g._debugComposition&&console.log("[compositionupdate]",f),b.isAndroid){const[L,I]=m();this._textAreaState=L,this._onType.fire(I),this._onCompositionUpdate.fire(f);return}const[v,y]=_(f.data||"");this._textAreaState=v,this._onType.fire(y),this._onCompositionUpdate.fire(f)})),this._register(N.addDisposableListener(t.domNode,"compositionend",f=>{if(g._debugComposition&&console.log("[compositionend]",f),!!this._isDoingComposition){if(this._isDoingComposition=!1,b.isAndroid){const[L,I]=m();this._textAreaState=L,this._onType.fire(I),this._onCompositionEnd.fire();return}const[v,y]=_(f.data||"");this._textAreaState=v,this._onType.fire(y),(b.isChrome||b.isFirefox)&&(this._textAreaState=g.TextAreaState.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()}})),this._register(N.addDisposableListener(t.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),!this._isDoingComposition){const[f,v]=h(C.isMacintosh);v.replacePrevCharCnt===0&&v.text.length===1&&d.isHighSurrogate(v.text.charCodeAt(0))||(this._textAreaState=f,this._nextCommand===0?(v.text!==""||v.replacePrevCharCnt!==0)&&this._onType.fire(v):((v.text!==""||v.replacePrevCharCnt!==0)&&this._firePaste(v.text,null),this._nextCommand=0))}})),this._register(N.addDisposableListener(t.domNode,"cut",f=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(f),this._asyncTriggerCut.schedule()})),this._register(N.addDisposableListener(t.domNode,"copy",f=>{this._ensureClipboardGetsEditorSelection(f)})),this._register(N.addDisposableListener(t.domNode,"paste",f=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),u.canUseTextData(f)){const[v,y]=u.getTextData(f);v!==""&&this._firePaste(v,y)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",g.TextAreaState.EMPTY),this._nextCommand=1})),this._register(N.addDisposableListener(t.domNode,"focus",()=>{const f=this._hasFocus;this._setHasFocus(!0),b.isSafari&&!f&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(N.addDisposableListener(t.domNode,"blur",()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(N.addDisposableListener(t.domNode,o.Tap,()=>{b.isAndroid&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let n=0;return N.addDisposableListener(document,"selectionchange",t=>{if(!!this._hasFocus&&!this._isDoingComposition&&!!b.isChrome){const l=Date.now(),h=l-n;if(n=l,!(h<5)){const m=l-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),!(m<100)&&!(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)){const _=this._textArea.getValue();if(this._textAreaState.value===_){const f=this._textArea.getSelectionStart(),v=this._textArea.getSelectionEnd();if(!(this._textAreaState.selectionStart===f&&this._textAreaState.selectionEnd===v)){const y=this._textAreaState.deduceEditorPosition(f),L=this._host.deduceModelPosition(y[0],y[1],y[2]),I=this._textAreaState.deduceEditorPosition(v),k=this._host.deduceModelPosition(I[0],I[1],I[2]),E=new c.Selection(L.lineNumber,L.column,k.lineNumber,k.column);this._onSelectionChangeRequest.fire(E)}}}}}})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const n=N.getShadowRoot(this.textArea.domNode);n?this._setHasFocus(n.activeElement===this.textArea.domNode):N.isInDOM(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(n){this._hasFocus!==n&&(this._hasFocus=n,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(n,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(n,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(n){this._isDoingComposition||this._setAndWriteTextAreaState(n,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(n){const t=this._host.getDataToCopy(u.canUseTextData(n)),l={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};if(s.INSTANCE.set(b.isFirefox?t.text.replace(/\r\n/g,`
`):t.text,l),!u.canUseTextData(n)){this._setAndWriteTextAreaState("copy or cut",g.TextAreaState.selectedText(t.text));return}u.setTextData(n,t.text,t.html,l)}_firePaste(n,t){t||(t=s.INSTANCE.get(n)),this._onPaste.fire({text:n,metadata:t})}}e.TextAreaInput=a;class u{static canUseTextData(n){return!!(n.clipboardData||window.clipboardData)}static getTextData(n){if(n.clipboardData){n.preventDefault();const t=n.clipboardData.getData("text/plain");let l=null;const h=n.clipboardData.getData("vscode-editor-data");if(typeof h=="string")try{l=JSON.parse(h),l.version!==1&&(l=null)}catch(m){}return[t,l]}if(window.clipboardData)return n.preventDefault(),[window.clipboardData.getData("Text"),null];throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(n,t,l,h){if(n.clipboardData){n.clipboardData.setData("text/plain",t),typeof l=="string"&&n.clipboardData.setData("text/html",l),n.clipboardData.setData("vscode-editor-data",JSON.stringify(h)),n.preventDefault();return}if(window.clipboardData){window.clipboardData.setData("Text",t),n.preventDefault();return}throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class r extends S.Disposable{constructor(n){super();this._actual=n,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(n){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(n,t){const l=this._actual.domNode;l.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),l.value=t)}getSelectionStart(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(n,t,l){const h=this._actual.domNode;let m=null;const _=N.getShadowRoot(h);_?m=_.activeElement:m=document.activeElement;const f=m===h,v=h.selectionStart,y=h.selectionEnd;if(f&&v===t&&y===l){b.isFirefox&&window.parent!==window&&h.focus();return}if(f){this.setIgnoreSelectionChangeTime("setSelectionRange"),h.setSelectionRange(t,l),b.isFirefox&&window.parent!==window&&h.focus();return}try{const L=N.saveParentsScrollTop(h);this.setIgnoreSelectionChangeTime("setSelectionRange"),h.focus(),h.setSelectionRange(t,l),N.restoreParentsScrollTop(h,L)}catch(L){}}}}),define(Q[92],J([0,1,21]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class N{constructor(g,p,c=!1){this._range=g,this._text=p,this.insertsAutoWhitespace=c}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,p){let o=p.getInverseEditOperations()[0].range;return new b.Selection(o.endLineNumber,o.endColumn,o.endLineNumber,o.endColumn)}}e.ReplaceCommand=N;class M{constructor(g,p){this._range=g,this._text=p}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,p){const o=p.getInverseEditOperations()[0].range;return new b.Selection(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn)}}e.ReplaceCommandThatSelectsText=M;class w{constructor(g,p,c=!1){this._range=g,this._text=p,this.insertsAutoWhitespace=c}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,p){let o=p.getInverseEditOperations()[0].range;return new b.Selection(o.startLineNumber,o.startColumn,o.startLineNumber,o.startColumn)}}e.ReplaceCommandWithoutChangingPosition=w;class S{constructor(g,p,c,o,s=!1){this._range=g,this._text=p,this._columnDeltaOffset=o,this._lineNumberDeltaOffset=c,this.insertsAutoWhitespace=s}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,p){let o=p.getInverseEditOperations()[0].range;return new b.Selection(o.endLineNumber+this._lineNumberDeltaOffset,o.endColumn+this._columnDeltaOffset,o.endLineNumber+this._lineNumberDeltaOffset,o.endColumn+this._columnDeltaOffset)}}e.ReplaceCommandWithOffsetCursorState=S;class C{constructor(g,p,c,o=!1){this._range=g,this._text=p,this._initialSelection=c,this._forceMoveMarkers=o,this._selectionId=null}getEditOperations(g,p){p.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=p.trackSelection(this._initialSelection)}computeCursorState(g,p){return p.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=C}),define(Q[367],J([0,1,3,21]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SurroundSelectionCommand=void 0;class M{constructor(S,C,d){this._range=S,this._charBeforeSelection=C,this._charAfterSelection=d}getEditOperations(S,C){C.addTrackedEditOperation(new b.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),C.addTrackedEditOperation(new b.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(S,C){let d=C.getInverseEditOperations(),g=d[0].range,p=d[1].range;return new N.Selection(g.endLineNumber,g.endColumn,p.endLineNumber,p.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=M}),define(Q[93],J([0,1,8,17,101]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeUTF16LE=e.createStringBuilder=e.hasTextDecoder=e.getPlatformTextDecoder=void 0;let w;function S(){return w||(w=new TextDecoder(N.isLittleEndian()?"UTF-16LE":"UTF-16BE")),w}e.getPlatformTextDecoder=S,e.hasTextDecoder=typeof TextDecoder!="undefined",e.hasTextDecoder?(e.createStringBuilder=c=>new g(c),e.decodeUTF16LE=C):(e.createStringBuilder=c=>new p,e.decodeUTF16LE=d);function C(c,o,s){const a=new Uint16Array(c.buffer,o,s);return S().decode(a)}function d(c,o,s){let a=[],u=0;for(let r=0;r<s;r++){const i=M.readUInt16LE(c,o);o+=2,a[u++]=String.fromCharCode(i)}return a.join("")}class g{constructor(o){this._capacity=o|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const o=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return S().decode(o)}_flushBuffer(){const o=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[o]:this._completedStrings[this._completedStrings.length]=o}write1(o){const s=this._capacity-this._bufferLength;s<=1&&(s===0||b.isHighSurrogate(o))&&this._flushBuffer(),this._buffer[this._bufferLength++]=o}appendASCII(o){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=o}appendASCIIString(o){const s=o.length;if(this._bufferLength+s>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=o;return}for(let a=0;a<s;a++)this._buffer[this._bufferLength++]=o.charCodeAt(a)}}class p{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(o){this._pieces[this._piecesLen++]=String.fromCharCode(o)}appendASCII(o){this._pieces[this._piecesLen++]=String.fromCharCode(o)}appendASCIIString(o){this._pieces[this._piecesLen++]=o}}}),define(Q[165],J([0,1,30,93]),function(q,e,b,N){"use strict";var M;Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class w{constructor(g){this._createLine=g,this._set(1,[])}flush(){this._set(1,[])}_set(g,p){this._lines=p,this._rendLineNumberStart=g}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(g){const p=g-this._rendLineNumberStart;if(p<0||p>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[p]}onLinesDeleted(g,p){if(this.getCount()===0)return null;const c=this.getStartLineNumber(),o=this.getEndLineNumber();if(p<c){const r=p-g+1;return this._rendLineNumberStart-=r,null}if(g>o)return null;let s=0,a=0;for(let r=c;r<=o;r++){const i=r-this._rendLineNumberStart;g<=r&&r<=p&&(a===0?(s=i,a=1):a++)}if(g<c){let r=0;p<c?r=p-g+1:r=c-g,this._rendLineNumberStart-=r}return this._lines.splice(s,a)}onLinesChanged(g,p){if(this.getCount()===0)return!1;const c=this.getStartLineNumber(),o=this.getEndLineNumber();let s=!1;for(let a=g;a<=p;a++)a>=c&&a<=o&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(g,p){if(this.getCount()===0)return null;const c=p-g+1,o=this.getStartLineNumber(),s=this.getEndLineNumber();if(g<=o)return this._rendLineNumberStart+=c,null;if(g>s)return null;if(c+g>s)return this._lines.splice(g-this._rendLineNumberStart,s-g+1);const a=[];for(let t=0;t<c;t++)a[t]=this._createLine();const u=g-this._rendLineNumberStart,r=this._lines.slice(0,u),i=this._lines.slice(u,this._lines.length-c),n=this._lines.slice(this._lines.length-c,this._lines.length);return this._lines=r.concat(a).concat(i),n}onTokensChanged(g){if(this.getCount()===0)return!1;const p=this.getStartLineNumber(),c=this.getEndLineNumber();let o=!1;for(let s=0,a=g.length;s<a;s++){const u=g[s];if(!(u.toLineNumber<p||u.fromLineNumber>c)){const r=Math.max(p,u.fromLineNumber),i=Math.min(c,u.toLineNumber);for(let n=r;n<=i;n++){const t=n-this._rendLineNumberStart;this._lines[t].onTokensChanged(),o=!0}}}return o}}e.RenderedLinesCollection=w;class S{constructor(g){this._host=g,this.domNode=this._createDomNode(),this._linesCollection=new w(()=>this._host.createVisibleLine())}_createDomNode(){const g=b.createFastDomNode(document.createElement("div"));return g.setClassName("view-layer"),g.setPosition("absolute"),g.domNode.setAttribute("role","presentation"),g.domNode.setAttribute("aria-hidden","true"),g}onConfigurationChanged(g){return!!g.hasChanged(124)}onFlushed(g){return this._linesCollection.flush(),!0}onLinesChanged(g){return this._linesCollection.onLinesChanged(g.fromLineNumber,g.toLineNumber)}onLinesDeleted(g){const p=this._linesCollection.onLinesDeleted(g.fromLineNumber,g.toLineNumber);if(p)for(let c=0,o=p.length;c<o;c++){const s=p[c].getDomNode();s&&this.domNode.domNode.removeChild(s)}return!0}onLinesInserted(g){const p=this._linesCollection.onLinesInserted(g.fromLineNumber,g.toLineNumber);if(p)for(let c=0,o=p.length;c<o;c++){const s=p[c].getDomNode();s&&this.domNode.domNode.removeChild(s)}return!0}onScrollChanged(g){return g.scrollTopChanged}onTokensChanged(g){return this._linesCollection.onTokensChanged(g.ranges)}onZonesChanged(g){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(g){return this._linesCollection.getLine(g)}renderLines(g){const p=this._linesCollection._get(),c=new C(this.domNode.domNode,this._host,g),o={rendLineNumberStart:p.rendLineNumberStart,lines:p.lines,linesLength:p.lines.length},s=c.render(o,g.startLineNumber,g.endLineNumber,g.relativeVerticalOffset);this._linesCollection._set(s.rendLineNumberStart,s.lines)}}e.VisibleLinesCollection=S;class C{constructor(g,p,c){this.domNode=g,this.host=p,this.viewportData=c}render(g,p,c,o){const s={rendLineNumberStart:g.rendLineNumberStart,lines:g.lines.slice(0),linesLength:g.linesLength};if(s.rendLineNumberStart+s.linesLength-1<p||c<s.rendLineNumberStart){s.rendLineNumberStart=p,s.linesLength=c-p+1,s.lines=[];for(let a=p;a<=c;a++)s.lines[a-p]=this.host.createVisibleLine();return this._finishRendering(s,!0,o),s}if(this._renderUntouchedLines(s,Math.max(p-s.rendLineNumberStart,0),Math.min(c-s.rendLineNumberStart,s.linesLength-1),o,p),s.rendLineNumberStart>p){const a=p,u=Math.min(c,s.rendLineNumberStart-1);a<=u&&(this._insertLinesBefore(s,a,u,o,p),s.linesLength+=u-a+1)}else if(s.rendLineNumberStart<p){const a=Math.min(s.linesLength,p-s.rendLineNumberStart);a>0&&(this._removeLinesBefore(s,a),s.linesLength-=a)}if(s.rendLineNumberStart=p,s.rendLineNumberStart+s.linesLength-1<c){const a=s.rendLineNumberStart+s.linesLength,u=c;a<=u&&(this._insertLinesAfter(s,a,u,o,p),s.linesLength+=u-a+1)}else if(s.rendLineNumberStart+s.linesLength-1>c){const a=Math.max(0,c-s.rendLineNumberStart+1),r=s.linesLength-1-a+1;r>0&&(this._removeLinesAfter(s,r),s.linesLength-=r)}return this._finishRendering(s,!1,o),s}_renderUntouchedLines(g,p,c,o,s){const a=g.rendLineNumberStart,u=g.lines;for(let r=p;r<=c;r++){const i=a+r;u[r].layoutLine(i,o[i-s])}}_insertLinesBefore(g,p,c,o,s){const a=[];let u=0;for(let r=p;r<=c;r++)a[u++]=this.host.createVisibleLine();g.lines=a.concat(g.lines)}_removeLinesBefore(g,p){for(let c=0;c<p;c++){const o=g.lines[c].getDomNode();o&&this.domNode.removeChild(o)}g.lines.splice(0,p)}_insertLinesAfter(g,p,c,o,s){const a=[];let u=0;for(let r=p;r<=c;r++)a[u++]=this.host.createVisibleLine();g.lines=g.lines.concat(a)}_removeLinesAfter(g,p){const c=g.linesLength-p;for(let o=0;o<p;o++){const s=g.lines[c+o].getDomNode();s&&this.domNode.removeChild(s)}g.lines.splice(c,p)}_finishRenderingNewLines(g,p,c,o){C._ttPolicy&&(c=C._ttPolicy.createHTML(c));const s=this.domNode.lastChild;p||!s?this.domNode.innerHTML=c:s.insertAdjacentHTML("afterend",c);let a=this.domNode.lastChild;for(let u=g.linesLength-1;u>=0;u--){const r=g.lines[u];o[u]&&(r.setDomNode(a),a=a.previousSibling)}}_finishRenderingInvalidLines(g,p,c){const o=document.createElement("div");C._ttPolicy&&(p=C._ttPolicy.createHTML(p)),o.innerHTML=p;for(let s=0;s<g.linesLength;s++){const a=g.lines[s];if(c[s]){const u=o.firstChild,r=a.getDomNode();r.parentNode.replaceChild(u,r),a.setDomNode(u)}}}_finishRendering(g,p,c){const o=C._sb,s=g.linesLength,a=g.lines,u=g.rendLineNumberStart,r=[];{o.reset();let i=!1;for(let n=0;n<s;n++){const t=a[n];r[n]=!1,!t.getDomNode()&&(!t.renderLine(n+u,c[n],this.viewportData,o)||(r[n]=!0,i=!0))}i&&this._finishRenderingNewLines(g,p,o.build(),r)}{o.reset();let i=!1;const n=[];for(let t=0;t<s;t++){const l=a[t];n[t]=!1,!r[t]&&(!l.renderLine(t+u,c[t],this.viewportData,o)||(n[t]=!0,i=!0))}i&&this._finishRenderingInvalidLines(g,o.build(),n)}}}C._ttPolicy=(M=window.trustedTypes)===null||M===void 0?void 0:M.createPolicy("editorViewLayer",{createHTML:d=>d}),C._sb=N.createStringBuilder(1e5)}),define(Q[127],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationResult2=e.TokenizationResult=e.Token=void 0;class b{constructor(S,C,d){this.offset=S|0,this.type=C,this.language=d}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=b;class N{constructor(S,C){this.tokens=S,this.endState=C}}e.TokenizationResult=N;class M{constructor(S,C){this.tokens=S,this.endState=C}}e.TokenizationResult2=M}),define(Q[368],J([0,1,153,8]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=void 0;const M=3;function w(u,r,i,n){return new b.LcsDiff(u,r,i).ComputeDiff(n)}class S{constructor(r){const i=[],n=[];for(let t=0,l=r.length;t<l;t++)i[t]=o(r[t],1),n[t]=s(r[t],1);this.lines=r,this._startColumns=i,this._endColumns=n}getElements(){const r=[];for(let i=0,n=this.lines.length;i<n;i++)r[i]=this.lines[i].substring(this._startColumns[i]-1,this._endColumns[i]-1);return r}getStartLineNumber(r){return r+1}getEndLineNumber(r){return r+1}createCharSequence(r,i,n){const t=[],l=[],h=[];let m=0;for(let _=i;_<=n;_++){const f=this.lines[_],v=r?this._startColumns[_]:1,y=r?this._endColumns[_]:f.length+1;for(let L=v;L<y;L++)t[m]=f.charCodeAt(L-1),l[m]=_+1,h[m]=L,m++}return new C(t,l,h)}}class C{constructor(r,i,n){this._charCodes=r,this._lineNumbers=i,this._columns=n}getElements(){return this._charCodes}getStartLineNumber(r){return this._lineNumbers[r]}getStartColumn(r){return this._columns[r]}getEndLineNumber(r){return this._lineNumbers[r]}getEndColumn(r){return this._columns[r]+1}}class d{constructor(r,i,n,t,l,h,m,_){this.originalStartLineNumber=r,this.originalStartColumn=i,this.originalEndLineNumber=n,this.originalEndColumn=t,this.modifiedStartLineNumber=l,this.modifiedStartColumn=h,this.modifiedEndLineNumber=m,this.modifiedEndColumn=_}static createFromDiffChange(r,i,n){let t,l,h,m,_,f,v,y;return r.originalLength===0?(t=0,l=0,h=0,m=0):(t=i.getStartLineNumber(r.originalStart),l=i.getStartColumn(r.originalStart),h=i.getEndLineNumber(r.originalStart+r.originalLength-1),m=i.getEndColumn(r.originalStart+r.originalLength-1)),r.modifiedLength===0?(_=0,f=0,v=0,y=0):(_=n.getStartLineNumber(r.modifiedStart),f=n.getStartColumn(r.modifiedStart),v=n.getEndLineNumber(r.modifiedStart+r.modifiedLength-1),y=n.getEndColumn(r.modifiedStart+r.modifiedLength-1)),new d(t,l,h,m,_,f,v,y)}}function g(u){if(u.length<=1)return u;const r=[u[0]];let i=r[0];for(let n=1,t=u.length;n<t;n++){const l=u[n],h=l.originalStart-(i.originalStart+i.originalLength),m=l.modifiedStart-(i.modifiedStart+i.modifiedLength);Math.min(h,m)<M?(i.originalLength=l.originalStart+l.originalLength-i.originalStart,i.modifiedLength=l.modifiedStart+l.modifiedLength-i.modifiedStart):(r.push(l),i=l)}return r}class p{constructor(r,i,n,t,l){this.originalStartLineNumber=r,this.originalEndLineNumber=i,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=t,this.charChanges=l}static createFromDiffResult(r,i,n,t,l,h,m){let _,f,v,y,L;if(i.originalLength===0?(_=n.getStartLineNumber(i.originalStart)-1,f=0):(_=n.getStartLineNumber(i.originalStart),f=n.getEndLineNumber(i.originalStart+i.originalLength-1)),i.modifiedLength===0?(v=t.getStartLineNumber(i.modifiedStart)-1,y=0):(v=t.getStartLineNumber(i.modifiedStart),y=t.getEndLineNumber(i.modifiedStart+i.modifiedLength-1)),h&&i.originalLength>0&&i.originalLength<20&&i.modifiedLength>0&&i.modifiedLength<20&&l()){const I=n.createCharSequence(r,i.originalStart,i.originalStart+i.originalLength-1),k=t.createCharSequence(r,i.modifiedStart,i.modifiedStart+i.modifiedLength-1);let E=w(I,k,l,!0).changes;m&&(E=g(E)),L=[];for(let T=0,O=E.length;T<O;T++)L.push(d.createFromDiffChange(E[T],I,k))}return new p(_,f,v,y,L)}}class c{constructor(r,i,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=r,this.modifiedLines=i,this.original=new S(r),this.modified=new S(i),this.continueLineDiff=a(n.maxComputationTime),this.continueCharDiff=a(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const r=w(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),i=r.changes,n=r.quitEarly;if(this.shouldIgnoreTrimWhitespace){const m=[];for(let _=0,f=i.length;_<f;_++)m.push(p.createFromDiffResult(this.shouldIgnoreTrimWhitespace,i[_],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:m}}const t=[];let l=0,h=0;for(let m=-1,_=i.length;m<_;m++){const f=m+1<_?i[m+1]:null,v=f?f.originalStart:this.originalLines.length,y=f?f.modifiedStart:this.modifiedLines.length;for(;l<v&&h<y;){const L=this.originalLines[l],I=this.modifiedLines[h];if(L!==I){{let k=o(L,1),E=o(I,1);for(;k>1&&E>1;){const T=L.charCodeAt(k-2),O=I.charCodeAt(E-2);if(T!==O)break;k--,E--}(k>1||E>1)&&this._pushTrimWhitespaceCharChange(t,l+1,1,k,h+1,1,E)}{let k=s(L,1),E=s(I,1);const T=L.length+1,O=I.length+1;for(;k<T&&E<O;){const A=L.charCodeAt(k-1),B=L.charCodeAt(E-1);if(A!==B)break;k++,E++}(k<T||E<O)&&this._pushTrimWhitespaceCharChange(t,l+1,k,T,h+1,E,O)}}l++,h++}f&&(t.push(p.createFromDiffResult(this.shouldIgnoreTrimWhitespace,f,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),l+=f.originalLength,h+=f.modifiedLength)}return{quitEarly:n,changes:t}}_pushTrimWhitespaceCharChange(r,i,n,t,l,h,m){if(!this._mergeTrimWhitespaceCharChange(r,i,n,t,l,h,m)){let _;this.shouldComputeCharChanges&&(_=[new d(i,n,i,t,l,h,l,m)]),r.push(new p(i,i,l,l,_))}}_mergeTrimWhitespaceCharChange(r,i,n,t,l,h,m){const _=r.length;if(_===0)return!1;const f=r[_-1];return f.originalEndLineNumber===0||f.modifiedEndLineNumber===0?!1:f.originalEndLineNumber+1===i&&f.modifiedEndLineNumber+1===l?(f.originalEndLineNumber=i,f.modifiedEndLineNumber=l,this.shouldComputeCharChanges&&f.charChanges&&f.charChanges.push(new d(i,n,i,t,l,h,l,m)),!0):!1}}e.DiffComputer=c;function o(u,r){const i=N.firstNonWhitespaceIndex(u);return i===-1?r:i+1}function s(u,r){const i=N.lastNonWhitespaceIndex(u);return i===-1?r:i+2}function a(u){if(u===0)return()=>!0;const r=Date.now();return()=>Date.now()-r<u}}),define(Q[217],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class b{constructor(M,w,S,C,d,g){this.id=M,this.label=w,this.alias=S,this._precondition=C,this._run=d,this._contextKeyService=g}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}e.InternalEditorAction=b}),define(Q[107],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorType=e.isThemeColor=void 0;function b(N){return N&&typeof N.id=="string"}e.isThemeColor=b,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}}),define(Q[108],J([0,1,107]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeEditor=e.isDiffEditor=e.isCodeEditor=void 0;function N(S){return S&&typeof S.getEditorType=="function"?S.getEditorType()===b.EditorType.ICodeEditor:!1}e.isCodeEditor=N;function M(S){return S&&typeof S.getEditorType=="function"?S.getEditorType()===b.EditorType.IDiffEditor:!1}e.isDiffEditor=M;function w(S){return N(S)?S:M(S)?S.getModifiedEditor():null}e.getCodeEditor=w}),define(Q[53],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplyEditsResult=e.ValidAnnotatedEditOperation=e.FindMatch=e.TextModelResolvedOptions=e.MinimapPosition=e.OverviewRulerLane=void 0;var b;(function(d){d[d.Left=1]="Left",d[d.Center=2]="Center",d[d.Right=4]="Right",d[d.Full=7]="Full"})(b=e.OverviewRulerLane||(e.OverviewRulerLane={}));var N;(function(d){d[d.Inline=1]="Inline",d[d.Gutter=2]="Gutter"})(N=e.MinimapPosition||(e.MinimapPosition={}));class M{constructor(g){this.tabSize=Math.max(1,g.tabSize|0),this.indentSize=g.tabSize|0,this.insertSpaces=Boolean(g.insertSpaces),this.defaultEOL=g.defaultEOL|0,this.trimAutoWhitespace=Boolean(g.trimAutoWhitespace)}equals(g){return this.tabSize===g.tabSize&&this.indentSize===g.indentSize&&this.insertSpaces===g.insertSpaces&&this.defaultEOL===g.defaultEOL&&this.trimAutoWhitespace===g.trimAutoWhitespace}createChangeEvent(g){return{tabSize:this.tabSize!==g.tabSize,indentSize:this.indentSize!==g.indentSize,insertSpaces:this.insertSpaces!==g.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==g.trimAutoWhitespace}}}e.TextModelResolvedOptions=M;class w{constructor(g,p){this.range=g,this.matches=p}}e.FindMatch=w;class S{constructor(g,p,c,o,s,a){this.identifier=g,this.range=p,this.text=c,this.forceMoveMarkers=o,this.isAutoWhitespaceEdit=s,this._isTracked=a}}e.ValidAnnotatedEditOperation=S;class C{constructor(g,p,c){this.reverseEdits=g,this.changes=p,this.trimAutoWhitespaceLineNumbers=c}}e.ApplyEditsResult=C}),define(Q[369],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class b{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function N(w,S,C,d,g){g.spacesDiff=0,g.looksLikeAlignment=!1;let p;for(p=0;p<S&&p<d;p++){let i=w.charCodeAt(p),n=C.charCodeAt(p);if(i!==n)break}let c=0,o=0;for(let i=p;i<S;i++)w.charCodeAt(i)===32?c++:o++;let s=0,a=0;for(let i=p;i<d;i++)C.charCodeAt(i)===32?s++:a++;if(!(c>0&&o>0)&&!(s>0&&a>0)){let u=Math.abs(o-a),r=Math.abs(c-s);if(u===0){g.spacesDiff=r,r>0&&0<=s-1&&s-1<w.length&&s<C.length&&C.charCodeAt(s)!==32&&w.charCodeAt(s-1)===32&&w.charCodeAt(w.length-1)===44&&(g.looksLikeAlignment=!0);return}if(r%u==0){g.spacesDiff=r/u;return}}}function M(w,S,C){const d=Math.min(w.getLineCount(),1e4);let g=0,p=0,c="",o=0;const s=[2,4,6,8,3,5,7],a=8;let u=[0,0,0,0,0,0,0,0,0],r=new b;for(let t=1;t<=d;t++){let l=w.getLineLength(t),h=w.getLineContent(t);const m=l<=65536;let _=!1,f=0,v=0,y=0;for(let I=0,k=l;I<k;I++){let E=m?h.charCodeAt(I):w.getLineCharCode(t,I);if(E===9)y++;else if(E===32)v++;else{_=!0,f=I;break}}if(!!_&&(y>0?g++:v>1&&p++,N(c,o,h,f,r),!(r.looksLikeAlignment&&!(C&&S===r.spacesDiff)))){let L=r.spacesDiff;L<=a&&u[L]++,c=h,o=f}}let i=C;g!==p&&(i=g<p);let n=S;if(i){let t=i?0:.1*d;s.forEach(l=>{let h=u[l];h>t&&(t=h,n=l)}),n===4&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(n=2)}return{insertSpaces:i,tabSize:n}}e.guessIndentation=M}),define(Q[370],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.getNodeIsInOverviewRuler=e.getNodeColor=void 0;function b(D){return(D.metadata&1)>>>0}e.getNodeColor=b;function N(D,R){D.metadata=D.metadata&254|R<<0}function M(D){return(D.metadata&2)>>>1==1}function w(D,R){D.metadata=D.metadata&253|(R?1:0)<<1}function S(D){return(D.metadata&4)>>>2==1}function C(D,R){D.metadata=D.metadata&251|(R?1:0)<<2}function d(D){return(D.metadata&8)>>>3==1}e.getNodeIsInOverviewRuler=d;function g(D,R){D.metadata=D.metadata&247|(R?1:0)<<3}function p(D){return(D.metadata&48)>>>4}function c(D,R){D.metadata=D.metadata&207|R<<4}function o(D){return(D.metadata&64)>>>6==1}function s(D,R){D.metadata=D.metadata&191|(R?1:0)<<6}class a{constructor(R,W,x){this.metadata=0,this.parent=this,this.left=this,this.right=this,N(this,1),this.start=W,this.end=x,this.delta=0,this.maxEnd=x,this.id=R,this.ownerId=0,this.options=null,C(this,!1),c(this,1),g(this,!1),s(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=W,this.cachedAbsoluteEnd=x,this.range=null,w(this,!1)}reset(R,W,x,K){this.start=W,this.end=x,this.maxEnd=x,this.cachedVersionId=R,this.cachedAbsoluteStart=W,this.cachedAbsoluteEnd=x,this.range=K}setOptions(R){this.options=R;let W=this.options.className;C(this,W==="squiggly-error"||W==="squiggly-warning"||W==="squiggly-info"),c(this,this.options.stickiness),g(this,!!(this.options.overviewRuler&&this.options.overviewRuler.color)),s(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(R,W,x){this.cachedVersionId!==x&&(this.range=null),this.cachedVersionId=x,this.cachedAbsoluteStart=R,this.cachedAbsoluteEnd=W}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=a,e.SENTINEL=new a(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,N(e.SENTINEL,0);class u{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(R,W,x,K,Y){return this.root===e.SENTINEL?[]:f(this,R,W,x,K,Y)}search(R,W,x){return this.root===e.SENTINEL?[]:_(this,R,W,x)}collectNodesFromOwner(R){return h(this,R)}collectNodesPostOrder(){return m(this)}insert(R){v(this,R),this._normalizeDeltaIfNecessary()}delete(R){L(this,R),this._normalizeDeltaIfNecessary()}resolveNode(R,W){const x=R;let K=0;for(;R!==this.root;)R===R.parent.right&&(K+=R.parent.delta),R=R.parent;const Y=x.start+K,ee=x.end+K;x.setCachedOffsets(Y,ee,W)}acceptReplace(R,W,x,K){const Y=t(this,R,R+W);for(let ee=0,se=Y.length;ee<se;ee++){const ne=Y[ee];L(this,ne)}this._normalizeDeltaIfNecessary(),l(this,R,R+W,x),this._normalizeDeltaIfNecessary();for(let ee=0,se=Y.length;ee<se;ee++){const ne=Y[ee];ne.start=ne.cachedAbsoluteStart,ne.end=ne.cachedAbsoluteEnd,n(ne,R,R+W,x,K),ne.maxEnd=ne.end,v(this,ne)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){!this.requestNormalizeDelta||(this.requestNormalizeDelta=!1,r(this))}}e.IntervalTree=u;function r(D){let R=D.root,W=0;for(;R!==e.SENTINEL;){if(R.left!==e.SENTINEL&&!M(R.left)){R=R.left;continue}if(R.right!==e.SENTINEL&&!M(R.right)){W+=R.delta,R=R.right;continue}R.start=W+R.start,R.end=W+R.end,R.delta=0,A(R),w(R,!0),w(R.left,!1),w(R.right,!1),R===R.parent.right&&(W-=R.parent.delta),R=R.parent}w(D.root,!1)}function i(D,R,W,x){return D<W?!0:D>W||x===1?!1:x===2?!0:R}function n(D,R,W,x,K){const Y=p(D),ee=Y===0||Y===2,se=Y===1||Y===2,ne=W-R,le=x,X=Math.min(ne,le),z=D.start;let P=!1;const V=D.end;let U=!1;R<=z&&V<=W&&o(D)&&(D.start=R,P=!0,D.end=R,U=!0);{const $=K?1:ne>0?2:0;!P&&i(z,ee,R,$)&&(P=!0),!U&&i(V,se,R,$)&&(U=!0)}if(X>0&&!K){const $=ne>le?2:0;!P&&i(z,ee,R+X,$)&&(P=!0),!U&&i(V,se,R+X,$)&&(U=!0)}{const $=K?1:0;!P&&i(z,ee,W,$)&&(D.start=R+le,P=!0),!U&&i(V,se,W,$)&&(D.end=R+le,U=!0)}const H=le-ne;P||(D.start=Math.max(0,z+H)),U||(D.end=Math.max(0,V+H)),D.start>D.end&&(D.end=D.start)}e.nodeAcceptEdit=n;function t(D,R,W){let x=D.root,K=0,Y=0,ee=0,se=0,ne=[],le=0;for(;x!==e.SENTINEL;){if(M(x)){w(x.left,!1),w(x.right,!1),x===x.parent.right&&(K-=x.parent.delta),x=x.parent;continue}if(!M(x.left)){if(Y=K+x.maxEnd,Y<R){w(x,!0);continue}if(x.left!==e.SENTINEL){x=x.left;continue}}if(ee=K+x.start,ee>W){w(x,!0);continue}if(se=K+x.end,se>=R&&(x.setCachedOffsets(ee,se,0),ne[le++]=x),w(x,!0),x.right!==e.SENTINEL&&!M(x.right)){K+=x.delta,x=x.right;continue}}return w(D.root,!1),ne}function l(D,R,W,x){let K=D.root,Y=0,ee=0,se=0;const ne=x-(W-R);for(;K!==e.SENTINEL;){if(M(K)){w(K.left,!1),w(K.right,!1),K===K.parent.right&&(Y-=K.parent.delta),A(K),K=K.parent;continue}if(!M(K.left)){if(ee=Y+K.maxEnd,ee<R){w(K,!0);continue}if(K.left!==e.SENTINEL){K=K.left;continue}}if(se=Y+K.start,se>W){K.start+=ne,K.end+=ne,K.delta+=ne,(K.delta<-1073741824||K.delta>1073741824)&&(D.requestNormalizeDelta=!0),w(K,!0);continue}if(w(K,!0),K.right!==e.SENTINEL&&!M(K.right)){Y+=K.delta,K=K.right;continue}}w(D.root,!1)}function h(D,R){let W=D.root,x=[],K=0;for(;W!==e.SENTINEL;){if(M(W)){w(W.left,!1),w(W.right,!1),W=W.parent;continue}if(W.left!==e.SENTINEL&&!M(W.left)){W=W.left;continue}if(W.ownerId===R&&(x[K++]=W),w(W,!0),W.right!==e.SENTINEL&&!M(W.right)){W=W.right;continue}}return w(D.root,!1),x}function m(D){let R=D.root,W=[],x=0;for(;R!==e.SENTINEL;){if(M(R)){w(R.left,!1),w(R.right,!1),R=R.parent;continue}if(R.left!==e.SENTINEL&&!M(R.left)){R=R.left;continue}if(R.right!==e.SENTINEL&&!M(R.right)){R=R.right;continue}W[x++]=R,w(R,!0)}return w(D.root,!1),W}function _(D,R,W,x){let K=D.root,Y=0,ee=0,se=0,ne=[],le=0;for(;K!==e.SENTINEL;){if(M(K)){w(K.left,!1),w(K.right,!1),K===K.parent.right&&(Y-=K.parent.delta),K=K.parent;continue}if(K.left!==e.SENTINEL&&!M(K.left)){K=K.left;continue}ee=Y+K.start,se=Y+K.end,K.setCachedOffsets(ee,se,x);let X=!0;if(R&&K.ownerId&&K.ownerId!==R&&(X=!1),W&&S(K)&&(X=!1),X&&(ne[le++]=K),w(K,!0),K.right!==e.SENTINEL&&!M(K.right)){Y+=K.delta,K=K.right;continue}}return w(D.root,!1),ne}function f(D,R,W,x,K,Y){let ee=D.root,se=0,ne=0,le=0,X=0,z=[],P=0;for(;ee!==e.SENTINEL;){if(M(ee)){w(ee.left,!1),w(ee.right,!1),ee===ee.parent.right&&(se-=ee.parent.delta),ee=ee.parent;continue}if(!M(ee.left)){if(ne=se+ee.maxEnd,ne<R){w(ee,!0);continue}if(ee.left!==e.SENTINEL){ee=ee.left;continue}}if(le=se+ee.start,le>W){w(ee,!0);continue}if(X=se+ee.end,X>=R){ee.setCachedOffsets(le,X,Y);let V=!0;x&&ee.ownerId&&ee.ownerId!==x&&(V=!1),K&&S(ee)&&(V=!1),V&&(z[P++]=ee)}if(w(ee,!0),ee.right!==e.SENTINEL&&!M(ee.right)){se+=ee.delta,ee=ee.right;continue}}return w(D.root,!1),z}function v(D,R){if(D.root===e.SENTINEL)return R.parent=e.SENTINEL,R.left=e.SENTINEL,R.right=e.SENTINEL,N(R,0),D.root=R,D.root;y(D,R),B(R.parent);let W=R;for(;W!==D.root&&b(W.parent)===1;)if(W.parent===W.parent.parent.left){const x=W.parent.parent.right;b(x)===1?(N(W.parent,0),N(x,0),N(W.parent.parent,1),W=W.parent.parent):(W===W.parent.right&&(W=W.parent,E(D,W)),N(W.parent,0),N(W.parent.parent,1),T(D,W.parent.parent))}else{const x=W.parent.parent.left;b(x)===1?(N(W.parent,0),N(x,0),N(W.parent.parent,1),W=W.parent.parent):(W===W.parent.left&&(W=W.parent,T(D,W)),N(W.parent,0),N(W.parent.parent,1),E(D,W.parent.parent))}return N(D.root,0),R}function y(D,R){let W=0,x=D.root;const K=R.start,Y=R.end;for(;;)if(F(K,Y,x.start+W,x.end+W)<0)if(x.left===e.SENTINEL){R.start-=W,R.end-=W,R.maxEnd-=W,x.left=R;break}else x=x.left;else if(x.right===e.SENTINEL){R.start-=W+x.delta,R.end-=W+x.delta,R.maxEnd-=W+x.delta,x.right=R;break}else W+=x.delta,x=x.right;R.parent=x,R.left=e.SENTINEL,R.right=e.SENTINEL,N(R,1)}function L(D,R){let W,x;if(R.left===e.SENTINEL?(W=R.right,x=R,W.delta+=R.delta,(W.delta<-1073741824||W.delta>1073741824)&&(D.requestNormalizeDelta=!0),W.start+=R.delta,W.end+=R.delta):R.right===e.SENTINEL?(W=R.left,x=R):(x=I(R.right),W=x.right,W.start+=x.delta,W.end+=x.delta,W.delta+=x.delta,(W.delta<-1073741824||W.delta>1073741824)&&(D.requestNormalizeDelta=!0),x.start+=R.delta,x.end+=R.delta,x.delta=R.delta,(x.delta<-1073741824||x.delta>1073741824)&&(D.requestNormalizeDelta=!0)),x===D.root){D.root=W,N(W,0),R.detach(),k(),A(W),D.root.parent=e.SENTINEL;return}let K=b(x)===1;if(x===x.parent.left?x.parent.left=W:x.parent.right=W,x===R?W.parent=x.parent:(x.parent===R?W.parent=x:W.parent=x.parent,x.left=R.left,x.right=R.right,x.parent=R.parent,N(x,b(R)),R===D.root?D.root=x:R===R.parent.left?R.parent.left=x:R.parent.right=x,x.left!==e.SENTINEL&&(x.left.parent=x),x.right!==e.SENTINEL&&(x.right.parent=x)),R.detach(),K){B(W.parent),x!==R&&(B(x),B(x.parent)),k();return}B(W),B(W.parent),x!==R&&(B(x),B(x.parent));let Y;for(;W!==D.root&&b(W)===0;)W===W.parent.left?(Y=W.parent.right,b(Y)===1&&(N(Y,0),N(W.parent,1),E(D,W.parent),Y=W.parent.right),b(Y.left)===0&&b(Y.right)===0?(N(Y,1),W=W.parent):(b(Y.right)===0&&(N(Y.left,0),N(Y,1),T(D,Y),Y=W.parent.right),N(Y,b(W.parent)),N(W.parent,0),N(Y.right,0),E(D,W.parent),W=D.root)):(Y=W.parent.left,b(Y)===1&&(N(Y,0),N(W.parent,1),T(D,W.parent),Y=W.parent.left),b(Y.left)===0&&b(Y.right)===0?(N(Y,1),W=W.parent):(b(Y.left)===0&&(N(Y.right,0),N(Y,1),E(D,Y),Y=W.parent.left),N(Y,b(W.parent)),N(W.parent,0),N(Y.left,0),T(D,W.parent),W=D.root));N(W,0),k()}function I(D){for(;D.left!==e.SENTINEL;)D=D.left;return D}function k(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function E(D,R){const W=R.right;W.delta+=R.delta,(W.delta<-1073741824||W.delta>1073741824)&&(D.requestNormalizeDelta=!0),W.start+=R.delta,W.end+=R.delta,R.right=W.left,W.left!==e.SENTINEL&&(W.left.parent=R),W.parent=R.parent,R.parent===e.SENTINEL?D.root=W:R===R.parent.left?R.parent.left=W:R.parent.right=W,W.left=R,R.parent=W,A(R),A(W)}function T(D,R){const W=R.left;R.delta-=W.delta,(R.delta<-1073741824||R.delta>1073741824)&&(D.requestNormalizeDelta=!0),R.start-=W.delta,R.end-=W.delta,R.left=W.right,W.right!==e.SENTINEL&&(W.right.parent=R),W.parent=R.parent,R.parent===e.SENTINEL?D.root=W:R===R.parent.right?R.parent.right=W:R.parent.left=W,W.right=R,R.parent=W,A(R),A(W)}function O(D){let R=D.end;if(D.left!==e.SENTINEL){const W=D.left.maxEnd;W>R&&(R=W)}if(D.right!==e.SENTINEL){const W=D.right.maxEnd+D.delta;W>R&&(R=W)}return R}function A(D){D.maxEnd=O(D)}e.recomputeMaxEnd=A;function B(D){for(;D!==e.SENTINEL;){const R=O(D);if(D.maxEnd===R)return;D.maxEnd=R,D=D.parent}}function F(D,R,W,x){return D===W?R-x:D-W}e.intervalCompare=F}),define(Q[371],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeTreeMetadata=e.updateTreeMetadata=e.fixInsert=e.rbDelete=e.rightRotate=e.leftRotate=e.resetSentinel=e.calculateLF=e.calculateSize=e.righttest=e.leftest=e.SENTINEL=e.TreeNode=void 0;class b{constructor(u,r){this.piece=u,this.color=r,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==e.SENTINEL)return N(this.right);let u=this;for(;u.parent!==e.SENTINEL&&u.parent.left!==u;)u=u.parent;return u.parent===e.SENTINEL?e.SENTINEL:u.parent}prev(){if(this.left!==e.SENTINEL)return M(this.left);let u=this;for(;u.parent!==e.SENTINEL&&u.parent.right!==u;)u=u.parent;return u.parent===e.SENTINEL?e.SENTINEL:u.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=b,e.SENTINEL=new b(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function N(a){for(;a.left!==e.SENTINEL;)a=a.left;return a}e.leftest=N;function M(a){for(;a.right!==e.SENTINEL;)a=a.right;return a}e.righttest=M;function w(a){return a===e.SENTINEL?0:a.size_left+a.piece.length+w(a.right)}e.calculateSize=w;function S(a){return a===e.SENTINEL?0:a.lf_left+a.piece.lineFeedCnt+S(a.right)}e.calculateLF=S;function C(){e.SENTINEL.parent=e.SENTINEL}e.resetSentinel=C;function d(a,u){let r=u.right;r.size_left+=u.size_left+(u.piece?u.piece.length:0),r.lf_left+=u.lf_left+(u.piece?u.piece.lineFeedCnt:0),u.right=r.left,r.left!==e.SENTINEL&&(r.left.parent=u),r.parent=u.parent,u.parent===e.SENTINEL?a.root=r:u.parent.left===u?u.parent.left=r:u.parent.right=r,r.left=u,u.parent=r}e.leftRotate=d;function g(a,u){let r=u.left;u.left=r.right,r.right!==e.SENTINEL&&(r.right.parent=u),r.parent=u.parent,u.size_left-=r.size_left+(r.piece?r.piece.length:0),u.lf_left-=r.lf_left+(r.piece?r.piece.lineFeedCnt:0),u.parent===e.SENTINEL?a.root=r:u===u.parent.right?u.parent.right=r:u.parent.left=r,r.right=u,u.parent=r}e.rightRotate=g;function p(a,u){let r,i;if(u.left===e.SENTINEL?(i=u,r=i.right):u.right===e.SENTINEL?(i=u,r=i.left):(i=N(u.right),r=i.right),i===a.root){a.root=r,r.color=0,u.detach(),C(),a.root.parent=e.SENTINEL;return}let n=i.color===1;if(i===i.parent.left?i.parent.left=r:i.parent.right=r,i===u?(r.parent=i.parent,s(a,r)):(i.parent===u?r.parent=i:r.parent=i.parent,s(a,r),i.left=u.left,i.right=u.right,i.parent=u.parent,i.color=u.color,u===a.root?a.root=i:u===u.parent.left?u.parent.left=i:u.parent.right=i,i.left!==e.SENTINEL&&(i.left.parent=i),i.right!==e.SENTINEL&&(i.right.parent=i),i.size_left=u.size_left,i.lf_left=u.lf_left,s(a,i)),u.detach(),r.parent.left===r){let l=w(r),h=S(r);if(l!==r.parent.size_left||h!==r.parent.lf_left){let m=l-r.parent.size_left,_=h-r.parent.lf_left;r.parent.size_left=l,r.parent.lf_left=h,o(a,r.parent,m,_)}}if(s(a,r.parent),n){C();return}let t;for(;r!==a.root&&r.color===0;)r===r.parent.left?(t=r.parent.right,t.color===1&&(t.color=0,r.parent.color=1,d(a,r.parent),t=r.parent.right),t.left.color===0&&t.right.color===0?(t.color=1,r=r.parent):(t.right.color===0&&(t.left.color=0,t.color=1,g(a,t),t=r.parent.right),t.color=r.parent.color,r.parent.color=0,t.right.color=0,d(a,r.parent),r=a.root)):(t=r.parent.left,t.color===1&&(t.color=0,r.parent.color=1,g(a,r.parent),t=r.parent.left),t.left.color===0&&t.right.color===0?(t.color=1,r=r.parent):(t.left.color===0&&(t.right.color=0,t.color=1,d(a,t),t=r.parent.left),t.color=r.parent.color,r.parent.color=0,t.left.color=0,g(a,r.parent),r=a.root));r.color=0,C()}e.rbDelete=p;function c(a,u){for(s(a,u);u!==a.root&&u.parent.color===1;)if(u.parent===u.parent.parent.left){const r=u.parent.parent.right;r.color===1?(u.parent.color=0,r.color=0,u.parent.parent.color=1,u=u.parent.parent):(u===u.parent.right&&(u=u.parent,d(a,u)),u.parent.color=0,u.parent.parent.color=1,g(a,u.parent.parent))}else{const r=u.parent.parent.left;r.color===1?(u.parent.color=0,r.color=0,u.parent.parent.color=1,u=u.parent.parent):(u===u.parent.left&&(u=u.parent,g(a,u)),u.parent.color=0,u.parent.parent.color=1,d(a,u.parent.parent))}a.root.color=0}e.fixInsert=c;function o(a,u,r,i){for(;u!==a.root&&u!==e.SENTINEL;)u.parent.left===u&&(u.parent.size_left+=r,u.parent.lf_left+=i),u=u.parent}e.updateTreeMetadata=o;function s(a,u){let r=0,i=0;if(u!==a.root){if(r===0){for(;u!==a.root&&u===u.parent.right;)u=u.parent;if(u===a.root)return;u=u.parent,r=w(u.left)-u.size_left,i=S(u.left)-u.lf_left,u.size_left+=r,u.lf_left+=i}for(;u!==a.root&&(r!==0||i!==0);)u.parent.left===u&&(u.parent.size_left+=r,u.parent.lf_left+=i),u=u.parent}}e.recomputeTreeMetadata=s}),define(Q[218],J([0,1,101,93]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function M(d){return d.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class w{constructor(g,p,c,o){this.oldPosition=g,this.oldText=p,this.newPosition=c,this.newText=o}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${M(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${M(this.oldText)}")`:`(replace@${this.oldPosition} "${M(this.oldText)}" with "${M(this.newText)}")`}static _writeStringSize(g){return 4+2*g.length}static _writeString(g,p,c){const o=p.length;b.writeUInt32BE(g,o,c),c+=4;for(let s=0;s<o;s++)b.writeUInt16LE(g,p.charCodeAt(s),c),c+=2;return c}static _readString(g,p){const c=b.readUInt32BE(g,p);return p+=4,N.decodeUTF16LE(g,p,c)}writeSize(){return 4+4+w._writeStringSize(this.oldText)+w._writeStringSize(this.newText)}write(g,p){return b.writeUInt32BE(g,this.oldPosition,p),p+=4,b.writeUInt32BE(g,this.newPosition,p),p+=4,p=w._writeString(g,this.oldText,p),p=w._writeString(g,this.newText,p),p}static read(g,p,c){const o=b.readUInt32BE(g,p);p+=4;const s=b.readUInt32BE(g,p);p+=4;const a=w._readString(g,p);p+=w._writeStringSize(a);const u=w._readString(g,p);return p+=w._writeStringSize(u),c.push(new w(o,a,s,u)),p}}e.TextChange=w;function S(d,g){return d===null||d.length===0?g:new C(d,g).compress()}e.compressConsecutiveTextChanges=S;class C{constructor(g,p){this._prevEdits=g,this._currEdits=p,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let g=0,p=0,c=this._getPrev(g),o=this._getCurr(p);for(;g<this._prevLen||p<this._currLen;){if(c===null){this._acceptCurr(o),o=this._getCurr(++p);continue}if(o===null){this._acceptPrev(c),c=this._getPrev(++g);continue}if(o.oldEnd<=c.newPosition){this._acceptCurr(o),o=this._getCurr(++p);continue}if(c.newEnd<=o.oldPosition){this._acceptPrev(c),c=this._getPrev(++g);continue}if(o.oldPosition<c.newPosition){const[i,n]=C._splitCurr(o,c.newPosition-o.oldPosition);this._acceptCurr(i),o=n;continue}if(c.newPosition<o.oldPosition){const[i,n]=C._splitPrev(c,o.oldPosition-c.newPosition);this._acceptPrev(i),c=n;continue}let u,r;if(o.oldEnd===c.newEnd)u=c,r=o,c=this._getPrev(++g),o=this._getCurr(++p);else if(o.oldEnd<c.newEnd){const[i,n]=C._splitPrev(c,o.oldLength);u=i,r=o,c=n,o=this._getCurr(++p)}else{const[i,n]=C._splitCurr(o,c.newLength);u=c,r=i,c=this._getPrev(++g),o=n}this._result[this._resultLen++]=new w(u.oldPosition,u.oldText,r.newPosition,r.newText),this._prevDeltaOffset+=u.newLength-u.oldLength,this._currDeltaOffset+=r.newLength-r.oldLength}const s=C._merge(this._result);return C._removeNoOps(s)}_acceptCurr(g){this._result[this._resultLen++]=C._rebaseCurr(this._prevDeltaOffset,g),this._currDeltaOffset+=g.newLength-g.oldLength}_getCurr(g){return g<this._currLen?this._currEdits[g]:null}_acceptPrev(g){this._result[this._resultLen++]=C._rebasePrev(this._currDeltaOffset,g),this._prevDeltaOffset+=g.newLength-g.oldLength}_getPrev(g){return g<this._prevLen?this._prevEdits[g]:null}static _rebaseCurr(g,p){return new w(p.oldPosition-g,p.oldText,p.newPosition,p.newText)}static _rebasePrev(g,p){return new w(p.oldPosition,p.oldText,p.newPosition+g,p.newText)}static _splitPrev(g,p){const c=g.newText.substr(0,p),o=g.newText.substr(p);return[new w(g.oldPosition,g.oldText,g.newPosition,c),new w(g.oldEnd,"",g.newPosition+p,o)]}static _splitCurr(g,p){const c=g.oldText.substr(0,p),o=g.oldText.substr(p);return[new w(g.oldPosition,c,g.newPosition,g.newText),new w(g.oldPosition+p,o,g.newEnd,"")]}static _merge(g){if(g.length===0)return g;let p=[],c=0,o=g[0];for(let s=1;s<g.length;s++){const a=g[s];o.oldEnd===a.oldPosition?o=new w(o.oldPosition,o.oldText+a.oldText,o.newPosition,o.newText+a.newText):(p[c++]=o,o=a)}return p[c++]=o,p}static _removeNoOps(g){if(g.length===0)return g;let p=[],c=0;for(let o=0;o<g.length;o++){const s=g[o];s.oldText!==s.newText&&(p[c++]=s)}return p}}}),define(Q[372],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalModelContentChangeEvent=e.ModelRawContentChangedEvent=e.ModelRawEOLChanged=e.ModelRawLinesInserted=e.ModelRawLinesDeleted=e.ModelRawLineChanged=e.ModelRawFlush=void 0;class b{constructor(){this.changeType=1}}e.ModelRawFlush=b;class N{constructor(p,c){this.changeType=2,this.lineNumber=p,this.detail=c}}e.ModelRawLineChanged=N;class M{constructor(p,c){this.changeType=3,this.fromLineNumber=p,this.toLineNumber=c}}e.ModelRawLinesDeleted=M;class w{constructor(p,c,o){this.changeType=4,this.fromLineNumber=p,this.toLineNumber=c,this.detail=o}}e.ModelRawLinesInserted=w;class S{constructor(){this.changeType=5}}e.ModelRawEOLChanged=S;class C{constructor(p,c,o,s){this.changes=p,this.versionId=c,this.isUndoing=o,this.isRedoing=s,this.resultingSelection=null}containsEvent(p){for(let c=0,o=this.changes.length;c<o;c++)if(this.changes[c].changeType===p)return!0;return!1}static merge(p,c){const o=[].concat(p.changes).concat(c.changes),s=c.versionId,a=p.isUndoing||c.isUndoing,u=p.isRedoing||c.isRedoing;return new C(o,s,a,u)}}e.ModelRawContentChangedEvent=C;class d{constructor(p,c){this.rawContentChangedEvent=p,this.contentChangedEvent=c}merge(p){const c=C.merge(this.rawContentChangedEvent,p.rawContentChangedEvent),o=d._mergeChangeEvents(this.contentChangedEvent,p.contentChangedEvent);return new d(c,o)}static _mergeChangeEvents(p,c){const o=[].concat(p.changes).concat(c.changes),s=c.eol,a=c.versionId,u=p.isUndoing||c.isUndoing,r=p.isRedoing||c.isRedoing,i=p.isFlush||c.isFlush;return{changes:o,eol:s,versionId:a,isUndoing:u,isRedoing:r,isFlush:i}}}e.InternalModelContentChangeEvent=d}),define(Q[166],J([0,1,8,106,14,3,53]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Searcher=e.isValidMatch=e.TextModelSearch=e.createFindMatch=e.SearchData=e.isMultilineRegexSource=e.SearchParams=void 0;const C=999;class d{constructor(t,l,h,m){this.searchString=t,this.isRegex=l,this.matchCase=h,this.wordSeparators=m}parseSearchRequest(){if(this.searchString==="")return null;let t;this.isRegex?t=g(this.searchString):t=this.searchString.indexOf(`
`)>=0;let l=null;try{l=b.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0,unicode:!0})}catch(m){return null}if(!l)return null;let h=!this.isRegex&&!t;return h&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(h=this.matchCase),new p(l,this.wordSeparators?N.getMapForWordSeparators(this.wordSeparators):null,h?this.searchString:null)}}e.SearchParams=d;function g(n){if(!n||n.length===0)return!1;for(let t=0,l=n.length;t<l;t++)if(n.charCodeAt(t)===92){if(t++,t>=l)break;const m=n.charCodeAt(t);if(m===110||m===114||m===87||m===119)return!0}return!1}e.isMultilineRegexSource=g;class p{constructor(t,l,h){this.regex=t,this.wordSeparators=l,this.simpleSearch=h}}e.SearchData=p;function c(n,t,l){if(!l)return new S.FindMatch(n,null);let h=[];for(let m=0,_=t.length;m<_;m++)h[m]=t[m];return new S.FindMatch(n,h)}e.createFindMatch=c;class o{constructor(t){let l=[],h=0;for(let m=0,_=t.length;m<_;m++)t.charCodeAt(m)===10&&(l[h++]=m);this._lineFeedsOffsets=l}findLineFeedCountBeforeOffset(t){const l=this._lineFeedsOffsets;let h=0,m=l.length-1;if(m===-1||t<=l[0])return 0;for(;h<m;){const _=h+((m-h)/2>>0);l[_]>=t?m=_-1:l[_+1]>=t?(h=_,m=_):h=_+1}return h+1}}class s{static findMatches(t,l,h,m,_){const f=l.parseSearchRequest();return f?f.regex.multiline?this._doFindMatchesMultiline(t,h,new i(f.wordSeparators,f.regex),m,_):this._doFindMatchesLineByLine(t,h,f,m,_):[]}static _getMultilineMatchRange(t,l,h,m,_,f){let v,y=0;m?(y=m.findLineFeedCountBeforeOffset(_),v=l+_+y):v=l+_;let L;if(m){let T=m.findLineFeedCountBeforeOffset(_+f.length)-y;L=v+f.length+T}else L=v+f.length;const I=t.getPositionAt(v),k=t.getPositionAt(L);return new w.Range(I.lineNumber,I.column,k.lineNumber,k.column)}static _doFindMatchesMultiline(t,l,h,m,_){const f=t.getOffsetAt(l.getStartPosition()),v=t.getValueInRange(l,1),y=t.getEOL()===`\r
`?new o(v):null,L=[];let I=0,k;for(h.reset(0);k=h.next(v);)if(L[I++]=c(this._getMultilineMatchRange(t,f,v,y,k.index,k[0]),k,m),I>=_)return L;return L}static _doFindMatchesLineByLine(t,l,h,m,_){const f=[];let v=0;if(l.startLineNumber===l.endLineNumber){const L=t.getLineContent(l.startLineNumber).substring(l.startColumn-1,l.endColumn-1);return v=this._findMatchesInLine(h,L,l.startLineNumber,l.startColumn-1,v,f,m,_),f}const y=t.getLineContent(l.startLineNumber).substring(l.startColumn-1);v=this._findMatchesInLine(h,y,l.startLineNumber,l.startColumn-1,v,f,m,_);for(let L=l.startLineNumber+1;L<l.endLineNumber&&v<_;L++)v=this._findMatchesInLine(h,t.getLineContent(L),L,0,v,f,m,_);if(v<_){const L=t.getLineContent(l.endLineNumber).substring(0,l.endColumn-1);v=this._findMatchesInLine(h,L,l.endLineNumber,0,v,f,m,_)}return f}static _findMatchesInLine(t,l,h,m,_,f,v,y){const L=t.wordSeparators;if(!v&&t.simpleSearch){const E=t.simpleSearch,T=E.length,O=l.length;let A=-T;for(;(A=l.indexOf(E,A+T))!==-1;)if((!L||r(L,l,O,A,T))&&(f[_++]=new S.FindMatch(new w.Range(h,A+1+m,h,A+1+T+m),null),_>=y))return _;return _}const I=new i(t.wordSeparators,t.regex);let k;I.reset(0);do if(k=I.next(l),k&&(f[_++]=c(new w.Range(h,k.index+1+m,h,k.index+1+k[0].length+m),k,v),_>=y))return _;while(k);return _}static findNextMatch(t,l,h,m){const _=l.parseSearchRequest();if(!_)return null;const f=new i(_.wordSeparators,_.regex);return _.regex.multiline?this._doFindNextMatchMultiline(t,h,f,m):this._doFindNextMatchLineByLine(t,h,f,m)}static _doFindNextMatchMultiline(t,l,h,m){const _=new M.Position(l.lineNumber,1),f=t.getOffsetAt(_),v=t.getLineCount(),y=t.getValueInRange(new w.Range(_.lineNumber,_.column,v,t.getLineMaxColumn(v)),1),L=t.getEOL()===`\r
`?new o(y):null;h.reset(l.column-1);let I=h.next(y);return I?c(this._getMultilineMatchRange(t,f,y,L,I.index,I[0]),I,m):l.lineNumber!==1||l.column!==1?this._doFindNextMatchMultiline(t,new M.Position(1,1),h,m):null}static _doFindNextMatchLineByLine(t,l,h,m){const _=t.getLineCount(),f=l.lineNumber,v=t.getLineContent(f),y=this._findFirstMatchInLine(h,v,f,l.column,m);if(y)return y;for(let L=1;L<=_;L++){const I=(f+L-1)%_,k=t.getLineContent(I+1),E=this._findFirstMatchInLine(h,k,I+1,1,m);if(E)return E}return null}static _findFirstMatchInLine(t,l,h,m,_){t.reset(m-1);const f=t.next(l);return f?c(new w.Range(h,f.index+1,h,f.index+1+f[0].length),f,_):null}static findPreviousMatch(t,l,h,m){const _=l.parseSearchRequest();if(!_)return null;const f=new i(_.wordSeparators,_.regex);return _.regex.multiline?this._doFindPreviousMatchMultiline(t,h,f,m):this._doFindPreviousMatchLineByLine(t,h,f,m)}static _doFindPreviousMatchMultiline(t,l,h,m){const _=this._doFindMatchesMultiline(t,new w.Range(1,1,l.lineNumber,l.column),h,m,10*C);if(_.length>0)return _[_.length-1];const f=t.getLineCount();return l.lineNumber!==f||l.column!==t.getLineMaxColumn(f)?this._doFindPreviousMatchMultiline(t,new M.Position(f,t.getLineMaxColumn(f)),h,m):null}static _doFindPreviousMatchLineByLine(t,l,h,m){const _=t.getLineCount(),f=l.lineNumber,v=t.getLineContent(f).substring(0,l.column-1),y=this._findLastMatchInLine(h,v,f,m);if(y)return y;for(let L=1;L<=_;L++){const I=(_+f-L-1)%_,k=t.getLineContent(I+1),E=this._findLastMatchInLine(h,k,I+1,m);if(E)return E}return null}static _findLastMatchInLine(t,l,h,m){let _=null,f;for(t.reset(0);f=t.next(l);)_=c(new w.Range(h,f.index+1,h,f.index+1+f[0].length),f,m);return _}}e.TextModelSearch=s;function a(n,t,l,h,m){if(h===0)return!0;const _=t.charCodeAt(h-1);if(n.get(_)!==0||_===13||_===10)return!0;if(m>0){const f=t.charCodeAt(h);if(n.get(f)!==0)return!0}return!1}function u(n,t,l,h,m){if(h+m===l)return!0;const _=t.charCodeAt(h+m);if(n.get(_)!==0||_===13||_===10)return!0;if(m>0){const f=t.charCodeAt(h+m-1);if(n.get(f)!==0)return!0}return!1}function r(n,t,l,h,m){return a(n,t,l,h,m)&&u(n,t,l,h,m)}e.isValidMatch=r;class i{constructor(t,l){this._wordSeparators=t,this._searchRegex=l,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){const l=t.length;let h;do{if(this._prevMatchStartIndex+this._prevMatchLength===l||(h=this._searchRegex.exec(t),!h))return null;const m=h.index,_=h[0].length;if(m===this._prevMatchStartIndex&&_===this._prevMatchLength){if(_===0){b.getNextCodePoint(t,l,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=m,this._prevMatchLength=_,!this._wordSeparators||r(this._wordSeparators,t,l,m,_))return h}while(h);return null}}e.Searcher=i}),define(Q[219],J([0,1,14,3,53,371,166]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=e.LineStarts=e.createUintArray=e.AverageBufferSize=void 0,e.AverageBufferSize=65535;function C(r){let i;return r[r.length-1]<65536?i=new Uint16Array(r.length):i=new Uint32Array(r.length),i.set(r,0),i}e.createUintArray=C;class d{constructor(i,n,t,l,h){this.lineStarts=i,this.cr=n,this.lf=t,this.crlf=l,this.isBasicASCII=h}}e.LineStarts=d;function g(r,i=!0){let n=[0],t=1;for(let l=0,h=r.length;l<h;l++){const m=r.charCodeAt(l);m===13?l+1<h&&r.charCodeAt(l+1)===10?(n[t++]=l+2,l++):n[t++]=l+1:m===10&&(n[t++]=l+1)}return i?C(n):n}e.createLineStartsFast=g;function p(r,i){r.length=0,r[0]=0;let n=1,t=0,l=0,h=0,m=!0;for(let f=0,v=i.length;f<v;f++){const y=i.charCodeAt(f);y===13?f+1<v&&i.charCodeAt(f+1)===10?(h++,r[n++]=f+2,f++):(t++,r[n++]=f+1):y===10?(l++,r[n++]=f+1):m&&y!==9&&(y<32||y>126)&&(m=!1)}const _=new d(C(r),t,l,h,m);return r.length=0,_}e.createLineStarts=p;class c{constructor(i,n,t,l,h){this.bufferIndex=i,this.start=n,this.end=t,this.lineFeedCnt=l,this.length=h}}e.Piece=c;class o{constructor(i,n){this.buffer=i,this.lineStarts=n}}e.StringBuffer=o;class s{constructor(i,n){this._pieces=[],this._tree=i,this._BOM=n,this._index=0,i.root!==w.SENTINEL&&i.iterate(i.root,t=>(t!==w.SENTINEL&&this._pieces.push(t.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class a{constructor(i){this._limit=i,this._cache=[]}get(i){for(let n=this._cache.length-1;n>=0;n--){let t=this._cache[n];if(t.nodeStartOffset<=i&&t.nodeStartOffset+t.node.piece.length>=i)return t}return null}get2(i){for(let n=this._cache.length-1;n>=0;n--){let t=this._cache[n];if(t.nodeStartLineNumber&&t.nodeStartLineNumber<i&&t.nodeStartLineNumber+t.node.piece.lineFeedCnt>=i)return t}return null}set(i){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(i)}validate(i){let n=!1,t=this._cache;for(let l=0;l<t.length;l++){let h=t[l];if(h.node.parent===null||h.nodeStartOffset>=i){t[l]=null,n=!0;continue}}if(n){let l=[];for(const h of t)h!==null&&l.push(h);this._cache=l}}}class u{constructor(i,n,t){this.create(i,n,t)}create(i,n,t){this._buffers=[new o("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=w.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=n,this._EOLLength=n.length,this._EOLNormalized=t;let l=null;for(let h=0,m=i.length;h<m;h++)if(i[h].buffer.length>0){i[h].lineStarts||(i[h].lineStarts=g(i[h].buffer));let _=new c(h+1,{line:0,column:0},{line:i[h].lineStarts.length-1,column:i[h].buffer.length-i[h].lineStarts[i[h].lineStarts.length-1]},i[h].lineStarts.length-1,i[h].buffer.length);this._buffers.push(i[h]),l=this.rbInsertRight(l,_)}this._searchCache=new a(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(i){let n=e.AverageBufferSize,t=n-Math.floor(n/3),l=t*2,h="",m=0,_=[];if(this.iterate(this.root,f=>{let v=this.getNodeContent(f),y=v.length;if(m<=t||m+y<l)return h+=v,m+=y,!0;let L=h.replace(/\r\n|\r|\n/g,i);return _.push(new o(L,g(L))),h=v,m=y,!0}),m>0){let f=h.replace(/\r\n|\r|\n/g,i);_.push(new o(f,g(f)))}this.create(_,i,!0)}getEOL(){return this._EOL}setEOL(i){this._EOL=i,this._EOLLength=this._EOL.length,this.normalizeEOL(i)}createSnapshot(i){return new s(this,i)}getOffsetAt(i,n){let t=0,l=this.root;for(;l!==w.SENTINEL;)if(l.left!==w.SENTINEL&&l.lf_left+1>=i)l=l.left;else{if(l.lf_left+l.piece.lineFeedCnt+1>=i)return t+=l.size_left,t+=this.getAccumulatedValue(l,i-l.lf_left-2)+n-1;i-=l.lf_left+l.piece.lineFeedCnt,t+=l.size_left+l.piece.length,l=l.right}return t}getPositionAt(i){i=Math.floor(i),i=Math.max(0,i);let n=this.root,t=0,l=i;for(;n!==w.SENTINEL;)if(n.size_left!==0&&n.size_left>=i)n=n.left;else if(n.size_left+n.piece.length>=i){let h=this.getIndexOf(n,i-n.size_left);if(t+=n.lf_left+h.index,h.index===0){let m=this.getOffsetAt(t+1,1),_=l-m;return new b.Position(t+1,_+1)}return new b.Position(t+1,h.remainder+1)}else if(i-=n.size_left+n.piece.length,t+=n.lf_left+n.piece.lineFeedCnt,n.right===w.SENTINEL){let h=this.getOffsetAt(t+1,1),m=l-i-h;return new b.Position(t+1,m+1)}else n=n.right;return new b.Position(1,1)}getValueInRange(i,n){if(i.startLineNumber===i.endLineNumber&&i.startColumn===i.endColumn)return"";let t=this.nodeAt2(i.startLineNumber,i.startColumn),l=this.nodeAt2(i.endLineNumber,i.endColumn),h=this.getValueInRange2(t,l);return n?n!==this._EOL||!this._EOLNormalized?h.replace(/\r\n|\r|\n/g,n):n===this.getEOL()&&this._EOLNormalized?h:h.replace(/\r\n|\r|\n/g,n):h}getValueInRange2(i,n){if(i.node===n.node){let _=i.node,f=this._buffers[_.piece.bufferIndex].buffer,v=this.offsetInBuffer(_.piece.bufferIndex,_.piece.start);return f.substring(v+i.remainder,v+n.remainder)}let t=i.node,l=this._buffers[t.piece.bufferIndex].buffer,h=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start),m=l.substring(h+i.remainder,h+t.piece.length);for(t=t.next();t!==w.SENTINEL;){let _=this._buffers[t.piece.bufferIndex].buffer,f=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);if(t===n.node){m+=_.substring(f,f+n.remainder);break}else m+=_.substr(f,t.piece.length);t=t.next()}return m}getLinesContent(){let i=[],n=0,t="",l=!1;return this.iterate(this.root,h=>{if(h===w.SENTINEL)return!0;const m=h.piece;let _=m.length;if(_===0)return!0;const f=this._buffers[m.bufferIndex].buffer,v=this._buffers[m.bufferIndex].lineStarts,y=m.start.line,L=m.end.line;let I=v[y]+m.start.column;if(l&&(f.charCodeAt(I)===10&&(I++,_--),i[n++]=t,t="",l=!1,_===0))return!0;if(y===L)return!this._EOLNormalized&&f.charCodeAt(I+_-1)===13?(l=!0,t+=f.substr(I,_-1)):t+=f.substr(I,_),!0;t+=this._EOLNormalized?f.substring(I,Math.max(I,v[y+1]-this._EOLLength)):f.substring(I,v[y+1]).replace(/(\r\n|\r|\n)$/,""),i[n++]=t;for(let k=y+1;k<L;k++)t=this._EOLNormalized?f.substring(v[k],v[k+1]-this._EOLLength):f.substring(v[k],v[k+1]).replace(/(\r\n|\r|\n)$/,""),i[n++]=t;return!this._EOLNormalized&&f.charCodeAt(v[L]+m.end.column-1)===13?(l=!0,m.end.column===0?n--:t=f.substr(v[L],m.end.column-1)):t=f.substr(v[L],m.end.column),!0}),l&&(i[n++]=t,t=""),i[n++]=t,i}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(i){return this._lastVisitedLine.lineNumber===i?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=i,i===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(i):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(i,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(i).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(i){if(i.remainder===i.node.piece.length){let n=i.node.next();if(!n)return 0;let t=this._buffers[n.piece.bufferIndex],l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return t.buffer.charCodeAt(l)}else{let n=this._buffers[i.node.piece.bufferIndex],l=this.offsetInBuffer(i.node.piece.bufferIndex,i.node.piece.start)+i.remainder;return n.buffer.charCodeAt(l)}}getLineCharCode(i,n){let t=this.nodeAt2(i,n+1);return this._getCharCode(t)}getLineLength(i){if(i===this.getLineCount()){let n=this.getOffsetAt(i,1);return this.getLength()-n}return this.getOffsetAt(i+1,1)-this.getOffsetAt(i,1)-this._EOLLength}findMatchesInNode(i,n,t,l,h,m,_,f,v,y,L){let I=this._buffers[i.piece.bufferIndex],k=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),E=this.offsetInBuffer(i.piece.bufferIndex,h),T=this.offsetInBuffer(i.piece.bufferIndex,m),O,A={line:0,column:0},B,F;n._wordSeparators?(B=I.buffer.substring(E,T),F=D=>D+E,n.reset(0)):(B=I.buffer,F=D=>D,n.reset(E));do if(O=n.next(B),O){if(F(O.index)>=T)return y;this.positionInBuffer(i,F(O.index)-k,A);let D=this.getLineFeedCnt(i.piece.bufferIndex,h,A),R=A.line===h.line?A.column-h.column+l:A.column+1,W=R+O[0].length;if(L[y++]=S.createFindMatch(new N.Range(t+D,R,t+D,W),O,f),F(O.index)+O[0].length>=T||y>=v)return y}while(O);return y}findMatchesLineByLine(i,n,t,l){const h=[];let m=0;const _=new S.Searcher(n.wordSeparators,n.regex);let f=this.nodeAt2(i.startLineNumber,i.startColumn);if(f===null)return[];let v=this.nodeAt2(i.endLineNumber,i.endColumn);if(v===null)return[];let y=this.positionInBuffer(f.node,f.remainder),L=this.positionInBuffer(v.node,v.remainder);if(f.node===v.node)return this.findMatchesInNode(f.node,_,i.startLineNumber,i.startColumn,y,L,n,t,l,m,h),h;let I=i.startLineNumber,k=f.node;for(;k!==v.node;){let T=this.getLineFeedCnt(k.piece.bufferIndex,y,k.piece.end);if(T>=1){let A=this._buffers[k.piece.bufferIndex].lineStarts,B=this.offsetInBuffer(k.piece.bufferIndex,k.piece.start),F=A[y.line+T],D=I===i.startLineNumber?i.startColumn:1;if(m=this.findMatchesInNode(k,_,I,D,y,this.positionInBuffer(k,F-B),n,t,l,m,h),m>=l)return h;I+=T}let O=I===i.startLineNumber?i.startColumn-1:0;if(I===i.endLineNumber){const A=this.getLineContent(I).substring(O,i.endColumn-1);return m=this._findMatchesInLine(n,_,A,i.endLineNumber,O,m,h,t,l),h}if(m=this._findMatchesInLine(n,_,this.getLineContent(I).substr(O),I,O,m,h,t,l),m>=l)return h;I++,f=this.nodeAt2(I,1),k=f.node,y=this.positionInBuffer(f.node,f.remainder)}if(I===i.endLineNumber){let T=I===i.startLineNumber?i.startColumn-1:0;const O=this.getLineContent(I).substring(T,i.endColumn-1);return m=this._findMatchesInLine(n,_,O,i.endLineNumber,T,m,h,t,l),h}let E=I===i.startLineNumber?i.startColumn:1;return m=this.findMatchesInNode(v.node,_,I,E,y,L,n,t,l,m,h),h}_findMatchesInLine(i,n,t,l,h,m,_,f,v){const y=i.wordSeparators;if(!f&&i.simpleSearch){const I=i.simpleSearch,k=I.length,E=t.length;let T=-k;for(;(T=t.indexOf(I,T+k))!==-1;)if((!y||S.isValidMatch(y,t,E,T,k))&&(_[m++]=new M.FindMatch(new N.Range(l,T+1+h,l,T+1+k+h),null),m>=v))return m;return m}let L;n.reset(0);do if(L=n.next(t),L&&(_[m++]=S.createFindMatch(new N.Range(l,L.index+1+h,l,L.index+1+L[0].length+h),L,f),m>=v))return m;while(L);return m}insert(i,n,t=!1){if(this._EOLNormalized=this._EOLNormalized&&t,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==w.SENTINEL){let{node:l,remainder:h,nodeStartOffset:m}=this.nodeAt(i),_=l.piece,f=_.bufferIndex,v=this.positionInBuffer(l,h);if(l.piece.bufferIndex===0&&_.end.line===this._lastChangeBufferPos.line&&_.end.column===this._lastChangeBufferPos.column&&m+_.length===i&&n.length<e.AverageBufferSize){this.appendToNode(l,n),this.computeBufferMetadata();return}if(m===i)this.insertContentToNodeLeft(n,l),this._searchCache.validate(i);else if(m+l.piece.length>i){let y=[],L=new c(_.bufferIndex,v,_.end,this.getLineFeedCnt(_.bufferIndex,v,_.end),this.offsetInBuffer(f,_.end)-this.offsetInBuffer(f,v));if(this.shouldCheckCRLF()&&this.endWithCR(n)&&this.nodeCharCodeAt(l,h)===10){let T={line:L.start.line+1,column:0};L=new c(L.bufferIndex,T,L.end,this.getLineFeedCnt(L.bufferIndex,T,L.end),L.length-1),n+=`
`}if(this.shouldCheckCRLF()&&this.startWithLF(n))if(this.nodeCharCodeAt(l,h-1)===13){let T=this.positionInBuffer(l,h-1);this.deleteNodeTail(l,T),n="\r"+n,l.piece.length===0&&y.push(l)}else this.deleteNodeTail(l,v);else this.deleteNodeTail(l,v);let I=this.createNewPieces(n);L.length>0&&this.rbInsertRight(l,L);let k=l;for(let E=0;E<I.length;E++)k=this.rbInsertRight(k,I[E]);this.deleteNodes(y)}else this.insertContentToNodeRight(n,l)}else{let l=this.createNewPieces(n),h=this.rbInsertLeft(null,l[0]);for(let m=1;m<l.length;m++)h=this.rbInsertRight(h,l[m])}this.computeBufferMetadata()}delete(i,n){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",!(n<=0||this.root===w.SENTINEL)){let t=this.nodeAt(i),l=this.nodeAt(i+n),h=t.node,m=l.node;if(h===m){let I=this.positionInBuffer(h,t.remainder),k=this.positionInBuffer(h,l.remainder);if(t.nodeStartOffset===i){if(n===h.piece.length){let E=h.next();w.rbDelete(this,h),this.validateCRLFWithPrevNode(E),this.computeBufferMetadata();return}this.deleteNodeHead(h,k),this._searchCache.validate(i),this.validateCRLFWithPrevNode(h),this.computeBufferMetadata();return}if(t.nodeStartOffset+h.piece.length===i+n){this.deleteNodeTail(h,I),this.validateCRLFWithNextNode(h),this.computeBufferMetadata();return}this.shrinkNode(h,I,k),this.computeBufferMetadata();return}let _=[],f=this.positionInBuffer(h,t.remainder);this.deleteNodeTail(h,f),this._searchCache.validate(i),h.piece.length===0&&_.push(h);let v=this.positionInBuffer(m,l.remainder);this.deleteNodeHead(m,v),m.piece.length===0&&_.push(m);let y=h.next();for(let I=y;I!==w.SENTINEL&&I!==m;I=I.next())_.push(I);let L=h.piece.length===0?h.prev():h;this.deleteNodes(_),this.validateCRLFWithNextNode(L),this.computeBufferMetadata()}}insertContentToNodeLeft(i,n){let t=[];if(this.shouldCheckCRLF()&&this.endWithCR(i)&&this.startWithLF(n)){let m=n.piece,_={line:m.start.line+1,column:0},f=new c(m.bufferIndex,_,m.end,this.getLineFeedCnt(m.bufferIndex,_,m.end),m.length-1);n.piece=f,i+=`
`,w.updateTreeMetadata(this,n,-1,-1),n.piece.length===0&&t.push(n)}let l=this.createNewPieces(i),h=this.rbInsertLeft(n,l[l.length-1]);for(let m=l.length-2;m>=0;m--)h=this.rbInsertLeft(h,l[m]);this.validateCRLFWithPrevNode(h),this.deleteNodes(t)}insertContentToNodeRight(i,n){this.adjustCarriageReturnFromNext(i,n)&&(i+=`
`);let t=this.createNewPieces(i),l=this.rbInsertRight(n,t[0]),h=l;for(let m=1;m<t.length;m++)h=this.rbInsertRight(h,t[m]);this.validateCRLFWithPrevNode(l)}positionInBuffer(i,n,t){let l=i.piece,h=i.piece.bufferIndex,m=this._buffers[h].lineStarts,f=m[l.start.line]+l.start.column+n,v=l.start.line,y=l.end.line,L=0,I=0,k=0;for(;v<=y&&(L=v+(y-v)/2|0,k=m[L],L!==y);)if(I=m[L+1],f<k)y=L-1;else if(f>=I)v=L+1;else break;return t?(t.line=L,t.column=f-k,null):{line:L,column:f-k}}getLineFeedCnt(i,n,t){if(t.column===0)return t.line-n.line;let l=this._buffers[i].lineStarts;if(t.line===l.length-1)return t.line-n.line;let h=l[t.line+1],m=l[t.line]+t.column;if(h>m+1)return t.line-n.line;let _=m-1;return this._buffers[i].buffer.charCodeAt(_)===13?t.line-n.line+1:t.line-n.line}offsetInBuffer(i,n){return this._buffers[i].lineStarts[n.line]+n.column}deleteNodes(i){for(let n=0;n<i.length;n++)w.rbDelete(this,i[n])}createNewPieces(i){if(i.length>e.AverageBufferSize){let y=[];for(;i.length>e.AverageBufferSize;){const I=i.charCodeAt(e.AverageBufferSize-1);let k;I===13||I>=55296&&I<=56319?(k=i.substring(0,e.AverageBufferSize-1),i=i.substring(e.AverageBufferSize-1)):(k=i.substring(0,e.AverageBufferSize),i=i.substring(e.AverageBufferSize));let E=g(k);y.push(new c(this._buffers.length,{line:0,column:0},{line:E.length-1,column:k.length-E[E.length-1]},E.length-1,k.length)),this._buffers.push(new o(k,E))}let L=g(i);return y.push(new c(this._buffers.length,{line:0,column:0},{line:L.length-1,column:i.length-L[L.length-1]},L.length-1,i.length)),this._buffers.push(new o(i,L)),y}let n=this._buffers[0].buffer.length;const t=g(i,!1);let l=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===n&&n!==0&&this.startWithLF(i)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},l=this._lastChangeBufferPos;for(let y=0;y<t.length;y++)t[y]+=n+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(t.slice(1)),this._buffers[0].buffer+="_"+i,n+=1}else{if(n!==0)for(let y=0;y<t.length;y++)t[y]+=n;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(t.slice(1)),this._buffers[0].buffer+=i}const h=this._buffers[0].buffer.length;let m=this._buffers[0].lineStarts.length-1,_=h-this._buffers[0].lineStarts[m],f={line:m,column:_},v=new c(0,l,f,this.getLineFeedCnt(0,l,f),h-n);return this._lastChangeBufferPos=f,[v]}getLineRawContent(i,n=0){let t=this.root,l="",h=this._searchCache.get2(i);if(h){t=h.node;let m=this.getAccumulatedValue(t,i-h.nodeStartLineNumber-1),_=this._buffers[t.piece.bufferIndex].buffer,f=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);if(h.nodeStartLineNumber+t.piece.lineFeedCnt===i)l=_.substring(f+m,f+t.piece.length);else{let v=this.getAccumulatedValue(t,i-h.nodeStartLineNumber);return _.substring(f+m,f+v-n)}}else{let m=0;const _=i;for(;t!==w.SENTINEL;)if(t.left!==w.SENTINEL&&t.lf_left>=i-1)t=t.left;else if(t.lf_left+t.piece.lineFeedCnt>i-1){let f=this.getAccumulatedValue(t,i-t.lf_left-2),v=this.getAccumulatedValue(t,i-t.lf_left-1),y=this._buffers[t.piece.bufferIndex].buffer,L=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return m+=t.size_left,this._searchCache.set({node:t,nodeStartOffset:m,nodeStartLineNumber:_-(i-1-t.lf_left)}),y.substring(L+f,L+v-n)}else if(t.lf_left+t.piece.lineFeedCnt===i-1){let f=this.getAccumulatedValue(t,i-t.lf_left-2),v=this._buffers[t.piece.bufferIndex].buffer,y=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);l=v.substring(y+f,y+t.piece.length);break}else i-=t.lf_left+t.piece.lineFeedCnt,m+=t.size_left+t.piece.length,t=t.right}for(t=t.next();t!==w.SENTINEL;){let m=this._buffers[t.piece.bufferIndex].buffer;if(t.piece.lineFeedCnt>0){let _=this.getAccumulatedValue(t,0),f=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return l+=m.substring(f,f+_-n),l}else{let _=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);l+=m.substr(_,t.piece.length)}t=t.next()}return l}computeBufferMetadata(){let i=this.root,n=1,t=0;for(;i!==w.SENTINEL;)n+=i.lf_left+i.piece.lineFeedCnt,t+=i.size_left+i.piece.length,i=i.right;this._lineCnt=n,this._length=t,this._searchCache.validate(this._length)}getIndexOf(i,n){let t=i.piece,l=this.positionInBuffer(i,n),h=l.line-t.start.line;if(this.offsetInBuffer(t.bufferIndex,t.end)-this.offsetInBuffer(t.bufferIndex,t.start)===n){let m=this.getLineFeedCnt(i.piece.bufferIndex,t.start,l);if(m!==h)return{index:m,remainder:0}}return{index:h,remainder:l.column}}getAccumulatedValue(i,n){if(n<0)return 0;let t=i.piece,l=this._buffers[t.bufferIndex].lineStarts,h=t.start.line+n+1;return h>t.end.line?l[t.end.line]+t.end.column-l[t.start.line]-t.start.column:l[h]-l[t.start.line]-t.start.column}deleteNodeTail(i,n){const t=i.piece,l=t.lineFeedCnt,h=this.offsetInBuffer(t.bufferIndex,t.end),m=n,_=this.offsetInBuffer(t.bufferIndex,m),f=this.getLineFeedCnt(t.bufferIndex,t.start,m),v=f-l,y=_-h,L=t.length+y;i.piece=new c(t.bufferIndex,t.start,m,f,L),w.updateTreeMetadata(this,i,y,v)}deleteNodeHead(i,n){const t=i.piece,l=t.lineFeedCnt,h=this.offsetInBuffer(t.bufferIndex,t.start),m=n,_=this.getLineFeedCnt(t.bufferIndex,m,t.end),f=this.offsetInBuffer(t.bufferIndex,m),v=_-l,y=h-f,L=t.length+y;i.piece=new c(t.bufferIndex,m,t.end,_,L),w.updateTreeMetadata(this,i,y,v)}shrinkNode(i,n,t){const l=i.piece,h=l.start,m=l.end,_=l.length,f=l.lineFeedCnt,v=n,y=this.getLineFeedCnt(l.bufferIndex,l.start,v),L=this.offsetInBuffer(l.bufferIndex,n)-this.offsetInBuffer(l.bufferIndex,h);i.piece=new c(l.bufferIndex,l.start,v,y,L),w.updateTreeMetadata(this,i,L-_,y-f);let I=new c(l.bufferIndex,t,m,this.getLineFeedCnt(l.bufferIndex,t,m),this.offsetInBuffer(l.bufferIndex,m)-this.offsetInBuffer(l.bufferIndex,t)),k=this.rbInsertRight(i,I);this.validateCRLFWithPrevNode(k)}appendToNode(i,n){this.adjustCarriageReturnFromNext(n,i)&&(n+=`
`);const t=this.shouldCheckCRLF()&&this.startWithLF(n)&&this.endWithCR(i),l=this._buffers[0].buffer.length;this._buffers[0].buffer+=n;const h=g(n,!1);for(let k=0;k<h.length;k++)h[k]+=l;if(t){let k=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:l-k}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(h.slice(1));const m=this._buffers[0].lineStarts.length-1,_=this._buffers[0].buffer.length-this._buffers[0].lineStarts[m],f={line:m,column:_},v=i.piece.length+n.length,y=i.piece.lineFeedCnt,L=this.getLineFeedCnt(0,i.piece.start,f),I=L-y;i.piece=new c(i.piece.bufferIndex,i.piece.start,f,L,v),this._lastChangeBufferPos=f,w.updateTreeMetadata(this,i,n.length,I)}nodeAt(i){let n=this.root,t=this._searchCache.get(i);if(t)return{node:t.node,nodeStartOffset:t.nodeStartOffset,remainder:i-t.nodeStartOffset};let l=0;for(;n!==w.SENTINEL;)if(n.size_left>i)n=n.left;else if(n.size_left+n.piece.length>=i){l+=n.size_left;let h={node:n,remainder:i-n.size_left,nodeStartOffset:l};return this._searchCache.set(h),h}else i-=n.size_left+n.piece.length,l+=n.size_left+n.piece.length,n=n.right;return null}nodeAt2(i,n){let t=this.root,l=0;for(;t!==w.SENTINEL;)if(t.left!==w.SENTINEL&&t.lf_left>=i-1)t=t.left;else if(t.lf_left+t.piece.lineFeedCnt>i-1){let h=this.getAccumulatedValue(t,i-t.lf_left-2),m=this.getAccumulatedValue(t,i-t.lf_left-1);return l+=t.size_left,{node:t,remainder:Math.min(h+n-1,m),nodeStartOffset:l}}else if(t.lf_left+t.piece.lineFeedCnt===i-1){let h=this.getAccumulatedValue(t,i-t.lf_left-2);if(h+n-1<=t.piece.length)return{node:t,remainder:h+n-1,nodeStartOffset:l};n-=t.piece.length-h;break}else i-=t.lf_left+t.piece.lineFeedCnt,l+=t.size_left+t.piece.length,t=t.right;for(t=t.next();t!==w.SENTINEL;){if(t.piece.lineFeedCnt>0){let h=this.getAccumulatedValue(t,0),m=this.offsetOfNode(t);return{node:t,remainder:Math.min(n-1,h),nodeStartOffset:m}}else if(t.piece.length>=n-1){let h=this.offsetOfNode(t);return{node:t,remainder:n-1,nodeStartOffset:h}}else n-=t.piece.length;t=t.next()}return null}nodeCharCodeAt(i,n){if(i.piece.lineFeedCnt<1)return-1;let t=this._buffers[i.piece.bufferIndex],l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start)+n;return t.buffer.charCodeAt(l)}offsetOfNode(i){if(!i)return 0;let n=i.size_left;for(;i!==this.root;)i.parent.right===i&&(n+=i.parent.size_left+i.parent.piece.length),i=i.parent;return n}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
`)}startWithLF(i){if(typeof i=="string")return i.charCodeAt(0)===10;if(i===w.SENTINEL||i.piece.lineFeedCnt===0)return!1;let n=i.piece,t=this._buffers[n.bufferIndex].lineStarts,l=n.start.line,h=t[l]+n.start.column;return l===t.length-1||t[l+1]>h+1?!1:this._buffers[n.bufferIndex].buffer.charCodeAt(h)===10}endWithCR(i){return typeof i=="string"?i.charCodeAt(i.length-1)===13:i===w.SENTINEL||i.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(i,i.piece.length-1)===13}validateCRLFWithPrevNode(i){if(this.shouldCheckCRLF()&&this.startWithLF(i)){let n=i.prev();this.endWithCR(n)&&this.fixCRLF(n,i)}}validateCRLFWithNextNode(i){if(this.shouldCheckCRLF()&&this.endWithCR(i)){let n=i.next();this.startWithLF(n)&&this.fixCRLF(i,n)}}fixCRLF(i,n){let t=[],l=this._buffers[i.piece.bufferIndex].lineStarts,h;i.piece.end.column===0?h={line:i.piece.end.line-1,column:l[i.piece.end.line]-l[i.piece.end.line-1]-1}:h={line:i.piece.end.line,column:i.piece.end.column-1};const m=i.piece.length-1,_=i.piece.lineFeedCnt-1;i.piece=new c(i.piece.bufferIndex,i.piece.start,h,_,m),w.updateTreeMetadata(this,i,-1,-1),i.piece.length===0&&t.push(i);let f={line:n.piece.start.line+1,column:0};const v=n.piece.length-1,y=this.getLineFeedCnt(n.piece.bufferIndex,f,n.piece.end);n.piece=new c(n.piece.bufferIndex,f,n.piece.end,y,v),w.updateTreeMetadata(this,n,-1,-1),n.piece.length===0&&t.push(n);let L=this.createNewPieces(`\r
`);this.rbInsertRight(i,L[0]);for(let I=0;I<t.length;I++)w.rbDelete(this,t[I])}adjustCarriageReturnFromNext(i,n){if(this.shouldCheckCRLF()&&this.endWithCR(i)){let t=n.next();if(this.startWithLF(t)){if(i+=`
`,t.piece.length===1)w.rbDelete(this,t);else{const l=t.piece,h={line:l.start.line+1,column:0},m=l.length-1,_=this.getLineFeedCnt(l.bufferIndex,h,l.end);t.piece=new c(l.bufferIndex,h,l.end,_,m),w.updateTreeMetadata(this,t,-1,-1)}return!0}}return!1}iterate(i,n){if(i===w.SENTINEL)return n(w.SENTINEL);let t=this.iterate(i.left,n);return t&&n(i)&&this.iterate(i.right,n)}getNodeContent(i){if(i===w.SENTINEL)return"";let n=this._buffers[i.piece.bufferIndex],t,l=i.piece,h=this.offsetInBuffer(l.bufferIndex,l.start),m=this.offsetInBuffer(l.bufferIndex,l.end);return t=n.buffer.substring(h,m),t}getPieceContent(i){let n=this._buffers[i.bufferIndex],t=this.offsetInBuffer(i.bufferIndex,i.start),l=this.offsetInBuffer(i.bufferIndex,i.end);return n.buffer.substring(t,l)}rbInsertRight(i,n){let t=new w.TreeNode(n,1);if(t.left=w.SENTINEL,t.right=w.SENTINEL,t.parent=w.SENTINEL,t.size_left=0,t.lf_left=0,this.root===w.SENTINEL)this.root=t,t.color=0;else if(i.right===w.SENTINEL)i.right=t,t.parent=i;else{let h=w.leftest(i.right);h.left=t,t.parent=h}return w.fixInsert(this,t),t}rbInsertLeft(i,n){let t=new w.TreeNode(n,1);if(t.left=w.SENTINEL,t.right=w.SENTINEL,t.parent=w.SENTINEL,t.size_left=0,t.lf_left=0,this.root===w.SENTINEL)this.root=t,t.color=0;else if(i.left===w.SENTINEL)i.left=t,t.parent=i;else{let l=w.righttest(i.left);l.right=t,t.parent=l}return w.fixInsert(this,t),t}}e.PieceTreeBase=u}),define(Q[128],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWordAtText=e.ensureValidWordDefinition=e.DEFAULT_WORD_REGEXP=e.USUAL_WORD_SEPARATORS=void 0,e.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function b(C=""){let d="(-?\\d*\\.\\d\\w*)|([^";for(const g of e.USUAL_WORD_SEPARATORS)C.indexOf(g)>=0||(d+="\\"+g);return d+="\\s]+)",new RegExp(d,"g")}e.DEFAULT_WORD_REGEXP=b();function N(C){let d=e.DEFAULT_WORD_REGEXP;if(C&&C instanceof RegExp)if(C.global)d=C;else{let g="g";C.ignoreCase&&(g+="i"),C.multiline&&(g+="m"),C.unicode&&(g+="u"),d=new RegExp(C.source,g)}return d.lastIndex=0,d}e.ensureValidWordDefinition=N;const M={maxLen:1e3,windowSize:15,timeBudget:150};function w(C,d,g,p,c=M){if(g.length>c.maxLen){let r=C-c.maxLen/2;return r<0?r=0:p+=r,g=g.substring(r,C+c.maxLen/2),w(C,d,g,p,c)}const o=Date.now(),s=C-1-p;let a=-1,u=null;for(let r=1;!(Date.now()-o>=c.timeBudget);r++){const i=s-c.windowSize*r;d.lastIndex=Math.max(0,i);const n=S(d,g,s,a);if(!n&&u||(u=n,i<=0))break;a=i}if(u){let r={word:u[0],startColumn:p+1+u.index,endColumn:p+1+u.index+u[0].length};return d.lastIndex=0,r}return null}e.getWordAtText=w;function S(C,d,g,p){let c;for(;c=C.exec(d);){const o=c.index||0;if(o<=g&&C.lastIndex>=g)return c;if(p>0&&o>p)return null}return null}}),define(Q[373],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FrankensteinMode=void 0;class b{constructor(M){this._languageIdentifier=M}getId(){return this._languageIdentifier.language}}e.FrankensteinMode=b}),define(Q[109],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var b;(function(S){S[S.None=0]="None",S[S.Indent=1]="Indent",S[S.IndentOutdent=2]="IndentOutdent",S[S.Outdent=3]="Outdent"})(b=e.IndentAction||(e.IndentAction={}));class N{constructor(C){if(this.open=C.open,this.close=C.close,this._standardTokenMask=0,Array.isArray(C.notIn))for(let d=0,g=C.notIn.length;d<g;d++)switch(C.notIn[d]){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}isOK(C){return(this._standardTokenMask&C)==0}}e.StandardAutoClosingPairConditional=N;class M{constructor(C){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const d of C)w(this.autoClosingPairsOpenByStart,d.open.charAt(0),d),w(this.autoClosingPairsOpenByEnd,d.open.charAt(d.open.length-1),d),w(this.autoClosingPairsCloseByStart,d.close.charAt(0),d),w(this.autoClosingPairsCloseByEnd,d.close.charAt(d.close.length-1),d),d.close.length===1&&d.open.length===1&&w(this.autoClosingPairsCloseSingleChar,d.close,d)}}e.AutoClosingPairs=M;function w(S,C,d){S.has(C)?S.get(C).push(d):S.set(C,[d])}}),define(Q[374],J([0,1,198,72]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function M(w,S,C,d){if(Array.isArray(w)){let g=0;for(const p of w){const c=M(p,S,C,d);if(c===10)return c;c>g&&(g=c)}return g}else{if(typeof w=="string")return d?w==="*"?5:w===C?10:0:0;if(w){const{language:g,pattern:p,scheme:c,hasAccessToAllModels:o}=w;if(!d&&!o)return 0;let s=0;if(c)if(c===S.scheme)s=10;else if(c==="*")s=5;else return 0;if(g)if(g===C)s=10;else if(g==="*")s=Math.max(s,5);else return 0;if(p){let a;if(typeof p=="string"?a=p:a=Object.assign(Object.assign({},p),{base:N.normalize(p.base)}),a===S.fsPath||b.match(a,S.fsPath))s=10;else return 0}return s}else return 0}}e.score=M}),define(Q[375],J([0,1,91]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=e.Uint8Matrix=void 0;class N{constructor(o,s,a){const u=new Uint8Array(o*s);for(let r=0,i=o*s;r<i;r++)u[r]=a;this._data=u,this.rows=o,this.cols=s}get(o,s){return this._data[o*this.cols+s]}set(o,s,a){this._data[o*this.cols+s]=a}}e.Uint8Matrix=N;class M{constructor(o){let s=0,a=0;for(let r=0,i=o.length;r<i;r++){let[n,t,l]=o[r];t>s&&(s=t),n>a&&(a=n),l>a&&(a=l)}s++,a++;let u=new N(a,s,0);for(let r=0,i=o.length;r<i;r++){let[n,t,l]=o[r];u.set(n,t,l)}this._states=u,this._maxCharCode=s}nextState(o,s){return s<0||s>=this._maxCharCode?0:this._states.get(o,s)}}e.StateMachine=M;let w=null;function S(){return w===null&&(w=new M([[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]])),w}let C=null;function d(){if(C===null){C=new b.CharacterClassifier(0);const c=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u3011\u300F\u300D\u300B\u3009\u201D\u2019\uFF40\uFF5E\u2026`;for(let s=0;s<c.length;s++)C.set(c.charCodeAt(s),1);const o=".,;";for(let s=0;s<o.length;s++)C.set(o.charCodeAt(s),2)}return C}class g{static _createLink(o,s,a,u,r){let i=r-1;do{const n=s.charCodeAt(i);if(o.get(n)!==2)break;i--}while(i>u);if(u>0){const n=s.charCodeAt(u-1),t=s.charCodeAt(i);(n===40&&t===41||n===91&&t===93||n===123&&t===125)&&i--}return{range:{startLineNumber:a,startColumn:u+1,endLineNumber:a,endColumn:i+2},url:s.substring(u,i+1)}}static computeLinks(o,s=S()){const a=d();let u=[];for(let r=1,i=o.getLineCount();r<=i;r++){const n=o.getLineContent(r),t=n.length;let l=0,h=0,m=0,_=1,f=!1,v=!1,y=!1,L=!1;for(;l<t;){let I=!1;const k=n.charCodeAt(l);if(_===13){let E;switch(k){case 40:f=!0,E=0;break;case 41:E=f?0:1;break;case 91:y=!0,v=!0,E=0;break;case 93:y=!1,E=v?0:1;break;case 123:L=!0,E=0;break;case 125:E=L?0:1;break;case 39:E=m===34||m===96?0:1;break;case 34:E=m===39||m===96?0:1;break;case 96:E=m===39||m===34?0:1;break;case 42:E=m===42?1:0;break;case 124:E=m===124?1:0;break;case 32:E=y?0:1;break;default:E=a.get(k)}E===1&&(u.push(g._createLink(a,n,r,h,l)),I=!0)}else if(_===12){let E;k===91?(v=!0,E=0):E=a.get(k),E===1?I=!0:_=13}else _=s.nextState(_,k),_===0&&(I=!0);I&&(_=1,f=!1,v=!1,L=!1,h=l+1,m=k),l++}_===13&&u.push(g._createLink(a,n,r,h,t))}return u}}e.LinkComputer=g;function p(c){return!c||typeof c.getLineCount!="function"||typeof c.getLineContent!="function"?[]:g.computeLinks(c)}e.computeLinks=p}),define(Q[167],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function b(w,S){let C=w.getCount(),d=w.findTokenIndexAtOffset(S),g=w.getLanguageId(d),p=d;for(;p+1<C&&w.getLanguageId(p+1)===g;)p++;let c=d;for(;c>0&&w.getLanguageId(c-1)===g;)c--;return new N(w,g,c,p+1,w.getStartOffset(c),w.getEndOffset(p))}e.createScopedLineTokens=b;class N{constructor(S,C,d,g,p,c){this._actual=S,this.languageId=C,this._firstTokenIndex=d,this._lastTokenIndex=g,this.firstCharOffset=p,this._lastCharOffset=c}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(S){return this._actual.getLineContent().substring(0,this.firstCharOffset+S)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(S){return this._actual.findTokenIndexAtOffset(S+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(S){return this._actual.getStandardTokenType(S+this._firstTokenIndex)}}e.ScopedLineTokens=N;function M(w){return(w&7)!=0}e.ignoreBracketsInToken=M}),define(Q[376],J([0,1,109]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class N{constructor(w){if(w.autoClosingPairs?this._autoClosingPairs=w.autoClosingPairs.map(S=>new b.StandardAutoClosingPairConditional(S)):w.brackets?this._autoClosingPairs=w.brackets.map(S=>new b.StandardAutoClosingPairConditional({open:S[0],close:S[1]})):this._autoClosingPairs=[],w.__electricCharacterSupport&&w.__electricCharacterSupport.docComment){const S=w.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new b.StandardAutoClosingPairConditional({open:S.open,close:S.close||""}))}this._autoCloseBefore=typeof w.autoCloseBefore=="string"?w.autoCloseBefore:N.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=w.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(w,S,C){if(S.getTokenCount()===0)return!0;const d=S.findTokenIndexAtOffset(C-2),g=S.getStandardTokenType(d);return w.isOK(g)}getSurroundingPairs(){return this._surroundingPairs}}e.CharacterPairSupport=N,N.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])>
`}),define(Q[377],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=void 0;function b(M){return M.global&&(M.lastIndex=0),!0}class N{constructor(w){this._indentationRules=w}shouldIncrease(w){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&b(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(w))}shouldDecrease(w){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&b(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(w))}shouldIndentNextLine(w){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&b(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(w))}shouldIgnore(w){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&b(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(w))}getIndentMetadata(w){let S=0;return this.shouldIncrease(w)&&(S+=1),this.shouldDecrease(w)&&(S+=2),this.shouldIndentNextLine(w)&&(S+=4),this.shouldIgnore(w)&&(S+=8),S}}e.IndentRulesSupport=N}),define(Q[378],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class b{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(M,w,S,C,d){if(M&&w){let g=this.doNavigateValueSet(w,d);if(g)return{range:M,value:g}}if(S&&C){let g=this.doNavigateValueSet(C,d);if(g)return{range:S,value:g}}return null}doNavigateValueSet(M,w){let S=this.numberReplace(M,w);return S!==null?S:this.textReplace(M,w)}numberReplace(M,w){let S=Math.pow(10,M.length-(M.lastIndexOf(".")+1)),C=Number(M),d=parseFloat(M);return!isNaN(C)&&!isNaN(d)&&C===d?C===0&&!w?null:(C=Math.floor(C*S),C+=w?S:-S,String(C/S)):null}textReplace(M,w){return this.valueSetsReplace(this._defaultValueSet,M,w)}valueSetsReplace(M,w,S){let C=null;for(let d=0,g=M.length;C===null&&d<g;d++)C=this.valueSetReplace(M[d],w,S);return C}valueSetReplace(M,w,S){let C=M.indexOf(w);return C>=0?(C+=S?1:-1,C<0?C=M.length-1:C%=M.length,M[C]):null}}e.BasicInplaceReplace=b,b.INSTANCE=new b}),define(Q[379],J([0,1,12,8,109]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class w{constructor(C){C=C||{},C.brackets=C.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],C.brackets.forEach(d=>{const g=w._createOpenBracketRegExp(d[0]),p=w._createCloseBracketRegExp(d[1]);g&&p&&this._brackets.push({open:d[0],openRegExp:g,close:d[1],closeRegExp:p})}),this._regExpRules=C.onEnterRules||[]}onEnter(C,d,g,p){if(C>=3)for(let c=0,o=this._regExpRules.length;c<o;c++){let s=this._regExpRules[c];if([{reg:s.beforeText,text:g},{reg:s.afterText,text:p},{reg:s.previousLineText,text:d}].every(u=>u.reg?u.reg.test(u.text):!0))return s.action}if(C>=2&&g.length>0&&p.length>0)for(let c=0,o=this._brackets.length;c<o;c++){let s=this._brackets[c];if(s.openRegExp.test(g)&&s.closeRegExp.test(p))return{indentAction:M.IndentAction.IndentOutdent}}if(C>=2&&g.length>0){for(let c=0,o=this._brackets.length;c<o;c++)if(this._brackets[c].openRegExp.test(g))return{indentAction:M.IndentAction.Indent}}return null}static _createOpenBracketRegExp(C){let d=N.escapeRegExpCharacters(C);return/\B/.test(d.charAt(0))||(d="\\b"+d),d+="\\s*$",w._safeRegExp(d)}static _createCloseBracketRegExp(C){let d=N.escapeRegExpCharacters(C);return/\B/.test(d.charAt(d.length-1))||(d=d+"\\b"),d="^\\s*"+d,w._safeRegExp(d)}static _safeRegExp(C){try{return new RegExp(C)}catch(d){return b.onUnexpectedError(d),null}}}e.OnEnterSupport=w}),define(Q[168],J([0,1,8,93,3]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class w{constructor(l,h,m,_,f,v){this.languageIdentifier=l,this.index=h,this.open=m,this.close=_,this.forwardRegex=f,this.reversedRegex=v,this._openSet=w._toSet(this.open),this._closeSet=w._toSet(this.close)}isOpen(l){return this._openSet.has(l)}isClose(l){return this._closeSet.has(l)}static _toSet(l){const h=new Set;for(const m of l)h.add(m);return h}}e.RichEditBracket=w;function S(t){const l=t.length;t=t.map(v=>[v[0].toLowerCase(),v[1].toLowerCase()]);const h=[];for(let v=0;v<l;v++)h[v]=v;const m=(v,y)=>{const[L,I]=v,[k,E]=y;return L===k||L===E||I===k||I===E},_=(v,y)=>{const L=Math.min(v,y),I=Math.max(v,y);for(let k=0;k<l;k++)h[k]===I&&(h[k]=L)};for(let v=0;v<l;v++){const y=t[v];for(let L=v+1;L<l;L++){const I=t[L];m(y,I)&&_(h[v],h[L])}}const f=[];for(let v=0;v<l;v++){let y=[],L=[];for(let I=0;I<l;I++)if(h[I]===v){const[k,E]=t[I];y.push(k),L.push(E)}y.length>0&&f.push({open:y,close:L})}return f}class C{constructor(l,h){const m=S(h);this.brackets=m.map((_,f)=>new w(l,f,_.open,_.close,c(_.open,_.close,m,f),o(_.open,_.close,m,f))),this.forwardRegex=s(this.brackets),this.reversedRegex=a(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const _ of this.brackets){for(const f of _.open)this.textIsBracket[f]=_,this.textIsOpenBracket[f]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,f.length);for(const f of _.close)this.textIsBracket[f]=_,this.textIsOpenBracket[f]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,f.length)}}}e.RichEditBrackets=C;function d(t,l,h,m){for(let _=0,f=l.length;_<f;_++)if(_!==h){const v=l[_];for(const y of v.open)y.indexOf(t)>=0&&m.push(y);for(const y of v.close)y.indexOf(t)>=0&&m.push(y)}}function g(t,l){return t.length-l.length}function p(t){if(t.length<=1)return t;const l=[],h=new Set;for(const m of t)h.has(m)||(l.push(m),h.add(m));return l}function c(t,l,h,m){let _=[];_=_.concat(t),_=_.concat(l);for(let f=0,v=_.length;f<v;f++)d(_[f],h,m,_);return _=p(_),_.sort(g),_.reverse(),r(_)}function o(t,l,h,m){let _=[];_=_.concat(t),_=_.concat(l);for(let f=0,v=_.length;f<v;f++)d(_[f],h,m,_);return _=p(_),_.sort(g),_.reverse(),r(_.map(i))}function s(t){let l=[];for(const h of t){for(const m of h.open)l.push(m);for(const m of h.close)l.push(m)}return l=p(l),r(l)}function a(t){let l=[];for(const h of t){for(const m of h.open)l.push(m);for(const m of h.close)l.push(m)}return l=p(l),r(l.map(i))}function u(t){const l=/^[\w ]+$/.test(t);return t=b.escapeRegExpCharacters(t),l?`\\b${t}\\b`:t}function r(t){let l=`(${t.map(u).join(")|(")})`;return b.createRegExp(l,!0)}const i=function(){function t(m){if(N.hasTextDecoder){const _=new Uint16Array(m.length);let f=0;for(let v=m.length-1;v>=0;v--)_[f++]=m.charCodeAt(v);return N.getPlatformTextDecoder().decode(_)}else{let _=[],f=0;for(let v=m.length-1;v>=0;v--)_[f++]=m.charAt(v);return _.join("")}}let l=null,h=null;return function(_){return l!==_&&(l=_,h=t(l)),h}}();class n{static _findPrevBracketInText(l,h,m,_){let f=m.match(l);if(!f)return null;let v=m.length-(f.index||0),y=f[0].length,L=_+v;return new M.Range(h,L-y+1,h,L+1)}static findPrevBracketInRange(l,h,m,_,f){const y=i(m).substring(m.length-f,m.length-_);return this._findPrevBracketInText(l,h,y,_)}static findNextBracketInText(l,h,m,_){let f=m.match(l);if(!f)return null;let v=f.index||0,y=f[0].length;if(y===0)return null;let L=_+v;return new M.Range(h,L+1,h,L+1+y)}static findNextBracketInRange(l,h,m,_,f){const v=m.substring(_,f);return this.findNextBracketInText(l,h,v,_)}}e.BracketsUtils=n}),define(Q[380],J([0,1,167,168]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class M{constructor(S){this._richEditBrackets=S}getElectricCharacters(){let S=[];if(this._richEditBrackets)for(const C of this._richEditBrackets.brackets)for(const d of C.close){const g=d.charAt(d.length-1);S.push(g)}return S=S.filter((C,d,g)=>g.indexOf(C)===d),S}onElectricCharacter(S,C,d){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const g=C.findTokenIndexAtOffset(d-1);if(b.ignoreBracketsInToken(C.getStandardTokenType(g)))return null;const p=this._richEditBrackets.reversedRegex,c=C.getLineContent().substring(0,d-1)+S,o=N.BracketsUtils.findPrevBracketInRange(p,1,c,0,c.length);if(!o)return null;const s=c.substring(o.startColumn-1,o.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[s])return null;const u=C.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:s}:null}}e.BracketElectricCharacterSupport=M}),define(Q[41],J([0,1,6,2,8,128,109,167,376,380,377,379,168]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageConfigurationRegistry=e.LanguageConfigurationRegistryImpl=e.LanguageConfigurationChangeEvent=e.RichEditSupport=void 0;class s{constructor(t,l){this._languageIdentifier=t,this._brackets=null,this._electricCharacter=null,this._conf=l,this._onEnterSupport=this._conf.brackets||this._conf.indentationRules||this._conf.onEnterRules?new c.OnEnterSupport(this._conf):null,this.comments=s._handleComments(this._conf),this.characterPair=new d.CharacterPairSupport(this._conf),this.wordDefinition=this._conf.wordPattern||w.DEFAULT_WORD_REGEXP,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules?this.indentRulesSupport=new p.IndentRulesSupport(this._conf.indentationRules):this.indentRulesSupport=null,this.foldingRules=this._conf.folding||{}}get brackets(){return!this._brackets&&this._conf.brackets&&(this._brackets=new o.RichEditBrackets(this._languageIdentifier,this._conf.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new g.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(t,l,h,m){return this._onEnterSupport?this._onEnterSupport.onEnter(t,l,h,m):null}static _handleComments(t){let l=t.comments;if(!l)return null;let h={};if(l.lineComment&&(h.lineCommentToken=l.lineComment),l.blockComment){let[m,_]=l.blockComment;h.blockCommentStartToken=m,h.blockCommentEndToken=_}return h}}e.RichEditSupport=s;class a{constructor(t){this.languageIdentifier=t}}e.LanguageConfigurationChangeEvent=a;class u{constructor(t,l,h){this.configuration=t,this.priority=l,this.order=h}static cmp(t,l){return t.priority===l.priority?t.order-l.order:t.priority-l.priority}}class r{constructor(t){this.languageIdentifier=t,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(t,l){const h=new u(t,l,++this._order);return this._entries.push(h),this._resolved=null,N.toDisposable(()=>{for(let m=0;m<this._entries.length;m++)if(this._entries[m]===h){this._entries.splice(m,1),this._resolved=null;break}})}getRichEditSupport(){if(!this._resolved){const t=this._resolve();t&&(this._resolved=new s(this.languageIdentifier,t))}return this._resolved}_resolve(){if(this._entries.length===0)return null;this._entries.sort(u.cmp);const t={};for(const l of this._entries){const h=l.configuration;t.comments=h.comments||t.comments,t.brackets=h.brackets||t.brackets,t.wordPattern=h.wordPattern||t.wordPattern,t.indentationRules=h.indentationRules||t.indentationRules,t.onEnterRules=h.onEnterRules||t.onEnterRules,t.autoClosingPairs=h.autoClosingPairs||t.autoClosingPairs,t.surroundingPairs=h.surroundingPairs||t.surroundingPairs,t.autoCloseBefore=h.autoCloseBefore||t.autoCloseBefore,t.folding=h.folding||t.folding,t.__electricCharacterSupport=h.__electricCharacterSupport||t.__electricCharacterSupport}return t}}class i{constructor(){this._entries2=new Map,this._onDidChange=new b.Emitter,this.onDidChange=this._onDidChange.event}register(t,l,h=0){let m=this._entries2.get(t.id);m||(m=new r(t),this._entries2.set(t.id,m));const _=m.register(l,h);return this._onDidChange.fire(new a(t)),N.toDisposable(()=>{_.dispose(),this._onDidChange.fire(new a(t))})}_getRichEditSupport(t){const l=this._entries2.get(t);return l?l.getRichEditSupport():null}getIndentationRules(t){const l=this._getRichEditSupport(t);return l&&l.indentationRules||null}_getElectricCharacterSupport(t){let l=this._getRichEditSupport(t);return l&&l.electricCharacter||null}getElectricCharacters(t){let l=this._getElectricCharacterSupport(t);return l?l.getElectricCharacters():[]}onElectricCharacter(t,l,h){let m=C.createScopedLineTokens(l,h-1),_=this._getElectricCharacterSupport(m.languageId);return _?_.onElectricCharacter(t,m,h-m.firstCharOffset):null}getComments(t){let l=this._getRichEditSupport(t);return l&&l.comments||null}_getCharacterPairSupport(t){let l=this._getRichEditSupport(t);return l&&l.characterPair||null}getAutoClosingPairs(t){const l=this._getCharacterPairSupport(t);return new S.AutoClosingPairs(l?l.getAutoClosingPairs():[])}getAutoCloseBeforeSet(t){let l=this._getCharacterPairSupport(t);return l?l.getAutoCloseBeforeSet():d.CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(t){let l=this._getCharacterPairSupport(t);return l?l.getSurroundingPairs():[]}shouldAutoClosePair(t,l,h){const m=C.createScopedLineTokens(l,h-1);return d.CharacterPairSupport.shouldAutoClosePair(t,m,h-m.firstCharOffset)}getWordDefinition(t){let l=this._getRichEditSupport(t);return l?w.ensureValidWordDefinition(l.wordDefinition||null):w.ensureValidWordDefinition(null)}getFoldingRules(t){let l=this._getRichEditSupport(t);return l?l.foldingRules:{}}getIndentRulesSupport(t){let l=this._getRichEditSupport(t);return l&&l.indentRulesSupport||null}getPrecedingValidLine(t,l,h){let m=t.getLanguageIdAtPosition(l,0);if(l>1){let _,f=-1;for(_=l-1;_>=1;_--){if(t.getLanguageIdAtPosition(_,0)!==m)return f;let v=t.getLineContent(_);if(h.shouldIgnore(v)||/^\s+$/.test(v)||v===""){f=_;continue}return _}}return-1}getInheritIndentForLine(t,l,h,m=!0){if(t<4)return null;const _=this.getIndentRulesSupport(l.getLanguageIdentifier().id);if(!_)return null;if(h<=1)return{indentation:"",action:null};const f=this.getPrecedingValidLine(l,h,_);if(f<0)return null;if(f<1)return{indentation:"",action:null};const v=l.getLineContent(f);if(_.shouldIncrease(v)||_.shouldIndentNextLine(v))return{indentation:M.getLeadingWhitespace(v),action:S.IndentAction.Indent,line:f};if(_.shouldDecrease(v))return{indentation:M.getLeadingWhitespace(v),action:null,line:f};{if(f===1)return{indentation:M.getLeadingWhitespace(l.getLineContent(f)),action:null,line:f};const y=f-1,L=_.getIndentMetadata(l.getLineContent(y));if(!(L&(1|2))&&L&4){let I=0;for(let k=y-1;k>0;k--)if(!_.shouldIndentNextLine(l.getLineContent(k))){I=k;break}return{indentation:M.getLeadingWhitespace(l.getLineContent(I+1)),action:null,line:I+1}}if(m)return{indentation:M.getLeadingWhitespace(l.getLineContent(f)),action:null,line:f};for(let I=f;I>0;I--){const k=l.getLineContent(I);if(_.shouldIncrease(k))return{indentation:M.getLeadingWhitespace(k),action:S.IndentAction.Indent,line:I};if(_.shouldIndentNextLine(k)){let E=0;for(let T=I-1;T>0;T--)if(!_.shouldIndentNextLine(l.getLineContent(I))){E=T;break}return{indentation:M.getLeadingWhitespace(l.getLineContent(E+1)),action:null,line:E+1}}else if(_.shouldDecrease(k))return{indentation:M.getLeadingWhitespace(k),action:null,line:I}}return{indentation:M.getLeadingWhitespace(l.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(t,l,h,m,_){if(t<4)return null;const f=this._getRichEditSupport(h);if(!f)return null;const v=this.getIndentRulesSupport(h);if(!v)return null;const y=this.getInheritIndentForLine(t,l,m),L=l.getLineContent(m);if(y){const I=y.line;if(I!==void 0){const k=f.onEnter(t,"",l.getLineContent(I),"");if(k){let E=M.getLeadingWhitespace(l.getLineContent(I));return k.removeText&&(E=E.substring(0,E.length-k.removeText)),k.indentAction===S.IndentAction.Indent||k.indentAction===S.IndentAction.IndentOutdent?E=_.shiftIndent(E):k.indentAction===S.IndentAction.Outdent&&(E=_.unshiftIndent(E)),v.shouldDecrease(L)&&(E=_.unshiftIndent(E)),k.appendText&&(E+=k.appendText),M.getLeadingWhitespace(E)}}return v.shouldDecrease(L)?y.action===S.IndentAction.Indent?y.indentation:_.unshiftIndent(y.indentation):y.action===S.IndentAction.Indent?_.shiftIndent(y.indentation):y.indentation}return null}getIndentForEnter(t,l,h,m){if(t<4)return null;l.forceTokenization(h.startLineNumber);const _=l.getLineTokens(h.startLineNumber),f=C.createScopedLineTokens(_,h.startColumn-1),v=f.getLineContent();let y=!1,L;f.firstCharOffset>0&&_.getLanguageId(0)!==f.languageId?(y=!0,L=v.substr(0,h.startColumn-1-f.firstCharOffset)):L=_.getLineContent().substring(0,h.startColumn-1);let I;h.isEmpty()?I=v.substr(h.startColumn-1-f.firstCharOffset):I=this.getScopedLineTokens(l,h.endLineNumber,h.endColumn).getLineContent().substr(h.endColumn-1-f.firstCharOffset);const k=this.getIndentRulesSupport(f.languageId);if(!k)return null;const E=L,T=M.getLeadingWhitespace(L),O={getLineTokens:D=>l.getLineTokens(D),getLanguageIdentifier:()=>l.getLanguageIdentifier(),getLanguageIdAtPosition:(D,R)=>l.getLanguageIdAtPosition(D,R),getLineContent:D=>D===h.startLineNumber?E:l.getLineContent(D)},A=M.getLeadingWhitespace(_.getLineContent()),B=this.getInheritIndentForLine(t,O,h.startLineNumber+1);if(!B){const D=y?A:T;return{beforeEnter:D,afterEnter:D}}let F=y?A:B.indentation;return B.action===S.IndentAction.Indent&&(F=m.shiftIndent(F)),k.shouldDecrease(I)&&(F=m.unshiftIndent(F)),{beforeEnter:y?A:T,afterEnter:F}}getIndentActionForType(t,l,h,m,_){if(t<4)return null;const f=this.getScopedLineTokens(l,h.startLineNumber,h.startColumn);if(f.firstCharOffset)return null;const v=this.getIndentRulesSupport(f.languageId);if(!v)return null;const y=f.getLineContent(),L=y.substr(0,h.startColumn-1-f.firstCharOffset);let I;if(h.isEmpty()?I=y.substr(h.startColumn-1-f.firstCharOffset):I=this.getScopedLineTokens(l,h.endLineNumber,h.endColumn).getLineContent().substr(h.endColumn-1-f.firstCharOffset),!v.shouldDecrease(L+I)&&v.shouldDecrease(L+m+I)){const k=this.getInheritIndentForLine(t,l,h.startLineNumber,!1);if(!k)return null;let E=k.indentation;return k.action!==S.IndentAction.Indent&&(E=_.unshiftIndent(E)),E}return null}getIndentMetadata(t,l){const h=this.getIndentRulesSupport(t.getLanguageIdentifier().id);return!h||l<1||l>t.getLineCount()?null:h.getIndentMetadata(t.getLineContent(l))}getEnterAction(t,l,h){const m=this.getScopedLineTokens(l,h.startLineNumber,h.startColumn),_=this._getRichEditSupport(m.languageId);if(!_)return null;const f=m.getLineContent(),v=f.substr(0,h.startColumn-1-m.firstCharOffset);let y;h.isEmpty()?y=f.substr(h.startColumn-1-m.firstCharOffset):y=this.getScopedLineTokens(l,h.endLineNumber,h.endColumn).getLineContent().substr(h.endColumn-1-m.firstCharOffset);let L="";if(h.startLineNumber>1&&m.firstCharOffset===0){const A=this.getScopedLineTokens(l,h.startLineNumber-1);A.languageId===m.languageId&&(L=A.getLineContent())}const I=_.onEnter(t,L,v,y);if(!I)return null;const k=I.indentAction;let E=I.appendText;const T=I.removeText||0;E?k===S.IndentAction.Indent&&(E=" "+E):k===S.IndentAction.Indent||k===S.IndentAction.IndentOutdent?E=" ":E="";let O=this.getIndentationAtPosition(l,h.startLineNumber,h.startColumn);return T&&(O=O.substring(0,O.length-T)),{indentAction:k,appendText:E,removeText:T,indentation:O}}getIndentationAtPosition(t,l,h){const m=t.getLineContent(l);let _=M.getLeadingWhitespace(m);return _.length>h-1&&(_=_.substring(0,h-1)),_}getScopedLineTokens(t,l,h){t.forceTokenization(l);const m=t.getLineTokens(l),_=typeof h=="undefined"?t.getLineMaxColumn(l)-1:h-1;return C.createScopedLineTokens(m,_)}getBracketsSupport(t){const l=this._getRichEditSupport(t);return l&&l.brackets||null}}e.LanguageConfigurationRegistryImpl=i,e.LanguageConfigurationRegistry=new i}),define(Q[381],J([0,1,29]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateTokensCSSForColorMap=e.ThemeTrieElement=e.ThemeTrieElementRule=e.strcmp=e.toStandardTokenType=e.TokenTheme=e.ColorMap=e.parseTokenTheme=e.ParsedTokenThemeRule=void 0;class N{constructor(r,i,n,t,l){this.token=r,this.index=i,this.fontStyle=n,this.foreground=t,this.background=l}}e.ParsedTokenThemeRule=N;function M(u){if(!u||!Array.isArray(u))return[];let r=[],i=0;for(let n=0,t=u.length;n<t;n++){let l=u[n],h=-1;if(typeof l.fontStyle=="string"){h=0;let f=l.fontStyle.split(" ");for(let v=0,y=f.length;v<y;v++)switch(f[v]){case"italic":h=h|1;break;case"bold":h=h|2;break;case"underline":h=h|4;break}}let m=null;typeof l.foreground=="string"&&(m=l.foreground);let _=null;typeof l.background=="string"&&(_=l.background),r[i++]=new N(l.token||"",n,h,m,_)}return r}e.parseTokenTheme=M;function w(u,r){u.sort((v,y)=>{let L=c(v.token,y.token);return L!==0?L:v.index-y.index});let i=0,n="000000",t="ffffff";for(;u.length>=1&&u[0].token==="";){let v=u.shift();v.fontStyle!==-1&&(i=v.fontStyle),v.foreground!==null&&(n=v.foreground),v.background!==null&&(t=v.background)}let l=new C;for(let v of r)l.getId(v);let h=l.getId(n),m=l.getId(t),_=new o(i,h,m),f=new s(_);for(let v=0,y=u.length;v<y;v++){let L=u[v];f.insert(L.token,L.fontStyle,l.getId(L.foreground),l.getId(L.background))}return new d(l,f)}const S=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class C{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(r){if(r===null)return 0;const i=r.match(S);if(!i)throw new Error("Illegal value for token color: "+r);r=i[1].toUpperCase();let n=this._color2id.get(r);return n||(n=++this._lastColorId,this._color2id.set(r,n),this._id2color[n]=b.Color.fromHex("#"+r),n)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=C;class d{constructor(r,i){this._colorMap=r,this._root=i,this._cache=new Map}static createFromRawTokenTheme(r,i){return this.createFromParsedTokenTheme(M(r),i)}static createFromParsedTokenTheme(r,i){return w(r,i)}getColorMap(){return this._colorMap.getColorMap()}_match(r){return this._root.match(r)}match(r,i){let n=this._cache.get(i);if(typeof n=="undefined"){let t=this._match(i),l=p(i);n=(t.metadata|l<<8)>>>0,this._cache.set(i,n)}return(n|r<<0)>>>0}}e.TokenTheme=d;const g=/\b(comment|string|regex|regexp)\b/;function p(u){let r=u.match(g);if(!r)return 0;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}e.toStandardTokenType=p;function c(u,r){return u<r?-1:u>r?1:0}e.strcmp=c;class o{constructor(r,i,n){this._fontStyle=r,this._foreground=i,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new o(this._fontStyle,this._foreground,this._background)}acceptOverwrite(r,i,n){r!==-1&&(this._fontStyle=r),i!==0&&(this._foreground=i),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}e.ThemeTrieElementRule=o;class s{constructor(r){this._mainRule=r,this._children=new Map}match(r){if(r==="")return this._mainRule;let i=r.indexOf("."),n,t;i===-1?(n=r,t=""):(n=r.substring(0,i),t=r.substring(i+1));let l=this._children.get(n);return typeof l!="undefined"?l.match(t):this._mainRule}insert(r,i,n,t){if(r===""){this._mainRule.acceptOverwrite(i,n,t);return}let l=r.indexOf("."),h,m;l===-1?(h=r,m=""):(h=r.substring(0,l),m=r.substring(l+1));let _=this._children.get(h);typeof _=="undefined"&&(_=new s(this._mainRule.clone()),this._children.set(h,_)),_.insert(m,i,n,t)}}e.ThemeTrieElement=s;function a(u){let r=[];for(let i=1,n=u.length;i<n;i++){let t=u[i];r[i]=`.mtk${i} { color: ${t}; }`}return r.push(".mtki { font-style: italic; }"),r.push(".mtkb { font-weight: bold; }"),r.push(".mtku { text-decoration: underline; text-underline-position: under; }"),r.join(`
`)}e.generateTokensCSSForColorMap=a}),define(Q[382],J([0,1,6,2]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistryImpl=void 0;class M{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new b.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(S){this._onDidChange.fire({changedLanguages:S,changedColorMap:!1})}register(S,C){return this._map.set(S,C),this.fire([S]),N.toDisposable(()=>{this._map.get(S)===C&&(this._map.delete(S),this.fire([S]))})}registerPromise(S,C){let d=null,g=!1;return this._promises.set(S,C.then(p=>{this._promises.delete(S),!(g||!p)&&(d=this.register(S,p))})),N.toDisposable(()=>{g=!0,d&&d.dispose()})}getPromise(S){const C=this.get(S);if(C)return Promise.resolve(C);const d=this._promises.get(S);return d?d.then(g=>this.get(S)):null}get(S){return this._map.get(S)||null}setColorMap(S){this._colorMap=S,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}e.TokenizationRegistryImpl=M}),define(Q[383],J([0,1,101,17]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function M(d){for(let g=0,p=d.length;g<p;g+=4){const c=d[g+0],o=d[g+1],s=d[g+2],a=d[g+3];d[g+0]=a,d[g+1]=s,d[g+2]=o,d[g+3]=c}}function w(d){const g=new Uint8Array(d.buffer,d.byteOffset,d.length*4);return N.isLittleEndian()||M(g),b.VSBuffer.wrap(g)}function S(d){const g=new Uint32Array(C(d));let p=0;if(g[p++]=d.id,d.type==="full")g[p++]=1,g[p++]=d.data.length,g.set(d.data,p),p+=d.data.length;else{g[p++]=2,g[p++]=d.deltas.length;for(const c of d.deltas)g[p++]=c.start,g[p++]=c.deleteCount,c.data?(g[p++]=c.data.length,g.set(c.data,p),p+=c.data.length):g[p++]=0}return w(g)}e.encodeSemanticTokensDto=S;function C(d){let g=0;if(g+=1+1,d.type==="full")g+=1+d.data.length;else{g+=1,g+=(1+1+1)*d.deltas.length;for(const p of d.deltas)p.data&&(g+=p.data.length)}return g}}),define(Q[169],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WrappingIndent=e.TrackedRangeStickiness=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.SymbolTag=e.SymbolKind=e.SignatureHelpTriggerKind=e.SelectionDirection=e.ScrollbarVisibility=e.ScrollType=e.RenderMinimap=e.RenderLineNumbersType=e.OverviewRulerLane=e.OverlayWidgetPositionPreference=e.MouseTargetType=e.MinimapPosition=e.MarkerTag=e.MarkerSeverity=e.KeyCode=e.InlineHintKind=e.IndentAction=e.EndOfLineSequence=e.EndOfLinePreference=e.EditorOption=e.EditorAutoIndentStrategy=e.DocumentHighlightKind=e.DefaultEndOfLine=e.CursorChangeReason=e.ContentWidgetPositionPreference=e.CompletionTriggerKind=e.CompletionItemTag=e.CompletionItemKind=e.CompletionItemInsertTextRule=e.AccessibilitySupport=void 0;var b;(function(D){D[D.Unknown=0]="Unknown",D[D.Disabled=1]="Disabled",D[D.Enabled=2]="Enabled"})(b=e.AccessibilitySupport||(e.AccessibilitySupport={}));var N;(function(D){D[D.KeepWhitespace=1]="KeepWhitespace",D[D.InsertAsSnippet=4]="InsertAsSnippet"})(N=e.CompletionItemInsertTextRule||(e.CompletionItemInsertTextRule={}));var M;(function(D){D[D.Method=0]="Method",D[D.Function=1]="Function",D[D.Constructor=2]="Constructor",D[D.Field=3]="Field",D[D.Variable=4]="Variable",D[D.Class=5]="Class",D[D.Struct=6]="Struct",D[D.Interface=7]="Interface",D[D.Module=8]="Module",D[D.Property=9]="Property",D[D.Event=10]="Event",D[D.Operator=11]="Operator",D[D.Unit=12]="Unit",D[D.Value=13]="Value",D[D.Constant=14]="Constant",D[D.Enum=15]="Enum",D[D.EnumMember=16]="EnumMember",D[D.Keyword=17]="Keyword",D[D.Text=18]="Text",D[D.Color=19]="Color",D[D.File=20]="File",D[D.Reference=21]="Reference",D[D.Customcolor=22]="Customcolor",D[D.Folder=23]="Folder",D[D.TypeParameter=24]="TypeParameter",D[D.User=25]="User",D[D.Issue=26]="Issue",D[D.Snippet=27]="Snippet"})(M=e.CompletionItemKind||(e.CompletionItemKind={}));var w;(function(D){D[D.Deprecated=1]="Deprecated"})(w=e.CompletionItemTag||(e.CompletionItemTag={}));var S;(function(D){D[D.Invoke=0]="Invoke",D[D.TriggerCharacter=1]="TriggerCharacter",D[D.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(S=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var C;(function(D){D[D.EXACT=0]="EXACT",D[D.ABOVE=1]="ABOVE",D[D.BELOW=2]="BELOW"})(C=e.ContentWidgetPositionPreference||(e.ContentWidgetPositionPreference={}));var d;(function(D){D[D.NotSet=0]="NotSet",D[D.ContentFlush=1]="ContentFlush",D[D.RecoverFromMarkers=2]="RecoverFromMarkers",D[D.Explicit=3]="Explicit",D[D.Paste=4]="Paste",D[D.Undo=5]="Undo",D[D.Redo=6]="Redo"})(d=e.CursorChangeReason||(e.CursorChangeReason={}));var g;(function(D){D[D.LF=1]="LF",D[D.CRLF=2]="CRLF"})(g=e.DefaultEndOfLine||(e.DefaultEndOfLine={}));var p;(function(D){D[D.Text=0]="Text",D[D.Read=1]="Read",D[D.Write=2]="Write"})(p=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));var c;(function(D){D[D.None=0]="None",D[D.Keep=1]="Keep",D[D.Brackets=2]="Brackets",D[D.Advanced=3]="Advanced",D[D.Full=4]="Full"})(c=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={}));var o;(function(D){D[D.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",D[D.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",D[D.accessibilitySupport=2]="accessibilitySupport",D[D.accessibilityPageSize=3]="accessibilityPageSize",D[D.ariaLabel=4]="ariaLabel",D[D.autoClosingBrackets=5]="autoClosingBrackets",D[D.autoClosingOvertype=6]="autoClosingOvertype",D[D.autoClosingQuotes=7]="autoClosingQuotes",D[D.autoIndent=8]="autoIndent",D[D.automaticLayout=9]="automaticLayout",D[D.autoSurround=10]="autoSurround",D[D.codeLens=11]="codeLens",D[D.codeLensFontFamily=12]="codeLensFontFamily",D[D.codeLensFontSize=13]="codeLensFontSize",D[D.colorDecorators=14]="colorDecorators",D[D.columnSelection=15]="columnSelection",D[D.comments=16]="comments",D[D.contextmenu=17]="contextmenu",D[D.copyWithSyntaxHighlighting=18]="copyWithSyntaxHighlighting",D[D.cursorBlinking=19]="cursorBlinking",D[D.cursorSmoothCaretAnimation=20]="cursorSmoothCaretAnimation",D[D.cursorStyle=21]="cursorStyle",D[D.cursorSurroundingLines=22]="cursorSurroundingLines",D[D.cursorSurroundingLinesStyle=23]="cursorSurroundingLinesStyle",D[D.cursorWidth=24]="cursorWidth",D[D.disableLayerHinting=25]="disableLayerHinting",D[D.disableMonospaceOptimizations=26]="disableMonospaceOptimizations",D[D.dragAndDrop=27]="dragAndDrop",D[D.emptySelectionClipboard=28]="emptySelectionClipboard",D[D.extraEditorClassName=29]="extraEditorClassName",D[D.fastScrollSensitivity=30]="fastScrollSensitivity",D[D.find=31]="find",D[D.fixedOverflowWidgets=32]="fixedOverflowWidgets",D[D.folding=33]="folding",D[D.foldingStrategy=34]="foldingStrategy",D[D.foldingHighlight=35]="foldingHighlight",D[D.unfoldOnClickAfterEndOfLine=36]="unfoldOnClickAfterEndOfLine",D[D.fontFamily=37]="fontFamily",D[D.fontInfo=38]="fontInfo",D[D.fontLigatures=39]="fontLigatures",D[D.fontSize=40]="fontSize",D[D.fontWeight=41]="fontWeight",D[D.formatOnPaste=42]="formatOnPaste",D[D.formatOnType=43]="formatOnType",D[D.glyphMargin=44]="glyphMargin",D[D.gotoLocation=45]="gotoLocation",D[D.hideCursorInOverviewRuler=46]="hideCursorInOverviewRuler",D[D.highlightActiveIndentGuide=47]="highlightActiveIndentGuide",D[D.hover=48]="hover",D[D.inDiffEditor=49]="inDiffEditor",D[D.letterSpacing=50]="letterSpacing",D[D.lightbulb=51]="lightbulb",D[D.lineDecorationsWidth=52]="lineDecorationsWidth",D[D.lineHeight=53]="lineHeight",D[D.lineNumbers=54]="lineNumbers",D[D.lineNumbersMinChars=55]="lineNumbersMinChars",D[D.linkedEditing=56]="linkedEditing",D[D.links=57]="links",D[D.matchBrackets=58]="matchBrackets",D[D.minimap=59]="minimap",D[D.mouseStyle=60]="mouseStyle",D[D.mouseWheelScrollSensitivity=61]="mouseWheelScrollSensitivity",D[D.mouseWheelZoom=62]="mouseWheelZoom",D[D.multiCursorMergeOverlapping=63]="multiCursorMergeOverlapping",D[D.multiCursorModifier=64]="multiCursorModifier",D[D.multiCursorPaste=65]="multiCursorPaste",D[D.occurrencesHighlight=66]="occurrencesHighlight",D[D.overviewRulerBorder=67]="overviewRulerBorder",D[D.overviewRulerLanes=68]="overviewRulerLanes",D[D.padding=69]="padding",D[D.parameterHints=70]="parameterHints",D[D.peekWidgetDefaultFocus=71]="peekWidgetDefaultFocus",D[D.definitionLinkOpensInPeek=72]="definitionLinkOpensInPeek",D[D.quickSuggestions=73]="quickSuggestions",D[D.quickSuggestionsDelay=74]="quickSuggestionsDelay",D[D.readOnly=75]="readOnly",D[D.renameOnType=76]="renameOnType",D[D.renderControlCharacters=77]="renderControlCharacters",D[D.renderIndentGuides=78]="renderIndentGuides",D[D.renderFinalNewline=79]="renderFinalNewline",D[D.renderLineHighlight=80]="renderLineHighlight",D[D.renderLineHighlightOnlyWhenFocus=81]="renderLineHighlightOnlyWhenFocus",D[D.renderValidationDecorations=82]="renderValidationDecorations",D[D.renderWhitespace=83]="renderWhitespace",D[D.revealHorizontalRightPadding=84]="revealHorizontalRightPadding",D[D.roundedSelection=85]="roundedSelection",D[D.rulers=86]="rulers",D[D.scrollbar=87]="scrollbar",D[D.scrollBeyondLastColumn=88]="scrollBeyondLastColumn",D[D.scrollBeyondLastLine=89]="scrollBeyondLastLine",D[D.scrollPredominantAxis=90]="scrollPredominantAxis",D[D.selectionClipboard=91]="selectionClipboard",D[D.selectionHighlight=92]="selectionHighlight",D[D.selectOnLineNumbers=93]="selectOnLineNumbers",D[D.showFoldingControls=94]="showFoldingControls",D[D.showUnused=95]="showUnused",D[D.snippetSuggestions=96]="snippetSuggestions",D[D.smartSelect=97]="smartSelect",D[D.smoothScrolling=98]="smoothScrolling",D[D.stickyTabStops=99]="stickyTabStops",D[D.stopRenderingLineAfter=100]="stopRenderingLineAfter",D[D.suggest=101]="suggest",D[D.suggestFontSize=102]="suggestFontSize",D[D.suggestLineHeight=103]="suggestLineHeight",D[D.suggestOnTriggerCharacters=104]="suggestOnTriggerCharacters",D[D.suggestSelection=105]="suggestSelection",D[D.tabCompletion=106]="tabCompletion",D[D.tabIndex=107]="tabIndex",D[D.unusualLineTerminators=108]="unusualLineTerminators",D[D.useTabStops=109]="useTabStops",D[D.wordSeparators=110]="wordSeparators",D[D.wordWrap=111]="wordWrap",D[D.wordWrapBreakAfterCharacters=112]="wordWrapBreakAfterCharacters",D[D.wordWrapBreakBeforeCharacters=113]="wordWrapBreakBeforeCharacters",D[D.wordWrapColumn=114]="wordWrapColumn",D[D.wordWrapOverride1=115]="wordWrapOverride1",D[D.wordWrapOverride2=116]="wordWrapOverride2",D[D.wrappingIndent=117]="wrappingIndent",D[D.wrappingStrategy=118]="wrappingStrategy",D[D.showDeprecated=119]="showDeprecated",D[D.inlineHints=120]="inlineHints",D[D.editorClassName=121]="editorClassName",D[D.pixelRatio=122]="pixelRatio",D[D.tabFocusMode=123]="tabFocusMode",D[D.layoutInfo=124]="layoutInfo",D[D.wrappingInfo=125]="wrappingInfo"})(o=e.EditorOption||(e.EditorOption={}));var s;(function(D){D[D.TextDefined=0]="TextDefined",D[D.LF=1]="LF",D[D.CRLF=2]="CRLF"})(s=e.EndOfLinePreference||(e.EndOfLinePreference={}));var a;(function(D){D[D.LF=0]="LF",D[D.CRLF=1]="CRLF"})(a=e.EndOfLineSequence||(e.EndOfLineSequence={}));var u;(function(D){D[D.None=0]="None",D[D.Indent=1]="Indent",D[D.IndentOutdent=2]="IndentOutdent",D[D.Outdent=3]="Outdent"})(u=e.IndentAction||(e.IndentAction={}));var r;(function(D){D[D.Other=0]="Other",D[D.Type=1]="Type",D[D.Parameter=2]="Parameter"})(r=e.InlineHintKind||(e.InlineHintKind={}));var i;(function(D){D[D.Unknown=0]="Unknown",D[D.Backspace=1]="Backspace",D[D.Tab=2]="Tab",D[D.Enter=3]="Enter",D[D.Shift=4]="Shift",D[D.Ctrl=5]="Ctrl",D[D.Alt=6]="Alt",D[D.PauseBreak=7]="PauseBreak",D[D.CapsLock=8]="CapsLock",D[D.Escape=9]="Escape",D[D.Space=10]="Space",D[D.PageUp=11]="PageUp",D[D.PageDown=12]="PageDown",D[D.End=13]="End",D[D.Home=14]="Home",D[D.LeftArrow=15]="LeftArrow",D[D.UpArrow=16]="UpArrow",D[D.RightArrow=17]="RightArrow",D[D.DownArrow=18]="DownArrow",D[D.Insert=19]="Insert",D[D.Delete=20]="Delete",D[D.KEY_0=21]="KEY_0",D[D.KEY_1=22]="KEY_1",D[D.KEY_2=23]="KEY_2",D[D.KEY_3=24]="KEY_3",D[D.KEY_4=25]="KEY_4",D[D.KEY_5=26]="KEY_5",D[D.KEY_6=27]="KEY_6",D[D.KEY_7=28]="KEY_7",D[D.KEY_8=29]="KEY_8",D[D.KEY_9=30]="KEY_9",D[D.KEY_A=31]="KEY_A",D[D.KEY_B=32]="KEY_B",D[D.KEY_C=33]="KEY_C",D[D.KEY_D=34]="KEY_D",D[D.KEY_E=35]="KEY_E",D[D.KEY_F=36]="KEY_F",D[D.KEY_G=37]="KEY_G",D[D.KEY_H=38]="KEY_H",D[D.KEY_I=39]="KEY_I",D[D.KEY_J=40]="KEY_J",D[D.KEY_K=41]="KEY_K",D[D.KEY_L=42]="KEY_L",D[D.KEY_M=43]="KEY_M",D[D.KEY_N=44]="KEY_N",D[D.KEY_O=45]="KEY_O",D[D.KEY_P=46]="KEY_P",D[D.KEY_Q=47]="KEY_Q",D[D.KEY_R=48]="KEY_R",D[D.KEY_S=49]="KEY_S",D[D.KEY_T=50]="KEY_T",D[D.KEY_U=51]="KEY_U",D[D.KEY_V=52]="KEY_V",D[D.KEY_W=53]="KEY_W",D[D.KEY_X=54]="KEY_X",D[D.KEY_Y=55]="KEY_Y",D[D.KEY_Z=56]="KEY_Z",D[D.Meta=57]="Meta",D[D.ContextMenu=58]="ContextMenu",D[D.F1=59]="F1",D[D.F2=60]="F2",D[D.F3=61]="F3",D[D.F4=62]="F4",D[D.F5=63]="F5",D[D.F6=64]="F6",D[D.F7=65]="F7",D[D.F8=66]="F8",D[D.F9=67]="F9",D[D.F10=68]="F10",D[D.F11=69]="F11",D[D.F12=70]="F12",D[D.F13=71]="F13",D[D.F14=72]="F14",D[D.F15=73]="F15",D[D.F16=74]="F16",D[D.F17=75]="F17",D[D.F18=76]="F18",D[D.F19=77]="F19",D[D.NumLock=78]="NumLock",D[D.ScrollLock=79]="ScrollLock",D[D.US_SEMICOLON=80]="US_SEMICOLON",D[D.US_EQUAL=81]="US_EQUAL",D[D.US_COMMA=82]="US_COMMA",D[D.US_MINUS=83]="US_MINUS",D[D.US_DOT=84]="US_DOT",D[D.US_SLASH=85]="US_SLASH",D[D.US_BACKTICK=86]="US_BACKTICK",D[D.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",D[D.US_BACKSLASH=88]="US_BACKSLASH",D[D.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",D[D.US_QUOTE=90]="US_QUOTE",D[D.OEM_8=91]="OEM_8",D[D.OEM_102=92]="OEM_102",D[D.NUMPAD_0=93]="NUMPAD_0",D[D.NUMPAD_1=94]="NUMPAD_1",D[D.NUMPAD_2=95]="NUMPAD_2",D[D.NUMPAD_3=96]="NUMPAD_3",D[D.NUMPAD_4=97]="NUMPAD_4",D[D.NUMPAD_5=98]="NUMPAD_5",D[D.NUMPAD_6=99]="NUMPAD_6",D[D.NUMPAD_7=100]="NUMPAD_7",D[D.NUMPAD_8=101]="NUMPAD_8",D[D.NUMPAD_9=102]="NUMPAD_9",D[D.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",D[D.NUMPAD_ADD=104]="NUMPAD_ADD",D[D.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",D[D.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",D[D.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",D[D.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",D[D.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",D[D.ABNT_C1=110]="ABNT_C1",D[D.ABNT_C2=111]="ABNT_C2",D[D.MAX_VALUE=112]="MAX_VALUE"})(i=e.KeyCode||(e.KeyCode={}));var n;(function(D){D[D.Hint=1]="Hint",D[D.Info=2]="Info",D[D.Warning=4]="Warning",D[D.Error=8]="Error"})(n=e.MarkerSeverity||(e.MarkerSeverity={}));var t;(function(D){D[D.Unnecessary=1]="Unnecessary",D[D.Deprecated=2]="Deprecated"})(t=e.MarkerTag||(e.MarkerTag={}));var l;(function(D){D[D.Inline=1]="Inline",D[D.Gutter=2]="Gutter"})(l=e.MinimapPosition||(e.MinimapPosition={}));var h;(function(D){D[D.UNKNOWN=0]="UNKNOWN",D[D.TEXTAREA=1]="TEXTAREA",D[D.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",D[D.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",D[D.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",D[D.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",D[D.CONTENT_TEXT=6]="CONTENT_TEXT",D[D.CONTENT_EMPTY=7]="CONTENT_EMPTY",D[D.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",D[D.CONTENT_WIDGET=9]="CONTENT_WIDGET",D[D.OVERVIEW_RULER=10]="OVERVIEW_RULER",D[D.SCROLLBAR=11]="SCROLLBAR",D[D.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",D[D.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(h=e.MouseTargetType||(e.MouseTargetType={}));var m;(function(D){D[D.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",D[D.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",D[D.TOP_CENTER=2]="TOP_CENTER"})(m=e.OverlayWidgetPositionPreference||(e.OverlayWidgetPositionPreference={}));var _;(function(D){D[D.Left=1]="Left",D[D.Center=2]="Center",D[D.Right=4]="Right",D[D.Full=7]="Full"})(_=e.OverviewRulerLane||(e.OverviewRulerLane={}));var f;(function(D){D[D.Off=0]="Off",D[D.On=1]="On",D[D.Relative=2]="Relative",D[D.Interval=3]="Interval",D[D.Custom=4]="Custom"})(f=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));var v;(function(D){D[D.None=0]="None",D[D.Text=1]="Text",D[D.Blocks=2]="Blocks"})(v=e.RenderMinimap||(e.RenderMinimap={}));var y;(function(D){D[D.Smooth=0]="Smooth",D[D.Immediate=1]="Immediate"})(y=e.ScrollType||(e.ScrollType={}));var L;(function(D){D[D.Auto=1]="Auto",D[D.Hidden=2]="Hidden",D[D.Visible=3]="Visible"})(L=e.ScrollbarVisibility||(e.ScrollbarVisibility={}));var I;(function(D){D[D.LTR=0]="LTR",D[D.RTL=1]="RTL"})(I=e.SelectionDirection||(e.SelectionDirection={}));var k;(function(D){D[D.Invoke=1]="Invoke",D[D.TriggerCharacter=2]="TriggerCharacter",D[D.ContentChange=3]="ContentChange"})(k=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var E;(function(D){D[D.File=0]="File",D[D.Module=1]="Module",D[D.Namespace=2]="Namespace",D[D.Package=3]="Package",D[D.Class=4]="Class",D[D.Method=5]="Method",D[D.Property=6]="Property",D[D.Field=7]="Field",D[D.Constructor=8]="Constructor",D[D.Enum=9]="Enum",D[D.Interface=10]="Interface",D[D.Function=11]="Function",D[D.Variable=12]="Variable",D[D.Constant=13]="Constant",D[D.String=14]="String",D[D.Number=15]="Number",D[D.Boolean=16]="Boolean",D[D.Array=17]="Array",D[D.Object=18]="Object",D[D.Key=19]="Key",D[D.Null=20]="Null",D[D.EnumMember=21]="EnumMember",D[D.Struct=22]="Struct",D[D.Event=23]="Event",D[D.Operator=24]="Operator",D[D.TypeParameter=25]="TypeParameter"})(E=e.SymbolKind||(e.SymbolKind={}));var T;(function(D){D[D.Deprecated=1]="Deprecated"})(T=e.SymbolTag||(e.SymbolTag={}));var O;(function(D){D[D.Hidden=0]="Hidden",D[D.Blink=1]="Blink",D[D.Smooth=2]="Smooth",D[D.Phase=3]="Phase",D[D.Expand=4]="Expand",D[D.Solid=5]="Solid"})(O=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));var A;(function(D){D[D.Line=1]="Line",D[D.Block=2]="Block",D[D.Underline=3]="Underline",D[D.LineThin=4]="LineThin",D[D.BlockOutline=5]="BlockOutline",D[D.UnderlineThin=6]="UnderlineThin"})(A=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));var B;(function(D){D[D.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",D[D.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",D[D.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",D[D.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(B=e.TrackedRangeStickiness||(e.TrackedRangeStickiness={}));var F;(function(D){D[D.None=0]="None",D[D.Same=1]="Same",D[D.Indent=2]="Indent",D[D.DeepIndent=3]="DeepIndent"})(F=e.WrappingIndent||(e.WrappingIndent={}))}),define(Q[220],J([0,1,23,6,39,24,14,3,21,127,169]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class c{static chord(a,u){return M.KeyChord(a,u)}}e.KeyMod=c,c.CtrlCmd=2048,c.Shift=1024,c.Alt=512,c.WinCtrl=256;function o(){return{editor:void 0,languages:void 0,CancellationTokenSource:b.CancellationTokenSource,Emitter:N.Emitter,KeyCode:p.KeyCode,KeyMod:c,Position:S.Position,Range:C.Range,Selection:d.Selection,SelectionDirection:p.SelectionDirection,MarkerSeverity:p.MarkerSeverity,MarkerTag:p.MarkerTag,Uri:w.URI,Token:g.Token}}e.createMonacoBaseAPI=o}),define(Q[221],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class b{constructor(S,C,d){this.from=S|0,this.to=C|0,this.colorId=d|0}static compare(S,C){return S.colorId===C.colorId?S.from===C.from?S.to-C.to:S.from-C.from:S.colorId-C.colorId}}e.ColorZone=b;class N{constructor(S,C,d){this.startLineNumber=S,this.endLineNumber=C,this.color=d,this._colorZone=null}static compare(S,C){return S.color===C.color?S.startLineNumber===C.startLineNumber?S.endLineNumber-C.endLineNumber:S.startLineNumber-C.startLineNumber:S.color<C.color?-1:1}setColorZone(S){this._colorZone=S}getColorZones(){return this._colorZone}}e.OverviewRulerZone=N;class M{constructor(S){this._getVerticalOffsetForLine=S,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(S){this._zones=S,this._zones.sort(N.compare)}setLineHeight(S){return this._lineHeight===S?!1:(this._lineHeight=S,this._colorZonesInvalid=!0,!0)}setPixelRatio(S){this._pixelRatio=S,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(S){return this._domWidth===S?!1:(this._domWidth=S,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(S){return this._domHeight===S?!1:(this._domHeight=S,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(S){return this._outerHeight===S?!1:(this._outerHeight=S,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const S=this._colorZonesInvalid,C=Math.floor(this._lineHeight),d=Math.floor(this.getCanvasHeight()),g=Math.floor(this._outerHeight),p=d/g,c=Math.floor(4*this._pixelRatio/2);let o=[];for(let s=0,a=this._zones.length;s<a;s++){const u=this._zones[s];if(!S){const _=u.getColorZones();if(_){o.push(_);continue}}const r=Math.floor(p*this._getVerticalOffsetForLine(u.startLineNumber)),i=Math.floor(p*(this._getVerticalOffsetForLine(u.endLineNumber)+C));let n=Math.floor((r+i)/2),t=i-n;t<c&&(t=c),n-t<0&&(n=t),n+t>d&&(n=d-t);const l=u.color;let h=this._color2Id[l];h||(h=++this._lastAssignedId,this._color2Id[l]=h,this._id2Color[h]=l);const m=new b(n-t,n+t,h);u.setColorZone(m),o.push(m)}return this._colorZonesInvalid=!1,o.sort(b.compare),o}}e.OverviewZoneManager=M}),define(Q[110],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class b{constructor(g,p){this._viewLayout=g,this.viewportData=p,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const c=this._viewLayout.getCurrentViewport();this.scrollTop=c.top,this.scrollLeft=c.left,this.viewportWidth=c.width,this.viewportHeight=c.height}getScrolledTopFromAbsoluteTop(g){return g-this.scrollTop}getVerticalOffsetForLineNumber(g){return this._viewLayout.getVerticalOffsetForLineNumber(g)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=b;class N extends b{constructor(g,p,c){super(g,p);this._viewLines=c}linesVisibleRangesForRange(g,p){return this._viewLines.linesVisibleRangesForRange(g,p)}visibleRangeForPosition(g){return this._viewLines.visibleRangeForPosition(g)}}e.RenderingContext=N;class M{constructor(g,p,c){this.outsideRenderedLine=g,this.lineNumber=p,this.ranges=c}}e.LineVisibleRanges=M;class w{constructor(g,p){this.left=Math.round(g),this.width=Math.round(p)}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=w;class S{constructor(g,p){this.outsideRenderedLine=g,this.left=Math.round(p)}}e.HorizontalPosition=S;class C{constructor(g,p){this.outsideRenderedLine=g,this.ranges=p}}e.VisibleRanges=C}),define(Q[384],J([0,1,110]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class N{constructor(S,C){this.left=S,this.width=C}toString(){return`[${this.left},${this.width}]`}static compare(S,C){return S.left-C.left}}class M{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(S,C){S.selectNodeContents(C)}static _readClientRects(S,C,d,g,p){const c=this._createRange();try{return c.setStart(S,C),c.setEnd(d,g),c.getClientRects()}catch(o){return null}finally{this._detachRange(c,p)}}static _mergeAdjacentRanges(S){if(S.length===1)return[new b.HorizontalRange(S[0].left,S[0].width)];S.sort(N.compare);let C=[],d=0,g=S[0].left,p=S[0].width;for(let c=1,o=S.length;c<o;c++){const s=S[c],a=s.left,u=s.width;g+p+.9>=a?p=Math.max(p,a+u-g):(C[d++]=new b.HorizontalRange(g,p),g=a,p=u)}return C[d++]=new b.HorizontalRange(g,p),C}static _createHorizontalRangesFromClientRects(S,C){if(!S||S.length===0)return null;const d=[];for(let g=0,p=S.length;g<p;g++){const c=S[g];d[g]=new N(Math.max(0,c.left-C),c.width)}return this._mergeAdjacentRanges(d)}static readHorizontalRanges(S,C,d,g,p,c,o){const s=0,a=S.children.length-1;if(s>a)return null;if(C=Math.min(a,Math.max(s,C)),g=Math.min(a,Math.max(s,g)),C===g&&d===p&&d===0){const n=S.children[C].getClientRects();return this._createHorizontalRangesFromClientRects(n,c)}C!==g&&g>0&&p===0&&(g--,p=1073741824);let u=S.children[C].firstChild,r=S.children[g].firstChild;if((!u||!r)&&(!u&&d===0&&C>0&&(u=S.children[C-1].firstChild,d=1073741824),!r&&p===0&&g>0&&(r=S.children[g-1].firstChild,p=1073741824)),!u||!r)return null;d=Math.min(u.textContent.length,Math.max(0,d)),p=Math.min(r.textContent.length,Math.max(0,p));const i=this._readClientRects(u,d,r,p,o);return this._createHorizontalRangesFromClientRects(i,c)}}e.RangeUtil=M}),define(Q[385],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=e.EditorTheme=void 0;class b{constructor(w){this._theme=w}get type(){return this._theme.type}update(w){this._theme=w}getColor(w){return this._theme.getColor(w)}}e.EditorTheme=b;class N{constructor(w,S,C){this.configuration=w,this.theme=new b(S),this.model=C,this.viewLayout=C.viewLayout}addEventHandler(w){this.model.addViewEventHandler(w)}removeEventHandler(w){this.model.removeViewEventHandler(w)}}e.ViewContext=N}),define(Q[170],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZonesChangedEvent=e.ViewTokensColorsChangedEvent=e.ViewTokensChangedEvent=e.ViewThemeChangedEvent=e.ViewScrollChangedEvent=e.ViewRevealRangeRequestEvent=e.ViewLinesInsertedEvent=e.ViewLinesDeletedEvent=e.ViewLinesChangedEvent=e.ViewLineMappingChangedEvent=e.ViewLanguageConfigurationEvent=e.ViewFocusChangedEvent=e.ViewFlushedEvent=e.ViewDecorationsChangedEvent=e.ViewCursorStateChangedEvent=e.ViewConfigurationChangedEvent=e.ViewCompositionEndEvent=e.ViewCompositionStartEvent=void 0;class b{constructor(){this.type=0}}e.ViewCompositionStartEvent=b;class N{constructor(){this.type=1}}e.ViewCompositionEndEvent=N;class M{constructor(h){this.type=2,this._source=h}hasChanged(h){return this._source.hasChanged(h)}}e.ViewConfigurationChangedEvent=M;class w{constructor(h,m){this.type=3,this.selections=h,this.modelSelections=m}}e.ViewCursorStateChangedEvent=w;class S{constructor(h){this.type=4,h?(this.affectsMinimap=h.affectsMinimap,this.affectsOverviewRuler=h.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}e.ViewDecorationsChangedEvent=S;class C{constructor(){this.type=5}}e.ViewFlushedEvent=C;class d{constructor(h){this.type=6,this.isFocused=h}}e.ViewFocusChangedEvent=d;class g{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=g;class p{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=p;class c{constructor(h,m){this.type=9,this.fromLineNumber=h,this.toLineNumber=m}}e.ViewLinesChangedEvent=c;class o{constructor(h,m){this.type=10,this.fromLineNumber=h,this.toLineNumber=m}}e.ViewLinesDeletedEvent=o;class s{constructor(h,m){this.type=11,this.fromLineNumber=h,this.toLineNumber=m}}e.ViewLinesInsertedEvent=s;class a{constructor(h,m,_,f,v,y){this.type=12,this.source=h,this.range=m,this.selections=_,this.verticalType=f,this.revealHorizontal=v,this.scrollType=y}}e.ViewRevealRangeRequestEvent=a;class u{constructor(h){this.type=13,this.scrollWidth=h.scrollWidth,this.scrollLeft=h.scrollLeft,this.scrollHeight=h.scrollHeight,this.scrollTop=h.scrollTop,this.scrollWidthChanged=h.scrollWidthChanged,this.scrollLeftChanged=h.scrollLeftChanged,this.scrollHeightChanged=h.scrollHeightChanged,this.scrollTopChanged=h.scrollTopChanged}}e.ViewScrollChangedEvent=u;class r{constructor(){this.type=14}}e.ViewThemeChangedEvent=r;class i{constructor(h){this.type=15,this.ranges=h}}e.ViewTokensChangedEvent=i;class n{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=n;class t{constructor(){this.type=17}}e.ViewZonesChangedEvent=t}),define(Q[171],J([0,1,8]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class N{constructor(d,g,p,c){this.startColumn=d,this.endColumn=g,this.className=p,this.type=c}static _equals(d,g){return d.startColumn===g.startColumn&&d.endColumn===g.endColumn&&d.className===g.className&&d.type===g.type}static equalsArr(d,g){const p=d.length,c=g.length;if(p!==c)return!1;for(let o=0;o<p;o++)if(!N._equals(d[o],g[o]))return!1;return!0}static extractWrapped(d,g,p){if(d.length===0)return d;const c=g+1,o=p+1,s=p-g,a=[];let u=0;for(const r of d)r.endColumn<=c||r.startColumn>=o||(a[u++]=new N(Math.max(1,r.startColumn-c+1),Math.min(s+1,r.endColumn-c+1),r.className,r.type));return a}static filter(d,g,p,c){if(d.length===0)return[];let o=[],s=0;for(let a=0,u=d.length;a<u;a++){const r=d[a],i=r.range;if(!(i.endLineNumber<g||i.startLineNumber>g)&&!(i.isEmpty()&&(r.type===0||r.type===3))){const n=i.startLineNumber===g?i.startColumn:p,t=i.endLineNumber===g?i.endColumn:c;o[s++]=new N(n,t,r.inlineClassName,r.type)}}return o}static _typeCompare(d,g){const p=[2,0,1,3];return p[d]-p[g]}static compare(d,g){if(d.startColumn===g.startColumn){if(d.endColumn===g.endColumn){const p=N._typeCompare(d.type,g.type);return p===0?d.className<g.className?-1:d.className>g.className?1:0:p}return d.endColumn-g.endColumn}return d.startColumn-g.startColumn}}e.LineDecoration=N;class M{constructor(d,g,p,c){this.startOffset=d,this.endOffset=g,this.className=p,this.metadata=c}}e.DecorationSegment=M;class w{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(d){let g=0;for(let p=0,c=d.length;p<c;p++)g|=d[p];return g}consumeLowerThan(d,g,p){for(;this.count>0&&this.stopOffsets[0]<d;){let c=0;for(;c+1<this.count&&this.stopOffsets[c]===this.stopOffsets[c+1];)c++;p.push(new M(g,this.stopOffsets[c],this.classNames.join(" "),w._metadata(this.metadata))),g=this.stopOffsets[c]+1,this.stopOffsets.splice(0,c+1),this.classNames.splice(0,c+1),this.metadata.splice(0,c+1),this.count-=c+1}return this.count>0&&g<d&&(p.push(new M(g,d-1,this.classNames.join(" "),w._metadata(this.metadata))),g=d),g}insert(d,g,p){if(this.count===0||this.stopOffsets[this.count-1]<=d)this.stopOffsets.push(d),this.classNames.push(g),this.metadata.push(p);else for(let c=0;c<this.count;c++)if(this.stopOffsets[c]>=d){this.stopOffsets.splice(c,0,d),this.classNames.splice(c,0,g),this.metadata.splice(c,0,p);break}this.count++}}class S{static normalize(d,g){if(g.length===0)return[];let p=[];const c=new w;let o=0;for(let s=0,a=g.length;s<a;s++){const u=g[s];let r=u.startColumn,i=u.endColumn;const n=u.className,t=u.type===1?2:u.type===2?4:0;if(r>1){const m=d.charCodeAt(r-2);b.isHighSurrogate(m)&&r--}if(i>1){const m=d.charCodeAt(i-2);b.isHighSurrogate(m)&&i--}const l=r-1,h=i-2;o=c.consumeLowerThan(l,o,p),c.count===0&&(o=l),c.insert(h,n,t)}return c.consumeLowerThan(1073741824,o,p),p}}e.LineDecorationsNormalizer=S}),define(Q[386],J([0,1,8]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class N{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(C){this._hasPending=!0,this._inserts.push(C)}change(C){this._hasPending=!0,this._changes.push(C)}remove(C){this._hasPending=!0,this._removes.push(C)}mustCommit(){return this._hasPending}commit(C){if(!!this._hasPending){const d=this._inserts,g=this._changes,p=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],C._commitPendingChanges(d,g,p)}}}class M{constructor(C,d,g,p,c){this.id=C,this.afterLineNumber=d,this.ordinal=g,this.height=p,this.minWidth=c,this.prefixSum=0}}e.EditorWhitespace=M;class w{constructor(C,d,g,p){this._instanceId=b.singleLetterHash(++w.INSTANCE_COUNT),this._pendingChanges=new N,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=C,this._lineHeight=d,this._paddingTop=g,this._paddingBottom=p}static findInsertionIndex(C,d,g){let p=0,c=C.length;for(;p<c;){const o=p+c>>>1;d===C[o].afterLineNumber?g<C[o].ordinal?c=o:p=o+1:d<C[o].afterLineNumber?c=o:p=o+1}return p}setLineHeight(C){this._checkPendingChanges(),this._lineHeight=C}setPadding(C,d){this._paddingTop=C,this._paddingBottom=d}onFlushed(C){this._checkPendingChanges(),this._lineCount=C}changeWhitespace(C){let d=!1;try{C({insertWhitespace:(p,c,o,s)=>{d=!0,p=p|0,c=c|0,o=o|0,s=s|0;const a=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new M(a,p,c,o,s)),a},changeOneWhitespace:(p,c,o)=>{d=!0,c=c|0,o=o|0,this._pendingChanges.change({id:p,newAfterLineNumber:c,newHeight:o})},removeWhitespace:p=>{d=!0,this._pendingChanges.remove({id:p})}})}finally{this._pendingChanges.commit(this)}return d}_commitPendingChanges(C,d,g){if((C.length>0||g.length>0)&&(this._minWidth=-1),C.length+d.length+g.length<=1){for(const a of C)this._insertWhitespace(a);for(const a of d)this._changeOneWhitespace(a.id,a.newAfterLineNumber,a.newHeight);for(const a of g){const u=this._findWhitespaceIndex(a.id);u!==-1&&this._removeWhitespace(u)}return}const p=new Set;for(const a of g)p.add(a.id);const c=new Map;for(const a of d)c.set(a.id,a);const o=a=>{let u=[];for(const r of a)if(!p.has(r.id)){if(c.has(r.id)){const i=c.get(r.id);r.afterLineNumber=i.newAfterLineNumber,r.height=i.newHeight}u.push(r)}return u},s=o(this._arr).concat(o(C));s.sort((a,u)=>a.afterLineNumber===u.afterLineNumber?a.ordinal-u.ordinal:a.afterLineNumber-u.afterLineNumber),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(C){const d=w.findInsertionIndex(this._arr,C.afterLineNumber,C.ordinal);this._arr.splice(d,0,C),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,d-1)}_findWhitespaceIndex(C){const d=this._arr;for(let g=0,p=d.length;g<p;g++)if(d[g].id===C)return g;return-1}_changeOneWhitespace(C,d,g){const p=this._findWhitespaceIndex(C);if(p!==-1&&(this._arr[p].height!==g&&(this._arr[p].height=g,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,p-1)),this._arr[p].afterLineNumber!==d)){const c=this._arr[p];this._removeWhitespace(p),c.afterLineNumber=d,this._insertWhitespace(c)}}_removeWhitespace(C){this._arr.splice(C,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,C-1)}onLinesDeleted(C,d){this._checkPendingChanges(),C=C|0,d=d|0,this._lineCount-=d-C+1;for(let g=0,p=this._arr.length;g<p;g++){const c=this._arr[g].afterLineNumber;C<=c&&c<=d?this._arr[g].afterLineNumber=C-1:c>d&&(this._arr[g].afterLineNumber-=d-C+1)}}onLinesInserted(C,d){this._checkPendingChanges(),C=C|0,d=d|0,this._lineCount+=d-C+1;for(let g=0,p=this._arr.length;g<p;g++){const c=this._arr[g].afterLineNumber;C<=c&&(this._arr[g].afterLineNumber+=d-C+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(C){this._checkPendingChanges(),C=C|0;let d=Math.max(0,this._prefixSumValidIndex+1);d===0&&(this._arr[0].prefixSum=this._arr[0].height,d++);for(let g=d;g<=C;g++)this._arr[g].prefixSum=this._arr[g-1].prefixSum+this._arr[g].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,C),this._arr[C].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const C=this._lineHeight*this._lineCount,d=this.getWhitespacesTotalHeight();return C+d+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(C){this._checkPendingChanges(),C=C|0;const d=this._findLastWhitespaceBeforeLineNumber(C);return d===-1?0:this.getWhitespacesAccumulatedHeight(d)}_findLastWhitespaceBeforeLineNumber(C){C=C|0;const d=this._arr;let g=0,p=d.length-1;for(;g<=p;){const o=(p-g|0)/2|0,s=g+o|0;if(d[s].afterLineNumber<C){if(s+1>=d.length||d[s+1].afterLineNumber>=C)return s;g=s+1|0}else p=s-1|0}return-1}_findFirstWhitespaceAfterLineNumber(C){C=C|0;const g=this._findLastWhitespaceBeforeLineNumber(C)+1;return g<this._arr.length?g:-1}getFirstWhitespaceIndexAfterLineNumber(C){return this._checkPendingChanges(),C=C|0,this._findFirstWhitespaceAfterLineNumber(C)}getVerticalOffsetForLineNumber(C){this._checkPendingChanges(),C=C|0;let d;C>1?d=this._lineHeight*(C-1):d=0;const g=this.getWhitespaceAccumulatedHeightBeforeLineNumber(C);return d+g+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let C=0;for(let d=0,g=this._arr.length;d<g;d++)C=Math.max(C,this._arr[d].minWidth);this._minWidth=C}return this._minWidth}isAfterLines(C){this._checkPendingChanges();const d=this.getLinesTotalHeight();return C>d}isInTopPadding(C){return this._paddingTop===0?!1:(this._checkPendingChanges(),C<this._paddingTop)}isInBottomPadding(C){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const d=this.getLinesTotalHeight();return C>=d-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(C){if(this._checkPendingChanges(),C=C|0,C<0)return 1;const d=this._lineCount|0,g=this._lineHeight;let p=1,c=d;for(;p<c;){const o=(p+c)/2|0,s=this.getVerticalOffsetForLineNumber(o)|0;if(C>=s+g)p=o+1;else{if(C>=s)return o;c=o}}return p>d?d:p}getLinesViewportData(C,d){this._checkPendingChanges(),C=C|0,d=d|0;const g=this._lineHeight,p=this.getLineNumberAtOrAfterVerticalOffset(C)|0,c=this.getVerticalOffsetForLineNumber(p)|0;let o=this._lineCount|0,s=this.getFirstWhitespaceIndexAfterLineNumber(p)|0;const a=this.getWhitespacesCount()|0;let u,r;s===-1?(s=a,r=o+1,u=0):(r=this.getAfterLineNumberForWhitespaceIndex(s)|0,u=this.getHeightForWhitespaceIndex(s)|0);let i=c,n=i;const t=5e5;let l=0;c>=t&&(l=Math.floor(c/t)*t,l=Math.floor(l/g)*g,n-=l);const h=[],m=C+(d-C)/2;let _=-1;for(let L=p;L<=o;L++){if(_===-1){const I=i,k=i+g;(I<=m&&m<k||I>m)&&(_=L)}for(i+=g,h[L-p]=n,n+=g;r===L;)n+=u,i+=u,s++,s>=a?r=o+1:(r=this.getAfterLineNumberForWhitespaceIndex(s)|0,u=this.getHeightForWhitespaceIndex(s)|0);if(i>=d){o=L;break}}_===-1&&(_=o);const f=this.getVerticalOffsetForLineNumber(o)|0;let v=p,y=o;return v<y&&c<C&&v++,v<y&&f+g>d&&y--,{bigNumbersDelta:l,startLineNumber:p,endLineNumber:o,relativeVerticalOffset:h,centeredLineNumber:_,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:y}}getVerticalOffsetForWhitespaceIndex(C){this._checkPendingChanges(),C=C|0;const d=this.getAfterLineNumberForWhitespaceIndex(C);let g;d>=1?g=this._lineHeight*d:g=0;let p;return C>0?p=this.getWhitespacesAccumulatedHeight(C-1):p=0,g+p+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(C){this._checkPendingChanges(),C=C|0;let d=0,g=this.getWhitespacesCount()-1;if(g<0)return-1;const p=this.getVerticalOffsetForWhitespaceIndex(g),c=this.getHeightForWhitespaceIndex(g);if(C>=p+c)return-1;for(;d<g;){const o=Math.floor((d+g)/2),s=this.getVerticalOffsetForWhitespaceIndex(o),a=this.getHeightForWhitespaceIndex(o);if(C>=s+a)d=o+1;else{if(C>=s)return o;g=o}}return d}getWhitespaceAtVerticalOffset(C){this._checkPendingChanges(),C=C|0;const d=this.getWhitespaceIndexAtOrAfterVerticallOffset(C);if(d<0||d>=this.getWhitespacesCount())return null;const g=this.getVerticalOffsetForWhitespaceIndex(d);if(g>C)return null;const p=this.getHeightForWhitespaceIndex(d),c=this.getIdForWhitespaceIndex(d),o=this.getAfterLineNumberForWhitespaceIndex(d);return{id:c,afterLineNumber:o,verticalOffset:g,height:p}}getWhitespaceViewportData(C,d){this._checkPendingChanges(),C=C|0,d=d|0;const g=this.getWhitespaceIndexAtOrAfterVerticallOffset(C),p=this.getWhitespacesCount()-1;if(g<0)return[];let c=[];for(let o=g;o<=p;o++){const s=this.getVerticalOffsetForWhitespaceIndex(o),a=this.getHeightForWhitespaceIndex(o);if(s>=d)break;c.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:s,height:a})}return c}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(C){return this._checkPendingChanges(),C=C|0,this._arr[C].id}getAfterLineNumberForWhitespaceIndex(C){return this._checkPendingChanges(),C=C|0,this._arr[C].afterLineNumber}getHeightForWhitespaceIndex(C){return this._checkPendingChanges(),C=C|0,this._arr[C].height}}e.LinesLayout=w,w.INSTANCE_COUNT=0}),define(Q[129],J([0,1,8,93,171]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.CharacterMapping=e.RenderLineInput=e.LineRange=void 0;class w{constructor(h,m,_){this.endIndex=h,this.type=m,this.metadata=_}isWhitespace(){return!!(this.metadata&1)}}class S{constructor(h,m){this.startOffset=h,this.endOffset=m}equals(h){return this.startOffset===h.startOffset&&this.endOffset===h.endOffset}}e.LineRange=S;class C{constructor(h,m,_,f,v,y,L,I,k,E,T,O,A,B,F,D,R,W,x){this.useMonospaceOptimizations=h,this.canUseHalfwidthRightwardsArrow=m,this.lineContent=_,this.continuesWithWrappedLine=f,this.isBasicASCII=v,this.containsRTL=y,this.fauxIndentLength=L,this.lineTokens=I,this.lineDecorations=k.sort(M.LineDecoration.compare),this.tabSize=E,this.startVisibleColumn=T,this.spaceWidth=O,this.stopRenderingLineAfter=F,this.renderWhitespace=D==="all"?4:D==="boundary"?1:D==="selection"?2:D==="trailing"?3:0,this.renderControlCharacters=R,this.fontLigatures=W,this.selectionsOnLine=x&&x.sort((ee,se)=>ee.startOffset<se.startOffset?-1:1);const K=Math.abs(B-O),Y=Math.abs(A-O);K<Y?(this.renderSpaceWidth=B,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=A,this.renderSpaceCharCode=183)}sameSelection(h){if(this.selectionsOnLine===null)return h===null;if(h===null||h.length!==this.selectionsOnLine.length)return!1;for(let m=0;m<this.selectionsOnLine.length;m++)if(!this.selectionsOnLine[m].equals(h[m]))return!1;return!0}equals(h){return this.useMonospaceOptimizations===h.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===h.canUseHalfwidthRightwardsArrow&&this.lineContent===h.lineContent&&this.continuesWithWrappedLine===h.continuesWithWrappedLine&&this.isBasicASCII===h.isBasicASCII&&this.containsRTL===h.containsRTL&&this.fauxIndentLength===h.fauxIndentLength&&this.tabSize===h.tabSize&&this.startVisibleColumn===h.startVisibleColumn&&this.spaceWidth===h.spaceWidth&&this.renderSpaceWidth===h.renderSpaceWidth&&this.renderSpaceCharCode===h.renderSpaceCharCode&&this.stopRenderingLineAfter===h.stopRenderingLineAfter&&this.renderWhitespace===h.renderWhitespace&&this.renderControlCharacters===h.renderControlCharacters&&this.fontLigatures===h.fontLigatures&&M.LineDecoration.equalsArr(this.lineDecorations,h.lineDecorations)&&this.lineTokens.equals(h.lineTokens)&&this.sameSelection(h.selectionsOnLine)}}e.RenderLineInput=C;class d{constructor(h,m){this.length=h,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(h){return(h&4294901760)>>>16}static getCharIndex(h){return(h&65535)>>>0}setPartData(h,m,_,f){let v=(m<<16|_<<0)>>>0;this._data[h]=v,this._absoluteOffsets[h]=f+_}getAbsoluteOffsets(){return this._absoluteOffsets}charOffsetToPartData(h){return this.length===0?0:h<0?this._data[0]:h>=this.length?this._data[this.length-1]:this._data[h]}partDataToCharOffset(h,m,_){if(this.length===0)return 0;let f=(h<<16|_<<0)>>>0,v=0,y=this.length-1;for(;v+1<y;){let F=v+y>>>1,D=this._data[F];if(D===f)return F;D>f?y=F:v=F}if(v===y)return v;let L=this._data[v],I=this._data[y];if(L===f)return v;if(I===f)return y;let k=d.getPartIndex(L),E=d.getCharIndex(L),T=d.getPartIndex(I),O;k!==T?O=m:O=d.getCharIndex(I);let A=_-E,B=O-_;return A<=B?v:y}}e.CharacterMapping=d;class g{constructor(h,m,_){this.characterMapping=h,this.containsRTL=m,this.containsForeignElements=_}}e.RenderLineOutput=g;function p(l,h){if(l.lineContent.length===0){let m=0,_="<span><span></span></span>";if(l.lineDecorations.length>0){const f=[],v=[];for(let y=0,L=l.lineDecorations.length;y<L;y++){const I=l.lineDecorations[y];I.type===1&&(f.push(l.lineDecorations[y].className),m|=1),I.type===2&&(v.push(l.lineDecorations[y].className),m|=2)}if(m!==0){const y=f.length>0?`<span class="${f.join(" ")}"></span>`:"",L=v.length>0?`<span class="${v.join(" ")}"></span>`:"";_=`<span>${y}${L}</span>`}}return h.appendASCIIString(_),new g(new d(0,0),!1,m)}return t(a(l),h)}e.renderViewLine=p;class c{constructor(h,m,_,f){this.characterMapping=h,this.html=m,this.containsRTL=_,this.containsForeignElements=f}}e.RenderLineOutput2=c;function o(l){let h=N.createStringBuilder(1e4),m=p(l,h);return new c(m.characterMapping,h.build(),m.containsRTL,m.containsForeignElements)}e.renderViewLine2=o;class s{constructor(h,m,_,f,v,y,L,I,k,E,T,O,A,B,F){this.fontIsMonospace=h,this.canUseHalfwidthRightwardsArrow=m,this.lineContent=_,this.len=f,this.isOverflowing=v,this.parts=y,this.containsForeignElements=L,this.fauxIndentLength=I,this.tabSize=k,this.startVisibleColumn=E,this.containsRTL=T,this.spaceWidth=O,this.renderSpaceCharCode=A,this.renderWhitespace=B,this.renderControlCharacters=F}}function a(l){const h=l.lineContent;let m,_;l.stopRenderingLineAfter!==-1&&l.stopRenderingLineAfter<h.length?(m=!0,_=l.stopRenderingLineAfter):(m=!1,_=h.length);let f=u(l.lineTokens,l.fauxIndentLength,_);(l.renderWhitespace===4||l.renderWhitespace===1||l.renderWhitespace===2&&!!l.selectionsOnLine||l.renderWhitespace===3)&&(f=i(l,h,_,f));let v=0;if(l.lineDecorations.length>0){for(let y=0,L=l.lineDecorations.length;y<L;y++){const I=l.lineDecorations[y];I.type===3||I.type===1?v|=1:I.type===2&&(v|=2)}f=n(h,_,f,l.lineDecorations)}return l.containsRTL||(f=r(h,f,!l.isBasicASCII||l.fontLigatures)),new s(l.useMonospaceOptimizations,l.canUseHalfwidthRightwardsArrow,h,_,m,f,v,l.fauxIndentLength,l.tabSize,l.startVisibleColumn,l.containsRTL,l.spaceWidth,l.renderSpaceCharCode,l.renderWhitespace,l.renderControlCharacters)}function u(l,h,m){let _=[],f=0;h>0&&(_[f++]=new w(h,"",0));for(let v=0,y=l.getCount();v<y;v++){const L=l.getEndOffset(v);if(!(L<=h)){const I=l.getClassName(v);if(L>=m){_[f++]=new w(m,I,0);break}_[f++]=new w(L,I,0)}}return _}function r(l,h,m){let _=0,f=[],v=0;if(m)for(let y=0,L=h.length;y<L;y++){const I=h[y],k=I.endIndex;if(_+50<k){const E=I.type,T=I.metadata;let O=-1,A=_;for(let B=_;B<k;B++)l.charCodeAt(B)===32&&(O=B),O!==-1&&B-A>=50&&(f[v++]=new w(O+1,E,T),A=O+1,O=-1);A!==k&&(f[v++]=new w(k,E,T))}else f[v++]=I;_=k}else for(let y=0,L=h.length;y<L;y++){const I=h[y],k=I.endIndex;let E=k-_;if(E>50){const T=I.type,O=I.metadata,A=Math.ceil(E/50);for(let B=1;B<A;B++){let F=_+B*50;f[v++]=new w(F,T,O)}f[v++]=new w(k,T,O)}else f[v++]=I;_=k}return f}function i(l,h,m,_){const f=l.continuesWithWrappedLine,v=l.fauxIndentLength,y=l.tabSize,L=l.startVisibleColumn,I=l.useMonospaceOptimizations,k=l.selectionsOnLine,E=l.renderWhitespace===1,T=l.renderWhitespace===3,O=l.renderSpaceWidth!==l.spaceWidth;let A=[],B=0,F=0,D=_[F].type,R=_[F].endIndex;const W=_.length;let x=!1,K=b.firstNonWhitespaceIndex(h),Y;K===-1?(x=!0,K=m,Y=m):Y=b.lastNonWhitespaceIndex(h);let ee=!1,se=0,ne=k&&k[se],le=L%y;for(let z=v;z<m;z++){const P=h.charCodeAt(z);ne&&z>=ne.endOffset&&(se++,ne=k&&k[se]);let V;if(z<K||z>Y)V=!0;else if(P===9)V=!0;else if(P===32)if(E)if(ee)V=!0;else{const U=z+1<m?h.charCodeAt(z+1):0;V=U===32||U===9}else V=!0;else V=!1;if(V&&k&&(V=!!ne&&ne.startOffset<=z&&ne.endOffset>z),V&&T&&(V=x||z>Y),ee){if(!V||!I&&le>=y){if(O){const U=B>0?A[B-1].endIndex:v;for(let H=U+1;H<=z;H++)A[B++]=new w(H,"mtkw",1)}else A[B++]=new w(z,"mtkw",1);le=le%y}}else(z===R||V&&z>v)&&(A[B++]=new w(z,D,0),le=le%y);for(P===9?le=y:b.isFullWidthCharacter(P)?le+=2:le++,ee=V;z===R;)F++,F<W&&(D=_[F].type,R=_[F].endIndex)}let X=!1;if(ee)if(f&&E){let z=m>0?h.charCodeAt(m-1):0,P=m>1?h.charCodeAt(m-2):0;z===32&&P!==32&&P!==9||(X=!0)}else X=!0;if(X)if(O){const z=B>0?A[B-1].endIndex:v;for(let P=z+1;P<=m;P++)A[B++]=new w(P,"mtkw",1)}else A[B++]=new w(m,"mtkw",1);else A[B++]=new w(m,D,0);return A}function n(l,h,m,_){_.sort(M.LineDecoration.compare);const f=M.LineDecorationsNormalizer.normalize(l,_),v=f.length;let y=0,L=[],I=0,k=0;for(let T=0,O=m.length;T<O;T++){const A=m[T],B=A.endIndex,F=A.type,D=A.metadata;for(;y<v&&f[y].startOffset<B;){const R=f[y];if(R.startOffset>k&&(k=R.startOffset,L[I++]=new w(k,F,D)),R.endOffset+1<=B)k=R.endOffset+1,L[I++]=new w(k,F+" "+R.className,D|R.metadata),y++;else{k=B,L[I++]=new w(k,F+" "+R.className,D|R.metadata);break}}B>k&&(k=B,L[I++]=new w(k,F,D))}const E=m[m.length-1].endIndex;if(y<v&&f[y].startOffset===E){let T=[],O=0;for(;y<v&&f[y].startOffset===E;)T.push(f[y].className),O|=f[y].metadata,y++;L[I++]=new w(k,T.join(" "),O)}return L}function t(l,h){const m=l.fontIsMonospace,_=l.canUseHalfwidthRightwardsArrow,f=l.containsForeignElements,v=l.lineContent,y=l.len,L=l.isOverflowing,I=l.parts,k=l.fauxIndentLength,E=l.tabSize,T=l.startVisibleColumn,O=l.containsRTL,A=l.spaceWidth,B=l.renderSpaceCharCode,F=l.renderWhitespace,D=l.renderControlCharacters,R=new d(y+1,I.length);let W=0,x=T,K=0,Y=0,ee=0,se=0;O?h.appendASCIIString('<span dir="ltr">'):h.appendASCIIString("<span>");for(let ne=0,le=I.length;ne<le;ne++){se+=ee;const X=I[ne],z=X.endIndex,P=X.type,V=F!==0&&X.isWhitespace(),U=V&&!m&&(P==="mtkw"||!f),H=W===z&&X.metadata===4;if(K=0,h.appendASCIIString('<span class="'),h.appendASCIIString(U?"mtkz":P),h.appendASCII(34),V){let $=0;{let ie=W,oe=x;for(;ie<z;ie++){const G=(v.charCodeAt(ie)===9?E-oe%E:1)|0;$+=G,ie>=k&&(oe+=G)}}for(U&&(h.appendASCIIString(' style="width:'),h.appendASCIIString(String(A*$)),h.appendASCIIString('px"')),h.appendASCII(62);W<z;W++){R.setPartData(W,ne-Y,K,se),Y=0;const ie=v.charCodeAt(W);let oe;if(ie===9){oe=E-x%E|0,!_||oe>1?h.write1(8594):h.write1(65515);for(let ae=2;ae<=oe;ae++)h.write1(160)}else oe=1,h.write1(B);K+=oe,W>=k&&(x+=oe)}ee=$}else{let $=0;for(h.appendASCII(62);W<z;W++){R.setPartData(W,ne-Y,K,se),Y=0;const ie=v.charCodeAt(W);let oe=1,ae=1;switch(ie){case 9:oe=E-x%E,ae=oe;for(let G=1;G<=oe;G++)h.write1(160);break;case 32:h.write1(160);break;case 60:h.appendASCIIString("&lt;");break;case 62:h.appendASCIIString("&gt;");break;case 38:h.appendASCIIString("&amp;");break;case 0:h.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:h.write1(65533);break;default:b.isFullWidthCharacter(ie)&&ae++,D&&ie<32?h.write1(9216+ie):h.write1(ie)}K+=oe,$+=oe,W>=k&&(x+=ae)}ee=$}H?Y++:Y=0,h.appendASCIIString("</span>")}return R.setPartData(y,I.length-1,K,se),L&&h.appendASCIIString("<span>&hellip;</span>"),h.appendASCIIString("</span>"),new g(R,O,f)}}),define(Q[387],J([0,1,3]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class N{constructor(w,S,C,d){this.selections=w,this.startLineNumber=S.startLineNumber|0,this.endLineNumber=S.endLineNumber|0,this.relativeVerticalOffset=S.relativeVerticalOffset,this.bigNumbersDelta=S.bigNumbersDelta|0,this.whitespaceViewportData=C,this._model=d,this.visibleRange=new b.Range(S.startLineNumber,this._model.getLineMinColumn(S.startLineNumber),S.endLineNumber,this._model.getLineMaxColumn(S.endLineNumber))}getViewLineRenderingData(w){return this._model.getViewLineRenderingData(this.visibleRange,w)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=N}),define(Q[222],J([0,1,122]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumComputer=e.PrefixSumIndexOfResult=void 0;class N{constructor(S,C){this.index=S,this.remainder=C}}e.PrefixSumIndexOfResult=N;class M{constructor(S){this.values=S,this.prefixSum=new Uint32Array(S.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(S,C){S=b.toUint32(S);const d=this.values,g=this.prefixSum,p=C.length;return p===0?!1:(this.values=new Uint32Array(d.length+p),this.values.set(d.subarray(0,S),0),this.values.set(d.subarray(S),S+p),this.values.set(C,S),S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(g.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(S,C){return S=b.toUint32(S),C=b.toUint32(C),this.values[S]===C?!1:(this.values[S]=C,S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),!0)}removeValues(S,C){S=b.toUint32(S),C=b.toUint32(C);const d=this.values,g=this.prefixSum;if(S>=d.length)return!1;let p=d.length-S;return C>=p&&(C=p),C===0?!1:(this.values=new Uint32Array(d.length-C),this.values.set(d.subarray(0,S),0),this.values.set(d.subarray(S+C),S),this.prefixSum=new Uint32Array(this.values.length),S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(g.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return this.values.length===0?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(S){return S<0?0:(S=b.toUint32(S),this._getAccumulatedValue(S))}_getAccumulatedValue(S){if(S<=this.prefixSumValidIndex[0])return this.prefixSum[S];let C=this.prefixSumValidIndex[0]+1;C===0&&(this.prefixSum[0]=this.values[0],C++),S>=this.values.length&&(S=this.values.length-1);for(let d=C;d<=S;d++)this.prefixSum[d]=this.prefixSum[d-1]+this.values[d];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],S),this.prefixSum[S]}getIndexOf(S){S=Math.floor(S),this.getTotalValue();let C=0,d=this.values.length-1,g=0,p=0,c=0;for(;C<=d;)if(g=C+(d-C)/2|0,p=this.prefixSum[g],c=p-this.values[g],S<c)d=g-1;else if(S>=p)C=g+1;else break;return new N(g,S-c)}}e.PrefixSumComputer=M}),define(Q[388],J([0,1,8,14,222]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class w{constructor(C,d,g,p){this._uri=C,this._lines=d,this._eol=g,this._versionId=p,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(C){C.eol&&C.eol!==this._eol&&(this._eol=C.eol,this._lineStarts=null);const d=C.changes;for(const g of d)this._acceptDeleteRange(g.range),this._acceptInsertText(new N.Position(g.range.startLineNumber,g.range.startColumn),g.text);this._versionId=C.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const C=this._eol.length,d=this._lines.length,g=new Uint32Array(d);for(let p=0;p<d;p++)g[p]=this._lines[p].length+C;this._lineStarts=new M.PrefixSumComputer(g)}}_setLineText(C,d){this._lines[C]=d,this._lineStarts&&this._lineStarts.changeValue(C,this._lines[C].length+this._eol.length)}_acceptDeleteRange(C){if(C.startLineNumber===C.endLineNumber){if(C.startColumn===C.endColumn)return;this._setLineText(C.startLineNumber-1,this._lines[C.startLineNumber-1].substring(0,C.startColumn-1)+this._lines[C.startLineNumber-1].substring(C.endColumn-1));return}this._setLineText(C.startLineNumber-1,this._lines[C.startLineNumber-1].substring(0,C.startColumn-1)+this._lines[C.endLineNumber-1].substring(C.endColumn-1)),this._lines.splice(C.startLineNumber,C.endLineNumber-C.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(C.startLineNumber,C.endLineNumber-C.startLineNumber)}_acceptInsertText(C,d){if(d.length!==0){let g=b.splitLines(d);if(g.length===1){this._setLineText(C.lineNumber-1,this._lines[C.lineNumber-1].substring(0,C.column-1)+g[0]+this._lines[C.lineNumber-1].substring(C.column-1));return}g[g.length-1]+=this._lines[C.lineNumber-1].substring(C.column-1),this._setLineText(C.lineNumber-1,this._lines[C.lineNumber-1].substring(0,C.column-1)+g[0]);let p=new Uint32Array(g.length-1);for(let c=1;c<g.length;c++)this._lines.splice(C.lineNumber+c-1,0,g[c]),p[c-1]=g[c].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(C.lineNumber,p)}}}e.MirrorTextModel=w}),define(Q[389],J([0,1,19,153,17,24,14,3,368,388,128,375,378,220,20,81]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=void 0;class r extends g.MirrorTextModel{get uri(){return this._uri}get version(){return this._versionId}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(l){return this._lines[l-1]}getWordAtPosition(l,h){let m=p.getWordAtText(l.column,p.ensureValidWordDefinition(h),this._lines[l.lineNumber-1],0);return m?new C.Range(l.lineNumber,m.startColumn,l.lineNumber,m.endColumn):null}words(l){const h=this._lines,m=this._wordenize.bind(this);let _=0,f="",v=0,y=[];return{*[Symbol.iterator](){for(;;)if(v<y.length){const L=f.substring(y[v].start,y[v].end);v+=1,yield L}else if(_<h.length)f=h[_],y=m(f,l),v=0,_+=1;else break}}}getLineWords(l,h){let m=this._lines[l-1],_=this._wordenize(m,h),f=[];for(const v of _)f.push({word:m.substring(v.start,v.end),startColumn:v.start+1,endColumn:v.end+1});return f}_wordenize(l,h){const m=[];let _;for(h.lastIndex=0;(_=h.exec(l))&&_[0].length!==0;)m.push({start:_.index,end:_.index+_[0].length});return m}getValueInRange(l){if(l=this._validateRange(l),l.startLineNumber===l.endLineNumber)return this._lines[l.startLineNumber-1].substring(l.startColumn-1,l.endColumn-1);let h=this._eol,m=l.startLineNumber-1,_=l.endLineNumber-1,f=[];f.push(this._lines[m].substring(l.startColumn-1));for(let v=m+1;v<_;v++)f.push(this._lines[v]);return f.push(this._lines[_].substring(0,l.endColumn-1)),f.join(h)}offsetAt(l){return l=this._validatePosition(l),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(l.lineNumber-2)+(l.column-1)}positionAt(l){l=Math.floor(l),l=Math.max(0,l),this._ensureLineStarts();let h=this._lineStarts.getIndexOf(l),m=this._lines[h.index].length;return{lineNumber:1+h.index,column:1+Math.min(h.remainder,m)}}_validateRange(l){const h=this._validatePosition({lineNumber:l.startLineNumber,column:l.startColumn}),m=this._validatePosition({lineNumber:l.endLineNumber,column:l.endColumn});return h.lineNumber!==l.startLineNumber||h.column!==l.startColumn||m.lineNumber!==l.endLineNumber||m.column!==l.endColumn?{startLineNumber:h.lineNumber,startColumn:h.column,endLineNumber:m.lineNumber,endColumn:m.column}:l}_validatePosition(l){if(!S.Position.isIPosition(l))throw new Error("bad position");let{lineNumber:h,column:m}=l,_=!1;if(h<1)h=1,m=1,_=!0;else if(h>this._lines.length)h=this._lines.length,m=this._lines[h-1].length+1,_=!0;else{let f=this._lines[h-1].length+1;m<1?(m=1,_=!0):m>f&&(m=f,_=!0)}return _?{lineNumber:h,column:m}:l}}class i{constructor(l,h){this._host=l,this._models=Object.create(null),this._foreignModuleFactory=h,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(l){return this._models[l]}_getModels(){let l=[];return Object.keys(this._models).forEach(h=>l.push(this._models[h])),l}acceptNewModel(l){this._models[l.url]=new r(w.URI.parse(l.url),l.lines,l.EOL,l.versionId)}acceptModelChanged(l,h){!this._models[l]||this._models[l].onEvents(h)}acceptRemovedModel(l){!this._models[l]||delete this._models[l]}computeDiff(l,h,m,_){return Ie(this,void 0,void 0,function*(){const f=this._getModel(l),v=this._getModel(h);if(!f||!v)return null;const y=f.getLinesContent(),L=v.getLinesContent(),k=new d.DiffComputer(y,L,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:m,shouldMakePrettyDiff:!0,maxComputationTime:_}).computeDiff(),E=k.changes.length>0?!1:this._modelsAreIdentical(f,v);return{quitEarly:k.quitEarly,identical:E,changes:k.changes}})}_modelsAreIdentical(l,h){const m=l.getLineCount(),_=h.getLineCount();if(m!==_)return!1;for(let f=1;f<=m;f++){const v=l.getLineContent(f),y=h.getLineContent(f);if(v!==y)return!1}return!0}computeMoreMinimalEdits(l,h){return Ie(this,void 0,void 0,function*(){const m=this._getModel(l);if(!m)return h;const _=[];let f;h=b.mergeSort(h,(v,y)=>{if(v.range&&y.range)return C.Range.compareRangesUsingStarts(v.range,y.range);let L=v.range?0:1,I=y.range?0:1;return L-I});for(let{range:v,text:y,eol:L}of h)if(typeof L=="number"&&(f=L),!(C.Range.isEmpty(v)&&!y)){const I=m.getValueInRange(v);if(y=y.replace(/\r\n|\n|\r/g,m.eol),I!==y){if(Math.max(y.length,I.length)>i._diffLimit){_.push({range:v,text:y});continue}const k=N.stringDiff(I,y,!1),E=m.offsetAt(C.Range.lift(v).getStartPosition());for(const T of k){const O=m.positionAt(E+T.originalStart),A=m.positionAt(E+T.originalStart+T.originalLength),B={text:y.substr(T.modifiedStart,T.modifiedLength),range:{startLineNumber:O.lineNumber,startColumn:O.column,endLineNumber:A.lineNumber,endColumn:A.column}};m.getValueInRange(B.range)!==B.text&&_.push(B)}}}return typeof f=="number"&&_.push({eol:f,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),_})}computeLinks(l){return Ie(this,void 0,void 0,function*(){let h=this._getModel(l);return h?c.computeLinks(h):null})}textualSuggest(l,h,m,_){return Ie(this,void 0,void 0,function*(){const f=new u.StopWatch(!0),v=new RegExp(m,_),y=new Set;e:for(let L of l){const I=this._getModel(L);if(!!I){for(let k of I.words(v))if(!(k===h||!isNaN(Number(k)))&&(y.add(k),y.size>i._suggestionsLimit))break e}}return{words:Array.from(y),duration:f.elapsed()}})}computeWordRanges(l,h,m,_){return Ie(this,void 0,void 0,function*(){let f=this._getModel(l);if(!f)return Object.create(null);const v=new RegExp(m,_),y=Object.create(null);for(let L=h.startLineNumber;L<h.endLineNumber;L++){let I=f.getLineWords(L,v);for(const k of I)if(!!isNaN(Number(k.word))){let E=y[k.word];E||(E=[],y[k.word]=E),E.push({startLineNumber:L,startColumn:k.startColumn,endLineNumber:L,endColumn:k.endColumn})}}return y})}navigateValueSet(l,h,m,_,f){return Ie(this,void 0,void 0,function*(){let v=this._getModel(l);if(!v)return null;let y=new RegExp(_,f);h.startColumn===h.endColumn&&(h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.endColumn+1});let L=v.getValueInRange(h),I=v.getWordAtPosition({lineNumber:h.startLineNumber,column:h.startColumn},y);if(!I)return null;let k=v.getValueInRange(I);return o.BasicInplaceReplace.INSTANCE.navigateValueSet(h,L,I,k,m)})}loadForeignModule(l,h,m){const _=(y,L)=>this._host.fhr(y,L);let v={host:a.createProxyObject(m,_),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(v,h),Promise.resolve(a.getAllMethodNames(this._foreignModule))):new Promise((y,L)=>{q([l],I=>{this._foreignModule=I.create(v,h),y(a.getAllMethodNames(this._foreignModule))},L)})}fmr(l,h){if(!this._foreignModule||typeof this._foreignModule[l]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+l));try{return Promise.resolve(this._foreignModule[l].apply(this._foreignModule,h))}catch(m){return Promise.reject(m)}}}e.EditorSimpleWorker=i,i._diffLimit=1e5,i._suggestionsLimit=1e4;function n(t){return new i(t,null)}e.create=n,typeof importScripts=="function"&&(M.globals.monaco=s.createMonacoBaseAPI())}),define(Q[111],J([0,1,2]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class N extends b.Disposable{constructor(){super();this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(w){return!1}onCompositionEnd(w){return!1}onConfigurationChanged(w){return!1}onCursorStateChanged(w){return!1}onDecorationsChanged(w){return!1}onFlushed(w){return!1}onFocusChanged(w){return!1}onLanguageConfigurationChanged(w){return!1}onLineMappingChanged(w){return!1}onLinesChanged(w){return!1}onLinesDeleted(w){return!1}onLinesInserted(w){return!1}onRevealRangeRequest(w){return!1}onScrollChanged(w){return!1}onThemeChanged(w){return!1}onTokensChanged(w){return!1}onTokensColorsChanged(w){return!1}onZonesChanged(w){return!1}handleEvents(w){let S=!1;for(let C=0,d=w.length;C<d;C++){let g=w[C];switch(g.type){case 0:this.onCompositionStart(g)&&(S=!0);break;case 1:this.onCompositionEnd(g)&&(S=!0);break;case 2:this.onConfigurationChanged(g)&&(S=!0);break;case 3:this.onCursorStateChanged(g)&&(S=!0);break;case 4:this.onDecorationsChanged(g)&&(S=!0);break;case 5:this.onFlushed(g)&&(S=!0);break;case 6:this.onFocusChanged(g)&&(S=!0);break;case 7:this.onLanguageConfigurationChanged(g)&&(S=!0);break;case 8:this.onLineMappingChanged(g)&&(S=!0);break;case 9:this.onLinesChanged(g)&&(S=!0);break;case 10:this.onLinesDeleted(g)&&(S=!0);break;case 11:this.onLinesInserted(g)&&(S=!0);break;case 12:this.onRevealRangeRequest(g)&&(S=!0);break;case 13:this.onScrollChanged(g)&&(S=!0);break;case 15:this.onTokensChanged(g)&&(S=!0);break;case 14:this.onThemeChanged(g)&&(S=!0);break;case 16:this.onTokensColorsChanged(g)&&(S=!0);break;case 17:this.onZonesChanged(g)&&(S=!0);break;default:console.info("View received unknown event: "),console.info(g)}}S&&(this._shouldRender=!0)}}e.ViewEventHandler=N}),define(Q[94],J([0,1,111]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class N extends b.ViewEventHandler{}e.DynamicViewOverlay=N}),define(Q[45],J([0,1,30,111]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.ViewPart=void 0;class M extends N.ViewEventHandler{constructor(C){super();this._context=C,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=M;class w{static write(C,d){C instanceof b.FastDomNode,C.setAttribute("data-mprt",String(d))}static read(C){const d=C.getAttribute("data-mprt");return d===null?0:parseInt(d,10)}static collect(C,d){let g=[],p=0;for(;C&&C!==document.body&&C!==d;)C.nodeType===C.ELEMENT_NODE&&(g[p++]=this.read(C)),C=C.parentElement;const c=new Uint8Array(p);for(let o=0;o<p;o++)c[o]=g[p-o-1];return c}}e.PartFingerprints=w}),define(Q[390],J([0,1,7,30,45]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class w{constructor(p,c){this.top=p,this.left=c}}class S extends M.ViewPart{constructor(p,c){super(p);this._viewDomNode=c,this._widgets={},this.domNode=N.createFastDomNode(document.createElement("div")),M.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=N.createFastDomNode(document.createElement("div")),M.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(p){const c=Object.keys(this._widgets);for(const o of c)this._widgets[o].onConfigurationChanged(p);return!0}onDecorationsChanged(p){return!0}onFlushed(p){return!0}onLineMappingChanged(p){const c=Object.keys(this._widgets);for(const o of c)this._widgets[o].onLineMappingChanged(p);return!0}onLinesChanged(p){return!0}onLinesDeleted(p){return!0}onLinesInserted(p){return!0}onScrollChanged(p){return!0}onZonesChanged(p){return!0}addWidget(p){const c=new C(this._context,this._viewDomNode,p);this._widgets[c.id]=c,c.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(c.domNode):this.domNode.appendChild(c.domNode),this.setShouldRender()}setWidgetPosition(p,c,o){this._widgets[p.getId()].setPosition(c,o),this.setShouldRender()}removeWidget(p){const c=p.getId();if(this._widgets.hasOwnProperty(c)){const o=this._widgets[c];delete this._widgets[c];const s=o.domNode.domNode;s.parentNode.removeChild(s),s.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(p){return this._widgets.hasOwnProperty(p)?this._widgets[p].suppressMouseDown:!1}onBeforeRender(p){const c=Object.keys(this._widgets);for(const o of c)this._widgets[o].onBeforeRender(p)}prepareRender(p){const c=Object.keys(this._widgets);for(const o of c)this._widgets[o].prepareRender(p)}render(p){const c=Object.keys(this._widgets);for(const o of c)this._widgets[o].render(p)}}e.ViewContentWidgets=S;class C{constructor(p,c,o){this._context=p,this._viewDomNode=c,this._actual=o,this.domNode=N.createFastDomNode(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const s=this._context.configuration.options,a=s.get(124);this._fixedOverflowWidgets=s.get(32),this._contentWidth=a.contentWidth,this._contentLeft=a.contentLeft,this._lineHeight=s.get(53),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(p){const c=this._context.configuration.options;if(this._lineHeight=c.get(53),p.hasChanged(124)){const o=c.get(124);this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(p){this._setPosition(this._range)}_setPosition(p){if(this._range=p,this._viewRange=null,this._range){const c=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(c.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(c.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(c))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(p,c){this._setPosition(p),this._preference=c,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(p,c,o,s,a){const u=p.top,r=u,i=c.top+this._lineHeight,n=a.viewportHeight-i,t=u-s,l=r>=s,h=i,m=n>=s;let _=p.left,f=c.left;return _+o>a.scrollLeft+a.viewportWidth&&(_=a.scrollLeft+a.viewportWidth-o),f+o>a.scrollLeft+a.viewportWidth&&(f=a.scrollLeft+a.viewportWidth-o),_<a.scrollLeft&&(_=a.scrollLeft),f<a.scrollLeft&&(f=a.scrollLeft),{fitsAbove:l,aboveTop:t,aboveLeft:_,fitsBelow:m,belowTop:h,belowLeft:f}}_layoutHorizontalSegmentInPage(p,c,o,s){const a=Math.max(0,c.left-s),u=Math.min(c.left+c.width+s,p.width);let r=c.left+o-b.StandardWindow.scrollX;if(r+s>u){const i=r-(u-s);r-=i,o-=i}if(r<a){const i=r-a;r-=i,o-=i}return[o,r]}_layoutBoxInPage(p,c,o,s,a){const u=p.top-s,r=c.top+this._lineHeight,i=b.getDomNodePagePosition(this._viewDomNode.domNode),n=i.top+u-b.StandardWindow.scrollY,t=i.top+r-b.StandardWindow.scrollY,l=b.getClientArea(document.body),[h,m]=this._layoutHorizontalSegmentInPage(l,i,p.left-a.scrollLeft+this._contentLeft,o),[_,f]=this._layoutHorizontalSegmentInPage(l,i,c.left-a.scrollLeft+this._contentLeft,o),v=22,y=22,L=n>=v,I=t+s<=l.height-y;return this._fixedOverflowWidgets?{fitsAbove:L,aboveTop:Math.max(n,v),aboveLeft:m,fitsBelow:I,belowTop:t,belowLeft:f}:{fitsAbove:L,aboveTop:u,aboveLeft:h,fitsBelow:I,belowTop:r,belowLeft:_}}_prepareRenderWidgetAtExactPositionOverflowing(p){return new w(p.top,p.left+this._contentLeft)}_getTopAndBottomLeft(p){if(!this._viewRange)return[null,null];const c=p.linesVisibleRangesForRange(this._viewRange,!1);if(!c||c.length===0)return[null,null];let o=c[0],s=c[0];for(const l of c)l.lineNumber<o.lineNumber&&(o=l),l.lineNumber>s.lineNumber&&(s=l);let a=1073741824;for(const l of o.ranges)l.left<a&&(a=l.left);let u=1073741824;for(const l of s.ranges)l.left<u&&(u=l.left);const r=p.getVerticalOffsetForLineNumber(o.lineNumber)-p.scrollTop,i=new w(r,a),n=p.getVerticalOffsetForLineNumber(s.lineNumber)-p.scrollTop,t=new w(n,u);return[i,t]}_prepareRenderWidget(p){const[c,o]=this._getTopAndBottomLeft(p);if(!c||!o)return null;if(this._cachedDomNodeClientWidth===-1||this._cachedDomNodeClientHeight===-1){let a=null;if(typeof this._actual.beforeRender=="function"&&(a=d(this._actual.beforeRender,this._actual)),a)this._cachedDomNodeClientWidth=a.width,this._cachedDomNodeClientHeight=a.height;else{const u=this.domNode.domNode;this._cachedDomNodeClientWidth=u.clientWidth,this._cachedDomNodeClientHeight=u.clientHeight}}let s;if(this.allowEditorOverflow?s=this._layoutBoxInPage(c,o,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,p):s=this._layoutBoxInViewport(c,o,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,p),this._preference)for(let a=1;a<=2;a++)for(const u of this._preference)if(u===1){if(!s)return null;if(a===2||s.fitsAbove)return{coordinate:new w(s.aboveTop,s.aboveLeft),position:1}}else if(u===2){if(!s)return null;if(a===2||s.fitsBelow)return{coordinate:new w(s.belowTop,s.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(c),position:0}:{coordinate:c,position:0};return null}onBeforeRender(p){!this._viewRange||!this._preference||this._viewRange.endLineNumber<p.startLineNumber||this._viewRange.startLineNumber>p.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(p){this._renderData=this._prepareRenderWidget(p)}render(p){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&d(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+p.scrollTop-p.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&d(this._actual.afterRender,this._actual,this._renderData.position)}}function d(g,p,...c){try{return g.call(p,...c)}catch(o){return null}}}),define(Q[391],J([0,1,94,3,110,319]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class w extends b.DynamicViewOverlay{constructor(C){super();this._context=C;const d=this._context.configuration.options;this._lineHeight=d.get(53),this._typicalHalfwidthCharacterWidth=d.get(38).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(C){const d=this._context.configuration.options;return this._lineHeight=d.get(53),this._typicalHalfwidthCharacterWidth=d.get(38).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(C){return!0}onFlushed(C){return!0}onLinesChanged(C){return!0}onLinesDeleted(C){return!0}onLinesInserted(C){return!0}onScrollChanged(C){return C.scrollTopChanged||C.scrollWidthChanged}onZonesChanged(C){return!0}prepareRender(C){const d=C.getDecorationsInViewport();let g=[],p=0;for(let a=0,u=d.length;a<u;a++){const r=d[a];r.options.className&&(g[p++]=r)}g=g.sort((a,u)=>{if(a.options.zIndex<u.options.zIndex)return-1;if(a.options.zIndex>u.options.zIndex)return 1;const r=a.options.className,i=u.options.className;return r<i?-1:r>i?1:N.Range.compareRangesUsingStarts(a.range,u.range)});const c=C.visibleRange.startLineNumber,o=C.visibleRange.endLineNumber,s=[];for(let a=c;a<=o;a++){const u=a-c;s[u]=""}this._renderWholeLineDecorations(C,g,s),this._renderNormalDecorations(C,g,s),this._renderResult=s}_renderWholeLineDecorations(C,d,g){const p=String(this._lineHeight),c=C.visibleRange.startLineNumber,o=C.visibleRange.endLineNumber;for(let s=0,a=d.length;s<a;s++){const u=d[s];if(!!u.options.isWholeLine){const r='<div class="cdr '+u.options.className+'" style="left:0;width:100%;height:'+p+'px;"></div>',i=Math.max(u.range.startLineNumber,c),n=Math.min(u.range.endLineNumber,o);for(let t=i;t<=n;t++){const l=t-c;g[l]+=r}}}}_renderNormalDecorations(C,d,g){const p=String(this._lineHeight),c=C.visibleRange.startLineNumber;let o=null,s=!1,a=null;for(let u=0,r=d.length;u<r;u++){const i=d[u];if(!i.options.isWholeLine){const n=i.options.className,t=Boolean(i.options.showIfCollapsed);let l=i.range;if(t&&l.endColumn===1&&l.endLineNumber!==l.startLineNumber&&(l=new N.Range(l.startLineNumber,l.startColumn,l.endLineNumber-1,this._context.model.getLineMaxColumn(l.endLineNumber-1))),o===n&&s===t&&N.Range.areIntersectingOrTouching(a,l)){a=N.Range.plusRange(a,l);continue}o!==null&&this._renderNormalDecoration(C,a,o,s,p,c,g),o=n,s=t,a=l}}o!==null&&this._renderNormalDecoration(C,a,o,s,p,c,g)}_renderNormalDecoration(C,d,g,p,c,o,s){const a=C.linesVisibleRangesForRange(d,g==="findMatch");if(!!a)for(let u=0,r=a.length;u<r;u++){const i=a[u];if(!i.outsideRenderedLine){const n=i.lineNumber-o;if(p&&i.ranges.length===1){const t=i.ranges[0];t.width===0&&(i.ranges[0]=new M.HorizontalRange(t.left,this._typicalHalfwidthCharacterWidth))}for(let t=0,l=i.ranges.length;t<l;t++){const h=i.ranges[t],m='<div class="cdr '+g+'" style="left:'+String(h.left)+"px;width:"+String(h.width)+"px;height:"+c+'px;"></div>';s[n]+=m}}}}render(C,d){if(!this._renderResult)return"";const g=d-C;return g<0||g>=this._renderResult.length?"":this._renderResult[g]}}e.DecorationsOverlay=w}),define(Q[172],J([0,1,94,320]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginOverlay=e.DedupOverlay=e.DecorationToRender=void 0;class N{constructor(C,d,g){this.startLineNumber=+C,this.endLineNumber=+d,this.className=String(g)}}e.DecorationToRender=N;class M extends b.DynamicViewOverlay{_render(C,d,g){const p=[];for(let s=C;s<=d;s++){const a=s-C;p[a]=[]}if(g.length===0)return p;g.sort((s,a)=>s.className===a.className?s.startLineNumber===a.startLineNumber?s.endLineNumber-a.endLineNumber:s.startLineNumber-a.startLineNumber:s.className<a.className?-1:1);let c=null,o=0;for(let s=0,a=g.length;s<a;s++){const u=g[s],r=u.className;let i=Math.max(u.startLineNumber,C)-C;const n=Math.min(u.endLineNumber,d)-C;c===r?(i=Math.max(o+1,i),o=Math.max(o,n)):(c=r,o=n);for(let t=i;t<=o;t++)p[t].push(c)}return p}}e.DedupOverlay=M;class w extends M{constructor(C){super();this._context=C;const d=this._context.configuration.options,g=d.get(124);this._lineHeight=d.get(53),this._glyphMargin=d.get(44),this._glyphMarginLeft=g.glyphMarginLeft,this._glyphMarginWidth=g.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(C){const d=this._context.configuration.options,g=d.get(124);return this._lineHeight=d.get(53),this._glyphMargin=d.get(44),this._glyphMarginLeft=g.glyphMarginLeft,this._glyphMarginWidth=g.glyphMarginWidth,!0}onDecorationsChanged(C){return!0}onFlushed(C){return!0}onLinesChanged(C){return!0}onLinesDeleted(C){return!0}onLinesInserted(C){return!0}onScrollChanged(C){return C.scrollTopChanged}onZonesChanged(C){return!0}_getDecorations(C){const d=C.getDecorationsInViewport();let g=[],p=0;for(let c=0,o=d.length;c<o;c++){const s=d[c],a=s.options.glyphMarginClassName;a&&(g[p++]=new N(s.range.startLineNumber,s.range.endLineNumber,a))}return g}prepareRender(C){if(!this._glyphMargin){this._renderResult=null;return}const d=C.visibleRange.startLineNumber,g=C.visibleRange.endLineNumber,p=this._render(d,g,this._getDecorations(C)),c=this._lineHeight.toString(),o=this._glyphMarginLeft.toString(),s=this._glyphMarginWidth.toString(),a='" style="left:'+o+"px;width:"+s+"px;height:"+c+'px;"></div>',u=[];for(let r=d;r<=g;r++){const i=r-d,n=p[i];n.length===0?u[i]="":u[i]='<div class="cgmr codicon '+n.join(" ")+a}this._renderResult=u}render(C,d){if(!this._renderResult)return"";const g=d-C;return g<0||g>=this._renderResult.length?"":this._renderResult[g]}}e.GlyphMarginOverlay=w}),define(Q[392],J([0,1,172,324]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class N extends b.DedupOverlay{constructor(w){super();this._context=w;const C=this._context.configuration.options.get(124);this._decorationsLeft=C.decorationsLeft,this._decorationsWidth=C.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(w){const C=this._context.configuration.options.get(124);return this._decorationsLeft=C.decorationsLeft,this._decorationsWidth=C.decorationsWidth,!0}onDecorationsChanged(w){return!0}onFlushed(w){return!0}onLinesChanged(w){return!0}onLinesDeleted(w){return!0}onLinesInserted(w){return!0}onScrollChanged(w){return w.scrollTopChanged}onZonesChanged(w){return!0}_getDecorations(w){const S=w.getDecorationsInViewport();let C=[],d=0;for(let g=0,p=S.length;g<p;g++){const c=S[g],o=c.options.linesDecorationsClassName;o&&(C[d++]=new b.DecorationToRender(c.range.startLineNumber,c.range.endLineNumber,o));const s=c.options.firstLineDecorationClassName;s&&(C[d++]=new b.DecorationToRender(c.range.startLineNumber,c.range.startLineNumber,s))}return C}prepareRender(w){const S=w.visibleRange.startLineNumber,C=w.visibleRange.endLineNumber,d=this._render(S,C,this._getDecorations(w)),g=this._decorationsLeft.toString(),p=this._decorationsWidth.toString(),c='" style="left:'+g+"px;width:"+p+'px;"></div>',o=[];for(let s=S;s<=C;s++){const a=s-S,u=d[a];let r="";for(let i=0,n=u.length;i<n;i++)r+='<div class="cldr '+u[i]+c;o[a]=r}this._renderResult=o}render(w,S){return this._renderResult?this._renderResult[S-w]:""}}e.LinesDecorationsOverlay=N}),define(Q[223],J([0,1,30,45]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class M extends N.ViewPart{constructor(S){super(S);const C=this._context.configuration.options,d=C.get(124);this._canUseLayerHinting=!C.get(25),this._contentLeft=d.contentLeft,this._glyphMarginLeft=d.glyphMarginLeft,this._glyphMarginWidth=d.glyphMarginWidth,this._domNode=b.createFastDomNode(document.createElement("div")),this._domNode.setClassName(M.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=b.createFastDomNode(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(M.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(S){const C=this._context.configuration.options,d=C.get(124);return this._canUseLayerHinting=!C.get(25),this._contentLeft=d.contentLeft,this._glyphMarginLeft=d.glyphMarginLeft,this._glyphMarginWidth=d.glyphMarginWidth,!0}onScrollChanged(S){return super.onScrollChanged(S)||S.scrollTopChanged}prepareRender(S){}render(S){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const C=S.scrollTop-S.bigNumbersDelta;this._domNode.setTop(-C);const d=Math.min(S.scrollHeight,1e6);this._domNode.setHeight(d),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(d)}}e.Margin=M,M.CLASS_NAME="glyph-margin",M.OUTER_CLASS_NAME="margin"}),define(Q[393],J([0,1,172,325]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class N extends b.DedupOverlay{constructor(w){super();this._context=w,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(w){return!0}onDecorationsChanged(w){return!0}onFlushed(w){return!0}onLinesChanged(w){return!0}onLinesDeleted(w){return!0}onLinesInserted(w){return!0}onScrollChanged(w){return w.scrollTopChanged}onZonesChanged(w){return!0}_getDecorations(w){const S=w.getDecorationsInViewport();let C=[],d=0;for(let g=0,p=S.length;g<p;g++){const c=S[g],o=c.options.marginClassName;o&&(C[d++]=new b.DecorationToRender(c.range.startLineNumber,c.range.endLineNumber,o))}return C}prepareRender(w){const S=w.visibleRange.startLineNumber,C=w.visibleRange.endLineNumber,d=this._render(S,C,this._getDecorations(w)),g=[];for(let p=S;p<=C;p++){const c=p-S,o=d[c];let s="";for(let a=0,u=o.length;a<u;a++)s+='<div class="cmdr '+o[a]+'" style=""></div>';g[c]=s}this._renderResult=g}render(w,S){return this._renderResult?this._renderResult[S-w]:""}}e.MarginViewLineDecorationsOverlay=N}),define(Q[394],J([0,1,30,45,327]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class M extends N.ViewPart{constructor(S){super(S);const d=this._context.configuration.options.get(124);this._widgets={},this._verticalScrollbarWidth=d.verticalScrollbarWidth,this._minimapWidth=d.minimap.minimapWidth,this._horizontalScrollbarHeight=d.horizontalScrollbarHeight,this._editorHeight=d.height,this._editorWidth=d.width,this._domNode=b.createFastDomNode(document.createElement("div")),N.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(S){const d=this._context.configuration.options.get(124);return this._verticalScrollbarWidth=d.verticalScrollbarWidth,this._minimapWidth=d.minimap.minimapWidth,this._horizontalScrollbarHeight=d.horizontalScrollbarHeight,this._editorHeight=d.height,this._editorWidth=d.width,!0}addWidget(S){const C=b.createFastDomNode(S.getDomNode());this._widgets[S.getId()]={widget:S,preference:null,domNode:C},C.setPosition("absolute"),C.setAttribute("widgetId",S.getId()),this._domNode.appendChild(C),this.setShouldRender()}setWidgetPosition(S,C){const d=this._widgets[S.getId()];return d.preference===C?!1:(d.preference=C,this.setShouldRender(),!0)}removeWidget(S){const C=S.getId();if(this._widgets.hasOwnProperty(C)){const g=this._widgets[C].domNode.domNode;delete this._widgets[C],g.parentNode.removeChild(g),this.setShouldRender()}}_renderWidget(S){const C=S.domNode;if(S.preference===null){C.unsetTop();return}if(S.preference===0)C.setTop(0),C.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(S.preference===1){const d=C.domNode.clientHeight;C.setTop(this._editorHeight-d-2*this._horizontalScrollbarHeight),C.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else S.preference===2&&(C.setTop(0),C.domNode.style.right="50%")}prepareRender(S){}render(S){this._domNode.setWidth(this._editorWidth);const C=Object.keys(this._widgets);for(let d=0,g=C.length;d<g;d++){const p=C[d];this._renderWidget(this._widgets[p])}}}e.ViewOverlayWidgets=M}),define(Q[395],J([0,1,30,221,111]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class w extends M.ViewEventHandler{constructor(C,d){super();this._context=C;const g=this._context.configuration.options;this._domNode=b.createFastDomNode(document.createElement("canvas")),this._domNode.setClassName(d),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new N.OverviewZoneManager(p=>this._context.viewLayout.getVerticalOffsetForLineNumber(p)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(g.get(53)),this._zoneManager.setPixelRatio(g.get(122)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(C){const d=this._context.configuration.options;return C.hasChanged(53)&&(this._zoneManager.setLineHeight(d.get(53)),this._render()),C.hasChanged(122)&&(this._zoneManager.setPixelRatio(d.get(122)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(C){return this._render(),!0}onScrollChanged(C){return C.scrollHeightChanged&&(this._zoneManager.setOuterHeight(C.scrollHeight),this._render()),!0}onZonesChanged(C){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(C){this._domNode.setTop(C.top),this._domNode.setRight(C.right);let d=!1;d=this._zoneManager.setDOMWidth(C.width)||d,d=this._zoneManager.setDOMHeight(C.height)||d,d&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(C){this._zoneManager.setZones(C),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const C=this._zoneManager.getCanvasWidth(),d=this._zoneManager.getCanvasHeight(),g=this._zoneManager.resolveColorZones(),p=this._zoneManager.getId2Color(),c=this._domNode.domNode.getContext("2d");return c.clearRect(0,0,C,d),g.length>0&&this._renderOneLane(c,g,p,C),!0}_renderOneLane(C,d,g,p){let c=0,o=0,s=0;for(const a of d){const u=a.colorId,r=a.from,i=a.to;u!==c?(C.fillRect(0,o,p,s-o),c=u,C.fillStyle=g[c],o=r,s=i):s>=r?s=Math.max(s,i):(C.fillRect(0,o,p,s-o),o=r,s=i)}C.fillRect(0,o,p,s-o)}}e.OverviewRuler=w}),define(Q[396],J([0,1,30,12,45,14]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const S=()=>{throw new Error("Invalid change accessor")};class C extends M.ViewPart{constructor(p){super(p);const c=this._context.configuration.options,o=c.get(124);this._lineHeight=c.get(53),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this.domNode=b.createFastDomNode(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=b.createFastDomNode(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const p=this._context.viewLayout.getWhitespaces(),c=new Map;for(const s of p)c.set(s.id,s);let o=!1;return this._context.model.changeWhitespace(s=>{const a=Object.keys(this._zones);for(let u=0,r=a.length;u<r;u++){const i=a[u],n=this._zones[i],t=this._computeWhitespaceProps(n.delegate),l=c.get(i);l&&(l.afterLineNumber!==t.afterViewLineNumber||l.height!==t.heightInPx)&&(s.changeOneWhitespace(i,t.afterViewLineNumber,t.heightInPx),this._safeCallOnComputedHeight(n.delegate,t.heightInPx),o=!0)}}),o}onConfigurationChanged(p){const c=this._context.configuration.options,o=c.get(124);return this._lineHeight=c.get(53),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,p.hasChanged(53)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(p){return this._recomputeWhitespacesProps()}onLinesDeleted(p){return!0}onScrollChanged(p){return p.scrollTopChanged||p.scrollWidthChanged}onZonesChanged(p){return!0}onLinesInserted(p){return!0}_getZoneOrdinal(p){return typeof p.afterColumn!="undefined"?p.afterColumn:1e4}_computeWhitespaceProps(p){if(p.afterLineNumber===0)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(p),minWidthInPx:this._minWidthInPixels(p)};let c;if(typeof p.afterColumn!="undefined")c=this._context.model.validateModelPosition({lineNumber:p.afterLineNumber,column:p.afterColumn});else{const u=this._context.model.validateModelPosition({lineNumber:p.afterLineNumber,column:1}).lineNumber;c=new w.Position(u,this._context.model.getModelLineMaxColumn(u))}let o;c.column===this._context.model.getModelLineMaxColumn(c.lineNumber)?o=this._context.model.validateModelPosition({lineNumber:c.lineNumber+1,column:1}):o=this._context.model.validateModelPosition({lineNumber:c.lineNumber,column:c.column+1});const s=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(c),a=this._context.model.coordinatesConverter.modelPositionIsVisible(o);return{afterViewLineNumber:s.lineNumber,heightInPx:a?this._heightInPixels(p):0,minWidthInPx:this._minWidthInPixels(p)}}changeViewZones(p){let c=!1;return this._context.model.changeWhitespace(o=>{const s={addZone:a=>(c=!0,this._addZone(o,a)),removeZone:a=>{!a||(c=this._removeZone(o,a)||c)},layoutZone:a=>{!a||(c=this._layoutZone(o,a)||c)}};d(p,s),s.addZone=S,s.removeZone=S,s.layoutZone=S}),c}_addZone(p,c){const o=this._computeWhitespaceProps(c),a={whitespaceId:p.insertWhitespace(o.afterViewLineNumber,this._getZoneOrdinal(c),o.heightInPx,o.minWidthInPx),delegate:c,isVisible:!1,domNode:b.createFastDomNode(c.domNode),marginDomNode:c.marginDomNode?b.createFastDomNode(c.marginDomNode):null};return this._safeCallOnComputedHeight(a.delegate,o.heightInPx),a.domNode.setPosition("absolute"),a.domNode.domNode.style.width="100%",a.domNode.setDisplay("none"),a.domNode.setAttribute("monaco-view-zone",a.whitespaceId),this.domNode.appendChild(a.domNode),a.marginDomNode&&(a.marginDomNode.setPosition("absolute"),a.marginDomNode.domNode.style.width="100%",a.marginDomNode.setDisplay("none"),a.marginDomNode.setAttribute("monaco-view-zone",a.whitespaceId),this.marginDomNode.appendChild(a.marginDomNode)),this._zones[a.whitespaceId]=a,this.setShouldRender(),a.whitespaceId}_removeZone(p,c){if(this._zones.hasOwnProperty(c)){const o=this._zones[c];return delete this._zones[c],p.removeWhitespace(o.whitespaceId),o.domNode.removeAttribute("monaco-visible-view-zone"),o.domNode.removeAttribute("monaco-view-zone"),o.domNode.domNode.parentNode.removeChild(o.domNode.domNode),o.marginDomNode&&(o.marginDomNode.removeAttribute("monaco-visible-view-zone"),o.marginDomNode.removeAttribute("monaco-view-zone"),o.marginDomNode.domNode.parentNode.removeChild(o.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(p,c){if(this._zones.hasOwnProperty(c)){const o=this._zones[c],s=this._computeWhitespaceProps(o.delegate);return p.changeOneWhitespace(o.whitespaceId,s.afterViewLineNumber,s.heightInPx),this._safeCallOnComputedHeight(o.delegate,s.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(p){if(this._zones.hasOwnProperty(p)){const c=this._zones[p];return Boolean(c.delegate.suppressMouseDown)}return!1}_heightInPixels(p){return typeof p.heightInPx=="number"?p.heightInPx:typeof p.heightInLines=="number"?this._lineHeight*p.heightInLines:this._lineHeight}_minWidthInPixels(p){return typeof p.minWidthInPx=="number"?p.minWidthInPx:0}_safeCallOnComputedHeight(p,c){if(typeof p.onComputedHeight=="function")try{p.onComputedHeight(c)}catch(o){N.onUnexpectedError(o)}}_safeCallOnDomNodeTop(p,c){if(typeof p.onDomNodeTop=="function")try{p.onDomNodeTop(c)}catch(o){N.onUnexpectedError(o)}}prepareRender(p){}render(p){const c=p.viewportData.whitespaceViewportData,o={};let s=!1;for(let u=0,r=c.length;u<r;u++)o[c[u].id]=c[u],s=!0;const a=Object.keys(this._zones);for(let u=0,r=a.length;u<r;u++){const i=a[u],n=this._zones[i];let t=0,l=0,h="none";o.hasOwnProperty(i)?(t=o[i].verticalOffset-p.bigNumbersDelta,l=o[i].height,h="block",n.isVisible||(n.domNode.setAttribute("monaco-visible-view-zone","true"),n.isVisible=!0),this._safeCallOnDomNodeTop(n.delegate,p.getScrolledTopFromAbsoluteTop(o[i].verticalOffset))):(n.isVisible&&(n.domNode.removeAttribute("monaco-visible-view-zone"),n.isVisible=!1),this._safeCallOnDomNodeTop(n.delegate,p.getScrolledTopFromAbsoluteTop(-1e6))),n.domNode.setTop(t),n.domNode.setHeight(l),n.domNode.setDisplay(h),n.marginDomNode&&(n.marginDomNode.setTop(t),n.marginDomNode.setHeight(l),n.marginDomNode.setDisplay(h))}s&&(this.domNode.setWidth(Math.max(p.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=C;function d(g,p){try{return g(p)}catch(c){N.onUnexpectedError(c)}}}),define(Q[63],J([0,1,8]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelDecoration=e.InlineDecoration=e.ViewLineRenderingData=e.ViewLineData=e.MinimapLinesRenderingData=e.LineBreakData=e.OutputPosition=e.Viewport=void 0;class N{constructor(o,s,a,u){this.top=o|0,this.left=s|0,this.width=a|0,this.height=u|0}}e.Viewport=N;class M{constructor(o,s){this.outputLineIndex=o,this.outputOffset=s}}e.OutputPosition=M;class w{constructor(o,s,a){this.breakOffsets=o,this.breakOffsetsVisibleColumn=s,this.wrappedTextIndentLength=a}static getInputOffsetOfOutputPosition(o,s,a){return s===0?a:o[s-1]+a}static getOutputPositionOfInputOffset(o,s){let a=0,u=o.length-1,r=0,i=0;for(;a<=u;){r=a+(u-a)/2|0;const n=o[r];if(i=r>0?o[r-1]:0,s<i)u=r-1;else if(s>=n)a=r+1;else break}return new M(r,s-i)}}e.LineBreakData=w;class S{constructor(o,s){this.tabSize=o,this.data=s}}e.MinimapLinesRenderingData=S;class C{constructor(o,s,a,u,r,i){this.content=o,this.continuesWithWrappedLine=s,this.minColumn=a,this.maxColumn=u,this.startVisibleColumn=r,this.tokens=i}}e.ViewLineData=C;class d{constructor(o,s,a,u,r,i,n,t,l,h){this.minColumn=o,this.maxColumn=s,this.content=a,this.continuesWithWrappedLine=u,this.isBasicASCII=d.isBasicASCII(a,i),this.containsRTL=d.containsRTL(a,this.isBasicASCII,r),this.tokens=n,this.inlineDecorations=t,this.tabSize=l,this.startVisibleColumn=h}static isBasicASCII(o,s){return s?b.isBasicASCII(o):!0}static containsRTL(o,s,a){return!s&&a?b.containsRTL(o):!1}}e.ViewLineRenderingData=d;class g{constructor(o,s,a){this.range=o,this.inlineClassName=s,this.type=a}}e.InlineDecoration=g;class p{constructor(o,s){this.range=o,this.options=s}}e.ViewModelDecoration=p}),define(Q[397],J([0,1,8,91,63]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class w extends N.CharacterClassifier{constructor(r,i){super(0);for(let n=0;n<r.length;n++)this.set(r.charCodeAt(n),1);for(let n=0;n<i.length;n++)this.set(i.charCodeAt(n),2)}get(r){return r>=0&&r<256?this._asciiMap[r]:r>=12352&&r<=12543||r>=13312&&r<=19903||r>=19968&&r<=40959?3:this._map.get(r)||this._defaultValue}}let S=[],C=[];class d{constructor(r,i){this.classifier=new w(r,i)}static create(r){return new d(r.get(113),r.get(112))}createLineBreaksComputer(r,i,n,t){i=i|0,n=+n;let l=[],h=[];return{addRequest:(m,_)=>{l.push(m),h.push(_)},finalize:()=>{const m=r.typicalFullwidthCharacterWidth/r.typicalHalfwidthCharacterWidth;let _=[];for(let f=0,v=l.length;f<v;f++){const y=h[f];y?_[f]=g(this.classifier,y,l[f],i,n,m,t):_[f]=p(this.classifier,l[f],i,n,m,t)}return S.length=0,C.length=0,_}}}}e.MonospaceLineBreaksComputerFactory=d;function g(u,r,i,n,t,l,h){if(t===-1)return null;const m=i.length;if(m<=1)return null;const _=r.breakOffsets,f=r.breakOffsetsVisibleColumn,v=a(i,n,t,l,h),y=t-v;let L=S,I=C,k=0,E=0,T=0,O=t;const A=_.length;let B=0;if(B>=0){let F=Math.abs(f[B]-O);for(;B+1<A;){const D=Math.abs(f[B+1]-O);if(D>=F)break;F=D,B++}}for(;B<A;){let F=B<0?0:_[B],D=B<0?0:f[B];E>F&&(F=E,D=T);let R=0,W=0,x=0,K=0;if(D<=O){let ee=D,se=F===0?0:i.charCodeAt(F-1),ne=F===0?0:u.get(se),le=!0;for(let X=F;X<m;X++){const z=X,P=i.charCodeAt(X);let V,U;if(b.isHighSurrogate(P)?(X++,V=0,U=2):(V=u.get(P),U=c(P,ee,n,l)),z>E&&s(se,ne,P,V)&&(R=z,W=ee),ee+=U,ee>O){z>E?(x=z,K=ee-U):(x=X+1,K=ee),ee-W>y&&(R=0),le=!1;break}se=P,ne=V}if(le){k>0&&(L[k]=_[_.length-1],I[k]=f[_.length-1],k++);break}}if(R===0){let ee=D,se=i.charCodeAt(F),ne=u.get(se),le=!1;for(let X=F-1;X>=E;X--){const z=X+1,P=i.charCodeAt(X);if(P===9){le=!0;break}let V,U;if(b.isLowSurrogate(P)?(X--,V=0,U=2):(V=u.get(P),U=b.isFullWidthCharacter(P)?l:1),ee<=O){if(x===0&&(x=z,K=ee),ee<=O-y)break;if(s(P,V,se,ne)){R=z,W=ee;break}}ee-=U,se=P,ne=V}if(R!==0){const X=y-(K-W);if(X<=n){const z=i.charCodeAt(x);let P;b.isHighSurrogate(z)?P=2:P=c(z,K,n,l),X-P<0&&(R=0)}}if(le){B--;continue}}if(R===0&&(R=x,W=K),R<=E){const ee=i.charCodeAt(E);b.isHighSurrogate(ee)?(R=E+2,W=T+2):(R=E+1,W=T+c(ee,T,n,l))}for(E=R,L[k]=R,T=W,I[k]=W,k++,O=W+y;B<0||B<A&&f[B]<W;)B++;let Y=Math.abs(f[B]-O);for(;B+1<A;){const ee=Math.abs(f[B+1]-O);if(ee>=Y)break;Y=ee,B++}}return k===0?null:(L.length=k,I.length=k,S=r.breakOffsets,C=r.breakOffsetsVisibleColumn,r.breakOffsets=L,r.breakOffsetsVisibleColumn=I,r.wrappedTextIndentLength=v,r)}function p(u,r,i,n,t,l){if(n===-1)return null;const h=r.length;if(h<=1)return null;const m=a(r,i,n,t,l),_=n-m;let f=[],v=[],y=0,L=0,I=0,k=n,E=r.charCodeAt(0),T=u.get(E),O=c(E,0,i,t),A=1;b.isHighSurrogate(E)&&(O+=1,E=r.charCodeAt(1),T=u.get(E),A++);for(let B=A;B<h;B++){const F=B,D=r.charCodeAt(B);let R,W;b.isHighSurrogate(D)?(B++,R=0,W=2):(R=u.get(D),W=c(D,O,i,t)),s(E,T,D,R)&&(L=F,I=O),O+=W,O>k&&((L===0||O-I>_)&&(L=F,I=O-W),f[y]=L,v[y]=I,y++,k=I+_,L=0),E=D,T=R}return y===0?null:(f[y]=h,v[y]=O,new M.LineBreakData(f,v,m))}function c(u,r,i,n){return u===9?i-r%i:b.isFullWidthCharacter(u)||u<32?n:1}function o(u,r){return r-u%r}function s(u,r,i,n){return i!==32&&(r===2||r===3&&n!==2||n===1||n===3&&r!==1)}function a(u,r,i,n,t){let l=0;if(t!==0){const h=b.firstNonWhitespaceIndex(u);if(h!==-1){for(let _=0;_<h;_++)l+=u.charCodeAt(_)===9?o(l,r):1;const m=t===3?2:t===2?1:0;for(let _=0;_<m;_++)l+=o(l,r);l+n>i&&(l=0)}}return l}}),define(Q[173],J([0,1,6,2]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyEditAttemptEvent=e.CursorStateChangedEvent=e.ViewZonesChangedEvent=e.ScrollChangedEvent=e.FocusChangedEvent=e.ContentSizeChangedEvent=e.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class M extends N.Disposable{constructor(){super();this._onEvent=this._register(new b.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(s){this._addOutgoingEvent(s),this._emitOugoingEvents()}_addOutgoingEvent(s){for(let a=0,u=this._outgoingEvents.length;a<u;a++)if(this._outgoingEvents[a].kind===s.kind){this._outgoingEvents[a]=this._outgoingEvents[a].merge(s);return}this._outgoingEvents.push(s)}_emitOugoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const s=this._outgoingEvents.shift();s.isNoOp()||this._onEvent.fire(s)}}addViewEventHandler(s){for(let a=0,u=this._eventHandlers.length;a<u;a++)this._eventHandlers[a]===s&&console.warn("Detected duplicate listener in ViewEventDispatcher",s);this._eventHandlers.push(s)}removeViewEventHandler(s){for(let a=0;a<this._eventHandlers.length;a++)if(this._eventHandlers[a]===s){this._eventHandlers.splice(a,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new w),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const s=this._collector.outgoingEvents,a=this._collector.viewEvents;this._collector=null;for(const u of s)this._addOutgoingEvent(u);a.length>0&&this._emitMany(a)}this._emitOugoingEvents()}emitSingleViewEvent(s){try{this.beginEmitViewEvents().emitViewEvent(s)}finally{this.endEmitViewEvents()}}_emitMany(s){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(s):this._viewEventQueue=s,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const s=this._viewEventQueue;this._viewEventQueue=null;const a=this._eventHandlers.slice(0);for(const u of a)u.handleEvents(s)}}}e.ViewModelEventDispatcher=M;class w{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(s){this.viewEvents.push(s)}emitOutgoingEvent(s){this.outgoingEvents.push(s)}}e.ViewModelEventsCollector=w;class S{constructor(s,a,u,r){this.kind=0,this._oldContentWidth=s,this._oldContentHeight=a,this.contentWidth=u,this.contentHeight=r,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(s){return s.kind!==0?this:new S(this._oldContentWidth,this._oldContentHeight,s.contentWidth,s.contentHeight)}}e.ContentSizeChangedEvent=S;class C{constructor(s,a){this.kind=1,this.oldHasFocus=s,this.hasFocus=a}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(s){return s.kind!==1?this:new C(this.oldHasFocus,s.hasFocus)}}e.FocusChangedEvent=C;class d{constructor(s,a,u,r,i,n,t,l){this.kind=2,this._oldScrollWidth=s,this._oldScrollLeft=a,this._oldScrollHeight=u,this._oldScrollTop=r,this.scrollWidth=i,this.scrollLeft=n,this.scrollHeight=t,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}merge(s){return s.kind!==2?this:new d(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,s.scrollWidth,s.scrollLeft,s.scrollHeight,s.scrollTop)}}e.ScrollChangedEvent=d;class g{constructor(){this.kind=3}isNoOp(){return!1}merge(s){return this}}e.ViewZonesChangedEvent=g;class p{constructor(s,a,u,r,i,n,t){this.kind=5,this.oldSelections=s,this.selections=a,this.oldModelVersionId=u,this.modelVersionId=r,this.source=i,this.reason=n,this.reachedMaxCursorCount=t}static _selectionsAreEqual(s,a){if(!s&&!a)return!0;if(!s||!a)return!1;const u=s.length,r=a.length;if(u!==r)return!1;for(let i=0;i<u;i++)if(!s[i].equalsSelection(a[i]))return!1;return!0}isNoOp(){return p._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(s){return s.kind!==5?this:new p(this.oldSelections,s.selections,this.oldModelVersionId,s.modelVersionId,s.source,s.reason,this.reachedMaxCursorCount||s.reachedMaxCursorCount)}}e.CursorStateChangedEvent=p;class c{constructor(){this.kind=4}isNoOp(){return!1}merge(s){return this}}e.ReadOnlyEditAttemptEvent=c}),define(Q[398],J([0,1,6,2,121,386,63,173]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const d=125;class g{constructor(s,a,u,r){s=s|0,a=a|0,u=u|0,r=r|0,s<0&&(s=0),a<0&&(a=0),u<0&&(u=0),r<0&&(r=0),this.width=s,this.contentWidth=a,this.scrollWidth=Math.max(s,a),this.height=u,this.contentHeight=r,this.scrollHeight=Math.max(u,r)}equals(s){return this.width===s.width&&this.contentWidth===s.contentWidth&&this.height===s.height&&this.contentHeight===s.contentHeight}}class p extends N.Disposable{constructor(s,a){super();this._onDidContentSizeChange=this._register(new b.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new g(0,0,0,0),this._scrollable=this._register(new M.Scrollable(s,a)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(s){this._scrollable.setSmoothScrollDuration(s)}validateScrollPosition(s){return this._scrollable.validateScrollPosition(s)}getScrollDimensions(){return this._dimensions}setScrollDimensions(s){if(!this._dimensions.equals(s)){const a=this._dimensions;this._dimensions=s,this._scrollable.setScrollDimensions({width:s.width,scrollWidth:s.scrollWidth,height:s.height,scrollHeight:s.scrollHeight},!0);const u=a.contentWidth!==s.contentWidth,r=a.contentHeight!==s.contentHeight;(u||r)&&this._onDidContentSizeChange.fire(new C.ContentSizeChangedEvent(a.contentWidth,a.contentHeight,s.contentWidth,s.contentHeight))}}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(s){this._scrollable.setScrollPositionNow(s)}setScrollPositionSmooth(s){this._scrollable.setScrollPositionSmooth(s)}}class c extends N.Disposable{constructor(s,a,u){super();this._configuration=s;const r=this._configuration.options,i=r.get(124),n=r.get(69);this._linesLayout=new w.LinesLayout(a,r.get(53),n.top,n.bottom),this._scrollable=this._register(new p(0,u)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new g(i.contentWidth,0,i.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(98)?d:0)}onConfigurationChanged(s){const a=this._configuration.options;if(s.hasChanged(53)&&this._linesLayout.setLineHeight(a.get(53)),s.hasChanged(69)){const u=a.get(69);this._linesLayout.setPadding(u.top,u.bottom)}if(s.hasChanged(124)){const u=a.get(124),r=u.contentWidth,i=u.height,n=this._scrollable.getScrollDimensions(),t=n.contentWidth;this._scrollable.setScrollDimensions(new g(r,n.contentWidth,i,this._getContentHeight(r,i,t)))}else this._updateHeight();s.hasChanged(98)&&this._configureSmoothScrollDuration()}onFlushed(s){this._linesLayout.onFlushed(s)}onLinesDeleted(s,a){this._linesLayout.onLinesDeleted(s,a)}onLinesInserted(s,a){this._linesLayout.onLinesInserted(s,a)}_getHorizontalScrollbarHeight(s,a){const r=this._configuration.options.get(87);return r.horizontal===2||s>=a?0:r.horizontalScrollbarSize}_getContentHeight(s,a,u){const r=this._configuration.options;let i=this._linesLayout.getLinesTotalHeight();return r.get(89)?i+=Math.max(0,a-r.get(53)-r.get(69).bottom):i+=this._getHorizontalScrollbarHeight(s,u),i}_updateHeight(){const s=this._scrollable.getScrollDimensions(),a=s.width,u=s.height,r=s.contentWidth;this._scrollable.setScrollDimensions(new g(a,s.contentWidth,u,this._getContentHeight(a,u,r)))}getCurrentViewport(){const s=this._scrollable.getScrollDimensions(),a=this._scrollable.getCurrentScrollPosition();return new S.Viewport(a.scrollTop,a.scrollLeft,s.width,s.height)}getFutureViewport(){const s=this._scrollable.getScrollDimensions(),a=this._scrollable.getFutureScrollPosition();return new S.Viewport(a.scrollTop,a.scrollLeft,s.width,s.height)}_computeContentWidth(s){const a=this._configuration.options,u=a.get(125),r=a.get(38);if(u.isViewportWrapping){const i=a.get(124),n=a.get(59);return s>i.contentWidth+r.typicalHalfwidthCharacterWidth&&n.enabled&&n.side==="right"?s+i.verticalScrollbarWidth:s}else{const i=a.get(88)*r.typicalHalfwidthCharacterWidth,n=this._linesLayout.getWhitespaceMinWidth();return Math.max(s+i,n)}}setMaxLineWidth(s){const a=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new g(a.width,this._computeContentWidth(s),a.height,a.contentHeight)),this._updateHeight()}saveState(){const s=this._scrollable.getFutureScrollPosition();let a=s.scrollTop,u=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(a),r=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(u);return{scrollTop:a,scrollTopWithoutViewZones:a-r,scrollLeft:s.scrollLeft}}changeWhitespace(s){const a=this._linesLayout.changeWhitespace(s);return a&&this.onHeightMaybeChanged(),a}getVerticalOffsetForLineNumber(s){return this._linesLayout.getVerticalOffsetForLineNumber(s)}isAfterLines(s){return this._linesLayout.isAfterLines(s)}isInTopPadding(s){return this._linesLayout.isInTopPadding(s)}isInBottomPadding(s){return this._linesLayout.isInBottomPadding(s)}getLineNumberAtVerticalOffset(s){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(s)}getWhitespaceAtVerticalOffset(s){return this._linesLayout.getWhitespaceAtVerticalOffset(s)}getLinesViewportData(){const s=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(s.top,s.top+s.height)}getLinesViewportDataAtScrollTop(s){const a=this._scrollable.getScrollDimensions();return s+a.height>a.scrollHeight&&(s=a.scrollHeight-a.height),s<0&&(s=0),this._linesLayout.getLinesViewportData(s,s+a.height)}getWhitespaceViewportData(){const s=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(s.top,s.top+s.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(s){return this._scrollable.validateScrollPosition(s)}setScrollPosition(s,a){a===1?this._scrollable.setScrollPositionNow(s):this._scrollable.setScrollPositionSmooth(s)}deltaScrollNow(s,a){const u=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:u.scrollLeft+s,scrollTop:u.scrollTop+a})}}e.ViewLayout=c}),define(Q[399],J([0,1,3,21]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class M{constructor(S,C){this._selection=S,this._isMovingLeft=C}getEditOperations(S,C){if(!(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())){const d=this._selection.startLineNumber,g=this._selection.startColumn,p=this._selection.endColumn;if(!(this._isMovingLeft&&g===1)&&!(!this._isMovingLeft&&p===S.getLineMaxColumn(d)))if(this._isMovingLeft){const c=new b.Range(d,g-1,d,g),o=S.getValueInRange(c);C.addEditOperation(c,null),C.addEditOperation(new b.Range(d,p,d,p),o)}else{const c=new b.Range(d,p,d,p+1),o=S.getValueInRange(c);C.addEditOperation(c,null),C.addEditOperation(new b.Range(d,g,d,g),o)}}}computeCursorState(S,C){return this._isMovingLeft?new N.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new N.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=M}),define(Q[130],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionKind=void 0;class b{constructor(d){this.value=d}equals(d){return this.value===d.value}contains(d){return this.equals(d)||this.value===""||d.value.startsWith(this.value+b.sep)}intersects(d){return this.contains(d)||d.contains(this)}append(d){return new b(this.value+b.sep+d)}}e.CodeActionKind=b,b.sep=".",b.None=new b("@@none@@"),b.Empty=new b(""),b.QuickFix=new b("quickfix"),b.Refactor=new b("refactor"),b.Source=new b("source"),b.SourceOrganizeImports=b.Source.append("organizeImports"),b.SourceFixAll=b.Source.append("fixAll");function N(C,d){return!(C.include&&!C.include.intersects(d)||C.excludes&&C.excludes.some(g=>w(d,g,C.include))||!C.includeSourceActions&&b.Source.contains(d))}e.mayIncludeActionsOfKind=N;function M(C,d){const g=d.kind?new b(d.kind):void 0;return!(C.include&&(!g||!C.include.contains(g))||C.excludes&&g&&C.excludes.some(p=>w(g,p,C.include))||!C.includeSourceActions&&g&&b.Source.contains(g)||C.onlyIncludePreferredActions&&!d.isPreferred)}e.filtersAction=M;function w(C,d,g){return!(!d.contains(C)||g&&d.contains(g))}class S{constructor(d,g,p){this.kind=d,this.apply=g,this.preferred=p}static fromUser(d,g){return!d||typeof d!="object"?new S(g.kind,g.apply,!1):new S(S.getKindFromUser(d,g.kind),S.getApplyFromUser(d,g.apply),S.getPreferredUser(d))}static getApplyFromUser(d,g){switch(typeof d.apply=="string"?d.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return g}}static getKindFromUser(d,g){return typeof d.kind=="string"?new b(d.kind):g}static getPreferredUser(d){return typeof d.preferred=="boolean"?d.preferred:!1}}e.CodeActionCommandArgs=S}),define(Q[400],J([0,1,6]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class N{constructor(w,S,C){this.presentationIndex=C,this._onColorFlushed=new b.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new b.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new b.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=w,this._color=w,this._colorPresentations=S}get color(){return this._color}set color(w){this._color.equals(w)||(this._color=w,this._onDidChangeColor.fire(w))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(w){this._colorPresentations=w,this.presentationIndex>w.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(w,S){for(let C=0;C<this.colorPresentations.length;C++)if(S.toLowerCase()===this.colorPresentations[C].label){this.presentationIndex=C,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}e.ColorPickerModel=N}),define(Q[224],J([0,1,62,14,3,21,41]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class C{constructor(g,p){this._selection=g,this._insertSpace=p,this._usedEndToken=null}static _haystackHasNeedleAtOffset(g,p,c){if(c<0)return!1;const o=p.length,s=g.length;if(c+o>s)return!1;for(let a=0;a<o;a++){const u=g.charCodeAt(c+a),r=p.charCodeAt(a);if(u!==r&&!(u>=65&&u<=90&&u+32===r)&&!(r>=65&&r<=90&&r+32===u))return!1}return!0}_createOperationsForBlockComment(g,p,c,o,s,a){const u=g.startLineNumber,r=g.startColumn,i=g.endLineNumber,n=g.endColumn,t=s.getLineContent(u),l=s.getLineContent(i);let h=t.lastIndexOf(p,r-1+p.length),m=l.indexOf(c,n-1-c.length);if(h!==-1&&m!==-1)if(u===i)t.substring(h+p.length,m).indexOf(c)>=0&&(h=-1,m=-1);else{const f=t.substring(h+p.length),v=l.substring(0,m);(f.indexOf(c)>=0||v.indexOf(c)>=0)&&(h=-1,m=-1)}let _;h!==-1&&m!==-1?(o&&h+p.length<t.length&&t.charCodeAt(h+p.length)===32&&(p=p+" "),o&&m>0&&l.charCodeAt(m-1)===32&&(c=" "+c,m-=1),_=C._createRemoveBlockCommentOperations(new M.Range(u,h+p.length+1,i,m+1),p,c)):(_=C._createAddBlockCommentOperations(g,p,c,this._insertSpace),this._usedEndToken=_.length===1?c:null);for(const f of _)a.addTrackedEditOperation(f.range,f.text)}static _createRemoveBlockCommentOperations(g,p,c){let o=[];return M.Range.isEmpty(g)?o.push(b.EditOperation.delete(new M.Range(g.startLineNumber,g.startColumn-p.length,g.endLineNumber,g.endColumn+c.length))):(o.push(b.EditOperation.delete(new M.Range(g.startLineNumber,g.startColumn-p.length,g.startLineNumber,g.startColumn))),o.push(b.EditOperation.delete(new M.Range(g.endLineNumber,g.endColumn,g.endLineNumber,g.endColumn+c.length)))),o}static _createAddBlockCommentOperations(g,p,c,o){let s=[];return M.Range.isEmpty(g)?s.push(b.EditOperation.replace(new M.Range(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn),p+" "+c)):(s.push(b.EditOperation.insert(new N.Position(g.startLineNumber,g.startColumn),p+(o?" ":""))),s.push(b.EditOperation.insert(new N.Position(g.endLineNumber,g.endColumn),(o?" ":"")+c))),s}getEditOperations(g,p){const c=this._selection.startLineNumber,o=this._selection.startColumn;g.tokenizeIfCheap(c);const s=g.getLanguageIdAtPosition(c,o),a=S.LanguageConfigurationRegistry.getComments(s);!a||!a.blockCommentStartToken||!a.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,a.blockCommentStartToken,a.blockCommentEndToken,this._insertSpace,g,p)}computeCursorState(g,p){const c=p.getInverseEditOperations();if(c.length===2){const o=c[0],s=c[1];return new w.Selection(o.range.endLineNumber,o.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const o=c[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new w.Selection(o.endLineNumber,o.endColumn+s,o.endLineNumber,o.endColumn+s)}}}e.BlockCommentCommand=C}),define(Q[401],J([0,1,8,62,14,3,21,41,224]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class g{constructor(c,o,s,a,u,r){this._selection=c,this._tabSize=o,this._type=s,this._insertSpace=a,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=u,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(c,o,s){c.tokenizeIfCheap(o);const a=c.getLanguageIdAtPosition(o,1),u=C.LanguageConfigurationRegistry.getComments(a),r=u?u.lineCommentToken:null;if(!r)return null;let i=[];for(let n=0,t=s-o+1;n<t;n++)i[n]={ignore:!1,commentStr:r,commentStrOffset:0,commentStrLength:r.length};return i}static _analyzeLines(c,o,s,a,u,r,i){let n=!0,t;c===0?t=!0:c===1?t=!1:t=!0;for(let l=0,h=a.length;l<h;l++){const m=a[l],_=u+l;if(_===u&&i){m.ignore=!0;continue}const f=s.getLineContent(_),v=b.firstNonWhitespaceIndex(f);if(v===-1){m.ignore=r,m.commentStrOffset=f.length;continue}if(n=!1,m.ignore=!1,m.commentStrOffset=v,t&&!d.BlockCommentCommand._haystackHasNeedleAtOffset(f,m.commentStr,v)&&(c===0?t=!1:c===1||(m.ignore=!0)),t&&o){const y=v+m.commentStrLength;y<f.length&&f.charCodeAt(y)===32&&(m.commentStrLength+=1)}}if(c===0&&n){t=!1;for(let l=0,h=a.length;l<h;l++)a[l].ignore=!1}return{supported:!0,shouldRemoveComments:t,lines:a}}static _gatherPreflightData(c,o,s,a,u,r,i){const n=g._gatherPreflightCommentStrings(s,a,u);return n===null?{supported:!1}:g._analyzeLines(c,o,s,n,a,r,i)}_executeLineComments(c,o,s,a){let u;s.shouldRemoveComments?u=g._createRemoveLineCommentsOperations(s.lines,a.startLineNumber):(g._normalizeInsertionPoint(c,s.lines,a.startLineNumber,this._tabSize),u=this._createAddLineCommentsOperations(s.lines,a.startLineNumber));const r=new M.Position(a.positionLineNumber,a.positionColumn);for(let i=0,n=u.length;i<n;i++)o.addEditOperation(u[i].range,u[i].text),w.Range.isEmpty(u[i].range)&&w.Range.getStartPosition(u[i].range).equals(r)&&c.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(u[i].text||"").length);this._selectionId=o.trackSelection(a)}_attemptRemoveBlockComment(c,o,s,a){let u=o.startLineNumber,r=o.endLineNumber,i=a.length+Math.max(c.getLineFirstNonWhitespaceColumn(o.startLineNumber),o.startColumn),n=c.getLineContent(u).lastIndexOf(s,i-1),t=c.getLineContent(r).indexOf(a,o.endColumn-1-s.length);return n!==-1&&t===-1&&(t=c.getLineContent(u).indexOf(a,n+s.length),r=u),n===-1&&t!==-1&&(n=c.getLineContent(r).lastIndexOf(s,t),u=r),o.isEmpty()&&(n===-1||t===-1)&&(n=c.getLineContent(u).indexOf(s),n!==-1&&(t=c.getLineContent(u).indexOf(a,n+s.length))),n!==-1&&c.getLineContent(u).charCodeAt(n+s.length)===32&&(s+=" "),t!==-1&&c.getLineContent(r).charCodeAt(t-1)===32&&(a=" "+a,t-=1),n!==-1&&t!==-1?d.BlockCommentCommand._createRemoveBlockCommentOperations(new w.Range(u,n+s.length+1,r,t+1),s,a):null}_executeBlockComment(c,o,s){c.tokenizeIfCheap(s.startLineNumber);let a=c.getLanguageIdAtPosition(s.startLineNumber,1),u=C.LanguageConfigurationRegistry.getComments(a);if(!(!u||!u.blockCommentStartToken||!u.blockCommentEndToken)){const r=u.blockCommentStartToken,i=u.blockCommentEndToken;let n=this._attemptRemoveBlockComment(c,s,r,i);if(!n){if(s.isEmpty()){const t=c.getLineContent(s.startLineNumber);let l=b.firstNonWhitespaceIndex(t);l===-1&&(l=t.length),n=d.BlockCommentCommand._createAddBlockCommentOperations(new w.Range(s.startLineNumber,l+1,s.startLineNumber,t.length+1),r,i,this._insertSpace)}else n=d.BlockCommentCommand._createAddBlockCommentOperations(new w.Range(s.startLineNumber,c.getLineFirstNonWhitespaceColumn(s.startLineNumber),s.endLineNumber,c.getLineMaxColumn(s.endLineNumber)),r,i,this._insertSpace);n.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=o.trackSelection(s);for(const t of n)o.addEditOperation(t.range,t.text)}}getEditOperations(c,o){let s=this._selection;if(this._moveEndPositionDown=!1,s.startLineNumber===s.endLineNumber&&this._ignoreFirstLine){o.addEditOperation(new w.Range(s.startLineNumber,c.getLineMaxColumn(s.startLineNumber),s.startLineNumber+1,1),s.startLineNumber===c.getLineCount()?"":`
`),this._selectionId=o.trackSelection(s);return}s.startLineNumber<s.endLineNumber&&s.endColumn===1&&(this._moveEndPositionDown=!0,s=s.setEndPosition(s.endLineNumber-1,c.getLineMaxColumn(s.endLineNumber-1)));const a=g._gatherPreflightData(this._type,this._insertSpace,c,s.startLineNumber,s.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine);return a.supported?this._executeLineComments(c,o,a,s):this._executeBlockComment(c,o,s)}computeCursorState(c,o){let s=o.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(s=s.setEndPosition(s.endLineNumber+1,1)),new S.Selection(s.selectionStartLineNumber,s.selectionStartColumn+this._deltaColumn,s.positionLineNumber,s.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(c,o){let s=[];for(let a=0,u=c.length;a<u;a++){const r=c[a];r.ignore||s.push(N.EditOperation.delete(new w.Range(o+a,r.commentStrOffset+1,o+a,r.commentStrOffset+r.commentStrLength+1)))}return s}_createAddLineCommentsOperations(c,o){let s=[];const a=this._insertSpace?" ":"";for(let u=0,r=c.length;u<r;u++){const i=c[u];i.ignore||s.push(N.EditOperation.insert(new M.Position(o+u,i.commentStrOffset+1),i.commentStr+a))}return s}static nextVisibleColumn(c,o,s,a){return s?c+(o-c%o):c+a}static _normalizeInsertionPoint(c,o,s,a){let u=1073741824,r,i;for(let n=0,t=o.length;n<t;n++)if(!o[n].ignore){const l=c.getLineContent(s+n);let h=0;for(let m=0,_=o[n].commentStrOffset;h<u&&m<_;m++)h=g.nextVisibleColumn(h,a,l.charCodeAt(m)===9,1);h<u&&(u=h)}u=Math.floor(u/a)*a;for(let n=0,t=o.length;n<t;n++)if(!o[n].ignore){const l=c.getLineContent(s+n);let h=0;for(r=0,i=o[n].commentStrOffset;h<u&&r<i;r++)h=g.nextVisibleColumn(h,a,l.charCodeAt(r)===9,1);h>u?o[n].commentStrOffset=r-1:o[n].commentStrOffset=r}}}e.LineCommentCommand=g}),define(Q[402],J([0,1,21,3]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class M{constructor(S,C,d){this.selection=S,this.targetPosition=C,this.copy=d,this.targetSelection=null}getEditOperations(S,C){let d=S.getValueInRange(this.selection);if(this.copy||C.addEditOperation(this.selection,null),C.addEditOperation(new N.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),d),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new b.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);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new b.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);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new b.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new b.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new b.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(S,C){return this.targetSelection}}e.DragAndDropCommand=M}),define(Q[403],J([0,1,3]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class N{constructor(w,S,C){this._editorSelection=w,this._ranges=S,this._replaceStrings=C,this._trackedEditorSelectionId=null}getEditOperations(w,S){if(this._ranges.length>0){let C=[];for(let p=0;p<this._ranges.length;p++)C.push({range:this._ranges[p],text:this._replaceStrings[p]});C.sort((p,c)=>b.Range.compareRangesUsingStarts(p.range,c.range));let d=[],g=C[0];for(let p=1;p<C.length;p++)g.range.endLineNumber===C[p].range.startLineNumber&&g.range.endColumn===C[p].range.startColumn?(g.range=g.range.plusRange(C[p].range),g.text=g.text+C[p].text):(d.push(g),g=C[p]);d.push(g);for(const p of d)S.addEditOperation(p.range,p.text)}this._trackedEditorSelectionId=S.trackSelection(this._editorSelection)}computeCursorState(w,S){return S.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=N}),define(Q[404],J([0,1,285]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;class N{constructor(p){this.staticValue=p,this.kind=0}}class M{constructor(p){this.pieces=p,this.kind=1}}class w{constructor(p){!p||p.length===0?this._state=new N(""):p.length===1&&p[0].staticValue!==null?this._state=new N(p[0].staticValue):this._state=new M(p)}static fromStaticValue(p){return new w([S.staticValue(p)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(p,c){if(this._state.kind===0)return c?b.buildReplaceStringWithCasePreserved(p,this._state.staticValue):this._state.staticValue;let o="";for(let s=0,a=this._state.pieces.length;s<a;s++){let u=this._state.pieces[s];if(u.staticValue!==null){o+=u.staticValue;continue}let r=w._substitute(u.matchIndex,p);if(u.caseOps!==null&&u.caseOps.length>0){let i=[],n=u.caseOps.length,t=0;for(let l=0,h=r.length;l<h;l++){if(t>=n){i.push(r.slice(l));break}switch(u.caseOps[t]){case"U":i.push(r[l].toUpperCase());break;case"u":i.push(r[l].toUpperCase()),t++;break;case"L":i.push(r[l].toLowerCase());break;case"l":i.push(r[l].toLowerCase()),t++;break;default:i.push(r[l])}}r=i.join("")}o+=r}return o}static _substitute(p,c){if(c===null)return"";if(p===0)return c[0];let o="";for(;p>0;){if(p<c.length)return(c[p]||"")+o;o=String(p%10)+o,p=Math.floor(p/10)}return"$"+o}}e.ReplacePattern=w;class S{constructor(p,c,o){this.staticValue=p,this.matchIndex=c,!o||o.length===0?this.caseOps=null:this.caseOps=o.slice(0)}static staticValue(p){return new S(p,-1,null)}static caseOps(p,c){return new S(null,p,c)}}e.ReplacePiece=S;class C{constructor(p){this._source=p,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(p){this._emitStatic(this._source.substring(this._lastCharIndex,p)),this._lastCharIndex=p}emitStatic(p,c){this._emitStatic(p),this._lastCharIndex=c}_emitStatic(p){p.length!==0&&(this._currentStaticPiece+=p)}emitMatchIndex(p,c,o){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=S.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=S.caseOps(p,o),this._lastCharIndex=c}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=S.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new w(this._result)}}function d(g){if(!g||g.length===0)return new w(null);let p=[],c=new C(g);for(let o=0,s=g.length;o<s;o++){let a=g.charCodeAt(o);if(a===92){if(o++,o>=s)break;let u=g.charCodeAt(o);switch(u){case 92:c.emitUnchanged(o-1),c.emitStatic("\\",o+1);break;case 110:c.emitUnchanged(o-1),c.emitStatic(`
`,o+1);break;case 116:c.emitUnchanged(o-1),c.emitStatic(" ",o+1);break;case 117:case 85:case 108:case 76:c.emitUnchanged(o-1),c.emitStatic("",o+1),p.push(String.fromCharCode(u));break}continue}if(a===36){if(o++,o>=s)break;let u=g.charCodeAt(o);if(u===36){c.emitUnchanged(o-1),c.emitStatic("$",o+1);continue}if(u===48||u===38){c.emitUnchanged(o-1),c.emitMatchIndex(0,o+1,p),p.length=0;continue}if(49<=u&&u<=57){let r=u-48;if(o+1<s){let i=g.charCodeAt(o+1);if(48<=i&&i<=57){o++,r=r*10+(i-48),c.emitUnchanged(o-2),c.emitMatchIndex(r,o+1,p),p.length=0;continue}}c.emitUnchanged(o-1),c.emitMatchIndex(r,o+1,p),p.length=0;continue}}}return c.finalize()}e.parseReplaceString=d}),define(Q[174],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRegion=e.FoldingRegions=e.MAX_LINE_NUMBER=e.MAX_FOLDING_REGIONS=void 0,e.MAX_FOLDING_REGIONS=65535,e.MAX_LINE_NUMBER=16777215;const b=4278190080;class N{constructor(S,C,d){if(S.length!==C.length||S.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=S,this._endIndexes=C,this._collapseStates=new Uint32Array(Math.ceil(S.length/32)),this._types=d,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let S=[],C=(d,g)=>{let p=S[S.length-1];return this.getStartLineNumber(p)<=d&&this.getEndLineNumber(p)>=g};for(let d=0,g=this._startIndexes.length;d<g;d++){let p=this._startIndexes[d],c=this._endIndexes[d];if(p>e.MAX_LINE_NUMBER||c>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;S.length>0&&!C(p,c);)S.pop();let o=S.length>0?S[S.length-1]:-1;S.push(d),this._startIndexes[d]=p+((o&255)<<24),this._endIndexes[d]=c+((o&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(S){return this._startIndexes[S]&e.MAX_LINE_NUMBER}getEndLineNumber(S){return this._endIndexes[S]&e.MAX_LINE_NUMBER}getType(S){return this._types?this._types[S]:void 0}hasTypes(){return!!this._types}isCollapsed(S){let C=S/32|0,d=S%32;return(this._collapseStates[C]&1<<d)!=0}setCollapsed(S,C){let d=S/32|0,g=S%32,p=this._collapseStates[d];C?this._collapseStates[d]=p|1<<g:this._collapseStates[d]=p&~(1<<g)}toRegion(S){return new M(this,S)}getParentIndex(S){this.ensureParentIndices();let C=((this._startIndexes[S]&b)>>>24)+((this._endIndexes[S]&b)>>>16);return C===e.MAX_FOLDING_REGIONS?-1:C}contains(S,C){return this.getStartLineNumber(S)<=C&&this.getEndLineNumber(S)>=C}findIndex(S){let C=0,d=this._startIndexes.length;if(d===0)return-1;for(;C<d;){let g=Math.floor((C+d)/2);S<this.getStartLineNumber(g)?d=g:C=g+1}return C-1}findRange(S){let C=this.findIndex(S);if(C>=0){if(this.getEndLineNumber(C)>=S)return C;for(C=this.getParentIndex(C);C!==-1;){if(this.contains(C,S))return C;C=this.getParentIndex(C)}}return-1}toString(){let S=[];for(let C=0;C<this.length;C++)S[C]=`[${this.isCollapsed(C)?"+":"-"}] ${this.getStartLineNumber(C)}/${this.getEndLineNumber(C)}`;return S.join(", ")}}e.FoldingRegions=N;class M{constructor(S,C){this.ranges=S,this.index=C}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(S){return S.startLineNumber<=this.startLineNumber&&S.endLineNumber>=this.endLineNumber}containsLine(S){return this.startLineNumber<=S&&S<=this.endLineNumber}}e.FoldingRegion=M}),define(Q[405],J([0,1,6,174]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setCollapseStateForType=e.setCollapseStateForMatchingLines=e.setCollapseStateAtLevel=e.setCollapseStateUp=e.setCollapseStateLevelsUp=e.setCollapseStateLevelsDown=e.toggleCollapseState=e.FoldingModel=void 0;class M{constructor(s,a){this._updateEventEmitter=new b.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=s,this._decorationProvider=a,this._regions=new N.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(s){if(!!s.length){s=s.sort((u,r)=>u.regionIndex-r.regionIndex);const a={};this._decorationProvider.changeDecorations(u=>{let r=0,i=-1,n=-1;const t=l=>{for(;r<l;){const h=this._regions.getEndLineNumber(r),m=this._regions.isCollapsed(r);h<=i&&u.changeDecorationOptions(this._editorDecorationIds[r],this._decorationProvider.getDecorationOption(m,h<=n)),m&&h>n&&(n=h),r++}};for(let l of s){let h=l.regionIndex,m=this._editorDecorationIds[h];if(m&&!a[m]){a[m]=!0,t(h);let _=!this._regions.isCollapsed(h);this._regions.setCollapsed(h,_),i=Math.max(i,this._regions.getEndLineNumber(h))}}t(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:s})}}update(s,a=[]){let u=[],r=(_,f)=>{for(let v of a)if(_<v&&v<=f)return!0;return!1},i=-1,n=(_,f)=>{const v=s.getStartLineNumber(_),y=s.getEndLineNumber(_);f&&r(v,y)&&(f=!1),s.setCollapsed(_,f);const L=this._textModel.getLineMaxColumn(v),I={startLineNumber:v,startColumn:Math.max(L-1,1),endLineNumber:v,endColumn:L};u.push({range:I,options:this._decorationProvider.getDecorationOption(f,y<=i)}),f&&y>i&&(i=y)},t=0,l=()=>{for(;t<this._regions.length;){let _=this._regions.isCollapsed(t);if(t++,_)return t-1}return-1},h=0,m=l();for(;m!==-1&&h<s.length;){let _=this._textModel.getDecorationRange(this._editorDecorationIds[m]);if(_){let f=_.startLineNumber;if(_.startColumn===Math.max(_.endColumn-1,1)&&this._textModel.getLineMaxColumn(f)===_.endColumn)for(;h<s.length;){let v=s.getStartLineNumber(h);if(f>=v)n(h,f===v),h++;else break}}m=l()}for(;h<s.length;)n(h,!1),h++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,u),this._regions=s,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let s=[];for(let a=0;a<this._regions.length;a++)if(this._regions.isCollapsed(a)){let u=this._textModel.getDecorationRange(this._editorDecorationIds[a]);if(u){let r=u.startLineNumber,i=u.endLineNumber+this._regions.getEndLineNumber(a)-this._regions.getStartLineNumber(a);s.push({startLineNumber:r,endLineNumber:i})}}if(s.length>0)return s}applyMemento(s){if(!!Array.isArray(s)){let a=[];for(let u of s){let r=this.getRegionAtLine(u.startLineNumber);r&&!r.isCollapsed&&a.push(r)}this.toggleCollapseState(a)}}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(s,a){let u=[];if(this._regions){let r=this._regions.findRange(s),i=1;for(;r>=0;){let n=this._regions.toRegion(r);(!a||a(n,i))&&u.push(n),i++,r=n.parentIndex}}return u}getRegionAtLine(s){if(this._regions){let a=this._regions.findRange(s);if(a>=0)return this._regions.toRegion(a)}return null}getRegionsInside(s,a){let u=[],r=s?s.regionIndex+1:0,i=s?s.endLineNumber:Number.MAX_VALUE;if(a&&a.length===2){const n=[];for(let t=r,l=this._regions.length;t<l;t++){let h=this._regions.toRegion(t);if(this._regions.getStartLineNumber(t)<i){for(;n.length>0&&!h.containedBy(n[n.length-1]);)n.pop();n.push(h),a(h,n.length)&&u.push(h)}else break}}else for(let n=r,t=this._regions.length;n<t;n++){let l=this._regions.toRegion(n);if(this._regions.getStartLineNumber(n)<i)(!a||a(l))&&u.push(l);else break}return u}}e.FoldingModel=M;function w(o,s,a){let u=[];for(let r of a){let i=o.getRegionAtLine(r);if(i){const n=!i.isCollapsed;if(u.push(i),s>1){let t=o.getRegionsInside(i,(l,h)=>l.isCollapsed!==n&&h<s);u.push(...t)}}}o.toggleCollapseState(u)}e.toggleCollapseState=w;function S(o,s,a=Number.MAX_VALUE,u){let r=[];if(u&&u.length>0)for(let i of u){let n=o.getRegionAtLine(i);if(n&&(n.isCollapsed!==s&&r.push(n),a>1)){let t=o.getRegionsInside(n,(l,h)=>l.isCollapsed!==s&&h<a);r.push(...t)}}else{let i=o.getRegionsInside(null,(n,t)=>n.isCollapsed!==s&&t<a);r.push(...i)}o.toggleCollapseState(r)}e.setCollapseStateLevelsDown=S;function C(o,s,a,u){let r=[];for(let i of u){let n=o.getAllRegionsAtLine(i,(t,l)=>t.isCollapsed!==s&&l<=a);r.push(...n)}o.toggleCollapseState(r)}e.setCollapseStateLevelsUp=C;function d(o,s,a){let u=[];for(let r of a){let i=o.getAllRegionsAtLine(r,n=>n.isCollapsed!==s);i.length>0&&u.push(i[0])}o.toggleCollapseState(u)}e.setCollapseStateUp=d;function g(o,s,a,u){let r=(n,t)=>t===s&&n.isCollapsed!==a&&!u.some(l=>n.containsLine(l)),i=o.getRegionsInside(null,r);o.toggleCollapseState(i)}e.setCollapseStateAtLevel=g;function p(o,s,a){let u=o.textModel,r=o.regions,i=[];for(let n=r.length-1;n>=0;n--)if(a!==r.isCollapsed(n)){let t=r.getStartLineNumber(n);s.test(u.getLineContent(t))&&i.push(r.toRegion(n))}o.toggleCollapseState(i)}e.setCollapseStateForMatchingLines=p;function c(o,s,a){let u=o.regions,r=[];for(let i=u.length-1;i>=0;i--)a!==u.isCollapsed(i)&&s===u.getType(i)&&r.push(u.toRegion(i));o.toggleCollapseState(r)}e.setCollapseStateForType=c}),define(Q[406],J([0,1,6,3,19]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HiddenRangeModel=void 0;class w{constructor(g){this._updateEventEmitter=new b.Emitter,this._foldingModel=g,this._foldingModelListener=g.onDidChange(p=>this.updateHiddenRanges()),this._hiddenRanges=[],g.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let g=!1,p=[],c=0,o=0,s=Number.MAX_VALUE,a=-1,u=this._foldingModel.regions;for(;c<u.length;c++)if(!!u.isCollapsed(c)){let r=u.getStartLineNumber(c)+1,i=u.getEndLineNumber(c);s<=r&&i<=a||(!g&&o<this._hiddenRanges.length&&this._hiddenRanges[o].startLineNumber===r&&this._hiddenRanges[o].endLineNumber===i?(p.push(this._hiddenRanges[o]),o++):(g=!0,p.push(new N.Range(r,1,i,1))),s=r,a=i)}(g||o<this._hiddenRanges.length)&&this.applyHiddenRanges(p)}applyMemento(g){if(!Array.isArray(g)||g.length===0)return!1;let p=[];for(let c of g){if(!c.startLineNumber||!c.endLineNumber)return!1;p.push(new N.Range(c.startLineNumber+1,1,c.endLineNumber,1))}return this.applyHiddenRanges(p),!0}getMemento(){return this._hiddenRanges.map(g=>({startLineNumber:g.startLineNumber-1,endLineNumber:g.endLineNumber}))}applyHiddenRanges(g){this._hiddenRanges=g,this._updateEventEmitter.fire(g)}hasRanges(){return this._hiddenRanges.length>0}isHidden(g){return C(this._hiddenRanges,g)!==null}adjustSelections(g){let p=!1,c=this._foldingModel.textModel,o=null,s=a=>((!o||!S(a,o))&&(o=C(this._hiddenRanges,a)),o?o.startLineNumber-1:null);for(let a=0,u=g.length;a<u;a++){let r=g[a],i=s(r.startLineNumber);i&&(r=r.setStartPosition(i,c.getLineMaxColumn(i)),p=!0);let n=s(r.endLineNumber);n&&(r=r.setEndPosition(n,c.getLineMaxColumn(n)),p=!0),g[a]=r}return p}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=w;function S(d,g){return d>=g.startLineNumber&&d<=g.endLineNumber}function C(d,g){let p=M.findFirstInSorted(d,c=>g<c.startLineNumber)-1;return p>=0&&d[p].endLineNumber>=g?d[p]:null}}),define(Q[225],J([0,1,12,174,2]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.RangesCollector=e.SyntaxRangeProvider=e.ID_SYNTAX_PROVIDER=void 0;const w=5e3,S={};e.ID_SYNTAX_PROVIDER="syntax";class C{constructor(o,s,a,u=w){this.editorModel=o,this.providers=s,this.limit=u,this.id=e.ID_SYNTAX_PROVIDER;for(const r of s)typeof r.onDidChange=="function"&&(this.disposables||(this.disposables=new M.DisposableStore),this.disposables.add(r.onDidChange(a)))}compute(o){return d(this.providers,this.editorModel,o).then(s=>s?p(s,this.limit):null)}dispose(){var o;(o=this.disposables)===null||o===void 0||o.dispose()}}e.SyntaxRangeProvider=C;function d(c,o,s){let a=null,u=c.map((r,i)=>Promise.resolve(r.provideFoldingRanges(o,S,s)).then(n=>{if(!s.isCancellationRequested&&Array.isArray(n)){Array.isArray(a)||(a=[]);let t=o.getLineCount();for(let l of n)l.start>0&&l.end>l.start&&l.end<=t&&a.push({start:l.start,end:l.end,rank:i,kind:l.kind})}},b.onUnexpectedExternalError));return Promise.all(u).then(r=>a)}class g{constructor(o){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=o}add(o,s,a,u){if(!(o>N.MAX_LINE_NUMBER||s>N.MAX_LINE_NUMBER)){let r=this._length;this._startIndexes[r]=o,this._endIndexes[r]=s,this._nestingLevels[r]=u,this._types[r]=a,this._length++,u<30&&(this._nestingLevelCounts[u]=(this._nestingLevelCounts[u]||0)+1)}}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let o=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let a=0;a<this._length;a++)o[a]=this._startIndexes[a],s[a]=this._endIndexes[a];return new N.FoldingRegions(o,s,this._types)}else{let o=0,s=this._nestingLevelCounts.length;for(let i=0;i<this._nestingLevelCounts.length;i++){let n=this._nestingLevelCounts[i];if(n){if(n+o>this._foldingRangesLimit){s=i;break}o+=n}}let a=new Uint32Array(this._foldingRangesLimit),u=new Uint32Array(this._foldingRangesLimit),r=[];for(let i=0,n=0;i<this._length;i++){let t=this._nestingLevels[i];(t<s||t===s&&o++<this._foldingRangesLimit)&&(a[n]=this._startIndexes[i],u[n]=this._endIndexes[i],r[n]=this._types[i],n++)}return new N.FoldingRegions(a,u,r)}}}e.RangesCollector=g;function p(c,o){let s=c.sort((i,n)=>{let t=i.start-n.start;return t===0&&(t=i.rank-n.rank),t}),a=new g(o),u,r=[];for(let i of s)if(!u)u=i,a.add(i.start,i.end,i.kind&&i.kind.value,r.length);else if(i.start>u.start)if(i.end<=u.end)r.push(u),u=i,a.add(i.start,i.end,i.kind&&i.kind.value,r.length);else{if(i.start>u.end){do u=r.pop();while(u&&i.start>u.end);u&&r.push(u),u=i}a.add(i.start,i.end,i.kind&&i.kind.value,r.length)}return a.toIndentRanges()}e.sanitizeRanges=p}),define(Q[407],J([0,1,225]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InitializingRangeProvider=e.ID_INIT_PROVIDER=void 0,e.ID_INIT_PROVIDER="init";class N{constructor(w,S,C,d){if(this.editorModel=w,this.id=e.ID_INIT_PROVIDER,S.length){let g=p=>({range:{startLineNumber:p.startLineNumber,startColumn:0,endLineNumber:p.endLineNumber,endColumn:w.getLineLength(p.endLineNumber)},options:{stickiness:1}});this.decorationIds=w.deltaDecorations([],S.map(g)),this.timeout=setTimeout(C,d)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),typeof this.timeout=="number"&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(w){let S=[];if(this.decorationIds)for(let C of this.decorationIds){let d=this.editorModel.getDecorationRange(C);d&&S.push({start:d.startLineNumber,end:d.endLineNumber,rank:1})}return Promise.resolve(b.sanitizeRanges(S,Number.MAX_VALUE))}}e.InitializingRangeProvider=N}),define(Q[226],J([0,1,62,3]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class M{static _handleEolEdits(S,C){let d,g=[];for(let p of C)typeof p.eol=="number"&&(d=p.eol),p.range&&typeof p.text=="string"&&g.push(p);return typeof d=="number"&&S.hasModel()&&S.getModel().pushEOL(d),g}static _isFullModelReplaceEdit(S,C){if(!S.hasModel())return!1;const d=S.getModel(),g=d.validateRange(C.range);return d.getFullModelRange().equalsRange(g)}static execute(S,C,d){d&&S.pushUndoStop();const g=M._handleEolEdits(S,C);g.length===1&&M._isFullModelReplaceEdit(S,g[0])?S.executeEdits("formatEditsCommand",g.map(p=>b.EditOperation.replace(N.Range.lift(p.range),p.text))):S.executeEdits("formatEditsCommand",g.map(p=>b.EditOperation.replaceMove(N.Range.lift(p.range),p.text))),d&&S.pushUndoStop()}}e.FormattingEdit=M}),define(Q[227],J([0,1,2,6,17]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function w(c,o){return!!c[o]}class S{constructor(o,s){this.target=o.target,this.hasTriggerModifier=w(o.event,s.triggerModifier),this.hasSideBySideModifier=w(o.event,s.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=o.event.detail<=1}}e.ClickLinkMouseEvent=S;class C{constructor(o,s){this.keyCodeIsTriggerKey=o.keyCode===s.triggerKey,this.keyCodeIsSideBySideKey=o.keyCode===s.triggerSideBySideKey,this.hasTriggerModifier=w(o,s.triggerModifier)}}e.ClickLinkKeyboardEvent=C;class d{constructor(o,s,a,u){this.triggerKey=o,this.triggerModifier=s,this.triggerSideBySideKey=a,this.triggerSideBySideModifier=u}equals(o){return this.triggerKey===o.triggerKey&&this.triggerModifier===o.triggerModifier&&this.triggerSideBySideKey===o.triggerSideBySideKey&&this.triggerSideBySideModifier===o.triggerSideBySideModifier}}e.ClickLinkOptions=d;function g(c){return c==="altKey"?M.isMacintosh?new d(57,"metaKey",6,"altKey"):new d(5,"ctrlKey",6,"altKey"):M.isMacintosh?new d(6,"altKey",57,"metaKey"):new d(6,"altKey",5,"ctrlKey")}class p extends b.Disposable{constructor(o){super();this._onMouseMoveOrRelevantKeyDown=this._register(new N.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new N.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new N.Emitter),this.onCancel=this._onCancel.event,this._editor=o,this._opts=g(this._editor.getOption(64)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(s=>{if(s.hasChanged(64)){const a=g(this._editor.getOption(64));if(this._opts.equals(a))return;this._opts=a,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(s=>this._onEditorMouseMove(new S(s,this._opts)))),this._register(this._editor.onMouseDown(s=>this._onEditorMouseDown(new S(s,this._opts)))),this._register(this._editor.onMouseUp(s=>this._onEditorMouseUp(new S(s,this._opts)))),this._register(this._editor.onKeyDown(s=>this._onEditorKeyDown(new C(s,this._opts)))),this._register(this._editor.onKeyUp(s=>this._onEditorKeyUp(new C(s,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(s=>this._onDidChangeCursorSelection(s))),this._register(this._editor.onDidChangeModel(s=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(s=>{(s.scrollTopChanged||s.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(o){o.selection&&o.selection.startColumn!==o.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(o){this._lastMouseMoveEvent=o,this._onMouseMoveOrRelevantKeyDown.fire([o,null])}_onEditorMouseDown(o){this._hasTriggerKeyOnMouseDown=o.hasTriggerModifier,this._lineNumberOnMouseDown=o.target.position?o.target.position.lineNumber:0}_onEditorMouseUp(o){const s=o.target.position?o.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===s&&this._onExecute.fire(o)}_onEditorKeyDown(o){this._lastMouseMoveEvent&&(o.keyCodeIsTriggerKey||o.keyCodeIsSideBySideKey&&o.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,o]):o.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(o){o.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=p}),define(Q[228],J([0,1,15,12]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=void 0;class M{constructor(S,C,d,g,p){this._computer=S,this._state=0,this._hoverTime=p,this._firstWaitScheduler=new b.RunOnceScheduler(()=>this._triggerAsyncComputation(),0),this._secondWaitScheduler=new b.RunOnceScheduler(()=>this._triggerSyncComputation(),0),this._loadingMessageScheduler=new b.RunOnceScheduler(()=>this._showLoadingMessage(),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=C,this._errorCallback=d,this._progressCallback=g}setHoverTime(S){this._hoverTime=S}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=b.createCancelablePromise(S=>this._computer.computeAsync(S)),this._asyncComputationPromise.then(S=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(S)},S=>this._onError(S))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){this._state===3&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(S){S&&this._computer.onResult(S,!1),this._state===3&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(S){this._completeCallback(S)}_onError(S){this._errorCallback?this._errorCallback(S):N.onUnexpectedError(S)}_onProgress(S){this._progressCallback(S)}start(S){if(S===0)this._state===0&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._loadingMessageScheduler.cancel(),this._state===1&&this._firstWaitScheduler.cancel(),this._state===2&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),this._state===3&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}e.HoverOperation=M}),define(Q[408],J([0,1,52]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphHoverWidget=void 0;class N extends b.Widget{constructor(w,S){super();this._id=w,this._editor=S,this._isVisible=!1,this._domNode=document.createElement("div"),this._domNode.className="monaco-hover hidden",this._domNode.setAttribute("aria-hidden","true"),this._domNode.setAttribute("role","tooltip"),this._showAtLineNumber=-1,this._register(this._editor.onDidChangeConfiguration(C=>{C.hasChanged(38)&&this.updateFont()})),this._editor.addOverlayWidget(this)}get isVisible(){return this._isVisible}set isVisible(w){this._isVisible=w,this._domNode.classList.toggle("hidden",!this._isVisible)}getId(){return this._id}getDomNode(){return this._domNode}showAt(w){this._showAtLineNumber=w,this.isVisible||(this.isVisible=!0);const S=this._editor.getLayoutInfo(),C=this._editor.getTopForLineNumber(this._showAtLineNumber),d=this._editor.getScrollTop(),g=this._editor.getOption(53),p=this._domNode.clientHeight,c=C-d-(p-g)/2;this._domNode.style.left=`${S.glyphMarginLeft+S.glyphMarginWidth}px`,this._domNode.style.top=`${Math.max(Math.round(c),0)}px`}hide(){!this.isVisible||(this.isVisible=!1)}getPosition(){return null}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}updateFont(){const w=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),S=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));[...w,...S].forEach(C=>this._editor.applyFontInfo(C))}updateContents(w){this._domNode.textContent="",this._domNode.appendChild(w),this.updateFont()}}e.GlyphHoverWidget=N}),define(Q[409],J([0,1,21]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class N{constructor(w,S,C){this._editRange=w,this._originalSelection=S,this._text=C}getEditOperations(w,S){S.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(w,S){const d=S.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new b.Selection(d.endLineNumber,Math.min(this._originalSelection.positionColumn,d.endColumn),d.endLineNumber,Math.min(this._originalSelection.positionColumn,d.endColumn)):new b.Selection(d.endLineNumber,d.endColumn-this._text.length,d.endLineNumber,d.endColumn)}}e.InPlaceReplaceCommand=N}),define(Q[229],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function b(M,w){let S=0;for(let C=0;C<M.length;C++)M.charAt(C)===" "?S+=w:S++;return S}e.getSpaceCnt=b;function N(M,w,S){M=M<0?0:M;let C="";if(!S){let d=Math.floor(M/w);M=M%w;for(let g=0;g<d;g++)C+=" "}for(let d=0;d<M;d++)C+=" ";return C}e.generateIndent=N}),define(Q[410],J([0,1,3,21]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class M{constructor(S,C,d){this._selection=S,this._isCopyingDown=C,this._noop=d||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(S,C){let d=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,d.startLineNumber<d.endLineNumber&&d.endColumn===1&&(this._endLineNumberDelta=1,d=d.setEndPosition(d.endLineNumber-1,S.getLineMaxColumn(d.endLineNumber-1)));let g=[];for(let c=d.startLineNumber;c<=d.endLineNumber;c++)g.push(S.getLineContent(c));const p=g.join(`
`);p===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?C.addEditOperation(new b.Range(d.endLineNumber,S.getLineMaxColumn(d.endLineNumber),d.endLineNumber+1,1),d.endLineNumber===S.getLineCount()?"":`
`):this._isCopyingDown?C.addEditOperation(new b.Range(d.startLineNumber,1,d.startLineNumber,1),p+`
`):C.addEditOperation(new b.Range(d.endLineNumber,S.getLineMaxColumn(d.endLineNumber),d.endLineNumber,S.getLineMaxColumn(d.endLineNumber)),`
`+p),this._selectionId=C.trackSelection(d),this._selectionDirection=this._selection.getDirection()}computeCursorState(S,C){let d=C.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let g=d.startLineNumber,p=d.startColumn,c=d.endLineNumber,o=d.endColumn;this._startLineNumberDelta!==0&&(g=g+this._startLineNumberDelta,p=1),this._endLineNumberDelta!==0&&(c=c+this._endLineNumberDelta,o=1),d=N.Selection.createWithDirection(g,p,c,o,this._selectionDirection)}return d}}e.CopyLinesCommand=M}),define(Q[411],J([0,1,62,3]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class M{constructor(d,g){this.selection=d,this.descending=g,this.selectionId=null}static getCollator(){return M._COLLATOR||(M._COLLATOR=new Intl.Collator),M._COLLATOR}getEditOperations(d,g){let p=S(d,this.selection,this.descending);p&&g.addEditOperation(p.range,p.text),this.selectionId=g.trackSelection(this.selection)}computeCursorState(d,g){return g.getTrackedSelection(this.selectionId)}static canRun(d,g,p){if(d===null)return!1;let c=w(d,g,p);if(!c)return!1;for(let o=0,s=c.before.length;o<s;o++)if(c.before[o]!==c.after[o])return!0;return!1}}e.SortLinesCommand=M,M._COLLATOR=null;function w(C,d,g){let p=d.startLineNumber,c=d.endLineNumber;if(d.endColumn===1&&c--,p>=c)return null;let o=[];for(let a=p;a<=c;a++)o.push(C.getLineContent(a));let s=o.slice(0);return s.sort(M.getCollator().compare),g===!0&&(s=s.reverse()),{startLineNumber:p,endLineNumber:c,before:o,after:s}}function S(C,d,g){let p=w(C,d,g);return p?b.EditOperation.replace(new N.Range(p.startLineNumber,1,p.endLineNumber,C.getLineMaxColumn(p.endLineNumber)),p.after.join(`
`)):null}}),define(Q[230],J([0,1,14,3,71]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class w{provideSelectionRanges(C,d){return Ie(this,void 0,void 0,function*(){const g=[];for(const p of d){const c=[];g.push(c);const o=new Map;yield new Promise(s=>w._bracketsRightYield(s,0,C,p,o)),yield new Promise(s=>w._bracketsLeftYield(s,0,C,p,o,c))}return g})}static _bracketsRightYield(C,d,g,p,c){const o=new Map,s=Date.now();for(;;){if(d>=w._maxRounds){C();break}if(!p){C();break}let a=g.findNextBracket(p);if(!a){C();break}if(Date.now()-s>w._maxDuration){setTimeout(()=>w._bracketsRightYield(C,d+1,g,p,c));break}const r=a.close[0];if(a.isOpen){let i=o.has(r)?o.get(r):0;o.set(r,i+1)}else{let i=o.has(r)?o.get(r):0;if(i-=1,o.set(r,Math.max(0,i)),i<0){let n=c.get(r);n||(n=new M.LinkedList,c.set(r,n)),n.push(a.range)}}p=a.range.getEndPosition()}}static _bracketsLeftYield(C,d,g,p,c,o){const s=new Map,a=Date.now();for(;;){if(d>=w._maxRounds&&c.size===0){C();break}if(!p){C();break}let u=g.findPrevBracket(p);if(!u){C();break}if(Date.now()-a>w._maxDuration){setTimeout(()=>w._bracketsLeftYield(C,d+1,g,p,c,o));break}const i=u.close[0];if(u.isOpen){let n=s.has(i)?s.get(i):0;if(n-=1,s.set(i,Math.max(0,n)),n<0){let t=c.get(i);if(t){let l=t.shift();t.size===0&&c.delete(i);const h=N.Range.fromPositions(u.range.getEndPosition(),l.getStartPosition()),m=N.Range.fromPositions(u.range.getStartPosition(),l.getEndPosition());o.push({range:h}),o.push({range:m}),w._addBracketLeading(g,m,o)}}}else{let n=s.has(i)?s.get(i):0;s.set(i,n+1)}p=u.range.getStartPosition()}}static _addBracketLeading(C,d,g){if(d.startLineNumber!==d.endLineNumber){const p=d.startLineNumber,c=C.getLineFirstNonWhitespaceColumn(p);c!==0&&c!==d.startColumn&&(g.push({range:N.Range.fromPositions(new b.Position(p,c),d.getEndPosition())}),g.push({range:N.Range.fromPositions(new b.Position(p,1),d.getEndPosition())}));const o=p-1;if(o>0){const s=C.getLineFirstNonWhitespaceColumn(o);s===d.startColumn&&s!==C.getLineLastNonWhitespaceColumn(o)&&(g.push({range:N.Range.fromPositions(new b.Position(o,s),d.getEndPosition())}),g.push({range:N.Range.fromPositions(new b.Position(o,1),d.getEndPosition())}))}}}}e.BracketSelectionRangeProvider=w,w._maxDuration=30,w._maxRounds=2}),define(Q[412],J([0,1,3,8]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class M{provideSelectionRanges(S,C){const d=[];for(const g of C){const p=[];d.push(p),this._addInWordRanges(p,S,g),this._addWordRanges(p,S,g),this._addWhitespaceLine(p,S,g),p.push({range:S.getFullModelRange()})}return d}_addInWordRanges(S,C,d){const g=C.getWordAtPosition(d);if(!!g){let{word:p,startColumn:c}=g,o=d.column-c,s=o,a=o,u=0;for(;s>=0;s--){let r=p.charCodeAt(s);if(s!==o&&(r===95||r===45))break;if(N.isLowerAsciiLetter(r)&&N.isUpperAsciiLetter(u))break;u=r}for(s+=1;a<p.length;a++){let r=p.charCodeAt(a);if(N.isUpperAsciiLetter(r)&&N.isLowerAsciiLetter(u))break;if(r===95||r===45)break;u=r}s<a&&S.push({range:new b.Range(d.lineNumber,c+s,d.lineNumber,c+a)})}}_addWordRanges(S,C,d){const g=C.getWordAtPosition(d);g&&S.push({range:new b.Range(d.lineNumber,g.startColumn,d.lineNumber,g.endColumn)})}_addWhitespaceLine(S,C,d){C.getLineLength(d.lineNumber)>0&&C.getLineFirstNonWhitespaceColumn(d.lineNumber)===0&&C.getLineLastNonWhitespaceColumn(d.lineNumber)===0&&S.push({range:new b.Range(d.lineNumber,1,d.lineNumber,C.getLineMaxColumn(d.lineNumber))})}}e.WordSelectionRangeProvider=M}),define(Q[131],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetParser=e.TextmateSnippet=e.Variable=e.FormatString=e.Transform=e.Choice=e.Placeholder=e.TransformableMarker=e.Text=e.Marker=e.Scanner=void 0;class b{constructor(){this.value="",this.pos=0}static isDigitCharacter(u){return u>=48&&u<=57}static isVariableCharacter(u){return u===95||u>=97&&u<=122||u>=65&&u<=90}text(u){this.value=u,this.pos=0}tokenText(u){return this.value.substr(u.pos,u.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let u=this.pos,r=0,i=this.value.charCodeAt(u),n;if(n=b._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:u,len:1};if(b.isDigitCharacter(i)){n=8;do r+=1,i=this.value.charCodeAt(u+r);while(b.isDigitCharacter(i));return this.pos+=r,{type:n,pos:u,len:r}}if(b.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(u+ ++r);while(b.isVariableCharacter(i)||b.isDigitCharacter(i));return this.pos+=r,{type:n,pos:u,len:r}}n=10;do r+=1,i=this.value.charCodeAt(u+r);while(!isNaN(i)&&typeof b._table[i]=="undefined"&&!b.isDigitCharacter(i)&&!b.isVariableCharacter(i));return this.pos+=r,{type:n,pos:u,len:r}}}e.Scanner=b,b._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class N{constructor(){this._children=[]}appendChild(u){return u instanceof M&&this._children[this._children.length-1]instanceof M?this._children[this._children.length-1].value+=u.value:(u.parent=this,this._children.push(u)),this}replace(u,r){const{parent:i}=u,n=i.children.indexOf(u),t=i.children.slice(0);t.splice(n,1,...r),i._children=t,function l(h,m){for(const _ of h)_.parent=m,l(_.children,_)}(r,i)}get children(){return this._children}get snippet(){let u=this;for(;;){if(!u)return;if(u instanceof o)return u;u=u.parent}}toString(){return this.children.reduce((u,r)=>u+r.toString(),"")}len(){return 0}}e.Marker=N;class M extends N{constructor(u){super();this.value=u}toString(){return this.value}len(){return this.value.length}clone(){return new M(this.value)}}e.Text=M;class w extends N{}e.TransformableMarker=w;class S extends w{constructor(u){super();this.index=u}static compareByIndex(u,r){return u.index===r.index?0:u.isFinalTabstop?1:r.isFinalTabstop||u.index<r.index?-1:u.index>r.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof C?this._children[0]:void 0}clone(){let u=new S(this.index);return this.transform&&(u.transform=this.transform.clone()),u._children=this.children.map(r=>r.clone()),u}}e.Placeholder=S;class C extends N{constructor(){super(...arguments);this.options=[]}appendChild(u){return u instanceof M&&(u.parent=this,this.options.push(u)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let u=new C;return this.options.forEach(u.appendChild,u),u}}e.Choice=C;class d extends N{constructor(){super(...arguments);this.regexp=new RegExp("")}resolve(u){const r=this;let i=!1,n=u.replace(this.regexp,function(){return i=!0,r._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(t=>t instanceof g&&Boolean(t.elseValue))&&(n=this._replace([])),n}_replace(u){let r="";for(const i of this._children)if(i instanceof g){let n=u[i.index]||"";n=i.resolve(n),r+=n}else r+=i.toString();return r}toString(){return""}clone(){let u=new d;return u.regexp=new RegExp(this.regexp.source,""+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),u._children=this.children.map(r=>r.clone()),u}}e.Transform=d;class g extends N{constructor(u,r,i,n){super();this.index=u,this.shorthandName=r,this.ifValue=i,this.elseValue=n}resolve(u){return this.shorthandName==="upcase"?u?u.toLocaleUpperCase():"":this.shorthandName==="downcase"?u?u.toLocaleLowerCase():"":this.shorthandName==="capitalize"?u?u[0].toLocaleUpperCase()+u.substr(1):"":this.shorthandName==="pascalcase"?u?this._toPascalCase(u):"":Boolean(u)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(u)&&typeof this.elseValue=="string"?this.elseValue:u||""}_toPascalCase(u){const r=u.match(/[a-z]+/gi);return r?r.map(function(i){return i.charAt(0).toUpperCase()+i.substr(1).toLowerCase()}).join(""):u}clone(){return new g(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=g;class p extends w{constructor(u){super();this.name=u}resolve(u){let r=u.resolve(this);return this.transform&&(r=this.transform.resolve(r||"")),r!==void 0?(this._children=[new M(r)],!0):!1}clone(){const u=new p(this.name);return this.transform&&(u.transform=this.transform.clone()),u._children=this.children.map(r=>r.clone()),u}}e.Variable=p;function c(a,u){const r=[...a];for(;r.length>0;){const i=r.shift();if(!u(i))break;r.unshift(...i.children)}}class o extends N{get placeholderInfo(){if(!this._placeholders){let u=[],r;this.walk(function(i){return i instanceof S&&(u.push(i),r=!r||r.index<i.index?i:r),!0}),this._placeholders={all:u,last:r}}return this._placeholders}get placeholders(){const{all:u}=this.placeholderInfo;return u}offset(u){let r=0,i=!1;return this.walk(n=>n===u?(i=!0,!1):(r+=n.len(),!0)),i?r:-1}fullLen(u){let r=0;return c([u],i=>(r+=i.len(),!0)),r}enclosingPlaceholders(u){let r=[],{parent:i}=u;for(;i;)i instanceof S&&r.push(i),i=i.parent;return r}resolveVariables(u){return this.walk(r=>(r instanceof p&&r.resolve(u)&&(this._placeholders=void 0),!0)),this}appendChild(u){return this._placeholders=void 0,super.appendChild(u)}replace(u,r){return this._placeholders=void 0,super.replace(u,r)}clone(){let u=new o;return this._children=this.children.map(r=>r.clone()),u}walk(u){c(this.children,u)}}e.TextmateSnippet=o;class s{constructor(){this._scanner=new b,this._token={type:14,pos:0,len:0}}static escape(u){return u.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(u){return/\${?CLIPBOARD/.test(u)}parse(u,r,i){this._scanner.text(u),this._token=this._scanner.next();const n=new o;for(;this._parse(n););const t=new Map,l=[];let h=0;n.walk(m=>(m instanceof S&&(h+=1,m.isFinalTabstop?t.set(0,void 0):!t.has(m.index)&&m.children.length>0?t.set(m.index,m.children):l.push(m)),!0));for(const m of l){const _=t.get(m.index);if(_){const f=new S(m.index);f.transform=m.transform;for(const v of _)f.appendChild(v.clone());n.replace(m,[f])}}return i||(i=h>0&&r),!t.has(0)&&i&&n.appendChild(new S(0)),n}_accept(u,r){if(u===void 0||this._token.type===u){let i=r?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(u){return this._scanner.pos=u.pos+u.len,this._token=u,!1}_until(u){const r=this._token;for(;this._token.type!==u;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(r.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(u){return this._parseEscaped(u)||this._parseTabstopOrVariableName(u)||this._parseComplexPlaceholder(u)||this._parseComplexVariable(u)||this._parseAnything(u)}_parseEscaped(u){let r;return(r=this._accept(5,!0))?(r=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||r,u.appendChild(new M(r)),!0):!1}_parseTabstopOrVariableName(u){let r;const i=this._token;return this._accept(0)&&(r=this._accept(9,!0)||this._accept(8,!0))?(u.appendChild(/^\d+$/.test(r)?new S(Number(r)):new p(r)),!0):this._backTo(i)}_parseComplexPlaceholder(u){let r;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(r=this._accept(8,!0))))return this._backTo(i);const t=new S(Number(r));if(this._accept(1))for(;;){if(this._accept(4))return u.appendChild(t),!0;if(!this._parse(t))return u.appendChild(new M("${"+r+":")),t.children.forEach(u.appendChild,u),!0}else if(t.index>0&&this._accept(7)){const l=new C;for(;;){if(this._parseChoiceElement(l)){if(this._accept(2))continue;if(this._accept(7)&&(t.appendChild(l),this._accept(4)))return u.appendChild(t),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(t)?(u.appendChild(t),!0):(this._backTo(i),!1):this._accept(4)?(u.appendChild(t),!0):this._backTo(i)}_parseChoiceElement(u){const r=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(r),!1;i.push(n)}return i.length===0?(this._backTo(r),!1):(u.appendChild(new M(i.join(""))),!0)}_parseComplexVariable(u){let r;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(r=this._accept(9,!0))))return this._backTo(i);const t=new p(r);if(this._accept(1))for(;;){if(this._accept(4))return u.appendChild(t),!0;if(!this._parse(t))return u.appendChild(new M("${"+r+":")),t.children.forEach(u.appendChild,u),!0}else return this._accept(6)?this._parseTransform(t)?(u.appendChild(t),!0):(this._backTo(i),!1):this._accept(4)?(u.appendChild(t),!0):this._backTo(i)}_parseTransform(u){let r=new d,i="",n="";for(;!this._accept(6);){let t;if(t=this._accept(5,!0)){t=this._accept(6,!0)||t,i+=t;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let t;if(t=this._accept(5,!0)){t=this._accept(5,!0)||this._accept(6,!0)||t,r.appendChild(new M(t));continue}if(!(this._parseFormatString(r)||this._parseAnything(r)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{r.regexp=new RegExp(i,n)}catch(t){return!1}return u.transform=r,!0}_parseFormatString(u){const r=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return u.appendChild(new g(Number(n))),!0;if(!this._accept(1))return this._backTo(r),!1}else return u.appendChild(new g(Number(n))),!0;else return this._backTo(r),!1;if(this._accept(6)){let t=this._accept(9,!0);return!t||!this._accept(4)?(this._backTo(r),!1):(u.appendChild(new g(Number(n),t)),!0)}else if(this._accept(11)){let t=this._until(4);if(t)return u.appendChild(new g(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return u.appendChild(new g(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let l=this._until(4);if(l)return u.appendChild(new g(Number(n),void 0,t,l)),!0}}else{let t=this._until(4);if(t)return u.appendChild(new g(Number(n),void 0,void 0,t)),!0}return this._backTo(r),!1}_parseAnything(u){return this._token.type!==14?(u.appendChild(new M(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=s}),define(Q[413],J([0,1,66,8,19]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class w{constructor(d,g){this.leadingLineContent=d,this.characterCountDelta=g}}e.LineContext=w;class S{constructor(d,g,p,c,o,s,a){this.clipboardText=a,this._snippetCompareFn=S._compareCompletionItems,this._items=d,this._column=g,this._wordDistance=c,this._options=o,this._refilterKind=1,this._lineContext=p,s==="top"?this._snippetCompareFn=S._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=S._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(d){(this._lineContext.leadingLineContent!==d.leadingLineContent||this._lineContext.characterCountDelta!==d.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<d.characterCountDelta&&this._filteredItems?2:1,this._lineContext=d)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const d=new Set;for(let[g,p]of this._providerInfo)p&&d.add(g);return d}adopt(d){let g=[];for(let p=0;p<this._items.length;)d.has(this._items[p].provider)?p++:(g.push(this._items[p]),this._items[p]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,g}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const d=[],{leadingLineContent:g,characterCountDelta:p}=this._lineContext;let c="",o="";const s=this._refilterKind===1?this._items:this._filteredItems,a=[],u=!this._options.filterGraceful||s.length>2e3?b.fuzzyScore:b.fuzzyScoreGracefulAggressive;for(let r=0;r<s.length;r++){const i=s[r];if(!i.isInvalid){this._providerInfo.set(i.provider,Boolean(i.container.incomplete));const n=i.position.column-i.editStart.column,t=n+p-(i.position.column-this._column);c.length!==t&&(c=t===0?"":g.slice(-t),o=c.toLowerCase());const l=typeof i.completion.label=="string"?i.completion.label:i.completion.label.name;if(i.word=c,t===0)i.score=b.FuzzyScore.Default;else{let h=0;for(;h<n;){const m=c.charCodeAt(h);if(m===32||m===9)h+=1;else break}if(h>=t)i.score=b.FuzzyScore.Default;else if(typeof i.completion.filterText=="string"){let m=u(c,o,h,i.completion.filterText,i.filterTextLow,0,!1);if(!m)continue;N.compareIgnoreCase(i.completion.filterText,l)===0?i.score=m:(i.score=b.anyScore(c,o,h,l,i.labelLow,0),i.score[0]=m[0])}else{let m=u(c,o,h,l,i.labelLow,0,!1);if(!m)continue;i.score=m}}i.idx=r,i.distance=this._wordDistance.distance(i.position,i.completion),a.push(i),d.push(l.length)}}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:d.length?M.quickSelect(d.length-.85,d,(r,i)=>r-i):0}}static _compareCompletionItems(d,g){return d.score[0]>g.score[0]?-1:d.score[0]<g.score[0]?1:d.distance<g.distance?-1:d.distance>g.distance?1:d.idx<g.idx?-1:d.idx>g.idx?1:0}static _compareCompletionItemsSnippetsDown(d,g){if(d.completion.kind!==g.completion.kind){if(d.completion.kind===27)return 1;if(g.completion.kind===27)return-1}return S._compareCompletionItems(d,g)}static _compareCompletionItemsSnippetsUp(d,g){if(d.completion.kind!==g.completion.kind){if(d.completion.kind===27)return-1;if(g.completion.kind===27)return 1}return S._compareCompletionItems(d,g)}}e.CompletionModel=S}),define(Q[231],J([0,1,6,2,7,104]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class S{constructor(){this._onDidWillResize=new b.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new b.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new N.DisposableStore,this._size=new M.Dimension(0,0),this._minSize=new M.Dimension(0,0),this._maxSize=new M.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new w.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new w.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new w.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:w.OrthogonalEdge.North}),this._southSash=new w.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:w.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let d,g=0,p=0;this._sashListener.add(b.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{d===void 0&&(this._onDidWillResize.fire(),d=this._size,g=0,p=0)})),this._sashListener.add(b.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{d!==void 0&&(d=void 0,g=0,p=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(c=>{d&&(p=c.currentX-c.startX,this.layout(d.height+g,d.width+p),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(c=>{d&&(p=-(c.currentX-c.startX),this.layout(d.height+g,d.width+p),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(c=>{d&&(g=-(c.currentY-c.startY),this.layout(d.height+g,d.width+p),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(c=>{d&&(g=c.currentY-c.startY,this.layout(d.height+g,d.width+p),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(b.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(c=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(b.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(c=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this.domNode.remove()}enableSashes(d,g,p,c){this._northSash.state=d?3:0,this._eastSash.state=g?3:0,this._southSash.state=p?3:0,this._westSash.state=c?3:0}layout(d=this.size.height,g=this.size.width){const{height:p,width:c}=this._minSize,{height:o,width:s}=this._maxSize;d=Math.max(p,Math.min(o,d)),g=Math.max(c,Math.min(s,g));const a=new M.Dimension(g,d);M.Dimension.equals(a,this._size)||(this.domNode.style.height=d+"px",this.domNode.style.width=g+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}get size(){return this._size}set maxSize(d){this._maxSize=d}get maxSize(){return this._maxSize}set minSize(d){this._minSize=d}get minSize(){return this._minSize}set preferredSize(d){this._preferredSize=d}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=S}),define(Q[414],J([0,1,19,2,91]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class w{constructor(C,d,g){this._disposables=new N.DisposableStore,this._disposables.add(d.onDidShow(()=>this._onItem(d.getFocusedItem()))),this._disposables.add(d.onDidFocus(this._onItem,this)),this._disposables.add(d.onDidHide(this.reset,this)),this._disposables.add(C.onWillType(p=>{if(this._active&&!d.isFrozen()){const c=p.charCodeAt(p.length-1);this._active.acceptCharacters.has(c)&&C.getOption(0)&&g(this._active.item)}}))}_onItem(C){if(!C||!b.isNonEmptyArray(C.item.completion.commitCharacters)){this.reset();return}if(!(this._active&&this._active.item.item===C.item)){const d=new M.CharacterSet;for(const g of C.item.completion.commitCharacters)g.length>0&&d.add(g.charCodeAt(0));this._active={acceptCharacters:d,item:C}}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=w}),define(Q[415],J([0,1,2]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class N{constructor(w,S){this._disposables=new b.DisposableStore,this._lastOvertyped=[],this._empty=!0,this._disposables.add(w.onWillType(()=>{if(!!this._empty&&!!w.hasModel()){const C=w.getSelections(),d=C.length;let g=!1;for(let c=0;c<d;c++)if(!C[c].isEmpty()){g=!0;break}if(!!g){this._lastOvertyped=[];const p=w.getModel();for(let c=0;c<d;c++){const o=C[c];if(p.getValueLengthInRange(o)>N._maxSelectionLength)return;this._lastOvertyped[c]={value:p.getValueInRange(o),multiline:o.startLineNumber!==o.endLineNumber}}this._empty=!1}}})),this._disposables.add(S.onDidCancel(C=>{!this._empty&&!C.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(w){if(!this._empty&&w>=0&&w<this._lastOvertyped.length)return this._lastOvertyped[w]}dispose(){this._disposables.dispose()}}e.OvertypingCapturer=N,N._maxSelectionLength=51200}),define(Q[416],J([0,1,19,3,230]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class w{static create(C,d){return Ie(this,void 0,void 0,function*(){if(!d.getOption(101).localityBonus||!d.hasModel())return w.None;const g=d.getModel(),p=d.getPosition();if(!C.canComputeWordRanges(g.uri))return w.None;const[c]=yield new M.BracketSelectionRangeProvider().provideSelectionRanges(g,[p]);if(c.length===0)return w.None;const o=yield C.computeWordRanges(g.uri,c[0].range);if(!o)return w.None;const s=g.getWordUntilPosition(p);return delete o[s.word],new class extends w{distance(a,u){if(!p.equals(d.getPosition()))return 0;if(u.kind===17)return 2<<20;let r=typeof u.label=="string"?u.label:u.label.name,i=o[r];if(b.isFalsyOrEmpty(i))return 2<<20;let n=b.binarySearch(i,N.Range.fromPositions(a),N.Range.compareRangesUsingStarts),t=n>=0?i[n]:i[Math.max(0,~n-1)],l=c.length;for(const h of c){if(!N.Range.containsRange(h.range,t))break;l-=1}return l}}})}}e.WordDistance=w,w.None=new class extends w{distance(){return 0}}}),define(Q[232],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stateExists=e.findRules=e.substituteMatches=e.createError=e.log=e.sanitize=e.fixCase=e.empty=e.isIAction=e.isString=e.isFuzzyAction=e.isFuzzyActionArr=void 0;function b(a){return Array.isArray(a)}e.isFuzzyActionArr=b;function N(a){return!b(a)}e.isFuzzyAction=N;function M(a){return typeof a=="string"}e.isString=M;function w(a){return!M(a)}e.isIAction=w;function S(a){return!a}e.empty=S;function C(a,u){return a.ignoreCase&&u?u.toLowerCase():u}e.fixCase=C;function d(a){return a.replace(/[&<>'"_]/g,"-")}e.sanitize=d;function g(a,u){console.log(`${a.languageId}: ${u}`)}e.log=g;function p(a,u){return new Error(`${a.languageId}: ${u}`)}e.createError=p;function c(a,u,r,i,n){const t=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let l=null;return u.replace(t,function(h,m,_,f,v,y,L,I,k){return S(_)?S(f)?!S(v)&&v<i.length?C(a,i[v]):!S(L)&&a&&typeof a[L]=="string"?a[L]:(l===null&&(l=n.split("."),l.unshift(n)),!S(y)&&y<l.length?C(a,l[y]):""):C(a,r):"$"})}e.substituteMatches=c;function o(a,u){let r=u;for(;r&&r.length>0;){const i=a.tokenizer[r];if(i)return i;const n=r.lastIndexOf(".");n<0?r=null:r=r.substr(0,n)}return null}e.findRules=o;function s(a,u){let r=u;for(;r&&r.length>0;){if(a.stateNames[r])return!0;const n=r.lastIndexOf(".");n<0?r=null:r=r.substr(0,n)}return!1}e.stateExists=s}),define(Q[417],J([0,1,232]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function N(a,u){if(!u||!Array.isArray(u))return!1;for(const r of u)if(!a(r))return!1;return!0}function M(a,u){return typeof a=="boolean"?a:u}function w(a,u){return typeof a=="string"?a:u}function S(a){const u={};for(const r of a)u[r]=!0;return u}function C(a,u=!1){u&&(a=a.map(function(i){return i.toLowerCase()}));const r=S(a);return u?function(i){return r[i.toLowerCase()]!==void 0&&r.hasOwnProperty(i.toLowerCase())}:function(i){return r[i]!==void 0&&r.hasOwnProperty(i)}}function d(a,u){let r=0,i;do i=!1,u=u.replace(/(.|^)@(\w+)/g,function(t,l,h){if(l==="@")return t;i=!0;let m="";if(typeof a[h]=="string")m=a[h];else if(a[h]&&a[h]instanceof RegExp)m=a[h].source;else throw a[h]===void 0?b.createError(a,"language definition does not contain attribute '"+h+"', used at: "+u):b.createError(a,"attribute reference '"+h+"' must be a string, used at: "+u);return l+(b.empty(m)?"":"(?:"+m+")")}),r++;while(i&&r<5);u=u.replace(/@@/g,"@");let n=(a.ignoreCase?"i":"")+(a.unicode?"u":"");return new RegExp(u,n)}function g(a,u,r,i){if(i<0)return a;if(i<u.length)return u[i];if(i>=100){i=i-100;let n=r.split(".");if(n.unshift(r),i<n.length)return n[i]}return null}function p(a,u,r,i){let n=-1,t=r,l=r.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);l&&(l[3]&&(n=parseInt(l[3]),l[2]&&(n=n+100)),t=l[4]);let h="~",m=t;!t||t.length===0?(h="!=",m=""):/^\w*$/.test(m)?h="==":(l=t.match(/^(@|!@|~|!~|==|!=)(.*)$/),l&&(h=l[1],m=l[2]));let _;if((h==="~"||h==="!~")&&/^(\w|\|)*$/.test(m)){let f=C(m.split("|"),a.ignoreCase);_=function(v){return h==="~"?f(v):!f(v)}}else if(h==="@"||h==="!@"){let f=a[m];if(!f)throw b.createError(a,"the @ match target '"+m+"' is not defined, in rule: "+u);if(!N(function(y){return typeof y=="string"},f))throw b.createError(a,"the @ match target '"+m+"' must be an array of strings, in rule: "+u);let v=C(f,a.ignoreCase);_=function(y){return h==="@"?v(y):!v(y)}}else if(h==="~"||h==="!~")if(m.indexOf("$")<0){let f=d(a,"^"+m+"$");_=function(v){return h==="~"?f.test(v):!f.test(v)}}else _=function(f,v,y,L){return d(a,"^"+b.substituteMatches(a,m,v,y,L)+"$").test(f)};else if(m.indexOf("$")<0){let f=b.fixCase(a,m);_=function(v){return h==="=="?v===f:v!==f}}else{let f=b.fixCase(a,m);_=function(v,y,L,I,k){let E=b.substituteMatches(a,f,y,L,I);return h==="=="?v===E:v!==E}}return n===-1?{name:r,value:i,test:function(f,v,y,L){return _(f,f,v,y,L)}}:{name:r,value:i,test:function(f,v,y,L){let I=g(f,v,y,n);return _(I||"",f,v,y,L)}}}function c(a,u,r){if(r){if(typeof r=="string")return r;if(r.token||r.token===""){if(typeof r.token!="string")throw b.createError(a,"a 'token' attribute must be of type string, in rule: "+u);{let i={token:r.token};if(r.token.indexOf("$")>=0&&(i.tokenSubst=!0),typeof r.bracket=="string")if(r.bracket==="@open")i.bracket=1;else if(r.bracket==="@close")i.bracket=-1;else throw b.createError(a,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+u);if(r.next){if(typeof r.next!="string")throw b.createError(a,"the next state must be a string value in rule: "+u);{let n=r.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!b.stateExists(a,b.substituteMatches(a,n,"",[],""))))throw b.createError(a,"the next state '"+r.next+"' is not defined in rule: "+u);i.next=n}}return typeof r.goBack=="number"&&(i.goBack=r.goBack),typeof r.switchTo=="string"&&(i.switchTo=r.switchTo),typeof r.log=="string"&&(i.log=r.log),typeof r.nextEmbedded=="string"&&(i.nextEmbedded=r.nextEmbedded,a.usesEmbedded=!0),i}}else if(Array.isArray(r)){let i=[];for(let n=0,t=r.length;n<t;n++)i[n]=c(a,u,r[n]);return{group:i}}else if(r.cases){let i=[];for(let t in r.cases)if(r.cases.hasOwnProperty(t)){const l=c(a,u,r.cases[t]);t==="@default"||t==="@"||t===""?i.push({test:void 0,value:l,name:t}):t==="@eos"?i.push({test:function(h,m,_,f){return f},value:l,name:t}):i.push(p(a,u,t,l))}const n=a.defaultToken;return{test:function(t,l,h,m){for(const _ of i)if(!_.test||_.test(t,l,h,m))return _.value;return n}}}else throw b.createError(a,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+u)}else return{token:""}}class o{constructor(u){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=u}setRegex(u,r){let i;if(typeof r=="string")i=r;else if(r instanceof RegExp)i=r.source;else throw b.createError(u,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=i.length>0&&i[0]==="^",this.name=this.name+": "+i,this.regex=d(u,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(u,r){this.action=c(u,this.name,r)}}function s(a,u){if(!u||typeof u!="object")throw new Error("Monarch: expecting a language definition object");let r={};r.languageId=a,r.includeLF=M(u.includeLF,!1),r.noThrow=!1,r.maxStack=100,r.start=typeof u.start=="string"?u.start:null,r.ignoreCase=M(u.ignoreCase,!1),r.unicode=M(u.unicode,!1),r.tokenPostfix=w(u.tokenPostfix,"."+r.languageId),r.defaultToken=w(u.defaultToken,"source"),r.usesEmbedded=!1;let i=u;i.languageId=a,i.includeLF=r.includeLF,i.ignoreCase=r.ignoreCase,i.unicode=r.unicode,i.noThrow=r.noThrow,i.usesEmbedded=r.usesEmbedded,i.stateNames=u.tokenizer,i.defaultToken=r.defaultToken;function n(l,h,m){for(const _ of m){let f=_.include;if(f){if(typeof f!="string")throw b.createError(r,"an 'include' attribute must be a string at: "+l);if(f[0]==="@"&&(f=f.substr(1)),!u.tokenizer[f])throw b.createError(r,"include target '"+f+"' is not defined at: "+l);n(l+"."+f,h,u.tokenizer[f])}else{const v=new o(l);if(Array.isArray(_)&&_.length>=1&&_.length<=3)if(v.setRegex(i,_[0]),_.length>=3)if(typeof _[1]=="string")v.setAction(i,{token:_[1],next:_[2]});else if(typeof _[1]=="object"){const y=_[1];y.next=_[2],v.setAction(i,y)}else throw b.createError(r,"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: "+l);else v.setAction(i,_[1]);else{if(!_.regex)throw b.createError(r,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+l);_.name&&typeof _.name=="string"&&(v.name=_.name),_.matchOnlyAtStart&&(v.matchOnlyAtLineStart=M(_.matchOnlyAtLineStart,!1)),v.setRegex(i,_.regex),v.setAction(i,_.action)}h.push(v)}}}if(!u.tokenizer||typeof u.tokenizer!="object")throw b.createError(r,"a language definition must define the 'tokenizer' attribute as an object");r.tokenizer=[];for(let l in u.tokenizer)if(u.tokenizer.hasOwnProperty(l)){r.start||(r.start=l);const h=u.tokenizer[l];r.tokenizer[l]=new Array,n("tokenizer."+l,r.tokenizer[l],h)}if(r.usesEmbedded=i.usesEmbedded,u.brackets){if(!Array.isArray(u.brackets))throw b.createError(r,"the 'brackets' attribute must be defined as an array")}else u.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let t=[];for(let l of u.brackets){let h=l;if(h&&Array.isArray(h)&&h.length===3&&(h={token:h[2],open:h[0],close:h[1]}),h.open===h.close)throw b.createError(r,"open and close brackets in a 'brackets' attribute must be different: "+h.open+`
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof h.open=="string"&&typeof h.token=="string"&&typeof h.close=="string")t.push({token:h.token+r.tokenPostfix,open:b.fixCase(r,h.open),close:b.fixCase(r,h.close)});else throw b.createError(r,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return r.brackets=t,r.noThrow=!0,r}e.compile=s}),define(Q[418],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(Q[419],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/findinput/findInput",e)}),define(Q[420],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/findinput/findInputCheckboxes",e)}),define(Q[233],J([0,1,160,420,27]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexCheckbox=e.WholeWordsCheckbox=e.CaseSensitiveCheckbox=void 0;const w=N.localize(0,null),S=N.localize(1,null),C=N.localize(2,null);class d extends b.Checkbox{constructor(o){super({icon:M.Codicon.caseSensitive,title:w+o.appendTitle,isChecked:o.isChecked,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})}}e.CaseSensitiveCheckbox=d;class g extends b.Checkbox{constructor(o){super({icon:M.Codicon.wholeWord,title:S+o.appendTitle,isChecked:o.isChecked,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})}}e.WholeWordsCheckbox=g;class p extends b.Checkbox{constructor(o){super({icon:M.Codicon.regex,title:C+o.appendTitle,isChecked:o.isChecked,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})}}e.RegexCheckbox=p}),define(Q[421],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(Q[422],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/iconLabel/iconLabel",e)}),define(Q[175],J([0,1,7,157,2,120,40,17,20,55,422,23,304]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class o{constructor(n){this._element=n}get element(){return this._element}set textContent(n){this.disposed||n===this._textContent||(this._textContent=n,this._element.textContent=n)}set className(n){this.disposed||n===this._className||(this._className=n,this._element.className=n)}set empty(n){this.disposed||n===this._empty||(this._empty=n,this._element.style.marginLeft=n?"0":"")}dispose(){this.disposed=!0}}class s extends M.Disposable{constructor(n,t){super();this.hoverDelegate=void 0,this.customHovers=new Map,this.domNode=this._register(new o(b.append(n,b.$(".monaco-icon-label")))),this.labelContainer=b.append(this.domNode.element,b.$(".monaco-icon-label-container"));const l=b.append(this.labelContainer,b.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new o(b.append(this.labelContainer,b.$("span.monaco-icon-description-container")))),(t==null?void 0:t.supportHighlights)?this.nameNode=new r(l,!!t.supportIcons):this.nameNode=new a(l),(t==null?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new N.HighlightedLabel(b.append(this.descriptionContainer.element,b.$("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new o(b.append(this.descriptionContainer.element,b.$("span.label-description")))),(t==null?void 0:t.hoverDelegate)&&(this.hoverDelegate=t.hoverDelegate)}setLabel(n,t,l){const h=["monaco-icon-label"];l&&(l.extraClasses&&h.push(...l.extraClasses),l.italic&&h.push("italic"),l.strikethrough&&h.push("strikethrough")),this.domNode.className=h.join(" "),this.setupHover(this.labelContainer,l==null?void 0:l.title),this.nameNode.setLabel(n,l),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof N.HighlightedLabel?(this.descriptionNode.set(t||"",l?l.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,l==null?void 0:l.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(l==null?void 0:l.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(n,t){const l=this.customHovers.get(n);if(l&&(l.dispose(),this.customHovers.delete(n)),!t){n.removeAttribute("title");return}return this.hoverDelegate?this.setupCustomHover(this.hoverDelegate,n,t):this.setupNativeHover(n,t)}static adjustXAndShowCustomHover(n,t,l,h){if(n&&h)return t!==void 0&&(n.target.x=t+10),l.showHover(n)}getTooltipForCustom(n){if(d.isString(n))return()=>Ie(this,void 0,void 0,function*(){return n});if(d.isFunction(n.markdown))return n.markdown;{const t=n.markdown;return()=>Ie(this,void 0,void 0,function*(){return t})}}setupCustomHover(n,t,l){t.setAttribute("title",""),t.removeAttribute("title");let h=this.getTooltipForCustom(l);const m=C.isMacintosh?1500:500;let _,f,v=!1,y,L;function I(E){if(!v){y=new c.CancellationTokenSource;function T(D){(D.type===b.EventType.MOUSE_DOWN||D.fromElement===t)&&(L==null||L.dispose(),L=void 0,v=!1,_=void 0,y.dispose(!0),O.dispose(),A.dispose())}const O=g.domEvent(t,b.EventType.MOUSE_LEAVE,!0)(T.bind(t)),A=g.domEvent(t,b.EventType.MOUSE_DOWN,!0)(T.bind(t));v=!0;function B(D){f=D.x}const F=g.domEvent(t,b.EventType.MOUSE_MOVE,!0)(B.bind(t));setTimeout(()=>Ie(this,void 0,void 0,function*(){var D;if(v&&h&&!_){const R={targetElements:[this],dispose:()=>{}};_={text:p.localize(0,null),target:R,anchorPosition:0},L=s.adjustXAndShowCustomHover(_,f,n,v);const W=(D=yield h(y.token))!==null&&D!==void 0?D:d.isString(l)?void 0:l.markdownNotSupportedFallback;W?(_={text:W,target:R,anchorPosition:0},L=s.adjustXAndShowCustomHover(_,f,n,v)):L&&(L.dispose(),L=void 0)}F.dispose()}),m)}}const k=this._register(g.domEvent(t,b.EventType.MOUSE_OVER,!0)(I.bind(t)));this.customHovers.set(t,k)}setupNativeHover(n,t){let l="";d.isString(t)?l=t:(t==null?void 0:t.markdownNotSupportedFallback)&&(l=t.markdownNotSupportedFallback),n.title=l}}e.IconLabel=s;class a{constructor(n){this.container=n,this.label=void 0,this.singleLabel=void 0}setLabel(n,t){if(!(this.label===n&&S.equals(this.options,t)))if(this.label=n,this.options=t,typeof n=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=b.append(this.container,b.$("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=n;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let l=0;l<n.length;l++){const h=n[l],m=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${l}`;b.append(this.container,b.$("a.label-name",{id:m,"data-icon-label-count":n.length,"data-icon-label-index":l,role:"treeitem"},h)),l<n.length-1&&b.append(this.container,b.$("span.label-separator",void 0,(t==null?void 0:t.separator)||"/"))}}}}function u(i,n,t){if(!!t){let l=0;return i.map(h=>{const m={start:l,end:l+h.length},_=t.map(f=>w.Range.intersect(m,f)).filter(f=>!w.Range.isEmpty(f)).map(({start:f,end:v})=>({start:f-l,end:v-l}));return l=m.end+n.length,_})}}class r{constructor(n,t){this.container=n,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(n,t){if(!(this.label===n&&S.equals(this.options,t)))if(this.label=n,this.options=t,typeof n=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new N.HighlightedLabel(b.append(this.container,b.$("a.label-name",{id:t==null?void 0:t.domId})),this.supportIcons)),this.singleLabel.set(n,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const l=(t==null?void 0:t.separator)||"/",h=u(n,l,t==null?void 0:t.matches);for(let m=0;m<n.length;m++){const _=n[m],f=h?h[m]:void 0,v=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${m}`,y=b.$("a.label-name",{id:v,"data-icon-label-count":n.length,"data-icon-label-index":m,role:"treeitem"});new N.HighlightedLabel(b.append(this.container,y),this.supportIcons).set(_,f,void 0,t==null?void 0:t.labelEscapeNewLines),m<n.length-1&&b.append(y,b.$("span.label-separator",void 0,l))}}}}}),define(Q[423],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(Q[424],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(Q[425],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/menu/menu",e)}),define(Q[426],J([4,5]),function(q,e){return q.create("vs/base/browser/ui/tree/abstractTree",e)}),define(Q[176],J([0,1,2,105,7,6,56,98,149,19,161,55,66,154,426,15,17,100,196,197,316]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.RenderIndentGuides=e.ComposedTreeDelegate=void 0;class l extends p.ElementsDragAndDropData{constructor(R){super(R.elements.map(W=>W.element));this.data=R}}function h(D){return D instanceof p.ElementsDragAndDropData?new l(D):D}class m{constructor(R,W){this.modelProvider=R,this.dnd=W,this.autoExpandDisposable=b.Disposable.None}getDragURI(R){return this.dnd.getDragURI(R.element)}getDragLabel(R,W){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(R.map(x=>x.element),W)}onDragStart(R,W){this.dnd.onDragStart&&this.dnd.onDragStart(h(R),W)}onDragOver(R,W,x,K,Y=!0){const ee=this.dnd.onDragOver(h(R),W&&W.element,x,K),se=this.autoExpandNode!==W;if(se&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=W),typeof W=="undefined")return ee;if(se&&typeof ee!="boolean"&&ee.autoExpand&&(this.autoExpandDisposable=u.disposableTimeout(()=>{const P=this.modelProvider(),V=P.getNodeLocation(W);P.isCollapsed(V)&&P.setCollapsed(V,!1),this.autoExpandNode=void 0},500)),typeof ee=="boolean"||!ee.accept||typeof ee.bubble=="undefined"||ee.feedback){if(!Y){const P=typeof ee=="boolean"?ee:ee.accept,V=typeof ee=="boolean"?void 0:ee.effect;return{accept:P,effect:V,feedback:[x]}}return ee}if(ee.bubble===1){const P=this.modelProvider(),V=P.getNodeLocation(W),U=P.getParentNodeLocation(V),H=P.getNode(U),$=U&&P.getListIndex(U);return this.onDragOver(R,H,$,K,!1)}const ne=this.modelProvider(),le=ne.getNodeLocation(W),X=ne.getListIndex(le),z=ne.getListRenderCount(le);return Object.assign(Object.assign({},ee),{feedback:g.range(X,X+z)})}drop(R,W,x,K){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(h(R),W&&W.element,x,K)}onDragEnd(R){this.dnd.onDragEnd&&this.dnd.onDragEnd(R)}}function _(D,R){return R&&Object.assign(Object.assign({},R),{identityProvider:R.identityProvider&&{getId(W){return R.identityProvider.getId(W.element)}},dnd:R.dnd&&new m(D,R.dnd),multipleSelectionController:R.multipleSelectionController&&{isSelectionSingleChangeEvent(W){return R.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},W),{element:W.element}))},isSelectionRangeChangeEvent(W){return R.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},W),{element:W.element}))}},accessibilityProvider:R.accessibilityProvider&&Object.assign(Object.assign({},R.accessibilityProvider),{getSetSize(W){const x=D(),K=x.getNodeLocation(W),Y=x.getParentNodeLocation(K);return x.getNode(Y).visibleChildrenCount},getPosInSet(W){return W.visibleChildIndex+1},isChecked:R.accessibilityProvider&&R.accessibilityProvider.isChecked?W=>R.accessibilityProvider.isChecked(W.element):void 0,getRole:R.accessibilityProvider&&R.accessibilityProvider.getRole?W=>R.accessibilityProvider.getRole(W.element):()=>"treeitem",getAriaLabel(W){return R.accessibilityProvider.getAriaLabel(W.element)},getWidgetAriaLabel(){return R.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:R.accessibilityProvider&&R.accessibilityProvider.getWidgetRole?()=>R.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:R.accessibilityProvider&&R.accessibilityProvider.getAriaLevel?W=>R.accessibilityProvider.getAriaLevel(W.element):W=>W.depth,getActiveDescendantId:R.accessibilityProvider.getActiveDescendantId&&(W=>R.accessibilityProvider.getActiveDescendantId(W.element))}),keyboardNavigationLabelProvider:R.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},R.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(W){return R.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(W.element)}}),enableKeyboardNavigation:R.simpleKeyboardNavigation})}class f{constructor(R){this.delegate=R}getHeight(R){return this.delegate.getHeight(R.element)}getTemplateId(R){return this.delegate.getTemplateId(R.element)}hasDynamicHeight(R){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(R.element)}setDynamicHeight(R,W){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(R.element,W)}}e.ComposedTreeDelegate=f;var v;(function(D){D.None="none",D.OnHover="onHover",D.Always="always"})(v=e.RenderIndentGuides||(e.RenderIndentGuides={}));class y{constructor(R,W=[]){this._elements=W,this.onDidChange=w.Event.forEach(R,x=>this._elements=x)}get elements(){return this._elements}}class L{constructor(R,W,x,K,Y={}){this.renderer=R,this.modelProvider=W,this.activeNodes=K,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=L.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new n.SetMap,this.activeIndentNodes=new Set,this.indentGuidesDisposable=b.Disposable.None,this.disposables=new b.DisposableStore,this.templateId=R.templateId,this.updateOptions(Y),w.Event.map(x,ee=>ee.node)(this.onDidChangeNodeTwistieState,this,this.disposables),R.onDidChangeTwistieState&&R.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(R={}){if(typeof R.indent!="undefined"&&(this.indent=i.clamp(R.indent,0,40)),typeof R.renderIndentGuides!="undefined"){const W=R.renderIndentGuides!==v.None;if(W!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=W,this.indentGuidesDisposable.dispose(),W)){const x=new b.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,x),this.indentGuidesDisposable=x,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof R.hideTwistiesOfChildlessElements!="undefined"&&(this.hideTwistiesOfChildlessElements=R.hideTwistiesOfChildlessElements)}renderTemplate(R){const W=M.append(R,M.$(".monaco-tl-row")),x=M.append(W,M.$(".monaco-tl-indent")),K=M.append(W,M.$(".monaco-tl-twistie")),Y=M.append(W,M.$(".monaco-tl-contents")),ee=this.renderer.renderTemplate(Y);return{container:R,indent:x,twistie:K,indentGuidesDisposable:b.Disposable.None,templateData:ee}}renderElement(R,W,x,K){typeof K=="number"&&(this.renderedNodes.set(R,{templateData:x,height:K}),this.renderedElements.set(R.element,R));const Y=L.DefaultIndent+(R.depth-1)*this.indent;x.twistie.style.paddingLeft=`${Y}px`,x.indent.style.width=`${Y+this.indent-16}px`,this.renderTwistie(R,x),typeof K=="number"&&this.renderIndentGuides(R,x),this.renderer.renderElement(R,W,x.templateData,K)}disposeElement(R,W,x,K){x.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(R,W,x.templateData,K),typeof K=="number"&&(this.renderedNodes.delete(R),this.renderedElements.delete(R.element))}disposeTemplate(R){this.renderer.disposeTemplate(R.templateData)}onDidChangeTwistieState(R){const W=this.renderedElements.get(R);!W||this.onDidChangeNodeTwistieState(W)}onDidChangeNodeTwistieState(R){const W=this.renderedNodes.get(R);!W||(this.renderTwistie(R,W.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(R,W.templateData))}renderTwistie(R,W){W.twistie.classList.remove(...t.treeItemExpandedIcon.classNamesArray);let x=!1;this.renderer.renderTwistie&&(x=this.renderer.renderTwistie(R.element,W.twistie)),R.collapsible&&(!this.hideTwistiesOfChildlessElements||R.visibleChildrenCount>0)?(x||W.twistie.classList.add(...t.treeItemExpandedIcon.classNamesArray),W.twistie.classList.add("collapsible"),W.twistie.classList.toggle("collapsed",R.collapsed)):W.twistie.classList.remove("collapsible","collapsed"),R.collapsible?W.container.setAttribute("aria-expanded",String(!R.collapsed)):W.container.removeAttribute("aria-expanded")}renderIndentGuides(R,W){if(M.clearNode(W.indent),W.indentGuidesDisposable.dispose(),!!this.shouldRenderIndentGuides){const x=new b.DisposableStore,K=this.modelProvider();let Y=R;for(;;){const ee=K.getNodeLocation(Y),se=K.getParentNodeLocation(ee);if(!se)break;const ne=K.getNode(se),le=M.$(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(ne)&&le.classList.add("active"),W.indent.childElementCount===0?W.indent.appendChild(le):W.indent.insertBefore(le,W.indent.firstElementChild),this.renderedIndentGuides.add(ne,le),x.add(b.toDisposable(()=>this.renderedIndentGuides.delete(ne,le))),Y=ne}W.indentGuidesDisposable=x}}_onDidChangeActiveNodes(R){if(!!this.shouldRenderIndentGuides){const W=new Set,x=this.modelProvider();R.forEach(K=>{const Y=x.getNodeLocation(K);try{const ee=x.getParentNodeLocation(Y);K.collapsible&&K.children.length>0&&!K.collapsed?W.add(K):ee&&W.add(x.getNode(ee))}catch(ee){}}),this.activeIndentNodes.forEach(K=>{W.has(K)||this.renderedIndentGuides.forEach(K,Y=>Y.classList.remove("active"))}),W.forEach(K=>{this.activeIndentNodes.has(K)||this.renderedIndentGuides.forEach(K,Y=>Y.classList.add("active"))}),this.activeIndentNodes=W}}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),b.dispose(this.disposables)}}L.DefaultIndent=8;class I{constructor(R,W,x){this.tree=R,this.keyboardNavigationLabelProvider=W,this._filter=x,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new b.DisposableStore,R.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(R){this._pattern=R,this._lowercasePattern=R.toLowerCase()}filter(R,W){if(this._filter){const Y=this._filter.filter(R,W);if(this.tree.options.simpleKeyboardNavigation)return Y;let ee;if(typeof Y=="boolean"?ee=Y?1:0:s.isFilterResult(Y)?ee=s.getVisibleState(Y.visibility):ee=Y,ee===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:o.FuzzyScore.Default,visibility:!0};const x=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(R),K=Array.isArray(x)?x:[x];for(const Y of K){const ee=Y&&Y.toString();if(typeof ee=="undefined")return{data:o.FuzzyScore.Default,visibility:!0};const se=o.fuzzyScore(this._pattern,this._lowercasePattern,0,ee,ee.toLowerCase(),0,!0);if(se)return this._matchCount++,K.length===1?{data:se,visibility:!0}:{data:{label:ee,score:se},visibility:!0}}return this.tree.options.filterOnType?2:{data:o.FuzzyScore.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){b.dispose(this.disposables)}}class k{constructor(R,W,x,K,Y){this.tree=R,this.view=x,this.filter=K,this.keyboardNavigationDelegate=Y,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new w.Emitter,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new w.Emitter,this.enabledDisposables=new b.DisposableStore,this.disposables=new b.DisposableStore,this.domNode=M.$(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,c.domEvent(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=M.append(x.getHTMLElement(),M.$(".monaco-list-type-filter-message")),this.labelDomNode=M.append(this.domNode,M.$("span.label"));const ee=M.append(this.domNode,M.$(".controls"));this._filterOnType=!!R.options.filterOnType,this.filterOnTypeDomNode=M.append(ee,M.$("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),c.domEvent(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=M.append(ee,M.$("button.clear"+t.treeFilterClearIcon.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=a.localize(0,null),this.keyboardNavigationEventFilter=R.options.keyboardNavigationEventFilter,W.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(R.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(R){R.simpleKeyboardNavigation?this.disable():this.enable(),typeof R.filterOnType!="undefined"&&(this._filterOnType=!!R.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType),typeof R.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=R.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(!this._enabled){const R=w.Event.chain(c.domEvent(this.view.getHTMLElement(),"keydown")).filter(x=>!N.isInputElement(x.target)||x.target===this.filterOnTypeDomNode).filter(x=>x.key!=="Dead"&&!/^Media/.test(x.key)).map(x=>new S.StandardKeyboardEvent(x)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(x=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(x)&&!(x.keyCode===18||x.keyCode===16||x.keyCode===15||x.keyCode===17)||(this.pattern.length>0||this.triggered)&&(x.keyCode===9||x.keyCode===1)&&!x.altKey&&!x.ctrlKey&&!x.metaKey||x.keyCode===1&&(r.isMacintosh?x.altKey&&!x.metaKey:x.ctrlKey)&&!x.shiftKey).forEach(x=>{x.stopPropagation(),x.preventDefault()}).event,W=c.domEvent(this.clearDomNode,"click");w.Event.chain(w.Event.any(R,W)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}}disable(){!this._enabled||(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(R){typeof R=="string"?this.onInput(R):R instanceof MouseEvent||R.keyCode===9||R.keyCode===1&&(r.isMacintosh?R.altKey:R.ctrlKey)?this.onInput(""):R.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+R.browserEvent.key)}onInput(R){const W=this.view.getHTMLElement();R&&!this.domNode.parentElement?W.append(this.domNode):!R&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=R,this._onDidChangePattern.fire(R),this.filter.pattern=R,this.tree.refilter(),R&&this.tree.focusNext(0,!0,void 0,K=>!o.FuzzyScore.isDefault(K.filterData));const x=this.tree.getFocus();if(x.length>0){const K=x[0];this.tree.getRelativeTop(K)===null&&this.tree.reveal(K,.5)}this.render(),R||(this.triggered=!1)}onDragStart(){const R=this.view.getHTMLElement(),{left:W}=M.getDomNodePagePosition(R),x=R.clientWidth,K=x/2,Y=this.domNode.clientWidth,ee=new b.DisposableStore;let se=this.positionClassName;const ne=()=>{switch(se){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${x-Y-6}px`;break}},le=z=>{z.preventDefault();const P=z.clientX-W;z.dataTransfer&&(z.dataTransfer.dropEffect="none"),P<K?se="nw":se="ne",ne()},X=()=>{this.positionClassName=se,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",b.dispose(ee)};ne(),this.domNode.classList.remove(se),this.domNode.classList.add("dragging"),ee.add(b.toDisposable(()=>this.domNode.classList.remove("dragging"))),c.domEvent(document,"dragover")(le,null,ee),c.domEvent(this.domNode,"dragend")(X,null,ee),d.StaticDND.CurrentDragAndDropData=new d.DragAndDropData("vscode-ui"),ee.add(b.toDisposable(()=>d.StaticDND.CurrentDragAndDropData=void 0))}onDidSpliceModel(){!this._enabled||this.pattern.length===0||(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...t.treeFilterOnTypeOffIcon.classNamesArray),this.filterOnTypeDomNode.classList.add(...t.treeFilterOnTypeOnIcon.classNamesArray),this.filterOnTypeDomNode.title=a.localize(1,null)):(this.filterOnTypeDomNode.classList.remove(...t.treeFilterOnTypeOnIcon.classNamesArray),this.filterOnTypeDomNode.classList.add(...t.treeFilterOnTypeOffIcon.classNamesArray),this.filterOnTypeDomNode.title=a.localize(2,null))}render(){const R=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&R?(this.messageDomNode.textContent=a.localize(3,null),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",R),this.domNode.title=a.localize(4,null,this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(R){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!o.FuzzyScore.isDefault(R.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),b.dispose(this.disposables)}}function E(D){let R=C.TreeMouseEventTarget.Unknown;return M.hasParentWithClass(D.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?R=C.TreeMouseEventTarget.Twistie:M.hasParentWithClass(D.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(R=C.TreeMouseEventTarget.Element),{browserEvent:D.browserEvent,element:D.element?D.element.element:null,target:R}}function T(D,R){R(D),D.children.forEach(W=>T(W,R))}class O{constructor(R){this.identityProvider=R,this.nodes=[],this._onDidChange=new w.Emitter,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(R,W){var x;!((x=W)===null||x===void 0?void 0:x.__forceEvent)&&g.equals(this.nodes,R)||this._set(R,!1,W)}_set(R,W,x){if(this.nodes=[...R],this.elements=void 0,this._nodeSet=void 0,!W){const K=this;this._onDidChange.fire({get elements(){return K.get()},browserEvent:x})}}get(){return this.elements||(this.elements=this.nodes.map(R=>R.element)),[...this.elements]}getNodes(){return this.nodes}has(R){return this.nodeSet.has(R)}onDidModelSplice({insertedNodes:R,deletedNodes:W}){if(!this.identityProvider){const ne=this.createNodeSet(),le=X=>ne.delete(X);W.forEach(X=>T(X,le)),this.set([...ne.values()]);return}const x=new Set,K=ne=>x.add(this.identityProvider.getId(ne.element).toString());W.forEach(ne=>T(ne,K));const Y=new Map,ee=ne=>Y.set(this.identityProvider.getId(ne.element).toString(),ne);R.forEach(ne=>T(ne,ee));const se=[];for(const ne of this.nodes){const le=this.identityProvider.getId(ne.element).toString();if(!x.has(le))se.push(ne);else{const z=Y.get(le);z&&se.push(z)}}this._set(se,!0)}createNodeSet(){const R=new Set;for(const W of this.nodes)R.add(W);return R}}class A extends N.MouseController{constructor(R,W){super(R);this.tree=W}onViewPointer(R){if(!(N.isInputElement(R.browserEvent.target)||N.isMonacoEditor(R.browserEvent.target))){const W=R.element;if(!W)return super.onViewPointer(R);if(this.isSelectionRangeChangeEvent(R)||this.isSelectionSingleChangeEvent(R))return super.onViewPointer(R);const x=R.browserEvent.target,K=x.classList.contains("monaco-tl-twistie")||x.classList.contains("monaco-icon-label")&&x.classList.contains("folder-icon")&&R.browserEvent.offsetX<16;let Y=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?Y=this.tree.expandOnlyOnTwistieClick(W.element):Y=!!this.tree.expandOnlyOnTwistieClick,Y&&!K&&R.browserEvent.detail!==2)return super.onViewPointer(R);if(!this.tree.expandOnDoubleClick&&R.browserEvent.detail===2)return super.onViewPointer(R);if(W.collapsible){const ee=this.tree.model,se=ee.getNodeLocation(W),ne=R.browserEvent.altKey;if(this.tree.setFocus([se]),ee.setCollapsed(se,void 0,ne),Y&&K)return}super.onViewPointer(R)}}onDoubleClick(R){R.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(R)}}class B extends N.List{constructor(R,W,x,K,Y,ee,se){super(R,W,x,K,se);this.focusTrait=Y,this.selectionTrait=ee}createMouseController(R){return new A(this,R.tree)}splice(R,W,x=[]){if(super.splice(R,W,x),x.length!==0){const K=[],Y=[];x.forEach((ee,se)=>{this.focusTrait.has(ee)&&K.push(R+se),this.selectionTrait.has(ee)&&Y.push(R+se)}),K.length>0&&super.setFocus(g.distinctES6([...super.getFocus(),...K])),Y.length>0&&super.setSelection(g.distinctES6([...super.getSelection(),...Y]))}}setFocus(R,W,x=!1){super.setFocus(R,W),x||this.focusTrait.set(R.map(K=>this.element(K)),W)}setSelection(R,W,x=!1){super.setSelection(R,W),x||this.selectionTrait.set(R.map(K=>this.element(K)),W)}}class F{constructor(R,W,x,K,Y={}){this._options=Y,this.eventBufferer=new w.EventBufferer,this.disposables=new b.DisposableStore,this._onWillRefilter=new w.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new w.Emitter;const ee=new f(x),se=new w.Relay,ne=new w.Relay,le=new y(ne.event);this.renderers=K.map(P=>new L(P,()=>this.model,se.event,le,Y));for(let P of this.renderers)this.disposables.add(P);let X;Y.keyboardNavigationLabelProvider&&(X=new I(this,Y.keyboardNavigationLabelProvider,Y.filter),Y=Object.assign(Object.assign({},Y),{filter:X}),this.disposables.add(X)),this.focus=new O(Y.identityProvider),this.selection=new O(Y.identityProvider),this.view=new B(R,W,ee,this.renderers,this.focus,this.selection,Object.assign(Object.assign({},_(()=>this.model,Y)),{tree:this})),this.model=this.createModel(R,this.view,Y),se.input=this.model.onDidChangeCollapseState;const z=w.Event.forEach(this.model.onDidSplice,P=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(P),this.selection.onDidModelSplice(P)})});if(z(()=>null,null,this.disposables),ne.input=w.Event.chain(w.Event.any(z,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const P=new Set;for(const V of this.focus.getNodes())P.add(V);for(const V of this.selection.getNodes())P.add(V);return[...P.values()]}).event,Y.keyboardSupport!==!1){const P=w.Event.chain(this.view.onKeyDown).filter(V=>!N.isInputElement(V.target)).map(V=>new S.StandardKeyboardEvent(V));P.filter(V=>V.keyCode===15).on(this.onLeftArrow,this,this.disposables),P.filter(V=>V.keyCode===17).on(this.onRightArrow,this,this.disposables),P.filter(V=>V.keyCode===10).on(this.onSpace,this,this.disposables)}if(Y.keyboardNavigationLabelProvider){const P=Y.keyboardNavigationDelegate||N.DefaultKeyboardNavigationDelegate;this.typeFilterController=new k(this,this.model,this.view,X,P),this.focusNavigationFilter=V=>this.typeFilterController.shouldAllowFocus(V),this.disposables.add(this.typeFilterController)}this.styleElement=M.createStyleSheet(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===v.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return w.Event.map(this.view.onMouseDblClick,E)}get onPointer(){return w.Event.map(this.view.onPointer,E)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick=="undefined"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick=="undefined"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(R={}){this._options=Object.assign(Object.assign({},this._options),R);for(const W of this.renderers)W.updateOptions(R);this.view.updateOptions({enableKeyboardNavigation:this._options.simpleKeyboardNavigation,automaticKeyboardNavigation:this._options.automaticKeyboardNavigation,smoothScrolling:this._options.smoothScrolling,horizontalScrolling:this._options.horizontalScrolling}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===v.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(R){this.view.scrollTop=R}domFocus(){this.view.domFocus()}layout(R,W){this.view.layout(R,W)}style(R){const W=`.${this.view.domId}`,x=[];R.treeIndentGuidesStroke&&(x.push(`.monaco-list${W}:hover .monaco-tl-indent > .indent-guide, .monaco-list${W}.always .monaco-tl-indent > .indent-guide { border-color: ${R.treeIndentGuidesStroke.transparent(.4)}; }`),x.push(`.monaco-list${W} .monaco-tl-indent > .indent-guide.active { border-color: ${R.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=x.join(`
`),this.view.style(R)}collapse(R,W=!1){return this.model.setCollapsed(R,!0,W)}expand(R,W=!1){return this.model.setCollapsed(R,!1,W)}isCollapsible(R){return this.model.isCollapsible(R)}setCollapsible(R,W){return this.model.setCollapsible(R,W)}isCollapsed(R){return this.model.isCollapsed(R)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(R,W){const x=R.map(Y=>this.model.getNode(Y));this.selection.set(x,W);const K=R.map(Y=>this.model.getListIndex(Y)).filter(Y=>Y>-1);this.view.setSelection(K,W,!0)}getSelection(){return this.selection.get()}setFocus(R,W){const x=R.map(Y=>this.model.getNode(Y));this.focus.set(x,W);const K=R.map(Y=>this.model.getListIndex(Y)).filter(Y=>Y>-1);this.view.setFocus(K,W,!0)}focusNext(R=1,W=!1,x,K=this.focusNavigationFilter){this.view.focusNext(R,W,x,K)}getFocus(){return this.focus.get()}reveal(R,W){this.model.expandTo(R);const x=this.model.getListIndex(R);x!==-1&&this.view.reveal(x,W)}getRelativeTop(R){const W=this.model.getListIndex(R);return W===-1?null:this.view.getRelativeTop(W)}onLeftArrow(R){R.preventDefault(),R.stopPropagation();const W=this.view.getFocusedElements();if(W.length!==0){const x=W[0],K=this.model.getNodeLocation(x);if(!this.model.setCollapsed(K,!0)){const ee=this.model.getParentNodeLocation(K);if(!ee)return;const se=this.model.getListIndex(ee);this.view.reveal(se),this.view.setFocus([se])}}}onRightArrow(R){R.preventDefault(),R.stopPropagation();const W=this.view.getFocusedElements();if(W.length!==0){const x=W[0],K=this.model.getNodeLocation(x);if(!this.model.setCollapsed(K,!1)){if(!x.children.some(ne=>ne.visible))return;const[ee]=this.view.getFocus(),se=ee+1;this.view.reveal(se),this.view.setFocus([se])}}}onSpace(R){R.preventDefault(),R.stopPropagation();const W=this.view.getFocusedElements();if(W.length!==0){const x=W[0],K=this.model.getNodeLocation(x),Y=R.browserEvent.altKey;this.model.setCollapsed(K,void 0,Y)}}dispose(){b.dispose(this.disposables),this.view.dispose()}}e.AbstractTree=F}),define(Q[427],J([0,1,176,155]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class M extends b.AbstractTree{constructor(S,C,d,g,p,c={}){super(S,C,d,g,c);this.user=S,this.dataSource=p,this.identityProvider=c.identityProvider}createModel(S,C,d){return new N.ObjectTreeModel(S,C,d)}}e.DataTree=M}),define(Q[234],J([0,1,54,176,155,284,99]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class C extends N.AbstractTree{constructor(o,s,a,u,r={}){super(o,s,a,u,r)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(o,s=b.Iterable.empty(),a){this.model.setChildren(o,s,a)}rerender(o){if(o===void 0){this.view.rerender();return}this.model.rerender(o)}hasElement(o){return this.model.has(o)}createModel(o,s,a){return new M.ObjectTreeModel(o,s,a)}}e.ObjectTree=C;class d{constructor(o,s){this._compressedTreeNodeProvider=o,this.renderer=s,this.templateId=s.templateId,s.onDidChangeTwistieState&&(this.onDidChangeTwistieState=s.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(o){const s=this.renderer.renderTemplate(o);return{compressedTreeNode:void 0,data:s}}renderElement(o,s,a,u){const r=this.compressedTreeNodeProvider.getCompressedTreeNode(o.element);r.element.elements.length===1?(a.compressedTreeNode=void 0,this.renderer.renderElement(o,s,a.data,u)):(a.compressedTreeNode=r,this.renderer.renderCompressedElements(r,s,a.data,u))}disposeElement(o,s,a,u){a.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(a.compressedTreeNode,s,a.data,u):this.renderer.disposeElement&&this.renderer.disposeElement(o,s,a.data,u)}disposeTemplate(o){this.renderer.disposeTemplate(o.data)}renderTwistie(o,s){return this.renderer.renderTwistie?this.renderer.renderTwistie(o,s):!1}}Me([S.memoize],d.prototype,"compressedTreeNodeProvider",null);function g(c,o){return o&&Object.assign(Object.assign({},o),{keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(s){let a;try{a=c().getCompressedTreeNode(s)}catch(u){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(s)}return a.element.elements.length===1?o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(s):o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(a.element.elements)}}})}class p extends C{constructor(o,s,a,u,r={}){const i=()=>this,n=u.map(t=>new d(i,t));super(o,s,a,n,g(i,r))}setChildren(o,s=b.Iterable.empty(),a){this.model.setChildren(o,s,a)}createModel(o,s,a){return new w.CompressibleObjectTreeModel(o,s,a)}updateOptions(o={}){super.updateOptions(o),typeof o.compressionEnabled!="undefined"&&this.model.setCompressionEnabled(o.compressionEnabled)}getCompressedTreeNode(o=null){return this.model.getCompressedTreeNode(o)}}e.CompressibleObjectTree=p}),define(Q[428],J([0,1,176,234,98,2,6,15,54,161,12,154,197]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function s(T){return Object.assign(Object.assign({},T),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function a(T,O){return O.parent?O.parent===T?!0:a(T,O.parent):!1}function u(T,O){return T===O||a(T,O)||a(O,T)}class r{constructor(O){this.node=O}get element(){return this.node.element.element}get children(){return this.node.children.map(O=>new r(O))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class i{constructor(O,A,B){this.renderer=O,this.nodeMapper=A,this.onDidChangeTwistieState=B,this.renderedNodes=new Map,this.templateId=O.templateId}renderTemplate(O){return{templateData:this.renderer.renderTemplate(O)}}renderElement(O,A,B,F){this.renderer.renderElement(this.nodeMapper.map(O),A,B.templateData,F)}renderTwistie(O,A){return O.slow?(A.classList.add(...o.treeItemLoadingIcon.classNamesArray),!0):(A.classList.remove(...o.treeItemLoadingIcon.classNamesArray),!1)}disposeElement(O,A,B,F){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(O),A,B.templateData,F)}disposeTemplate(O){this.renderer.disposeTemplate(O.templateData)}dispose(){this.renderedNodes.clear()}}function n(T){return{browserEvent:T.browserEvent,elements:T.elements.map(O=>O.element)}}function t(T){return{browserEvent:T.browserEvent,element:T.element&&T.element.element,target:T.target}}class l extends g.ElementsDragAndDropData{constructor(O){super(O.elements.map(A=>A.element));this.data=O}}function h(T){return T instanceof g.ElementsDragAndDropData?new l(T):T}class m{constructor(O){this.dnd=O}getDragURI(O){return this.dnd.getDragURI(O.element)}getDragLabel(O,A){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(O.map(B=>B.element),A)}onDragStart(O,A){this.dnd.onDragStart&&this.dnd.onDragStart(h(O),A)}onDragOver(O,A,B,F,D=!0){return this.dnd.onDragOver(h(O),A&&A.element,B,F)}drop(O,A,B,F){this.dnd.drop(h(O),A&&A.element,B,F)}onDragEnd(O){this.dnd.onDragEnd&&this.dnd.onDragEnd(O)}}function _(T){return T&&Object.assign(Object.assign({},T),{collapseByDefault:!0,identityProvider:T.identityProvider&&{getId(O){return T.identityProvider.getId(O.element)}},dnd:T.dnd&&new m(T.dnd),multipleSelectionController:T.multipleSelectionController&&{isSelectionSingleChangeEvent(O){return T.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},O),{element:O.element}))},isSelectionRangeChangeEvent(O){return T.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},O),{element:O.element}))}},accessibilityProvider:T.accessibilityProvider&&Object.assign(Object.assign({},T.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:T.accessibilityProvider.getRole?O=>T.accessibilityProvider.getRole(O.element):()=>"treeitem",isChecked:T.accessibilityProvider.isChecked?O=>{var A;return!!((A=T.accessibilityProvider)===null||A===void 0?void 0:A.isChecked(O.element))}:void 0,getAriaLabel(O){return T.accessibilityProvider.getAriaLabel(O.element)},getWidgetAriaLabel(){return T.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:T.accessibilityProvider.getWidgetRole?()=>T.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:T.accessibilityProvider.getAriaLevel&&(O=>T.accessibilityProvider.getAriaLevel(O.element)),getActiveDescendantId:T.accessibilityProvider.getActiveDescendantId&&(O=>T.accessibilityProvider.getActiveDescendantId(O.element))}),filter:T.filter&&{filter(O,A){return T.filter.filter(O.element,A)}},keyboardNavigationLabelProvider:T.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},T.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(O){return T.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(O.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof T.expandOnlyOnTwistieClick=="undefined"?void 0:typeof T.expandOnlyOnTwistieClick!="function"?T.expandOnlyOnTwistieClick:O=>T.expandOnlyOnTwistieClick(O.element),additionalScrollHeight:T.additionalScrollHeight})}function f(T,O){O(T),T.children.forEach(A=>f(A,O))}class v{constructor(O,A,B,F,D,R={}){this.user=O,this.dataSource=D,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new S.Emitter,this._onDidChangeNodeSlowState=new S.Emitter,this.nodeMapper=new M.WeakMapper(W=>new r(W)),this.disposables=new w.DisposableStore,this.identityProvider=R.identityProvider,this.autoExpandSingleChildren=typeof R.autoExpandSingleChildren=="undefined"?!1:R.autoExpandSingleChildren,this.sorter=R.sorter,this.collapseByDefault=R.collapseByDefault,this.tree=this.createTree(O,A,B,F,R),this.root=s({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return S.Event.map(this.tree.onDidChangeFocus,n)}get onDidChangeSelection(){return S.Event.map(this.tree.onDidChangeSelection,n)}get onMouseDblClick(){return S.Event.map(this.tree.onMouseDblClick,t)}get onPointer(){return S.Event.map(this.tree.onPointer,t)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(O,A,B,F,D){const R=new b.ComposedTreeDelegate(B),W=F.map(K=>new i(K,this.nodeMapper,this._onDidChangeNodeSlowState.event)),x=_(D)||{};return new N.ObjectTree(O,A,R,W,x)}updateOptions(O={}){this.tree.updateOptions(O)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(O){this.tree.scrollTop=O}domFocus(){this.tree.domFocus()}layout(O,A){this.tree.layout(O,A)}style(O){this.tree.style(O)}getInput(){return this.root.element}setInput(O,A){return Ie(this,void 0,void 0,function*(){this.refreshPromises.forEach(F=>F.cancel()),this.refreshPromises.clear(),this.root.element=O;const B=A&&{viewState:A,focus:[],selection:[]};yield this._updateChildren(O,!0,!1,B),B&&(this.tree.setFocus(B.focus),this.tree.setSelection(B.selection)),A&&typeof A.scrollTop=="number"&&(this.scrollTop=A.scrollTop)})}_updateChildren(O=this.root.element,A=!0,B=!1,F,D){return Ie(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new M.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield S.Event.toPromise(this._onDidRender.event));const R=this.getDataNode(O);if(yield this.refreshAndRenderNode(R,A,F,D),B)try{this.tree.rerender(R)}catch(W){}})}rerender(O){if(O===void 0||O===this.root.element){this.tree.rerender();return}const A=this.getDataNode(O);this.tree.rerender(A)}collapse(O,A=!1){const B=this.getDataNode(O);return this.tree.collapse(B===this.root?null:B,A)}expand(O,A=!1){return Ie(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new M.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield S.Event.toPromise(this._onDidRender.event));const B=this.getDataNode(O);if(this.tree.hasElement(B)&&!this.tree.isCollapsible(B)||(B.refreshPromise&&(yield this.root.refreshPromise,yield S.Event.toPromise(this._onDidRender.event)),B!==this.root&&!B.refreshPromise&&!this.tree.isCollapsed(B)))return!1;const F=this.tree.expand(B===this.root?null:B,A);return B.refreshPromise&&(yield this.root.refreshPromise,yield S.Event.toPromise(this._onDidRender.event)),F})}setSelection(O,A){const B=O.map(F=>this.getDataNode(F));this.tree.setSelection(B,A)}getSelection(){return this.tree.getSelection().map(A=>A.element)}setFocus(O,A){const B=O.map(F=>this.getDataNode(F));this.tree.setFocus(B,A)}getFocus(){return this.tree.getFocus().map(A=>A.element)}reveal(O,A){this.tree.reveal(this.getDataNode(O),A)}getDataNode(O){const A=this.nodes.get(O===this.root.element?null:O);if(!A)throw new M.TreeError(this.user,`Data tree node not found: ${O}`);return A}refreshAndRenderNode(O,A,B,F){return Ie(this,void 0,void 0,function*(){yield this.refreshNode(O,A,B),this.render(O,B,F)})}refreshNode(O,A,B){return Ie(this,void 0,void 0,function*(){let F;return this.subTreeRefreshPromises.forEach((D,R)=>{!F&&u(R,O)&&(F=D.then(()=>this.refreshNode(O,A,B)))}),F||this.doRefreshSubTree(O,A,B)})}doRefreshSubTree(O,A,B){return Ie(this,void 0,void 0,function*(){let F;O.refreshPromise=new Promise(D=>F=D),this.subTreeRefreshPromises.set(O,O.refreshPromise),O.refreshPromise.finally(()=>{O.refreshPromise=void 0,this.subTreeRefreshPromises.delete(O)});try{const D=yield this.doRefreshNode(O,A,B);O.stale=!1,yield C.Promises.settled(D.map(R=>this.doRefreshSubTree(R,A,B)))}finally{F()}})}doRefreshNode(O,A,B){return Ie(this,void 0,void 0,function*(){O.hasChildren=!!this.dataSource.hasChildren(O.element);let F;if(!O.hasChildren)F=Promise.resolve(d.Iterable.empty());else{const D=C.timeout(800);D.then(()=>{O.slow=!0,this._onDidChangeNodeSlowState.fire(O)},R=>null),F=this.doGetChildren(O).finally(()=>D.cancel())}try{const D=yield F;return this.setChildren(O,D,A,B)}catch(D){if(O!==this.root&&this.tree.hasElement(O)&&this.tree.collapse(O),p.isPromiseCanceledError(D))return[];throw D}finally{O.slow&&(O.slow=!1,this._onDidChangeNodeSlowState.fire(O))}})}doGetChildren(O){let A=this.refreshPromises.get(O);return A||(A=C.createCancelablePromise(()=>Ie(this,void 0,void 0,function*(){const B=yield this.dataSource.getChildren(O.element);return this.processChildren(B)})),this.refreshPromises.set(O,A),A.finally(()=>{this.refreshPromises.delete(O)}))}_onDidChangeCollapseState({node:O,deep:A}){O.element!==null&&!O.collapsed&&O.element.stale&&(A?this.collapse(O.element.element):this.refreshAndRenderNode(O.element,!1).catch(p.onUnexpectedError))}setChildren(O,A,B,F){const D=[...A];if(O.children.length===0&&D.length===0)return[];const R=new Map,W=new Map;for(const Y of O.children)if(R.set(Y.element,Y),this.identityProvider){const ee=this.tree.isCollapsed(Y);W.set(Y.id,{node:Y,collapsed:ee})}const x=[],K=D.map(Y=>{const ee=!!this.dataSource.hasChildren(Y);if(!this.identityProvider){const X=s({element:Y,parent:O,hasChildren:ee});return ee&&this.collapseByDefault&&!this.collapseByDefault(Y)&&(X.collapsedByDefault=!1,x.push(X)),X}const se=this.identityProvider.getId(Y).toString(),ne=W.get(se);if(ne){const X=ne.node;return R.delete(X.element),this.nodes.delete(X.element),this.nodes.set(Y,X),X.element=Y,X.hasChildren=ee,B?ne.collapsed?(X.children.forEach(z=>f(z,P=>this.nodes.delete(P.element))),X.children.splice(0,X.children.length),X.stale=!0):x.push(X):ee&&this.collapseByDefault&&!this.collapseByDefault(Y)&&(X.collapsedByDefault=!1,x.push(X)),X}const le=s({element:Y,parent:O,id:se,hasChildren:ee});return F&&F.viewState.focus&&F.viewState.focus.indexOf(se)>-1&&F.focus.push(le),F&&F.viewState.selection&&F.viewState.selection.indexOf(se)>-1&&F.selection.push(le),F&&F.viewState.expanded&&F.viewState.expanded.indexOf(se)>-1?x.push(le):ee&&this.collapseByDefault&&!this.collapseByDefault(Y)&&(le.collapsedByDefault=!1,x.push(le)),le});for(const Y of R.values())f(Y,ee=>this.nodes.delete(ee.element));for(const Y of K)this.nodes.set(Y.element,Y);return O.children.splice(0,O.children.length,...K),O!==this.root&&this.autoExpandSingleChildren&&K.length===1&&x.length===0&&(K[0].collapsedByDefault=!1,x.push(K[0])),x}render(O,A,B){const F=O.children.map(R=>this.asTreeElement(R,A)),D=B&&Object.assign(Object.assign({},B),{diffIdentityProvider:B.diffIdentityProvider&&{getId(R){return B.diffIdentityProvider.getId(R.element)}}});this.tree.setChildren(O===this.root?null:O,F,D),O!==this.root&&this.tree.setCollapsible(O,O.hasChildren),this._onDidRender.fire()}asTreeElement(O,A){if(O.stale)return{element:O,collapsible:O.hasChildren,collapsed:!0};let B;return A&&A.viewState.expanded&&O.id&&A.viewState.expanded.indexOf(O.id)>-1?B=!1:B=O.collapsedByDefault,O.collapsedByDefault=void 0,{element:O,children:O.hasChildren?d.Iterable.map(O.children,F=>this.asTreeElement(F,A)):[],collapsible:O.hasChildren,collapsed:B}}processChildren(O){return this.sorter&&(O=[...O].sort(this.sorter.compare.bind(this.sorter))),O}dispose(){this.disposables.dispose()}}e.AsyncDataTree=v;class y{constructor(O){this.node=O}get element(){return{elements:this.node.element.elements.map(O=>O.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(O=>new y(O))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class L{constructor(O,A,B,F){this.renderer=O,this.nodeMapper=A,this.compressibleNodeMapperProvider=B,this.onDidChangeTwistieState=F,this.renderedNodes=new Map,this.disposables=[],this.templateId=O.templateId}renderTemplate(O){return{templateData:this.renderer.renderTemplate(O)}}renderElement(O,A,B,F){this.renderer.renderElement(this.nodeMapper.map(O),A,B.templateData,F)}renderCompressedElements(O,A,B,F){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(O),A,B.templateData,F)}renderTwistie(O,A){return O.slow?(A.classList.add(...o.treeItemLoadingIcon.classNamesArray),!0):(A.classList.remove(...o.treeItemLoadingIcon.classNamesArray),!1)}disposeElement(O,A,B,F){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(O),A,B.templateData,F)}disposeCompressedElements(O,A,B,F){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(O),A,B.templateData,F)}disposeTemplate(O){this.renderer.disposeTemplate(O.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=w.dispose(this.disposables)}}function I(T){const O=T&&_(T);return O&&Object.assign(Object.assign({},O),{keyboardNavigationLabelProvider:O.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},O.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(A){return T.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(A.map(B=>B.element))}})})}class k extends v{constructor(O,A,B,F,D,R,W={}){super(O,A,B,D,R,W);this.compressionDelegate=F,this.compressibleNodeMapper=new M.WeakMapper(x=>new y(x)),this.filter=W.filter}createTree(O,A,B,F,D){const R=new b.ComposedTreeDelegate(B),W=F.map(K=>new L(K,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),x=I(D)||{};return new N.CompressibleObjectTree(O,A,R,W,x)}asTreeElement(O,A){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(O.element)},super.asTreeElement(O,A))}updateOptions(O={}){this.tree.updateOptions(O)}render(O,A){if(!this.identityProvider)return super.render(O,A);const B=se=>this.identityProvider.getId(se).toString(),F=se=>{const ne=new Set;for(const le of se){const X=this.tree.getCompressedTreeNode(le===this.root?null:le);if(!!X.element)for(const z of X.element.elements)ne.add(B(z.element))}return ne},D=F(this.tree.getSelection()),R=F(this.tree.getFocus());super.render(O,A);const W=this.getSelection();let x=!1;const K=this.getFocus();let Y=!1;const ee=se=>{const ne=se.element;if(ne)for(let le=0;le<ne.elements.length;le++){const X=B(ne.elements[le].element),z=ne.elements[ne.elements.length-1].element;D.has(X)&&W.indexOf(z)===-1&&(W.push(z),x=!0),R.has(X)&&K.indexOf(z)===-1&&(K.push(z),Y=!0)}se.children.forEach(ee)};ee(this.tree.getCompressedTreeNode(O===this.root?null:O)),x&&this.setSelection(W),Y&&this.setFocus(K)}processChildren(O){return this.filter&&(O=d.Iterable.filter(O,A=>{const B=this.filter.filter(A,1),F=E(B);if(F===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return F===1})),super.processChildren(O)}}e.CompressibleAsyncDataTree=k;function E(T){return typeof T=="boolean"?T?1:0:c.isFilterResult(T)?c.getVisibleState(T.visibility):c.getVisibleState(T)}}),define(Q[429],J([4,5]),function(q,e){return q.create("vs/base/common/actions",e)}),define(Q[48],J([0,1,429,2,6]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class w extends N.Disposable{constructor(c,o="",s="",a=!0,u){super();this._onDidChange=this._register(new M.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=c,this._label=o,this._cssClass=s,this._enabled=a,this._actionCallback=u}get id(){return this._id}get label(){return this._label}set label(c){this._setLabel(c)}_setLabel(c){this._label!==c&&(this._label=c,this._onDidChange.fire({label:c}))}get tooltip(){return this._tooltip||""}set tooltip(c){this._setTooltip(c)}_setTooltip(c){this._tooltip!==c&&(this._tooltip=c,this._onDidChange.fire({tooltip:c}))}get class(){return this._cssClass}set class(c){this._setClass(c)}_setClass(c){this._cssClass!==c&&(this._cssClass=c,this._onDidChange.fire({class:c}))}get enabled(){return this._enabled}set enabled(c){this._setEnabled(c)}_setEnabled(c){this._enabled!==c&&(this._enabled=c,this._onDidChange.fire({enabled:c}))}get checked(){return this._checked}set checked(c){this._setChecked(c)}_setChecked(c){this._checked!==c&&(this._checked=c,this._onDidChange.fire({checked:c}))}run(c,o){return this._actionCallback?this._actionCallback(c):Promise.resolve(!0)}}e.Action=w;class S extends N.Disposable{constructor(){super(...arguments);this._onBeforeRun=this._register(new M.Emitter),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new M.Emitter),this.onDidRun=this._onDidRun.event}run(c,o){return Ie(this,void 0,void 0,function*(){if(!c.enabled)return Promise.resolve(null);this._onBeforeRun.fire({action:c});try{const s=yield this.runAction(c,o);this._onDidRun.fire({action:c,result:s})}catch(s){this._onDidRun.fire({action:c,error:s})}})}runAction(c,o){const s=o?c.run(o):c.run();return Promise.resolve(s)}}e.ActionRunner=S;class C extends w{constructor(c){super(C.ID,c,c?"separator text":"separator");this.checked=!1,this.enabled=!1}}e.Separator=C,C.ID="vs.actions.separator";class d{constructor(c,o,s,a){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=c,this.label=o,this.class=a,this._actions=s}dispose(){}get actions(){return this._actions}run(){return Ie(this,void 0,void 0,function*(){})}}e.SubmenuAction=d;class g extends w{constructor(){super(g.ID,b.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=g,g.ID="vs.actions.empty"}),define(Q[112],J([0,1,17,418,2,48,20,60,149,35,7,203]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionViewItem=e.BaseActionViewItem=void 0;class c extends M.Disposable{constructor(a,u,r={}){super();this.options=r,this._context=a||this,this._action=u,u instanceof w.Action&&this._register(u.onDidChange(i=>{!this.element||this.handleActionChangeEvent(i)}))}handleActionChangeEvent(a){a.enabled!==void 0&&this.updateEnabled(),a.checked!==void 0&&this.updateChecked(),a.class!==void 0&&this.updateClass(),a.label!==void 0&&(this.updateLabel(),this.updateTooltip()),a.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new w.ActionRunner)),this._actionRunner}set actionRunner(a){this._actionRunner=a}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(a){this._context=a}render(a){const u=this.element=a;this._register(C.Gesture.addTarget(a));const r=this.options&&this.options.draggable;r&&(a.draggable=!0,g.isFirefox&&this._register(p.addDisposableListener(a,p.EventType.DRAG_START,i=>{var n;return(n=i.dataTransfer)===null||n===void 0?void 0:n.setData(d.DataTransfers.TEXT,this._action.label)}))),this._register(p.addDisposableListener(u,C.EventType.Tap,i=>this.onClick(i))),this._register(p.addDisposableListener(u,p.EventType.MOUSE_DOWN,i=>{r||p.EventHelper.stop(i,!0),this._action.enabled&&i.button===0&&u.classList.add("active")})),b.isMacintosh&&this._register(p.addDisposableListener(u,p.EventType.CONTEXT_MENU,i=>{i.button===0&&i.ctrlKey===!0&&this.onClick(i)})),this._register(p.addDisposableListener(u,p.EventType.CLICK,i=>{p.EventHelper.stop(i,!0),this.options&&this.options.isMenu||b.setImmediate(()=>this.onClick(i))})),this._register(p.addDisposableListener(u,p.EventType.DBLCLICK,i=>{p.EventHelper.stop(i,!0)})),[p.EventType.MOUSE_UP,p.EventType.MOUSE_OUT].forEach(i=>{this._register(p.addDisposableListener(u,i,n=>{p.EventHelper.stop(n),u.classList.remove("active")}))})}onClick(a){var u;p.EventHelper.stop(a,!0);const r=S.isUndefinedOrNull(this._context)?((u=this.options)===null||u===void 0?void 0:u.useEventAsContext)?a:void 0:this._context;this.actionRunner.run(this._action,r)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(a){this.element&&(this.element.tabIndex=a?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}e.BaseActionViewItem=c;class o extends c{constructor(a,u,r={}){super(a,u,r);this.options=r,this.options.icon=r.icon!==void 0?r.icon:!1,this.options.label=r.label!==void 0?r.label:!0,this.cssClass=""}render(a){super.render(a),this.element&&(this.label=p.append(this.element,p.$("a.action-label"))),this.label&&(this._action.id===w.Separator.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(p.append(this.element,p.$("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(a){this.label&&(this.label.tabIndex=a?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let a=null;this.getAction().tooltip?a=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(a=this.getAction().label,this.options.keybinding&&(a=N.localize(0,null,a,this.options.keybinding))),a&&this.label&&(this.label.title=a)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}e.ActionViewItem=o}),define(Q[83],J([0,1,2,48,7,20,56,6,112,203]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class g extends b.Disposable{constructor(c,o={}){var s,a,u,r,i,n;super();this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new C.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new C.Emitter({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new C.Emitter),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new C.Emitter),this.onBeforeRun=this._onBeforeRun.event,this.options=o,this._context=(s=o.context)!==null&&s!==void 0?s:null,this._orientation=(a=this.options.orientation)!==null&&a!==void 0?a:0,this._triggerKeys={keyDown:(r=(u=this.options.triggerKeys)===null||u===void 0?void 0:u.keyDown)!==null&&r!==void 0?r:!1,keys:(n=(i=this.options.triggerKeys)===null||i===void 0?void 0:i.keys)!==null&&n!==void 0?n:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new N.ActionRunner,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(h=>this._onDidRun.fire(h))),this._register(this._actionRunner.onBeforeRun(h=>this._onBeforeRun.fire(h))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",o.animated!==!1&&this.domNode.classList.add("animated");let t,l;switch(this._orientation){case 0:t=[15],l=[17];break;case 1:t=[17],l=[15],this.domNode.className+=" reverse";break;case 2:t=[16],l=[18],this.domNode.className+=" vertical";break;case 3:t=[18],l=[16],this.domNode.className+=" vertical reverse";break}this._register(M.addDisposableListener(this.domNode,M.EventType.KEY_DOWN,h=>{const m=new S.StandardKeyboardEvent(h);let _=!0;const f=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;t&&(m.equals(t[0])||m.equals(t[1]))?_=this.focusPrevious():l&&(m.equals(l[0])||m.equals(l[1]))?_=this.focusNext():m.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():m.equals(2)&&f instanceof d.BaseActionViewItem&&f.trapsArrowNavigation?this.focusNext():this.isTriggerKeyEvent(m)?this._triggerKeys.keyDown?this.doTrigger(m):this.triggerKeyDown=!0:_=!1,_&&(m.preventDefault(),m.stopPropagation())})),this._register(M.addDisposableListener(this.domNode,M.EventType.KEY_UP,h=>{const m=new S.StandardKeyboardEvent(h);this.isTriggerKeyEvent(m)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(m)),m.preventDefault(),m.stopPropagation()):(m.equals(2)||m.equals(1024|2))&&this.updateFocusedItem()})),this.focusTracker=this._register(M.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(M.getActiveElement()===this.domNode||!M.isAncestor(M.getActiveElement(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),c.appendChild(this.domNode)}isTriggerKeyEvent(c){let o=!1;return this._triggerKeys.keys.forEach(s=>{o=o||c.equals(s)}),o}updateFocusedItem(){for(let c=0;c<this.actionsList.children.length;c++){const o=this.actionsList.children[c];if(M.isAncestor(M.getActiveElement(),o)){this.focusedItem=c;break}}}get context(){return this._context}set context(c){this._context=c,this.viewItems.forEach(o=>o.setActionContext(c))}get actionRunner(){return this._actionRunner}set actionRunner(c){c&&(this._actionRunner=c,this.viewItems.forEach(o=>o.actionRunner=c))}getContainer(){return this.domNode}push(c,o={}){const s=Array.isArray(c)?c:[c];let a=w.isNumber(o.index)?o.index:null;s.forEach(u=>{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(M.addDisposableListener(r,M.EventType.CONTEXT_MENU,n=>{M.EventHelper.stop(n,!0)}));let i;this.options.actionViewItemProvider&&(i=this.options.actionViewItemProvider(u)),i||(i=new d.ActionViewItem(this.context,u,o)),i.actionRunner=this._actionRunner,i.setActionContext(this.context),i.render(r),this.focusable&&i instanceof d.BaseActionViewItem&&this.viewItems.length===0&&i.setFocusable(!0),a===null||a<0||a>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(i),this._actionIds.push(u.id)):(this.actionsList.insertBefore(r,this.actionsList.children[a]),this.viewItems.splice(a,0,i),this._actionIds.splice(a,0,u.id),a++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem)}clear(){b.dispose(this.viewItems),this.viewItems=[],this._actionIds=[],M.clearNode(this.actionsList)}focus(c){let o=!1,s;if(c===void 0?o=!0:typeof c=="number"?s=c:typeof c=="boolean"&&(o=c),o&&typeof this.focusedItem=="undefined"){const a=this.viewItems.findIndex(u=>u.isEnabled());this.focusedItem=a===-1?void 0:a,this.updateFocus()}else s!==void 0&&(this.focusedItem=s),this.updateFocus()}focusNext(){typeof this.focusedItem=="undefined"&&(this.focusedItem=this.viewItems.length-1);const c=this.focusedItem;let o;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=c,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,o=this.viewItems[this.focusedItem]}while(this.focusedItem!==c&&this.options.focusOnlyEnabledItems&&!o.isEnabled());return this.updateFocus(),!0}focusPrevious(){typeof this.focusedItem=="undefined"&&(this.focusedItem=0);const c=this.focusedItem;let o;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=c,!1;this.focusedItem=this.viewItems.length-1}o=this.viewItems[this.focusedItem]}while(this.focusedItem!==c&&this.options.focusOnlyEnabledItems&&!o.isEnabled());return this.updateFocus(!0),!0}updateFocus(c,o){typeof this.focusedItem=="undefined"&&this.actionsList.focus({preventScroll:o});for(let s=0;s<this.viewItems.length;s++){const a=this.viewItems[s],u=a;if(s===this.focusedItem){let r=!0;w.isFunction(u.focus)||(r=!1),this.options.focusOnlyEnabledItems&&w.isFunction(a.isEnabled)&&!a.isEnabled()&&(r=!1),r?u.focus(c):this.actionsList.focus({preventScroll:o})}else w.isFunction(u.blur)&&u.blur()}}doTrigger(c){if(typeof this.focusedItem!="undefined"){const o=this.viewItems[this.focusedItem];if(o instanceof d.BaseActionViewItem){const s=o._context===null||o._context===void 0?c:o._context;this.run(o._action,s)}}}run(c,o){return this._actionRunner.run(c,o)}dispose(){b.dispose(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}e.ActionBar=g}),define(Q[430],J([0,1,60,48,7,56,6,206]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=e.BaseDropdown=void 0;class C extends N.ActionRunner{constructor(p,c){super();this._onDidChangeVisibility=new S.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=M.append(p,M.$(".monaco-dropdown")),this._label=M.append(this._element,M.$(".dropdown-label"));let o=c.labelRenderer;o||(o=a=>(a.textContent=c.label||"",null));for(const a of[M.EventType.CLICK,M.EventType.MOUSE_DOWN,b.EventType.Tap])this._register(M.addDisposableListener(this.element,a,u=>M.EventHelper.stop(u,!0)));for(const a of[M.EventType.MOUSE_DOWN,b.EventType.Tap])this._register(M.addDisposableListener(this._label,a,u=>{u instanceof MouseEvent&&u.detail>1||(this.visible?this.hide():this.show())}));this._register(M.addDisposableListener(this._label,M.EventType.KEY_UP,a=>{const u=new w.StandardKeyboardEvent(a);(u.equals(3)||u.equals(10))&&(M.EventHelper.stop(a,!0),this.visible?this.hide():this.show())}));const s=o(this._label);s&&this._register(s),this._register(b.Gesture.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}e.BaseDropdown=C;class d extends C{constructor(p,c){super(p,c);this._actions=[],this._contextMenuProvider=c.contextMenuProvider,this.actions=c.actions||[],this.actionProvider=c.actionProvider,this.menuClassName=c.menuClassName||"",this.menuAsChild=!!c.menuAsChild}set menuOptions(p){this._menuOptions=p}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(p){this._actions=p}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:p=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(p):void 0,getKeyBinding:p=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(p):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}e.DropdownMenu=d}),define(Q[431],J([0,1,7,6,112,430,206]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class S extends M.BaseActionViewItem{constructor(d,g,p,c={}){super(null,d,c);this.options=c,this.actionItem=null,this._onDidChangeVisibility=this._register(new N.Emitter),this.menuActionsOrProvider=g,this.contextMenuProvider=p,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(d){this.actionItem=d;const g=o=>{this.element=b.append(o,b.$("a.action-label"));let s=[];return typeof this.options.classNames=="string"?s=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(s=this.options.classNames),s.find(a=>a==="icon")||s.push("codicon"),this.element.classList.add(...s),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},p=Array.isArray(this.menuActionsOrProvider),c={contextMenuProvider:this.contextMenuProvider,labelRenderer:g,menuAsChild:this.options.menuAsChild,actions:p?this.menuActionsOrProvider:void 0,actionProvider:p?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new w.DropdownMenu(d,c)),this._register(this.dropdownMenu.onDidChangeVisibility(o=>{var s;(s=this.element)===null||s===void 0||s.setAttribute("aria-expanded",`${o}`),this._onDidChangeVisibility.fire(o)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const o=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return o.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(d){super.setActionContext(d),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=d:this.dropdownMenu.menuOptions={context:d})}updateEnabled(){var d,g;const p=!this.getAction().enabled;(d=this.actionItem)===null||d===void 0||d.classList.toggle("disabled",p),(g=this.element)===null||g===void 0||g.classList.toggle("disabled",p)}}e.DropdownMenuActionViewItem=S}),define(Q[177],J([0,1,423,7,156,47,83,6,52,29,40,279,61,55,305]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=void 0;const a=N.$,u={inputBackground:g.Color.fromHex("#3C3C3C"),inputForeground:g.Color.fromHex("#CCCCCC"),inputValidationInfoBorder:g.Color.fromHex("#55AAFF"),inputValidationInfoBackground:g.Color.fromHex("#063B49"),inputValidationWarningBorder:g.Color.fromHex("#B89500"),inputValidationWarningBackground:g.Color.fromHex("#352A05"),inputValidationErrorBorder:g.Color.fromHex("#BE1100"),inputValidationErrorBackground:g.Color.fromHex("#5A1D1D")};class r extends d.Widget{constructor(t,l,h){super();this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new C.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new C.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=l,this.options=h||Object.create(null),p.mixin(this.options,u,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=N.append(t,a(".monaco-inputbox.idle"));let m=this.options.flexibleHeight?"textarea":"input",_=N.append(this.element,a(".ibwrapper"));if(this.input=N.append(_,a(m+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=N.append(_,a("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new o.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),N.append(t,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(v=>this.input.scrollTop=v.scrollTop));const f=C.Event.filter(s.domEvent(document,"selectionchange"),()=>{const v=document.getSelection();return(v==null?void 0:v.anchorNode)===_});this._register(f(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&this.setPlaceHolder(this.placeholder),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new S.ActionBar(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage()}onFocus(){this._showMessage()}setPlaceHolder(t){this.placeholder=t,this.input.setAttribute("placeholder",t),this.input.title=t}setAriaLabel(t){this.ariaLabel=t,t?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(t){this.input.value!==t&&(this.input.value=t,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:N.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(t=null){this.input.select(),t&&(this.input.setSelectionRange(t.start,t.end),t.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return N.getTotalWidth(this.input)}set width(t){if(this.options.flexibleHeight&&this.options.flexibleWidth){let l=0;if(this.mirror){const h=parseFloat(this.mirror.style.paddingLeft||"")||0,m=parseFloat(this.mirror.style.paddingRight||"")||0;l=h+m}this.input.style.width=t-l+"px"}else this.input.style.width=t+"px";this.mirror&&(this.mirror.style.width=t+"px")}set paddingRight(t){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${t}px)`:this.input.style.paddingRight=t+"px",this.mirror&&(this.mirror.style.paddingRight=t+"px")}updateScrollDimensions(){if(!(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)){const t=this.cachedContentHeight,l=this.cachedHeight,h=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:t,height:l}),this.scrollableElement.setScrollPosition({scrollTop:h})}}showMessage(t,l){this.message=t,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(t.type));const h=this.stylesForType(this.message.type);this.element.style.border=h.border?`1px solid ${h.border}`:"",(this.hasFocus()||l)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let t=null;return this.validation&&(t=this.validation(this.value),t?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(t)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),t==null?void 0:t.type}stylesForType(t){switch(t){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(t){switch(t){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!(!this.contextViewProvider||!this.message)){let t,l=()=>t.style.width=N.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:m=>{if(!this.message)return null;t=N.append(m,a(".monaco-inputbox-container")),l();const _={inline:!0,className:"monaco-inputbox-message"},f=this.message.formatContent?M.renderFormattedText(this.message.content,_):M.renderText(this.message.content,_);f.classList.add(this.classForType(this.message.type));const v=this.stylesForType(this.message.type);return f.style.backgroundColor=v.background?v.background.toString():"",f.style.color=v.foreground?v.foreground.toString():"",f.style.border=v.border?`1px solid ${v.border}`:"",N.append(t,f),null},onHide:()=>{this.state="closed"},layout:l});let h;this.message.type===3?h=b.localize(0,null,this.message.content):this.message.type===2?h=b.localize(1,null,this.message.content):h=b.localize(2,null,this.message.content),w.alert(h),this.state="open"}}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!!this.mirror){const t=this.value,h=t.charCodeAt(t.length-1)===10?" ":"";t+h?this.mirror.textContent=t+h:this.mirror.innerText="\xA0",this.layout()}}style(t){this.inputBackground=t.inputBackground,this.inputForeground=t.inputForeground,this.inputBorder=t.inputBorder,this.inputValidationInfoBackground=t.inputValidationInfoBackground,this.inputValidationInfoForeground=t.inputValidationInfoForeground,this.inputValidationInfoBorder=t.inputValidationInfoBorder,this.inputValidationWarningBackground=t.inputValidationWarningBackground,this.inputValidationWarningForeground=t.inputValidationWarningForeground,this.inputValidationWarningBorder=t.inputValidationWarningBorder,this.inputValidationErrorBackground=t.inputValidationErrorBackground,this.inputValidationErrorForeground=t.inputValidationErrorForeground,this.inputValidationErrorBorder=t.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const t=this.inputBackground?this.inputBackground.toString():"",l=this.inputForeground?this.inputForeground.toString():"",h=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=t,this.element.style.color=l,this.input.style.backgroundColor="inherit",this.input.style.color=l,this.element.style.borderWidth=h?"1px":"",this.element.style.borderStyle=h?"solid":"",this.element.style.borderColor=h}layout(){if(!!this.mirror){const t=this.cachedContentHeight;this.cachedContentHeight=N.getTotalHeight(this.mirror),t!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}}insertAtCursor(t){const l=this.inputElement,h=l.selectionStart,m=l.selectionEnd,_=l.value;h!==null&&m!==null&&(this.value=_.substr(0,h)+t+_.substr(m),l.setSelectionRange(h+1,h+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}e.InputBox=r;class i extends r{constructor(t,l,h){super(t,l,h);this.history=new c.HistoryNavigator(h.history,100)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let t=this.getNextValue();t&&(t=t===this.value?this.getNextValue():t),t&&(this.value=t,w.status(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let t=this.getPreviousValue();t&&(t=t===this.value?this.getPreviousValue():t),t&&(this.value=t,w.status(this.value))}getCurrentValue(){let t=this.history.current();return t||(t=this.history.last(),this.history.next()),t}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}e.HistoryInputBox=i}),define(Q[432],J([0,1,419,7,177,52,6,233,207]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const d=b.localize(0,null);class g extends w.Widget{constructor(c,o,s,a){super();this._showOptionButtons=s,this.fixFocusOnOptionClickEnabled=!0,this._onDidOptionChange=this._register(new S.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new S.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new S.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new S.Emitter),this._onKeyUp=this._register(new S.Emitter),this._onCaseSensitiveKeyDown=this._register(new S.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new S.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=o,this.placeholder=a.placeholder||"",this.validation=a.validation,this.label=a.label||d,this.inputActiveOptionBorder=a.inputActiveOptionBorder,this.inputActiveOptionForeground=a.inputActiveOptionForeground,this.inputActiveOptionBackground=a.inputActiveOptionBackground,this.inputBackground=a.inputBackground,this.inputForeground=a.inputForeground,this.inputBorder=a.inputBorder,this.inputValidationInfoBorder=a.inputValidationInfoBorder,this.inputValidationInfoBackground=a.inputValidationInfoBackground,this.inputValidationInfoForeground=a.inputValidationInfoForeground,this.inputValidationWarningBorder=a.inputValidationWarningBorder,this.inputValidationWarningBackground=a.inputValidationWarningBackground,this.inputValidationWarningForeground=a.inputValidationWarningForeground,this.inputValidationErrorBorder=a.inputValidationErrorBorder,this.inputValidationErrorBackground=a.inputValidationErrorBackground,this.inputValidationErrorForeground=a.inputValidationErrorForeground;const u=a.appendCaseSensitiveLabel||"",r=a.appendWholeWordsLabel||"",i=a.appendRegexLabel||"",n=a.history||[],t=!!a.flexibleHeight,l=!!a.flexibleWidth,h=a.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new M.HistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:n,flexibleHeight:t,flexibleWidth:l,flexibleMaxHeight:h})),this.regex=this._register(new C.RegexCheckbox({appendTitle:i,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(f=>{this._onRegexKeyDown.fire(f)})),this.wholeWords=this._register(new C.WholeWordsCheckbox({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new C.CaseSensitiveCheckbox({appendTitle:u,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(f=>{this._onCaseSensitiveKeyDown.fire(f)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let m=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,f=>{if(f.equals(15)||f.equals(17)||f.equals(9)){let v=m.indexOf(document.activeElement);if(v>=0){let y=-1;f.equals(17)?y=(v+1)%m.length:f.equals(15)&&(v===0?y=m.length-1:y=v-1),f.equals(9)?(m[v].blur(),this.inputBox.focus()):y>=0&&m[y].focus(),N.EventHelper.stop(f,!0)}}});let _=document.createElement("div");_.className="controls",_.style.display=this._showOptionButtons?"block":"none",_.appendChild(this.caseSensitive.domNode),_.appendChild(this.wholeWords.domNode),_.appendChild(this.regex.domNode),this.domNode.appendChild(_),c&&c.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,f=>this._onKeyDown.fire(f)),this.onkeyup(this.inputBox.inputElement,f=>this._onKeyUp.fire(f)),this.oninput(this.inputBox.inputElement,f=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,f=>this._onMouseDown.fire(f))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(c){this.fixFocusOnOptionClickEnabled=c}setEnabled(c){c?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(c){this.inputBox.value!==c&&(this.inputBox.value=c)}style(c){this.inputActiveOptionBorder=c.inputActiveOptionBorder,this.inputActiveOptionForeground=c.inputActiveOptionForeground,this.inputActiveOptionBackground=c.inputActiveOptionBackground,this.inputBackground=c.inputBackground,this.inputForeground=c.inputForeground,this.inputBorder=c.inputBorder,this.inputValidationInfoBackground=c.inputValidationInfoBackground,this.inputValidationInfoForeground=c.inputValidationInfoForeground,this.inputValidationInfoBorder=c.inputValidationInfoBorder,this.inputValidationWarningBackground=c.inputValidationWarningBackground,this.inputValidationWarningForeground=c.inputValidationWarningForeground,this.inputValidationWarningBorder=c.inputValidationWarningBorder,this.inputValidationErrorBackground=c.inputValidationErrorBackground,this.inputValidationErrorForeground=c.inputValidationErrorForeground,this.inputValidationErrorBorder=c.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const c={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(c),this.wholeWords.style(c),this.caseSensitive.style(c);const o={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(o)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(c){this.caseSensitive.checked=c}getWholeWords(){return this.wholeWords.checked}setWholeWords(c){this.wholeWords.checked=c}getRegex(){return this.regex.checked}setRegex(c){this.regex.checked=c,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}e.FindInput=g}),define(Q[433],J([0,1,421,7,177,52,6,160,27,207]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=e.PreserveCaseCheckbox=void 0;const g=b.localize(0,null),p=b.localize(1,null);class c extends C.Checkbox{constructor(a){super({icon:d.Codicon.preserveCase,title:p+a.appendTitle,isChecked:a.isChecked,inputActiveOptionBorder:a.inputActiveOptionBorder,inputActiveOptionForeground:a.inputActiveOptionForeground,inputActiveOptionBackground:a.inputActiveOptionBackground})}}e.PreserveCaseCheckbox=c;class o extends w.Widget{constructor(a,u,r,i){super();this._showOptionButtons=r,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new S.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new S.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new S.Emitter),this._onInput=this._register(new S.Emitter),this._onKeyUp=this._register(new S.Emitter),this._onPreserveCaseKeyDown=this._register(new S.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=u,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||g,this.inputActiveOptionBorder=i.inputActiveOptionBorder,this.inputActiveOptionForeground=i.inputActiveOptionForeground,this.inputActiveOptionBackground=i.inputActiveOptionBackground,this.inputBackground=i.inputBackground,this.inputForeground=i.inputForeground,this.inputBorder=i.inputBorder,this.inputValidationInfoBorder=i.inputValidationInfoBorder,this.inputValidationInfoBackground=i.inputValidationInfoBackground,this.inputValidationInfoForeground=i.inputValidationInfoForeground,this.inputValidationWarningBorder=i.inputValidationWarningBorder,this.inputValidationWarningBackground=i.inputValidationWarningBackground,this.inputValidationWarningForeground=i.inputValidationWarningForeground,this.inputValidationErrorBorder=i.inputValidationErrorBorder,this.inputValidationErrorBackground=i.inputValidationErrorBackground,this.inputValidationErrorForeground=i.inputValidationErrorForeground;const n=i.appendPreserveCaseLabel||"",t=i.history||[],l=!!i.flexibleHeight,h=!!i.flexibleWidth,m=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new M.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:t,flexibleHeight:l,flexibleWidth:h,flexibleMaxHeight:m})),this.preserveCase=this._register(new c({appendTitle:n,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(v=>{this._onDidOptionChange.fire(v),!v&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(v=>{this._onPreserveCaseKeyDown.fire(v)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let _=[this.preserveCase.domNode];this.onkeydown(this.domNode,v=>{if(v.equals(15)||v.equals(17)||v.equals(9)){let y=_.indexOf(document.activeElement);if(y>=0){let L=-1;v.equals(17)?L=(y+1)%_.length:v.equals(15)&&(y===0?L=_.length-1:L=y-1),v.equals(9)?(_[y].blur(),this.inputBox.focus()):L>=0&&_[L].focus(),N.EventHelper.stop(v,!0)}}});let f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.preserveCase.domNode),this.domNode.appendChild(f),a&&a.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,v=>this._onKeyDown.fire(v)),this.onkeyup(this.inputBox.inputElement,v=>this._onKeyUp.fire(v)),this.oninput(this.inputBox.inputElement,v=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,v=>this._onMouseDown.fire(v))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(a){a?this.enable():this.disable()}style(a){this.inputActiveOptionBorder=a.inputActiveOptionBorder,this.inputActiveOptionForeground=a.inputActiveOptionForeground,this.inputActiveOptionBackground=a.inputActiveOptionBackground,this.inputBackground=a.inputBackground,this.inputForeground=a.inputForeground,this.inputBorder=a.inputBorder,this.inputValidationInfoBackground=a.inputValidationInfoBackground,this.inputValidationInfoForeground=a.inputValidationInfoForeground,this.inputValidationInfoBorder=a.inputValidationInfoBorder,this.inputValidationWarningBackground=a.inputValidationWarningBackground,this.inputValidationWarningForeground=a.inputValidationWarningForeground,this.inputValidationWarningBorder=a.inputValidationWarningBorder,this.inputValidationErrorBackground=a.inputValidationErrorBackground,this.inputValidationErrorForeground=a.inputValidationErrorForeground,this.inputValidationErrorBorder=a.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const a={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(a);const u={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(u)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(a){this.preserveCase.checked=a}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(a){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=a,this.domNode.style.width=a+"px"}dispose(){super.dispose()}}e.ReplaceInput=o}),define(Q[434],J([0,1,425,8,48,83,7,56,15,2,61,204,17,27,112,123,35,50,102]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanMnemonic=e.Menu=e.Direction=e.MENU_ESCAPED_MNEMONIC_REGEX=e.MENU_MNEMONIC_REGEX=void 0,e.MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,e.MENU_ESCAPED_MNEMONIC_REGEX=/(&amp;)?(&amp;)([^\s&])/g;const t=s.registerCodicon("menu-selection",s.Codicon.check),l=s.registerCodicon("menu-submenu",s.Codicon.chevronRight);var h;(function(I){I[I.Right=0]="Right",I[I.Left=1]="Left"})(h=e.Direction||(e.Direction={}));class m extends w.ActionBar{constructor(k,E,T={}){k.classList.add("monaco-menu-container"),k.setAttribute("role","presentation");const O=document.createElement("div");O.classList.add("monaco-menu"),O.setAttribute("role","presentation"),super(O,{orientation:2,actionViewItemProvider:F=>this.doGetActionViewItem(F,T,A),context:T.context,actionRunner:T.actionRunner,ariaLabel:T.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...o.isMacintosh||o.isLinux?[10]:[]],keyDown:!0}}),this.menuElement=O,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new g.DisposableStore),this.initializeStyleSheet(k),S.addDisposableListener(O,S.EventType.KEY_DOWN,F=>{new C.StandardKeyboardEvent(F).equals(2)&&F.preventDefault()}),T.enableMnemonics&&this.menuDisposables.add(S.addDisposableListener(O,S.EventType.KEY_DOWN,F=>{const D=F.key.toLocaleLowerCase();if(this.mnemonics.has(D)){S.EventHelper.stop(F,!0);const R=this.mnemonics.get(D);if(R.length===1&&(R[0]instanceof f&&R[0].container&&this.focusItemByElement(R[0].container),R[0].onClick(F)),R.length>1){const W=R.shift();W&&W.container&&(this.focusItemByElement(W.container),R.push(W)),this.mnemonics.set(D,R)}}})),o.isLinux&&this._register(S.addDisposableListener(O,S.EventType.KEY_DOWN,F=>{const D=new C.StandardKeyboardEvent(F);D.equals(14)||D.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),S.EventHelper.stop(F,!0)):(D.equals(13)||D.equals(12))&&(this.focusedItem=0,this.focusPrevious(),S.EventHelper.stop(F,!0))})),this._register(S.addDisposableListener(this.domNode,S.EventType.MOUSE_OUT,F=>{let D=F.relatedTarget;S.isAncestor(D,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),F.stopPropagation())})),this._register(S.addDisposableListener(this.actionsList,S.EventType.MOUSE_OVER,F=>{let D=F.target;if(!(!D||!S.isAncestor(D,this.actionsList)||D===this.actionsList)){for(;D.parentElement!==this.actionsList&&D.parentElement!==null;)D=D.parentElement;if(D.classList.contains("action-item")){const R=this.focusedItem;this.setFocusedItem(D),R!==this.focusedItem&&this.updateFocus()}}}));let A={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new p.DomScrollableElement(O,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const B=this.scrollableElement.getDomNode();B.style.position="",this._register(S.addDisposableListener(B,S.EventType.MOUSE_UP,F=>{F.preventDefault()})),O.style.maxHeight=`${Math.max(10,window.innerHeight-k.getBoundingClientRect().top-35)}px`,E=E.filter(F=>{var D;return((D=T.submenuIds)===null||D===void 0?void 0:D.has(F.id))?(console.warn(`Found submenu cycle: ${F.id}`),!1):!0}),this.push(E,{icon:!0,label:!0,isMenu:!0}),k.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(F=>!(F instanceof v)).forEach((F,D,R)=>{F.updatePositionInSet(D+1,R.length)})}initializeStyleSheet(k){S.isInShadowDOM(k)?(this.styleSheet=S.createStyleSheet(k),this.styleSheet.textContent=L):(m.globalStyleSheet||(m.globalStyleSheet=S.createStyleSheet(),m.globalStyleSheet.textContent=L),this.styleSheet=m.globalStyleSheet)}style(k){const E=this.getContainer(),T=k.foregroundColor?`${k.foregroundColor}`:"",O=k.backgroundColor?`${k.backgroundColor}`:"",A=k.borderColor?`1px solid ${k.borderColor}`:"",B=k.shadowColor?`0 2px 4px ${k.shadowColor}`:"";E.style.border=A,this.domNode.style.color=T,this.domNode.style.backgroundColor=O,E.style.boxShadow=B,this.viewItems&&this.viewItems.forEach(F=>{(F instanceof _||F instanceof v)&&F.style(k)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(k){const E=this.focusedItem;this.setFocusedItem(k),E!==this.focusedItem&&this.updateFocus()}setFocusedItem(k){for(let E=0;E<this.actionsList.children.length;E++){let T=this.actionsList.children[E];if(k===T){this.focusedItem=E;break}}}updateFocus(k){super.updateFocus(k,!0),typeof this.focusedItem!="undefined"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(k,E,T){if(k instanceof M.Separator)return new v(E.context,k,{icon:!0});if(k instanceof M.SubmenuAction){const O=new f(k,k.actions,T,Object.assign(Object.assign({},E),{submenuIds:new Set([...E.submenuIds||[],k.id])}));if(E.enableMnemonics){const A=O.getMnemonic();if(A&&O.isEnabled()){let B=[];this.mnemonics.has(A)&&(B=this.mnemonics.get(A)),B.push(O),this.mnemonics.set(A,B)}}return O}else{const O={enableMnemonics:E.enableMnemonics,useEventAsContext:E.useEventAsContext};if(E.getKeyBinding){const B=E.getKeyBinding(k);if(B){const F=B.getLabel();F&&(O.keybinding=F)}}const A=new _(E.context,k,O);if(E.enableMnemonics){const B=A.getMnemonic();if(B&&A.isEnabled()){let F=[];this.mnemonics.has(B)&&(F=this.mnemonics.get(B)),F.push(A),this.mnemonics.set(B,F)}}return A}}}e.Menu=m;class _ extends a.BaseActionViewItem{constructor(k,E,T={}){if(T.isMenu=!0,super(E,E,T),this.options=T,this.options.icon=T.icon!==void 0?T.icon:!1,this.options.label=T.label!==void 0?T.label:!0,this.cssClass="",this.options.label&&T.enableMnemonics){let O=this.getAction().label;if(O){let A=e.MENU_MNEMONIC_REGEX.exec(O);A&&(this.mnemonic=(A[1]?A[1]:A[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new d.RunOnceScheduler(()=>{!this.element||(this._register(S.addDisposableListener(this.element,S.EventType.MOUSE_UP,O=>{if(S.EventHelper.stop(O,!0),r.isFirefox){if(new i.StandardMouseEvent(O).rightButton)return;this.onClick(O)}else setTimeout(()=>{this.onClick(O)},0)})),this._register(S.addDisposableListener(this.element,S.EventType.CONTEXT_MENU,O=>{S.EventHelper.stop(O,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(k){super.render(k),!!this.element&&(this.container=k,this.item=S.append(this.element,S.$("a.action-menu-item")),this._action.id===M.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=S.append(this.item,S.$("span.menu-item-check"+t.cssSelector)),this.check.setAttribute("role","none"),this.label=S.append(this.item,S.$("span.action-label")),this.options.label&&this.options.keybinding&&(S.append(this.item,S.$("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(k,E){this.item&&(this.item.setAttribute("aria-posinset",`${k}`),this.item.setAttribute("aria-setsize",`${E}`))}updateLabel(){if(!!this.label&&this.options.label){S.clearNode(this.label);let k=n.stripIcons(this.getAction().label);if(k){const E=y(k);this.options.enableMnemonics||(k=E),this.label.setAttribute("aria-label",E.replace(/&&/g,"&"));const T=e.MENU_MNEMONIC_REGEX.exec(k);if(T){k=N.escape(k),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let O=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(k);for(;O&&O[1];)O=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(k);const A=B=>B.replace(/&amp;&amp;/g,"&amp;");O?this.label.append(N.ltrim(A(k.substr(0,O.index))," "),S.$("u",{"aria-hidden":"true"},O[3]),N.rtrim(A(k.substr(O.index+O[0].length))," ")):this.label.innerText=A(k).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(T[1]?T[1]:T[3]).toLocaleLowerCase())}else this.label.innerText=k.replace(/&&/g,"&").trim()}}}updateTooltip(){let k=null;this.getAction().tooltip?k=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(k=this.getAction().label,this.options.keybinding&&(k=b.localize(0,null,k,this.options.keybinding))),k&&this.item&&(this.item.title=k)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){!this.item||(this.getAction().checked?(this.item.classList.add("checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!!this.menuStyle){const k=this.element&&this.element.classList.contains("focused"),E=k&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,T=k&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,O=k&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=E?E.toString():"",this.item.style.backgroundColor=T?T.toString():""),this.check&&(this.check.style.color=E?E.toString():""),this.container&&(this.container.style.border=O)}}style(k){this.menuStyle=k,this.applyStyle()}}class f extends _{constructor(k,E,T,O){super(k,k,O);this.submenuActions=E,this.parentData=T,this.submenuOptions=O,this.mysubmenu=null,this.submenuDisposables=this._register(new g.DisposableStore),this.mouseOver=!1,this.expandDirection=O&&O.expandDirection!==void 0?O.expandDirection:h.Right,this.showScheduler=new d.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new d.RunOnceScheduler(()=>{this.element&&!S.isAncestor(S.getActiveElement(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(k){super.render(k),!!this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=S.append(this.item,S.$("span.submenu-indicator"+l.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(S.addDisposableListener(this.element,S.EventType.KEY_UP,E=>{let T=new C.StandardKeyboardEvent(E);(T.equals(17)||T.equals(3))&&(S.EventHelper.stop(E,!0),this.createSubmenu(!0))})),this._register(S.addDisposableListener(this.element,S.EventType.KEY_DOWN,E=>{let T=new C.StandardKeyboardEvent(E);S.getActiveElement()===this.item&&(T.equals(17)||T.equals(3))&&S.EventHelper.stop(E,!0)})),this._register(S.addDisposableListener(this.element,S.EventType.MOUSE_OVER,E=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(S.addDisposableListener(this.element,S.EventType.MOUSE_LEAVE,E=>{this.mouseOver=!1})),this._register(S.addDisposableListener(this.element,S.EventType.FOCUS_OUT,E=>{this.element&&!S.isAncestor(S.getActiveElement(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(k){S.EventHelper.stop(k,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(k){if(this.parentData.submenu&&(k||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(E){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(k,E,T,O){const A={top:0,left:0};return A.left=c.layout(k.width,E.width,{position:O===h.Right?0:1,offset:T.left,size:T.width}),A.left>=T.left&&A.left<T.left+T.width&&(T.left+10+E.width<=k.width&&(A.left=T.left+10),T.top+=10,T.height=0),A.top=c.layout(k.height,E.height,{position:0,offset:T.top,size:0}),A.top+E.height===T.top&&A.top+T.height+E.height<=k.height&&(A.top+=T.height),A}createSubmenu(k=!0){if(!!this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=S.append(this.element,S.$("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const E=getComputedStyle(this.parentData.parent.domNode),T=parseFloat(E.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new m(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new M.EmptySubmenuAction],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const O=this.element.getBoundingClientRect(),A={top:O.top-T,left:O.left,height:O.height+2*T,width:O.width},B=this.submenuContainer.getBoundingClientRect(),{top:F,left:D}=this.calculateSubmenuMenuLayout(new S.Dimension(window.innerWidth,window.innerHeight),S.Dimension.lift(B),A,this.expandDirection);this.submenuContainer.style.left=`${D}px`,this.submenuContainer.style.top=`${F}px`,this.submenuDisposables.add(S.addDisposableListener(this.submenuContainer,S.EventType.KEY_UP,R=>{new C.StandardKeyboardEvent(R).equals(15)&&(S.EventHelper.stop(R,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(S.addDisposableListener(this.submenuContainer,S.EventType.KEY_DOWN,R=>{new C.StandardKeyboardEvent(R).equals(15)&&S.EventHelper.stop(R,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(k),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(k){var E;this.item&&((E=this.item)===null||E===void 0||E.setAttribute("aria-expanded",k))}applyStyle(){if(super.applyStyle(),!!this.menuStyle){const E=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=E?`${E}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class v extends a.ActionViewItem{style(k){this.label&&(this.label.style.borderBottomColor=k.separatorColor?`${k.separatorColor}`:"")}}function y(I){const k=e.MENU_MNEMONIC_REGEX,E=k.exec(I);if(!E)return I;const T=!E[1];return I.replace(k,T?"$2$3":"").trim()}e.cleanMnemonic=y;let L=`
.monaco-menu {
font-size: 13px;
}
${u.formatRule(t)}
${u.formatRule(l)}
.monaco-menu .monaco-action-bar {
text-align: right;
overflow: hidden;
white-space: nowrap;
}
.monaco-menu .monaco-action-bar .actions-container {
display: flex;
margin: 0 auto;
padding: 0;
width: 100%;
justify-content: flex-end;
}
.monaco-menu .monaco-action-bar.vertical .actions-container {
display: inline-block;
}
.monaco-menu .monaco-action-bar.reverse .actions-container {
flex-direction: row-reverse;
}
.monaco-menu .monaco-action-bar .action-item {
cursor: pointer;
display: inline-block;
transition: transform 50ms ease;
position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
}
.monaco-menu .monaco-action-bar .action-item.disabled {
cursor: default;
}
.monaco-menu .monaco-action-bar.animated .action-item.active {
transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */
}
.monaco-menu .monaco-action-bar .action-item .icon,
.monaco-menu .monaco-action-bar .action-item .codicon {
display: inline-block;
}
.monaco-menu .monaco-action-bar .action-item .codicon {
display: flex;
align-items: center;
}
.monaco-menu .monaco-action-bar .action-label {
font-size: 11px;
margin-right: 4px;
}
.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
opacity: 0.4;
}
/* Vertical actions */
.monaco-menu .monaco-action-bar.vertical {
text-align: left;
}
.monaco-menu .monaco-action-bar.vertical .action-item {
display: block;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
display: block;
border-bottom: 1px solid #bbb;
padding-top: 1px;
margin-left: .8em;
margin-right: .8em;
}
.monaco-menu .secondary-actions .monaco-action-bar .action-label {
margin-left: 6px;
}
/* Action Items */
.monaco-menu .monaco-action-bar .action-item.select-container {
overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
flex: 1;
max-width: 170px;
min-width: 60px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
}
.monaco-menu .monaco-action-bar.vertical {
margin-left: 0;
overflow: visible;
}
.monaco-menu .monaco-action-bar.vertical .actions-container {
display: block;
}
.monaco-menu .monaco-action-bar.vertical .action-item {
padding: 0;
transform: none;
display: flex;
}
.monaco-menu .monaco-action-bar.vertical .action-item.active {
transform: none;
}
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
flex: 1 1 auto;
display: flex;
height: 2em;
align-items: center;
position: relative;
}
.monaco-menu .monaco-action-bar.vertical .action-label {
flex: 1 1 auto;
text-decoration: none;
padding: 0 1em;
background: none;
font-size: 12px;
line-height: 1;
}
.monaco-menu .monaco-action-bar.vertical .keybinding,
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
display: inline-block;
flex: 2 1 auto;
padding: 0 1em;
text-align: right;
font-size: 12px;
line-height: 1;
}
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
height: 100%;
}
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
font-size: 16px !important;
display: flex;
align-items: center;
}
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
margin-left: auto;
margin-right: -20px;
}
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
opacity: 0.4;
}
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
display: inline-block;
box-sizing: border-box;
margin: 0;
}
.monaco-menu .monaco-action-bar.vertical .action-item {
position: static;
overflow: visible;
}
.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
position: absolute;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
padding: 0.5em 0 0 0;
margin-bottom: 0.5em;
width: 100%;
height: 0px !important;
margin-left: .8em !important;
margin-right: .8em !important;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
padding: 0.7em 1em 0.1em 1em;
font-weight: bold;
opacity: 1;
}
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
color: inherit;
}
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
position: absolute;
visibility: hidden;
width: 1em;
height: 100%;
}
.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
visibility: visible;
display: flex;
align-items: center;
justify-content: center;
}
/* Context Menu */
.context-view.monaco-menu-container {
outline: 0;
border: none;
animation: fadeIn 0.083s linear;
-webkit-app-region: no-drag;
}
.context-view.monaco-menu-container :focus,
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
outline: 0;
}
.monaco-menu .monaco-action-bar.vertical .action-item {
border: thin solid transparent; /* prevents jumping behaviour on hover or focus */
}
/* High Contrast Theming */
:host-context(.hc-black) .context-view.monaco-menu-container {
box-shadow: none;
}
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
background: none;
}
/* Vertical Action Bar Styles */
.monaco-menu .monaco-action-bar.vertical {
padding: .5em 0;
}
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
height: 1.8em;
}
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
.monaco-menu .monaco-action-bar.vertical .keybinding {
font-size: inherit;
padding: 0 2em;
}
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
font-size: inherit;
width: 2em;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
font-size: inherit;
padding: 0.2em 0 0 0;
margin-bottom: 0.2em;
}
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
margin-left: 0;
margin-right: 0;
}
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
font-size: 60%;
padding: 0 1.8em;
}
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
height: 100%;
mask-size: 10px 10px;
-webkit-mask-size: 10px 10px;
}
.monaco-menu .action-item {
cursor: default;
}
/* Arrows */
.monaco-scrollable-element > .scrollbar > .scra {
cursor: pointer;
font-size: 11px !important;
}
.monaco-scrollable-element > .visible {
opacity: 1;
/* Background rule added for IE9 - to allow clicks on dom node */
background:rgba(0,0,0,0);
transition: opacity 100ms linear;
}
.monaco-scrollable-element > .invisible {
opacity: 0;
pointer-events: none;
}
.monaco-scrollable-element > .invisible.fade {
transition: opacity 800ms linear;
}
/* Scrollable Content Inset Shadow */
.monaco-scrollable-element > .shadow {
position: absolute;
display: none;
}
.monaco-scrollable-element > .shadow.top {
display: block;
top: 0;
left: 3px;
height: 3px;
width: 100%;
box-shadow: #DDD 0 6px 6px -6px inset;
}
.monaco-scrollable-element > .shadow.left {
display: block;
top: 3px;
left: 0;
height: 100%;
width: 3px;
box-shadow: #DDD 6px 0 6px -6px inset;
}
.monaco-scrollable-element > .shadow.top-left-corner {
display: block;
top: 0;
left: 0;
height: 3px;
width: 3px;
}
.monaco-scrollable-element > .shadow.top.left {
box-shadow: #DDD 6px 6px 6px -6px inset;
}
/* ---------- Default Style ---------- */
:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {
background: rgba(100, 100, 100, .4);
}
:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {
background: rgba(121, 121, 121, .4);
}
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {
background: rgba(111, 195, 223, .6);
}
.monaco-scrollable-element > .scrollbar > .slider:hover {
background: rgba(100, 100, 100, .7);
}
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {
background: rgba(111, 195, 223, .8);
}
.monaco-scrollable-element > .scrollbar > .slider.active {
background: rgba(0, 0, 0, .6);
}
:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {
background: rgba(191, 191, 191, .4);
}
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {
background: rgba(111, 195, 223, 1);
}
:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {
box-shadow: none;
}
:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {
box-shadow: #000 6px 0 6px -6px inset;
}
:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {
box-shadow: #000 6px 6px 6px -6px inset;
}
:host-context(.hc-black) .monaco-scrollable-element .shadow.top {
box-shadow: none;
}
:host-context(.hc-black) .monaco-scrollable-element .shadow.left {
box-shadow: none;
}
:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {
box-shadow: none;
}
`}),define(Q[435],J([0,1,7,177,2,56,82,50,125]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const d=b.$;class g extends M.Disposable{constructor(c){super();this.parent=c,this.onKeyDown=o=>b.addDisposableListener(this.inputBox.inputElement,b.EventType.KEY_DOWN,s=>{o(new w.StandardKeyboardEvent(s))}),this.onMouseDown=o=>b.addDisposableListener(this.inputBox.inputElement,b.EventType.MOUSE_DOWN,s=>{o(new C.StandardMouseEvent(s))}),this.onDidChange=o=>this.inputBox.onDidChange(o),this.container=b.append(this.parent,d(".quick-input-box")),this.inputBox=this._register(new N.InputBox(this.container,void 0))}get value(){return this.inputBox.value}set value(c){this.inputBox.value=c}select(c=null){this.inputBox.select(c)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(c){this.inputBox.setPlaceHolder(c)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(c){this.inputBox.setAriaLabel(c)}get password(){return this.inputBox.inputElement.type==="password"}set password(c){this.inputBox.inputElement.type=c?"password":"text"}setAttribute(c,o){this.inputBox.inputElement.setAttribute(c,o)}removeAttribute(c){this.inputBox.inputElement.removeAttribute(c)}showDecoration(c){c===S.default.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:c===S.default.Info?1:c===S.default.Warning?2:3,content:""})}stylesForType(c){return this.inputBox.stylesForType(c===S.default.Info?1:c===S.default.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(c){this.inputBox.style(c)}}e.QuickInputBox=g}),define(Q[436],J([4,5]),function(q,e){return q.create("vs/base/common/errorMessage",e)}),define(Q[437],J([0,1,436,20,19]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function w(g,p){return p&&(g.stack||g.stacktrace)?b.localize(0,null,C(g),S(g.stack)||S(g.stacktrace)):C(g)}function S(g){return Array.isArray(g)?g.join(`
`):g}function C(g){return typeof g.code=="string"&&typeof g.errno=="number"&&typeof g.syscall=="string"?b.localize(1,null,g.message):g.message||b.localize(2,null)}function d(g=null,p=!1){if(!g)return b.localize(3,null);if(Array.isArray(g)){const c=M.coalesce(g),o=d(c[0],p);return c.length>1?b.localize(4,null,o,c.length):o}if(N.isString(g))return g;if(g.detail){const c=g.detail;if(c.error)return w(c.error,p);if(c.exception)return w(c.exception,p)}return g.stack?w(g,p):g.message?g.message:b.localize(5,null)}e.toErrorMessage=d}),define(Q[438],J([4,5]),function(q,e){return q.create("vs/base/common/keybindingLabels",e)}),define(Q[235],J([0,1,438]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class N{constructor(S,C,d=C){this.modifierLabels=[null],this.modifierLabels[2]=S,this.modifierLabels[1]=C,this.modifierLabels[3]=d}toLabel(S,C,d){if(C.length===0)return null;const g=[];for(let p=0,c=C.length;p<c;p++){const o=C[p],s=d(o);if(s===null)return null;g[p]=M(o,s,this.modifierLabels[S])}return g.join(" ")}}e.ModifierLabelProvider=N,e.UILabelProvider=new N({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:b.localize(0,null),shiftKey:b.localize(1,null),altKey:b.localize(2,null),metaKey:b.localize(3,null),separator:"+"},{ctrlKey:b.localize(4,null),shiftKey:b.localize(5,null),altKey:b.localize(6,null),metaKey:b.localize(7,null),separator:"+"}),e.AriaLabelProvider=new N({ctrlKey:b.localize(8,null),shiftKey:b.localize(9,null),altKey:b.localize(10,null),metaKey:b.localize(11,null),separator:"+"},{ctrlKey:b.localize(12,null),shiftKey:b.localize(13,null),altKey:b.localize(14,null),metaKey:b.localize(15,null),separator:"+"},{ctrlKey:b.localize(16,null),shiftKey:b.localize(17,null),altKey:b.localize(18,null),metaKey:b.localize(19,null),separator:"+"});function M(w,S,C){if(S===null)return"";const d=[];return w.ctrlKey&&d.push(C.ctrlKey),w.shiftKey&&d.push(C.shiftKey),w.altKey&&d.push(C.altKey),w.metaKey&&d.push(C.metaKey),S!==""&&d.push(S),d.join(C.separator)}}),define(Q[439],J([0,1,40,235,7,424,306]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=void 0;const S=M.$;class C{constructor(g,p,c){this.os=p,this.options=c,this.domNode=M.append(g,S(".monaco-keybinding")),this.didEverRender=!1,g.appendChild(this.domNode)}set(g,p){this.didEverRender&&this.keybinding===g&&C.areSame(this.matches,p)||(this.keybinding=g,this.matches=p,this.render())}render(){if(M.clearNode(this.domNode),this.keybinding){let[g,p]=this.keybinding.getParts();g&&this.renderPart(this.domNode,g,this.matches?this.matches.firstPart:null),p&&(M.append(this.domNode,S("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,p,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}renderPart(g,p,c){const o=N.UILabelProvider.modifierLabels[this.os];p.ctrlKey&&this.renderKey(g,o.ctrlKey,Boolean(c==null?void 0:c.ctrlKey),o.separator),p.shiftKey&&this.renderKey(g,o.shiftKey,Boolean(c==null?void 0:c.shiftKey),o.separator),p.altKey&&this.renderKey(g,o.altKey,Boolean(c==null?void 0:c.altKey),o.separator),p.metaKey&&this.renderKey(g,o.metaKey,Boolean(c==null?void 0:c.metaKey),o.separator);const s=p.keyLabel;s&&this.renderKey(g,s,Boolean(c==null?void 0:c.keyCode),"")}renderKey(g,p,c,o){M.append(g,S("span.monaco-keybinding-key"+(c?".highlight":""),void 0,p)),o&&M.append(g,S("span.monaco-keybinding-key-separator",void 0,o))}renderUnbound(g){M.append(g,S("span.monaco-keybinding-key",void 0,w.localize(0,null)))}static areSame(g,p){return g===p||!g&&!p?!0:!!g&&!!p&&b.equals(g.firstPart,p.firstPart)&&b.equals(g.chordPart,p.chordPart)}}e.KeybindingLabel=C}),define(Q[440],J([4,5]),function(q,e){return q.create("vs/base/parts/quickinput/browser/quickInput",e)}),define(Q[441],J([4,5]),function(q,e){return q.create("vs/base/parts/quickinput/browser/quickInputList",e)}),define(Q[442],J([0,1,7,2,102,283,6,56,175,157,99,19,17,83,48,211,20,439,441,125]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const t=b.$;class l{constructor(I){this.hidden=!1,this._onChecked=new S.Emitter,this.onChecked=this._onChecked.event,Object.assign(this,I)}get checked(){return!!this._checked}set checked(I){I!==this._checked&&(this._checked=I,this._onChecked.fire(I))}dispose(){this._onChecked.dispose()}}class h{get templateId(){return h.ID}renderTemplate(I){const k=Object.create(null);k.toDisposeElement=[],k.toDisposeTemplate=[],k.entry=b.append(I,t(".quick-input-list-entry"));const E=b.append(k.entry,t("label.quick-input-list-label"));k.toDisposeTemplate.push(b.addStandardDisposableListener(E,b.EventType.CLICK,D=>{k.checkbox.offsetParent||D.preventDefault()})),k.checkbox=b.append(E,t("input.quick-input-list-checkbox")),k.checkbox.type="checkbox",k.toDisposeTemplate.push(b.addStandardDisposableListener(k.checkbox,b.EventType.CHANGE,D=>{k.element.checked=k.checkbox.checked}));const T=b.append(E,t(".quick-input-list-rows")),O=b.append(T,t(".quick-input-list-row")),A=b.append(T,t(".quick-input-list-row"));k.label=new d.IconLabel(O,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const B=b.append(O,t(".quick-input-list-entry-keybinding"));k.keybinding=new i.KeybindingLabel(B,o.OS);const F=b.append(A,t(".quick-input-list-label-meta"));return k.detail=new g.HighlightedLabel(F,!0),k.separator=b.append(k.entry,t(".quick-input-list-separator")),k.actionBar=new s.ActionBar(k.entry),k.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),k.toDisposeTemplate.push(k.actionBar),k}renderElement(I,k,E){E.toDisposeElement=N.dispose(E.toDisposeElement),E.element=I,E.checkbox.checked=I.checked,E.toDisposeElement.push(I.onChecked(D=>E.checkbox.checked=D));const{labelHighlights:T,descriptionHighlights:O,detailHighlights:A}=I,B=Object.create(null);B.matches=T||[],B.descriptionTitle=I.saneDescription,B.descriptionMatches=O||[],B.extraClasses=I.item.iconClasses,B.italic=I.item.italic,B.strikethrough=I.item.strikethrough,E.label.setLabel(I.saneLabel,I.saneDescription,B),E.keybinding.set(I.item.keybinding),E.detail.set(I.saneDetail,A),I.separator&&I.separator.label?(E.separator.textContent=I.separator.label,E.separator.style.display=""):E.separator.style.display="none",E.entry.classList.toggle("quick-input-list-separator-border",!!I.separator),E.actionBar.clear();const F=I.item.buttons;F&&F.length?(E.actionBar.push(F.map((D,R)=>{let W=D.iconClass||(D.iconPath?u.getIconClass(D.iconPath):void 0);D.alwaysVisible&&(W=W?`${W} always-visible`:"always-visible");const x=new a.Action(`id-${R}`,"",W,!0,()=>Ie(this,void 0,void 0,function*(){I.fireButtonTriggered({button:D,item:I.item})}));return x.tooltip=D.tooltip||"",x}),{icon:!0,label:!1}),E.entry.classList.add("has-actions")):E.entry.classList.remove("has-actions")}disposeElement(I,k,E){E.toDisposeElement=N.dispose(E.toDisposeElement)}disposeTemplate(I){I.toDisposeElement=N.dispose(I.toDisposeElement),I.toDisposeTemplate=N.dispose(I.toDisposeTemplate)}}h.ID="listelement";class m{getHeight(I){return I.saneDetail?44:22}getTemplateId(I){return h.ID}}var _;(function(L){L[L.First=1]="First",L[L.Second=2]="Second",L[L.Last=3]="Last",L[L.Next=4]="Next",L[L.Previous=5]="Previous",L[L.NextPage=6]="NextPage",L[L.PreviousPage=7]="PreviousPage"})(_=e.QuickInputListFocus||(e.QuickInputListFocus={}));class f{constructor(I,k,E){this.parent=I,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new S.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new S.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new S.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new S.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new S.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new S.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new S.Emitter,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=k,this.container=b.append(this.parent,t(".quick-input-list"));const T=new m,O=new y;this.list=E.createList("QuickInput",this.container,T,[new h],{identityProvider:{getId:A=>A.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:O}),this.list.getHTMLElement().id=k,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(A=>{const B=new C.StandardKeyboardEvent(A);switch(B.keyCode){case 10:this.toggleCheckbox();break;case 31:(o.isMacintosh?A.metaKey:A.ctrlKey)&&this.list.setFocus(c.range(this.list.length));break;case 16:const F=this.list.getFocus();F.length===1&&F[0]===0&&this._onLeave.fire();break;case 18:const D=this.list.getFocus();D.length===1&&D[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(B)})),this.disposables.push(this.list.onMouseDown(A=>{A.browserEvent.button!==2&&A.browserEvent.preventDefault()})),this.disposables.push(b.addDisposableListener(this.container,b.EventType.CLICK,A=>{(A.x||A.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(A=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(A=>{typeof A.index=="number"&&(A.browserEvent.preventDefault(),this.list.setSelection([A.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return S.Event.map(this.list.onDidChangeFocus,I=>I.elements.map(k=>k.item))}get onDidChangeSelection(){return S.Event.map(this.list.onDidChangeSelection,I=>({items:I.elements.map(k=>k.item),event:I.browserEvent}))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(I,k=!0){for(let E=0,T=I.length;E<T;E++){const O=I[E];if(!O.hidden)if(O.checked)k=!0;else return!1}return k}getCheckedCount(){let I=0;const k=this.elements;for(let E=0,T=k.length;E<T;E++)k[E].checked&&I++;return I}getVisibleCount(){let I=0;const k=this.elements;for(let E=0,T=k.length;E<T;E++)k[E].hidden||I++;return I}setAllVisibleChecked(I){try{this._fireCheckedEvents=!1,this.elements.forEach(k=>{k.hidden||(k.checked=I)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(I){this.elementDisposables=N.dispose(this.elementDisposables);const k=E=>this.fireButtonTriggered(E);this.inputElements=I,this.elements=I.reduce((E,T,O)=>{var A,B,F;if(T.type!=="separator"){const D=O&&I[O-1],R=T.label&&T.label.replace(/\r?\n/g," "),W=T.meta&&T.meta.replace(/\r?\n/g," "),x=T.description&&T.description.replace(/\r?\n/g," "),K=T.detail&&T.detail.replace(/\r?\n/g," "),Y=T.ariaLabel||[R,x,K].map(ee=>ee&&M.parseLabelWithIcons(ee).text).filter(ee=>!!ee).join(", ");E.push(new l({index:O,item:T,saneLabel:R,saneMeta:W,saneAriaLabel:Y,saneDescription:x,saneDetail:K,labelHighlights:(A=T.highlights)===null||A===void 0?void 0:A.label,descriptionHighlights:(B=T.highlights)===null||B===void 0?void 0:B.description,detailHighlights:(F=T.highlights)===null||F===void 0?void 0:F.detail,checked:!1,separator:D&&D.type==="separator"?D:void 0,fireButtonTriggered:k}))}return E},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(E=>E.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((E,T,O)=>(E.set(T.item,O),E),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(I=>I.item)}setFocusedElements(I){if(this.list.setFocus(I.filter(k=>this.elementsToIndexes.has(k)).map(k=>this.elementsToIndexes.get(k))),I.length>0){const k=this.list.getFocus()[0];typeof k=="number"&&this.list.reveal(k)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(I){this.list.setSelection(I.filter(k=>this.elementsToIndexes.has(k)).map(k=>this.elementsToIndexes.get(k)))}getCheckedElements(){return this.elements.filter(I=>I.checked).map(I=>I.item)}setCheckedElements(I){try{this._fireCheckedEvents=!1;const k=new Set;for(const E of I)k.add(E);for(const E of this.elements)E.checked=k.has(E.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(I){this.list.getHTMLElement().style.pointerEvents=I?"":"none"}focus(I){if(!!this.list.length){switch(I===_.Next&&this.list.getFocus()[0]===this.list.length-1&&(I=_.First),I===_.Previous&&this.list.getFocus()[0]===0&&(I=_.Last),I===_.Second&&this.list.length<2&&(I=_.First),I){case _.First:this.list.focusFirst();break;case _.Second:this.list.focusNth(1);break;case _.Last:this.list.focusLast();break;case _.Next:this.list.focusNext();break;case _.Previous:this.list.focusPrevious();break;case _.NextPage:this.list.focusNextPage();break;case _.PreviousPage:this.list.focusPreviousPage();break}const k=this.list.getFocus()[0];typeof k=="number"&&this.list.reveal(k)}}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(I){this.list.getHTMLElement().style.maxHeight=I?`calc(${Math.floor(I/44)*44}px)`:"",this.list.layout()}filter(I){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;I=I.trim(),!I||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)?this.elements.forEach(E=>{E.labelHighlights=void 0,E.descriptionHighlights=void 0,E.detailHighlights=void 0,E.hidden=!1;const T=E.index&&this.inputElements[E.index-1];E.separator=T&&T.type==="separator"?T:void 0}):this.elements.forEach(E=>{const T=this.matchOnLabel?r.withNullAsUndefined(M.matchesFuzzyIconAware(I,M.parseLabelWithIcons(E.saneLabel))):void 0,O=this.matchOnDescription?r.withNullAsUndefined(M.matchesFuzzyIconAware(I,M.parseLabelWithIcons(E.saneDescription||""))):void 0,A=this.matchOnDetail?r.withNullAsUndefined(M.matchesFuzzyIconAware(I,M.parseLabelWithIcons(E.saneDetail||""))):void 0,B=this.matchOnMeta?r.withNullAsUndefined(M.matchesFuzzyIconAware(I,M.parseLabelWithIcons(E.saneMeta||""))):void 0;T||O||A||B?(E.labelHighlights=T,E.descriptionHighlights=O,E.detailHighlights=A,E.hidden=!1):(E.labelHighlights=void 0,E.descriptionHighlights=void 0,E.detailHighlights=void 0,E.hidden=!E.item.alwaysShow),E.separator=void 0});const k=this.elements.filter(E=>!E.hidden);if(this.sortByLabel&&I){const E=I.toLowerCase();k.sort((T,O)=>v(T,O,E))}return this.elementsToIndexes=k.reduce((E,T,O)=>(E.set(T.item,O),E),new Map),this.list.splice(0,this.list.length,k),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(k.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const I=this.list.getFocusedElements(),k=this.allVisibleChecked(I);for(const E of I)E.checked=!k}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(I){this.container.style.display=I?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=N.dispose(this.elementDisposables),this.disposables=N.dispose(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(I){this._onButtonTriggered.fire(I)}style(I){this.list.style(I)}}Me([p.memoize],f.prototype,"onDidChangeFocus",null),Me([p.memoize],f.prototype,"onDidChangeSelection",null),e.QuickInputList=f;function v(L,I,k){const E=L.labelHighlights||[],T=I.labelHighlights||[];return E.length&&!T.length?-1:!E.length&&T.length?1:E.length===0&&T.length===0?0:w.compareAnything(L.saneLabel,I.saneLabel,k)}class y{getWidgetAriaLabel(){return n.localize(0,null)}getAriaLabel(I){return I.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}}),define(Q[443],J([0,1,202,7,23,442,435,56,440,205,309,6,297,2,82,83,48,19,15,211,27,8,103,125]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const _=N.$,v={iconClass:l.registerCodicon("quick-input-back",l.Codicon.arrowLeft).classNames,tooltip:d.localize(0,null),handle:-1};class y extends s.Disposable{constructor(E){super();this.ui=E,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new c.Emitter),this.onDidHideEmitter=this._register(new c.Emitter),this.onDisposeEmitter=this._register(new c.Emitter),this.visibleDisposables=this._register(new s.DisposableStore),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(E){this._title=E,this.update()}get description(){return this._description}set description(E){this._description=E,this.update()}get step(){return this._steps}set step(E){this._steps=E,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(E){this._totalSteps=E,this.update()}get enabled(){return this._enabled}set enabled(E){this._enabled=E,this.update()}get contextKey(){return this._contextKey}set contextKey(E){this._contextKey=E,this.update()}get busy(){return this._busy}set busy(E){this._busy=E,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(E){this._ignoreFocusOut=E,this.update()}get buttons(){return this._buttons}set buttons(E){this._buttons=E,this.buttonsUpdated=!0,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(E=>{this.buttons.indexOf(E)!==-1&&this.onDidTriggerButtonEmitter.fire(E)})),this.ui.show(this),this.visible=!0,this.update())}hide(){!this.visible||this.ui.hide()}didHide(){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire()}update(){if(!!this.visible){const E=this.getTitle();E&&this.ui.title.textContent!==E?this.ui.title.textContent=E:!E&&this.ui.title.innerHTML!=="&nbsp;"&&(this.ui.title.innerText="\xA0;");const T=this.getDescription();if(this.ui.description1.textContent!==T&&(this.ui.description1.textContent=T),this.ui.description2.textContent!==T&&(this.ui.description2.textContent=T),this.busy&&!this.busyDelay&&(this.busyDelay=new n.TimeoutTimer,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const O=this.buttons.filter(B=>B===v);this.ui.leftActionBar.push(O.map((B,F)=>{const D=new r.Action(`id-${F}`,"",B.iconClass||t.getIconClass(B.iconPath),!0,()=>Ie(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(B)}));return D.tooltip=B.tooltip||"",D}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const A=this.buttons.filter(B=>B!==v);this.ui.rightActionBar.push(A.map((B,F)=>{const D=new r.Action(`id-${F}`,"",B.iconClass||t.getIconClass(B.iconPath),!0,()=>Ie(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(B)}));return D.tooltip=B.tooltip||"",D}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey)}}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?d.localize(1,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(E){if(this.ui.inputBox.showDecoration(E),E===a.default.Error){const T=this.ui.inputBox.stylesForType(E);this.ui.message.style.color=T.foreground?`${T.foreground}`:"",this.ui.message.style.backgroundColor=T.background?`${T.background}`:"",this.ui.message.style.border=T.border?`1px solid ${T.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class L extends y{constructor(){super(...arguments);this._value="",this.onDidChangeValueEmitter=this._register(new c.Emitter),this.onDidAcceptEmitter=this._register(new c.Emitter),this.onDidCustomEmitter=this._register(new c.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?b.ItemActivation.NONE:b.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new c.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new c.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new c.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=E=>E,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(E){this._quickNavigate=E,this.update()}get value(){return this._value}set value(E){this._value=E||"",this.update()}set ariaLabel(E){this._ariaLabel=E,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(E){this._placeholder=E,this.update()}get items(){return this._items}set items(E){this._items=E,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(E){this._canSelectMany=E,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(E){this._canAcceptInBackground=E}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(E){this._matchOnDescription=E,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(E){this._matchOnDetail=E,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(E){this._matchOnLabel=E,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(E){this._sortByLabel=E,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(E){this._autoFocusOnList=E,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(E){this._itemActivation=E}get activeItems(){return this._activeItems}set activeItems(E){this._activeItems=E,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(E){this._selectedItems=E,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?b.NO_KEY_MODS:this.ui.keyMods}set valueSelection(E){this._valueSelection=E,this.valueSelectionUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(E){this._validationMessage=E,this.update()}get customButton(){return this._customButton}set customButton(E){this._customButton=E,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(E){this._customButtonLabel=E,this.update()}get customHover(){return this._customButtonHover}set customHover(E){this._customButtonHover=E,this.update()}get ok(){return this._ok}set ok(E){this._ok=E,this.update()}get hideInput(){return!!this._hideInput}set hideInput(E){this._hideInput=E,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(w.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(E=>{E!==this.value&&(this._value=E,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(E))})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(E=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(E=>{switch(E.keyCode){case 18:this.ui.list.focus(w.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),N.EventHelper.stop(E,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(w.QuickInputListFocus.Previous):this.ui.list.focus(w.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),N.EventHelper.stop(E,!0);break;case 12:this.ui.list.focus(w.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),N.EventHelper.stop(E,!0);break;case 11:this.ui.list.focus(w.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),N.EventHelper.stop(E,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!0}));break;case 14:(E.ctrlKey||E.metaKey)&&!E.shiftKey&&!E.altKey&&(this.ui.list.focus(w.QuickInputListFocus.First),N.EventHelper.stop(E,!0));break;case 13:(E.ctrlKey||E.metaKey)&&!E.shiftKey&&!E.altKey&&(this.ui.list.focus(w.QuickInputListFocus.Last),N.EventHelper.stop(E,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.onDidAcceptEmitter.fire({inBackground:!1})})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(E=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&i.equals(E,this._activeItems,(T,O)=>T===O)||(this._activeItems=E,this.onDidChangeActiveEmitter.fire(E))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:E,event:T})=>{if(this.canSelectMany){E.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&i.equals(E,this._selectedItems,(O,A)=>O===A)||(this._selectedItems=E,this.onDidChangeSelectionEmitter.fire(E),E.length&&this.onDidAcceptEmitter.fire({inBackground:T instanceof MouseEvent&&T.button===1}))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(E=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&i.equals(E,this._selectedItems,(T,O)=>T===O)||(this._selectedItems=E,this.onDidChangeSelectionEmitter.fire(E))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(E=>this.onDidTriggerItemButtonEmitter.fire(E))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}registerQuickNavigation(){return N.addDisposableListener(this.ui.container,N.EventType.KEY_UP,E=>{if(!(this.canSelectMany||!this._quickNavigate)){const T=new C.StandardKeyboardEvent(E),O=T.keyCode;this._quickNavigate.keybindings.some(F=>{const[D,R]=F.getParts();return R?!1:D.shiftKey&&O===4?!(T.ctrlKey||T.altKey||T.metaKey):!!(D.altKey&&O===6||D.ctrlKey&&O===5||D.metaKey&&O===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!1})),this._quickNavigate=void 0)}})}update(){if(!!this.visible){let E=!1,T=!1;!!this._hideInput&&this._items.length>0&&(this.ui.isScreenReaderOptimized()?T=!0:E=!0),this.ui.container.classList.toggle("hidden-input",E&&!this.description);const O={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!E,progressBar:!E,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};if(this.ui.setVisibilities(O),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),T)this.ui.inputBox.ariaLabel="";else{const B=this.ariaLabel||this.placeholder||L.DEFAULT_ARIA_LABEL;this.ui.inputBox.ariaLabel!==B&&(this.ui.inputBox.ariaLabel=B)}if(this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case b.ItemActivation.NONE:this._itemActivation=b.ItemActivation.FIRST;break;case b.ItemActivation.SECOND:this.ui.list.focus(w.QuickInputListFocus.Second),this._itemActivation=b.ItemActivation.FIRST;break;case b.ItemActivation.LAST:this.ui.list.focus(w.QuickInputListFocus.Last),this._itemActivation=b.ItemActivation.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null));const A=this.validationMessage||"";this._lastValidationMessage!==A&&(this._lastValidationMessage=A,N.reset(this.ui.message,...m.renderLabelWithIcons(h.escape(A))),this.showMessageDecoration(this.validationMessage?a.default.Error:a.default.Ignore)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),O.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(w.QuickInputListFocus.First))}}}L.DEFAULT_ARIA_LABEL=d.localize(2,null);class I extends s.Disposable{constructor(E){super();this.options=E,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new c.Emitter),this.onDidCustomEmitter=this._register(new c.Emitter),this.onDidTriggerButtonEmitter=this._register(new c.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new c.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new c.Emitter),this.onHide=this.onHideEmitter.event,this.idPrefix=E.idPrefix,this.parentElement=E.container,this.styles=E.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const E=T=>{this.keyMods.ctrlCmd=T.ctrlKey||T.metaKey,this.keyMods.alt=T.altKey};this._register(N.addDisposableListener(window,N.EventType.KEY_DOWN,E,!0)),this._register(N.addDisposableListener(window,N.EventType.KEY_UP,E,!0)),this._register(N.addDisposableListener(window,N.EventType.MOUSE_DOWN,E,!0))}getUI(){if(this.ui)return this.ui;const E=N.append(this.parentElement,_(".quick-input-widget.show-file-icons"));E.tabIndex=-1,E.style.display="none";const T=N.createStyleSheet(E),O=N.append(E,_(".quick-input-titlebar")),A=this._register(new u.ActionBar(O));A.domNode.classList.add("quick-input-left-action-bar");const B=N.append(O,_(".quick-input-title")),F=this._register(new u.ActionBar(O));F.domNode.classList.add("quick-input-right-action-bar");const D=N.append(E,_(".quick-input-description")),R=N.append(E,_(".quick-input-header")),W=N.append(R,_("input.quick-input-check-all"));W.type="checkbox",this._register(N.addStandardDisposableListener(W,N.EventType.CHANGE,ae=>{const G=W.checked;ie.setAllVisibleChecked(G)})),this._register(N.addDisposableListener(W,N.EventType.CLICK,ae=>{(ae.x||ae.y)&&ee.setFocus()}));const x=N.append(R,_(".quick-input-description")),K=N.append(R,_(".quick-input-and-message")),Y=N.append(K,_(".quick-input-filter")),ee=this._register(new S.QuickInputBox(Y));ee.setAttribute("aria-describedby",`${this.idPrefix}message`);const se=N.append(Y,_(".quick-input-visible-count"));se.setAttribute("aria-live","polite"),se.setAttribute("aria-atomic","true");const ne=new g.CountBadge(se,{countFormat:d.localize(3,null)}),le=N.append(Y,_(".quick-input-count"));le.setAttribute("aria-live","polite");const X=new g.CountBadge(le,{countFormat:d.localize(4,null)}),z=N.append(R,_(".quick-input-action")),P=new o.Button(z);P.label=d.localize(5,null),this._register(P.onDidClick(ae=>{this.onDidAcceptEmitter.fire()}));const V=N.append(R,_(".quick-input-action")),U=new o.Button(V);U.label=d.localize(6,null),this._register(U.onDidClick(ae=>{this.onDidCustomEmitter.fire()}));const H=N.append(K,_(`#${this.idPrefix}message.quick-input-message`)),$=new p.ProgressBar(E);$.getContainer().classList.add("quick-input-progress");const ie=this._register(new w.QuickInputList(E,this.idPrefix+"list",this.options));this._register(ie.onChangedAllVisibleChecked(ae=>{W.checked=ae})),this._register(ie.onChangedVisibleCount(ae=>{ne.setCount(ae)})),this._register(ie.onChangedCheckedCount(ae=>{X.setCount(ae)})),this._register(ie.onLeave(()=>{setTimeout(()=>{ee.setFocus(),this.controller instanceof L&&this.controller.canSelectMany&&ie.clearFocus()},0)})),this._register(ie.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const oe=N.trackFocus(E);return this._register(oe),this._register(N.addDisposableListener(E,N.EventType.FOCUS,ae=>{this.previousFocusElement=ae.relatedTarget instanceof HTMLElement?ae.relatedTarget:void 0},!0)),this._register(oe.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(),this.previousFocusElement=void 0})),this._register(N.addDisposableListener(E,N.EventType.FOCUS,ae=>{ee.setFocus()})),this._register(N.addDisposableListener(E,N.EventType.KEY_DOWN,ae=>{const G=new C.StandardKeyboardEvent(ae);switch(G.keyCode){case 3:N.EventHelper.stop(ae,!0),this.onDidAcceptEmitter.fire();break;case 9:N.EventHelper.stop(ae,!0),this.hide();break;case 2:if(!G.altKey&&!G.ctrlKey&&!G.metaKey){const j=[".action-label.codicon"];E.classList.contains("show-checkboxes")?j.push("input"):j.push("input[type=text]"),this.getUI().list.isDisplayed()&&j.push(".monaco-list");const te=E.querySelectorAll(j.join(", "));G.shiftKey&&G.target===te[0]?(N.EventHelper.stop(ae,!0),te[te.length-1].focus()):!G.shiftKey&&G.target===te[te.length-1]&&(N.EventHelper.stop(ae,!0),te[0].focus())}break}})),this.ui={container:E,styleSheet:T,leftActionBar:A,titleBar:O,title:B,description1:D,description2:x,rightActionBar:F,checkAll:W,filterContainer:Y,inputBox:ee,visibleCountContainer:se,visibleCount:ne,countContainer:le,count:X,okContainer:z,ok:P,message:H,customButtonContainer:V,customButton:U,progressBar:$,list:ie,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:ae=>this.show(ae),hide:()=>this.hide(),setVisibilities:ae=>this.setVisibilities(ae),setComboboxAccessibility:ae=>this.setComboboxAccessibility(ae),setEnabled:ae=>this.setEnabled(ae),setContextKey:ae=>this.options.setContextKey(ae)},this.updateStyles(),this.ui}pick(E,T={},O=M.CancellationToken.None){return new Promise((A,B)=>{let F=x=>{F=A,T.onKeyMods&&T.onKeyMods(D.keyMods),A(x)};if(O.isCancellationRequested){F(void 0);return}const D=this.createQuickPick();let R;const W=[D,D.onDidAccept(()=>{if(D.canSelectMany)F(D.selectedItems.slice()),D.hide();else{const x=D.activeItems[0];x&&(F(x),D.hide())}}),D.onDidChangeActive(x=>{const K=x[0];K&&T.onDidFocus&&T.onDidFocus(K)}),D.onDidChangeSelection(x=>{if(!D.canSelectMany){const K=x[0];K&&(F(K),D.hide())}}),D.onDidTriggerItemButton(x=>T.onDidTriggerItemButton&&T.onDidTriggerItemButton(Object.assign(Object.assign({},x),{removeItem:()=>{const K=D.items.indexOf(x.item);if(K!==-1){const Y=D.items.slice();Y.splice(K,1),D.items=Y}}}))),D.onDidChangeValue(x=>{R&&!x&&(D.activeItems.length!==1||D.activeItems[0]!==R)&&(D.activeItems=[R])}),O.onCancellationRequested(()=>{D.hide()}),D.onDidHide(()=>{s.dispose(W),F(void 0)})];D.canSelectMany=!!T.canPickMany,D.placeholder=T.placeHolder,D.ignoreFocusOut=!!T.ignoreFocusLost,D.matchOnDescription=!!T.matchOnDescription,D.matchOnDetail=!!T.matchOnDetail,D.matchOnLabel=T.matchOnLabel===void 0||T.matchOnLabel,D.autoFocusOnList=T.autoFocusOnList===void 0||T.autoFocusOnList,D.quickNavigate=T.quickNavigate,D.contextKey=T.contextKey,D.busy=!0,Promise.all([E,T.activeItem]).then(([x,K])=>{R=K,D.busy=!1,D.items=x,D.canSelectMany&&(D.selectedItems=x.filter(Y=>Y.type!=="separator"&&Y.picked)),R&&(D.activeItems=[R])}),D.show(),Promise.resolve(E).then(void 0,x=>{B(x),D.hide()})})}createQuickPick(){const E=this.getUI();return new L(E)}show(E){const T=this.getUI();this.onShowEmitter.fire();const O=this.controller;this.controller=E,O&&O.didHide(),this.setEnabled(!0),T.leftActionBar.clear(),T.title.textContent="",T.description1.textContent="",T.description2.textContent="",T.rightActionBar.clear(),T.checkAll.checked=!1,T.inputBox.placeholder="",T.inputBox.password=!1,T.inputBox.showDecoration(a.default.Ignore),T.visibleCount.setCount(0),T.count.setCount(0),N.reset(T.message),T.progressBar.stop(),T.list.setElements([]),T.list.matchOnDescription=!1,T.list.matchOnDetail=!1,T.list.matchOnLabel=!0,T.list.sortByLabel=!0,T.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),T.inputBox.ariaLabel="";const A=this.options.backKeybindingLabel();v.tooltip=A?d.localize(7,null,A):d.localize(8,null),T.container.style.display="",this.updateLayout(),T.inputBox.setFocus()}setVisibilities(E){const T=this.getUI();T.title.style.display=E.title?"":"none",T.description1.style.display=E.description&&(E.inputBox||E.checkAll)?"":"none",T.description2.style.display=E.description&&!(E.inputBox||E.checkAll)?"":"none",T.checkAll.style.display=E.checkAll?"":"none",T.filterContainer.style.display=E.inputBox?"":"none",T.visibleCountContainer.style.display=E.visibleCount?"":"none",T.countContainer.style.display=E.count?"":"none",T.okContainer.style.display=E.ok?"":"none",T.customButtonContainer.style.display=E.customButton?"":"none",T.message.style.display=E.message?"":"none",T.progressBar.getContainer().style.display=E.progressBar?"":"none",T.list.display(!!E.list),T.container.classList[E.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(E){if(E!==this.comboboxAccessibility){const T=this.getUI();this.comboboxAccessibility=E,this.comboboxAccessibility?(T.inputBox.setAttribute("role","combobox"),T.inputBox.setAttribute("aria-haspopup","true"),T.inputBox.setAttribute("aria-autocomplete","list"),T.inputBox.setAttribute("aria-activedescendant",T.list.getActiveDescendant()||"")):(T.inputBox.removeAttribute("role"),T.inputBox.removeAttribute("aria-haspopup"),T.inputBox.removeAttribute("aria-autocomplete"),T.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(E){if(E!==this.enabled){this.enabled=E;for(const T of this.getUI().leftActionBar.viewItems)T.getAction().enabled=E;for(const T of this.getUI().rightActionBar.viewItems)T.getAction().enabled=E;this.getUI().checkAll.disabled=!E,this.getUI().ok.enabled=E,this.getUI().list.enabled=E}}hide(){var E;const T=this.controller;if(T){const O=!((E=this.ui)===null||E===void 0?void 0:E.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",O||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),T.didHide()}}layout(E,T){this.dimension=E,this.titleBarOffset=T,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const E=this.ui.container.style,T=Math.min(this.dimension.width*.62,I.MAX_WIDTH);E.width=T+"px",E.marginLeft="-"+T/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(E){this.styles=E,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:E,quickInputBackground:T,quickInputForeground:O,contrastBorder:A,widgetShadow:B}=this.styles.widget;this.ui.titleBar.style.backgroundColor=E?E.toString():"",this.ui.container.style.backgroundColor=T?T.toString():"",this.ui.container.style.color=O?O.toString():"",this.ui.container.style.border=A?`1px solid ${A}`:"",this.ui.container.style.boxShadow=B?`0 0 8px 2px ${B}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const F=[];this.styles.list.pickerGroupBorder&&F.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&F.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`);const D=F.join(`
`);D!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=D)}}}e.QuickInputController=I,I.MAX_WIDTH=600}),define(Q[444],J([4,5]),function(q,e){return q.create("vs/editor/browser/controller/coreCommands",e)}),define(Q[445],J([4,5]),function(q,e){return q.create("vs/editor/browser/controller/textAreaHandler",e)}),define(Q[446],J([4,5]),function(q,e){return q.create("vs/editor/browser/core/keybindingCancellation",e)}),define(Q[447],J([4,5]),function(q,e){return q.create("vs/editor/browser/editorExtensions",e)}),define(Q[448],J([4,5]),function(q,e){return q.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(Q[449],J([4,5]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(Q[450],J([4,5]),function(q,e){return q.create("vs/editor/browser/widget/diffReview",e)}),define(Q[451],J([4,5]),function(q,e){return q.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(Q[452],J([0,1,451,7,48,2,3,27]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class d extends w.Disposable{constructor(p,c,o,s,a,u){super();this._viewZoneId=p,this._marginDomNode=c,this.editor=o,this.diff=s,this._contextMenuService=a,this._clipboardService=u,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=C.Codicon.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=o.getOption(53),i=o.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);const n=[];n.push(new M.Action("diff.clipboard.copyDeletedContent",s.originalEndLineNumber>s.modifiedStartLineNumber?b.localize(0,null):b.localize(1,null),void 0,!0,()=>Ie(this,void 0,void 0,function*(){const _=new S.Range(s.originalStartLineNumber,1,s.originalEndLineNumber+1,1),f=s.originalModel.getValueInRange(_);yield this._clipboardService.writeText(f)})));let t=0,l;s.originalEndLineNumber>s.modifiedStartLineNumber&&(l=new M.Action("diff.clipboard.copyDeletedLineContent",b.localize(2,null,s.originalStartLineNumber),void 0,!0,()=>Ie(this,void 0,void 0,function*(){const _=s.originalModel.getLineContent(s.originalStartLineNumber+t);yield this._clipboardService.writeText(_)})),n.push(l)),o.getOption(75)||n.push(new M.Action("diff.inline.revertChange",b.localize(3,null),void 0,!0,()=>Ie(this,void 0,void 0,function*(){const _=new S.Range(s.originalStartLineNumber,1,s.originalEndLineNumber,s.originalModel.getLineMaxColumn(s.originalEndLineNumber)),f=s.originalModel.getValueInRange(_);if(s.modifiedEndLineNumber===0){const v=o.getModel().getLineMaxColumn(s.modifiedStartLineNumber);o.executeEdits("diffEditor",[{range:new S.Range(s.modifiedStartLineNumber,v,s.modifiedStartLineNumber,v),text:i+f}])}else{const v=o.getModel().getLineMaxColumn(s.modifiedEndLineNumber);o.executeEdits("diffEditor",[{range:new S.Range(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,v),text:f}])}})));const m=(_,f)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:_,y:f}),getActions:()=>(l&&(l.label=b.localize(4,null,s.originalStartLineNumber+t)),n),autoSelectFirstItem:!0})};this._register(N.addStandardDisposableListener(this._diffActions,"mousedown",_=>{const{top:f,height:v}=N.getDomNodePagePosition(this._diffActions);let y=Math.floor(r/3);_.preventDefault(),m(_.posx,f+v+y)})),this._register(o.onMouseMove(_=>{_.target.type===8||_.target.type===5?_.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,t=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,r)):this.visibility=!1:this.visibility=!1})),this._register(o.onMouseDown(_=>{!_.event.rightButton||(_.target.type===8||_.target.type===5)&&_.target.detail.viewZoneId===this._viewZoneId&&(_.event.preventDefault(),t=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,r),m(_.event.posx,_.event.posy+r))}))}get visibility(){return this._visibility}set visibility(p){this._visibility!==p&&(this._visibility=p,p?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(p,c,o){const{top:s}=N.getDomNodePagePosition(p),a=c-s,u=Math.floor(a/o),r=u*o;if(this._diffActions.style.top=`${r}px`,this.diff.viewLineCounts){let i=0;for(let n=0;n<this.diff.viewLineCounts.length;n++)if(i+=this.diff.viewLineCounts[n],u<i)return n}return u}}e.InlineDiffMargin=d}),define(Q[453],J([4,5]),function(q,e){return q.create("vs/editor/common/config/commonEditorConfig",e)}),define(Q[454],J([4,5]),function(q,e){return q.create("vs/editor/common/config/editorOptions",e)}),define(Q[38],J([0,1,454,17,128]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.editorOptionsRegistry=e.EDITOR_MODEL_DEFAULTS=e.EDITOR_FONT_DEFAULTS=e.filterValidationDecorations=e.EditorLayoutInfoComputer=e.EditorFontLigatures=e.TextEditorCursorStyle=e.stringSet=e.boolean=e.ComputeOptionsMemory=e.ValidatedEditorOptions=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=void 0,e.MINIMAP_GUTTER_WIDTH=8;class w{constructor(Z){this._values=Z}hasChanged(Z){return this._values[Z]}}e.ConfigurationChangedEvent=w;class S{constructor(){this._values=[]}_read(Z){return this._values[Z]}get(Z){return this._values[Z]}_write(Z,ue){this._values[Z]=ue}}e.ValidatedEditorOptions=S;class C{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=C;class d{constructor(Z,ue,he,re){this.id=Z,this.name=ue,this.defaultValue=he,this.schema=re}compute(Z,ue,he){return he}}class g{constructor(Z,ue=null){this.schema=void 0,this.id=Z,this.name="_never_",this.defaultValue=void 0,this.deps=ue}validate(Z){return this.defaultValue}}class p{constructor(Z,ue,he,re){this.id=Z,this.name=ue,this.defaultValue=he,this.schema=re}validate(Z){return typeof Z=="undefined"?this.defaultValue:Z}compute(Z,ue,he){return he}}function c(te,Z){return typeof te=="undefined"?Z:te==="false"?!1:Boolean(te)}e.boolean=c;class o extends p{constructor(Z,ue,he,re=void 0){typeof re!="undefined"&&(re.type="boolean",re.default=he),super(Z,ue,he,re)}validate(Z){return c(Z,this.defaultValue)}}class s extends p{constructor(Z,ue,he,re,ce,me=void 0){typeof me!="undefined"&&(me.type="integer",me.default=he,me.minimum=re,me.maximum=ce),super(Z,ue,he,me),this.minimum=re,this.maximum=ce}static clampedInt(Z,ue,he,re){if(typeof Z=="undefined")return ue;let ce=parseInt(Z,10);return isNaN(ce)?ue:(ce=Math.max(he,ce),ce=Math.min(re,ce),ce|0)}validate(Z){return s.clampedInt(Z,this.defaultValue,this.minimum,this.maximum)}}class a extends p{constructor(Z,ue,he,re,ce){typeof ce!="undefined"&&(ce.type="number",ce.default=he),super(Z,ue,he,ce),this.validationFn=re}static clamp(Z,ue,he){return Z<ue?ue:Z>he?he:Z}static float(Z,ue){if(typeof Z=="number")return Z;if(typeof Z=="undefined")return ue;const he=parseFloat(Z);return isNaN(he)?ue:he}validate(Z){return this.validationFn(a.float(Z,this.defaultValue))}}class u extends p{static string(Z,ue){return typeof Z!="string"?ue:Z}constructor(Z,ue,he,re=void 0){typeof re!="undefined"&&(re.type="string",re.default=he),super(Z,ue,he,re)}validate(Z){return u.string(Z,this.defaultValue)}}function r(te,Z,ue){return typeof te!="string"||ue.indexOf(te)===-1?Z:te}e.stringSet=r;class i extends p{constructor(Z,ue,he,re,ce=void 0){typeof ce!="undefined"&&(ce.type="string",ce.enum=re,ce.default=he),super(Z,ue,he,ce),this._allowedValues=re}validate(Z){return r(Z,this.defaultValue,this._allowedValues)}}class n extends d{constructor(Z,ue,he,re,ce,me,Ce=void 0){typeof Ce!="undefined"&&(Ce.type="string",Ce.enum=ce,Ce.default=re),super(Z,ue,he,Ce),this._allowedValues=ce,this._convert=me}validate(Z){return typeof Z!="string"?this.defaultValue:this._allowedValues.indexOf(Z)===-1?this.defaultValue:this._convert(Z)}}function t(te){switch(te){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class l extends d{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[b.localize(0,null),b.localize(1,null),b.localize(2,null)],default:"auto",description:b.localize(3,null)})}validate(Z){switch(Z){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(Z,ue,he){return he===0?Z.accessibilitySupport:he}}class h extends d{constructor(){const Z={insertSpace:!0,ignoreEmptyLines:!0};super(16,"comments",Z,{"editor.comments.insertSpace":{type:"boolean",default:Z.insertSpace,description:b.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:Z.ignoreEmptyLines,description:b.localize(5,null)}})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z;return{insertSpace:c(ue.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:c(ue.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function m(te){switch(te){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var _;(function(te){te[te.Line=1]="Line",te[te.Block=2]="Block",te[te.Underline=3]="Underline",te[te.LineThin=4]="LineThin",te[te.BlockOutline=5]="BlockOutline",te[te.UnderlineThin=6]="UnderlineThin"})(_=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));function f(te){switch(te){case"line":return _.Line;case"block":return _.Block;case"underline":return _.Underline;case"line-thin":return _.LineThin;case"block-outline":return _.BlockOutline;case"underline-thin":return _.UnderlineThin}}class v extends g{constructor(){super(121,[60,29])}compute(Z,ue,he){const re=["monaco-editor"];return ue.get(29)&&re.push(ue.get(29)),Z.extraEditorClassName&&re.push(Z.extraEditorClassName),ue.get(60)==="default"?re.push("mouse-default"):ue.get(60)==="copy"&&re.push("mouse-copy"),ue.get(95)&&re.push("showUnused"),ue.get(119)&&re.push("showDeprecated"),re.join(" ")}}class y extends o{constructor(){super(28,"emptySelectionClipboard",!0,{description:b.localize(6,null)})}compute(Z,ue,he){return he&&Z.emptySelectionClipboard}}class L extends d{constructor(){const Z={cursorMoveOnType:!0,seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(31,"find",Z,{"editor.find.cursorMoveOnType":{type:"boolean",default:Z.cursorMoveOnType,description:b.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:Z.seedSearchStringFromSelection,description:b.localize(8,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:Z.autoFindInSelection,enumDescriptions:[b.localize(9,null),b.localize(10,null),b.localize(11,null)],description:b.localize(12,null)},"editor.find.globalFindClipboard":{type:"boolean",default:Z.globalFindClipboard,description:b.localize(13,null),included:N.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:Z.addExtraSpaceOnTop,description:b.localize(14,null)},"editor.find.loop":{type:"boolean",default:Z.loop,description:b.localize(15,null)}})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z;return{cursorMoveOnType:c(ue.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:c(ue.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:typeof Z.autoFindInSelection=="boolean"?Z.autoFindInSelection?"always":"never":r(ue.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:c(ue.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:c(ue.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:c(ue.loop,this.defaultValue.loop)}}}class I extends d{constructor(){super(39,"fontLigatures",I.OFF,{anyOf:[{type:"boolean",description:b.localize(16,null)},{type:"string",description:b.localize(17,null)}],description:b.localize(18,null),default:!1})}validate(Z){return typeof Z=="undefined"?this.defaultValue:typeof Z=="string"?Z==="false"?I.OFF:Z==="true"?I.ON:Z:Boolean(Z)?I.ON:I.OFF}}e.EditorFontLigatures=I,I.OFF='"liga" off, "calt" off',I.ON='"liga" on, "calt" on';class k extends g{constructor(){super(38)}compute(Z,ue,he){return Z.fontInfo}}class E extends p{constructor(){super(40,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:b.localize(19,null)})}validate(Z){let ue=a.float(Z,this.defaultValue);return ue===0?e.EDITOR_FONT_DEFAULTS.fontSize:a.clamp(ue,6,100)}compute(Z,ue,he){return Z.fontInfo.fontSize}}class T extends d{constructor(){super(41,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:T.MINIMUM_VALUE,maximum:T.MAXIMUM_VALUE,errorMessage:b.localize(20,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:T.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:b.localize(21,null)})}validate(Z){return Z==="normal"||Z==="bold"?Z:String(s.clampedInt(Z,e.EDITOR_FONT_DEFAULTS.fontWeight,T.MINIMUM_VALUE,T.MAXIMUM_VALUE))}}T.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],T.MINIMUM_VALUE=1,T.MAXIMUM_VALUE=1e3;class O extends d{constructor(){const Z={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},ue={type:"string",enum:["peek","gotoAndPeek","goto"],default:Z.multiple,enumDescriptions:[b.localize(22,null),b.localize(23,null),b.localize(24,null)]};super(45,"gotoLocation",Z,{"editor.gotoLocation.multiple":{deprecationMessage:b.localize(25,null)},"editor.gotoLocation.multipleDefinitions":Object.assign({description:b.localize(26,null)},ue),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:b.localize(27,null)},ue),"editor.gotoLocation.multipleDeclarations":Object.assign({description:b.localize(28,null)},ue),"editor.gotoLocation.multipleImplementations":Object.assign({description:b.localize(29,null)},ue),"editor.gotoLocation.multipleReferences":Object.assign({description:b.localize(30,null)},ue),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:Z.alternativeDefinitionCommand,description:b.localize(31,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:Z.alternativeTypeDefinitionCommand,description:b.localize(32,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:Z.alternativeDeclarationCommand,description:b.localize(33,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:Z.alternativeImplementationCommand,description:b.localize(34,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:Z.alternativeReferenceCommand,description:b.localize(35,null)}})}validate(Z){var ue,he,re,ce,me;if(!Z||typeof Z!="object")return this.defaultValue;const Ce=Z;return{multiple:r(Ce.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(ue=Ce.multipleDefinitions)!==null&&ue!==void 0?ue:r(Ce.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(he=Ce.multipleTypeDefinitions)!==null&&he!==void 0?he:r(Ce.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(re=Ce.multipleDeclarations)!==null&&re!==void 0?re:r(Ce.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(ce=Ce.multipleImplementations)!==null&&ce!==void 0?ce:r(Ce.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(me=Ce.multipleReferences)!==null&&me!==void 0?me:r(Ce.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:u.string(Ce.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:u.string(Ce.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:u.string(Ce.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:u.string(Ce.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:u.string(Ce.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class A extends d{constructor(){const Z={enabled:!0,delay:300,sticky:!0};super(48,"hover",Z,{"editor.hover.enabled":{type:"boolean",default:Z.enabled,description:b.localize(36,null)},"editor.hover.delay":{type:"number",default:Z.delay,description:b.localize(37,null)},"editor.hover.sticky":{type:"boolean",default:Z.sticky,description:b.localize(38,null)}})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z;return{enabled:c(ue.enabled,this.defaultValue.enabled),delay:s.clampedInt(ue.delay,this.defaultValue.delay,0,1e4),sticky:c(ue.sticky,this.defaultValue.sticky)}}}class B extends g{constructor(){super(124,[44,52,33,59,87,54,55,89,111,114,115,116,2])}compute(Z,ue,he){return B.computeLayout(ue,{memory:Z.memory,outerWidth:Z.outerWidth,outerHeight:Z.outerHeight,isDominatedByLongLines:Z.isDominatedByLongLines,lineHeight:Z.fontInfo.lineHeight,viewLineCount:Z.viewLineCount,lineNumbersDigitCount:Z.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:Z.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:Z.fontInfo.maxDigitWidth,pixelRatio:Z.pixelRatio})}static computeContainedMinimapLineCount(Z){const ue=Z.height/Z.lineHeight,he=Z.scrollBeyondLastLine?ue-1:0,re=(Z.viewLineCount+he)/(Z.pixelRatio*Z.height),ce=Math.floor(Z.viewLineCount/re);return{typicalViewportLineCount:ue,extraLinesBeyondLastLine:he,desiredRatio:re,minimapLineCount:ce}}static _computeMinimapLayout(Z,ue){const he=Z.outerWidth,re=Z.outerHeight,ce=Z.pixelRatio;if(!Z.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(ce*re),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:re};const me=ue.stableMinimapLayoutInput,Ce=me&&Z.outerHeight===me.outerHeight&&Z.lineHeight===me.lineHeight&&Z.typicalHalfwidthCharacterWidth===me.typicalHalfwidthCharacterWidth&&Z.pixelRatio===me.pixelRatio&&Z.scrollBeyondLastLine===me.scrollBeyondLastLine&&Z.minimap.enabled===me.minimap.enabled&&Z.minimap.side===me.minimap.side&&Z.minimap.size===me.minimap.size&&Z.minimap.showSlider===me.minimap.showSlider&&Z.minimap.renderCharacters===me.minimap.renderCharacters&&Z.minimap.maxColumn===me.minimap.maxColumn&&Z.minimap.scale===me.minimap.scale&&Z.verticalScrollbarWidth===me.verticalScrollbarWidth&&Z.isViewportWrapping===me.isViewportWrapping,be=Z.lineHeight,Le=Z.typicalHalfwidthCharacterWidth,De=Z.scrollBeyondLastLine,Re=Z.minimap.renderCharacters;let Ee=ce>=2?Math.round(Z.minimap.scale*2):Z.minimap.scale;const Ae=Z.minimap.maxColumn,Se=Z.minimap.size,we=Z.minimap.side,ye=Z.verticalScrollbarWidth,fe=Z.viewLineCount,de=Z.remainingWidth,ge=Z.isViewportWrapping,pe=Re?2:3;let ve=Math.floor(ce*re);const ke=ve/ce;let Ne=!1,Te=!1,Oe=pe*Ee,Fe=Ee/ce,Pe=1;if(Se==="fill"||Se==="fit"){const{typicalViewportLineCount:Ve,extraLinesBeyondLastLine:Ue,desiredRatio:Ye,minimapLineCount:je}=B.computeContainedMinimapLineCount({viewLineCount:fe,scrollBeyondLastLine:De,height:re,lineHeight:be,pixelRatio:ce});if(fe/je>1)Ne=!0,Te=!0,Ee=1,Oe=1,Fe=Ee/ce;else{let $e=!1,Ze=Ee+1;if(Se==="fit"){const Qe=Math.ceil((fe+Ue)*Oe);ge&&Ce&&de<=ue.stableFitRemainingWidth?($e=!0,Ze=ue.stableFitMaxMinimapScale):($e=Qe>ve,ge&&$e?(ue.stableMinimapLayoutInput=Z,ue.stableFitRemainingWidth=de):(ue.stableMinimapLayoutInput=null,ue.stableFitRemainingWidth=0))}if(Se==="fill"||$e){Ne=!0;const Qe=Ee;Oe=Math.min(be*ce,Math.max(1,Math.floor(1/Ye))),Ee=Math.min(Ze,Math.max(1,Math.floor(Oe/pe))),Ee>Qe&&(Pe=Math.min(2,Ee/Qe)),Fe=Ee/ce/Pe,ve=Math.ceil(Math.max(Ve,fe+Ue)*Oe),ge&&$e&&(ue.stableFitMaxMinimapScale=Ee)}}}const xe=Math.floor(Ae*Fe),We=Math.min(xe,Math.max(0,Math.floor((de-ye-2)*Fe/(Le+Fe)))+e.MINIMAP_GUTTER_WIDTH);let ze=Math.floor(ce*We);const Ke=ze/ce;ze=Math.floor(ze*Pe);const Be=Re?1:2,He=we==="left"?0:he-We-ye;return{renderMinimap:Be,minimapLeft:He,minimapWidth:We,minimapHeightIsEditorHeight:Ne,minimapIsSampling:Te,minimapScale:Ee,minimapLineHeight:Oe,minimapCanvasInnerWidth:ze,minimapCanvasInnerHeight:ve,minimapCanvasOuterWidth:Ke,minimapCanvasOuterHeight:ke}}static computeLayout(Z,ue){const he=ue.outerWidth|0,re=ue.outerHeight|0,ce=ue.lineHeight|0,me=ue.lineNumbersDigitCount|0,Ce=ue.typicalHalfwidthCharacterWidth,be=ue.maxDigitWidth,Le=ue.pixelRatio,De=ue.viewLineCount,Re=Z.get(116),Ee=Re==="inherit"?Z.get(115):Re,Ae=Ee==="inherit"?Z.get(111):Ee,Se=Z.get(114),we=Z.get(2),ye=ue.isDominatedByLongLines,fe=Z.get(44),de=Z.get(54).renderType!==0,ge=Z.get(55),pe=Z.get(89),ve=Z.get(59),ke=Z.get(87),Ne=ke.verticalScrollbarSize,Te=ke.verticalHasArrows,Oe=ke.arrowSize,Fe=ke.horizontalScrollbarSize,Pe=Z.get(52),xe=Z.get(33);let We;if(typeof Pe=="string"&&/^\d+(\.\d+)?ch$/.test(Pe)){const nt=parseFloat(Pe.substr(0,Pe.length-2));We=s.clampedInt(nt*Ce,0,0,1e3)}else We=s.clampedInt(Pe,0,0,1e3);xe&&(We+=16);let ze=0;if(de){const nt=Math.max(me,ge);ze=Math.round(nt*be)}let Ke=0;fe&&(Ke=ce);let Be=0,He=Be+Ke,Ve=He+ze,Ue=Ve+We;const Ye=he-Ke-ze-We;let je=!1,Xe=!1,$e=-1;we!==2&&(Ee==="inherit"&&ye?(je=!0,Xe=!0):Ae==="on"||Ae==="bounded"?Xe=!0:Ae==="wordWrapColumn"&&($e=Se));const Ze=B._computeMinimapLayout({outerWidth:he,outerHeight:re,lineHeight:ce,typicalHalfwidthCharacterWidth:Ce,pixelRatio:Le,scrollBeyondLastLine:pe,minimap:ve,verticalScrollbarWidth:Ne,viewLineCount:De,remainingWidth:Ye,isViewportWrapping:Xe},ue.memory||new C);Ze.renderMinimap!==0&&Ze.minimapLeft===0&&(Be+=Ze.minimapWidth,He+=Ze.minimapWidth,Ve+=Ze.minimapWidth,Ue+=Ze.minimapWidth);const Qe=Ye-Ze.minimapWidth,it=Math.max(1,Math.floor((Qe-Ne-2)/Ce)),Je=Te?Oe:0;return Xe&&($e=Math.max(1,it),Ae==="bounded"&&($e=Math.min($e,Se))),{width:he,height:re,glyphMarginLeft:Be,glyphMarginWidth:Ke,lineNumbersLeft:He,lineNumbersWidth:ze,decorationsLeft:Ve,decorationsWidth:We,contentLeft:Ue,contentWidth:Qe,minimap:Ze,viewportColumn:it,isWordWrapMinified:je,isViewportWrapping:Xe,wrappingColumn:$e,verticalScrollbarWidth:Ne,horizontalScrollbarHeight:Fe,overviewRuler:{top:Je,width:Ne,height:re-2*Je,right:0}}}}e.EditorLayoutInfoComputer=B;class F extends d{constructor(){const Z={enabled:!0};super(51,"lightbulb",Z,{"editor.lightbulb.enabled":{type:"boolean",default:Z.enabled,description:b.localize(39,null)}})}validate(Z){return!Z||typeof Z!="object"?this.defaultValue:{enabled:c(Z.enabled,this.defaultValue.enabled)}}}class D extends d{constructor(){const Z={enabled:!0,fontSize:0,fontFamily:e.EDITOR_FONT_DEFAULTS.fontFamily};super(120,"inlineHints",Z,{"editor.inlineHints.enabled":{type:"boolean",default:Z.enabled,description:b.localize(40,null)},"editor.inlineHints.fontSize":{type:"number",default:Z.fontSize,description:b.localize(41,null)},"editor.inlineHints.fontFamily":{type:"string",default:Z.fontFamily,description:b.localize(42,null)}})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z;return{enabled:c(ue.enabled,this.defaultValue.enabled),fontSize:s.clampedInt(ue.fontSize,this.defaultValue.fontSize,0,100),fontFamily:u.string(ue.fontFamily,this.defaultValue.fontFamily)}}}class R extends s{constructor(){super(53,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,0,150,{description:b.localize(43,null)})}compute(Z,ue,he){return Z.fontInfo.lineHeight}}class W extends d{constructor(){const Z={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(59,"minimap",Z,{"editor.minimap.enabled":{type:"boolean",default:Z.enabled,description:b.localize(44,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[b.localize(45,null),b.localize(46,null),b.localize(47,null)],default:Z.size,description:b.localize(48,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:Z.side,description:b.localize(49,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:Z.showSlider,description:b.localize(50,null)},"editor.minimap.scale":{type:"number",default:Z.scale,minimum:1,maximum:3,enum:[1,2,3],description:b.localize(51,null)},"editor.minimap.renderCharacters":{type:"boolean",default:Z.renderCharacters,description:b.localize(52,null)},"editor.minimap.maxColumn":{type:"number",default:Z.maxColumn,description:b.localize(53,null)}})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z;return{enabled:c(ue.enabled,this.defaultValue.enabled),size:r(ue.size,this.defaultValue.size,["proportional","fill","fit"]),side:r(ue.side,this.defaultValue.side,["right","left"]),showSlider:r(ue.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:c(ue.renderCharacters,this.defaultValue.renderCharacters),scale:s.clampedInt(ue.scale,1,1,3),maxColumn:s.clampedInt(ue.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function x(te){return te==="ctrlCmd"?N.isMacintosh?"metaKey":"ctrlKey":"altKey"}class K extends d{constructor(){super(69,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:b.localize(54,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:b.localize(55,null)}})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z;return{top:s.clampedInt(ue.top,0,0,1e3),bottom:s.clampedInt(ue.bottom,0,0,1e3)}}}class Y extends d{constructor(){const Z={enabled:!0,cycle:!1};super(70,"parameterHints",Z,{"editor.parameterHints.enabled":{type:"boolean",default:Z.enabled,description:b.localize(56,null)},"editor.parameterHints.cycle":{type:"boolean",default:Z.cycle,description:b.localize(57,null)}})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z;return{enabled:c(ue.enabled,this.defaultValue.enabled),cycle:c(ue.cycle,this.defaultValue.cycle)}}}class ee extends g{constructor(){super(122)}compute(Z,ue,he){return Z.pixelRatio}}class se extends d{constructor(){const Z={other:!0,comments:!1,strings:!1};super(73,"quickSuggestions",Z,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:Z.strings,description:b.localize(58,null)},comments:{type:"boolean",default:Z.comments,description:b.localize(59,null)},other:{type:"boolean",default:Z.other,description:b.localize(60,null)}}}],default:Z,description:b.localize(61,null)});this.defaultValue=Z}validate(Z){if(typeof Z=="boolean")return Z;if(Z&&typeof Z=="object"){const ue=Z,he={other:c(ue.other,this.defaultValue.other),comments:c(ue.comments,this.defaultValue.comments),strings:c(ue.strings,this.defaultValue.strings)};return he.other&&he.comments&&he.strings?!0:!he.other&&!he.comments&&!he.strings?!1:he}return this.defaultValue}}class ne extends d{constructor(){super(54,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[b.localize(62,null),b.localize(63,null),b.localize(64,null),b.localize(65,null)],default:"on",description:b.localize(66,null)})}validate(Z){let ue=this.defaultValue.renderType,he=this.defaultValue.renderFn;return typeof Z!="undefined"&&(typeof Z=="function"?(ue=4,he=Z):Z==="interval"?ue=3:Z==="relative"?ue=2:Z==="on"?ue=1:ue=0),{renderType:ue,renderFn:he}}}function le(te){const Z=te.get(82);return Z==="editable"?te.get(75):Z!=="on"}e.filterValidationDecorations=le;class X extends d{constructor(){const Z=[],ue={type:"number",description:b.localize(67,null)};super(86,"rulers",Z,{type:"array",items:{anyOf:[ue,{type:["object"],properties:{column:ue,color:{type:"string",description:b.localize(68,null),format:"color-hex"}}}]},default:Z,description:b.localize(69,null)})}validate(Z){if(Array.isArray(Z)){let ue=[];for(let he of Z)if(typeof he=="number")ue.push({column:s.clampedInt(he,0,0,1e4),color:null});else if(he&&typeof he=="object"){const re=he;ue.push({column:s.clampedInt(re.column,0,0,1e4),color:re.color})}return ue.sort((he,re)=>he.column-re.column),ue}return this.defaultValue}}function z(te,Z){if(typeof te!="string")return Z;switch(te){case"hidden":return 2;case"visible":return 3;default:return 1}}class P extends d{constructor(){super(87,"scrollbar",{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z,he=s.clampedInt(ue.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),re=s.clampedInt(ue.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:s.clampedInt(ue.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:z(ue.vertical,this.defaultValue.vertical),horizontal:z(ue.horizontal,this.defaultValue.horizontal),useShadows:c(ue.useShadows,this.defaultValue.useShadows),verticalHasArrows:c(ue.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:c(ue.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:c(ue.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:c(ue.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:he,horizontalSliderSize:s.clampedInt(ue.horizontalSliderSize,he,0,1e3),verticalScrollbarSize:re,verticalSliderSize:s.clampedInt(ue.verticalSliderSize,re,0,1e3),scrollByPage:c(ue.scrollByPage,this.defaultValue.scrollByPage)}}}class V extends d{constructor(){const Z={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(101,"suggest",Z,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[b.localize(70,null),b.localize(71,null)],default:Z.insertMode,description:b.localize(72,null)},"editor.suggest.filterGraceful":{type:"boolean",default:Z.filterGraceful,description:b.localize(73,null)},"editor.suggest.localityBonus":{type:"boolean",default:Z.localityBonus,description:b.localize(74,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:Z.shareSuggestSelections,markdownDescription:b.localize(75,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:Z.snippetsPreventQuickSuggestions,description:b.localize(76,null)},"editor.suggest.showIcons":{type:"boolean",default:Z.showIcons,description:b.localize(77,null)},"editor.suggest.showStatusBar":{type:"boolean",default:Z.showStatusBar,description:b.localize(78,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:Z.showInlineDetails,description:b.localize(79,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:b.localize(80,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:b.localize(81,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:b.localize(82,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:b.localize(83,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:b.localize(84,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:b.localize(85,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:b.localize(86,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:b.localize(87,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:b.localize(88,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:b.localize(89,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:b.localize(90,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:b.localize(91,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:b.localize(92,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:b.localize(93,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:b.localize(94,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:b.localize(95,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:b.localize(96,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:b.localize(97,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:b.localize(98,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:b.localize(99,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:b.localize(100,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:b.localize(101,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:b.localize(102,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:b.localize(103,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:b.localize(104,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:b.localize(105,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:b.localize(106,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:b.localize(107,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:b.localize(108,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:b.localize(109,null)}})}validate(Z){if(!Z||typeof Z!="object")return this.defaultValue;const ue=Z;return{insertMode:r(ue.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:c(ue.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:c(ue.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:c(ue.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:c(ue.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:c(ue.showIcons,this.defaultValue.showIcons),showStatusBar:c(ue.showStatusBar,this.defaultValue.showStatusBar),showInlineDetails:c(ue.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:c(ue.showMethods,this.defaultValue.showMethods),showFunctions:c(ue.showFunctions,this.defaultValue.showFunctions),showConstructors:c(ue.showConstructors,this.defaultValue.showConstructors),showFields:c(ue.showFields,this.defaultValue.showFields),showVariables:c(ue.showVariables,this.defaultValue.showVariables),showClasses:c(ue.showClasses,this.defaultValue.showClasses),showStructs:c(ue.showStructs,this.defaultValue.showStructs),showInterfaces:c(ue.showInterfaces,this.defaultValue.showInterfaces),showModules:c(ue.showModules,this.defaultValue.showModules),showProperties:c(ue.showProperties,this.defaultValue.showProperties),showEvents:c(ue.showEvents,this.defaultValue.showEvents),showOperators:c(ue.showOperators,this.defaultValue.showOperators),showUnits:c(ue.showUnits,this.defaultValue.showUnits),showValues:c(ue.showValues,this.defaultValue.showValues),showConstants:c(ue.showConstants,this.defaultValue.showConstants),showEnums:c(ue.showEnums,this.defaultValue.showEnums),showEnumMembers:c(ue.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:c(ue.showKeywords,this.defaultValue.showKeywords),showWords:c(ue.showWords,this.defaultValue.showWords),showColors:c(ue.showColors,this.defaultValue.showColors),showFiles:c(ue.showFiles,this.defaultValue.showFiles),showReferences:c(ue.showReferences,this.defaultValue.showReferences),showFolders:c(ue.showFolders,this.defaultValue.showFolders),showTypeParameters:c(ue.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:c(ue.showSnippets,this.defaultValue.showSnippets),showUsers:c(ue.showUsers,this.defaultValue.showUsers),showIssues:c(ue.showIssues,this.defaultValue.showIssues)}}}class U extends d{constructor(){super(97,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:b.localize(110,null),default:!0,type:"boolean"}})}validate(Z){return!Z||typeof Z!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:c(Z.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class H extends g{constructor(){super(123,[75])}compute(Z,ue,he){return ue.get(75)?!0:Z.tabFocusMode}}function $(te){switch(te){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class ie extends g{constructor(){super(125,[124])}compute(Z,ue,he){const re=ue.get(124);return{isDominatedByLongLines:Z.isDominatedByLongLines,isWordWrapMinified:re.isWordWrapMinified,isViewportWrapping:re.isViewportWrapping,wrappingColumn:re.wrappingColumn}}}const oe="Consolas, 'Courier New', monospace",ae="Menlo, Monaco, 'Courier New', monospace",G="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";e.EDITOR_FONT_DEFAULTS={fontFamily:N.isMacintosh?ae:N.isLinux?G:oe,fontWeight:"normal",fontSize:N.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},e.editorOptionsRegistry=[];function j(te){return e.editorOptionsRegistry[te.id]=te,te}e.EditorOptions={acceptSuggestionOnCommitCharacter:j(new o(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:b.localize(111,null)})),acceptSuggestionOnEnter:j(new i(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",b.localize(112,null),""],markdownDescription:b.localize(113,null)})),accessibilitySupport:j(new l),accessibilityPageSize:j(new s(3,"accessibilityPageSize",10,1,1073741824,{description:b.localize(114,null)})),ariaLabel:j(new u(4,"ariaLabel",b.localize(115,null))),autoClosingBrackets:j(new i(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",b.localize(116,null),b.localize(117,null),""],description:b.localize(118,null)})),autoClosingOvertype:j(new i(6,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",b.localize(119,null),""],description:b.localize(120,null)})),autoClosingQuotes:j(new i(7,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",b.localize(121,null),b.localize(122,null),""],description:b.localize(123,null)})),autoIndent:j(new n(8,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],t,{enumDescriptions:[b.localize(124,null),b.localize(125,null),b.localize(126,null),b.localize(127,null),b.localize(128,null)],description:b.localize(129,null)})),automaticLayout:j(new o(9,"automaticLayout",!1)),autoSurround:j(new i(10,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[b.localize(130,null),b.localize(131,null),b.localize(132,null),""],description:b.localize(133,null)})),stickyTabStops:j(new o(99,"stickyTabStops",!1,{description:b.localize(134,null)})),codeLens:j(new o(11,"codeLens",!0,{description:b.localize(135,null)})),codeLensFontFamily:j(new u(12,"codeLensFontFamily","",{description:b.localize(136,null)})),codeLensFontSize:j(new s(13,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,description:b.localize(137,null)})),colorDecorators:j(new o(14,"colorDecorators",!0,{description:b.localize(138,null)})),columnSelection:j(new o(15,"columnSelection",!1,{description:b.localize(139,null)})),comments:j(new h),contextmenu:j(new o(17,"contextmenu",!0)),copyWithSyntaxHighlighting:j(new o(18,"copyWithSyntaxHighlighting",!0,{description:b.localize(140,null)})),cursorBlinking:j(new n(19,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],m,{description:b.localize(141,null)})),cursorSmoothCaretAnimation:j(new o(20,"cursorSmoothCaretAnimation",!1,{description:b.localize(142,null)})),cursorStyle:j(new n(21,"cursorStyle",_.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],f,{description:b.localize(143,null)})),cursorSurroundingLines:j(new s(22,"cursorSurroundingLines",0,0,1073741824,{description:b.localize(144,null)})),cursorSurroundingLinesStyle:j(new i(23,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[b.localize(145,null),b.localize(146,null)],description:b.localize(147,null)})),cursorWidth:j(new s(24,"cursorWidth",0,0,1073741824,{markdownDescription:b.localize(148,null)})),disableLayerHinting:j(new o(25,"disableLayerHinting",!1)),disableMonospaceOptimizations:j(new o(26,"disableMonospaceOptimizations",!1)),dragAndDrop:j(new o(27,"dragAndDrop",!0,{description:b.localize(149,null)})),emptySelectionClipboard:j(new y),extraEditorClassName:j(new u(29,"extraEditorClassName","")),fastScrollSensitivity:j(new a(30,"fastScrollSensitivity",5,te=>te<=0?5:te,{markdownDescription:b.localize(150,null)})),find:j(new L),fixedOverflowWidgets:j(new o(32,"fixedOverflowWidgets",!1)),folding:j(new o(33,"folding",!0,{description:b.localize(151,null)})),foldingStrategy:j(new i(34,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[b.localize(152,null),b.localize(153,null)],description:b.localize(154,null)})),foldingHighlight:j(new o(35,"foldingHighlight",!0,{description:b.localize(155,null)})),unfoldOnClickAfterEndOfLine:j(new o(36,"unfoldOnClickAfterEndOfLine",!1,{description:b.localize(156,null)})),fontFamily:j(new u(37,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:b.localize(157,null)})),fontInfo:j(new k),fontLigatures2:j(new I),fontSize:j(new E),fontWeight:j(new T),formatOnPaste:j(new o(42,"formatOnPaste",!1,{description:b.localize(158,null)})),formatOnType:j(new o(43,"formatOnType",!1,{description:b.localize(159,null)})),glyphMargin:j(new o(44,"glyphMargin",!0,{description:b.localize(160,null)})),gotoLocation:j(new O),hideCursorInOverviewRuler:j(new o(46,"hideCursorInOverviewRuler",!1,{description:b.localize(161,null)})),highlightActiveIndentGuide:j(new o(47,"highlightActiveIndentGuide",!0,{description:b.localize(162,null)})),hover:j(new A),inDiffEditor:j(new o(49,"inDiffEditor",!1)),letterSpacing:j(new a(50,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,te=>a.clamp(te,-5,20),{description:b.localize(163,null)})),lightbulb:j(new F),lineDecorationsWidth:j(new p(52,"lineDecorationsWidth",10)),lineHeight:j(new R),lineNumbers:j(new ne),lineNumbersMinChars:j(new s(55,"lineNumbersMinChars",5,1,300)),linkedEditing:j(new o(56,"linkedEditing",!1,{description:b.localize(164,null)})),links:j(new o(57,"links",!0,{description:b.localize(165,null)})),matchBrackets:j(new i(58,"matchBrackets","always",["always","near","never"],{description:b.localize(166,null)})),minimap:j(new W),mouseStyle:j(new i(60,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:j(new a(61,"mouseWheelScrollSensitivity",1,te=>te===0?1:te,{markdownDescription:b.localize(167,null)})),mouseWheelZoom:j(new o(62,"mouseWheelZoom",!1,{markdownDescription:b.localize(168,null)})),multiCursorMergeOverlapping:j(new o(63,"multiCursorMergeOverlapping",!0,{description:b.localize(169,null)})),multiCursorModifier:j(new n(64,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],x,{markdownEnumDescriptions:[b.localize(170,null),b.localize(171,null)],markdownDescription:b.localize(172,null)})),multiCursorPaste:j(new i(65,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[b.localize(173,null),b.localize(174,null)],markdownDescription:b.localize(175,null)})),occurrencesHighlight:j(new o(66,"occurrencesHighlight",!0,{description:b.localize(176,null)})),overviewRulerBorder:j(new o(67,"overviewRulerBorder",!0,{description:b.localize(177,null)})),overviewRulerLanes:j(new s(68,"overviewRulerLanes",3,0,3)),padding:j(new K),parameterHints:j(new Y),peekWidgetDefaultFocus:j(new i(71,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[b.localize(178,null),b.localize(179,null)],description:b.localize(180,null)})),definitionLinkOpensInPeek:j(new o(72,"definitionLinkOpensInPeek",!1,{description:b.localize(181,null)})),quickSuggestions:j(new se),quickSuggestionsDelay:j(new s(74,"quickSuggestionsDelay",10,0,1073741824,{description:b.localize(182,null)})),readOnly:j(new o(75,"readOnly",!1)),renameOnType:j(new o(76,"renameOnType",!1,{description:b.localize(183,null),markdownDeprecationMessage:b.localize(184,null)})),renderControlCharacters:j(new o(77,"renderControlCharacters",!1,{description:b.localize(185,null)})),renderIndentGuides:j(new o(78,"renderIndentGuides",!0,{description:b.localize(186,null)})),renderFinalNewline:j(new o(79,"renderFinalNewline",!0,{description:b.localize(187,null)})),renderLineHighlight:j(new i(80,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",b.localize(188,null)],description:b.localize(189,null)})),renderLineHighlightOnlyWhenFocus:j(new o(81,"renderLineHighlightOnlyWhenFocus",!1,{description:b.localize(190,null)})),renderValidationDecorations:j(new i(82,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:j(new i(83,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",b.localize(191,null),b.localize(192,null),b.localize(193,null),""],description:b.localize(194,null)})),revealHorizontalRightPadding:j(new s(84,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:j(new o(85,"roundedSelection",!0,{description:b.localize(195,null)})),rulers:j(new X),scrollbar:j(new P),scrollBeyondLastColumn:j(new s(88,"scrollBeyondLastColumn",5,0,1073741824,{description:b.localize(196,null)})),scrollBeyondLastLine:j(new o(89,"scrollBeyondLastLine",!0,{description:b.localize(197,null)})),scrollPredominantAxis:j(new o(90,"scrollPredominantAxis",!0,{description:b.localize(198,null)})),selectionClipboard:j(new o(91,"selectionClipboard",!0,{description:b.localize(199,null),included:N.isLinux})),selectionHighlight:j(new o(92,"selectionHighlight",!0,{description:b.localize(200,null)})),selectOnLineNumbers:j(new o(93,"selectOnLineNumbers",!0)),showFoldingControls:j(new i(94,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[b.localize(201,null),b.localize(202,null)],description:b.localize(203,null)})),showUnused:j(new o(95,"showUnused",!0,{description:b.localize(204,null)})),showDeprecated:j(new o(119,"showDeprecated",!0,{description:b.localize(205,null)})),inlineHints:j(new D),snippetSuggestions:j(new i(96,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[b.localize(206,null),b.localize(207,null),b.localize(208,null),b.localize(209,null)],description:b.localize(210,null)})),smartSelect:j(new U),smoothScrolling:j(new o(98,"smoothScrolling",!1,{description:b.localize(211,null)})),stopRenderingLineAfter:j(new s(100,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:j(new V),suggestFontSize:j(new s(102,"suggestFontSize",0,0,1e3,{markdownDescription:b.localize(212,null)})),suggestLineHeight:j(new s(103,"suggestLineHeight",0,0,1e3,{markdownDescription:b.localize(213,null)})),suggestOnTriggerCharacters:j(new o(104,"suggestOnTriggerCharacters",!0,{description:b.localize(214,null)})),suggestSelection:j(new i(105,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[b.localize(215,null),b.localize(216,null),b.localize(217,null)],description:b.localize(218,null)})),tabCompletion:j(new i(106,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[b.localize(219,null),b.localize(220,null),b.localize(221,null)],description:b.localize(222,null)})),tabIndex:j(new s(107,"tabIndex",0,-1,1073741824)),unusualLineTerminators:j(new i(108,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[b.localize(223,null),b.localize(224,null),b.localize(225,null)],description:b.localize(226,null)})),useTabStops:j(new o(109,"useTabStops",!0,{description:b.localize(227,null)})),wordSeparators:j(new u(110,"wordSeparators",M.USUAL_WORD_SEPARATORS,{description:b.localize(228,null)})),wordWrap:j(new i(111,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[b.localize(229,null),b.localize(230,null),b.localize(231,null),b.localize(232,null)],description:b.localize(233,null)})),wordWrapBreakAfterCharacters:j(new u(112,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:j(new u(113,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:j(new s(114,"wordWrapColumn",80,1,1073741824,{markdownDescription:b.localize(234,null)})),wordWrapOverride1:j(new i(115,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:j(new i(116,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:j(new n(117,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],$,{enumDescriptions:[b.localize(235,null),b.localize(236,null),b.localize(237,null),b.localize(238,null)],description:b.localize(239,null)})),wrappingStrategy:j(new i(118,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[b.localize(240,null),b.localize(241,null)],description:b.localize(242,null)})),editorClassName:j(new v),pixelRatio:j(new ee),tabFocusMode:j(new H),layoutInfo:j(new B),wrappingInfo:j(new ie)}}),define(Q[455],J([0,1,14,3,63,38]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelDecorations=void 0;class S{constructor(d,g,p,c,o){this.editorId=d,this.model=g,this.configuration=p,this._linesCollection=c,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(d){const g=d.id;let p=this._decorationsCache[g];if(!p){const c=d.range,o=d.options;let s;if(o.isWholeLine){const a=this._coordinatesConverter.convertModelPositionToViewPosition(new b.Position(c.startLineNumber,1)),u=this._coordinatesConverter.convertModelPositionToViewPosition(new b.Position(c.endLineNumber,this.model.getLineMaxColumn(c.endLineNumber)));s=new N.Range(a.lineNumber,a.column,u.lineNumber,u.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(c);p=new M.ViewModelDecoration(s,o),this._decorationsCache[g]=p}return p}getDecorationsViewportData(d){let g=this._cachedModelDecorationsResolver!==null;return g=g&&d.equalsRange(this._cachedModelDecorationsResolverViewRange),g||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(d),this._cachedModelDecorationsResolverViewRange=d),this._cachedModelDecorationsResolver}_getDecorationsViewportData(d){const g=this._linesCollection.getDecorationsInRange(d,this.editorId,w.filterValidationDecorations(this.configuration.options)),p=d.startLineNumber,c=d.endLineNumber;let o=[],s=0,a=[];for(let u=p;u<=c;u++)a[u-p]=[];for(let u=0,r=g.length;u<r;u++){let i=g[u],n=i.options,t=this._getOrCreateViewModelDecoration(i),l=t.range;if(o[s++]=t,n.inlineClassName){let h=new M.InlineDecoration(l,n.inlineClassName,n.inlineClassNameAffectsLetterSpacing?3:0),m=Math.max(p,l.startLineNumber),_=Math.min(c,l.endLineNumber);for(let f=m;f<=_;f++)a[f-p].push(h)}if(n.beforeContentClassName&&p<=l.startLineNumber&&l.startLineNumber<=c){let h=new M.InlineDecoration(new N.Range(l.startLineNumber,l.startColumn,l.startLineNumber,l.startColumn),n.beforeContentClassName,1);a[l.startLineNumber-p].push(h)}if(n.afterContentClassName&&p<=l.endLineNumber&&l.endLineNumber<=c){let h=new M.InlineDecoration(new N.Range(l.endLineNumber,l.endColumn,l.endLineNumber,l.endColumn),n.afterContentClassName,2);a[l.endLineNumber-p].push(h)}}return{decorations:o,inlineDecorations:a}}}e.ViewModelDecorations=S}),define(Q[456],J([4,5]),function(q,e){return q.create("vs/editor/common/editorContextKeys",e)}),define(Q[457],J([4,5]),function(q,e){return q.create("vs/editor/common/model/editStack",e)}),define(Q[236],J([0,1,457,12,21,24,218,101,44]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=void 0;function g(r){return r.toString()}class p{constructor(i,n,t,l,h,m,_){this.beforeVersionId=i,this.afterVersionId=n,this.beforeEOL=t,this.afterEOL=l,this.beforeCursorState=h,this.afterCursorState=m,this.changes=_}static create(i,n){const t=i.getAlternativeVersionId(),l=s(i);return new p(t,t,l,l,n,n,[])}append(i,n,t,l,h){n.length>0&&(this.changes=S.compressConsecutiveTextChanges(this.changes,n)),this.afterEOL=t,this.afterVersionId=l,this.afterCursorState=h}static _writeSelectionsSize(i){return 4+4*4*(i?i.length:0)}static _writeSelections(i,n,t){if(C.writeUInt32BE(i,n?n.length:0,t),t+=4,n)for(const l of n)C.writeUInt32BE(i,l.selectionStartLineNumber,t),t+=4,C.writeUInt32BE(i,l.selectionStartColumn,t),t+=4,C.writeUInt32BE(i,l.positionLineNumber,t),t+=4,C.writeUInt32BE(i,l.positionColumn,t),t+=4;return t}static _readSelections(i,n,t){const l=C.readUInt32BE(i,n);n+=4;for(let h=0;h<l;h++){const m=C.readUInt32BE(i,n);n+=4;const _=C.readUInt32BE(i,n);n+=4;const f=C.readUInt32BE(i,n);n+=4;const v=C.readUInt32BE(i,n);n+=4,t.push(new M.Selection(m,_,f,v))}return n}serialize(){let i=4+4+1+1+p._writeSelectionsSize(this.beforeCursorState)+p._writeSelectionsSize(this.afterCursorState)+4;for(const l of this.changes)i+=l.writeSize();const n=new Uint8Array(i);let t=0;C.writeUInt32BE(n,this.beforeVersionId,t),t+=4,C.writeUInt32BE(n,this.afterVersionId,t),t+=4,C.writeUInt8(n,this.beforeEOL,t),t+=1,C.writeUInt8(n,this.afterEOL,t),t+=1,t=p._writeSelections(n,this.beforeCursorState,t),t=p._writeSelections(n,this.afterCursorState,t),C.writeUInt32BE(n,this.changes.length,t),t+=4;for(const l of this.changes)t=l.write(n,t);return n.buffer}static deserialize(i){const n=new Uint8Array(i);let t=0;const l=C.readUInt32BE(n,t);t+=4;const h=C.readUInt32BE(n,t);t+=4;const m=C.readUInt8(n,t);t+=1;const _=C.readUInt8(n,t);t+=1;const f=[];t=p._readSelections(n,t,f);const v=[];t=p._readSelections(n,t,v);const y=C.readUInt32BE(n,t);t+=4;const L=[];for(let I=0;I<y;I++)t=S.TextChange.read(n,t,L);return new p(l,h,m,_,f,v,L)}}class c{constructor(i,n){this.model=i,this._data=p.create(i,n)}get type(){return 0}get resource(){return w.URI.isUri(this.model)?this.model:this.model.uri}get label(){return b.localize(0,null)}toString(){return(this._data instanceof p?this._data:p.deserialize(this._data)).changes.map(n=>n.toString()).join(", ")}matchesResource(i){return(w.URI.isUri(this.model)?this.model:this.model.uri).toString()===i.toString()}setModel(i){this.model=i}canAppend(i){return this.model===i&&this._data instanceof p}append(i,n,t,l,h){this._data instanceof p&&this._data.append(i,n,t,l,h)}close(){this._data instanceof p&&(this._data=this._data.serialize())}open(){this._data instanceof p||(this._data=p.deserialize(this._data))}undo(){if(w.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof p&&(this._data=this._data.serialize());const i=p.deserialize(this._data);this.model._applyUndo(i.changes,i.beforeEOL,i.beforeVersionId,i.beforeCursorState)}redo(){if(w.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof p&&(this._data=this._data.serialize());const i=p.deserialize(this._data);this.model._applyRedo(i.changes,i.afterEOL,i.afterVersionId,i.afterCursorState)}heapSize(){return this._data instanceof p&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=c;class o{constructor(i,n){this.type=1,this.label=i,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const t of this._editStackElementsArr){const l=g(t.resource);this._editStackElementsMap.set(l,t)}this._delegate=null}get resources(){return this._editStackElementsArr.map(i=>i.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(i){const n=g(i);return this._editStackElementsMap.has(n)}setModel(i){const n=g(w.URI.isUri(i)?i:i.uri);this._editStackElementsMap.has(n)&&this._editStackElementsMap.get(n).setModel(i)}canAppend(i){if(!this._isOpen)return!1;const n=g(i.uri);return this._editStackElementsMap.has(n)?this._editStackElementsMap.get(n).canAppend(i):!1}append(i,n,t,l,h){const m=g(i.uri);this._editStackElementsMap.get(m).append(i,n,t,l,h)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const i of this._editStackElementsArr)i.undo()}redo(){for(const i of this._editStackElementsArr)i.redo()}heapSize(i){const n=g(i);return this._editStackElementsMap.has(n)?this._editStackElementsMap.get(n).heapSize():0}split(){return this._editStackElementsArr}toString(){let i=[];for(const n of this._editStackElementsArr)i.push(`${d.basename(n.resource)}: ${n}`);return`{${i.join(", ")}}`}}e.MultiModelEditStackElement=o;function s(r){return r.getEOL()===`
`?0:1}function a(r){return r?r instanceof c||r instanceof o:!1}e.isEditStackElement=a;class u{constructor(i,n){this._model=i,this._undoRedoService=n}pushStackElement(){const i=this._undoRedoService.getLastElement(this._model.uri);a(i)&&i.close()}popStackElement(){const i=this._undoRedoService.getLastElement(this._model.uri);a(i)&&i.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(i){const n=this._undoRedoService.getLastElement(this._model.uri);if(a(n)&&n.canAppend(this._model))return n;const t=new c(this._model,i);return this._undoRedoService.pushElement(t),t}pushEOL(i){const n=this._getOrCreateEditStackElement(null);this._model.setEOL(i),n.append(this._model,[],s(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(i,n,t){const l=this._getOrCreateEditStackElement(i),h=this._model.applyEdits(n,!0),m=u._computeCursorState(t,h),_=h.map((f,v)=>({index:v,textChange:f.textChange}));return _.sort((f,v)=>f.textChange.oldPosition===v.textChange.oldPosition?f.index-v.index:f.textChange.oldPosition-v.textChange.oldPosition),l.append(this._model,_.map(f=>f.textChange),s(this._model),this._model.getAlternativeVersionId(),m),m}static _computeCursorState(i,n){try{return i?i(n):null}catch(t){return N.onUnexpectedError(t),null}}}e.EditStack=u}),define(Q[458],J([4,5]),function(q,e){return q.create("vs/editor/common/modes/modesRegistry",e)}),define(Q[459],J([4,5]),function(q,e){return q.create("vs/editor/common/standaloneStrings",e)}),define(Q[64],J([0,1,459]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleServicesNLS=e.ToggleHighContrastNLS=e.StandaloneCodeEditorNLS=e.QuickOutlineNLS=e.QuickCommandNLS=e.QuickHelpNLS=e.GoToLineNLS=e.InspectTokensNLS=e.AccessibilityHelpNLS=void 0;var N;(function(o){o.noSelection=b.localize(0,null),o.singleSelectionRange=b.localize(1,null),o.singleSelection=b.localize(2,null),o.multiSelectionRange=b.localize(3,null),o.multiSelection=b.localize(4,null),o.emergencyConfOn=b.localize(5,null),o.openingDocs=b.localize(6,null),o.readonlyDiffEditor=b.localize(7,null),o.editableDiffEditor=b.localize(8,null),o.readonlyEditor=b.localize(9,null),o.editableEditor=b.localize(10,null),o.changeConfigToOnMac=b.localize(11,null),o.changeConfigToOnWinLinux=b.localize(12,null),o.auto_on=b.localize(13,null),o.auto_off=b.localize(14,null),o.tabFocusModeOnMsg=b.localize(15,null),o.tabFocusModeOnMsgNoKb=b.localize(16,null),o.tabFocusModeOffMsg=b.localize(17,null),o.tabFocusModeOffMsgNoKb=b.localize(18,null),o.openDocMac=b.localize(19,null),o.openDocWinLinux=b.localize(20,null),o.outroMsg=b.localize(21,null),o.showAccessibilityHelpAction=b.localize(22,null)})(N=e.AccessibilityHelpNLS||(e.AccessibilityHelpNLS={}));var M;(function(o){o.inspectTokensAction=b.localize(23,null)})(M=e.InspectTokensNLS||(e.InspectTokensNLS={}));var w;(function(o){o.gotoLineActionLabel=b.localize(24,null)})(w=e.GoToLineNLS||(e.GoToLineNLS={}));var S;(function(o){o.helpQuickAccessActionLabel=b.localize(25,null)})(S=e.QuickHelpNLS||(e.QuickHelpNLS={}));var C;(function(o){o.quickCommandActionLabel=b.localize(26,null),o.quickCommandHelp=b.localize(27,null)})(C=e.QuickCommandNLS||(e.QuickCommandNLS={}));var d;(function(o){o.quickOutlineActionLabel=b.localize(28,null),o.quickOutlineByCategoryActionLabel=b.localize(29,null)})(d=e.QuickOutlineNLS||(e.QuickOutlineNLS={}));var g;(function(o){o.editorViewAccessibleLabel=b.localize(30,null),o.accessibilityHelpMessage=b.localize(31,null)})(g=e.StandaloneCodeEditorNLS||(e.StandaloneCodeEditorNLS={}));var p;(function(o){o.toggleHighContrast=b.localize(32,null)})(p=e.ToggleHighContrastNLS||(e.ToggleHighContrastNLS={}));var c;(function(o){o.bulkEditServiceSummary=b.localize(33,null)})(c=e.SimpleServicesNLS||(e.SimpleServicesNLS={}))}),define(Q[460],J([4,5]),function(q,e){return q.create("vs/editor/common/view/editorColorRegistry",e)}),define(Q[461],J([4,5]),function(q,e){return q.create("vs/editor/contrib/anchorSelect/anchorSelect",e)}),define(Q[462],J([4,5]),function(q,e){return q.create("vs/editor/contrib/bracketMatching/bracketMatching",e)}),define(Q[463],J([4,5]),function(q,e){return q.create("vs/editor/contrib/caretOperations/caretOperations",e)}),define(Q[464],J([4,5]),function(q,e){return q.create("vs/editor/contrib/caretOperations/transpose",e)}),define(Q[465],J([4,5]),function(q,e){return q.create("vs/editor/contrib/clipboard/clipboard",e)}),define(Q[466],J([4,5]),function(q,e){return q.create("vs/editor/contrib/codeAction/codeActionCommands",e)}),define(Q[467],J([4,5]),function(q,e){return q.create("vs/editor/contrib/codeAction/lightBulbWidget",e)}),define(Q[468],J([4,5]),function(q,e){return q.create("vs/editor/contrib/codelens/codelensController",e)}),define(Q[469],J([4,5]),function(q,e){return q.create("vs/editor/contrib/comment/comment",e)}),define(Q[470],J([4,5]),function(q,e){return q.create("vs/editor/contrib/contextmenu/contextmenu",e)}),define(Q[471],J([4,5]),function(q,e){return q.create("vs/editor/contrib/cursorUndo/cursorUndo",e)}),define(Q[472],J([4,5]),function(q,e){return q.create("vs/editor/contrib/find/findController",e)}),define(Q[473],J([4,5]),function(q,e){return q.create("vs/editor/contrib/find/findWidget",e)}),define(Q[474],J([4,5]),function(q,e){return q.create("vs/editor/contrib/folding/folding",e)}),define(Q[475],J([4,5]),function(q,e){return q.create("vs/editor/contrib/folding/foldingDecorations",e)}),define(Q[476],J([4,5]),function(q,e){return q.create("vs/editor/contrib/fontZoom/fontZoom",e)}),define(Q[477],J([4,5]),function(q,e){return q.create("vs/editor/contrib/format/format",e)}),define(Q[478],J([4,5]),function(q,e){return q.create("vs/editor/contrib/format/formatActions",e)}),define(Q[479],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoError/gotoError",e)}),define(Q[480],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoError/gotoErrorWidget",e)}),define(Q[481],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/goToCommands",e)}),define(Q[482],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition",e)}),define(Q[483],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/peek/referencesController",e)}),define(Q[484],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/peek/referencesTree",e)}),define(Q[485],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/peek/referencesWidget",e)}),define(Q[486],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/referencesModel",e)}),define(Q[132],J([0,1,486,6,44,2,8,119,3,51,12]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class c{constructor(r,i,n,t,l){this.isProviderFirst=r,this.parent=i,this.uri=n,this._range=t,this._rangeCallback=l,this.id=C.defaultGenerator.nextId()}get range(){return this._range}set range(r){this._range=r,this._rangeCallback(this)}get ariaMessage(){var r;const i=(r=this.parent.getPreview(this))===null||r===void 0?void 0:r.preview(this.range);return i?b.localize(1,null,M.basename(this.uri),this.range.startLineNumber,this.range.startColumn,i.value):b.localize(0,null,M.basename(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=c;class o{constructor(r){this._modelReference=r}dispose(){this._modelReference.dispose()}preview(r,i=8){const n=this._modelReference.object.textEditorModel;if(!!n){const{startLineNumber:t,startColumn:l,endLineNumber:h,endColumn:m}=r,_=n.getWordUntilPosition({lineNumber:t,column:l-i}),f=new d.Range(t,_.startColumn,t,l),v=new d.Range(h,m,h,1073741824),y=n.getValueInRange(f).replace(/^\s+/,""),L=n.getValueInRange(r),I=n.getValueInRange(v).replace(/\s+$/,"");return{value:y+L+I,highlight:{start:y.length,end:y.length+L.length}}}}}e.FilePreview=o;class s{constructor(r,i){this.parent=r,this.uri=i,this.children=[],this._previews=new g.ResourceMap}dispose(){w.dispose(this._previews.values()),this._previews.clear()}getPreview(r){return this._previews.get(r.uri)}get ariaMessage(){const r=this.children.length;return r===1?b.localize(2,null,M.basename(this.uri),this.uri.fsPath):b.localize(3,null,r,M.basename(this.uri),this.uri.fsPath)}resolve(r){return Ie(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let i of this.children)if(!this._previews.has(i.uri))try{const n=yield r.createModelReference(i.uri);this._previews.set(i.uri,new o(n))}catch(n){p.onUnexpectedError(n)}return this})}}e.FileReferences=s;class a{constructor(r,i){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new N.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=r,this._title=i;const[n]=r;r.sort(a._compareReferences);let t;for(let l of r)if((!t||!M.extUri.isEqual(t.uri,l.uri,!0))&&(t=new s(this,l.uri),this.groups.push(t)),t.children.length===0||a._compareReferences(l,t.children[t.children.length-1])!==0){const h=new c(n===l,t,l.uri,l.targetSelectionRange||l.range,m=>this._onDidChangeReferenceRange.fire(m));this.references.push(h),t.children.push(h)}}dispose(){w.dispose(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new a(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?b.localize(4,null):this.references.length===1?b.localize(5,null,this.references[0].uri.fsPath):this.groups.length===1?b.localize(6,null,this.references.length,this.groups[0].uri.fsPath):b.localize(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(r,i){let{parent:n}=r,t=n.children.indexOf(r),l=n.children.length,h=n.parent.groups.length;return h===1||i&&t+1<l||!i&&t>0?(i?t=(t+1)%l:t=(t+l-1)%l,n.children[t]):(t=n.parent.groups.indexOf(n),i?(t=(t+1)%h,n.parent.groups[t].children[0]):(t=(t+h-1)%h,n.parent.groups[t].children[n.parent.groups[t].children.length-1]))}nearestReference(r,i){const n=this.references.map((t,l)=>({idx:l,prefixLen:S.commonPrefixLength(t.uri.toString(),r.toString()),offsetDist:Math.abs(t.range.startLineNumber-i.lineNumber)*100+Math.abs(t.range.startColumn-i.column)})).sort((t,l)=>t.prefixLen>l.prefixLen?-1:t.prefixLen<l.prefixLen?1:t.offsetDist<l.offsetDist?-1:t.offsetDist>l.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(r,i){for(const n of this.references)if(n.uri.toString()===r.toString()&&d.Range.containsPosition(n.range,i))return n}firstReference(){for(const r of this.references)if(r.isProviderFirst)return r;return this.references[0]}static _compareReferences(r,i){return M.extUri.compare(r.uri,i.uri)||d.Range.compareRangesUsingStarts(r.range,i.range)}}e.ReferencesModel=a}),define(Q[487],J([4,5]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/symbolNavigation",e)}),define(Q[488],J([4,5]),function(q,e){return q.create("vs/editor/contrib/hover/hover",e)}),define(Q[489],J([4,5]),function(q,e){return q.create("vs/editor/contrib/hover/markdownHoverParticipant",e)}),define(Q[490],J([4,5]),function(q,e){return q.create("vs/editor/contrib/hover/markerHoverParticipant",e)}),define(Q[491],J([4,5]),function(q,e){return q.create("vs/editor/contrib/inPlaceReplace/inPlaceReplace",e)}),define(Q[492],J([4,5]),function(q,e){return q.create("vs/editor/contrib/indentation/indentation",e)}),define(Q[493],J([4,5]),function(q,e){return q.create("vs/editor/contrib/linesOperations/linesOperations",e)}),define(Q[494],J([4,5]),function(q,e){return q.create("vs/editor/contrib/linkedEditing/linkedEditing",e)}),define(Q[495],J([4,5]),function(q,e){return q.create("vs/editor/contrib/links/links",e)}),define(Q[496],J([4,5]),function(q,e){return q.create("vs/editor/contrib/message/messageController",e)}),define(Q[497],J([4,5]),function(q,e){return q.create("vs/editor/contrib/multicursor/multicursor",e)}),define(Q[498],J([4,5]),function(q,e){return q.create("vs/editor/contrib/parameterHints/parameterHints",e)}),define(Q[499],J([4,5]),function(q,e){return q.create("vs/editor/contrib/parameterHints/parameterHintsWidget",e)}),define(Q[500],J([4,5]),function(q,e){return q.create("vs/editor/contrib/peekView/peekView",e)}),define(Q[501],J([4,5]),function(q,e){return q.create("vs/editor/contrib/quickAccess/gotoLineQuickAccess",e)}),define(Q[502],J([4,5]),function(q,e){return q.create("vs/editor/contrib/quickAccess/gotoSymbolQuickAccess",e)}),define(Q[503],J([4,5]),function(q,e){return q.create("vs/editor/contrib/rename/rename",e)}),define(Q[504],J([4,5]),function(q,e){return q.create("vs/editor/contrib/rename/renameInputField",e)}),define(Q[505],J([4,5]),function(q,e){return q.create("vs/editor/contrib/smartSelect/smartSelect",e)}),define(Q[506],J([4,5]),function(q,e){return q.create("vs/editor/contrib/snippet/snippetVariables",e)}),define(Q[507],J([4,5]),function(q,e){return q.create("vs/editor/contrib/suggest/suggestController",e)}),define(Q[508],J([4,5]),function(q,e){return q.create("vs/editor/contrib/suggest/suggestWidget",e)}),define(Q[509],J([4,5]),function(q,e){return q.create("vs/editor/contrib/suggest/suggestWidgetDetails",e)}),define(Q[510],J([4,5]),function(q,e){return q.create("vs/editor/contrib/suggest/suggestWidgetRenderer",e)}),define(Q[511],J([4,5]),function(q,e){return q.create("vs/editor/contrib/suggest/suggestWidgetStatus",e)}),define(Q[512],J([4,5]),function(q,e){return q.create("vs/editor/contrib/symbolIcons/symbolIcons",e)}),define(Q[513],J([4,5]),function(q,e){return q.create("vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode",e)}),define(Q[514],J([4,5]),function(q,e){return q.create("vs/editor/contrib/tokenization/tokenization",e)}),define(Q[515],J([4,5]),function(q,e){return q.create("vs/editor/contrib/unusualLineTerminators/unusualLineTerminators",e)}),define(Q[516],J([4,5]),function(q,e){return q.create("vs/editor/contrib/wordHighlighter/wordHighlighter",e)}),define(Q[517],J([4,5]),function(q,e){return q.create("vs/editor/contrib/wordOperations/wordOperations",e)}),define(Q[518],J([4,5]),function(q,e){return q.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(Q[519],J([4,5]),function(q,e){return q.create("vs/platform/configuration/common/configurationRegistry",e)}),define(Q[520],J([4,5]),function(q,e){return q.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(Q[521],J([4,5]),function(q,e){return q.create("vs/platform/contextkey/common/contextkeys",e)}),define(Q[522],J([4,5]),function(q,e){return q.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(Q[523],J([4,5]),function(q,e){return q.create("vs/platform/list/browser/listService",e)}),define(Q[524],J([4,5]),function(q,e){return q.create("vs/platform/markers/common/markers",e)}),define(Q[525],J([4,5]),function(q,e){return q.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(Q[526],J([4,5]),function(q,e){return q.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(Q[527],J([4,5]),function(q,e){return q.create("vs/platform/theme/common/colorRegistry",e)}),define(Q[528],J([4,5]),function(q,e){return q.create("vs/platform/theme/common/iconRegistry",e)}),define(Q[529],J([4,5]),function(q,e){return q.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(Q[530],J([0,1,7]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;class N{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(w,S){return Ie(this,void 0,void 0,function*(){if(S){this.mapTextToType.set(S,w);return}try{return yield navigator.clipboard.writeText(w)}catch(g){console.error(g)}const C=document.activeElement,d=document.body.appendChild(b.$("textarea",{"aria-hidden":!0}));d.style.height="1px",d.style.width="1px",d.style.position="absolute",d.value=w,d.focus(),d.select(),document.execCommand("copy"),C instanceof HTMLElement&&C.focus(),document.body.removeChild(d)})}readText(w){return Ie(this,void 0,void 0,function*(){if(w)return this.mapTextToType.get(w)||"";try{return yield navigator.clipboard.readText()}catch(S){return console.error(S),""}})}readFindText(){return Ie(this,void 0,void 0,function*(){return this.findText})}writeFindText(w){return Ie(this,void 0,void 0,function*(){this.findText=w})}}e.BrowserClipboardService=N}),define(Q[531],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpenContext=void 0;var b;(function(N){N[N.API=0]="API",N[N.USER=1]="USER"})(b=e.EditorOpenContext||(e.EditorOpenContext={}))}),define(Q[532],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIdentifier=void 0;class b{constructor(M){this.value=M,this._lower=M.toLowerCase()}static toKey(M){return typeof M=="string"?M.toLowerCase():M._lower}}e.ExtensionIdentifier=b}),define(Q[237],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileKind=void 0;var b;(function(N){N[N.FILE=0]="FILE",N[N.FOLDER=1]="FOLDER",N[N.ROOT_FOLDER=2]="ROOT_FOLDER"})(b=e.FileKind||(e.FileKind={}))}),define(Q[238],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class b{constructor(M,w=[],S=!1){this.ctor=M,this.staticArguments=w,this.supportsDelayedInstantiation=S}}e.SyncDescriptor=b}),define(Q[74],J([0,1,238]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const N=[];function M(S,C,d){C instanceof b.SyncDescriptor||(C=new b.SyncDescriptor(C,[],d)),N.push([S,C])}e.registerSingleton=M;function w(){return N}e.getSingletonServiceDescriptors=w}),define(Q[533],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class b{constructor(w){this.incoming=new Map,this.outgoing=new Map,this.data=w}}e.Node=b;class N{constructor(w){this._hashFn=w,this._nodes=new Map}roots(){const w=[];for(let S of this._nodes.values())S.outgoing.size===0&&w.push(S);return w}insertEdge(w,S){const C=this.lookupOrInsertNode(w),d=this.lookupOrInsertNode(S);C.outgoing.set(this._hashFn(S),d),d.incoming.set(this._hashFn(w),C)}removeNode(w){const S=this._hashFn(w);this._nodes.delete(S);for(let C of this._nodes.values())C.outgoing.delete(S),C.incoming.delete(S)}lookupOrInsertNode(w){const S=this._hashFn(w);let C=this._nodes.get(S);return C||(C=new b(w),this._nodes.set(S,C)),C}isEmpty(){return this._nodes.size===0}toString(){let w=[];for(let[S,C]of this._nodes)w.push(`${S}, (incoming)[${[...C.incoming.keys()].join(", ")}], (outgoing)[${[...C.outgoing.keys()].join(",")}]`);return w.join(`
`)}}e.Graph=N}),define(Q[9],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.optional=e.createDecorator=e.IInstantiationService=e._util=void 0;var b;(function(S){S.serviceIds=new Map,S.DI_TARGET="$di$target",S.DI_DEPENDENCIES="$di$dependencies";function C(d){return d[S.DI_DEPENDENCIES]||[]}S.getServiceDependencies=C})(b=e._util||(e._util={})),e.IInstantiationService=M("instantiationService");function N(S,C,d,g){C[b.DI_TARGET]===C?C[b.DI_DEPENDENCIES].push({id:S,index:d,optional:g}):(C[b.DI_DEPENDENCIES]=[{id:S,index:d,optional:g}],C[b.DI_TARGET]=C)}function M(S){if(b.serviceIds.has(S))return b.serviceIds.get(S);const C=function(d,g,p){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");N(C,d,p,!1)};return C.toString=()=>S,b.serviceIds.set(S,C),C}e.createDecorator=M;function w(S){return function(C,d,g){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");N(S,C,g,!0)}}e.optional=w}),define(Q[133],J([0,1,9,24,20]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=b.createDecorator("IWorkspaceEditService");function w(p){return M.isObject(p)&&(Boolean(p.newUri)||Boolean(p.oldUri))}function S(p){return M.isObject(p)&&N.URI.isUri(p.resource)&&M.isObject(p.edit)}class C{constructor(c){this.metadata=c}static convert(c){return c.edits.map(o=>{if(S(o))return new d(o.resource,o.edit,o.modelVersionId,o.metadata);if(w(o))return new g(o.oldUri,o.newUri,o.options,o.metadata);throw new Error("Unsupported edit")})}}e.ResourceEdit=C;class d extends C{constructor(c,o,s,a){super(a);this.resource=c,this.textEdit=o,this.versionId=s,this.metadata=a}}e.ResourceTextEdit=d;class g extends C{constructor(c,o,s,a){super(a);this.oldResource=c,this.newResource=o,this.options=s,this.metadata=a}}e.ResourceFileEdit=g}),define(Q[28],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=b.createDecorator("codeEditorService")}),define(Q[75],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=e.ID_EDITOR_WORKER_SERVICE=void 0,e.ID_EDITOR_WORKER_SERVICE="editorWorkerService",e.IEditorWorkerService=b.createDecorator(e.ID_EDITOR_WORKER_SERVICE)}),define(Q[178],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=b.createDecorator("markerDecorationsService")}),define(Q[57],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModeService=void 0,e.IModeService=b.createDecorator("modeService")}),define(Q[36],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSynchronizeModel=e.IModelService=void 0,e.IModelService=b.createDecorator("modelService");function N(M){return!M.isTooLargeForSyncing()&&!M.isForSimpleWidget}e.shouldSynchronizeModel=N}),define(Q[134],J([0,1,6,89,2,51,100,374,36]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRequestDelays=e.LanguageFeatureRegistry=void 0;function g(o){return typeof o=="string"?!1:Array.isArray(o)?o.every(g):!!o.exclusive}class p{constructor(){this._clock=0,this._entries=[],this._onDidChange=new b.Emitter}get onDidChange(){return this._onDidChange.event}register(s,a){let u={selector:s,provider:a,_score:-1,_time:this._clock++};return this._entries.push(u),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),M.toDisposable(()=>{if(u){let r=this._entries.indexOf(u);r>=0&&(this._entries.splice(r,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),u=void 0)}})}has(s){return this.all(s).length>0}all(s){if(!s)return[];this._updateScores(s);const a=[];for(let u of this._entries)u._score>0&&a.push(u.provider);return a}ordered(s){const a=[];return this._orderedForEach(s,u=>a.push(u.provider)),a}orderedGroups(s){const a=[];let u,r;return this._orderedForEach(s,i=>{u&&r===i._score?u.push(i.provider):(r=i._score,u=[i.provider],a.push(u))}),a}_orderedForEach(s,a){if(!!s){this._updateScores(s);for(const u of this._entries)u._score>0&&a(u)}}_updateScores(s){let a={uri:s.uri.toString(),language:s.getLanguageIdentifier().language};if(!(this._lastCandidate&&this._lastCandidate.language===a.language&&this._lastCandidate.uri===a.uri)){this._lastCandidate=a;for(let u of this._entries)if(u._score=C.score(u.selector,s.uri,s.getLanguageIdentifier().language,d.shouldSynchronizeModel(s)),g(u.selector)&&u._score>0){for(let r of this._entries)r._score=0;u._score=1e3;break}this._entries.sort(p._compareByScoreAndTime)}}static _compareByScoreAndTime(s,a){return s._score<a._score?1:s._score>a._score?-1:s._time<a._time?1:s._time>a._time?-1:0}}e.LanguageFeatureRegistry=p;class c{constructor(s,a,u=Number.MAX_SAFE_INTEGER){this._registry=s,this.min=a,this.max=u,this._cache=new w.LRUCache(50,.7)}_key(s){return s.id+N.hash(this._registry.all(s))}_clamp(s){return s===void 0?this.min:Math.min(this.max,Math.max(this.min,Math.floor(s*1.3)))}get(s){const a=this._key(s),u=this._cache.get(a);return this._clamp(u==null?void 0:u.value)}update(s,a){const u=this._key(s);let r=this._cache.get(u);return r||(r=new S.MovingAverage,this._cache.set(u,r)),r.update(a),this.get(s)}}e.LanguageFeatureRequestDelays=c}),define(Q[18],J([0,1,24,3,134,382,27]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=e.DocumentRangeSemanticTokensProviderRegistry=e.DocumentSemanticTokensProviderRegistry=e.FoldingRangeProviderRegistry=e.SelectionRangeRegistry=e.ColorProviderRegistry=e.LinkProviderRegistry=e.OnTypeFormattingEditProviderRegistry=e.DocumentRangeFormattingEditProviderRegistry=e.DocumentFormattingEditProviderRegistry=e.CodeActionProviderRegistry=e.InlineHintsProviderRegistry=e.CodeLensProviderRegistry=e.TypeDefinitionProviderRegistry=e.ImplementationProviderRegistry=e.DeclarationProviderRegistry=e.DefinitionProviderRegistry=e.LinkedEditingRangeProviderRegistry=e.DocumentHighlightProviderRegistry=e.DocumentSymbolProviderRegistry=e.HoverProviderRegistry=e.SignatureHelpProviderRegistry=e.CompletionProviderRegistry=e.RenameProviderRegistry=e.ReferenceProviderRegistry=e.InlineHintKind=e.FoldingRangeKind=e.SymbolKinds=e.isLocationLink=e.DocumentHighlightKind=e.SignatureHelpTriggerKind=e.completionKindFromString=e.completionKindToCssClass=e.TokenMetadata=e.LanguageIdentifier=void 0;class C{constructor(r,i){this.language=r,this.id=i}}e.LanguageIdentifier=C;class d{static getLanguageId(r){return(r&255)>>>0}static getTokenType(r){return(r&1792)>>>8}static getFontStyle(r){return(r&14336)>>>11}static getForeground(r){return(r&8372224)>>>14}static getBackground(r){return(r&4286578688)>>>23}static getClassNameFromMetadata(r){let i=this.getForeground(r),n="mtk"+i,t=this.getFontStyle(r);return t&1&&(n+=" mtki"),t&2&&(n+=" mtkb"),t&4&&(n+=" mtku"),n}static getInlineStyleFromMetadata(r,i){const n=this.getForeground(r),t=this.getFontStyle(r);let l=`color: ${i[n]};`;return t&1&&(l+="font-style: italic;"),t&2&&(l+="font-weight: bold;"),t&4&&(l+="text-decoration: underline;"),l}}e.TokenMetadata=d,e.completionKindToCssClass=function(){let u=Object.create(null);return u[0]="symbol-method",u[1]="symbol-function",u[2]="symbol-constructor",u[3]="symbol-field",u[4]="symbol-variable",u[5]="symbol-class",u[6]="symbol-struct",u[7]="symbol-interface",u[8]="symbol-module",u[9]="symbol-property",u[10]="symbol-event",u[11]="symbol-operator",u[12]="symbol-unit",u[13]="symbol-value",u[14]="symbol-constant",u[15]="symbol-enum",u[16]="symbol-enum-member",u[17]="symbol-keyword",u[27]="symbol-snippet",u[18]="symbol-text",u[19]="symbol-color",u[20]="symbol-file",u[21]="symbol-reference",u[22]="symbol-customcolor",u[23]="symbol-folder",u[24]="symbol-type-parameter",u[25]="account",u[26]="issues",function(r){const i=u[r];let n=i&&S.iconRegistry.get(i);return n||(console.info("No codicon found for CompletionItemKind "+r),n=S.Codicon.symbolProperty),n.classNames}}(),e.completionKindFromString=function(){let u=Object.create(null);return u.method=0,u.function=1,u.constructor=2,u.field=3,u.variable=4,u.class=5,u.struct=6,u.interface=7,u.module=8,u.property=9,u.event=10,u.operator=11,u.unit=12,u.value=13,u.constant=14,u.enum=15,u["enum-member"]=16,u.enumMember=16,u.keyword=17,u.snippet=27,u.text=18,u.color=19,u.file=20,u.reference=21,u.customcolor=22,u.folder=23,u["type-parameter"]=24,u.typeParameter=24,u.account=25,u.issue=26,function(r,i){let n=u[r];return typeof n=="undefined"&&!i&&(n=9),n}}();var g;(function(u){u[u.Invoke=1]="Invoke",u[u.TriggerCharacter=2]="TriggerCharacter",u[u.ContentChange=3]="ContentChange"})(g=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var p;(function(u){u[u.Text=0]="Text",u[u.Read=1]="Read",u[u.Write=2]="Write"})(p=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));function c(u){return u&&b.URI.isUri(u.uri)&&N.Range.isIRange(u.range)&&(N.Range.isIRange(u.originSelectionRange)||N.Range.isIRange(u.targetSelectionRange))}e.isLocationLink=c;var o;(function(u){const r=new Map;r.set("file",0),r.set("module",1),r.set("namespace",2),r.set("package",3),r.set("class",4),r.set("method",5),r.set("property",6),r.set("field",7),r.set("constructor",8),r.set("enum",9),r.set("interface",10),r.set("function",11),r.set("variable",12),r.set("constant",13),r.set("string",14),r.set("number",15),r.set("boolean",16),r.set("array",17),r.set("object",18),r.set("key",19),r.set("null",20),r.set("enum-member",21),r.set("struct",22),r.set("event",23),r.set("operator",24),r.set("type-parameter",25);const i=new Map;i.set(0,"file"),i.set(1,"module"),i.set(2,"namespace"),i.set(3,"package"),i.set(4,"class"),i.set(5,"method"),i.set(6,"property"),i.set(7,"field"),i.set(8,"constructor"),i.set(9,"enum"),i.set(10,"interface"),i.set(11,"function"),i.set(12,"variable"),i.set(13,"constant"),i.set(14,"string"),i.set(15,"number"),i.set(16,"boolean"),i.set(17,"array"),i.set(18,"object"),i.set(19,"key"),i.set(20,"null"),i.set(21,"enum-member"),i.set(22,"struct"),i.set(23,"event"),i.set(24,"operator"),i.set(25,"type-parameter");function n(h){return r.get(h)}u.fromString=n;function t(h){return i.get(h)}u.toString=t;function l(h,m){const _=i.get(h);let f=_&&S.iconRegistry.get("symbol-"+_);return f||(console.info("No codicon found for SymbolKind "+h),f=S.Codicon.symbolProperty),`${m?"inline":"block"} ${f.classNames}`}u.toCssClassName=l})(o=e.SymbolKinds||(e.SymbolKinds={}));class s{constructor(r){this.value=r}}e.FoldingRangeKind=s,s.Comment=new s("comment"),s.Imports=new s("imports"),s.Region=new s("region");var a;(function(u){u[u.Other=0]="Other",u[u.Type=1]="Type",u[u.Parameter=2]="Parameter"})(a=e.InlineHintKind||(e.InlineHintKind={})),e.ReferenceProviderRegistry=new M.LanguageFeatureRegistry,e.RenameProviderRegistry=new M.LanguageFeatureRegistry,e.CompletionProviderRegistry=new M.LanguageFeatureRegistry,e.SignatureHelpProviderRegistry=new M.LanguageFeatureRegistry,e.HoverProviderRegistry=new M.LanguageFeatureRegistry,e.DocumentSymbolProviderRegistry=new M.LanguageFeatureRegistry,e.DocumentHighlightProviderRegistry=new M.LanguageFeatureRegistry,e.LinkedEditingRangeProviderRegistry=new M.LanguageFeatureRegistry,e.DefinitionProviderRegistry=new M.LanguageFeatureRegistry,e.DeclarationProviderRegistry=new M.LanguageFeatureRegistry,e.ImplementationProviderRegistry=new M.LanguageFeatureRegistry,e.TypeDefinitionProviderRegistry=new M.LanguageFeatureRegistry,e.CodeLensProviderRegistry=new M.LanguageFeatureRegistry,e.InlineHintsProviderRegistry=new M.LanguageFeatureRegistry,e.CodeActionProviderRegistry=new M.LanguageFeatureRegistry,e.DocumentFormattingEditProviderRegistry=new M.LanguageFeatureRegistry,e.DocumentRangeFormattingEditProviderRegistry=new M.LanguageFeatureRegistry,e.OnTypeFormattingEditProviderRegistry=new M.LanguageFeatureRegistry,e.LinkProviderRegistry=new M.LanguageFeatureRegistry,e.ColorProviderRegistry=new M.LanguageFeatureRegistry,e.SelectionRangeRegistry=new M.LanguageFeatureRegistry,e.FoldingRangeProviderRegistry=new M.LanguageFeatureRegistry,e.DocumentSemanticTokensProviderRegistry=new M.LanguageFeatureRegistry,e.DocumentRangeSemanticTokensProviderRegistry=new M.LanguageFeatureRegistry,e.TokenizationRegistry=new w.TokenizationRegistryImpl}),define(Q[113],J([0,1,18]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlicedLineTokens=e.LineTokens=void 0;class N{constructor(S,C){this._tokens=S,this._tokensCount=this._tokens.length>>>1,this._text=C}equals(S){return S instanceof N?this.slicedEquals(S,0,this._tokensCount):!1}slicedEquals(S,C,d){if(this._text!==S._text||this._tokensCount!==S._tokensCount)return!1;const g=C<<1,p=g+(d<<1);for(let c=g;c<p;c++)if(this._tokens[c]!==S._tokens[c])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(S){return S>0?this._tokens[S-1<<1]:0}getMetadata(S){return this._tokens[(S<<1)+1]}getLanguageId(S){const C=this._tokens[(S<<1)+1];return b.TokenMetadata.getLanguageId(C)}getStandardTokenType(S){const C=this._tokens[(S<<1)+1];return b.TokenMetadata.getTokenType(C)}getForeground(S){const C=this._tokens[(S<<1)+1];return b.TokenMetadata.getForeground(C)}getClassName(S){const C=this._tokens[(S<<1)+1];return b.TokenMetadata.getClassNameFromMetadata(C)}getInlineStyle(S,C){const d=this._tokens[(S<<1)+1];return b.TokenMetadata.getInlineStyleFromMetadata(d,C)}getEndOffset(S){return this._tokens[S<<1]}findTokenIndexAtOffset(S){return N.findIndexInTokensArray(this._tokens,S)}inflate(){return this}sliceAndInflate(S,C,d){return new M(this,S,C,d)}static convertToEndOffset(S,C){const g=(S.length>>>1)-1;for(let p=0;p<g;p++)S[p<<1]=S[p+1<<1];S[g<<1]=C}static findIndexInTokensArray(S,C){if(S.length<=2)return 0;let d=0,g=(S.length>>>1)-1;for(;d<g;){const p=d+Math.floor((g-d)/2),c=S[p<<1];if(c===C)return p+1;c<C?d=p+1:c>C&&(g=p)}return d}}e.LineTokens=N;class M{constructor(S,C,d,g){this._source=S,this._startOffset=C,this._endOffset=d,this._deltaOffset=g,this._firstTokenIndex=S.findTokenIndexAtOffset(C),this._tokensCount=0;for(let p=this._firstTokenIndex,c=S.getCount();p<c&&!(S.getStartOffset(p)>=d);p++)this._tokensCount++}equals(S){return S instanceof M?this._startOffset===S._startOffset&&this._endOffset===S._endOffset&&this._deltaOffset===S._deltaOffset&&this._source.slicedEquals(S._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(S){return this._source.getForeground(this._firstTokenIndex+S)}getEndOffset(S){const C=this._source.getEndOffset(this._firstTokenIndex+S);return Math.min(this._endOffset,C)-this._startOffset+this._deltaOffset}getClassName(S){return this._source.getClassName(this._firstTokenIndex+S)}getInlineStyle(S,C){return this._source.getInlineStyle(this._firstTokenIndex+S,C)}findTokenIndexAtOffset(S){return this._source.findTokenIndexAtOffset(S+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}e.SlicedLineTokens=M}),define(Q[135],J([0,1,19,113,14,3,18]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokensStore=e.TokensStore2=e.MultilineTokens=e.MultilineTokens2=e.LineTokens2=e.SparseEncodedTokens=e.MultilineTokensBuilder=e.countEOL=void 0;function C(n){let t=0,l=0,h=0,m=0;for(let _=0,f=n.length;_<f;_++){const v=n.charCodeAt(_);v===13?(t===0&&(l=_),t++,_+1<f&&n.charCodeAt(_+1)===10?(m|=2,_++):m|=3,h=_+1):v===10&&(m|=1,t===0&&(l=_),t++,h=_+1)}return t===0&&(l=n.length),[t,l,n.length-h,m]}e.countEOL=C;function d(n){return(n<<0|0<<8|0<<11|1<<14|2<<23)>>>0}const g=new Uint32Array(0).buffer;class p{constructor(){this.tokens=[]}add(t,l){if(this.tokens.length>0){const h=this.tokens[this.tokens.length-1];if(h.startLineNumber+h.tokens.length-1+1===t){h.tokens.push(l);return}}this.tokens.push(new a(t,[l]))}}e.MultilineTokensBuilder=p;class c{constructor(t){this._tokens=t,this._tokenCount=t.length/4}toString(t){let l=[];for(let h=0;h<this._tokenCount;h++)l.push(`(${this._getDeltaLine(h)+t},${this._getStartCharacter(h)}-${this._getEndCharacter(h)})`);return`[${l.join(",")}]`}getMaxDeltaLine(){const t=this._getTokenCount();return t===0?-1:this._getDeltaLine(t-1)}getRange(){const t=this._getTokenCount();if(t===0)return null;const l=this._getStartCharacter(0),h=this._getDeltaLine(t-1),m=this._getEndCharacter(t-1);return new w.Range(0,l+1,h,m+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(t){return this._tokens[4*t]}_getStartCharacter(t){return this._tokens[4*t+1]}_getEndCharacter(t){return this._tokens[4*t+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(t){let l=0,h=this._getTokenCount()-1;for(;l<h;){const m=l+Math.floor((h-l)/2),_=this._getDeltaLine(m);if(_<t)l=m+1;else if(_>t)h=m-1;else{let f=m;for(;f>l&&this._getDeltaLine(f-1)===t;)f--;let v=m;for(;v<h&&this._getDeltaLine(v+1)===t;)v++;return new o(this._tokens.subarray(4*f,4*v+4))}}return this._getDeltaLine(l)===t?new o(this._tokens.subarray(4*l,4*l+4)):null}clear(){this._tokenCount=0}removeTokens(t,l,h,m){const _=this._tokens,f=this._tokenCount;let v=0,y=!1,L=0;for(let I=0;I<f;I++){const k=4*I,E=_[k],T=_[k+1],O=_[k+2],A=_[k+3];if((E>t||E===t&&O>=l)&&(E<h||E===h&&T<=m))y=!0;else{if(v===0&&(L=E),y){const B=4*v;_[B]=E-L,_[B+1]=T,_[B+2]=O,_[B+3]=A}v++}}return this._tokenCount=v,L}split(t,l,h,m){const _=this._tokens,f=this._tokenCount;let v=[],y=[],L=v,I=0,k=0;for(let E=0;E<f;E++){const T=4*E,O=_[T],A=_[T+1],B=_[T+2],F=_[T+3];if(O>t||O===t&&B>=l){if(O<h||O===h&&A<=m)continue;L!==y&&(L=y,I=0,k=O)}L[I++]=O-k,L[I++]=A,L[I++]=B,L[I++]=F}return[new c(new Uint32Array(v)),new c(new Uint32Array(y)),k]}acceptDeleteRange(t,l,h,m,_){const f=this._tokens,v=this._tokenCount,y=m-l;let L=0,I=!1;for(let k=0;k<v;k++){const E=4*k;let T=f[E],O=f[E+1],A=f[E+2];const B=f[E+3];if(T<l||T===l&&A<=h){L++;continue}else if(T===l&&O<h)T===m&&A>_?A-=_-h:A=h;else if(T===l&&O===h)if(T===m&&A>_)A-=_-h;else{I=!0;continue}else if(T<m||T===m&&O<_)if(T===m&&A>_)T===l?(O=h,A=O+(A-_)):(O=0,A=O+(A-_));else{I=!0;continue}else if(T>m){if(y===0&&!I){L=v;break}T-=y}else if(T===m&&O>=_)t&&T===0&&(O+=t,A+=t),T-=y,O-=_-h,A-=_-h;else throw new Error("Not possible!");const F=4*L;f[F]=T,f[F+1]=O,f[F+2]=A,f[F+3]=B,L++}this._tokenCount=L}acceptInsertText(t,l,h,m,_,f){const v=h===0&&m===1&&(f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122),y=this._tokens,L=this._tokenCount;for(let I=0;I<L;I++){const k=4*I;let E=y[k],T=y[k+1],O=y[k+2];if(!(E<t||E===t&&O<l)){if(E===t&&O===l)if(v)O+=1;else continue;else if(E===t&&T<l&&l<O)h===0?O+=m:O=l;else{if(E===t&&T===l&&v)continue;if(E===t)if(E+=h,h===0)T+=m,O+=m;else{const A=O-T;T=_+(T-l),O=T+A}else E+=h}y[k]=E,y[k+1]=T,y[k+2]=O}}}}e.SparseEncodedTokens=c;class o{constructor(t){this._tokens=t}getCount(){return this._tokens.length/4}getStartCharacter(t){return this._tokens[4*t+1]}getEndCharacter(t){return this._tokens[4*t+2]}getMetadata(t){return this._tokens[4*t+3]}}e.LineTokens2=o;class s{constructor(t,l){this.startLineNumber=t,this.tokens=l,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}toString(){return this.tokens.toString(this.startLineNumber)}_updateEndLineNumber(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}isEmpty(){return this.tokens.isEmpty()}getLineTokens(t){return this.startLineNumber<=t&&t<=this.endLineNumber?this.tokens.getLineTokens(t-this.startLineNumber):null}getRange(){const t=this.tokens.getRange();return t&&new w.Range(this.startLineNumber+t.startLineNumber,t.startColumn,this.startLineNumber+t.endLineNumber,t.endColumn)}removeTokens(t){const l=t.startLineNumber-this.startLineNumber,h=t.endLineNumber-this.startLineNumber;this.startLineNumber+=this.tokens.removeTokens(l,t.startColumn-1,h,t.endColumn-1),this._updateEndLineNumber()}split(t){const l=t.startLineNumber-this.startLineNumber,h=t.endLineNumber-this.startLineNumber,[m,_,f]=this.tokens.split(l,t.startColumn-1,h,t.endColumn-1);return[new s(this.startLineNumber,m),new s(this.startLineNumber+f,_)]}applyEdit(t,l){const[h,m,_]=C(l);this.acceptEdit(t,h,m,_,l.length>0?l.charCodeAt(0):0)}acceptEdit(t,l,h,m,_){this._acceptDeleteRange(t),this._acceptInsertText(new M.Position(t.startLineNumber,t.startColumn),l,h,m,_),this._updateEndLineNumber()}_acceptDeleteRange(t){if(!(t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn)){const l=t.startLineNumber-this.startLineNumber,h=t.endLineNumber-this.startLineNumber;if(h<0){const _=h-l;this.startLineNumber-=_;return}const m=this.tokens.getMaxDeltaLine();if(!(l>=m+1)){if(l<0&&h>=m+1){this.startLineNumber=0,this.tokens.clear();return}if(l<0){const _=-l;this.startLineNumber-=_,this.tokens.acceptDeleteRange(t.startColumn-1,0,0,h,t.endColumn-1)}else this.tokens.acceptDeleteRange(0,l,t.startColumn-1,h,t.endColumn-1)}}}_acceptInsertText(t,l,h,m,_){if(!(l===0&&h===0)){const f=t.lineNumber-this.startLineNumber;if(f<0){this.startLineNumber+=l;return}const v=this.tokens.getMaxDeltaLine();f>=v+1||this.tokens.acceptInsertText(f,t.column-1,l,h,m,_)}}}e.MultilineTokens2=s;class a{constructor(t,l){this.startLineNumber=t,this.tokens=l}}e.MultilineTokens=a;function u(n){return n instanceof Uint32Array?n:new Uint32Array(n)}class r{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(t,l){this._pieces=t||[],this._isComplete=l}setPartial(t,l){let h=t;if(l.length>0){const _=l[0].getRange(),f=l[l.length-1].getRange();if(!_||!f)return t;h=t.plusRange(_).plusRange(f)}let m=null;for(let _=0,f=this._pieces.length;_<f;_++){const v=this._pieces[_];if(!(v.endLineNumber<h.startLineNumber)){if(v.startLineNumber>h.endLineNumber){m=m||{index:_};break}if(v.removeTokens(h),v.isEmpty()){this._pieces.splice(_,1),_--,f--;continue}if(!(v.endLineNumber<h.startLineNumber)){if(v.startLineNumber>h.endLineNumber){m=m||{index:_};continue}const[y,L]=v.split(h);if(y.isEmpty()){m=m||{index:_};continue}L.isEmpty()||(this._pieces.splice(_,1,y,L),_++,f++,m=m||{index:_})}}}return m=m||{index:this._pieces.length},l.length>0&&(this._pieces=b.arrayInsert(this._pieces,m.index,l)),h}isComplete(){return this._isComplete}addSemanticTokens(t,l){const h=this._pieces;if(h.length===0)return l;const m=r._findFirstPieceWithLine(h,t),_=h[m].getLineTokens(t);if(!_)return l;const f=l.getCount(),v=_.getCount();let y=0,L=[],I=0,k=0;const E=(T,O)=>{T!==k&&(k=T,L[I++]=T,L[I++]=O)};for(let T=0;T<v;T++){const O=_.getStartCharacter(T),A=_.getEndCharacter(T),B=_.getMetadata(T),F=((B&1?2048:0)|(B&2?4096:0)|(B&4?8192:0)|(B&8?8372224:0)|(B&16?4286578688:0))>>>0,D=~F>>>0;for(;y<f&&l.getEndOffset(y)<=O;)E(l.getEndOffset(y),l.getMetadata(y)),y++;for(y<f&&l.getStartOffset(y)<O&&E(O,l.getMetadata(y));y<f&&l.getEndOffset(y)<A;)E(l.getEndOffset(y),l.getMetadata(y)&D|B&F),y++;if(y<f)E(A,l.getMetadata(y)&D|B&F),l.getEndOffset(y)===A&&y++;else{const R=Math.min(Math.max(0,y-1),f-1);E(A,l.getMetadata(R)&D|B&F)}}for(;y<f;)E(l.getEndOffset(y),l.getMetadata(y)),y++;return new N.LineTokens(new Uint32Array(L),l.getLineContent())}static _findFirstPieceWithLine(t,l){let h=0,m=t.length-1;for(;h<m;){let _=h+Math.floor((m-h)/2);if(t[_].endLineNumber<l)h=_+1;else if(t[_].startLineNumber>l)m=_-1;else{for(;_>h&&t[_-1].startLineNumber<=l&&l<=t[_-1].endLineNumber;)_--;return _}}return h}acceptEdit(t,l,h,m,_){for(const f of this._pieces)f.acceptEdit(t,l,h,m,_)}}e.TokensStore2=r;class i{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(t,l,h){let m=null;if(l<this._len&&(m=this._lineTokens[l]),m!==null&&m!==g)return new N.LineTokens(u(m),h);let _=new Uint32Array(2);return _[0]=h.length,_[1]=d(t),new N.LineTokens(_,h)}static _massageTokens(t,l,h){const m=h?u(h):null;if(l===0){let _=!1;if(m&&m.length>1&&(_=S.TokenMetadata.getLanguageId(m[1])!==t),!_)return g}if(!m||m.length===0){const _=new Uint32Array(2);return _[0]=l,_[1]=d(t),_.buffer}return m[m.length-2]=l,m.byteOffset===0&&m.byteLength===m.buffer.byteLength?m.buffer:m}_ensureLine(t){for(;t>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(t,l){l!==0&&(t+l>this._len&&(l=this._len-t),this._lineTokens.splice(t,l),this._len-=l)}_insertLines(t,l){if(l!==0){let h=[];for(let m=0;m<l;m++)h[m]=null;this._lineTokens=b.arrayInsert(this._lineTokens,t,h),this._len+=l}}setTokens(t,l,h,m,_){const f=i._massageTokens(t,h,m);this._ensureLine(l);const v=this._lineTokens[l];return this._lineTokens[l]=f,_?!i._equals(v,f):!1}static _equals(t,l){if(!t||!l)return!t&&!l;const h=u(t),m=u(l);if(h.length!==m.length)return!1;for(let _=0,f=h.length;_<f;_++)if(h[_]!==m[_])return!1;return!0}acceptEdit(t,l,h){this._acceptDeleteRange(t),this._acceptInsertText(new M.Position(t.startLineNumber,t.startColumn),l,h)}_acceptDeleteRange(t){const l=t.startLineNumber-1;if(!(l>=this._len)){if(t.startLineNumber===t.endLineNumber){if(t.startColumn===t.endColumn)return;this._lineTokens[l]=i._delete(this._lineTokens[l],t.startColumn-1,t.endColumn-1);return}this._lineTokens[l]=i._deleteEnding(this._lineTokens[l],t.startColumn-1);const h=t.endLineNumber-1;let m=null;h<this._len&&(m=i._deleteBeginning(this._lineTokens[h],t.endColumn-1)),this._lineTokens[l]=i._append(this._lineTokens[l],m),this._deleteLines(t.startLineNumber,t.endLineNumber-t.startLineNumber)}}_acceptInsertText(t,l,h){if(!(l===0&&h===0)){const m=t.lineNumber-1;if(!(m>=this._len)){if(l===0){this._lineTokens[m]=i._insert(this._lineTokens[m],t.column-1,h);return}this._lineTokens[m]=i._deleteEnding(this._lineTokens[m],t.column-1),this._lineTokens[m]=i._insert(this._lineTokens[m],t.column-1,h),this._insertLines(t.lineNumber,l)}}}static _deleteBeginning(t,l){return t===null||t===g?t:i._delete(t,0,l)}static _deleteEnding(t,l){if(t===null||t===g)return t;const h=u(t),m=h[h.length-2];return i._delete(t,l,m)}static _delete(t,l,h){if(t===null||t===g||l===h)return t;const m=u(t),_=m.length>>>1;if(l===0&&m[m.length-2]===h)return g;const f=N.LineTokens.findIndexInTokensArray(m,l),v=f>0?m[f-1<<1]:0,y=m[f<<1];if(h<y){const T=h-l;for(let O=f;O<_;O++)m[O<<1]-=T;return t}let L,I;v!==l?(m[f<<1]=l,L=f+1<<1,I=l):(L=f<<1,I=v);const k=h-l;for(let T=f+1;T<_;T++){const O=m[T<<1]-k;O>I&&(m[L++]=O,m[L++]=m[(T<<1)+1],I=O)}if(L===m.length)return t;let E=new Uint32Array(L);return E.set(m.subarray(0,L),0),E.buffer}static _append(t,l){if(l===g)return t;if(t===g)return l;if(t===null)return t;if(l===null)return null;const h=u(t),m=u(l),_=m.length>>>1;let f=new Uint32Array(h.length+m.length);f.set(h,0);let v=h.length;const y=h[h.length-2];for(let L=0;L<_;L++)f[v++]=m[L<<1]+y,f[v++]=m[(L<<1)+1];return f.buffer}static _insert(t,l,h){if(t===null||t===g)return t;const m=u(t),_=m.length>>>1;let f=N.LineTokens.findIndexInTokensArray(m,l);f>0&&m[f-1<<1]===l&&f--;for(let v=f;v<_;v++)m[v<<1]+=h;return t}}e.TokensStore=i}),define(Q[239],J([0,1,6,8,3,53,219,135,218,2]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class p extends g.Disposable{constructor(o,s,a,u,r,i,n){super();this._onDidChangeContent=this._register(new b.Emitter),this._BOM=s,this._mightContainNonBasicASCII=!i,this._mightContainRTL=u,this._mightContainUnusualLineTerminators=r,this._pieceTree=new S.PieceTreeBase(o,a,n)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(o){return this._pieceTree.createSnapshot(o?this._BOM:"")}getOffsetAt(o,s){return this._pieceTree.getOffsetAt(o,s)}getPositionAt(o){return this._pieceTree.getPositionAt(o)}getRangeAt(o,s){let a=o+s;const u=this.getPositionAt(o),r=this.getPositionAt(a);return new M.Range(u.lineNumber,u.column,r.lineNumber,r.column)}getValueInRange(o,s=0){if(o.isEmpty())return"";const a=this._getEndOfLine(s);return this._pieceTree.getValueInRange(o,a)}getValueLengthInRange(o,s=0){if(o.isEmpty())return 0;if(o.startLineNumber===o.endLineNumber)return o.endColumn-o.startColumn;let a=this.getOffsetAt(o.startLineNumber,o.startColumn);return this.getOffsetAt(o.endLineNumber,o.endColumn)-a}getCharacterCountInRange(o,s=0){if(this._mightContainNonBasicASCII){let a=0;const u=o.startLineNumber,r=o.endLineNumber;for(let i=u;i<=r;i++){const n=this.getLineContent(i),t=i===u?o.startColumn-1:0,l=i===r?o.endColumn-1:n.length;for(let h=t;h<l;h++)N.isHighSurrogate(n.charCodeAt(h))?(a=a+1,h=h+1):a=a+1}return a+=this._getEndOfLine(s).length*(r-u),a}return this.getValueLengthInRange(o,s)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(o){return this._pieceTree.getLineContent(o)}getLineCharCode(o,s){return this._pieceTree.getLineCharCode(o,s)}getLineLength(o){return this._pieceTree.getLineLength(o)}getLineFirstNonWhitespaceColumn(o){const s=N.firstNonWhitespaceIndex(this.getLineContent(o));return s===-1?0:s+1}getLineLastNonWhitespaceColumn(o){const s=N.lastNonWhitespaceIndex(this.getLineContent(o));return s===-1?0:s+2}_getEndOfLine(o){switch(o){case 1:return`
`;case 2:return`\r
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(o){this._pieceTree.setEOL(o)}applyEdits(o,s,a){let u=this._mightContainRTL,r=this._mightContainUnusualLineTerminators,i=this._mightContainNonBasicASCII,n=!0,t=[];for(let y=0;y<o.length;y++){let L=o[y];n&&L._isTracked&&(n=!1);let I=L.range;if(L.text){let A=!0;i||(A=!N.isBasicASCII(L.text),i=A),!u&&A&&(u=N.containsRTL(L.text)),!r&&A&&(r=N.containsUnusualLineTerminators(L.text))}let k="",E=0,T=0,O=0;if(L.text){let A;[E,T,O,A]=C.countEOL(L.text);const B=this.getEOL();A===0||A===(B===`\r
`?2:1)?k=L.text:k=L.text.replace(/\r\n|\r|\n/g,B)}t[y]={sortIndex:y,identifier:L.identifier||null,range:I,rangeOffset:this.getOffsetAt(I.startLineNumber,I.startColumn),rangeLength:this.getValueLengthInRange(I),text:k,eolCount:E,firstLineLength:T,lastLineLength:O,forceMoveMarkers:Boolean(L.forceMoveMarkers),isAutoWhitespaceEdit:L.isAutoWhitespaceEdit||!1}}t.sort(p._sortOpsAscending);let l=!1;for(let y=0,L=t.length-1;y<L;y++){let I=t[y].range.getEndPosition(),k=t[y+1].range.getStartPosition();if(k.isBeforeOrEqual(I)){if(k.isBefore(I))throw new Error("Overlapping ranges are not allowed!");l=!0}}n&&(t=this._reduceOperations(t));let h=a||s?p._getInverseEditRanges(t):[],m=[];if(s)for(let y=0;y<t.length;y++){let L=t[y],I=h[y];if(L.isAutoWhitespaceEdit&&L.range.isEmpty())for(let k=I.startLineNumber;k<=I.endLineNumber;k++){let E="";k===I.startLineNumber&&(E=this.getLineContent(L.range.startLineNumber),N.firstNonWhitespaceIndex(E)!==-1)||m.push({lineNumber:k,oldContent:E})}}let _=null;if(a){let y=0;_=[];for(let L=0;L<t.length;L++){const I=t[L],k=h[L],E=this.getValueInRange(I.range),T=I.rangeOffset+y;y+=I.text.length-E.length,_[L]={sortIndex:I.sortIndex,identifier:I.identifier,range:k,text:E,textChange:new d.TextChange(I.rangeOffset,E,T,I.text)}}l||_.sort((L,I)=>L.sortIndex-I.sortIndex)}this._mightContainRTL=u,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=i;const f=this._doApplyEdits(t);let v=null;if(s&&m.length>0){m.sort((y,L)=>L.lineNumber-y.lineNumber),v=[];for(let y=0,L=m.length;y<L;y++){let I=m[y].lineNumber;if(!(y>0&&m[y-1].lineNumber===I)){let k=m[y].oldContent,E=this.getLineContent(I);E.length===0||E===k||N.firstNonWhitespaceIndex(E)!==-1||v.push(I)}}}return this._onDidChangeContent.fire(),new w.ApplyEditsResult(_,f,v)}_reduceOperations(o){return o.length<1e3?o:[this._toSingleEditOperation(o)]}_toSingleEditOperation(o){let s=!1;const a=o[0].range,u=o[o.length-1].range,r=new M.Range(a.startLineNumber,a.startColumn,u.endLineNumber,u.endColumn);let i=a.startLineNumber,n=a.startColumn;const t=[];for(let f=0,v=o.length;f<v;f++){const y=o[f],L=y.range;s=s||y.forceMoveMarkers,t.push(this.getValueInRange(new M.Range(i,n,L.startLineNumber,L.startColumn))),y.text.length>0&&t.push(y.text),i=L.endLineNumber,n=L.endColumn}const l=t.join(""),[h,m,_]=C.countEOL(l);return{sortIndex:0,identifier:o[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:l,eolCount:h,firstLineLength:m,lastLineLength:_,forceMoveMarkers:s,isAutoWhitespaceEdit:!1}}_doApplyEdits(o){o.sort(p._sortOpsDescending);let s=[];for(let a=0;a<o.length;a++){let u=o[a];const r=u.range.startLineNumber,i=u.range.startColumn,n=u.range.endLineNumber,t=u.range.endColumn;if(!(r===n&&i===t&&u.text.length===0)){u.text?(this._pieceTree.delete(u.rangeOffset,u.rangeLength),this._pieceTree.insert(u.rangeOffset,u.text,!0)):this._pieceTree.delete(u.rangeOffset,u.rangeLength);const l=new M.Range(r,i,n,t);s.push({range:l,rangeLength:u.rangeLength,text:u.text,rangeOffset:u.rangeOffset,forceMoveMarkers:u.forceMoveMarkers})}}return s}findMatchesLineByLine(o,s,a,u){return this._pieceTree.findMatchesLineByLine(o,s,a,u)}static _getInverseEditRanges(o){let s=[],a=0,u=0,r=null;for(let i=0,n=o.length;i<n;i++){let t=o[i],l,h;r?r.range.endLineNumber===t.range.startLineNumber?(l=a,h=u+(t.range.startColumn-r.range.endColumn)):(l=a+(t.range.startLineNumber-r.range.endLineNumber),h=t.range.startColumn):(l=t.range.startLineNumber,h=t.range.startColumn);let m;if(t.text.length>0){const _=t.eolCount+1;_===1?m=new M.Range(l,h,l,h+t.firstLineLength):m=new M.Range(l,h,l+_-1,t.lastLineLength+1)}else m=new M.Range(l,h,l,h);a=m.endLineNumber,u=m.endColumn,s.push(m),r=t}return s}static _sortOpsAscending(o,s){let a=M.Range.compareRangesUsingEnds(o.range,s.range);return a===0?o.sortIndex-s.sortIndex:a}static _sortOpsDescending(o,s){let a=M.Range.compareRangesUsingEnds(o.range,s.range);return a===0?s.sortIndex-o.sortIndex:-a}}e.PieceTreeTextBuffer=p}),define(Q[534],J([0,1,8,219,239]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=e.PieceTreeTextBufferFactory=void 0;class w{constructor(d,g,p,c,o,s,a,u,r){this._chunks=d,this._bom=g,this._cr=p,this._lf=c,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=a,this._isBasicASCII=u,this._normalizeEOL=r}_getEOL(d){const g=this._cr+this._lf+this._crlf,p=this._cr+this._crlf;return g===0?d===1?`
`:`\r
`:p>g/2?`\r
`:`
`}create(d){const g=this._getEOL(d);let p=this._chunks;if(this._normalizeEOL&&(g===`\r
`&&(this._cr>0||this._lf>0)||g===`
`&&(this._cr>0||this._crlf>0)))for(let o=0,s=p.length;o<s;o++){let a=p[o].buffer.replace(/\r\n|\r|\n/g,g),u=N.createLineStartsFast(a);p[o]=new N.StringBuffer(a,u)}const c=new M.PieceTreeTextBuffer(p,this._bom,g,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:c,disposable:c}}}e.PieceTreeTextBufferFactory=w;class S{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(d){if(d.length!==0){this.chunks.length===0&&b.startsWithUTF8BOM(d)&&(this.BOM=b.UTF8_BOM_CHARACTER,d=d.substr(1));const g=d.charCodeAt(d.length-1);g===13||g>=55296&&g<=56319?(this._acceptChunk1(d.substr(0,d.length-1),!1),this._hasPreviousChar=!0,this._previousChar=g):(this._acceptChunk1(d,!1),this._hasPreviousChar=!1,this._previousChar=g)}}_acceptChunk1(d,g){!g&&d.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+d):this._acceptChunk2(d))}_acceptChunk2(d){const g=N.createLineStarts(this._tmpLineStarts,d);this.chunks.push(new N.StringBuffer(d,g.lineStarts)),this.cr+=g.cr,this.lf+=g.lf,this.crlf+=g.crlf,this.isBasicASCII&&(this.isBasicASCII=g.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=b.containsRTL(d)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=b.containsUnusualLineTerminators(d))}finish(d=!0){return this._finish(),new w(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,d)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let d=this.chunks[this.chunks.length-1];d.buffer+=String.fromCharCode(this._previousChar);let g=N.createLineStartsFast(d.buffer);d.lineStarts=g,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=S}),define(Q[76],J([0,1,127,18]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nullTokenize2=e.nullTokenize=e.NULL_LANGUAGE_IDENTIFIER=e.NULL_MODE_ID=e.NULL_STATE=void 0;class M{clone(){return this}equals(d){return this===d}}e.NULL_STATE=new M,e.NULL_MODE_ID="vs.editor.nullMode",e.NULL_LANGUAGE_IDENTIFIER=new N.LanguageIdentifier(e.NULL_MODE_ID,0);function w(C,d,g,p){return new b.TokenizationResult([new b.Token(p,"",C)],g)}e.nullTokenize=w;function S(C,d,g,p){let c=new Uint32Array(2);return c[0]=p,c[1]=(C<<0|0<<8|0<<11|1<<14|2<<23)>>>0,new b.TokenizationResult2(c,g===null?e.NULL_STATE:g)}e.nullTokenize2=S}),define(Q[535],J([0,1,19,12,113,14,18,76,2,81,135,17]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelTokenization=e.TokenizationStateStore=void 0;class o{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(i){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,i&&this._setBeginState(0,i)}flush(i){this._reset(i)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(i){i<this._len&&(this._valid[i]=!1),i<this._invalidLineStartIndex&&(this._invalidLineStartIndex=i)}_isValid(i){return i<this._len?this._valid[i]:!1}getBeginState(i){return i<this._len?this._beginState[i]:null}_ensureLine(i){for(;i>=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(i,n){n!==0&&(i+n>this._len&&(n=this._len-i),this._beginState.splice(i,n),this._valid.splice(i,n),this._len-=n)}_insertLines(i,n){if(n!==0){let t=[],l=[];for(let h=0;h<n;h++)t[h]=null,l[h]=!1;this._beginState=b.arrayInsert(this._beginState,i,t),this._valid=b.arrayInsert(this._valid,i,l),this._len+=n}}_setValid(i,n){this._ensureLine(i),this._valid[i]=n}_setBeginState(i,n){this._ensureLine(i),this._beginState[i]=n}setEndState(i,n,t){if(this._setValid(n,!0),this._invalidLineStartIndex=n+1,n!==i-1){const l=this.getBeginState(n+1);if(l===null||!t.equals(l)){this._setBeginState(n+1,t),this._invalidateLine(n+1);return}let h=n+1;for(;h<i&&this._isValid(h);)h++;this._invalidLineStartIndex=h}}setFakeTokens(i){this._setValid(i,!1)}applyEdits(i,n){const t=i.endLineNumber-i.startLineNumber,h=Math.min(t,n);for(let m=h;m>=0;m--)this._invalidateLine(i.startLineNumber+m-1);this._acceptDeleteRange(i),this._acceptInsertText(new w.Position(i.startLineNumber,i.startColumn),n)}_acceptDeleteRange(i){i.startLineNumber-1>=this._len||this._deleteLines(i.startLineNumber,i.endLineNumber-i.startLineNumber)}_acceptInsertText(i,n){i.lineNumber-1>=this._len||this._insertLines(i.lineNumber,n)}}e.TokenizationStateStore=o;class s extends d.Disposable{constructor(i){super();this._isDisposed=!1,this._textModel=i,this._tokenizationStateStore=new o,this._tokenizationSupport=null,this._register(S.TokenizationRegistry.onDidChange(n=>{const t=this._textModel.getLanguageIdentifier();n.changedLanguages.indexOf(t.language)!==-1&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeRawContentFast(n=>{if(n.containsEvent(1)){this._resetTokenizationState();return}})),this._register(this._textModel.onDidChangeContentFast(n=>{for(let t=0,l=n.changes.length;t<l;t++){const h=n.changes[t],[m]=p.countEOL(h.text);this._tokenizationStateStore.applyEdits(h.range,m)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[i,n]=a(this._textModel);this._tokenizationSupport=i,this._tokenizationStateStore.flush(n),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&c.setImmediate(()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(i=this._textModel.getLineCount()){const n=1,t=new p.MultilineTokensBuilder,l=g.StopWatch.create(!1);for(;this._hasLinesToTokenize()&&!(l.elapsed()>n||this._tokenizeOneInvalidLine(t)>=i););this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)}tokenizeViewport(i,n){const t=new p.MultilineTokensBuilder;this._tokenizeViewport(t,i,n),this._textModel.setTokens(t.tokens)}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(i){const n=new p.MultilineTokensBuilder;this._updateTokensUntilLine(n,i),this._textModel.setTokens(n.tokens)}isCheapToTokenize(i){if(!this._tokenizationSupport)return!0;const n=this._tokenizationStateStore.invalidLineStartIndex+1;return i>n?!1:i<n||this._textModel.getLineLength(i)<2048}_hasLinesToTokenize(){return this._tokenizationSupport?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(i){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const n=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(i,n),n}_updateTokensUntilLine(i,n){if(!!this._tokenizationSupport){const t=this._textModel.getLanguageIdentifier(),l=this._textModel.getLineCount(),h=n-1;for(let m=this._tokenizationStateStore.invalidLineStartIndex;m<=h;m++){const _=this._textModel.getLineContent(m+1),f=this._tokenizationStateStore.getBeginState(m),v=u(t,this._tokenizationSupport,_,!0,f);i.add(m+1,v.tokens),this._tokenizationStateStore.setEndState(l,m,v.endState),m=this._tokenizationStateStore.invalidLineStartIndex-1}}}_tokenizeViewport(i,n,t){if(!!this._tokenizationSupport&&!(t<=this._tokenizationStateStore.invalidLineStartIndex)){if(n<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(i,t);return}let l=this._textModel.getLineFirstNonWhitespaceColumn(n),h=[],m=null;for(let v=n-1;l>0&&v>=1;v--){let y=this._textModel.getLineFirstNonWhitespaceColumn(v);if(y!==0&&y<l){if(m=this._tokenizationStateStore.getBeginState(v-1),m)break;h.push(this._textModel.getLineContent(v)),l=y}}m||(m=this._tokenizationSupport.getInitialState());const _=this._textModel.getLanguageIdentifier();let f=m;for(let v=h.length-1;v>=0;v--)f=u(_,this._tokenizationSupport,h[v],!1,f).endState;for(let v=n;v<=t;v++){let y=this._textModel.getLineContent(v),L=u(_,this._tokenizationSupport,y,!0,f);i.add(v,L.tokens),this._tokenizationStateStore.setFakeTokens(v-1),f=L.endState}}}}e.TextModelTokenization=s;function a(r){const i=r.getLanguageIdentifier();let n=r.isTooLargeForTokenization()?null:S.TokenizationRegistry.get(i.language),t=null;if(n)try{t=n.getInitialState()}catch(l){N.onUnexpectedError(l),n=null}return[n,t]}function u(r,i,n,t,l){let h=null;if(i)try{h=i.tokenize2(n,t,l.clone(),0)}catch(m){N.onUnexpectedError(m)}return h||(h=C.nullTokenize2(r.id,n,l,0)),M.LineTokens.convertToEndOffset(h.tokens,n.length),h}}),define(Q[31],J([0,1,12,6,2,8,24,38,14,3,21,53,236,369,370,534,372,166,535,128,41,76,167,168,135,29,239]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeContentEmitter=e.DidChangeDecorationsEmitter=e.ModelDecorationOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.LONG_LINE_BOUNDARY=e.createTextBuffer=e.createTextBufferFactory=void 0;function L(){return new u.PieceTreeTextBufferBuilder}function I(z){const P=L();return P.acceptChunk(z),P.finish()}e.createTextBufferFactory=I;function k(z,P){return(typeof z=="string"?I(z):z).create(P)}e.createTextBuffer=k;let E=0;const T=999;e.LONG_LINE_BOUNDARY=1e4;class O{constructor(P){this._source=P,this._eos=!1}read(){if(this._eos)return null;let P=[],V=0,U=0;do{let H=this._source.read();if(H===null)return this._eos=!0,V===0?null:P.join("");if(H.length>0&&(P[V++]=H,U+=H.length),U>=64*1024)return P.join("")}while(!0)}}const A=()=>{throw new Error("Invalid change accessor")};class B{constructor(){this._searchCanceledBrand=void 0}}B.INSTANCE=new B;function F(z){return z instanceof B?null:z}class D extends M.Disposable{constructor(P,V,U,H=null,$){super();this._onWillDispose=this._register(new N.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new le),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new N.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new N.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new N.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new N.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new N.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._eventEmitter=this._register(new X),E++,this.id="$model"+E,this.isForSimpleWidget=V.isForSimpleWidget,typeof H=="undefined"||H===null?this._associatedResource=S.URI.parse("inmemory://model/"+E):this._associatedResource=H,this._undoRedoService=$,this._attachedEditorCount=0;const{textBuffer:ie,disposable:oe}=k(P,V.defaultEOL);this._buffer=ie,this._bufferDisposable=oe,this._options=D.resolveOptions(this._buffer,V);const ae=this._buffer.getLineCount(),G=this._buffer.getValueLengthInRange(new g.Range(1,1,ae,this._buffer.getLineLength(ae)+1),0);V.largeFileOptimizations?this._isTooLargeForTokenization=G>D.LARGE_FILE_SIZE_THRESHOLD||ae>D.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=G>D.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=U||h.NULL_LANGUAGE_IDENTIFIER,this._languageRegistryListener=l.LanguageConfigurationRegistry.onDidChange(j=>{j.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=w.singleLetterHash(E),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new R,this._commandManager=new o.EditStack(this,$),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new f.TokensStore,this._tokens2=new f.TokensStore2,this._tokenization=new n.TextModelTokenization(this)}static resolveOptions(P,V){if(V.detectIndentation){const U=s.guessIndentation(P,V.tabSize,V.insertSpaces);return new c.TextModelResolvedOptions({tabSize:U.tabSize,indentSize:U.tabSize,insertSpaces:U.insertSpaces,trimAutoWhitespace:V.trimAutoWhitespace,defaultEOL:V.defaultEOL})}return new c.TextModelResolvedOptions({tabSize:V.tabSize,indentSize:V.indentSize,insertSpaces:V.insertSpaces,trimAutoWhitespace:V.trimAutoWhitespace,defaultEOL:V.defaultEOL})}onDidChangeRawContentFast(P){return this._eventEmitter.fastEvent(V=>P(V.rawContentChangedEvent))}onDidChangeContentFast(P){return this._eventEmitter.fastEvent(V=>P(V.contentChangedEvent))}onDidChangeContent(P){return this._eventEmitter.slowEvent(V=>P(V.contentChangedEvent))}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const P=new y.PieceTreeTextBuffer([],"",`
`,!1,!1,!0,!0);P.dispose(),this._buffer=P}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(P,V){this._isDisposing||this._eventEmitter.fire(new r.InternalModelContentChangeEvent(P,V))}setValue(P){if(this._assertNotDisposed(),P!==null){const{textBuffer:V,disposable:U}=k(P,this._options.defaultEOL);this._setValueFromTextBuffer(V,U)}}_createContentChanged2(P,V,U,H,$,ie,oe){return{changes:[{range:P,rangeOffset:V,rangeLength:U,text:H}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:$,isRedoing:ie,isFlush:oe}}_setValueFromTextBuffer(P,V){this._assertNotDisposed();const U=this.getFullModelRange(),H=this.getValueLengthInRange(U),$=this.getLineCount(),ie=this.getLineMaxColumn($);this._buffer=P,this._bufferDisposable.dispose(),this._bufferDisposable=V,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new R,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new r.ModelRawContentChangedEvent([new r.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new g.Range(1,1,$,ie),0,H,this.getValue(),!1,!1,!0))}setEOL(P){this._assertNotDisposed();const V=P===1?`\r
`:`
`;if(this._buffer.getEOL()!==V){const U=this.getFullModelRange(),H=this.getValueLengthInRange(U),$=this.getLineCount(),ie=this.getLineMaxColumn($);this._onBeforeEOLChange(),this._buffer.setEOL(V),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new r.ModelRawContentChangedEvent([new r.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new g.Range(1,1,$,ie),0,H,this.getValue(),!1,!1,!1))}}_onBeforeEOLChange(){const P=this.getVersionId(),V=this._decorationsTree.search(0,!1,!1,P);this._ensureNodesHaveRanges(V)}_onAfterEOLChange(){const P=this.getVersionId(),V=this._decorationsTree.collectNodesPostOrder();for(let U=0,H=V.length;U<H;U++){const $=V[U],ie=$.cachedAbsoluteStart-$.start,oe=this._buffer.getOffsetAt($.range.startLineNumber,$.range.startColumn),ae=this._buffer.getOffsetAt($.range.endLineNumber,$.range.endColumn);$.cachedAbsoluteStart=oe,$.cachedAbsoluteEnd=ae,$.cachedVersionId=P,$.start=oe-ie,$.end=ae-ie,a.recomputeMaxEnd($)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let P=0,V=0;const U=this._buffer.getLineCount();for(let H=1;H<=U;H++){const $=this._buffer.getLineLength(H);$>=e.LONG_LINE_BOUNDARY?V+=$:P+=$}return V>P}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(P){this._assertNotDisposed();let V=typeof P.tabSize!="undefined"?P.tabSize:this._options.tabSize,U=typeof P.indentSize!="undefined"?P.indentSize:this._options.indentSize,H=typeof P.insertSpaces!="undefined"?P.insertSpaces:this._options.insertSpaces,$=typeof P.trimAutoWhitespace!="undefined"?P.trimAutoWhitespace:this._options.trimAutoWhitespace,ie=new c.TextModelResolvedOptions({tabSize:V,indentSize:U,insertSpaces:H,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:$});if(!this._options.equals(ie)){let oe=this._options.createChangeEvent(ie);this._options=ie,this._onDidChangeOptions.fire(oe)}}detectIndentation(P,V){this._assertNotDisposed();let U=s.guessIndentation(this._buffer,V,P);this.updateOptions({insertSpaces:U.insertSpaces,tabSize:U.tabSize,indentSize:U.tabSize})}static _normalizeIndentationFromWhitespace(P,V,U){let H=0;for(let ie=0;ie<P.length;ie++)P.charAt(ie)===" "?H+=V:H++;let $="";if(!U){let ie=Math.floor(H/V);H=H%V;for(let oe=0;oe<ie;oe++)$+=" "}for(let ie=0;ie<H;ie++)$+=" ";return $}static normalizeIndentation(P,V,U){let H=w.firstNonWhitespaceIndex(P);return H===-1&&(H=P.length),D._normalizeIndentationFromWhitespace(P.substring(0,H),V,U)+P.substring(H)}normalizeIndentation(P){return this._assertNotDisposed(),D.normalizeIndentation(P,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(P=null){const V=this.findMatches(w.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(P,V.map(U=>({range:U.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(P){this._assertNotDisposed();let V=this._validatePosition(P.lineNumber,P.column,0);return this._buffer.getOffsetAt(V.lineNumber,V.column)}getPositionAt(P){this._assertNotDisposed();let V=Math.min(this._buffer.getLength(),Math.max(0,P));return this._buffer.getPositionAt(V)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(P){this._versionId=P}_overwriteAlternativeVersionId(P){this._alternativeVersionId=P}_overwriteInitialUndoRedoSnapshot(P){this._initialUndoRedoSnapshot=P}getValue(P,V=!1){this._assertNotDisposed();const U=this.getFullModelRange(),H=this.getValueInRange(U,P);return V?this._buffer.getBOM()+H:H}createSnapshot(P=!1){return new O(this._buffer.createSnapshot(P))}getValueLength(P,V=!1){this._assertNotDisposed();const U=this.getFullModelRange(),H=this.getValueLengthInRange(U,P);return V?this._buffer.getBOM().length+H:H}getValueInRange(P,V=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(P),V)}getValueLengthInRange(P,V=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(P),V)}getCharacterCountInRange(P,V=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(P),V)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(P){if(this._assertNotDisposed(),P<1||P>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(P)}getLineLength(P){if(this._assertNotDisposed(),P<1||P>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(P)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
`?0:1}getLineMinColumn(P){return this._assertNotDisposed(),1}getLineMaxColumn(P){if(this._assertNotDisposed(),P<1||P>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(P)+1}getLineFirstNonWhitespaceColumn(P){if(this._assertNotDisposed(),P<1||P>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(P)}getLineLastNonWhitespaceColumn(P){if(this._assertNotDisposed(),P<1||P>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(P)}_validateRangeRelaxedNoAllocations(P){const V=this._buffer.getLineCount(),U=P.startLineNumber,H=P.startColumn;let $,ie;if(U<1)$=1,ie=1;else if(U>V)$=V,ie=this.getLineMaxColumn($);else if($=U|0,H<=1)ie=1;else{const te=this.getLineMaxColumn($);H>=te?ie=te:ie=H|0}const oe=P.endLineNumber,ae=P.endColumn;let G,j;if(oe<1)G=1,j=1;else if(oe>V)G=V,j=this.getLineMaxColumn(G);else if(G=oe|0,ae<=1)j=1;else{const te=this.getLineMaxColumn(G);ae>=te?j=te:j=ae|0}return U===$&&H===ie&&oe===G&&ae===j&&P instanceof g.Range&&!(P instanceof p.Selection)?P:new g.Range($,ie,G,j)}_isValidPosition(P,V,U){if(typeof P!="number"||typeof V!="number"||isNaN(P)||isNaN(V)||P<1||V<1||(P|0)!==P||(V|0)!==V)return!1;const H=this._buffer.getLineCount();if(P>H)return!1;if(V===1)return!0;const $=this.getLineMaxColumn(P);if(V>$)return!1;if(U===1){const ie=this._buffer.getLineCharCode(P,V-2);if(w.isHighSurrogate(ie))return!1}return!0}_validatePosition(P,V,U){const H=Math.floor(typeof P=="number"&&!isNaN(P)?P:1),$=Math.floor(typeof V=="number"&&!isNaN(V)?V:1),ie=this._buffer.getLineCount();if(H<1)return new d.Position(1,1);if(H>ie)return new d.Position(ie,this.getLineMaxColumn(ie));if($<=1)return new d.Position(H,1);const oe=this.getLineMaxColumn(H);if($>=oe)return new d.Position(H,oe);if(U===1){const ae=this._buffer.getLineCharCode(H,$-2);if(w.isHighSurrogate(ae))return new d.Position(H,$-1)}return new d.Position(H,$)}validatePosition(P){const V=1;return this._assertNotDisposed(),P instanceof d.Position&&this._isValidPosition(P.lineNumber,P.column,V)?P:this._validatePosition(P.lineNumber,P.column,V)}_isValidRange(P,V){const U=P.startLineNumber,H=P.startColumn,$=P.endLineNumber,ie=P.endColumn;if(!this._isValidPosition(U,H,0)||!this._isValidPosition($,ie,0))return!1;if(V===1){const oe=H>1?this._buffer.getLineCharCode(U,H-2):0,ae=ie>1&&ie<=this._buffer.getLineLength($)?this._buffer.getLineCharCode($,ie-2):0,G=w.isHighSurrogate(oe),j=w.isHighSurrogate(ae);return!G&&!j}return!0}validateRange(P){const V=1;if(this._assertNotDisposed(),P instanceof g.Range&&!(P instanceof p.Selection)&&this._isValidRange(P,V))return P;const U=this._validatePosition(P.startLineNumber,P.startColumn,0),H=this._validatePosition(P.endLineNumber,P.endColumn,0),$=U.lineNumber,ie=U.column,oe=H.lineNumber,ae=H.column;if(V===1){const G=ie>1?this._buffer.getLineCharCode($,ie-2):0,j=ae>1&&ae<=this._buffer.getLineLength(oe)?this._buffer.getLineCharCode(oe,ae-2):0,te=w.isHighSurrogate(G),Z=w.isHighSurrogate(j);return!te&&!Z?new g.Range($,ie,oe,ae):$===oe&&ie===ae?new g.Range($,ie-1,oe,ae-1):te&&Z?new g.Range($,ie-1,oe,ae+1):te?new g.Range($,ie-1,oe,ae):new g.Range($,ie,oe,ae+1)}return new g.Range($,ie,oe,ae)}modifyPosition(P,V){this._assertNotDisposed();let U=this.getOffsetAt(P)+V;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,U)))}getFullModelRange(){this._assertNotDisposed();const P=this.getLineCount();return new g.Range(1,1,P,this.getLineMaxColumn(P))}findMatchesLineByLine(P,V,U,H){return this._buffer.findMatchesLineByLine(P,V,U,H)}findMatches(P,V,U,H,$,ie,oe=T){this._assertNotDisposed();let ae=null;V!==null&&(Array.isArray(V)||(V=[V]),V.every(te=>g.Range.isIRange(te))&&(ae=V.map(te=>this.validateRange(te)))),ae===null&&(ae=[this.getFullModelRange()]),ae=ae.sort((te,Z)=>te.startLineNumber-Z.startLineNumber||te.startColumn-Z.startColumn);const G=[];G.push(ae.reduce((te,Z)=>g.Range.areIntersecting(te,Z)?te.plusRange(Z):(G.push(te),Z)));let j;if(!U&&P.indexOf(`
`)<0){const Z=new i.SearchParams(P,U,H,$).parseSearchRequest();if(!Z)return[];j=ue=>this.findMatchesLineByLine(ue,Z,ie,oe)}else j=te=>i.TextModelSearch.findMatches(this,new i.SearchParams(P,U,H,$),te,ie,oe);return G.map(j).reduce((te,Z)=>te.concat(Z),[])}findNextMatch(P,V,U,H,$,ie){this._assertNotDisposed();const oe=this.validatePosition(V);if(!U&&P.indexOf(`
`)<0){const G=new i.SearchParams(P,U,H,$).parseSearchRequest();if(!G)return null;const j=this.getLineCount();let te=new g.Range(oe.lineNumber,oe.column,j,this.getLineMaxColumn(j)),Z=this.findMatchesLineByLine(te,G,ie,1);return i.TextModelSearch.findNextMatch(this,new i.SearchParams(P,U,H,$),oe,ie),Z.length>0||(te=new g.Range(1,1,oe.lineNumber,this.getLineMaxColumn(oe.lineNumber)),Z=this.findMatchesLineByLine(te,G,ie,1),Z.length>0)?Z[0]:null}return i.TextModelSearch.findNextMatch(this,new i.SearchParams(P,U,H,$),oe,ie)}findPreviousMatch(P,V,U,H,$,ie){this._assertNotDisposed();const oe=this.validatePosition(V);return i.TextModelSearch.findPreviousMatch(this,new i.SearchParams(P,U,H,$),oe,ie)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(P){if((this.getEOL()===`
`?0:1)!==P)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(P)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(P){return P instanceof c.ValidAnnotatedEditOperation?P:new c.ValidAnnotatedEditOperation(P.identifier||null,this.validateRange(P.range),P.text,P.forceMoveMarkers||!1,P.isAutoWhitespaceEdit||!1,P._isTracked||!1)}_validateEditOperations(P){const V=[];for(let U=0,H=P.length;U<H;U++)V[U]=this._validateEditOperation(P[U]);return V}pushEditOperations(P,V,U){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(P,this._validateEditOperations(V),U)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(P,V,U){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let H=V.map(ie=>({range:this.validateRange(ie.range),text:ie.text})),$=!0;if(P)for(let ie=0,oe=P.length;ie<oe;ie++){let ae=P[ie],G=!1;for(let j=0,te=H.length;j<te;j++){let Z=H[j].range,ue=Z.startLineNumber>ae.endLineNumber,he=ae.startLineNumber>Z.endLineNumber;if(!ue&&!he){G=!0;break}}if(!G){$=!1;break}}if($)for(let ie=0,oe=this._trimAutoWhitespaceLines.length;ie<oe;ie++){let ae=this._trimAutoWhitespaceLines[ie],G=this.getLineMaxColumn(ae),j=!0;for(let te=0,Z=H.length;te<Z;te++){let ue=H[te].range,he=H[te].text;if(!(ae<ue.startLineNumber||ae>ue.endLineNumber)&&!(ae===ue.startLineNumber&&ue.startColumn===G&&ue.isEmpty()&&he&&he.length>0&&he.charAt(0)===`
`)&&!(ae===ue.startLineNumber&&ue.startColumn===1&&ue.isEmpty()&&he&&he.length>0&&he.charAt(he.length-1)===`
`)){j=!1;break}}if(j){const te=new g.Range(ae,1,ae,G);V.push(new c.ValidAnnotatedEditOperation(null,te,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(P,V,U)}_applyUndo(P,V,U,H){const $=P.map(ie=>{const oe=this.getPositionAt(ie.newPosition),ae=this.getPositionAt(ie.newEnd);return{range:new g.Range(oe.lineNumber,oe.column,ae.lineNumber,ae.column),text:ie.oldText}});this._applyUndoRedoEdits($,V,!0,!1,U,H)}_applyRedo(P,V,U,H){const $=P.map(ie=>{const oe=this.getPositionAt(ie.oldPosition),ae=this.getPositionAt(ie.oldEnd);return{range:new g.Range(oe.lineNumber,oe.column,ae.lineNumber,ae.column),text:ie.newText}});this._applyUndoRedoEdits($,V,!1,!0,U,H)}_applyUndoRedoEdits(P,V,U,H,$,ie){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=U,this._isRedoing=H,this.applyEdits(P,!1),this.setEOL(V),this._overwriteAlternativeVersionId($)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(ie),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(P,V=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const U=this._validateEditOperations(P);return this._doApplyEdits(U,V)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(P,V){const U=this._buffer.getLineCount(),H=this._buffer.applyEdits(P,this._options.trimAutoWhitespace,V),$=this._buffer.getLineCount(),ie=H.changes;if(this._trimAutoWhitespaceLines=H.trimAutoWhitespaceLineNumbers,ie.length!==0){let oe=[],ae=U;for(let G=0,j=ie.length;G<j;G++){const te=ie[G],[Z,ue,he]=f.countEOL(te.text);this._tokens.acceptEdit(te.range,Z,ue),this._tokens2.acceptEdit(te.range,Z,ue,he,te.text.length>0?te.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(te.rangeOffset,te.rangeLength,te.text.length,te.forceMoveMarkers);const re=te.range.startLineNumber,ce=te.range.endLineNumber,me=ce-re,Ce=Z,be=Math.min(me,Ce),Le=Ce-me;for(let De=be;De>=0;De--){const Re=re+De,Ee=$-ae-Le+Re;oe.push(new r.ModelRawLineChanged(Re,this.getLineContent(Ee)))}if(be<me){const De=re+be;oe.push(new r.ModelRawLinesDeleted(De+1,ce))}if(be<Ce){const De=re+be,Re=Ce-be,Ee=$-ae-Re+De+1;let Ae=[];for(let Se=0;Se<Re;Se++){let we=Ee+Se;Ae[we-Ee]=this.getLineContent(we)}oe.push(new r.ModelRawLinesInserted(De+1,re+Ce,Ae))}ae+=Le}this._increaseVersionId(),this._emitContentChangedEvent(new r.ModelRawContentChangedEvent(oe,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:ie,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return H.reverseEdits===null?void 0:H.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}changeDecorations(P,V=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(V,P)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(P,V){let U={addDecoration:($,ie)=>this._deltaDecorationsImpl(P,[],[{range:$,options:ie}])[0],changeDecoration:($,ie)=>{this._changeDecorationImpl($,ie)},changeDecorationOptions:($,ie)=>{this._changeDecorationOptionsImpl($,ne(ie))},removeDecoration:$=>{this._deltaDecorationsImpl(P,[$],[])},deltaDecorations:($,ie)=>$.length===0&&ie.length===0?[]:this._deltaDecorationsImpl(P,$,ie)},H=null;try{H=V(U)}catch($){b.onUnexpectedError($)}return U.addDecoration=A,U.changeDecoration=A,U.changeDecorationOptions=A,U.removeDecoration=A,U.deltaDecorations=A,H}deltaDecorations(P,V,U=0){if(this._assertNotDisposed(),P||(P=[]),P.length===0&&V.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(U,P,V)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(P){return this.getDecorationRange(P)}_setTrackedRange(P,V,U){const H=P?this._decorations[P]:null;if(!H)return V?this._deltaDecorationsImpl(0,[],[{range:V,options:se[U]}])[0]:null;if(!V)return this._decorationsTree.delete(H),delete this._decorations[H.id],null;const $=this._validateRangeRelaxedNoAllocations(V),ie=this._buffer.getOffsetAt($.startLineNumber,$.startColumn),oe=this._buffer.getOffsetAt($.endLineNumber,$.endColumn);return this._decorationsTree.delete(H),H.reset(this.getVersionId(),ie,oe,$),H.setOptions(se[U]),this._decorationsTree.insert(H),H.id}removeAllDecorationsWithOwnerId(P){if(!this._isDisposed){const V=this._decorationsTree.collectNodesFromOwner(P);for(let U=0,H=V.length;U<H;U++){const $=V[U];this._decorationsTree.delete($),delete this._decorations[$.id]}}}getDecorationOptions(P){const V=this._decorations[P];return V?V.options:null}getDecorationRange(P){const V=this._decorations[P];if(!V)return null;const U=this.getVersionId();return V.cachedVersionId!==U&&this._decorationsTree.resolveNode(V,U),V.range===null&&(V.range=this._getRangeAt(V.cachedAbsoluteStart,V.cachedAbsoluteEnd)),V.range}getLineDecorations(P,V=0,U=!1){return P<1||P>this.getLineCount()?[]:this.getLinesDecorations(P,P,V,U)}getLinesDecorations(P,V,U=0,H=!1){let $=this.getLineCount(),ie=Math.min($,Math.max(1,P)),oe=Math.min($,Math.max(1,V)),ae=this.getLineMaxColumn(oe);return this._getDecorationsInRange(new g.Range(ie,1,oe,ae),U,H)}getDecorationsInRange(P,V=0,U=!1){let H=this.validateRange(P);return this._getDecorationsInRange(H,V,U)}getOverviewRulerDecorations(P=0,V=!1){const U=this.getVersionId(),H=this._decorationsTree.search(P,V,!0,U);return this._ensureNodesHaveRanges(H)}getAllDecorations(P=0,V=!1){const U=this.getVersionId(),H=this._decorationsTree.search(P,V,!1,U);return this._ensureNodesHaveRanges(H)}_getDecorationsInRange(P,V,U){const H=this._buffer.getOffsetAt(P.startLineNumber,P.startColumn),$=this._buffer.getOffsetAt(P.endLineNumber,P.endColumn),ie=this.getVersionId(),oe=this._decorationsTree.intervalSearch(H,$,V,U,ie);return this._ensureNodesHaveRanges(oe)}_ensureNodesHaveRanges(P){for(let V=0,U=P.length;V<U;V++){const H=P[V];H.range===null&&(H.range=this._getRangeAt(H.cachedAbsoluteStart,H.cachedAbsoluteEnd))}return P}_getRangeAt(P,V){return this._buffer.getRangeAt(P,V-P)}_changeDecorationImpl(P,V){const U=this._decorations[P];if(!!U){const H=this._validateRangeRelaxedNoAllocations(V),$=this._buffer.getOffsetAt(H.startLineNumber,H.startColumn),ie=this._buffer.getOffsetAt(H.endLineNumber,H.endColumn);this._decorationsTree.delete(U),U.reset(this.getVersionId(),$,ie,H),this._decorationsTree.insert(U),this._onDidChangeDecorations.checkAffectedAndFire(U.options)}}_changeDecorationOptionsImpl(P,V){const U=this._decorations[P];if(!!U){const H=!!(U.options.overviewRuler&&U.options.overviewRuler.color),$=!!(V.overviewRuler&&V.overviewRuler.color);this._onDidChangeDecorations.checkAffectedAndFire(U.options),this._onDidChangeDecorations.checkAffectedAndFire(V),H!==$?(this._decorationsTree.delete(U),U.setOptions(V),this._decorationsTree.insert(U)):U.setOptions(V)}}_deltaDecorationsImpl(P,V,U){const H=this.getVersionId(),$=V.length;let ie=0;const oe=U.length;let ae=0,G=new Array(oe);for(;ie<$||ae<oe;){let j=null;if(ie<$){do j=this._decorations[V[ie++]];while(!j&&ie<$);j&&(this._decorationsTree.delete(j),this._onDidChangeDecorations.checkAffectedAndFire(j.options))}if(ae<oe){if(!j){const ce=++this._lastDecorationId,me=`${this._instanceId};${ce}`;j=new a.IntervalNode(me,0,0),this._decorations[me]=j}const te=U[ae],Z=this._validateRangeRelaxedNoAllocations(te.range),ue=ne(te.options),he=this._buffer.getOffsetAt(Z.startLineNumber,Z.startColumn),re=this._buffer.getOffsetAt(Z.endLineNumber,Z.endColumn);j.ownerId=P,j.reset(H,he,re,Z),j.setOptions(ue),this._onDidChangeDecorations.checkAffectedAndFire(ue),this._decorationsTree.insert(j),G[ae]=j.id,ae++}else j&&delete this._decorations[j.id]}return G}setTokens(P){if(P.length!==0){let V=[];for(let U=0,H=P.length;U<H;U++){const $=P[U];let ie=0,oe=0,ae=!1;for(let G=0,j=$.tokens.length;G<j;G++){const te=$.startLineNumber+G;ae?(this._tokens.setTokens(this._languageIdentifier.id,te-1,this._buffer.getLineLength(te),$.tokens[G],!1),oe=te):this._tokens.setTokens(this._languageIdentifier.id,te-1,this._buffer.getLineLength(te),$.tokens[G],!0)&&(ae=!0,ie=te,oe=te)}ae&&V.push({fromLineNumber:ie,toLineNumber:oe})}V.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:V})}}setSemanticTokens(P,V){this._tokens2.set(P,V),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:P!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(P,V){if(!this.hasCompleteSemanticTokens()){const U=this._tokens2.setPartial(P,V);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:U.startLineNumber,toLineNumber:U.endLineNumber}]})}}tokenizeViewport(P,V){P=Math.max(1,P),V=Math.min(this._buffer.getLineCount(),V),this._tokenization.tokenizeViewport(P,V)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(P){this._isDisposing||this._onDidChangeTokens.fire(P)}resetTokenization(){this._tokenization.reset()}forceTokenization(P){if(P<1||P>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(P)}isCheapToTokenize(P){return this._tokenization.isCheapToTokenize(P)}tokenizeIfCheap(P){this.isCheapToTokenize(P)&&this.forceTokenization(P)}getLineTokens(P){if(P<1||P>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(P)}_getLineTokens(P){const V=this.getLineContent(P),U=this._tokens.getTokens(this._languageIdentifier.id,P-1,V);return this._tokens2.addSemanticTokens(P,U)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(P){if(this._languageIdentifier.id!==P.id){let V={oldLanguage:this._languageIdentifier.language,newLanguage:P.language};this._languageIdentifier=P,this._onDidChangeLanguage.fire(V),this._onDidChangeLanguageConfiguration.fire({})}}getLanguageIdAtPosition(P,V){const U=this.validatePosition(new d.Position(P,V)),H=this.getLineTokens(U.lineNumber);return H.getLanguageId(H.findTokenIndexAtOffset(U.column-1))}getWordAtPosition(P){this._assertNotDisposed();const V=this.validatePosition(P),U=this.getLineContent(V.lineNumber),H=this._getLineTokens(V.lineNumber),$=H.findTokenIndexAtOffset(V.column-1),[ie,oe]=D._findLanguageBoundaries(H,$),ae=t.getWordAtText(V.column,l.LanguageConfigurationRegistry.getWordDefinition(H.getLanguageId($)),U.substring(ie,oe),ie);if(ae&&ae.startColumn<=P.column&&P.column<=ae.endColumn)return ae;if($>0&&ie===V.column-1){const[G,j]=D._findLanguageBoundaries(H,$-1),te=t.getWordAtText(V.column,l.LanguageConfigurationRegistry.getWordDefinition(H.getLanguageId($-1)),U.substring(G,j),G);if(te&&te.startColumn<=P.column&&P.column<=te.endColumn)return te}return null}static _findLanguageBoundaries(P,V){const U=P.getLanguageId(V);let H=0;for(let ie=V;ie>=0&&P.getLanguageId(ie)===U;ie--)H=P.getStartOffset(ie);let $=P.getLineContent().length;for(let ie=V,oe=P.getCount();ie<oe&&P.getLanguageId(ie)===U;ie++)$=P.getEndOffset(ie);return[H,$]}getWordUntilPosition(P){const V=this.getWordAtPosition(P);return V?{word:V.word.substr(0,P.column-V.startColumn),startColumn:V.startColumn,endColumn:P.column}:{word:"",startColumn:P.column,endColumn:P.column}}findMatchingBracketUp(P,V){let U=P.toLowerCase(),H=this.validatePosition(V),$=this._getLineTokens(H.lineNumber),ie=$.getLanguageId($.findTokenIndexAtOffset(H.column-1)),oe=l.LanguageConfigurationRegistry.getBracketsSupport(ie);if(!oe)return null;let ae=oe.textIsBracket[U];return ae?F(this._findMatchingBracketUp(ae,H,null)):null}matchBracket(P){return this._matchBracket(this.validatePosition(P))}_matchBracket(P){const V=P.lineNumber,U=this._getLineTokens(V),H=U.getCount(),$=this._buffer.getLineContent(V),ie=U.findTokenIndexAtOffset(P.column-1);if(ie<0)return null;const oe=l.LanguageConfigurationRegistry.getBracketsSupport(U.getLanguageId(ie));if(oe&&!m.ignoreBracketsInToken(U.getStandardTokenType(ie))){let ae=Math.max(0,P.column-1-oe.maxBracketLength);for(let te=ie-1;te>=0;te--){const Z=U.getEndOffset(te);if(Z<=ae)break;m.ignoreBracketsInToken(U.getStandardTokenType(te))&&(ae=Z)}const G=Math.min($.length,P.column-1+oe.maxBracketLength);let j=null;for(;;){const te=_.BracketsUtils.findNextBracketInRange(oe.forwardRegex,V,$,ae,G);if(!te)break;if(te.startColumn<=P.column&&P.column<=te.endColumn){const Z=$.substring(te.startColumn-1,te.endColumn-1).toLowerCase(),ue=this._matchFoundBracket(te,oe.textIsBracket[Z],oe.textIsOpenBracket[Z],null);if(ue){if(ue instanceof B)return null;j=ue}}ae=te.endColumn-1}if(j)return j}if(ie>0&&U.getStartOffset(ie)===P.column-1){const ae=ie-1,G=l.LanguageConfigurationRegistry.getBracketsSupport(U.getLanguageId(ae));if(G&&!m.ignoreBracketsInToken(U.getStandardTokenType(ae))){const j=Math.max(0,P.column-1-G.maxBracketLength);let te=Math.min($.length,P.column-1+G.maxBracketLength);for(let ue=ae+1;ue<H;ue++){const he=U.getStartOffset(ue);if(he>=te)break;m.ignoreBracketsInToken(U.getStandardTokenType(ue))&&(te=he)}const Z=_.BracketsUtils.findPrevBracketInRange(G.reversedRegex,V,$,j,te);if(Z&&Z.startColumn<=P.column&&P.column<=Z.endColumn){const ue=$.substring(Z.startColumn-1,Z.endColumn-1).toLowerCase(),he=this._matchFoundBracket(Z,G.textIsBracket[ue],G.textIsOpenBracket[ue],null);if(he)return he instanceof B?null:he}}}return null}_matchFoundBracket(P,V,U,H){if(!V)return null;const $=U?this._findMatchingBracketDown(V,P.getEndPosition(),H):this._findMatchingBracketUp(V,P.getStartPosition(),H);return $?$ instanceof B?$:[P,$]:null}_findMatchingBracketUp(P,V,U){const H=P.languageIdentifier.id,$=P.reversedRegex;let ie=-1,oe=0;const ae=(G,j,te,Z)=>{for(;;){if(U&&++oe%100==0&&!U())return B.INSTANCE;const ue=_.BracketsUtils.findPrevBracketInRange($,G,j,te,Z);if(!ue)break;const he=j.substring(ue.startColumn-1,ue.endColumn-1).toLowerCase();if(P.isOpen(he)?ie++:P.isClose(he)&&ie--,ie===0)return ue;Z=ue.startColumn-1}return null};for(let G=V.lineNumber;G>=1;G--){const j=this._getLineTokens(G),te=j.getCount(),Z=this._buffer.getLineContent(G);let ue=te-1,he=Z.length,re=Z.length;G===V.lineNumber&&(ue=j.findTokenIndexAtOffset(V.column-1),he=V.column-1,re=V.column-1);let ce=!0;for(;ue>=0;ue--){const me=j.getLanguageId(ue)===H&&!m.ignoreBracketsInToken(j.getStandardTokenType(ue));if(me)ce?he=j.getStartOffset(ue):(he=j.getStartOffset(ue),re=j.getEndOffset(ue));else if(ce&&he!==re){const Ce=ae(G,Z,he,re);if(Ce)return Ce}ce=me}if(ce&&he!==re){const me=ae(G,Z,he,re);if(me)return me}}return null}_findMatchingBracketDown(P,V,U){const H=P.languageIdentifier.id,$=P.forwardRegex;let ie=1,oe=0;const ae=(j,te,Z,ue)=>{for(;;){if(U&&++oe%100==0&&!U())return B.INSTANCE;const he=_.BracketsUtils.findNextBracketInRange($,j,te,Z,ue);if(!he)break;const re=te.substring(he.startColumn-1,he.endColumn-1).toLowerCase();if(P.isOpen(re)?ie++:P.isClose(re)&&ie--,ie===0)return he;Z=he.endColumn-1}return null},G=this.getLineCount();for(let j=V.lineNumber;j<=G;j++){const te=this._getLineTokens(j),Z=te.getCount(),ue=this._buffer.getLineContent(j);let he=0,re=0,ce=0;j===V.lineNumber&&(he=te.findTokenIndexAtOffset(V.column-1),re=V.column-1,ce=V.column-1);let me=!0;for(;he<Z;he++){const Ce=te.getLanguageId(he)===H&&!m.ignoreBracketsInToken(te.getStandardTokenType(he));if(Ce)me||(re=te.getStartOffset(he)),ce=te.getEndOffset(he);else if(me&&re!==ce){const be=ae(j,ue,re,ce);if(be)return be}me=Ce}if(me&&re!==ce){const Ce=ae(j,ue,re,ce);if(Ce)return Ce}}return null}findPrevBracket(P){const V=this.validatePosition(P);let U=-1,H=null;for(let $=V.lineNumber;$>=1;$--){const ie=this._getLineTokens($),oe=ie.getCount(),ae=this._buffer.getLineContent($);let G=oe-1,j=ae.length,te=ae.length;if($===V.lineNumber){G=ie.findTokenIndexAtOffset(V.column-1),j=V.column-1,te=V.column-1;const ue=ie.getLanguageId(G);U!==ue&&(U=ue,H=l.LanguageConfigurationRegistry.getBracketsSupport(U))}let Z=!0;for(;G>=0;G--){const ue=ie.getLanguageId(G);if(U!==ue){if(H&&Z&&j!==te){const re=_.BracketsUtils.findPrevBracketInRange(H.reversedRegex,$,ae,j,te);if(re)return this._toFoundBracket(H,re);Z=!1}U=ue,H=l.LanguageConfigurationRegistry.getBracketsSupport(U)}const he=!!H&&!m.ignoreBracketsInToken(ie.getStandardTokenType(G));if(he)Z?j=ie.getStartOffset(G):(j=ie.getStartOffset(G),te=ie.getEndOffset(G));else if(H&&Z&&j!==te){const re=_.BracketsUtils.findPrevBracketInRange(H.reversedRegex,$,ae,j,te);if(re)return this._toFoundBracket(H,re)}Z=he}if(H&&Z&&j!==te){const ue=_.BracketsUtils.findPrevBracketInRange(H.reversedRegex,$,ae,j,te);if(ue)return this._toFoundBracket(H,ue)}}return null}findNextBracket(P){const V=this.validatePosition(P),U=this.getLineCount();let H=-1,$=null;for(let ie=V.lineNumber;ie<=U;ie++){const oe=this._getLineTokens(ie),ae=oe.getCount(),G=this._buffer.getLineContent(ie);let j=0,te=0,Z=0;if(ie===V.lineNumber){j=oe.findTokenIndexAtOffset(V.column-1),te=V.column-1,Z=V.column-1;const he=oe.getLanguageId(j);H!==he&&(H=he,$=l.LanguageConfigurationRegistry.getBracketsSupport(H))}let ue=!0;for(;j<ae;j++){const he=oe.getLanguageId(j);if(H!==he){if($&&ue&&te!==Z){const ce=_.BracketsUtils.findNextBracketInRange($.forwardRegex,ie,G,te,Z);if(ce)return this._toFoundBracket($,ce);ue=!1}H=he,$=l.LanguageConfigurationRegistry.getBracketsSupport(H)}const re=!!$&&!m.ignoreBracketsInToken(oe.getStandardTokenType(j));if(re)ue||(te=oe.getStartOffset(j)),Z=oe.getEndOffset(j);else if($&&ue&&te!==Z){const ce=_.BracketsUtils.findNextBracketInRange($.forwardRegex,ie,G,te,Z);if(ce)return this._toFoundBracket($,ce)}ue=re}if($&&ue&&te!==Z){const he=_.BracketsUtils.findNextBracketInRange($.forwardRegex,ie,G,te,Z);if(he)return this._toFoundBracket($,he)}}return null}findEnclosingBrackets(P,V){let U;if(typeof V=="undefined")U=null;else{const ue=Date.now();U=()=>Date.now()-ue<=V}const H=this.validatePosition(P),$=this.getLineCount(),ie=new Map;let oe=[];const ae=(ue,he)=>{if(!ie.has(ue)){let re=[];for(let ce=0,me=he?he.brackets.length:0;ce<me;ce++)re[ce]=0;ie.set(ue,re)}oe=ie.get(ue)};let G=0;const j=(ue,he,re,ce,me)=>{for(;;){if(U&&++G%100==0&&!U())return B.INSTANCE;const Ce=_.BracketsUtils.findNextBracketInRange(ue.forwardRegex,he,re,ce,me);if(!Ce)break;const be=re.substring(Ce.startColumn-1,Ce.endColumn-1).toLowerCase(),Le=ue.textIsBracket[be];if(Le&&(Le.isOpen(be)?oe[Le.index]++:Le.isClose(be)&&oe[Le.index]--,oe[Le.index]===-1))return this._matchFoundBracket(Ce,Le,!1,U);ce=Ce.endColumn-1}return null};let te=-1,Z=null;for(let ue=H.lineNumber;ue<=$;ue++){const he=this._getLineTokens(ue),re=he.getCount(),ce=this._buffer.getLineContent(ue);let me=0,Ce=0,be=0;if(ue===H.lineNumber){me=he.findTokenIndexAtOffset(H.column-1),Ce=H.column-1,be=H.column-1;const De=he.getLanguageId(me);te!==De&&(te=De,Z=l.LanguageConfigurationRegistry.getBracketsSupport(te),ae(te,Z))}let Le=!0;for(;me<re;me++){const De=he.getLanguageId(me);if(te!==De){if(Z&&Le&&Ce!==be){const Ee=j(Z,ue,ce,Ce,be);if(Ee)return F(Ee);Le=!1}te=De,Z=l.LanguageConfigurationRegistry.getBracketsSupport(te),ae(te,Z)}const Re=!!Z&&!m.ignoreBracketsInToken(he.getStandardTokenType(me));if(Re)Le||(Ce=he.getStartOffset(me)),be=he.getEndOffset(me);else if(Z&&Le&&Ce!==be){const Ee=j(Z,ue,ce,Ce,be);if(Ee)return F(Ee)}Le=Re}if(Z&&Le&&Ce!==be){const De=j(Z,ue,ce,Ce,be);if(De)return F(De)}}return null}_toFoundBracket(P,V){if(!V)return null;let U=this.getValueInRange(V);U=U.toLowerCase();let H=P.textIsBracket[U];return H?{range:V,open:H.open,close:H.close,isOpen:P.textIsOpenBracket[U]}:null}static computeIndentLevel(P,V){let U=0,H=0,$=P.length;for(;H<$;){let ie=P.charCodeAt(H);if(ie===32)U++;else if(ie===9)U=U-U%V+V;else break;H++}return H===$?-1:U}_computeIndentLevel(P){return D.computeIndentLevel(this._buffer.getLineContent(P+1),this._options.tabSize)}getActiveIndentGuide(P,V,U){this._assertNotDisposed();const H=this.getLineCount();if(P<1||P>H)throw new Error("Illegal value for lineNumber");const $=l.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id),ie=Boolean($&&$.offSide);let oe=-2,ae=-1,G=-2,j=-1;const te=Ee=>{if(oe!==-1&&(oe===-2||oe>Ee-1)){oe=-1,ae=-1;for(let Ae=Ee-2;Ae>=0;Ae--){let Se=this._computeIndentLevel(Ae);if(Se>=0){oe=Ae,ae=Se;break}}}if(G===-2){G=-1,j=-1;for(let Ae=Ee;Ae<H;Ae++){let Se=this._computeIndentLevel(Ae);if(Se>=0){G=Ae,j=Se;break}}}};let Z=-2,ue=-1,he=-2,re=-1;const ce=Ee=>{if(Z===-2){Z=-1,ue=-1;for(let Ae=Ee-2;Ae>=0;Ae--){let Se=this._computeIndentLevel(Ae);if(Se>=0){Z=Ae,ue=Se;break}}}if(he!==-1&&(he===-2||he<Ee-1)){he=-1,re=-1;for(let Ae=Ee;Ae<H;Ae++){let Se=this._computeIndentLevel(Ae);if(Se>=0){he=Ae,re=Se;break}}}};let me=0,Ce=!0,be=0,Le=!0,De=0,Re=0;for(let Ee=0;Ce||Le;Ee++){const Ae=P-Ee,Se=P+Ee;Ee>1&&(Ae<1||Ae<V)&&(Ce=!1),Ee>1&&(Se>H||Se>U)&&(Le=!1),Ee>5e4&&(Ce=!1,Le=!1);let we=-1;if(Ce){const fe=this._computeIndentLevel(Ae-1);fe>=0?(G=Ae-1,j=fe,we=Math.ceil(fe/this._options.indentSize)):(te(Ae),we=this._getIndentLevelForWhitespaceLine(ie,ae,j))}let ye=-1;if(Le){const fe=this._computeIndentLevel(Se-1);fe>=0?(Z=Se-1,ue=fe,ye=Math.ceil(fe/this._options.indentSize)):(ce(Se),ye=this._getIndentLevelForWhitespaceLine(ie,ue,re))}if(Ee===0){Re=we;continue}if(Ee===1){if(Se<=H&&ye>=0&&Re+1===ye){Ce=!1,me=Se,be=Se,De=ye;continue}if(Ae>=1&&we>=0&&we-1===Re){Le=!1,me=Ae,be=Ae,De=we;continue}if(me=P,be=P,De=Re,De===0)return{startLineNumber:me,endLineNumber:be,indent:De}}Ce&&(we>=De?me=Ae:Ce=!1),Le&&(ye>=De?be=Se:Le=!1)}return{startLineNumber:me,endLineNumber:be,indent:De}}getLinesIndentGuides(P,V){this._assertNotDisposed();const U=this.getLineCount();if(P<1||P>U)throw new Error("Illegal value for startLineNumber");if(V<1||V>U)throw new Error("Illegal value for endLineNumber");const H=l.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id),$=Boolean(H&&H.offSide);let ie=new Array(V-P+1),oe=-2,ae=-1,G=-2,j=-1;for(let te=P;te<=V;te++){let Z=te-P;const ue=this._computeIndentLevel(te-1);if(ue>=0){oe=te-1,ae=ue,ie[Z]=Math.ceil(ue/this._options.indentSize);continue}if(oe===-2){oe=-1,ae=-1;for(let he=te-2;he>=0;he--){let re=this._computeIndentLevel(he);if(re>=0){oe=he,ae=re;break}}}if(G!==-1&&(G===-2||G<te-1)){G=-1,j=-1;for(let he=te;he<U;he++){let re=this._computeIndentLevel(he);if(re>=0){G=he,j=re;break}}}ie[Z]=this._getIndentLevelForWhitespaceLine($,ae,j)}return ie}_getIndentLevelForWhitespaceLine(P,V,U){return V===-1||U===-1?0:V<U?1+Math.floor(V/this._options.indentSize):V===U?Math.ceil(U/this._options.indentSize):P?Math.ceil(U/this._options.indentSize):1+Math.floor(U/this._options.indentSize)}}e.TextModel=D,D.MODEL_SYNC_LIMIT=50*1024*1024,D.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,D.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,D.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:C.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:C.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:C.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:C.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:C.EDITOR_MODEL_DEFAULTS.largeFileOptimizations};class R{constructor(){this._decorationsTree0=new a.IntervalTree,this._decorationsTree1=new a.IntervalTree}intervalSearch(P,V,U,H,$){const ie=this._decorationsTree0.intervalSearch(P,V,U,H,$),oe=this._decorationsTree1.intervalSearch(P,V,U,H,$);return ie.concat(oe)}search(P,V,U,H){if(U)return this._decorationsTree1.search(P,V,H);{const $=this._decorationsTree0.search(P,V,H),ie=this._decorationsTree1.search(P,V,H);return $.concat(ie)}}collectNodesFromOwner(P){const V=this._decorationsTree0.collectNodesFromOwner(P),U=this._decorationsTree1.collectNodesFromOwner(P);return V.concat(U)}collectNodesPostOrder(){const P=this._decorationsTree0.collectNodesPostOrder(),V=this._decorationsTree1.collectNodesPostOrder();return P.concat(V)}insert(P){a.getNodeIsInOverviewRuler(P)?this._decorationsTree1.insert(P):this._decorationsTree0.insert(P)}delete(P){a.getNodeIsInOverviewRuler(P)?this._decorationsTree1.delete(P):this._decorationsTree0.delete(P)}resolveNode(P,V){a.getNodeIsInOverviewRuler(P)?this._decorationsTree1.resolveNode(P,V):this._decorationsTree0.resolveNode(P,V)}acceptReplace(P,V,U,H){this._decorationsTree0.acceptReplace(P,V,U,H),this._decorationsTree1.acceptReplace(P,V,U,H)}}function W(z){return z.replace(/[^a-z0-9\-_]/gi," ")}class x{constructor(P){this.color=P.color||"",this.darkColor=P.darkColor||""}}class K extends x{constructor(P){super(P);this._resolvedColor=null,this.position=typeof P.position=="number"?P.position:c.OverviewRulerLane.Center}getColor(P){return this._resolvedColor||(P.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,P):this._resolvedColor=this._resolveColor(this.color,P)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(P,V){if(typeof P=="string")return P;let U=P?V.getColor(P.id):null;return U?U.toString():""}}e.ModelDecorationOverviewRulerOptions=K;class Y extends x{constructor(P){super(P);this.position=P.position}getColor(P){return this._resolvedColor||(P.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,P):this._resolvedColor=this._resolveColor(this.color,P)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(P,V){return typeof P=="string"?v.Color.fromHex(P):V.getColor(P.id)}}e.ModelDecorationMinimapOptions=Y;class ee{constructor(P){this.stickiness=P.stickiness||0,this.zIndex=P.zIndex||0,this.className=P.className?W(P.className):null,this.hoverMessage=P.hoverMessage||null,this.glyphMarginHoverMessage=P.glyphMarginHoverMessage||null,this.isWholeLine=P.isWholeLine||!1,this.showIfCollapsed=P.showIfCollapsed||!1,this.collapseOnReplaceEdit=P.collapseOnReplaceEdit||!1,this.overviewRuler=P.overviewRuler?new K(P.overviewRuler):null,this.minimap=P.minimap?new Y(P.minimap):null,this.glyphMarginClassName=P.glyphMarginClassName?W(P.glyphMarginClassName):null,this.linesDecorationsClassName=P.linesDecorationsClassName?W(P.linesDecorationsClassName):null,this.firstLineDecorationClassName=P.firstLineDecorationClassName?W(P.firstLineDecorationClassName):null,this.marginClassName=P.marginClassName?W(P.marginClassName):null,this.inlineClassName=P.inlineClassName?W(P.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=P.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=P.beforeContentClassName?W(P.beforeContentClassName):null,this.afterContentClassName=P.afterContentClassName?W(P.afterContentClassName):null}static register(P){return new ee(P)}static createDynamic(P){return new ee(P)}}e.ModelDecorationOptions=ee,ee.EMPTY=ee.register({});const se=[ee.register({stickiness:0}),ee.register({stickiness:1}),ee.register({stickiness:2}),ee.register({stickiness:3})];function ne(z){return z instanceof ee?z:ee.createDynamic(z)}class le extends M.Disposable{constructor(){super();this._actual=this._register(new N.Emitter),this.event=this._actual.event,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){if(this._deferredCnt--,this._deferredCnt===0&&this._shouldFire){const P={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(P)}}checkAffectedAndFire(P){this._affectsMinimap||(this._affectsMinimap=!!(P.minimap&&P.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(P.overviewRuler&&P.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}e.DidChangeDecorationsEmitter=le;class X extends M.Disposable{constructor(){super();this._fastEmitter=this._register(new N.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new N.Emitter),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(P=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=P;const V=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(V),this._slowEmitter.fire(V)}}fire(P){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(P):this._deferredEvent=P;return}this._fastEmitter.fire(P),this._slowEmitter.fire(P)}}e.DidChangeContentEmitter=X}),define(Q[42],J([0,1,12,8,14,3,21,31,41]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQuote=e.CursorColumns=e.EditOperationResult=e.CursorState=e.PartialViewCursorState=e.PartialModelCursorState=e.CursorContext=e.SingleCursorState=e.CursorConfiguration=void 0;const g=()=>!0,p=()=>!1,c=h=>h===" "||h===" ";class o{constructor(m,_,f){this._languageIdentifier=m;const v=f.options,y=v.get(124);this.readOnly=v.get(75),this.tabSize=_.tabSize,this.indentSize=_.indentSize,this.insertSpaces=_.insertSpaces,this.stickyTabStops=v.get(99),this.lineHeight=v.get(53),this.pageSize=Math.max(1,Math.floor(y.height/this.lineHeight)-2),this.useTabStops=v.get(109),this.wordSeparators=v.get(110),this.emptySelectionClipboard=v.get(28),this.copyWithSyntaxHighlighting=v.get(18),this.multiCursorMergeOverlapping=v.get(63),this.multiCursorPaste=v.get(65),this.autoClosingBrackets=v.get(5),this.autoClosingQuotes=v.get(7),this.autoClosingOvertype=v.get(6),this.autoSurround=v.get(10),this.autoIndent=v.get(8),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:o._getShouldAutoClose(m,this.autoClosingQuotes),bracket:o._getShouldAutoClose(m,this.autoClosingBrackets)},this.autoClosingPairs=d.LanguageConfigurationRegistry.getAutoClosingPairs(m.id);let L=o._getSurroundingPairs(m);if(L)for(const I of L)this.surroundingPairs[I.open]=I.close}static shouldRecreate(m){return m.hasChanged(124)||m.hasChanged(110)||m.hasChanged(28)||m.hasChanged(63)||m.hasChanged(65)||m.hasChanged(5)||m.hasChanged(7)||m.hasChanged(6)||m.hasChanged(10)||m.hasChanged(109)||m.hasChanged(53)||m.hasChanged(75)}get electricChars(){if(!this._electricChars){this._electricChars={};let m=o._getElectricCharacters(this._languageIdentifier);if(m)for(const _ of m)this._electricChars[_]=!0}return this._electricChars}normalizeIndentation(m){return C.TextModel.normalizeIndentation(m,this.indentSize,this.insertSpaces)}static _getElectricCharacters(m){try{return d.LanguageConfigurationRegistry.getElectricCharacters(m.id)}catch(_){return b.onUnexpectedError(_),null}}static _getShouldAutoClose(m,_){switch(_){case"beforeWhitespace":return c;case"languageDefined":return o._getLanguageDefinedShouldAutoClose(m);case"always":return g;case"never":return p}}static _getLanguageDefinedShouldAutoClose(m){try{const _=d.LanguageConfigurationRegistry.getAutoCloseBeforeSet(m.id);return f=>_.indexOf(f)!==-1}catch(_){return b.onUnexpectedError(_),p}}static _getSurroundingPairs(m){try{return d.LanguageConfigurationRegistry.getSurroundingPairs(m.id)}catch(_){return b.onUnexpectedError(_),null}}}e.CursorConfiguration=o;class s{constructor(m,_,f,v){this.selectionStart=m,this.selectionStartLeftoverVisibleColumns=_,this.position=f,this.leftoverVisibleColumns=v,this.selection=s._computeSelection(this.selectionStart,this.position)}equals(m){return this.selectionStartLeftoverVisibleColumns===m.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===m.leftoverVisibleColumns&&this.position.equals(m.position)&&this.selectionStart.equalsRange(m.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(m,_,f,v){return m?new s(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new M.Position(_,f),v):new s(new w.Range(_,f,_,f),v,new M.Position(_,f),v)}static _computeSelection(m,_){let f,v,y,L;return m.isEmpty()?(f=m.startLineNumber,v=m.startColumn,y=_.lineNumber,L=_.column):_.isBeforeOrEqual(m.getStartPosition())?(f=m.endLineNumber,v=m.endColumn,y=_.lineNumber,L=_.column):(f=m.startLineNumber,v=m.startColumn,y=_.lineNumber,L=_.column),new S.Selection(f,v,y,L)}}e.SingleCursorState=s;class a{constructor(m,_,f){this.model=m,this.coordinatesConverter=_,this.cursorConfig=f}}e.CursorContext=a;class u{constructor(m){this.modelState=m,this.viewState=null}}e.PartialModelCursorState=u;class r{constructor(m){this.modelState=null,this.viewState=m}}e.PartialViewCursorState=r;class i{constructor(m,_){this.modelState=m,this.viewState=_}static fromModelState(m){return new u(m)}static fromViewState(m){return new r(m)}static fromModelSelection(m){const _=m.selectionStartLineNumber,f=m.selectionStartColumn,v=m.positionLineNumber,y=m.positionColumn,L=new s(new w.Range(_,f,_,f),0,new M.Position(v,y),0);return i.fromModelState(L)}static fromModelSelections(m){let _=[];for(let f=0,v=m.length;f<v;f++)_[f]=this.fromModelSelection(m[f]);return _}equals(m){return this.viewState.equals(m.viewState)&&this.modelState.equals(m.modelState)}}e.CursorState=i;class n{constructor(m,_,f){this.type=m,this.commands=_,this.shouldPushStackElementBefore=f.shouldPushStackElementBefore,this.shouldPushStackElementAfter=f.shouldPushStackElementAfter}}e.EditOperationResult=n;class t{static visibleColumnFromColumn(m,_,f){const v=m.length,y=_-1<v?_-1:v;let L=0,I=0;for(;I<y;){const k=N.getNextCodePoint(m,y,I);if(I+=k>=65536?2:1,k===9)L=t.nextRenderTabStop(L,f);else{let E=N.getGraphemeBreakType(k);for(;I<y;){const T=N.getNextCodePoint(m,y,I),O=N.getGraphemeBreakType(T);if(N.breakBetweenGraphemeBreakType(E,O))break;I+=T>=65536?2:1,E=O}N.isFullWidthCharacter(k)||N.isEmojiImprecise(k)?L=L+2:L=L+1}}return L}static visibleColumnFromColumn2(m,_,f){return this.visibleColumnFromColumn(_.getLineContent(f.lineNumber),f.column,m.tabSize)}static columnFromVisibleColumn(m,_,f){if(_<=0)return 1;const v=m.length;let y=0,L=1,I=0;for(;I<v;){const k=N.getNextCodePoint(m,v,I);I+=k>=65536?2:1;let E;if(k===9)E=t.nextRenderTabStop(y,f);else{let O=N.getGraphemeBreakType(k);for(;I<v;){const A=N.getNextCodePoint(m,v,I),B=N.getGraphemeBreakType(A);if(N.breakBetweenGraphemeBreakType(O,B))break;I+=A>=65536?2:1,O=B}N.isFullWidthCharacter(k)||N.isEmojiImprecise(k)?E=y+2:E=y+1}const T=I+1;if(E>=_){const O=_-y;return E-_<O?T:L}y=E,L=T}return v+1}static columnFromVisibleColumn2(m,_,f,v){let y=this.columnFromVisibleColumn(_.getLineContent(f),v,m.tabSize),L=_.getLineMinColumn(f);if(y<L)return L;let I=_.getLineMaxColumn(f);return y>I?I:y}static nextRenderTabStop(m,_){return m+_-m%_}static nextIndentTabStop(m,_){return m+_-m%_}static prevRenderTabStop(m,_){return m-1-(m-1)%_}static prevIndentTabStop(m,_){return m-1-(m-1)%_}}e.CursorColumns=t;function l(h){return h==="'"||h==='"'||h==="`"}e.isQuote=l}),define(Q[179],J([0,1,8,42,3,21,41]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=e.cachedStringRepeat=void 0;const C=Object.create(null);function d(p,c){C[p]||(C[p]=["",p]);const o=C[p];for(let s=o.length;s<=c;s++)o[s]=o[s-1]+p;return o[c]}e.cachedStringRepeat=d;class g{constructor(c,o){this._opts=o,this._selection=c,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(c,o,s,a,u){const r=N.CursorColumns.visibleColumnFromColumn(c,o,s);if(u){const i=d(" ",a),t=N.CursorColumns.prevIndentTabStop(r,a)/a;return d(i,t)}else{const i=" ",t=N.CursorColumns.prevRenderTabStop(r,s)/s;return d(i,t)}}static shiftIndent(c,o,s,a,u){const r=N.CursorColumns.visibleColumnFromColumn(c,o,s);if(u){const i=d(" ",a),t=N.CursorColumns.nextIndentTabStop(r,a)/a;return d(i,t)}else{const i=" ",t=N.CursorColumns.nextRenderTabStop(r,s)/s;return d(i,t)}}_addEditOperation(c,o,s){this._useLastEditRangeForCursorEndPosition?c.addTrackedEditOperation(o,s):c.addEditOperation(o,s)}getEditOperations(c,o){const s=this._selection.startLineNumber;let a=this._selection.endLineNumber;this._selection.endColumn===1&&s!==a&&(a=a-1);const{tabSize:u,indentSize:r,insertSpaces:i}=this._opts,n=s===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(c.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0);let t=0,l=0;for(let h=s;h<=a;h++,t=l){l=0;let m=c.getLineContent(h),_=b.firstNonWhitespaceIndex(m);if(!(this._opts.isUnshift&&(m.length===0||_===0))&&!(!n&&!this._opts.isUnshift&&m.length===0)){if(_===-1&&(_=m.length),h>1&&N.CursorColumns.visibleColumnFromColumn(m,_+1,u)%r!=0&&c.isCheapToTokenize(h-1)){let y=S.LanguageConfigurationRegistry.getEnterAction(this._opts.autoIndent,c,new M.Range(h-1,c.getLineMaxColumn(h-1),h-1,c.getLineMaxColumn(h-1)));if(y){if(l=t,y.appendText)for(let L=0,I=y.appendText.length;L<I&&l<r&&y.appendText.charCodeAt(L)===32;L++)l++;y.removeText&&(l=Math.max(0,l-y.removeText));for(let L=0;L<l&&!(_===0||m.charCodeAt(_-1)!==32);L++)_--}}if(!(this._opts.isUnshift&&_===0)){let f;this._opts.isUnshift?f=g.unshiftIndent(m,_+1,u,r,i):f=g.shiftIndent(m,_+1,u,r,i),this._addEditOperation(o,new M.Range(h,1,h,_+1),f),h===s&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=_+1)}}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&c.getLineLength(s)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const t=i?d(" ",r):" ";for(let l=s;l<=a;l++){const h=c.getLineContent(l);let m=b.firstNonWhitespaceIndex(h);if(!(this._opts.isUnshift&&(h.length===0||m===0))&&!(!n&&!this._opts.isUnshift&&h.length===0)&&(m===-1&&(m=h.length),!(this._opts.isUnshift&&m===0)))if(this._opts.isUnshift){m=Math.min(m,r);for(let _=0;_<m;_++)if(h.charCodeAt(_)===9){m=_+1;break}this._addEditOperation(o,new M.Range(l,1,l,m+1),"")}else this._addEditOperation(o,new M.Range(l,1,l,1),t),l===s&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=o.trackSelection(this._selection)}computeCursorState(c,o){if(this._useLastEditRangeForCursorEndPosition){let a=o.getInverseEditOperations()[0];return new w.Selection(a.range.endLineNumber,a.range.endColumn,a.range.endLineNumber,a.range.endColumn)}const s=o.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let a=this._selection.startColumn;return s.startColumn<=a?s:s.getDirection()===0?new w.Selection(s.startLineNumber,a,s.endLineNumber,s.endColumn):new w.Selection(s.endLineNumber,s.endColumn,s.startLineNumber,a)}return s}}e.ShiftCommand=g}),define(Q[240],J([0,1,42]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class N{static whitespaceVisibleColumn(w,S,C){const d=w.length;let g=0,p=-1,c=-1;for(let o=0;o<d;o++){if(o===S)return[p,c,g];switch(g%C==0&&(p=o,c=g),w.charCodeAt(o)){case 32:g+=1;break;case 9:g=b.CursorColumns.nextRenderTabStop(g,C);break;default:return[-1,-1,-1]}}return S===d?[p,c,g]:[-1,-1,-1]}static atomicPosition(w,S,C,d){const g=w.length,[p,c,o]=N.whitespaceVisibleColumn(w,S,C);if(o===-1)return-1;let s;switch(d){case 0:s=!0;break;case 1:s=!1;break;case 2:if(o%C==0)return S;s=o%C<=C/2;break}if(s){if(p===-1)return-1;let r=c;for(let i=p;i<g;++i){if(r===c+C)return p;switch(w.charCodeAt(i)){case 32:r+=1;break;case 9:r=b.CursorColumns.nextRenderTabStop(r,C);break;default:return-1}}return r===c+C?p:-1}const a=b.CursorColumns.nextRenderTabStop(o,C);let u=o;for(let r=S;r<g;r++){if(u===a)return r;switch(w.charCodeAt(r)){case 32:u+=1;break;case 9:u=b.CursorColumns.nextRenderTabStop(u,C);break;default:return-1}}return u===a?g:-1}}e.AtomicTabMoveOperations=N}),define(Q[536],J([0,1,42,14,3]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class w{static columnSelect(C,d,g,p,c,o){let s=Math.abs(c-g)+1,a=g>c,u=p>o,r=p<o,i=[];for(let n=0;n<s;n++){let t=g+(a?-n:n),l=b.CursorColumns.columnFromVisibleColumn2(C,d,t,p),h=b.CursorColumns.columnFromVisibleColumn2(C,d,t,o),m=b.CursorColumns.visibleColumnFromColumn2(C,d,new N.Position(t,l)),_=b.CursorColumns.visibleColumnFromColumn2(C,d,new N.Position(t,h));r&&(m>o||_<p)||u&&(_>p||m<o)||i.push(new b.SingleCursorState(new M.Range(t,l,t,l),0,new N.Position(t,h),0))}if(i.length===0)for(let n=0;n<s;n++){const t=g+(a?-n:n),l=d.getLineMaxColumn(t);i.push(new b.SingleCursorState(new M.Range(t,l,t,l),0,new N.Position(t,l),0))}return{viewStates:i,reversed:a,fromLineNumber:g,fromVisualColumn:p,toLineNumber:c,toVisualColumn:o}}static columnSelectLeft(C,d,g){let p=g.toViewVisualColumn;return p>1&&p--,w.columnSelect(C,d,g.fromViewLineNumber,g.fromViewVisualColumn,g.toViewLineNumber,p)}static columnSelectRight(C,d,g){let p=0;const c=Math.min(g.fromViewLineNumber,g.toViewLineNumber),o=Math.max(g.fromViewLineNumber,g.toViewLineNumber);for(let a=c;a<=o;a++){const u=d.getLineMaxColumn(a),r=b.CursorColumns.visibleColumnFromColumn2(C,d,new N.Position(a,u));p=Math.max(p,r)}let s=g.toViewVisualColumn;return s<p&&s++,this.columnSelect(C,d,g.fromViewLineNumber,g.fromViewVisualColumn,g.toViewLineNumber,s)}static columnSelectUp(C,d,g,p){const c=p?C.pageSize:1,o=Math.max(1,g.toViewLineNumber-c);return this.columnSelect(C,d,g.fromViewLineNumber,g.fromViewVisualColumn,o,g.toViewVisualColumn)}static columnSelectDown(C,d,g,p){const c=p?C.pageSize:1,o=Math.min(d.getLineCount(),g.toViewLineNumber+c);return this.columnSelect(C,d,g.fromViewLineNumber,g.fromViewVisualColumn,o,g.toViewVisualColumn)}}e.ColumnSelection=w}),define(Q[180],J([0,1,42,14,3,8,240]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class C{constructor(p,c,o){this.lineNumber=p,this.column=c,this.leftoverVisibleColumns=o}}e.CursorPosition=C;class d{static leftPosition(p,c,o){return o>p.getLineMinColumn(c)?o=o-w.prevCharLength(p.getLineContent(c),o-1):c>1&&(c=c-1,o=p.getLineMaxColumn(c)),new N.Position(c,o)}static leftPositionAtomicSoftTabs(p,c,o,s){const a=p.getLineMinColumn(c),u=p.getLineContent(c),r=S.AtomicTabMoveOperations.atomicPosition(u,o-1,s,0);return r===-1||r+1<a?this.leftPosition(p,c,o):new N.Position(c,r+1)}static left(p,c,o,s){const a=p.stickyTabStops?d.leftPositionAtomicSoftTabs(c,o,s,p.tabSize):d.leftPosition(c,o,s);return new C(a.lineNumber,a.column,0)}static moveLeft(p,c,o,s,a){let u,r;if(o.hasSelection()&&!s)u=o.selection.startLineNumber,r=o.selection.startColumn;else{let i=d.left(p,c,o.position.lineNumber,o.position.column-(a-1));u=i.lineNumber,r=i.column}return o.move(s,u,r,0)}static rightPosition(p,c,o){return o<p.getLineMaxColumn(c)?o=o+w.nextCharLength(p.getLineContent(c),o-1):c<p.getLineCount()&&(c=c+1,o=p.getLineMinColumn(c)),new N.Position(c,o)}static rightPositionAtomicSoftTabs(p,c,o,s,a){const u=p.getLineContent(c),r=S.AtomicTabMoveOperations.atomicPosition(u,o-1,s,1);return r===-1?this.rightPosition(p,c,o):new N.Position(c,r+1)}static right(p,c,o,s){const a=p.stickyTabStops?d.rightPositionAtomicSoftTabs(c,o,s,p.tabSize,p.indentSize):d.rightPosition(c,o,s);return new C(a.lineNumber,a.column,0)}static moveRight(p,c,o,s,a){let u,r;if(o.hasSelection()&&!s)u=o.selection.endLineNumber,r=o.selection.endColumn;else{let i=d.right(p,c,o.position.lineNumber,o.position.column+(a-1));u=i.lineNumber,r=i.column}return o.move(s,u,r,0)}static down(p,c,o,s,a,u,r){const i=b.CursorColumns.visibleColumnFromColumn(c.getLineContent(o),s,p.tabSize)+a,n=c.getLineCount(),t=o===n&&s===c.getLineMaxColumn(o);return o=o+u,o>n?(o=n,r?s=c.getLineMaxColumn(o):s=Math.min(c.getLineMaxColumn(o),s)):s=b.CursorColumns.columnFromVisibleColumn2(p,c,o,i),t?a=0:a=i-b.CursorColumns.visibleColumnFromColumn(c.getLineContent(o),s,p.tabSize),new C(o,s,a)}static moveDown(p,c,o,s,a){let u,r;o.hasSelection()&&!s?(u=o.selection.endLineNumber,r=o.selection.endColumn):(u=o.position.lineNumber,r=o.position.column);let i=d.down(p,c,u,r,o.leftoverVisibleColumns,a,!0);return o.move(s,i.lineNumber,i.column,i.leftoverVisibleColumns)}static translateDown(p,c,o){let s=o.selection,a=d.down(p,c,s.selectionStartLineNumber,s.selectionStartColumn,o.selectionStartLeftoverVisibleColumns,1,!1),u=d.down(p,c,s.positionLineNumber,s.positionColumn,o.leftoverVisibleColumns,1,!1);return new b.SingleCursorState(new M.Range(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new N.Position(u.lineNumber,u.column),u.leftoverVisibleColumns)}static up(p,c,o,s,a,u,r){const i=b.CursorColumns.visibleColumnFromColumn(c.getLineContent(o),s,p.tabSize)+a,n=o===1&&s===1;return o=o-u,o<1?(o=1,r?s=c.getLineMinColumn(o):s=Math.min(c.getLineMaxColumn(o),s)):s=b.CursorColumns.columnFromVisibleColumn2(p,c,o,i),n?a=0:a=i-b.CursorColumns.visibleColumnFromColumn(c.getLineContent(o),s,p.tabSize),new C(o,s,a)}static moveUp(p,c,o,s,a){let u,r;o.hasSelection()&&!s?(u=o.selection.startLineNumber,r=o.selection.startColumn):(u=o.position.lineNumber,r=o.position.column);let i=d.up(p,c,u,r,o.leftoverVisibleColumns,a,!0);return o.move(s,i.lineNumber,i.column,i.leftoverVisibleColumns)}static translateUp(p,c,o){let s=o.selection,a=d.up(p,c,s.selectionStartLineNumber,s.selectionStartColumn,o.selectionStartLeftoverVisibleColumns,1,!1),u=d.up(p,c,s.positionLineNumber,s.positionColumn,o.leftoverVisibleColumns,1,!1);return new b.SingleCursorState(new M.Range(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new N.Position(u.lineNumber,u.column),u.leftoverVisibleColumns)}static _isBlankLine(p,c){return p.getLineFirstNonWhitespaceColumn(c)===0}static moveToPrevBlankLine(p,c,o,s){let a=o.position.lineNumber;for(;a>1&&this._isBlankLine(c,a);)a--;for(;a>1&&!this._isBlankLine(c,a);)a--;return o.move(s,a,c.getLineMinColumn(a),0)}static moveToNextBlankLine(p,c,o,s){const a=c.getLineCount();let u=o.position.lineNumber;for(;u<a&&this._isBlankLine(c,u);)u++;for(;u<a&&!this._isBlankLine(c,u);)u++;return o.move(s,u,c.getLineMinColumn(u),0)}static moveToBeginningOfLine(p,c,o,s){let a=o.position.lineNumber,u=c.getLineMinColumn(a),r=c.getLineFirstNonWhitespaceColumn(a)||u,i;return o.position.column===r?i=u:i=r,o.move(s,a,i,0)}static moveToEndOfLine(p,c,o,s,a){let u=o.position.lineNumber,r=c.getLineMaxColumn(u);return o.move(s,u,r,a?1073741824-r:0)}static moveToBeginningOfBuffer(p,c,o,s){return o.move(s,1,1,0)}static moveToEndOfBuffer(p,c,o,s){let a=c.getLineCount(),u=c.getLineMaxColumn(a);return o.move(s,a,u,0)}}e.MoveOperations=d}),define(Q[181],J([0,1,8,92,42,180,3]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class C{static deleteRight(g,p,c,o){let s=[],a=g!==3;for(let u=0,r=o.length;u<r;u++){const i=o[u];let n=i;if(n.isEmpty()){let t=i.getPosition(),l=w.MoveOperations.right(p,c,t.lineNumber,t.column);n=new S.Range(l.lineNumber,l.column,t.lineNumber,t.column)}if(n.isEmpty()){s[u]=null;continue}n.startLineNumber!==n.endLineNumber&&(a=!0),s[u]=new N.ReplaceCommand(n,"")}return[a,s]}static isAutoClosingPairDelete(g,p,c,o,s){if(g==="never"&&p==="never")return!1;for(let a=0,u=s.length;a<u;a++){const r=s[a],i=r.getPosition();if(!r.isEmpty())return!1;const n=o.getLineContent(i.lineNumber);if(i.column<2||i.column>=n.length+1)return!1;const t=n.charAt(i.column-2),l=c.get(t);if(!l)return!1;if(M.isQuote(t)){if(p==="never")return!1}else if(g==="never")return!1;const h=n.charAt(i.column-1);let m=!1;for(const _ of l)_.open===t&&_.close===h&&(m=!0);if(!m)return!1}return!0}static _runAutoClosingPairDelete(g,p,c){let o=[];for(let s=0,a=c.length;s<a;s++){const u=c[s].getPosition(),r=new S.Range(u.lineNumber,u.column-1,u.lineNumber,u.column+1);o[s]=new N.ReplaceCommand(r,"")}return[!0,o]}static deleteLeft(g,p,c,o){if(this.isAutoClosingPairDelete(p.autoClosingBrackets,p.autoClosingQuotes,p.autoClosingPairs.autoClosingPairsOpenByEnd,c,o))return this._runAutoClosingPairDelete(p,c,o);let s=[],a=g!==2;for(let u=0,r=o.length;u<r;u++){const i=o[u];let n=i;if(n.isEmpty()){let t=i.getPosition();if(p.useTabStops&&t.column>1){let l=c.getLineContent(t.lineNumber),h=b.firstNonWhitespaceIndex(l),m=h===-1?l.length+1:h+1;if(t.column<=m){let _=M.CursorColumns.visibleColumnFromColumn2(p,c,t),f=M.CursorColumns.prevIndentTabStop(_,p.indentSize),v=M.CursorColumns.columnFromVisibleColumn2(p,c,t.lineNumber,f);n=new S.Range(t.lineNumber,v,t.lineNumber,t.column)}else n=new S.Range(t.lineNumber,t.column-1,t.lineNumber,t.column)}else{let l=w.MoveOperations.left(p,c,t.lineNumber,t.column);n=new S.Range(l.lineNumber,l.column,t.lineNumber,t.column)}}if(n.isEmpty()){s[u]=null;continue}n.startLineNumber!==n.endLineNumber&&(a=!0),s[u]=new N.ReplaceCommand(n,"")}return[a,s]}static cut(g,p,c){let o=[];for(let s=0,a=c.length;s<a;s++){const u=c[s];if(u.isEmpty())if(g.emptySelectionClipboard){let r=u.getPosition(),i,n,t,l;r.lineNumber<p.getLineCount()?(i=r.lineNumber,n=1,t=r.lineNumber+1,l=1):r.lineNumber>1?(i=r.lineNumber-1,n=p.getLineMaxColumn(r.lineNumber-1),t=r.lineNumber,l=p.getLineMaxColumn(r.lineNumber)):(i=r.lineNumber,n=1,t=r.lineNumber,l=p.getLineMaxColumn(r.lineNumber));let h=new S.Range(i,n,t,l);h.isEmpty()?o[s]=null:o[s]=new N.ReplaceCommand(h,"")}else o[s]=null;else o[s]=new N.ReplaceCommand(u,"")}return new M.EditOperationResult(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=C}),define(Q[182],J([0,1,12,8,92,179,367,42,106,3,21,109,41]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class s{static indent(r,i,n){if(i===null||n===null)return[];let t=[];for(let l=0,h=n.length;l<h;l++)t[l]=new w.ShiftCommand(n[l],{isUnshift:!1,tabSize:r.tabSize,indentSize:r.indentSize,insertSpaces:r.insertSpaces,useTabStops:r.useTabStops,autoIndent:r.autoIndent});return t}static outdent(r,i,n){let t=[];for(let l=0,h=n.length;l<h;l++)t[l]=new w.ShiftCommand(n[l],{isUnshift:!0,tabSize:r.tabSize,indentSize:r.indentSize,insertSpaces:r.insertSpaces,useTabStops:r.useTabStops,autoIndent:r.autoIndent});return t}static shiftIndent(r,i,n){return n=n||1,w.ShiftCommand.shiftIndent(i,i.length+n,r.tabSize,r.indentSize,r.insertSpaces)}static unshiftIndent(r,i,n){return n=n||1,w.ShiftCommand.unshiftIndent(i,i.length+n,r.tabSize,r.indentSize,r.insertSpaces)}static _distributedPaste(r,i,n,t){let l=[];for(let h=0,m=n.length;h<m;h++)l[h]=new M.ReplaceCommand(n[h],t[h]);return new C.EditOperationResult(0,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(r,i,n,t,l){let h=[];for(let m=0,_=n.length;m<_;m++){const f=n[m];let v=f.getPosition();if(l&&!f.isEmpty()&&(l=!1),l&&t.indexOf(`
`)!==t.length-1&&(l=!1),l){let y=new g.Range(v.lineNumber,1,v.lineNumber,1);h[m]=new M.ReplaceCommandThatPreservesSelection(y,t,f,!0)}else h[m]=new M.ReplaceCommand(f,t)}return new C.EditOperationResult(0,h,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(r,i,n,t,l){if(t||i.length===1)return null;if(l&&l.length===i.length)return l;if(r.multiCursorPaste==="spread"){n.charCodeAt(n.length-1)===10&&(n=n.substr(0,n.length-1)),n.charCodeAt(n.length-1)===13&&(n=n.substr(0,n.length-1));let h=N.splitLines(n);if(h.length===i.length)return h}return null}static paste(r,i,n,t,l,h){const m=this._distributePasteToCursors(r,n,t,l,h);return m?(n=n.sort(g.Range.compareRangesUsingStarts),this._distributedPaste(r,i,n,m)):this._simplePaste(r,i,n,t,l)}static _goodIndentForLine(r,i,n){let t=null,l="";const h=o.LanguageConfigurationRegistry.getInheritIndentForLine(r.autoIndent,i,n,!1);if(h)t=h.action,l=h.indentation;else if(n>1){let m;for(m=n-1;m>=1;m--){const v=i.getLineContent(m);if(N.lastNonWhitespaceIndex(v)>=0)break}if(m<1)return null;const _=i.getLineMaxColumn(m),f=o.LanguageConfigurationRegistry.getEnterAction(r.autoIndent,i,new g.Range(m,_,m,_));f&&(l=f.indentation+f.appendText)}return t&&(t===c.IndentAction.Indent&&(l=s.shiftIndent(r,l)),t===c.IndentAction.Outdent&&(l=s.unshiftIndent(r,l)),l=r.normalizeIndentation(l)),l||null}static _replaceJumpToNextIndent(r,i,n,t){let l="",h=n.getStartPosition();if(r.insertSpaces){let m=C.CursorColumns.visibleColumnFromColumn2(r,i,h),_=r.indentSize,f=_-m%_;for(let v=0;v<f;v++)l+=" "}else l=" ";return new M.ReplaceCommand(n,l,t)}static tab(r,i,n){let t=[];for(let l=0,h=n.length;l<h;l++){const m=n[l];if(m.isEmpty()){let _=i.getLineContent(m.startLineNumber);if(/^\s*$/.test(_)&&i.isCheapToTokenize(m.startLineNumber)){let f=this._goodIndentForLine(r,i,m.startLineNumber);f=f||" ";let v=r.normalizeIndentation(f);if(!_.startsWith(v)){t[l]=new M.ReplaceCommand(new g.Range(m.startLineNumber,1,m.startLineNumber,_.length+1),v,!0);continue}}t[l]=this._replaceJumpToNextIndent(r,i,m,!0)}else{if(m.startLineNumber===m.endLineNumber){let _=i.getLineMaxColumn(m.startLineNumber);if(m.startColumn!==1||m.endColumn!==_){t[l]=this._replaceJumpToNextIndent(r,i,m,!1);continue}}t[l]=new w.ShiftCommand(m,{isUnshift:!1,tabSize:r.tabSize,indentSize:r.indentSize,insertSpaces:r.insertSpaces,useTabStops:r.useTabStops,autoIndent:r.autoIndent})}}return t}static compositionType(r,i,n,t,l,h,m,_){const f=t.map(v=>this._compositionType(n,v,l,h,m,_));return new C.EditOperationResult(1,f,{shouldPushStackElementBefore:r!==1,shouldPushStackElementAfter:!1})}static _compositionType(r,i,n,t,l,h){if(!i.isEmpty())return null;const m=i.getPosition(),_=Math.max(1,m.column-t),f=Math.min(r.getLineMaxColumn(m.lineNumber),m.column+l),v=new g.Range(m.lineNumber,_,m.lineNumber,f);return r.getValueInRange(v)===n&&h===0?null:new M.ReplaceCommandWithOffsetCursorState(v,n,0,h)}static _typeCommand(r,i,n){return n?new M.ReplaceCommandWithoutChangingPosition(r,i,!0):new M.ReplaceCommand(r,i,!0)}static _enter(r,i,n,t){if(r.autoIndent===0)return s._typeCommand(t,`
`,n);if(!i.isCheapToTokenize(t.getStartPosition().lineNumber)||r.autoIndent===1){let _=i.getLineContent(t.startLineNumber),f=N.getLeadingWhitespace(_).substring(0,t.startColumn-1);return s._typeCommand(t,`
`+r.normalizeIndentation(f),n)}const l=o.LanguageConfigurationRegistry.getEnterAction(r.autoIndent,i,t);if(l){if(l.indentAction===c.IndentAction.None)return s._typeCommand(t,`
`+r.normalizeIndentation(l.indentation+l.appendText),n);if(l.indentAction===c.IndentAction.Indent)return s._typeCommand(t,`
`+r.normalizeIndentation(l.indentation+l.appendText),n);if(l.indentAction===c.IndentAction.IndentOutdent){const _=r.normalizeIndentation(l.indentation),f=r.normalizeIndentation(l.indentation+l.appendText),v=`
`+f+`
`+_;return n?new M.ReplaceCommandWithoutChangingPosition(t,v,!0):new M.ReplaceCommandWithOffsetCursorState(t,v,-1,f.length-_.length,!0)}else if(l.indentAction===c.IndentAction.Outdent){const _=s.unshiftIndent(r,l.indentation);return s._typeCommand(t,`
`+r.normalizeIndentation(_+l.appendText),n)}}const h=i.getLineContent(t.startLineNumber),m=N.getLeadingWhitespace(h).substring(0,t.startColumn-1);if(r.autoIndent>=4){const _=o.LanguageConfigurationRegistry.getIndentForEnter(r.autoIndent,i,t,{unshiftIndent:f=>s.unshiftIndent(r,f),shiftIndent:f=>s.shiftIndent(r,f),normalizeIndentation:f=>r.normalizeIndentation(f)});if(_){let f=C.CursorColumns.visibleColumnFromColumn2(r,i,t.getEndPosition());const v=t.endColumn,y=i.getLineContent(t.endLineNumber),L=N.firstNonWhitespaceIndex(y);if(L>=0?t=t.setEndPosition(t.endLineNumber,Math.max(t.endColumn,L+1)):t=t.setEndPosition(t.endLineNumber,i.getLineMaxColumn(t.endLineNumber)),n)return new M.ReplaceCommandWithoutChangingPosition(t,`
`+r.normalizeIndentation(_.afterEnter),!0);{let I=0;return v<=L+1&&(r.insertSpaces||(f=Math.ceil(f/r.indentSize)),I=Math.min(f+1-r.normalizeIndentation(_.afterEnter).length-1,0)),new M.ReplaceCommandWithOffsetCursorState(t,`
`+r.normalizeIndentation(_.afterEnter),0,I,!0)}}}return s._typeCommand(t,`
`+r.normalizeIndentation(m),n)}static _isAutoIndentType(r,i,n){if(r.autoIndent<4)return!1;for(let t=0,l=n.length;t<l;t++)if(!i.isCheapToTokenize(n[t].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(r,i,n,t){const l=o.LanguageConfigurationRegistry.getIndentationAtPosition(i,n.startLineNumber,n.startColumn),h=o.LanguageConfigurationRegistry.getIndentActionForType(r.autoIndent,i,n,t,{shiftIndent:m=>s.shiftIndent(r,m),unshiftIndent:m=>s.unshiftIndent(r,m)});if(h===null)return null;if(h!==r.normalizeIndentation(l)){const m=i.getLineFirstNonWhitespaceColumn(n.startLineNumber);return m===0?s._typeCommand(new g.Range(n.startLineNumber,1,n.endLineNumber,n.endColumn),r.normalizeIndentation(h)+t,!1):s._typeCommand(new g.Range(n.startLineNumber,1,n.endLineNumber,n.endColumn),r.normalizeIndentation(h)+i.getLineContent(n.startLineNumber).substring(m-1,n.startColumn-1)+t,!1)}return null}static _isAutoClosingOvertype(r,i,n,t,l){if(r.autoClosingOvertype==="never"||!r.autoClosingPairs.autoClosingPairsCloseSingleChar.has(l))return!1;for(let h=0,m=n.length;h<m;h++){const _=n[h];if(!_.isEmpty())return!1;const f=_.getPosition(),v=i.getLineContent(f.lineNumber);if(v.charAt(f.column-1)!==l)return!1;const L=C.isQuote(l);if((f.column>2?v.charCodeAt(f.column-2):0)===92&&L)return!1;if(r.autoClosingOvertype==="auto"){let k=!1;for(let E=0,T=t.length;E<T;E++){const O=t[E];if(f.lineNumber===O.startLineNumber&&f.column===O.startColumn){k=!0;break}}if(!k)return!1}}return!0}static _runAutoClosingOvertype(r,i,n,t,l){let h=[];for(let m=0,_=t.length;m<_;m++){const v=t[m].getPosition(),y=new g.Range(v.lineNumber,v.column,v.lineNumber,v.column+1);h[m]=new M.ReplaceCommand(y,l)}return new C.EditOperationResult(1,h,{shouldPushStackElementBefore:r!==1,shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(r,i){const n=i.charAt(0),t=r.autoClosingPairs.autoClosingPairsOpenByStart.get(n)||[],l=r.autoClosingPairs.autoClosingPairsCloseByStart.get(n)||[],h=t.some(_=>i.startsWith(_.open)),m=l.some(_=>i.startsWith(_.close));return!h&&m}static _findAutoClosingPairOpen(r,i,n,t){const l=r.autoClosingPairs.autoClosingPairsOpenByEnd.get(t);if(!l)return null;let h=null;for(const m of l)if(h===null||m.open.length>h.open.length){let _=!0;for(const f of n)if(i.getValueInRange(new g.Range(f.lineNumber,f.column-m.open.length+1,f.lineNumber,f.column))+t!==m.open){_=!1;break}_&&(h=m)}return h}static _findSubAutoClosingPairClose(r,i){if(i.open.length<=1)return"";const n=i.close.charAt(i.close.length-1),t=r.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let l=null;for(const h of t)h.open!==i.open&&i.open.includes(h.open)&&i.close.endsWith(h.close)&&(!l||h.open.length>l.open.length)&&(l=h);return l?l.close:""}static _getAutoClosingPairClose(r,i,n,t,l){const h=C.isQuote(t),m=h?r.autoClosingQuotes:r.autoClosingBrackets;if(m==="never")return null;const _=this._findAutoClosingPairOpen(r,i,n.map(L=>L.getPosition()),t);if(!_)return null;const f=this._findSubAutoClosingPairClose(r,_);let v=!0;const y=h?r.shouldAutoCloseBefore.quote:r.shouldAutoCloseBefore.bracket;for(let L=0,I=n.length;L<I;L++){const k=n[L];if(!k.isEmpty())return null;const E=k.getPosition(),T=i.getLineContent(E.lineNumber),O=T.substring(E.column-1);if(O.startsWith(f)||(v=!1),T.length>E.column-1){const F=T.charAt(E.column-1);if(!s._isBeforeClosingBrace(r,O)&&!y(F))return null}if(!i.isCheapToTokenize(E.lineNumber))return null;if(_.open.length===1&&h&&m!=="always"){const F=d.getMapForWordSeparators(r.wordSeparators);if(l&&E.column>1&&F.get(T.charCodeAt(E.column-2))===0||!l&&E.column>2&&F.get(T.charCodeAt(E.column-3))===0)return null}i.forceTokenization(E.lineNumber);const A=i.getLineTokens(E.lineNumber);let B=!1;try{B=o.LanguageConfigurationRegistry.shouldAutoClosePair(_,A,l?E.column:E.column-1)}catch(F){b.onUnexpectedError(F)}if(!B)return null}return v?_.close.substring(0,_.close.length-f.length):_.close}static _runAutoClosingOpenCharType(r,i,n,t,l,h,m){let _=[];for(let f=0,v=t.length;f<v;f++){const y=t[f];_[f]=new a(y,l,h,m)}return new C.EditOperationResult(1,_,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(r,i){return C.isQuote(i)?r.autoSurround==="quotes"||r.autoSurround==="languageDefined":r.autoSurround==="brackets"||r.autoSurround==="languageDefined"}static _isSurroundSelectionType(r,i,n,t){if(!s._shouldSurroundChar(r,t)||!r.surroundingPairs.hasOwnProperty(t))return!1;const l=C.isQuote(t);for(let h=0,m=n.length;h<m;h++){const _=n[h];if(_.isEmpty())return!1;let f=!0;for(let v=_.startLineNumber;v<=_.endLineNumber;v++){const y=i.getLineContent(v),L=v===_.startLineNumber?_.startColumn-1:0,I=v===_.endLineNumber?_.endColumn-1:y.length,k=y.substring(L,I);if(/[^ \t]/.test(k)){f=!1;break}}if(f)return!1;if(l&&_.startLineNumber===_.endLineNumber&&_.startColumn+1===_.endColumn){const v=i.getValueInRange(_);if(C.isQuote(v))return!1}}return!0}static _runSurroundSelectionType(r,i,n,t,l){let h=[];for(let m=0,_=t.length;m<_;m++){const f=t[m],v=i.surroundingPairs[l];h[m]=new S.SurroundSelectionCommand(f,l,v)}return new C.EditOperationResult(0,h,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(r,i,n){return!!(n.length===1&&i.isCheapToTokenize(n[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(r,i,n,t,l){if(!i.electricChars.hasOwnProperty(l)||!t.isEmpty())return null;let h=t.getPosition();n.forceTokenization(h.lineNumber);let m=n.getLineTokens(h.lineNumber),_;try{_=o.LanguageConfigurationRegistry.onElectricCharacter(l,m,h.column)}catch(f){return b.onUnexpectedError(f),null}if(!_)return null;if(_.matchOpenBracket){let f=(m.getLineContent()+l).lastIndexOf(_.matchOpenBracket)+1,v=n.findMatchingBracketUp(_.matchOpenBracket,{lineNumber:h.lineNumber,column:f});if(v){if(v.startLineNumber===h.lineNumber)return null;let y=n.getLineContent(v.startLineNumber),L=N.getLeadingWhitespace(y),I=i.normalizeIndentation(L),k=n.getLineContent(h.lineNumber),E=n.getLineFirstNonWhitespaceColumn(h.lineNumber)||h.column,T=k.substring(E-1,h.column-1),O=I+T+l,A=new g.Range(h.lineNumber,1,h.lineNumber,h.column);const B=new M.ReplaceCommand(A,O);return new C.EditOperationResult(1,[B],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(r,i,n,t,l,h){if(!t||p.Selection.selectionsArrEqual(t,l))return null;let m=null;for(const f of l){if(!f.isEmpty())return null;const v=f.getPosition(),y=n.getValueInRange(new g.Range(v.lineNumber,v.column-1,v.lineNumber,v.column));if(m===null)m=y;else if(m!==y)return null}if(!m)return null;if(this._isAutoClosingOvertype(i,n,l,h,m)){const f=l.map(v=>new M.ReplaceCommand(new g.Range(v.positionLineNumber,v.positionColumn,v.positionLineNumber,v.positionColumn+1),"",!1));return new C.EditOperationResult(1,f,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const _=this._getAutoClosingPairClose(i,n,l,m,!1);return _!==null?this._runAutoClosingOpenCharType(r,i,n,l,m,!1,_):null}static typeWithInterceptors(r,i,n,t,l,h,m){if(!r&&m===`
`){let v=[];for(let y=0,L=l.length;y<L;y++)v[y]=s._enter(n,t,!1,l[y]);return new C.EditOperationResult(1,v,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!r&&this._isAutoIndentType(n,t,l)){let v=[],y=!1;for(let L=0,I=l.length;L<I;L++)if(v[L]=this._runAutoIndentType(n,t,l[L],m),!v[L]){y=!0;break}if(!y)return new C.EditOperationResult(1,v,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!r&&this._isAutoClosingOvertype(n,t,l,h,m))return this._runAutoClosingOvertype(i,n,t,l,m);if(!r){const v=this._getAutoClosingPairClose(n,t,l,m,!0);if(v)return this._runAutoClosingOpenCharType(i,n,t,l,m,!0,v)}if(this._isSurroundSelectionType(n,t,l,m))return this._runSurroundSelectionType(i,n,t,l,m);if(!r&&this._isTypeInterceptorElectricChar(n,t,l)){const v=this._typeInterceptorElectricChar(i,n,t,l[0],m);if(v)return v}let _=[];for(let v=0,y=l.length;v<y;v++)_[v]=new M.ReplaceCommand(l[v],m);let f=i!==1;return m===" "&&(f=!0),new C.EditOperationResult(1,_,{shouldPushStackElementBefore:f,shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(r,i,n,t,l){let h=[];for(let m=0,_=t.length;m<_;m++)h[m]=new M.ReplaceCommand(t[m],l);return new C.EditOperationResult(1,h,{shouldPushStackElementBefore:r!==1,shouldPushStackElementAfter:!1})}static lineInsertBefore(r,i,n){if(i===null||n===null)return[];let t=[];for(let l=0,h=n.length;l<h;l++){let m=n[l].positionLineNumber;if(m===1)t[l]=new M.ReplaceCommandWithoutChangingPosition(new g.Range(1,1,1,1),`
`);else{m--;let _=i.getLineMaxColumn(m);t[l]=this._enter(r,i,!1,new g.Range(m,_,m,_))}}return t}static lineInsertAfter(r,i,n){if(i===null||n===null)return[];let t=[];for(let l=0,h=n.length;l<h;l++){const m=n[l].positionLineNumber;let _=i.getLineMaxColumn(m);t[l]=this._enter(r,i,!1,new g.Range(m,_,m,_))}return t}static lineBreakInsert(r,i,n){let t=[];for(let l=0,h=n.length;l<h;l++)t[l]=this._enter(r,i,!0,n[l]);return t}}e.TypeOperations=s;class a extends M.ReplaceCommandWithOffsetCursorState{constructor(r,i,n,t){super(r,(n?i:"")+t,0,-t.length);this._openCharacter=i,this._closeCharacter=t,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(r,i){let t=i.getInverseEditOperations()[0].range;return this.closeCharacterRange=new g.Range(t.startLineNumber,t.endColumn-this._closeCharacter.length,t.endLineNumber,t.endColumn),this.enclosingRange=new g.Range(t.startLineNumber,t.endColumn-this._openCharacter.length-this._closeCharacter.length,t.endLineNumber,t.endColumn),super.computeCursorState(r,i)}}e.TypeWithAutoClosingCommand=a}),define(Q[136],J([0,1,8,42,181,106,14,3]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class d{static _createWord(o,s,a,u,r){return{start:u,end:r,wordType:s,nextCharClass:a}}static _findPreviousWordOnLine(o,s,a){let u=s.getLineContent(a.lineNumber);return this._doFindPreviousWordOnLine(u,o,a)}static _doFindPreviousWordOnLine(o,s,a){let u=0;for(let r=a.column-2;r>=0;r--){let i=o.charCodeAt(r),n=s.get(i);if(n===0){if(u===2)return this._createWord(o,u,n,r+1,this._findEndOfWord(o,s,u,r+1));u=1}else if(n===2){if(u===1)return this._createWord(o,u,n,r+1,this._findEndOfWord(o,s,u,r+1));u=2}else if(n===1&&u!==0)return this._createWord(o,u,n,r+1,this._findEndOfWord(o,s,u,r+1))}return u!==0?this._createWord(o,u,1,0,this._findEndOfWord(o,s,u,0)):null}static _findEndOfWord(o,s,a,u){let r=o.length;for(let i=u;i<r;i++){let n=o.charCodeAt(i),t=s.get(n);if(t===1||a===1&&t===2||a===2&&t===0)return i}return r}static _findNextWordOnLine(o,s,a){let u=s.getLineContent(a.lineNumber);return this._doFindNextWordOnLine(u,o,a)}static _doFindNextWordOnLine(o,s,a){let u=0,r=o.length;for(let i=a.column-1;i<r;i++){let n=o.charCodeAt(i),t=s.get(n);if(t===0){if(u===2)return this._createWord(o,u,t,this._findStartOfWord(o,s,u,i-1),i);u=1}else if(t===2){if(u===1)return this._createWord(o,u,t,this._findStartOfWord(o,s,u,i-1),i);u=2}else if(t===1&&u!==0)return this._createWord(o,u,t,this._findStartOfWord(o,s,u,i-1),i)}return u!==0?this._createWord(o,u,1,this._findStartOfWord(o,s,u,r-1),r):null}static _findStartOfWord(o,s,a,u){for(let r=u;r>=0;r--){let i=o.charCodeAt(r),n=s.get(i);if(n===1||a===1&&n===2||a===2&&n===0)return r+1}return 0}static moveWordLeft(o,s,a,u){let r=a.lineNumber,i=a.column;i===1&&r>1&&(r=r-1,i=s.getLineMaxColumn(r));let n=d._findPreviousWordOnLine(o,s,new S.Position(r,i));if(u===0)return new S.Position(r,n?n.start+1:1);if(u===1)return n&&n.wordType===2&&n.end-n.start==1&&n.nextCharClass===0&&(n=d._findPreviousWordOnLine(o,s,new S.Position(r,n.start+1))),new S.Position(r,n?n.start+1:1);if(u===3){for(;n&&n.wordType===2;)n=d._findPreviousWordOnLine(o,s,new S.Position(r,n.start+1));return new S.Position(r,n?n.start+1:1)}return n&&i<=n.end+1&&(n=d._findPreviousWordOnLine(o,s,new S.Position(r,n.start+1))),new S.Position(r,n?n.end+1:1)}static _moveWordPartLeft(o,s){const a=s.lineNumber,u=o.getLineMaxColumn(a);if(s.column===1)return a>1?new S.Position(a-1,o.getLineMaxColumn(a-1)):s;const r=o.getLineContent(a);for(let i=s.column-1;i>1;i--){const n=r.charCodeAt(i-2),t=r.charCodeAt(i-1);if(n===95&&t!==95)return new S.Position(a,i);if(b.isLowerAsciiLetter(n)&&b.isUpperAsciiLetter(t))return new S.Position(a,i);if(b.isUpperAsciiLetter(n)&&b.isUpperAsciiLetter(t)&&i+1<u){const l=r.charCodeAt(i);if(b.isLowerAsciiLetter(l))return new S.Position(a,i)}}return new S.Position(a,1)}static moveWordRight(o,s,a,u){let r=a.lineNumber,i=a.column,n=!1;i===s.getLineMaxColumn(r)&&r<s.getLineCount()&&(n=!0,r=r+1,i=1);let t=d._findNextWordOnLine(o,s,new S.Position(r,i));if(u===2)t&&t.wordType===2&&t.end-t.start==1&&t.nextCharClass===0&&(t=d._findNextWordOnLine(o,s,new S.Position(r,t.end+1))),t?i=t.end+1:i=s.getLineMaxColumn(r);else if(u===3){for(n&&(i=0);t&&(t.wordType===2||t.start+1<=i);)t=d._findNextWordOnLine(o,s,new S.Position(r,t.end+1));t?i=t.start+1:i=s.getLineMaxColumn(r)}else t&&!n&&i>=t.start+1&&(t=d._findNextWordOnLine(o,s,new S.Position(r,t.end+1))),t?i=t.start+1:i=s.getLineMaxColumn(r);return new S.Position(r,i)}static _moveWordPartRight(o,s){const a=s.lineNumber,u=o.getLineMaxColumn(a);if(s.column===u)return a<o.getLineCount()?new S.Position(a+1,1):s;const r=o.getLineContent(a);for(let i=s.column+1;i<u;i++){const n=r.charCodeAt(i-2),t=r.charCodeAt(i-1);if(n!==95&&t===95)return new S.Position(a,i);if(b.isLowerAsciiLetter(n)&&b.isUpperAsciiLetter(t))return new S.Position(a,i);if(b.isUpperAsciiLetter(n)&&b.isUpperAsciiLetter(t)&&i+1<u){const l=r.charCodeAt(i);if(b.isLowerAsciiLetter(l))return new S.Position(a,i)}}return new S.Position(a,u)}static _deleteWordLeftWhitespace(o,s){const a=o.getLineContent(s.lineNumber),u=s.column-2,r=b.lastNonWhitespaceIndex(a,u);return r+1<u?new C.Range(s.lineNumber,r+2,s.lineNumber,s.column):null}static deleteWordLeft(o,s){const a=o.wordSeparators,u=o.model,r=o.selection,i=o.whitespaceHeuristics;if(!r.isEmpty())return r;if(M.DeleteOperations.isAutoClosingPairDelete(o.autoClosingBrackets,o.autoClosingQuotes,o.autoClosingPairs.autoClosingPairsOpenByEnd,o.model,[o.selection])){const m=o.selection.getPosition();return new C.Range(m.lineNumber,m.column-1,m.lineNumber,m.column+1)}const n=new S.Position(r.positionLineNumber,r.positionColumn);let t=n.lineNumber,l=n.column;if(t===1&&l===1)return null;if(i){let m=this._deleteWordLeftWhitespace(u,n);if(m)return m}let h=d._findPreviousWordOnLine(a,u,n);return s===0?h?l=h.start+1:l>1?l=1:(t--,l=u.getLineMaxColumn(t)):(h&&l<=h.end+1&&(h=d._findPreviousWordOnLine(a,u,new S.Position(t,h.start+1))),h?l=h.end+1:l>1?l=1:(t--,l=u.getLineMaxColumn(t))),new C.Range(t,l,n.lineNumber,n.column)}static deleteInsideWord(o,s,a){if(!a.isEmpty())return a;const u=new S.Position(a.positionLineNumber,a.positionColumn);let r=this._deleteInsideWordWhitespace(s,u);return r||this._deleteInsideWordDetermineDeleteRange(o,s,u)}static _charAtIsWhitespace(o,s){const a=o.charCodeAt(s);return a===32||a===9}static _deleteInsideWordWhitespace(o,s){const a=o.getLineContent(s.lineNumber),u=a.length;if(u===0)return null;let r=Math.max(s.column-2,0);if(!this._charAtIsWhitespace(a,r))return null;let i=Math.min(s.column-1,u-1);if(!this._charAtIsWhitespace(a,i))return null;for(;r>0&&this._charAtIsWhitespace(a,r-1);)r--;for(;i+1<u&&this._charAtIsWhitespace(a,i+1);)i++;return new C.Range(s.lineNumber,r+1,s.lineNumber,i+2)}static _deleteInsideWordDetermineDeleteRange(o,s,a){const u=s.getLineContent(a.lineNumber),r=u.length;if(r===0)return a.lineNumber>1?new C.Range(a.lineNumber-1,s.getLineMaxColumn(a.lineNumber-1),a.lineNumber,1):a.lineNumber<s.getLineCount()?new C.Range(a.lineNumber,1,a.lineNumber+1,1):new C.Range(a.lineNumber,1,a.lineNumber,1);const i=m=>m.start+1<=a.column&&a.column<=m.end+1,n=(m,_)=>(m=Math.min(m,a.column),_=Math.max(_,a.column),new C.Range(a.lineNumber,m,a.lineNumber,_)),t=m=>{let _=m.start+1,f=m.end+1,v=!1;for(;f-1<r&&this._charAtIsWhitespace(u,f-1);)v=!0,f++;if(!v)for(;_>1&&this._charAtIsWhitespace(u,_-2);)_--;return n(_,f)},l=d._findPreviousWordOnLine(o,s,a);if(l&&i(l))return t(l);const h=d._findNextWordOnLine(o,s,a);return h&&i(h)?t(h):l&&h?n(l.end+1,h.start+1):l?n(l.start+1,l.end+1):h?n(h.start+1,h.end+1):n(1,r+1)}static _deleteWordPartLeft(o,s){if(!s.isEmpty())return s;const a=s.getPosition(),u=d._moveWordPartLeft(o,a);return new C.Range(a.lineNumber,a.column,u.lineNumber,u.column)}static _findFirstNonWhitespaceChar(o,s){let a=o.length;for(let u=s;u<a;u++){let r=o.charAt(u);if(r!==" "&&r!==" ")return u}return a}static _deleteWordRightWhitespace(o,s){const a=o.getLineContent(s.lineNumber),u=s.column-1,r=this._findFirstNonWhitespaceChar(a,u);return u+1<r?new C.Range(s.lineNumber,s.column,s.lineNumber,r+1):null}static deleteWordRight(o,s){const a=o.wordSeparators,u=o.model,r=o.selection,i=o.whitespaceHeuristics;if(!r.isEmpty())return r;const n=new S.Position(r.positionLineNumber,r.positionColumn);let t=n.lineNumber,l=n.column;const h=u.getLineCount(),m=u.getLineMaxColumn(t);if(t===h&&l===m)return null;if(i){let f=this._deleteWordRightWhitespace(u,n);if(f)return f}let _=d._findNextWordOnLine(a,u,n);return s===2?_?l=_.end+1:l<m||t===h?l=m:(t++,_=d._findNextWordOnLine(a,u,new S.Position(t,1)),_?l=_.start+1:l=u.getLineMaxColumn(t)):(_&&l>=_.start+1&&(_=d._findNextWordOnLine(a,u,new S.Position(t,_.end+1))),_?l=_.start+1:l<m||t===h?l=m:(t++,_=d._findNextWordOnLine(a,u,new S.Position(t,1)),_?l=_.start+1:l=u.getLineMaxColumn(t))),new C.Range(t,l,n.lineNumber,n.column)}static _deleteWordPartRight(o,s){if(!s.isEmpty())return s;const a=s.getPosition(),u=d._moveWordPartRight(o,a);return new C.Range(a.lineNumber,a.column,u.lineNumber,u.column)}static _createWordAtPosition(o,s,a){const u=new C.Range(s,a.start+1,s,a.end+1);return{word:o.getValueInRange(u),startColumn:u.startColumn,endColumn:u.endColumn}}static getWordAtPosition(o,s,a){const u=w.getMapForWordSeparators(s),r=d._findPreviousWordOnLine(u,o,a);if(r&&r.wordType===1&&r.start<=a.column-1&&a.column-1<=r.end)return d._createWordAtPosition(o,a.lineNumber,r);const i=d._findNextWordOnLine(u,o,a);return i&&i.wordType===1&&i.start<=a.column-1&&a.column-1<=i.end?d._createWordAtPosition(o,a.lineNumber,i):null}static word(o,s,a,u,r){const i=w.getMapForWordSeparators(o.wordSeparators);let n=d._findPreviousWordOnLine(i,s,r),t=d._findNextWordOnLine(i,s,r);if(!u){let f,v;return n&&n.wordType===1&&n.start<=r.column-1&&r.column-1<=n.end?(f=n.start+1,v=n.end+1):t&&t.wordType===1&&t.start<=r.column-1&&r.column-1<=t.end?(f=t.start+1,v=t.end+1):(n?f=n.end+1:f=1,t?v=t.start+1:v=s.getLineMaxColumn(r.lineNumber)),new N.SingleCursorState(new C.Range(r.lineNumber,f,r.lineNumber,v),0,new S.Position(r.lineNumber,v),0)}let l,h;n&&n.wordType===1&&n.start<r.column-1&&r.column-1<n.end?(l=n.start+1,h=n.end+1):t&&t.wordType===1&&t.start<r.column-1&&r.column-1<t.end?(l=t.start+1,h=t.end+1):(l=r.column,h=r.column);let m=r.lineNumber,_;if(a.selectionStart.containsPosition(r))_=a.selectionStart.endColumn;else if(r.isBeforeOrEqual(a.selectionStart.getStartPosition())){_=l;let f=new S.Position(m,_);a.selectionStart.containsPosition(f)&&(_=a.selectionStart.endColumn)}else{_=h;let f=new S.Position(m,_);a.selectionStart.containsPosition(f)&&(_=a.selectionStart.startColumn)}return a.move(!0,m,_,0)}}e.WordOperations=d;class g extends d{static deleteWordPartLeft(o){const s=p([d.deleteWordLeft(o,0),d.deleteWordLeft(o,2),d._deleteWordPartLeft(o.model,o.selection)]);return s.sort(C.Range.compareRangesUsingEnds),s[2]}static deleteWordPartRight(o){const s=p([d.deleteWordRight(o,0),d.deleteWordRight(o,2),d._deleteWordPartRight(o.model,o.selection)]);return s.sort(C.Range.compareRangesUsingStarts),s[0]}static moveWordPartLeft(o,s,a){const u=p([d.moveWordLeft(o,s,a,0),d.moveWordLeft(o,s,a,2),d._moveWordPartLeft(s,a)]);return u.sort(S.Position.compare),u[2]}static moveWordPartRight(o,s,a){const u=p([d.moveWordRight(o,s,a,0),d.moveWordRight(o,s,a,2),d._moveWordPartRight(s,a)]);return u.sort(S.Position.compare),u[0]}}e.WordPartOperations=g;function p(c){return c.filter(o=>Boolean(o))}}),define(Q[241],J([0,1,20,42,180,136,14,3]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class d{static addCursorDown(c,o,s){let a=[],u=0;for(let r=0,i=o.length;r<i;r++){const n=o[r];a[u++]=new N.CursorState(n.modelState,n.viewState),s?a[u++]=N.CursorState.fromModelState(M.MoveOperations.translateDown(c.cursorConfig,c.model,n.modelState)):a[u++]=N.CursorState.fromViewState(M.MoveOperations.translateDown(c.cursorConfig,c,n.viewState))}return a}static addCursorUp(c,o,s){let a=[],u=0;for(let r=0,i=o.length;r<i;r++){const n=o[r];a[u++]=new N.CursorState(n.modelState,n.viewState),s?a[u++]=N.CursorState.fromModelState(M.MoveOperations.translateUp(c.cursorConfig,c.model,n.modelState)):a[u++]=N.CursorState.fromViewState(M.MoveOperations.translateUp(c.cursorConfig,c,n.viewState))}return a}static moveToBeginningOfLine(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u];a[u]=this._moveToLineStart(c,i,s)}return a}static _moveToLineStart(c,o,s){const a=o.viewState.position.column,u=o.modelState.position.column,r=a===u,i=o.viewState.position.lineNumber,n=c.getLineFirstNonWhitespaceColumn(i);return!r&&!(a===n)?this._moveToLineStartByView(c,o,s):this._moveToLineStartByModel(c,o,s)}static _moveToLineStartByView(c,o,s){return N.CursorState.fromViewState(M.MoveOperations.moveToBeginningOfLine(c.cursorConfig,c,o.viewState,s))}static _moveToLineStartByModel(c,o,s){return N.CursorState.fromModelState(M.MoveOperations.moveToBeginningOfLine(c.cursorConfig,c.model,o.modelState,s))}static moveToEndOfLine(c,o,s,a){let u=[];for(let r=0,i=o.length;r<i;r++){const n=o[r];u[r]=this._moveToLineEnd(c,n,s,a)}return u}static _moveToLineEnd(c,o,s,a){const u=o.viewState.position,r=c.getLineMaxColumn(u.lineNumber),i=u.column===r,n=o.modelState.position,t=c.model.getLineMaxColumn(n.lineNumber),l=r-u.column==t-n.column;return i||l?this._moveToLineEndByModel(c,o,s,a):this._moveToLineEndByView(c,o,s,a)}static _moveToLineEndByView(c,o,s,a){return N.CursorState.fromViewState(M.MoveOperations.moveToEndOfLine(c.cursorConfig,c,o.viewState,s,a))}static _moveToLineEndByModel(c,o,s,a){return N.CursorState.fromModelState(M.MoveOperations.moveToEndOfLine(c.cursorConfig,c.model,o.modelState,s,a))}static expandLineSelection(c,o){let s=[];for(let a=0,u=o.length;a<u;a++){const r=o[a],i=r.modelState.selection.startLineNumber,n=c.model.getLineCount();let t=r.modelState.selection.endLineNumber,l;t===n?l=c.model.getLineMaxColumn(n):(t++,l=1),s[a]=N.CursorState.fromModelState(new N.SingleCursorState(new C.Range(i,1,i,1),0,new S.Position(t,l),0))}return s}static moveToBeginningOfBuffer(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u];a[u]=N.CursorState.fromModelState(M.MoveOperations.moveToBeginningOfBuffer(c.cursorConfig,c.model,i.modelState,s))}return a}static moveToEndOfBuffer(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u];a[u]=N.CursorState.fromModelState(M.MoveOperations.moveToEndOfBuffer(c.cursorConfig,c.model,i.modelState,s))}return a}static selectAll(c,o){const s=c.model.getLineCount(),a=c.model.getLineMaxColumn(s);return N.CursorState.fromModelState(new N.SingleCursorState(new C.Range(1,1,1,1),0,new S.Position(s,a),0))}static line(c,o,s,a,u){const r=c.model.validatePosition(a),i=u?c.coordinatesConverter.validateViewPosition(new S.Position(u.lineNumber,u.column),r):c.coordinatesConverter.convertModelPositionToViewPosition(r);if(!s||!o.modelState.hasSelection()){const t=c.model.getLineCount();let l=r.lineNumber+1,h=1;return l>t&&(l=t,h=c.model.getLineMaxColumn(l)),N.CursorState.fromModelState(new N.SingleCursorState(new C.Range(r.lineNumber,1,l,h),0,new S.Position(l,h),0))}const n=o.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<n)return N.CursorState.fromViewState(o.viewState.move(o.modelState.hasSelection(),i.lineNumber,1,0));if(r.lineNumber>n){const t=c.getLineCount();let l=i.lineNumber+1,h=1;return l>t&&(l=t,h=c.getLineMaxColumn(l)),N.CursorState.fromViewState(o.viewState.move(o.modelState.hasSelection(),l,h,0))}else{const t=o.modelState.selectionStart.getEndPosition();return N.CursorState.fromModelState(o.modelState.move(o.modelState.hasSelection(),t.lineNumber,t.column,0))}}static word(c,o,s,a){const u=c.model.validatePosition(a);return N.CursorState.fromModelState(w.WordOperations.word(c.cursorConfig,c.model,o.modelState,s,u))}static cancelSelection(c,o){if(!o.modelState.hasSelection())return new N.CursorState(o.modelState,o.viewState);const s=o.viewState.position.lineNumber,a=o.viewState.position.column;return N.CursorState.fromViewState(new N.SingleCursorState(new C.Range(s,a,s,a),0,new S.Position(s,a),0))}static moveTo(c,o,s,a,u){const r=c.model.validatePosition(a),i=u?c.coordinatesConverter.validateViewPosition(new S.Position(u.lineNumber,u.column),r):c.coordinatesConverter.convertModelPositionToViewPosition(r);return N.CursorState.fromViewState(o.viewState.move(s,i.lineNumber,i.column,0))}static simpleMove(c,o,s,a,u,r){switch(s){case 0:return r===4?this._moveHalfLineLeft(c,o,a):this._moveLeft(c,o,a,u);case 1:return r===4?this._moveHalfLineRight(c,o,a):this._moveRight(c,o,a,u);case 2:return r===2?this._moveUpByViewLines(c,o,a,u):this._moveUpByModelLines(c,o,a,u);case 3:return r===2?this._moveDownByViewLines(c,o,a,u):this._moveDownByModelLines(c,o,a,u);case 4:return r===2?o.map(i=>N.CursorState.fromViewState(M.MoveOperations.moveToPrevBlankLine(c.cursorConfig,c,i.viewState,a))):o.map(i=>N.CursorState.fromModelState(M.MoveOperations.moveToPrevBlankLine(c.cursorConfig,c.model,i.modelState,a)));case 5:return r===2?o.map(i=>N.CursorState.fromViewState(M.MoveOperations.moveToNextBlankLine(c.cursorConfig,c,i.viewState,a))):o.map(i=>N.CursorState.fromModelState(M.MoveOperations.moveToNextBlankLine(c.cursorConfig,c.model,i.modelState,a)));case 6:return this._moveToViewMinColumn(c,o,a);case 7:return this._moveToViewFirstNonWhitespaceColumn(c,o,a);case 8:return this._moveToViewCenterColumn(c,o,a);case 9:return this._moveToViewMaxColumn(c,o,a);case 10:return this._moveToViewLastNonWhitespaceColumn(c,o,a);default:return null}}static viewportMove(c,o,s,a,u){const r=c.getCompletelyVisibleViewRange(),i=c.coordinatesConverter.convertViewRangeToModelRange(r);switch(s){case 11:{const n=this._firstLineNumberInRange(c.model,i,u),t=c.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(c,o[0],a,n,t)]}case 13:{const n=this._lastLineNumberInRange(c.model,i,u),t=c.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(c,o[0],a,n,t)]}case 12:{const n=Math.round((i.startLineNumber+i.endLineNumber)/2),t=c.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(c,o[0],a,n,t)]}case 14:{let n=[];for(let t=0,l=o.length;t<l;t++){const h=o[t];n[t]=this.findPositionInViewportIfOutside(c,h,r,a)}return n}default:return null}}static findPositionInViewportIfOutside(c,o,s,a){let u=o.viewState.position.lineNumber;if(s.startLineNumber<=u&&u<=s.endLineNumber-1)return new N.CursorState(o.modelState,o.viewState);{u>s.endLineNumber-1&&(u=s.endLineNumber-1),u<s.startLineNumber&&(u=s.startLineNumber);const r=c.getLineFirstNonWhitespaceColumn(u);return this._moveToViewPosition(c,o,a,u,r)}}static _firstLineNumberInRange(c,o,s){let a=o.startLineNumber;return o.startColumn!==c.getLineMinColumn(a)&&a++,Math.min(o.endLineNumber,a+s-1)}static _lastLineNumberInRange(c,o,s){let a=o.startLineNumber;return o.startColumn!==c.getLineMinColumn(a)&&a++,Math.max(a,o.endLineNumber-s+1)}static _moveLeft(c,o,s,a){const u=o.length>1;let r=[];for(let i=0,n=o.length;i<n;i++){const t=o[i],l=u||!t.viewState.hasSelection();let h=M.MoveOperations.moveLeft(c.cursorConfig,c,t.viewState,s,a);l&&a===1&&t.viewState.position.column===c.getLineMinColumn(t.viewState.position.lineNumber)&&h.position.lineNumber!==t.viewState.position.lineNumber&&c.coordinatesConverter.convertViewPositionToModelPosition(h.position).lineNumber===t.modelState.position.lineNumber&&(h=M.MoveOperations.moveLeft(c.cursorConfig,c,h,s,1)),r[i]=N.CursorState.fromViewState(h)}return r}static _moveHalfLineLeft(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u],n=i.viewState.position.lineNumber,t=Math.round(c.getLineContent(n).length/2);a[u]=N.CursorState.fromViewState(M.MoveOperations.moveLeft(c.cursorConfig,c,i.viewState,s,t))}return a}static _moveRight(c,o,s,a){const u=o.length>1;let r=[];for(let i=0,n=o.length;i<n;i++){const t=o[i],l=u||!t.viewState.hasSelection();let h=M.MoveOperations.moveRight(c.cursorConfig,c,t.viewState,s,a);l&&a===1&&t.viewState.position.column===c.getLineMaxColumn(t.viewState.position.lineNumber)&&h.position.lineNumber!==t.viewState.position.lineNumber&&c.coordinatesConverter.convertViewPositionToModelPosition(h.position).lineNumber===t.modelState.position.lineNumber&&(h=M.MoveOperations.moveRight(c.cursorConfig,c,h,s,1)),r[i]=N.CursorState.fromViewState(h)}return r}static _moveHalfLineRight(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u],n=i.viewState.position.lineNumber,t=Math.round(c.getLineContent(n).length/2);a[u]=N.CursorState.fromViewState(M.MoveOperations.moveRight(c.cursorConfig,c,i.viewState,s,t))}return a}static _moveDownByViewLines(c,o,s,a){let u=[];for(let r=0,i=o.length;r<i;r++){const n=o[r];u[r]=N.CursorState.fromViewState(M.MoveOperations.moveDown(c.cursorConfig,c,n.viewState,s,a))}return u}static _moveDownByModelLines(c,o,s,a){let u=[];for(let r=0,i=o.length;r<i;r++){const n=o[r];u[r]=N.CursorState.fromModelState(M.MoveOperations.moveDown(c.cursorConfig,c.model,n.modelState,s,a))}return u}static _moveUpByViewLines(c,o,s,a){let u=[];for(let r=0,i=o.length;r<i;r++){const n=o[r];u[r]=N.CursorState.fromViewState(M.MoveOperations.moveUp(c.cursorConfig,c,n.viewState,s,a))}return u}static _moveUpByModelLines(c,o,s,a){let u=[];for(let r=0,i=o.length;r<i;r++){const n=o[r];u[r]=N.CursorState.fromModelState(M.MoveOperations.moveUp(c.cursorConfig,c.model,n.modelState,s,a))}return u}static _moveToViewPosition(c,o,s,a,u){return N.CursorState.fromViewState(o.viewState.move(s,a,u,0))}static _moveToModelPosition(c,o,s,a,u){return N.CursorState.fromModelState(o.modelState.move(s,a,u,0))}static _moveToViewMinColumn(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u],n=i.viewState.position.lineNumber,t=c.getLineMinColumn(n);a[u]=this._moveToViewPosition(c,i,s,n,t)}return a}static _moveToViewFirstNonWhitespaceColumn(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u],n=i.viewState.position.lineNumber,t=c.getLineFirstNonWhitespaceColumn(n);a[u]=this._moveToViewPosition(c,i,s,n,t)}return a}static _moveToViewCenterColumn(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u],n=i.viewState.position.lineNumber,t=Math.round((c.getLineMaxColumn(n)+c.getLineMinColumn(n))/2);a[u]=this._moveToViewPosition(c,i,s,n,t)}return a}static _moveToViewMaxColumn(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u],n=i.viewState.position.lineNumber,t=c.getLineMaxColumn(n);a[u]=this._moveToViewPosition(c,i,s,n,t)}return a}static _moveToViewLastNonWhitespaceColumn(c,o,s){let a=[];for(let u=0,r=o.length;u<r;u++){const i=o[u],n=i.viewState.position.lineNumber,t=c.getLineLastNonWhitespaceColumn(n);a[u]=this._moveToViewPosition(c,i,s,n,t)}return a}}e.CursorMoveCommands=d;var g;(function(p){const c=function(s){if(!b.isObject(s))return!1;let a=s;return!(!b.isString(a.to)||!b.isUndefined(a.select)&&!b.isBoolean(a.select)||!b.isUndefined(a.by)&&!b.isString(a.by)||!b.isUndefined(a.value)&&!b.isNumber(a.value))};p.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
* 'to': A mandatory logical position value providing where to move the cursor.
\`\`\`
'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
\`\`\`
* 'by': Unit to move. Default is computed based on 'to' value.
\`\`\`
'line', 'wrappedLine', 'character', 'halfLine'
\`\`\`
* 'value': Number of units to move. Default is '1'.
* 'select': If 'true' makes the selection. Default is 'false'.
`,constraint:c,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},p.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},p.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function o(s){if(!s.to)return null;let a;switch(s.to){case p.RawDirection.Left:a=0;break;case p.RawDirection.Right:a=1;break;case p.RawDirection.Up:a=2;break;case p.RawDirection.Down:a=3;break;case p.RawDirection.PrevBlankLine:a=4;break;case p.RawDirection.NextBlankLine:a=5;break;case p.RawDirection.WrappedLineStart:a=6;break;case p.RawDirection.WrappedLineFirstNonWhitespaceCharacter:a=7;break;case p.RawDirection.WrappedLineColumnCenter:a=8;break;case p.RawDirection.WrappedLineEnd:a=9;break;case p.RawDirection.WrappedLineLastNonWhitespaceCharacter:a=10;break;case p.RawDirection.ViewPortTop:a=11;break;case p.RawDirection.ViewPortBottom:a=13;break;case p.RawDirection.ViewPortCenter:a=12;break;case p.RawDirection.ViewPortIfOutside:a=14;break;default:return null}let u=0;switch(s.by){case p.RawUnit.Line:u=1;break;case p.RawUnit.WrappedLine:u=2;break;case p.RawUnit.Character:u=3;break;case p.RawUnit.HalfLine:u=4;break}return{direction:a,unit:u,select:!!s.select,value:s.value||1}}p.parse=o})(g=e.CursorMove||(e.CursorMove={}))}),define(Q[537],J([0,1,42,14,3,21]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OneCursor=void 0;class S{constructor(d){this._selTrackedRange=null,this._trackSelection=!0,this._setState(d,new b.SingleCursorState(new M.Range(1,1,1,1),0,new N.Position(1,1),0),new b.SingleCursorState(new M.Range(1,1,1,1),0,new N.Position(1,1),0))}dispose(d){this._removeTrackedRange(d)}startTrackingSelection(d){this._trackSelection=!0,this._updateTrackedRange(d)}stopTrackingSelection(d){this._trackSelection=!1,this._removeTrackedRange(d)}_updateTrackedRange(d){!this._trackSelection||(this._selTrackedRange=d.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(d){this._selTrackedRange=d.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new b.CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(d){const g=d.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===0?new w.Selection(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn):new w.Selection(g.endLineNumber,g.endColumn,g.startLineNumber,g.startColumn)}ensureValidState(d){this._setState(d,this.modelState,this.viewState)}setState(d,g,p){this._setState(d,g,p)}_setState(d,g,p){if(g){const c=d.model.validateRange(g.selectionStart),o=g.selectionStart.equalsRange(c)?g.selectionStartLeftoverVisibleColumns:0,s=d.model.validatePosition(g.position),a=g.position.equals(s)?g.leftoverVisibleColumns:0;g=new b.SingleCursorState(c,o,s,a)}else{if(!p)return;const c=d.model.validateRange(d.coordinatesConverter.convertViewRangeToModelRange(p.selectionStart)),o=d.model.validatePosition(d.coordinatesConverter.convertViewPositionToModelPosition(p.position));g=new b.SingleCursorState(c,p.selectionStartLeftoverVisibleColumns,o,p.leftoverVisibleColumns)}if(p){const c=d.coordinatesConverter.validateViewRange(p.selectionStart,g.selectionStart),o=d.coordinatesConverter.validateViewPosition(p.position,g.position);p=new b.SingleCursorState(c,g.selectionStartLeftoverVisibleColumns,o,g.leftoverVisibleColumns)}else{const c=d.coordinatesConverter.convertModelPositionToViewPosition(new N.Position(g.selectionStart.startLineNumber,g.selectionStart.startColumn)),o=d.coordinatesConverter.convertModelPositionToViewPosition(new N.Position(g.selectionStart.endLineNumber,g.selectionStart.endColumn)),s=new M.Range(c.lineNumber,c.column,o.lineNumber,o.column),a=d.coordinatesConverter.convertModelPositionToViewPosition(g.position);p=new b.SingleCursorState(s,g.selectionStartLeftoverVisibleColumns,a,g.leftoverVisibleColumns)}this.modelState=g,this.viewState=p,this._updateTrackedRange(d)}}e.OneCursor=S}),define(Q[538],J([0,1,42,537,21]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class w{constructor(C){this.context=C,this.primaryCursor=new N.OneCursor(C),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let C=0,d=this.secondaryCursors.length;C<d;C++)this.secondaryCursors[C].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let C=0,d=this.secondaryCursors.length;C<d;C++)this.secondaryCursors[C].stopTrackingSelection(this.context)}updateContext(C){this.context=C}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let C=0,d=this.secondaryCursors.length;C<d;C++)this.secondaryCursors[C].ensureValidState(this.context)}readSelectionFromMarkers(){let C=[];C[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let d=0,g=this.secondaryCursors.length;d<g;d++)C[d+1]=this.secondaryCursors[d].readSelectionFromMarkers(this.context);return C}getAll(){let C=[];C[0]=this.primaryCursor.asCursorState();for(let d=0,g=this.secondaryCursors.length;d<g;d++)C[d+1]=this.secondaryCursors[d].asCursorState();return C}getViewPositions(){let C=[];C[0]=this.primaryCursor.viewState.position;for(let d=0,g=this.secondaryCursors.length;d<g;d++)C[d+1]=this.secondaryCursors[d].viewState.position;return C}getTopMostViewPosition(){let C=this.primaryCursor.viewState.position;for(let d=0,g=this.secondaryCursors.length;d<g;d++){const p=this.secondaryCursors[d].viewState.position;p.isBefore(C)&&(C=p)}return C}getBottomMostViewPosition(){let C=this.primaryCursor.viewState.position;for(let d=0,g=this.secondaryCursors.length;d<g;d++){const p=this.secondaryCursors[d].viewState.position;C.isBeforeOrEqual(p)&&(C=p)}return C}getSelections(){let C=[];C[0]=this.primaryCursor.modelState.selection;for(let d=0,g=this.secondaryCursors.length;d<g;d++)C[d+1]=this.secondaryCursors[d].modelState.selection;return C}getViewSelections(){let C=[];C[0]=this.primaryCursor.viewState.selection;for(let d=0,g=this.secondaryCursors.length;d<g;d++)C[d+1]=this.secondaryCursors[d].viewState.selection;return C}setSelections(C){this.setStates(b.CursorState.fromModelSelections(C))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(C){C!==null&&(this.primaryCursor.setState(this.context,C[0].modelState,C[0].viewState),this._setSecondaryStates(C.slice(1)))}_setSecondaryStates(C){const d=this.secondaryCursors.length,g=C.length;if(d<g){let p=g-d;for(let c=0;c<p;c++)this._addSecondaryCursor()}else if(d>g){let p=d-g;for(let c=0;c<p;c++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let p=0;p<g;p++)this.secondaryCursors[p].setState(this.context,C[p].modelState,C[p].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new N.OneCursor(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return this.secondaryCursors.length===0||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(C){this.lastAddedCursorIndex>=C+1&&this.lastAddedCursorIndex--,this.secondaryCursors[C].dispose(this.context),this.secondaryCursors.splice(C,1)}_getAll(){let C=[];C[0]=this.primaryCursor;for(let d=0,g=this.secondaryCursors.length;d<g;d++)C[d+1]=this.secondaryCursors[d];return C}normalize(){if(this.secondaryCursors.length!==0){let C=this._getAll(),d=[];for(let g=0,p=C.length;g<p;g++)d.push({index:g,selection:C[g].modelState.selection});d.sort((g,p)=>g.selection.startLineNumber===p.selection.startLineNumber?g.selection.startColumn-p.selection.startColumn:g.selection.startLineNumber-p.selection.startLineNumber);for(let g=0;g<d.length-1;g++){const p=d[g],c=d[g+1],o=p.selection,s=c.selection;if(!!this.context.cursorConfig.multiCursorMergeOverlapping){let a;if(s.isEmpty()||o.isEmpty()?a=s.getStartPosition().isBeforeOrEqual(o.getEndPosition()):a=s.getStartPosition().isBefore(o.getEndPosition()),a){const u=p.index<c.index?g:g+1,r=p.index<c.index?g+1:g,i=d[r].index,n=d[u].index,t=d[r].selection,l=d[u].selection;if(!t.equalsSelection(l)){const h=t.plusRange(l),m=t.selectionStartLineNumber===t.startLineNumber&&t.selectionStartColumn===t.startColumn,_=l.selectionStartLineNumber===l.startLineNumber&&l.selectionStartColumn===l.startColumn;let f;i===this.lastAddedCursorIndex?(f=m,this.lastAddedCursorIndex=n):f=_;let v;f?v=new M.Selection(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn):v=new M.Selection(h.endLineNumber,h.endColumn,h.startLineNumber,h.startColumn),d[u].selection=v;const y=b.CursorState.fromModelSelection(v);C[n].setState(this.context,y.modelState,y.viewState)}for(const h of d)h.index>i&&h.index--;C.splice(i,1),d.splice(r,1),this._removeSecondaryCursor(i-1),g--}}}}}}e.CursorCollection=w}),define(Q[242],J([0,1,12,8,538,42,181,182,3,21,170,2,173]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=e.CursorModelState=void 0;class s{constructor(n,t){this.modelVersionId=n.getVersionId(),this.cursorState=t.getCursorStates()}equals(n){if(!n||this.modelVersionId!==n.modelVersionId||this.cursorState.length!==n.cursorState.length)return!1;for(let t=0,l=this.cursorState.length;t<l;t++)if(!this.cursorState[t].equals(n.cursorState[t]))return!1;return!0}}e.CursorModelState=s;class a{constructor(n,t,l){this._model=n,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=l}static getAllAutoClosedCharacters(n){let t=[];for(const l of n)t=t.concat(l.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let n=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const l=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);l&&n.push(l)}return n}isValid(n){let t=[];for(let l=0;l<this._autoClosedEnclosingDecorations.length;l++){const h=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[l]);if(h&&(t.push(h),h.startLineNumber!==h.endLineNumber))return!1}t.sort(d.Range.compareRangesUsingStarts),n.sort(d.Range.compareRangesUsingStarts);for(let l=0;l<n.length;l++)if(l>=t.length||!t[l].strictContainsRange(n[l]))return!1;return!0}}class u extends c.Disposable{constructor(n,t,l,h){super();this._model=n,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=l,this.context=new w.CursorContext(this._model,this._coordinatesConverter,h),this._cursors=new M.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=c.dispose(this._autoClosedActions),super.dispose()}updateConfiguration(n){this.context=new w.CursorContext(this._model,this._coordinatesConverter,n),this._cursors.updateContext(this.context)}onLineMappingChanged(n){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(n,"viewModel",0,this.getCursorStates())}setHasFocus(n){this._hasFocus=n}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let n=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const l=this._autoClosedActions[t];l.isValid(n)||(l.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(n,t,l,h){let m=!1;h!==null&&h.length>u.MAX_CURSOR_COUNT&&(h=h.slice(0,u.MAX_CURSOR_COUNT),m=!0);const _=new s(this._model,this);return this._cursors.setStates(h),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,t,l,_,m)}setCursorColumnSelectData(n){this._columnSelectData=n}revealPrimary(n,t,l,h){const m=this._cursors.getViewPositions();if(m.length>1){this._emitCursorRevealRange(n,t,null,this._cursors.getViewSelections(),0,l,h);return}else{const _=m[0],f=new d.Range(_.lineNumber,_.column,_.lineNumber,_.column);this._emitCursorRevealRange(n,t,f,null,0,l,h)}}_revealPrimaryCursor(n,t,l,h,m){const _=this._cursors.getViewPositions();if(_.length>1)this._emitCursorRevealRange(n,t,null,this._cursors.getViewSelections(),l,h,m);else{const f=_[0],v=new d.Range(f.lineNumber,f.column,f.lineNumber,f.column);this._emitCursorRevealRange(n,t,v,null,l,h,m)}}_emitCursorRevealRange(n,t,l,h,m,_,f){n.emitViewEvent(new p.ViewRevealRangeRequestEvent(t,l,h,m,_,f))}saveState(){let n=[];const t=this._cursors.getSelections();for(let l=0,h=t.length;l<h;l++){const m=t[l];n.push({inSelectionMode:!m.isEmpty(),selectionStart:{lineNumber:m.selectionStartLineNumber,column:m.selectionStartColumn},position:{lineNumber:m.positionLineNumber,column:m.positionColumn}})}return n}restoreState(n,t){let l=[];for(let h=0,m=t.length;h<m;h++){const _=t[h];let f=1,v=1;_.position&&_.position.lineNumber&&(f=_.position.lineNumber),_.position&&_.position.column&&(v=_.position.column);let y=f,L=v;_.selectionStart&&_.selectionStart.lineNumber&&(y=_.selectionStart.lineNumber),_.selectionStart&&_.selectionStart.column&&(L=_.selectionStart.column),l.push({selectionStartLineNumber:y,selectionStartColumn:L,positionLineNumber:f,positionColumn:v})}this.setStates(n,"restoreState",0,w.CursorState.fromModelSelections(l)),this.revealPrimary(n,"restoreState",!0,1)}onModelContentChanged(n,t){if(this._knownModelVersionId=t.versionId,!this._isHandling){const l=t.containsEvent(1);if(this._prevEditOperationType=0,l)this._cursors.dispose(),this._cursors=new M.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,"model",1,null,!1);else if(this._hasFocus&&t.resultingSelection&&t.resultingSelection.length>0){const h=w.CursorState.fromModelSelections(t.resultingSelection);this.setStates(n,"modelChange",t.isUndoing?5:t.isRedoing?6:2,h)&&this._revealPrimaryCursor(n,"modelChange",0,!0,0)}else{const h=this._cursors.readSelectionFromMarkers();this.setStates(n,"modelChange",2,w.CursorState.fromModelSelections(h))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const n=this._cursors.getPrimaryCursor(),t=n.viewState.selectionStart.getStartPosition(),l=n.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:w.CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:l.lineNumber,toViewVisualColumn:w.CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,l)}}getSelections(){return this._cursors.getSelections()}setSelections(n,t,l,h){this.setStates(n,t,h,w.CursorState.fromModelSelections(l))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(n){this._prevEditOperationType=n}_pushAutoClosedAction(n,t){let l=[],h=[];for(let f=0,v=n.length;f<v;f++)l.push({range:n[f],options:{inlineClassName:"auto-closed-character",stickiness:1}}),h.push({range:t[f],options:{stickiness:1}});const m=this._model.deltaDecorations([],l),_=this._model.deltaDecorations([],h);this._autoClosedActions.push(new a(this._model,m,_))}_executeEditOperation(n){if(!!n){n.shouldPushStackElementBefore&&this._model.pushStackElement();const t=r.executeCommands(this._model,this._cursors.getSelections(),n.commands);if(t){this._interpretCommandResult(t);let l=[],h=[];for(let m=0;m<n.commands.length;m++){const _=n.commands[m];_ instanceof C.TypeWithAutoClosingCommand&&_.enclosingRange&&_.closeCharacterRange&&(l.push(_.closeCharacterRange),h.push(_.enclosingRange))}l.length>0&&this._pushAutoClosedAction(l,h),this._prevEditOperationType=n.type}n.shouldPushStackElementAfter&&this._model.pushStackElement()}}_interpretCommandResult(n){(!n||n.length===0)&&(n=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(n),this._cursors.normalize()}_emitStateChangedIfNecessary(n,t,l,h,m){const _=new s(this._model,this);if(_.equals(h))return!1;const f=this._cursors.getSelections(),v=this._cursors.getViewSelections();if(n.emitViewEvent(new p.ViewCursorStateChangedEvent(v,f)),!h||h.cursorState.length!==_.cursorState.length||_.cursorState.some((y,L)=>!y.modelState.equals(h.cursorState[L].modelState))){const y=h?h.cursorState.map(I=>I.modelState.selection):null,L=h?h.modelVersionId:0;n.emitOutgoingEvent(new o.CursorStateChangedEvent(y,f,L,_.modelVersionId,t||"keyboard",l,m))}return!0}_findAutoClosingPairs(n){if(!n.length)return null;let t=[];for(let l=0,h=n.length;l<h;l++){const m=n[l];if(!m.text||m.text.indexOf(`
`)>=0)return null;const _=m.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!_)return null;const f=_[1],v=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(f);if(!v||v.length!==1)return null;const y=v[0].open,L=m.text.length-_[2].length-1,I=m.text.lastIndexOf(y,L-1);if(I===-1)return null;t.push([I,L])}return t}executeEdits(n,t,l,h){let m=null;t==="snippet"&&(m=this._findAutoClosingPairs(l)),m&&(l[0]._isTracked=!0);let _=[],f=[];const v=this._model.pushEditOperations(this.getSelections(),l,y=>{if(m)for(let I=0,k=m.length;I<k;I++){const[E,T]=m[I],O=y[I],A=O.range.startLineNumber,B=O.range.startColumn-1+E,F=O.range.startColumn-1+T;_.push(new d.Range(A,F+1,A,F+2)),f.push(new d.Range(A,B+1,A,F+2))}const L=h(y);return L&&(this._isHandling=!0),L});v&&(this._isHandling=!1,this.setSelections(n,t,v,0)),_.length>0&&this._pushAutoClosedAction(_,f)}_executeEdit(n,t,l,h=0){if(!this.context.cursorConfig.readOnly){const m=new s(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),n()}catch(_){b.onUnexpectedError(_)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,l,h,m,!1)&&this._revealPrimaryCursor(t,l,0,!0,0)}}setIsDoingComposition(n){this._isDoingComposition=n}startComposition(n){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(n,t){this._executeEdit(()=>{if(t==="keyboard"){const l=a.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(C.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),l)),this._selectionsWhenCompositionStarted=null}},n,t)}type(n,t,l){this._executeEdit(()=>{if(l==="keyboard"){const h=t.length;let m=0;for(;m<h;){const _=N.nextCharLength(t,m),f=t.substr(m,_),v=a.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(C.TypeOperations.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),v,f)),m+=_}}else this._executeEditOperation(C.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},n,l)}compositionType(n,t,l,h,m,_){if(t.length===0&&l===0&&h===0){if(m!==0){const f=this.getSelections().map(v=>{const y=v.getPosition();return new g.Selection(y.lineNumber,y.column+m,y.lineNumber,y.column+m)});this.setSelections(n,_,f,0)}return}this._executeEdit(()=>{this._executeEditOperation(C.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,l,h,m))},n,_)}paste(n,t,l,h,m){this._executeEdit(()=>{this._executeEditOperation(C.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),t,l,h||[]))},n,m,4)}cut(n,t){this._executeEdit(()=>{this._executeEditOperation(S.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},n,t)}executeCommand(n,t,l){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new w.EditOperationResult(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},n,l)}executeCommands(n,t,l){this._executeEdit(()=>{this._executeEditOperation(new w.EditOperationResult(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},n,l)}}e.Cursor=u,u.MAX_CURSOR_COUNT=1e4;class r{static executeCommands(n,t,l){const h={model:n,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},m=this._innerExecuteCommands(h,l);for(let _=0,f=h.trackedRanges.length;_<f;_++)h.model._setTrackedRange(h.trackedRanges[_],null,0);return m}static _innerExecuteCommands(n,t){if(this._arrayIsEmpty(t))return null;const l=this._getEditOperations(n,t);if(l.operations.length===0)return null;const h=l.operations,m=this._getLoserCursorMap(h);if(m.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let _=[];for(let y=0,L=h.length;y<L;y++)m.hasOwnProperty(h[y].identifier.major.toString())||_.push(h[y]);l.hadTrackedEditOperation&&_.length>0&&(_[0]._isTracked=!0);let f=n.model.pushEditOperations(n.selectionsBefore,_,y=>{let L=[];for(let E=0;E<n.selectionsBefore.length;E++)L[E]=[];for(const E of y)!E.identifier||L[E.identifier.major].push(E);const I=(E,T)=>E.identifier.minor-T.identifier.minor;let k=[];for(let E=0;E<n.selectionsBefore.length;E++)L[E].length>0?(L[E].sort(I),k[E]=t[E].computeCursorState(n.model,{getInverseEditOperations:()=>L[E],getTrackedSelection:T=>{const O=parseInt(T,10),A=n.model._getTrackedRange(n.trackedRanges[O]);return n.trackedRangesDirection[O]===0?new g.Selection(A.startLineNumber,A.startColumn,A.endLineNumber,A.endColumn):new g.Selection(A.endLineNumber,A.endColumn,A.startLineNumber,A.startColumn)}})):k[E]=n.selectionsBefore[E];return k});f||(f=n.selectionsBefore);let v=[];for(let y in m)m.hasOwnProperty(y)&&v.push(parseInt(y,10));v.sort((y,L)=>L-y);for(const y of v)f.splice(y,1);return f}static _arrayIsEmpty(n){for(let t=0,l=n.length;t<l;t++)if(n[t])return!1;return!0}static _getEditOperations(n,t){let l=[],h=!1;for(let m=0,_=t.length;m<_;m++){const f=t[m];if(f){const v=this._getEditOperationsFromCommand(n,m,f);l=l.concat(v.operations),h=h||v.hadTrackedEditOperation}}return{operations:l,hadTrackedEditOperation:h}}static _getEditOperationsFromCommand(n,t,l){let h=[],m=0;const _=(I,k,E=!1)=>{d.Range.isEmpty(I)&&k===""||h.push({identifier:{major:t,minor:m++},range:I,text:k,forceMoveMarkers:E,isAutoWhitespaceEdit:l.insertsAutoWhitespace})};let f=!1;const L={addEditOperation:_,addTrackedEditOperation:(I,k,E)=>{f=!0,_(I,k,E)},trackSelection:(I,k)=>{const E=g.Selection.liftSelection(I);let T;if(E.isEmpty())if(typeof k=="boolean")k?T=2:T=3;else{const B=n.model.getLineMaxColumn(E.startLineNumber);E.startColumn===B?T=2:T=3}else T=1;const O=n.trackedRanges.length,A=n.model._setTrackedRange(null,E,T);return n.trackedRanges[O]=A,n.trackedRangesDirection[O]=E.getDirection(),O.toString()}};try{l.getEditOperations(n.model,L)}catch(I){return b.onUnexpectedError(I),{operations:[],hadTrackedEditOperation:!1}}return{operations:h,hadTrackedEditOperation:f}}static _getLoserCursorMap(n){n=n.slice(0),n.sort((l,h)=>-d.Range.compareRangesUsingEnds(l.range,h.range));let t={};for(let l=1;l<n.length;l++){const h=n[l-1],m=n[l];if(d.Range.getStartPosition(h.range).isBefore(d.Range.getEndPosition(m.range))){let _;h.identifier.major>m.identifier.major?_=h.identifier.major:_=m.identifier.major,t[_.toString()]=!0;for(let f=0;f<n.length;f++)n[f].identifier.major===_&&(n.splice(f,1),f<l&&l--,f--);l>0&&l--}}return t}}}),define(Q[243],J([0,1,8,113,76]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tokenizeLineToHTML=e.tokenizeToString=void 0;const w={getInitialState:()=>M.NULL_STATE,tokenize2:(g,p,c,o)=>M.nullTokenize2(0,g,c,o)};function S(g,p=w){return d(g,p||w)}e.tokenizeToString=S;function C(g,p,c,o,s,a,u){let r="<div>",i=o,n=0;for(let t=0,l=p.getCount();t<l;t++){const h=p.getEndOffset(t);if(!(h<=o)){let m="";for(;i<h&&i<s;i++){const _=g.charCodeAt(i);switch(_){case 9:let f=a-(i+n)%a;for(n+=f-1;f>0;)m+=u?"&#160;":" ",f--;break;case 60:m+="&lt;";break;case 62:m+="&gt;";break;case 38:m+="&amp;";break;case 0:m+="&#00;";break;case 65279:case 8232:case 8233:case 133:m+="\uFFFD";break;case 13:m+="&#8203";break;case 32:m+=u?"&#160;":" ";break;default:m+=String.fromCharCode(_)}}if(r+=`<span style="${p.getInlineStyle(t,c)}">${m}</span>`,h>s||i>=s)break}}return r+="</div>",r}e.tokenizeLineToHTML=C;function d(g,p){let c='<div class="monaco-tokenized-source">',o=b.splitLines(g),s=p.getInitialState();for(let a=0,u=o.length;a<u;a++){let r=o[a];a>0&&(c+="<br/>");let i=p.tokenize2(r,!0,s,0);N.LineTokens.convertToEndOffset(i.tokens,r.length);let t=new N.LineTokens(i.tokens,r).inflate(),l=0;for(let h=0,m=t.getCount();h<m;h++){const _=t.getClassName(h),f=t.getEndOffset(h);c+=`<span class="${_}">${b.escape(r.substring(l,f))}</span>`,l=f}s=i.endState}return c+="</div>",c}}),define(Q[67],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=b.createDecorator("textModelService")}),define(Q[137],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=b.createDecorator("textResourceConfigurationService"),e.ITextResourcePropertiesService=b.createDecorator("textResourcePropertiesService")}),define(Q[244],J([0,1,6,216,18]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class w{constructor(){this._onDidChange=new b.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),M.TokenizationRegistry.onDidChange(C=>{C.changedColorMap&&this._updateColorMap()})}static getInstance(){return this._INSTANCE||(this._INSTANCE=new w),this._INSTANCE}_updateColorMap(){const C=M.TokenizationRegistry.getColorMap();if(!C){this._colors=[N.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[N.RGBA8.Empty];for(let g=1;g<C.length;g++){const p=C[g].rgba;this._colors[g]=new N.RGBA8(p.r,p.g,p.b,Math.round(p.a*255))}let d=C[2].getRelativeLuminance();this._backgroundIsLight=d>=.5,this._onDidChange.fire(void 0)}getColor(C){return(C<1||C>=this._colors.length)&&(C=2),this._colors[C]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=w,w._INSTANCE=null}),define(Q[539],J([0,1,19,14,3,31,170,222,63]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityLinesCollection=e.IdentityCoordinatesConverter=e.SplitLine=e.SplitLinesCollection=e.CoordinatesConverter=void 0;class g{constructor(_){this._lines=_}convertViewPositionToModelPosition(_){return this._lines.convertViewPositionToModelPosition(_.lineNumber,_.column)}convertViewRangeToModelRange(_){return this._lines.convertViewRangeToModelRange(_)}validateViewPosition(_,f){return this._lines.validateViewPosition(_.lineNumber,_.column,f)}validateViewRange(_,f){return this._lines.validateViewRange(_,f)}convertModelPositionToViewPosition(_){return this._lines.convertModelPositionToViewPosition(_.lineNumber,_.column)}convertModelRangeToViewRange(_){return this._lines.convertModelRangeToViewRange(_)}modelPositionIsVisible(_){return this._lines.modelPositionIsVisible(_.lineNumber,_.column)}getModelLineViewLineCount(_){return this._lines.getModelLineViewLineCount(_)}}e.CoordinatesConverter=g;class p{constructor(_){this._counts=_,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(_){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,_-1)}_ensureValid(){if(!this._isValid){for(let _=this._validEndIndex+1,f=this._counts.length;_<f;_++){const v=this._counts[_],y=_>0?this._modelToView[_-1]:0;this._modelToView[_]=y+v;for(let L=0;L<v;L++)this._viewToModel[y+L]=_}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}}changeValue(_,f){this._counts[_]!==f&&(this._counts[_]=f,this._invalidate(_))}removeValues(_,f){this._counts.splice(_,f),this._invalidate(_)}insertValues(_,f){this._counts=b.arrayInsert(this._counts,_,f),this._invalidate(_)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(_){return this._ensureValid(),this._modelToView[_]}getIndexOf(_){this._ensureValid();const f=this._viewToModel[_],v=f>0?this._modelToView[f-1]:0;return new C.PrefixSumIndexOfResult(f,_-v)}}class c{constructor(_,f,v,y,L,I,k,E){this.model=_,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=f,this._monospaceLineBreaksComputerFactory=v,this.fontInfo=y,this.tabSize=L,this.wrappingStrategy=I,this.wrappingColumn=k,this.wrappingIndent=E,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new g(this)}_constructLines(_,f){this.lines=[],_&&(this.hiddenAreasIds=[]);let v=this.model.getLinesContent();const y=v.length,L=this.createLineBreaksComputer();for(let F=0;F<y;F++)L.addRequest(v[F],f?f[F]:null);const I=L.finalize();let k=[],E=this.hiddenAreasIds.map(F=>this.model.getDecorationRange(F)).sort(M.Range.compareRangesUsingStarts),T=1,O=0,A=-1,B=A+1<E.length?O+1:y+2;for(let F=0;F<y;F++){let D=F+1;D===B&&(A++,T=E[A].startLineNumber,O=E[A].endLineNumber,B=A+1<E.length?O+1:y+2);let R=D>=T&&D<=O,W=n(I[F],!R);k[F]=W.getViewLineCount(),this.lines[F]=W}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new p(k)}getHiddenAreas(){return this.hiddenAreasIds.map(_=>this.model.getDecorationRange(_))}_reduceRanges(_){if(_.length===0)return[];let f=_.map(I=>this.model.validateRange(I)).sort(M.Range.compareRangesUsingStarts),v=[],y=f[0].startLineNumber,L=f[0].endLineNumber;for(let I=1,k=f.length;I<k;I++){let E=f[I];E.startLineNumber>L+1?(v.push(new M.Range(y,1,L,1)),y=E.startLineNumber,L=E.endLineNumber):E.endLineNumber>L&&(L=E.endLineNumber)}return v.push(new M.Range(y,1,L,1)),v}setHiddenAreas(_){let f=this._reduceRanges(_),v=this.hiddenAreasIds.map(A=>this.model.getDecorationRange(A)).sort(M.Range.compareRangesUsingStarts);if(f.length===v.length){let A=!1;for(let B=0;B<f.length;B++)if(!f[B].equalsRange(v[B])){A=!0;break}if(!A)return!1}let y=[];for(const A of f)y.push({range:A,options:w.ModelDecorationOptions.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,y);let L=f,I=1,k=0,E=-1,T=E+1<L.length?k+1:this.lines.length+2,O=!1;for(let A=0;A<this.lines.length;A++){let B=A+1;B===T&&(E++,I=L[E].startLineNumber,k=L[E].endLineNumber,T=E+1<L.length?k+1:this.lines.length+2);let F=!1;if(B>=I&&B<=k?this.lines[A].isVisible()&&(this.lines[A]=this.lines[A].setVisible(!1),F=!0):(O=!0,this.lines[A].isVisible()||(this.lines[A]=this.lines[A].setVisible(!0),F=!0)),F){let D=this.lines[A].getViewLineCount();this.prefixSumComputer.changeValue(A,D)}}return O||this.setHiddenAreas([]),!0}modelPositionIsVisible(_,f){return _<1||_>this.lines.length?!1:this.lines[_-1].isVisible()}getModelLineViewLineCount(_){return _<1||_>this.lines.length?1:this.lines[_-1].getViewLineCount()}setTabSize(_){return this.tabSize===_?!1:(this.tabSize=_,this._constructLines(!1,null),!0)}setWrappingSettings(_,f,v,y){const L=this.fontInfo.equals(_),I=this.wrappingStrategy===f,k=this.wrappingColumn===v,E=this.wrappingIndent===y;if(L&&I&&k&&E)return!1;const T=L&&I&&!k&&E;this.fontInfo=_,this.wrappingStrategy=f,this.wrappingColumn=v,this.wrappingIndent=y;let O=null;if(T){O=[];for(let A=0,B=this.lines.length;A<B;A++)O[A]=this.lines[A].getLineBreakData()}return this._constructLines(!1,O),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(_,f,v){if(_<=this._validModelVersionId)return null;let y=f===1?1:this.prefixSumComputer.getAccumulatedValue(f-2)+1,L=this.prefixSumComputer.getAccumulatedValue(v-1);return this.lines.splice(f-1,v-f+1),this.prefixSumComputer.removeValues(f-1,v-f+1),new S.ViewLinesDeletedEvent(y,L)}onModelLinesInserted(_,f,v,y){if(_<=this._validModelVersionId)return null;const L=f>2&&!this.lines[f-2].isVisible();let I=f===1?1:this.prefixSumComputer.getAccumulatedValue(f-2)+1,k=0,E=[],T=[];for(let O=0,A=y.length;O<A;O++){let B=n(y[O],!L);E.push(B);let F=B.getViewLineCount();k+=F,T[O]=F}return this.lines=this.lines.slice(0,f-1).concat(E).concat(this.lines.slice(f-1)),this.prefixSumComputer.insertValues(f-1,T),new S.ViewLinesInsertedEvent(I,I+k-1)}onModelLineChanged(_,f,v){if(_<=this._validModelVersionId)return[!1,null,null,null];let y=f-1,L=this.lines[y].getViewLineCount(),I=this.lines[y].isVisible(),k=n(v,I);this.lines[y]=k;let E=this.lines[y].getViewLineCount(),T=!1,O=0,A=-1,B=0,F=-1,D=0,R=-1;L>E?(O=f===1?1:this.prefixSumComputer.getAccumulatedValue(f-2)+1,A=O+E-1,D=A+1,R=D+(L-E)-1,T=!0):L<E?(O=f===1?1:this.prefixSumComputer.getAccumulatedValue(f-2)+1,A=O+L-1,B=A+1,F=B+(E-L)-1,T=!0):(O=f===1?1:this.prefixSumComputer.getAccumulatedValue(f-2)+1,A=O+E-1),this.prefixSumComputer.changeValue(y,E);const W=O<=A?new S.ViewLinesChangedEvent(O,A):null,x=B<=F?new S.ViewLinesInsertedEvent(B,F):null,K=D<=R?new S.ViewLinesDeletedEvent(D,R):null;return[T,W,x,K]}acceptVersionId(_){this._validModelVersionId=_,this.lines.length===1&&!this.lines[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(_){if(_<1)return 1;const f=this.getViewLineCount();return _>f?f:_|0}getActiveIndentGuide(_,f,v){_=this._toValidViewLineNumber(_),f=this._toValidViewLineNumber(f),v=this._toValidViewLineNumber(v);const y=this.convertViewPositionToModelPosition(_,this.getViewLineMinColumn(_)),L=this.convertViewPositionToModelPosition(f,this.getViewLineMinColumn(f)),I=this.convertViewPositionToModelPosition(v,this.getViewLineMinColumn(v)),k=this.model.getActiveIndentGuide(y.lineNumber,L.lineNumber,I.lineNumber),E=this.convertModelPositionToViewPosition(k.startLineNumber,1),T=this.convertModelPositionToViewPosition(k.endLineNumber,this.model.getLineMaxColumn(k.endLineNumber));return{startLineNumber:E.lineNumber,endLineNumber:T.lineNumber,indent:k.indent}}getViewLinesIndentGuides(_,f){_=this._toValidViewLineNumber(_),f=this._toValidViewLineNumber(f);const v=this.convertViewPositionToModelPosition(_,this.getViewLineMinColumn(_)),y=this.convertViewPositionToModelPosition(f,this.getViewLineMaxColumn(f));let L=[],I=[],k=[];const E=v.lineNumber-1,T=y.lineNumber-1;let O=null;for(let D=E;D<=T;D++){const R=this.lines[D];if(R.isVisible()){let W=R.getViewLineNumberOfModelPosition(0,D===E?v.column:1),x=R.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(D+1)),K=x-W+1,Y=0;K>1&&R.getViewLineMinColumn(this.model,D+1,x)===1&&(Y=W===0?1:2),I.push(K),k.push(Y),O===null&&(O=new N.Position(D+1,0))}else O!==null&&(L=L.concat(this.model.getLinesIndentGuides(O.lineNumber,D)),O=null)}O!==null&&(L=L.concat(this.model.getLinesIndentGuides(O.lineNumber,y.lineNumber)),O=null);const A=f-_+1;let B=new Array(A),F=0;for(let D=0,R=L.length;D<R;D++){let W=L[D],x=Math.min(A-F,I[D]),K=k[D],Y;K===2?Y=0:K===1?Y=1:Y=x;for(let ee=0;ee<x;ee++)ee===Y&&(W=0),B[F++]=W}return B}getViewLineContent(_){_=this._toValidViewLineNumber(_);let f=this.prefixSumComputer.getIndexOf(_-1),v=f.index,y=f.remainder;return this.lines[v].getViewLineContent(this.model,v+1,y)}getViewLineLength(_){_=this._toValidViewLineNumber(_);let f=this.prefixSumComputer.getIndexOf(_-1),v=f.index,y=f.remainder;return this.lines[v].getViewLineLength(this.model,v+1,y)}getViewLineMinColumn(_){_=this._toValidViewLineNumber(_);let f=this.prefixSumComputer.getIndexOf(_-1),v=f.index,y=f.remainder;return this.lines[v].getViewLineMinColumn(this.model,v+1,y)}getViewLineMaxColumn(_){_=this._toValidViewLineNumber(_);let f=this.prefixSumComputer.getIndexOf(_-1),v=f.index,y=f.remainder;return this.lines[v].getViewLineMaxColumn(this.model,v+1,y)}getViewLineData(_){_=this._toValidViewLineNumber(_);let f=this.prefixSumComputer.getIndexOf(_-1),v=f.index,y=f.remainder;return this.lines[v].getViewLineData(this.model,v+1,y)}getViewLinesData(_,f,v){_=this._toValidViewLineNumber(_),f=this._toValidViewLineNumber(f);let y=this.prefixSumComputer.getIndexOf(_-1),L=_,I=y.index,k=y.remainder,E=[];for(let T=I,O=this.model.getLineCount();T<O;T++){let A=this.lines[T];if(!!A.isVisible()){let B=T===I?k:0,F=A.getViewLineCount()-B,D=!1;L+F>f&&(D=!0,F=f-L+1);let R=B+F;if(A.getViewLinesData(this.model,T+1,B,R,L-_,v,E),L+=F,D)break}}return E}validateViewPosition(_,f,v){_=this._toValidViewLineNumber(_);let y=this.prefixSumComputer.getIndexOf(_-1),L=y.index,I=y.remainder,k=this.lines[L],E=k.getViewLineMinColumn(this.model,L+1,I),T=k.getViewLineMaxColumn(this.model,L+1,I);f<E&&(f=E),f>T&&(f=T);let O=k.getModelColumnOfViewPosition(I,f);return this.model.validatePosition(new N.Position(L+1,O)).equals(v)?new N.Position(_,f):this.convertModelPositionToViewPosition(v.lineNumber,v.column)}validateViewRange(_,f){const v=this.validateViewPosition(_.startLineNumber,_.startColumn,f.getStartPosition()),y=this.validateViewPosition(_.endLineNumber,_.endColumn,f.getEndPosition());return new M.Range(v.lineNumber,v.column,y.lineNumber,y.column)}convertViewPositionToModelPosition(_,f){_=this._toValidViewLineNumber(_);let v=this.prefixSumComputer.getIndexOf(_-1),y=v.index,L=v.remainder,I=this.lines[y].getModelColumnOfViewPosition(L,f);return this.model.validatePosition(new N.Position(y+1,I))}convertViewRangeToModelRange(_){const f=this.convertViewPositionToModelPosition(_.startLineNumber,_.startColumn),v=this.convertViewPositionToModelPosition(_.endLineNumber,_.endColumn);return new M.Range(f.lineNumber,f.column,v.lineNumber,v.column)}convertModelPositionToViewPosition(_,f){const v=this.model.validatePosition(new N.Position(_,f)),y=v.lineNumber,L=v.column;let I=y-1,k=!1;for(;I>0&&!this.lines[I].isVisible();)I--,k=!0;if(I===0&&!this.lines[I].isVisible())return new N.Position(1,1);const E=1+(I===0?0:this.prefixSumComputer.getAccumulatedValue(I-1));let T;return k?T=this.lines[I].getViewPositionOfModelPosition(E,this.model.getLineMaxColumn(I+1)):T=this.lines[y-1].getViewPositionOfModelPosition(E,L),T}convertModelRangeToViewRange(_){let f=this.convertModelPositionToViewPosition(_.startLineNumber,_.startColumn),v=this.convertModelPositionToViewPosition(_.endLineNumber,_.endColumn);return _.startLineNumber===_.endLineNumber&&f.lineNumber!==v.lineNumber&&v.column===this.getViewLineMinColumn(v.lineNumber)?new M.Range(f.lineNumber,f.column,v.lineNumber-1,this.getViewLineMaxColumn(v.lineNumber-1)):new M.Range(f.lineNumber,f.column,v.lineNumber,v.column)}_getViewLineNumberForModelPosition(_,f){let v=_-1;if(this.lines[v].isVisible()){const L=1+(v===0?0:this.prefixSumComputer.getAccumulatedValue(v-1));return this.lines[v].getViewLineNumberOfModelPosition(L,f)}for(;v>0&&!this.lines[v].isVisible();)v--;if(v===0&&!this.lines[v].isVisible())return 1;const y=1+(v===0?0:this.prefixSumComputer.getAccumulatedValue(v-1));return this.lines[v].getViewLineNumberOfModelPosition(y,this.model.getLineMaxColumn(v+1))}getAllOverviewRulerDecorations(_,f,v){const y=this.model.getOverviewRulerDecorations(_,f),L=new h;for(const I of y){const k=I.options.overviewRuler,E=k?k.position:0;if(E!==0){const T=k.getColor(v),O=this._getViewLineNumberForModelPosition(I.range.startLineNumber,I.range.startColumn),A=this._getViewLineNumberForModelPosition(I.range.endLineNumber,I.range.endColumn);L.accept(T,O,A,E)}}return L.result}getDecorationsInRange(_,f,v){const y=this.convertViewPositionToModelPosition(_.startLineNumber,_.startColumn),L=this.convertViewPositionToModelPosition(_.endLineNumber,_.endColumn);if(L.lineNumber-y.lineNumber<=_.endLineNumber-_.startLineNumber)return this.model.getDecorationsInRange(new M.Range(y.lineNumber,1,L.lineNumber,L.column),f,v);let I=[];const k=y.lineNumber-1,E=L.lineNumber-1;let T=null;for(let F=k;F<=E;F++)if(this.lines[F].isVisible())T===null&&(T=new N.Position(F+1,F===k?y.column:1));else if(T!==null){const R=this.model.getLineMaxColumn(F);I=I.concat(this.model.getDecorationsInRange(new M.Range(T.lineNumber,T.column,F,R),f,v)),T=null}T!==null&&(I=I.concat(this.model.getDecorationsInRange(new M.Range(T.lineNumber,T.column,L.lineNumber,L.column),f,v)),T=null),I.sort((F,D)=>{const R=M.Range.compareRangesUsingStarts(F.range,D.range);return R===0?F.id<D.id?-1:F.id>D.id?1:0:R});let O=[],A=0,B=null;for(const F of I){const D=F.id;B!==D&&(B=D,O[A++]=F)}return O}}e.SplitLinesCollection=c;class o{constructor(){}isVisible(){return!0}setVisible(_){return _?this:s.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(_,f,v){return _.getLineContent(f)}getViewLineLength(_,f,v){return _.getLineLength(f)}getViewLineMinColumn(_,f,v){return _.getLineMinColumn(f)}getViewLineMaxColumn(_,f,v){return _.getLineMaxColumn(f)}getViewLineData(_,f,v){let y=_.getLineTokens(f),L=y.getLineContent();return new d.ViewLineData(L,!1,1,L.length+1,0,y.inflate())}getViewLinesData(_,f,v,y,L,I,k){if(!I[L]){k[L]=null;return}k[L]=this.getViewLineData(_,f,0)}getModelColumnOfViewPosition(_,f){return f}getViewPositionOfModelPosition(_,f){return new N.Position(_,f)}getViewLineNumberOfModelPosition(_,f){return _}}o.INSTANCE=new o;class s{constructor(){}isVisible(){return!1}setVisible(_){return _?o.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(_,f,v){throw new Error("Not supported")}getViewLineLength(_,f,v){throw new Error("Not supported")}getViewLineMinColumn(_,f,v){throw new Error("Not supported")}getViewLineMaxColumn(_,f,v){throw new Error("Not supported")}getViewLineData(_,f,v){throw new Error("Not supported")}getViewLinesData(_,f,v,y,L,I,k){throw new Error("Not supported")}getModelColumnOfViewPosition(_,f){throw new Error("Not supported")}getViewPositionOfModelPosition(_,f){throw new Error("Not supported")}getViewLineNumberOfModelPosition(_,f){throw new Error("Not supported")}}s.INSTANCE=new s;class a{constructor(_,f){this._lineBreakData=_,this._isVisible=f}isVisible(){return this._isVisible}setVisible(_){return this._isVisible=_,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(_){return d.LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,_,0)}getInputEndOffsetOfOutputLineIndex(_,f,v){return v+1===this._lineBreakData.breakOffsets.length?_.getLineMaxColumn(f)-1:d.LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,v+1,0)}getViewLineContent(_,f,v){if(!this._isVisible)throw new Error("Not supported");let y=this.getInputStartOffsetOfOutputLineIndex(v),L=this.getInputEndOffsetOfOutputLineIndex(_,f,v),I=_.getValueInRange({startLineNumber:f,startColumn:y+1,endLineNumber:f,endColumn:L+1});return v>0&&(I=r(this._lineBreakData.wrappedTextIndentLength)+I),I}getViewLineLength(_,f,v){if(!this._isVisible)throw new Error("Not supported");let y=this.getInputStartOffsetOfOutputLineIndex(v),I=this.getInputEndOffsetOfOutputLineIndex(_,f,v)-y;return v>0&&(I=this._lineBreakData.wrappedTextIndentLength+I),I}getViewLineMinColumn(_,f,v){if(!this._isVisible)throw new Error("Not supported");return v>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(_,f,v){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(_,f,v).length+1}getViewLineData(_,f,v){if(!this._isVisible)throw new Error("Not supported");let y=this.getInputStartOffsetOfOutputLineIndex(v),L=this.getInputEndOffsetOfOutputLineIndex(_,f,v),I=_.getValueInRange({startLineNumber:f,startColumn:y+1,endLineNumber:f,endColumn:L+1});v>0&&(I=r(this._lineBreakData.wrappedTextIndentLength)+I);let k=v>0?this._lineBreakData.wrappedTextIndentLength+1:1,E=I.length+1,T=v+1<this.getViewLineCount(),O=0;v>0&&(O=this._lineBreakData.wrappedTextIndentLength);let A=_.getLineTokens(f);const B=v===0?0:this._lineBreakData.breakOffsetsVisibleColumn[v-1];return new d.ViewLineData(I,T,k,E,B,A.sliceAndInflate(y,L,O))}getViewLinesData(_,f,v,y,L,I,k){if(!this._isVisible)throw new Error("Not supported");for(let E=v;E<y;E++){let T=L+E-v;if(!I[T]){k[T]=null;continue}k[T]=this.getViewLineData(_,f,E)}}getModelColumnOfViewPosition(_,f){if(!this._isVisible)throw new Error("Not supported");let v=f-1;return _>0&&(v<this._lineBreakData.wrappedTextIndentLength?v=0:v-=this._lineBreakData.wrappedTextIndentLength),d.LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,_,v)+1}getViewPositionOfModelPosition(_,f){if(!this._isVisible)throw new Error("Not supported");let v=d.LineBreakData.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,f-1),y=v.outputLineIndex,L=v.outputOffset+1;return y>0&&(L+=this._lineBreakData.wrappedTextIndentLength),new N.Position(_+y,L)}getViewLineNumberOfModelPosition(_,f){if(!this._isVisible)throw new Error("Not supported");const v=d.LineBreakData.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,f-1);return _+v.outputLineIndex}}e.SplitLine=a;let u=[""];function r(m){if(m>=u.length)for(let _=1;_<=m;_++)u[_]=i(_);return u[m]}function i(m){return new Array(m+1).join(" ")}function n(m,_){return m===null?_?o.INSTANCE:s.INSTANCE:new a(m,_)}class t{constructor(_){this._lines=_}_validPosition(_){return this._lines.model.validatePosition(_)}_validRange(_){return this._lines.model.validateRange(_)}convertViewPositionToModelPosition(_){return this._validPosition(_)}convertViewRangeToModelRange(_){return this._validRange(_)}validateViewPosition(_,f){return this._validPosition(f)}validateViewRange(_,f){return this._validRange(f)}convertModelPositionToViewPosition(_){return this._validPosition(_)}convertModelRangeToViewRange(_){return this._validRange(_)}modelPositionIsVisible(_){const f=this._lines.model.getLineCount();return!(_.lineNumber<1||_.lineNumber>f)}getModelLineViewLineCount(_){return 1}}e.IdentityCoordinatesConverter=t;class l{constructor(_){this.model=_}dispose(){}createCoordinatesConverter(){return new t(this)}getHiddenAreas(){return[]}setHiddenAreas(_){return!1}setTabSize(_){return!1}setWrappingSettings(_,f,v,y){return!1}createLineBreaksComputer(){let _=[];return{addRequest:(f,v)=>{_.push(null)},finalize:()=>_}}onModelFlushed(){}onModelLinesDeleted(_,f,v){return new S.ViewLinesDeletedEvent(f,v)}onModelLinesInserted(_,f,v,y){return new S.ViewLinesInsertedEvent(f,v)}onModelLineChanged(_,f,v){return[!1,new S.ViewLinesChangedEvent(f,f),null,null]}acceptVersionId(_){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(_,f,v){return{startLineNumber:_,endLineNumber:_,indent:0}}getViewLinesIndentGuides(_,f){const v=f-_+1;let y=new Array(v);for(let L=0;L<v;L++)y[L]=0;return y}getViewLineContent(_){return this.model.getLineContent(_)}getViewLineLength(_){return this.model.getLineLength(_)}getViewLineMinColumn(_){return this.model.getLineMinColumn(_)}getViewLineMaxColumn(_){return this.model.getLineMaxColumn(_)}getViewLineData(_){let f=this.model.getLineTokens(_),v=f.getLineContent();return new d.ViewLineData(v,!1,1,v.length+1,0,f.inflate())}getViewLinesData(_,f,v){const y=this.model.getLineCount();_=Math.min(Math.max(1,_),y),f=Math.min(Math.max(1,f),y);let L=[];for(let I=_;I<=f;I++){let k=I-_;v[k]||(L[k]=null),L[k]=this.getViewLineData(I)}return L}getAllOverviewRulerDecorations(_,f,v){const y=this.model.getOverviewRulerDecorations(_,f),L=new h;for(const I of y){const k=I.options.overviewRuler,E=k?k.position:0;if(E!==0){const T=k.getColor(v),O=I.range.startLineNumber,A=I.range.endLineNumber;L.accept(T,O,A,E)}}return L.result}getDecorationsInRange(_,f,v){return this.model.getDecorationsInRange(_,f,v)}}e.IdentityLinesCollection=l;class h{constructor(){this.result=Object.create(null)}accept(_,f,v,y){let L=this.result[_];if(L){const I=L[L.length-3],k=L[L.length-1];if(I===y&&k+1>=f){v>k&&(L[L.length-1]=v);return}L.push(y,f,v)}else this.result[_]=[y,f,v]}}}),define(Q[540],J([0,1,29,2,8,38,14,3,18,243,244,170,398,539,63,455,15,17,242,42,173]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const h=!0;class m extends N.Disposable{constructor(f,v,y,L,I,k){super();if(this._editorId=f,this._configuration=v,this.model=y,this._eventDispatcher=new l.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new t.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new r.RunOnceScheduler(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new r.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,h&&this.model.isTooLargeForTokenization())this._lines=new s.IdentityLinesCollection(this.model);else{const E=this._configuration.options,T=E.get(38),O=E.get(118),A=E.get(125),B=E.get(117);this._lines=new s.SplitLinesCollection(this.model,L,I,T,this.model.getOptions().tabSize,O,A.wrappingColumn,B)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new n.Cursor(y,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new o.ViewLayout(this._configuration,this.getLineCount(),k)),this._register(this.viewLayout.onDidScroll(E=>{E.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new c.ViewScrollChangedEvent(E)),this._eventDispatcher.emitOutgoingEvent(new l.ScrollChangedEvent(E.oldScrollWidth,E.oldScrollLeft,E.oldScrollHeight,E.oldScrollTop,E.scrollWidth,E.scrollLeft,E.scrollHeight,E.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(E=>{this._eventDispatcher.emitOutgoingEvent(E)})),this._decorations=new u.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(E=>{try{const T=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(T,E)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(p.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new c.ViewTokensColorsChangedEvent)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(f){this._eventDispatcher.addViewEventHandler(f)}removeViewEventHandler(f){this._eventDispatcher.removeViewEventHandler(f)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const f=this.viewLayout.getLinesViewportData(),v=this.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(f.startLineNumber,1)),y=this.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(f.endLineNumber,1));this.model.tokenizeViewport(v.lineNumber,y.lineNumber)}setHasFocus(f){this._hasFocus=f,this._cursor.setHasFocus(f),this._eventDispatcher.emitSingleViewEvent(new c.ViewFocusChangedEvent(f)),this._eventDispatcher.emitOutgoingEvent(new l.FocusChangedEvent(!f,f))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new c.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new c.ViewCompositionEndEvent)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new c.ViewThemeChangedEvent)}_onConfigurationChanged(f,v){let y=null;if(this._viewportStartLine!==-1){let A=new S.Position(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));y=this.coordinatesConverter.convertViewPositionToModelPosition(A)}let L=!1;const I=this._configuration.options,k=I.get(38),E=I.get(118),T=I.get(125),O=I.get(117);if(this._lines.setWrappingSettings(k,E,T.wrappingColumn,O)&&(f.emitViewEvent(new c.ViewFlushedEvent),f.emitViewEvent(new c.ViewLineMappingChangedEvent),f.emitViewEvent(new c.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(f),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(L=!0),this._updateConfigurationViewLineCount.schedule()),v.hasChanged(75)&&(this._decorations.reset(),f.emitViewEvent(new c.ViewDecorationsChangedEvent(null))),f.emitViewEvent(new c.ViewConfigurationChangedEvent(v)),this.viewLayout.onConfigurationChanged(v),L&&y){const A=this.coordinatesConverter.convertModelPositionToViewPosition(y),B=this.viewLayout.getVerticalOffsetForLineNumber(A.lineNumber);this.viewLayout.setScrollPosition({scrollTop:B+this._viewportStartLineDelta},1)}t.CursorConfiguration.shouldRecreate(v)&&(this.cursorConfig=new t.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeRawContentFast(f=>{try{const v=this._eventDispatcher.beginEmitViewEvents();let y=!1,L=!1;const I=f.changes,k=f.versionId,E=this._lines.createLineBreaksComputer();for(const A of I)switch(A.changeType){case 4:{for(const B of A.detail)E.addRequest(B,null);break}case 2:{E.addRequest(A.detail,null);break}}const T=E.finalize();let O=0;for(const A of I)switch(A.changeType){case 1:{this._lines.onModelFlushed(),v.emitViewEvent(new c.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),y=!0;break}case 3:{const B=this._lines.onModelLinesDeleted(k,A.fromLineNumber,A.toLineNumber);B!==null&&(v.emitViewEvent(B),this.viewLayout.onLinesDeleted(B.fromLineNumber,B.toLineNumber)),y=!0;break}case 4:{const B=T.slice(O,O+A.detail.length);O+=A.detail.length;const F=this._lines.onModelLinesInserted(k,A.fromLineNumber,A.toLineNumber,B);F!==null&&(v.emitViewEvent(F),this.viewLayout.onLinesInserted(F.fromLineNumber,F.toLineNumber)),y=!0;break}case 2:{const B=T[O];O++;const[F,D,R,W]=this._lines.onModelLineChanged(k,A.lineNumber,B);L=F,D&&v.emitViewEvent(D),R&&(v.emitViewEvent(R),this.viewLayout.onLinesInserted(R.fromLineNumber,R.toLineNumber)),W&&(v.emitViewEvent(W),this.viewLayout.onLinesDeleted(W.fromLineNumber,W.toLineNumber));break}case 5:break}this._lines.acceptVersionId(k),this.viewLayout.onHeightMaybeChanged(),!y&&L&&(v.emitViewEvent(new c.ViewLineMappingChangedEvent),v.emitViewEvent(new c.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(v),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const v=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(v){const y=this.coordinatesConverter.convertModelPositionToViewPosition(v.getStartPosition()),L=this.viewLayout.getVerticalOffsetForLineNumber(y.lineNumber);this.viewLayout.setScrollPosition({scrollTop:L+this._viewportStartLineDelta},1)}}try{const v=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(v,f)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(f=>{let v=[];for(let y=0,L=f.ranges.length;y<L;y++){const I=f.ranges[y],k=this.coordinatesConverter.convertModelPositionToViewPosition(new S.Position(I.fromLineNumber,1)).lineNumber,E=this.coordinatesConverter.convertModelPositionToViewPosition(new S.Position(I.toLineNumber,this.model.getLineMaxColumn(I.toLineNumber))).lineNumber;v[y]={fromLineNumber:k,toLineNumber:E}}this._eventDispatcher.emitSingleViewEvent(new c.ViewTokensChangedEvent(v)),f.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(f=>{this._eventDispatcher.emitSingleViewEvent(new c.ViewLanguageConfigurationEvent),this.cursorConfig=new t.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(f=>{this.cursorConfig=new t.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(f=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const v=this._eventDispatcher.beginEmitViewEvents();v.emitViewEvent(new c.ViewFlushedEvent),v.emitViewEvent(new c.ViewLineMappingChangedEvent),v.emitViewEvent(new c.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(v),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new t.CursorConfiguration(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(f=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new c.ViewDecorationsChangedEvent(f))}))}setHiddenAreas(f){try{const v=this._eventDispatcher.beginEmitViewEvents();this._lines.setHiddenAreas(f)&&(v.emitViewEvent(new c.ViewFlushedEvent),v.emitViewEvent(new c.ViewLineMappingChangedEvent),v.emitViewEvent(new c.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(v),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const f=this._configuration.options.get(124),v=this._configuration.options.get(53),y=Math.max(20,Math.round(f.height/v)),L=this.viewLayout.getLinesViewportData(),I=Math.max(1,L.completelyVisibleStartLineNumber-y),k=Math.min(this.getLineCount(),L.completelyVisibleEndLineNumber+y);return this._toModelVisibleRanges(new C.Range(I,this.getLineMinColumn(I),k,this.getLineMaxColumn(k)))}getVisibleRanges(){const f=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(f)}_toModelVisibleRanges(f){const v=this.coordinatesConverter.convertViewRangeToModelRange(f),y=this._lines.getHiddenAreas();if(y.length===0)return[v];let L=[],I=0,k=v.startLineNumber,E=v.startColumn,T=v.endLineNumber,O=v.endColumn;for(let A=0,B=y.length;A<B;A++){const F=y[A].startLineNumber,D=y[A].endLineNumber;D<k||F>T||(k<F&&(L[I++]=new C.Range(k,E,F-1,this.model.getLineMaxColumn(F-1))),k=D+1,E=1)}return(k<T||k===T&&E<O)&&(L[I++]=new C.Range(k,E,T,O)),L}getCompletelyVisibleViewRange(){const f=this.viewLayout.getLinesViewportData(),v=f.completelyVisibleStartLineNumber,y=f.completelyVisibleEndLineNumber;return new C.Range(v,this.getLineMinColumn(v),y,this.getLineMaxColumn(y))}getCompletelyVisibleViewRangeAtScrollTop(f){const v=this.viewLayout.getLinesViewportDataAtScrollTop(f),y=v.completelyVisibleStartLineNumber,L=v.completelyVisibleEndLineNumber;return new C.Range(y,this.getLineMinColumn(y),L,this.getLineMaxColumn(L))}saveState(){const f=this.viewLayout.saveState(),v=f.scrollTop,y=this.viewLayout.getLineNumberAtVerticalOffset(v),L=this.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(y,this.getLineMinColumn(y))),I=this.viewLayout.getVerticalOffsetForLineNumber(y)-v;return{scrollLeft:f.scrollLeft,firstPosition:L,firstPositionDeltaTop:I}}reduceRestoreState(f){if(typeof f.firstPosition=="undefined")return this._reduceRestoreStateCompatibility(f);const v=this.model.validatePosition(f.firstPosition),y=this.coordinatesConverter.convertModelPositionToViewPosition(v),L=this.viewLayout.getVerticalOffsetForLineNumber(y.lineNumber)-f.firstPositionDeltaTop;return{scrollLeft:f.scrollLeft,scrollTop:L}}_reduceRestoreStateCompatibility(f){return{scrollLeft:f.scrollLeft,scrollTop:f.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(f,v,y){this._viewportStartLine=f;let L=this.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(f,this.getLineMinColumn(f)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new C.Range(L.lineNumber,L.column,L.lineNumber,L.column),1);const I=this.viewLayout.getVerticalOffsetForLineNumber(f),k=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=k-I}getActiveIndentGuide(f,v,y){return this._lines.getActiveIndentGuide(f,v,y)}getLinesIndentGuides(f,v){return this._lines.getViewLinesIndentGuides(f,v)}getLineContent(f){return this._lines.getViewLineContent(f)}getLineLength(f){return this._lines.getViewLineLength(f)}getLineMinColumn(f){return this._lines.getViewLineMinColumn(f)}getLineMaxColumn(f){return this._lines.getViewLineMaxColumn(f)}getLineFirstNonWhitespaceColumn(f){const v=M.firstNonWhitespaceIndex(this.getLineContent(f));return v===-1?0:v+1}getLineLastNonWhitespaceColumn(f){const v=M.lastNonWhitespaceIndex(this.getLineContent(f));return v===-1?0:v+2}getDecorationsInViewport(f){return this._decorations.getDecorationsViewportData(f).decorations}getViewLineRenderingData(f,v){let y=this.model.mightContainRTL(),L=this.model.mightContainNonBasicASCII(),I=this.getTabSize(),k=this._lines.getViewLineData(v),T=this._decorations.getDecorationsViewportData(f).inlineDecorations[v-f.startLineNumber];return new a.ViewLineRenderingData(k.minColumn,k.maxColumn,k.content,k.continuesWithWrappedLine,y,L,k.tokens,T,I,k.startVisibleColumn)}getViewLineData(f){return this._lines.getViewLineData(f)}getMinimapLinesRenderingData(f,v,y){let L=this._lines.getViewLinesData(f,v,y);return new a.MinimapLinesRenderingData(this.getTabSize(),L)}getAllOverviewRulerDecorations(f){return this._lines.getAllOverviewRulerDecorations(this._editorId,w.filterValidationDecorations(this._configuration.options),f)}invalidateOverviewRulerColorCache(){const f=this.model.getOverviewRulerDecorations();for(const v of f){const y=v.options.overviewRuler;y&&y.invalidateCachedColor()}}invalidateMinimapColorCache(){const f=this.model.getAllDecorations();for(const v of f){const y=v.options.minimap;y&&y.invalidateCachedColor()}}getValueInRange(f,v){const y=this.coordinatesConverter.convertViewRangeToModelRange(f);return this.model.getValueInRange(y,v)}getModelLineMaxColumn(f){return this.model.getLineMaxColumn(f)}validateModelPosition(f){return this.model.validatePosition(f)}validateModelRange(f){return this.model.validateRange(f)}deduceModelPositionRelativeToViewPosition(f,v,y){const L=this.coordinatesConverter.convertViewPositionToModelPosition(f);this.model.getEOL().length===2&&(v<0?v-=y:v+=y);const k=this.model.getOffsetAt(L)+v;return this.model.getPositionAt(k)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(f,v,y){const L=y?`\r
`:this.model.getEOL();f=f.slice(0),f.sort(C.Range.compareRangesUsingStarts);let I=!1,k=!1;for(const T of f)T.isEmpty()?I=!0:k=!0;if(!k){if(!v)return"";const T=f.map(A=>A.startLineNumber);let O="";for(let A=0;A<T.length;A++)A>0&&T[A-1]===T[A]||(O+=this.model.getLineContent(T[A])+L);return O}if(I&&v){let T=[],O=0;for(const A of f){const B=A.startLineNumber;A.isEmpty()?B!==O&&T.push(this.model.getLineContent(B)):T.push(this.model.getValueInRange(A,y?2:0)),O=B}return T.length===1?T[0]:T}let E=[];for(const T of f)T.isEmpty()||E.push(this.model.getValueInRange(T,y?2:0));return E.length===1?E[0]:E}getRichTextToCopy(f,v){const y=this.model.getLanguageIdentifier();if(y.id===1||f.length!==1)return null;let L=f[0];if(L.isEmpty()){if(!v)return null;const T=L.startLineNumber;L=new C.Range(T,this.model.getLineMinColumn(T),T,this.model.getLineMaxColumn(T))}const I=this._configuration.options.get(38),k=this._getColorMap(),E=I.fontFamily===w.EDITOR_FONT_DEFAULTS.fontFamily?I.fontFamily:`'${I.fontFamily}', ${w.EDITOR_FONT_DEFAULTS.fontFamily}`;return{mode:y.language,html:`<div style="color: ${k[1]};background-color: ${k[2]};font-family: ${E};font-weight: ${I.fontWeight};font-size: ${I.fontSize}px;line-height: ${I.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(L,k)+"</div>"}}_getHTMLToCopy(f,v){const y=f.startLineNumber,L=f.startColumn,I=f.endLineNumber,k=f.endColumn,E=this.getTabSize();let T="";for(let O=y;O<=I;O++){const A=this.model.getLineTokens(O),B=A.getLineContent(),F=O===y?L-1:0,D=O===I?k-1:B.length;B===""?T+="<br>":T+=g.tokenizeLineToHTML(B,A.inflate(),v,F,D,E,i.isWindows)}return T}_getColorMap(){let f=d.TokenizationRegistry.getColorMap(),v=["#000000"];if(f)for(let y=1,L=f.length;y<L;y++)v[y]=b.Color.Format.CSS.formatHex(f[y]);return v}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(f,v,y){this._withViewEventsCollector(L=>this._cursor.setStates(L,f,v,y))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}setCursorColumnSelectData(f){this._cursor.setCursorColumnSelectData(f)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(f){this._cursor.setPrevEditOperationType(f)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(f,v,y=0){this._withViewEventsCollector(L=>this._cursor.setSelections(L,f,v,y))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(f){this._withViewEventsCollector(v=>this._cursor.restoreState(v,f))}_executeCursorEdit(f){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new l.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(f)}executeEdits(f,v,y){this._executeCursorEdit(L=>this._cursor.executeEdits(L,f,v,y))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(f=>this._cursor.startComposition(f))}endComposition(f){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(v=>this._cursor.endComposition(v,f))}type(f,v){this._executeCursorEdit(y=>this._cursor.type(y,f,v))}compositionType(f,v,y,L,I){this._executeCursorEdit(k=>this._cursor.compositionType(k,f,v,y,L,I))}paste(f,v,y,L){this._executeCursorEdit(I=>this._cursor.paste(I,f,v,y,L))}cut(f){this._executeCursorEdit(v=>this._cursor.cut(v,f))}executeCommand(f,v){this._executeCursorEdit(y=>this._cursor.executeCommand(y,f,v))}executeCommands(f,v){this._executeCursorEdit(y=>this._cursor.executeCommands(y,f,v))}revealPrimaryCursor(f,v){this._withViewEventsCollector(y=>this._cursor.revealPrimary(y,f,v,0))}revealTopMostCursor(f){const v=this._cursor.getTopMostViewPosition(),y=new C.Range(v.lineNumber,v.column,v.lineNumber,v.column);this._withViewEventsCollector(L=>L.emitViewEvent(new c.ViewRevealRangeRequestEvent(f,y,null,0,!0,0)))}revealBottomMostCursor(f){const v=this._cursor.getBottomMostViewPosition(),y=new C.Range(v.lineNumber,v.column,v.lineNumber,v.column);this._withViewEventsCollector(L=>L.emitViewEvent(new c.ViewRevealRangeRequestEvent(f,y,null,0,!0,0)))}revealRange(f,v,y,L,I){this._withViewEventsCollector(k=>k.emitViewEvent(new c.ViewRevealRangeRequestEvent(f,y,null,L,v,I)))}getVerticalOffsetForLineNumber(f){return this.viewLayout.getVerticalOffsetForLineNumber(f)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(f,v){this.viewLayout.setScrollPosition({scrollTop:f},v)}setScrollPosition(f,v){this.viewLayout.setScrollPosition(f,v)}deltaScrollNow(f,v){this.viewLayout.deltaScrollNow(f,v)}changeWhitespace(f){this.viewLayout.changeWhitespace(f)&&(this._eventDispatcher.emitSingleViewEvent(new c.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new l.ViewZonesChangedEvent))}setMaxLineWidth(f){this.viewLayout.setMaxLineWidth(f)}_withViewEventsCollector(f){try{const v=this._eventDispatcher.beginEmitViewEvents();f(v)}finally{this._eventDispatcher.endEmitViewEvents()}}}e.ViewModel=m}),define(Q[245],J([0,1,19,23,12,51,3,18,54,134]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class p{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(u,r){let i;typeof u=="string"?i=`${r.id}/${u}`:(i=`${r.id}/${u.name}`,r.children.get(i)!==void 0&&(i=`${r.id}/${u.name}_${u.range.startLineNumber}_${u.range.startColumn}`));let n=i;for(let t=0;r.children.get(n)!==void 0;t++)n=`${i}_${t}`;return n}static empty(u){return u.children.size===0}}e.TreeElement=p;class c extends p{constructor(u,r,i){super();this.id=u,this.parent=r,this.symbol=i,this.children=new Map}}e.OutlineElement=c;class o extends p{constructor(u,r,i,n){super();this.id=u,this.parent=r,this.label=i,this.order=n,this.children=new Map}}e.OutlineGroup=o;class s extends p{constructor(u){super();this.uri=u,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(u,r){let i=this._keys.for(u,!0),n=s._requests.get(i);if(!n){let t=new N.CancellationTokenSource;n={promiseCnt:0,source:t,promise:s._create(u,t.token),model:void 0},s._requests.set(i,n);const l=Date.now();n.promise.then(()=>{this._requestDurations.update(u,Date.now()-l)})}return n.model?Promise.resolve(n.model):(n.promiseCnt+=1,r.onCancellationRequested(()=>{--n.promiseCnt==0&&(n.source.cancel(),s._requests.delete(i))}),new Promise((t,l)=>{n.promise.then(h=>{n.model=h,t(h)},h=>{s._requests.delete(i),l(h)})}))}static _create(u,r){const i=new N.CancellationTokenSource(r),n=new s(u.uri),t=C.DocumentSymbolProviderRegistry.ordered(u),l=t.map((m,_)=>{var f;let v=p.findId(`provider_${_}`,n),y=new o(v,n,(f=m.displayName)!==null&&f!==void 0?f:"Unknown Outline Provider",_);return Promise.resolve(m.provideDocumentSymbols(u,i.token)).then(L=>{for(const I of L||[])s._makeOutlineElement(I,y);return y},L=>(M.onUnexpectedExternalError(L),y)).then(L=>{p.empty(L)?L.remove():n._groups.set(v,L)})}),h=C.DocumentSymbolProviderRegistry.onDidChange(()=>{const m=C.DocumentSymbolProviderRegistry.ordered(u);b.equals(m,t)||i.cancel()});return Promise.all(l).then(()=>i.token.isCancellationRequested&&!r.isCancellationRequested?s._create(u,r):n._compact()).finally(()=>{h.dispose()})}static _makeOutlineElement(u,r){let i=p.findId(u,r),n=new c(i,r,u);if(u.children)for(const t of u.children)s._makeOutlineElement(t,n);r.children.set(n.id,n)}_compact(){let u=0;for(const[r,i]of this._groups)i.children.size===0?this._groups.delete(r):u+=1;if(u!==1)this.children=this._groups;else{let r=d.Iterable.first(this._groups.values());for(let[,i]of r.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const u=[];for(const r of this.children.values())r instanceof c?u.push(r.symbol):u.push(...d.Iterable.map(r.children.values(),i=>i.symbol));return u.sort((r,i)=>S.Range.compareRangesUsingStarts(r.range,i.range))}asListOfDocumentSymbols(){const u=this.getTopLevelSymbols(),r=[];return s._flattenDocumentSymbols(r,u,""),r.sort((i,n)=>S.Range.compareRangesUsingStarts(i.range,n.range))}static _flattenDocumentSymbols(u,r,i){for(const n of r)u.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&s._flattenDocumentSymbols(u,n.children,n.name)}}e.OutlineModel=s,s._requestDurations=new g.LanguageFeatureRequestDelays(C.DocumentSymbolProviderRegistry,350),s._requests=new w.LRUCache(9,.75),s._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(a,u){return`${a.id}/${u?a.getVersionId():""}/${this._hash(C.DocumentSymbolProviderRegistry.all(a))}`}_hash(a){let u="";for(const r of a){let i=this._data.get(r);typeof i=="undefined"&&(i=this._counter++,this._data.set(r,i)),u+=i}return u}}}),define(Q[541],J([0,1,174,31,41]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=e.ID_INDENT_PROVIDER=void 0;const w=5e3;e.ID_INDENT_PROVIDER="indent";class S{constructor(p){this.editorModel=p,this.id=e.ID_INDENT_PROVIDER}dispose(){}compute(p){let c=M.LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id),o=c&&!!c.offSide,s=c&&c.markers;return Promise.resolve(d(this.editorModel,o,s))}}e.IndentRangeProvider=S;class C{constructor(p){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=p}insertFirst(p,c,o){if(!(p>b.MAX_LINE_NUMBER||c>b.MAX_LINE_NUMBER)){let s=this._length;this._startIndexes[s]=p,this._endIndexes[s]=c,this._length++,o<1e3&&(this._indentOccurrences[o]=(this._indentOccurrences[o]||0)+1)}}toIndentRanges(p){if(this._length<=this._foldingRangesLimit){let c=new Uint32Array(this._length),o=new Uint32Array(this._length);for(let s=this._length-1,a=0;s>=0;s--,a++)c[a]=this._startIndexes[s],o[a]=this._endIndexes[s];return new b.FoldingRegions(c,o)}else{let c=0,o=this._indentOccurrences.length;for(let r=0;r<this._indentOccurrences.length;r++){let i=this._indentOccurrences[r];if(i){if(i+c>this._foldingRangesLimit){o=r;break}c+=i}}const s=p.getOptions().tabSize;let a=new Uint32Array(this._foldingRangesLimit),u=new Uint32Array(this._foldingRangesLimit);for(let r=this._length-1,i=0;r>=0;r--){let n=this._startIndexes[r],t=p.getLineContent(n),l=N.TextModel.computeIndentLevel(t,s);(l<o||l===o&&c++<this._foldingRangesLimit)&&(a[i]=n,u[i]=this._endIndexes[r],i++)}return new b.FoldingRegions(a,u)}}}e.RangesCollector=C;function d(g,p,c,o=w){const s=g.getOptions().tabSize;let a=new C(o),u;c&&(u=new RegExp(`(${c.start.source})|(?:${c.end.source})`));let r=[],i=g.getLineCount()+1;r.push({indent:-1,endAbove:i,line:i});for(let n=g.getLineCount();n>0;n--){let t=g.getLineContent(n),l=N.TextModel.computeIndentLevel(t,s),h=r[r.length-1];if(l===-1){p&&(h.endAbove=n);continue}let m;if(u&&(m=t.match(u)))if(m[1]){let _=r.length-1;for(;_>0&&r[_].indent!==-2;)_--;if(_>0){r.length=_+1,h=r[_],a.insertFirst(n,h.line,l),h.line=n,h.indent=l,h.endAbove=n;continue}}else{r.push({indent:-2,endAbove:n,line:n});continue}if(h.indent>l){do r.pop(),h=r[r.length-1];while(h.indent>l);let _=h.endAbove-1;_-n>=1&&a.insertFirst(n,_,l)}h.indent===l?h.endAbove=n:r.push({indent:l,endAbove:n,line:n})}return a.toIndentRanges(g)}e.computeRanges=d}),define(Q[542],J([0,1,8,179,3,21,109,41,229]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;class g{constructor(c,o,s){this._selection=c,this._isMovingDown=o,this._autoIndent=s,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(c,o){let s=c.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===s){this._selectionId=o.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=o.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let a=this._selection;a.startLineNumber<a.endLineNumber&&a.endColumn===1&&(this._moveEndPositionDown=!0,a=a.setEndPosition(a.endLineNumber-1,c.getLineMaxColumn(a.endLineNumber-1)));const{tabSize:u,indentSize:r,insertSpaces:i}=c.getOptions();let n=this.buildIndentConverter(u,r,i),t={getLineTokens:l=>c.getLineTokens(l),getLanguageIdentifier:()=>c.getLanguageIdentifier(),getLanguageIdAtPosition:(l,h)=>c.getLanguageIdAtPosition(l,h),getLineContent:null};if(a.startLineNumber===a.endLineNumber&&c.getLineMaxColumn(a.startLineNumber)===1){let l=a.startLineNumber,h=this._isMovingDown?l+1:l-1;c.getLineMaxColumn(h)===1?o.addEditOperation(new M.Range(1,1,1,1),null):(o.addEditOperation(new M.Range(l,1,l,1),c.getLineContent(h)),o.addEditOperation(new M.Range(h,1,h,c.getLineMaxColumn(h)),null)),a=new w.Selection(h,1,h,1)}else{let l,h;if(this._isMovingDown){l=a.endLineNumber+1,h=c.getLineContent(l),o.addEditOperation(new M.Range(l-1,c.getLineMaxColumn(l-1),l,c.getLineMaxColumn(l)),null);let m=h;if(this.shouldAutoIndent(c,a)){let _=this.matchEnterRule(c,n,u,l,a.startLineNumber-1);if(_!==null){let v=b.getLeadingWhitespace(c.getLineContent(l)),y=_+d.getSpaceCnt(v,u);m=d.generateIndent(y,u,i)+this.trimLeft(h)}else{t.getLineContent=y=>y===a.startLineNumber?c.getLineContent(l):c.getLineContent(y);let v=C.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,t,c.getLanguageIdAtPosition(l,1),a.startLineNumber,n);if(v!==null){let y=b.getLeadingWhitespace(c.getLineContent(l)),L=d.getSpaceCnt(v,u),I=d.getSpaceCnt(y,u);L!==I&&(m=d.generateIndent(L,u,i)+this.trimLeft(h))}}o.addEditOperation(new M.Range(a.startLineNumber,1,a.startLineNumber,1),m+`
`);let f=this.matchEnterRuleMovingDown(c,n,u,a.startLineNumber,l,m);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(c,o,a,u,i,f);else{t.getLineContent=y=>y===a.startLineNumber?m:y>=a.startLineNumber+1&&y<=a.endLineNumber+1?c.getLineContent(y-1):c.getLineContent(y);let v=C.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,t,c.getLanguageIdAtPosition(l,1),a.startLineNumber+1,n);if(v!==null){const y=b.getLeadingWhitespace(c.getLineContent(a.startLineNumber)),L=d.getSpaceCnt(v,u),I=d.getSpaceCnt(y,u);if(L!==I){const k=L-I;this.getIndentEditsOfMovingBlock(c,o,a,u,i,k)}}}}else o.addEditOperation(new M.Range(a.startLineNumber,1,a.startLineNumber,1),m+`
`)}else if(l=a.startLineNumber-1,h=c.getLineContent(l),o.addEditOperation(new M.Range(l,1,l+1,1),null),o.addEditOperation(new M.Range(a.endLineNumber,c.getLineMaxColumn(a.endLineNumber),a.endLineNumber,c.getLineMaxColumn(a.endLineNumber)),`
`+h),this.shouldAutoIndent(c,a)){t.getLineContent=_=>_===l?c.getLineContent(a.startLineNumber):c.getLineContent(_);let m=this.matchEnterRule(c,n,u,a.startLineNumber,a.startLineNumber-2);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(c,o,a,u,i,m);else{let _=C.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,t,c.getLanguageIdAtPosition(a.startLineNumber,1),l,n);if(_!==null){let f=b.getLeadingWhitespace(c.getLineContent(a.startLineNumber)),v=d.getSpaceCnt(_,u),y=d.getSpaceCnt(f,u);if(v!==y){let L=v-y;this.getIndentEditsOfMovingBlock(c,o,a,u,i,L)}}}}}this._selectionId=o.trackSelection(a)}buildIndentConverter(c,o,s){return{shiftIndent:a=>N.ShiftCommand.shiftIndent(a,a.length+1,c,o,s),unshiftIndent:a=>N.ShiftCommand.unshiftIndent(a,a.length+1,c,o,s)}}parseEnterResult(c,o,s,a,u){if(u){let r=u.indentation;u.indentAction===S.IndentAction.None||u.indentAction===S.IndentAction.Indent?r=u.indentation+u.appendText:u.indentAction===S.IndentAction.IndentOutdent?r=u.indentation:u.indentAction===S.IndentAction.Outdent&&(r=o.unshiftIndent(u.indentation)+u.appendText);let i=c.getLineContent(a);if(this.trimLeft(i).indexOf(this.trimLeft(r))>=0){let n=b.getLeadingWhitespace(c.getLineContent(a)),t=b.getLeadingWhitespace(r),l=C.LanguageConfigurationRegistry.getIndentMetadata(c,a);l!==null&&l&2&&(t=o.unshiftIndent(t));let h=d.getSpaceCnt(t,s),m=d.getSpaceCnt(n,s);return h-m}}return null}matchEnterRuleMovingDown(c,o,s,a,u,r){if(b.lastNonWhitespaceIndex(r)>=0){let i=c.getLineMaxColumn(u),n=C.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,c,new M.Range(u,i,u,i));return this.parseEnterResult(c,o,s,a,n)}else{let i=a-1;for(;i>=1;){let l=c.getLineContent(i);if(b.lastNonWhitespaceIndex(l)>=0)break;i--}if(i<1||a>c.getLineCount())return null;let n=c.getLineMaxColumn(i),t=C.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,c,new M.Range(i,n,i,n));return this.parseEnterResult(c,o,s,a,t)}}matchEnterRule(c,o,s,a,u,r){let i=u;for(;i>=1;){let l;if(i===u&&r!==void 0?l=r:l=c.getLineContent(i),b.lastNonWhitespaceIndex(l)>=0)break;i--}if(i<1||a>c.getLineCount())return null;let n=c.getLineMaxColumn(i),t=C.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,c,new M.Range(i,n,i,n));return this.parseEnterResult(c,o,s,a,t)}trimLeft(c){return c.replace(/^\s+/,"")}shouldAutoIndent(c,o){if(this._autoIndent<4||!c.isCheapToTokenize(o.startLineNumber))return!1;let s=c.getLanguageIdAtPosition(o.startLineNumber,1),a=c.getLanguageIdAtPosition(o.endLineNumber,1);return!(s!==a||C.LanguageConfigurationRegistry.getIndentRulesSupport(s)===null)}getIndentEditsOfMovingBlock(c,o,s,a,u,r){for(let i=s.startLineNumber;i<=s.endLineNumber;i++){let n=c.getLineContent(i),t=b.getLeadingWhitespace(n),h=d.getSpaceCnt(t,a)+r,m=d.generateIndent(h,a,u);m!==t&&(o.addEditOperation(new M.Range(i,1,i,t.length+1),m),i===s.endLineNumber&&s.endColumn<=t.length+1&&m===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(c,o){let s=o.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(s=s.setEndPosition(s.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&s.startLineNumber<s.endLineNumber&&(s=s.setEndPosition(s.endLineNumber,2)),s}}e.MoveLinesCommand=g}),define(Q[543],J([0,1,7,104,29,119,2,40,3,31,353]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=e.ViewZoneDelegate=void 0;const p=new M.Color(new M.RGBA(0,122,204)),c={showArrow:!0,showFrame:!0,className:"",frameColor:p,arrowColor:p,keepEditorSelection:!1},o="vs.editor.contrib.zoneWidget";class s{constructor(n,t,l,h,m,_){this.id="",this.domNode=n,this.afterLineNumber=t,this.afterColumn=l,this.heightInLines=h,this._onDomNodeTop=m,this._onComputedHeight=_}onDomNodeTop(n){this._onDomNodeTop(n)}onComputedHeight(n){this._onComputedHeight(n)}}e.ViewZoneDelegate=s;class a{constructor(n,t){this._id=n,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=a;class u{constructor(n){this._editor=n,this._ruleName=u._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),b.removeCSSRulesContainingSelector(this._ruleName)}set color(n){this._color!==n&&(this._color=n,this._updateStyle())}set height(n){this._height!==n&&(this._height=n,this._updateStyle())}_updateStyle(){b.removeCSSRulesContainingSelector(this._ruleName),b.createCSSRule(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(n){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:d.Range.fromPositions(n),options:{className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}u._IdGenerator=new w.IdGenerator(".arrow-decoration-");class r{constructor(n,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new S.DisposableStore,this.container=null,this._isShowing=!1,this.editor=n,this.options=C.deepClone(t),C.mixin(this.options,c,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(l=>{const h=this._getWidth(l);this.domNode.style.width=h+"px",this.domNode.style.left=this._getLeft(l)+"px",this._onWidth(h)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(n=>{this._viewZone&&n.removeZone(this._viewZone.id),this._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new u(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(n){n.frameColor&&(this.options.frameColor=n.frameColor),n.arrowColor&&(this.options.arrowColor=n.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let n=this.options.frameColor.toString();this.container.style.borderTopColor=n,this.container.style.borderBottomColor=n}if(this._arrow&&this.options.arrowColor){let n=this.options.arrowColor.toString();this._arrow.color=n}}_getWidth(n){return n.width-n.minimap.minimapWidth-n.verticalScrollbarWidth}_getLeft(n){return n.minimap.minimapWidth>0&&n.minimap.minimapLeft===0?n.minimap.minimapWidth:0}_onViewZoneTop(n){this.domNode.style.top=n+"px"}_onViewZoneHeight(n){if(this.domNode.style.height=`${n}px`,this.container){let t=n-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const l=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(l))}this._resizeSash&&this._resizeSash.layout()}get position(){const[n]=this._positionMarkerId;if(!!n){const t=this.editor.getModel();if(!!t){const l=t.getDecorationRange(n);if(!!l)return l.getStartPosition()}}}show(n,t){const l=d.Range.isIRange(n)?d.Range.lift(n):d.Range.fromPositions(n);this._isShowing=!0,this._showImpl(l,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:l,options:g.ModelDecorationOptions.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(n=>{this._viewZone&&n.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let n=this.editor.getOption(53),t=0;if(this.options.showArrow){let l=Math.round(n/3);t+=2*l}if(this.options.showFrame){let l=Math.round(n/9);t+=2*l}return t}_showImpl(n,t){const l=n.getStartPosition(),h=this.editor.getLayoutInfo(),m=this._getWidth(h);this.domNode.style.width=`${m}px`,this.domNode.style.left=this._getLeft(h)+"px";const _=document.createElement("div");_.style.overflow="hidden";const f=this.editor.getOption(53),v=Math.max(12,this.editor.getLayoutInfo().height/f*.8);t=Math.min(t,v);let y=0,L=0;if(this._arrow&&this.options.showArrow&&(y=Math.round(f/3),this._arrow.height=y,this._arrow.show(l)),this.options.showFrame&&(L=Math.round(f/9)),this.editor.changeViewZones(E=>{this._viewZone&&E.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new s(_,l.lineNumber,l.column,t,T=>this._onViewZoneTop(T),T=>this._onViewZoneHeight(T)),this._viewZone.id=E.addZone(this._viewZone),this._overlayWidget=new a(o+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const E=this.options.frameWidth?this.options.frameWidth:L;this.container.style.borderTopWidth=E+"px",this.container.style.borderBottomWidth=E+"px"}let I=t*f-this._decoratingElementsHeight();this.container&&(this.container.style.top=y+"px",this.container.style.height=I+"px",this.container.style.overflow="hidden"),this._doLayout(I,m),this.options.keepEditorSelection||this.editor.setSelection(n);const k=this.editor.getModel();if(k){const E=n.endLineNumber+1;E<=k.getLineCount()?this.revealLine(E,!1):this.revealLine(k.getLineCount(),!0)}}revealLine(n,t){t?this.editor.revealLineInCenter(n,0):this.editor.revealLine(n,0)}setCssClass(n,t){!this.container||(t&&this.container.classList.remove(t),this.container.classList.add(n))}_onWidth(n){}_doLayout(n,t){}_relayout(n){this._viewZone&&this._viewZone.heightInLines!==n&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=n,t.layoutZone(this._viewZone.id))})}_initSash(){if(!this._resizeSash){this._resizeSash=this._disposables.add(new N.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0);let n;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(n={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{n=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(n){let l=(t.currentY-n.startY)/this.editor.getOption(53),h=l<0?Math.ceil(l):Math.floor(l),m=n.heightInLines+h;m>5&&m<35&&this._relayout(m)}}))}}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const n=this.editor.getLayoutInfo();return n.width-n.minimap.minimapWidth}}e.ZoneWidget=r}),define(Q[246],J([0,1,127,18,76,232]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTokenizationSupport=e.MonarchTokenizer=void 0;const S=5;class C{constructor(n){this._maxCacheDepth=n,this._entries=Object.create(null)}static create(n,t){return this._INSTANCE.create(n,t)}create(n,t){if(n!==null&&n.depth>=this._maxCacheDepth)return new d(n,t);let l=d.getStackElementId(n);l.length>0&&(l+="|"),l+=t;let h=this._entries[l];return h||(h=new d(n,t),this._entries[l]=h,h)}}C._INSTANCE=new C(S);class d{constructor(n,t){this.parent=n,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(n){let t="";for(;n!==null;)t.length>0&&(t+="|"),t+=n.state,n=n.parent;return t}static _equals(n,t){for(;n!==null&&t!==null;){if(n===t)return!0;if(n.state!==t.state)return!1;n=n.parent,t=t.parent}return n===null&&t===null}equals(n){return d._equals(this,n)}push(n){return C.create(this,n)}pop(){return this.parent}popall(){let n=this;for(;n.parent;)n=n.parent;return n}switchTo(n){return C.create(this.parent,n)}}class g{constructor(n,t){this.modeId=n,this.state=t}equals(n){return this.modeId===n.modeId&&this.state.equals(n.state)}clone(){return this.state.clone()===this.state?this:new g(this.modeId,this.state)}}class p{constructor(n){this._maxCacheDepth=n,this._entries=Object.create(null)}static create(n,t){return this._INSTANCE.create(n,t)}create(n,t){if(t!==null)return new c(n,t);if(n!==null&&n.depth>=this._maxCacheDepth)return new c(n,t);let l=d.getStackElementId(n),h=this._entries[l];return h||(h=new c(n,null),this._entries[l]=h,h)}}p._INSTANCE=new p(S);class c{constructor(n,t){this.stack=n,this.embeddedModeData=t}clone(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:p.create(this.stack,this.embeddedModeData)}equals(n){return!(n instanceof c)||!this.stack.equals(n.stack)?!1:this.embeddedModeData===null&&n.embeddedModeData===null?!0:this.embeddedModeData===null||n.embeddedModeData===null?!1:this.embeddedModeData.equals(n.embeddedModeData)}}class o{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(n,t){this._language=t}emit(n,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new b.Token(n,t,this._language)))}nestedModeTokenize(n,t,l,h){const m=l.modeId,_=l.state,f=N.TokenizationRegistry.get(m);if(!f)return this.enterMode(h,m),this.emit(h,""),_;let v=f.tokenize(n,t,_,h);return this._tokens=this._tokens.concat(v.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,v.endState}finalize(n){return new b.TokenizationResult(this._tokens,n)}}class s{constructor(n,t){this._modeService=n,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(n,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(n,t){let l=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==l&&(this._lastTokenMetadata=l,this._tokens.push(n),this._tokens.push(l))}static _merge(n,t,l){let h=n!==null?n.length:0,m=t.length,_=l!==null?l.length:0;if(h===0&&m===0&&_===0)return new Uint32Array(0);if(h===0&&m===0)return l;if(m===0&&_===0)return n;let f=new Uint32Array(h+m+_);n!==null&&f.set(n);for(let v=0;v<m;v++)f[h+v]=t[v];return l!==null&&f.set(l,h+m),f}nestedModeTokenize(n,t,l,h){const m=l.modeId,_=l.state,f=N.TokenizationRegistry.get(m);if(!f)return this.enterMode(h,m),this.emit(h,""),_;let v=f.tokenize2(n,t,_,h);return this._prependTokens=s._merge(this._prependTokens,this._tokens,v.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,v.endState}finalize(n){return new b.TokenizationResult2(s._merge(this._prependTokens,this._tokens,null),n)}}class a{constructor(n,t,l,h){this._modeService=n,this._standaloneThemeService=t,this._modeId=l,this._lexer=h,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let m=!1;this._tokenizationRegistryListener=N.TokenizationRegistry.onDidChange(_=>{if(!m){let f=!1;for(let v=0,y=_.changedLanguages.length;v<y;v++){let L=_.changedLanguages[v];if(this._embeddedModes[L]){f=!0;break}}f&&(m=!0,N.TokenizationRegistry.fire([this._modeId]),m=!1)}})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let n=[];for(let t in this._embeddedModes){const l=N.TokenizationRegistry.get(t);if(l){if(l instanceof a){const m=l.getLoadStatus();m.loaded===!1&&n.push(m.promise)}continue}const h=N.TokenizationRegistry.getPromise(t);h&&n.push(h)}return n.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(n).then(t=>{})}}getInitialState(){let n=C.create(null,this._lexer.start);return p.create(n,null)}tokenize(n,t,l,h){let m=new o,_=this._tokenize(n,t,l,h,m);return m.finalize(_)}tokenize2(n,t,l,h){let m=new s(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),_=this._tokenize(n,t,l,h,m);return m.finalize(_)}_tokenize(n,t,l,h,m){return l.embeddedModeData?this._nestedTokenize(n,t,l,h,m):this._myTokenize(n,t,l,h,m)}_findLeavingNestedModeOffset(n,t){let l=this._lexer.tokenizer[t.stack.state];if(!l&&(l=w.findRules(this._lexer,t.stack.state),!l))throw w.createError(this._lexer,"tokenizer state is not defined: "+t.stack.state);let h=-1,m=!1;for(const _ of l)if(!(!w.isIAction(_.action)||_.action.nextEmbedded!=="@pop")){m=!0;let f=_.regex,v=_.regex.source;if(v.substr(0,4)==="^(?:"&&v.substr(v.length-1,1)===")"){let L=(f.ignoreCase?"i":"")+(f.unicode?"u":"");f=new RegExp(v.substr(4,v.length-5),L)}let y=n.search(f);y===-1||y!==0&&_.matchOnlyAtLineStart||(h===-1||y<h)&&(h=y)}if(!m)throw w.createError(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return h}_nestedTokenize(n,t,l,h,m){let _=this._findLeavingNestedModeOffset(n,l);if(_===-1){let y=m.nestedModeTokenize(n,t,l.embeddedModeData,h);return p.create(l.stack,new g(l.embeddedModeData.modeId,y))}let f=n.substring(0,_);f.length>0&&m.nestedModeTokenize(f,!1,l.embeddedModeData,h);let v=n.substring(_);return this._myTokenize(v,t,l,h+_,m)}_safeRuleName(n){return n?n.name:"(unknown)"}_myTokenize(n,t,l,h,m){m.enterMode(h,this._modeId);const _=n.length,f=t&&this._lexer.includeLF?n+`
`:n,v=f.length;let y=l.embeddedModeData,L=l.stack,I=0,k=null,E=!0;for(;E||I<v;){const T=I,O=L.depth,A=k?k.groups.length:0,B=L.state;let F=null,D=null,R=null,W=null,x=null;if(k){F=k.matches;const ee=k.groups.shift();D=ee.matched,R=ee.action,W=k.rule,k.groups.length===0&&(k=null)}else{if(!E&&I>=v)break;E=!1;let ee=this._lexer.tokenizer[B];if(!ee&&(ee=w.findRules(this._lexer,B),!ee))throw w.createError(this._lexer,"tokenizer state is not defined: "+B);let se=f.substr(I);for(const ne of ee)if((I===0||!ne.matchOnlyAtLineStart)&&(F=se.match(ne.regex),F)){D=F[0],R=ne.action;break}}if(F||(F=[""],D=""),R||(I<v&&(F=[f.charAt(I)],D=F[0]),R=this._lexer.defaultToken),D===null)break;for(I+=D.length;w.isFuzzyAction(R)&&w.isIAction(R)&&R.test;)R=R.test(D,F,B,I===v);let K=null;if(typeof R=="string"||Array.isArray(R))K=R;else if(R.group)K=R.group;else if(R.token!==null&&R.token!==void 0){if(R.tokenSubst?K=w.substituteMatches(this._lexer,R.token,D,F,B):K=R.token,R.nextEmbedded)if(R.nextEmbedded==="@pop"){if(!y)throw w.createError(this._lexer,"cannot pop embedded mode if not inside one");y=null}else{if(y)throw w.createError(this._lexer,"cannot enter embedded mode from within an embedded mode");x=w.substituteMatches(this._lexer,R.nextEmbedded,D,F,B)}if(R.goBack&&(I=Math.max(0,I-R.goBack)),R.switchTo&&typeof R.switchTo=="string"){let ee=w.substituteMatches(this._lexer,R.switchTo,D,F,B);if(ee[0]==="@"&&(ee=ee.substr(1)),w.findRules(this._lexer,ee))L=L.switchTo(ee);else throw w.createError(this._lexer,"trying to switch to a state '"+ee+"' that is undefined in rule: "+this._safeRuleName(W))}else{if(R.transform&&typeof R.transform=="function")throw w.createError(this._lexer,"action.transform not supported");if(R.next)if(R.next==="@push"){if(L.depth>=this._lexer.maxStack)throw w.createError(this._lexer,"maximum tokenizer stack size reached: ["+L.state+","+L.parent.state+",...]");L=L.push(B)}else if(R.next==="@pop"){if(L.depth<=1)throw w.createError(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(W));L=L.pop()}else if(R.next==="@popall")L=L.popall();else{let ee=w.substituteMatches(this._lexer,R.next,D,F,B);if(ee[0]==="@"&&(ee=ee.substr(1)),w.findRules(this._lexer,ee))L=L.push(ee);else throw w.createError(this._lexer,"trying to set a next state '"+ee+"' that is undefined in rule: "+this._safeRuleName(W))}}R.log&&typeof R.log=="string"&&w.log(this._lexer,this._lexer.languageId+": "+w.substituteMatches(this._lexer,R.log,D,F,B))}if(K===null)throw w.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(W));const Y=ee=>{let se=this._modeService.getModeIdForLanguageName(ee);se&&(ee=se);const ne=this._getNestedEmbeddedModeData(ee);if(I<v){const le=n.substr(I);return this._nestedTokenize(le,t,p.create(L,ne),h+I,m)}else return p.create(L,ne)};if(Array.isArray(K)){if(k&&k.groups.length>0)throw w.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(W));if(F.length!==K.length+1)throw w.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(W));let ee=0;for(let se=1;se<F.length;se++)ee+=F[se].length;if(ee!==D.length)throw w.createError(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(W));k={rule:W,matches:F,groups:[]};for(let se=0;se<K.length;se++)k.groups[se]={action:K[se],matched:F[se+1]};I-=D.length;continue}else{if(K==="@rematch"&&(I-=D.length,D="",F=null,K="",x!==null))return Y(x);if(D.length===0){if(v===0||O!==L.depth||B!==L.state||(k?k.groups.length:0)!==A)continue;throw w.createError(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(W))}let ee=null;if(w.isString(K)&&K.indexOf("@brackets")===0){let se=K.substr("@brackets".length),ne=u(this._lexer,D);if(!ne)throw w.createError(this._lexer,"@brackets token returned but no bracket defined as: "+D);ee=w.sanitize(ne.token+se)}else{let se=K===""?"":K+this._lexer.tokenPostfix;ee=w.sanitize(se)}T<_&&m.emit(T+h,ee)}if(x!==null)return Y(x)}return p.create(L,y)}_getNestedEmbeddedModeData(n){let t=this._locateMode(n);if(t){let l=N.TokenizationRegistry.get(t);if(l)return new g(t,l.getInitialState())}return new g(t||M.NULL_MODE_ID,M.NULL_STATE)}_locateMode(n){if(!n||!this._modeService.isRegisteredMode(n))return null;if(n===this._modeId)return n;let t=this._modeService.getModeId(n);return t&&(this._modeService.triggerMode(t),this._embeddedModes[t]=!0),t}}e.MonarchTokenizer=a;function u(i,n){if(!n)return null;n=w.fixCase(i,n);let t=i.brackets;for(const l of t){if(l.open===n)return{token:l.token,bracketType:1};if(l.close===n)return{token:l.token,bracketType:-1}}return null}function r(i,n,t,l){return new a(i,n,t,l)}e.createTokenizationSupport=r}),define(Q[544],J([0,1,15,8,113,18,129,63,246]),function(q,e,b,N,M,w,S,C,d){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.Colorizer=void 0;const p=(g=window.trustedTypes)===null||g===void 0?void 0:g.createPolicy("standaloneColorizer",{createHTML:u=>u});class c{static colorizeElement(r,i,n,t){t=t||{};let l=t.theme||"vs",h=t.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!h)return console.error("Mode not detected"),Promise.resolve();r.setTheme(l);let m=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+l;let _=f=>{var v;const y=(v=p==null?void 0:p.createHTML(f))!==null&&v!==void 0?v:f;n.innerHTML=y};return this.colorize(i,m||"",h,t).then(_,f=>console.error(f))}static colorize(r,i,n,t){let l=4;t&&typeof t.tabSize=="number"&&(l=t.tabSize),N.startsWithUTF8BOM(i)&&(i=i.substr(1));let h=N.splitLines(i),m=r.getModeId(n);if(!m)return Promise.resolve(s(h,l));r.triggerMode(m);const _=w.TokenizationRegistry.get(m);if(_)return o(h,l,_);const f=w.TokenizationRegistry.getPromise(m);return f?new Promise((v,y)=>{f.then(L=>{o(h,l,L).then(v,y)},y)}):new Promise((v,y)=>{let L=null,I=null;const k=()=>{L&&(L.dispose(),L=null),I&&(I.dispose(),I=null);const E=w.TokenizationRegistry.get(m);if(E){o(h,l,E).then(v,y);return}v(s(h,l))};I=new b.TimeoutTimer,I.cancelAndSet(k,500),L=w.TokenizationRegistry.onDidChange(E=>{E.changedLanguages.indexOf(m)>=0&&k()})})}static colorizeLine(r,i,n,t,l=4){const h=C.ViewLineRenderingData.isBasicASCII(r,i),m=C.ViewLineRenderingData.containsRTL(r,h,n);return S.renderViewLine2(new S.RenderLineInput(!1,!0,r,!1,h,m,0,t,[],l,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(r,i,n=4){let t=r.getLineContent(i);r.forceTokenization(i);let h=r.getLineTokens(i).inflate();return this.colorizeLine(t,r.mightContainNonBasicASCII(),r.mightContainRTL(),h,n)}}e.Colorizer=c;function o(u,r,i){return new Promise((n,t)=>{const l=()=>{const h=a(u,r,i);if(i instanceof d.MonarchTokenizer){const m=i.getLoadStatus();if(m.loaded===!1){m.promise.then(l,t);return}}n(h)};l()})}function s(u,r){let i=[];const n=(0<<11|1<<14|2<<23)>>>0,t=new Uint32Array(2);t[0]=0,t[1]=n;for(let l=0,h=u.length;l<h;l++){let m=u[l];t[0]=m.length;const _=new M.LineTokens(t,m),f=C.ViewLineRenderingData.isBasicASCII(m,!0),v=C.ViewLineRenderingData.containsRTL(m,f,!0);let y=S.renderViewLine2(new S.RenderLineInput(!1,!0,m,!1,f,v,0,_,[],r,0,0,0,0,-1,"none",!1,!1,null));i=i.concat(y.html),i.push("<br/>")}return i.join("")}function a(u,r,i){let n=[],t=i.getInitialState();for(let l=0,h=u.length;l<h;l++){let m=u[l],_=i.tokenize2(m,!0,t,0);M.LineTokens.convertToEndOffset(_.tokens,m.length);let f=new M.LineTokens(_.tokens,m);const v=C.ViewLineRenderingData.isBasicASCII(m,!0),y=C.ViewLineRenderingData.containsRTL(m,v,!0);let L=S.renderViewLine2(new S.RenderLineInput(!1,!0,m,!1,v,y,0,f.inflate(),[],r,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(L.html),n.push("<br/>"),t=_.endState}return n.join("")}}),define(Q[114],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=b.createDecorator("themeService")}),define(Q[84],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=b.createDecorator("clipboardService")}),define(Q[26],J([0,1,2,20,9,6,71,54]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=M.createDecorator("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new w.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(d,g){if(!d)throw new Error("invalid command");if(typeof d=="string"){if(!g)throw new Error("invalid command");return this.registerCommand({id:d,handler:g})}if(d.description){const a=[];for(let r of d.description.args)a.push(r.constraint);const u=d.handler;d.handler=function(r,...i){return N.validateConstraints(i,a),u(r,...i)}}const{id:p}=d;let c=this._commands.get(p);c||(c=new S.LinkedList,this._commands.set(p,c));let o=c.unshift(d),s=b.toDisposable(()=>{o();const a=this._commands.get(p);(a==null?void 0:a.isEmpty())&&this._commands.delete(p)});return this._onDidRegisterCommand.fire(p),s}registerCommandAlias(d,g){return e.CommandsRegistry.registerCommand(d,(p,...c)=>p.get(e.ICommandService).executeCommand(g,...c))}getCommand(d){const g=this._commands.get(d);if(!(!g||g.isEmpty()))return C.Iterable.first(g)}getCommands(){const d=new Map;for(const g of this._commands.keys()){const p=this.getCommand(g);p&&d.set(g,p)}return d}}}),define(Q[247],J([0,1,23,12,24,18,36,26,20,383,3]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentRangeSemanticTokensProvider=e.getDocumentSemanticTokens=e.isSemanticTokensEdits=e.isSemanticTokens=void 0;function c(r){return r&&!!r.data}e.isSemanticTokens=c;function o(r){return r&&Array.isArray(r.edits)}e.isSemanticTokensEdits=o;function s(r,i,n){const t=a(r);return t?{provider:t,request:Promise.resolve(t.provideDocumentSemanticTokens(r,i,n))}:null}e.getDocumentSemanticTokens=s;function a(r){const i=w.DocumentSemanticTokensProviderRegistry.ordered(r);return i.length>0?i[0]:null}function u(r){const i=w.DocumentRangeSemanticTokensProviderRegistry.ordered(r);return i.length>0?i[0]:null}e.getDocumentRangeSemanticTokensProvider=u,C.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",(r,...i)=>Ie(void 0,void 0,void 0,function*(){const[n]=i;d.assertType(n instanceof M.URI);const t=r.get(S.IModelService).getModel(n);if(!!t){const l=a(t);return l?l.getLegend():r.get(C.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",n)}})),C.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",(r,...i)=>Ie(void 0,void 0,void 0,function*(){const[n]=i;d.assertType(n instanceof M.URI);const t=r.get(S.IModelService).getModel(n);if(!!t){const l=s(t,null,b.CancellationToken.None);if(!l)return r.get(C.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",n,t.getFullModelRange());const{provider:h,request:m}=l;let _;try{_=yield m}catch(v){N.onUnexpectedExternalError(v);return}if(!(!_||!c(_))){const f=g.encodeSemanticTokensDto({id:0,type:"full",data:_.data});return _.resultId&&h.releaseDocumentSemanticTokens(_.resultId),f}}})),C.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",(r,...i)=>Ie(void 0,void 0,void 0,function*(){const[n]=i;d.assertType(n instanceof M.URI);const t=r.get(S.IModelService).getModel(n);if(!!t){const l=u(t);if(!!l)return l.getLegend()}})),C.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",(r,...i)=>Ie(void 0,void 0,void 0,function*(){const[n,t]=i;d.assertType(n instanceof M.URI),d.assertType(p.Range.isIRange(t));const l=r.get(S.IModelService).getModel(n);if(!!l){const h=u(l);if(!!h){let m;try{m=yield h.provideDocumentRangeSemanticTokens(l,p.Range.lift(t),b.CancellationToken.None)}catch(_){N.onUnexpectedExternalError(_);return}if(!(!m||!c(m)))return g.encodeSemanticTokensDto({id:0,type:"full",data:m.data})}}}))}),define(Q[248],J([0,1,19,23,12,24,18,36,2,26,20]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class c{constructor(){this.lenses=[],this._disposables=new d.DisposableStore}dispose(){this._disposables.dispose()}add(a,u){this._disposables.add(a);for(const r of a.lenses)this.lenses.push({symbol:r,provider:u})}}e.CodeLensModel=c;function o(s,a){return Ie(this,void 0,void 0,function*(){const u=S.CodeLensProviderRegistry.ordered(s),r=new Map,i=new c,n=u.map((t,l)=>Ie(this,void 0,void 0,function*(){r.set(t,l);try{const h=yield Promise.resolve(t.provideCodeLenses(s,a));h&&i.add(h,t)}catch(h){M.onUnexpectedExternalError(h)}}));return yield Promise.all(n),i.lenses=b.mergeSort(i.lenses,(t,l)=>t.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:t.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:r.get(t.provider)<r.get(l.provider)?-1:r.get(t.provider)>r.get(l.provider)?1:t.symbol.range.startColumn<l.symbol.range.startColumn?-1:t.symbol.range.startColumn>l.symbol.range.startColumn?1:0),i})}e.getCodeLensModel=o,g.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(s,...a){let[u,r]=a;p.assertType(w.URI.isUri(u)),p.assertType(typeof r=="number"||!r);const i=s.get(C.IModelService).getModel(u);if(!i)throw M.illegalArgument();const n=[],t=new d.DisposableStore;return o(i,N.CancellationToken.None).then(l=>{t.add(l);let h=[];for(const m of l.lenses)r==null||Boolean(m.symbol.command)?n.push(m.symbol):r-- >0&&m.provider.resolveCodeLens&&h.push(Promise.resolve(m.provider.resolveCodeLens(i,m.symbol,N.CancellationToken.None)).then(_=>n.push(_||m.symbol)));return Promise.all(h)}).then(()=>n).finally(()=>{setTimeout(()=>t.dispose(),100)})})}),define(Q[249],J([0,1,23,12,24,3,18,36,26]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function g(c,o){const s=[],u=S.ColorProviderRegistry.ordered(c).reverse().map(r=>Promise.resolve(r.provideDocumentColors(c,o)).then(i=>{if(Array.isArray(i))for(let n of i)s.push({colorInfo:n,provider:r})}));return Promise.all(u).then(()=>s)}e.getColors=g;function p(c,o,s,a){return Promise.resolve(s.provideColorPresentations(c,o,a))}e.getColorPresentations=p,d.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(c,...o){const[s]=o;if(!(s instanceof M.URI))throw N.illegalArgument();const a=c.get(C.IModelService).getModel(s);if(!a)throw N.illegalArgument();const u=[],i=S.ColorProviderRegistry.ordered(a).reverse().map(n=>Promise.resolve(n.provideDocumentColors(a,b.CancellationToken.None)).then(t=>{if(Array.isArray(t))for(let l of t)u.push({range:l.range,color:[l.color.red,l.color.green,l.color.blue,l.color.alpha]})}));return Promise.all(i).then(()=>u)}),d.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(c,...o){const[s,a]=o,{uri:u,range:r}=a;if(!(u instanceof M.URI)||!Array.isArray(s)||s.length!==4||!w.Range.isIRange(r))throw N.illegalArgument();const[i,n,t,l]=s,h=c.get(C.IModelService).getModel(u);if(!h)throw N.illegalArgument();const m={range:r,color:{red:i,green:n,blue:t,alpha:l}},_=[],v=S.ColorProviderRegistry.ordered(h).reverse().map(y=>Promise.resolve(y.provideColorPresentations(h,m,b.CancellationToken.None)).then(L=>{Array.isArray(L)&&_.push(...L)}));return Promise.all(v).then(()=>_)})}),define(Q[545],J([0,1,24,36,23,67,245,26,20]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentSymbols=void 0;function g(p,c,o){return Ie(this,void 0,void 0,function*(){const s=yield S.OutlineModel.create(p,o);return c?s.asListOfDocumentSymbols():s.getTopLevelSymbols()})}e.getDocumentSymbols=g,C.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",function(p,...c){return Ie(this,void 0,void 0,function*(){const[o]=c;d.assertType(b.URI.isUri(o));const s=p.get(N.IModelService).getModel(o);if(s)return g(s,!1,M.CancellationToken.None);const a=yield p.get(w.ITextModelService).createModelReference(o);try{return yield g(a.object.textEditorModel,!1,M.CancellationToken.None)}finally{a.dispose()}})})}),define(Q[546],J([0,1,23,12,24,3,18,36,26,2,19,20]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class o{constructor(r,i){this._link=r,this._provider=i}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(r){return Ie(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,r)).then(i=>(this._link=i||this._link,this._link.url?this.resolve(r):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}e.Link=o;class s{constructor(r){this._disposables=new g.DisposableStore;let i=[];for(const[n,t]of r){const l=n.links.map(h=>new o(h,t));i=s._union(i,l),g.isDisposable(n)&&this._disposables.add(n)}this.links=i}dispose(){this._disposables.dispose(),this.links.length=0}static _union(r,i){let n=[],t,l,h,m;for(t=0,h=0,l=r.length,m=i.length;t<l&&h<m;){const _=r[t],f=i[h];if(w.Range.areIntersectingOrTouching(_.range,f.range)){t++;continue}w.Range.compareRangesUsingStarts(_.range,f.range)<0?(n.push(_),t++):(n.push(f),h++)}for(;t<l;t++)n.push(r[t]);for(;h<m;h++)n.push(i[h]);return n}}e.LinksList=s;function a(u,r){const i=[],n=S.LinkProviderRegistry.ordered(u).reverse().map((t,l)=>Promise.resolve(t.provideLinks(u,r)).then(h=>{h&&(i[l]=[h,t])},N.onUnexpectedExternalError));return Promise.all(n).then(()=>{const t=new s(p.coalesce(i));return r.isCancellationRequested?(t.dispose(),new s([])):t})}e.getLinks=a,d.CommandsRegistry.registerCommand("_executeLinkProvider",(u,...r)=>Ie(void 0,void 0,void 0,function*(){let[i,n]=r;c.assertType(i instanceof M.URI),typeof n!="number"&&(n=0);const t=u.get(C.IModelService).getModel(i);if(!t)return[];const l=yield a(t,b.CancellationToken.None);if(!l)return[];for(let m=0;m<Math.min(n,l.links.length);m++)yield l.links[m].resolve(b.CancellationToken.None);const h=l.links.slice(0);return l.dispose(),h}))}),define(Q[16],J([0,1,8,9,17]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SET_CONTEXT_COMMAND_ID=e.IContextKeyService=e.RawContextKey=e.ContextKeyOrExpr=e.ContextKeyAndExpr=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.ContextKeyExpr=void 0;let w=M.userAgent||"";const S=new Map;S.set("false",!1),S.set("true",!0),S.set("isMac",M.isMacintosh),S.set("isLinux",M.isLinux),S.set("isWindows",M.isWindows),S.set("isWeb",M.isWeb),S.set("isMacNative",M.isMacintosh&&!M.isWeb),S.set("isEdge",w.indexOf("Edg/")>=0),S.set("isFirefox",w.indexOf("Firefox")>=0),S.set("isChrome",w.indexOf("Chrome")>=0),S.set("isSafari",w.indexOf("Safari")>=0),S.set("isIPad",w.indexOf("iPad")>=0);const C=Object.prototype.hasOwnProperty;class d{static has(E){return o.create(E)}static equals(E,T){return s.create(E,T)}static regex(E,T){return m.create(E,T)}static not(E){return i.create(E)}static and(...E){return f.create(E)}static or(...E){return v.create(E)}static deserialize(E,T=!1){if(!!E)return this._deserializeOrExpression(E,T)}static _deserializeOrExpression(E,T){let O=E.split("||");return v.create(O.map(A=>this._deserializeAndExpression(A,T)))}static _deserializeAndExpression(E,T){let O=E.split("&&");return f.create(O.map(A=>this._deserializeOne(A,T)))}static _deserializeOne(E,T){if(E=E.trim(),E.indexOf("!=")>=0){let O=E.split("!=");return r.create(O[0].trim(),this._deserializeValue(O[1],T))}if(E.indexOf("==")>=0){let O=E.split("==");return s.create(O[0].trim(),this._deserializeValue(O[1],T))}if(E.indexOf("=~")>=0){let O=E.split("=~");return m.create(O[0].trim(),this._deserializeRegexValue(O[1],T))}if(E.indexOf(" in ")>=0){let O=E.split(" in ");return a.create(O[0].trim(),O[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(E)){const O=E.split(">=");return t.create(O[0].trim(),O[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(E)){const O=E.split(">");return n.create(O[0].trim(),O[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(E)){const O=E.split("<=");return h.create(O[0].trim(),O[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(E)){const O=E.split("<");return l.create(O[0].trim(),O[1].trim())}return/^\!\s*/.test(E)?i.create(E.substr(1).trim()):o.create(E)}static _deserializeValue(E,T){if(E=E.trim(),E==="true")return!0;if(E==="false")return!1;let O=/^'([^']*)'$/.exec(E);return O?O[1].trim():E}static _deserializeRegexValue(E,T){if(b.isFalsyOrWhitespace(E)){if(T)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let O=E.indexOf("/"),A=E.lastIndexOf("/");if(O===A||O<0){if(T)throw new Error(`bad regexp-value '${E}', missing /-enclosure`);return console.warn(`bad regexp-value '${E}', missing /-enclosure`),null}let B=E.slice(O+1,A),F=E[A+1]==="i"?"i":"";try{return new RegExp(B,F)}catch(D){if(T)throw new Error(`bad regexp-value '${E}', parse error: ${D}`);return console.warn(`bad regexp-value '${E}', parse error: ${D}`),null}}}e.ContextKeyExpr=d;function g(k,E){return k.cmp(E)}class p{constructor(){this.type=0}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}evaluate(E){return!1}serialize(){return"false"}keys(){return[]}negate(){return c.INSTANCE}}e.ContextKeyFalseExpr=p,p.INSTANCE=new p;class c{constructor(){this.type=1}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}evaluate(E){return!0}serialize(){return"true"}keys(){return[]}negate(){return p.INSTANCE}}e.ContextKeyTrueExpr=c,c.INSTANCE=new c;class o{constructor(E){this.key=E,this.type=2}static create(E){const T=S.get(E);return typeof T=="boolean"?T?c.INSTANCE:p.INSTANCE:new o(E)}cmp(E){return E.type!==this.type?this.type-E.type:L(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}evaluate(E){return!!E.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return i.create(this.key)}}e.ContextKeyDefinedExpr=o;class s{constructor(E,T){this.key=E,this.value=T,this.type=4}static create(E,T){if(typeof T=="boolean")return T?o.create(E):i.create(E);const O=S.get(E);return typeof O=="boolean"?T===(O?"true":"false")?c.INSTANCE:p.INSTANCE:new s(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}evaluate(E){return E.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return r.create(this.key,this.value)}}e.ContextKeyEqualsExpr=s;class a{constructor(E,T){this.key=E,this.valueKey=T,this.type=10}static create(E,T){return new a(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,this.valueKey,E.key,E.valueKey)}equals(E){return E.type===this.type?this.key===E.key&&this.valueKey===E.valueKey:!1}evaluate(E){const T=E.getValue(this.valueKey),O=E.getValue(this.key);return Array.isArray(T)?T.indexOf(O)>=0:typeof O=="string"&&typeof T=="object"&&T!==null?C.call(T,O):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return u.create(this)}}e.ContextKeyInExpr=a;class u{constructor(E){this._actual=E,this.type=11}static create(E){return new u(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotInExpr=u;class r{constructor(E,T){this.key=E,this.value=T,this.type=5}static create(E,T){if(typeof T=="boolean")return T?i.create(E):o.create(E);const O=S.get(E);return typeof O=="boolean"?T===(O?"true":"false")?p.INSTANCE:c.INSTANCE:new r(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}evaluate(E){return E.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return s.create(this.key,this.value)}}e.ContextKeyNotEqualsExpr=r;class i{constructor(E){this.key=E,this.type=3}static create(E){const T=S.get(E);return typeof T=="boolean"?T?p.INSTANCE:c.INSTANCE:new i(E)}cmp(E){return E.type!==this.type?this.type-E.type:L(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}evaluate(E){return!E.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return o.create(this.key)}}e.ContextKeyNotExpr=i;class n{constructor(E,T){this.key=E,this.value=T,this.type=12}static create(E,T){return new n(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}evaluate(E){return parseFloat(E.getValue(this.key))>parseFloat(this.value)}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return h.create(this.key,this.value)}}e.ContextKeyGreaterExpr=n;class t{constructor(E,T){this.key=E,this.value=T,this.type=13}static create(E,T){return new t(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}evaluate(E){return parseFloat(E.getValue(this.key))>=parseFloat(this.value)}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return l.create(this.key,this.value)}}e.ContextKeyGreaterEqualsExpr=t;class l{constructor(E,T){this.key=E,this.value=T,this.type=14}static create(E,T){return new l(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}evaluate(E){return parseFloat(E.getValue(this.key))<parseFloat(this.value)}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return t.create(this.key,this.value)}}e.ContextKeySmallerExpr=l;class h{constructor(E,T){this.key=E,this.value=T,this.type=15}static create(E,T){return new h(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}evaluate(E){return parseFloat(E.getValue(this.key))<=parseFloat(this.value)}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return n.create(this.key,this.value)}}e.ContextKeySmallerEqualsExpr=h;class m{constructor(E,T){this.key=E,this.regexp=T,this.type=7}static create(E,T){return new m(E,T)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.key<E.key)return-1;if(this.key>E.key)return 1;const T=this.regexp?this.regexp.source:"",O=E.regexp?E.regexp.source:"";return T<O?-1:T>O?1:0}equals(E){if(E.type===this.type){const T=this.regexp?this.regexp.source:"",O=E.regexp?E.regexp.source:"";return this.key===E.key&&T===O}return!1}evaluate(E){let T=E.getValue(this.key);return this.regexp?this.regexp.test(T):!1}serialize(){const E=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${E}`}keys(){return[this.key]}negate(){return _.create(this)}}e.ContextKeyRegexExpr=m;class _{constructor(E){this._actual=E,this.type=8}static create(E){return new _(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=_;class f{constructor(E){this.expr=E,this.type=6}static create(E){return f._normalizeArr(E)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let T=0,O=this.expr.length;T<O;T++){const A=g(this.expr[T],E.expr[T]);if(A!==0)return A}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let T=0,O=this.expr.length;T<O;T++)if(!this.expr[T].equals(E.expr[T]))return!1;return!0}return!1}evaluate(E){for(let T=0,O=this.expr.length;T<O;T++)if(!this.expr[T].evaluate(E))return!1;return!0}static _normalizeArr(E){const T=[];let O=!1;for(const A of E)if(!!A){if(A.type===1){O=!0;continue}if(A.type===0)return p.INSTANCE;if(A.type===6){T.push(...A.expr);continue}T.push(A)}if(T.length===0&&O)return c.INSTANCE;if(T.length!==0){if(T.length===1)return T[0];for(T.sort(g);T.length>1;){const A=T[T.length-1];if(A.type!==9)break;T.pop();const B=T.pop(),F=v.create(A.expr.map(D=>f.create([D,B])));F&&(T.push(F),T.sort(g))}return T.length===1?T[0]:new f(T)}}serialize(){return this.expr.map(E=>E.serialize()).join(" && ")}keys(){const E=[];for(let T of this.expr)E.push(...T.keys());return E}negate(){let E=[];for(let T of this.expr)E.push(T.negate());return v.create(E)}}e.ContextKeyAndExpr=f;class v{constructor(E){this.expr=E,this.type=9}static create(E){const T=v._normalizeArr(E);if(T.length!==0)return T.length===1?T[0]:new v(T)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let T=0,O=this.expr.length;T<O;T++){const A=g(this.expr[T],E.expr[T]);if(A!==0)return A}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let T=0,O=this.expr.length;T<O;T++)if(!this.expr[T].equals(E.expr[T]))return!1;return!0}return!1}evaluate(E){for(let T=0,O=this.expr.length;T<O;T++)if(this.expr[T].evaluate(E))return!0;return!1}static _normalizeArr(E){let T=[],O=!1;if(E){for(let A=0,B=E.length;A<B;A++){const F=E[A];if(!!F){if(F.type===0){O=!0;continue}if(F.type===1)return[c.INSTANCE];if(F.type===9){T=T.concat(F.expr);continue}T.push(F)}}if(T.length===0&&O)return[p.INSTANCE];T.sort(g)}return T}serialize(){return this.expr.map(E=>E.serialize()).join(" || ")}keys(){const E=[];for(let T of this.expr)E.push(...T.keys());return E}negate(){let E=[];for(let O of this.expr)E.push(O.negate());const T=O=>O.type===9?O.expr:[O];for(;E.length>1;){const O=E.shift(),A=E.shift(),B=[];for(const F of T(O))for(const D of T(A))B.push(d.and(F,D));E.unshift(d.or(...B))}return E[0]}}e.ContextKeyOrExpr=v;class y extends o{constructor(E,T,O){super(E);this.key=E,this._defaultValue=T,typeof O=="object"?y._info.push(Object.assign(Object.assign({},O),{key:E})):O!==!0&&y._info.push({key:E,description:O,type:T!=null?typeof T:void 0})}static all(){return y._info.values()}bindTo(E){return E.createKey(this.key,this._defaultValue)}getValue(E){return E.getContextKeyValue(this.key)}toNegated(){return d.not(this.key)}isEqualTo(E){return d.equals(this.key,E)}}e.RawContextKey=y,y._info=[],e.IContextKeyService=N.createDecorator("contextKeyService"),e.SET_CONTEXT_COMMAND_ID="setContext";function L(k,E){return k<E?-1:k>E?1:0}function I(k,E,T,O){return k<T?-1:k>T?1:E<O?-1:E>O?1:0}}),define(Q[25],J([0,1,456,16]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var M;(function(w){w.editorSimpleInput=new N.RawContextKey("editorSimpleInput",!1,!0),w.editorTextFocus=new N.RawContextKey("editorTextFocus",!1,b.localize(0,null)),w.focus=new N.RawContextKey("editorFocus",!1,b.localize(1,null)),w.textInputFocus=new N.RawContextKey("textInputFocus",!1,b.localize(2,null)),w.readOnly=new N.RawContextKey("editorReadonly",!1,b.localize(3,null)),w.inDiffEditor=new N.RawContextKey("inDiffEditor",!1,b.localize(4,null)),w.columnSelection=new N.RawContextKey("editorColumnSelection",!1,b.localize(5,null)),w.writable=w.readOnly.toNegated(),w.hasNonEmptySelection=new N.RawContextKey("editorHasSelection",!1,b.localize(6,null)),w.hasOnlyEmptySelection=w.hasNonEmptySelection.toNegated(),w.hasMultipleSelections=new N.RawContextKey("editorHasMultipleSelections",!1,b.localize(7,null)),w.hasSingleSelection=w.hasMultipleSelections.toNegated(),w.tabMovesFocus=new N.RawContextKey("editorTabMovesFocus",!1,b.localize(8,null)),w.tabDoesNotMoveFocus=w.tabMovesFocus.toNegated(),w.isInWalkThroughSnippet=new N.RawContextKey("isInEmbeddedEditor",!1,!0),w.canUndo=new N.RawContextKey("canUndo",!1,!0),w.canRedo=new N.RawContextKey("canRedo",!1,!0),w.hoverVisible=new N.RawContextKey("editorHoverVisible",!1,b.localize(9,null)),w.inCompositeEditor=new N.RawContextKey("inCompositeEditor",void 0,b.localize(10,null)),w.notInCompositeEditor=w.inCompositeEditor.toNegated(),w.languageId=new N.RawContextKey("editorLangId","",b.localize(11,null)),w.hasCompletionItemProvider=new N.RawContextKey("editorHasCompletionItemProvider",!1,b.localize(12,null)),w.hasCodeActionsProvider=new N.RawContextKey("editorHasCodeActionsProvider",!1,b.localize(13,null)),w.hasCodeLensProvider=new N.RawContextKey("editorHasCodeLensProvider",!1,b.localize(14,null)),w.hasDefinitionProvider=new N.RawContextKey("editorHasDefinitionProvider",!1,b.localize(15,null)),w.hasDeclarationProvider=new N.RawContextKey("editorHasDeclarationProvider",!1,b.localize(16,null)),w.hasImplementationProvider=new N.RawContextKey("editorHasImplementationProvider",!1,b.localize(17,null)),w.hasTypeDefinitionProvider=new N.RawContextKey("editorHasTypeDefinitionProvider",!1,b.localize(18,null)),w.hasHoverProvider=new N.RawContextKey("editorHasHoverProvider",!1,b.localize(19,null)),w.hasDocumentHighlightProvider=new N.RawContextKey("editorHasDocumentHighlightProvider",!1,b.localize(20,null)),w.hasDocumentSymbolProvider=new N.RawContextKey("editorHasDocumentSymbolProvider",!1,b.localize(21,null)),w.hasReferenceProvider=new N.RawContextKey("editorHasReferenceProvider",!1,b.localize(22,null)),w.hasRenameProvider=new N.RawContextKey("editorHasRenameProvider",!1,b.localize(23,null)),w.hasSignatureHelpProvider=new N.RawContextKey("editorHasSignatureHelpProvider",!1,b.localize(24,null)),w.hasInlineHintsProvider=new N.RawContextKey("editorHasInlineHintsProvider",!1,b.localize(25,null)),w.hasDocumentFormattingProvider=new N.RawContextKey("editorHasDocumentFormattingProvider",!1,b.localize(26,null)),w.hasDocumentSelectionFormattingProvider=new N.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,b.localize(27,null)),w.hasMultipleDocumentFormattingProvider=new N.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,b.localize(28,null)),w.hasMultipleDocumentSelectionFormattingProvider=new N.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,b.localize(29,null))})(M=e.EditorContextKeys||(e.EditorContextKeys={}))}),define(Q[183],J([0,1,12,14,18,16,23,26,24,20,67]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new w.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new w.RawContextKey("parameterHintsMultipleSignatures",!1)};function c(o,s,a,u){return Ie(this,void 0,void 0,function*(){const r=M.SignatureHelpProviderRegistry.ordered(o);for(const i of r)try{const n=yield i.provideSignatureHelp(o,s,u,a);if(n)return n}catch(n){b.onUnexpectedExternalError(n)}})}e.provideSignatureHelp=c,C.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",(o,...s)=>Ie(void 0,void 0,void 0,function*(){const[a,u,r]=s;g.assertType(d.URI.isUri(a)),g.assertType(N.Position.isIPosition(u)),g.assertType(typeof r=="string"||!r);const i=yield o.get(p.ITextModelService).createModelReference(a);try{const n=yield c(i.object.textEditorModel,N.Position.lift(u),{triggerKind:M.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:r},S.CancellationToken.None);return n?(setTimeout(()=>n.dispose(),0),n.value):void 0}finally{i.dispose()}}))}),define(Q[547],J([0,1,15,12,6,2,91,18,183]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var g;(function(o){o.Default={type:0};class s{constructor(r,i){this.request=r,this.previouslyActiveHints=i,this.type=2}}o.Pending=s;class a{constructor(r){this.hints=r,this.type=1}}o.Active=a})(g||(g={}));class p extends w.Disposable{constructor(s,a=p.DEFAULT_DELAY){super();this._onChangedHints=this._register(new M.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=g.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new w.MutableDisposable),this.triggerChars=new S.CharacterSet,this.retriggerChars=new S.CharacterSet,this.triggerId=0,this.editor=s,this.throttledDelayer=new b.Delayer(a),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(u=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(u=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(u=>this.onCursorChange(u))),this._register(this.editor.onDidChangeModelContent(u=>this.onModelContentChange())),this._register(C.SignatureHelpProviderRegistry.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(u=>this.onDidType(u))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(s){this._state.type===2&&this._state.request.cancel(),this._state=s}cancel(s=!1){this.state=g.Default,this.throttledDelayer.cancel(),s||this._onChangedHints.fire(void 0)}trigger(s,a){const u=this.editor.getModel();if(!(!u||!C.SignatureHelpProviderRegistry.has(u))){const r=++this.triggerId;this._pendingTriggers.push(s),this.throttledDelayer.trigger(()=>this.doTrigger(r),a).catch(N.onUnexpectedError)}}next(){if(this.state.type===1){const s=this.state.hints.signatures.length,a=this.state.hints.activeSignature,u=a%s==s-1,r=this.editor.getOption(70).cycle;if((s<2||u)&&!r){this.cancel();return}this.updateActiveSignature(u&&r?0:a+1)}}previous(){if(this.state.type===1){const s=this.state.hints.signatures.length,a=this.state.hints.activeSignature,u=a===0,r=this.editor.getOption(70).cycle;if((s<2||u)&&!r){this.cancel();return}this.updateActiveSignature(u&&r?s-1:a-1)}}updateActiveSignature(s){this.state.type===1&&(this.state=new g.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:s})),this._onChangedHints.fire(this.state.hints))}doTrigger(s){return Ie(this,void 0,void 0,function*(){const a=this.state.type===1||this.state.type===2,u=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const r=this._pendingTriggers.reduce(c);this._pendingTriggers=[];const i={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:a,activeSignatureHelp:u};if(!this.editor.hasModel())return!1;const n=this.editor.getModel(),t=this.editor.getPosition();this.state=new g.Pending(b.createCancelablePromise(l=>d.provideSignatureHelp(n,t,i,l)),u);try{const l=yield this.state.request;return s!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new g.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return s===this.triggerId&&(this.state=g.Default),N.onUnexpectedError(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new S.CharacterSet,this.retriggerChars=new S.CharacterSet;const s=this.editor.getModel();if(!!s)for(const a of C.SignatureHelpProviderRegistry.ordered(s)){for(const u of a.signatureHelpTriggerCharacters||[])this.triggerChars.add(u.charCodeAt(0)),this.retriggerChars.add(u.charCodeAt(0));for(const u of a.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(u.charCodeAt(0))}}onDidType(s){if(!!this.triggerOnType){const a=s.length-1,u=s.charCodeAt(a);(this.triggerChars.has(u)||this.isTriggered&&this.retriggerChars.has(u))&&this.trigger({triggerKind:C.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:s.charAt(a)})}}onCursorChange(s){s.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:C.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:C.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(70).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=p,p.DEFAULT_DELAY=120;function c(o,s){switch(s.triggerKind){case C.SignatureHelpTriggerKind.Invoke:return s;case C.SignatureHelpTriggerKind.ContentChange:return o;case C.SignatureHelpTriggerKind.TriggerCharacter:default:return s}}});var _e=this&&this.__param||function(q,e){return function(b,N){e(b,N,q)}};define(Q[548],J([0,1,16]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let N=class at{constructor(w,S){this._editor=w,this._index=0,this._ckOtherSuggestions=at.OtherSuggestions.bindTo(S)}dispose(){this.reset()}reset(){var w;this._ckOtherSuggestions.reset(),(w=this._listener)===null||w===void 0||w.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:w,index:S},C){if(w.items.length===0){this.reset();return}if(at._moveIndex(!0,w,S)===S){this.reset();return}this._acceptNext=C,this._model=w,this._index=S,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(w,S,C){let d=C;for(;d=(d+S.items.length+(w?1:-1))%S.items.length,!(d===C||!S.items[d].completion.additionalTextEdits););return d}next(){this._move(!0)}prev(){this._move(!1)}_move(w){if(!!this._model)try{this._ignore=!0,this._index=at._moveIndex(w,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};N.OtherSuggestions=new b.RawContextKey("hasOtherSuggestions",!1),N=Me([_e(1,b.IContextKeyService)],N),e.SuggestAlternatives=N}),define(Q[549],J([0,1,16]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let N=class Mt{constructor(w,S){this._editor=w,this._enabled=!1,this._ckAtEnd=Mt.AtEnd.bindTo(S),this._configListener=this._editor.onDidChangeConfiguration(C=>C.hasChanged(106)&&this._update()),this._update()}dispose(){var w;this._configListener.dispose(),(w=this._selectionListener)===null||w===void 0||w.dispose(),this._ckAtEnd.reset()}_update(){const w=this._editor.getOption(106)==="on";if(this._enabled!==w)if(this._enabled=w,this._enabled){const S=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const C=this._editor.getModel(),d=this._editor.getSelection(),g=C.getWordAtPosition(d.getStartPosition());if(!g){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(g.endColumn===d.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(S),S()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};N.AtEnd=new b.RawContextKey("atEndOfWord",!1),N=Me([_e(1,b.IContextKeyService)],N),e.WordContextKey=N}),define(Q[65],J([0,1,9,16]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.IAccessibilityService=void 0,e.IAccessibilityService=b.createDecorator("accessibilityService"),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new N.RawContextKey("accessibilityModeEnabled",!1)}),define(Q[250],J([0,1,521,16,17]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContextKey=e.IsWindowsContext=void 0,e.IsWindowsContext=new N.RawContextKey("isWindows",M.isWindows,b.localize(0,null)),e.InputFocusedContextKey="inputFocus"}),define(Q[68],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=b.createDecorator("contextViewService"),e.IContextMenuService=b.createDecorator("contextMenuService")}),define(Q[184],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=b.createDecorator("dialogService")}),define(Q[138],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class b{constructor(...M){this._entries=new Map;for(let[w,S]of M)this.set(w,S)}set(M,w){const S=this._entries.get(M);return this._entries.set(M,w),S}has(M){return this._entries.has(M)}get(M){return this._entries.get(M)}}e.ServiceCollection=b}),define(Q[550],J([0,1,12,533,238,9,138,15]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InstantiationService=void 0;const d=!1;class g extends Error{constructor(s){super("cyclic dependency between services");this.message=s.toString()}}class p{constructor(s=new S.ServiceCollection,a=!1,u){this._activeInstantiations=new Set,this._services=s,this._strict=a,this._parent=u,this._services.set(w.IInstantiationService,this)}createChild(s){return new p(s,this._strict,this)}invokeFunction(s,...a){let u=c.traceInvocation(s),r=!1;try{return s({get:(n,t)=>{if(r)throw b.illegalState("service accessor is only valid during the invocation of its target method");const l=this._getOrCreateServiceInstance(n,u);if(!l&&t!==w.optional)throw new Error(`[invokeFunction] unknown service '${n}'`);return l}},...a)}finally{r=!0,u.stop()}}createInstance(s,...a){let u,r;return s instanceof M.SyncDescriptor?(u=c.traceCreation(s.ctor),r=this._createInstance(s.ctor,s.staticArguments.concat(a),u)):(u=c.traceCreation(s),r=this._createInstance(s,a,u)),u.stop(),r}_createInstance(s,a=[],u){let r=w._util.getServiceDependencies(s).sort((t,l)=>t.index-l.index),i=[];for(const t of r){let l=this._getOrCreateServiceInstance(t.id,u);if(!l&&this._strict&&!t.optional)throw new Error(`[createInstance] ${s.name} depends on UNKNOWN service ${t.id}.`);i.push(l)}let n=r.length>0?r[0].index:a.length;if(a.length!==n){console.warn(`[createInstance] First service dependency of ${s.name} at position ${n+1} conflicts with ${a.length} static arguments`);let t=n-a.length;t>0?a=a.concat(new Array(t)):a=a.slice(0,n)}return new s(...[...a,...i])}_setServiceInstance(s,a){if(this._services.get(s)instanceof M.SyncDescriptor)this._services.set(s,a);else if(this._parent)this._parent._setServiceInstance(s,a);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(s){let a=this._services.get(s);return!a&&this._parent?this._parent._getServiceInstanceOrDescriptor(s):a}_getOrCreateServiceInstance(s,a){let u=this._getServiceInstanceOrDescriptor(s);return u instanceof M.SyncDescriptor?this._safeCreateAndCacheServiceInstance(s,u,a.branch(s,!0)):(a.branch(s,!1),u)}_safeCreateAndCacheServiceInstance(s,a,u){if(this._activeInstantiations.has(s))throw new Error(`illegal state - RECURSIVELY instantiating service '${s}'`);this._activeInstantiations.add(s);try{return this._createAndCacheServiceInstance(s,a,u)}finally{this._activeInstantiations.delete(s)}}_createAndCacheServiceInstance(s,a,u){const r=new N.Graph(t=>t.id.toString());let i=0;const n=[{id:s,desc:a,_trace:u}];for(;n.length;){const t=n.pop();if(r.lookupOrInsertNode(t),i++>1e3)throw new g(r);for(let l of w._util.getServiceDependencies(t.desc.ctor)){let h=this._getServiceInstanceOrDescriptor(l.id);if(!h&&!l.optional&&console.warn(`[createInstance] ${s} depends on ${l.id} which is NOT registered.`),h instanceof M.SyncDescriptor){const m={id:l.id,desc:h,_trace:t._trace.branch(l.id,!0)};r.insertEdge(t,m),n.push(m)}}}for(;;){const t=r.roots();if(t.length===0){if(!r.isEmpty())throw new g(r);break}for(const{data:l}of t){if(this._getServiceInstanceOrDescriptor(l.id)instanceof M.SyncDescriptor){const m=this._createServiceInstanceWithOwner(l.id,l.desc.ctor,l.desc.staticArguments,l.desc.supportsDelayedInstantiation,l._trace);this._setServiceInstance(l.id,m)}r.removeNode(l)}}return this._getServiceInstanceOrDescriptor(s)}_createServiceInstanceWithOwner(s,a,u=[],r,i){if(this._services.get(s)instanceof M.SyncDescriptor)return this._createServiceInstance(a,u,r,i);if(this._parent)return this._parent._createServiceInstanceWithOwner(s,a,u,r,i);throw new Error(`illegalState - creating UNKNOWN service instance ${a.name}`)}_createServiceInstance(s,a=[],u,r){if(u){const i=new C.IdleValue(()=>this._createInstance(s,a,r));return new Proxy(Object.create(null),{get(n,t){if(t in n)return n[t];let l=i.value,h=l[t];return typeof h!="function"||(h=h.bind(l),n[t]=h),h},set(n,t,l){return i.value[t]=l,!0}})}else return this._createInstance(s,a,r)}}e.InstantiationService=p;class c{constructor(s,a){this.type=s,this.name=a,this._start=Date.now(),this._dep=[]}static traceInvocation(s){return d?new c(1,s.name||s.toString().substring(0,42).replace(/\n/g,"")):c._None}static traceCreation(s){return d?new c(0,s.name):c._None}branch(s,a){let u=new c(2,s.toString());return this._dep.push([s,a,u]),u}stop(){let s=Date.now()-this._start;c._totals+=s;let a=!1;function u(i,n){let t=[],l=new Array(i+1).join(" ");for(const[h,m,_]of n._dep)if(m&&_){a=!0,t.push(`${l}CREATES -> ${h}`);let f=u(i+1,_);f&&t.push(f)}else t.push(`${l}uses -> ${h}`);return t.join(`
`)}let r=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${u(1,this)}`,`DONE, took ${s.toFixed(2)}ms (grand total ${c._totals.toFixed(2)}ms)`];(s>2||a)&&console.log(r.join(`
`))}}c._None=new class extends c{constructor(){super(-1,null)}stop(){}branch(){return this}},c._totals=0}),define(Q[551],J([0,1,522,15,6,2]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;class S extends w.Disposable{constructor(d,g,p,c,o){super();this._contextKeyService=d,this._commandService=g,this._telemetryService=p,this._notificationService=c,this._logService=o,this._onDidUpdateKeybindings=this._register(new M.Emitter),this._currentChord=null,this._currentChordChecker=new N.IntervalTimer,this._currentChordStatusMessage=null,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new N.TimeoutTimer,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:M.Event.None}dispose(){super.dispose()}_log(d){this._logging&&this._logService.info(`[KeybindingService]: ${d}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(d){const g=this._getResolver().lookupPrimaryKeybinding(d);if(!!g)return g.resolvedKeybinding}dispatchEvent(d,g){return this._dispatch(d,g)}softDispatch(d,g){const p=this.resolveKeyboardEvent(d);if(p.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[c]=p.getDispatchParts();if(c===null)return null;const o=this._contextKeyService.getContext(g),s=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,s,c)}_enterChordMode(d,g){this._currentChord={keypress:d,label:g},this._currentChordStatusMessage=this._notificationService.status(b.localize(0,null,g));const p=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-p>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(d,g){return this._doDispatch(this.resolveKeyboardEvent(d),g,!1)}_singleModifierDispatch(d,g){const p=this.resolveKeyboardEvent(d),[c]=p.getSingleModifierDispatchParts();return c!==null&&this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${c}.`),this._currentSingleModifier=c,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):c!==null&&c===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${c} ${c}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(p,g,!0)):(this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1)}_doDispatch(d,g,p=!1){let c=!1;if(d.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let o=null,s=null;if(p){const[i]=d.getSingleModifierDispatchParts();o=i,s=i}else[o]=d.getDispatchParts(),s=this._currentChord?this._currentChord.keypress:null;if(o===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),c;const a=this._contextKeyService.getContext(g),u=d.getLabel(),r=this._getResolver().resolve(a,s,o);return this._logService.trace("KeybindingService#dispatch",u,r==null?void 0:r.commandId),r&&r.enterChord?(c=!0,this._enterChordMode(o,u),c):(this._currentChord&&(!r||!r.commandId)&&(this._notificationService.status(b.localize(1,null,this._currentChord.label,u),{hideAfter:10*1e3}),c=!0),this._leaveChordMode(),r&&r.commandId&&(r.bubble||(c=!0),typeof r.commandArgs=="undefined"?this._commandService.executeCommand(r.commandId).then(void 0,i=>this._notificationService.warn(i)):this._commandService.executeCommand(r.commandId,r.commandArgs).then(void 0,i=>this._notificationService.warn(i)),this._telemetryService.publicLog2("workbenchActionExecuted",{id:r.commandId,from:"keybinding"})),c)}mightProducePrintableCharacter(d){return d.ctrlKey||d.metaKey?!1:d.keyCode>=31&&d.keyCode<=56||d.keyCode>=21&&d.keyCode<=30}}e.AbstractKeybindingService=S}),define(Q[552],J([0,1,12,235,39]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class w extends M.ResolvedKeybinding{constructor(C,d){super();if(d.length===0)throw b.illegalArgument("parts");this._os=C,this._parts=d}getLabel(){return N.UILabelProvider.toLabel(this._os,this._parts,C=>this._getLabel(C))}getAriaLabel(){return N.AriaLabelProvider.toLabel(this._os,this._parts,C=>this._getAriaLabel(C))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(C=>this._getPart(C))}_getPart(C){return new M.ResolvedKeybindingPart(C.ctrlKey,C.shiftKey,C.altKey,C.metaKey,this._getLabel(C),this._getAriaLabel(C))}getDispatchParts(){return this._parts.map(C=>this._getDispatchPart(C))}getSingleModifierDispatchParts(){return this._parts.map(C=>this._getSingleModifierDispatchPart(C))}}e.BaseResolvedKeybinding=w}),define(Q[37],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=b.createDecorator("keybindingService")}),define(Q[251],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=void 0;class b{constructor(S,C,d){this._log=d,this._defaultKeybindings=S,this._defaultBoundCommands=new Map;for(let g=0,p=S.length;g<p;g++){const c=S[g].command;c&&this._defaultBoundCommands.set(c,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=b.combine(S,C);for(let g=0,p=this._keybindings.length;g<p;g++){let c=this._keybindings[g];c.keypressParts.length!==0&&(c.when&&c.when.type===0||this._addKeyPress(c.keypressParts[0],c))}}static _isTargetedForRemoval(S,C,d,g,p){return!(S.command!==g||C&&S.keypressParts[0]!==C||d&&S.keypressParts[1]!==d||p&&(!S.when||!p.equals(S.when)))}static combine(S,C){S=S.slice(0);let d=[];for(const g of C){if(!g.command||g.command.length===0||g.command.charAt(0)!=="-"){d.push(g);continue}const p=g.command.substr(1),c=g.keypressParts[0],o=g.keypressParts[1],s=g.when;for(let a=S.length-1;a>=0;a--)this._isTargetedForRemoval(S[a],c,o,p,s)&&S.splice(a,1)}return S.concat(d)}_addKeyPress(S,C){const d=this._map.get(S);if(typeof d=="undefined"){this._map.set(S,[C]),this._addToLookupMap(C);return}for(let g=d.length-1;g>=0;g--){let p=d[g];if(p.command!==C.command){const c=p.keypressParts.length>1,o=C.keypressParts.length>1;c&&o&&p.keypressParts[1]!==C.keypressParts[1]||b.whenIsEntirelyIncluded(p.when,C.when)&&this._removeFromLookupMap(p)}}d.push(C),this._addToLookupMap(C)}_addToLookupMap(S){if(!!S.command){let C=this._lookupMap.get(S.command);typeof C=="undefined"?(C=[S],this._lookupMap.set(S.command,C)):C.push(S)}}_removeFromLookupMap(S){if(!!S.command){let C=this._lookupMap.get(S.command);if(typeof C!="undefined"){for(let d=0,g=C.length;d<g;d++)if(C[d]===S){C.splice(d,1);return}}}}static whenIsEntirelyIncluded(S,C){return C?S?this._implies(S,C):!1:!0}static _implies(S,C){const d=S.negate(),g=c=>c.type===9?c.expr:[c];let p=g(d).concat(g(C));for(let c=0;c<p.length;c++){const s=p[c].negate();for(let a=c+1;a<p.length;a++){const u=p[a];if(s.equals(u))return!0}}return!1}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(S){let C=this._lookupMap.get(S);return typeof C=="undefined"||C.length===0?null:C[C.length-1]}resolve(S,C,d){this._log(`| Resolving ${d}${C?` chorded from ${C}`:""}`);let g=null;if(C!==null){const c=this._map.get(C);if(typeof c=="undefined")return this._log("\\ No keybinding entries."),null;g=[];for(let o=0,s=c.length;o<s;o++){let a=c[o];a.keypressParts[1]===d&&g.push(a)}}else{const c=this._map.get(d);if(typeof c=="undefined")return this._log("\\ No keybinding entries."),null;g=c}let p=this._findCommand(S,g);return p?C===null&&p.keypressParts.length>1&&p.keypressParts[1]!==null?(this._log(`\\ From ${g.length} keybinding entries, matched chord, when: ${N(p.when)}, source: ${M(p)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${g.length} keybinding entries, matched ${p.command}, when: ${N(p.when)}, source: ${M(p)}.`),{enterChord:!1,leaveChord:p.keypressParts.length>1,commandId:p.command,commandArgs:p.commandArgs,bubble:p.bubble}):(this._log(`\\ From ${g.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(S,C){for(let d=C.length-1;d>=0;d--){let g=C[d];if(!!b.contextMatchesRules(S,g.when))return g}return null}static contextMatchesRules(S,C){return C?C.evaluate(S):!0}}e.KeybindingResolver=b;function N(w){return w?`${w.serialize()}`:"no when condition"}function M(w){return w.extensionId?w.isBuiltinExtension?`built-in extension ${w.extensionId}`:`user extension ${w.extensionId}`:w.isDefault?"built-in":"user"}}),define(Q[553],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeElementsAfterNulls=e.ResolvedKeybindingItem=void 0;class b{constructor(w,S,C,d,g,p,c){this.resolvedKeybinding=w,this.keypressParts=w?N(w.getDispatchParts()):[],w&&this.keypressParts.length===0&&(this.keypressParts=N(w.getSingleModifierDispatchParts())),this.bubble=S?S.charCodeAt(0)===94:!1,this.command=this.bubble?S.substr(1):S,this.commandArgs=C,this.when=d,this.isDefault=g,this.extensionId=p,this.isBuiltinExtension=c}}e.ResolvedKeybindingItem=b;function N(M){let w=[];for(let S=0,C=M.length;S<C;S++){const d=M[S];if(!d)return w;w.push(d)}return w}e.removeElementsAfterNulls=N}),define(Q[554],J([0,1,39,552]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class M extends N.BaseResolvedKeybinding{constructor(S,C){super(C,S.parts)}_keyCodeToUILabel(S){if(this._os===2)switch(S){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return b.KeyCodeUtils.toString(S)}_getLabel(S){return S.isDuplicateModifierCase()?"":this._keyCodeToUILabel(S.keyCode)}_getAriaLabel(S){return S.isDuplicateModifierCase()?"":b.KeyCodeUtils.toString(S.keyCode)}_getDispatchPart(S){return M.getDispatchStr(S)}static getDispatchStr(S){if(S.isModifierKey())return null;let C="";return S.ctrlKey&&(C+="ctrl+"),S.shiftKey&&(C+="shift+"),S.altKey&&(C+="alt+"),S.metaKey&&(C+="meta+"),C+=b.KeyCodeUtils.toString(S.keyCode),C}_getSingleModifierDispatchPart(S){return S.keyCode===5&&!S.shiftKey&&!S.altKey&&!S.metaKey?"ctrl":S.keyCode===4&&!S.ctrlKey&&!S.altKey&&!S.metaKey?"shift":S.keyCode===6&&!S.ctrlKey&&!S.shiftKey&&!S.metaKey?"alt":S.keyCode===57&&!S.ctrlKey&&!S.shiftKey&&!S.altKey?"meta":null}}e.USLayoutResolvedKeybinding=M}),define(Q[115],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=b.createDecorator("labelService")}),define(Q[139],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=b.createDecorator("layoutService")}),define(Q[555],J([0,1,204,2,139]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let w=class extends N.Disposable{constructor(C){super();this.layoutService=C,this.currentViewDisposable=N.Disposable.None,this.container=C.container,this.contextView=this._register(new b.ContextView(this.container,1)),this.layout(),this._register(C.onDidLayout(()=>this.layout()))}setContainer(C,d){this.contextView.setContainer(C,d||1)}showContextView(C,d,g){d?d!==this.container&&(this.container=d,this.setContainer(d,g?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(C);const p=N.toDisposable(()=>{this.currentViewDisposable===p&&this.hideContextView()});return this.currentViewDisposable=p,p}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(C){this.contextView.hide(C)}};w=Me([_e(0,M.ILayoutService)],w),e.ContextViewService=w}),define(Q[77],J([0,1,9,2,6]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=e.ConsoleLogger=e.AbstractLogger=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILogService=void 0,e.ILogService=b.createDecorator("logService");var w;(function(g){g[g.Trace=0]="Trace",g[g.Debug=1]="Debug",g[g.Info=2]="Info",g[g.Warning=3]="Warning",g[g.Error=4]="Error",g[g.Critical=5]="Critical",g[g.Off=6]="Off"})(w=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=w.Info;class S extends N.Disposable{constructor(){super(...arguments);this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new M.Emitter)}setLevel(p){this.level!==p&&(this.level=p,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=S;class C extends S{constructor(p=e.DEFAULT_LOG_LEVEL){super();this.setLevel(p)}trace(p,...c){this.getLevel()<=w.Trace&&console.log("%cTRACE","color: #888",p,...c)}debug(p,...c){this.getLevel()<=w.Debug&&console.log("%cDEBUG","background: #eee; color: #888",p,...c)}info(p,...c){this.getLevel()<=w.Info&&console.log("%c INFO","color: #33f",p,...c)}error(p,...c){this.getLevel()<=w.Error&&console.log("%c ERR","color: #f33",p,...c)}dispose(){}}e.ConsoleLogger=C;class d extends N.Disposable{constructor(p){super();this.logger=p,this._register(p)}getLevel(){return this.logger.getLevel()}trace(p,...c){this.logger.trace(p,...c)}debug(p,...c){this.logger.debug(p,...c)}info(p,...c){this.logger.info(p,...c)}error(p,...c){this.logger.error(p,...c)}}e.LogService=d}),define(Q[252],J([0,1,15,2,201,294,3,18,41,389,36,137,8,19,77,81,12]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerServiceImpl=void 0;const i=60*1e3,n=5*60*1e3;function t(L,I){let k=L.getModel(I);return!(!k||k.isTooLargeForSyncing())}let l=class extends N.Disposable{constructor(I,k,E){super();this._modelService=I,this._workerManager=this._register(new m(this._modelService)),this._logService=E,this._register(C.LinkProviderRegistry.register("*",{provideLinks:(T,O)=>t(this._modelService,T.uri)?this._workerManager.withWorker().then(A=>A.computeLinks(T.uri)).then(A=>A&&{links:A}):Promise.resolve({links:[]})})),this._register(C.CompletionProviderRegistry.register("*",new h(this._workerManager,k,this._modelService)))}dispose(){super.dispose()}canComputeDiff(I,k){return t(this._modelService,I)&&t(this._modelService,k)}computeDiff(I,k,E,T){return this._workerManager.withWorker().then(O=>O.computeDiff(I,k,E,T))}computeMoreMinimalEdits(I,k){if(s.isNonEmptyArray(k)){if(!t(this._modelService,I))return Promise.resolve(k);const E=u.StopWatch.create(!0),T=this._workerManager.withWorker().then(O=>O.computeMoreMinimalEdits(I,k));return T.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",I.toString(!0),E.elapsed())),Promise.race([T,b.timeout(1e3).then(()=>k)])}else return Promise.resolve(void 0)}canNavigateValueSet(I){return t(this._modelService,I)}navigateValueSet(I,k,E){return this._workerManager.withWorker().then(T=>T.navigateValueSet(I,k,E))}canComputeWordRanges(I){return t(this._modelService,I)}computeWordRanges(I,k){return this._workerManager.withWorker().then(E=>E.computeWordRanges(I,k))}};l=Me([_e(0,p.IModelService),_e(1,c.ITextResourceConfigurationService),_e(2,a.ILogService)],l),e.EditorWorkerServiceImpl=l;class h{constructor(I,k,E){this._debugDisplayName="wordbasedCompletions",this._workerManager=I,this._configurationService=k,this._modelService=E}provideCompletionItems(I,k){return Ie(this,void 0,void 0,function*(){const E=this._configurationService.getValue(I.uri,k,"editor");if(!!E.wordBasedSuggestions){const T=[];if(E.wordBasedSuggestionsMode==="currentDocument")t(this._modelService,I.uri)&&T.push(I.uri);else for(const W of this._modelService.getModels())!t(this._modelService,W.uri)||(W===I?T.unshift(W.uri):(E.wordBasedSuggestionsMode==="allDocuments"||W.getLanguageIdentifier().id===I.getLanguageIdentifier().id)&&T.push(W.uri));if(T.length!==0){const O=d.LanguageConfigurationRegistry.getWordDefinition(I.getLanguageIdentifier().id),A=I.getWordAtPosition(k),B=A?new S.Range(k.lineNumber,A.startColumn,k.lineNumber,A.endColumn):S.Range.fromPositions(k),F=B.setEndPosition(k.lineNumber,k.column),R=yield(yield this._workerManager.withWorker()).textualSuggest(T,A==null?void 0:A.word,O);if(!!R)return{duration:R.duration,suggestions:R.words.map(W=>({kind:18,label:W,insertText:W,range:{insert:F,replace:B}}))}}}})}}class m extends N.Disposable{constructor(I){super();this._modelService=I,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new b.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(n/2)),this._register(this._modelService.onModelRemoved(E=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){!this._editorWorkerClient||this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){!this._editorWorkerClient||new Date().getTime()-this._lastWorkerUsedTime>n&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new y(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class _ extends N.Disposable{constructor(I,k,E){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=I,this._modelService=k,!E){let T=new b.IntervalTimer;T.cancelAndSet(()=>this._checkStopModelSync(),Math.round(i/2)),this._register(T)}}dispose(){for(let I in this._syncedModels)N.dispose(this._syncedModels[I]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(I){for(const k of I){let E=k.toString();this._syncedModels[E]||this._beginModelSync(k),this._syncedModels[E]&&(this._syncedModelsLastUsedTime[E]=new Date().getTime())}}_checkStopModelSync(){let I=new Date().getTime(),k=[];for(let E in this._syncedModelsLastUsedTime)I-this._syncedModelsLastUsedTime[E]>i&&k.push(E);for(const E of k)this._stopModelSync(E)}_beginModelSync(I){let k=this._modelService.getModel(I);if(!!k&&!k.isTooLargeForSyncing()){let E=I.toString();this._proxy.acceptNewModel({url:k.uri.toString(),lines:k.getLinesContent(),EOL:k.getEOL(),versionId:k.getVersionId()});const T=new N.DisposableStore;T.add(k.onDidChangeContent(O=>{this._proxy.acceptModelChanged(E.toString(),O)})),T.add(k.onWillDispose(()=>{this._stopModelSync(E)})),T.add(N.toDisposable(()=>{this._proxy.acceptRemovedModel(E)})),this._syncedModels[E]=T}}_stopModelSync(I){let k=this._syncedModels[I];delete this._syncedModels[I],delete this._syncedModelsLastUsedTime[I],N.dispose(k)}}class f{constructor(I){this._instance=I,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class v{constructor(I){this._workerClient=I}fhr(I,k){return this._workerClient.fhr(I,k)}}e.EditorWorkerHost=v;class y extends N.Disposable{constructor(I,k,E){super();this._disposed=!1,this._modelService=I,this._keepIdleModels=k,this._workerFactory=new w.DefaultWorkerFactory(E),this._worker=null,this._modelManager=null}fhr(I,k){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new M.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new v(this)))}catch(I){M.logOnceWebWorkerWarning(I),this._worker=new f(new g.EditorSimpleWorker(new v(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,I=>(M.logOnceWebWorkerWarning(I),this._worker=new f(new g.EditorSimpleWorker(new v(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(I){return this._modelManager||(this._modelManager=this._register(new _(I,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(I){return this._disposed?Promise.reject(r.canceled()):this._getProxy().then(k=>(this._getOrCreateModelManager(k).ensureSyncedResources(I),k))}computeDiff(I,k,E,T){return this._withSyncedResources([I,k]).then(O=>O.computeDiff(I.toString(),k.toString(),E,T))}computeMoreMinimalEdits(I,k){return this._withSyncedResources([I]).then(E=>E.computeMoreMinimalEdits(I.toString(),k))}computeLinks(I){return this._withSyncedResources([I]).then(k=>k.computeLinks(I.toString()))}textualSuggest(I,k,E){return Ie(this,void 0,void 0,function*(){const T=yield this._withSyncedResources(I),O=E.source,A=o.regExpFlags(E);return T.textualSuggest(I.map(B=>B.toString()),k,O,A)})}computeWordRanges(I,k){return this._withSyncedResources([I]).then(E=>{let T=this._modelService.getModel(I);if(!T)return Promise.resolve(null);let O=d.LanguageConfigurationRegistry.getWordDefinition(T.getLanguageIdentifier().id),A=O.source,B=o.regExpFlags(O);return E.computeWordRanges(I.toString(),k,A,B)})}navigateValueSet(I,k,E){return this._withSyncedResources([I]).then(T=>{let O=this._modelService.getModel(I);if(!O)return null;let A=d.LanguageConfigurationRegistry.getWordDefinition(O.getLanguageIdentifier().id),B=A.source,F=o.regExpFlags(A);return T.navigateValueSet(I.toString(),k,E,B,F)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=y}),define(Q[253],J([0,1,18,77,135]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;class w{constructor(p,c,o){this._legend=p,this._themeService=c,this._logService=o,this._hashTable=new d,this._hasWarnedOverlappingTokens=!1}getMetadata(p,c,o){const s=this._hashTable.get(p,c,o.id);let a;if(s)a=s.metadata,this._logService.getLevel()===N.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${p} / ${c}: foreground ${b.TokenMetadata.getForeground(a)}, fontStyle ${b.TokenMetadata.getFontStyle(a).toString(2)}`);else{let u=this._legend.tokenTypes[p];const r=[];if(u){let i=c;for(let t=0;i>0&&t<this._legend.tokenModifiers.length;t++)i&1&&r.push(this._legend.tokenModifiers[t]),i=i>>1;i>0&&this._logService.getLevel()===N.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${c.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),r.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(u,r,o.language);typeof n=="undefined"?a=2147483647:(a=0,typeof n.italic!="undefined"&&(a|=(n.italic?1:0)<<11|1),typeof n.bold!="undefined"&&(a|=(n.bold?2:0)<<11|2),typeof n.underline!="undefined"&&(a|=(n.underline?4:0)<<11|4),n.foreground&&(a|=n.foreground<<14|8),a===0&&(a=2147483647))}else this._logService.getLevel()===N.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${p} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,u="not-in-legend";this._hashTable.add(p,c,o.id,a),this._logService.getLevel()===N.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${p} (${u}) / ${c} (${r.join(" ")}): foreground ${b.TokenMetadata.getForeground(a)}, fontStyle ${b.TokenMetadata.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(p,c){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${p}, column ${c}`))}}e.SemanticTokensProviderStyling=w;function S(g,p,c){const o=g.data,s=g.data.length/5|0,a=Math.max(Math.ceil(s/1024),400),u=[];let r=0,i=1,n=0;for(;r<s;){const t=r;let l=Math.min(t+a,s);if(l<s){let I=l;for(;I-1>t&&o[5*I]===0;)I--;if(I-1===t){let k=l;for(;k+1<s&&o[5*k]===0;)k++;l=k}else l=I}let h=new Uint32Array((l-t)*4),m=0,_=0,f=0,v=0,y=0;for(;r<l;){const I=5*r,k=o[I],E=o[I+1],T=i+k,O=k===0?n+E:E,A=o[I+2],B=o[I+3],F=o[I+4],D=p.getMetadata(B,F,c);D!==2147483647&&(_===0&&(_=T),f===T&&y>O&&(p.warnOverlappingSemanticTokens(T,O+1),v<O?h[m-4+2]=O:m-=4),h[m]=T-_,h[m+1]=O,h[m+2]=O+A,h[m+3]=D,m+=4,f=T,v=O,y=O+A),i=T,n=O,r++}m!==h.length&&(h=h.subarray(0,m));const L=new M.MultilineTokens2(_,new M.SparseEncodedTokens(h));u.push(L)}return u}e.toMultilineTokens2=S;class C{constructor(p,c,o,s){this.tokenTypeIndex=p,this.tokenModifierSet=c,this.languageId=o,this.metadata=s,this.next=null}}class d{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=d._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<d._SIZES.length?2/3*this._currentLength:0),this._elements=[],d._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(p,c){for(let o=0;o<c;o++)p[o]=null}_hash2(p,c){return(p<<5)-p+c|0}_hashFunc(p,c,o){return this._hash2(this._hash2(p,c),o)%this._currentLength}get(p,c,o){const s=this._hashFunc(p,c,o);let a=this._elements[s];for(;a;){if(a.tokenTypeIndex===p&&a.tokenModifierSet===c&&a.languageId===o)return a;a=a.next}return null}add(p,c,o,s){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const a=this._elements;this._currentLengthIndex++,this._currentLength=d._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<d._SIZES.length?2/3*this._currentLength:0),this._elements=[],d._nullOutEntries(this._elements,this._currentLength);for(const u of a){let r=u;for(;r;){const i=r.next;r.next=null,this._add(r),r=i}}}this._add(new C(p,c,o,s))}_add(p){const c=this._hashFunc(p.tokenTypeIndex,p.tokenModifierSet,p.languageId);p.next=this._elements[c],this._elements[c]=p}}d._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}),define(Q[556],J([0,1,252,20]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function M(S,C){return new w(S,C)}e.createWebWorker=M;class w extends b.EditorWorkerClient{constructor(C,d){super(C,d.keepIdleModels||!1,d.label);this._foreignModuleId=d.moduleId,this._foreignModuleCreateData=d.createData||null,this._foreignModuleHost=d.host||null,this._foreignProxy=null}fhr(C,d){if(!this._foreignModuleHost||typeof this._foreignModuleHost[C]!="function")return Promise.reject(new Error("Missing method "+C+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[C].apply(this._foreignModuleHost,d))}catch(g){return Promise.reject(g)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(C=>{const d=this._foreignModuleHost?N.getAllMethodNames(this._foreignModuleHost):[];return C.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,d).then(g=>{this._foreignModuleCreateData=null;const p=(s,a)=>C.fmr(s,a),c=(s,a)=>function(){const u=Array.prototype.slice.call(arguments,0);return a(s,u)};let o={};for(const s of g)o[s]=c(s,p);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(C){return this._withSyncedResources(C).then(d=>this.getProxy())}}}),define(Q[85],J([0,1,9,524,82]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=void 0;var w;(function(C){C[C.Hint=1]="Hint",C[C.Info=2]="Info",C[C.Warning=4]="Warning",C[C.Error=8]="Error"})(w=e.MarkerSeverity||(e.MarkerSeverity={})),function(C){function d(s,a){return a-s}C.compare=d;const g=Object.create(null);g[C.Error]=N.localize(0,null),g[C.Warning]=N.localize(1,null),g[C.Info]=N.localize(2,null);function p(s){return g[s]||""}C.toString=p;function c(s){switch(s){case M.default.Error:return C.Error;case M.default.Warning:return C.Warning;case M.default.Info:return C.Info;case M.default.Ignore:return C.Hint}}C.fromSeverity=c;function o(s){switch(s){case C.Error:return M.default.Error;case C.Warning:return M.default.Warning;case C.Info:return M.default.Info;case C.Hint:return M.default.Ignore}}C.toSeverity=o}(w=e.MarkerSeverity||(e.MarkerSeverity={}));var S;(function(C){const d="";function g(c){return p(c,!0)}C.makeKey=g;function p(c,o){let s=[d];return c.source?s.push(c.source.replace("\xA6","\\\xA6")):s.push(d),c.code?typeof c.code=="string"?s.push(c.code.replace("\xA6","\\\xA6")):s.push(c.code.value.replace("\xA6","\\\xA6")):s.push(d),c.severity!==void 0&&c.severity!==null?s.push(w.toString(c.severity)):s.push(d),c.message&&o?s.push(c.message.replace("\xA6","\\\xA6")):s.push(d),c.startLineNumber!==void 0&&c.startLineNumber!==null?s.push(c.startLineNumber.toString()):s.push(d),c.startColumn!==void 0&&c.startColumn!==null?s.push(c.startColumn.toString()):s.push(d),c.endLineNumber!==void 0&&c.endLineNumber!==null?s.push(c.endLineNumber.toString()):s.push(d),c.endColumn!==void 0&&c.endColumn!==null?s.push(c.endColumn.toString()):s.push(d),s.push(d),s.join("\xA6")}C.makeKeyOptionalMessage=p})(S=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=b.createDecorator("markerService")}),define(Q[557],J([0,1,85,24,6,2,3,8,19,9,74,71]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class o{constructor(r,i,n){this.marker=r,this.index=i,this.total=n}}e.MarkerCoordinate=o;let s=class Tt{constructor(r,i){this._markerService=i,this._onDidChange=new M.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new w.DisposableStore,this._markers=[],this._nextIdx=-1,N.URI.isUri(r)?this._resourceFilter=t=>t.toString()===r.toString():r&&(this._resourceFilter=r);const n=()=>{this._markers=this._markerService.read({resource:N.URI.isUri(r)?r:void 0,severities:b.MarkerSeverity.Error|b.MarkerSeverity.Warning|b.MarkerSeverity.Info}),typeof r=="function"&&(this._markers=this._markers.filter(t=>this._resourceFilter(t.resource))),this._markers.sort(Tt._compareMarker)};n(),this._dispoables.add(i.onMarkerChanged(t=>{(!this._resourceFilter||t.some(l=>this._resourceFilter(l)))&&(n(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(r){return!this._resourceFilter&&!r?!0:!this._resourceFilter||!r?!1:this._resourceFilter(r)}get selected(){const r=this._markers[this._nextIdx];return r&&new o(r,this._nextIdx+1,this._markers.length)}_initIdx(r,i,n){let t=!1,l=this._markers.findIndex(h=>h.resource.toString()===r.uri.toString());l<0&&(l=d.binarySearch(this._markers,{resource:r.uri},(h,m)=>C.compare(h.resource.toString(),m.resource.toString())),l<0&&(l=~l));for(let h=l;h<this._markers.length;h++){let m=S.Range.lift(this._markers[h]);if(m.isEmpty()){const _=r.getWordAtPosition(m.getStartPosition());_&&(m=new S.Range(m.startLineNumber,_.startColumn,m.startLineNumber,_.endColumn))}if(i&&(m.containsPosition(i)||i.isBeforeOrEqual(m.getStartPosition()))){this._nextIdx=h,t=!0;break}if(this._markers[h].resource.toString()!==r.uri.toString())break}t||(this._nextIdx=n?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(r,i,n){if(this._markers.length===0)return!1;let t=this._nextIdx;return this._nextIdx===-1?this._initIdx(i,n,r):r?this._nextIdx=(this._nextIdx+1)%this._markers.length:r||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),t!==this._nextIdx}find(r,i){let n=this._markers.findIndex(t=>t.resource.toString()===r.toString());if(!(n<0)){for(;n<this._markers.length;n++)if(S.Range.containsPosition(this._markers[n],i))return new o(this._markers[n],n+1,this._markers.length)}}static _compareMarker(r,i){let n=C.compare(r.resource.toString(),i.resource.toString());return n===0&&(n=b.MarkerSeverity.compare(r.severity,i.severity)),n===0&&(n=S.Range.compareRangesUsingStarts(r,i)),n}};s=Me([_e(1,b.IMarkerService)],s),e.MarkerList=s,e.IMarkerNavigationService=g.createDecorator("IMarkerNavigationService");let a=class{constructor(r){this._markerService=r,this._provider=new c.LinkedList}getMarkerList(r){for(let i of this._provider){const n=i.getMarkerList(r);if(n)return n}return new s(r,this._markerService)}};a=Me([_e(0,b.IMarkerService)],a),p.registerSingleton(e.IMarkerNavigationService,a,!0)}),define(Q[558],J([0,1,19,43,24,6,85,51,54]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=void 0;class g{constructor(){this._byResource=new C.ResourceMap,this._byOwner=new Map}set(s,a,u){let r=this._byResource.get(s);r||(r=new Map,this._byResource.set(s,r)),r.set(a,u);let i=this._byOwner.get(a);i||(i=new C.ResourceMap,this._byOwner.set(a,i)),i.set(s,u)}get(s,a){let u=this._byResource.get(s);return u==null?void 0:u.get(a)}delete(s,a){let u=!1,r=!1,i=this._byResource.get(s);i&&(u=i.delete(a));let n=this._byOwner.get(a);if(n&&(r=n.delete(s)),u!==r)throw new Error("illegal state");return u&&r}values(s){var a,u,r,i;return typeof s=="string"?(u=(a=this._byOwner.get(s))===null||a===void 0?void 0:a.values())!==null&&u!==void 0?u:d.Iterable.empty():M.URI.isUri(s)?(i=(r=this._byResource.get(s))===null||r===void 0?void 0:r.values())!==null&&i!==void 0?i:d.Iterable.empty():d.Iterable.map(d.Iterable.concat(...this._byOwner.values()),n=>n[1])}}class p{constructor(s){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new C.ResourceMap,this._service=s,this._subscription=s.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(s){for(const a of s){const u=this._data.get(a);u&&this._substract(u);const r=this._resourceStats(a);this._add(r),this._data.set(a,r)}}_resourceStats(s){const a={errors:0,warnings:0,infos:0,unknowns:0};if(s.scheme===N.Schemas.inMemory||s.scheme===N.Schemas.walkThrough||s.scheme===N.Schemas.walkThroughSnippet)return a;for(const{severity:u}of this._service.read({resource:s}))u===S.MarkerSeverity.Error?a.errors+=1:u===S.MarkerSeverity.Warning?a.warnings+=1:u===S.MarkerSeverity.Info?a.infos+=1:a.unknowns+=1;return a}_substract(s){this.errors-=s.errors,this.warnings-=s.warnings,this.infos-=s.infos,this.unknowns-=s.unknowns}_add(s){this.errors+=s.errors,this.warnings+=s.warnings,this.infos+=s.infos,this.unknowns+=s.unknowns}}class c{constructor(){this._onMarkerChanged=new w.Emitter,this.onMarkerChanged=w.Event.debounce(this._onMarkerChanged.event,c._debouncer,0),this._data=new g,this._stats=new p(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(s,a){for(const u of a||[])this.changeOne(s,u,[])}changeOne(s,a,u){if(b.isFalsyOrEmpty(u))this._data.delete(a,s)&&this._onMarkerChanged.fire([a]);else{const r=[];for(const i of u){const n=c._toMarker(s,a,i);n&&r.push(n)}this._data.set(a,s,r),this._onMarkerChanged.fire([a])}}static _toMarker(s,a,u){let{code:r,severity:i,message:n,source:t,startLineNumber:l,startColumn:h,endLineNumber:m,endColumn:_,relatedInformation:f,tags:v}=u;if(!!n)return l=l>0?l:1,h=h>0?h:1,m=m>=l?m:l,_=_>0?_:h,{resource:a,owner:s,code:r,severity:i,message:n,source:t,startLineNumber:l,startColumn:h,endLineNumber:m,endColumn:_,relatedInformation:f,tags:v}}read(s=Object.create(null)){let{owner:a,resource:u,severities:r,take:i}=s;if((!i||i<0)&&(i=-1),a&&u){const n=this._data.get(u,a);if(n){const t=[];for(const l of n)if(c._accept(l,r)){const h=t.push(l);if(i>0&&h===i)break}return t}else return[]}else if(!a&&!u){const n=[];for(let t of this._data.values())for(let l of t)if(c._accept(l,r)){const h=n.push(l);if(i>0&&h===i)return n}return n}else{const n=this._data.values(u!=null?u:a),t=[];for(const l of n)for(const h of l)if(c._accept(h,r)){const m=t.push(h);if(i>0&&m===i)return t}return t}}static _accept(s,a){return a===void 0||(a&s.severity)===s.severity}static _debouncer(s,a){s||(c._dedupeMap=new C.ResourceMap,s=[]);for(const u of a)c._dedupeMap.has(u)||(c._dedupeMap.set(u,!0),s.push(u));return s}}e.MarkerService=c}),define(Q[32],J([0,1,82,9]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpNotification=e.INotificationService=e.Severity=void 0,e.Severity=b.default,e.INotificationService=N.createDecorator("notificationService");class M{}e.NoOpNotification=M}),define(Q[58],J([0,1,2,8,24,9]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesScheme=e.NullOpenerService=e.IOpenerService=void 0,e.IOpenerService=w.createDecorator("openerService"),e.NullOpenerService=Object.freeze({_serviceBrand:void 0,registerOpener(){return b.Disposable.None},registerValidator(){return b.Disposable.None},registerExternalUriResolver(){return b.Disposable.None},setDefaultExternalOpener(){},registerExternalOpener(){return b.Disposable.None},open(){return Ie(this,void 0,void 0,function*(){return!1})},resolveExternalUri(C){return Ie(this,void 0,void 0,function*(){return{resolved:C,dispose(){}}})}});function S(C,d){return M.URI.isUri(C)?N.equalsIgnoreCase(C.scheme,d):N.startsWithIgnoreCase(C,d+":")}e.matchesScheme=S}),define(Q[140],J([0,1,290,58,57,12,243,6,2,18]),function(q,e,b,N,M,w,S,C,d,g){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownRenderer=void 0;let c=class Rt{constructor(s,a,u){this._options=s,this._modeService=a,this._openerService=u,this._onDidRenderAsync=new C.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(s,a,u){const r=new d.DisposableStore;let i;return s?i=b.renderMarkdown(s,Object.assign(Object.assign({},this._getRenderOptions(r)),a),u):i=document.createElement("span"),{element:i,dispose:()=>r.dispose()}}_getRenderOptions(s){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(a,u)=>Ie(this,void 0,void 0,function*(){var r,i,n,t;let l;a?l=this._modeService.getModeIdForLanguageName(a):this._options.editor&&(l=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageIdentifier().language),l||(l="plaintext"),this._modeService.triggerMode(l);const h=(i=yield g.TokenizationRegistry.getPromise(l))!==null&&i!==void 0?i:void 0,m=document.createElement("span");m.innerHTML=(t=(n=Rt._ttpTokenizer)===null||n===void 0?void 0:n.createHTML(u,h))!==null&&t!==void 0?t:S.tokenizeToString(u,h);let _=this._options.codeBlockFontFamily;return this._options.editor&&(_=this._options.editor.getOption(38).fontFamily),_&&(m.style.fontFamily=_),m}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:a=>this._openerService.open(a,{fromUserGesture:!0,allowContributedOpeners:!0}).catch(w.onUnexpectedError),disposeables:s}}}};c._ttpTokenizer=(p=window.trustedTypes)===null||p===void 0?void 0:p.createPolicy("tokenizeToString",{createHTML(o,s){return S.tokenizeToString(o,s)}}),c=Me([_e(1,M.IModeService),_e(2,N.IOpenerService)],c),e.MarkdownRenderer=c}),define(Q[559],J([0,1,7,23,71,51,199,43,44,24,28,26,531,58]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let a=class{constructor(n){this._commandService=n}open(n){return Ie(this,void 0,void 0,function*(){if(!s.matchesScheme(n,C.Schemas.command))return!1;typeof n=="string"&&(n=g.URI.parse(n));let t=[];try{t=S.parse(decodeURIComponent(n.query))}catch(l){try{t=S.parse(n.query)}catch(h){}}return Array.isArray(t)||(t=[t]),yield this._commandService.executeCommand(n.path,...t),!0})}};a=Me([_e(0,c.ICommandService)],a);let u=class{constructor(n){this._editorService=n}open(n,t){return Ie(this,void 0,void 0,function*(){typeof n=="string"&&(n=g.URI.parse(n));let l;const h=/^L?(\d+)(?:,(\d+))?/.exec(n.fragment);return h&&(l={startLineNumber:parseInt(h[1]),startColumn:h[2]?parseInt(h[2]):1},n=n.with({fragment:""})),n.scheme===C.Schemas.file&&(n=d.normalizePath(n)),yield this._editorService.openCodeEditor({resource:n,options:Object.assign({selection:l,context:(t==null?void 0:t.fromUserGesture)?o.EditorOpenContext.USER:o.EditorOpenContext.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0})}};u=Me([_e(0,p.ICodeEditorService)],u);let r=class{constructor(n,t){this._openers=new M.LinkedList,this._validators=new M.LinkedList,this._resolvers=new M.LinkedList,this._resolvedUriTargets=new w.ResourceMap(l=>l.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new M.LinkedList,this._defaultExternalOpener={openExternal:l=>Ie(this,void 0,void 0,function*(){return s.matchesScheme(l,C.Schemas.http)||s.matchesScheme(l,C.Schemas.https)?b.windowOpenNoOpener(l):window.location.href=l,!0})},this._openers.push({open:(l,h)=>Ie(this,void 0,void 0,function*(){return(h==null?void 0:h.openExternal)||s.matchesScheme(l,C.Schemas.mailto)||s.matchesScheme(l,C.Schemas.http)||s.matchesScheme(l,C.Schemas.https)?(yield this._doOpenExternal(l,h),!0):!1})}),this._openers.push(new a(t)),this._openers.push(new u(n))}registerOpener(n){return{dispose:this._openers.unshift(n)}}registerValidator(n){return{dispose:this._validators.push(n)}}registerExternalUriResolver(n){return{dispose:this._resolvers.push(n)}}setDefaultExternalOpener(n){this._defaultExternalOpener=n}registerExternalOpener(n){return{dispose:this._externalOpeners.push(n)}}open(n,t){var l;return Ie(this,void 0,void 0,function*(){const h=typeof n=="string"?g.URI.parse(n):n,m=(l=this._resolvedUriTargets.get(h))!==null&&l!==void 0?l:h;for(const _ of this._validators)if(!(yield _.shouldOpen(m)))return!1;for(const _ of this._openers)if(yield _.open(n,t))return!0;return!1})}resolveExternalUri(n,t){return Ie(this,void 0,void 0,function*(){for(const l of this._resolvers){const h=yield l.resolveExternalUri(n,t);if(h)return this._resolvedUriTargets.has(h.resolved)||this._resolvedUriTargets.set(h.resolved,n),h}return{resolved:n,dispose:()=>{}}})}_doOpenExternal(n,t){return Ie(this,void 0,void 0,function*(){const l=typeof n=="string"?g.URI.parse(n):n,{resolved:h}=yield this.resolveExternalUri(l,t);let m;if(typeof n=="string"&&l.toString()===h.toString()?m=n:m=encodeURI(h.toString(!0)),t==null?void 0:t.allowContributedOpeners){const _=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const f of this._externalOpeners)if(yield f.openExternal(m,{sourceUri:l,preferredOpenerId:_},N.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(m,{sourceUri:l},N.CancellationToken.None)})}dispose(){this._validators.clear()}};r=Me([_e(0,p.ICodeEditorService),_e(1,c.ICommandService)],r),e.OpenerService=r}),define(Q[560],J([0,1,7,73,2,228,408,140,58,19]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesGlyphHoverWidget=void 0;class p{constructor(s){this._editor=s,this._lineNumber=-1,this._result=[]}setLineNumber(s){this._lineNumber=s,this._result=[]}clearResult(){this._result=[]}computeSync(){const s=r=>({value:r}),a=this._editor.getLineDecorations(this._lineNumber),u=[];if(!a)return u;for(const r of a)if(!!r.options.glyphMarginClassName){const i=r.options.glyphMarginHoverMessage;!i||N.isEmptyMarkdownString(i)||u.push(...g.asArray(i).map(s))}return u}onResult(s,a){this._result=this._result.concat(s)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class c extends S.GlyphHoverWidget{constructor(s,a,u=d.NullOpenerService){super(c.ID,s);this._renderDisposeables=this._register(new M.DisposableStore),this._messages=[],this._lastLineNumber=-1,this._markdownRenderer=this._register(new C.MarkdownRenderer({editor:this._editor},a,u)),this._computer=new p(this._editor),this._hoverOperation=new w.HoverOperation(this._computer,r=>this._withResult(r),void 0,r=>this._withResult(r),300)}dispose(){this._hoverOperation.cancel(),super.dispose()}onModelDecorationsChanged(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(s){this._lastLineNumber!==s&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=s,this._computer.setLineNumber(s),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-1,this._hoverOperation.cancel(),super.hide()}_withResult(s){this._messages=s,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(s,a){this._renderDisposeables.clear();const u=document.createDocumentFragment();for(const r of a){const i=this._markdownRenderer.render(r.value);this._renderDisposeables.add(i),u.appendChild(b.$("div.hover-row",void 0,i.element))}this.updateContents(u),this.showAt(s)}}e.ModesGlyphHoverWidget=c,c.ID="editor.contrib.modesGlyphHoverWidget"}),define(Q[254],J([0,1,509,2,7,61,140,73,27,6,231,9]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function o(u){return!!u&&Boolean(u.completion.documentation||u.completion.detail&&u.completion.detail!==u.completion.label)}e.canExpandCompletionItem=o;let s=class{constructor(r,i){this._editor=r,this._onDidClose=new g.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new g.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new N.DisposableStore,this._renderDisposeable=new N.DisposableStore,this._borderWidth=1,this._size=new M.Dimension(330,0),this.domNode=M.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=i.createInstance(S.MarkdownRenderer,{editor:r}),this._body=M.$(".body"),this._scrollbar=new w.DomScrollableElement(this._body,{}),M.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=M.append(this._body,M.$(".header")),this._close=M.append(this._header,M.$("span"+d.Codicon.close.cssSelector)),this._close.title=b.localize(0,null),this._type=M.append(this._header,M.$("p.type")),this._docs=M.append(this._body,M.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(38)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const r=this._editor.getOptions(),i=r.get(38),n=i.fontFamily,t=r.get(102)||i.fontSize,l=r.get(103)||i.lineHeight,h=i.fontWeight,m=`${t}px`,_=`${l}px`;this.domNode.style.fontSize=m,this.domNode.style.lineHeight=_,this.domNode.style.fontWeight=h,this.domNode.style.fontFeatureSettings=i.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=_,this._close.style.width=_}getLayoutInfo(){const r=this._editor.getOption(103)||this._editor.getOption(38).lineHeight,i=this._borderWidth,n=i*2;return{lineHeight:r,borderWidth:i,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=b.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(r,i){var n;this._renderDisposeable.clear();let{detail:t,documentation:l}=r.completion;if(i){let h="";h+=`score: ${r.score[0]}${r.word?`, compared '${r.completion.filterText&&r.completion.filterText+" (filterText)"||typeof r.completion.label=="string"?r.completion.label:r.completion.label.name}' with '${r.word}'`:" (no prefix)"}
`,h+=`distance: ${r.distance}, see localityBonus-setting
`,h+=`index: ${r.idx}, based on ${r.completion.sortText&&`sortText: "${r.completion.sortText}"`||"label"}
`,h+=`commit characters: ${(n=r.completion.commitCharacters)===null||n===void 0?void 0:n.join("")}
`,l=new C.MarkdownString().appendCodeblock("empty",h),t=`Provider: ${r.provider._debugDisplayName}`}if(!i&&!o(r)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),t){const h=t.length>1e5?`${t.substr(0,1e5)}\u2026`:t;this._type.textContent=h,this._type.title=h,M.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(h))}else M.clearNode(this._type),this._type.title="",M.hide(this._type),this.domNode.classList.add("no-type");if(M.clearNode(this._docs),typeof l=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=l;else if(l){this._docs.classList.add("markdown-docs"),M.clearNode(this._docs);const h=this._markdownRenderer.render(l);this._docs.appendChild(h.element),this._renderDisposeable.add(h),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=h=>{h.preventDefault(),h.stopPropagation()},this._close.onclick=h=>{h.preventDefault(),h.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(r,i){const n=new M.Dimension(r,i);M.Dimension.equals(n,this._size)||(this._size=n,M.size(this.domNode,r,i)),this._scrollbar.scanDomNode()}scrollDown(r=8){this._body.scrollTop+=r}scrollUp(r=8){this._body.scrollTop-=r}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(r){this._borderWidth=r}get borderWidth(){return this._borderWidth}};s=Me([_e(1,c.IInstantiationService)],s),e.SuggestDetailsWidget=s;class a{constructor(r,i){this.widget=r,this._editor=i,this._disposables=new N.DisposableStore,this._added=!1,this._resizable=new p.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(r.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,t,l=0,h=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,t=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(m=>{if(n&&t){this.widget.layout(m.dimension.width,m.dimension.height);let _=!1;m.west&&(h=t.width-m.dimension.width,_=!0),m.north&&(l=t.height-m.dimension.height,_=!0),_&&this._applyTopLeft({top:n.top+l,left:n.left+h})}m.done&&(n=void 0,t=void 0,l=0,h=0,this._userSize=m.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var m;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(m=this._userSize)!==null&&m!==void 0?m:this.widget.size)}))}dispose(){this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(r=!1){this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),r&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(r){var i;const n=M.getDomNodePagePosition(r);this._anchorBox=n,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size)}_placeAtAnchor(r,i){const n=M.getClientArea(document.body),t=this.widget.getLayoutInfo();let l,h,m=new M.Dimension(220,2*t.lineHeight),_=0,f=r.top,v=r.top+r.height-t.borderHeight,y,L,I=n.width-(r.left+r.width+t.borderWidth+t.horizontalPadding);_=-t.borderWidth+r.left+r.width,L=!0,l=new M.Dimension(I,n.height-r.top-t.borderHeight-t.verticalPadding),h=l.with(void 0,r.top+r.height-t.borderHeight-t.verticalPadding),i.width>I&&(r.left>I&&(I=r.left-t.borderWidth-t.horizontalPadding,L=!1,_=Math.max(t.horizontalPadding,r.left-i.width-t.borderWidth),l=l.with(I),h=l.with(void 0,h.height)),r.width>I*1.3&&n.height-(r.top+r.height)>r.height&&(I=r.width,_=r.left,f=-t.borderWidth+r.top+r.height,l=new M.Dimension(r.width-t.borderHeight,n.height-r.top-r.height-t.verticalPadding),h=l.with(void 0,r.top-t.verticalPadding),m=m.with(l.width)));let k=i.height,E=Math.max(l.height,h.height);k>E&&(k=E);let T;k<=l.height?(y=!0,T=l):(y=!1,T=h),this._applyTopLeft({left:_,top:y?f:v-k}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!y,L,y,!L),this._resizable.minSize=m,this._resizable.maxSize=T,this._resizable.layout(k,Math.min(T.width,i.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(r){this._topLeft=r,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=a}),define(Q[59],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.Progress=void 0;class N{constructor(w){this.callback=w}report(w){this._value=w,this.callback(this._value)}}e.Progress=N,N.None=Object.freeze({report(){}}),e.IEditorProgressService=b.createDecorator("editorProgressService")}),define(Q[561],J([0,1,23,2,15]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var w;(function(g){g[g.NO_ACTION=0]="NO_ACTION",g[g.CLOSE_PICKER=1]="CLOSE_PICKER",g[g.REFRESH_PICKER=2]="REFRESH_PICKER",g[g.REMOVE_ITEM=3]="REMOVE_ITEM"})(w=e.TriggerAction||(e.TriggerAction={}));function S(g){const p=g;return Array.isArray(p.items)}function C(g){const p=g;return!!p.picks&&p.additionalPicks instanceof Promise}class d extends N.Disposable{constructor(p,c){super();this.prefix=p,this.options=c}provide(p,c){var o;const s=new N.DisposableStore;p.canAcceptInBackground=!!((o=this.options)===null||o===void 0?void 0:o.canAcceptInBackground),p.matchOnLabel=p.matchOnDescription=p.matchOnDetail=p.sortByLabel=!1;let a;const u=s.add(new N.MutableDisposable),r=()=>Ie(this,void 0,void 0,function*(){const i=u.value=new N.DisposableStore;a==null||a.dispose(!0),p.busy=!1,a=new b.CancellationTokenSource(c);const n=a.token,t=p.value.substr(this.prefix.length).trim(),l=this.getPicks(t,i,n),h=(m,_)=>{var f;let v,y;if(S(m)?(v=m.items,y=m.active):v=m,v.length===0){if(_)return!1;t.length>0&&((f=this.options)===null||f===void 0?void 0:f.noResultsPick)&&(v=[this.options.noResultsPick])}return p.items=v,y&&(p.activeItems=[y]),!0};if(l!==null)if(C(l)){let m=!1,_=!1;yield Promise.all([(()=>Ie(this,void 0,void 0,function*(){yield M.timeout(d.FAST_PICKS_RACE_DELAY),!n.isCancellationRequested&&(_||(m=h(l.picks,!0)))}))(),(()=>Ie(this,void 0,void 0,function*(){p.busy=!0;try{const f=yield l.additionalPicks;if(n.isCancellationRequested)return;let v,y;S(l.picks)?(v=l.picks.items,y=l.picks.active):v=l.picks;let L,I;if(S(f)?(L=f.items,I=f.active):L=f,L.length>0||!m){let k;if(!y&&!I){const E=p.activeItems[0];E&&v.indexOf(E)!==-1&&(k=E)}h({items:[...v,...L],active:y||I||k})}}finally{n.isCancellationRequested||(p.busy=!1),_=!0}}))()])}else if(!(l instanceof Promise))h(l);else{p.busy=!0;try{const m=yield l;if(n.isCancellationRequested)return;h(m)}finally{n.isCancellationRequested||(p.busy=!1)}}});return s.add(p.onDidChangeValue(()=>r())),r(),s.add(p.onDidAccept(i=>{const[n]=p.selectedItems;typeof(n==null?void 0:n.accept)=="function"&&(i.inBackground||p.hide(),n.accept(p.keyMods,i))})),s.add(p.onDidTriggerItemButton(({button:i,item:n})=>Ie(this,void 0,void 0,function*(){var t,l;if(typeof n.trigger=="function"){const h=(l=(t=n.buttons)===null||t===void 0?void 0:t.indexOf(i))!==null&&l!==void 0?l:-1;if(h>=0){const m=n.trigger(h,p.keyMods),_=typeof m=="number"?m:yield m;if(c.isCancellationRequested)return;switch(_){case w.NO_ACTION:break;case w.CLOSE_PICKER:p.hide();break;case w.REFRESH_PICKER:r();break;case w.REMOVE_ITEM:const f=p.items.indexOf(n);if(f!==-1){const v=p.items.slice();v.splice(f,1),p.items=v}break}}}}))),s}}e.PickerQuickAccessProvider=d,d.FAST_PICKS_RACE_DELAY=200});var mt=this&&this.__createBinding||(Object.create?function(q,e,b,N){N===void 0&&(N=b),Object.defineProperty(q,N,{enumerable:!0,get:function(){return e[b]}})}:function(q,e,b,N){N===void 0&&(N=b),q[N]=e[b]}),pt=this&&this.__exportStar||function(q,e){for(var b in q)b!=="default"&&!Object.prototype.hasOwnProperty.call(e,b)&&mt(e,q,b)};define(Q[78],J([0,1,9,202]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=void 0,pt(N,e),e.IQuickInputService=b.createDecorator("quickInputService")}),define(Q[33],J([0,1,20,195]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class M{constructor(){this.data=new Map}add(S,C){N.ok(b.isString(S)),N.ok(b.isObject(C)),N.ok(!this.data.has(S),"There is already an extension with this id"),this.data.set(S,C)}as(S){return this.data.get(S)||null}}e.Registry=new M}),define(Q[141],J([0,1,458,6,18,41,33]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLAINTEXT_LANGUAGE_IDENTIFIER=e.PLAINTEXT_EXTENSION=e.PLAINTEXT_MODE_ID=e.ModesRegistry=e.EditorModesRegistry=e.Extensions=void 0,e.Extensions={ModesRegistry:"editor.modesRegistry"};class C{constructor(){this._onDidChangeLanguages=new N.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(g){return this._languages.push(g),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let p=0,c=this._languages.length;p<c;p++)if(this._languages[p]===g){this._languages.splice(p,1);return}}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}e.EditorModesRegistry=C,e.ModesRegistry=new C,S.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_MODE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.PLAINTEXT_LANGUAGE_IDENTIFIER=new M.LanguageIdentifier(e.PLAINTEXT_MODE_ID,1),e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_MODE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[b.localize(0,null),"text"],mimetypes:["text/plain"]}),w.LanguageConfigurationRegistry.register(e.PLAINTEXT_LANGUAGE_IDENTIFIER,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}},0)}),define(Q[562],J([0,1,43,44,141,237]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssEscape=e.detectModeId=e.getIconClasses=void 0;function S(g,p,c,o){const s=o===w.FileKind.ROOT_FOLDER?["rootfolder-icon"]:o===w.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(c){let a;if(c.scheme===b.Schemas.data?a=N.DataUri.parseMetaData(c).get(N.DataUri.META_DATA_LABEL):a=d(N.basenameOrAuthority(c).toLowerCase()),o===w.FileKind.FOLDER)s.push(`${a}-name-folder-icon`);else{if(a){if(s.push(`${a}-name-file-icon`),a.length<=255){const r=a.split(".");for(let i=1;i<r.length;i++)s.push(`${r.slice(i).join(".")}-ext-file-icon`)}s.push("ext-file-icon")}const u=C(g,p,c);u&&s.push(`${d(u)}-lang-file-icon`)}}return s}e.getIconClasses=S;function C(g,p,c){if(!c)return null;let o=null;if(c.scheme===b.Schemas.data){const a=N.DataUri.parseMetaData(c).get(N.DataUri.META_DATA_MIME);a&&(o=p.getModeId(a))}else{const s=g.getModel(c);s&&(o=s.getModeId())}return o&&o!==M.PLAINTEXT_MODE_ID?o:p.getModeIdByFilepathOrFirstLine(c)}e.detectModeId=C;function d(g){return g.replace(/[\11\12\14\15\40]/g,"/")}e.cssEscape=d}),define(Q[185],J([0,1,33,6]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function M(C){return C.length>0&&C.charAt(C.length-1)==="#"?C.substring(0,C.length-1):C}class w{constructor(){this._onDidChangeSchema=new N.Emitter,this.schemasById={}}registerSchema(d,g){this.schemasById[M(d)]=g,this._onDidChangeSchema.fire(d)}notifySchemaChanged(d){this._onDidChangeSchema.fire(d)}}const S=new w;b.Registry.add(e.Extensions.JSONContribution,S)}),define(Q[95],J([0,1,519,6,33,20,185]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperty=e.getDefaultValue=e.overrideIdentifierFromKey=e.OVERRIDE_PROPERTY_PATTERN=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.Extensions=void 0,e.Extensions={Configuration:"base.contributions.configuration"},e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage";const C=M.Registry.as(S.Extensions.JSONContribution);class d{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new N.Emitter,this._onDidUpdateConfiguration=new N.Emitter,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:b.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema)}registerConfiguration(u,r=!0){this.registerConfigurations([u],r)}registerConfigurations(u,r=!0){const i=[];u.forEach(n=>{i.push(...this.validateAndRegisterProperties(n,r)),this.configurationContributors.push(n),this.registerJSONConfiguration(n)}),C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerOverrideIdentifiers(u){for(const r of u)this.overrideIdentifiers.add(r);this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(u,r=!0,i=3){i=w.isUndefinedOrNull(u.scope)?i:u.scope;let n=[],t=u.properties;if(t)for(let h in t){if(r&&s(h)){delete t[h];continue}const m=t[h];if(this.updatePropertyDefaultValue(h,m),e.OVERRIDE_PROPERTY_PATTERN.test(h)?m.scope=void 0:m.scope=w.isUndefinedOrNull(m.scope)?i:m.scope,t[h].hasOwnProperty("included")&&!t[h].included){this.excludedConfigurationProperties[h]=t[h],delete t[h];continue}else this.configurationProperties[h]=t[h];!t[h].deprecationMessage&&t[h].markdownDeprecationMessage&&(t[h].deprecationMessage=t[h].markdownDeprecationMessage),n.push(h)}let l=u.allOf;if(l)for(let h of l)n.push(...this.validateAndRegisterProperties(h,r,i));return n}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(u){const r=i=>{let n=i.properties;if(n)for(const l in n)this.updateSchema(l,n[l]);let t=i.allOf;t&&t.forEach(r)};r(u)}updateSchema(u,r){switch(e.allSettings.properties[u]=r,r.scope){case 1:e.applicationSettings.properties[u]=r;break;case 2:e.machineSettings.properties[u]=r;break;case 6:e.machineOverridableSettings.properties[u]=r;break;case 3:e.windowSettings.properties[u]=r;break;case 4:e.resourceSettings.properties[u]=r;break;case 5:e.resourceSettings.properties[u]=r,this.resourceLanguageSettingsSchema.properties[u]=r;break}}updateOverridePropertyPatternKey(){for(const u of this.overrideIdentifiers.values()){const r=`[${u}]`,i={type:"object",description:b.localize(1,null),errorMessage:b.localize(2,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(r,i),e.allSettings.properties[r]=i,e.applicationSettings.properties[r]=i,e.machineSettings.properties[r]=i,e.machineOverridableSettings.properties[r]=i,e.windowSettings.properties[r]=i,e.resourceSettings.properties[r]=i}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(u,r){let i=this.defaultValues[u];w.isUndefined(i)&&(i=r.default),w.isUndefined(i)&&(i=c(r.type)),r.default=i}}const g="\\[.*\\]$";e.OVERRIDE_PROPERTY_PATTERN=new RegExp(g);function p(a){return a.substring(1,a.length-1)}e.overrideIdentifierFromKey=p;function c(a){switch(Array.isArray(a)?a[0]:a){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=c;const o=new d;M.Registry.add(e.Extensions.Configuration,o);function s(a){return a.trim()?e.OVERRIDE_PROPERTY_PATTERN.test(a)?b.localize(4,null,a):o.getConfigurationProperties()[a]!==void 0?b.localize(5,null,a):null:b.localize(3,null)}e.validateProperty=s}),define(Q[186],J([0,1,453,6,2,40,19,38,126,163,95,33,196]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=e.CommonEditorConfiguration=e.ComputedEditorOptions=e.TabFocus=void 0,e.TabFocus=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new N.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(L){this._tabFocus!==L&&(this._tabFocus=L,this._onDidChangeTabFocus.fire(this._tabFocus))}};const s=Object.hasOwnProperty;class a{constructor(){this._values=[]}_read(I){return this._values[I]}get(I){return this._values[I]}_write(I,k){this._values[I]=k}}e.ComputedEditorOptions=a;class u{constructor(){this._values=[]}_read(I){return this._values[I]}_write(I,k){this._values[I]=k}}class r{static readOptions(I){const k=I,E=new u;for(const T of C.editorOptionsRegistry){const O=T.name==="_never_"?void 0:k[T.name];E._write(T.id,O)}return E}static validateOptions(I){const k=new C.ValidatedEditorOptions;for(const E of C.editorOptionsRegistry)k._write(E.id,E.validate(I._read(E.id)));return k}static computeOptions(I,k){const E=new a;for(const T of C.editorOptionsRegistry)E._write(T.id,T.compute(k,E,I._read(T.id)));return E}static _deepEquals(I,k){if(typeof I!="object"||typeof k!="object")return I===k;if(Array.isArray(I)||Array.isArray(k))return Array.isArray(I)&&Array.isArray(k)?S.equals(I,k):!1;for(let E in I)if(!r._deepEquals(I[E],k[E]))return!1;return!0}static checkEquals(I,k){const E=[];let T=!1;for(const O of C.editorOptionsRegistry){const A=!r._deepEquals(I._read(O.id),k._read(O.id));E[O.id]=A,A&&(T=!0)}return T?new C.ConfigurationChangedEvent(E):null}}function i(L){const I=L.wordWrap;I===!0?L.wordWrap="on":I===!1&&(L.wordWrap="off");const k=L.lineNumbers;k===!0?L.lineNumbers="on":k===!1&&(L.lineNumbers="off"),L.autoClosingBrackets===!1&&(L.autoClosingBrackets="never",L.autoClosingQuotes="never",L.autoSurround="never"),L.cursorBlinking==="visible"&&(L.cursorBlinking="solid");const O=L.renderWhitespace;O===!0?L.renderWhitespace="boundary":O===!1&&(L.renderWhitespace="none");const A=L.renderLineHighlight;A===!0?L.renderLineHighlight="line":A===!1&&(L.renderLineHighlight="none");const B=L.acceptSuggestionOnEnter;B===!0?L.acceptSuggestionOnEnter="on":B===!1&&(L.acceptSuggestionOnEnter="off");const F=L.tabCompletion;F===!1?L.tabCompletion="off":F===!0&&(L.tabCompletion="onlySnippets");const D=L.suggest;if(D&&typeof D.filteredTypes=="object"&&D.filteredTypes){const Y={};Y.method="showMethods",Y.function="showFunctions",Y.constructor="showConstructors",Y.field="showFields",Y.variable="showVariables",Y.class="showClasses",Y.struct="showStructs",Y.interface="showInterfaces",Y.module="showModules",Y.property="showProperties",Y.event="showEvents",Y.operator="showOperators",Y.unit="showUnits",Y.value="showValues",Y.constant="showConstants",Y.enum="showEnums",Y.enumMember="showEnumMembers",Y.keyword="showKeywords",Y.text="showWords",Y.color="showColors",Y.file="showFiles",Y.reference="showReferences",Y.folder="showFolders",Y.typeParameter="showTypeParameters",Y.snippet="showSnippets",o.forEach(Y,ee=>{const se=D.filteredTypes[ee.key];se===!1&&(D[ee.value]=se)})}const R=L.hover;R===!0?L.hover={enabled:!0}:R===!1&&(L.hover={enabled:!1});const W=L.parameterHints;W===!0?L.parameterHints={enabled:!0}:W===!1&&(L.parameterHints={enabled:!1});const x=L.autoIndent;x===!0?L.autoIndent="full":x===!1&&(L.autoIndent="advanced");const K=L.matchBrackets;K===!0?L.matchBrackets="always":K===!1&&(L.matchBrackets="never")}function n(L){const I=w.deepClone(L);return i(I),I}class t extends M.Disposable{constructor(I,k){super();this._onDidChange=this._register(new N.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new N.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=I,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new C.ComputeOptionsMemory,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=n(k),this._readOptions=r.readOptions(this._rawOptions),this._validatedOptions=r.validateOptions(this._readOptions),this._register(d.EditorZoom.onDidChangeZoomLevel(E=>this._recomputeOptions())),this._register(e.TabFocus.onDidChangeTabFocus(E=>this._recomputeOptions()))}observeReferenceElement(I){}updatePixelRatio(){}_recomputeOptions(){const I=this.options,k=this._computeInternalOptions();if(!I)this.options=k;else{const E=r.checkEquals(I,k);if(E===null)return;this.options=k,this._onDidChangeFast.fire(E),this._onDidChange.fire(E)}}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const I=this._getEnvConfiguration(),k=g.BareFontInfo.createFromValidatedSettings(this._validatedOptions,I.zoomLevel,I.pixelRatio,this.isSimpleWidget),E={memory:this._computeOptionsMemory,outerWidth:I.outerWidth,outerHeight:I.outerHeight,fontInfo:this.readConfiguration(k),extraEditorClassName:I.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:I.emptySelectionClipboard,pixelRatio:I.pixelRatio,tabFocusMode:e.TabFocus.getTabFocusMode(),accessibilitySupport:I.accessibilitySupport};return r.computeOptions(this._validatedOptions,E)}static _subsetEquals(I,k){for(const E in k)if(s.call(k,E)){const T=k[E],O=I[E];if(O===T)continue;if(Array.isArray(O)&&Array.isArray(T)){if(!S.equals(O,T))return!1;continue}if(O&&typeof O=="object"&&T&&typeof T=="object"){if(!this._subsetEquals(O,T))return!1;continue}return!1}return!0}updateOptions(I){if(typeof I!="undefined"){const k=n(I);t._subsetEquals(this._rawOptions,k)||(this._rawOptions=w.mixin(this._rawOptions,k||{}),this._readOptions=r.readOptions(this._rawOptions),this._validatedOptions=r.validateOptions(this._readOptions),this._recomputeOptions())}}setIsDominatedByLongLines(I){this._isDominatedByLongLines=I,this._recomputeOptions()}setMaxLineNumber(I){const k=t._digitCount(I);this._lineNumbersDigitCount!==k&&(this._lineNumbersDigitCount=k,this._recomputeOptions())}setViewLineCount(I){this._viewLineCount!==I&&(this._viewLineCount=I,this._recomputeOptions())}static _digitCount(I){let k=0;for(;I;)I=Math.floor(I/10),k++;return k||1}}e.CommonEditorConfiguration=t,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:b.localize(0,null),scope:5});const l=c.Registry.as(p.Extensions.Configuration),h=Object.assign(Object.assign({},e.editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:C.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:b.localize(1,null)},"editor.insertSpaces":{type:"boolean",default:C.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:b.localize(2,null)},"editor.detectIndentation":{type:"boolean",default:C.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:b.localize(3,null)},"editor.trimAutoWhitespace":{type:"boolean",default:C.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:b.localize(4,null)},"editor.largeFileOptimizations":{type:"boolean",default:C.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:b.localize(5,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:b.localize(6,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[b.localize(7,null),b.localize(8,null),b.localize(9,null)],description:b.localize(10,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[b.localize(11,null),b.localize(12,null),b.localize(13,null)],default:"configuredByTheme",description:b.localize(14,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:b.localize(15,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:b.localize(16,null)},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:b.localize(17,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:b.localize(18,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:b.localize(19,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:b.localize(20,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:b.localize(21,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[b.localize(22,null),b.localize(23,null),b.localize(24,null)]}}});function m(L){return typeof L.type!="undefined"||typeof L.anyOf!="undefined"}for(const L of C.editorOptionsRegistry){const I=L.schema;if(typeof I!="undefined")if(m(I))h.properties[`editor.${L.name}`]=I;else for(let k in I)s.call(I,k)&&(h.properties[k]=I[k])}let _=null;function f(){return _===null&&(_=Object.create(null),Object.keys(h.properties).forEach(L=>{_[L]=!0})),_}function v(L){return f()[`editor.${L}`]||!1}e.isEditorConfigurationKey=v;function y(L){return f()[`diffEditor.${L}`]||!1}e.isDiffEditorConfigurationKey=y,l.registerConfiguration(h)}),define(Q[69],J([0,1,35,6,2,17,361,212,186,38,163]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Configuration=e.clearAllFontInfos=void 0;class c{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(r){const i=r.getId();return!!this._values[i]}get(r){const i=r.getId();return this._values[i]}put(r,i){const n=r.getId();this._keys[n]=r,this._values[n]=i}remove(r){const i=r.getId();delete this._keys[i],delete this._values[i]}getValues(){return Object.keys(this._keys).map(r=>this._values[r])}}function o(){s.INSTANCE.clearCache()}e.clearAllFontInfos=o;class s extends M.Disposable{constructor(){super();this._onDidChange=this._register(new N.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new c,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new c,this._onDidChange.fire()}_writeToCache(r,i){this._cache.put(r,i),!i.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const r=this._cache.getValues();let i=!1;for(const n of r)n.isTrusted||(i=!0,this._cache.remove(n));i&&this._onDidChange.fire()}readConfiguration(r){if(!this._cache.has(r)){let i=s._actualReadConfiguration(r);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new p.FontInfo({zoomLevel:b.getZoomLevel(),pixelRatio:b.getPixelRatio(),fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(r,i)}return this._cache.get(r)}static createRequest(r,i,n,t){const l=new S.CharWidthRequest(r,i);return n.push(l),t&&t.push(l),l}static _actualReadConfiguration(r){const i=[],n=[],t=this.createRequest("n",0,i,n),l=this.createRequest("\uFF4D",0,i,null),h=this.createRequest(" ",0,i,n),m=this.createRequest("0",0,i,n),_=this.createRequest("1",0,i,n),f=this.createRequest("2",0,i,n),v=this.createRequest("3",0,i,n),y=this.createRequest("4",0,i,n),L=this.createRequest("5",0,i,n),I=this.createRequest("6",0,i,n),k=this.createRequest("7",0,i,n),E=this.createRequest("8",0,i,n),T=this.createRequest("9",0,i,n),O=this.createRequest("\u2192",0,i,n),A=this.createRequest("\uFFEB",0,i,null),B=this.createRequest("\xB7",0,i,n),F=this.createRequest(String.fromCharCode(11825),0,i,null);this.createRequest("|",0,i,n),this.createRequest("/",0,i,n),this.createRequest("-",0,i,n),this.createRequest("_",0,i,n),this.createRequest("i",0,i,n),this.createRequest("l",0,i,n),this.createRequest("m",0,i,n),this.createRequest("|",1,i,n),this.createRequest("_",1,i,n),this.createRequest("i",1,i,n),this.createRequest("l",1,i,n),this.createRequest("m",1,i,n),this.createRequest("n",1,i,n),this.createRequest("|",2,i,n),this.createRequest("_",2,i,n),this.createRequest("i",2,i,n),this.createRequest("l",2,i,n),this.createRequest("m",2,i,n),this.createRequest("n",2,i,n),S.readCharWidths(r,i);const D=Math.max(m.width,_.width,f.width,v.width,y.width,L.width,I.width,k.width,E.width,T.width);let R=r.fontFeatureSettings===g.EditorFontLigatures.OFF;const W=n[0].width;for(let Y=1,ee=n.length;R&&Y<ee;Y++){const se=W-n[Y].width;if(se<-.001||se>.001){R=!1;break}}let x=!0;R&&A.width!==W&&(x=!1),A.width>O.width&&(x=!1);const K=b.getTimeSinceLastZoomLevelChanged()>2e3;return new p.FontInfo({zoomLevel:b.getZoomLevel(),pixelRatio:b.getPixelRatio(),fontFamily:r.fontFamily,fontWeight:r.fontWeight,fontSize:r.fontSize,fontFeatureSettings:r.fontFeatureSettings,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,isMonospace:R,typicalHalfwidthCharacterWidth:t.width,typicalFullwidthCharacterWidth:l.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:h.width,middotWidth:B.width,wsmiddotWidth:F.width,maxDigitWidth:D},K)}}s.INSTANCE=new s;class a extends d.CommonEditorConfiguration{constructor(r,i,n=null,t){super(r,i);this.accessibilityService=t,this._elementSizeObserver=this._register(new C.ElementSizeObserver(n,i.dimension,()=>this._recomputeOptions())),this._register(s.INSTANCE.onDidChange(()=>this._recomputeOptions())),this._validatedOptions.get(9)&&this._elementSizeObserver.startObserving(),this._register(b.onDidChangeZoomLevel(l=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(r,i){r.style.fontFamily=i.getMassagedFontFamily(),r.style.fontWeight=i.fontWeight,r.style.fontSize=i.fontSize+"px",r.style.fontFeatureSettings=i.fontFeatureSettings,r.style.lineHeight=i.lineHeight+"px",r.style.letterSpacing=i.letterSpacing+"px"}static applyFontInfo(r,i){r.setFontFamily(i.getMassagedFontFamily()),r.setFontWeight(i.fontWeight),r.setFontSize(i.fontSize),r.setFontFeatureSettings(i.fontFeatureSettings),r.setLineHeight(i.lineHeight),r.setLetterSpacing(i.letterSpacing)}observeReferenceElement(r){this._elementSizeObserver.observe(r)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let r="";return!b.isSafari&&!b.isWebkitWebView&&(r+="no-user-select "),b.isSafari&&(r+="no-minimap-shadow "),w.isMacintosh&&(r+="mac "),r}_getEnvConfiguration(){return{extraEditorClassName:a._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:b.isWebKit||b.isFirefox,pixelRatio:b.getPixelRatio(),zoomLevel:b.getZoomLevel(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(r){return s.INSTANCE.readConfiguration(r)}}e.Configuration=a}),define(Q[563],J([0,1,93,8,69,63]),function(q,e,b,N,M,w){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const C=(S=window.trustedTypes)===null||S===void 0?void 0:S.createPolicy("domLineBreaksComputer",{createHTML:a=>a});class d{static create(){return new d}constructor(){}createLineBreaksComputer(u,r,i,n){r=r|0,i=+i;let t=[];return{addRequest:(l,h)=>{t.push(l)},finalize:()=>g(t,u,r,i,n)}}}e.DOMLineBreaksComputerFactory=d;function g(a,u,r,i,n){var t;if(i===-1){const A=[];for(let B=0,F=a.length;B<F;B++)A[B]=null;return A}const l=Math.round(i*u.typicalHalfwidthCharacterWidth);(n===2||n===3)&&(n=1);const h=document.createElement("div");M.Configuration.applyFontInfoSlow(h,u);const m=b.createStringBuilder(1e4),_=[],f=[],v=[],y=[],L=[];for(let A=0;A<a.length;A++){const B=a[A];let F=0,D=0,R=l;if(n!==0)if(F=N.firstNonWhitespaceIndex(B),F===-1)F=0;else{for(let Y=0;Y<F;Y++)D+=B.charCodeAt(Y)===9?r-D%r:1;const K=Math.ceil(u.spaceWidth*D);K+u.typicalFullwidthCharacterWidth>l?(F=0,D=0):R=l-K}const W=B.substr(F),x=p(W,D,r,R,m);_[A]=F,f[A]=D,v[A]=W,y[A]=x[0],L[A]=x[1]}const I=m.build(),k=(t=C==null?void 0:C.createHTML(I))!==null&&t!==void 0?t:I;h.innerHTML=k,h.style.position="absolute",h.style.top="10000",h.style.wordWrap="break-word",document.body.appendChild(h);let E=document.createRange();const T=Array.prototype.slice.call(h.children,0);let O=[];for(let A=0;A<a.length;A++){const B=T[A],F=c(E,B,v[A],y[A]);if(F===null){O[A]=null;continue}const D=_[A],R=f[A],W=L[A],x=[];for(let K=0,Y=F.length;K<Y;K++)x[K]=W[F[K]];if(D!==0)for(let K=0,Y=F.length;K<Y;K++)F[K]+=D;O[A]=new w.LineBreakData(F,x,R)}return document.body.removeChild(h),O}function p(a,u,r,i,n){n.appendASCIIString('<div style="width:'),n.appendASCIIString(String(i)),n.appendASCIIString('px;">');const t=a.length;let l=u,h=0,m=[],_=[],f=0<t?a.charCodeAt(0):0;n.appendASCIIString("<span>");for(let v=0;v<t;v++){v!==0&&v%16384==0&&n.appendASCIIString("</span><span>"),m[v]=h,_[v]=l;const y=f;f=v+1<t?a.charCodeAt(v+1):0;let L=1,I=1;switch(y){case 9:L=r-l%r,I=L;for(let k=1;k<=L;k++)k<L?n.write1(160):n.appendASCII(32);break;case 32:f===32?n.write1(160):n.appendASCII(32);break;case 60:n.appendASCIIString("&lt;");break;case 62:n.appendASCIIString("&gt;");break;case 38:n.appendASCIIString("&amp;");break;case 0:n.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:n.write1(65533);break;default:N.isFullWidthCharacter(y)&&I++,y<32?n.write1(9216+y):n.write1(y)}h+=L,l+=I}return n.appendASCIIString("</span>"),m[a.length]=h,_[a.length]=l,n.appendASCIIString("</div>"),[m,_]}function c(a,u,r,i){if(r.length<=1)return null;const n=Array.prototype.slice.call(u.children,0),t=[];try{o(a,n,i,0,null,r.length-1,null,t)}catch(l){return console.log(l),null}return t.length===0?null:(t.push(r.length),t)}function o(a,u,r,i,n,t,l,h){if(i!==t&&(n=n||s(a,u,r[i],r[i+1]),l=l||s(a,u,r[t],r[t+1]),!(Math.abs(n[0].top-l[0].top)<=.1))){if(i+1===t){h.push(t);return}const m=i+(t-i)/2|0,_=s(a,u,r[m],r[m+1]);o(a,u,r,i,n,m,_,h),o(a,u,r,m,_,t,l,h)}}function s(a,u,r,i){return a.setStart(u[r/16384|0].firstChild,r%16384),a.setEnd(u[i/16384|0].firstChild,i%16384),a.getClientRects()}}),define(Q[564],J([0,1,30,69,165,45]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class S extends w.ViewPart{constructor(c){super(c);this._visibleLines=new M.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let c=0,o=this._dynamicOverlays.length;c<o;c++)if(this._dynamicOverlays[c].shouldRender())return!0;return!1}dispose(){super.dispose();for(let c=0,o=this._dynamicOverlays.length;c<o;c++)this._dynamicOverlays[c].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new C(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(c){this._dynamicOverlays.push(c)}onConfigurationChanged(c){this._visibleLines.onConfigurationChanged(c);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let a=o;a<=s;a++)this._visibleLines.getVisibleLine(a).onConfigurationChanged(c);return!0}onFlushed(c){return this._visibleLines.onFlushed(c)}onFocusChanged(c){return this._isFocused=c.isFocused,!0}onLinesChanged(c){return this._visibleLines.onLinesChanged(c)}onLinesDeleted(c){return this._visibleLines.onLinesDeleted(c)}onLinesInserted(c){return this._visibleLines.onLinesInserted(c)}onScrollChanged(c){return this._visibleLines.onScrollChanged(c)||!0}onTokensChanged(c){return this._visibleLines.onTokensChanged(c)}onZonesChanged(c){return this._visibleLines.onZonesChanged(c)}prepareRender(c){const o=this._dynamicOverlays.filter(s=>s.shouldRender());for(let s=0,a=o.length;s<a;s++){const u=o[s];u.prepareRender(c),u.onDidRender()}}render(c){this._viewOverlaysRender(c),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(c){this._visibleLines.renderLines(c.viewportData)}}e.ViewOverlays=S;class C{constructor(c,o){this._configuration=c,this._lineHeight=this._configuration.options.get(53),this._dynamicOverlays=o,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(c){this._domNode=b.createFastDomNode(c)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(c){this._lineHeight=this._configuration.options.get(53)}renderLine(c,o,s,a){let u="";for(let r=0,i=this._dynamicOverlays.length;r<i;r++)u+=this._dynamicOverlays[r].render(s.startLineNumber,c);return this._renderedContent===u?!1:(this._renderedContent=u,a.appendASCIIString('<div style="position:absolute;top:'),a.appendASCIIString(String(o)),a.appendASCIIString("px;width:100%;height:"),a.appendASCIIString(String(this._lineHeight)),a.appendASCIIString('px;">'),a.appendASCIIString(u),a.appendASCIIString("</div>"),!0)}layoutLine(c,o){this._domNode&&(this._domNode.setTop(o),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=C;class d extends S{constructor(c){super(c);const s=this._context.configuration.options.get(124);this._contentWidth=s.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(c){const s=this._context.configuration.options.get(124);return this._contentWidth=s.contentWidth,super.onConfigurationChanged(c)||!0}onScrollChanged(c){return super.onScrollChanged(c)||c.scrollWidthChanged}_viewOverlaysRender(c){super._viewOverlaysRender(c),this.domNode.setWidth(Math.max(c.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=d;class g extends S{constructor(c){super(c);const o=this._context.configuration.options,s=o.get(124);this._contentLeft=s.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),N.Configuration.applyFontInfo(this.domNode,o.get(38))}onConfigurationChanged(c){const o=this._context.configuration.options;N.Configuration.applyFontInfo(this.domNode,o.get(38));const s=o.get(124);return this._contentLeft=s.contentLeft,super.onConfigurationChanged(c)||!0}onScrollChanged(c){return super.onScrollChanged(c)||c.scrollHeightChanged}_viewOverlaysRender(c){super._viewOverlaysRender(c);const o=Math.min(c.scrollHeight,1e6);this.domNode.setHeight(o),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=g}),define(Q[565],J([0,1,7,30,8,69,38,14,3,124]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class p{constructor(s,a,u,r,i,n){this.top=s,this.left=a,this.width=u,this.height=r,this.textContent=i,this.textContentClassName=n}}class c{constructor(s){this._context=s;const a=this._context.configuration.options,u=a.get(38);this._cursorStyle=a.get(21),this._lineHeight=a.get(53),this._typicalHalfwidthCharacterWidth=u.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(a.get(24),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=N.createFastDomNode(document.createElement("div")),this._domNode.setClassName(`cursor ${g.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),w.Configuration.applyFontInfo(this._domNode,u),this._domNode.setDisplay("none"),this._position=new C.Position(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(s){const a=this._context.configuration.options,u=a.get(38);return this._cursorStyle=a.get(21),this._lineHeight=a.get(53),this._typicalHalfwidthCharacterWidth=u.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(a.get(24),this._typicalHalfwidthCharacterWidth),w.Configuration.applyFontInfo(this._domNode,u),!0}onCursorPositionChanged(s){return this._position=s,!0}_prepareRender(s){let a="";if(this._cursorStyle===S.TextEditorCursorStyle.Line||this._cursorStyle===S.TextEditorCursorStyle.LineThin){const f=s.visibleRangeForPosition(this._position);if(!f||f.outsideRenderedLine)return null;let v;if(this._cursorStyle===S.TextEditorCursorStyle.Line){if(v=b.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),v>2){const I=this._context.model.getLineContent(this._position.lineNumber),k=M.nextCharLength(I,this._position.column-1);a=I.substr(this._position.column-1,k)}}else v=b.computeScreenAwareSize(1);let y=f.left;v>=2&&y>=1&&(y-=1);const L=s.getVerticalOffsetForLineNumber(this._position.lineNumber)-s.bigNumbersDelta;return new p(L,y,v,this._lineHeight,a,"")}const u=this._context.model.getLineContent(this._position.lineNumber),r=M.nextCharLength(u,this._position.column-1),i=s.linesVisibleRangesForRange(new d.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+r),!1);if(!i||i.length===0)return null;const n=i[0];if(n.outsideRenderedLine||n.ranges.length===0)return null;const t=n.ranges[0],l=t.width<1?this._typicalHalfwidthCharacterWidth:t.width;let h="";if(this._cursorStyle===S.TextEditorCursorStyle.Block){const f=this._context.model.getViewLineData(this._position.lineNumber);a=u.substr(this._position.column-1,r);const v=f.tokens.findTokenIndexAtOffset(this._position.column-1);h=f.tokens.getClassName(v)}let m=s.getVerticalOffsetForLineNumber(this._position.lineNumber)-s.bigNumbersDelta,_=this._lineHeight;return(this._cursorStyle===S.TextEditorCursorStyle.Underline||this._cursorStyle===S.TextEditorCursorStyle.UnderlineThin)&&(m+=this._lineHeight-2,_=2),new p(m,t.left,l,_,a,h)}prepareRender(s){this._renderData=this._prepareRender(s)}render(s){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${g.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${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.ViewCursor=c}),define(Q[566],J([0,1,12,6,2,291,8,18,141,76,95,33]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=void 0;const o=Object.prototype.hasOwnProperty;class s extends M.Disposable{constructor(u=!0,r=!1){super();this._onDidChange=this._register(new N.Emitter),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=r,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},u&&(this._initializeFromRegistry(),this._register(d.ModesRegistry.onDidChangeLanguages(i=>this._initializeFromRegistry())))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const u=d.ModesRegistry.getLanguages();this._registerLanguages(u)}_registerLanguages(u){for(const r of u)this._registerLanguage(r);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(r=>{let i=this._languages[r];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),c.Registry.as(p.Extensions.Configuration).registerOverrideIdentifiers(d.ModesRegistry.getLanguages().map(r=>r.id)),this._onDidChange.fire()}_getLanguageId(u){if(this._languageToLanguageId[u])return this._languageToLanguageId[u];const r=this._nextLanguageId2++;return this._languageIdToLanguage[r]=u,this._languageToLanguageId[u]=r,r}_registerLanguage(u){const r=u.id;let i;if(o.call(this._languages,r))i=this._languages[r];else{const n=this._getLanguageId(r);i={identifier:new C.LanguageIdentifier(r,n),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[r]=i}this._mergeLanguage(i,u)}_mergeLanguage(u,r){const i=r.id;let n=null;if(Array.isArray(r.mimetypes)&&r.mimetypes.length>0&&(u.mimetypes.push(...r.mimetypes),n=r.mimetypes[0]),n||(n=`text/x-${i}`,u.mimetypes.push(n)),Array.isArray(r.extensions)){r.configuration?u.extensions=r.extensions.concat(u.extensions):u.extensions=u.extensions.concat(r.extensions);for(let h of r.extensions)w.registerTextMime({id:i,mime:n,extension:h},this._warnOnOverwrite)}if(Array.isArray(r.filenames))for(let h of r.filenames)w.registerTextMime({id:i,mime:n,filename:h},this._warnOnOverwrite),u.filenames.push(h);if(Array.isArray(r.filenamePatterns))for(let h of r.filenamePatterns)w.registerTextMime({id:i,mime:n,filepattern:h},this._warnOnOverwrite);if(typeof r.firstLine=="string"&&r.firstLine.length>0){let h=r.firstLine;h.charAt(0)!=="^"&&(h="^"+h);try{let m=new RegExp(h);S.regExpLeadsToEndlessLoop(m)||w.registerTextMime({id:i,mime:n,firstline:m},this._warnOnOverwrite)}catch(m){b.onUnexpectedError(m)}}u.aliases.push(i);let t=null;if(typeof r.aliases!="undefined"&&Array.isArray(r.aliases)&&(r.aliases.length===0?t=[null]:t=r.aliases),t!==null)for(const h of t)!h||h.length===0||u.aliases.push(h);let l=t!==null&&t.length>0;if(!(l&&t[0]===null)){let h=(l?t[0]:null)||i;(l||!u.name)&&(u.name=h)}r.configuration&&u.configurationFiles.push(r.configuration)}isRegisteredMode(u){return o.call(this._mimeTypesMap,u)?!0:o.call(this._languages,u)}getModeIdForLanguageNameLowercase(u){return o.call(this._lowercaseNameMap,u)?this._lowercaseNameMap[u].language:null}extractModeIds(u){return u?u.split(",").map(r=>r.trim()).map(r=>o.call(this._mimeTypesMap,r)?this._mimeTypesMap[r].language:r).filter(r=>o.call(this._languages,r)):[]}getLanguageIdentifier(u){if(u===g.NULL_MODE_ID||u===0)return g.NULL_LANGUAGE_IDENTIFIER;let r;if(typeof u=="string")r=u;else if(r=this._languageIdToLanguage[u],!r)return null;return o.call(this._languages,r)?this._languages[r].identifier:null}getModeIdsFromFilepathOrFirstLine(u,r){if(!u&&!r)return[];let i=w.guessMimeTypes(u,r);return this.extractModeIds(i.join(","))}}e.LanguagesRegistry=s}),define(Q[567],J([0,1,6,2,373,76,566,19]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModeServiceImpl=void 0;class d extends N.Disposable{constructor(c,o){super();this._onDidChange=this._register(new b.Emitter),this.onDidChange=this._onDidChange.event,this._selector=o,this.languageIdentifier=this._selector(),this._register(c(()=>this._evaluate()))}_evaluate(){let c=this._selector();c.id!==this.languageIdentifier.id&&(this.languageIdentifier=c,this._onDidChange.fire(this.languageIdentifier))}}class g extends N.Disposable{constructor(c=!1){super();this._onDidCreateMode=this._register(new b.Emitter),this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=this._register(new b.Emitter),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=this._register(new S.LanguagesRegistry(!0,c)),this._register(this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire()))}isRegisteredMode(c){return this._registry.isRegisteredMode(c)}getModeIdForLanguageName(c){return this._registry.getModeIdForLanguageNameLowercase(c)}getModeIdByFilepathOrFirstLine(c,o){const s=this._registry.getModeIdsFromFilepathOrFirstLine(c,o);return C.firstOrDefault(s,null)}getModeId(c){const o=this._registry.extractModeIds(c);return C.firstOrDefault(o,null)}getLanguageIdentifier(c){return this._registry.getLanguageIdentifier(c)}create(c){return new d(this.onLanguagesMaybeChanged,()=>{const o=this.getModeId(c);return this._createModeAndGetLanguageIdentifier(o)})}createByFilepathOrFirstLine(c,o){return new d(this.onLanguagesMaybeChanged,()=>{const s=this.getModeIdByFilepathOrFirstLine(c,o);return this._createModeAndGetLanguageIdentifier(s)})}_createModeAndGetLanguageIdentifier(c){const o=this.getLanguageIdentifier(c||"plaintext")||w.NULL_LANGUAGE_IDENTIFIER;return this._getOrCreateMode(o.language),o}triggerMode(c){const o=this.getModeId(c);this._getOrCreateMode(o||"plaintext")}_getOrCreateMode(c){if(!this._instantiatedModes.hasOwnProperty(c)){let o=this.getLanguageIdentifier(c)||w.NULL_LANGUAGE_IDENTIFIER;this._instantiatedModes[c]=new M.FrankensteinMode(o),this._onDidCreateMode.fire(this._instantiatedModes[c])}return this._instantiatedModes[c]}}e.ModeServiceImpl=g}),define(Q[46],J([0,1,33,9,95]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultValues=e.getConfigurationKeys=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.IConfigurationService=void 0,e.IConfigurationService=N.createDecorator("configurationService");function w(o,s){const a=Object.create(null);for(let u in o)S(a,u,o[u],s);return a}e.toValuesTree=w;function S(o,s,a,u){const r=s.split("."),i=r.pop();let n=o;for(let t=0;t<r.length;t++){let l=r[t],h=n[l];switch(typeof h){case"undefined":h=n[l]=Object.create(null);break;case"object":break;default:u(`Ignoring ${s} as ${r.slice(0,t+1).join(".")} is ${JSON.stringify(h)}`);return}n=h}if(typeof n=="object"&&n!==null)try{n[i]=a}catch(t){u(`Ignoring ${s} as ${r.join(".")} is ${JSON.stringify(n)}`)}else u(`Ignoring ${s} as ${r.join(".")} is ${JSON.stringify(n)}`)}e.addToValueTree=S;function C(o,s){const a=s.split(".");d(o,a)}e.removeFromValueTree=C;function d(o,s){const a=s.shift();if(s.length===0){delete o[a];return}if(Object.keys(o).indexOf(a)!==-1){const u=o[a];typeof u=="object"&&!Array.isArray(u)&&(d(u,s),Object.keys(u).length===0&&delete o[a])}}function g(o,s,a){function u(n,t){let l=n;for(const h of t){if(typeof l!="object"||l===null)return;l=l[h]}return l}const r=s.split("."),i=u(o,r);return typeof i=="undefined"?a:i}e.getConfigurationValue=g;function p(){const o=b.Registry.as(M.Extensions.Configuration).getConfigurationProperties();return Object.keys(o)}e.getConfigurationKeys=p;function c(){const o=Object.create(null),s=b.Registry.as(M.Extensions.Configuration).getConfigurationProperties();for(let a in s){let u=s[a].default;S(o,a,u,r=>console.error(`Conflict in default settings: ${r}`))}return o}e.getDefaultValues=c}),define(Q[568],J([0,1,2,65,6,16,46]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let C=class extends b.Disposable{constructor(g,p){super();this._contextKeyService=g,this._configurationService=p,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new M.Emitter,this._accessibilityModeEnabledContext=N.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const c=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration("editor.accessibilitySupport")&&(c(),this._onDidChangeScreenReaderOptimized.fire())})),c(),this.onDidChangeScreenReaderOptimized(()=>c())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const g=this._configurationService.getValue("editor.accessibilitySupport");return g==="on"||g==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};C=Me([_e(0,w.IContextKeyService),_e(1,S.IConfigurationService)],C),e.AccessibilityService=C}),define(Q[569],J([0,1,51,19,20,40,24,95,46]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.DefaultConfigurationModel=e.ConfigurationModel=void 0;class g{constructor(a={},u=[],r=[]){this._contents=a,this._keys=u,this._overrides=r,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(a){return a?d.getConfigurationValue(this.contents,a):this.contents}override(a){const u=this.getContentsForOverrideIdentifer(a);if(!u||typeof u!="object"||!Object.keys(u).length)return this;let r={};for(const i of N.distinct([...Object.keys(this.contents),...Object.keys(u)])){let n=this.contents[i],t=u[i];t&&(typeof n=="object"&&typeof t=="object"?(n=w.deepClone(n),this.mergeContents(n,t)):n=t),r[i]=n}return new g(r,this.keys,this.overrides)}merge(...a){const u=w.deepClone(this.contents),r=w.deepClone(this.overrides),i=[...this.keys];for(const n of a){this.mergeContents(u,n.contents);for(const t of n.overrides){const[l]=r.filter(h=>N.equals(h.identifiers,t.identifiers));l?this.mergeContents(l.contents,t.contents):r.push(w.deepClone(t))}for(const t of n.keys)i.indexOf(t)===-1&&i.push(t)}return new g(u,i,r)}freeze(){return this.isFrozen=!0,this}mergeContents(a,u){for(const r of Object.keys(u)){if(r in a&&M.isObject(a[r])&&M.isObject(u[r])){this.mergeContents(a[r],u[r]);continue}a[r]=w.deepClone(u[r])}}checkAndFreeze(a){return this.isFrozen&&!Object.isFrozen(a)?w.deepFreeze(a):a}getContentsForOverrideIdentifer(a){for(const u of this.overrides)if(u.identifiers.indexOf(a)!==-1)return u.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(a,u){this.addKey(a),d.addToValueTree(this.contents,a,u,r=>{throw new Error(r)})}removeValue(a){this.removeKey(a)&&d.removeFromValueTree(this.contents,a)}addKey(a){let u=this.keys.length;for(let r=0;r<u;r++)a.indexOf(this.keys[r])===0&&(u=r);this.keys.splice(u,1,a)}removeKey(a){let u=this.keys.indexOf(a);return u!==-1?(this.keys.splice(u,1),!0):!1}}e.ConfigurationModel=g;class p extends g{constructor(){const a=d.getDefaultValues(),u=d.getConfigurationKeys(),r=[];for(const i of Object.keys(a))C.OVERRIDE_PROPERTY_PATTERN.test(i)&&r.push({identifiers:[C.overrideIdentifierFromKey(i).trim()],keys:Object.keys(a[i]),contents:d.toValuesTree(a[i],n=>console.error(`Conflict in default settings file: ${n}`))});super(a,u,r)}}e.DefaultConfigurationModel=p;class c{constructor(a,u,r=new g,i=new g,n=new b.ResourceMap,t=new g,l=new b.ResourceMap,h=!0){this._defaultConfiguration=a,this._localUserConfiguration=u,this._remoteUserConfiguration=r,this._workspaceConfiguration=i,this._folderConfigurations=n,this._memoryConfiguration=t,this._memoryConfigurationByResource=l,this._freeze=h,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new b.ResourceMap,this._userConfiguration=null}getValue(a,u,r){return this.getConsolidateConfigurationModel(u,r).getValue(a)}updateValue(a,u,r={}){let i;r.resource?(i=this._memoryConfigurationByResource.get(r.resource),i||(i=new g,this._memoryConfigurationByResource.set(r.resource,i))):i=this._memoryConfiguration,u===void 0?i.removeValue(a):i.setValue(a,u),r.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(a,u){let r=this.getConsolidatedConfigurationModelForResource(a,u);return a.overrideIdentifier?r.override(a.overrideIdentifier):r}getConsolidatedConfigurationModelForResource({resource:a},u){let r=this.getWorkspaceConsolidatedConfiguration();if(u&&a){const i=u.getFolder(a);i&&(r=this.getFolderConsolidatedConfiguration(i.uri)||r);const n=this._memoryConfigurationByResource.get(a);n&&(r=r.merge(n))}return r}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(a){let u=this._foldersConsolidatedConfigurations.get(a);if(!u){const r=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(a);i?(u=r.merge(i),this._freeze&&(u=u.freeze()),this._foldersConsolidatedConfigurations.set(a,u)):u=r}return u}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((a,u)=>{const{contents:r,overrides:i,keys:n}=this._folderConfigurations.get(u);return a.push([u,{contents:r,overrides:i,keys:n}]),a},[])}}static parse(a){const u=this.parseConfigurationModel(a.defaults),r=this.parseConfigurationModel(a.user),i=this.parseConfigurationModel(a.workspace),n=a.folders.reduce((t,l)=>(t.set(S.URI.revive(l[0]),this.parseConfigurationModel(l[1])),t),new b.ResourceMap);return new c(u,r,new g,i,n,new g,new b.ResourceMap,!1)}static parseConfigurationModel(a){return new g(a.contents,a.keys,a.overrides).freeze()}}e.Configuration=c;class o{constructor(a,u,r,i){this.change=a,this.previous=u,this.currentConfiguraiton=r,this.currentWorkspace=i,this._previousConfiguration=void 0;const n=new Set;a.keys.forEach(l=>n.add(l)),a.overrides.forEach(([,l])=>l.forEach(h=>n.add(h))),this.affectedKeys=[...n.values()];const t=new g;this.affectedKeys.forEach(l=>t.setValue(l,{})),this.affectedKeysTree=t.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=c.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(a,u){var r;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,a)){if(u){const i=this.previousConfiguration?this.previousConfiguration.getValue(a,u,(r=this.previous)===null||r===void 0?void 0:r.workspace):void 0,n=this.currentConfiguraiton.getValue(a,u,this.currentWorkspace);return!w.equals(i,n)}return!0}return!1}doesAffectedKeysTreeContains(a,u){let r=d.toValuesTree({[u]:!0},()=>{}),i;for(;typeof r=="object"&&(i=Object.keys(r)[0]);){if(a=a[i],!a)return!1;r=r[i]}return!0}}e.ConfigurationChangeEvent=o}),define(Q[570],J([0,1,6,54,2,51,520,26,46,16,251]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const c="data-keybinding-context";class o{constructor(f,v){this._id=f,this._parent=v,this._value=Object.create(null),this._value._contextId=f}setValue(f,v){return this._value[f]!==v?(this._value[f]=v,!0):!1}removeValue(f){return f in this._value?(delete this._value[f],!0):!1}getValue(f){const v=this._value[f];return typeof v=="undefined"&&this._parent?this._parent.getValue(f):v}}e.Context=o;class s extends o{constructor(){super(-1,null)}setValue(f,v){return!1}removeValue(f){return!1}getValue(f){}}s.INSTANCE=new s;class a extends o{constructor(f,v,y){super(f,null);this._configurationService=v,this._values=w.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(L=>{if(L.source===6){const I=Array.from(N.Iterable.map(this._values,([k])=>k));this._values.clear(),y.fire(new i(I))}else{const I=[];for(const k of L.affectedKeys){const E=`config.${k}`,T=this._values.findSuperstr(E);T!==void 0&&(I.push(...N.Iterable.map(T,([O])=>O)),this._values.deleteSuperstr(E)),this._values.has(E)&&(I.push(E),this._values.delete(E))}y.fire(new i(I))}})}dispose(){this._listener.dispose()}getValue(f){if(f.indexOf(a._keyPrefix)!==0)return super.getValue(f);if(this._values.has(f))return this._values.get(f);const v=f.substr(a._keyPrefix.length),y=this._configurationService.getValue(v);let L;switch(typeof y){case"number":case"boolean":case"string":L=y;break;default:Array.isArray(y)?L=JSON.stringify(y):L=y}return this._values.set(f,L),L}setValue(f,v){return super.setValue(f,v)}removeValue(f){return super.removeValue(f)}}a._keyPrefix="config.";class u{constructor(f,v,y){this._service=f,this._key=v,this._defaultValue=y,this.reset()}set(f){this._service.setContext(this._key,f)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class r{constructor(f){this.key=f}affectsSome(f){return f.has(this.key)}}class i{constructor(f){this.keys=f}affectsSome(f){for(const v of this.keys)if(f.has(v))return!0;return!1}}class n{constructor(f){this.events=f}affectsSome(f){for(const v of this.events)if(v.affectsSome(f))return!0;return!1}}class t{constructor(f){this._onDidChangeContext=new b.PauseableEmitter({merge:v=>new n(v)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=f}createKey(f,v){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new u(this,f,v)}bufferChangeEvents(f){this._onDidChangeContext.pause();try{f()}finally{this._onDidChangeContext.resume()}}createScoped(f){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new h(this,f)}contextMatchesRules(f){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const v=this.getContextValuesContainer(this._myContextId);return p.KeybindingResolver.contextMatchesRules(v,f)}getContextKeyValue(f){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(f)}setContext(f,v){if(!this._isDisposed){const y=this.getContextValuesContainer(this._myContextId);!y||y.setValue(f,v)&&this._onDidChangeContext.fire(new r(f))}}removeContext(f){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(f)&&this._onDidChangeContext.fire(new r(f))}getContext(f){return this._isDisposed?s.INSTANCE:this.getContextValuesContainer(m(f))}}e.AbstractContextKeyService=t;let l=class extends t{constructor(f){super(0);this._contexts=new Map,this._toDispose=new M.DisposableStore,this._lastContextId=0;const v=new a(this._myContextId,f,this._onDidChangeContext);this._contexts.set(this._myContextId,v),this._toDispose.add(v)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(f){return this._isDisposed?s.INSTANCE:this._contexts.get(f)||s.INSTANCE}createChildContext(f=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let v=++this._lastContextId;return this._contexts.set(v,new o(v,this.getContextValuesContainer(f))),v}disposeContext(f){this._isDisposed||this._contexts.delete(f)}};l=Me([_e(0,d.IConfigurationService)],l),e.ContextKeyService=l;class h extends t{constructor(f,v){super(f.createChildContext());if(this._parentChangeListener=new M.MutableDisposable,this._parent=f,this._updateParentChangeListener(),this._domNode=v,this._domNode.hasAttribute(c)){let y="";this._domNode.classList&&(y=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${y?": "+y:""}`)}this._domNode.setAttribute(c,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(c),this._isDisposed=!0)}getContextValuesContainer(f){return this._isDisposed?s.INSTANCE:this._parent.getContextValuesContainer(f)}createChildContext(f=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(f)}disposeContext(f){this._isDisposed||this._parent.disposeContext(f)}}function m(_){for(;_;){if(_.hasAttribute(c)){const f=_.getAttribute(c);return f?parseInt(f,10):NaN}_=_.parentElement}return 0}C.CommandsRegistry.registerCommand(g.SET_CONTEXT_COMMAND_ID,function(_,f,v){_.get(g.IContextKeyService).createKey(String(f),v)}),C.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...g.RawContextKey.all()].sort((_,f)=>_.key.localeCompare(f.key))},description:{description:S.localize(0,null),args:[]}}),C.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const _=[],f=new Set;for(let v of g.RawContextKey.all())f.has(v.key)||(f.add(v.key),_.push(v));_.sort((v,y)=>v.key.localeCompare(y.key)),console.log(JSON.stringify(_,void 0,2))})}),define(Q[86],J([0,1,39,17,26,33]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class S{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(g){if(N.OS===1){if(g&&g.win)return g.win}else if(N.OS===2){if(g&&g.mac)return g.mac}else if(g&&g.linux)return g.linux;return g}registerKeybindingRule(g){const p=S.bindToCurrentPlatform(g);if(p&&p.primary){const c=b.createKeybinding(p.primary,N.OS);c&&this._registerDefaultKeybinding(c,g.id,g.args,g.weight,0,g.when)}if(p&&Array.isArray(p.secondary))for(let c=0,o=p.secondary.length;c<o;c++){const s=p.secondary[c],a=b.createKeybinding(s,N.OS);a&&this._registerDefaultKeybinding(a,g.id,g.args,g.weight,-c-1,g.when)}}registerCommandAndKeybindingRule(g){this.registerKeybindingRule(g),M.CommandsRegistry.registerCommand(g)}static _mightProduceChar(g){return g>=21&&g<=30||g>=31&&g<=56?!0:g===80||g===81||g===82||g===83||g===84||g===85||g===86||g===110||g===111||g===87||g===88||g===89||g===90||g===91||g===92}_assertNoCtrlAlt(g,p){g.ctrlKey&&g.altKey&&!g.metaKey&&S._mightProduceChar(g.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",g," for ",p)}_registerDefaultKeybinding(g,p,c,o,s,a){N.OS===1&&this._assertNoCtrlAlt(g.parts[0],p),this._coreKeybindings.push({keybinding:g,command:p,commandArgs:c,when:a,weight1:o,weight2:s,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(C)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new S,e.Extensions={EditorModes:"platform.keybindingsRegistry"},w.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function C(d,g){return d.weight1!==g.weight1?d.weight1-g.weight1:d.command<g.command?-1:d.command>g.command?1:d.weight2-g.weight2}}),define(Q[571],J([0,1,16,432,86,433]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.createAndBindHistoryNavigationWidgetScopedContextKeyService=e.HistoryNavigationEnablementContext=e.HistoryNavigationWidgetContext=void 0,e.HistoryNavigationWidgetContext="historyNavigationWidget",e.HistoryNavigationEnablementContext="historyNavigationEnabled";function S(o,s,a){new b.RawContextKey(a,s).bindTo(o)}function C(o,s){return o.createScoped(s.target)}function d(o,s){return o.getContext(document.activeElement).getValue(s)}function g(o,s){const a=C(o,s);S(a,s,e.HistoryNavigationWidgetContext);const u=new b.RawContextKey(e.HistoryNavigationEnablementContext,!0).bindTo(a);return{scopedContextKeyService:a,historyNavigationEnablement:u}}e.createAndBindHistoryNavigationWidgetScopedContextKeyService=g;let p=class extends N.FindInput{constructor(s,a,u,r,i=!1){super(s,a,i,u);this._register(g(r,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};p=Me([_e(3,b.IContextKeyService)],p),e.ContextScopedFindInput=p;let c=class extends w.ReplaceInput{constructor(s,a,u,r,i=!1){super(s,a,i,u);this._register(g(r,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};c=Me([_e(3,b.IContextKeyService)],c),e.ContextScopedReplaceInput=c,M.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:b.ContextKeyExpr.and(b.ContextKeyExpr.has(e.HistoryNavigationWidgetContext),b.ContextKeyExpr.equals(e.HistoryNavigationEnablementContext,!0)),primary:16,secondary:[512|16],handler:(o,s)=>{const a=d(o.get(b.IContextKeyService),e.HistoryNavigationWidgetContext);a&&a.historyNavigator.showPreviousValue()}}),M.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:b.ContextKeyExpr.and(b.ContextKeyExpr.has(e.HistoryNavigationWidgetContext),b.ContextKeyExpr.equals(e.HistoryNavigationEnablementContext,!0)),primary:18,secondary:[512|18],handler:(o,s)=>{const a=d(o.get(b.IContextKeyService),e.HistoryNavigationWidgetContext);a&&a.historyNavigator.showNextValue()}})}),define(Q[96],J([0,1,33,19,2]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var w;(function(C){C[C.PRESERVE=0]="PRESERVE",C[C.LAST=1]="LAST"})(w=e.DefaultQuickAccessFilterValue||(e.DefaultQuickAccessFilterValue={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class S{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(d){return d.prefix.length===0?this.defaultProvider=d:this.providers.push(d),this.providers.sort((g,p)=>p.prefix.length-g.prefix.length),M.toDisposable(()=>{this.providers.splice(this.providers.indexOf(d),1),this.defaultProvider===d&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return N.coalesce([this.defaultProvider,...this.providers])}getQuickAccessProvider(d){return d&&this.providers.find(p=>d.startsWith(p.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=S,b.Registry.add(e.Extensions.Quickaccess,new S)}),define(Q[572],J([0,1,78,96,33,526,2]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let C=class lt{constructor(g){this.quickInputService=g,this.registry=M.Registry.as(N.Extensions.Quickaccess)}provide(g){const p=new S.DisposableStore;p.add(g.onDidAccept(()=>{const[s]=g.selectedItems;s&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),p.add(g.onDidChangeValue(s=>{const a=this.registry.getQuickAccessProvider(s.substr(lt.PREFIX.length));a&&a.prefix&&a.prefix!==lt.PREFIX&&this.quickInputService.quickAccess.show(a.prefix,{preserveValue:!0})}));const{editorProviders:c,globalProviders:o}=this.getQuickAccessProviders();return g.items=c.length===0||o.length===0?[...c.length===0?o:c]:[{label:w.localize(0,null),type:"separator"},...o,{label:w.localize(1,null),type:"separator"},...c],p}getQuickAccessProviders(){const g=[],p=[];for(const c of this.registry.getQuickAccessProviders().sort((o,s)=>o.prefix.localeCompare(s.prefix)))if(c.prefix!==lt.PREFIX)for(const o of c.helpEntries){const s=o.prefix||c.prefix,a=s||"\u2026";(o.needsEditor?p:g).push({prefix:s,label:a,ariaLabel:w.localize(2,null,a,o.description),description:o.description})}return{editorProviders:p,globalProviders:g}}};C.PREFIX="?",C=Me([_e(0,b.IQuickInputService)],C),e.HelpQuickAccessProvider=C}),define(Q[573],J([0,1,33,96,64,572]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.Registry.as(N.Extensions.Quickaccess).registerQuickAccessProvider({ctor:w.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:M.QuickHelpNLS.helpQuickAccessActionLabel,needsEditor:!0}]})}),define(Q[574],J([0,1,78,2,96,33,23,9,88]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let g=class extends N.Disposable{constructor(c,o){super();this.quickInputService=c,this.instantiationService=o,this.registry=w.Registry.as(M.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(c="",o){var s;const[a,u]=this.getOrInstantiateProvider(c),r=this.visibleQuickAccess,i=r==null?void 0:r.descriptor;if(r&&u&&i===u){c!==u.prefix&&!(o==null?void 0:o.preserveValue)&&(r.picker.value=c),this.adjustValueSelection(r.picker,u,o);return}if(u&&!(o==null?void 0:o.preserveValue)){let h;if(r&&i&&i!==u){const m=r.value.substr(i.prefix.length);m&&(h=`${u.prefix}${m}`)}if(!h){const m=a==null?void 0:a.defaultFilterValue;m===M.DefaultQuickAccessFilterValue.LAST?h=this.lastAcceptedPickerValues.get(u):typeof m=="string"&&(h=`${u.prefix}${m}`)}typeof h=="string"&&(c=h)}const n=new N.DisposableStore,t=n.add(this.quickInputService.createQuickPick());t.value=c,this.adjustValueSelection(t,u,o),t.placeholder=u==null?void 0:u.placeholder,t.quickNavigate=o==null?void 0:o.quickNavigateConfiguration,t.hideInput=!!t.quickNavigate&&!r,(typeof(o==null?void 0:o.itemActivation)=="number"||(o==null?void 0:o.quickNavigateConfiguration))&&(t.itemActivation=(s=o==null?void 0:o.itemActivation)!==null&&s!==void 0?s:b.ItemActivation.SECOND),t.contextKey=u==null?void 0:u.contextKey,t.filterValue=h=>h.substring(u?u.prefix.length:0),(u==null?void 0:u.placeholder)&&(t.ariaLabel=u==null?void 0:u.placeholder);const l=this.registerPickerListeners(t,a,u,c,n);a&&n.add(a.provide(t,l)),t.show()}adjustValueSelection(c,o,s){var a;let u;(s==null?void 0:s.preserveValue)?u=[c.value.length,c.value.length]:u=[(a=o==null?void 0:o.prefix.length)!==null&&a!==void 0?a:0,c.value.length],c.valueSelection=u}registerPickerListeners(c,o,s,a,u){const r=this.visibleQuickAccess={picker:c,descriptor:s,value:a};u.add(N.toDisposable(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),u.add(c.onDidChangeValue(n=>{const[t]=this.getOrInstantiateProvider(n);t!==o?this.show(n,{preserveValue:!0}):r.value=n})),s&&u.add(c.onDidAccept(()=>{this.lastAcceptedPickerValues.set(s,c.value)}));const i=u.add(new S.CancellationTokenSource);return d.once(c.onDidHide)(()=>{c.selectedItems.length===0&&i.cancel(),u.dispose()}),i.token}getOrInstantiateProvider(c){const o=this.registry.getQuickAccessProvider(c);if(!o)return[void 0,void 0];let s=this.mapProviderToDescriptor.get(o);return s||(s=this.instantiationService.createInstance(o.ctor),this.mapProviderToDescriptor.set(o,s)),[s,o]}};g=Me([_e(0,b.IQuickInputService),_e(1,C.IInstantiationService)],g),e.QuickAccessController=g}),define(Q[79],J([0,1,9,6,2,20,293]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.WillSaveStateReason=e.IStorageService=void 0;const C="__$__targetStorageMarker";e.IStorageService=b.createDecorator("storageService");var d;(function(c){c[c.NONE=0]="NONE",c[c.SHUTDOWN=1]="SHUTDOWN"})(d=e.WillSaveStateReason||(e.WillSaveStateReason={}));class g extends M.Disposable{constructor(o={flushInterval:g.DEFAULT_FLUSH_INTERVAL}){super();this.options=o,this._onDidChangeValue=this._register(new N.PauseableEmitter),this._onDidChangeTarget=this._register(new N.PauseableEmitter),this._onWillSaveState=this._register(new N.Emitter),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(o,s){s===C?(o===0?this._globalKeyTargets=void 0:o===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:o})):this._onDidChangeValue.fire({scope:o,key:s,target:this.getKeyTargets(o)[s]})}get(o,s,a){var u;return(u=this.getStorage(s))===null||u===void 0?void 0:u.get(o,a)}getBoolean(o,s,a){var u;return(u=this.getStorage(s))===null||u===void 0?void 0:u.getBoolean(o,a)}getNumber(o,s,a){var u;return(u=this.getStorage(s))===null||u===void 0?void 0:u.getNumber(o,a)}store(o,s,a,u){if(w.isUndefinedOrNull(s)){this.remove(o,a);return}this.withPausedEmitters(()=>{var r;this.updateKeyTarget(o,a,u),(r=this.getStorage(a))===null||r===void 0||r.set(o,s)})}remove(o,s){this.withPausedEmitters(()=>{var a;this.updateKeyTarget(o,s,void 0),(a=this.getStorage(s))===null||a===void 0||a.delete(o)})}withPausedEmitters(o){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{o()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(o,s,a){var u,r;const i=this.getKeyTargets(s);typeof a=="number"?i[o]!==a&&(i[o]=a,(u=this.getStorage(s))===null||u===void 0||u.set(C,JSON.stringify(i))):typeof i[o]=="number"&&(delete i[o],(r=this.getStorage(s))===null||r===void 0||r.set(C,JSON.stringify(i)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(o){return o===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(o){const s=this.get(C,o);if(s)try{return JSON.parse(s)}catch(a){}return Object.create(null)}}e.AbstractStorageService=g,g.DEFAULT_FLUSH_INTERVAL=60*1e3;class p extends g{constructor(){super();this.globalStorage=new S.Storage(new S.InMemoryStorageDatabase),this.workspaceStorage=new S.Storage(new S.InMemoryStorageDatabase),this._register(this.workspaceStorage.onDidChangeStorage(o=>this.emitDidChangeValue(1,o))),this._register(this.globalStorage.onDidChangeStorage(o=>this.emitDidChangeValue(0,o)))}getStorage(o){return o===0?this.globalStorage:this.workspaceStorage}}e.InMemoryStorageService=p}),define(Q[575],J([0,1,9,74,248,51,79,3,15,88]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=b.createDecorator("ICodeLensCache");class p{constructor(s,a){this.lineCount=s,this.data=a}}let c=class{constructor(s){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new w.LRUCache(20,.75);const a="codelens/cache";d.runWhenIdle(()=>s.remove(a,1));const u="codelens/cache2",r=s.get(u,1,"{}");this._deserialize(r),g.once(s.onWillSaveState)(i=>{i.reason===S.WillSaveStateReason.SHUTDOWN&&s.store(u,this._serialize(),1,1)})}put(s,a){const u=a.lenses.map(n=>{var t;return{range:n.symbol.range,command:n.symbol.command&&{id:"",title:(t=n.symbol.command)===null||t===void 0?void 0:t.title}}}),r=new M.CodeLensModel;r.add({lenses:u,dispose:()=>{}},this._fakeProvider);const i=new p(s.getLineCount(),r);this._cache.set(s.uri.toString(),i)}get(s){const a=this._cache.get(s.uri.toString());return a&&a.lineCount===s.getLineCount()?a.data:void 0}delete(s){this._cache.delete(s.uri.toString())}_serialize(){const s=Object.create(null);for(const[a,u]of this._cache){const r=new Set;for(const i of u.data.lenses)r.add(i.symbol.range.startLineNumber);s[a]={lineCount:u.lineCount,lines:[...r.values()]}}return JSON.stringify(s)}_deserialize(s){try{const a=JSON.parse(s);for(const u in a){const r=a[u],i=[];for(const t of r.lines)i.push({range:new C.Range(t,1,t,11)});const n=new M.CodeLensModel;n.add({lenses:i,dispose(){}},this._fakeProvider),this._cache.set(u,new p(r.lineCount,n))}}catch(a){}}};c=Me([_e(0,S.IStorageService)],c),e.CodeLensCache=c,N.registerSingleton(e.ICodeLensCache,c)}),define(Q[576],J([0,1,51,79,18,2,15,9,46,74,57]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class c{constructor(i){this.name=i}select(i,n,t){if(t.length===0)return 0;let l=t[0].score[0];for(let h=0;h<t.length;h++){const{score:m,completion:_}=t[h];if(m[0]!==l)break;if(_.preselect)return h}return 0}}e.Memory=c;class o extends c{constructor(){super("first")}memorize(i,n,t){}toJSON(){}fromJSON(){}}e.NoMemory=o;class s extends c{constructor(){super("recentlyUsed");this._cache=new b.LRUCache(300,.66),this._seq=0}memorize(i,n,t){const l=`${i.getLanguageIdentifier().language}/${t.textLabel}`;this._cache.set(l,{touch:this._seq++,type:t.completion.kind,insertText:t.completion.insertText})}select(i,n,t){if(t.length===0)return 0;const l=i.getLineContent(n.lineNumber).substr(n.column-10,n.column-1);if(/\s$/.test(l))return super.select(i,n,t);let h=t[0].score[0],m=-1,_=-1,f=-1;for(let v=0;v<t.length&&t[v].score[0]===h;v++){const y=`${i.getLanguageIdentifier().language}/${t[v].textLabel}`,L=this._cache.peek(y);if(L&&L.touch>f&&L.type===t[v].completion.kind&&L.insertText===t[v].completion.insertText&&(f=L.touch,_=v),t[v].completion.preselect&&m===-1)return m=v}return _!==-1?_:m!==-1?m:0}toJSON(){return this._cache.toJSON()}fromJSON(i){this._cache.clear();let n=0;for(const[t,l]of i)l.touch=n,l.type=typeof l.type=="number"?l.type:M.completionKindFromString(l.type),this._cache.set(t,l);this._seq=this._cache.size}}e.LRUMemory=s;class a extends c{constructor(){super("recentlyUsedByPrefix");this._trie=b.TernarySearchTree.forStrings(),this._seq=0}memorize(i,n,t){const{word:l}=i.getWordUntilPosition(n),h=`${i.getLanguageIdentifier().language}/${l}`;this._trie.set(h,{type:t.completion.kind,insertText:t.completion.insertText,touch:this._seq++})}select(i,n,t){let{word:l}=i.getWordUntilPosition(n);if(!l)return super.select(i,n,t);let h=`${i.getLanguageIdentifier().language}/${l}`,m=this._trie.get(h);if(m||(m=this._trie.findSubstr(h)),m)for(let _=0;_<t.length;_++){let{kind:f,insertText:v}=t[_].completion;if(f===m.type&&v===m.insertText)return _}return super.select(i,n,t)}toJSON(){let i=[];return this._trie.forEach((n,t)=>i.push([t,n])),i.sort((n,t)=>-(n[1].touch-t[1].touch)).forEach((n,t)=>n[1].touch=t),i.slice(0,200)}fromJSON(i){if(this._trie.clear(),i.length>0){this._seq=i[0][1].touch+1;for(const[n,t]of i)t.type=typeof t.type=="number"?t.type:M.completionKindFromString(t.type),this._trie.set(n,t)}}}e.PrefixMemory=a;let u=class dt{constructor(i,n,t){this._storageService=i,this._modeService=n,this._configService=t,this._disposables=new w.DisposableStore,this._persistSoon=new S.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(i.onWillSaveState(l=>{l.reason===N.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(i,n,t){this._withStrategy(i,n).memorize(i,n,t),this._persistSoon.schedule()}select(i,n,t){return this._withStrategy(i,n).select(i,n,t)}_withStrategy(i,n){var t,l;const h=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:(t=this._modeService.getLanguageIdentifier(i.getLanguageIdAtPosition(n.lineNumber,n.column)))===null||t===void 0?void 0:t.language,resource:i.uri});if(((l=this._strategy)===null||l===void 0?void 0:l.name)!==h){this._saveState();const m=dt._strategyCtors.get(h)||o;this._strategy=new m;try{const f=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,v=this._storageService.get(`${dt._storagePrefix}/${h}`,f);v&&this._strategy.fromJSON(JSON.parse(v))}catch(_){}}return this._strategy}_saveState(){if(this._strategy){const n=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=JSON.stringify(this._strategy);this._storageService.store(`${dt._storagePrefix}/${this._strategy.name}`,t,n,1)}}};u._strategyCtors=new Map([["recentlyUsedByPrefix",a],["recentlyUsed",s],["first",o]]),u._storagePrefix="suggest/memories",u=Me([_e(0,N.IStorageService),_e(1,p.IModeService),_e(2,d.IConfigurationService)],u),e.SuggestMemoryService=u,e.ISuggestMemoryService=C.createDecorator("ISuggestMemories"),g.registerSingleton(e.ISuggestMemoryService,u,!0)}),define(Q[87],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=b.createDecorator("telemetryService")}),define(Q[577],J([0,1,525,561,2,66,20,51,79,46,9,37,26,87,12,32,437]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let i=class ut extends N.PickerQuickAccessProvider{constructor(l,h,m,_,f,v){super(ut.PREFIX,l);this.options=l,this.instantiationService=h,this.keybindingService=m,this.commandService=_,this.telemetryService=f,this.notificationService=v,this.commandsHistory=this._register(this.instantiationService.createInstance(n))}getPicks(l,h,m){return Ie(this,void 0,void 0,function*(){const _=yield this.getCommandPicks(h,m);if(m.isCancellationRequested)return[];const f=[];for(const I of _){const k=S.withNullAsUndefined(ut.WORD_FILTER(l,I.label)),E=I.commandAlias?S.withNullAsUndefined(ut.WORD_FILTER(l,I.commandAlias)):void 0;k||E?(I.highlights={label:k,detail:this.options.showAlias?E:void 0},f.push(I)):l===I.commandId&&f.push(I)}const v=new Map;for(const I of f){const k=v.get(I.label);k?(I.description=I.commandId,k.description=k.commandId):v.set(I.label,I)}f.sort((I,k)=>{const E=this.commandsHistory.peek(I.commandId),T=this.commandsHistory.peek(k.commandId);return E&&T?E>T?-1:1:E?-1:T?1:I.label.localeCompare(k.label)});const y=[];let L=!1;for(let I=0;I<f.length;I++){const k=f[I],E=this.keybindingService.lookupKeybinding(k.commandId),T=E?b.localize(0,null,k.label,E.getAriaLabel()):k.label;I===0&&this.commandsHistory.peek(k.commandId)&&(y.push({type:"separator",label:b.localize(1,null)}),L=!0),I!==0&&L&&!this.commandsHistory.peek(k.commandId)&&(y.push({type:"separator",label:b.localize(2,null)}),L=!1),y.push(Object.assign(Object.assign({},k),{ariaLabel:T,detail:this.options.showAlias&&k.commandAlias!==k.label?k.commandAlias:void 0,keybinding:E,accept:()=>Ie(this,void 0,void 0,function*(){this.commandsHistory.push(k.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:k.commandId,from:"quick open"});try{yield this.commandService.executeCommand(k.commandId)}catch(O){a.isPromiseCanceledError(O)||this.notificationService.error(b.localize(3,null,k.label,r.toErrorMessage(O)))}})}))}return y})}};i.PREFIX=">",i.WORD_FILTER=w.or(w.matchesPrefix,w.matchesWords,w.matchesContiguousSubString),i=Me([_e(1,p.IInstantiationService),_e(2,c.IKeybindingService),_e(3,o.ICommandService),_e(4,s.ITelemetryService),_e(5,u.INotificationService)],i),e.AbstractCommandsQuickAccessProvider=i;let n=class qe extends M.Disposable{constructor(l,h){super();this.storageService=l,this.configurationService=h,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=qe.getConfiguredCommandHistoryLength(this.configurationService),qe.cache&&qe.cache.limit!==this.configuredCommandsHistoryLength&&(qe.cache.limit=this.configuredCommandsHistoryLength,qe.saveState(this.storageService))}load(){const l=this.storageService.get(qe.PREF_KEY_CACHE,0);let h;if(l)try{h=JSON.parse(l)}catch(_){}const m=qe.cache=new C.LRUCache(this.configuredCommandsHistoryLength,1);if(h){let _;h.usesLRU?_=h.entries:_=h.entries.sort((f,v)=>f.value-v.value),_.forEach(f=>m.set(f.key,f.value))}qe.counter=this.storageService.getNumber(qe.PREF_KEY_COUNTER,0,qe.counter)}push(l){!qe.cache||(qe.cache.set(l,qe.counter++),qe.saveState(this.storageService))}peek(l){var h;return(h=qe.cache)===null||h===void 0?void 0:h.peek(l)}static saveState(l){if(!!qe.cache){const h={usesLRU:!0,entries:[]};qe.cache.forEach((m,_)=>h.entries.push({key:_,value:m})),l.store(qe.PREF_KEY_CACHE,JSON.stringify(h),0,0),l.store(qe.PREF_KEY_COUNTER,qe.counter,0,0)}}static getConfiguredCommandHistoryLength(l){var h,m;const f=(m=(h=l.getValue().workbench)===null||h===void 0?void 0:h.commandPalette)===null||m===void 0?void 0:m.history;return typeof f=="number"?f:qe.DEFAULT_COMMANDS_HISTORY_LENGTH}};n.DEFAULT_COMMANDS_HISTORY_LENGTH=50,n.PREF_KEY_CACHE="commandPalette.mru.cache",n.PREF_KEY_COUNTER="commandPalette.mru.counter",n.counter=1,n=Me([_e(0,d.IStorageService),_e(1,g.IConfigurationService)],n),e.CommandsHistory=n}),define(Q[578],J([0,1,577,102]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class M extends b.AbstractCommandsQuickAccessProvider{constructor(S,C,d,g,p,c){super(S,C,d,g,p,c)}getCodeEditorCommandPicks(){const S=this.activeTextEditorControl;if(!S)return[];const C=[];for(const d of S.getSupportedActions())C.push({commandId:d.id,commandAlias:d.alias,label:N.stripIcons(d.label)||d.id});return C}}e.AbstractEditorCommandsQuickAccessProvider=M}),define(Q[22],J([0,1,33,29,6,527,185,15]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchColorsSchemaId=e.resolveColorValue=e.oneOf=e.transparent=e.lighten=e.darken=e.problemsInfoIconForeground=e.problemsWarningIconForeground=e.problemsErrorIconForeground=e.minimapSliderActiveBackground=e.minimapSliderHoverBackground=e.minimapSliderBackground=e.minimapBackground=e.minimapWarning=e.minimapError=e.minimapSelection=e.minimapFindMatch=e.overviewRulerSelectionHighlightForeground=e.overviewRulerFindMatchForeground=e.snippetFinalTabstopHighlightBorder=e.snippetFinalTabstopHighlightBackground=e.snippetTabstopHighlightBorder=e.snippetTabstopHighlightBackground=e.menuSeparatorBackground=e.menuSelectionBorder=e.menuSelectionBackground=e.menuSelectionForeground=e.menuBackground=e.menuForeground=e.menuBorder=e.tableColumnsBorder=e.treeIndentGuidesStroke=e.listFilterWidgetNoMatchesOutline=e.listFilterWidgetOutline=e.listFilterWidgetBackground=e.listHighlightForeground=e.listDropBackground=e.listHoverForeground=e.listHoverBackground=e.listInactiveFocusOutline=e.listInactiveFocusBackground=e.listInactiveSelectionForeground=e.listInactiveSelectionBackground=e.listActiveSelectionForeground=e.listActiveSelectionBackground=e.listFocusOutline=e.listFocusForeground=e.listFocusBackground=e.diffDiagonalFill=e.diffBorder=e.diffRemovedOutline=e.diffInsertedOutline=e.diffRemoved=e.diffInserted=e.defaultRemoveColor=e.defaultInsertColor=e.editorLightBulbAutoFixForeground=e.editorLightBulbForeground=e.editorInlineHintBackground=e.editorInlineHintForeground=e.editorActiveLinkForeground=e.editorHoverStatusBarBackground=e.editorHoverBorder=e.editorHoverForeground=e.editorHoverBackground=e.editorHoverHighlight=e.editorFindRangeHighlightBorder=e.editorFindMatchHighlightBorder=e.editorFindMatchBorder=e.editorFindRangeHighlight=e.editorFindMatchHighlight=e.editorFindMatch=e.editorSelectionHighlightBorder=e.editorSelectionHighlight=e.editorInactiveSelection=e.editorSelectionForeground=e.editorSelectionBackground=e.pickerGroupBorder=e.pickerGroupForeground=e.quickInputListFocusBackground=e.quickInputTitleBackground=e.quickInputForeground=e.quickInputBackground=e.editorWidgetResizeBorder=e.editorWidgetBorder=e.editorWidgetForeground=e.editorWidgetBackground=e.editorForeground=e.editorBackground=e.editorHintBorder=e.editorHintForeground=e.editorInfoBorder=e.editorInfoForeground=e.editorInfoBackground=e.editorWarningBorder=e.editorWarningForeground=e.editorWarningBackground=e.editorErrorBorder=e.editorErrorForeground=e.editorErrorBackground=e.progressBarBackground=e.scrollbarSliderActiveBackground=e.scrollbarSliderHoverBackground=e.scrollbarSliderBackground=e.scrollbarShadow=e.badgeForeground=e.badgeBackground=e.buttonHoverBackground=e.buttonBackground=e.buttonForeground=e.selectForeground=e.selectBackground=e.inputValidationErrorBorder=e.inputValidationErrorForeground=e.inputValidationErrorBackground=e.inputValidationWarningBorder=e.inputValidationWarningForeground=e.inputValidationWarningBackground=e.inputValidationInfoBorder=e.inputValidationInfoForeground=e.inputValidationInfoBackground=e.inputActiveOptionForeground=e.inputActiveOptionBackground=e.inputActiveOptionBorder=e.inputBorder=e.inputForeground=e.inputBackground=e.widgetShadow=e.textCodeBlockBackground=e.textLinkForeground=e.activeContrastBorder=e.contrastBorder=e.focusBorder=e.iconForeground=e.errorForeground=e.foreground=e.registerColor=e.Extensions=void 0,e.Extensions={ColorContribution:"base.contributions.colors"};class d{constructor(){this._onDidChangeSchema=new M.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(l,h,m,_=!1,f){let v={id:l,description:m,defaults:h,needsTransparency:_,deprecationMessage:f};this.colorsById[l]=v;let y={type:"string",description:m,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return f&&(y.deprecationMessage=f),this.colorSchema.properties[l]=y,this.colorReferenceSchema.enum.push(l),this.colorReferenceSchema.enumDescriptions.push(m),this._onDidChangeSchema.fire(),l}resolveDefaultColor(l,h){const m=this.colorsById[l];if(m&&m.defaults){const _=m.defaults[h.type];return r(_,h)}}getColorSchema(){return this.colorSchema}toString(){let l=(h,m)=>{let _=h.indexOf(".")===-1?0:1,f=m.indexOf(".")===-1?0:1;return _!==f?_-f:h.localeCompare(m)};return Object.keys(this.colorsById).sort(l).map(h=>`- \`${h}\`: ${this.colorsById[h].description}`).join(`
`)}}const g=new d;b.Registry.add(e.Extensions.ColorContribution,g);function p(t,l,h,m,_){return g.registerColor(t,l,h,m,_)}e.registerColor=p,e.foreground=p("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},w.localize(0,null)),e.errorForeground=p("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},w.localize(1,null)),e.iconForeground=p("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},w.localize(2,null)),e.focusBorder=p("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},w.localize(3,null)),e.contrastBorder=p("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},w.localize(4,null)),e.activeContrastBorder=p("contrastActiveBorder",{light:null,dark:null,hc:e.focusBorder},w.localize(5,null)),e.textLinkForeground=p("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},w.localize(6,null)),e.textCodeBlockBackground=p("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:N.Color.black},w.localize(7,null)),e.widgetShadow=p("widget.shadow",{dark:s(N.Color.black,.36),light:s(N.Color.black,.16),hc:null},w.localize(8,null)),e.inputBackground=p("input.background",{dark:"#3C3C3C",light:N.Color.white,hc:N.Color.black},w.localize(9,null)),e.inputForeground=p("input.foreground",{dark:e.foreground,light:e.foreground,hc:e.foreground},w.localize(10,null)),e.inputBorder=p("input.border",{dark:null,light:null,hc:e.contrastBorder},w.localize(11,null)),e.inputActiveOptionBorder=p("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:e.contrastBorder},w.localize(12,null)),e.inputActiveOptionBackground=p("inputOption.activeBackground",{dark:s(e.focusBorder,.4),light:s(e.focusBorder,.2),hc:N.Color.transparent},w.localize(13,null)),e.inputActiveOptionForeground=p("inputOption.activeForeground",{dark:N.Color.white,light:N.Color.black,hc:null},w.localize(14,null)),e.inputValidationInfoBackground=p("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:N.Color.black},w.localize(15,null)),e.inputValidationInfoForeground=p("inputValidation.infoForeground",{dark:null,light:null,hc:null},w.localize(16,null)),e.inputValidationInfoBorder=p("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:e.contrastBorder},w.localize(17,null)),e.inputValidationWarningBackground=p("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:N.Color.black},w.localize(18,null)),e.inputValidationWarningForeground=p("inputValidation.warningForeground",{dark:null,light:null,hc:null},w.localize(19,null)),e.inputValidationWarningBorder=p("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:e.contrastBorder},w.localize(20,null)),e.inputValidationErrorBackground=p("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:N.Color.black},w.localize(21,null)),e.inputValidationErrorForeground=p("inputValidation.errorForeground",{dark:null,light:null,hc:null},w.localize(22,null)),e.inputValidationErrorBorder=p("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:e.contrastBorder},w.localize(23,null)),e.selectBackground=p("dropdown.background",{dark:"#3C3C3C",light:N.Color.white,hc:N.Color.black},w.localize(24,null)),e.selectForeground=p("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:N.Color.white},w.localize(25,null)),e.buttonForeground=p("button.foreground",{dark:N.Color.white,light:N.Color.white,hc:N.Color.white},w.localize(26,null)),e.buttonBackground=p("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},w.localize(27,null)),e.buttonHoverBackground=p("button.hoverBackground",{dark:o(e.buttonBackground,.2),light:c(e.buttonBackground,.2),hc:null},w.localize(28,null)),e.badgeBackground=p("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:N.Color.black},w.localize(29,null)),e.badgeForeground=p("badge.foreground",{dark:N.Color.white,light:"#333",hc:N.Color.white},w.localize(30,null)),e.scrollbarShadow=p("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},w.localize(31,null)),e.scrollbarSliderBackground=p("scrollbarSlider.background",{dark:N.Color.fromHex("#797979").transparent(.4),light:N.Color.fromHex("#646464").transparent(.4),hc:s(e.contrastBorder,.6)},w.localize(32,null)),e.scrollbarSliderHoverBackground=p("scrollbarSlider.hoverBackground",{dark:N.Color.fromHex("#646464").transparent(.7),light:N.Color.fromHex("#646464").transparent(.7),hc:s(e.contrastBorder,.8)},w.localize(33,null)),e.scrollbarSliderActiveBackground=p("scrollbarSlider.activeBackground",{dark:N.Color.fromHex("#BFBFBF").transparent(.4),light:N.Color.fromHex("#000000").transparent(.6),hc:e.contrastBorder},w.localize(34,null)),e.progressBarBackground=p("progressBar.background",{dark:N.Color.fromHex("#0E70C0"),light:N.Color.fromHex("#0E70C0"),hc:e.contrastBorder},w.localize(35,null)),e.editorErrorBackground=p("editorError.background",{dark:null,light:null,hc:null},w.localize(36,null),!0),e.editorErrorForeground=p("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},w.localize(37,null)),e.editorErrorBorder=p("editorError.border",{dark:null,light:null,hc:N.Color.fromHex("#E47777").transparent(.8)},w.localize(38,null)),e.editorWarningBackground=p("editorWarning.background",{dark:null,light:null,hc:null},w.localize(39,null),!0),e.editorWarningForeground=p("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},w.localize(40,null)),e.editorWarningBorder=p("editorWarning.border",{dark:null,light:null,hc:N.Color.fromHex("#FFCC00").transparent(.8)},w.localize(41,null)),e.editorInfoBackground=p("editorInfo.background",{dark:null,light:null,hc:null},w.localize(42,null),!0),e.editorInfoForeground=p("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},w.localize(43,null)),e.editorInfoBorder=p("editorInfo.border",{dark:null,light:null,hc:N.Color.fromHex("#75BEFF").transparent(.8)},w.localize(44,null)),e.editorHintForeground=p("editorHint.foreground",{dark:N.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},w.localize(45,null)),e.editorHintBorder=p("editorHint.border",{dark:null,light:null,hc:N.Color.fromHex("#eeeeee").transparent(.8)},w.localize(46,null)),e.editorBackground=p("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:N.Color.black},w.localize(47,null)),e.editorForeground=p("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:N.Color.white},w.localize(48,null)),e.editorWidgetBackground=p("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},w.localize(49,null)),e.editorWidgetForeground=p("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hc:e.foreground},w.localize(50,null)),e.editorWidgetBorder=p("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:e.contrastBorder},w.localize(51,null)),e.editorWidgetResizeBorder=p("editorWidget.resizeBorder",{light:null,dark:null,hc:null},w.localize(52,null)),e.quickInputBackground=p("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hc:e.editorWidgetBackground},w.localize(53,null)),e.quickInputForeground=p("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hc:e.editorWidgetForeground},w.localize(54,null)),e.quickInputTitleBackground=p("quickInputTitle.background",{dark:new N.Color(new N.RGBA(255,255,255,.105)),light:new N.Color(new N.RGBA(0,0,0,.06)),hc:"#000000"},w.localize(55,null)),e.quickInputListFocusBackground=p("quickInput.list.focusBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},w.localize(56,null)),e.pickerGroupForeground=p("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:N.Color.white},w.localize(57,null)),e.pickerGroupBorder=p("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:N.Color.white},w.localize(58,null)),e.editorSelectionBackground=p("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},w.localize(59,null)),e.editorSelectionForeground=p("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},w.localize(60,null)),e.editorInactiveSelection=p("editor.inactiveSelectionBackground",{light:s(e.editorSelectionBackground,.5),dark:s(e.editorSelectionBackground,.5),hc:s(e.editorSelectionBackground,.5)},w.localize(61,null),!0),e.editorSelectionHighlight=p("editor.selectionHighlightBackground",{light:u(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:u(e.editorSelectionBackground,e.editorBackground,.3,.6),hc:null},w.localize(62,null),!0),e.editorSelectionHighlightBorder=p("editor.selectionHighlightBorder",{light:null,dark:null,hc:e.activeContrastBorder},w.localize(63,null)),e.editorFindMatch=p("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},w.localize(64,null)),e.editorFindMatchHighlight=p("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},w.localize(65,null),!0),e.editorFindRangeHighlight=p("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},w.localize(66,null),!0),e.editorFindMatchBorder=p("editor.findMatchBorder",{light:null,dark:null,hc:e.activeContrastBorder},w.localize(67,null)),e.editorFindMatchHighlightBorder=p("editor.findMatchHighlightBorder",{light:null,dark:null,hc:e.activeContrastBorder},w.localize(68,null)),e.editorFindRangeHighlightBorder=p("editor.findRangeHighlightBorder",{dark:null,light:null,hc:s(e.activeContrastBorder,.4)},w.localize(69,null),!0),e.editorHoverHighlight=p("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},w.localize(70,null),!0),e.editorHoverBackground=p("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hc:e.editorWidgetBackground},w.localize(71,null)),e.editorHoverForeground=p("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hc:e.editorWidgetForeground},w.localize(72,null)),e.editorHoverBorder=p("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hc:e.editorWidgetBorder},w.localize(73,null)),e.editorHoverStatusBarBackground=p("editorHoverWidget.statusBarBackground",{dark:o(e.editorHoverBackground,.2),light:c(e.editorHoverBackground,.05),hc:e.editorWidgetBackground},w.localize(74,null)),e.editorActiveLinkForeground=p("editorLink.activeForeground",{dark:"#4E94CE",light:N.Color.blue,hc:N.Color.cyan},w.localize(75,null)),e.editorInlineHintForeground=p("editorInlineHint.foreground",{dark:e.editorWidgetBackground,light:e.editorWidgetForeground,hc:e.editorWidgetBackground},w.localize(76,null)),e.editorInlineHintBackground=p("editorInlineHint.background",{dark:e.editorWidgetForeground,light:e.editorWidgetBackground,hc:e.editorWidgetForeground},w.localize(77,null)),e.editorLightBulbForeground=p("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},w.localize(78,null)),e.editorLightBulbAutoFixForeground=p("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},w.localize(79,null)),e.defaultInsertColor=new N.Color(new N.RGBA(155,185,85,.2)),e.defaultRemoveColor=new N.Color(new N.RGBA(255,0,0,.2)),e.diffInserted=p("diffEditor.insertedTextBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hc:null},w.localize(80,null),!0),e.diffRemoved=p("diffEditor.removedTextBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hc:null},w.localize(81,null),!0),e.diffInsertedOutline=p("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},w.localize(82,null)),e.diffRemovedOutline=p("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},w.localize(83,null)),e.diffBorder=p("diffEditor.border",{dark:null,light:null,hc:e.contrastBorder},w.localize(84,null)),e.diffDiagonalFill=p("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},w.localize(85,null)),e.listFocusBackground=p("list.focusBackground",{dark:null,light:null,hc:null},w.localize(86,null)),e.listFocusForeground=p("list.focusForeground",{dark:null,light:null,hc:null},w.localize(87,null)),e.listFocusOutline=p("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hc:e.activeContrastBorder},w.localize(88,null)),e.listActiveSelectionBackground=p("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},w.localize(89,null)),e.listActiveSelectionForeground=p("list.activeSelectionForeground",{dark:N.Color.white,light:N.Color.white,hc:null},w.localize(90,null)),e.listInactiveSelectionBackground=p("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},w.localize(91,null)),e.listInactiveSelectionForeground=p("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},w.localize(92,null)),e.listInactiveFocusBackground=p("list.inactiveFocusBackground",{dark:null,light:null,hc:null},w.localize(93,null)),e.listInactiveFocusOutline=p("list.inactiveFocusOutline",{dark:null,light:null,hc:null},w.localize(94,null)),e.listHoverBackground=p("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},w.localize(95,null)),e.listHoverForeground=p("list.hoverForeground",{dark:null,light:null,hc:null},w.localize(96,null)),e.listDropBackground=p("list.dropBackground",{dark:e.listFocusBackground,light:e.listFocusBackground,hc:null},w.localize(97,null)),e.listHighlightForeground=p("list.highlightForeground",{dark:"#0097fb",light:"#0066BF",hc:e.focusBorder},w.localize(98,null)),e.listFilterWidgetBackground=p("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:N.Color.black},w.localize(99,null)),e.listFilterWidgetOutline=p("listFilterWidget.outline",{dark:N.Color.transparent,light:N.Color.transparent,hc:"#f38518"},w.localize(100,null)),e.listFilterWidgetNoMatchesOutline=p("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:e.contrastBorder},w.localize(101,null)),e.treeIndentGuidesStroke=p("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},w.localize(102,null)),e.tableColumnsBorder=p("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},w.localize(103,null)),e.menuBorder=p("menu.border",{dark:null,light:null,hc:e.contrastBorder},w.localize(104,null)),e.menuForeground=p("menu.foreground",{dark:e.selectForeground,light:e.foreground,hc:e.selectForeground},w.localize(105,null)),e.menuBackground=p("menu.background",{dark:e.selectBackground,light:e.selectBackground,hc:e.selectBackground},w.localize(106,null)),e.menuSelectionForeground=p("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hc:e.listActiveSelectionForeground},w.localize(107,null)),e.menuSelectionBackground=p("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hc:e.listActiveSelectionBackground},w.localize(108,null)),e.menuSelectionBorder=p("menu.selectionBorder",{dark:null,light:null,hc:e.activeContrastBorder},w.localize(109,null)),e.menuSeparatorBackground=p("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:e.contrastBorder},w.localize(110,null)),e.snippetTabstopHighlightBackground=p("editor.snippetTabstopHighlightBackground",{dark:new N.Color(new N.RGBA(124,124,124,.3)),light:new N.Color(new N.RGBA(10,50,100,.2)),hc:new N.Color(new N.RGBA(124,124,124,.3))},w.localize(111,null)),e.snippetTabstopHighlightBorder=p("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},w.localize(112,null)),e.snippetFinalTabstopHighlightBackground=p("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},w.localize(113,null)),e.snippetFinalTabstopHighlightBorder=p("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new N.Color(new N.RGBA(10,50,100,.5)),hc:"#525252"},w.localize(114,null)),e.overviewRulerFindMatchForeground=p("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},w.localize(115,null),!0),e.overviewRulerSelectionHighlightForeground=p("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},w.localize(116,null),!0),e.minimapFindMatch=p("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},w.localize(117,null),!0),e.minimapSelection=p("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},w.localize(118,null),!0),e.minimapError=p("minimap.errorHighlight",{dark:new N.Color(new N.RGBA(255,18,18,.7)),light:new N.Color(new N.RGBA(255,18,18,.7)),hc:new N.Color(new N.RGBA(255,50,50,1))},w.localize(119,null)),e.minimapWarning=p("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hc:e.editorWarningBorder},w.localize(120,null)),e.minimapBackground=p("minimap.background",{dark:null,light:null,hc:null},w.localize(121,null)),e.minimapSliderBackground=p("minimapSlider.background",{light:s(e.scrollbarSliderBackground,.5),dark:s(e.scrollbarSliderBackground,.5),hc:s(e.scrollbarSliderBackground,.5)},w.localize(122,null)),e.minimapSliderHoverBackground=p("minimapSlider.hoverBackground",{light:s(e.scrollbarSliderHoverBackground,.5),dark:s(e.scrollbarSliderHoverBackground,.5),hc:s(e.scrollbarSliderHoverBackground,.5)},w.localize(123,null)),e.minimapSliderActiveBackground=p("minimapSlider.activeBackground",{light:s(e.scrollbarSliderActiveBackground,.5),dark:s(e.scrollbarSliderActiveBackground,.5),hc:s(e.scrollbarSliderActiveBackground,.5)},w.localize(124,null)),e.problemsErrorIconForeground=p("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hc:e.editorErrorForeground},w.localize(125,null)),e.problemsWarningIconForeground=p("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hc:e.editorWarningForeground},w.localize(126,null)),e.problemsInfoIconForeground=p("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hc:e.editorInfoForeground},w.localize(127,null));function c(t,l){return h=>{let m=r(t,h);if(m)return m.darken(l)}}e.darken=c;function o(t,l){return h=>{let m=r(t,h);if(m)return m.lighten(l)}}e.lighten=o;function s(t,l){return h=>{let m=r(t,h);if(m)return m.transparent(l)}}e.transparent=s;function a(...t){return l=>{for(let h of t){let m=r(h,l);if(m)return m}}}e.oneOf=a;function u(t,l,h,m){return _=>{let f=r(t,_);if(f){let v=r(l,_);return v?f.isDarkerThan(v)?N.Color.getLighterColor(f,v,h).transparent(m):N.Color.getDarkerColor(f,v,h).transparent(m):f.transparent(h*m)}}}function r(t,l){if(t!==null){if(typeof t=="string")return t[0]==="#"?N.Color.fromHex(t):l.getColor(t);if(t instanceof N.Color)return t;if(typeof t=="function")return t(l)}}e.resolveColorValue=r,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";let i=b.Registry.as(S.Extensions.JSONContribution);i.registerSchema(e.workbenchColorsSchemaId,g.getColorSchema());const n=new C.RunOnceScheduler(()=>i.notifySchemaChanged(e.workbenchColorsSchemaId),200);g.onDidChangeSchema(()=>{n.isScheduled()||n.schedule()})}),define(Q[116],J([0,1,22]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attachMenuStyler=e.defaultMenuStyles=e.defaultListStyles=e.attachListStyler=e.attachBadgeStyler=e.attachStyler=e.computeStyles=void 0;function N(d,g){const p=Object.create(null);for(let c in g){const o=g[c];o&&(p[c]=b.resolveColorValue(o,d))}return p}e.computeStyles=N;function M(d,g,p){function c(o){const s=N(d.getColorTheme(),g);typeof p=="function"?p(s):p.style(s)}return c(d.getColorTheme()),d.onDidColorThemeChange(c)}e.attachStyler=M;function w(d,g,p){return M(g,{badgeBackground:p&&p.badgeBackground||b.badgeBackground,badgeForeground:p&&p.badgeForeground||b.badgeForeground,badgeBorder:b.contrastBorder},d)}e.attachBadgeStyler=w;function S(d,g,p){return M(g,Object.assign(Object.assign({},e.defaultListStyles),p||{}),d)}e.attachListStyler=S,e.defaultListStyles={listFocusBackground:b.listFocusBackground,listFocusForeground:b.listFocusForeground,listFocusOutline:b.listFocusOutline,listActiveSelectionBackground:b.listActiveSelectionBackground,listActiveSelectionForeground:b.listActiveSelectionForeground,listFocusAndSelectionBackground:b.listActiveSelectionBackground,listFocusAndSelectionForeground:b.listActiveSelectionForeground,listInactiveSelectionBackground:b.listInactiveSelectionBackground,listInactiveSelectionForeground:b.listInactiveSelectionForeground,listInactiveFocusBackground:b.listInactiveFocusBackground,listInactiveFocusOutline:b.listInactiveFocusOutline,listHoverBackground:b.listHoverBackground,listHoverForeground:b.listHoverForeground,listDropBackground:b.listDropBackground,listSelectionOutline:b.activeContrastBorder,listHoverOutline:b.activeContrastBorder,listFilterWidgetBackground:b.listFilterWidgetBackground,listFilterWidgetOutline:b.listFilterWidgetOutline,listFilterWidgetNoMatchesOutline:b.listFilterWidgetNoMatchesOutline,listMatchesShadow:b.widgetShadow,treeIndentGuidesStroke:b.treeIndentGuidesStroke,tableColumnsBorder:b.tableColumnsBorder},e.defaultMenuStyles={shadowColor:b.widgetShadow,borderColor:b.menuBorder,foregroundColor:b.menuForeground,backgroundColor:b.menuBackground,selectionForegroundColor:b.menuSelectionForeground,selectionBackgroundColor:b.menuSelectionBackground,selectionBorderColor:b.menuSelectionBorder,separatorColor:b.menuSeparatorBackground};function C(d,g,p){return M(g,Object.assign(Object.assign({},e.defaultMenuStyles),p),d)}e.attachMenuStyler=C}),define(Q[579],J([0,1,48,2,434,7,116,55,50,360]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class g{constructor(c,o,s,a,u){this.contextViewService=c,this.telemetryService=o,this.notificationService=s,this.keybindingService=a,this.themeService=u,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(c){this.options=c}showContextMenu(c){const o=c.getActions();if(!!o.length){this.focusToReturn=document.activeElement;let s,a=w.isHTMLElement(c.domForShadowRoot)?c.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>c.getAnchor(),canRelayout:!1,anchorAlignment:c.anchorAlignment,anchorAxisAlignment:c.anchorAxisAlignment,render:u=>{let r=c.getMenuClassName?c.getMenuClassName():"";r&&(u.className+=" "+r),this.options.blockMouse&&(this.block=u.appendChild(w.$(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",C.domEvent(this.block,w.EventType.MOUSE_DOWN)(t=>t.stopPropagation()));const i=new N.DisposableStore,n=c.actionRunner||new b.ActionRunner;return n.onBeforeRun(this.onActionRun,this,i),n.onDidRun(this.onDidActionRun,this,i),s=new M.Menu(u,o,{actionViewItemProvider:c.getActionViewItem,context:c.getActionsContext?c.getActionsContext():null,actionRunner:n,getKeyBinding:c.getKeyBinding?c.getKeyBinding:t=>this.keybindingService.lookupKeybinding(t.id)}),i.add(S.attachMenuStyler(s,this.themeService)),s.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,i),s.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,i),C.domEvent(window,w.EventType.BLUR)(()=>{this.contextViewService.hideContextView(!0)},null,i),C.domEvent(window,w.EventType.MOUSE_DOWN)(t=>{if(!t.defaultPrevented){let l=new d.StandardMouseEvent(t),h=l.target;if(!l.rightButton){for(;h;){if(h===u)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}}},null,i),N.combinedDisposable(i,s)},focus:()=>{s&&s.focus(!!c.autoSelectFirstItem)},onHide:u=>{c.onHide&&c.onHide(!!u),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},a,!!a)}}onActionRun(c){this.telemetryService&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:c.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(c){c.error&&this.notificationService.error(c.error)}}e.ContextMenuHandler=g}),define(Q[97],J([0,1]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorScheme=void 0;var b;(function(N){N.DARK="dark",N.LIGHT="light",N.HIGH_CONTRAST="hc"})(b=e.ColorScheme||(e.ColorScheme={}))}),define(Q[255],J([0,1,35,30,17,384,110,171,129,97,38]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLine=e.ViewLineOptions=e.DomReadingContext=void 0;const c=function(){return M.isNative?!0:!(M.isLinux||b.isFirefox||b.isSafari)}();let o=!0;class s{constructor(_,f){this._domNode=_,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=f}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}e.DomReadingContext=s;class a{constructor(_,f){this.themeType=f;const v=_.options,y=v.get(38);this.renderWhitespace=v.get(83),this.renderControlCharacters=v.get(77),this.spaceWidth=y.spaceWidth,this.middotWidth=y.middotWidth,this.wsmiddotWidth=y.wsmiddotWidth,this.useMonospaceOptimizations=y.isMonospace&&!v.get(26),this.canUseHalfwidthRightwardsArrow=y.canUseHalfwidthRightwardsArrow,this.lineHeight=v.get(53),this.stopRenderingLineAfter=v.get(100),this.fontLigatures=v.get(39)}equals(_){return this.themeType===_.themeType&&this.renderWhitespace===_.renderWhitespace&&this.renderControlCharacters===_.renderControlCharacters&&this.spaceWidth===_.spaceWidth&&this.middotWidth===_.middotWidth&&this.wsmiddotWidth===_.wsmiddotWidth&&this.useMonospaceOptimizations===_.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===_.canUseHalfwidthRightwardsArrow&&this.lineHeight===_.lineHeight&&this.stopRenderingLineAfter===_.stopRenderingLineAfter&&this.fontLigatures===_.fontLigatures}}e.ViewLineOptions=a;class u{constructor(_){this._options=_,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(_){if(this._renderedViewLine)this._renderedViewLine.domNode=N.createFastDomNode(_);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(_){this._isMaybeInvalid=!0,this._options=_}onSelectionChanged(){return this._options.themeType===g.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(_,f,v,y){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const L=v.getViewLineRenderingData(_),I=this._options,k=C.LineDecoration.filter(L.inlineDecorations,_,L.minColumn,L.maxColumn);let E=null;if(I.themeType===g.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const B=v.selections;for(const F of B)if(!(F.endLineNumber<_||F.startLineNumber>_)){const D=F.startLineNumber===_?F.startColumn:L.minColumn,R=F.endLineNumber===_?F.endColumn:L.maxColumn;D<R&&(I.themeType===g.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace!=="selection"?k.push(new C.LineDecoration(D,R,"inline-selected-text",0)):(E||(E=[]),E.push(new d.LineRange(D-1,R-1))))}}const T=new d.RenderLineInput(I.useMonospaceOptimizations,I.canUseHalfwidthRightwardsArrow,L.content,L.continuesWithWrappedLine,L.isBasicASCII,L.containsRTL,L.minColumn-1,L.tokens,k,L.tabSize,L.startVisibleColumn,I.spaceWidth,I.middotWidth,I.wsmiddotWidth,I.stopRenderingLineAfter,I.renderWhitespace,I.renderControlCharacters,I.fontLigatures!==p.EditorFontLigatures.OFF,E);if(this._renderedViewLine&&this._renderedViewLine.input.equals(T))return!1;y.appendASCIIString('<div style="top:'),y.appendASCIIString(String(f)),y.appendASCIIString("px;height:"),y.appendASCIIString(String(this._options.lineHeight)),y.appendASCIIString('px;" class="'),y.appendASCIIString(u.CLASS_NAME),y.appendASCIIString('">');const O=d.renderViewLine(T,y);y.appendASCIIString("</div>");let A=null;return o&&c&&L.isBasicASCII&&I.useMonospaceOptimizations&&O.containsForeignElements===0&&L.content.length<300&&T.lineTokens.getCount()<100&&(A=new r(this._renderedViewLine?this._renderedViewLine.domNode:null,T,O.characterMapping)),A||(A=t(this._renderedViewLine?this._renderedViewLine.domNode:null,T,O.characterMapping,O.containsRTL,O.containsForeignElements)),this._renderedViewLine=A,!0}layoutLine(_,f){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(f),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof r:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof r?this._renderedViewLine.monospaceAssumptionsAreValid():o}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof r&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(_,f,v){if(!this._renderedViewLine)return null;_=_|0,f=f|0,_=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,_)),f=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,f));const y=this._renderedViewLine.input.stopRenderingLineAfter|0;let L=!1;y!==-1&&_>y+1&&f>y+1&&(L=!0),y!==-1&&_>y+1&&(_=y+1),y!==-1&&f>y+1&&(f=y+1);const I=this._renderedViewLine.getVisibleRangesForRange(_,f,v);return I&&I.length>0?new S.VisibleRanges(L,I):null}getColumnOfNodeOffset(_,f,v){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(_,f,v):1}}e.ViewLine=u,u.CLASS_NAME="view-line";class r{constructor(_,f,v){this.domNode=_,this.input=f,this._characterMapping=v,this._charWidth=f.spaceWidth}getWidth(){return this._getCharPosition(this._characterMapping.length)}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return o;const _=this.getWidth(),f=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(_-f)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),o=!1),o}toSlowRenderedLine(){return t(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(_,f,v){const y=this._getCharPosition(_),L=this._getCharPosition(f);return[new S.HorizontalRange(y,L-y)]}_getCharPosition(_){const f=this._characterMapping.getAbsoluteOffsets();return f.length===0?0:Math.round(this._charWidth*f[_-1])}getColumnOfNodeOffset(_,f,v){const y=f.textContent.length;let L=-1;for(;f;)f=f.previousSibling,L++;return this._characterMapping.partDataToCharOffset(L,y,v)+1}}class i{constructor(_,f,v,y,L){if(this.domNode=_,this.input=f,this._characterMapping=v,this._isWhitespaceOnly=/^\s*$/.test(f.lineContent),this._containsForeignElements=L,this._cachedWidth=-1,this._pixelOffsetCache=null,!y||this._characterMapping.length===0){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(let I=0,k=this._characterMapping.length;I<=k;I++)this._pixelOffsetCache[I]=-1}}_getReadingTarget(_){return _.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(_,f,v){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const y=this._readPixelOffset(this.domNode,_,v);if(y===-1)return null;const L=this._readPixelOffset(this.domNode,f,v);return L===-1?null:[new S.HorizontalRange(y,L-y)]}return this._readVisibleRangesForRange(this.domNode,_,f,v)}_readVisibleRangesForRange(_,f,v,y){if(f===v){const L=this._readPixelOffset(_,f,y);return L===-1?null:[new S.HorizontalRange(L,0)]}else return this._readRawVisibleRangesForRange(_,f,v,y)}_readPixelOffset(_,f,v){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const y=this._getReadingTarget(_);return y.firstChild?y.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const y=this._pixelOffsetCache[f];if(y!==-1)return y;const L=this._actualReadPixelOffset(_,f,v);return this._pixelOffsetCache[f]=L,L}return this._actualReadPixelOffset(_,f,v)}_actualReadPixelOffset(_,f,v){if(this._characterMapping.length===0){const T=w.RangeUtil.readHorizontalRanges(this._getReadingTarget(_),0,0,0,0,v.clientRectDeltaLeft,v.endNode);return!T||T.length===0?-1:T[0].left}if(f===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const y=this._characterMapping.charOffsetToPartData(f-1),L=d.CharacterMapping.getPartIndex(y),I=d.CharacterMapping.getCharIndex(y),k=w.RangeUtil.readHorizontalRanges(this._getReadingTarget(_),L,I,L,I,v.clientRectDeltaLeft,v.endNode);if(!k||k.length===0)return-1;const E=k[0].left;if(this.input.isBasicASCII){const T=this._characterMapping.getAbsoluteOffsets(),O=Math.round(this.input.spaceWidth*T[f-1]);if(Math.abs(O-E)<=1)return O}return E}_readRawVisibleRangesForRange(_,f,v,y){if(f===1&&v===this._characterMapping.length)return[new S.HorizontalRange(0,this.getWidth())];const L=this._characterMapping.charOffsetToPartData(f-1),I=d.CharacterMapping.getPartIndex(L),k=d.CharacterMapping.getCharIndex(L),E=this._characterMapping.charOffsetToPartData(v-1),T=d.CharacterMapping.getPartIndex(E),O=d.CharacterMapping.getCharIndex(E);return w.RangeUtil.readHorizontalRanges(this._getReadingTarget(_),I,k,T,O,y.clientRectDeltaLeft,y.endNode)}getColumnOfNodeOffset(_,f,v){const y=f.textContent.length;let L=-1;for(;f;)f=f.previousSibling,L++;return this._characterMapping.partDataToCharOffset(L,y,v)+1}}class n extends i{_readVisibleRangesForRange(_,f,v,y){const L=super._readVisibleRangesForRange(_,f,v,y);if(!L||L.length===0||f===v||f===1&&v===this._characterMapping.length)return L;if(!this.input.containsRTL){const I=this._readPixelOffset(_,v,y);if(I!==-1){const k=L[L.length-1];k.left<I&&(k.width=I-k.left)}}return L}}const t=function(){return b.isWebKit?l:h}();function l(m,_,f,v,y){return new n(m,_,f,v,y)}function h(m,_,f,v,y){return new i(m,_,f,v,y)}}),define(Q[187],J([0,1,162,45,255,14,3,42,7,240]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shadowCaretRangeFromPoint=e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;class p{constructor(m,_){this.lastViewCursorsRenderData=m,this.lastTextareaPosition=_}}e.PointerHandlerLastRenderData=p;class c{constructor(m,_,f=0,v=null,y=null,L=null){this.element=m,this.type=_,this.mouseColumn=f,this.position=v,!y&&v&&(y=new S.Range(v.lineNumber,v.column,v.lineNumber,v.column)),this.range=y,this.detail=L}static _typeToString(m){return m===1?"TEXTAREA":m===2?"GUTTER_GLYPH_MARGIN":m===3?"GUTTER_LINE_NUMBERS":m===4?"GUTTER_LINE_DECORATIONS":m===5?"GUTTER_VIEW_ZONE":m===6?"CONTENT_TEXT":m===7?"CONTENT_EMPTY":m===8?"CONTENT_VIEW_ZONE":m===9?"CONTENT_WIDGET":m===10?"OVERVIEW_RULER":m===11?"SCROLLBAR":m===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(m){return this._typeToString(m.type)+": "+m.position+" - "+m.range+" - "+m.detail}toString(){return c.toString(this)}}e.MouseTarget=c;class o{static isTextArea(m){return m.length===2&&m[0]===3&&m[1]===6}static isChildOfViewLines(m){return m.length>=4&&m[0]===3&&m[3]===7}static isStrictChildOfViewLines(m){return m.length>4&&m[0]===3&&m[3]===7}static isChildOfScrollableElement(m){return m.length>=2&&m[0]===3&&m[1]===5}static isChildOfMinimap(m){return m.length>=2&&m[0]===3&&m[1]===8}static isChildOfContentWidgets(m){return m.length>=4&&m[0]===3&&m[3]===1}static isChildOfOverflowingContentWidgets(m){return m.length>=1&&m[0]===2}static isChildOfOverlayWidgets(m){return m.length>=2&&m[0]===3&&m[1]===4}}class s{constructor(m,_,f){this.model=m.model;const v=m.configuration.options;this.layoutInfo=v.get(124),this.viewDomNode=_.viewDomNode,this.lineHeight=v.get(53),this.stickyTabStops=v.get(99),this.typicalHalfwidthCharacterWidth=v.get(38).typicalHalfwidthCharacterWidth,this.lastRenderData=f,this._context=m,this._viewHelper=_}getZoneAtCoord(m){return s.getZoneAtCoord(this._context,m)}static getZoneAtCoord(m,_){const f=m.viewLayout.getWhitespaceAtVerticalOffset(_);if(f){const v=f.verticalOffset+f.height/2,y=m.model.getLineCount();let L=null,I,k=null;return f.afterLineNumber!==y&&(k=new w.Position(f.afterLineNumber+1,1)),f.afterLineNumber>0&&(L=new w.Position(f.afterLineNumber,m.model.getLineMaxColumn(f.afterLineNumber))),k===null?I=L:L===null?I=k:_<v?I=L:I=k,{viewZoneId:f.id,afterLineNumber:f.afterLineNumber,positionBefore:L,positionAfter:k,position:I}}return null}getFullLineRangeAtCoord(m){if(this._context.viewLayout.isAfterLines(m)){const v=this._context.model.getLineCount(),y=this._context.model.getLineMaxColumn(v);return{range:new S.Range(v,y,v,y),isAfterLines:!0}}const _=this._context.viewLayout.getLineNumberAtVerticalOffset(m),f=this._context.model.getLineMaxColumn(_);return{range:new S.Range(_,1,_,f),isAfterLines:!1}}getLineNumberAtVerticalOffset(m){return this._context.viewLayout.getLineNumberAtVerticalOffset(m)}isAfterLines(m){return this._context.viewLayout.isAfterLines(m)}isInTopPadding(m){return this._context.viewLayout.isInTopPadding(m)}isInBottomPadding(m){return this._context.viewLayout.isInBottomPadding(m)}getVerticalOffsetForLineNumber(m){return this._context.viewLayout.getVerticalOffsetForLineNumber(m)}findAttribute(m,_){return s._findAttribute(m,_,this._viewHelper.viewDomNode)}static _findAttribute(m,_,f){for(;m&&m!==document.body;){if(m.hasAttribute&&m.hasAttribute(_))return m.getAttribute(_);if(m===f)return null;m=m.parentNode}return null}getLineWidth(m){return this._viewHelper.getLineWidth(m)}visibleRangeForPosition(m,_){return this._viewHelper.visibleRangeForPosition(m,_)}getPositionFromDOMInfo(m,_){return this._viewHelper.getPositionFromDOMInfo(m,_)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=s;class a{constructor(m,_,f){this.editorPos=_,this.pos=f,this.mouseVerticalOffset=Math.max(0,m.getCurrentScrollTop()+f.y-_.y),this.mouseContentHorizontalOffset=m.getCurrentScrollLeft()+f.x-_.x-m.layoutInfo.contentLeft,this.isInMarginArea=f.x-_.x<m.layoutInfo.contentLeft&&f.x-_.x>=m.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,n._getMouseColumn(this.mouseContentHorizontalOffset,m.typicalHalfwidthCharacterWidth))}}class u extends a{constructor(m,_,f,v){super(m,_,f);this._ctx=m,v?(this.target=v,this.targetPath=N.PartFingerprints.collect(v,m.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
target: ${this.target?this.target.outerHTML:null}`}fulfill(m,_=null,f=null,v=null){let y=this.mouseColumn;return _&&_.column<this._ctx.model.getLineMaxColumn(_.lineNumber)&&(y=C.CursorColumns.visibleColumnFromColumn(this._ctx.model.getLineContent(_.lineNumber),_.column,this._ctx.model.getTextModelOptions().tabSize)+1),new c(this.target,m,y,_,f,v)}withTarget(m){return new u(this._ctx,this.editorPos,this.pos,m)}}const r={isAfterLines:!0};function i(h){return{isAfterLines:!1,horizontalDistanceToText:h}}class n{constructor(m,_){this._context=m,this._viewHelper=_}mouseTargetIsWidget(m){const _=m.target,f=N.PartFingerprints.collect(_,this._viewHelper.viewDomNode);return!!(o.isChildOfContentWidgets(f)||o.isChildOfOverflowingContentWidgets(f)||o.isChildOfOverlayWidgets(f))}createMouseTarget(m,_,f,v){const y=new s(this._context,this._viewHelper,m),L=new u(y,_,f,v);try{return n._createMouseTarget(y,L,!1)}catch(I){return L.fulfill(0)}}static _createMouseTarget(m,_,f){if(_.target===null){if(f)return _.fulfill(0);const L=n._doHitTest(m,_);return L.position?n.createMouseTargetFromHitTestPosition(m,_,L.position.lineNumber,L.position.column):this._createMouseTarget(m,_.withTarget(L.hitTarget),!0)}const v=_;let y=null;return y=y||n._hitTestContentWidget(m,v),y=y||n._hitTestOverlayWidget(m,v),y=y||n._hitTestMinimap(m,v),y=y||n._hitTestScrollbarSlider(m,v),y=y||n._hitTestViewZone(m,v),y=y||n._hitTestMargin(m,v),y=y||n._hitTestViewCursor(m,v),y=y||n._hitTestTextArea(m,v),y=y||n._hitTestViewLines(m,v,f),y=y||n._hitTestScrollbar(m,v),y||_.fulfill(0)}static _hitTestContentWidget(m,_){if(o.isChildOfContentWidgets(_.targetPath)||o.isChildOfOverflowingContentWidgets(_.targetPath)){const f=m.findAttribute(_.target,"widgetId");return f?_.fulfill(9,null,null,f):_.fulfill(0)}return null}static _hitTestOverlayWidget(m,_){if(o.isChildOfOverlayWidgets(_.targetPath)){const f=m.findAttribute(_.target,"widgetId");return f?_.fulfill(12,null,null,f):_.fulfill(0)}return null}static _hitTestViewCursor(m,_){if(_.target){const f=m.lastRenderData.lastViewCursorsRenderData;for(const v of f)if(_.target===v.domNode)return _.fulfill(6,v.position)}if(_.isInContentArea){const f=m.lastRenderData.lastViewCursorsRenderData,v=_.mouseContentHorizontalOffset,y=_.mouseVerticalOffset;for(const L of f)if(!(v<L.contentLeft)&&!(v>L.contentLeft+L.width)){const I=m.getVerticalOffsetForLineNumber(L.position.lineNumber);if(I<=y&&y<=I+L.height)return _.fulfill(6,L.position)}}return null}static _hitTestViewZone(m,_){const f=m.getZoneAtCoord(_.mouseVerticalOffset);if(f){const v=_.isInContentArea?8:5;return _.fulfill(v,f.position,null,f)}return null}static _hitTestTextArea(m,_){return o.isTextArea(_.targetPath)?m.lastRenderData.lastTextareaPosition?_.fulfill(6,m.lastRenderData.lastTextareaPosition):_.fulfill(1,m.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(m,_){if(_.isInMarginArea){const f=m.getFullLineRangeAtCoord(_.mouseVerticalOffset),v=f.range.getStartPosition();let y=Math.abs(_.pos.x-_.editorPos.x);const L={isAfterLines:f.isAfterLines,glyphMarginLeft:m.layoutInfo.glyphMarginLeft,glyphMarginWidth:m.layoutInfo.glyphMarginWidth,lineNumbersWidth:m.layoutInfo.lineNumbersWidth,offsetX:y};return y-=m.layoutInfo.glyphMarginLeft,y<=m.layoutInfo.glyphMarginWidth?_.fulfill(2,v,f.range,L):(y-=m.layoutInfo.glyphMarginWidth,y<=m.layoutInfo.lineNumbersWidth?_.fulfill(3,v,f.range,L):(y-=m.layoutInfo.lineNumbersWidth,_.fulfill(4,v,f.range,L)))}return null}static _hitTestViewLines(m,_,f){if(!o.isChildOfViewLines(_.targetPath))return null;if(m.isInTopPadding(_.mouseVerticalOffset))return _.fulfill(7,new w.Position(1,1),void 0,r);if(m.isAfterLines(_.mouseVerticalOffset)||m.isInBottomPadding(_.mouseVerticalOffset)){const y=m.model.getLineCount(),L=m.model.getLineMaxColumn(y);return _.fulfill(7,new w.Position(y,L),void 0,r)}if(f){if(o.isStrictChildOfViewLines(_.targetPath)){const y=m.getLineNumberAtVerticalOffset(_.mouseVerticalOffset);if(m.model.getLineLength(y)===0){const I=m.getLineWidth(y),k=i(_.mouseContentHorizontalOffset-I);return _.fulfill(7,new w.Position(y,1),void 0,k)}const L=m.getLineWidth(y);if(_.mouseContentHorizontalOffset>=L){const I=i(_.mouseContentHorizontalOffset-L),k=new w.Position(y,m.model.getLineMaxColumn(y));return _.fulfill(7,k,void 0,I)}}return _.fulfill(0)}const v=n._doHitTest(m,_);return v.position?n.createMouseTargetFromHitTestPosition(m,_,v.position.lineNumber,v.position.column):this._createMouseTarget(m,_.withTarget(v.hitTarget),!0)}static _hitTestMinimap(m,_){if(o.isChildOfMinimap(_.targetPath)){const f=m.getLineNumberAtVerticalOffset(_.mouseVerticalOffset),v=m.model.getLineMaxColumn(f);return _.fulfill(11,new w.Position(f,v))}return null}static _hitTestScrollbarSlider(m,_){if(o.isChildOfScrollableElement(_.targetPath)&&_.target&&_.target.nodeType===1){const f=_.target.className;if(f&&/\b(slider|scrollbar)\b/.test(f)){const v=m.getLineNumberAtVerticalOffset(_.mouseVerticalOffset),y=m.model.getLineMaxColumn(v);return _.fulfill(11,new w.Position(v,y))}}return null}static _hitTestScrollbar(m,_){if(o.isChildOfScrollableElement(_.targetPath)){const f=m.getLineNumberAtVerticalOffset(_.mouseVerticalOffset),v=m.model.getLineMaxColumn(f);return _.fulfill(11,new w.Position(f,v))}return null}getMouseColumn(m,_){const f=this._context.configuration.options,v=f.get(124),y=this._context.viewLayout.getCurrentScrollLeft()+_.x-m.x-v.contentLeft;return n._getMouseColumn(y,f.get(38).typicalHalfwidthCharacterWidth)}static _getMouseColumn(m,_){return m<0?1:Math.round(m/_)+1}static createMouseTargetFromHitTestPosition(m,_,f,v){const y=new w.Position(f,v),L=m.getLineWidth(f);if(_.mouseContentHorizontalOffset>L){const O=i(_.mouseContentHorizontalOffset-L);return _.fulfill(7,y,void 0,O)}const I=m.visibleRangeForPosition(f,v);if(!I)return _.fulfill(0,y);const k=I.left;if(_.mouseContentHorizontalOffset===k)return _.fulfill(6,y);const E=[];if(E.push({offset:I.left,column:v}),v>1){const O=m.visibleRangeForPosition(f,v-1);O&&E.push({offset:O.left,column:v-1})}const T=m.model.getLineMaxColumn(f);if(v<T){const O=m.visibleRangeForPosition(f,v+1);O&&E.push({offset:O.left,column:v+1})}E.sort((O,A)=>O.offset-A.offset);for(let O=1;O<E.length;O++){const A=E[O-1],B=E[O];if(A.offset<=_.mouseContentHorizontalOffset&&_.mouseContentHorizontalOffset<=B.offset){const F=new S.Range(f,A.column,f,B.column);return _.fulfill(6,y,F)}}return _.fulfill(6,y)}static _doHitTestWithCaretRangeFromPoint(m,_){const f=m.getLineNumberAtVerticalOffset(_.mouseVerticalOffset),y=m.getVerticalOffsetForLineNumber(f)+Math.floor(m.lineHeight/2);let L=_.pos.y+(y-_.mouseVerticalOffset);L<=_.editorPos.y&&(L=_.editorPos.y+1),L>=_.editorPos.y+m.layoutInfo.height&&(L=_.editorPos.y+m.layoutInfo.height-1);const I=new b.PageCoordinates(_.pos.x,L),k=this._actualDoHitTestWithCaretRangeFromPoint(m,I.toClientCoordinates());return k.position?k:this._actualDoHitTestWithCaretRangeFromPoint(m,_.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(m,_){const f=d.getShadowRoot(m.viewDomNode);let v;if(f?typeof f.caretRangeFromPoint=="undefined"?v=t(f,_.clientX,_.clientY):v=f.caretRangeFromPoint(_.clientX,_.clientY):v=document.caretRangeFromPoint(_.clientX,_.clientY),!v||!v.startContainer)return{position:null,hitTarget:null};const y=v.startContainer;let L=null;if(y.nodeType===y.TEXT_NODE){const I=y.parentNode,k=I?I.parentNode:null,E=k?k.parentNode:null;if((E&&E.nodeType===E.ELEMENT_NODE?E.className:null)===M.ViewLine.CLASS_NAME)return{position:m.getPositionFromDOMInfo(I,v.startOffset),hitTarget:null};L=y.parentNode}else if(y.nodeType===y.ELEMENT_NODE){const I=y.parentNode,k=I?I.parentNode:null;if((k&&k.nodeType===k.ELEMENT_NODE?k.className:null)===M.ViewLine.CLASS_NAME)return{position:m.getPositionFromDOMInfo(y,y.textContent.length),hitTarget:null};L=y}return{position:null,hitTarget:L}}static _doHitTestWithCaretPositionFromPoint(m,_){const f=document.caretPositionFromPoint(_.clientX,_.clientY);if(f.offsetNode.nodeType===f.offsetNode.TEXT_NODE){const v=f.offsetNode.parentNode,y=v?v.parentNode:null,L=y?y.parentNode:null;return(L&&L.nodeType===L.ELEMENT_NODE?L.className:null)===M.ViewLine.CLASS_NAME?{position:m.getPositionFromDOMInfo(f.offsetNode.parentNode,f.offset),hitTarget:null}:{position:null,hitTarget:f.offsetNode.parentNode}}if(f.offsetNode.nodeType===f.offsetNode.ELEMENT_NODE){const v=f.offsetNode.parentNode,y=v&&v.nodeType===v.ELEMENT_NODE?v.className:null,L=v?v.parentNode:null,I=L&&L.nodeType===L.ELEMENT_NODE?L.className:null;if(y===M.ViewLine.CLASS_NAME){const k=f.offsetNode.childNodes[Math.min(f.offset,f.offsetNode.childNodes.length-1)];if(k)return{position:m.getPositionFromDOMInfo(k,0),hitTarget:null}}else if(I===M.ViewLine.CLASS_NAME)return{position:m.getPositionFromDOMInfo(f.offsetNode,0),hitTarget:null}}return{position:null,hitTarget:f.offsetNode}}static _snapToSoftTabBoundary(m,_){const f=_.getLineContent(m.lineNumber),{tabSize:v}=_.getTextModelOptions(),y=g.AtomicTabMoveOperations.atomicPosition(f,m.column-1,v,2);return y!==-1?new w.Position(m.lineNumber,y+1):m}static _doHitTest(m,_){let f;return typeof document.caretRangeFromPoint=="function"?f=this._doHitTestWithCaretRangeFromPoint(m,_):document.caretPositionFromPoint?f=this._doHitTestWithCaretPositionFromPoint(m,_.pos.toClientCoordinates()):f={position:null,hitTarget:null},f.position&&m.stickyTabStops&&(f.position=this._snapToSoftTabBoundary(f.position,m.model)),f}}e.MouseTargetFactory=n;function t(h,m,_){const f=document.createRange();let v=h.elementFromPoint(m,_);if(v!==null){for(;v&&v.firstChild&&v.firstChild.nodeType!==v.firstChild.TEXT_NODE&&v.lastChild&&v.lastChild.firstChild;)v=v.lastChild;const y=v.getBoundingClientRect(),L=window.getComputedStyle(v,null).getPropertyValue("font"),I=v.innerText;let k=y.left,E=0,T;if(m>y.left+y.width)E=I.length;else{const O=l.getInstance();for(let A=0;A<I.length+1;A++){if(T=O.getCharWidth(I.charAt(A),L)/2,k+=T,m<k){E=A;break}k+=T}}f.setStart(v.firstChild,E),f.setEnd(v.firstChild,E)}return f}e.shadowCaretRangeFromPoint=t;class l{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return l._INSTANCE||(l._INSTANCE=new l),l._INSTANCE}getCharWidth(m,_){const f=m+_;if(this._cache[f])return this._cache[f];const v=this._canvas.getContext("2d");v.font=_;const L=v.measureText(m).width;return this._cache[f]=L,L}}l._INSTANCE=null}),define(Q[580],J([0,1,7,50,15,2,17,187,162,126,14,21,111]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=e.createMouseMoveEventMerger=void 0;function s(i){return function(n,t){let l=!1;return i&&(l=i.mouseTargetIsWidget(t)),l||t.preventDefault(),t}}e.createMouseMoveEventMerger=s;class a extends o.ViewEventHandler{constructor(n,t,l){super();this._context=n,this.viewController=t,this.viewHelper=l,this.mouseTargetFactory=new C.MouseTargetFactory(this._context,l),this._mouseDownOperation=this._register(new u(this._context,this.viewController,this.viewHelper,(_,f)=>this._createMouseTarget(_,f),_=>this._getMouseColumn(_))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(124).height;const h=new d.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(h.onContextMenu(this.viewHelper.viewDomNode,_=>this._onContextMenu(_,!0))),this._register(h.onMouseMoveThrottled(this.viewHelper.viewDomNode,_=>this._onMouseMove(_),s(this.mouseTargetFactory),a.MOUSE_MOVE_MINIMUM_TIME)),this._register(h.onMouseUp(this.viewHelper.viewDomNode,_=>this._onMouseUp(_))),this._register(h.onMouseLeave(this.viewHelper.viewDomNode,_=>this._onMouseLeave(_))),this._register(h.onMouseDown(this.viewHelper.viewDomNode,_=>this._onMouseDown(_)));const m=_=>{if(this.viewController.emitMouseWheel(_),!!this._context.configuration.options.get(62)){const f=new N.StandardWheelEvent(_);if(S.isMacintosh?(_.metaKey||_.ctrlKey)&&!_.shiftKey&&!_.altKey:_.ctrlKey&&!_.metaKey&&!_.shiftKey&&!_.altKey){const y=g.EditorZoom.getZoomLevel(),L=f.deltaY>0?1:-1;g.EditorZoom.setZoomLevel(y+L),f.preventDefault(),f.stopPropagation()}}};this._register(b.addDisposableListener(this.viewHelper.viewDomNode,b.EventType.MOUSE_WHEEL,m,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(n){if(n.hasChanged(124)){const t=this._context.configuration.options.get(124).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(n){return this._mouseDownOperation.onCursorStateChanged(n),!1}onFocusChanged(n){return!1}onScrollChanged(n){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(n,t){const h=new d.ClientCoordinates(n,t).toPageCoordinates(),m=d.createEditorPagePosition(this.viewHelper.viewDomNode);return h.y<m.y||h.y>m.y+m.height||h.x<m.x||h.x>m.x+m.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),m,h,null)}_createMouseTarget(n,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n.editorPos,n.pos,t?n.target:null)}_getMouseColumn(n){return this.mouseTargetFactory.getMouseColumn(n.editorPos,n.pos)}_onContextMenu(n,t){this.viewController.emitContextMenu({event:n,target:this._createMouseTarget(n,t)})}_onMouseMove(n){this._mouseDownOperation.isActive()||n.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:n,target:this._createMouseTarget(n,!0)})}_onMouseLeave(n){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:n,target:null})}_onMouseUp(n){this.viewController.emitMouseUp({event:n,target:this._createMouseTarget(n,!0)})}_onMouseDown(n){const t=this._createMouseTarget(n,!0),l=t.type===6||t.type===7,h=t.type===2||t.type===3||t.type===4,m=t.type===3,_=this._context.configuration.options.get(93),f=t.type===8||t.type===5,v=t.type===9;let y=n.leftButton||n.middleButton;S.isMacintosh&&n.leftButton&&n.ctrlKey&&(y=!1);const L=()=>{n.preventDefault(),this.viewHelper.focusTextArea()};if(y&&(l||m&&_))L(),this._mouseDownOperation.start(t.type,n);else if(h)n.preventDefault();else if(f){const I=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(I.viewZoneId)&&(L(),this._mouseDownOperation.start(t.type,n),n.preventDefault())}else v&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(L(),n.preventDefault());this.viewController.emitMouseDown({event:n,target:t})}}e.MouseHandler=a,a.MOUSE_MOVE_MINIMUM_TIME=100;class u extends w.Disposable{constructor(n,t,l,h,m){super();this._context=n,this._viewController=t,this._viewHelper=l,this._createMouseTarget=h,this._getMouseColumn=m,this._mouseMoveMonitor=this._register(new d.GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new M.TimeoutTimer),this._mouseState=new r,this._currentSelection=new c.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(n){this._lastMouseEvent=n,this._mouseState.setModifiers(n);const t=this._findMousePosition(n,!0);!t||(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:n,target:t}):this._dispatchMouse(t,!0))}start(n,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(n===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const l=this._findMousePosition(t,!0);if(!(!l||!l.position)){this._mouseState.trySetCount(t.detail,l.position),t.detail=this._mouseState.count;const h=this._context.configuration.options;if(!h.get(75)&&h.get(27)&&!h.get(15)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&l.type===6&&l.position&&this._currentSelection.containsPosition(l.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,s(null),m=>this._onMouseDownThenMove(m),m=>{const _=this._findMousePosition(this._lastMouseEvent,!0);m&&m instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:_?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(l,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,s(null),m=>this._onMouseDownThenMove(m),()=>this._stop()))}}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){!this._isActive||this._onScrollTimeout.setIfNotSet(()=>{if(!!this._lastMouseEvent){const n=this._findMousePosition(this._lastMouseEvent,!1);!n||this._mouseState.isDragAndDrop||this._dispatchMouse(n,!0)}},10)}onCursorStateChanged(n){this._currentSelection=n.selections[0]}_getPositionOutsideEditor(n){const t=n.editorPos,l=this._context.model,h=this._context.viewLayout,m=this._getMouseColumn(n);if(n.posy<t.y){const f=Math.max(h.getCurrentScrollTop()-(t.y-n.posy),0),v=C.HitTestContext.getZoneAtCoord(this._context,f);if(v){const L=this._helpPositionJumpOverViewZone(v);if(L)return new C.MouseTarget(null,13,m,L)}const y=h.getLineNumberAtVerticalOffset(f);return new C.MouseTarget(null,13,m,new p.Position(y,1))}if(n.posy>t.y+t.height){const f=h.getCurrentScrollTop()+(n.posy-t.y),v=C.HitTestContext.getZoneAtCoord(this._context,f);if(v){const L=this._helpPositionJumpOverViewZone(v);if(L)return new C.MouseTarget(null,13,m,L)}const y=h.getLineNumberAtVerticalOffset(f);return new C.MouseTarget(null,13,m,new p.Position(y,l.getLineMaxColumn(y)))}const _=h.getLineNumberAtVerticalOffset(h.getCurrentScrollTop()+(n.posy-t.y));return n.posx<t.x?new C.MouseTarget(null,13,m,new p.Position(_,1)):n.posx>t.x+t.width?new C.MouseTarget(null,13,m,new p.Position(_,l.getLineMaxColumn(_))):null}_findMousePosition(n,t){const l=this._getPositionOutsideEditor(n);if(l)return l;const h=this._createMouseTarget(n,t);if(!h.position)return null;if(h.type===8||h.type===5){const _=this._helpPositionJumpOverViewZone(h.detail);if(_)return new C.MouseTarget(h.element,h.type,h.mouseColumn,_,null,h.detail)}return h}_helpPositionJumpOverViewZone(n){const t=new p.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),l=n.positionBefore,h=n.positionAfter;return l&&h?l.isBefore(t)?l:h:null}_dispatchMouse(n,t){!n.position||this._viewController.dispatchMouse({position:n.position,mouseColumn:n.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})}}class r{constructor(){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}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(n){this._altKey=n.altKey,this._ctrlKey=n.ctrlKey,this._metaKey=n.metaKey,this._shiftKey=n.shiftKey}setStartButtons(n){this._leftButton=n.leftButton,this._middleButton=n.middleButton}setStartedOnLineNumbers(n){this._startedOnLineNumbers=n}trySetCount(n,t){const l=new Date().getTime();l-this._lastSetMouseDownCountTime>r.CLEAR_MOUSE_DOWN_COUNT_TIME&&(n=1),this._lastSetMouseDownCountTime=l,n>this._lastMouseDownCount+1&&(n=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(n,this._lastMouseDownPositionEqualCount)}}r.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(Q[581],J([0,1,7,17,60,2,580,162,151,164]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class p extends S.MouseHandler{constructor(a,u,r){super(a,u,r);this._register(M.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(b.addDisposableListener(this.viewHelper.linesContentDomNode,M.EventType.Tap,n=>this.onTap(n))),this._register(b.addDisposableListener(this.viewHelper.linesContentDomNode,M.EventType.Change,n=>this.onChange(n))),this._register(b.addDisposableListener(this.viewHelper.linesContentDomNode,M.EventType.Contextmenu,n=>this._onContextMenu(new C.EditorMouseEvent(n,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(b.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",n=>{const t=n.pointerType;if(t==="mouse"){this._lastPointerType="mouse";return}else t==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const i=new C.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(i.onPointerMoveThrottled(this.viewHelper.viewDomNode,n=>this._onMouseMove(n),S.createMouseMoveEventMerger(this.mouseTargetFactory),S.MouseHandler.MOUSE_MOVE_MINIMUM_TIME)),this._register(i.onPointerUp(this.viewHelper.viewDomNode,n=>this._onMouseUp(n))),this._register(i.onPointerLeave(this.viewHelper.viewDomNode,n=>this._onMouseLeave(n))),this._register(i.onPointerDown(this.viewHelper.viewDomNode,n=>this._onMouseDown(n)))}onTap(a){if(!(!a.initialTarget||!this.viewHelper.linesContentDomNode.contains(a.initialTarget))){a.preventDefault(),this.viewHelper.focusTextArea();const u=this._createMouseTarget(new C.EditorMouseEvent(a,this.viewHelper.viewDomNode),!1);u.position&&this.viewController.dispatchMouse({position:u.position,mouseColumn:u.position.column,startedOnLineNumbers:!1,mouseDownCount:a.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}}onChange(a){this._lastPointerType==="touch"&&this._context.model.deltaScrollNow(-a.translationX,-a.translationY)}_onMouseDown(a){a.browserEvent.pointerType!=="touch"&&super._onMouseDown(a)}}e.PointerEventHandler=p;class c extends S.MouseHandler{constructor(a,u,r){super(a,u,r);this._register(M.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(b.addDisposableListener(this.viewHelper.linesContentDomNode,M.EventType.Tap,i=>this.onTap(i))),this._register(b.addDisposableListener(this.viewHelper.linesContentDomNode,M.EventType.Change,i=>this.onChange(i))),this._register(b.addDisposableListener(this.viewHelper.linesContentDomNode,M.EventType.Contextmenu,i=>this._onContextMenu(new C.EditorMouseEvent(i,this.viewHelper.viewDomNode),!1)))}onTap(a){a.preventDefault(),this.viewHelper.focusTextArea();const u=this._createMouseTarget(new C.EditorMouseEvent(a,this.viewHelper.viewDomNode),!1);if(u.position){const r=document.createEvent("CustomEvent");r.initEvent(g.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(r),this.viewController.moveTo(u.position)}}onChange(a){this._context.model.deltaScrollNow(-a.translationX,-a.translationY)}}class o extends w.Disposable{constructor(a,u,r){super();N.isIOS&&d.BrowserFeatures.pointerEvents?this.handler=this._register(new p(a,u,r)):window.TouchEvent?this.handler=this._register(new c(a,u,r)):this.handler=this._register(new S.MouseHandler(a,u,r))}getTargetAtClientPoint(a,u){return this.handler.getTargetAtClientPoint(a,u)}}e.PointerHandler=o}),define(Q[256],J([0,1,187]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class N{constructor(S){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=S}emitKeyDown(S){this.onKeyDown&&this.onKeyDown(S)}emitKeyUp(S){this.onKeyUp&&this.onKeyUp(S)}emitContextMenu(S){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(S))}emitMouseMove(S){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(S))}emitMouseLeave(S){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(S))}emitMouseDown(S){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(S))}emitMouseUp(S){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(S))}emitMouseDrag(S){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(S))}emitMouseDrop(S){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(S))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(S){this.onMouseWheel&&this.onMouseWheel(S)}_convertViewToModelMouseEvent(S){return S.target?{event:S.event,target:this._convertViewToModelMouseTarget(S.target)}:S}_convertViewToModelMouseTarget(S){return N.convertViewToModelMouseTarget(S,this._coordinatesConverter)}static convertViewToModelMouseTarget(S,C){return new M(S.element,S.type,S.mouseColumn,S.position?C.convertViewPositionToModelPosition(S.position):null,S.range?C.convertViewRangeToModelRange(S.range):null,S.detail)}}e.ViewUserInputEvents=N;class M{constructor(S,C,d,g,p,c){this.element=S,this.type=C,this.mouseColumn=d,this.position=g,this.range=p,this.detail=c}toString(){return b.MouseTarget.toString(this)}}}),define(Q[582],J([0,1,17,15,69,165,45,255,14,3,110,124,323]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class o{constructor(){this._currentVisibleRange=new g.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(i){this._currentVisibleRange=i}}class s{constructor(i,n,t,l,h,m){this.lineNumber=i,this.startColumn=n,this.endColumn=t,this.startScrollTop=l,this.stopScrollTop=h,this.scrollType=m,this.type="range",this.minLineNumber=i,this.maxLineNumber=i}}class a{constructor(i,n,t,l){this.selections=i,this.startScrollTop=n,this.stopScrollTop=t,this.scrollType=l,this.type="selections";let h=i[0].startLineNumber,m=i[0].endLineNumber;for(let _=1,f=i.length;_<f;_++){const v=i[_];h=Math.min(h,v.startLineNumber),m=Math.max(m,v.endLineNumber)}this.minLineNumber=h,this.maxLineNumber=m}}class u extends S.ViewPart{constructor(i,n){super(i);this._linesContent=n,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new w.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const t=this._context.configuration,l=this._context.configuration.options,h=l.get(38),m=l.get(125);this._lineHeight=l.get(53),this._typicalHalfwidthCharacterWidth=h.typicalHalfwidthCharacterWidth,this._isViewportWrapping=m.isViewportWrapping,this._revealHorizontalRightPadding=l.get(84),this._cursorSurroundingLines=l.get(22),this._cursorSurroundingLinesStyle=l.get(23),this._canUseLayerHinting=!l.get(25),this._viewLineOptions=new C.ViewLineOptions(t,this._context.theme.type),S.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${c.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),M.Configuration.applyFontInfo(this.domNode,h),this._maxLineWidth=0,this._asyncUpdateLineWidths=new N.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new N.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new o,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new C.ViewLine(this._viewLineOptions)}onConfigurationChanged(i){this._visibleLines.onConfigurationChanged(i),i.hasChanged(125)&&(this._maxLineWidth=0);const n=this._context.configuration.options,t=n.get(38),l=n.get(125);return this._lineHeight=n.get(53),this._typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,this._isViewportWrapping=l.isViewportWrapping,this._revealHorizontalRightPadding=n.get(84),this._cursorSurroundingLines=n.get(22),this._cursorSurroundingLinesStyle=n.get(23),this._canUseLayerHinting=!n.get(25),M.Configuration.applyFontInfo(this.domNode,t),this._onOptionsMaybeChanged(),i.hasChanged(124)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const i=this._context.configuration,n=new C.ViewLineOptions(i,this._context.theme.type);if(!this._viewLineOptions.equals(n)){this._viewLineOptions=n;const t=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let h=t;h<=l;h++)this._visibleLines.getVisibleLine(h).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(i){const n=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();let l=!1;for(let h=n;h<=t;h++)l=this._visibleLines.getVisibleLine(h).onSelectionChanged()||l;return l}onDecorationsChanged(i){{const n=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let l=n;l<=t;l++)this._visibleLines.getVisibleLine(l).onDecorationsChanged()}return!0}onFlushed(i){const n=this._visibleLines.onFlushed(i);return this._maxLineWidth=0,n}onLinesChanged(i){return this._visibleLines.onLinesChanged(i)}onLinesDeleted(i){return this._visibleLines.onLinesDeleted(i)}onLinesInserted(i){return this._visibleLines.onLinesInserted(i)}onRevealRangeRequest(i){const n=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),i.source,i.range,i.selections,i.verticalType);if(n===-1)return!1;let t=this._context.viewLayout.validateScrollPosition({scrollTop:n});i.revealHorizontal?i.range&&i.range.startLineNumber!==i.range.endLineNumber?t={scrollTop:t.scrollTop,scrollLeft:0}:i.range?this._horizontalRevealRequest=new s(i.range.startLineNumber,i.range.startColumn,i.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),t.scrollTop,i.scrollType):i.selections&&i.selections.length>0&&(this._horizontalRevealRequest=new a(i.selections,this._context.viewLayout.getCurrentScrollTop(),t.scrollTop,i.scrollType)):this._horizontalRevealRequest=null;const h=Math.abs(this._context.viewLayout.getCurrentScrollTop()-t.scrollTop)<=this._lineHeight?1:i.scrollType;return this._context.model.setScrollPosition(t,h),!0}onScrollChanged(i){if(this._horizontalRevealRequest&&i.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&i.scrollTopChanged){const n=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),t=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(i.scrollTop<n||i.scrollTop>t)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(i.scrollWidth),this._visibleLines.onScrollChanged(i)||!0}onTokensChanged(i){return this._visibleLines.onTokensChanged(i)}onZonesChanged(i){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(i)}onThemeChanged(i){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(i,n){const t=this._getViewLineDomNode(i);if(t===null)return null;const l=this._getLineNumberFor(t);if(l===-1||l<1||l>this._context.model.getLineCount())return null;if(this._context.model.getLineMaxColumn(l)===1)return new d.Position(l,1);const h=this._visibleLines.getStartLineNumber(),m=this._visibleLines.getEndLineNumber();if(l<h||l>m)return null;let _=this._visibleLines.getVisibleLine(l).getColumnOfNodeOffset(l,i,n);const f=this._context.model.getLineMinColumn(l);return _<f&&(_=f),new d.Position(l,_)}_getViewLineDomNode(i){for(;i&&i.nodeType===1;){if(i.className===C.ViewLine.CLASS_NAME)return i;i=i.parentElement}return null}_getLineNumberFor(i){const n=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let l=n;l<=t;l++){const h=this._visibleLines.getVisibleLine(l);if(i===h.getDomNode())return l}return-1}getLineWidth(i){const n=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();return i<n||i>t?-1:this._visibleLines.getVisibleLine(i).getWidth()}linesVisibleRangesForRange(i,n){if(this.shouldRender())return null;const t=i.endLineNumber,l=g.Range.intersectRanges(i,this._lastRenderedData.getCurrentVisibleRange());if(!l)return null;let h=[],m=0;const _=new C.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let f=0;n&&(f=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new d.Position(l.startLineNumber,1)).lineNumber);const v=this._visibleLines.getStartLineNumber(),y=this._visibleLines.getEndLineNumber();for(let L=l.startLineNumber;L<=l.endLineNumber;L++)if(!(L<v||L>y)){const I=L===l.startLineNumber?l.startColumn:1,k=L===l.endLineNumber?l.endColumn:this._context.model.getLineMaxColumn(L),E=this._visibleLines.getVisibleLine(L).getVisibleRangesForRange(I,k,_);if(!!E){if(n&&L<t){const T=f;f=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new d.Position(L+1,1)).lineNumber,T!==f&&(E.ranges[E.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}h[m++]=new p.LineVisibleRanges(E.outsideRenderedLine,L,E.ranges)}}return m===0?null:h}_visibleRangesForLineRange(i,n,t){return this.shouldRender()||i<this._visibleLines.getStartLineNumber()||i>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(i).getVisibleRangesForRange(n,t,new C.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(i){const n=this._visibleRangesForLineRange(i.lineNumber,i.column,i.column);return n?new p.HorizontalPosition(n.outsideRenderedLine,n.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(i){const n=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();let l=1,h=!0;for(let m=n;m<=t;m++){const _=this._visibleLines.getVisibleLine(m);if(i&&!_.getWidthIsFast()){h=!1;continue}l=Math.max(l,_.getWidth())}return h&&n===1&&t===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(l),h}_checkMonospaceFontAssumptions(){let i=-1,n=-1;const t=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let h=t;h<=l;h++){const m=this._visibleLines.getVisibleLine(h);if(m.needsMonospaceFontCheck()){const _=m.getWidth();_>n&&(n=_,i=h)}}if(i!==-1&&!this._visibleLines.getVisibleLine(i).monospaceAssumptionsAreValid())for(let h=t;h<=l;h++)this._visibleLines.getVisibleLine(h).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(i){if(this._visibleLines.renderLines(i),this._lastRenderedData.setCurrentVisibleRange(i.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(i.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=i.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const l=this._computeScrollLeftToReveal(t);l&&(this._isViewportWrapping||this._ensureMaxLineWidth(l.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:l.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),b.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const t=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let h=t;h<=l;h++)if(this._visibleLines.getVisibleLine(h).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const n=this._context.viewLayout.getCurrentScrollTop()-i.bigNumbersDelta;this._linesContent.setTop(-n),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(i){const n=Math.ceil(i);this._maxLineWidth<n&&(this._maxLineWidth=n,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(i,n,t,l,h){const m=i.top,_=i.height,f=m+_;let v,y,L;if(l&&l.length>0){let E=l[0].startLineNumber,T=l[0].endLineNumber;for(let O=1,A=l.length;O<A;O++){const B=l[O];E=Math.min(E,B.startLineNumber),T=Math.max(T,B.endLineNumber)}v=!1,y=this._context.viewLayout.getVerticalOffsetForLineNumber(E),L=this._context.viewLayout.getVerticalOffsetForLineNumber(T)+this._lineHeight}else if(t)v=!0,y=this._context.viewLayout.getVerticalOffsetForLineNumber(t.startLineNumber),L=this._context.viewLayout.getVerticalOffsetForLineNumber(t.endLineNumber)+this._lineHeight;else return-1;if(!(n==="mouse"&&this._cursorSurroundingLinesStyle==="default")){const E=Math.min(_/this._lineHeight/2,this._cursorSurroundingLines);y-=E*this._lineHeight,L+=Math.max(0,E-1)*this._lineHeight}(h===0||h===4)&&(L+=this._lineHeight);let k;if(L-y>_){if(!v)return-1;k=y}else if(h===5||h===6)if(h===6&&m<=y&&L<=f)k=m;else{const E=Math.max(5*this._lineHeight,_*.2),T=y-E,O=L-_;k=Math.max(O,T)}else if(h===1||h===2)if(h===2&&m<=y&&L<=f)k=m;else{const E=(y+L)/2;k=Math.max(0,E-_/2)}else k=this._computeMinimumScrolling(m,f,y,L,h===3,h===4);return k}_computeScrollLeftToReveal(i){const n=this._context.viewLayout.getCurrentViewport(),t=n.left,l=t+n.width;let h=1073741824,m=0;if(i.type==="range"){const f=this._visibleRangesForLineRange(i.lineNumber,i.startColumn,i.endColumn);if(!f)return null;for(const v of f.ranges)h=Math.min(h,v.left),m=Math.max(m,v.left+v.width)}else for(const f of i.selections){if(f.startLineNumber!==f.endLineNumber)return null;const v=this._visibleRangesForLineRange(f.startLineNumber,f.startColumn,f.endColumn);if(!v)return null;for(const y of v.ranges)h=Math.min(h,y.left),m=Math.max(m,y.left+y.width)}return h=Math.max(0,h-u.HORIZONTAL_EXTRA_PX),m+=this._revealHorizontalRightPadding,i.type==="selections"&&m-h>n.width?null:{scrollLeft:this._computeMinimumScrolling(t,l,h,m),maxHorizontalOffset:m}}_computeMinimumScrolling(i,n,t,l,h,m){i=i|0,n=n|0,t=t|0,l=l|0,h=!!h,m=!!m;const _=n-i;if(l-t<_){if(h)return t;if(m)return Math.max(0,l-_);if(t<i)return t;if(l>n)return Math.max(0,l-_)}else return t;return i}}e.ViewLines=u,u.HORIZONTAL_EXTRA_PX=30}),define(Q[11],J([0,1,9,2,33,6,97,27]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.ThemeIcon=e.themeColorFromId=e.ThemeColor=e.IThemeService=void 0,e.IThemeService=b.createDecorator("themeService");var d;(function(r){function i(n){return n&&typeof n=="object"&&typeof n.id=="string"}r.isThemeColor=i})(d=e.ThemeColor||(e.ThemeColor={}));function g(r){return{id:r}}e.themeColorFromId=g;var p;(function(r){function i(m){return m&&typeof m=="object"&&typeof m.id=="string"&&(typeof m.color=="undefined"||d.isThemeColor(m.color))}r.isThemeIcon=i;const n=new RegExp(`^\\$\\((${C.CSSIcon.iconNameExpression}(?:${C.CSSIcon.iconModifierExpression})?)\\)$`);function t(m){const _=n.exec(m);if(!!_){let[,f]=_;return{id:f}}}r.fromString=t;function l(m,_){let f=m.id;const v=f.lastIndexOf("~");return v!==-1&&(f=f.substring(0,v)),_&&(f=`${f}~${_}`),{id:f}}r.modify=l;function h(m,_){var f,v;return m.id===_.id&&((f=m.color)===null||f===void 0?void 0:f.id)===((v=_.color)===null||v===void 0?void 0:v.id)}r.isEqual=h,r.asClassNameArray=C.CSSIcon.asClassNameArray,r.asClassName=C.CSSIcon.asClassName,r.asCSSSelector=C.CSSIcon.asCSSSelector})(p=e.ThemeIcon||(e.ThemeIcon={}));function c(r){switch(r){case S.ColorScheme.DARK:return"vs-dark";case S.ColorScheme.HIGH_CONTRAST:return"hc-black";default:return"vs"}}e.getThemeTypeSelector=c,e.Extensions={ThemingContribution:"base.contributions.theming"};class o{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new w.Emitter}onColorThemeChange(i){return this.themingParticipants.push(i),this.onThemingParticipantAddedEmitter.fire(i),N.toDisposable(()=>{const n=this.themingParticipants.indexOf(i);this.themingParticipants.splice(n,1)})}getThemingParticipants(){return this.themingParticipants}}let s=new o;M.Registry.add(e.Extensions.ThemingContribution,s);function a(r){return s.onColorThemeChange(r)}e.registerThemingParticipant=a;class u extends N.Disposable{constructor(i){super();this.themeService=i,this.theme=i.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(n=>this.onThemeChange(n)))}onThemeChange(i){this.theme=i,this.updateStyles()}updateStyles(){}}e.Themable=u}),define(Q[583],J([0,1,7,2,8,24,362,107,53,11]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationTypeOptionsProvider=e.DecorationSubTypeOptionsProvider=e.CodeEditorServiceImpl=e.GlobalStyleSheet=e.RefCountedStyleSheet=void 0;class p{constructor(t,l,h){this._parent=t,this._editorId=l,this._styleSheet=h,this._refCount=0}ref(){this._refCount++}unref(){var t;this._refCount--,this._refCount===0&&((t=this._styleSheet.parentNode)===null||t===void 0||t.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(t,l){this._styleSheet.sheet.insertRule(t,l)}removeRulesContainingSelector(t){b.removeCSSRulesContainingSelector(t,this._styleSheet)}}e.RefCountedStyleSheet=p;class c{constructor(t){this._styleSheet=t}ref(){}unref(){}insertRule(t,l){this._styleSheet.sheet.insertRule(t,l)}removeRulesContainingSelector(t){b.removeCSSRulesContainingSelector(t,this._styleSheet)}}e.GlobalStyleSheet=c;let o=class extends S.AbstractCodeEditorService{constructor(t,l){super();this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=t||null,this._themeService=l}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new c(b.createStyleSheet())),this._globalStyleSheet}_getOrCreateStyleSheet(t){if(!t)return this._getOrCreateGlobalStyleSheet();const l=t.getContainerDomNode();if(!b.isInShadowDOM(l))return this._getOrCreateGlobalStyleSheet();const h=t.getId();if(!this._editorStyleSheets.has(h)){const m=new p(this,h,b.createStyleSheet(l));this._editorStyleSheets.set(h,m)}return this._editorStyleSheets.get(h)}_removeEditorStyleSheets(t){this._editorStyleSheets.delete(t)}registerDecorationType(t,l,h,m){let _=this._decorationOptionProviders.get(t);if(!_){const f=this._getOrCreateStyleSheet(m),v={styleSheet:f,key:t,parentTypeKey:h,options:l||Object.create(null)};h?_=new s(this._themeService,f,v):_=new a(this._themeService,f,v),this._decorationOptionProviders.set(t,_),this._onDecorationTypeRegistered.fire(t)}_.refCount++}removeDecorationType(t){const l=this._decorationOptionProviders.get(t);l&&(l.refCount--,l.refCount<=0&&(this._decorationOptionProviders.delete(t),l.dispose(),this.listCodeEditors().forEach(h=>h.removeDecorations(t))))}resolveDecorationOptions(t,l){const h=this._decorationOptionProviders.get(t);if(!h)throw new Error("Unknown decoration type key: "+t);return h.getOptions(this,l)}};o=Me([_e(1,g.IThemeService)],o),e.CodeEditorServiceImpl=o;class s{constructor(t,l,h){this._styleSheet=l,this._styleSheet.ref(),this._parentTypeKey=h.parentTypeKey,this.refCount=0,this._beforeContentRules=new r(3,h,t),this._afterContentRules=new r(4,h,t)}getOptions(t,l){const h=t.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(h.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(h.afterContentClassName=this._afterContentRules.className),h}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}e.DecorationSubTypeOptionsProvider=s;class a{constructor(t,l,h){this._disposables=new N.DisposableStore,this._styleSheet=l,this._styleSheet.ref(),this.refCount=0;const m=I=>{const k=new r(I,h,t);if(this._disposables.add(k),k.hasContent)return k.className},_=I=>{const k=new r(I,h,t);return this._disposables.add(k),k.hasContent?{className:k.className,hasLetterSpacing:k.hasLetterSpacing}:null};this.className=m(0);const f=_(1);f&&(this.inlineClassName=f.className,this.inlineClassNameAffectsLetterSpacing=f.hasLetterSpacing),this.beforeContentClassName=m(3),this.afterContentClassName=m(4),this.glyphMarginClassName=m(2);const v=h.options;this.isWholeLine=Boolean(v.isWholeLine),this.stickiness=v.rangeBehavior;const y=v.light&&v.light.overviewRulerColor||v.overviewRulerColor,L=v.dark&&v.dark.overviewRulerColor||v.overviewRulerColor;(typeof y!="undefined"||typeof L!="undefined")&&(this.overviewRuler={color:y||L,darkColor:L||y,position:v.overviewRulerLane||d.OverviewRulerLane.Center})}getOptions(t,l){return l?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}e.DecorationTypeOptionsProvider=a;const u={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};"};class r{constructor(t,l,h){this._theme=h.getColorTheme(),this._ruleType=t,this._providerArgs=l,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let m=i.getClassName(this._providerArgs.key,t);this._providerArgs.parentTypeKey&&(m=m+" "+i.getClassName(this._providerArgs.parentTypeKey,t)),this._className=m,this._unThemedSelector=i.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,t),this._buildCSS(),this._usesThemeColors?this._themeListener=h.onDidColorThemeChange(_=>{this._theme=h.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const t=this._providerArgs.options;let l,h,m;switch(this._ruleType){case 0:l=this.getCSSTextForModelDecorationClassName(t),h=this.getCSSTextForModelDecorationClassName(t.light),m=this.getCSSTextForModelDecorationClassName(t.dark);break;case 1:l=this.getCSSTextForModelDecorationInlineClassName(t),h=this.getCSSTextForModelDecorationInlineClassName(t.light),m=this.getCSSTextForModelDecorationInlineClassName(t.dark);break;case 2:l=this.getCSSTextForModelDecorationGlyphMarginClassName(t),h=this.getCSSTextForModelDecorationGlyphMarginClassName(t.light),m=this.getCSSTextForModelDecorationGlyphMarginClassName(t.dark);break;case 3:l=this.getCSSTextForModelDecorationContentClassName(t.before),h=this.getCSSTextForModelDecorationContentClassName(t.light&&t.light.before),m=this.getCSSTextForModelDecorationContentClassName(t.dark&&t.dark.before);break;case 4:l=this.getCSSTextForModelDecorationContentClassName(t.after),h=this.getCSSTextForModelDecorationContentClassName(t.light&&t.light.after),m=this.getCSSTextForModelDecorationContentClassName(t.dark&&t.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const _=this._providerArgs.styleSheet;let f=!1;l.length>0&&(_.insertRule(`${this._unThemedSelector} {${l}}`,0),f=!0),h.length>0&&(_.insertRule(`.vs${this._unThemedSelector} {${h}}`,0),f=!0),m.length>0&&(_.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${m}}`,0),f=!0),this._hasContent=f}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(t){if(!t)return"";const l=[];return this.collectCSSText(t,["backgroundColor"],l),this.collectCSSText(t,["outline","outlineColor","outlineStyle","outlineWidth"],l),this.collectBorderSettingsCSSText(t,l),l.join("")}getCSSTextForModelDecorationInlineClassName(t){if(!t)return"";const l=[];return this.collectCSSText(t,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],l),t.letterSpacing&&(this._hasLetterSpacing=!0),l.join("")}getCSSTextForModelDecorationContentClassName(t){if(!t)return"";const l=[];if(typeof t!="undefined"){if(this.collectBorderSettingsCSSText(t,l),typeof t.contentIconPath!="undefined"&&l.push(M.format(u.contentIconPath,b.asCSSUrl(w.URI.revive(t.contentIconPath)))),typeof t.contentText=="string"){const m=t.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");l.push(M.format(u.contentText,m))}this.collectCSSText(t,["fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],l),this.collectCSSText(t,["width","height"],l)&&l.push("display:inline-block;")}return l.join("")}getCSSTextForModelDecorationGlyphMarginClassName(t){if(!t)return"";const l=[];return typeof t.gutterIconPath!="undefined"&&(l.push(M.format(u.gutterIconPath,b.asCSSUrl(w.URI.revive(t.gutterIconPath)))),typeof t.gutterIconSize!="undefined"&&l.push(M.format(u.gutterIconSize,t.gutterIconSize))),l.join("")}collectBorderSettingsCSSText(t,l){return this.collectCSSText(t,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],l)?(l.push(M.format("box-sizing: border-box;")),!0):!1}collectCSSText(t,l,h){const m=h.length;for(let _ of l){const f=this.resolveValue(t[_]);typeof f=="string"&&h.push(M.format(u[_],f))}return h.length!==m}resolveValue(t){if(C.isThemeColor(t)){this._usesThemeColors=!0;const l=this._theme.getColor(t.id);return l?l.toString():"transparent"}return t}}class i{static getClassName(t,l){return"ced-"+t+"-"+l}static getSelector(t,l,h){let m=".monaco-editor ."+this.getClassName(t,h);return l&&(m=m+"."+this.getClassName(l,h)),h===3?m+="::before":h===4&&(m+="::after"),m}}}),define(Q[584],J([0,1,7,30,61,45,11]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class C extends w.ViewPart{constructor(g,p,c,o){super(g);const s=this._context.configuration.options,a=s.get(87),u=s.get(61),r=s.get(30),i=s.get(90),n={listenOnDomNode:c.domNode,className:"editor-scrollable "+S.getThemeTypeSelector(g.theme.type),useShadows:!1,lazyRender:!0,vertical:a.vertical,horizontal:a.horizontal,verticalHasArrows:a.verticalHasArrows,horizontalHasArrows:a.horizontalHasArrows,verticalScrollbarSize:a.verticalScrollbarSize,verticalSliderSize:a.verticalSliderSize,horizontalScrollbarSize:a.horizontalScrollbarSize,horizontalSliderSize:a.horizontalSliderSize,handleMouseWheel:a.handleMouseWheel,alwaysConsumeMouseWheel:a.alwaysConsumeMouseWheel,arrowSize:a.arrowSize,mouseWheelScrollSensitivity:u,fastScrollSensitivity:r,scrollPredominantAxis:i,scrollByPage:a.scrollByPage};this.scrollbar=this._register(new M.SmoothScrollableElement(p.domNode,n,this._context.viewLayout.getScrollable())),w.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=N.createFastDomNode(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const t=(l,h,m)=>{const _={};if(h){const f=l.scrollTop;f&&(_.scrollTop=this._context.viewLayout.getCurrentScrollTop()+f,l.scrollTop=0)}if(m){const f=l.scrollLeft;f&&(_.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+f,l.scrollLeft=0)}this._context.model.setScrollPosition(_,1)};this._register(b.addDisposableListener(c.domNode,"scroll",l=>t(c.domNode,!0,!0))),this._register(b.addDisposableListener(p.domNode,"scroll",l=>t(p.domNode,!0,!1))),this._register(b.addDisposableListener(o.domNode,"scroll",l=>t(o.domNode,!0,!1))),this._register(b.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",l=>t(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const g=this._context.configuration.options,p=g.get(124);this.scrollbarDomNode.setLeft(p.contentLeft),g.get(59).side==="right"?this.scrollbarDomNode.setWidth(p.contentWidth+p.minimap.minimapWidth):this.scrollbarDomNode.setWidth(p.contentWidth),this.scrollbarDomNode.setHeight(p.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(g){this.scrollbar.delegateVerticalScrollbarMouseDown(g)}onConfigurationChanged(g){if(g.hasChanged(87)||g.hasChanged(61)||g.hasChanged(30)){const p=this._context.configuration.options,c=p.get(87),o=p.get(61),s=p.get(30),a=p.get(90),u={handleMouseWheel:c.handleMouseWheel,mouseWheelScrollSensitivity:o,fastScrollSensitivity:s,scrollPredominantAxis:a};this.scrollbar.updateOptions(u)}return g.hasChanged(124)&&this._setLayout(),!0}onScrollChanged(g){return!0}onThemeChanged(g){return this.scrollbar.updateClassName("editor-scrollable "+S.getThemeTypeSelector(this._context.theme.type)),!0}prepareRender(g){}render(g){this.scrollbar.renderNow()}}e.EditorScrollbar=C}),define(Q[585],J([0,1,7,30,90,2,17,8,165,45,38,3,216,244,63,22,11,21,60,365,53,88,326]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const m=140,_=2;class f{constructor(A,B,F){const D=A.options,R=D.get(122),W=D.get(124),x=W.minimap,K=D.get(38),Y=D.get(59);this.renderMinimap=x.renderMinimap,this.size=Y.size,this.minimapHeightIsEditorHeight=x.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=D.get(89),this.showSlider=Y.showSlider,this.pixelRatio=R,this.typicalHalfwidthCharacterWidth=K.typicalHalfwidthCharacterWidth,this.lineHeight=D.get(53),this.minimapLeft=x.minimapLeft,this.minimapWidth=x.minimapWidth,this.minimapHeight=W.height,this.canvasInnerWidth=x.minimapCanvasInnerWidth,this.canvasInnerHeight=x.minimapCanvasInnerHeight,this.canvasOuterWidth=x.minimapCanvasOuterWidth,this.canvasOuterHeight=x.minimapCanvasOuterHeight,this.isSampling=x.minimapIsSampling,this.editorHeight=W.height,this.fontScale=x.minimapScale,this.minimapLineHeight=x.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=h.once(()=>t.MinimapCharRendererFactory.create(this.fontScale,K.fontFamily)),this.backgroundColor=f._getMinimapBackground(B,F)}static _getMinimapBackground(A,B){const F=A.getColor(u.minimapBackground);return F?new o.RGBA8(F.rgba.r,F.rgba.g,F.rgba.b,F.rgba.a):B.getColor(2)}equals(A){return this.renderMinimap===A.renderMinimap&&this.size===A.size&&this.minimapHeightIsEditorHeight===A.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===A.scrollBeyondLastLine&&this.showSlider===A.showSlider&&this.pixelRatio===A.pixelRatio&&this.typicalHalfwidthCharacterWidth===A.typicalHalfwidthCharacterWidth&&this.lineHeight===A.lineHeight&&this.minimapLeft===A.minimapLeft&&this.minimapWidth===A.minimapWidth&&this.minimapHeight===A.minimapHeight&&this.canvasInnerWidth===A.canvasInnerWidth&&this.canvasInnerHeight===A.canvasInnerHeight&&this.canvasOuterWidth===A.canvasOuterWidth&&this.canvasOuterHeight===A.canvasOuterHeight&&this.isSampling===A.isSampling&&this.editorHeight===A.editorHeight&&this.fontScale===A.fontScale&&this.minimapLineHeight===A.minimapLineHeight&&this.minimapCharWidth===A.minimapCharWidth&&this.backgroundColor&&this.backgroundColor.equals(A.backgroundColor)}}class v{constructor(A,B,F,D,R,W,x,K){this.scrollTop=A,this.scrollHeight=B,this.sliderNeeded=F,this._computedSliderRatio=D,this.sliderTop=R,this.sliderHeight=W,this.startLineNumber=x,this.endLineNumber=K}getDesiredScrollTopFromDelta(A){return Math.round(this.scrollTop+A/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(A){return Math.round((A-this.sliderHeight/2)/this._computedSliderRatio)}static create(A,B,F,D,R,W,x,K,Y,ee,se){const ne=A.pixelRatio,le=A.minimapLineHeight,X=Math.floor(A.canvasInnerHeight/le),z=A.lineHeight;if(A.minimapHeightIsEditorHeight){const ie=K*A.lineHeight+(A.scrollBeyondLastLine?R-A.lineHeight:0),oe=Math.max(1,Math.floor(R*R/ie)),ae=Math.max(0,A.minimapHeight-oe),G=ae/(ee-R),j=Y*G,te=ae>0,Z=Math.floor(A.canvasInnerHeight/A.minimapLineHeight);return new v(Y,ee,te,G,j,oe,1,Math.min(x,Z))}let P;if(W&&F!==x){const ie=F-B+1;P=Math.floor(ie*le/ne)}else{const ie=R/z;P=Math.floor(ie*le/ne)}let V;A.scrollBeyondLastLine?V=(x-1)*le/ne:V=Math.max(0,x*le/ne-P),V=Math.min(A.minimapHeight-P,V);const U=V/(ee-R),H=Y*U;let $=0;if(A.scrollBeyondLastLine&&($=R/z-1),X>=x+$){const ie=1,oe=x,ae=V>0;return new v(Y,ee,ae,U,H,P,ie,oe)}else{let ie=Math.max(1,Math.floor(B-H*ne/le));se&&se.scrollHeight===ee&&(se.scrollTop>Y&&(ie=Math.min(ie,se.startLineNumber)),se.scrollTop<Y&&(ie=Math.max(ie,se.startLineNumber)));const oe=Math.min(x,ie+X-1),ae=(Y-D)/z,G=(B-ie+ae)*le/ne;return new v(Y,ee,!0,U,G,P,ie,oe)}}}class y{constructor(A){this.dy=A}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}y.INVALID=new y(-1);class L{constructor(A,B,F){this.renderedLayout=A,this._imageData=B,this._renderedLines=new d.RenderedLinesCollection(()=>y.INVALID),this._renderedLines._set(A.startLineNumber,F)}linesEquals(A){if(!this.scrollEquals(A))return!1;const F=this._renderedLines._get().lines;for(let D=0,R=F.length;D<R;D++)if(F[D].dy===-1)return!1;return!0}scrollEquals(A){return this.renderedLayout.startLineNumber===A.startLineNumber&&this.renderedLayout.endLineNumber===A.endLineNumber}_get(){const A=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:A.rendLineNumberStart,lines:A.lines}}onLinesChanged(A,B){return this._renderedLines.onLinesChanged(A,B)}onLinesDeleted(A,B){this._renderedLines.onLinesDeleted(A,B)}onLinesInserted(A,B){this._renderedLines.onLinesInserted(A,B)}onTokensChanged(A){return this._renderedLines.onTokensChanged(A)}}class I{constructor(A,B,F,D){this._backgroundFillData=I._createBackgroundFillData(B,F,D),this._buffers=[A.createImageData(B,F),A.createImageData(B,F)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const A=this._buffers[this._lastUsedBuffer];return A.data.set(this._backgroundFillData),A}static _createBackgroundFillData(A,B,F){const D=F.r,R=F.g,W=F.b,x=new Uint8ClampedArray(A*B*4);let K=0;for(let Y=0;Y<B;Y++)for(let ee=0;ee<A;ee++)x[K]=D,x[K+1]=R,x[K+2]=W,x[K+3]=255,K+=4;return x}}class k{constructor(A,B){this.samplingRatio=A,this.minimapLines=B}static compute(A,B,F){if(A.renderMinimap===0||!A.isSampling)return[null,[]];const D=A.pixelRatio,R=A.lineHeight,W=A.scrollBeyondLastLine,{minimapLineCount:x}=p.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:B,scrollBeyondLastLine:W,height:A.editorHeight,lineHeight:R,pixelRatio:D}),K=B/x,Y=K/2;if(!F||F.minimapLines.length===0){let H=[];if(H[0]=1,x>1){for(let $=0,ie=x-1;$<ie;$++)H[$]=Math.round($*K+Y);H[x-1]=B}return[new k(K,H),[]]}const ee=F.minimapLines,se=ee.length;let ne=[],le=0,X=0,z=1;const P=10;let V=[],U=null;for(let H=0;H<x;H++){const $=Math.max(z,Math.round(H*K)),ie=Math.max($,Math.round((H+1)*K));for(;le<se&&ee[le]<$;){if(V.length<P){const ae=le+1+X;U&&U.type==="deleted"&&U._oldIndex===le-1?U.deleteToLineNumber++:(U={type:"deleted",_oldIndex:le,deleteFromLineNumber:ae,deleteToLineNumber:ae},V.push(U)),X--}le++}let oe;if(le<se&&ee[le]<=ie)oe=ee[le],le++;else if(H===0?oe=1:H+1===x?oe=B:oe=Math.round(H*K+Y),V.length<P){const ae=le+1+X;U&&U.type==="inserted"&&U._i===H-1?U.insertToLineNumber++:(U={type:"inserted",_i:H,insertFromLineNumber:ae,insertToLineNumber:ae},V.push(U)),X++}ne[H]=oe,z=oe}if(V.length<P)for(;le<se;){const H=le+1+X;U&&U.type==="deleted"&&U._oldIndex===le-1?U.deleteToLineNumber++:(U={type:"deleted",_oldIndex:le,deleteFromLineNumber:H,deleteToLineNumber:H},V.push(U)),X--,le++}else V=[{type:"flush"}];return[new k(K,ne),V]}modelLineToMinimapLine(A){return Math.min(this.minimapLines.length,Math.max(1,Math.round(A/this.samplingRatio)))}modelLineRangeToMinimapLineRange(A,B){let F=this.modelLineToMinimapLine(A)-1;for(;F>0&&this.minimapLines[F-1]>=A;)F--;let D=this.modelLineToMinimapLine(B)-1;for(;D+1<this.minimapLines.length&&this.minimapLines[D+1]<=B;)D++;if(F===D){const R=this.minimapLines[F];if(R<A||R>B)return null}return[F+1,D+1]}decorationLineRangeToMinimapLineRange(A,B){let F=this.modelLineToMinimapLine(A),D=this.modelLineToMinimapLine(B);return A!==B&&D===F&&(D===this.minimapLines.length?F>1&&F--:D++),[F,D]}onLinesDeleted(A){const B=A.toLineNumber-A.fromLineNumber+1;let F=this.minimapLines.length,D=0;for(let R=this.minimapLines.length-1;R>=0&&!(this.minimapLines[R]<A.fromLineNumber);R--)this.minimapLines[R]<=A.toLineNumber?(this.minimapLines[R]=Math.max(1,A.fromLineNumber-1),F=Math.min(F,R),D=Math.max(D,R)):this.minimapLines[R]-=B;return[F,D]}onLinesInserted(A){const B=A.toLineNumber-A.fromLineNumber+1;for(let F=this.minimapLines.length-1;F>=0&&!(this.minimapLines[F]<A.fromLineNumber);F--)this.minimapLines[F]+=B}}class E extends g.ViewPart{constructor(A){super(A);this.tokensColorTracker=s.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new f(this._context.configuration,this._context.theme,this.tokensColorTracker);const[B]=k.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=B,this._shouldCheckSampling=!1,this._actual=new T(A.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const A=new f(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(A)?!1:(this.options=A,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(A){return this._onOptionsMaybeChanged()}onCursorStateChanged(A){return this._selections=A.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(A){return A.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(A){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(A){if(this._samplingState){const B=this._samplingState.modelLineRangeToMinimapLineRange(A.fromLineNumber,A.toLineNumber);return B?this._actual.onLinesChanged(B[0],B[1]):!1}else return this._actual.onLinesChanged(A.fromLineNumber,A.toLineNumber)}onLinesDeleted(A){if(this._samplingState){const[B,F]=this._samplingState.onLinesDeleted(A);return B<=F&&this._actual.onLinesChanged(B+1,F+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(A.fromLineNumber,A.toLineNumber)}onLinesInserted(A){return this._samplingState?(this._samplingState.onLinesInserted(A),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(A.fromLineNumber,A.toLineNumber)}onScrollChanged(A){return this._actual.onScrollChanged()}onThemeChanged(A){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(A){if(this._samplingState){let B=[];for(const F of A.ranges){const D=this._samplingState.modelLineRangeToMinimapLineRange(F.fromLineNumber,F.toLineNumber);D&&B.push({fromLineNumber:D[0],toLineNumber:D[1]})}return B.length?this._actual.onTokensChanged(B):!1}else return this._actual.onTokensChanged(A.ranges)}onTokensColorsChanged(A){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(A){return this._actual.onZonesChanged()}prepareRender(A){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(A){let B=A.visibleRange.startLineNumber,F=A.visibleRange.endLineNumber;this._samplingState&&(B=this._samplingState.modelLineToMinimapLine(B),F=this._samplingState.modelLineToMinimapLine(F));const D={viewportContainsWhitespaceGaps:A.viewportData.whitespaceViewportData.length>0,scrollWidth:A.scrollWidth,scrollHeight:A.scrollHeight,viewportStartLineNumber:B,viewportEndLineNumber:F,viewportStartLineNumberVerticalOffset:A.getVerticalOffsetForLineNumber(B),scrollTop:A.scrollTop,scrollLeft:A.scrollLeft,viewportWidth:A.viewportWidth,viewportHeight:A.viewportHeight};this._actual.render(D)}_recreateLineSampling(){this._minimapSelections=null;const A=Boolean(this._samplingState),[B,F]=k.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=B,A&&this._samplingState)for(const D of F)switch(D.type){case"deleted":this._actual.onLinesDeleted(D.deleteFromLineNumber,D.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(D.insertFromLineNumber,D.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(A){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[A-1]):this._context.model.getLineContent(A)}getMinimapLinesRenderingData(A,B,F){if(this._samplingState){let D=[];for(let R=0,W=B-A+1;R<W;R++)F[R]?D[R]=this._context.model.getViewLineData(this._samplingState.minimapLines[A+R-1]):D[R]=null;return D}return this._context.model.getMinimapLinesRenderingData(A,B,F).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const A of this._selections){const[B,F]=this._samplingState.decorationLineRangeToMinimapLineRange(A.startLineNumber,A.endLineNumber);this._minimapSelections.push(new i.Selection(B,A.startColumn,F,A.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(A,B){let F;if(this._samplingState){const R=this._samplingState.minimapLines[A-1],W=this._samplingState.minimapLines[B-1];F=new c.Range(R,1,W,this._context.model.getLineMaxColumn(W))}else F=new c.Range(A,1,B,this._context.model.getLineMaxColumn(B));const D=this._context.model.getDecorationsInViewport(F);if(this._samplingState){let R=[];for(const W of D)if(!!W.options.minimap){const x=W.range,K=this._samplingState.modelLineToMinimapLine(x.startLineNumber),Y=this._samplingState.modelLineToMinimapLine(x.endLineNumber);R.push(new a.ViewModelDecoration(new c.Range(K,x.startColumn,Y,x.endColumn),W.options))}return R}return D}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(A){this._samplingState&&(A=this._samplingState.minimapLines[A-1]),this._context.model.revealRange("mouse",!1,new c.Range(A,1,A,1),1,0)}setScrollTop(A){this._context.model.setScrollPosition({scrollTop:A},1)}}e.Minimap=E;class T extends w.Disposable{constructor(A,B){super();this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=A,this._model=B,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(u.minimapSelection),this._domNode=N.createFastDomNode(document.createElement("div")),g.PartFingerprints.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=N.createFastDomNode(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=N.createFastDomNode(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=N.createFastDomNode(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=N.createFastDomNode(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=N.createFastDomNode(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=b.addStandardDisposableListener(this._domNode.domNode,"mousedown",F=>{if(F.preventDefault(),this._model.options.renderMinimap!==0&&!!this._lastRenderData){if(this._model.options.size!=="proportional"){if(F.leftButton&&this._lastRenderData){const Y=b.getDomNodePagePosition(this._slider.domNode),ee=Y.top+Y.height/2;this._startSliderDragging(F.buttons,F.posx,ee,F.posy,this._lastRenderData.renderedLayout)}return}const R=this._model.options.minimapLineHeight,W=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*F.browserEvent.offsetY;let K=Math.floor(W/R)+this._lastRenderData.renderedLayout.startLineNumber;K=Math.min(K,this._model.getLineCount()),this._model.revealLineNumber(K)}}),this._sliderMouseMoveMonitor=new M.GlobalMouseMoveMonitor,this._sliderMouseDownListener=b.addStandardDisposableListener(this._slider.domNode,"mousedown",F=>{F.preventDefault(),F.stopPropagation(),F.leftButton&&this._lastRenderData&&this._startSliderDragging(F.buttons,F.posx,F.posy,F.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=n.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=b.addDisposableListener(this._domNode.domNode,n.EventType.Start,F=>{F.preventDefault(),F.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(F))},{passive:!1}),this._sliderTouchMoveListener=b.addDisposableListener(this._domNode.domNode,n.EventType.Change,F=>{F.preventDefault(),F.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(F)},{passive:!1}),this._sliderTouchEndListener=b.addStandardDisposableListener(this._domNode.domNode,n.EventType.End,F=>{F.preventDefault(),F.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(A,B,F,D,R){this._slider.toggleClassName("active",!0);const W=(x,K)=>{const Y=Math.abs(K-B);if(S.isWindows&&Y>m){this._model.setScrollTop(R.scrollTop);return}const ee=x-F;this._model.setScrollTop(R.getDesiredScrollTopFromDelta(ee))};D!==F&&W(D,B),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,A,M.standardMouseMoveMerger,x=>W(x.posy,x.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(A){const B=this._domNode.domNode.getBoundingClientRect().top,F=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(A.pageY-B);this._model.setScrollTop(F)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new I(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(A,B){return this._lastRenderData?this._lastRenderData.onLinesChanged(A,B):!1}onLinesDeleted(A,B){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(A,B),!0}onLinesInserted(A,B){return this._lastRenderData&&this._lastRenderData.onLinesInserted(A,B),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(u.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(A){return this._lastRenderData?this._lastRenderData.onTokensChanged(A):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(A){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}A.scrollLeft+A.viewportWidth>=A.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const F=v.create(this._model.options,A.viewportStartLineNumber,A.viewportEndLineNumber,A.viewportStartLineNumberVerticalOffset,A.viewportHeight,A.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),A.scrollTop,A.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(F.sliderNeeded?"block":"none"),this._slider.setTop(F.sliderTop),this._slider.setHeight(F.sliderHeight);const D=A.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,R=Math.min(this._model.options.minimapWidth,Math.round(D*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(R),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-R),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(F.sliderHeight),this.renderDecorations(F),this._lastRenderData=this.renderLines(F)}renderDecorations(A){if(this._renderDecorations){this._renderDecorations=!1;const B=this._model.getSelections(),F=this._model.getMinimapDecorationsInViewport(A.startLineNumber,A.endLineNumber),{canvasInnerWidth:D,canvasInnerHeight:R}=this._model.options,W=this._model.options.minimapLineHeight,x=this._model.options.minimapCharWidth,K=this._model.getOptions().tabSize,Y=this._decorationsCanvas.domNode.getContext("2d");Y.clearRect(0,0,D,R);const ee=new Map;for(let se=0;se<B.length;se++){const ne=B[se];for(let le=ne.startLineNumber;le<=ne.endLineNumber;le++)this.renderDecorationOnLine(Y,ee,ne,this._selectionColor,A,le,W,W,K,x)}for(let se=0;se<F.length;se++){const ne=F[se];if(!!ne.options.minimap){const le=ne.options.minimap.getColor(this._theme);for(let X=ne.range.startLineNumber;X<=ne.range.endLineNumber;X++)switch(ne.options.minimap.position){case l.MinimapPosition.Inline:this.renderDecorationOnLine(Y,ee,ne.range,le,A,X,W,W,K,x);continue;case l.MinimapPosition.Gutter:const z=(X-A.startLineNumber)*W,P=2;this.renderDecoration(Y,le,P,z,_,W);continue}}}}}renderDecorationOnLine(A,B,F,D,R,W,x,K,Y,ee){const se=(W-R.startLineNumber)*K;if(!(se+x<0||se>this._model.options.canvasInnerHeight)){let ne=B.get(W);const le=!ne;if(!ne){const $=this._model.getLineContent(W);ne=[p.MINIMAP_GUTTER_WIDTH];for(let ie=1;ie<$.length+1;ie++){const oe=$.charCodeAt(ie-1),ae=oe===9?Y*ee:C.isFullWidthCharacter(oe)?2*ee:ee;ne[ie]=ne[ie-1]+ae}B.set(W,ne)}const{startColumn:X,endColumn:z,startLineNumber:P,endLineNumber:V}=F,U=P===W?ne[X-1]:p.MINIMAP_GUTTER_WIDTH,H=V>W?ne.length-1:z-1;if(H>0){const $=ne[H]-U||2;this.renderDecoration(A,D,U,se,$,x)}le&&this.renderLineHighlight(A,D,se,x)}}renderLineHighlight(A,B,F,D){A.fillStyle=B&&B.transparent(.5).toString()||"",A.fillRect(p.MINIMAP_GUTTER_WIDTH,F,A.canvas.width,D)}renderDecoration(A,B,F,D,R,W){A.fillStyle=B&&B.toString()||"",A.fillRect(F,D,R,W)}renderLines(A){const B=A.startLineNumber,F=A.endLineNumber,D=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(A)){const Z=this._lastRenderData._get();return new L(A,Z.imageData,Z.lines)}const R=this._getBuffer();if(!R)return null;let[W,x,K]=T._renderUntouchedLines(R,B,F,D,this._lastRenderData);const Y=this._model.getMinimapLinesRenderingData(B,F,K),ee=this._model.getOptions().tabSize,se=this._model.options.backgroundColor,ne=this._model.tokensColorTracker,le=ne.backgroundIsLight(),X=this._model.options.renderMinimap,z=this._model.options.charRenderer(),P=this._model.options.fontScale,V=this._model.options.minimapCharWidth,H=(X===1?2:2+1)*P,$=D>H?Math.floor((D-H)/2):0;let ie=0;const oe=[];for(let Z=0,ue=F-B+1;Z<ue;Z++)K[Z]&&T._renderLine(R,se,le,X,V,ne,z,ie,$,ee,Y[Z],P,D),oe[Z]=new y(ie),ie+=D;const ae=W===-1?0:W,j=(x===-1?R.height:x)-ae;return this._canvas.domNode.getContext("2d").putImageData(R,0,0,0,ae,R.width,j),new L(A,R,oe)}static _renderUntouchedLines(A,B,F,D,R){const W=[];if(!R){for(let G=0,j=F-B+1;G<j;G++)W[G]=!0;return[-1,-1,W]}const x=R._get(),K=x.imageData.data,Y=x.rendLineNumberStart,ee=x.lines,se=ee.length,ne=A.width,le=A.data,X=(F-B+1)*D*ne*4;let z=-1,P=-1,V=-1,U=-1,H=-1,$=-1,ie=0;for(let G=B;G<=F;G++){const j=G-B,te=G-Y,Z=te>=0&&te<se?ee[te].dy:-1;if(Z===-1){W[j]=!0,ie+=D;continue}const ue=Z*ne*4,he=(Z+D)*ne*4,re=ie*ne*4,ce=(ie+D)*ne*4;U===ue&&$===re?(U=he,$=ce):(V!==-1&&(le.set(K.subarray(V,U),H),z===-1&&V===0&&V===H&&(z=U),P===-1&&U===X&&V===H&&(P=V)),V=ue,U=he,H=re,$=ce),W[j]=!1,ie+=D}V!==-1&&(le.set(K.subarray(V,U),H),z===-1&&V===0&&V===H&&(z=U),P===-1&&U===X&&V===H&&(P=V));const oe=z===-1?-1:z/(ne*4),ae=P===-1?-1:P/(ne*4);return[oe,ae,W]}static _renderLine(A,B,F,D,R,W,x,K,Y,ee,se,ne,le){const X=se.content,z=se.tokens,P=A.width-R,V=le===1;let U=p.MINIMAP_GUTTER_WIDTH,H=0,$=0;for(let ie=0,oe=z.getCount();ie<oe;ie++){const ae=z.getEndOffset(ie),G=z.getForeground(ie),j=W.getColor(G);for(;H<ae;H++){if(U>P)return;const te=X.charCodeAt(H);if(te===9){const Z=ee-(H+$)%ee;$+=Z-1,U+=Z*R}else if(te===32)U+=R;else{const Z=C.isFullWidthCharacter(te)?2:1;for(let ue=0;ue<Z;ue++)if(D===2?x.blockRenderChar(A,U,K+Y,j,B,F,V):x.renderChar(A,U,K+Y,te,j,B,ne,F,V),U+=R,U>P)return}}}}}r.registerThemingParticipant((O,A)=>{const B=O.getColor(u.minimapBackground);B&&A.addRule(`.monaco-editor .minimap > canvas { opacity: ${B.rgba.a}; will-change: opacity; }`);const F=O.getColor(u.minimapSliderBackground);F&&A.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${F}; }`);const D=O.getColor(u.minimapSliderHoverBackground);D&&A.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${D}; }`);const R=O.getColor(u.minimapSliderActiveBackground);R&&A.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${R}; }`);const W=O.getColor(u.scrollbarShadow);W&&A.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${W} -6px 0 6px -6px inset; }`)})}),define(Q[586],J([0,1,30,45,22,11,329]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class S extends N.ViewPart{constructor(d){super(d);this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const p=this._context.configuration.options.get(87);this._useShadows=p.useShadows,this._domNode=b.createFastDomNode(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const d=this._useShadows&&this._scrollTop>0;return this._shouldShow!==d?(this._shouldShow=d,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const g=this._context.configuration.options.get(124);g.minimap.renderMinimap===0||g.minimap.minimapWidth>0&&g.minimap.minimapLeft===0?this._width=g.width:this._width=g.width-g.minimap.minimapWidth-g.verticalScrollbarWidth}onConfigurationChanged(d){const p=this._context.configuration.options.get(87);return this._useShadows=p.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(d){return this._scrollTop=d.scrollTop,this._updateShouldShow()}prepareRender(d){}render(d){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=S,w.registerThemingParticipant((C,d)=>{const g=C.getColor(M.scrollbarShadow);g&&d.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${g} 0 6px 6px -6px inset; }`)})}),define(Q[587],J([0,1,94,22,11,330]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;class w{constructor(o){this.left=o.left,this.width=o.width,this.startStyle=null,this.endStyle=null}}class S{constructor(o,s){this.lineNumber=o,this.ranges=s}}function C(c){return new w(c)}function d(c){return new S(c.lineNumber,c.ranges.map(C))}class g extends b.DynamicViewOverlay{constructor(o){super();this._previousFrameVisibleRangesWithStyle=[],this._context=o;const s=this._context.configuration.options;this._lineHeight=s.get(53),this._roundedSelection=s.get(85),this._typicalHalfwidthCharacterWidth=s.get(38).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const s=this._context.configuration.options;return this._lineHeight=s.get(53),this._roundedSelection=s.get(85),this._typicalHalfwidthCharacterWidth=s.get(38).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(o){return this._selections=o.selections.slice(0),!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_visibleRangesHaveGaps(o){for(let s=0,a=o.length;s<a;s++)if(o[s].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(o,s,a){const u=this._typicalHalfwidthCharacterWidth/4;let r=null,i=null;if(a&&a.length>0&&s.length>0){const n=s[0].lineNumber;if(n===o.startLineNumber)for(let l=0;!r&&l<a.length;l++)a[l].lineNumber===n&&(r=a[l].ranges[0]);const t=s[s.length-1].lineNumber;if(t===o.endLineNumber)for(let l=a.length-1;!i&&l>=0;l--)a[l].lineNumber===t&&(i=a[l].ranges[0]);r&&!r.startStyle&&(r=null),i&&!i.startStyle&&(i=null)}for(let n=0,t=s.length;n<t;n++){const l=s[n].ranges[0],h=l.left,m=l.left+l.width,_={top:0,bottom:0},f={top:0,bottom:0};if(n>0){const v=s[n-1].ranges[0].left,y=s[n-1].ranges[0].left+s[n-1].ranges[0].width;p(h-v)<u?_.top=2:h>v&&(_.top=1),p(m-y)<u?f.top=2:v<m&&m<y&&(f.top=1)}else r&&(_.top=r.startStyle.top,f.top=r.endStyle.top);if(n+1<t){const v=s[n+1].ranges[0].left,y=s[n+1].ranges[0].left+s[n+1].ranges[0].width;p(h-v)<u?_.bottom=2:v<h&&h<y&&(_.bottom=1),p(m-y)<u?f.bottom=2:m<y&&(f.bottom=1)}else i&&(_.bottom=i.startStyle.bottom,f.bottom=i.endStyle.bottom);l.startStyle=_,l.endStyle=f}}_getVisibleRangesWithStyle(o,s,a){const r=(s.linesVisibleRangesForRange(o,!0)||[]).map(d);return!this._visibleRangesHaveGaps(r)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(s.visibleRange,r,a),r}_createSelectionPiece(o,s,a,u,r){return'<div class="cslr '+a+'" style="top:'+o.toString()+"px;left:"+u.toString()+"px;width:"+r.toString()+"px;height:"+s+'px;"></div>'}_actualRenderOneSelection(o,s,a,u){if(u.length!==0){const r=!!u[0].ranges[0].startStyle,i=this._lineHeight.toString(),n=(this._lineHeight-1).toString(),t=u[0].lineNumber,l=u[u.length-1].lineNumber;for(let h=0,m=u.length;h<m;h++){const _=u[h],f=_.lineNumber,v=f-s,y=a&&(f===l||f===t)?n:i,L=a&&f===t?1:0;let I="",k="";for(let E=0,T=_.ranges.length;E<T;E++){const O=_.ranges[E];if(r){const B=O.startStyle,F=O.endStyle;if(B.top===1||B.bottom===1){I+=this._createSelectionPiece(L,y,g.SELECTION_CLASS_NAME,O.left-g.ROUNDED_PIECE_WIDTH,g.ROUNDED_PIECE_WIDTH);let D=g.EDITOR_BACKGROUND_CLASS_NAME;B.top===1&&(D+=" "+g.SELECTION_TOP_RIGHT),B.bottom===1&&(D+=" "+g.SELECTION_BOTTOM_RIGHT),I+=this._createSelectionPiece(L,y,D,O.left-g.ROUNDED_PIECE_WIDTH,g.ROUNDED_PIECE_WIDTH)}if(F.top===1||F.bottom===1){I+=this._createSelectionPiece(L,y,g.SELECTION_CLASS_NAME,O.left+O.width,g.ROUNDED_PIECE_WIDTH);let D=g.EDITOR_BACKGROUND_CLASS_NAME;F.top===1&&(D+=" "+g.SELECTION_TOP_LEFT),F.bottom===1&&(D+=" "+g.SELECTION_BOTTOM_LEFT),I+=this._createSelectionPiece(L,y,D,O.left+O.width,g.ROUNDED_PIECE_WIDTH)}}let A=g.SELECTION_CLASS_NAME;if(r){const B=O.startStyle,F=O.endStyle;B.top===0&&(A+=" "+g.SELECTION_TOP_LEFT),B.bottom===0&&(A+=" "+g.SELECTION_BOTTOM_LEFT),F.top===0&&(A+=" "+g.SELECTION_TOP_RIGHT),F.bottom===0&&(A+=" "+g.SELECTION_BOTTOM_RIGHT)}k+=this._createSelectionPiece(L,y,A,O.left,O.width)}o[v][0]+=I,o[v][1]+=k}}}prepareRender(o){const s=[],a=o.visibleRange.startLineNumber,u=o.visibleRange.endLineNumber;for(let i=a;i<=u;i++){const n=i-a;s[n]=["",""]}const r=[];for(let i=0,n=this._selections.length;i<n;i++){const t=this._selections[i];if(t.isEmpty()){r[i]=null;continue}const l=this._getVisibleRangesWithStyle(t,o,this._previousFrameVisibleRangesWithStyle[i]);r[i]=l,this._actualRenderOneSelection(s,a,this._selections.length>1,l)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=s.map(([i,n])=>i+n)}render(o,s){if(!this._renderResult)return"";const a=s-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}e.SelectionsOverlay=g,g.SELECTION_CLASS_NAME="selected-text",g.SELECTION_TOP_LEFT="top-left-radius",g.SELECTION_BOTTOM_LEFT="bottom-left-radius",g.SELECTION_TOP_RIGHT="top-right-radius",g.SELECTION_BOTTOM_RIGHT="bottom-right-radius",g.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",g.ROUNDED_PIECE_WIDTH=10,M.registerThemingParticipant((c,o)=>{const s=c.getColor(N.editorSelectionBackground);s&&o.addRule(`.monaco-editor .focused .selected-text { background-color: ${s}; }`);const a=c.getColor(N.editorInactiveSelection);a&&o.addRule(`.monaco-editor .selected-text { background-color: ${a}; }`);const u=c.getColor(N.editorSelectionForeground);u&&!u.isTransparent()&&o.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${u}; }`)});function p(c){return c<0?-c:c}}),define(Q[49],J([0,1,460,29,22,11]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.overviewRulerInfo=e.overviewRulerWarning=e.overviewRulerError=e.overviewRulerRangeHighlight=e.editorUnnecessaryCodeOpacity=e.editorUnnecessaryCodeBorder=e.editorGutter=e.editorOverviewRulerBackground=e.editorOverviewRulerBorder=e.editorBracketMatchBorder=e.editorBracketMatchBackground=e.editorCodeLensForeground=e.editorRuler=e.editorActiveLineNumber=e.editorLineNumbers=e.editorActiveIndentGuides=e.editorIndentGuides=e.editorWhitespaces=e.editorCursorBackground=e.editorCursorForeground=e.editorSymbolHighlightBorder=e.editorSymbolHighlight=e.editorRangeHighlightBorder=e.editorRangeHighlight=e.editorLineHighlightBorder=e.editorLineHighlight=void 0,e.editorLineHighlight=M.registerColor("editor.lineHighlightBackground",{dark:null,light:null,hc:null},b.localize(0,null)),e.editorLineHighlightBorder=M.registerColor("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},b.localize(1,null)),e.editorRangeHighlight=M.registerColor("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},b.localize(2,null),!0),e.editorRangeHighlightBorder=M.registerColor("editor.rangeHighlightBorder",{dark:null,light:null,hc:M.activeContrastBorder},b.localize(3,null),!0),e.editorSymbolHighlight=M.registerColor("editor.symbolHighlightBackground",{dark:M.editorFindMatchHighlight,light:M.editorFindMatchHighlight,hc:null},b.localize(4,null),!0),e.editorSymbolHighlightBorder=M.registerColor("editor.symbolHighlightBorder",{dark:null,light:null,hc:M.activeContrastBorder},b.localize(5,null),!0),e.editorCursorForeground=M.registerColor("editorCursor.foreground",{dark:"#AEAFAD",light:N.Color.black,hc:N.Color.white},b.localize(6,null)),e.editorCursorBackground=M.registerColor("editorCursor.background",null,b.localize(7,null)),e.editorWhitespaces=M.registerColor("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},b.localize(8,null)),e.editorIndentGuides=M.registerColor("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hc:e.editorWhitespaces},b.localize(9,null)),e.editorActiveIndentGuides=M.registerColor("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hc:e.editorWhitespaces},b.localize(10,null)),e.editorLineNumbers=M.registerColor("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:N.Color.white},b.localize(11,null));const S=M.registerColor("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:M.activeContrastBorder},b.localize(12,null),!1,b.localize(13,null));e.editorActiveLineNumber=M.registerColor("editorLineNumber.activeForeground",{dark:S,light:S,hc:S},b.localize(14,null)),e.editorRuler=M.registerColor("editorRuler.foreground",{dark:"#5A5A5A",light:N.Color.lightgrey,hc:N.Color.white},b.localize(15,null)),e.editorCodeLensForeground=M.registerColor("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},b.localize(16,null)),e.editorBracketMatchBackground=M.registerColor("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},b.localize(17,null)),e.editorBracketMatchBorder=M.registerColor("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:M.contrastBorder},b.localize(18,null)),e.editorOverviewRulerBorder=M.registerColor("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},b.localize(19,null)),e.editorOverviewRulerBackground=M.registerColor("editorOverviewRuler.background",null,b.localize(20,null)),e.editorGutter=M.registerColor("editorGutter.background",{dark:M.editorBackground,light:M.editorBackground,hc:M.editorBackground},b.localize(21,null)),e.editorUnnecessaryCodeBorder=M.registerColor("editorUnnecessaryCode.border",{dark:null,light:null,hc:N.Color.fromHex("#fff").transparent(.8)},b.localize(22,null)),e.editorUnnecessaryCodeOpacity=M.registerColor("editorUnnecessaryCode.opacity",{dark:N.Color.fromHex("#000a"),light:N.Color.fromHex("#0007"),hc:null},b.localize(23,null));const C=new N.Color(new N.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=M.registerColor("editorOverviewRuler.rangeHighlightForeground",{dark:C,light:C,hc:C},b.localize(24,null),!0),e.overviewRulerError=M.registerColor("editorOverviewRuler.errorForeground",{dark:new N.Color(new N.RGBA(255,18,18,.7)),light:new N.Color(new N.RGBA(255,18,18,.7)),hc:new N.Color(new N.RGBA(255,50,50,1))},b.localize(25,null)),e.overviewRulerWarning=M.registerColor("editorOverviewRuler.warningForeground",{dark:M.editorWarningForeground,light:M.editorWarningForeground,hc:M.editorWarningBorder},b.localize(26,null)),e.overviewRulerInfo=M.registerColor("editorOverviewRuler.infoForeground",{dark:M.editorInfoForeground,light:M.editorInfoForeground,hc:M.editorInfoBorder},b.localize(27,null)),w.registerThemingParticipant((d,g)=>{const p=d.getColor(M.editorBackground);p&&g.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${p}; }`);const c=d.getColor(M.editorForeground);c&&g.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${c}; }`);const o=d.getColor(e.editorGutter);o&&g.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const s=d.getColor(e.editorRangeHighlight);s&&g.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const a=d.getColor(e.editorRangeHighlightBorder);a&&g.addRule(`.monaco-editor .rangeHighlight { border: 1px ${d.type==="hc"?"dotted":"solid"} ${a}; }`);const u=d.getColor(e.editorSymbolHighlight);u&&g.addRule(`.monaco-editor .symbolHighlight { background-color: ${u}; }`);const r=d.getColor(e.editorSymbolHighlightBorder);r&&g.addRule(`.monaco-editor .symbolHighlight { border: 1px ${d.type==="hc"?"dotted":"solid"} ${r}; }`);const i=d.getColor(e.editorWhitespaces);i&&(g.addRule(`.monaco-editor .mtkw { color: ${i} !important; }`),g.addRule(`.monaco-editor .mtkz { color: ${i} !important; }`))})}),define(Q[588],J([0,1,94,49,19,11,21,318]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;let C=!0;class d extends b.DynamicViewOverlay{constructor(o){super();this._context=o;const s=this._context.configuration.options,a=s.get(124);this._lineHeight=s.get(53),this._renderLineHighlight=s.get(80),this._renderLineHighlightOnlyWhenFocus=s.get(81),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new S.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let o=!1;const s=C?this._selections.slice(0,1):this._selections,a=s.map(r=>r.positionLineNumber);a.sort((r,i)=>r-i),M.equals(this._cursorLineNumbers,a)||(this._cursorLineNumbers=a,o=!0);const u=s.every(r=>r.isEmpty());return this._selectionIsEmpty!==u&&(this._selectionIsEmpty=u,o=!0),o}onThemeChanged(o){return this._readFromSelections()}onConfigurationChanged(o){const s=this._context.configuration.options,a=s.get(124);return this._lineHeight=s.get(53),this._renderLineHighlight=s.get(80),this._renderLineHighlightOnlyWhenFocus=s.get(81),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,!0}onCursorStateChanged(o){return this._selections=o.selections,this._readFromSelections()}onFlushed(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollWidthChanged||o.scrollTopChanged}onZonesChanged(o){return!0}onFocusChanged(o){return this._renderLineHighlightOnlyWhenFocus?(this._focused=o.isFocused,!0):!1}prepareRender(o){if(!this._shouldRenderThis()){this._renderData=null;return}const s=this._renderOne(o),a=o.visibleRange.startLineNumber,u=o.visibleRange.endLineNumber,r=this._cursorLineNumbers.length;let i=0;const n=[];for(let t=a;t<=u;t++){const l=t-a;for(;i<r&&this._cursorLineNumbers[i]<t;)i++;i<r&&this._cursorLineNumbers[i]===t?n[l]=s:n[l]=""}this._renderData=n}render(o,s){if(!this._renderData)return"";const a=s-o;return a>=this._renderData.length?"":this._renderData[a]}}e.AbstractLineHighlightOverlay=d;class g extends d{_renderOne(o){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(o.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.CurrentLineHighlightOverlay=g;class p extends d{_renderOne(o){return`<div class="${"current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.CurrentLineMarginHighlightOverlay=p,w.registerThemingParticipant((c,o)=>{C=!1;const s=c.getColor(N.editorLineHighlight);if(s&&(o.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${s}; }`),o.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${s}; border: none; }`)),!s||s.isTransparent()||c.defines(N.editorLineHighlightBorder)){const a=c.getColor(N.editorLineHighlightBorder);a&&(C=!0,o.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${a}; }`),o.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${a}; }`),c.type==="hc"&&(o.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),o.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(Q[589],J([0,1,94,14,49,11,321]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class S extends b.DynamicViewOverlay{constructor(d){super();this._context=d,this._primaryLineNumber=0;const g=this._context.configuration.options,p=g.get(125),c=g.get(38);this._lineHeight=g.get(53),this._spaceWidth=c.spaceWidth,this._enabled=g.get(78),this._activeIndentEnabled=g.get(47),this._maxIndentLeft=p.wrappingColumn===-1?-1:p.wrappingColumn*c.typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(d){const g=this._context.configuration.options,p=g.get(125),c=g.get(38);return this._lineHeight=g.get(53),this._spaceWidth=c.spaceWidth,this._enabled=g.get(78),this._activeIndentEnabled=g.get(47),this._maxIndentLeft=p.wrappingColumn===-1?-1:p.wrappingColumn*c.typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(d){const g=d.selections[0],p=g.isEmpty()?g.positionLineNumber:0;return this._primaryLineNumber!==p?(this._primaryLineNumber=p,!0):!1}onDecorationsChanged(d){return!0}onFlushed(d){return!0}onLinesChanged(d){return!0}onLinesDeleted(d){return!0}onLinesInserted(d){return!0}onScrollChanged(d){return d.scrollTopChanged}onZonesChanged(d){return!0}onLanguageConfigurationChanged(d){return!0}prepareRender(d){if(!this._enabled){this._renderResult=null;return}const g=d.visibleRange.startLineNumber,p=d.visibleRange.endLineNumber,{indentSize:c}=this._context.model.getTextModelOptions(),o=c*this._spaceWidth,s=d.scrollWidth,a=this._lineHeight,u=this._context.model.getLinesIndentGuides(g,p);let r=0,i=0,n=0;if(this._activeIndentEnabled&&this._primaryLineNumber){const l=this._context.model.getActiveIndentGuide(this._primaryLineNumber,g,p);r=l.startLineNumber,i=l.endLineNumber,n=l.indent}const t=[];for(let l=g;l<=p;l++){const h=r<=l&&l<=i,m=l-g,_=u[m];let f="";if(_>=1){const v=d.visibleRangeForPosition(new N.Position(l,1));let y=v?v.left:0;for(let L=1;L<=_&&(f+=`<div class="${h&&L===n?"cigra":"cigr"}" style="left:${y}px;height:${a}px;width:${o}px"></div>`,y+=o,!(y>s||this._maxIndentLeft>0&&y>this._maxIndentLeft));L++);}t[m]=f}this._renderResult=t}render(d,g){if(!this._renderResult)return"";const p=g-d;return p<0||p>=this._renderResult.length?"":this._renderResult[p]}}e.IndentGuidesOverlay=S,w.registerThemingParticipant((C,d)=>{const g=C.getColor(M.editorIndentGuides);g&&d.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${g} inset; }`);const p=C.getColor(M.editorActiveIndentGuides)||g;p&&d.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${p} inset; }`)})}),define(Q[257],J([0,1,17,94,14,49,11,322]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class C extends N.DynamicViewOverlay{constructor(g){super();this._context=g,this._readConfig(),this._lastCursorModelPosition=new M.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const g=this._context.configuration.options;this._lineHeight=g.get(53);const p=g.get(54);this._renderLineNumbers=p.renderType,this._renderCustomLineNumbers=p.renderFn,this._renderFinalNewline=g.get(79);const c=g.get(124);this._lineNumbersLeft=c.lineNumbersLeft,this._lineNumbersWidth=c.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(g){return this._readConfig(),!0}onCursorStateChanged(g){const p=g.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(p);let c=!1;return this._activeLineNumber!==p.lineNumber&&(this._activeLineNumber=p.lineNumber,c=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(c=!0),c}onFlushed(g){return!0}onLinesChanged(g){return!0}onLinesDeleted(g){return!0}onLinesInserted(g){return!0}onScrollChanged(g){return g.scrollTopChanged}onZonesChanged(g){return!0}_getLineRenderLineNumber(g){const p=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new M.Position(g,1));if(p.column!==1)return"";const c=p.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(c);if(this._renderLineNumbers===2){const o=Math.abs(this._lastCursorModelPosition.lineNumber-c);return o===0?'<span class="relative-current-line-number">'+c+"</span>":String(o)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===c||c%10==0?String(c):"":String(c)}prepareRender(g){if(this._renderLineNumbers===0){this._renderResult=null;return}const p=b.isLinux?this._lineHeight%2==0?" lh-even":" lh-odd":"",c=g.visibleRange.startLineNumber,o=g.visibleRange.endLineNumber,s='<div class="'+C.CLASS_NAME+p+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',a=this._context.model.getLineCount(),u=[];for(let r=c;r<=o;r++){const i=r-c;if(!this._renderFinalNewline&&r===a&&this._context.model.getLineLength(r)===0){u[i]="";continue}const n=this._getLineRenderLineNumber(r);n?r===this._activeLineNumber?u[i]='<div class="active-line-number '+C.CLASS_NAME+p+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+n+"</div>":u[i]=s+n+"</div>":u[i]=""}this._renderResult=u}render(g,p){if(!this._renderResult)return"";const c=p-g;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}e.LineNumbersOverlay=C,C.CLASS_NAME="line-numbers",S.registerThemingParticipant((d,g)=>{const p=d.getColor(w.editorLineNumbers);p&&g.addRule(`.monaco-editor .line-numbers { color: ${p}; }`);const c=d.getColor(w.editorActiveLineNumber);c&&g.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${c}; }`)})}),define(Q[590],J([0,1,445,35,30,17,8,69,164,214,45,257,223,38,106,14,3,21,124,317]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class t{constructor(y,L,I){this.top=y,this.left=L,this.width=I}setWidth(y){return new t(this.top,this.left,y)}}const l=N.isFirefox;class h extends p.ViewPart{constructor(y,L,I){super(y);this._primaryCursorPosition=new u.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=L,this._viewHelper=I,this._scrollLeft=0,this._scrollTop=0;const k=this._context.configuration.options,E=k.get(124);this._setAccessibilityOptions(k),this._contentLeft=E.contentLeft,this._contentWidth=E.contentWidth,this._contentHeight=E.height,this._fontInfo=k.get(38),this._lineHeight=k.get(53),this._emptySelectionClipboard=k.get(28),this._copyWithSyntaxHighlighting=k.get(18),this._visibleTextArea=null,this._selections=[new i.Selection(1,1,1,1)],this._modelSelections=[new i.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=M.createFastDomNode(document.createElement("textarea")),p.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${n.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(k)),this.textArea.setAttribute("tabindex",String(k.get(107))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",b.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),w.isWeb&&k.get(75)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=M.createFastDomNode(document.createElement("div")),this.textAreaCover.setPosition("absolute");const T={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:A=>this._context.model.getLineMaxColumn(A),getValueInRange:(A,B)=>this._context.model.getValueInRange(A,B)},O={getDataToCopy:A=>{const B=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,w.isWindows),F=this._context.model.getEOL(),D=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),R=Array.isArray(B)?B:null,W=Array.isArray(B)?B.join(F):B;let x,K=null;if(A&&(d.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&W.length<65536)){const Y=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);Y&&(x=Y.html,K=Y.mode)}return{isFromEmptySelection:D,multicursorText:R,text:W,html:x,mode:K}},getScreenReaderContent:A=>{if(this._accessibilitySupport===1){if(w.isMacintosh){const B=this._selections[0];if(B.isEmpty()){const F=B.getStartPosition();let D=this._getWordBeforePosition(F);if(D.length===0&&(D=this._getCharacterBeforePosition(F)),D.length>0)return new g.TextAreaState(D,D.length,D.length,F,F)}}return g.TextAreaState.EMPTY}if(N.isAndroid){const B=this._selections[0];if(B.isEmpty()){const F=B.getStartPosition(),[D,R]=this._getAndroidWordAtPosition(F);if(D.length>0)return new g.TextAreaState(D,R,R,F,F)}return g.TextAreaState.EMPTY}return g.PagedScreenReaderStrategy.fromEditorSelection(A,T,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(A,B,F)=>this._context.model.deduceModelPositionRelativeToViewPosition(A,B,F)};this._textAreaInput=this._register(new d.TextAreaInput(O,this.textArea)),this._register(this._textAreaInput.onKeyDown(A=>{this._viewController.emitKeyDown(A)})),this._register(this._textAreaInput.onKeyUp(A=>{this._viewController.emitKeyUp(A)})),this._register(this._textAreaInput.onPaste(A=>{let B=!1,F=null,D=null;A.metadata&&(B=this._emptySelectionClipboard&&!!A.metadata.isFromEmptySelection,F=typeof A.metadata.multicursorText!="undefined"?A.metadata.multicursorText:null,D=A.metadata.mode),this._viewController.paste(A.text,B,F,D)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(A=>{A.replacePrevCharCnt||A.replaceNextCharCnt||A.positionDelta?(g._debugComposition&&console.log(` => compositionType: <<${A.text}>>, ${A.replacePrevCharCnt}, ${A.replaceNextCharCnt}, ${A.positionDelta}`),this._viewController.compositionType(A.text,A.replacePrevCharCnt,A.replaceNextCharCnt,A.positionDelta)):(g._debugComposition&&console.log(` => type: <<${A.text}>>`),this._viewController.type(A.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(A=>{this._viewController.setSelection(A)})),this._register(this._textAreaInput.onCompositionStart(A=>{const B=this._selections[0].startLineNumber,F=this._selections[0].startColumn+A.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new r.Range(B,F,B,F),0,1);const D=this._viewHelper.visibleRangeForPositionRelativeToEditor(B,F);D&&(this._visibleTextArea=new t(this._context.viewLayout.getVerticalOffsetForLineNumber(B),D.left,l?0:1),this._render()),this.textArea.setClassName(`inputarea ${n.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(A=>{!this._visibleTextArea||(this._visibleTextArea=this._visibleTextArea.setWidth(m(A.data,this._fontInfo)),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${n.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(y){const L='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',I=this._context.model.getLineContent(y.lineNumber),k=a.getMapForWordSeparators(L);let E=!0,T=y.column,O=!0,A=y.column,B=0;for(;B<50&&(E||O);){if(E&&T<=1&&(E=!1),E){const F=I.charCodeAt(T-2);k.get(F)!==0?E=!1:T--}if(O&&A>I.length&&(O=!1),O){const F=I.charCodeAt(A-1);k.get(F)!==0?O=!1:A++}B++}return[I.substring(T-1,A-1),y.column-T]}_getWordBeforePosition(y){const L=this._context.model.getLineContent(y.lineNumber),I=a.getMapForWordSeparators(this._context.configuration.options.get(110));let k=y.column,E=0;for(;k>1;){const T=L.charCodeAt(k-2);if(I.get(T)!==0||E>50)return L.substring(k-1,y.column-1);E++,k--}return L.substring(0,y.column-1)}_getCharacterBeforePosition(y){if(y.column>1){const I=this._context.model.getLineContent(y.lineNumber).charAt(y.column-2);if(!S.isHighSurrogate(I.charCodeAt(0)))return I}return""}_getAriaLabel(y){return y.get(2)===1?b.localize(1,null,w.isLinux?"Shift+Alt+F1":"Alt+F1"):y.get(4)}_setAccessibilityOptions(y){this._accessibilitySupport=y.get(2);const L=y.get(3);this._accessibilitySupport===2&&L===s.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=100:this._accessibilityPageSize=L}onConfigurationChanged(y){const L=this._context.configuration.options,I=L.get(124);return this._setAccessibilityOptions(L),this._contentLeft=I.contentLeft,this._contentWidth=I.contentWidth,this._contentHeight=I.height,this._fontInfo=L.get(38),this._lineHeight=L.get(53),this._emptySelectionClipboard=L.get(28),this._copyWithSyntaxHighlighting=L.get(18),this.textArea.setAttribute("aria-label",this._getAriaLabel(L)),this.textArea.setAttribute("tabindex",String(L.get(107))),w.isWeb&&y.hasChanged(75)&&(L.get(75)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),y.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(y){return this._selections=y.selections.slice(0),this._modelSelections=y.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(y){return!0}onFlushed(y){return!0}onLinesChanged(y){return!0}onLinesDeleted(y){return!0}onLinesInserted(y){return!0}onScrollChanged(y){return this._scrollLeft=y.scrollLeft,this._scrollTop=y.scrollTop,!0}onZonesChanged(y){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(y){y.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",y.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),y.role&&this.textArea.setAttribute("role",y.role)}prepareRender(y){this._primaryCursorPosition=new u.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=y.visibleRangeForPosition(this._primaryCursorPosition)}render(y){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const y=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(y<this._contentLeft||y>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const L=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(L<0||L>this._contentHeight){this._renderAtTopLeft();return}if(w.isMacintosh){this._renderInsideEditor(this._primaryCursorPosition,L,y,l?0:1,this._lineHeight);return}this._renderInsideEditor(this._primaryCursorPosition,L,y,l?0:1,l?0:1)}_renderInsideEditor(y,L,I,k,E){this._lastRenderPosition=y;const T=this.textArea,O=this.textAreaCover;C.Configuration.applyFontInfo(T,this._fontInfo),T.setTop(L),T.setLeft(I),T.setWidth(k),T.setHeight(E),O.setTop(0),O.setLeft(0),O.setWidth(0),O.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const y=this.textArea,L=this.textAreaCover;if(C.Configuration.applyFontInfo(y,this._fontInfo),y.setTop(0),y.setLeft(0),L.setTop(0),L.setLeft(0),l){y.setWidth(0),y.setHeight(0),L.setWidth(0),L.setHeight(0);return}y.setWidth(1),y.setHeight(1),L.setWidth(1),L.setHeight(1);const I=this._context.configuration.options;I.get(44)?L.setClassName("monaco-editor-background textAreaCover "+o.Margin.OUTER_CLASS_NAME):I.get(54).renderType!==0?L.setClassName("monaco-editor-background textAreaCover "+c.LineNumbersOverlay.CLASS_NAME):L.setClassName("monaco-editor-background textAreaCover")}}e.TextAreaHandler=h;function m(v,y){const I=document.createElement("canvas").getContext("2d");I.font=_(y);const k=I.measureText(v);return N.isFirefox?k.width+2:k.width}function _(v){return f("normal",v.fontWeight,v.fontSize,v.lineHeight,v.fontFamily)}function f(v,y,L,I,k){return`${v} normal ${y} ${L}px / ${I}px ${k}`}}),define(Q[591],J([0,1,30,29,45,14,18,49]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class d{constructor(c,o){const s=c.options;this.lineHeight=s.get(53),this.pixelRatio=s.get(122),this.overviewRulerLanes=s.get(68),this.renderBorder=s.get(67);const a=o.getColor(C.editorOverviewRulerBorder);this.borderColor=a?a.toString():null,this.hideCursor=s.get(46);const u=o.getColor(C.editorCursorForeground);this.cursorColor=u?u.transparent(.7).toString():null,this.themeType=o.type;const r=s.get(59),i=r.enabled,n=r.side,t=i?o.getColor(C.editorOverviewRulerBackground)||S.TokenizationRegistry.getDefaultBackground():null;t===null||n==="left"?this.backgroundColor=null:this.backgroundColor=N.Color.Format.CSS.formatHex(t);const h=s.get(124).overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[m,_]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=m,this.w=_}_initLanes(c,o,s){const a=o-c;if(s>=3){const u=Math.floor(a/3),r=Math.floor(a/3),i=a-u-r,n=c,t=n+u,l=n+u+i;return[[0,n,t,n,l,n,t,n],[0,u,i,u+i,r,u+i+r,i+r,u+i+r]]}else if(s===2){const u=Math.floor(a/2),r=a-u,i=c,n=i+u;return[[0,i,i,i,n,i,i,i],[0,u,u,u,r,u+r,u+r,u+r]]}else{const u=c,r=a;return[[0,u,u,u,u,u,u,u],[0,r,r,r,r,r,r,r]]}}equals(c){return this.lineHeight===c.lineHeight&&this.pixelRatio===c.pixelRatio&&this.overviewRulerLanes===c.overviewRulerLanes&&this.renderBorder===c.renderBorder&&this.borderColor===c.borderColor&&this.hideCursor===c.hideCursor&&this.cursorColor===c.cursorColor&&this.themeType===c.themeType&&this.backgroundColor===c.backgroundColor&&this.top===c.top&&this.right===c.right&&this.domWidth===c.domWidth&&this.domHeight===c.domHeight&&this.canvasWidth===c.canvasWidth&&this.canvasHeight===c.canvasHeight}}class g extends M.ViewPart{constructor(c){super(c);this._domNode=b.createFastDomNode(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=S.TokenizationRegistry.onDidChange(o=>{o.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(c){const o=new d(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(o)?!1:(this._settings=o,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,c&&this._render(),!0)}onConfigurationChanged(c){return this._updateSettings(!1)}onCursorStateChanged(c){this._cursorPositions=[];for(let o=0,s=c.selections.length;o<s;o++)this._cursorPositions[o]=c.selections[o].getPosition();return this._cursorPositions.sort(w.Position.compare),!0}onDecorationsChanged(c){return!!c.affectsOverviewRuler}onFlushed(c){return!0}onScrollChanged(c){return c.scrollHeightChanged}onZonesChanged(c){return!0}onThemeChanged(c){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(c){}render(c){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");return}const c=this._settings.canvasWidth,o=this._settings.canvasHeight,s=this._settings.lineHeight,a=this._context.viewLayout,u=this._context.viewLayout.getScrollHeight(),r=o/u,i=this._context.model.getAllOverviewRulerDecorations(this._context.theme),n=6*this._settings.pixelRatio|0,t=n/2|0,l=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?l.clearRect(0,0,c,o):(l.fillStyle=this._settings.backgroundColor,l.fillRect(0,0,c,o));const h=this._settings.x,m=this._settings.w,_=Object.keys(i);_.sort();for(let f=0,v=_.length;f<v;f++){const y=_[f],L=i[y];l.fillStyle=y;let I=0,k=0,E=0;for(let T=0,O=L.length;T<O;T++){const A=L[3*T],B=L[3*T+1],F=L[3*T+2];let D=a.getVerticalOffsetForLineNumber(B)*r|0,R=(a.getVerticalOffsetForLineNumber(F)+s)*r|0;if(R-D<n){let x=(D+R)/2|0;x<t?x=t:x+t>o&&(x=o-t),D=x-t,R=x+t}D>E+1||A!==I?(T!==0&&l.fillRect(h[I],k,m[I],E-k),I=A,k=D,E=R):R>E&&(E=R)}l.fillRect(h[I],k,m[I],E-k)}if(!this._settings.hideCursor&&this._settings.cursorColor){const f=2*this._settings.pixelRatio|0,v=f/2|0,y=this._settings.x[7],L=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let I=-100,k=-100;for(let E=0,T=this._cursorPositions.length;E<T;E++){const O=this._cursorPositions[E];let A=a.getVerticalOffsetForLineNumber(O.lineNumber)*r|0;A<v?A=v:A+v>o&&(A=o-v);const B=A-v,F=B+f;B>k+1?(E!==0&&l.fillRect(y,I,L,k-I),I=B,k=F):F>k&&(k=F)}l.fillRect(y,I,L,k-I)}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,o),l.stroke(),l.moveTo(0,0),l.lineTo(c,0),l.stroke())}}e.DecorationsOverviewRuler=g}),define(Q[592],J([0,1,30,45,49,11,328]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class S extends N.ViewPart{constructor(d){super(d);this.domNode=b.createFastDomNode(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const g=this._context.configuration.options;this._rulers=g.get(86),this._typicalHalfwidthCharacterWidth=g.get(38).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(d){const g=this._context.configuration.options;return this._rulers=g.get(86),this._typicalHalfwidthCharacterWidth=g.get(38).typicalHalfwidthCharacterWidth,!0}onScrollChanged(d){return d.scrollHeightChanged}prepareRender(d){}_ensureRulersCount(){const d=this._renderedRulers.length,g=this._rulers.length;if(d!==g){if(d<g){const{tabSize:c}=this._context.model.getTextModelOptions(),o=c;let s=g-d;for(;s>0;){const a=b.createFastDomNode(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(o),this.domNode.appendChild(a),this._renderedRulers.push(a),s--}return}let p=d-g;for(;p>0;){const c=this._renderedRulers.pop();this.domNode.removeChild(c),p--}}}render(d){this._ensureRulersCount();for(let g=0,p=this._rulers.length;g<p;g++){const c=this._renderedRulers[g],o=this._rulers[g];c.setBoxShadow(o.color?`1px 0 0 0 ${o.color} inset`:""),c.setHeight(Math.min(d.scrollHeight,1e6)),c.setLeft(o.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=S,w.registerThemingParticipant((C,d)=>{const g=C.getColor(M.editorRuler);g&&d.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${g} inset; }`)})}),define(Q[593],J([0,1,30,15,45,565,38,49,11,331]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class g extends M.ViewPart{constructor(c){super(c);const o=this._context.configuration.options;this._readOnly=o.get(75),this._cursorBlinking=o.get(19),this._cursorStyle=o.get(21),this._cursorSmoothCaretAnimation=o.get(20),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new w.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=b.createFastDomNode(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new N.TimeoutTimer,this._cursorFlatBlinkInterval=new N.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(c){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(c){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(c){const o=this._context.configuration.options;this._readOnly=o.get(75),this._cursorBlinking=o.get(19),this._cursorStyle=o.get(21),this._cursorSmoothCaretAnimation=o.get(20),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(c);for(let s=0,a=this._secondaryCursors.length;s<a;s++)this._secondaryCursors[s].onConfigurationChanged(c);return!0}_onCursorPositionChanged(c,o){if(this._primaryCursor.onCursorPositionChanged(c),this._updateBlinking(),this._secondaryCursors.length<o.length){const s=o.length-this._secondaryCursors.length;for(let a=0;a<s;a++){const u=new w.ViewCursor(this._context);this._domNode.domNode.insertBefore(u.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(u)}}else if(this._secondaryCursors.length>o.length){const s=this._secondaryCursors.length-o.length;for(let a=0;a<s;a++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let s=0;s<o.length;s++)this._secondaryCursors[s].onCursorPositionChanged(o[s])}onCursorStateChanged(c){const o=[];for(let a=0,u=c.selections.length;a<u;a++)o[a]=c.selections[a].getPosition();this._onCursorPositionChanged(o[0],o.slice(1));const s=c.selections[0].isEmpty();return this._selectionIsEmpty!==s&&(this._selectionIsEmpty=s,this._updateDomClassName()),!0}onDecorationsChanged(c){return!0}onFlushed(c){return!0}onFocusChanged(c){return this._editorHasFocus=c.isFocused,this._updateBlinking(),!1}onLinesChanged(c){return!0}onLinesDeleted(c){return!0}onLinesInserted(c){return!0}onScrollChanged(c){return!0}onTokensChanged(c){const o=s=>{for(let a=0,u=c.ranges.length;a<u;a++)if(c.ranges[a].fromLineNumber<=s.lineNumber&&s.lineNumber<=c.ranges[a].toLineNumber)return!0;return!1};if(o(this._primaryCursor.getPosition()))return!0;for(const s of this._secondaryCursors)if(o(s.getPosition()))return!0;return!1}onZonesChanged(c){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const c=this._getCursorBlinking(),o=c===0,s=c===5;o?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!o&&!s&&(c===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},g.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},g.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let c="cursors-layer";switch(this._selectionIsEmpty||(c+=" has-selection"),this._cursorStyle){case S.TextEditorCursorStyle.Line:c+=" cursor-line-style";break;case S.TextEditorCursorStyle.Block:c+=" cursor-block-style";break;case S.TextEditorCursorStyle.Underline:c+=" cursor-underline-style";break;case S.TextEditorCursorStyle.LineThin:c+=" cursor-line-thin-style";break;case S.TextEditorCursorStyle.BlockOutline:c+=" cursor-block-outline-style";break;case S.TextEditorCursorStyle.UnderlineThin:c+=" cursor-underline-thin-style";break;default:c+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:c+=" cursor-blink";break;case 2:c+=" cursor-smooth";break;case 3:c+=" cursor-phase";break;case 4:c+=" cursor-expand";break;case 5:c+=" cursor-solid";break;default:c+=" cursor-solid"}else c+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(c+=" cursor-smooth-caret-animation"),c}_show(){this._primaryCursor.show();for(let c=0,o=this._secondaryCursors.length;c<o;c++)this._secondaryCursors[c].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let c=0,o=this._secondaryCursors.length;c<o;c++)this._secondaryCursors[c].hide();this._isVisible=!1}prepareRender(c){this._primaryCursor.prepareRender(c);for(let o=0,s=this._secondaryCursors.length;o<s;o++)this._secondaryCursors[o].prepareRender(c)}render(c){let o=[],s=0;const a=this._primaryCursor.render(c);a&&(o[s++]=a);for(let u=0,r=this._secondaryCursors.length;u<r;u++){const i=this._secondaryCursors[u].render(c);i&&(o[s++]=i)}this._renderData=o}getLastRenderData(){return this._renderData}}e.ViewCursors=g,g.BLINK_INTERVAL=500,d.registerThemingParticipant((p,c)=>{const o=p.getColor(C.editorCursorForeground);if(o){let s=p.getColor(C.editorCursorBackground);s||(s=o.opposite()),c.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${o}; border-color: ${o}; color: ${s}; }`),p.type==="hc"&&c.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}})}),define(Q[594],J([0,1,85,2,53,11,49,36,3,43,6,22]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;function o(u){return u.toString()}class s extends N.Disposable{constructor(r){super();this.model=r,this._markersData=new Map,this._register(N.toDisposable(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(r,i){const n=[...this._markersData.keys()];this._markersData.clear();const t=this.model.deltaDecorations(n,i);for(let l=0;l<t.length;l++)this._markersData.set(t[l],r[l]);return n.length!==0||t.length!==0}getMarker(r){return this._markersData.get(r.id)}}let a=class extends N.Disposable{constructor(r,i){super();this._markerService=i,this._onDidChangeMarker=this._register(new p.Emitter),this._markerDecorations=new Map,r.getModels().forEach(n=>this._onModelAdded(n)),this._register(r.onModelAdded(this._onModelAdded,this)),this._register(r.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(r=>r.dispose()),this._markerDecorations.clear()}getMarker(r,i){const n=this._markerDecorations.get(o(r));return n&&n.getMarker(i)||null}_handleMarkerChange(r){r.forEach(i=>{const n=this._markerDecorations.get(o(i));n&&this._updateDecorations(n)})}_onModelAdded(r){const i=new s(r);this._markerDecorations.set(o(r.uri),i),this._updateDecorations(i)}_onModelRemoved(r){const i=this._markerDecorations.get(o(r.uri));i&&(i.dispose(),this._markerDecorations.delete(o(r.uri))),(r.uri.scheme===g.Schemas.inMemory||r.uri.scheme===g.Schemas.internal||r.uri.scheme===g.Schemas.vscode)&&this._markerService&&this._markerService.read({resource:r.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[r.uri]))}_updateDecorations(r){const i=this._markerService.read({resource:r.model.uri,take:500});let n=i.map(t=>({range:this._createDecorationRange(r.model,t),options:this._createDecorationOption(t)}));r.update(i,n)&&this._onDidChangeMarker.fire(r.model)}_createDecorationRange(r,i){let n=d.Range.lift(i);if(i.severity===b.MarkerSeverity.Hint&&!this._hasMarkerTag(i,1)&&!this._hasMarkerTag(i,2)&&(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),n=r.validateRange(n),n.isEmpty()){let t=r.getWordAtPosition(n.getStartPosition());if(t)n=new d.Range(n.startLineNumber,t.startColumn,n.endLineNumber,t.endColumn);else{let l=r.getLineLastNonWhitespaceColumn(n.startLineNumber)||r.getLineMaxColumn(n.startLineNumber);l===1||(n.endColumn>=l?n=new d.Range(n.startLineNumber,l-1,n.endLineNumber,l):n=new d.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(i.endColumn===Number.MAX_VALUE&&i.startColumn===1&&n.startLineNumber===n.endLineNumber){let t=r.getLineFirstNonWhitespaceColumn(i.startLineNumber);t<n.endColumn&&(n=new d.Range(n.startLineNumber,t,n.endLineNumber,n.endColumn),i.startColumn=t)}return n}_createDecorationOption(r){let i,n,t,l,h;switch(r.severity){case b.MarkerSeverity.Hint:this._hasMarkerTag(r,2)?i=void 0:this._hasMarkerTag(r,1)?i="squiggly-unnecessary":i="squiggly-hint",t=0;break;case b.MarkerSeverity.Warning:i="squiggly-warning",n=w.themeColorFromId(S.overviewRulerWarning),t=20,h={color:w.themeColorFromId(c.minimapWarning),position:M.MinimapPosition.Inline};break;case b.MarkerSeverity.Info:i="squiggly-info",n=w.themeColorFromId(S.overviewRulerInfo),t=10;break;case b.MarkerSeverity.Error:default:i="squiggly-error",n=w.themeColorFromId(S.overviewRulerError),t=30,h={color:w.themeColorFromId(c.minimapError),position:M.MinimapPosition.Inline};break}return r.tags&&(r.tags.indexOf(1)!==-1&&(l="squiggly-inline-unnecessary"),r.tags.indexOf(2)!==-1&&(l="squiggly-inline-deprecated")),{stickiness:1,className:i,showIfCollapsed:!0,overviewRuler:{color:n,position:M.OverviewRulerLane.Right},minimap:h,zIndex:t,inlineClassName:l}}_hasMarkerTag(r,i){return r.tags?r.tags.indexOf(i)>=0:!1}};a=Me([_e(0,C.IModelService),_e(1,b.IMarkerService)],a),e.MarkerDecorationsService=a}),define(Q[595],J([0,1,7,90,6,2,31,467,37,11,22,60,27,337]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var s;(function(u){u.Hidden={type:0};class r{constructor(n,t,l,h){this.actions=n,this.trigger=t,this.editorPosition=l,this.widgetPosition=h,this.type=1}}u.Showing=r})(s||(s={}));let a=class At extends w.Disposable{constructor(r,i,n,t){super();this._editor=r,this._quickFixActionId=i,this._preferredFixActionId=n,this._keybindingService=t,this._onClick=this._register(new M.Emitter),this.onClick=this._onClick.event,this._state=s.Hidden,this._domNode=document.createElement("div"),this._domNode.className=o.Codicon.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(l=>{const h=this._editor.getModel();(this.state.type!==1||!h||this.state.editorPosition.lineNumber>=h.getLineCount())&&this.hide()})),c.Gesture.ignoreTarget(this._domNode),this._register(b.addStandardDisposableGenericMouseDownListner(this._domNode,l=>{if(this.state.type===1){this._editor.focus(),l.preventDefault();const{top:h,height:m}=b.getDomNodePagePosition(this._domNode),_=this._editor.getOption(53);let f=Math.floor(_/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(f+=_),this._onClick.fire({x:l.posx,y:h+m+f,actions:this.state.actions,trigger:this.state.trigger})}})),this._register(b.addDisposableListener(this._domNode,"mouseenter",l=>{if((l.buttons&1)==1){this.hide();const h=new N.GlobalMouseMoveMonitor;h.startMonitoring(l.target,l.buttons,N.standardMouseMoveMerger,()=>{},()=>{h.dispose()})}})),this._register(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(51)&&!this._editor.getOption(51).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(r,i,n){if(r.validActions.length<=0)return this.hide();const t=this._editor.getOptions();if(!t.get(51).enabled)return this.hide();const l=this._editor.getModel();if(!l)return this.hide();const{lineNumber:h,column:m}=l.validatePosition(n),_=l.getOptions().tabSize,f=t.get(38),v=l.getLineContent(h),y=S.TextModel.computeIndentLevel(v,_),L=f.spaceWidth*y>22,I=E=>E>2&&this._editor.getTopForLineNumber(E)===this._editor.getTopForLineNumber(E-1);let k=h;if(!L){if(h>1&&!I(h-1))k-=1;else if(!I(h+1))k+=1;else if(m*f.spaceWidth<22)return this.hide()}this.state=new s.Showing(r,i,n,{position:{lineNumber:k,column:1},preference:At._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=s.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(r){this._state=r,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...o.Codicon.lightBulb.classNamesArray),this._domNode.classList.add(...o.Codicon.lightbulbAutofix.classNamesArray);const i=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(i){this.title=C.localize(0,null,i.getLabel());return}}this._domNode.classList.remove(...o.Codicon.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...o.Codicon.lightBulb.classNamesArray);const r=this._keybindingService.lookupKeybinding(this._quickFixActionId);r?this.title=C.localize(1,null,r.getLabel()):this.title=C.localize(2,null)}set title(r){this._domNode.title=r}};a._posPref=[0],a=Me([_e(3,d.IKeybindingService)],a),e.LightBulbWidget=a,g.registerThemingParticipant((u,r)=>{var i;const n=(i=u.getColor(p.editorBackground))===null||i===void 0?void 0:i.transparent(.7),t=u.getColor(p.editorLightBulbForeground);t&&r.addRule(`
.monaco-editor .contentWidgets ${o.Codicon.lightBulb.cssSelector} {
color: ${t};
background-color: ${n};
}`);const l=u.getColor(p.editorLightBulbAutoFixForeground);l&&r.addRule(`
.monaco-editor .contentWidgets ${o.Codicon.lightbulbAutofix.cssSelector} {
color: ${l};
background-color: ${n};
}`)})}),define(Q[596],J([0,1,7,3,31,49,22,11,103,338]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class g{constructor(a,u,r){this.afterLineNumber=a,this.heightInPx=u,this._onHeight=r,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(a){this._lastHeight===void 0?this._lastHeight=a:this._lastHeight!==a&&(this._lastHeight=a,this._onHeight())}}class p{constructor(a,u,r){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=a,this._id=`codelens.widget-${p._idPool++}`,this.updatePosition(r),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${u}`}withCommands(a,u){this._commands.clear();let r=[],i=!1;for(let n=0;n<a.length;n++){const t=a[n];if(!!t&&(i=!0,t.command)){const l=d.renderLabelWithIcons(t.command.title.trim());t.command.id?(r.push(b.$("a",{id:String(n)},...l)),this._commands.set(String(n),t.command)):r.push(b.$("span",void 0,...l)),n+1<a.length&&r.push(b.$("span",void 0,"\xA0|\xA0"))}}i?(b.reset(this._domNode,...r),this._isEmpty&&u&&this._domNode.classList.add("fadein"),this._isEmpty=!1):b.reset(this._domNode,b.$("span",void 0,"no commands"))}getCommand(a){return a.parentElement===this._domNode?this._commands.get(a.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(a){const u=this._editor.getModel().getLineFirstNonWhitespaceColumn(a);this._widgetPosition={position:{lineNumber:a,column:u},preference:[1]}}getPosition(){return this._widgetPosition||null}}p._idPool=0;class c{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(a,u){this._addDecorations.push(a),this._addDecorationsCallbacks.push(u)}removeDecoration(a){this._removeDecorations.push(a)}commit(a){let u=a.deltaDecorations(this._removeDecorations,this._addDecorations);for(let r=0,i=u.length;r<i;r++)this._addDecorationsCallbacks[r](u[r])}}e.CodeLensHelper=c;class o{constructor(a,u,r,i,n,t,l){this._isDisposed=!1,this._editor=u,this._className=r,this._data=a,this._decorationIds=[];let h,m=[];this._data.forEach((_,f)=>{_.symbol.command&&m.push(_.symbol),i.addDecoration({range:_.symbol.range,options:M.ModelDecorationOptions.EMPTY},v=>this._decorationIds[f]=v),h?h=N.Range.plusRange(h,_.symbol.range):h=N.Range.lift(_.symbol.range)}),this._viewZone=new g(h.startLineNumber-1,t,l),this._viewZoneId=n.addZone(this._viewZone),m.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(m,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new p(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(a,u){this._decorationIds.forEach(a.removeDecoration,a),this._decorationIds=[],u&&u.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((a,u)=>{const r=this._editor.getModel().getDecorationRange(a),i=this._data[u].symbol;return!!(r&&N.Range.isEmpty(i.range)===r.isEmpty())})}updateCodeLensSymbols(a,u){this._decorationIds.forEach(u.removeDecoration,u),this._decorationIds=[],this._data=a,this._data.forEach((r,i)=>{u.addDecoration({range:r.symbol.range,options:M.ModelDecorationOptions.EMPTY},n=>this._decorationIds[i]=n)})}updateHeight(a,u){this._viewZone.heightInPx=a,u.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(a){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(let u=0;u<this._decorationIds.length;u++){const r=a.getDecorationRange(this._decorationIds[u]);r&&(this._data[u].symbol.range=r)}return this._data}updateCommands(a){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!0);for(let u=0;u<this._data.length;u++){const r=a[u];if(r){const{symbol:i}=this._data[u];i.command=r.command||i.command}}}getCommand(a){var u;return(u=this._contentWidget)===null||u===void 0?void 0:u.getCommand(a)}getLineNumber(){const a=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return a?a.startLineNumber:-1}update(a){if(this.isValid()){const u=this._editor.getModel().getDecorationRange(this._decorationIds[0]);u&&(this._viewZone.afterLineNumber=u.startLineNumber-1,a.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(u.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}e.CodeLensWidget=o,C.registerThemingParticipant((s,a)=>{const u=s.getColor(w.editorCodeLensForeground);u&&(a.addRule(`.monaco-editor .codelens-decoration { color: ${u}; }`),a.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${u}; }`));const r=s.getColor(S.editorActiveLinkForeground);r&&(a.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${r} !important; }`),a.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${r} !important; }`))})}),define(Q[597],J([0,1,35,7,90,52,29,6,2,22,11,339]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.ColorPickerBody=e.ColorPickerHeader=void 0;const c=N.$;class o extends d.Disposable{constructor(l,h,m){super();this.model=h,this.domNode=c(".colorpicker-header"),N.append(l,this.domNode),this.pickedColorNode=N.append(this.domNode,c(".picked-color"));const _=N.append(this.domNode,c(".original-color"));_.style.backgroundColor=S.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=m.getColorTheme().getColor(g.editorHoverBackground)||S.Color.white,this._register(p.registerThemingParticipant((f,v)=>{this.backgroundColor=f.getColor(g.editorHoverBackground)||S.Color.white})),this._register(N.addDisposableListener(this.pickedColorNode,N.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(N.addDisposableListener(_,N.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(h.onDidChangeColor(this.onDidChangeColor,this)),this._register(h.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=S.Color.Format.CSS.format(h.color)||"",this.pickedColorNode.classList.toggle("light",h.color.rgba.a<.5?this.backgroundColor.isLighter():h.color.isLighter())}onDidChangeColor(l){this.pickedColorNode.style.backgroundColor=S.Color.Format.CSS.format(l)||"",this.pickedColorNode.classList.toggle("light",l.rgba.a<.5?this.backgroundColor.isLighter():l.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}e.ColorPickerHeader=o;class s extends d.Disposable{constructor(l,h,m){super();this.model=h,this.pixelRatio=m,this.domNode=c(".colorpicker-body"),N.append(l,this.domNode),this.saturationBox=new a(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new r(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new i(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:l,v:h}){const m=this.model.color.hsva;this.model.color=new S.Color(new S.HSVA(m.h,l,h,m.a))}onDidOpacityChange(l){const h=this.model.color.hsva;this.model.color=new S.Color(new S.HSVA(h.h,h.s,h.v,l))}onDidHueChange(l){const h=this.model.color.hsva,m=(1-l)*360;this.model.color=new S.Color(new S.HSVA(m===360?0:m,h.s,h.v,h.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}e.ColorPickerBody=s;class a extends d.Disposable{constructor(l,h,m){super();this.model=h,this.pixelRatio=m,this._onDidChange=new C.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new C.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=c(".saturation-wrap"),N.append(l,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",N.append(this.domNode,this.canvas),this.selection=c(".saturation-selection"),N.append(this.domNode,this.selection),this.layout(),this._register(N.addDisposableGenericMouseDownListner(this.domNode,_=>this.onMouseDown(_))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(l){this.monitor=this._register(new M.GlobalMouseMoveMonitor);const h=N.getDomNodePagePosition(this.domNode);l.target!==this.selection&&this.onDidChangePosition(l.offsetX,l.offsetY),this.monitor.startMonitoring(l.target,l.buttons,M.standardMouseMoveMerger,_=>this.onDidChangePosition(_.posx-h.left,_.posy-h.top),()=>null);const m=N.addDisposableGenericMouseUpListner(document,()=>{this._onColorFlushed.fire(),m.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(l,h){const m=Math.max(0,Math.min(1,l/this.width)),_=Math.max(0,Math.min(1,1-h/this.height));this.paintSelection(m,_),this._onDidChange.fire({s:m,v:_})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const l=this.model.color.hsva;this.paintSelection(l.s,l.v)}paint(){const l=this.model.color.hsva,h=new S.Color(new S.HSVA(l.h,1,1,1)),m=this.canvas.getContext("2d"),_=m.createLinearGradient(0,0,this.canvas.width,0);_.addColorStop(0,"rgba(255, 255, 255, 1)"),_.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),_.addColorStop(1,"rgba(255, 255, 255, 0)");const f=m.createLinearGradient(0,0,0,this.canvas.height);f.addColorStop(0,"rgba(0, 0, 0, 0)"),f.addColorStop(1,"rgba(0, 0, 0, 1)"),m.rect(0,0,this.canvas.width,this.canvas.height),m.fillStyle=S.Color.Format.CSS.format(h),m.fill(),m.fillStyle=_,m.fill(),m.fillStyle=f,m.fill()}paintSelection(l,h){this.selection.style.left=`${l*this.width}px`,this.selection.style.top=`${this.height-h*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class u extends d.Disposable{constructor(l,h){super();this.model=h,this._onDidChange=new C.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new C.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=N.append(l,c(".strip")),this.overlay=N.append(this.domNode,c(".overlay")),this.slider=N.append(this.domNode,c(".slider")),this.slider.style.top="0px",this._register(N.addDisposableGenericMouseDownListner(this.domNode,m=>this.onMouseDown(m))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const l=this.getValue(this.model.color);this.updateSliderPosition(l)}onMouseDown(l){const h=this._register(new M.GlobalMouseMoveMonitor),m=N.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),l.target!==this.slider&&this.onDidChangeTop(l.offsetY),h.startMonitoring(l.target,l.buttons,M.standardMouseMoveMerger,f=>this.onDidChangeTop(f.posy-m.top),()=>null);const _=N.addDisposableGenericMouseUpListner(document,()=>{this._onColorFlushed.fire(),_.dispose(),h.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(l){const h=Math.max(0,Math.min(1,1-l/this.height));this.updateSliderPosition(h),this._onDidChange.fire(h)}updateSliderPosition(l){this.slider.style.top=`${(1-l)*this.height}px`}}class r extends u{constructor(l,h){super(l,h);this.domNode.classList.add("opacity-strip"),this._register(h.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(l){const{r:h,g:m,b:_}=l.rgba,f=new S.Color(new S.RGBA(h,m,_,1)),v=new S.Color(new S.RGBA(h,m,_,0));this.overlay.style.background=`linear-gradient(to bottom, ${f} 0%, ${v} 100%)`}getValue(l){return l.hsva.a}}class i extends u{constructor(l,h){super(l,h);this.domNode.classList.add("hue-strip")}getValue(l){return 1-l.hsva.h/360}}class n extends w.Widget{constructor(l,h,m,_){super();this.model=h,this.pixelRatio=m,this._register(b.onDidChangeZoomLevel(()=>this.layout()));const f=c(".colorpicker-widget");l.appendChild(f);const v=new o(f,this.model,_);this.body=new s(f,this.model,this.pixelRatio),this._register(v),this._register(this.body)}layout(){this.body.layout()}}e.ColorPickerWidget=n}),define(Q[598],J([0,1,3,53,31,22,11]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class C{constructor(g){this._editor=g,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const g=this._findScopeDecorationIds.map(p=>this._editor.getModel().getDecorationRange(p)).filter(p=>!!p);if(g.length)return g}return null}getStartPosition(){return this._startPosition}setStartPosition(g){this._startPosition=g,this.setCurrentFindMatch(null)}_getDecorationIndex(g){const p=this._decorations.indexOf(g);return p>=0?p+1:1}getCurrentMatchesPosition(g){let p=this._editor.getModel().getDecorationsInRange(g);for(const c of p){const o=c.options;if(o===C._FIND_MATCH_DECORATION||o===C._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(c.id)}return 0}setCurrentFindMatch(g){let p=null,c=0;if(g)for(let o=0,s=this._decorations.length;o<s;o++){let a=this._editor.getModel().getDecorationRange(this._decorations[o]);if(g.equalsRange(a)){p=this._decorations[o],c=o+1;break}}return(this._highlightedDecorationId!==null||p!==null)&&this._editor.changeDecorations(o=>{if(this._highlightedDecorationId!==null&&(o.changeDecorationOptions(this._highlightedDecorationId,C._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),p!==null&&(this._highlightedDecorationId=p,o.changeDecorationOptions(this._highlightedDecorationId,C._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(o.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),p!==null){let s=this._editor.getModel().getDecorationRange(p);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){let a=s.endLineNumber-1,u=this._editor.getModel().getLineMaxColumn(a);s=new b.Range(s.startLineNumber,s.startColumn,a,u)}this._rangeHighlightDecorationId=o.addDecoration(s,C._RANGE_HIGHLIGHT_DECORATION)}}),c}set(g,p){this._editor.changeDecorations(c=>{let o=C._FIND_MATCH_DECORATION,s=[];if(g.length>1e3){o=C._FIND_MATCH_NO_OVERVIEW_DECORATION;const u=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/u,n=Math.max(2,Math.ceil(3/i));let t=g[0].range.startLineNumber,l=g[0].range.endLineNumber;for(let h=1,m=g.length;h<m;h++){const _=g[h].range;l+n>=_.startLineNumber?_.endLineNumber>l&&(l=_.endLineNumber):(s.push({range:new b.Range(t,1,l,1),options:C._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),t=_.startLineNumber,l=_.endLineNumber)}s.push({range:new b.Range(t,1,l,1),options:C._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let a=new Array(g.length);for(let u=0,r=g.length;u<r;u++)a[u]={range:g[u].range,options:o};this._decorations=c.deltaDecorations(this._decorations,a),this._overviewRulerApproximateDecorations=c.deltaDecorations(this._overviewRulerApproximateDecorations,s),this._rangeHighlightDecorationId&&(c.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(u=>c.removeDecoration(u)),this._findScopeDecorationIds=[]),(p==null?void 0:p.length)&&(this._findScopeDecorationIds=p.map(u=>c.addDecoration(u,C._FIND_SCOPE_DECORATION)))})}matchBeforePosition(g){if(this._decorations.length===0)return null;for(let p=this._decorations.length-1;p>=0;p--){let c=this._decorations[p],o=this._editor.getModel().getDecorationRange(c);if(!(!o||o.endLineNumber>g.lineNumber)){if(o.endLineNumber<g.lineNumber)return o;if(!(o.endColumn>g.column))return o}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(g){if(this._decorations.length===0)return null;for(let p=0,c=this._decorations.length;p<c;p++){let o=this._decorations[p],s=this._editor.getModel().getDecorationRange(o);if(!(!s||s.startLineNumber<g.lineNumber)){if(s.startLineNumber>g.lineNumber)return s;if(!(s.startColumn<g.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let g=[];return g=g.concat(this._decorations),g=g.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&g.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&g.push(this._rangeHighlightDecorationId),g}}e.FindDecorations=C,C._CURRENT_FIND_MATCH_DECORATION=M.ModelDecorationOptions.register({stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:S.themeColorFromId(w.overviewRulerFindMatchForeground),position:N.OverviewRulerLane.Center},minimap:{color:S.themeColorFromId(w.minimapFindMatch),position:N.MinimapPosition.Inline}}),C._FIND_MATCH_DECORATION=M.ModelDecorationOptions.register({stickiness:1,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:S.themeColorFromId(w.overviewRulerFindMatchForeground),position:N.OverviewRulerLane.Center},minimap:{color:S.themeColorFromId(w.minimapFindMatch),position:N.MinimapPosition.Inline}}),C._FIND_MATCH_NO_OVERVIEW_DECORATION=M.ModelDecorationOptions.register({stickiness:1,className:"findMatch",showIfCollapsed:!0}),C._FIND_MATCH_ONLY_OVERVIEW_DECORATION=M.ModelDecorationOptions.register({stickiness:1,overviewRuler:{color:S.themeColorFromId(w.overviewRulerFindMatchForeground),position:N.OverviewRulerLane.Center}}),C._RANGE_HIGHLIGHT_DECORATION=M.ModelDecorationOptions.register({stickiness:1,className:"rangeHighlight",isWholeLine:!0}),C._FIND_SCOPE_DECORATION=M.ModelDecorationOptions.register({className:"findScope",isWholeLine:!0})}),define(Q[142],J([0,1,15,2,92,14,3,21,166,598,403,404,16,19]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModelBoundToEditorModel=e.MATCHES_LIMIT=e.FIND_IDS=e.TogglePreserveCaseKeybinding=e.ToggleSearchScopeKeybinding=e.ToggleRegexKeybinding=e.ToggleWholeWordKeybinding=e.ToggleCaseSensitiveKeybinding=e.CONTEXT_REPLACE_INPUT_FOCUSED=e.CONTEXT_FIND_INPUT_FOCUSED=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new o.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_INPUT_FOCUSED=new o.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new o.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:512|33,mac:{primary:2048|512|33}},e.ToggleWholeWordKeybinding={primary:512|53,mac:{primary:2048|512|53}},e.ToggleRegexKeybinding={primary:512|48,mac:{primary:2048|512|48}},e.ToggleSearchScopeKeybinding={primary:512|42,mac:{primary:2048|512|42}},e.TogglePreserveCaseKeybinding={primary:512|46,mac:{primary:2048|512|46}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},e.MATCHES_LIMIT=19999;const a=240;class u{constructor(i,n){this._toDispose=new N.DisposableStore,this._editor=i,this._state=n,this._isDisposed=!1,this._startSearchingTimer=new b.TimeoutTimer,this._decorations=new g.FindDecorations(i),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new b.RunOnceScheduler(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(t=>{(t.reason===3||t.reason===5||t.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(t=>{this._ignoreModelContentChanged||(t.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(t=>this._onStateChanged(t))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,N.dispose(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(i){this._isDisposed||!this._editor.hasModel()||(i.searchString||i.isReplaceRevealed||i.isRegex||i.wholeWord||i.matchCase||i.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{i.searchScope?this.research(i.moveCursor,this._state.searchScope):this.research(i.moveCursor)},a)):i.searchScope?this.research(i.moveCursor,this._state.searchScope):this.research(i.moveCursor))}static _getSearchRange(i,n){return n||i.getFullModelRange()}research(i,n){let t=null;typeof n!="undefined"?n!==null&&(Array.isArray(n)?t=n:t=[n]):t=this._decorations.getFindScopes(),t!==null&&(t=t.map(_=>{if(_.startLineNumber!==_.endLineNumber){let f=_.endLineNumber;return _.endColumn===1&&(f=f-1),new S.Range(_.startLineNumber,1,f,this._editor.getModel().getLineMaxColumn(f))}return _}));let l=this._findMatches(t,!1,e.MATCHES_LIMIT);this._decorations.set(l,t);const h=this._editor.getSelection();let m=this._decorations.getCurrentMatchesPosition(h);if(m===0&&l.length>0){const _=s.findFirstInSorted(l.map(f=>f.range),f=>S.Range.compareRangesUsingStarts(f,h)>=0);m=_>0?_-1+1:m}this._state.changeMatchInfo(m,this._decorations.getCount(),void 0),i&&this._editor.getOption(31).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let i=this._decorations.getFindScope();return i&&this._editor.revealRangeInCenterIfOutsideViewport(i,0),!0}return!1}_setCurrentFindMatch(i){let n=this._decorations.setCurrentFindMatch(i);this._state.changeMatchInfo(n,this._decorations.getCount(),i),this._editor.setSelection(i),this._editor.revealRangeInCenterIfOutsideViewport(i,0)}_prevSearchPosition(i){let n=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:t,column:l}=i,h=this._editor.getModel();return n||l===1?(t===1?t=h.getLineCount():t--,l=h.getLineMaxColumn(t)):l--,new w.Position(t,l)}_moveToPrevMatch(i,n=!1){if(!this._state.canNavigateBack()){const y=this._decorations.matchAfterPosition(i);y&&this._setCurrentFindMatch(y);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let y=this._decorations.matchBeforePosition(i);y&&y.isEmpty()&&y.getStartPosition().equals(i)&&(i=this._prevSearchPosition(i),y=this._decorations.matchBeforePosition(i)),y&&this._setCurrentFindMatch(y);return}if(!this._cannotFind()){let t=this._decorations.getFindScope(),l=u._getSearchRange(this._editor.getModel(),t);l.getEndPosition().isBefore(i)&&(i=l.getEndPosition()),i.isBefore(l.getStartPosition())&&(i=l.getEndPosition());let{lineNumber:h,column:m}=i,_=this._editor.getModel(),f=new w.Position(h,m),v=_.findPreviousMatch(this._state.searchString,f,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,!1);if(v&&v.range.isEmpty()&&v.range.getStartPosition().equals(f)&&(f=this._prevSearchPosition(f),v=_.findPreviousMatch(this._state.searchString,f,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,!1)),!!v){if(!n&&!l.containsRange(v.range))return this._moveToPrevMatch(v.range.getStartPosition(),!0);this._setCurrentFindMatch(v.range)}}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(i){let n=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:t,column:l}=i,h=this._editor.getModel();return n||l===h.getLineMaxColumn(t)?(t===h.getLineCount()?t=1:t++,l=1):l++,new w.Position(t,l)}_moveToNextMatch(i){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(i);t&&this._setCurrentFindMatch(t);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let t=this._decorations.matchAfterPosition(i);t&&t.isEmpty()&&t.getStartPosition().equals(i)&&(i=this._nextSearchPosition(i),t=this._decorations.matchAfterPosition(i)),t&&this._setCurrentFindMatch(t);return}let n=this._getNextMatch(i,!1,!0);n&&this._setCurrentFindMatch(n.range)}_getNextMatch(i,n,t,l=!1){if(this._cannotFind())return null;let h=this._decorations.getFindScope(),m=u._getSearchRange(this._editor.getModel(),h);m.getEndPosition().isBefore(i)&&(i=m.getStartPosition()),i.isBefore(m.getStartPosition())&&(i=m.getStartPosition());let{lineNumber:_,column:f}=i,v=this._editor.getModel(),y=new w.Position(_,f),L=v.findNextMatch(this._state.searchString,y,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,n);return t&&L&&L.range.isEmpty()&&L.range.getStartPosition().equals(y)&&(y=this._nextSearchPosition(y),L=v.findNextMatch(this._state.searchString,y,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,n)),L?!l&&!m.containsRange(L.range)?this._getNextMatch(L.range.getEndPosition(),n,t,!0):L:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?c.parseReplaceString(this._state.replaceString):c.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!!this._hasMatches()){let i=this._getReplacePattern(),n=this._editor.getSelection(),t=this._getNextMatch(n.getStartPosition(),!0,!1);if(t)if(n.equalsRange(t.range)){let l=i.buildReplaceString(t.matches,this._state.preserveCase),h=new M.ReplaceCommand(n,l);this._executeEditorCommand("replace",h),this._decorations.setStartPosition(new w.Position(n.startLineNumber,n.startColumn+l.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(t.range)}}_findMatches(i,n,t){const l=(i||[null]).map(h=>u._getSearchRange(this._editor.getModel(),h));return this._editor.getModel().findMatches(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,n,t)}replaceAll(){if(!!this._hasMatches()){const i=this._decorations.getFindScopes();i===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(i),this.research(!1)}}_largeReplaceAll(){const n=new d.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null).parseSearchRequest();if(!!n){let t=n.regex;if(!t.multiline){let L="mu";t.ignoreCase&&(L+="i"),t.global&&(L+="g"),t=new RegExp(t.source,L)}const l=this._editor.getModel(),h=l.getValue(1),m=l.getFullModelRange(),_=this._getReplacePattern();let f;const v=this._state.preserveCase;_.hasReplacementPatterns||v?f=h.replace(t,function(){return _.buildReplaceString(arguments,v)}):f=h.replace(t,_.buildReplaceString(null,v));let y=new M.ReplaceCommandThatPreservesSelection(m,f,this._editor.getSelection());this._executeEditorCommand("replaceAll",y)}}_regularReplaceAll(i){const n=this._getReplacePattern();let t=this._findMatches(i,n.hasReplacementPatterns||this._state.preserveCase,1073741824),l=[];for(let m=0,_=t.length;m<_;m++)l[m]=n.buildReplaceString(t[m].matches,this._state.preserveCase);let h=new p.ReplaceAllCommand(this._editor.getSelection(),t.map(m=>m.range),l);this._executeEditorCommand("replaceAll",h)}selectAllMatches(){if(!!this._hasMatches()){let i=this._decorations.getFindScopes(),t=this._findMatches(i,!1,1073741824).map(h=>new C.Selection(h.range.startLineNumber,h.range.startColumn,h.range.endLineNumber,h.range.endColumn)),l=this._editor.getSelection();for(let h=0,m=t.length;h<m;h++)if(t[h].equalsRange(l)){t=[l].concat(t.slice(0,h)).concat(t.slice(h+1));break}this._editor.setSelections(t)}}_executeEditorCommand(i,n){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(i,n),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=u}),define(Q[599],J([0,1,7,233,52,15,142,22,11]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class g extends M.Widget{constructor(c,o,s,a){super();this._hideSoon=this._register(new w.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=c,this._state=o,this._keybindingService=s,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const u=a.getColorTheme().getColor(C.inputActiveOptionBorder),r=a.getColorTheme().getColor(C.inputActiveOptionForeground),i=a.getColorTheme().getColor(C.inputActiveOptionBackground);this.caseSensitive=this._register(new N.CaseSensitiveCheckbox({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:u,inputActiveOptionForeground:r,inputActiveOptionBackground:i})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new N.WholeWordsCheckbox({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:u,inputActiveOptionForeground:r,inputActiveOptionBackground:i})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new N.RegexCheckbox({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:u,inputActiveOptionForeground:r,inputActiveOptionBackground:i})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(n=>{let t=!1;n.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),n.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),n.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()})),this._register(b.addDisposableNonBubblingMouseOutListener(this._domNode,n=>this._onMouseOut())),this._register(b.addDisposableListener(this._domNode,"mouseover",n=>this._onMouseOver())),this._applyTheme(a.getColorTheme()),this._register(a.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(c){let o=this._keybindingService.lookupKeybinding(c);return o?` (${o.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return g.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){!this._isVisible||(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(c){let o={inputActiveOptionBorder:c.getColor(C.inputActiveOptionBorder),inputActiveOptionForeground:c.getColor(C.inputActiveOptionForeground),inputActiveOptionBackground:c.getColor(C.inputActiveOptionBackground)};this.caseSensitive.style(o),this.wholeWords.style(o),this.regex.style(o)}}e.FindOptionsWidget=g,g.ID="editor.contrib.findOptionsWidget",d.registerThemingParticipant((p,c)=>{const o=p.getColor(C.editorWidgetBackground);o&&c.addRule(`.monaco-editor .findOptionsWidget { background-color: ${o}; }`);const s=p.getColor(C.editorWidgetForeground);s&&c.addRule(`.monaco-editor .findOptionsWidget { color: ${s}; }`);const a=p.getColor(C.widgetShadow);a&&c.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${a}; }`);const u=p.getColor(C.contrastBorder);u&&c.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${u}; }`)})}),define(Q[600],J([0,1,6,2,3,142]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function S(d,g){return d===1?!0:d===2?!1:g}class C extends N.Disposable{constructor(){super();this._onFindReplaceStateChange=this._register(new b.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return S(this._isRegexOverride,this._isRegex)}get wholeWord(){return S(this._wholeWordOverride,this._wholeWord)}get matchCase(){return S(this._matchCaseOverride,this._matchCase)}get preserveCase(){return S(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(g,p,c){let o={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},s=!1;p===0&&(g=0),g>p&&(g=p),this._matchesPosition!==g&&(this._matchesPosition=g,o.matchesPosition=!0,s=!0),this._matchesCount!==p&&(this._matchesCount=p,o.matchesCount=!0,s=!0),typeof c!="undefined"&&(M.Range.equalsRange(this._currentMatch,c)||(this._currentMatch=c,o.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(o)}change(g,p,c=!0){var o;let s={moveCursor:p,updateHistory:c,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},a=!1;const u=this.isRegex,r=this.wholeWord,i=this.matchCase,n=this.preserveCase;typeof g.searchString!="undefined"&&this._searchString!==g.searchString&&(this._searchString=g.searchString,s.searchString=!0,a=!0),typeof g.replaceString!="undefined"&&this._replaceString!==g.replaceString&&(this._replaceString=g.replaceString,s.replaceString=!0,a=!0),typeof g.isRevealed!="undefined"&&this._isRevealed!==g.isRevealed&&(this._isRevealed=g.isRevealed,s.isRevealed=!0,a=!0),typeof g.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==g.isReplaceRevealed&&(this._isReplaceRevealed=g.isReplaceRevealed,s.isReplaceRevealed=!0,a=!0),typeof g.isRegex!="undefined"&&(this._isRegex=g.isRegex),typeof g.wholeWord!="undefined"&&(this._wholeWord=g.wholeWord),typeof g.matchCase!="undefined"&&(this._matchCase=g.matchCase),typeof g.preserveCase!="undefined"&&(this._preserveCase=g.preserveCase),typeof g.searchScope!="undefined"&&(((o=g.searchScope)===null||o===void 0?void 0:o.every(t=>{var l;return(l=this._searchScope)===null||l===void 0?void 0:l.some(h=>!M.Range.equalsRange(h,t))}))||(this._searchScope=g.searchScope,s.searchScope=!0,a=!0)),typeof g.loop!="undefined"&&this._loop!==g.loop&&(this._loop=g.loop,s.loop=!0,a=!0),this._isRegexOverride=typeof g.isRegexOverride!="undefined"?g.isRegexOverride:0,this._wholeWordOverride=typeof g.wholeWordOverride!="undefined"?g.wholeWordOverride:0,this._matchCaseOverride=typeof g.matchCaseOverride!="undefined"?g.matchCaseOverride:0,this._preserveCaseOverride=typeof g.preserveCaseOverride!="undefined"?g.preserveCaseOverride:0,u!==this.isRegex&&(a=!0,s.isRegex=!0),r!==this.wholeWord&&(a=!0,s.wholeWord=!0),i!==this.matchCase&&(a=!0,s.matchCase=!0),n!==this.preserveCase&&(a=!0,s.preserveCase=!0),a&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=w.MATCHES_LIMIT}}e.FindReplaceState=C}),define(Q[601],J([0,1,132,67,175,205,115,11,116,7,484,159,44,2,9,37,66,157]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.OneReferenceRenderer=e.FileReferencesRenderer=e.IdentityProvider=e.StringRepresentationProvider=e.Delegate=e.DataSource=void 0;let n=class{constructor(I){this._resolverService=I}hasChildren(I){return I instanceof b.ReferencesModel||I instanceof b.FileReferences}getChildren(I){if(I instanceof b.ReferencesModel)return I.groups;if(I instanceof b.FileReferences)return I.resolve(this._resolverService).then(k=>k.children);throw new Error("bad tree")}};n=Me([_e(0,N.ITextModelService)],n),e.DataSource=n;class t{getHeight(){return 23}getTemplateId(I){return I instanceof b.FileReferences?_.id:v.id}}e.Delegate=t;let l=class{constructor(I){this._keybindingService=I}getKeyboardNavigationLabel(I){var k;if(I instanceof b.OneReference){const E=(k=I.parent.getPreview(I))===null||k===void 0?void 0:k.preview(I.range);if(E)return E.value}return o.basename(I.uri)}};l=Me([_e(0,u.IKeybindingService)],l),e.StringRepresentationProvider=l;class h{getId(I){return I instanceof b.OneReference?I.id:I.uri}}e.IdentityProvider=h;let m=class extends s.Disposable{constructor(I,k,E){super();this._uriLabel=k;const T=document.createElement("div");T.classList.add("reference-file"),this.file=this._register(new M.IconLabel(T,{supportHighlights:!0})),this.badge=new w.CountBadge(g.append(T,g.$(".count"))),this._register(d.attachBadgeStyler(this.badge,E)),I.appendChild(T)}set(I,k){let E=o.dirname(I.uri);this.file.setLabel(c.getBaseLabel(I.uri),this._uriLabel.getUriLabel(E,{relative:!0}),{title:this._uriLabel.getUriLabel(I.uri),matches:k});const T=I.children.length;this.badge.setCount(T),T>1?this.badge.setTitleFormat(p.localize(0,null,T)):this.badge.setTitleFormat(p.localize(1,null,T))}};m=Me([_e(1,S.ILabelService),_e(2,C.IThemeService)],m);let _=class Ot{constructor(I){this._instantiationService=I,this.templateId=Ot.id}renderTemplate(I){return this._instantiationService.createInstance(m,I)}renderElement(I,k,E){E.set(I.element,r.createMatches(I.filterData))}disposeTemplate(I){I.dispose()}};_.id="FileReferencesRenderer",_=Me([_e(0,a.IInstantiationService)],_),e.FileReferencesRenderer=_;class f{constructor(I){this.label=new i.HighlightedLabel(I,!1)}set(I,k){var E;const T=(E=I.parent.getPreview(I))===null||E===void 0?void 0:E.preview(I.range);if(!T||!T.value)this.label.set(`${o.basename(I.uri)}:${I.range.startLineNumber+1}:${I.range.startColumn+1}`);else{const{value:O,highlight:A}=T;k&&!r.FuzzyScore.isDefault(k)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(O,r.createMatches(k))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(O,[A]))}}}class v{constructor(){this.templateId=v.id}renderTemplate(I){return new f(I)}renderElement(I,k,E){E.set(I.element,I.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=v,v.id="OneReferenceRenderer";class y{getWidgetAriaLabel(){return p.localize(2,null)}getAriaLabel(I){return I.ariaMessage}}e.AccessibilityProvider=y}),define(Q[258],J([0,1,53,11,49,2,108,20,88]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class g{constructor(c){this.options=c,this.rangeHighlightDecorationId=void 0}provide(c,o){var s;const a=new w.DisposableStore;c.canAcceptInBackground=!!((s=this.options)===null||s===void 0?void 0:s.canAcceptInBackground),c.matchOnLabel=c.matchOnDescription=c.matchOnDetail=c.sortByLabel=!1;const u=a.add(new w.MutableDisposable);return u.value=this.doProvide(c,o),a.add(this.onDidActiveTextEditorControlChange(()=>{u.value=void 0,u.value=this.doProvide(c,o)})),a}doProvide(c,o){const s=new w.DisposableStore,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const u={editor:a},r=S.getCodeEditor(a);if(r){let i=C.withNullAsUndefined(a.saveViewState());s.add(r.onDidChangeCursorPosition(()=>{i=C.withNullAsUndefined(a.saveViewState())})),u.restoreViewState=()=>{i&&a===this.activeTextEditorControl&&a.restoreViewState(i)},s.add(d.once(o.onCancellationRequested)(()=>{var n;return(n=u.restoreViewState)===null||n===void 0?void 0:n.call(u)}))}s.add(w.toDisposable(()=>this.clearDecorations(a))),s.add(this.provideWithTextEditor(u,c,o))}else s.add(this.provideWithoutTextEditor(c,o));return s}canProvideWithTextEditor(c){return!0}gotoLocation({editor:c},o){c.setSelection(o.range),c.revealRangeInCenter(o.range,0),o.preserveFocus||c.focus()}getModel(c){var o;return S.isDiffEditor(c)?(o=c.getModel())===null||o===void 0?void 0:o.modified:c.getModel()}addDecorations(c,o){c.changeDecorations(s=>{const a=[];this.rangeHighlightDecorationId&&(a.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),a.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const u=[{range:o,options:{className:"rangeHighlight",isWholeLine:!0}},{range:o,options:{overviewRuler:{color:N.themeColorFromId(M.overviewRulerRangeHighlight),position:b.OverviewRulerLane.Full}}}],[r,i]=s.deltaDecorations(a,u);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:i}})}clearDecorations(c){const o=this.rangeHighlightDecorationId;o&&(c.changeDecorations(s=>{s.deltaDecorations([o.overviewRulerDecorationId,o.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=g}),define(Q[602],J([0,1,501,2,258,108]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class S extends M.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(d){const g=b.localize(0,null);return d.items=[{label:g}],d.ariaLabel=g,N.Disposable.None}provideWithTextEditor(d,g,p){const c=d.editor,o=new N.DisposableStore;o.add(g.onDidAccept(u=>{const[r]=g.selectedItems;if(r){if(!this.isValidLineNumber(c,r.lineNumber))return;this.gotoLocation(d,{range:this.toRange(r.lineNumber,r.column),keyMods:g.keyMods,preserveFocus:u.inBackground}),u.inBackground||g.hide()}}));const s=()=>{const u=this.parsePosition(c,g.value.trim().substr(S.PREFIX.length)),r=this.getPickLabel(c,u.lineNumber,u.column);if(g.items=[{lineNumber:u.lineNumber,column:u.column,label:r}],g.ariaLabel=r,!this.isValidLineNumber(c,u.lineNumber)){this.clearDecorations(c);return}const i=this.toRange(u.lineNumber,u.column);c.revealRangeInCenter(i,0),this.addDecorations(c,i)};s(),o.add(g.onDidChangeValue(()=>s()));const a=w.getCodeEditor(c);return a&&a.getOptions().get(54).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(N.toDisposable(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(d=1,g=1){return{startLineNumber:d,startColumn:g,endLineNumber:d,endColumn:g}}parsePosition(d,g){const p=g.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),c=this.lineCount(d)+1;return{lineNumber:p[0]>0?p[0]:c+p[0],column:p[1]}}getPickLabel(d,g,p){if(this.isValidLineNumber(d,g))return this.isValidColumn(d,g,p)?b.localize(1,null,g,p):b.localize(2,null,g);const c=d.getPosition()||{lineNumber:1,column:1},o=this.lineCount(d);return o>1?b.localize(3,null,c.lineNumber,c.column,o):b.localize(4,null,c.lineNumber,c.column)}isValidLineNumber(d,g){return!g||typeof g!="number"?!1:g>0&&g<=this.lineCount(d)}isValidColumn(d,g,p){if(!p||typeof p!="number")return!1;const c=this.getModel(d);if(!c)return!1;const o={lineNumber:g,column:p};return c.validatePosition(o).equals(o)}lineCount(d){var g,p;return(p=(g=this.getModel(d))===null||g===void 0?void 0:g.getLineCount())!==null&&p!==void 0?p:0}}e.AbstractGotoLineQuickAccessProvider=S,S.PREFIX=":"}),define(Q[603],J([0,1,502,23,2,3,258,18,245,8,286,27]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;class o extends S.AbstractEditorNavigationQuickAccessProvider{constructor(r=Object.create(null)){super(r);this.options=r,r.canAcceptInBackground=!0}provideWithoutTextEditor(r){return this.provideLabelPick(r,b.localize(0,null)),M.Disposable.None}provideWithTextEditor(r,i,n){const t=r.editor,l=this.getModel(t);return l?C.DocumentSymbolProviderRegistry.has(l)?this.doProvideWithEditorSymbols(r,l,i,n):this.doProvideWithoutEditorSymbols(r,l,i,n):M.Disposable.None}doProvideWithoutEditorSymbols(r,i,n,t){const l=new M.DisposableStore;return this.provideLabelPick(n,b.localize(1,null)),(()=>Ie(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(i,l))||t.isCancellationRequested||l.add(this.doProvideWithEditorSymbols(r,i,n,t))}))(),l}provideLabelPick(r,i){r.items=[{label:i,index:0,kind:14}],r.ariaLabel=i}waitForLanguageSymbolRegistry(r,i){return Ie(this,void 0,void 0,function*(){if(C.DocumentSymbolProviderRegistry.has(r))return!0;let n;const t=new Promise(h=>n=h),l=i.add(C.DocumentSymbolProviderRegistry.onDidChange(()=>{C.DocumentSymbolProviderRegistry.has(r)&&(l.dispose(),n(!0))}));return i.add(M.toDisposable(()=>n(!1))),t})}doProvideWithEditorSymbols(r,i,n,t){const l=r.editor,h=new M.DisposableStore;h.add(n.onDidAccept(y=>{const[L]=n.selectedItems;L&&L.range&&(this.gotoLocation(r,{range:L.range.selection,keyMods:n.keyMods,preserveFocus:y.inBackground}),y.inBackground||n.hide())})),h.add(n.onDidTriggerItemButton(({item:y})=>{y&&y.range&&(this.gotoLocation(r,{range:y.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const m=this.getDocumentSymbols(i,t);let _;const f=()=>Ie(this,void 0,void 0,function*(){_==null||_.dispose(!0),n.busy=!1,_=new N.CancellationTokenSource(t),n.busy=!0;try{const y=p.prepareQuery(n.value.substr(o.PREFIX.length).trim()),L=yield this.doGetSymbolPicks(m,y,void 0,_.token);if(t.isCancellationRequested)return;L.length>0?n.items=L:y.original.length>0?this.provideLabelPick(n,b.localize(2,null)):this.provideLabelPick(n,b.localize(3,null))}finally{t.isCancellationRequested||(n.busy=!1)}});h.add(n.onDidChangeValue(()=>f())),f();let v=!0;return h.add(n.onDidChangeActive(()=>{const[y]=n.activeItems;if(y&&y.range){if(v){v=!1;return}l.revealRangeInCenter(y.range.selection,0),this.addDecorations(l,y.range.decoration)}})),h}doGetSymbolPicks(r,i,n,t){return Ie(this,void 0,void 0,function*(){const l=yield r;if(t.isCancellationRequested)return[];const h=i.original.indexOf(o.SCOPE_PREFIX)===0,m=h?1:0;let _,f;i.values&&i.values.length>1?(_=p.pieceToQuery(i.values[0]),f=p.pieceToQuery(i.values.slice(1))):_=i;const v=[];for(let k=0;k<l.length;k++){const E=l[k],T=g.trim(E.name),O=`$(symbol-${C.SymbolKinds.toString(E.kind)||"property"}) ${T}`,A=O.length-T.length;let B=E.containerName;(n==null?void 0:n.extraContainerLabel)&&(B?B=`${n.extraContainerLabel} \u2022 ${B}`:B=n.extraContainerLabel);let F,D,R,W;if(i.original.length>m){let K=!1;if(_!==i&&([F,D]=p.scoreFuzzy2(O,Object.assign(Object.assign({},i),{values:void 0}),m,A),typeof F=="number"&&(K=!0)),typeof F!="number"&&([F,D]=p.scoreFuzzy2(O,_,m,A),typeof F!="number"))continue;if(!K&&f){if(B&&f.original.length>0&&([R,W]=p.scoreFuzzy2(B,f)),typeof R!="number")continue;typeof F=="number"&&(F+=R)}}const x=E.tags&&E.tags.indexOf(1)>=0;v.push({index:k,kind:E.kind,score:F,label:O,ariaLabel:T,description:B,highlights:x?void 0:{label:D,description:W},range:{selection:w.Range.collapseToStart(E.selectionRange),decoration:E.range},strikethrough:x,buttons:(()=>{var K,Y;const ee=((K=this.options)===null||K===void 0?void 0:K.openSideBySideDirection)?(Y=this.options)===null||Y===void 0?void 0:Y.openSideBySideDirection():void 0;if(!!ee)return[{iconClass:ee==="right"?c.Codicon.splitHorizontal.classNames:c.Codicon.splitVertical.classNames,tooltip:ee==="right"?b.localize(4,null):b.localize(5,null)}]})()})}const y=v.sort((k,E)=>h?this.compareByKindAndScore(k,E):this.compareByScore(k,E));let L=[];if(h){let k,E,T=0;function I(){E&&typeof k=="number"&&T>0&&(E.label=g.format(a[k]||s,T))}for(const O of y)k!==O.kind?(I(),k=O.kind,T=1,E={type:"separator"},L.push(E)):T++,L.push(O);I()}else y.length>0&&(L=[{label:b.localize(6,null,v.length),type:"separator"},...y]);return L})}compareByScore(r,i){if(typeof r.score!="number"&&typeof i.score=="number")return 1;if(typeof r.score=="number"&&typeof i.score!="number")return-1;if(typeof r.score=="number"&&typeof i.score=="number"){if(r.score>i.score)return-1;if(r.score<i.score)return 1}return r.index<i.index?-1:r.index>i.index?1:0}compareByKindAndScore(r,i){const n=a[r.kind]||s,t=a[i.kind]||s,l=n.localeCompare(t);return l===0?this.compareByScore(r,i):l}getDocumentSymbols(r,i){return Ie(this,void 0,void 0,function*(){const n=yield d.OutlineModel.create(r,i);return i.isCancellationRequested?[]:n.asListOfDocumentSymbols()})}}e.AbstractGotoSymbolQuickAccessProvider=o,o.PREFIX="@",o.SCOPE_PREFIX=":",o.PREFIX_BY_CATEGORY=`${o.PREFIX}${o.SCOPE_PREFIX}`;const s=b.localize(7,null),a={[5]:b.localize(8,null),[11]:b.localize(9,null),[8]:b.localize(10,null),[12]:b.localize(11,null),[4]:b.localize(12,null),[22]:b.localize(13,null),[23]:b.localize(14,null),[24]:b.localize(15,null),[10]:b.localize(16,null),[2]:b.localize(17,null),[3]:b.localize(18,null),[25]:b.localize(19,null),[1]:b.localize(20,null),[6]:b.localize(21,null),[9]:b.localize(22,null),[21]:b.localize(23,null),[14]:b.localize(24,null),[0]:b.localize(25,null),[17]:b.localize(26,null),[15]:b.localize(27,null),[16]:b.localize(28,null),[18]:b.localize(29,null),[19]:b.localize(30,null),[7]:b.localize(31,null),[13]:b.localize(32,null)}}),define(Q[604],J([0,1,2,14,504,16,22,11,37,350]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameInputField=e.CONTEXT_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_RENAME_INPUT_VISIBLE=new w.RawContextKey("renameInputVisible",!1);let g=class{constructor(c,o,s,a,u){this._editor=c,this._acceptKeybindings=o,this._themeService=s,this._keybindingService=a,this._disposables=new b.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(u),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(38)&&this._updateFont()})),this._disposables.add(s.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",M.localize(0,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const c=()=>{var o,s;const[a,u]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(a),this._label.innerText=M.localize(1,null,(o=this._keybindingService.lookupKeybinding(a))===null||o===void 0?void 0:o.getLabel(),(s=this._keybindingService.lookupKeybinding(u))===null||s===void 0?void 0:s.getLabel())};c(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(c)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(c){var o,s,a,u;if(!(!this._input||!this._domNode)){const r=c.getColor(S.widgetShadow);this._domNode.style.backgroundColor=String((o=c.getColor(S.editorWidgetBackground))!==null&&o!==void 0?o:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.color=String((s=c.getColor(S.inputForeground))!==null&&s!==void 0?s:""),this._input.style.backgroundColor=String((a=c.getColor(S.inputBackground))!==null&&a!==void 0?a:"");const i=c.getColor(S.inputBorder);this._input.style.borderWidth=i?"1px":"0px",this._input.style.borderStyle=i?"solid":"none",this._input.style.borderColor=(u=i==null?void 0:i.toString())!==null&&u!==void 0?u:"none"}}_updateFont(){if(!(!this._input||!this._label)){const c=this._editor.getOption(38);this._input.style.fontFamily=c.fontFamily,this._input.style.fontWeight=c.fontWeight,this._input.style.fontSize=`${c.fontSize}px`,this._label.style.fontSize=`${c.fontSize*.8}px`}}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(c){c||this.cancelInput(!0)}acceptInput(c){this._currentAcceptInput&&this._currentAcceptInput(c)}cancelInput(c){this._currentCancelInput&&this._currentCancelInput(c)}getInput(c,o,s,a,u,r){this._domNode.classList.toggle("preview",u),this._position=new N.Position(c.startLineNumber,c.startColumn),this._input.value=o,this._input.setAttribute("selectionStart",s.toString()),this._input.setAttribute("selectionEnd",a.toString()),this._input.size=Math.max((c.endColumn-c.startColumn)*1.1,20);const i=new b.DisposableStore;return new Promise(n=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,n(t),!0),this._currentAcceptInput=t=>{if(this._input.value.trim().length===0||this._input.value===o){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,n({newName:this._input.value,wantsPreview:u&&t})},r.onCancellationRequested(()=>this.cancelInput(!0)),i.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{i.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};g=Me([_e(2,C.IThemeService),_e(3,d.IKeybindingService),_e(4,w.IContextKeyService)],g),e.RenameInputField=g}),define(Q[259],J([0,1,512,11,22,27]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SYMBOL_ICON_VARIABLE_FOREGROUND=e.SYMBOL_ICON_UNIT_FOREGROUND=e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=e.SYMBOL_ICON_TEXT_FOREGROUND=e.SYMBOL_ICON_STRUCT_FOREGROUND=e.SYMBOL_ICON_STRING_FOREGROUND=e.SYMBOL_ICON_SNIPPET_FOREGROUND=e.SYMBOL_ICON_REFERENCE_FOREGROUND=e.SYMBOL_ICON_PROPERTY_FOREGROUND=e.SYMBOL_ICON_PACKAGE_FOREGROUND=e.SYMBOL_ICON_OPERATOR_FOREGROUND=e.SYMBOL_ICON_OBJECT_FOREGROUND=e.SYMBOL_ICON_NUMBER_FOREGROUND=e.SYMBOL_ICON_NULL_FOREGROUND=e.SYMBOL_ICON_NAMESPACE_FOREGROUND=e.SYMBOL_ICON_MODULE_FOREGROUND=e.SYMBOL_ICON_METHOD_FOREGROUND=e.SYMBOL_ICON_KEYWORD_FOREGROUND=e.SYMBOL_ICON_KEY_FOREGROUND=e.SYMBOL_ICON_INTERFACE_FOREGROUND=e.SYMBOL_ICON_FUNCTION_FOREGROUND=e.SYMBOL_ICON_FOLDER_FOREGROUND=e.SYMBOL_ICON_FILE_FOREGROUND=e.SYMBOL_ICON_FIELD_FOREGROUND=e.SYMBOL_ICON_EVENT_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=e.SYMBOL_ICON_CONSTANT_FOREGROUND=e.SYMBOL_ICON_COLOR_FOREGROUND=e.SYMBOL_ICON_CLASS_FOREGROUND=e.SYMBOL_ICON_BOOLEAN_FOREGROUND=e.SYMBOL_ICON_ARRAY_FOREGROUND=void 0,e.SYMBOL_ICON_ARRAY_FOREGROUND=M.registerColor("symbolIcon.arrayForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=M.registerColor("symbolIcon.booleanForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=M.registerColor("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},b.localize(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=M.registerColor("symbolIcon.colorForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=M.registerColor("symbolIcon.constantForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=M.registerColor("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},b.localize(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=M.registerColor("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},b.localize(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=M.registerColor("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},b.localize(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=M.registerColor("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},b.localize(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=M.registerColor("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},b.localize(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=M.registerColor("symbolIcon.fileForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=M.registerColor("symbolIcon.folderForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=M.registerColor("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},b.localize(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=M.registerColor("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},b.localize(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=M.registerColor("symbolIcon.keyForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=M.registerColor("symbolIcon.keywordForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=M.registerColor("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},b.localize(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=M.registerColor("symbolIcon.moduleForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=M.registerColor("symbolIcon.namespaceForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=M.registerColor("symbolIcon.nullForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=M.registerColor("symbolIcon.numberForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=M.registerColor("symbolIcon.objectForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=M.registerColor("symbolIcon.operatorForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=M.registerColor("symbolIcon.packageForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=M.registerColor("symbolIcon.propertyForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=M.registerColor("symbolIcon.referenceForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=M.registerColor("symbolIcon.snippetForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=M.registerColor("symbolIcon.stringForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=M.registerColor("symbolIcon.structForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=M.registerColor("symbolIcon.textForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=M.registerColor("symbolIcon.typeParameterForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=M.registerColor("symbolIcon.unitForeground",{dark:M.foreground,light:M.foreground,hc:M.foreground},b.localize(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=M.registerColor("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},b.localize(32,null)),N.registerThemingParticipant((S,C)=>{const d=S.getColor(e.SYMBOL_ICON_ARRAY_FOREGROUND);d&&C.addRule(`${w.Codicon.symbolArray.cssSelector} { color: ${d}; }`);const g=S.getColor(e.SYMBOL_ICON_BOOLEAN_FOREGROUND);g&&C.addRule(`${w.Codicon.symbolBoolean.cssSelector} { color: ${g}; }`);const p=S.getColor(e.SYMBOL_ICON_CLASS_FOREGROUND);p&&C.addRule(`${w.Codicon.symbolClass.cssSelector} { color: ${p}; }`);const c=S.getColor(e.SYMBOL_ICON_METHOD_FOREGROUND);c&&C.addRule(`${w.Codicon.symbolMethod.cssSelector} { color: ${c}; }`);const o=S.getColor(e.SYMBOL_ICON_COLOR_FOREGROUND);o&&C.addRule(`${w.Codicon.symbolColor.cssSelector} { color: ${o}; }`);const s=S.getColor(e.SYMBOL_ICON_CONSTANT_FOREGROUND);s&&C.addRule(`${w.Codicon.symbolConstant.cssSelector} { color: ${s}; }`);const a=S.getColor(e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);a&&C.addRule(`${w.Codicon.symbolConstructor.cssSelector} { color: ${a}; }`);const u=S.getColor(e.SYMBOL_ICON_ENUMERATOR_FOREGROUND);u&&C.addRule(`
${w.Codicon.symbolValue.cssSelector},${w.Codicon.symbolEnum.cssSelector} { color: ${u}; }`);const r=S.getColor(e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);r&&C.addRule(`${w.Codicon.symbolEnumMember.cssSelector} { color: ${r}; }`);const i=S.getColor(e.SYMBOL_ICON_EVENT_FOREGROUND);i&&C.addRule(`${w.Codicon.symbolEvent.cssSelector} { color: ${i}; }`);const n=S.getColor(e.SYMBOL_ICON_FIELD_FOREGROUND);n&&C.addRule(`${w.Codicon.symbolField.cssSelector} { color: ${n}; }`);const t=S.getColor(e.SYMBOL_ICON_FILE_FOREGROUND);t&&C.addRule(`${w.Codicon.symbolFile.cssSelector} { color: ${t}; }`);const l=S.getColor(e.SYMBOL_ICON_FOLDER_FOREGROUND);l&&C.addRule(`${w.Codicon.symbolFolder.cssSelector} { color: ${l}; }`);const h=S.getColor(e.SYMBOL_ICON_FUNCTION_FOREGROUND);h&&C.addRule(`${w.Codicon.symbolFunction.cssSelector} { color: ${h}; }`);const m=S.getColor(e.SYMBOL_ICON_INTERFACE_FOREGROUND);m&&C.addRule(`${w.Codicon.symbolInterface.cssSelector} { color: ${m}; }`);const _=S.getColor(e.SYMBOL_ICON_KEY_FOREGROUND);_&&C.addRule(`${w.Codicon.symbolKey.cssSelector} { color: ${_}; }`);const f=S.getColor(e.SYMBOL_ICON_KEYWORD_FOREGROUND);f&&C.addRule(`${w.Codicon.symbolKeyword.cssSelector} { color: ${f}; }`);const v=S.getColor(e.SYMBOL_ICON_MODULE_FOREGROUND);v&&C.addRule(`${w.Codicon.symbolModule.cssSelector} { color: ${v}; }`);const y=S.getColor(e.SYMBOL_ICON_NAMESPACE_FOREGROUND);y&&C.addRule(`${w.Codicon.symbolNamespace.cssSelector} { color: ${y}; }`);const L=S.getColor(e.SYMBOL_ICON_NULL_FOREGROUND);L&&C.addRule(`${w.Codicon.symbolNull.cssSelector} { color: ${L}; }`);const I=S.getColor(e.SYMBOL_ICON_NUMBER_FOREGROUND);I&&C.addRule(`${w.Codicon.symbolNumber.cssSelector} { color: ${I}; }`);const k=S.getColor(e.SYMBOL_ICON_OBJECT_FOREGROUND);k&&C.addRule(`${w.Codicon.symbolObject.cssSelector} { color: ${k}; }`);const E=S.getColor(e.SYMBOL_ICON_OPERATOR_FOREGROUND);E&&C.addRule(`${w.Codicon.symbolOperator.cssSelector} { color: ${E}; }`);const T=S.getColor(e.SYMBOL_ICON_PACKAGE_FOREGROUND);T&&C.addRule(`${w.Codicon.symbolPackage.cssSelector} { color: ${T}; }`);const O=S.getColor(e.SYMBOL_ICON_PROPERTY_FOREGROUND);O&&C.addRule(`${w.Codicon.symbolProperty.cssSelector} { color: ${O}; }`);const A=S.getColor(e.SYMBOL_ICON_REFERENCE_FOREGROUND);A&&C.addRule(`${w.Codicon.symbolReference.cssSelector} { color: ${A}; }`);const B=S.getColor(e.SYMBOL_ICON_SNIPPET_FOREGROUND);B&&C.addRule(`${w.Codicon.symbolSnippet.cssSelector} { color: ${B}; }`);const F=S.getColor(e.SYMBOL_ICON_STRING_FOREGROUND);F&&C.addRule(`${w.Codicon.symbolString.cssSelector} { color: ${F}; }`);const D=S.getColor(e.SYMBOL_ICON_STRUCT_FOREGROUND);D&&C.addRule(`${w.Codicon.symbolStruct.cssSelector} { color: ${D}; }`);const R=S.getColor(e.SYMBOL_ICON_TEXT_FOREGROUND);R&&C.addRule(`${w.Codicon.symbolText.cssSelector} { color: ${R}; }`);const W=S.getColor(e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);W&&C.addRule(`${w.Codicon.symbolTypeParameter.cssSelector} { color: ${W}; }`);const x=S.getColor(e.SYMBOL_ICON_UNIT_FOREGROUND);x&&C.addRule(`${w.Codicon.symbolUnit.cssSelector} { color: ${x}; }`);const K=S.getColor(e.SYMBOL_ICON_VARIABLE_FOREGROUND);K&&C.addRule(`${w.Codicon.symbolVariable.cssSelector} { color: ${K}; }`)})}),define(Q[605],J([0,1,7,43,583,16,11]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorServiceImpl=void 0;let C=class extends M.CodeEditorServiceImpl{constructor(g,p,c){super(g,c);this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=p.createKey("editorIsOpen",!1)}_checkContextKey(){let g=!1;for(const p of this.listCodeEditors())if(!p.isSimpleWidget){g=!0;break}this._editorIsOpen.set(g)}getActiveCodeEditor(){return null}openCodeEditor(g,p,c){return p?Promise.resolve(this.doOpenEditor(p,g)):Promise.resolve(null)}doOpenEditor(g,p){if(!this.findModel(g,p.resource)){if(p.resource){const s=p.resource.scheme;if(s===N.Schemas.http||s===N.Schemas.https)return b.windowOpenNoOpener(p.resource.toString()),g}return null}const o=p.options?p.options.selection:null;if(o)if(typeof o.endLineNumber=="number"&&typeof o.endColumn=="number")g.setSelection(o),g.revealRangeInCenter(o,1);else{const s={lineNumber:o.startLineNumber,column:o.startColumn};g.setPosition(s),g.revealPositionInCenter(s,1)}return g}findModel(g,p){const c=g.getModel();return c&&c.uri.toString()!==p.toString()?null:c}};C=Me([_e(1,w.IContextKeyService),_e(2,S.IThemeService)],C),e.StandaloneCodeEditorServiceImpl=C}),define(Q[606],J([0,1,49,22]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hc_black=e.vs_dark=e.vs=void 0,e.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:"098658"},{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:"098658"},{token:"attribute.value.unit",foreground:"098658"},{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:"C700C7"}],colors:{[N.editorBackground]:"#FFFFFE",[N.editorForeground]:"#000000",[N.editorInactiveSelection]:"#E5EBF1",[b.editorIndentGuides]:"#D3D3D3",[b.editorActiveIndentGuides]:"#939393",[N.editorSelectionHighlight]:"#ADD6FF4D"}},e.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:{[N.editorBackground]:"#1E1E1E",[N.editorForeground]:"#D4D4D4",[N.editorInactiveSelection]:"#3A3D41",[b.editorIndentGuides]:"#404040",[b.editorActiveIndentGuides]:"#707070",[N.editorSelectionHighlight]:"#ADD6FF26"}},e.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:{[N.editorBackground]:"#000000",[N.editorForeground]:"#FFFFFF",[b.editorIndentGuides]:"#FFFFFF",[b.editorActiveIndentGuides]:"#FFFFFF"}}}),define(Q[34],J([0,1,48,9,16,26,2,6,11,54,71,27]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=e.isIMenuItem=void 0;function o(r){return r.command!==void 0}e.isIMenuItem=o;class s{constructor(i){this.id=s._idPool++,this._debugName=i}}e.MenuId=s,s._idPool=0,s.CommandPalette=new s("CommandPalette"),s.EditorContext=new s("EditorContext"),s.EditorContextPeek=new s("EditorContextPeek"),s.MenubarEditMenu=new s("MenubarEditMenu"),s.MenubarGoMenu=new s("MenubarGoMenu"),s.MenubarSelectionMenu=new s("MenubarSelectionMenu"),e.IMenuService=N.createDecorator("menuService"),e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new C.Emitter,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:r=>r===s.CommandPalette}}addCommand(r){return this.addCommands(g.Iterable.single(r))}addCommands(r){for(const i of r)this._commands.set(i.id,i);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),S.toDisposable(()=>{let i=!1;for(const n of r)i=this._commands.delete(n.id)||i;i&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((i,n)=>r.set(n,i)),r}appendMenuItem(r,i){return this.appendMenuItems(g.Iterable.single({id:r,item:i}))}appendMenuItems(r){const i=new Set,n=new p.LinkedList;for(const{id:t,item:l}of r){let h=this._menuItems.get(t);h||(h=new p.LinkedList,this._menuItems.set(t,h)),n.push(h.push(l)),i.add(t)}return this._onDidChangeMenu.fire(i),S.toDisposable(()=>{if(n.size>0){for(let t of n)t();this._onDidChangeMenu.fire(i),n.clear()}})}getMenuItems(r){let i;return this._menuItems.has(r)?i=[...this._menuItems.get(r)]:i=[],r===s.CommandPalette&&this._appendImplicitItems(i),i}_appendImplicitItems(r){const i=new Set;for(const n of r)o(n)&&(i.add(n.command.id),n.alt&&i.add(n.alt.id));this._commands.forEach((n,t)=>{i.has(t)||r.push({command:n})})}};class a extends b.SubmenuAction{constructor(i,n,t,l){super(`submenuitem.${i.submenu.id}`,typeof i.title=="string"?i.title:i.title.value,[],"submenu");this.item=i,this._menuService=n,this._contextKeyService=t,this._options=l}get actions(){const i=[],n=this._menuService.createMenu(this.item.submenu,this._contextKeyService),t=n.getActions(this._options);n.dispose();for(const[,l]of t)l.length>0&&(i.push(...l),i.push(new b.Separator));return i.length&&i.pop(),i}}e.SubmenuItemAction=a;let u=class Pt{constructor(i,n,t,l,h){var m;if(this._commandService=h,this.id=i.id,this.label=typeof i.title=="string"?i.title:i.title.value,this.tooltip=(m=i.tooltip)!==null&&m!==void 0?m:"",this.enabled=!i.precondition||l.contextMatchesRules(i.precondition),this.checked=!1,i.toggled){const _=i.toggled.condition?i.toggled:{condition:i.toggled};this.checked=l.contextMatchesRules(_.condition),this.checked&&_.tooltip&&(this.tooltip=typeof _.tooltip=="string"?_.tooltip:_.tooltip.value)}this.item=i,this.alt=n?new Pt(n,void 0,t,l,h):void 0,this._options=t,d.ThemeIcon.isThemeIcon(i.icon)&&(this.class=c.CSSIcon.asClassName(i.icon))}dispose(){}run(...i){var n,t;let l=[];return((n=this._options)===null||n===void 0?void 0:n.arg)&&(l=[...l,this._options.arg]),((t=this._options)===null||t===void 0?void 0:t.shouldForwardArgs)&&(l=[...l,...i]),this._commandService.executeCommand(this.id,...l)}};u=Me([_e(3,M.IContextKeyService),_e(4,w.ICommandService)],u),e.MenuItemAction=u}),define(Q[13],J([0,1,447,24,28,14,36,67,34,26,16,86,33,87,20]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=e.registerEditorContribution=e.registerInstantiatedEditorAction=e.registerMultiEditorAction=e.registerEditorAction=e.registerEditorCommand=e.registerModelCommand=e.registerModelAndPositionCommand=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=void 0;class u{constructor(A){this.id=A.id,this.precondition=A.precondition,this._kbOpts=A.kbOpts,this._menuOpts=A.menuOpts,this._description=A.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let A=this._kbOpts.kbExpr;this.precondition&&(A?A=p.ContextKeyExpr.and(A,this.precondition):A=this.precondition),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:this.id,handler:(B,F)=>this.runCommand(B,F),weight:this._kbOpts.weight,args:this._kbOpts.args,when:A,primary:this._kbOpts.primary,secondary:this._kbOpts.secondary,win:this._kbOpts.win,linux:this._kbOpts.linux,mac:this._kbOpts.mac,description:this._description})}else g.CommandsRegistry.registerCommand({id:this.id,handler:(A,B)=>this.runCommand(A,B),description:this._description})}_registerMenuItem(A){d.MenuRegistry.appendMenuItem(A.menuId,{group:A.group,command:{id:this.id,title:A.title,icon:A.icon,precondition:this.precondition},when:A.when,order:A.order})}}e.Command=u;class r extends u{constructor(){super(...arguments);this._implementations=[]}addImplementation(A,B){return this._implementations.push([A,B]),this._implementations.sort((F,D)=>D[0]-F[0]),{dispose:()=>{for(let F=0;F<this._implementations.length;F++)if(this._implementations[F][1]===B){this._implementations.splice(F,1);return}}}}runCommand(A,B){for(const F of this._implementations){const D=F[1](A,B);if(D)return typeof D=="boolean"?void 0:D}}}e.MultiCommand=r;class i extends u{constructor(A,B){super(B);this.command=A}runCommand(A,B){return this.command.runCommand(A,B)}}e.ProxyCommand=i;class n extends u{static bindToContribution(A){return class extends n{constructor(F){super(F);this._callback=F.handler}runEditorCommand(F,D,R){A(D)&&this._callback(A(D),R)}}}runCommand(A,B){const F=A.get(M.ICodeEditorService),D=F.getFocusedCodeEditor()||F.getActiveCodeEditor();if(!!D)return D.invokeWithinContext(R=>{if(!!R.get(p.IContextKeyService).contextMatchesRules(a.withNullAsUndefined(this.precondition)))return this.runEditorCommand(R,D,B)})}}e.EditorCommand=n;class t extends n{constructor(A){super(t.convertOptions(A));this.label=A.label,this.alias=A.alias}static convertOptions(A){let B;Array.isArray(A.menuOpts)?B=A.menuOpts:A.menuOpts?B=[A.menuOpts]:B=[];function F(D){return D.menuId||(D.menuId=d.MenuId.EditorContext),D.title||(D.title=A.label),D.when=p.ContextKeyExpr.and(A.precondition,D.when),D}return Array.isArray(A.contextMenuOpts)?B.push(...A.contextMenuOpts.map(F)):A.contextMenuOpts&&B.push(F(A.contextMenuOpts)),A.menuOpts=B,A}runEditorCommand(A,B,F){return this.reportTelemetry(A,B),this.run(A,B,F||{})}reportTelemetry(A,B){A.get(s.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=t;class l extends t{constructor(){super(...arguments);this._implementations=[]}addImplementation(A,B){return this._implementations.push([A,B]),this._implementations.sort((F,D)=>D[0]-F[0]),{dispose:()=>{for(let F=0;F<this._implementations.length;F++)if(this._implementations[F][1]===B){this._implementations.splice(F,1);return}}}}run(A,B,F){for(const D of this._implementations){const R=D[1](A,F);if(R)return typeof R=="boolean"?void 0:R}}}e.MultiEditorAction=l;function h(O,A){g.CommandsRegistry.registerCommand(O,function(B,...F){const[D,R]=F;a.assertType(N.URI.isUri(D)),a.assertType(w.Position.isIPosition(R));const W=B.get(S.IModelService).getModel(D);if(W){const x=w.Position.lift(R);return A(W,x,...F.slice(2))}return B.get(C.ITextModelService).createModelReference(D).then(x=>new Promise((K,Y)=>{try{const ee=A(x.object.textEditorModel,w.Position.lift(R),F.slice(2));K(ee)}catch(ee){Y(ee)}}).finally(()=>{x.dispose()}))})}e.registerModelAndPositionCommand=h;function m(O,A){g.CommandsRegistry.registerCommand(O,function(B,...F){const[D]=F;a.assertType(N.URI.isUri(D));const R=B.get(S.IModelService).getModel(D);return R?A(R,...F.slice(1)):B.get(C.ITextModelService).createModelReference(D).then(W=>new Promise((x,K)=>{try{const Y=A(W.object.textEditorModel,F.slice(1));x(Y)}catch(Y){K(Y)}}).finally(()=>{W.dispose()}))})}e.registerModelCommand=m;function _(O){return E.INSTANCE.registerEditorCommand(O),O}e.registerEditorCommand=_;function f(O){const A=new O;return E.INSTANCE.registerEditorAction(A),A}e.registerEditorAction=f;function v(O){return E.INSTANCE.registerEditorAction(O),O}e.registerMultiEditorAction=v;function y(O){E.INSTANCE.registerEditorAction(O)}e.registerInstantiatedEditorAction=y;function L(O,A){E.INSTANCE.registerEditorContribution(O,A)}e.registerEditorContribution=L;var I;(function(O){function A(W){return E.INSTANCE.getEditorCommand(W)}O.getEditorCommand=A;function B(){return E.INSTANCE.getEditorActions()}O.getEditorActions=B;function F(){return E.INSTANCE.getEditorContributions()}O.getEditorContributions=F;function D(W){return E.INSTANCE.getEditorContributions().filter(x=>W.indexOf(x.id)>=0)}O.getSomeEditorContributions=D;function R(){return E.INSTANCE.getDiffEditorContributions()}O.getDiffEditorContributions=R})(I=e.EditorExtensionsRegistry||(e.EditorExtensionsRegistry={}));const k={EditorCommonContributions:"editor.contributions"};class E{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(A,B){this.editorContributions.push({id:A,ctor:B})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(A){A.register(),this.editorActions.push(A)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(A){A.register(),this.editorCommands[A.id]=A}getEditorCommand(A){return this.editorCommands[A]||null}}E.INSTANCE=new E,o.Registry.add(k.EditorCommonContributions,E.INSTANCE);function T(O){return O.register(),O}e.UndoCommand=T(new r({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2048|56},menuOpts:[{menuId:d.MenuId.MenubarEditMenu,group:"1_do",title:b.localize(0,null),order:1},{menuId:d.MenuId.CommandPalette,group:"",title:b.localize(1,null),order:1}]})),T(new i(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=T(new r({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2048|55,secondary:[2048|1024|56],mac:{primary:2048|1024|56}},menuOpts:[{menuId:d.MenuId.MenubarEditMenu,group:"1_do",title:b.localize(2,null),order:2},{menuId:d.MenuId.CommandPalette,group:"",title:b.localize(3,null),order:1}]})),T(new i(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=T(new r({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2048|31},menuOpts:[{menuId:d.MenuId.MenubarSelectionMenu,group:"1_basic",title:b.localize(4,null),order:1},{menuId:d.MenuId.CommandPalette,group:"",title:b.localize(5,null),order:1}]}))}),define(Q[188],J([0,1,444,35,20,13,28,536,42,181,241,182,14,3,25,16,86]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const i=0;class n extends w.EditorCommand{runEditorCommand(E,T,O){const A=T._getViewModel();!A||this.runCoreEditorCommand(A,O||{})}}e.CoreEditorCommand=n;var t;(function(k){const E=function(O){if(!M.isObject(O))return!1;const A=O;return!(!M.isString(A.to)||!M.isUndefined(A.by)&&!M.isString(A.by)||!M.isUndefined(A.value)&&!M.isNumber(A.value)||!M.isUndefined(A.revealCursor)&&!M.isBoolean(A.revealCursor))};k.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:E,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},k.RawDirection={Up:"up",Down:"down"},k.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function T(O){let A;switch(O.to){case k.RawDirection.Up:A=1;break;case k.RawDirection.Down:A=2;break;default:return null}let B;switch(O.by){case k.RawUnit.Line:B=1;break;case k.RawUnit.WrappedLine:B=2;break;case k.RawUnit.Page:B=3;break;case k.RawUnit.HalfPage:B=4;break;default:B=2}const F=Math.floor(O.value||1),D=!!O.revealCursor;return{direction:A,unit:B,value:F,revealCursor:D,select:!!O.select}}k.parse=T})(t=e.EditorScroll_||(e.EditorScroll_={}));var l;(function(k){const E=function(T){if(!M.isObject(T))return!1;const O=T;return!(!M.isNumber(O.lineNumber)&&!M.isString(O.lineNumber)||!M.isUndefined(O.at)&&!M.isString(O.at))};k.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:E,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},k.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(l=e.RevealLine_||(e.RevealLine_={}));class h{constructor(E){E.addImplementation(1e4,(T,O)=>{const A=T.get(S.ICodeEditorService).getFocusedCodeEditor();return A&&A.hasTextFocus()?this._runEditorCommand(T,A,O):!1}),E.addImplementation(1e3,(T,O)=>{const A=document.activeElement;return A&&["input","textarea"].indexOf(A.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),E.addImplementation(0,(T,O)=>{const A=T.get(S.ICodeEditorService).getActiveCodeEditor();return A?(A.focus(),this._runEditorCommand(T,A,O)):!1})}_runEditorCommand(E,T,O){const A=this.runEditorCommand(E,T,O);return A||!0}}var m;(function(k){class E extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,[p.CursorMoveCommands.moveTo(z,z.getPrimaryCursorState(),this._inSelectionMode,P.position,P.viewPosition)]),z.revealPrimaryCursor(P.source,!0)}}k.MoveTo=w.registerEditorCommand(new E({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),k.MoveToSelect=w.registerEditorCommand(new E({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class T extends n{runCoreEditorCommand(z,P){z.model.pushStackElement();const V=this._getColumnSelectResult(z,z.getPrimaryCursorState(),z.getCursorColumnSelectData(),P);z.setCursorStates(P.source,3,V.viewStates.map(U=>d.CursorState.fromViewState(U))),z.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:V.fromLineNumber,fromViewVisualColumn:V.fromVisualColumn,toViewLineNumber:V.toLineNumber,toViewVisualColumn:V.toVisualColumn}),V.reversed?z.revealTopMostCursor(P.source):z.revealBottomMostCursor(P.source)}}k.ColumnSelect=w.registerEditorCommand(new class extends T{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(X,z,P,V){const U=X.model.validatePosition(V.position),H=X.coordinatesConverter.validateViewPosition(new o.Position(V.viewPosition.lineNumber,V.viewPosition.column),U);let $=V.doColumnSelect?P.fromViewLineNumber:H.lineNumber,ie=V.doColumnSelect?P.fromViewVisualColumn:V.mouseColumn-1;return C.ColumnSelection.columnSelect(X.cursorConfig,X,$,ie,H.lineNumber,V.mouseColumn-1)}}),k.CursorColumnSelectLeft=w.registerEditorCommand(new class extends T{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|1024|512|15,linux:{primary:0}}})}_getColumnSelectResult(X,z,P,V){return C.ColumnSelection.columnSelectLeft(X.cursorConfig,X,P)}}),k.CursorColumnSelectRight=w.registerEditorCommand(new class extends T{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|1024|512|17,linux:{primary:0}}})}_getColumnSelectResult(X,z,P,V){return C.ColumnSelection.columnSelectRight(X.cursorConfig,X,P)}});class O extends T{constructor(z){super(z);this._isPaged=z.isPaged}_getColumnSelectResult(z,P,V,U){return C.ColumnSelection.columnSelectUp(z.cursorConfig,z,V,this._isPaged)}}k.CursorColumnSelectUp=w.registerEditorCommand(new O({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|1024|512|16,linux:{primary:0}}})),k.CursorColumnSelectPageUp=w.registerEditorCommand(new O({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|1024|512|11,linux:{primary:0}}}));class A extends T{constructor(z){super(z);this._isPaged=z.isPaged}_getColumnSelectResult(z,P,V,U){return C.ColumnSelection.columnSelectDown(z.cursorConfig,z,V,this._isPaged)}}k.CursorColumnSelectDown=w.registerEditorCommand(new A({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|1024|512|18,linux:{primary:0}}})),k.CursorColumnSelectPageDown=w.registerEditorCommand(new A({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|1024|512|12,linux:{primary:0}}}));class B extends n{constructor(){super({id:"cursorMove",precondition:void 0,description:p.CursorMove.description})}runCoreEditorCommand(z,P){const V=p.CursorMove.parse(P);!V||this._runCursorMove(z,P.source,V)}_runCursorMove(z,P,V){z.model.pushStackElement(),z.setCursorStates(P,3,B._move(z,z.getCursorStates(),V)),z.revealPrimaryCursor(P,!0)}static _move(z,P,V){const U=V.select,H=V.value;switch(V.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return p.CursorMoveCommands.simpleMove(z,P,V.direction,U,H,V.unit);case 11:case 13:case 12:case 14:return p.CursorMoveCommands.viewportMove(z,P,V.direction,U,H);default:return null}}}k.CursorMoveImpl=B,k.CursorMove=w.registerEditorCommand(new B);class F extends n{constructor(z){super(z);this._staticArgs=z.args}runCoreEditorCommand(z,P){let V=this._staticArgs;this._staticArgs.value===-1&&(V={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:z.cursorConfig.pageSize}),z.model.pushStackElement(),z.setCursorStates(P.source,3,p.CursorMoveCommands.simpleMove(z,z.getCursorStates(),V.direction,V.select,V.value,V.unit)),z.revealPrimaryCursor(P.source,!0)}}k.CursorLeft=w.registerEditorCommand(new F({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[256|32]}}})),k.CursorLeftSelect=w.registerEditorCommand(new F({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1024|15}})),k.CursorRight=w.registerEditorCommand(new F({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[256|36]}}})),k.CursorRightSelect=w.registerEditorCommand(new F({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1024|17}})),k.CursorUp=w.registerEditorCommand(new F({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[256|46]}}})),k.CursorUpSelect=w.registerEditorCommand(new F({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1024|16,secondary:[2048|1024|16],mac:{primary:1024|16},linux:{primary:1024|16}}})),k.CursorPageUp=w.registerEditorCommand(new F({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:11}})),k.CursorPageUpSelect=w.registerEditorCommand(new F({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1024|11}})),k.CursorDown=w.registerEditorCommand(new F({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[256|44]}}})),k.CursorDownSelect=w.registerEditorCommand(new F({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1024|18,secondary:[2048|1024|18],mac:{primary:1024|18},linux:{primary:1024|18}}})),k.CursorPageDown=w.registerEditorCommand(new F({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:12}})),k.CursorPageDownSelect=w.registerEditorCommand(new F({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1024|12}})),k.CreateCursor=w.registerEditorCommand(new class extends n{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(X,z){let P;z.wholeLine?P=p.CursorMoveCommands.line(X,X.getPrimaryCursorState(),!1,z.position,z.viewPosition):P=p.CursorMoveCommands.moveTo(X,X.getPrimaryCursorState(),!1,z.position,z.viewPosition);const V=X.getCursorStates();if(V.length>1){const U=P.modelState?P.modelState.position:null,H=P.viewState?P.viewState.position:null;for(let $=0,ie=V.length;$<ie;$++){const oe=V[$];if(!(U&&!oe.modelState.selection.containsPosition(U))&&!(H&&!oe.viewState.selection.containsPosition(H))){V.splice($,1),X.model.pushStackElement(),X.setCursorStates(z.source,3,V);return}}}V.push(P),X.model.pushStackElement(),X.setCursorStates(z.source,3,V)}}),k.LastCursorMoveToSelect=w.registerEditorCommand(new class extends n{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(X,z){const P=X.getLastAddedCursorIndex(),V=X.getCursorStates(),U=V.slice(0);U[P]=p.CursorMoveCommands.moveTo(X,V[P],!0,z.position,z.viewPosition),X.model.pushStackElement(),X.setCursorStates(z.source,3,U)}});class D extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,p.CursorMoveCommands.moveToBeginningOfLine(z,z.getCursorStates(),this._inSelectionMode)),z.revealPrimaryCursor(P.source,!0)}}k.CursorHome=w.registerEditorCommand(new D({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2048|15]}}})),k.CursorHomeSelect=w.registerEditorCommand(new D({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1024|14,mac:{primary:1024|14,secondary:[2048|1024|15]}}}));class R extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,this._exec(z.getCursorStates())),z.revealPrimaryCursor(P.source,!0)}_exec(z){const P=[];for(let V=0,U=z.length;V<U;V++){const H=z[V],$=H.modelState.position.lineNumber;P[V]=d.CursorState.fromModelState(H.modelState.move(this._inSelectionMode,$,1,0))}return P}}k.CursorLineStart=w.registerEditorCommand(new R({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|31}}})),k.CursorLineStartSelect=w.registerEditorCommand(new R({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|1024|31}}}));class W extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,p.CursorMoveCommands.moveToEndOfLine(z,z.getCursorStates(),this._inSelectionMode,P.sticky||!1)),z.revealPrimaryCursor(P.source,!0)}}k.CursorEnd=w.registerEditorCommand(new W({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2048|17]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:b.localize(0,null),type:"boolean",default:!1}}}}]}})),k.CursorEndSelect=w.registerEditorCommand(new W({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1024|13,mac:{primary:1024|13,secondary:[2048|1024|17]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:b.localize(1,null),type:"boolean",default:!1}}}}]}}));class x extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,this._exec(z,z.getCursorStates())),z.revealPrimaryCursor(P.source,!0)}_exec(z,P){const V=[];for(let U=0,H=P.length;U<H;U++){const $=P[U],ie=$.modelState.position.lineNumber,oe=z.model.getLineMaxColumn(ie);V[U]=d.CursorState.fromModelState($.modelState.move(this._inSelectionMode,ie,oe,0))}return V}}k.CursorLineEnd=w.registerEditorCommand(new x({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|35}}})),k.CursorLineEndSelect=w.registerEditorCommand(new x({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|1024|35}}}));class K extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,p.CursorMoveCommands.moveToBeginningOfBuffer(z,z.getCursorStates(),this._inSelectionMode)),z.revealPrimaryCursor(P.source,!0)}}k.CursorTop=w.registerEditorCommand(new K({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|14,mac:{primary:2048|16}}})),k.CursorTopSelect=w.registerEditorCommand(new K({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|1024|14,mac:{primary:2048|1024|16}}}));class Y extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,p.CursorMoveCommands.moveToEndOfBuffer(z,z.getCursorStates(),this._inSelectionMode)),z.revealPrimaryCursor(P.source,!0)}}k.CursorBottom=w.registerEditorCommand(new Y({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|13,mac:{primary:2048|18}}})),k.CursorBottomSelect=w.registerEditorCommand(new Y({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|1024|13,mac:{primary:2048|1024|18}}}));class ee extends n{constructor(){super({id:"editorScroll",precondition:void 0,description:t.description})}runCoreEditorCommand(z,P){const V=t.parse(P);!V||this._runEditorScroll(z,P.source,V)}_runEditorScroll(z,P,V){const U=this._computeDesiredScrollTop(z,V);if(V.revealCursor){const H=z.getCompletelyVisibleViewRangeAtScrollTop(U);z.setCursorStates(P,3,[p.CursorMoveCommands.findPositionInViewportIfOutside(z,z.getPrimaryCursorState(),H,V.select)])}z.setScrollTop(U,0)}_computeDesiredScrollTop(z,P){if(P.unit===1){const H=z.getCompletelyVisibleViewRange(),$=z.coordinatesConverter.convertViewRangeToModelRange(H);let ie;P.direction===1?ie=Math.max(1,$.startLineNumber-P.value):ie=Math.min(z.model.getLineCount(),$.startLineNumber+P.value);const oe=z.coordinatesConverter.convertModelPositionToViewPosition(new o.Position(ie,1));return z.getVerticalOffsetForLineNumber(oe.lineNumber)}let V;P.unit===3?V=z.cursorConfig.pageSize*P.value:P.unit===4?V=Math.round(z.cursorConfig.pageSize/2)*P.value:V=P.value;const U=(P.direction===1?-1:1)*V;return z.getScrollTop()+U*z.cursorConfig.lineHeight}}k.EditorScrollImpl=ee,k.EditorScroll=w.registerEditorCommand(new ee),k.ScrollLineUp=w.registerEditorCommand(new class extends n{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|16,mac:{primary:256|11}}})}runCoreEditorCommand(X,z){k.EditorScroll._runEditorScroll(X,z.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),k.ScrollPageUp=w.registerEditorCommand(new class extends n{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|11,win:{primary:512|11},linux:{primary:512|11}}})}runCoreEditorCommand(X,z){k.EditorScroll._runEditorScroll(X,z.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),k.ScrollLineDown=w.registerEditorCommand(new class extends n{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|18,mac:{primary:256|12}}})}runCoreEditorCommand(X,z){k.EditorScroll._runEditorScroll(X,z.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),k.ScrollPageDown=w.registerEditorCommand(new class extends n{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|12,win:{primary:512|12},linux:{primary:512|12}}})}runCoreEditorCommand(X,z){k.EditorScroll._runEditorScroll(X,z.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class se extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,[p.CursorMoveCommands.word(z,z.getPrimaryCursorState(),this._inSelectionMode,P.position)]),z.revealPrimaryCursor(P.source,!0)}}k.WordSelect=w.registerEditorCommand(new se({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),k.WordSelectDrag=w.registerEditorCommand(new se({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),k.LastCursorWordSelect=w.registerEditorCommand(new class extends n{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(X,z){const P=X.getLastAddedCursorIndex(),V=X.getCursorStates(),U=V.slice(0),H=V[P];U[P]=p.CursorMoveCommands.word(X,H,H.modelState.hasSelection(),z.position),X.model.pushStackElement(),X.setCursorStates(z.source,3,U)}});class ne extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){z.model.pushStackElement(),z.setCursorStates(P.source,3,[p.CursorMoveCommands.line(z,z.getPrimaryCursorState(),this._inSelectionMode,P.position,P.viewPosition)]),z.revealPrimaryCursor(P.source,!1)}}k.LineSelect=w.registerEditorCommand(new ne({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),k.LineSelectDrag=w.registerEditorCommand(new ne({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class le extends n{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode}runCoreEditorCommand(z,P){const V=z.getLastAddedCursorIndex(),U=z.getCursorStates(),H=U.slice(0);H[V]=p.CursorMoveCommands.line(z,U[V],this._inSelectionMode,P.position,P.viewPosition),z.model.pushStackElement(),z.setCursorStates(P.source,3,H)}}k.LastCursorLineSelect=w.registerEditorCommand(new le({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),k.LastCursorLineSelectDrag=w.registerEditorCommand(new le({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),k.ExpandLineSelection=w.registerEditorCommand(new class extends n{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:2048|42}})}runCoreEditorCommand(X,z){X.model.pushStackElement(),X.setCursorStates(z.source,3,p.CursorMoveCommands.expandLineSelection(X,X.getCursorStates())),X.revealPrimaryCursor(z.source,!0)}}),k.CancelSelection=w.registerEditorCommand(new class extends n{constructor(){super({id:"cancelSelection",precondition:a.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(X,z){X.model.pushStackElement(),X.setCursorStates(z.source,3,[p.CursorMoveCommands.cancelSelection(X,X.getPrimaryCursorState())]),X.revealPrimaryCursor(z.source,!0)}}),k.RemoveSecondaryCursors=w.registerEditorCommand(new class extends n{constructor(){super({id:"removeSecondaryCursors",precondition:a.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:i+1,kbExpr:a.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(X,z){X.model.pushStackElement(),X.setCursorStates(z.source,3,[X.getPrimaryCursorState()]),X.revealPrimaryCursor(z.source,!0)}}),k.RevealLine=w.registerEditorCommand(new class extends n{constructor(){super({id:"revealLine",precondition:void 0,description:l.description})}runCoreEditorCommand(X,z){const P=z,V=P.lineNumber||0;let U=typeof V=="number"?V+1:parseInt(V)+1;U<1&&(U=1);const H=X.model.getLineCount();U>H&&(U=H);const $=new s.Range(U,1,U,X.model.getLineMaxColumn(U));let ie=0;if(P.at)switch(P.at){case l.RawAtArgument.Top:ie=3;break;case l.RawAtArgument.Center:ie=1;break;case l.RawAtArgument.Bottom:ie=4;break;default:break}const oe=X.coordinatesConverter.convertModelRangeToViewRange($);X.revealRange(z.source,!1,oe,ie,0)}}),k.SelectAll=new class extends h{constructor(){super(w.SelectAllCommand)}runDOMCommand(){N.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(X,z,P){const V=z._getViewModel();!V||this.runCoreEditorCommand(V,P)}runCoreEditorCommand(X,z){X.model.pushStackElement(),X.setCursorStates("keyboard",3,[p.CursorMoveCommands.selectAll(X,X.getPrimaryCursorState())])}},k.SetSelection=w.registerEditorCommand(new class extends n{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(X,z){X.model.pushStackElement(),X.setCursorStates(z.source,3,[d.CursorState.fromModelSelection(z.selection)])}})})(m=e.CoreNavigationCommands||(e.CoreNavigationCommands={}));const _=u.ContextKeyExpr.and(a.EditorContextKeys.textInputFocus,a.EditorContextKeys.columnSelection);function f(k,E){r.KeybindingsRegistry.registerKeybindingRule({id:k,primary:E,when:_,weight:i+1})}f(m.CursorColumnSelectLeft.id,1024|15),f(m.CursorColumnSelectRight.id,1024|17),f(m.CursorColumnSelectUp.id,1024|16),f(m.CursorColumnSelectPageUp.id,1024|11),f(m.CursorColumnSelectDown.id,1024|18),f(m.CursorColumnSelectPageDown.id,1024|12);function v(k){return k.register(),k}var y;(function(k){class E extends w.EditorCommand{runEditorCommand(O,A,B){const F=A._getViewModel();!F||this.runCoreEditingCommand(A,F,B||{})}}k.CoreEditingCommand=E,k.LineBreakInsert=w.registerEditorCommand(new class extends E{constructor(){super({id:"lineBreakInsert",precondition:a.EditorContextKeys.writable,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|45}}})}runCoreEditingCommand(T,O,A){T.pushUndoStop(),T.executeCommands(this.id,c.TypeOperations.lineBreakInsert(O.cursorConfig,O.model,O.getCursorStates().map(B=>B.modelState.selection)))}}),k.Outdent=w.registerEditorCommand(new class extends E{constructor(){super({id:"outdent",precondition:a.EditorContextKeys.writable,kbOpts:{weight:i,kbExpr:u.ContextKeyExpr.and(a.EditorContextKeys.editorTextFocus,a.EditorContextKeys.tabDoesNotMoveFocus),primary:1024|2}})}runCoreEditingCommand(T,O,A){T.pushUndoStop(),T.executeCommands(this.id,c.TypeOperations.outdent(O.cursorConfig,O.model,O.getCursorStates().map(B=>B.modelState.selection))),T.pushUndoStop()}}),k.Tab=w.registerEditorCommand(new class extends E{constructor(){super({id:"tab",precondition:a.EditorContextKeys.writable,kbOpts:{weight:i,kbExpr:u.ContextKeyExpr.and(a.EditorContextKeys.editorTextFocus,a.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(T,O,A){T.pushUndoStop(),T.executeCommands(this.id,c.TypeOperations.tab(O.cursorConfig,O.model,O.getCursorStates().map(B=>B.modelState.selection))),T.pushUndoStop()}}),k.DeleteLeft=w.registerEditorCommand(new class extends E{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:1,secondary:[1024|1],mac:{primary:1,secondary:[1024|1,256|38,256|1]}}})}runCoreEditingCommand(T,O,A){const[B,F]=g.DeleteOperations.deleteLeft(O.getPrevEditOperationType(),O.cursorConfig,O.model,O.getCursorStates().map(D=>D.modelState.selection));B&&T.pushUndoStop(),T.executeCommands(this.id,F),O.setPrevEditOperationType(2)}}),k.DeleteRight=w.registerEditorCommand(new class extends E{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:i,kbExpr:a.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[256|34,256|20]}}})}runCoreEditingCommand(T,O,A){const[B,F]=g.DeleteOperations.deleteRight(O.getPrevEditOperationType(),O.cursorConfig,O.model,O.getCursorStates().map(D=>D.modelState.selection));B&&T.pushUndoStop(),T.executeCommands(this.id,F),O.setPrevEditOperationType(3)}}),k.Undo=new class extends h{constructor(){super(w.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(T,O,A){if(!(!O.hasModel()||O.getOption(75)===!0))return O.getModel().undo()}},k.Redo=new class extends h{constructor(){super(w.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(T,O,A){if(!(!O.hasModel()||O.getOption(75)===!0))return O.getModel().redo()}}})(y=e.CoreEditingCommands||(e.CoreEditingCommands={}));class L extends w.Command{constructor(E,T,O){super({id:E,precondition:void 0,description:O});this._handlerId=T}runCommand(E,T){const O=E.get(S.ICodeEditorService).getFocusedCodeEditor();!O||O.trigger("keyboard",this._handlerId,T)}}function I(k,E){v(new L("default:"+k,k)),v(new L(k,k,E))}I("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),I("replacePreviousChar"),I("compositionType"),I("compositionStart"),I("compositionEnd"),I("paste"),I("cut")}),define(Q[607],J([0,1,13,16,23,71,9,74,446]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const g=S.createDecorator("IEditorCancelService"),p=new N.RawContextKey("cancellableOperation",!1,d.localize(0,null));C.registerSingleton(g,class{constructor(){this._tokens=new WeakMap}add(o,s){let a=this._tokens.get(o);a||(a=o.invokeWithinContext(r=>{const i=p.bindTo(r.get(N.IContextKeyService)),n=new w.LinkedList;return{key:i,tokens:n}}),this._tokens.set(o,a));let u;return a.key.set(!0),u=a.tokens.push(s),()=>{u&&(u(),a.key.set(!a.tokens.isEmpty()),u=void 0)}}cancel(o){const s=this._tokens.get(o);if(!!s){const a=s.tokens.pop();a&&(a.cancel(),s.key.set(!s.tokens.isEmpty()))}}},!0);class c extends M.CancellationTokenSource{constructor(s,a){super(a);this.editor=s,this._unregister=s.invokeWithinContext(u=>u.get(g).add(s,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=c,b.registerEditorCommand(new class extends b.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(o,s){o.get(g).cancel(s)}})}),define(Q[70],J([0,1,8,3,23,2,607]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class C{constructor(o,s){if(this.flags=s,(this.flags&1)!=0){const a=o.getModel();this.modelVersionId=a?b.format("{0}#{1}",a.uri.toString(),a.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!=0?this.position=o.getPosition():this.position=null,(this.flags&2)!=0?this.selection=o.getSelection():this.selection=null,(this.flags&8)!=0?(this.scrollLeft=o.getScrollLeft(),this.scrollTop=o.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(o){if(!(o instanceof C))return!1;const s=o;return!(this.modelVersionId!==s.modelVersionId||this.scrollLeft!==s.scrollLeft||this.scrollTop!==s.scrollTop||!this.position&&s.position||this.position&&!s.position||this.position&&s.position&&!this.position.equals(s.position)||!this.selection&&s.selection||this.selection&&!s.selection||this.selection&&s.selection&&!this.selection.equalsRange(s.selection))}validate(o){return this._equals(new C(o,this.flags))}}e.EditorState=C;class d extends S.EditorKeybindingCancellationTokenSource{constructor(o,s,a,u){super(o,u);this.editor=o,this._listener=new w.DisposableStore,s&4&&this._listener.add(o.onDidChangeCursorPosition(r=>{(!a||!N.Range.containsPosition(a,r.position))&&this.cancel()})),s&2&&this._listener.add(o.onDidChangeCursorSelection(r=>{(!a||!N.Range.containsRange(a,r.selection))&&this.cancel()})),s&8&&this._listener.add(o.onDidScrollChange(r=>this.cancel())),s&1&&(this._listener.add(o.onDidChangeModel(r=>this.cancel())),this._listener.add(o.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=d;class g extends M.CancellationTokenSource{constructor(o,s){super(s);this._listener=o.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=g;class p{constructor(o,s,a){this._visiblePosition=o,this._visiblePositionScrollDelta=s,this._cursorPosition=a}static capture(o){let s=null,a=0;if(o.getScrollTop()!==0){const u=o.getVisibleRanges();if(u.length>0){s=u[0].getStartPosition();const r=o.getTopForPosition(s.lineNumber,s.column);a=o.getScrollTop()-r}}return new p(s,a,o.getPosition())}restore(o){if(this._visiblePosition){const s=o.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);o.setScrollTop(s+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(o){const s=o.getPosition();if(!(!this._cursorPosition||!s)){const a=o.getTopForLineNumber(s.lineNumber)-o.getTopForLineNumber(this._cursorPosition.lineNumber);o.setScrollTop(o.getScrollTop()+a)}}}e.StableEditorScrollState=p}),define(Q[608],J([0,1,178,13]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let M=class{constructor(S,C){}dispose(){}};M.ID="editor.contrib.markerDecorations",M=Me([_e(1,b.IMarkerDecorationsService)],M),e.MarkerDecorationsContribution=M,N.registerEditorContribution(M.ID,M)}),define(Q[609],J([0,1,188,14,17]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class w{constructor(C,d,g,p){this.configuration=C,this.viewModel=d,this.userInputEvents=g,this.commandDelegate=p}paste(C,d,g,p){this.commandDelegate.paste(C,d,g,p)}type(C){this.commandDelegate.type(C)}compositionType(C,d,g,p){this.commandDelegate.compositionType(C,d,g,p)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(C){b.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:C})}_validateViewColumn(C){const d=this.viewModel.getLineMinColumn(C.lineNumber);return C.column<d?new N.Position(C.lineNumber,d):C}_hasMulticursorModifier(C){switch(this.configuration.options.get(64)){case"altKey":return C.altKey;case"ctrlKey":return C.ctrlKey;case"metaKey":return C.metaKey;default:return!1}}_hasNonMulticursorModifier(C){switch(this.configuration.options.get(64)){case"altKey":return C.ctrlKey||C.metaKey;case"ctrlKey":return C.altKey||C.metaKey;case"metaKey":return C.ctrlKey||C.altKey;default:return!1}}dispatchMouse(C){const d=this.configuration.options,g=M.isLinux&&d.get(91),p=d.get(15);C.middleButton&&!g?this._columnSelect(C.position,C.mouseColumn,C.inSelectionMode):C.startedOnLineNumbers?this._hasMulticursorModifier(C)?C.inSelectionMode?this._lastCursorLineSelect(C.position):this._createCursor(C.position,!0):C.inSelectionMode?this._lineSelectDrag(C.position):this._lineSelect(C.position):C.mouseDownCount>=4?this._selectAll():C.mouseDownCount===3?this._hasMulticursorModifier(C)?C.inSelectionMode?this._lastCursorLineSelectDrag(C.position):this._lastCursorLineSelect(C.position):C.inSelectionMode?this._lineSelectDrag(C.position):this._lineSelect(C.position):C.mouseDownCount===2?this._hasMulticursorModifier(C)?this._lastCursorWordSelect(C.position):C.inSelectionMode?this._wordSelectDrag(C.position):this._wordSelect(C.position):this._hasMulticursorModifier(C)?this._hasNonMulticursorModifier(C)||(C.shiftKey?this._columnSelect(C.position,C.mouseColumn,!0):C.inSelectionMode?this._lastCursorMoveToSelect(C.position):this._createCursor(C.position,!1)):C.inSelectionMode?C.altKey?this._columnSelect(C.position,C.mouseColumn,!0):p?this._columnSelect(C.position,C.mouseColumn,!0):this._moveToSelect(C.position):this.moveTo(C.position)}_usualArgs(C){return C=this._validateViewColumn(C),{source:"mouse",position:this._convertViewToModelPosition(C),viewPosition:C}}moveTo(C){b.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_moveToSelect(C){b.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_columnSelect(C,d,g){C=this._validateViewColumn(C),b.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(C),viewPosition:C,mouseColumn:d,doColumnSelect:g})}_createCursor(C,d){C=this._validateViewColumn(C),b.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(C),viewPosition:C,wholeLine:d})}_lastCursorMoveToSelect(C){b.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_wordSelect(C){b.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_wordSelectDrag(C){b.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_lastCursorWordSelect(C){b.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_lineSelect(C){b.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_lineSelectDrag(C){b.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_lastCursorLineSelect(C){b.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_lastCursorLineSelectDrag(C){b.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(C))}_selectAll(){b.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(C){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(C)}emitKeyDown(C){this.userInputEvents.emitKeyDown(C)}emitKeyUp(C){this.userInputEvents.emitKeyUp(C)}emitContextMenu(C){this.userInputEvents.emitContextMenu(C)}emitMouseMove(C){this.userInputEvents.emitMouseMove(C)}emitMouseLeave(C){this.userInputEvents.emitMouseLeave(C)}emitMouseUp(C){this.userInputEvents.emitMouseUp(C)}emitMouseDown(C){this.userInputEvents.emitMouseDown(C)}emitMouseDrag(C){this.userInputEvents.emitMouseDrag(C)}emitMouseDrop(C){this.userInputEvents.emitMouseDrop(C)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(C){this.userInputEvents.emitMouseWheel(C)}}e.ViewController=w}),define(Q[610],J([0,1,7,35,21,30,12,581,590,609,256,564,45,390,588,391,584,172,589,257,582,392,223,393,585,394,591,395,592,586,587,593,396,14,3,110,385,387,111,11,187]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I,k,E,T,O,A,B,F,D,R,W,x,K){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;class Y extends W.ViewEventHandler{constructor(ne,le,X,z,P,V){super();this._selections=[new M.Selection(1,1,1,1)],this._renderAnimationFrame=null;const U=new g.ViewController(le,z,P,ne);this._context=new D.ViewContext(le,X.getColorTheme(),z),this._configPixelRatio=this._configPixelRatio=this._context.configuration.options.get(122),this._context.addEventHandler(this),this._register(X.onDidColorThemeChange(te=>{this._context.theme.update(te),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new d.TextAreaHandler(this._context,U,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=w.createFastDomNode(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=w.createFastDomNode(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=w.createFastDomNode(document.createElement("div")),o.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new r.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new l.ViewLines(this._context,this._linesContent),this._viewZones=new O.ViewZones(this._context),this._viewParts.push(this._viewZones);const H=new y.DecorationsOverviewRuler(this._context);this._viewParts.push(H);const $=new k.ScrollDecorationViewPart(this._context);this._viewParts.push($);const ie=new c.ContentViewOverlays(this._context);this._viewParts.push(ie),ie.addDynamicOverlay(new a.CurrentLineHighlightOverlay(this._context)),ie.addDynamicOverlay(new E.SelectionsOverlay(this._context)),ie.addDynamicOverlay(new n.IndentGuidesOverlay(this._context)),ie.addDynamicOverlay(new u.DecorationsOverlay(this._context));const oe=new c.MarginViewOverlays(this._context);this._viewParts.push(oe),oe.addDynamicOverlay(new a.CurrentLineMarginHighlightOverlay(this._context)),oe.addDynamicOverlay(new i.GlyphMarginOverlay(this._context)),oe.addDynamicOverlay(new _.MarginViewLineDecorationsOverlay(this._context)),oe.addDynamicOverlay(new h.LinesDecorationsOverlay(this._context)),oe.addDynamicOverlay(new t.LineNumbersOverlay(this._context));const ae=new m.Margin(this._context);ae.getDomNode().appendChild(this._viewZones.marginDomNode),ae.getDomNode().appendChild(oe.getDomNode()),this._viewParts.push(ae),this._contentWidgets=new s.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new T.ViewCursors(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new v.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const G=new I.Rulers(this._context);this._viewParts.push(G);const j=new f.Minimap(this._context);if(this._viewParts.push(j),H){const te=this._scrollbar.getOverviewRulerLayoutInfo();te.parent.insertBefore(H.getDomNode(),te.insertBefore)}this._linesContent.appendChild(ie.getDomNode()),this._linesContent.appendChild(G.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(ae.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild($.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(j.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),V?V.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new C.PointerHandler(this._context,U,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:ne=>{this._textAreaHandler.textArea.domNode.dispatchEvent(ne)},getLastRenderData:()=>{const ne=this._viewCursors.getLastRenderData()||[],le=this._textAreaHandler.getLastRenderData();return new K.PointerHandlerLastRenderData(ne,le)},shouldSuppressMouseDownOnViewZone:ne=>this._viewZones.shouldSuppressMouseDownOnViewZone(ne),shouldSuppressMouseDownOnWidget:ne=>this._contentWidgets.shouldSuppressMouseDownOnWidget(ne),getPositionFromDOMInfo:(ne,le)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(ne,le)),visibleRangeForPosition:(ne,le)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new A.Position(ne,le))),getLineWidth:ne=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(ne))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(ne,le)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new A.Position(ne,le)))}}_applyLayout(){const le=this._context.configuration.options.get(124);this.domNode.setWidth(le.width),this.domNode.setHeight(le.height),this._overflowGuardContainer.setWidth(le.width),this._overflowGuardContainer.setHeight(le.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const ne=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(121)+" "+x.getThemeTypeSelector(this._context.theme.type)+ne}handleEvents(ne){super.handleEvents(ne),this._scheduleRender()}onConfigurationChanged(ne){return this._configPixelRatio=this._context.configuration.options.get(122),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(ne){return this._selections=ne.selections,!1}onFocusChanged(ne){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(ne){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const ne of this._viewParts)ne.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=b.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){ee(()=>this._actualRender())}_getViewPartsToRender(){let ne=[],le=0;for(const X of this._viewParts)X.shouldRender()&&(ne[le++]=X);return ne}_actualRender(){if(!!b.isInDOM(this.domNode.domNode)){let ne=this._getViewPartsToRender();if(!(!this._viewLines.shouldRender()&&ne.length===0)){const le=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(le.startLineNumber,le.endLineNumber,le.centeredLineNumber);const X=new R.ViewportData(this._selections,le,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(X),this._viewLines.shouldRender()&&(this._viewLines.renderText(X),this._viewLines.onDidRender(),ne=this._getViewPartsToRender());const z=new F.RenderingContext(this._context.viewLayout,X,this._viewLines);for(const P of ne)P.prepareRender(z);for(const P of ne)P.render(z),P.onDidRender();Math.abs(N.getPixelRatio()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}}}delegateVerticalScrollbarMouseDown(ne){this._scrollbar.delegateVerticalScrollbarMouseDown(ne)}restoreState(ne){this._context.model.setScrollPosition({scrollTop:ne.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:ne.scrollLeft},1)}getOffsetForColumn(ne,le){const X=this._context.model.validateModelPosition({lineNumber:ne,column:le}),z=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(X);this._flushAccumulatedAndRenderNow();const P=this._viewLines.visibleRangeForPosition(new A.Position(z.lineNumber,z.column));return P?P.left:-1}getTargetAtClientPoint(ne,le){const X=this._pointerHandler.getTargetAtClientPoint(ne,le);return X?p.ViewUserInputEvents.convertViewToModelMouseTarget(X,this._context.model.coordinatesConverter):null}createOverviewRuler(ne){return new L.OverviewRuler(this._context,ne)}change(ne){this._viewZones.changeViewZones(ne),this._scheduleRender()}render(ne,le){if(le){this._viewLines.forceShouldRender();for(const X of this._viewParts)X.forceShouldRender()}ne?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(ne){this._textAreaHandler.setAriaOptions(ne)}addContentWidget(ne){this._contentWidgets.addWidget(ne.widget),this.layoutContentWidget(ne),this._scheduleRender()}layoutContentWidget(ne){let le=ne.position&&ne.position.range||null;if(le===null){const z=ne.position?ne.position.position:null;z!==null&&(le=new B.Range(z.lineNumber,z.column,z.lineNumber,z.column))}const X=ne.position?ne.position.preference:null;this._contentWidgets.setWidgetPosition(ne.widget,le,X),this._scheduleRender()}removeContentWidget(ne){this._contentWidgets.removeWidget(ne.widget),this._scheduleRender()}addOverlayWidget(ne){this._overlayWidgets.addWidget(ne.widget),this.layoutOverlayWidget(ne),this._scheduleRender()}layoutOverlayWidget(ne){const le=ne.position?ne.position.preference:null;this._overlayWidgets.setWidgetPosition(ne.widget,le)&&this._scheduleRender()}removeOverlayWidget(ne){this._overlayWidgets.removeWidget(ne.widget),this._scheduleRender()}}e.View=Y;function ee(se){try{return se()}catch(ne){S.onUnexpectedError(ne)}}}),define(Q[143],J([0,1,448,7,12,6,2,43,69,13,28,610,256,38,242,42,14,3,21,217,107,25,18,49,22,540,26,16,9,138,32,11,65,20,397,563,136,608,334]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I,k,E,T,O,A,B,F,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let R=0;class W{constructor(H,$,ie,oe,ae){this.model=H,this.viewModel=$,this.view=ie,this.hasRealView=oe,this.listenersToRemove=ae}dispose(){S.dispose(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let x=class ct extends S.Disposable{constructor(H,$,ie,oe,ae,G,j,te,Z,ue){super();this._onDidDispose=this._register(new w.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new w.Emitter),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new w.Emitter),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new w.Emitter),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new w.Emitter),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new w.Emitter),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new w.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new w.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new w.Emitter),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new w.Emitter),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new w.Emitter),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new w.Emitter),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new K),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new K),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new w.Emitter),this.onWillType=this._onWillType.event,this._onDidType=this._register(new w.Emitter),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new w.Emitter),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new w.Emitter),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new w.Emitter),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new w.Emitter),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new w.Emitter),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new w.Emitter),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new w.Emitter),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new w.Emitter),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new w.Emitter),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new w.Emitter),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new w.Emitter),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new w.Emitter),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new w.Emitter),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new w.Emitter),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new w.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new w.Emitter),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new w.Emitter),this.onDidChangeViewZones=this._onDidChangeViewZones.event;const he=Object.assign({},$);this._domElement=H,this._overflowWidgetsDomNode=he.overflowWidgetsDomNode,delete he.overflowWidgetsDomNode,this._id=++R,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=ie.isSimpleWidget||!1,this._telemetryData=ie.telemetryData,this._configuration=this._register(this._createConfiguration(he,ue)),this._register(this._configuration.onDidChange(ce=>{this._onDidChangeConfiguration.fire(ce);const me=this._configuration.options;if(ce.hasChanged(124)){const Ce=me.get(124);this._onDidLayoutChange.fire(Ce)}})),this._contextKeyService=this._register(j.createScoped(this._domElement)),this._notificationService=Z,this._codeEditorService=ae,this._commandService=G,this._themeService=te,this._register(new Y(this,this._contextKeyService)),this._register(new ee(this,this._contextKeyService)),this._instantiationService=oe.createChild(new k.ServiceCollection([L.IContextKeyService,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new se(H),this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}),this._contentWidgets={},this._overlayWidgets={};let re;Array.isArray(ie.contributions)?re=ie.contributions:re=g.EditorExtensionsRegistry.getEditorContributions();for(const ce of re)try{const me=this._instantiationService.createInstance(ce.ctor,this);this._contributions[ce.id]=me}catch(me){M.onUnexpectedError(me)}g.EditorExtensionsRegistry.getEditorActions().forEach(ce=>{const me=new t.InternalEditorAction(ce.id,ce.label,ce.alias,A.withNullAsUndefined(ce.precondition),()=>this._instantiationService.invokeFunction(Ce=>Promise.resolve(ce.runEditorCommand(Ce,this,null))),this._contextKeyService);this._actions[me.id]=me}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(H,$){return new d.Configuration(this.isSimpleWidget,H,this._domElement,$)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return l.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const H=Object.keys(this._contributions);for(let $=0,ie=H.length;$<ie;$++){const oe=H[$];this._contributions[oe].dispose()}this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(H){return this._instantiationService.invokeFunction(H)}updateOptions(H){this._configuration.updateOptions(H)}getOptions(){return this._configuration.options}getOption(H){return this._configuration.options.get(H)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(H){return this._modelData?D.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(110),H):null}getValue(H=null){if(!this._modelData)return"";const $=!!(H&&H.preserveBOM);let ie=0;return H&&H.lineEnding&&H.lineEnding===`
`?ie=1:H&&H.lineEnding&&H.lineEnding===`\r
`&&(ie=2),this._modelData.model.getValue(ie,$)}setValue(H){!this._modelData||this._modelData.model.setValue(H)}getModel(){return this._modelData?this._modelData.model:null}setModel(H=null){const $=H;if(!(this._modelData===null&&$===null)&&!(this._modelData&&this._modelData.model===$)){const ie=this.hasTextFocus(),oe=this._detachModel();this._attachModel($),ie&&this.hasModel()&&this.focus();const ae={oldModelUrl:oe?oe.uri:null,newModelUrl:$?$.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(ae),this._postDetachModelCleanup(oe)}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let H in this._decorationTypeSubtypes){const $=this._decorationTypeSubtypes[H];for(let ie in $)this._removeDecorationType(H+"-"+ie)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(H,$,ie){const oe=H.model.validatePosition({lineNumber:$,column:ie}),ae=H.viewModel.coordinatesConverter.convertModelPositionToViewPosition(oe);return H.viewModel.viewLayout.getVerticalOffsetForLineNumber(ae.lineNumber)}getTopForLineNumber(H){return this._modelData?ct._getVerticalOffsetForPosition(this._modelData,H,1):-1}getTopForPosition(H,$){return this._modelData?ct._getVerticalOffsetForPosition(this._modelData,H,$):-1}setHiddenAreas(H){this._modelData&&this._modelData.viewModel.setHiddenAreas(H.map($=>i.Range.lift($)))}getVisibleColumnFromPosition(H){if(!this._modelData)return H.column;const $=this._modelData.model.validatePosition(H),ie=this._modelData.model.getOptions().tabSize;return u.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent($.lineNumber),$.column,ie)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(H){if(!!this._modelData){if(!r.Position.isIPosition(H))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:H.lineNumber,selectionStartColumn:H.column,positionLineNumber:H.lineNumber,positionColumn:H.column}])}}_sendRevealRange(H,$,ie,oe){if(!!this._modelData){if(!i.Range.isIRange(H))throw new Error("Invalid arguments");const ae=this._modelData.model.validateRange(H),G=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(ae);this._modelData.viewModel.revealRange("api",ie,G,$,oe)}}revealLine(H,$=0){this._revealLine(H,0,$)}revealLineInCenter(H,$=0){this._revealLine(H,1,$)}revealLineInCenterIfOutsideViewport(H,$=0){this._revealLine(H,2,$)}revealLineNearTop(H,$=0){this._revealLine(H,5,$)}_revealLine(H,$,ie){if(typeof H!="number")throw new Error("Invalid arguments");this._sendRevealRange(new i.Range(H,1,H,1),$,!1,ie)}revealPosition(H,$=0){this._revealPosition(H,0,!0,$)}revealPositionInCenter(H,$=0){this._revealPosition(H,1,!0,$)}revealPositionInCenterIfOutsideViewport(H,$=0){this._revealPosition(H,2,!0,$)}revealPositionNearTop(H,$=0){this._revealPosition(H,5,!0,$)}_revealPosition(H,$,ie,oe){if(!r.Position.isIPosition(H))throw new Error("Invalid arguments");this._sendRevealRange(new i.Range(H.lineNumber,H.column,H.lineNumber,H.column),$,ie,oe)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(H){const $=n.Selection.isISelection(H),ie=i.Range.isIRange(H);if(!$&&!ie)throw new Error("Invalid arguments");if($)this._setSelectionImpl(H);else if(ie){const oe={selectionStartLineNumber:H.startLineNumber,selectionStartColumn:H.startColumn,positionLineNumber:H.endLineNumber,positionColumn:H.endColumn};this._setSelectionImpl(oe)}}_setSelectionImpl(H){if(!!this._modelData){const $=new n.Selection(H.selectionStartLineNumber,H.selectionStartColumn,H.positionLineNumber,H.positionColumn);this._modelData.viewModel.setSelections("api",[$])}}revealLines(H,$,ie=0){this._revealLines(H,$,0,ie)}revealLinesInCenter(H,$,ie=0){this._revealLines(H,$,1,ie)}revealLinesInCenterIfOutsideViewport(H,$,ie=0){this._revealLines(H,$,2,ie)}revealLinesNearTop(H,$,ie=0){this._revealLines(H,$,5,ie)}_revealLines(H,$,ie,oe){if(typeof H!="number"||typeof $!="number")throw new Error("Invalid arguments");this._sendRevealRange(new i.Range(H,1,$,1),ie,!1,oe)}revealRange(H,$=0,ie=!1,oe=!0){this._revealRange(H,ie?1:0,oe,$)}revealRangeInCenter(H,$=0){this._revealRange(H,1,!0,$)}revealRangeInCenterIfOutsideViewport(H,$=0){this._revealRange(H,2,!0,$)}revealRangeNearTop(H,$=0){this._revealRange(H,5,!0,$)}revealRangeNearTopIfOutsideViewport(H,$=0){this._revealRange(H,6,!0,$)}revealRangeAtTop(H,$=0){this._revealRange(H,3,!0,$)}_revealRange(H,$,ie,oe){if(!i.Range.isIRange(H))throw new Error("Invalid arguments");this._sendRevealRange(i.Range.lift(H),$,ie,oe)}setSelections(H,$="api",ie=0){if(!!this._modelData){if(!H||H.length===0)throw new Error("Invalid arguments");for(let oe=0,ae=H.length;oe<ae;oe++)if(!n.Selection.isISelection(H[oe]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections($,H,ie)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(H,$=1){if(!!this._modelData){if(typeof H!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:H},$)}}setScrollTop(H,$=1){if(!!this._modelData){if(typeof H!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:H},$)}}setScrollPosition(H,$=1){!this._modelData||this._modelData.viewModel.setScrollPosition(H,$)}saveViewState(){if(!this._modelData)return null;const H={},$=Object.keys(this._contributions);for(const ae of $){const G=this._contributions[ae];typeof G.saveViewState=="function"&&(H[ae]=G.saveViewState())}const ie=this._modelData.viewModel.saveCursorState(),oe=this._modelData.viewModel.saveState();return{cursorState:ie,viewState:oe,contributionsState:H}}restoreViewState(H){if(!(!this._modelData||!this._modelData.hasRealView)){const $=H;if($&&$.cursorState&&$.viewState){const ie=$.cursorState;Array.isArray(ie)?this._modelData.viewModel.restoreCursorState(ie):this._modelData.viewModel.restoreCursorState([ie]);const oe=$.contributionsState||{},ae=Object.keys(this._contributions);for(let j=0,te=ae.length;j<te;j++){const Z=ae[j],ue=this._contributions[Z];typeof ue.restoreViewState=="function"&&ue.restoreViewState(oe[Z])}const G=this._modelData.viewModel.reduceRestoreState($.viewState);this._modelData.view.restoreState(G)}}}getContribution(H){return this._contributions[H]||null}getActions(){const H=[],$=Object.keys(this._actions);for(let ie=0,oe=$.length;ie<oe;ie++){const ae=$[ie];H.push(this._actions[ae])}return H}getSupportedActions(){let H=this.getActions();return H=H.filter($=>$.isSupported()),H}getAction(H){return this._actions[H]||null}trigger(H,$,ie){switch(ie=ie||{},$){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(H);return;case"type":{const ae=ie;this._type(H,ae.text||"");return}case"replacePreviousChar":{const ae=ie;this._compositionType(H,ae.text||"",ae.replaceCharCnt||0,0,0);return}case"compositionType":{const ae=ie;this._compositionType(H,ae.text||"",ae.replacePrevCharCnt||0,ae.replaceNextCharCnt||0,ae.positionDelta||0);return}case"paste":{const ae=ie;this._paste(H,ae.text||"",ae.pasteOnNewLine||!1,ae.multicursorText||null,ae.mode||null);return}case"cut":this._cut(H);return}const oe=this.getAction($);if(oe){Promise.resolve(oe.run()).then(void 0,M.onUnexpectedError);return}!this._modelData||this._triggerEditorCommand(H,$,ie)||this._commandService.executeCommand($,ie)}_startComposition(){!this._modelData||(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(H){!this._modelData||(this._modelData.viewModel.endComposition(H),this._onDidCompositionEnd.fire())}_type(H,$){!this._modelData||$.length===0||(H==="keyboard"&&this._onWillType.fire($),this._modelData.viewModel.type($,H),H==="keyboard"&&this._onDidType.fire($))}_compositionType(H,$,ie,oe,ae){!this._modelData||this._modelData.viewModel.compositionType($,ie,oe,ae,H)}_paste(H,$,ie,oe,ae){if(!(!this._modelData||$.length===0)){const G=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste($,ie,oe,H);const j=this._modelData.viewModel.getSelection().getStartPosition();H==="keyboard"&&this._onDidPaste.fire({range:new i.Range(G.lineNumber,G.column,j.lineNumber,j.column),mode:ae})}}_cut(H){!this._modelData||this._modelData.viewModel.cut(H)}_triggerEditorCommand(H,$,ie){const oe=g.EditorExtensionsRegistry.getEditorCommand($);return oe?(ie=ie||{},ie.source=H,this._instantiationService.invokeFunction(ae=>{Promise.resolve(oe.runEditorCommand(ae,this,ie)).then(void 0,M.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(75)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(75)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(H,$,ie){if(!this._modelData||this._configuration.options.get(75))return!1;let oe;return ie?Array.isArray(ie)?oe=()=>ie:oe=ie:oe=()=>null,this._modelData.viewModel.executeEdits(H,$,oe),!0}executeCommand(H,$){!this._modelData||this._modelData.viewModel.executeCommand($,H)}executeCommands(H,$){!this._modelData||this._modelData.viewModel.executeCommands($,H)}changeDecorations(H){return this._modelData?this._modelData.model.changeDecorations(H,this._id):null}getLineDecorations(H){return this._modelData?this._modelData.model.getLineDecorations(H,this._id,s.filterValidationDecorations(this._configuration.options)):null}deltaDecorations(H,$){return this._modelData?H.length===0&&$.length===0?H:this._modelData.model.deltaDecorations(H,$,this._id):[]}removeDecorations(H){const $=this._decorationTypeKeysToIds[H];$&&this.deltaDecorations($,[]),this._decorationTypeKeysToIds.hasOwnProperty(H)&&delete this._decorationTypeKeysToIds[H],this._decorationTypeSubtypes.hasOwnProperty(H)&&delete this._decorationTypeSubtypes[H]}getLayoutInfo(){return this._configuration.options.get(124)}createOverviewRuler(H){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(H)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarMouseDown(H){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarMouseDown(H)}layout(H){this._configuration.observeReferenceElement(H),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(H){const $={widget:H,position:H.getPosition()};this._contentWidgets.hasOwnProperty(H.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[H.getId()]=$,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget($)}layoutContentWidget(H){const $=H.getId();if(this._contentWidgets.hasOwnProperty($)){const ie=this._contentWidgets[$];ie.position=H.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(ie)}}removeContentWidget(H){const $=H.getId();if(this._contentWidgets.hasOwnProperty($)){const ie=this._contentWidgets[$];delete this._contentWidgets[$],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(ie)}}addOverlayWidget(H){const $={widget:H,position:H.getPosition()};this._overlayWidgets.hasOwnProperty(H.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[H.getId()]=$,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget($)}layoutOverlayWidget(H){const $=H.getId();if(this._overlayWidgets.hasOwnProperty($)){const ie=this._overlayWidgets[$];ie.position=H.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(ie)}}removeOverlayWidget(H){const $=H.getId();if(this._overlayWidgets.hasOwnProperty($)){const ie=this._overlayWidgets[$];delete this._overlayWidgets[$],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(ie)}}changeViewZones(H){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(H)}getTargetAtClientPoint(H,$){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(H,$)}getScrolledVisiblePosition(H){if(!this._modelData||!this._modelData.hasRealView)return null;const $=this._modelData.model.validatePosition(H),ie=this._configuration.options,oe=ie.get(124),ae=ct._getVerticalOffsetForPosition(this._modelData,$.lineNumber,$.column)-this.getScrollTop(),G=this._modelData.view.getOffsetForColumn($.lineNumber,$.column)+oe.glyphMarginWidth+oe.lineNumbersWidth+oe.decorationsWidth-this.getScrollLeft();return{top:ae,left:G,height:ie.get(53)}}getOffsetForColumn(H,$){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(H,$)}render(H=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,H)}setAriaOptions(H){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(H)}applyFontInfo(H){d.Configuration.applyFontInfoSlow(H,this._configuration.options.get(38))}_attachModel(H){if(!H){this._modelData=null;return}const $=[];this._domElement.setAttribute("data-mode-id",H.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(H.isDominatedByLongLines()),this._configuration.setMaxLineNumber(H.getLineCount()),H.onBeforeAttached();const ie=new v.ViewModel(this._id,this._configuration,H,F.DOMLineBreaksComputerFactory.create(),B.MonospaceLineBreaksComputerFactory.create(this._configuration.options),G=>N.scheduleAtNextAnimationFrame(G));$.push(H.onDidChangeDecorations(G=>this._onDidChangeModelDecorations.fire(G))),$.push(H.onDidChangeLanguage(G=>{this._domElement.setAttribute("data-mode-id",H.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(G)})),$.push(H.onDidChangeLanguageConfiguration(G=>this._onDidChangeModelLanguageConfiguration.fire(G))),$.push(H.onDidChangeContent(G=>this._onDidChangeModelContent.fire(G))),$.push(H.onDidChangeOptions(G=>this._onDidChangeModelOptions.fire(G))),$.push(H.onWillDispose(()=>this.setModel(null))),$.push(ie.onEvent(G=>{switch(G.kind){case 0:this._onDidContentSizeChange.fire(G);break;case 1:this._editorTextFocus.setValue(G.hasFocus);break;case 2:this._onDidScrollChange.fire(G);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{G.reachedMaxCursorCount&&this._notificationService.warn(b.localize(0,null,a.Cursor.MAX_CURSOR_COUNT));const j=[];for(let ue=0,he=G.selections.length;ue<he;ue++)j[ue]=G.selections[ue].getPosition();const te={position:j[0],secondaryPositions:j.slice(1),reason:G.reason,source:G.source};this._onDidChangeCursorPosition.fire(te);const Z={selection:G.selections[0],secondarySelections:G.selections.slice(1),modelVersionId:G.modelVersionId,oldSelections:G.oldSelections,oldModelVersionId:G.oldModelVersionId,source:G.source,reason:G.reason};this._onDidChangeCursorSelection.fire(Z);break}}}));const[oe,ae]=this._createView(ie);if(ae){this._domElement.appendChild(oe.domNode.domNode);let G=Object.keys(this._contentWidgets);for(let j=0,te=G.length;j<te;j++){const Z=G[j];oe.addContentWidget(this._contentWidgets[Z])}G=Object.keys(this._overlayWidgets);for(let j=0,te=G.length;j<te;j++){const Z=G[j];oe.addOverlayWidget(this._overlayWidgets[Z])}oe.render(!1,!0),oe.domNode.domNode.setAttribute("data-uri",H.uri.toString())}this._modelData=new W(H,ie,oe,ae,$)}_createView(H){let $;this.isSimpleWidget?$={paste:(ae,G,j,te)=>{this._paste("keyboard",ae,G,j,te)},type:ae=>{this._type("keyboard",ae)},compositionType:(ae,G,j,te)=>{this._compositionType("keyboard",ae,G,j,te)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:$={paste:(ae,G,j,te)=>{const Z={text:ae,pasteOnNewLine:G,multicursorText:j,mode:te};this._commandService.executeCommand("paste",Z)},type:ae=>{const G={text:ae};this._commandService.executeCommand("type",G)},compositionType:(ae,G,j,te)=>{if(j||te){const Z={text:ae,replacePrevCharCnt:G,replaceNextCharCnt:j,positionDelta:te};this._commandService.executeCommand("compositionType",Z)}else{const Z={text:ae,replaceCharCnt:G};this._commandService.executeCommand("replacePreviousChar",Z)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const ie=new o.ViewUserInputEvents(H.coordinatesConverter);return ie.onKeyDown=ae=>this._onKeyDown.fire(ae),ie.onKeyUp=ae=>this._onKeyUp.fire(ae),ie.onContextMenu=ae=>this._onContextMenu.fire(ae),ie.onMouseMove=ae=>this._onMouseMove.fire(ae),ie.onMouseLeave=ae=>this._onMouseLeave.fire(ae),ie.onMouseDown=ae=>this._onMouseDown.fire(ae),ie.onMouseUp=ae=>this._onMouseUp.fire(ae),ie.onMouseDrag=ae=>this._onMouseDrag.fire(ae),ie.onMouseDrop=ae=>this._onMouseDrop.fire(ae),ie.onMouseDropCanceled=ae=>this._onMouseDropCanceled.fire(ae),ie.onMouseWheel=ae=>this._onMouseWheel.fire(ae),[new c.View($,this._configuration,this._themeService,H,ie,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(H){H&&H.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const H=this._modelData.model,$=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),$&&this._domElement.contains($)&&this._domElement.removeChild($),H}_removeDecorationType(H){this._codeEditorService.removeDecorationType(H)}hasModel(){return this._modelData!==null}};x=Me([_e(3,I.IInstantiationService),_e(4,p.ICodeEditorService),_e(5,y.ICommandService),_e(6,L.IContextKeyService),_e(7,T.IThemeService),_e(8,E.INotificationService),_e(9,O.IAccessibilityService)],x),e.CodeEditorWidget=x;class K extends S.Disposable{constructor(){super();this._onDidChangeToTrue=this._register(new w.Emitter),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new w.Emitter),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(H){const $=H?2:1;this._value!==$&&(this._value=$,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=K;class Y extends S.Disposable{constructor(H,$){super();this._editor=H,$.createKey("editorId",H.getId()),this._editorSimpleInput=h.EditorContextKeys.editorSimpleInput.bindTo($),this._editorFocus=h.EditorContextKeys.focus.bindTo($),this._textInputFocus=h.EditorContextKeys.textInputFocus.bindTo($),this._editorTextFocus=h.EditorContextKeys.editorTextFocus.bindTo($),this._editorTabMovesFocus=h.EditorContextKeys.tabMovesFocus.bindTo($),this._editorReadonly=h.EditorContextKeys.readOnly.bindTo($),this._inDiffEditor=h.EditorContextKeys.inDiffEditor.bindTo($),this._editorColumnSelection=h.EditorContextKeys.columnSelection.bindTo($),this._hasMultipleSelections=h.EditorContextKeys.hasMultipleSelections.bindTo($),this._hasNonEmptySelection=h.EditorContextKeys.hasNonEmptySelection.bindTo($),this._canUndo=h.EditorContextKeys.canUndo.bindTo($),this._canRedo=h.EditorContextKeys.canRedo.bindTo($),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const H=this._editor.getOptions();this._editorTabMovesFocus.set(H.get(123)),this._editorReadonly.set(H.get(75)),this._inDiffEditor.set(H.get(49)),this._editorColumnSelection.set(H.get(15))}_updateFromSelection(){const H=this._editor.getSelections();H?(this._hasMultipleSelections.set(H.length>1),this._hasNonEmptySelection.set(H.some($=>!$.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const H=this._editor.getModel();this._canUndo.set(Boolean(H&&H.canUndo())),this._canRedo.set(Boolean(H&&H.canRedo()))}}class ee extends S.Disposable{constructor(H,$){super();this._editor=H,this._contextKeyService=$,this._langId=h.EditorContextKeys.languageId.bindTo($),this._hasCompletionItemProvider=h.EditorContextKeys.hasCompletionItemProvider.bindTo($),this._hasCodeActionsProvider=h.EditorContextKeys.hasCodeActionsProvider.bindTo($),this._hasCodeLensProvider=h.EditorContextKeys.hasCodeLensProvider.bindTo($),this._hasDefinitionProvider=h.EditorContextKeys.hasDefinitionProvider.bindTo($),this._hasDeclarationProvider=h.EditorContextKeys.hasDeclarationProvider.bindTo($),this._hasImplementationProvider=h.EditorContextKeys.hasImplementationProvider.bindTo($),this._hasTypeDefinitionProvider=h.EditorContextKeys.hasTypeDefinitionProvider.bindTo($),this._hasHoverProvider=h.EditorContextKeys.hasHoverProvider.bindTo($),this._hasDocumentHighlightProvider=h.EditorContextKeys.hasDocumentHighlightProvider.bindTo($),this._hasDocumentSymbolProvider=h.EditorContextKeys.hasDocumentSymbolProvider.bindTo($),this._hasReferenceProvider=h.EditorContextKeys.hasReferenceProvider.bindTo($),this._hasRenameProvider=h.EditorContextKeys.hasRenameProvider.bindTo($),this._hasSignatureHelpProvider=h.EditorContextKeys.hasSignatureHelpProvider.bindTo($),this._hasInlineHintsProvider=h.EditorContextKeys.hasInlineHintsProvider.bindTo($),this._hasDocumentFormattingProvider=h.EditorContextKeys.hasDocumentFormattingProvider.bindTo($),this._hasDocumentSelectionFormattingProvider=h.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo($),this._hasMultipleDocumentFormattingProvider=h.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo($),this._hasMultipleDocumentSelectionFormattingProvider=h.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo($),this._isInWalkThrough=h.EditorContextKeys.isInWalkThroughSnippet.bindTo($);const ie=()=>this._update();this._register(H.onDidChangeModel(ie)),this._register(H.onDidChangeModelLanguage(ie)),this._register(m.CompletionProviderRegistry.onDidChange(ie)),this._register(m.CodeActionProviderRegistry.onDidChange(ie)),this._register(m.CodeLensProviderRegistry.onDidChange(ie)),this._register(m.DefinitionProviderRegistry.onDidChange(ie)),this._register(m.DeclarationProviderRegistry.onDidChange(ie)),this._register(m.ImplementationProviderRegistry.onDidChange(ie)),this._register(m.TypeDefinitionProviderRegistry.onDidChange(ie)),this._register(m.HoverProviderRegistry.onDidChange(ie)),this._register(m.DocumentHighlightProviderRegistry.onDidChange(ie)),this._register(m.DocumentSymbolProviderRegistry.onDidChange(ie)),this._register(m.ReferenceProviderRegistry.onDidChange(ie)),this._register(m.RenameProviderRegistry.onDidChange(ie)),this._register(m.DocumentFormattingEditProviderRegistry.onDidChange(ie)),this._register(m.DocumentRangeFormattingEditProviderRegistry.onDidChange(ie)),this._register(m.SignatureHelpProviderRegistry.onDidChange(ie)),this._register(m.InlineHintsProviderRegistry.onDidChange(ie)),ie()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.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()})}_update(){const H=this._editor.getModel();if(!H){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(H.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(m.CompletionProviderRegistry.has(H)),this._hasCodeActionsProvider.set(m.CodeActionProviderRegistry.has(H)),this._hasCodeLensProvider.set(m.CodeLensProviderRegistry.has(H)),this._hasDefinitionProvider.set(m.DefinitionProviderRegistry.has(H)),this._hasDeclarationProvider.set(m.DeclarationProviderRegistry.has(H)),this._hasImplementationProvider.set(m.ImplementationProviderRegistry.has(H)),this._hasTypeDefinitionProvider.set(m.TypeDefinitionProviderRegistry.has(H)),this._hasHoverProvider.set(m.HoverProviderRegistry.has(H)),this._hasDocumentHighlightProvider.set(m.DocumentHighlightProviderRegistry.has(H)),this._hasDocumentSymbolProvider.set(m.DocumentSymbolProviderRegistry.has(H)),this._hasReferenceProvider.set(m.ReferenceProviderRegistry.has(H)),this._hasRenameProvider.set(m.RenameProviderRegistry.has(H)),this._hasSignatureHelpProvider.set(m.SignatureHelpProviderRegistry.has(H)),this._hasInlineHintsProvider.set(m.InlineHintsProviderRegistry.has(H)),this._hasDocumentFormattingProvider.set(m.DocumentFormattingEditProviderRegistry.has(H)||m.DocumentRangeFormattingEditProviderRegistry.has(H)),this._hasDocumentSelectionFormattingProvider.set(m.DocumentRangeFormattingEditProviderRegistry.has(H)),this._hasMultipleDocumentFormattingProvider.set(m.DocumentFormattingEditProviderRegistry.all(H).length+m.DocumentRangeFormattingEditProviderRegistry.all(H).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(m.DocumentRangeFormattingEditProviderRegistry.all(H).length>1),this._isInWalkThrough.set(H.uri.scheme===C.Schemas.walkThroughSnippet)})}}e.EditorModeContext=ee;class se extends S.Disposable{constructor(H){super();this._onChange=this._register(new w.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(N.trackFocus(H)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}const ne=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),le=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function X(U){return ne+encodeURIComponent(U.toString())+le}const z=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),P=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function V(U){return z+encodeURIComponent(U.toString())+P}T.registerThemingParticipant((U,H)=>{const $=U.getColor(f.editorErrorBorder);$&&H.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${$}; }`);const ie=U.getColor(f.editorErrorForeground);ie&&H.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${X(ie)}") repeat-x bottom left; }`);const oe=U.getColor(f.editorErrorBackground);oe&&H.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${oe}; }`);const ae=U.getColor(f.editorWarningBorder);ae&&H.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${ae}; }`);const G=U.getColor(f.editorWarningForeground);G&&H.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${X(G)}") repeat-x bottom left; }`);const j=U.getColor(f.editorWarningBackground);j&&H.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${j}; }`);const te=U.getColor(f.editorInfoBorder);te&&H.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${te}; }`);const Z=U.getColor(f.editorInfoForeground);Z&&H.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${X(Z)}") repeat-x bottom left; }`);const ue=U.getColor(f.editorInfoBackground);ue&&H.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${ue}; }`);const he=U.getColor(f.editorHintBorder);he&&H.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${he}; }`);const re=U.getColor(f.editorHintForeground);re&&H.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${V(re)}") no-repeat bottom left; }`);const ce=U.getColor(_.editorUnnecessaryCodeOpacity);ce&&H.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${ce.rgba.a}; }`);const me=U.getColor(_.editorUnnecessaryCodeBorder);me&&H.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${me}; }`);const Ce=U.getColor(f.editorForeground)||"inherit";H.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${Ce}}`)})}),define(Q[144],J([0,1,40,28,143,26,16,9,32,11,65]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let c=class extends M.CodeEditorWidget{constructor(s,a,u,r,i,n,t,l,h,m){super(s,Object.assign(Object.assign({},u.getRawOptions()),{overflowWidgetsDomNode:u.getOverflowWidgetsDomNode()}),{},r,i,n,t,l,h,m);this._parentEditor=u,this._overwriteOptions=a,super.updateOptions(this._overwriteOptions),this._register(u.onDidChangeConfiguration(_=>this._onParentConfigurationChanged(_)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(s){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(s){b.mixin(this._overwriteOptions,s,!0),super.updateOptions(this._overwriteOptions)}};c=Me([_e(3,C.IInstantiationService),_e(4,N.ICodeEditorService),_e(5,w.ICommandService),_e(6,S.IContextKeyService),_e(7,g.IThemeService),_e(8,d.INotificationService),_e(9,p.IAccessibilityService)],c),e.EmbeddedCodeEditorWidget=c}),define(Q[611],J([0,1,13,461,25,21,39,16,73,47,335]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new C.RawContextKey("selectionAnchorSet",!1);let p=class Ft{constructor(r,i){this.editor=r,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(i),this.modelChangeListener=r.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(r){return r.getContribution(Ft.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const r=this.editor.getPosition(),i=this.decorationId?[this.decorationId]:[],n=this.editor.deltaDecorations(i,[{range:w.Selection.fromPositions(r,r),options:{stickiness:1,hoverMessage:new d.MarkdownString().appendText(N.localize(0,null)),className:"selection-anchor"}}]);this.decorationId=n[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),g.alert(N.localize(1,null,r.lineNumber,r.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const r=this.editor.getModel().getDecorationRange(this.decorationId);r&&this.editor.setPosition(r.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const r=this.editor.getModel().getDecorationRange(this.decorationId);if(r){const i=this.editor.getPosition();this.editor.setSelection(w.Selection.fromPositions(r.getStartPosition(),i)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};p.ID="editor.contrib.selectionAnchorController",p=Me([_e(1,C.IContextKeyService)],p);class c extends b.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:N.localize(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:M.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|32),weight:100}})}run(r,i){return Ie(this,void 0,void 0,function*(){p.get(i).setSelectionAnchor()})}}class o extends b.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:N.localize(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}run(r,i){return Ie(this,void 0,void 0,function*(){p.get(i).goToSelectionAnchor()})}}class s extends b.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:N.localize(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:M.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|41),weight:100}})}run(r,i){return Ie(this,void 0,void 0,function*(){p.get(i).selectFromAnchorToCursor()})}}class a extends b.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:N.localize(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:M.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}run(r,i){return Ie(this,void 0,void 0,function*(){p.get(i).cancelSelectionAnchor()})}}b.registerEditorContribution(p.ID,p),b.registerEditorAction(c),b.registerEditorAction(o),b.registerEditorAction(s),b.registerEditorAction(a)}),define(Q[612],J([0,1,462,15,2,13,14,3,21,25,53,31,49,22,11,34,336]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const r=s.registerColor("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},b.localize(0,null));class i extends w.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:b.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|1024|88,weight:100}})}run(m,_){let f=l.get(_);!f||f.jumpToBracket()}}class n extends w.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:b.localize(2,null),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(m,_,f){const v=l.get(_);if(!!v){let y=!0;f&&f.selectBrackets===!1&&(y=!1),v.selectToBracket(y)}}}class t{constructor(m,_,f){this.position=m,this.brackets=_,this.options=f}}class l extends M.Disposable{constructor(m){super();this._editor=m,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new N.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(58),this._updateBracketsSoon.schedule(),this._register(m.onDidChangeCursorPosition(_=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModelContent(_=>{this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModel(_=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModelLanguageConfiguration(_=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeConfiguration(_=>{_.hasChanged(58)&&(this._matchBrackets=this._editor.getOption(58),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))}static get(m){return m.getContribution(l.ID)}jumpToBracket(){if(!!this._editor.hasModel()){const m=this._editor.getModel(),_=this._editor.getSelections().map(f=>{const v=f.getStartPosition(),y=m.matchBracket(v);let L=null;if(y)y[0].containsPosition(v)?L=y[1].getStartPosition():y[1].containsPosition(v)&&(L=y[0].getStartPosition());else{const I=m.findEnclosingBrackets(v);if(I)L=I[0].getStartPosition();else{const k=m.findNextBracket(v);k&&k.range&&(L=k.range.getStartPosition())}}return L?new d.Selection(L.lineNumber,L.column,L.lineNumber,L.column):new d.Selection(v.lineNumber,v.column,v.lineNumber,v.column)});this._editor.setSelections(_),this._editor.revealRange(_[0])}}selectToBracket(m){if(!!this._editor.hasModel()){const _=this._editor.getModel(),f=[];this._editor.getSelections().forEach(v=>{const y=v.getStartPosition();let L=_.matchBracket(y);if(!L&&(L=_.findEnclosingBrackets(y),!L)){const E=_.findNextBracket(y);E&&E.range&&(L=_.matchBracket(E.range.getStartPosition()))}let I=null,k=null;if(L){L.sort(C.Range.compareRangesUsingStarts);const[E,T]=L;I=m?E.getStartPosition():E.getEndPosition(),k=m?T.getEndPosition():T.getStartPosition()}I&&k&&f.push(new d.Selection(I.lineNumber,I.column,k.lineNumber,k.column))}),f.length>0&&(this._editor.setSelections(f),this._editor.revealRange(f[0]))}}_updateBrackets(){if(this._matchBrackets!=="never"){this._recomputeBrackets();let m=[],_=0;for(const f of this._lastBracketsData){let v=f.brackets;v&&(m[_++]={range:v[0],options:f.options},m[_++]={range:v[1],options:f.options})}this._decorations=this._editor.deltaDecorations(this._decorations,m)}}_recomputeBrackets(){if(!this._editor.hasModel()){this._lastBracketsData=[],this._lastVersionId=0;return}const m=this._editor.getSelections();if(m.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const _=this._editor.getModel(),f=_.getVersionId();let v=[];this._lastVersionId===f&&(v=this._lastBracketsData);let y=[],L=0;for(let O=0,A=m.length;O<A;O++){let B=m[O];B.isEmpty()&&(y[L++]=B.getStartPosition())}y.length>1&&y.sort(S.Position.compare);let I=[],k=0,E=0,T=v.length;for(let O=0,A=y.length;O<A;O++){let B=y[O];for(;E<T&&v[E].position.isBefore(B);)E++;if(E<T&&v[E].position.equals(B))I[k++]=v[E];else{let F=_.matchBracket(B),D=l._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!F&&this._matchBrackets==="always"&&(F=_.findEnclosingBrackets(B,20),D=l._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),I[k++]=new t(B,F,D)}}this._lastBracketsData=I,this._lastVersionId=f}}e.BracketMatchingController=l,l.ID="editor.contrib.bracketMatchingController",l._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=c.ModelDecorationOptions.register({stickiness:1,className:"bracket-match",overviewRuler:{color:a.themeColorFromId(r),position:p.OverviewRulerLane.Center}}),l._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=c.ModelDecorationOptions.register({stickiness:1,className:"bracket-match"}),w.registerEditorContribution(l.ID,l),w.registerEditorAction(n),w.registerEditorAction(i),a.registerThemingParticipant((h,m)=>{const _=h.getColor(o.editorBracketMatchBackground);_&&m.addRule(`.monaco-editor .bracket-match { background-color: ${_}; }`);const f=h.getColor(o.editorBracketMatchBorder);f&&m.addRule(`.monaco-editor .bracket-match { border: 1px solid ${f}; }`)}),u.MenuRegistry.appendMenuItem(u.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:b.localize(3,null)},order:2})}),define(Q[613],J([0,1,463,13,25,399]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S extends N.EditorAction{constructor(p,c){super(c);this.left=p}run(p,c){if(!!c.hasModel()){let o=[],s=c.getSelections();for(const a of s)o.push(new w.MoveCaretCommand(a,this.left));c.pushUndoStop(),c.executeCommands(this.id,o),c.pushUndoStop()}}}class C extends S{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:b.localize(0,null),alias:"Move Selected Text Left",precondition:M.EditorContextKeys.writable})}}class d extends S{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:b.localize(1,null),alias:"Move Selected Text Right",precondition:M.EditorContextKeys.writable})}}N.registerEditorAction(C),N.registerEditorAction(d)}),define(Q[614],J([0,1,464,13,92,3,25,180]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class d extends N.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:b.localize(0,null),alias:"Transpose Letters",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|50},weight:100}})}run(p,c){if(!!c.hasModel()){let o=c.getModel(),s=[],a=c.getSelections();for(let u of a)if(!!u.isEmpty()){let r=u.startLineNumber,i=u.startColumn,n=o.getLineMaxColumn(r);if(!(r===1&&(i===1||i===2&&n===2))){let t=i===n?u.getPosition():C.MoveOperations.rightPosition(o,u.getPosition().lineNumber,u.getPosition().column),l=C.MoveOperations.leftPosition(o,t.lineNumber,t.column),h=C.MoveOperations.leftPosition(o,l.lineNumber,l.column),m=o.getValueInRange(w.Range.fromPositions(h,l)),_=o.getValueInRange(w.Range.fromPositions(l,t)),f=w.Range.fromPositions(h,t);s.push(new M.ReplaceCommand(f,_+m))}}s.length>0&&(c.pushUndoStop(),c.executeCommands(this.id,s),c.pushUndoStop())}}}N.registerEditorAction(d)}),define(Q[615],J([0,1,465,35,17,164,13,28,25,34,84]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const c="9_cutcopypaste",o=M.isNative||document.queryCommandSupported("cut"),s=M.isNative||document.queryCommandSupported("copy"),a=typeof navigator.clipboard=="undefined"||N.isFirefox?document.queryCommandSupported("paste"):!0;function u(n){return n.register(),n}e.CutAction=o?u(new S.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:M.isNative?{primary:2048|54,win:{primary:2048|54,secondary:[1024|20]},weight:100}:void 0,menuOpts:[{menuId:g.MenuId.MenubarEditMenu,group:"2_ccp",title:b.localize(0,null),order:1},{menuId:g.MenuId.EditorContext,group:c,title:b.localize(1,null),when:d.EditorContextKeys.writable,order:1},{menuId:g.MenuId.CommandPalette,group:"",title:b.localize(2,null),order:1}]})):void 0,e.CopyAction=s?u(new S.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:M.isNative?{primary:2048|33,win:{primary:2048|33,secondary:[2048|19]},weight:100}:void 0,menuOpts:[{menuId:g.MenuId.MenubarEditMenu,group:"2_ccp",title:b.localize(3,null),order:2},{menuId:g.MenuId.EditorContext,group:c,title:b.localize(4,null),order:2},{menuId:g.MenuId.CommandPalette,group:"",title:b.localize(5,null),order:1}]})):void 0,e.PasteAction=a?u(new S.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:M.isNative?{primary:2048|52,win:{primary:2048|52,secondary:[1024|19]},linux:{primary:2048|52,secondary:[1024|19]},weight:100}:void 0,menuOpts:[{menuId:g.MenuId.MenubarEditMenu,group:"2_ccp",title:b.localize(6,null),order:3},{menuId:g.MenuId.EditorContext,group:c,title:b.localize(7,null),when:d.EditorContextKeys.writable,order:3},{menuId:g.MenuId.CommandPalette,group:"",title:b.localize(8,null),order:1}]})):void 0;class r extends S.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:b.localize(9,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(t,l){!l.hasModel()||!l.getOption(28)&&l.getSelection().isEmpty()||(w.CopyOptions.forceCopyWithSyntaxHighlighting=!0,l.focus(),document.execCommand("copy"),w.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function i(n,t){!n||(n.addImplementation(1e4,(l,h)=>{const m=l.get(C.ICodeEditorService).getFocusedCodeEditor();if(m&&m.hasTextFocus()){const _=m.getOption(28),f=m.getSelection();return f&&f.isEmpty()&&!_||document.execCommand(t),!0}return!1}),n.addImplementation(0,(l,h)=>(document.execCommand(t),!0)))}i(e.CutAction,"cut"),i(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,(n,t)=>{const l=n.get(C.ICodeEditorService),h=n.get(p.IClipboardService),m=l.getFocusedCodeEditor();return m&&m.hasTextFocus()?(!document.execCommand("paste")&&M.isWeb&&(()=>Ie(void 0,void 0,void 0,function*(){const f=yield h.readText();if(f!==""){const v=w.InMemoryClipboardMetadataManager.INSTANCE.get(f);let y=!1,L=null,I=null;v&&(y=m.getOption(28)&&!!v.isFromEmptySelection,L=typeof v.multicursorText!="undefined"?v.multicursorText:null,I=v.mode),m.trigger("keyboard","paste",{text:f,pasteOnNewLine:y,multicursorText:L,mode:I})}}))(),!0):!1}),e.PasteAction.addImplementation(0,(n,t)=>(document.execCommand("paste"),!0))),s&&S.registerEditorAction(r)}),define(Q[145],J([0,1,19,23,12,2,24,70,3,21,18,36,130,59,26]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeActions=e.CodeActionItem=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class u{constructor(m,_){this.action=m,this.provider=_}resolve(m){var _;return Ie(this,void 0,void 0,function*(){if(((_=this.provider)===null||_===void 0?void 0:_.resolveCodeAction)&&!this.action.edit){let f;try{f=yield this.provider.resolveCodeAction(this.action,m)}catch(v){M.onUnexpectedExternalError(v)}f&&(this.action.edit=f.edit)}return this})}}e.CodeActionItem=u;class r extends w.Disposable{constructor(m,_,f){super();this.documentation=_,this._register(f),this.allActions=b.mergeSort([...m],r.codeActionsComparator),this.validActions=this.allActions.filter(({action:v})=>!v.disabled)}static codeActionsComparator({action:m},{action:_}){return m.isPreferred&&!_.isPreferred?-1:!m.isPreferred&&_.isPreferred?1:b.isNonEmptyArray(m.diagnostics)?b.isNonEmptyArray(_.diagnostics)?m.diagnostics[0].message.localeCompare(_.diagnostics[0].message):-1:b.isNonEmptyArray(_.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:m})=>!!m.kind&&o.CodeActionKind.QuickFix.contains(new o.CodeActionKind(m.kind))&&!!m.isPreferred)}}const i={actions:[],documentation:void 0};function n(h,m,_,f,v){var y;const L=_.filter||{},I={only:(y=L.include)===null||y===void 0?void 0:y.value,trigger:_.type},k=new C.TextModelCancellationTokenSource(h,v),E=t(h,L),T=new w.DisposableStore,O=E.map(B=>Ie(this,void 0,void 0,function*(){try{f.report(B);const F=yield B.provideCodeActions(h,m,I,k.token);if(F&&T.add(F),k.token.isCancellationRequested)return i;const D=((F==null?void 0:F.actions)||[]).filter(W=>W&&o.filtersAction(L,W)),R=l(B,D,L.include);return{actions:D.map(W=>new u(W,B)),documentation:R}}catch(F){if(M.isPromiseCanceledError(F))throw F;return M.onUnexpectedExternalError(F),i}})),A=p.CodeActionProviderRegistry.onDidChange(()=>{const B=p.CodeActionProviderRegistry.all(h);b.equals(B,E)||k.cancel()});return Promise.all(O).then(B=>{const F=b.flatten(B.map(R=>R.actions)),D=b.coalesce(B.map(R=>R.documentation));return new r(F,D,T)}).finally(()=>{A.dispose(),k.dispose()})}e.getCodeActions=n;function t(h,m){return p.CodeActionProviderRegistry.all(h).filter(_=>_.providedCodeActionKinds?_.providedCodeActionKinds.some(f=>o.mayIncludeActionsOfKind(m,new o.CodeActionKind(f))):!0)}function l(h,m,_){if(!!h.documentation){const f=h.documentation.map(v=>({kind:new o.CodeActionKind(v.kind),command:v.command}));if(_){let v;for(const y of f)y.kind.contains(_)&&(v?v.kind.contains(y.kind)&&(v=y):v=y);if(v)return v==null?void 0:v.command}for(const v of m)if(!!v.kind){for(const y of f)if(y.kind.contains(new o.CodeActionKind(v.kind)))return y.command}}}a.CommandsRegistry.registerCommand("_executeCodeActionProvider",function(h,m,_,f,v){return Ie(this,void 0,void 0,function*(){if(!(m instanceof S.URI))throw M.illegalArgument();const y=h.get(c.IModelService).getModel(m);if(!y)throw M.illegalArgument();const L=g.Selection.isISelection(_)?g.Selection.liftSelection(_):d.Range.isIRange(_)?y.validateRange(_):void 0;if(!L)throw M.illegalArgument();const I=typeof f=="string"?new o.CodeActionKind(f):void 0,k=yield n(y,L,{type:2,filter:{includeSourceActions:!0,include:I}},s.Progress.None,N.CancellationToken.None),E=[],T=Math.min(k.validActions.length,typeof v=="number"?v:0);for(let O=0;O<T;O++)E.push(k.validActions[O].resolve(N.CancellationToken.None));try{return yield Promise.all(E),k.validActions.map(O=>O.action)}finally{setTimeout(()=>k.dispose(),100)}})})}),define(Q[616],J([0,1,7,48,12,150,2,14,18,145,130,68,37]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=e.CodeActionMenu=void 0;class s extends N.Action{constructor(n,t){super(n.command?n.command.id:n.title,a(n.title),void 0,!n.disabled,t);this.action=n}}function a(i){return i.replace(/\r\n|\r|\n/g," ")}let u=class extends S.Disposable{constructor(n,t,l,h){super();this._editor=n,this._delegate=t,this._contextMenuService=l,this._visible=!1,this._showingActions=this._register(new S.MutableDisposable),this._keybindingResolver=new r({getKeybindings:()=>h.getKeybindings()})}get isVisible(){return this._visible}show(n,t,l,h){return Ie(this,void 0,void 0,function*(){const m=h.includeDisabledActions?t.allActions:t.validActions;if(!m.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,M.canceled();this._visible=!0,this._showingActions.value=t;const _=this.getMenuActions(n,m,t.documentation),f=C.Position.isIPosition(l)?this._toCoords(l):l||{x:0,y:0},v=this._keybindingResolver.getResolver();this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:()=>f,getActions:()=>_,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:y=>y instanceof s?v(y.action):void 0})})}getMenuActions(n,t,l){var h,m;const _=L=>new s(L.action,()=>this._delegate.onSelectCodeAction(L)),f=t.map(_),v=[...l],y=this._editor.getModel();if(y&&f.length)for(const L of d.CodeActionProviderRegistry.all(y))L._getAdditionalMenuItems&&v.push(...L._getAdditionalMenuItems({trigger:n.type,only:(m=(h=n.filter)===null||h===void 0?void 0:h.include)===null||m===void 0?void 0:m.value},t.map(I=>I.action)));return v.length&&f.push(new N.Separator,...v.map(L=>_(new g.CodeActionItem({title:L.title,command:L},void 0)))),f}_toCoords(n){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(n,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(n),l=b.getDomNodePagePosition(this._editor.getDomNode()),h=l.left+t.left,m=l.top+t.top+t.height;return{x:h,y:m}}};u=Me([_e(2,c.IContextMenuService),_e(3,o.IKeybindingService)],u),e.CodeActionMenu=u;class r{constructor(n){this._keybindingProvider=n}getResolver(){const n=new w.Lazy(()=>this._keybindingProvider.getKeybindings().filter(t=>r.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let l=t.commandArgs;return t.command===g.organizeImportsCommandId?l={kind:p.CodeActionKind.SourceOrganizeImports.value}:t.command===g.fixAllCommandId&&(l={kind:p.CodeActionKind.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},p.CodeActionCommandArgs.fromUser(l,{kind:p.CodeActionKind.None,apply:"never"}))}));return t=>{if(t.kind){const l=this.bestKeybindingForCodeAction(t,n.getValue());return l==null?void 0:l.resolvedKeybinding}}}bestKeybindingForCodeAction(n,t){if(!!n.kind){const l=new p.CodeActionKind(n.kind);return t.filter(h=>h.kind.contains(l)).filter(h=>h.preferred?n.isPreferred:!0).reduceRight((h,m)=>h?h.kind.contains(m.kind)?m:h:m,void 0)}}}e.CodeActionKeybindingResolver=r,r.codeActionCommands=[g.refactorCommandId,g.codeActionCommandId,g.sourceActionCommandId,g.organizeImportsCommandId,g.fixAllCommandId]});var tt=this&&this.__classPrivateFieldGet||function(q,e){if(!e.has(q))throw new TypeError("attempted to get private field on non-instance");return e.get(q)},_t=this&&this.__classPrivateFieldSet||function(q,e,b){if(!e.has(q))throw new TypeError("attempted to set private field on non-instance");return e.set(q,b),b};define(Q[617],J([0,1,15,12,6,2,44,3,18,16,59,145]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new g.RawContextKey("supportedCodeAction","");class s extends w.Disposable{constructor(n,t,l,h=250){super();this._editor=n,this._markerService=t,this._signalChange=l,this._delay=h,this._autoTriggerTimer=this._register(new b.TimeoutTimer),this._register(this._markerService.onMarkerChanged(m=>this._onMarkerChanges(m))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(n){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(n);return this._createEventAndSignalChange(n,t)}_onMarkerChanges(n){const t=this._editor.getModel();!t||n.some(l=>S.isEqual(l,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:1})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:1})},this._delay)}_getRangeOfMarker(n){const t=this._editor.getModel();if(!!t)for(const l of this._markerService.read({resource:t.uri})){const h=t.validateRange(l);if(C.Range.intersectRanges(h,n))return C.Range.lift(h)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(n){if(!!this._editor.hasModel()){const t=this._editor.getModel(),l=this._editor.getSelection();if(l.isEmpty()&&n.type===1){const{lineNumber:h,column:m}=l.getPosition(),_=t.getLineContent(h);if(_.length===0)return;if(m===1){if(/\s/.test(_[0]))return}else if(m===t.getLineMaxColumn(h)){if(/\s/.test(_[_.length-1]))return}else if(/\s/.test(_[m-2])&&/\s/.test(_[m-1]))return}return l}}_createEventAndSignalChange(n,t){const l=this._editor.getModel();if(!t||!l){this._signalChange(void 0);return}const h=this._getRangeOfMarker(t),m=h?h.getStartPosition():t.getStartPosition(),_={trigger:n,selection:t,position:m};return this._signalChange(_),_}}var a;(function(i){i.Empty={type:0};class n{constructor(l,h,m,_){this.trigger=l,this.rangeOrSelection=h,this.position=m,this._cancellablePromise=_,this.type=1,this.actions=_.catch(f=>{if(N.isPromiseCanceledError(f))return u;throw f})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=n})(a=e.CodeActionsState||(e.CodeActionsState={}));const u={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class r extends w.Disposable{constructor(n,t,l,h){super();this._editor=n,this._markerService=t,this._progressService=h,this._codeActionOracle=this._register(new w.MutableDisposable),this._state=a.Empty,this._onDidChangeState=this._register(new M.Emitter),this.onDidChangeState=this._onDidChangeState.event,o.set(this,!1),this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(l),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(d.CodeActionProviderRegistry.onDidChange(()=>this._update())),this._update()}dispose(){tt(this,o)||(_t(this,o,!0),super.dispose(),this.setState(a.Empty,!0))}_update(){if(!tt(this,o)){this._codeActionOracle.value=void 0,this.setState(a.Empty);const n=this._editor.getModel();if(n&&d.CodeActionProviderRegistry.has(n)&&!this._editor.getOption(75)){const t=[];for(const l of d.CodeActionProviderRegistry.all(n))Array.isArray(l.providedCodeActionKinds)&&t.push(...l.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new s(this._editor,this._markerService,l=>{var h;if(!l){this.setState(a.Empty);return}const m=b.createCancelablePromise(_=>c.getCodeActions(n,l.selection,l.trigger,p.Progress.None,_));l.trigger.type===2&&((h=this._progressService)===null||h===void 0||h.showWhile(m,250)),this.setState(new a.Triggered(l.trigger,l.selection,l.position,m))},void 0),this._codeActionOracle.value.trigger({type:1})}else this._supportedCodeActions.reset()}}trigger(n){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(n)}setState(n,t){n!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=n,!t&&!tt(this,o)&&this._onDidChangeState.fire(n))}}e.CodeActionModel=r,o=new WeakMap}),define(Q[618],J([0,1,15,12,2,70,13,18,248,596,26,32,575,7,89,78,468,25,134]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let t=class{constructor(h,m,_,f){this._editor=h,this._commandService=m,this._notificationService=_,this._codeLensCache=f,this._disposables=new M.DisposableStore,this._localToDispose=new M.DisposableStore,this._lenses=[],this._getCodeLensModelDelays=new n.LanguageFeatureRequestDelays(C.CodeLensProviderRegistry,250,2500),this._oldCodeLensModels=new M.DisposableStore,this._resolveCodeLensesDelays=new n.LanguageFeatureRequestDelays(C.CodeLensProviderRegistry,250,2500),this._resolveCodeLensesScheduler=new b.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(v=>{(v.hasChanged(38)||v.hasChanged(13)||v.hasChanged(12))&&this._updateLensStyle(),v.hasChanged(11)&&this._onModelChange()})),this._disposables.add(C.CodeLensProviderRegistry.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+a.hash(this._editor.getId()).toString(16),this._styleElement=s.createStyleSheet(s.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var h;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(h=this._currentCodeLensModel)===null||h===void 0||h.dispose(),this._styleElement.remove()}_getLayoutInfo(){let h=this._editor.getOption(13),m;return!h||h<5?(h=this._editor.getOption(40)*.9|0,m=this._editor.getOption(53)):m=h*Math.max(1.3,this._editor.getOption(53)/this._editor.getOption(40))|0,{codeLensHeight:m,fontSize:h}}_updateLensStyle(){const{codeLensHeight:h,fontSize:m}=this._getLayoutInfo(),_=this._editor.getOption(12),f=this._editor.getOption(38),v=`--codelens-font-family${this._styleClassName}`;let y=`
.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${h}px; font-size: ${m}px; padding-right: ${Math.round(m*.5)}px; font-feature-settings: ${f.fontFeatureSettings} }
.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${h}px; font-size: ${m}px; }
`;_&&(y+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${v})}`),this._styleElement.textContent=y,this._editor.getContainerDomNode().style.setProperty(v,_!=null?_:"inherit"),this._editor.changeViewZones(L=>{for(let I of this._lenses)I.updateHeight(h,L)})}_localDispose(){var h,m,_;(h=this._getCodeLensModelPromise)===null||h===void 0||h.cancel(),this._getCodeLensModelPromise=void 0,(m=this._resolveCodeLensesPromise)===null||m===void 0||m.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(_=this._currentCodeLensModel)===null||_===void 0||_.dispose()}_onModelChange(){this._localDispose();const h=this._editor.getModel();if(!!h&&!!this._editor.getOption(11)){const m=this._codeLensCache.get(h);if(m&&this._renderCodeLensSymbols(m),!C.CodeLensProviderRegistry.has(h)){m&&this._localToDispose.add(b.disposableTimeout(()=>{const f=this._codeLensCache.get(h);m===f&&(this._codeLensCache.delete(h),this._onModelChange())},30*1e3));return}for(const f of C.CodeLensProviderRegistry.all(h))if(typeof f.onDidChange=="function"){let v=f.onDidChange(()=>_.schedule());this._localToDispose.add(v)}const _=new b.RunOnceScheduler(()=>{var f;const v=Date.now();(f=this._getCodeLensModelPromise)===null||f===void 0||f.cancel(),this._getCodeLensModelPromise=b.createCancelablePromise(y=>d.getCodeLensModel(h,y)),this._getCodeLensModelPromise.then(y=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=y,this._codeLensCache.put(h,y);const L=this._getCodeLensModelDelays.update(h,Date.now()-v);_.delay=L,this._renderCodeLensSymbols(y),this._resolveCodeLensesInViewport()},N.onUnexpectedError)},this._getCodeLensModelDelays.get(h));this._localToDispose.add(_),this._localToDispose.add(M.toDisposable(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(f=>{this._editor.changeViewZones(v=>{let y=[],L=-1;this._lenses.forEach(k=>{!k.isValid()||L===k.getLineNumber()?y.push(k):(k.update(v),L=k.getLineNumber())});let I=new g.CodeLensHelper;y.forEach(k=>{k.dispose(I,v),this._lenses.splice(this._lenses.indexOf(k),1)}),I.commit(f)})}),_.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{_.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(f=>{f.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(M.toDisposable(()=>{if(this._editor.getModel()){const f=w.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(v=>{this._editor.changeViewZones(y=>{this._disposeAllLenses(v,y)})}),f.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(f=>{if(f.target.type===9){let v=f.target.element;if((v==null?void 0:v.tagName)==="SPAN"&&(v=v.parentElement),(v==null?void 0:v.tagName)==="A")for(const y of this._lenses){let L=y.getCommand(v);if(L){this._commandService.executeCommand(L.id,...L.arguments||[]).catch(I=>this._notificationService.error(I));break}}}})),_.schedule()}}_disposeAllLenses(h,m){const _=new g.CodeLensHelper;for(const f of this._lenses)f.dispose(_,m);h&&_.commit(h),this._lenses.length=0}_renderCodeLensSymbols(h){if(!!this._editor.hasModel()){let m=this._editor.getModel().getLineCount(),_=[],f;for(let L of h.lenses){let I=L.symbol.range.startLineNumber;I<1||I>m||(f&&f[f.length-1].symbol.range.startLineNumber===I?f.push(L):(f=[L],_.push(f)))}const v=w.StableEditorScrollState.capture(this._editor),y=this._getLayoutInfo();this._editor.changeDecorations(L=>{this._editor.changeViewZones(I=>{const k=new g.CodeLensHelper;let E=0,T=0;for(;T<_.length&&E<this._lenses.length;){let O=_[T][0].symbol.range.startLineNumber,A=this._lenses[E].getLineNumber();A<O?(this._lenses[E].dispose(k,I),this._lenses.splice(E,1)):A===O?(this._lenses[E].updateCodeLensSymbols(_[T],k),T++,E++):(this._lenses.splice(E,0,new g.CodeLensWidget(_[T],this._editor,this._styleClassName,k,I,y.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),E++,T++)}for(;E<this._lenses.length;)this._lenses[E].dispose(k,I),this._lenses.splice(E,1);for(;T<_.length;)this._lenses.push(new g.CodeLensWidget(_[T],this._editor,this._styleClassName,k,I,y.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),T++;k.commit(L)})}),v.restore(this._editor)}}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var h;(h=this._resolveCodeLensesPromise)===null||h===void 0||h.cancel(),this._resolveCodeLensesPromise=void 0;const m=this._editor.getModel();if(!!m){const _=[],f=[];if(this._lenses.forEach(L=>{const I=L.computeIfNecessary(m);I&&(_.push(I),f.push(L))}),_.length!==0){const v=Date.now(),y=b.createCancelablePromise(L=>{const I=_.map((k,E)=>{const T=new Array(k.length),O=k.map((A,B)=>!A.symbol.command&&typeof A.provider.resolveCodeLens=="function"?Promise.resolve(A.provider.resolveCodeLens(m,A.symbol,L)).then(F=>{T[B]=F},N.onUnexpectedExternalError):(T[B]=A.symbol,Promise.resolve(void 0)));return Promise.all(O).then(()=>{!L.isCancellationRequested&&!f[E].isDisposed()&&f[E].updateCommands(T)})});return Promise.all(I)});this._resolveCodeLensesPromise=y,this._resolveCodeLensesPromise.then(()=>{const L=this._resolveCodeLensesDelays.update(m,Date.now()-v);this._resolveCodeLensesScheduler.delay=L,this._currentCodeLensModel&&this._codeLensCache.put(m,this._currentCodeLensModel),this._oldCodeLensModels.clear(),y===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},L=>{N.onUnexpectedError(L),y===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}}}getLenses(){return this._lenses}};t.ID="css.editor.codeLens",t=Me([_e(1,p.ICommandService),_e(2,c.INotificationService),_e(3,o.ICodeLensCache)],t),e.CodeLensContribution=t,S.registerEditorContribution(t.ID,t),S.registerEditorAction(class extends S.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:i.EditorContextKeys.hasCodeLensProvider,label:r.localize(0,null),alias:"Show CodeLens Commands For Current Line"})}run(h,m){return Ie(this,void 0,void 0,function*(){if(!!m.hasModel()){const _=h.get(u.IQuickInputService),f=h.get(p.ICommandService),v=h.get(c.INotificationService),y=m.getSelection().positionLineNumber,L=m.getContribution(t.ID),I=[];for(let E of L.getLenses())if(E.getLineNumber()===y)for(let T of E.getItems()){const{command:O}=T.symbol;O&&I.push({label:O.title,command:O})}if(I.length!==0){const k=yield _.pick(I,{canPickMany:!1});if(!!k)try{yield f.executeCommand(k.command.id,...k.command.arguments||[])}catch(E){v.error(E)}}}})}})}),define(Q[260],J([0,1,15,29,12,89,2,13,28,3,31,18,249,46]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorDetector=void 0;const a=500;let u=class Wt extends S.Disposable{constructor(i,n,t){super();this._editor=i,this._codeEditorService=n,this._configurationService=t,this._localToDispose=this._register(new S.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(i.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(i.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(c.ColorProviderRegistry.onDidChange(()=>this.onModelChanged())),this._register(i.onDidChangeConfiguration(()=>{let l=this._isEnabled;this._isEnabled=this.isEnabled(),l!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const i=this._editor.getModel();if(!i)return!1;const n=i.getLanguageIdentifier(),t=this._configurationService.getValue(n.language);if(t){const l=t.colorDecorators;if(l&&l.enable!==void 0&&!l.enable)return l.enable}return this._editor.getOption(14)}static get(i){return i.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!!this._isEnabled){const i=this._editor.getModel();!i||!c.ColorProviderRegistry.has(i)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new b.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},Wt.RECOMPUTE_TIME))})),this.beginCompute())}}beginCompute(){this._computePromise=b.createCancelablePromise(i=>{const n=this._editor.getModel();return n?o.getColors(n,i):Promise.resolve([])}),this._computePromise.then(i=>{this.updateDecorations(i),this.updateColorDecorators(i),this._computePromise=null},M.onUnexpectedError)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(i){const n=i.map(t=>({range:{startLineNumber:t.colorInfo.range.startLineNumber,startColumn:t.colorInfo.range.startColumn,endLineNumber:t.colorInfo.range.endLineNumber,endColumn:t.colorInfo.range.endColumn},options:p.ModelDecorationOptions.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,n),this._colorDatas=new Map,this._decorationsIds.forEach((t,l)=>this._colorDatas.set(t,i[l]))}updateColorDecorators(i){let n=[],t={};for(let l=0;l<i.length&&n.length<a;l++){const{red:h,green:m,blue:_,alpha:f}=i[l].colorInfo.color,v=new N.RGBA(Math.round(h*255),Math.round(m*255),Math.round(_*255),f);let y=w.hash(`rgba(${v.r},${v.g},${v.b},${v.a})`).toString(16),L=`rgba(${v.r}, ${v.g}, ${v.b}, ${v.a})`,I="colorBox-"+y;!this._decorationsTypes.has(I)&&!t[I]&&this._codeEditorService.registerDecorationType(I,{before:{contentText:" ",border:"solid 0.1em #000",margin:"0.1em 0.2em 0 0.2em",width:"0.8em",height:"0.8em",backgroundColor:L},dark:{before:{border:"solid 0.1em #eee"}}},void 0,this._editor),t[I]=!0,n.push({range:{startLineNumber:i[l].colorInfo.range.startLineNumber,startColumn:i[l].colorInfo.range.startColumn,endLineNumber:i[l].colorInfo.range.endLineNumber,endColumn:i[l].colorInfo.range.endColumn},options:this._codeEditorService.resolveDecorationOptions(I,!0)})}this._decorationsTypes.forEach(l=>{t[l]||this._codeEditorService.removeDecorationType(l)}),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,n)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach(i=>{this._codeEditorService.removeDecorationType(i)})}getColorData(i){const n=this._editor.getModel();if(!n)return null;const t=n.getDecorationsInRange(g.Range.fromPositions(i,i)).filter(l=>this._colorDatas.has(l.id));return t.length===0?null:this._colorDatas.get(t[0].id)}};u.ID="editor.contrib.colorDetector",u.RECOMPUTE_TIME=1e3,u=Me([_e(1,d.ICodeEditorService),_e(2,s.IConfigurationService)],u),e.ColorDetector=u,C.registerEditorContribution(u.ID,u)}),define(Q[619],J([0,1,469,39,13,3,25,224,401,34]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class p extends M.EditorAction{constructor(r,i){super(i);this._type=r}run(r,i){if(!!i.hasModel()){const n=i.getModel(),t=[],l=n.getOptions(),h=i.getOption(16),m=i.getSelections().map((f,v)=>({selection:f,index:v,ignoreFirstLine:!1}));m.sort((f,v)=>w.Range.compareRangesUsingStarts(f.selection,v.selection));let _=m[0];for(let f=1;f<m.length;f++){const v=m[f];_.selection.endLineNumber===v.selection.startLineNumber&&(_.index<v.index?v.ignoreFirstLine=!0:(_.ignoreFirstLine=!0,_=v))}for(const f of m)t.push(new d.LineCommentCommand(f.selection,l.tabSize,this._type,h.insertSpace,h.ignoreEmptyLines,f.ignoreFirstLine));i.pushUndoStop(),i.executeCommands(this.id,t),i.pushUndoStop()}}}class c extends p{constructor(){super(0,{id:"editor.action.commentLine",label:b.localize(0,null),alias:"Toggle Line Comment",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2048|85,weight:100},menuOpts:{menuId:g.MenuId.MenubarEditMenu,group:"5_insert",title:b.localize(1,null),order:1}})}}class o extends p{constructor(){super(1,{id:"editor.action.addCommentLine",label:b.localize(2,null),alias:"Add Line Comment",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:N.KeyChord(2048|41,2048|33),weight:100}})}}class s extends p{constructor(){super(2,{id:"editor.action.removeCommentLine",label:b.localize(3,null),alias:"Remove Line Comment",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:N.KeyChord(2048|41,2048|51),weight:100}})}}class a extends M.EditorAction{constructor(){super({id:"editor.action.blockComment",label:b.localize(4,null),alias:"Toggle Block Comment",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:1024|512|31,linux:{primary:2048|1024|31},weight:100},menuOpts:{menuId:g.MenuId.MenubarEditMenu,group:"5_insert",title:b.localize(5,null),order:2}})}run(r,i){if(!!i.hasModel()){const n=i.getOption(16),t=[],l=i.getSelections();for(const h of l)t.push(new C.BlockCommentCommand(h,n.insertSpace));i.pushUndoStop(),i.executeCommands(this.id,t),i.pushUndoStop()}}}M.registerEditorAction(c),M.registerEditorAction(o),M.registerEditorAction(s),M.registerEditorAction(a)}),define(Q[620],J([0,1,470,7,48,2,13,25,34,16,68,37,112]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let s=class Bt{constructor(r,i,n,t,l,h){this._contextMenuService=i,this._contextViewService=n,this._contextKeyService=t,this._keybindingService=l,this._menuService=h,this._toDispose=new w.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=r,this._toDispose.add(this._editor.onContextMenu(m=>this._onContextMenu(m))),this._toDispose.add(this._editor.onMouseWheel(m=>{if(this._contextMenuIsBeingShownCount>0){const _=this._contextViewService.getContextViewElement(),f=m.srcElement;f.shadowRoot&&N.getShadowRoot(_)===f.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(m=>{m.keyCode===58&&(m.preventDefault(),m.stopPropagation(),this.showContextMenu())}))}static get(r){return r.getContribution(Bt.ID)}_onContextMenu(r){if(!!this._editor.hasModel()){if(!this._editor.getOption(17)){this._editor.focus(),r.target.position&&!this._editor.getSelection().containsPosition(r.target.position)&&this._editor.setPosition(r.target.position);return}if(r.target.type!==12&&(r.event.preventDefault(),!(r.target.type!==6&&r.target.type!==7&&r.target.type!==1))){if(this._editor.focus(),r.target.position){let n=!1;for(const t of this._editor.getSelections())if(t.containsPosition(r.target.position)){n=!0;break}n||this._editor.setPosition(r.target.position)}let i=null;r.target.type!==1&&(i={x:r.event.posx-1,width:2,y:r.event.posy-1,height:2}),this.showContextMenu(i)}}}showContextMenu(r){if(!!this._editor.getOption(17)&&!!this._editor.hasModel()){if(!this._contextMenuService){this._editor.focus();return}const i=this._getMenuActions(this._editor.getModel(),d.MenuId.EditorContext);i.length>0&&this._doShowContextMenu(i,r)}}_getMenuActions(r,i){const n=[],t=this._menuService.createMenu(i,this._contextKeyService),l=t.getActions({arg:r.uri});t.dispose();for(let h of l){const[,m]=h;let _=0;for(const f of m)if(f instanceof d.SubmenuItemAction){const v=this._getMenuActions(r,f.item.submenu);v.length>0&&(n.push(new M.SubmenuAction(f.id,f.label,v)),_++)}else n.push(f),_++;_&&n.push(new M.Separator)}return n.length&&n.pop(),n}_doShowContextMenu(r,i=null){if(!!this._editor.hasModel()){const n=this._editor.getOption(48);if(this._editor.updateOptions({hover:{enabled:!1}}),!i){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),l=N.getDomNodePagePosition(this._editor.getDomNode()),h=l.left+t.left,m=l.top+t.top+t.height;i={x:h,y:m}}this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:()=>i,getActions:()=>r,getActionViewItem:t=>{const l=this._keybindingFor(t);if(l)return new o.ActionViewItem(t,t,{label:!0,keybinding:l.getLabel(),isMenu:!0});const h=t;return typeof h.getActionViewItem=="function"?h.getActionViewItem():new o.ActionViewItem(t,t,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:t=>this._keybindingFor(t),onHide:t=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:n})}})}}_keybindingFor(r){return this._keybindingService.lookupKeybinding(r.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};s.ID="editor.contrib.contextmenu",s=Me([_e(1,p.IContextMenuService),_e(2,p.IContextViewService),_e(3,g.IContextKeyService),_e(4,c.IKeybindingService),_e(5,d.IMenuService)],s),e.ContextMenuController=s;class a extends S.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:b.localize(0,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.textInputFocus,primary:1024|68,weight:100}})}run(r,i){s.get(i).showContextMenu()}}S.registerEditorContribution(s.ID,s),S.registerEditorAction(a)}),define(Q[621],J([0,1,471,2,13,25]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class S{constructor(o){this.selections=o}equals(o){const s=this.selections.length,a=o.selections.length;if(s!==a)return!1;for(let u=0;u<s;u++)if(!this.selections[u].equalsSelection(o.selections[u]))return!1;return!0}}class C{constructor(o,s,a){this.cursorState=o,this.scrollTop=s,this.scrollLeft=a}}class d extends N.Disposable{constructor(o){super();this._editor=o,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(o.onDidChangeModel(s=>{this._undoStack=[],this._redoStack=[]})),this._register(o.onDidChangeModelContent(s=>{this._undoStack=[],this._redoStack=[]})),this._register(o.onDidChangeCursorSelection(s=>{if(!this._isCursorUndoRedo&&!!s.oldSelections&&s.oldModelVersionId===s.modelVersionId){const a=new S(s.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(a)||(this._undoStack.push(new C(a,o.getScrollTop(),o.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}}))}static get(o){return o.getContribution(d.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new C(new S(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new C(new S(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(o){this._isCursorUndoRedo=!0,this._editor.setSelections(o.cursorState.selections),this._editor.setScrollPosition({scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=d,d.ID="editor.contrib.cursorUndoRedoController";class g extends M.EditorAction{constructor(){super({id:"cursorUndo",label:b.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:2048|51,weight:100}})}run(o,s,a){d.get(s).cursorUndo()}}e.CursorUndo=g;class p extends M.EditorAction{constructor(){super({id:"cursorRedo",label:b.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(o,s,a){d.get(s).cursorRedo()}}e.CursorRedo=p,M.registerEditorContribution(d.ID,d),M.registerEditorAction(g),M.registerEditorAction(p)}),define(Q[622],J([0,1,2,17,13,14,3,21,402,31,340]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function p(o){return N.isMacintosh?o.altKey:o.ctrlKey}class c extends b.Disposable{constructor(s){super();this._editor=s,this._register(this._editor.onMouseDown(a=>this._onEditorMouseDown(a))),this._register(this._editor.onMouseUp(a=>this._onEditorMouseUp(a))),this._register(this._editor.onMouseDrag(a=>this._onEditorMouseDrag(a))),this._register(this._editor.onMouseDrop(a=>this._onEditorMouseDrop(a))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(a=>this.onEditorKeyDown(a))),this._register(this._editor.onKeyUp(a=>this.onEditorKeyUp(a))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(s){!this._editor.getOption(27)||this._editor.getOption(15)||(p(s)&&(this._modifierPressed=!0),this._mouseDown&&p(s)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(s){!this._editor.getOption(27)||this._editor.getOption(15)||(p(s)&&(this._modifierPressed=!1),this._mouseDown&&s.keyCode===c.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(s){this._mouseDown=!0}_onEditorMouseUp(s){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(s){let a=s.target;if(this._dragSelection===null){let r=(this._editor.getSelections()||[]).filter(i=>a.position&&i.containsPosition(a.position));if(r.length===1)this._dragSelection=r[0];else return}p(s.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),a.position&&(this._dragSelection.containsPosition(a.position)?this._removeDecoration():this.showAt(a.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(s){if(s.target&&(this._hitContent(s.target)||this._hitMargin(s.target))&&s.target.position){let a=new w.Position(s.target.position.lineNumber,s.target.position.column);if(this._dragSelection===null){let u=null;if(s.event.shiftKey){let r=this._editor.getSelection();if(r){const{selectionStartLineNumber:i,selectionStartColumn:n}=r;u=[new C.Selection(i,n,a.lineNumber,a.column)]}}else u=(this._editor.getSelections()||[]).map(r=>r.containsPosition(a)?new C.Selection(a.lineNumber,a.column,a.lineNumber,a.column):r);this._editor.setSelections(u||[],"mouse",3)}else(!this._dragSelection.containsPosition(a)||(p(s.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(a)||this._dragSelection.getStartPosition().equals(a)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(c.ID,new d.DragAndDropCommand(this._dragSelection,a,p(s.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(s){let a=[{range:new S.Range(s.lineNumber,s.column,s.lineNumber,s.column),options:c._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,a),this._editor.revealPosition(s,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(s){return s.type===6||s.type===7}_hitMargin(s){return s.type===2||s.type===3||s.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=c,c.ID="editor.contrib.dragAndDrop",c.TRIGGER_KEY_VALUE=N.isMacintosh?6:5,c._DECORATION_OPTIONS=g.ModelDecorationOptions.register({className:"dnd-target"}),M.registerEditorContribution(c.ID,c)}),define(Q[623],J([0,1,476,13,126]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class w extends N.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:b.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(g,p){M.EditorZoom.setZoomLevel(M.EditorZoom.getZoomLevel()+1)}}class S extends N.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:b.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(g,p){M.EditorZoom.setZoomLevel(M.EditorZoom.getZoomLevel()-1)}}class C extends N.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:b.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(g,p){M.EditorZoom.setZoomLevel(0)}}N.registerEditorAction(w),N.registerEditorAction(S),N.registerEditorAction(C)}),define(Q[261],J([0,1,47,19,23,12,24,70,108,14,3,21,18,75,36,226,477,532,9,71,26,20,54]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOnTypeFormattingEdits=e.getDocumentFormattingEditsUntilResult=e.getDocumentRangeFormattingEditsUntilResult=e.formatDocumentWithProvider=e.formatDocumentWithSelectedProvider=e.formatDocumentRangesWithProvider=e.formatDocumentRangesWithSelectedProvider=e.FormattingConflicts=e.getRealAndSyntheticDocumentFormattersOrdered=e.alertFormattingEdits=void 0;function _(A){if(A=A.filter(R=>R.range),!!A.length){let{range:B}=A[0];for(let R=1;R<A.length;R++)B=p.Range.plusRange(B,A[R].range);const{startLineNumber:F,endLineNumber:D}=B;F===D?A.length===1?b.alert(r.localize(0,null,F)):b.alert(r.localize(1,null,A.length,F)):A.length===1?b.alert(r.localize(2,null,F,D)):b.alert(r.localize(3,null,A.length,F,D))}}e.alertFormattingEdits=_;function f(A){const B=[],F=new Set,D=o.DocumentFormattingEditProviderRegistry.ordered(A);for(const W of D)B.push(W),W.extensionId&&F.add(i.ExtensionIdentifier.toKey(W.extensionId));const R=o.DocumentRangeFormattingEditProviderRegistry.ordered(A);for(const W of R){if(W.extensionId){if(F.has(i.ExtensionIdentifier.toKey(W.extensionId)))continue;F.add(i.ExtensionIdentifier.toKey(W.extensionId))}B.push({displayName:W.displayName,extensionId:W.extensionId,provideDocumentFormattingEdits(x,K,Y){return W.provideDocumentRangeFormattingEdits(x,x.getFullModelRange(),K,Y)}})}return B}e.getRealAndSyntheticDocumentFormattersOrdered=f;class v{static setFormatterSelector(B){return{dispose:v._selectors.unshift(B)}}static select(B,F,D){return Ie(this,void 0,void 0,function*(){if(B.length!==0){const R=m.Iterable.first(v._selectors);if(R)return yield R(B,F,D)}})}}e.FormattingConflicts=v,v._selectors=new t.LinkedList;function y(A,B,F,D,R,W){return Ie(this,void 0,void 0,function*(){const x=A.get(n.IInstantiationService),K=d.isCodeEditor(B)?B.getModel():B,Y=o.DocumentRangeFormattingEditProviderRegistry.ordered(K),ee=yield v.select(Y,K,D);ee&&(R.report(ee),yield x.invokeFunction(L,ee,B,F,W))})}e.formatDocumentRangesWithSelectedProvider=y;function L(A,B,F,D,R){return Ie(this,void 0,void 0,function*(){const W=A.get(s.IEditorWorkerService);let x,K;d.isCodeEditor(F)?(x=F.getModel(),K=new C.EditorStateCancellationTokenSource(F,1|4,void 0,R)):(x=F,K=new C.TextModelCancellationTokenSource(F,R));let Y=[],ee=0;for(let ne of N.asArray(D).sort(p.Range.compareRangesUsingStarts))ee>0&&p.Range.areIntersectingOrTouching(Y[ee-1],ne)?Y[ee-1]=p.Range.fromPositions(Y[ee-1].getStartPosition(),ne.getEndPosition()):ee=Y.push(ne);const se=[];for(let ne of Y)try{const le=yield B.provideDocumentRangeFormattingEdits(x,ne,x.getFormattingOptions(),K.token),X=yield W.computeMoreMinimalEdits(x.uri,le);if(X&&se.push(...X),K.token.isCancellationRequested)return!0}finally{K.dispose()}if(se.length===0)return!1;if(d.isCodeEditor(F))u.FormattingEdit.execute(F,se,!0),_(se),F.revealPositionInCenterIfOutsideViewport(F.getPosition(),1);else{const[{range:ne}]=se,le=new c.Selection(ne.startLineNumber,ne.startColumn,ne.endLineNumber,ne.endColumn);x.pushEditOperations([le],se.map(X=>({text:X.text,range:p.Range.lift(X.range),forceMoveMarkers:!0})),X=>{for(const{range:z}of X)if(p.Range.areIntersectingOrTouching(z,le))return[new c.Selection(z.startLineNumber,z.startColumn,z.endLineNumber,z.endColumn)];return null})}return!0})}e.formatDocumentRangesWithProvider=L;function I(A,B,F,D,R){return Ie(this,void 0,void 0,function*(){const W=A.get(n.IInstantiationService),x=d.isCodeEditor(B)?B.getModel():B,K=f(x),Y=yield v.select(K,x,F);Y&&(D.report(Y),yield W.invokeFunction(k,Y,B,F,R))})}e.formatDocumentWithSelectedProvider=I;function k(A,B,F,D,R){return Ie(this,void 0,void 0,function*(){const W=A.get(s.IEditorWorkerService);let x,K;d.isCodeEditor(F)?(x=F.getModel(),K=new C.EditorStateCancellationTokenSource(F,1|4,void 0,R)):(x=F,K=new C.TextModelCancellationTokenSource(F,R));let Y;try{const ee=yield B.provideDocumentFormattingEdits(x,x.getFormattingOptions(),K.token);if(Y=yield W.computeMoreMinimalEdits(x.uri,ee),K.token.isCancellationRequested)return!0}finally{K.dispose()}if(!Y||Y.length===0)return!1;if(d.isCodeEditor(F))u.FormattingEdit.execute(F,Y,D!==2),D!==2&&(_(Y),F.revealPositionInCenterIfOutsideViewport(F.getPosition(),1));else{const[{range:ee}]=Y,se=new c.Selection(ee.startLineNumber,ee.startColumn,ee.endLineNumber,ee.endColumn);x.pushEditOperations([se],Y.map(ne=>({text:ne.text,range:p.Range.lift(ne.range),forceMoveMarkers:!0})),ne=>{for(const{range:le}of ne)if(p.Range.areIntersectingOrTouching(le,se))return[new c.Selection(le.startLineNumber,le.startColumn,le.endLineNumber,le.endColumn)];return null})}return!0})}e.formatDocumentWithProvider=k;function E(A,B,F,D,R){return Ie(this,void 0,void 0,function*(){const W=o.DocumentRangeFormattingEditProviderRegistry.ordered(B);for(const x of W){let K=yield Promise.resolve(x.provideDocumentRangeFormattingEdits(B,F,D,R)).catch(w.onUnexpectedExternalError);if(N.isNonEmptyArray(K))return yield A.computeMoreMinimalEdits(B.uri,K)}})}e.getDocumentRangeFormattingEditsUntilResult=E;function T(A,B,F,D){return Ie(this,void 0,void 0,function*(){const R=f(B);for(const W of R){let x=yield Promise.resolve(W.provideDocumentFormattingEdits(B,F,D)).catch(w.onUnexpectedExternalError);if(N.isNonEmptyArray(x))return yield A.computeMoreMinimalEdits(B.uri,x)}})}e.getDocumentFormattingEditsUntilResult=T;function O(A,B,F,D,R){const W=o.OnTypeFormattingEditProviderRegistry.ordered(B);return W.length===0||W[0].autoFormatTriggerCharacters.indexOf(D)<0?Promise.resolve(void 0):Promise.resolve(W[0].provideOnTypeFormattingEdits(B,F,D,R,M.CancellationToken.None)).catch(w.onUnexpectedExternalError).then(x=>A.computeMoreMinimalEdits(B.uri,x))}e.getOnTypeFormattingEdits=O,l.CommandsRegistry.registerCommand("_executeFormatRangeProvider",function(A,...B){const[F,D,R]=B;h.assertType(S.URI.isUri(F)),h.assertType(p.Range.isIRange(D));const W=A.get(a.IModelService).getModel(F);if(!W)throw w.illegalArgument("resource");return E(A.get(s.IEditorWorkerService),W,p.Range.lift(D),R,M.CancellationToken.None)}),l.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",function(A,...B){const[F,D]=B;h.assertType(S.URI.isUri(F));const R=A.get(a.IModelService).getModel(F);if(!R)throw w.illegalArgument("resource");return T(A.get(s.IEditorWorkerService),R,D,M.CancellationToken.None)}),l.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",function(A,...B){const[F,D,R,W]=B;h.assertType(S.URI.isUri(F)),h.assertType(g.Position.isIPosition(D)),h.assertType(typeof R=="string");const x=A.get(a.IModelService).getModel(F);if(!x)throw w.illegalArgument("resource");return O(A.get(s.IEditorWorkerService),x,g.Position.lift(D),R,W)})}),define(Q[624],J([0,1,19,23,39,2,13,28,91,3,25,18,75,261,226,478,26,16,9,12,59]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let h=class{constructor(y,L){this._workerService=L,this._callOnDispose=new w.DisposableStore,this._callOnModel=new w.DisposableStore,this._editor=y,this._callOnDispose.add(y.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(y.onDidChangeModel(()=>this._update())),this._callOnDispose.add(y.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(c.OnTypeFormattingEditProviderRegistry.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!!this._editor.getOption(43)&&!!this._editor.hasModel()){const y=this._editor.getModel(),[L]=c.OnTypeFormattingEditProviderRegistry.ordered(y);if(!(!L||!L.autoFormatTriggerCharacters)){let I=new d.CharacterSet;for(let k of L.autoFormatTriggerCharacters)I.add(k.charCodeAt(0));this._callOnModel.add(this._editor.onDidType(k=>{let E=k.charCodeAt(k.length-1);I.has(E)&&this._trigger(String.fromCharCode(E))}))}}}_trigger(y){if(!!this._editor.hasModel()&&!(this._editor.getSelections().length>1)){const L=this._editor.getModel(),I=this._editor.getPosition();let k=!1;const E=this._editor.onDidChangeModelContent(T=>{if(T.isFlush){k=!0,E.dispose();return}for(let O=0,A=T.changes.length;O<A;O++)if(T.changes[O].range.endLineNumber<=I.lineNumber){k=!0,E.dispose();return}});s.getOnTypeFormattingEdits(this._workerService,L,I,y,L.getFormattingOptions()).then(T=>{E.dispose(),!k&&b.isNonEmptyArray(T)&&(a.FormattingEdit.execute(this._editor,T,!0),s.alertFormattingEdits(T))},T=>{throw E.dispose(),T})}}};h.ID="editor.contrib.autoFormat",h=Me([_e(1,o.IEditorWorkerService)],h);let m=class{constructor(y,L){this.editor=y,this._instantiationService=L,this._callOnDispose=new w.DisposableStore,this._callOnModel=new w.DisposableStore,this._callOnDispose.add(y.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(y.onDidChangeModel(()=>this._update())),this._callOnDispose.add(y.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(c.DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),!!this.editor.getOption(42)&&(!this.editor.hasModel()||!c.DocumentRangeFormattingEditProviderRegistry.has(this.editor.getModel())||this._callOnModel.add(this.editor.onDidPaste(({range:y})=>this._trigger(y))))}_trigger(y){!this.editor.hasModel()||this.editor.getSelections().length>1||this._instantiationService.invokeFunction(s.formatDocumentRangesWithSelectedProvider,this.editor,y,2,l.Progress.None,N.CancellationToken.None).catch(t.onUnexpectedError)}};m.ID="editor.contrib.formatOnPaste",m=Me([_e(1,n.IInstantiationService)],m);class _ extends S.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:u.localize(0,null),alias:"Format Document",precondition:i.ContextKeyExpr.and(p.EditorContextKeys.notInCompositeEditor,p.EditorContextKeys.writable,p.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:1024|512|36,linux:{primary:2048|1024|39},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(y,L){return Ie(this,void 0,void 0,function*(){if(L.hasModel()){const I=y.get(n.IInstantiationService);yield y.get(l.IEditorProgressService).showWhile(I.invokeFunction(s.formatDocumentWithSelectedProvider,L,1,l.Progress.None,N.CancellationToken.None),250)}})}}class f extends S.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:u.localize(1,null),alias:"Format Selection",precondition:i.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:M.KeyChord(2048|41,2048|36),weight:100},contextMenuOpts:{when:p.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(y,L){return Ie(this,void 0,void 0,function*(){if(!!L.hasModel()){const I=y.get(n.IInstantiationService),k=L.getModel(),E=L.getSelections().map(O=>O.isEmpty()?new g.Range(O.startLineNumber,1,O.startLineNumber,k.getLineMaxColumn(O.startLineNumber)):O);yield y.get(l.IEditorProgressService).showWhile(I.invokeFunction(s.formatDocumentRangesWithSelectedProvider,L,E,1,l.Progress.None,N.CancellationToken.None),250)}})}}S.registerEditorContribution(h.ID,h),S.registerEditorContribution(m.ID,m),S.registerEditorAction(_),S.registerEditorAction(f),r.CommandsRegistry.registerCommand("editor.action.format",v=>Ie(void 0,void 0,void 0,function*(){const y=v.get(C.ICodeEditorService).getFocusedCodeEditor();if(!(!y||!y.hasModel())){const L=v.get(r.ICommandService);y.getSelection().isEmpty()?yield L.executeCommand("editor.action.formatDocument"):yield L.executeCommand("editor.action.formatSelection")}}))}),define(Q[262],J([0,1,23,12,13,18]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;function S(o,s,a,u){const i=a.ordered(o).map(n=>Promise.resolve(u(n,o,s)).then(void 0,t=>{N.onUnexpectedExternalError(t)}));return Promise.all(i).then(n=>{const t=[];for(let l of n)Array.isArray(l)?t.push(...l):l&&t.push(l);return t})}function C(o,s,a){return S(o,s,w.DefinitionProviderRegistry,(u,r,i)=>u.provideDefinition(r,i,a))}e.getDefinitionsAtPosition=C;function d(o,s,a){return S(o,s,w.DeclarationProviderRegistry,(u,r,i)=>u.provideDeclaration(r,i,a))}e.getDeclarationsAtPosition=d;function g(o,s,a){return S(o,s,w.ImplementationProviderRegistry,(u,r,i)=>u.provideImplementation(r,i,a))}e.getImplementationsAtPosition=g;function p(o,s,a){return S(o,s,w.TypeDefinitionProviderRegistry,(u,r,i)=>u.provideTypeDefinition(r,i,a))}e.getTypeDefinitionsAtPosition=p;function c(o,s,a,u){return S(o,s,w.ReferenceProviderRegistry,(r,i,n)=>Ie(this,void 0,void 0,function*(){const t=yield r.provideReferences(i,n,{includeDeclaration:!0},u);if(!a||!t||t.length!==2)return t;const l=yield r.provideReferences(i,n,{includeDeclaration:!1},u);return l&&l.length===1?l:t}))}e.getReferencesAtPosition=c,M.registerModelAndPositionCommand("_executeDefinitionProvider",(o,s)=>C(o,s,b.CancellationToken.None)),M.registerModelAndPositionCommand("_executeDeclarationProvider",(o,s)=>d(o,s,b.CancellationToken.None)),M.registerModelAndPositionCommand("_executeImplementationProvider",(o,s)=>g(o,s,b.CancellationToken.None)),M.registerModelAndPositionCommand("_executeTypeDefinitionProvider",(o,s)=>p(o,s,b.CancellationToken.None)),M.registerModelAndPositionCommand("_executeReferenceProvider",(o,s)=>c(o,s,!1,b.CancellationToken.None))}),define(Q[625],J([0,1,16,9,74,86,13,28,3,2,6,487,37,32,44]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new b.RawContextKey("hasSymbols",!1),e.ISymbolNavigationService=N.createDecorator("ISymbolNavigationService");let u=class{constructor(n,t,l,h){this._editorService=t,this._notificationService=l,this._keybindingService=h,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(n)}reset(){var n,t;this._ctxHasSymbols.reset(),(n=this._currentState)===null||n===void 0||n.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(n){const t=n.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(n),this._ctxHasSymbols.set(!0),this._showMessage();const l=new r(this._editorService),h=l.onDidChange(m=>{if(!this._ignoreEditorChange){const _=this._editorService.getActiveCodeEditor();if(!!_){const f=_.getModel(),v=_.getPosition();if(!(!f||!v)){let y=!1,L=!1;for(const I of t.references)if(a.isEqual(I.uri,f.uri))y=!0,L=L||d.Range.containsPosition(I.range,v);else if(y)break;(!y||!L)&&this.reset()}}}});this._currentState=g.combinedDisposable(l,h)}revealNext(n){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:d.Range.collapseToStart(t.range),selectionRevealType:3}},n).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var n;(n=this._currentMessage)===null||n===void 0||n.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),l=t?c.localize(0,null,this._currentIdx+1,this._currentModel.references.length,t.getLabel()):c.localize(1,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(l)}};u=Me([_e(0,b.IContextKeyService),_e(1,C.ICodeEditorService),_e(2,s.INotificationService),_e(3,o.IKeybindingService)],u),M.registerSingleton(e.ISymbolNavigationService,u,!0),S.registerEditorCommand(new class extends S.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,n){return i.get(e.ISymbolNavigationService).revealNext(n)}}),w.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(i){i.get(e.ISymbolNavigationService).reset()}});let r=class{constructor(n){this._listener=new Map,this._disposables=new g.DisposableStore,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(n.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(n.onCodeEditorAdd(this._onDidAddEditor,this)),n.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),g.dispose(this._listener.values())}_onDidAddEditor(n){this._listener.set(n,g.combinedDisposable(n.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:n})),n.onDidChangeModelContent(t=>this._onDidChange.fire({editor:n}))))}_onDidRemoveEditor(n){var t;(t=this._listener.get(n))===null||t===void 0||t.dispose(),this._listener.delete(n)}};r=Me([_e(0,C.ICodeEditorService)],r)}),define(Q[626],J([0,1,19,23,12,13,18]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHover=void 0;function C(g,p,c){const s=S.HoverProviderRegistry.ordered(g).map(a=>Promise.resolve(a.provideHover(g,p,c)).then(u=>u&&d(u)?u:void 0,u=>{M.onUnexpectedExternalError(u)}));return Promise.all(s).then(b.coalesce)}e.getHover=C,w.registerModelAndPositionCommand("_executeHoverProvider",(g,p)=>C(g,p,N.CancellationToken.None));function d(g){const p=typeof g.range!="undefined",c=typeof g.contents!="undefined"&&g.contents&&g.contents.length>0;return p&&c}}),define(Q[627],J([0,1,489,7,73,2,3,140,19,58,57,18,626,14]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const a=N.$;class u{constructor(n,t){this.range=n,this.contents=t}equals(n){return n instanceof u?M.markedStringsEquals(this.contents,n.contents):!1}}e.MarkdownHover=u;let r=class{constructor(n,t,l,h){this._editor=n,this._hover=t,this._modeService=l,this._openerService=h}createLoadingMessage(n){return new u(n,[new M.MarkdownString().appendText(b.localize(0,null))])}computeSync(n,t){if(!this._editor.hasModel())return[];const l=this._editor.getModel(),h=n.startLineNumber,m=l.getLineMaxColumn(h),_=[];for(const f of t){const v=f.range.startLineNumber===h?f.range.startColumn:1,y=f.range.endLineNumber===h?f.range.endColumn:m,L=f.options.hoverMessage;if(!(!L||M.isEmptyMarkdownString(L))){const I=new S.Range(n.startLineNumber,v,n.startLineNumber,y);_.push(new u(I,d.asArray(L)))}}return _}computeAsync(n,t){return Ie(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!n)return Promise.resolve([]);const l=this._editor.getModel();if(!c.HoverProviderRegistry.has(l))return Promise.resolve([]);const h=yield o.getHover(l,new s.Position(n.startLineNumber,n.startColumn),t),m=[];for(const _ of h)if(!M.isEmptyMarkdownString(_.contents)){const f=_.range?S.Range.lift(_.range):n;m.push(new u(f,_.contents))}return m})}renderHoverParts(n,t){const l=new w.DisposableStore;for(const h of n)for(const m of h.contents)if(!M.isEmptyMarkdownString(m)){const _=a("div.hover-row.markdown-hover"),f=N.append(_,a("div.hover-contents")),v=l.add(new C.MarkdownRenderer({editor:this._editor},this._modeService,this._openerService));l.add(v.onDidRenderAsync(()=>{f.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const y=l.add(v.render(m));f.appendChild(y.element),t.appendChild(_)}return l}};r=Me([_e(2,p.IModeService),_e(3,g.IOpenerService)],r),e.MarkdownHoverParticipant=r}),define(Q[628],J([0,1,491,3,21,25,13,75,409,70,11,49,31,15,12]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let u=class Ct{constructor(t,l){this.decorationIds=[],this.editor=t,this.editorWorkerService=l}static get(t){return t.getContribution(Ct.ID)}dispose(){}run(t,l){this.currentRequest&&this.currentRequest.cancel();const h=this.editor.getSelection(),m=this.editor.getModel();if(!(!m||!h)){let _=h;if(_.startLineNumber===_.endLineNumber){const f=new g.EditorState(this.editor,1|4),v=m.uri;return this.editorWorkerService.canNavigateValueSet(v)?(this.currentRequest=s.createCancelablePromise(y=>this.editorWorkerService.navigateValueSet(v,_,l)),this.currentRequest.then(y=>{if(!(!y||!y.range||!y.value)&&!!f.validate(this.editor)){let L=N.Range.lift(y.range),I=y.range,k=y.value.length-(_.endColumn-_.startColumn);I={startLineNumber:I.startLineNumber,startColumn:I.startColumn,endLineNumber:I.endLineNumber,endColumn:I.startColumn+y.value.length},k>1&&(_=new M.Selection(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn+k-1));const E=new d.InPlaceReplaceCommand(L,_,y.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,E),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:I,options:Ct.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=s.timeout(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(a.onUnexpectedError)}}).catch(a.onUnexpectedError)):Promise.resolve(void 0)}}}};u.ID="editor.contrib.inPlaceReplaceController",u.DECORATION=o.ModelDecorationOptions.register({className:"valueSetReplacement"}),u=Me([_e(1,C.IEditorWorkerService)],u);class r extends S.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:b.localize(0,null),alias:"Replace with Previous Value",precondition:w.EditorContextKeys.writable,kbOpts:{kbExpr:w.EditorContextKeys.editorTextFocus,primary:2048|1024|82,weight:100}})}run(t,l){const h=u.get(l);return h?h.run(this.id,!0):Promise.resolve(void 0)}}class i extends S.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:b.localize(1,null),alias:"Replace with Next Value",precondition:w.EditorContextKeys.writable,kbOpts:{kbExpr:w.EditorContextKeys.editorTextFocus,primary:2048|1024|84,weight:100}})}run(t,l){const h=u.get(l);return h?h.run(this.id,!1):Promise.resolve(void 0)}}S.registerEditorContribution(u.ID,u),S.registerEditorAction(r),S.registerEditorAction(i),p.registerThemingParticipant((n,t)=>{const l=n.getColor(c.editorBracketMatchBorder);l&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${l}; }`)})}),define(Q[629],J([0,1,492,2,8,13,179,62,3,21,25,31,41,36,229,78]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=e.getReindentEditOperations=void 0;function r(E,T,O,A){if(E.getLineCount()===1&&E.getLineMaxColumn(1)===1)return[];let B=o.LanguageConfigurationRegistry.getIndentationRules(E.getLanguageIdentifier().id);if(!B)return[];for(O=Math.min(O,E.getLineCount());T<=O&&B.unIndentedLinePattern;){let le=E.getLineContent(T);if(!B.unIndentedLinePattern.test(le))break;T++}if(T>O-1)return[];const{tabSize:F,indentSize:D,insertSpaces:R}=E.getOptions(),W=(le,X)=>(X=X||1,S.ShiftCommand.shiftIndent(le,le.length+X,F,D,R)),x=(le,X)=>(X=X||1,S.ShiftCommand.unshiftIndent(le,le.length+X,F,D,R));let K=[],Y,ee=E.getLineContent(T),se=ee;if(A!=null){Y=A;let le=M.getLeadingWhitespace(ee);se=Y+ee.substring(le.length),B.decreaseIndentPattern&&B.decreaseIndentPattern.test(se)&&(Y=x(Y),se=Y+ee.substring(le.length)),ee!==se&&K.push(C.EditOperation.replaceMove(new g.Selection(T,1,T,le.length+1),c.TextModel.normalizeIndentation(Y,D,R)))}else Y=M.getLeadingWhitespace(ee);let ne=Y;B.increaseIndentPattern&&B.increaseIndentPattern.test(se)?(ne=W(ne),Y=W(Y)):B.indentNextLinePattern&&B.indentNextLinePattern.test(se)&&(ne=W(ne)),T++;for(let le=T;le<=O;le++){let X=E.getLineContent(le),z=M.getLeadingWhitespace(X),P=ne+X.substring(z.length);B.decreaseIndentPattern&&B.decreaseIndentPattern.test(P)&&(ne=x(ne),Y=x(Y)),z!==ne&&K.push(C.EditOperation.replaceMove(new g.Selection(le,1,le,z.length+1),c.TextModel.normalizeIndentation(ne,D,R))),!(B.unIndentedLinePattern&&B.unIndentedLinePattern.test(X))&&(B.increaseIndentPattern&&B.increaseIndentPattern.test(P)?(Y=W(Y),ne=Y):B.indentNextLinePattern&&B.indentNextLinePattern.test(P)?ne=W(ne):ne=Y)}return K}e.getReindentEditOperations=r;class i extends w.EditorAction{constructor(){super({id:i.ID,label:b.localize(0,null),alias:"Convert Indentation to Spaces",precondition:p.EditorContextKeys.writable})}run(T,O){let A=O.getModel();if(!!A){let B=A.getOptions(),F=O.getSelection();if(!!F){const D=new I(F,B.tabSize);O.pushUndoStop(),O.executeCommands(this.id,[D]),O.pushUndoStop(),A.updateOptions({insertSpaces:!0})}}}}e.IndentationToSpacesAction=i,i.ID="editor.action.indentationToSpaces";class n extends w.EditorAction{constructor(){super({id:n.ID,label:b.localize(1,null),alias:"Convert Indentation to Tabs",precondition:p.EditorContextKeys.writable})}run(T,O){let A=O.getModel();if(!!A){let B=A.getOptions(),F=O.getSelection();if(!!F){const D=new k(F,B.tabSize);O.pushUndoStop(),O.executeCommands(this.id,[D]),O.pushUndoStop(),A.updateOptions({insertSpaces:!1})}}}}e.IndentationToTabsAction=n,n.ID="editor.action.indentationToTabs";class t extends w.EditorAction{constructor(T,O){super(O);this.insertSpaces=T}run(T,O){const A=T.get(u.IQuickInputService),B=T.get(s.IModelService);let F=O.getModel();if(!!F){let D=B.getCreationOptions(F.getLanguageIdentifier().language,F.uri,F.isForSimpleWidget);const R=[1,2,3,4,5,6,7,8].map(x=>({id:x.toString(),label:x.toString(),description:x===D.tabSize?b.localize(2,null):void 0})),W=Math.min(F.getOptions().tabSize-1,7);setTimeout(()=>{A.pick(R,{placeHolder:b.localize(3,null),activeItem:R[W]}).then(x=>{x&&F&&!F.isDisposed()&&F.updateOptions({tabSize:parseInt(x.label,10),insertSpaces:this.insertSpaces})})},50)}}}e.ChangeIndentationSizeAction=t;class l extends t{constructor(){super(!1,{id:l.ID,label:b.localize(4,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=l,l.ID="editor.action.indentUsingTabs";class h extends t{constructor(){super(!0,{id:h.ID,label:b.localize(5,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=h,h.ID="editor.action.indentUsingSpaces";class m extends w.EditorAction{constructor(){super({id:m.ID,label:b.localize(6,null),alias:"Detect Indentation from Content",precondition:void 0})}run(T,O){const A=T.get(s.IModelService);let B=O.getModel();if(!!B){let F=A.getCreationOptions(B.getLanguageIdentifier().language,B.uri,B.isForSimpleWidget);B.detectIndentation(F.insertSpaces,F.tabSize)}}}e.DetectIndentation=m,m.ID="editor.action.detectIndentation";class _ extends w.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:b.localize(7,null),alias:"Reindent Lines",precondition:p.EditorContextKeys.writable})}run(T,O){let A=O.getModel();if(!!A){let B=r(A,1,A.getLineCount());B.length>0&&(O.pushUndoStop(),O.executeEdits(this.id,B),O.pushUndoStop())}}}e.ReindentLinesAction=_;class f extends w.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:b.localize(8,null),alias:"Reindent Selected Lines",precondition:p.EditorContextKeys.writable})}run(T,O){let A=O.getModel();if(!!A){let B=O.getSelections();if(B!==null){let F=[];for(let D of B){let R=D.startLineNumber,W=D.endLineNumber;if(R!==W&&D.endColumn===1&&W--,R===1){if(R===W)continue}else R--;let x=r(A,R,W);F.push(...x)}F.length>0&&(O.pushUndoStop(),O.executeEdits(this.id,F),O.pushUndoStop())}}}}e.ReindentSelectedLinesAction=f;class v{constructor(T,O){this._initialSelection=O,this._edits=[],this._selectionId=null;for(let A of T)A.range&&typeof A.text=="string"&&this._edits.push(A)}getEditOperations(T,O){for(let B of this._edits)O.addEditOperation(d.Range.lift(B.range),B.text);let A=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(A=!0,this._selectionId=O.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(A=!0,this._selectionId=O.trackSelection(this._initialSelection,!1))),A||(this._selectionId=O.trackSelection(this._initialSelection))}computeCursorState(T,O){return O.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=v;class y{constructor(T){this.callOnDispose=new N.DisposableStore,this.callOnModel=new N.DisposableStore,this.editor=T,this.callOnDispose.add(T.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(T.onDidChangeModel(()=>this.update())),this.callOnDispose.add(T.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(8)<4||this.editor.getOption(42))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:T})=>{this.trigger(T)})))}trigger(T){let O=this.editor.getSelections();if(!(O===null||O.length>1)){const A=this.editor.getModel();if(!!A&&!!A.isCheapToTokenize(T.getStartPosition().lineNumber)){const B=this.editor.getOption(8),{tabSize:F,indentSize:D,insertSpaces:R}=A.getOptions();let W=[],x={shiftIndent:se=>S.ShiftCommand.shiftIndent(se,se.length+1,F,D,R),unshiftIndent:se=>S.ShiftCommand.unshiftIndent(se,se.length+1,F,D,R)},K=T.startLineNumber;for(;K<=T.endLineNumber;){if(this.shouldIgnoreLine(A,K)){K++;continue}break}if(!(K>T.endLineNumber)){let Y=A.getLineContent(K);if(!/\S/.test(Y.substring(0,T.startColumn-1))){let se=o.LanguageConfigurationRegistry.getGoodIndentForLine(B,A,A.getLanguageIdentifier().id,K,x);if(se!==null){let ne=M.getLeadingWhitespace(Y),le=a.getSpaceCnt(se,F),X=a.getSpaceCnt(ne,F);if(le!==X){let z=a.generateIndent(le,F,R);W.push({range:new d.Range(K,1,K,ne.length+1),text:z}),Y=z+Y.substr(ne.length)}else{let z=o.LanguageConfigurationRegistry.getIndentMetadata(A,K);if(z===0||z===8)return}}}const ee=K;for(;K<T.endLineNumber;){if(!/\S/.test(A.getLineContent(K+1))){K++;continue}break}if(K!==T.endLineNumber){let se={getLineTokens:le=>A.getLineTokens(le),getLanguageIdentifier:()=>A.getLanguageIdentifier(),getLanguageIdAtPosition:(le,X)=>A.getLanguageIdAtPosition(le,X),getLineContent:le=>le===ee?Y:A.getLineContent(le)},ne=o.LanguageConfigurationRegistry.getGoodIndentForLine(B,se,A.getLanguageIdentifier().id,K+1,x);if(ne!==null){let le=a.getSpaceCnt(ne,F),X=a.getSpaceCnt(M.getLeadingWhitespace(A.getLineContent(K+1)),F);if(le!==X){let z=le-X;for(let P=K+1;P<=T.endLineNumber;P++){let V=A.getLineContent(P),U=M.getLeadingWhitespace(V),$=a.getSpaceCnt(U,F)+z,ie=a.generateIndent($,F,R);ie!==U&&W.push({range:new d.Range(P,1,P,U.length+1),text:ie})}}}}if(W.length>0){this.editor.pushUndoStop();let se=new v(W,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",se),this.editor.pushUndoStop()}}}}}shouldIgnoreLine(T,O){T.forceTokenization(O);let A=T.getLineFirstNonWhitespaceColumn(O);if(A===0)return!0;let B=T.getLineTokens(O);if(B.getCount()>0){let F=B.findTokenIndexAtOffset(A);if(F>=0&&B.getStandardTokenType(F)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}e.AutoIndentOnPaste=y,y.ID="editor.contrib.autoIndentOnPaste";function L(E,T,O,A){if(!(E.getLineCount()===1&&E.getLineMaxColumn(1)===1)){let B="";for(let D=0;D<O;D++)B+=" ";let F=new RegExp(B,"gi");for(let D=1,R=E.getLineCount();D<=R;D++){let W=E.getLineFirstNonWhitespaceColumn(D);if(W===0&&(W=E.getLineMaxColumn(D)),W!==1){const x=new d.Range(D,1,D,W),K=E.getValueInRange(x),Y=A?K.replace(/\t/ig,B):K.replace(F," ");T.addEditOperation(x,Y)}}}}class I{constructor(T,O){this.selection=T,this.tabSize=O,this.selectionId=null}getEditOperations(T,O){this.selectionId=O.trackSelection(this.selection),L(T,O,this.tabSize,!0)}computeCursorState(T,O){return O.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=I;class k{constructor(T,O){this.selection=T,this.tabSize=O,this.selectionId=null}getEditOperations(T,O){this.selectionId=O.trackSelection(this.selection),L(T,O,this.tabSize,!1)}computeCursorState(T,O){return O.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=k,w.registerEditorContribution(y.ID,y),w.registerEditorAction(i),w.registerEditorAction(n),w.registerEditorAction(l),w.registerEditorAction(h),w.registerEditorAction(m),w.registerEditorAction(_),w.registerEditorAction(f)}),define(Q[630],J([0,1,15,12,89,2,13,28,18,19,22,23,11,3,134,73,26,24,20,67]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineHintsController=e.getInlineHints=void 0;const l=500;function h(_,f,v){return Ie(this,void 0,void 0,function*(){const y=[],L=d.InlineHintsProviderRegistry.ordered(_).reverse(),I=g.flatten(L.map(k=>f.map(E=>Promise.resolve(k.provideInlineHints(_,E,v)).then(T=>{T&&y.push({list:T,provider:k})},T=>{N.onUnexpectedExternalError(T)}))));return yield Promise.all(I),y})}e.getInlineHints=h;let m=class{constructor(f,v,y){this._editor=f,this._codeEditorService=v,this._themeService=y,this._disposables=new w.DisposableStore,this._sessionDisposables=new w.DisposableStore,this._getInlineHintsDelays=new a.LanguageFeatureRequestDelays(d.InlineHintsProviderRegistry,250,2500),this._decorationsTypeIds=[],this._decorationIds=[],this._disposables.add(d.InlineHintsProviderRegistry.onDidChange(()=>this._update())),this._disposables.add(y.onDidColorThemeChange(()=>this._update())),this._disposables.add(f.onDidChangeModel(()=>this._update())),this._disposables.add(f.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(f.onDidChangeConfiguration(L=>{L.hasChanged(120)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(120).enabled){this._removeAllDecorations();return}const f=this._editor.getModel();if(!f||!d.InlineHintsProviderRegistry.has(f)){this._removeAllDecorations();return}const v=new b.RunOnceScheduler(()=>Ie(this,void 0,void 0,function*(){const L=Date.now(),I=new c.CancellationTokenSource;this._sessionDisposables.add(w.toDisposable(()=>I.dispose(!0)));const k=this._editor.getVisibleRangesPlusViewportAboveBelow(),E=yield h(f,k,I.token),T=this._getInlineHintsDelays.update(f,Date.now()-L);v.delay=T,this._updateHintsDecorators(E)}),this._getInlineHintsDelays.get(f));this._sessionDisposables.add(v),this._sessionDisposables.add(this._editor.onDidChangeModelContent(()=>v.schedule())),this._disposables.add(this._editor.onDidScrollChange(()=>v.schedule())),v.schedule();const y=new w.DisposableStore;this._sessionDisposables.add(y);for(const L of d.InlineHintsProviderRegistry.all(f))typeof L.onDidChangeInlineHints=="function"&&y.add(L.onDidChangeInlineHints(()=>v.schedule()))}_updateHintsDecorators(f){const{fontSize:v,fontFamily:y}=this._getLayoutInfo(),L=this._themeService.getColorTheme().getColor(p.editorInlineHintBackground),I=this._themeService.getColorTheme().getColor(p.editorInlineHintForeground),k=[],E=[];for(const{list:T}of f)for(let O=0;O<T.length&&E.length<l;O++){const{text:A,range:B,description:F,whitespaceBefore:D,whitespaceAfter:R}=T[O],W=D?v/3|0:0,x=R?v/3|0:0,K={contentText:A,backgroundColor:`${L}`,color:`${I}`,margin:`0px ${x}px 0px ${W}px`,fontSize:`${v}px`,fontFamily:y,padding:`0px ${v/4|0}px`,borderRadius:`${v/4|0}px`},Y="inlineHints-"+M.hash(K).toString(16);this._codeEditorService.registerDecorationType(Y,{before:K},void 0,this._editor),k.push(Y);const ee=this._codeEditorService.resolveDecorationOptions(Y,!0);typeof F=="string"?ee.hoverMessage=new u.MarkdownString().appendText(F):F&&(ee.hoverMessage=F),E.push({range:B,options:ee})}this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType,this._codeEditorService),this._decorationsTypeIds=k,this._decorationIds=this._editor.deltaDecorations(this._decorationIds,E)}_getLayoutInfo(){const f=this._editor.getOption(120),v=this._editor.getOption(40);let y=f.fontSize;(!y||y<5||y>v)&&(y=v*.9|0);const L=f.fontFamily;return{fontSize:y,fontFamily:L}}_removeAllDecorations(){this._decorationIds=this._editor.deltaDecorations(this._decorationIds,[]),this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType,this._codeEditorService),this._decorationsTypeIds=[]}};m.ID="editor.contrib.InlineHints",m=Me([_e(1,C.ICodeEditorService),_e(2,o.IThemeService)],m),e.InlineHintsController=m,S.registerEditorContribution(m.ID,m),r.CommandsRegistry.registerCommand("_executeInlineHintProvider",(_,...f)=>Ie(void 0,void 0,void 0,function*(){const[v,y]=f;n.assertType(i.URI.isUri(v)),n.assertType(s.Range.isIRange(y));const L=yield _.get(t.ITextModelService).createModelReference(v);try{const I=yield h(L.object.textEditorModel,[s.Range.lift(y)],c.CancellationToken.None);return g.flatten(I.map(k=>k.list)).sort((k,E)=>s.Range.compareRangesUsingStarts(k.range,E.range))}finally{L.dispose()}}))}),define(Q[631],J([0,1,493,39,188,13,92,366,182,62,14,3,21,25,410,542,411,34]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnakeCaseAction=e.TitleCaseAction=e.LowerCaseAction=e.UpperCaseAction=e.AbstractCaseAction=e.TransposeAction=e.JoinLinesAction=e.DeleteAllRightAction=e.DeleteAllLeftAction=e.AbstractDeleteAllToBoundaryAction=e.InsertLineAfterAction=e.InsertLineBeforeAction=e.IndentLinesAction=e.DeleteLinesAction=e.TrimTrailingWhitespaceAction=e.SortLinesDescendingAction=e.SortLinesAscendingAction=e.AbstractSortLinesAction=e.DuplicateSelectionAction=void 0;class n extends w.EditorAction{constructor(le,X){super(X);this.down=le}run(le,X){if(!!X.hasModel()){const z=X.getSelections().map((U,H)=>({selection:U,index:H,ignore:!1}));z.sort((U,H)=>c.Range.compareRangesUsingStarts(U.selection,H.selection));let P=z[0];for(let U=1;U<z.length;U++){const H=z[U];P.selection.endLineNumber===H.selection.startLineNumber&&(P.index<H.index?H.ignore=!0:(P.ignore=!0,P=H))}const V=[];for(const U of z)V.push(new a.CopyLinesCommand(U.selection,this.down,U.ignore));X.pushUndoStop(),X.executeCommands(this.id,V),X.pushUndoStop()}}}class t extends n{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:b.localize(0,null),alias:"Copy Line Up",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|1024|16,linux:{primary:2048|512|1024|16},weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"2_line",title:b.localize(1,null),order:1}})}}class l extends n{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:b.localize(2,null),alias:"Copy Line Down",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|1024|18,linux:{primary:2048|512|1024|18},weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"2_line",title:b.localize(3,null),order:2}})}}class h extends w.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:b.localize(4,null),alias:"Duplicate Selection",precondition:s.EditorContextKeys.writable,menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"2_line",title:b.localize(5,null),order:5}})}run(le,X,z){if(!!X.hasModel()){const P=[],V=X.getSelections(),U=X.getModel();for(const H of V)if(H.isEmpty())P.push(new a.CopyLinesCommand(H,!0));else{const $=new o.Selection(H.endLineNumber,H.endColumn,H.endLineNumber,H.endColumn);P.push(new S.ReplaceCommandThatSelectsText($,U.getValueInRange(H)))}X.pushUndoStop(),X.executeCommands(this.id,P),X.pushUndoStop()}}}e.DuplicateSelectionAction=h;class m extends w.EditorAction{constructor(le,X){super(X);this.down=le}run(le,X){let z=[],P=X.getSelections()||[];const V=X.getOption(8);for(const U of P)z.push(new u.MoveLinesCommand(U,this.down,V));X.pushUndoStop(),X.executeCommands(this.id,z),X.pushUndoStop()}}class _ extends m{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:b.localize(6,null),alias:"Move Line Up",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|16,linux:{primary:512|16},weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"2_line",title:b.localize(7,null),order:3}})}}class f extends m{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:b.localize(8,null),alias:"Move Line Down",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|18,linux:{primary:512|18},weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"2_line",title:b.localize(9,null),order:4}})}}class v extends w.EditorAction{constructor(le,X){super(X);this.descending=le}run(le,X){const z=X.getSelections()||[];for(const V of z)if(!r.SortLinesCommand.canRun(X.getModel(),V,this.descending))return;let P=[];for(let V=0,U=z.length;V<U;V++)P[V]=new r.SortLinesCommand(z[V],this.descending);X.pushUndoStop(),X.executeCommands(this.id,P),X.pushUndoStop()}}e.AbstractSortLinesAction=v;class y extends v{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:b.localize(10,null),alias:"Sort Lines Ascending",precondition:s.EditorContextKeys.writable})}}e.SortLinesAscendingAction=y;class L extends v{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:b.localize(11,null),alias:"Sort Lines Descending",precondition:s.EditorContextKeys.writable})}}e.SortLinesDescendingAction=L;class I extends w.EditorAction{constructor(){super({id:I.ID,label:b.localize(12,null),alias:"Trim Trailing Whitespace",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:N.KeyChord(2048|41,2048|54),weight:100}})}run(le,X,z){let P=[];z.reason==="auto-save"&&(P=(X.getSelections()||[]).map(H=>new p.Position(H.positionLineNumber,H.positionColumn)));let V=X.getSelection();if(V!==null){let U=new C.TrimTrailingWhitespaceCommand(V,P);X.pushUndoStop(),X.executeCommands(this.id,[U]),X.pushUndoStop()}}}e.TrimTrailingWhitespaceAction=I,I.ID="editor.action.trimTrailingWhitespace";class k extends w.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:b.localize(13,null),alias:"Delete Line",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2048|1024|41,weight:100}})}run(le,X){if(!!X.hasModel()){let z=this._getLinesToRemove(X),P=X.getModel();if(!(P.getLineCount()===1&&P.getLineMaxColumn(1)===1)){let V=0,U=[],H=[];for(let $=0,ie=z.length;$<ie;$++){const oe=z[$];let ae=oe.startLineNumber,G=oe.endLineNumber,j=1,te=P.getLineMaxColumn(G);G<P.getLineCount()?(G+=1,te=1):ae>1&&(ae-=1,j=P.getLineMaxColumn(ae)),U.push(g.EditOperation.replace(new o.Selection(ae,j,G,te),"")),H.push(new o.Selection(ae-V,oe.positionColumn,ae-V,oe.positionColumn)),V+=oe.endLineNumber-oe.startLineNumber+1}X.pushUndoStop(),X.executeEdits(this.id,U,H),X.pushUndoStop()}}}_getLinesToRemove(le){let X=le.getSelections().map(V=>{let U=V.endLineNumber;return V.startLineNumber<V.endLineNumber&&V.endColumn===1&&(U-=1),{startLineNumber:V.startLineNumber,selectionStartColumn:V.selectionStartColumn,endLineNumber:U,positionColumn:V.positionColumn}});X.sort((V,U)=>V.startLineNumber===U.startLineNumber?V.endLineNumber-U.endLineNumber:V.startLineNumber-U.startLineNumber);let z=[],P=X[0];for(let V=1;V<X.length;V++)P.endLineNumber+1>=X[V].startLineNumber?P.endLineNumber=X[V].endLineNumber:(z.push(P),P=X[V]);return z.push(P),z}}e.DeleteLinesAction=k;class E extends w.EditorAction{constructor(){super({id:"editor.action.indentLines",label:b.localize(14,null),alias:"Indent Line",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|89,weight:100}})}run(le,X){const z=X._getViewModel();!z||(X.pushUndoStop(),X.executeCommands(this.id,d.TypeOperations.indent(z.cursorConfig,X.getModel(),X.getSelections())),X.pushUndoStop())}}e.IndentLinesAction=E;class T extends w.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:b.localize(15,null),alias:"Outdent Line",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|87,weight:100}})}run(le,X){M.CoreEditingCommands.Outdent.runEditorCommand(le,X,null)}}class O extends w.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:b.localize(16,null),alias:"Insert Line Above",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|1024|3,weight:100}})}run(le,X){const z=X._getViewModel();!z||(X.pushUndoStop(),X.executeCommands(this.id,d.TypeOperations.lineInsertBefore(z.cursorConfig,X.getModel(),X.getSelections())))}}e.InsertLineBeforeAction=O;class A extends w.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:b.localize(17,null),alias:"Insert Line Below",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|3,weight:100}})}run(le,X){const z=X._getViewModel();!z||(X.pushUndoStop(),X.executeCommands(this.id,d.TypeOperations.lineInsertAfter(z.cursorConfig,X.getModel(),X.getSelections())))}}e.InsertLineAfterAction=A;class B extends w.EditorAction{run(le,X){if(!!X.hasModel()){const z=X.getSelection();let P=this._getRangesToDelete(X),V=[];for(let $=0,ie=P.length-1;$<ie;$++){let oe=P[$],ae=P[$+1];c.Range.intersectRanges(oe,ae)===null?V.push(oe):P[$+1]=c.Range.plusRange(oe,ae)}V.push(P[P.length-1]);let U=this._getEndCursorState(z,V),H=V.map($=>g.EditOperation.replace($,""));X.pushUndoStop(),X.executeEdits(this.id,H,U),X.pushUndoStop()}}}e.AbstractDeleteAllToBoundaryAction=B;class F extends B{constructor(){super({id:"deleteAllLeft",label:b.localize(18,null),alias:"Delete All Left",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2048|1},weight:100}})}_getEndCursorState(le,X){let z=null,P=[],V=0;return X.forEach(U=>{let H;if(U.endColumn===1&&V>0){let $=U.startLineNumber-V;H=new o.Selection($,U.startColumn,$,U.startColumn)}else H=new o.Selection(U.startLineNumber,U.startColumn,U.startLineNumber,U.startColumn);V+=U.endLineNumber-U.startLineNumber,U.intersectRanges(le)?z=H:P.push(H)}),z&&P.unshift(z),P}_getRangesToDelete(le){let X=le.getSelections();if(X===null)return[];let z=X,P=le.getModel();return P===null?[]:(z.sort(c.Range.compareRangesUsingStarts),z=z.map(V=>{if(V.isEmpty())if(V.startColumn===1){let U=Math.max(1,V.startLineNumber-1),H=V.startLineNumber===1?1:P.getLineContent(U).length+1;return new c.Range(U,H,V.startLineNumber,1)}else return new c.Range(V.startLineNumber,1,V.startLineNumber,V.startColumn);else return new c.Range(V.startLineNumber,1,V.endLineNumber,V.endColumn)}),z)}}e.DeleteAllLeftAction=F;class D extends B{constructor(){super({id:"deleteAllRight",label:b.localize(19,null),alias:"Delete All Right",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|41,secondary:[2048|20]},weight:100}})}_getEndCursorState(le,X){let z=null,P=[];for(let V=0,U=X.length,H=0;V<U;V++){let $=X[V],ie=new o.Selection($.startLineNumber-H,$.startColumn,$.startLineNumber-H,$.startColumn);$.intersectRanges(le)?z=ie:P.push(ie)}return z&&P.unshift(z),P}_getRangesToDelete(le){let X=le.getModel();if(X===null)return[];let z=le.getSelections();if(z===null)return[];let P=z.map(V=>{if(V.isEmpty()){const U=X.getLineMaxColumn(V.startLineNumber);return V.startColumn===U?new c.Range(V.startLineNumber,V.startColumn,V.startLineNumber+1,1):new c.Range(V.startLineNumber,V.startColumn,V.startLineNumber,U)}return V});return P.sort(c.Range.compareRangesUsingStarts),P}}e.DeleteAllRightAction=D;class R extends w.EditorAction{constructor(){super({id:"editor.action.joinLines",label:b.localize(20,null),alias:"Join Lines",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:256|40},weight:100}})}run(le,X){let z=X.getSelections();if(z!==null){let P=X.getSelection();if(P!==null){z.sort(c.Range.compareRangesUsingStarts);let V=[],U=z.reduce((G,j)=>G.isEmpty()?G.endLineNumber===j.startLineNumber?(P.equalsSelection(G)&&(P=j),j):j.startLineNumber>G.endLineNumber+1?(V.push(G),j):new o.Selection(G.startLineNumber,G.startColumn,j.endLineNumber,j.endColumn):j.startLineNumber>G.endLineNumber?(V.push(G),j):new o.Selection(G.startLineNumber,G.startColumn,j.endLineNumber,j.endColumn));V.push(U);let H=X.getModel();if(H!==null){let $=[],ie=[],oe=P,ae=0;for(let G=0,j=V.length;G<j;G++){let te=V[G],Z=te.startLineNumber,ue=1,he=0,re,ce,me=H.getLineContent(te.endLineNumber).length-te.endColumn;if(te.isEmpty()||te.startLineNumber===te.endLineNumber){let Le=te.getStartPosition();Le.lineNumber<H.getLineCount()?(re=Z+1,ce=H.getLineMaxColumn(re)):(re=Le.lineNumber,ce=H.getLineMaxColumn(Le.lineNumber))}else re=te.endLineNumber,ce=H.getLineMaxColumn(re);let Ce=H.getLineContent(Z);for(let Le=Z+1;Le<=re;Le++){let De=H.getLineContent(Le),Re=H.getLineFirstNonWhitespaceColumn(Le);if(Re>=1){let Ee=!0;Ce===""&&(Ee=!1),Ee&&(Ce.charAt(Ce.length-1)===" "||Ce.charAt(Ce.length-1)===" ")&&(Ee=!1,Ce=Ce.replace(/[\s\uFEFF\xA0]+$/g," "));let Ae=De.substr(Re-1);Ce+=(Ee?" ":"")+Ae,Ee?he=Ae.length+1:he=Ae.length}else he=0}let be=new c.Range(Z,ue,re,ce);if(!be.isEmpty()){let Le;te.isEmpty()?($.push(g.EditOperation.replace(be,Ce)),Le=new o.Selection(be.startLineNumber-ae,Ce.length-he+1,Z-ae,Ce.length-he+1)):te.startLineNumber===te.endLineNumber?($.push(g.EditOperation.replace(be,Ce)),Le=new o.Selection(te.startLineNumber-ae,te.startColumn,te.endLineNumber-ae,te.endColumn)):($.push(g.EditOperation.replace(be,Ce)),Le=new o.Selection(te.startLineNumber-ae,te.startColumn,te.startLineNumber-ae,Ce.length-me)),c.Range.intersectRanges(be,P)!==null?oe=Le:ie.push(Le)}ae+=be.endLineNumber-be.startLineNumber}ie.unshift(oe),X.pushUndoStop(),X.executeEdits(this.id,$,ie),X.pushUndoStop()}}}}}e.JoinLinesAction=R;class W extends w.EditorAction{constructor(){super({id:"editor.action.transpose",label:b.localize(21,null),alias:"Transpose characters around the cursor",precondition:s.EditorContextKeys.writable})}run(le,X){let z=X.getSelections();if(z!==null){let P=X.getModel();if(P!==null){let V=[];for(let U=0,H=z.length;U<H;U++){let $=z[U];if(!!$.isEmpty()){let ie=$.getStartPosition(),oe=P.getLineMaxColumn(ie.lineNumber);if(ie.column>=oe){if(ie.lineNumber===P.getLineCount())continue;let ae=new c.Range(ie.lineNumber,Math.max(1,ie.column-1),ie.lineNumber+1,1),G=P.getValueInRange(ae).split("").reverse().join("");V.push(new S.ReplaceCommand(new o.Selection(ie.lineNumber,Math.max(1,ie.column-1),ie.lineNumber+1,1),G))}else{let ae=new c.Range(ie.lineNumber,Math.max(1,ie.column-1),ie.lineNumber,ie.column+1),G=P.getValueInRange(ae).split("").reverse().join("");V.push(new S.ReplaceCommandThatPreservesSelection(ae,G,new o.Selection(ie.lineNumber,ie.column+1,ie.lineNumber,ie.column+1)))}}}X.pushUndoStop(),X.executeCommands(this.id,V),X.pushUndoStop()}}}}e.TransposeAction=W;class x extends w.EditorAction{run(le,X){const z=X.getSelections();if(z!==null){const P=X.getModel();if(P!==null){const V=X.getOption(110),U=[];for(const H of z)if(H.isEmpty()){const $=H.getStartPosition(),ie=X.getConfiguredWordAtPosition($);if(!ie)continue;const oe=new c.Range($.lineNumber,ie.startColumn,$.lineNumber,ie.endColumn),ae=P.getValueInRange(oe);U.push(g.EditOperation.replace(oe,this._modifyText(ae,V)))}else{const $=P.getValueInRange(H);U.push(g.EditOperation.replace(H,this._modifyText($,V)))}X.pushUndoStop(),X.executeEdits(this.id,U),X.pushUndoStop()}}}}e.AbstractCaseAction=x;class K extends x{constructor(){super({id:"editor.action.transformToUppercase",label:b.localize(22,null),alias:"Transform to Uppercase",precondition:s.EditorContextKeys.writable})}_modifyText(le,X){return le.toLocaleUpperCase()}}e.UpperCaseAction=K;class Y extends x{constructor(){super({id:"editor.action.transformToLowercase",label:b.localize(23,null),alias:"Transform to Lowercase",precondition:s.EditorContextKeys.writable})}_modifyText(le,X){return le.toLocaleLowerCase()}}e.LowerCaseAction=Y;class ee extends x{constructor(){super({id:"editor.action.transformToTitlecase",label:b.localize(24,null),alias:"Transform to Title Case",precondition:s.EditorContextKeys.writable})}_modifyText(le,X){const P=(`\r
`+X).split("");let V="",U=!0;for(let H=0;H<le.length;H++){let $=le[H];P.indexOf($)>=0?(U=!0,V+=$):U?(U=!1,V+=$.toLocaleUpperCase()):V+=$.toLocaleLowerCase()}return V}}e.TitleCaseAction=ee;class se extends x{constructor(){super({id:"editor.action.transformToSnakecase",label:b.localize(25,null),alias:"Transform to Snake Case",precondition:s.EditorContextKeys.writable})}_modifyText(le,X){return le.replace(/(\p{Ll})(\p{Lu})/gmu,"$1_$2").replace(/([^\b_])(\p{Lu})(\p{Ll})/gmu,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=se,w.registerEditorAction(t),w.registerEditorAction(l),w.registerEditorAction(h),w.registerEditorAction(_),w.registerEditorAction(f),w.registerEditorAction(y),w.registerEditorAction(L),w.registerEditorAction(I),w.registerEditorAction(k),w.registerEditorAction(E),w.registerEditorAction(T),w.registerEditorAction(O),w.registerEditorAction(A),w.registerEditorAction(F),w.registerEditorAction(D),w.registerEditorAction(R),w.registerEditorAction(W),w.registerEditorAction(K),w.registerEditorAction(Y),w.registerEditorAction(ee),w.registerEditorAction(se)}),define(Q[632],J([0,1,494,13,19,2,14,23,3,18,15,31,16,25,24,28,12,8,22,11,29,41]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorLinkedEditingBackground=e.LinkedEditingAction=e.LinkedEditingContribution=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=new o.RawContextKey("LinkedEditingInputVisible",!1);const m="linked-editing-decoration";let _=class vt extends w.Disposable{constructor(I,k){super();this._debounceDuration=200,this._localToDispose=this._register(new w.DisposableStore),this._editor=I,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(k),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new w.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize())),this._register(this._editor.onDidChangeConfiguration(E=>{(E.hasChanged(56)||E.hasChanged(76))&&this.reinitialize()})),this._register(g.LinkedEditingRangeProviderRegistry.onDidChange(()=>this.reinitialize())),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize())),this.reinitialize()}static get(I){return I.getContribution(vt.ID)}reinitialize(){const I=this._editor.getModel(),k=I!==null&&(this._editor.getOption(56)||this._editor.getOption(76))&&g.LinkedEditingRangeProviderRegistry.has(I);if(k!==this._enabled&&(this._enabled=k,this.clearRanges(),this._localToDispose.clear(),!(!k||I===null))){this._languageWordPattern=h.LanguageConfigurationRegistry.getWordDefinition(I.getLanguageIdentifier().id),this._localToDispose.add(I.onDidChangeLanguageConfiguration(()=>{this._languageWordPattern=h.LanguageConfigurationRegistry.getWordDefinition(I.getLanguageIdentifier().id)}));const E=new p.Delayer(this._debounceDuration),T=()=>{this._rangeUpdateTriggerPromise=E.trigger(()=>this.updateRanges(),this._debounceDuration)},O=new p.Delayer(0),A=B=>{this._rangeSyncTriggerPromise=O.trigger(()=>this._syncRanges(B))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{T()})),this._localToDispose.add(this._editor.onDidChangeModelContent(B=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const F=I.getDecorationRange(this._currentDecorations[0]);if(F&&B.changes.every(D=>F.intersectRanges(D.range))){A(this._currentDecorations);return}}T()})),this._localToDispose.add({dispose:()=>{E.cancel(),O.cancel()}}),this.updateRanges()}}_syncRanges(I){if(!(!this._editor.hasModel()||I!==this._currentDecorations||I.length===0)){const k=this._editor.getModel(),E=k.getDecorationRange(I[0]);if(!E||E.startLineNumber!==E.endLineNumber)return this.clearRanges();const T=k.getValueInRange(E);if(this._currentWordPattern){const A=T.match(this._currentWordPattern);if((A?A[0].length:0)!==T.length)return this.clearRanges()}let O=[];for(let A=1,B=I.length;A<B;A++){const F=k.getDecorationRange(I[A]);if(!!F)if(F.startLineNumber!==F.endLineNumber)O.push({range:F,text:T});else{let D=k.getValueInRange(F),R=T,W=F.startColumn,x=F.endColumn;const K=i.commonPrefixLength(D,R);W+=K,D=D.substr(K),R=R.substr(K);const Y=i.commonSuffixLength(D,R);x-=Y,D=D.substr(0,D.length-Y),R=R.substr(0,R.length-Y),(W!==x||R.length!==0)&&O.push({range:new d.Range(F.startLineNumber,W,F.endLineNumber,x),text:R})}}if(O.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const A=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",O),this._editor._getViewModel().setPrevEditOperationType(A)}finally{this._ignoreChangeEvent=!1}}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(I=!1){return Ie(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const k=this._editor.getPosition();if(!this._enabled&&!I||this._editor.getSelections().length>1){this.clearRanges();return}const E=this._editor.getModel(),T=E.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===T){if(k.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const A=E.getDecorationRange(this._currentDecorations[0]);if(A&&A.containsPosition(k))return}}this._currentRequestPosition=k,this._currentRequestModelVersion=T;const O=p.createCancelablePromise(A=>Ie(this,void 0,void 0,function*(){try{const B=yield y(E,k,A);if(O!==this._currentRequest||(this._currentRequest=null,T!==E.getVersionId()))return;let F=[];(B==null?void 0:B.ranges)&&(F=B.ranges),this._currentWordPattern=(B==null?void 0:B.wordPattern)||this._languageWordPattern;let D=!1;for(let W=0,x=F.length;W<x;W++)if(d.Range.containsPosition(F[W],k)){if(D=!0,W!==0){const K=F[W];F.splice(W,1),F.unshift(K)}break}if(!D){this.clearRanges();return}const R=F.map(W=>({range:W,options:vt.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,R)}catch(B){r.isPromiseCanceledError(B)||r.onUnexpectedError(B),(this._currentRequest===O||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=O,O})}};_.ID="editor.contrib.linkedEditing",_.DECORATION=c.ModelDecorationOptions.register({stickiness:0,className:m}),_=Me([_e(1,o.IContextKeyService)],_),e.LinkedEditingContribution=_;class f extends N.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:b.localize(0,null),alias:"Start Linked Editing",precondition:o.ContextKeyExpr.and(s.EditorContextKeys.writable,s.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|1024|60,weight:100}})}runCommand(I,k){const E=I.get(u.ICodeEditorService),[T,O]=Array.isArray(k)&&k||[void 0,void 0];return a.URI.isUri(T)&&S.Position.isIPosition(O)?E.openCodeEditor({resource:T},E.getActiveCodeEditor()).then(A=>{!A||(A.setPosition(O),A.invokeWithinContext(B=>(this.reportTelemetry(B,A),this.run(B,A))))},r.onUnexpectedError):super.runCommand(I,k)}run(I,k){const E=_.get(k);return E?Promise.resolve(E.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=f;const v=N.EditorCommand.bindToContribution(_.get);N.registerEditorCommand(new v({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:L=>L.clearRanges(),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1024|9]}}));function y(L,I,k){const E=g.LinkedEditingRangeProviderRegistry.ordered(L);return p.first(E.map(T=>()=>Ie(this,void 0,void 0,function*(){try{return yield T.provideLinkedEditingRanges(L,I,k)}catch(O){r.onUnexpectedExternalError(O);return}})),T=>!!T&&M.isNonEmptyArray(T==null?void 0:T.ranges))}e.editorLinkedEditingBackground=n.registerColor("editor.linkedEditingBackground",{dark:l.Color.fromHex("#f00").transparent(.3),light:l.Color.fromHex("#f00").transparent(.3),hc:l.Color.fromHex("#f00").transparent(.3)},b.localize(1,null)),t.registerThemingParticipant((L,I)=>{const k=L.getColor(e.editorLinkedEditingBackground);k&&I.addRule(`.monaco-editor .${m} { background: ${k}; border-left-color: ${k}; }`)}),N.registerModelAndPositionCommand("_executeLinkedEditingProvider",(L,I)=>y(L,I,C.CancellationToken.None)),N.registerEditorContribution(_.ID,_),N.registerEditorAction(f)}),define(Q[633],J([0,1,495,15,23,12,73,2,17,13,31,18,227,546,32,58,22,11,24,43,44,346]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;function h(y,L){const I=y.url&&/^command:/i.test(y.url.toString()),k=y.tooltip?y.tooltip:I?b.localize(0,null):b.localize(1,null),E=L?d.isMacintosh?b.localize(2,null):b.localize(3,null):d.isMacintosh?b.localize(4,null):b.localize(5,null);if(y.url){let T="";if(/^command:/i.test(y.url.toString())){const A=y.url.toString().match(/^command:([^?#]+)/);if(A){const B=A[1];T=` "${b.localize(6,null,B)}"`}}return new S.MarkdownString("",!0).appendMarkdown(`[${k}](${y.url.toString(!0)}${T}) (${E})`)}else return new S.MarkdownString().appendText(`${k} (${E})`)}const m={general:p.ModelDecorationOptions.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:p.ModelDecorationOptions.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class _{constructor(L,I){this.link=L,this.decorationId=I}static decoration(L,I){return{range:L.range,options:_._getOptions(L,I,!1)}}static _getOptions(L,I,k){const E=Object.assign({},k?m.active:m.general);return E.hoverMessage=h(L,I),E}activate(L,I){L.changeDecorationOptions(this.decorationId,_._getOptions(this.link,I,!0))}deactivate(L,I){L.changeDecorationOptions(this.decorationId,_._getOptions(this.link,I,!1))}}let f=class bt{constructor(L,I,k){this.listenersToRemove=new C.DisposableStore,this.editor=L,this.openerService=I,this.notificationService=k;let E=new o.ClickLinkGesture(L);this.listenersToRemove.add(E),this.listenersToRemove.add(E.onMouseMoveOrRelevantKeyDown(([T,O])=>{this._onEditorMouseMove(T,O)})),this.listenersToRemove.add(E.onExecute(T=>{this.onEditorMouseUp(T)})),this.listenersToRemove.add(E.onCancel(T=>{this.cleanUpActiveLinkDecoration()})),this.enabled=L.getOption(57),this.listenersToRemove.add(L.onDidChangeConfiguration(T=>{const O=L.getOption(57);this.enabled!==O&&(this.enabled=O,this.updateDecorations([]),this.stop(),this.beginCompute())})),this.listenersToRemove.add(L.onDidChangeModelContent(T=>this.onChange())),this.listenersToRemove.add(L.onDidChangeModel(T=>this.onModelChanged())),this.listenersToRemove.add(L.onDidChangeModelLanguage(T=>this.onModelModeChanged())),this.listenersToRemove.add(c.LinkProviderRegistry.onDidChange(T=>this.onModelModeChanged())),this.timeout=new N.TimeoutTimer,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(L){return L.getContribution(bt.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet(()=>this.beginCompute(),bt.RECOMPUTE_TIME)}beginCompute(){return Ie(this,void 0,void 0,function*(){if(!(!this.editor.hasModel()||!this.enabled)){const L=this.editor.getModel();if(!!c.LinkProviderRegistry.has(L)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=N.createCancelablePromise(I=>s.getLinks(L,I));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(I){w.onUnexpectedError(I)}finally{this.computePromise=null}}}})}updateDecorations(L){const I=this.editor.getOption(64)==="altKey";let k=[],E=Object.keys(this.currentOccurrences);for(let A=0,B=E.length;A<B;A++){let F=E[A],D=this.currentOccurrences[F];k.push(D.decorationId)}let T=[];if(L)for(const A of L)T.push(_.decoration(A,I));let O=this.editor.deltaDecorations(k,T);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let A=0,B=O.length;A<B;A++){let F=new _(L[A],O[A]);this.currentOccurrences[F.decorationId]=F}}_onEditorMouseMove(L,I){const k=this.editor.getOption(64)==="altKey";if(this.isEnabled(L,I)){this.cleanUpActiveLinkDecoration();const E=this.getLinkOccurrence(L.target.position);E&&this.editor.changeDecorations(T=>{E.activate(T,k),this.activeLinkDecorationId=E.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const L=this.editor.getOption(64)==="altKey";if(this.activeLinkDecorationId){const I=this.currentOccurrences[this.activeLinkDecorationId];I&&this.editor.changeDecorations(k=>{I.deactivate(k,L)}),this.activeLinkDecorationId=null}}onEditorMouseUp(L){if(!!this.isEnabled(L)){const I=this.getLinkOccurrence(L.target.position);!I||this.openLinkOccurrence(I,L.hasSideBySideModifier,!0)}}openLinkOccurrence(L,I,k=!1){if(!!this.openerService){const{link:E}=L;E.resolve(M.CancellationToken.None).then(T=>{if(typeof T=="string"&&this.editor.hasModel()){const O=this.editor.getModel().uri;if(O.scheme===t.Schemas.file&&T.startsWith(`${t.Schemas.file}:`)){const A=n.URI.parse(T);if(A.scheme===t.Schemas.file){const B=l.originalFSPath(A);let F=null;B.startsWith("/./")?F=`.${B.substr(1)}`:B.startsWith("//./")&&(F=`.${B.substr(2)}`),F&&(T=l.joinPath(O,F))}}}return this.openerService.open(T,{openToSide:I,fromUserGesture:k,allowContributedOpeners:!0})},T=>{const O=T instanceof Error?T.message:T;O==="invalid"?this.notificationService.warn(b.localize(7,null,E.url.toString())):O==="missing"?this.notificationService.warn(b.localize(8,null)):w.onUnexpectedError(T)})}}getLinkOccurrence(L){if(!this.editor.hasModel()||!L)return null;const I=this.editor.getModel().getDecorationsInRange({startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:L.lineNumber,endColumn:L.column},0,!0);for(const k of I){const E=this.currentOccurrences[k.id];if(E)return E}return null}isEnabled(L,I){return Boolean(L.target.type===6&&(L.hasTriggerModifier||I&&I.keyCodeIsTriggerKey))}stop(){var L;this.timeout.cancel(),this.activeLinksList&&((L=this.activeLinksList)===null||L===void 0||L.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};f.ID="editor.linkDetector",f.RECOMPUTE_TIME=1e3,f=Me([_e(1,u.IOpenerService),_e(2,a.INotificationService)],f),e.LinkDetector=f;class v extends g.EditorAction{constructor(){super({id:"editor.action.openLink",label:b.localize(9,null),alias:"Open Link",precondition:void 0})}run(L,I){let k=f.get(I);if(!!k&&!!I.hasModel()){let E=I.getSelections();for(let T of E){let O=k.getLinkOccurrence(T.getEndPosition());O&&k.openLinkOccurrence(O,!1)}}}}g.registerEditorContribution(f.ID,f),g.registerEditorAction(v),i.registerThemingParticipant((y,L)=>{const I=y.getColor(r.editorActiveLinkForeground);I&&L.addRule(`.monaco-editor .detected-link-active { color: ${I} !important; }`)})}),define(Q[146],J([0,1,496,15,2,47,3,13,16,11,22,97,347]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let o=class St{constructor(r,i){this._messageWidget=new M.MutableDisposable,this._messageListeners=new M.DisposableStore,this._editor=r,this._visible=St.MESSAGE_VISIBLE.bindTo(i),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(r){return r.getContribution(St.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(r,i){w.alert(r),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new a(this._editor,i,r),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new N.TimeoutTimer(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(t=>{!t.target.position||(n?n.containsPosition(t.target.position)||this.closeMessage():n=new S.Range(i.lineNumber-3,1,t.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(a.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(b.localize(1,null),this._editor.getPosition())}};o.ID="editor.contrib.messageController",o.MESSAGE_VISIBLE=new d.RawContextKey("messageVisible",!1,b.localize(0,null)),o=Me([_e(1,d.IContextKeyService)],o),e.MessageController=o;const s=C.EditorCommand.bindToContribution(o.get);C.registerEditorCommand(new s({id:"leaveEditorMessage",precondition:o.MESSAGE_VISIBLE,handler:u=>u.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class a{constructor(r,{lineNumber:i,column:n},t){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=r,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:n-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const l=document.createElement("div");l.classList.add("anchor","top"),this._domNode.appendChild(l);const h=document.createElement("div");h.classList.add("message"),h.textContent=t,this._domNode.appendChild(h);const m=document.createElement("div");m.classList.add("anchor","below"),this._domNode.appendChild(m),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(r){let i;const n=()=>{r.dispose(),clearTimeout(i),r.getDomNode().removeEventListener("animationend",n)};return i=setTimeout(n,110),r.getDomNode().addEventListener("animationend",n),r.getDomNode().classList.add("fadeOut"),{dispose:n}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(r){this._domNode.classList.toggle("below",r===2)}}C.registerEditorContribution(o.ID,o),g.registerThemingParticipant((u,r)=>{const i=u.getColor(p.inputValidationInfoBorder);if(i){let l=u.type===c.ColorScheme.HIGH_CONTRAST?2:1;r.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${i}; }`),r.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${i}; }`),r.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${l}px solid ${i}; }`)}const n=u.getColor(p.inputValidationInfoBackground);n&&r.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${n}; }`);const t=u.getColor(p.inputValidationInfoForeground);t&&r.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${t}; }`)})});var _t=this&&this.__classPrivateFieldSet||function(q,e,b){if(!e.has(q))throw new TypeError("attempted to set private field on non-instance");return e.set(q,b),b},tt=this&&this.__classPrivateFieldGet||function(q,e){if(!e.has(q))throw new TypeError("attempted to get private field on non-instance");return e.get(q)};define(Q[634],J([0,1,12,150,2,146,9,616,595]),function(q,e,b,N,M,w,S,C,d){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionUi=void 0;let p=class extends M.Disposable{constructor(o,s,a,u,r){super();this._editor=o,this.delegate=u,this._activeCodeActions=this._register(new M.MutableDisposable),g.set(this,!1),this._codeActionWidget=new N.Lazy(()=>this._register(r.createInstance(C.CodeActionMenu,this._editor,{onSelectCodeAction:i=>Ie(this,void 0,void 0,function*(){this.delegate.applyCodeAction(i,!0)})}))),this._lightBulbWidget=new N.Lazy(()=>{const i=this._register(r.createInstance(d.LightBulbWidget,this._editor,s,a));return this._register(i.onClick(n=>this.showCodeActionList(n.trigger,n.actions,n,{includeDisabledActions:!1}))),i})}dispose(){_t(this,g,!0),super.dispose()}update(o){var s,a,u;return Ie(this,void 0,void 0,function*(){if(o.type!==1){(s=this._lightBulbWidget.rawValue)===null||s===void 0||s.hide();return}let r;try{r=yield o.actions}catch(i){b.onUnexpectedError(i);return}if(!tt(this,g))if(this._lightBulbWidget.getValue().update(r,o.trigger,o.position),o.trigger.type===2){if((a=o.trigger.filter)===null||a===void 0?void 0:a.include){const n=this.tryGetValidActionToApply(o.trigger,r);if(n){try{yield this.delegate.applyCodeAction(n,!1)}finally{r.dispose()}return}if(o.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(o.trigger,r);if(t&&t.action.disabled){w.MessageController.get(this._editor).showMessage(t.action.disabled,o.trigger.context.position),r.dispose();return}}}const i=!!((u=o.trigger.filter)===null||u===void 0?void 0:u.include);if(o.trigger.context&&(!r.allActions.length||!i&&!r.validActions.length)){w.MessageController.get(this._editor).showMessage(o.trigger.context.notAvailableMessage,o.trigger.context.position),this._activeCodeActions.value=r,r.dispose();return}this._activeCodeActions.value=r,this._codeActionWidget.getValue().show(o.trigger,r,o.position,{includeDisabledActions:i})}else this._codeActionWidget.getValue().isVisible?r.dispose():this._activeCodeActions.value=r})}getInvalidActionThatWouldHaveBeenApplied(o,s){if(!!s.allActions.length&&(o.autoApply==="first"&&s.validActions.length===0||o.autoApply==="ifSingle"&&s.allActions.length===1))return s.allActions.find(({action:a})=>a.disabled)}tryGetValidActionToApply(o,s){if(!!s.validActions.length&&(o.autoApply==="first"&&s.validActions.length>0||o.autoApply==="ifSingle"&&s.validActions.length===1))return s.validActions[0]}showCodeActionList(o,s,a,u){return Ie(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(o,s,a,u)})}};g=new WeakMap,p=Me([_e(4,S.IInstantiationService)],p),e.CodeActionUi=p}),define(Q[263],J([0,1,23,150,2,8,13,133,25,145,634,146,466,26,16,9,85,32,59,87,617,130]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=e.applyCodeAction=e.QuickFixController=void 0;function m(F){return a.ContextKeyExpr.regex(l.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+w.escapeRegExpCharacters(F.value)+"\\b"))}const _={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:o.localize(0,null)},apply:{type:"string",description:o.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[o.localize(2,null),o.localize(3,null),o.localize(4,null)]},preferred:{type:"boolean",default:!1,description:o.localize(5,null)}}};let f=class xt extends M.Disposable{constructor(D,R,W,x,K){super();this._instantiationService=K,this._editor=D,this._model=this._register(new l.CodeActionModel(this._editor,R,W,x)),this._register(this._model.onDidChangeState(Y=>this.update(Y))),this._ui=new N.Lazy(()=>this._register(new p.CodeActionUi(D,I.Id,B.Id,{applyCodeAction:(Y,ee)=>Ie(this,void 0,void 0,function*(){try{yield this._applyCodeAction(Y)}finally{ee&&this._trigger({type:1,filter:{}})}})},this._instantiationService)))}static get(D){return D.getContribution(xt.ID)}update(D){this._ui.getValue().update(D)}showCodeActions(D,R,W){return this._ui.getValue().showCodeActionList(D,R,W,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(D,R,W){if(!!this._editor.hasModel()){c.MessageController.get(this._editor).closeMessage();const x=this._editor.getPosition();this._trigger({type:2,filter:R,autoApply:W,context:{notAvailableMessage:D,position:x}})}}_trigger(D){return this._model.trigger(D)}_applyCodeAction(D){return this._instantiationService.invokeFunction(v,D,this._editor)}};f.ID="editor.contrib.quickFixController",f=Me([_e(1,r.IMarkerService),_e(2,a.IContextKeyService),_e(3,n.IEditorProgressService),_e(4,u.IInstantiationService)],f),e.QuickFixController=f;function v(F,D,R){return Ie(this,void 0,void 0,function*(){const W=F.get(C.IBulkEditService),x=F.get(s.ICommandService),K=F.get(t.ITelemetryService),Y=F.get(i.INotificationService);if(K.publicLog2("codeAction.applyCodeAction",{codeActionTitle:D.action.title,codeActionKind:D.action.kind,codeActionIsPreferred:!!D.action.isPreferred}),yield D.resolve(b.CancellationToken.None),D.action.edit&&(yield W.apply(C.ResourceEdit.convert(D.action.edit),{editor:R,label:D.action.title})),D.action.command)try{yield x.executeCommand(D.action.command.id,...D.action.command.arguments||[])}catch(ee){const se=y(ee);Y.error(typeof se=="string"?se:o.localize(6,null))}})}e.applyCodeAction=v;function y(F){return typeof F=="string"?F:F instanceof Error&&typeof F.message=="string"?F.message:void 0}function L(F,D,R,W){if(F.hasModel()){const x=f.get(F);x&&x.manualTriggerAtCurrentPosition(D,R,W)}}class I extends S.EditorAction{constructor(){super({id:I.Id,label:o.localize(7,null),alias:"Quick Fix...",precondition:a.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:2048|84,weight:100}})}run(D,R){return L(R,o.localize(8,null),void 0,void 0)}}e.QuickFixAction=I,I.Id="editor.action.quickFix";class k extends S.EditorCommand{constructor(){super({id:g.codeActionCommandId,precondition:a.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:_}]}})}runEditorCommand(D,R,W){const x=h.CodeActionCommandArgs.fromUser(W,{kind:h.CodeActionKind.Empty,apply:"ifSingle"});return L(R,typeof(W==null?void 0:W.kind)=="string"?x.preferred?o.localize(9,null,W.kind):o.localize(10,null,W.kind):x.preferred?o.localize(11,null):o.localize(12,null),{include:x.kind,includeSourceActions:!0,onlyIncludePreferredActions:x.preferred},x.apply)}}e.CodeActionCommand=k;class E extends S.EditorAction{constructor(){super({id:g.refactorCommandId,label:o.localize(13,null),alias:"Refactor...",precondition:a.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:2048|1024|48,mac:{primary:256|1024|48},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:a.ContextKeyExpr.and(d.EditorContextKeys.writable,m(h.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:_}]}})}run(D,R,W){const x=h.CodeActionCommandArgs.fromUser(W,{kind:h.CodeActionKind.Refactor,apply:"never"});return L(R,typeof(W==null?void 0:W.kind)=="string"?x.preferred?o.localize(14,null,W.kind):o.localize(15,null,W.kind):x.preferred?o.localize(16,null):o.localize(17,null),{include:h.CodeActionKind.Refactor.contains(x.kind)?x.kind:h.CodeActionKind.None,onlyIncludePreferredActions:x.preferred},x.apply)}}e.RefactorAction=E;class T extends S.EditorAction{constructor(){super({id:g.sourceActionCommandId,label:o.localize(18,null),alias:"Source Action...",precondition:a.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:a.ContextKeyExpr.and(d.EditorContextKeys.writable,m(h.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:_}]}})}run(D,R,W){const x=h.CodeActionCommandArgs.fromUser(W,{kind:h.CodeActionKind.Source,apply:"never"});return L(R,typeof(W==null?void 0:W.kind)=="string"?x.preferred?o.localize(19,null,W.kind):o.localize(20,null,W.kind):x.preferred?o.localize(21,null):o.localize(22,null),{include:h.CodeActionKind.Source.contains(x.kind)?x.kind:h.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:x.preferred},x.apply)}}e.SourceAction=T;class O extends S.EditorAction{constructor(){super({id:g.organizeImportsCommandId,label:o.localize(23,null),alias:"Organize Imports",precondition:a.ContextKeyExpr.and(d.EditorContextKeys.writable,m(h.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:1024|512|45,weight:100}})}run(D,R){return L(R,o.localize(24,null),{include:h.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}e.OrganizeImportsAction=O;class A extends S.EditorAction{constructor(){super({id:g.fixAllCommandId,label:o.localize(25,null),alias:"Fix All",precondition:a.ContextKeyExpr.and(d.EditorContextKeys.writable,m(h.CodeActionKind.SourceFixAll))})}run(D,R){return L(R,o.localize(26,null),{include:h.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle")}}e.FixAllAction=A;class B extends S.EditorAction{constructor(){super({id:B.Id,label:o.localize(27,null),alias:"Auto Fix...",precondition:a.ContextKeyExpr.and(d.EditorContextKeys.writable,m(h.CodeActionKind.QuickFix)),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:512|1024|84,mac:{primary:2048|512|84},weight:100}})}run(D,R){return L(R,o.localize(28,null),{include:h.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}e.AutoFixAction=B,B.Id="editor.action.autoFix"}),define(Q[635],J([0,1,13,263]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.registerEditorContribution(N.QuickFixController.ID,N.QuickFixController),b.registerEditorAction(N.QuickFixAction),b.registerEditorAction(N.RefactorAction),b.registerEditorAction(N.SourceAction),b.registerEditorAction(N.OrganizeImportsAction),b.registerEditorAction(N.AutoFixAction),b.registerEditorAction(N.FixAllAction),b.registerEditorCommand(new N.CodeActionCommand)}),define(Q[636],J([0,1,503,12,16,59,13,25,604,18,14,47,3,146,70,32,133,24,28,23,2,15,77,9,33,95,137,20]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class I{constructor(B,F){this.model=B,this.position=F,this._providerRenameIdx=0,this._providers=g.RenameProviderRegistry.ordered(B)}hasProvider(){return this._providers.length>0}resolveRenameLocation(B){return Ie(this,void 0,void 0,function*(){const F=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const R=this._providers[this._providerRenameIdx];if(!R.resolveRenameLocation)break;let W=yield R.resolveRenameLocation(this.model,this.position,B);if(!!W){if(W.rejectReason){F.push(W.rejectReason);continue}return W}}const D=this.model.getWordAtPosition(this.position);return D?{range:new o.Range(this.position.lineNumber,D.startColumn,this.position.lineNumber,D.endColumn),text:D.word,rejectReason:F.length>0?F.join(`
`):void 0}:{range:o.Range.fromPositions(this.position),text:"",rejectReason:F.length>0?F.join(`
`):void 0}})}provideRenameEdits(B,F){return Ie(this,void 0,void 0,function*(){return this._provideRenameEdits(B,this._providerRenameIdx,[],F)})}_provideRenameEdits(B,F,D,R){return Ie(this,void 0,void 0,function*(){const W=this._providers[F];if(!W)return{edits:[],rejectReason:D.join(`
`)};const x=yield W.provideRenameEdits(this.model,this.position,B,R);if(x){if(x.rejectReason)return this._provideRenameEdits(B,F+1,D.concat(x.rejectReason),R)}else return this._provideRenameEdits(B,F+1,D.concat(b.localize(0,null)),R);return x})}}function k(A,B,F){return Ie(this,void 0,void 0,function*(){const D=new I(A,B),R=yield D.resolveRenameLocation(t.CancellationToken.None);return(R==null?void 0:R.rejectReason)?{edits:[],rejectReason:R.rejectReason}:D.provideRenameEdits(F,t.CancellationToken.None)})}e.rename=k;let E=class Vt{constructor(B,F,D,R,W,x,K){this.editor=B,this._instaService=F,this._notificationService=D,this._bulkEditService=R,this._progressService=W,this._logService=x,this._configService=K,this._dispoableStore=new l.DisposableStore,this._cts=new t.CancellationTokenSource,this._renameInputField=this._dispoableStore.add(new h.IdleValue(()=>this._dispoableStore.add(this._instaService.createInstance(d.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(B){return B.getContribution(Vt.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return Ie(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!!this.editor.hasModel()){const B=this.editor.getPosition(),F=new I(this.editor.getModel(),B);if(!!F.hasProvider()){this._cts=new a.EditorStateCancellationTokenSource(this.editor,4|1);let D;try{const se=F.resolveRenameLocation(this._cts.token);this._progressService.showWhile(se,250),D=yield se}catch(se){s.MessageController.get(this.editor).showMessage(se||b.localize(1,null),B);return}if(!!D){if(D.rejectReason){s.MessageController.get(this.editor).showMessage(D.rejectReason,B);return}if(!this._cts.token.isCancellationRequested){this._cts.dispose(),this._cts=new a.EditorStateCancellationTokenSource(this.editor,4|1,D.range);let R=this.editor.getSelection(),W=0,x=D.text.length;!o.Range.isEmpty(R)&&!o.Range.spansMultipleLines(R)&&o.Range.containsRange(D.range,R)&&(W=Math.max(0,R.startColumn-D.range.startColumn),x=Math.min(D.range.endColumn,R.endColumn)-D.range.startColumn);const K=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),Y=yield this._renameInputField.value.getInput(D.range,D.text,W,x,K,this._cts.token);if(typeof Y=="boolean"){Y&&this.editor.focus();return}this.editor.focus();const ee=h.raceCancellation(F.provideRenameEdits(Y.newName,this._cts.token),this._cts.token).then(se=>Ie(this,void 0,void 0,function*(){if(!(!se||!this.editor.hasModel())){if(se.rejectReason){this._notificationService.info(se.rejectReason);return}this._bulkEditService.apply(r.ResourceEdit.convert(se),{editor:this.editor,showPreview:Y.wantsPreview,label:b.localize(2,null,D==null?void 0:D.text),quotableLabel:b.localize(3,null,D==null?void 0:D.text)}).then(ne=>{ne.ariaSummary&&c.alert(b.localize(4,null,D.text,Y.newName,ne.ariaSummary))}).catch(ne=>{this._notificationService.error(b.localize(5,null)),this._logService.error(ne)})}}),se=>{this._notificationService.error(b.localize(6,null)),this._logService.error(se)});return this._progressService.showWhile(ee,250),ee}}}}})}acceptRenameInput(B){this._renameInputField.value.acceptInput(B)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};E.ID="editor.contrib.renameController",E=Me([_e(1,_.IInstantiationService),_e(2,u.INotificationService),_e(3,r.IBulkEditService),_e(4,w.IEditorProgressService),_e(5,m.ILogService),_e(6,y.ITextResourceConfigurationService)],E);class T extends S.EditorAction{constructor(){super({id:"editor.action.rename",label:b.localize(7,null),alias:"Rename Symbol",precondition:M.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(B,F){const D=B.get(n.ICodeEditorService),[R,W]=Array.isArray(F)&&F||[void 0,void 0];return i.URI.isUri(R)&&p.Position.isIPosition(W)?D.openCodeEditor({resource:R},D.getActiveCodeEditor()).then(x=>{!x||(x.setPosition(W),x.invokeWithinContext(K=>(this.reportTelemetry(K,x),this.run(K,x))))},N.onUnexpectedError):super.runCommand(B,F)}run(B,F){const D=E.get(F);return D?D.run():Promise.resolve()}}e.RenameAction=T,S.registerEditorContribution(E.ID,E),S.registerEditorAction(T);const O=S.EditorCommand.bindToContribution(E.get);S.registerEditorCommand(new O({id:"acceptRenameInput",precondition:d.CONTEXT_RENAME_INPUT_VISIBLE,handler:A=>A.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:C.EditorContextKeys.focus,primary:3}})),S.registerEditorCommand(new O({id:"acceptRenameInputWithPreview",precondition:M.ContextKeyExpr.and(d.CONTEXT_RENAME_INPUT_VISIBLE,M.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:A=>A.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:C.EditorContextKeys.focus,primary:1024+3}})),S.registerEditorCommand(new O({id:"cancelRenameInput",precondition:d.CONTEXT_RENAME_INPUT_VISIBLE,handler:A=>A.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:C.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),S.registerModelAndPositionCommand("_executeDocumentRenameProvider",function(A,B,...F){const[D]=F;return L.assertType(typeof D=="string"),k(A,B,D)}),f.Registry.as(v.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:b.localize(8,null),default:!0,type:"boolean"}}})}),define(Q[637],J([0,1,19,23,13,14,3,21,25,18,505,34,412,230,26,12]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=void 0;class r{constructor(_,f){this.index=_,this.ranges=f}mov(_){let f=this.index+(_?1:-1);if(f<0||f>=this.ranges.length)return this;const v=new r(f,this.ranges);return v.ranges[f].equalsRange(this.ranges[this.index])?v.mov(_):v}}class i{constructor(_){this._editor=_,this._ignoreSelection=!1}static get(_){return _.getContribution(i.ID)}dispose(){var _;(_=this._selectionListener)===null||_===void 0||_.dispose()}run(_){return Ie(this,void 0,void 0,function*(){if(!!this._editor.hasModel()){const f=this._editor.getSelections(),v=this._editor.getModel();if(!!g.SelectionRangeRegistry.has(v)&&(this._state||(yield h(v,f.map(L=>L.getPosition()),this._editor.getOption(97),N.CancellationToken.None).then(L=>{var I;if(!(!b.isNonEmptyArray(L)||L.length!==f.length)&&!(!this._editor.hasModel()||!b.equals(this._editor.getSelections(),f,(k,E)=>k.equalsSelection(E)))){for(let k=0;k<L.length;k++)L[k]=L[k].filter(E=>E.containsPosition(f[k].getStartPosition())&&E.containsPosition(f[k].getEndPosition())),L[k].unshift(f[k]);this._state=L.map(k=>new r(0,k)),(I=this._selectionListener)===null||I===void 0||I.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var k;this._ignoreSelection||((k=this._selectionListener)===null||k===void 0||k.dispose(),this._state=void 0)})}})),!!this._state)){this._state=this._state.map(L=>L.mov(_));const y=this._state.map(L=>C.Selection.fromPositions(L.ranges[L.index].getStartPosition(),L.ranges[L.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(y)}finally{this._ignoreSelection=!1}}}})}}i.ID="editor.contrib.smartSelectController";class n extends M.EditorAction{constructor(_,f){super(f);this._forward=_}run(_,f){return Ie(this,void 0,void 0,function*(){let v=i.get(f);v&&(yield v.run(this._forward))})}}class t extends n{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:p.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:1024|512|17,mac:{primary:2048|256|1024|17,secondary:[256|1024|17]},weight:100},menuOpts:{menuId:c.MenuId.MenubarSelectionMenu,group:"1_basic",title:p.localize(1,null),order:2}})}}a.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class l extends n{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:p.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:1024|512|15,mac:{primary:2048|256|1024|15,secondary:[256|1024|15]},weight:100},menuOpts:{menuId:c.MenuId.MenubarSelectionMenu,group:"1_basic",title:p.localize(3,null),order:3}})}}M.registerEditorContribution(i.ID,i),M.registerEditorAction(t),M.registerEditorAction(l),g.SelectionRangeRegistry.register("*",new o.WordSelectionRangeProvider);function h(m,_,f,v){return Ie(this,void 0,void 0,function*(){const y=g.SelectionRangeRegistry.all(m);y.length===1&&y.unshift(new s.BracketSelectionRangeProvider);let L=[],I=[];for(const k of y)L.push(Promise.resolve(k.provideSelectionRanges(m,_,v)).then(E=>{if(b.isNonEmptyArray(E)&&E.length===_.length)for(let T=0;T<_.length;T++){I[T]||(I[T]=[]);for(const O of E[T])S.Range.isIRange(O.range)&&S.Range.containsPosition(O.range,_[T])&&I[T].push(S.Range.lift(O.range))}},u.onUnexpectedExternalError));return yield Promise.all(L),I.map(k=>{if(k.length===0)return[];k.sort((A,B)=>w.Position.isBefore(A.getStartPosition(),B.getStartPosition())?1:w.Position.isBefore(B.getStartPosition(),A.getStartPosition())||w.Position.isBefore(A.getEndPosition(),B.getEndPosition())?-1:w.Position.isBefore(B.getEndPosition(),A.getEndPosition())?1:0);let E=[],T;for(const A of k)(!T||S.Range.containsRange(A,T)&&!S.Range.equalsRange(A,T))&&(E.push(A),T=A);if(!f.selectLeadingAndTrailingWhitespace)return E;let O=[E[0]];for(let A=1;A<E.length;A++){const B=E[A-1],F=E[A];if(F.startLineNumber!==B.startLineNumber||F.endLineNumber!==B.endLineNumber){const D=new S.Range(B.startLineNumber,m.getLineFirstNonWhitespaceColumn(B.startLineNumber),B.endLineNumber,m.getLineLastNonWhitespaceColumn(B.endLineNumber));D.containsRange(B)&&!D.equalsRange(B)&&F.containsRange(D)&&!F.equalsRange(D)&&O.push(D);const R=new S.Range(B.startLineNumber,1,B.endLineNumber,m.getLineMaxColumn(B.endLineNumber));R.containsRange(B)&&!R.equalsRange(D)&&F.containsRange(R)&&!F.equalsRange(R)&&O.push(R)}O.push(F)}return O})})}e.provideSelectionRanges=h,M.registerModelCommand("_executeSelectionRangeProvider",function(m,..._){const[f]=_;return h(m,f,{selectLeadingAndTrailingWhitespace:!0},N.CancellationToken.None)})}),define(Q[117],J([0,1,12,18,14,16,23,3,66,2,34,131,81,26,20,24,67]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showSimpleSuggestions=e.getSuggestionComparator=e.provideSuggestionItems=e.CompletionItemModel=e.getSnippetSuggestSupport=e.CompletionOptions=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.Context={Visible:new w.RawContextKey("suggestWidgetVisible",!1),DetailsVisible:new w.RawContextKey("suggestWidgetDetailsVisible",!1),MultipleSuggestions:new w.RawContextKey("suggestWidgetMultipleSuggestions",!1),MakesTextEdit:new w.RawContextKey("suggestionMakesTextEdit",!0),AcceptSuggestionsOnEnter:new w.RawContextKey("acceptSuggestionOnEnter",!0),HasInsertAndReplaceRange:new w.RawContextKey("suggestionHasInsertAndReplaceRange",!1),InsertMode:new w.RawContextKey("suggestionInsertMode",void 0),CanResolve:new w.RawContextKey("suggestionCanResolve",!1)},e.suggestWidgetStatusbarMenu=new p.MenuId("suggestWidgetStatusBar");class i{constructor(T,O,A,B){this.position=T,this.completion=O,this.container=A,this.provider=B,this.isInvalid=!1,this.score=d.FuzzyScore.Default,this.distance=0,this.textLabel=typeof O.label=="string"?O.label:O.label.name,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=O.sortText&&O.sortText.toLowerCase(),this.filterTextLow=O.filterText&&O.filterText.toLowerCase(),C.Range.isIRange(O.range)?(this.editStart=new M.Position(O.range.startLineNumber,O.range.startColumn),this.editInsertEnd=new M.Position(O.range.endLineNumber,O.range.endColumn),this.editReplaceEnd=new M.Position(O.range.endLineNumber,O.range.endColumn),this.isInvalid=this.isInvalid||C.Range.spansMultipleLines(O.range)||O.range.startLineNumber!==T.lineNumber):(this.editStart=new M.Position(O.range.insert.startLineNumber,O.range.insert.startColumn),this.editInsertEnd=new M.Position(O.range.insert.endLineNumber,O.range.insert.endColumn),this.editReplaceEnd=new M.Position(O.range.replace.endLineNumber,O.range.replace.endColumn),this.isInvalid=this.isInvalid||C.Range.spansMultipleLines(O.range.insert)||C.Range.spansMultipleLines(O.range.replace)||O.range.insert.startLineNumber!==T.lineNumber||O.range.replace.startLineNumber!==T.lineNumber||O.range.insert.startColumn!==O.range.replace.startColumn),typeof B.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(T){return Ie(this,void 0,void 0,function*(){if(!this._resolveCache){const O=T.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,T)).then(A=>{Object.assign(this.completion,A),this._isResolved=!0,O.dispose()},A=>{b.isPromiseCanceledError(A)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}e.CompletionItem=i;class n{constructor(T=2,O=new Set,A=new Set){this.snippetSortOrder=T,this.kindFilter=O,this.providerFilter=A}}e.CompletionOptions=n,n.default=new n;let t;function l(){return t}e.getSnippetSuggestSupport=l;class h{constructor(T,O,A,B){this.items=T,this.needsClipboard=O,this.durations=A,this.disposable=B}}e.CompletionItemModel=h;function m(E,T,O=n.default,A={triggerKind:0},B=S.CancellationToken.None){return Ie(this,void 0,void 0,function*(){const F=new o.StopWatch(!0);T=T.clone();const D=E.getWordAtPosition(T),R=D?new C.Range(T.lineNumber,D.startColumn,T.lineNumber,D.endColumn):C.Range.fromPositions(T),W={replace:R,insert:R.setEndPosition(T.lineNumber,T.column)},x=[],K=new g.DisposableStore,Y=[];let ee=!1;const se=(le,X,z)=>{var P,V;if(!!X){for(let U of X.suggestions)O.kindFilter.has(U.kind)||(U.range||(U.range=W),U.sortText||(U.sortText=typeof U.label=="string"?U.label:U.label.name),!ee&&U.insertTextRules&&U.insertTextRules&4&&(ee=c.SnippetParser.guessNeedsClipboard(U.insertText)),x.push(new i(T,U,X,le)));g.isDisposable(X)&&K.add(X),Y.push({providerName:(P=le._debugDisplayName)!==null&&P!==void 0?P:"unkown_provider",elapsedProvider:(V=X.duration)!==null&&V!==void 0?V:-1,elapsedOverall:z.elapsed()})}},ne=(()=>Ie(this,void 0,void 0,function*(){if(!(!t||O.kindFilter.has(27))&&!(O.providerFilter.size>0&&!O.providerFilter.has(t))){const le=new o.StopWatch(!0),X=yield t.provideCompletionItems(E,T,A,B);se(t,X,le)}}))();for(let le of N.CompletionProviderRegistry.orderedGroups(E)){let X=x.length;if(yield Promise.all(le.map(z=>Ie(this,void 0,void 0,function*(){if(!(O.providerFilter.size>0&&!O.providerFilter.has(z)))try{const P=new o.StopWatch(!0),V=yield z.provideCompletionItems(E,T,A,B);se(z,V,P)}catch(P){b.onUnexpectedExternalError(P)}}))),X!==x.length||B.isCancellationRequested)break}return yield ne,B.isCancellationRequested?(K.dispose(),Promise.reject(b.canceled())):new h(x.sort(L(O.snippetSortOrder)),ee,{entries:Y,elapsed:F.elapsed()},K)})}e.provideSuggestionItems=m;function _(E,T){if(E.sortTextLow&&T.sortTextLow){if(E.sortTextLow<T.sortTextLow)return-1;if(E.sortTextLow>T.sortTextLow)return 1}return E.completion.label<T.completion.label?-1:E.completion.label>T.completion.label?1:E.completion.kind-T.completion.kind}function f(E,T){if(E.completion.kind!==T.completion.kind){if(E.completion.kind===27)return-1;if(T.completion.kind===27)return 1}return _(E,T)}function v(E,T){if(E.completion.kind!==T.completion.kind){if(E.completion.kind===27)return 1;if(T.completion.kind===27)return-1}return _(E,T)}const y=new Map;y.set(0,f),y.set(2,v),y.set(1,_);function L(E){return y.get(E)}e.getSuggestionComparator=L,s.CommandsRegistry.registerCommand("_executeCompletionItemProvider",(E,...T)=>Ie(void 0,void 0,void 0,function*(){const[O,A,B,F]=T;a.assertType(u.URI.isUri(O)),a.assertType(M.Position.isIPosition(A)),a.assertType(typeof B=="string"||!B),a.assertType(typeof F=="number"||!F);const D=yield E.get(r.ITextModelService).createModelReference(O);try{const R={incomplete:!1,suggestions:[]},W=[],x=yield m(D.object.textEditorModel,M.Position.lift(A),void 0,{triggerCharacter:B,triggerKind:B?1:0});for(const K of x.items)W.length<(F!=null?F:0)&&W.push(K.resolve(S.CancellationToken.None)),R.incomplete=R.incomplete||K.container.incomplete,R.suggestions.push(K.completion);try{return yield Promise.all(W),R}finally{setTimeout(()=>x.disposable.dispose(),100)}}finally{D.dispose()}}));const I=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let T={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,T}};N.CompletionProviderRegistry.register("*",I);function k(E,T){setTimeout(()=>{I.onlyOnceSuggestions.push(...T),E.getContribution("editor.contrib.suggestController").triggerSuggest(new Set().add(I))},0)}e.showSimpleSuggestions=k}),define(Q[264],J([0,1,513,47,13,186]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class S extends M.EditorAction{constructor(){super({id:S.ID,label:b.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2048|43,mac:{primary:256|1024|43},weight:100}})}run(d,g){const c=!w.TabFocus.getTabFocusMode();w.TabFocus.setTabFocusMode(c),c?N.alert(b.localize(1,null)):N.alert(b.localize(2,null))}}e.ToggleTabFocusModeAction=S,S.ID="editor.action.toggleTabFocusMode",M.registerEditorAction(S)}),define(Q[638],J([0,1,514,13,81]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class w extends N.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:b.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(C,d){if(!!d.hasModel()){const g=d.getModel();g.resetTokenization();const p=new M.StopWatch(!0);g.forceTokenization(g.getLineCount()),p.stop(),console.log(`tokenization took ${p.elapsed()}`)}}}N.registerEditorAction(w)}),define(Q[639],J([0,1,515,2,13,28,184]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const C="ignoreUnusualLineTerminators";function d(c,o,s){c.setModelProperty(o.uri,C,s)}function g(c,o){return c.getModelProperty(o.uri,C)}let p=class extends N.Disposable{constructor(o,s,a){super();this._editor=o,this._dialogService=s,this._codeEditorService=a,this._config=this._editor.getOption(108),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(108)&&(this._config=this._editor.getOption(108),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(u=>{u.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return Ie(this,void 0,void 0,function*(){if(this._config!=="off"&&!!this._editor.hasModel()){const o=this._editor.getModel();if(!!o.mightContainUnusualLineTerminators()&&g(this._codeEditorService,o)!==!0&&!this._editor.getOption(75)){if(this._config==="auto"){o.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:b.localize(0,null),message:b.localize(1,null),detail:b.localize(2,null),primaryButton:b.localize(3,null),secondaryButton:b.localize(4,null)})).confirmed){d(this._codeEditorService,o,!0);return}o.removeUnusualLineTerminators(this._editor.getSelections())}}})}};p.ID="editor.contrib.unusualLineTerminatorsDetector",p=Me([_e(1,S.IDialogService),_e(2,w.ICodeEditorService)],p),M.registerEditorContribution(p.ID,p)}),define(Q[640],J([0,1,516,19,15,23,12,2,13,3,25,53,31,18,16,22,11,47]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOccurrencesAtPosition=void 0;const n=u.registerColor("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},b.localize(0,null),!0),t=u.registerColor("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},b.localize(1,null),!0),l=u.registerColor("editor.wordHighlightBorder",{light:null,dark:null,hc:u.activeContrastBorder},b.localize(2,null)),h=u.registerColor("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:u.activeContrastBorder},b.localize(3,null)),m=u.registerColor("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},b.localize(4,null),!0),_=u.registerColor("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},b.localize(5,null),!0),f=new a.RawContextKey("hasWordHighlights",!1);function v(D,R,W){const x=s.DocumentHighlightProviderRegistry.ordered(D);return M.first(x.map(K=>()=>Promise.resolve(K.provideDocumentHighlights(D,R,W)).then(void 0,S.onUnexpectedExternalError)),N.isNonEmptyArray)}e.getOccurrencesAtPosition=v;class y{constructor(R,W,x){this._wordRange=this._getCurrentWordRange(R,W),this.result=M.createCancelablePromise(K=>this._compute(R,W,x,K))}_getCurrentWordRange(R,W){const x=R.getWordAtPosition(W.getPosition());return x?new g.Range(W.startLineNumber,x.startColumn,W.startLineNumber,x.endColumn):null}isValid(R,W,x){const K=W.startLineNumber,Y=W.startColumn,ee=W.endColumn,se=this._getCurrentWordRange(R,W);let ne=Boolean(this._wordRange&&this._wordRange.equalsRange(se));for(let le=0,X=x.length;!ne&&le<X;le++){let z=R.getDecorationRange(x[le]);z&&z.startLineNumber===K&&z.startColumn<=Y&&z.endColumn>=ee&&(ne=!0)}return ne}cancel(){this.result.cancel()}}class L extends y{_compute(R,W,x,K){return v(R,W.getPosition(),K).then(Y=>Y||[])}}class I extends y{constructor(R,W,x){super(R,W,x);this._selectionIsEmpty=W.isEmpty()}_compute(R,W,x,K){return M.timeout(250,K).then(()=>{if(!W.isEmpty())return[];const Y=R.getWordAtPosition(W.getPosition());return!Y||Y.word.length>1e3?[]:R.findMatches(Y.word,!0,!1,!0,x,!1).map(se=>({range:se.range,kind:s.DocumentHighlightKind.Text}))})}isValid(R,W,x){const K=W.isEmpty();return this._selectionIsEmpty!==K?!1:super.isValid(R,W,x)}}function k(D,R,W){return s.DocumentHighlightProviderRegistry.has(D)?new L(D,R,W):new I(D,R,W)}d.registerModelAndPositionCommand("_executeDocumentHighlights",(D,R)=>v(D,R,w.CancellationToken.None));class E{constructor(R,W){this.toUnhook=new C.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=R,this._hasWordHighlights=f.bindTo(W),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(66),this.model=this.editor.getModel(),this.toUnhook.add(R.onDidChangeCursorPosition(x=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(x)})),this.toUnhook.add(R.onDidChangeModelContent(x=>{this._stopAll()})),this.toUnhook.add(R.onDidChangeConfiguration(x=>{let K=this.editor.getOption(66);this.occurrencesHighlight!==K&&(this.occurrencesHighlight=K,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return N.coalesce(this._decorationIds.map(R=>this.model.getDecorationRange(R)).sort(g.Range.compareRangesUsingStarts))}moveNext(){let R=this._getSortedHighlights(),x=(R.findIndex(Y=>Y.containsPosition(this.editor.getPosition()))+1)%R.length,K=R[x];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(K.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(K);const Y=this._getWord();if(Y){const ee=this.editor.getModel().getLineContent(K.startLineNumber);i.alert(`${ee}, ${x+1} of ${R.length} for '${Y.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let R=this._getSortedHighlights(),x=(R.findIndex(Y=>Y.containsPosition(this.editor.getPosition()))-1+R.length)%R.length,K=R[x];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(K.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(K);const Y=this._getWord();if(Y){const ee=this.editor.getModel().getLineContent(K.startLineNumber);i.alert(`${ee}, ${x+1} of ${R.length} for '${Y.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(R){if(!this.occurrencesHighlight){this._stopAll();return}if(R.reason!==3){this._stopAll();return}this._run()}_getWord(){let R=this.editor.getSelection(),W=R.startLineNumber,x=R.startColumn;return this.model.getWordAtPosition({lineNumber:W,column:x})}_run(){let R=this.editor.getSelection();if(R.startLineNumber!==R.endLineNumber){this._stopAll();return}let W=R.startColumn,x=R.endColumn;const K=this._getWord();if(!K||K.startColumn>W||K.endColumn<x){this._stopAll();return}const Y=this.workerRequest&&this.workerRequest.isValid(this.model,R,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),Y)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let ee=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=k(this.model,this.editor.getSelection(),this.editor.getOption(110)),this.workerRequest.result.then(se=>{ee===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=se||[],this._beginRenderDecorations())},S.onUnexpectedError)}}_beginRenderDecorations(){let R=new Date().getTime(),W=this.lastCursorPositionChangeTime+250;R>=W?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},W-R)}renderDecorations(){this.renderDecorationsTimer=-1;let R=[];for(const W of this.workerRequestValue)W.range&&R.push({range:W.range,options:E._getDecorationOptions(W.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,R),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(R){return R===s.DocumentHighlightKind.Write?this._WRITE_OPTIONS:R===s.DocumentHighlightKind.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}E._WRITE_OPTIONS=o.ModelDecorationOptions.register({stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:r.themeColorFromId(_),position:c.OverviewRulerLane.Center}}),E._TEXT_OPTIONS=o.ModelDecorationOptions.register({stickiness:1,className:"selectionHighlight",overviewRuler:{color:r.themeColorFromId(u.overviewRulerSelectionHighlightForeground),position:c.OverviewRulerLane.Center}}),E._REGULAR_OPTIONS=o.ModelDecorationOptions.register({stickiness:1,className:"wordHighlight",overviewRuler:{color:r.themeColorFromId(m),position:c.OverviewRulerLane.Center}});let T=class zt extends C.Disposable{constructor(R,W){super();this.wordHighlighter=null;const x=()=>{R.hasModel()&&(this.wordHighlighter=new E(R,W))};this._register(R.onDidChangeModel(K=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),x()})),x()}static get(R){return R.getContribution(zt.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(R){this.wordHighlighter&&R&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};T.ID="editor.contrib.wordHighlighter",T=Me([_e(1,a.IContextKeyService)],T);class O extends d.EditorAction{constructor(R,W){super(W);this._isNext=R}run(R,W){const x=T.get(W);!x||(this._isNext?x.moveNext():x.moveBack())}}class A extends O{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:b.localize(6,null),alias:"Go to Next Symbol Highlight",precondition:f,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class B extends O{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:b.localize(7,null),alias:"Go to Previous Symbol Highlight",precondition:f,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:1024|65,weight:100}})}}class F extends d.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:b.localize(8,null),alias:"Trigger Symbol Highlight",precondition:f.toNegated(),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(R,W,x){const K=T.get(W);!K||K.restoreViewState(!0)}}d.registerEditorContribution(T.ID,T),d.registerEditorAction(A),d.registerEditorAction(B),d.registerEditorAction(F),r.registerThemingParticipant((D,R)=>{const W=D.getColor(u.editorSelectionHighlight);W&&(R.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${W}; }`),R.addRule(`.monaco-editor .selectionHighlight { background-color: ${W.transparent(.5)}; }`));const x=D.getColor(n);x&&R.addRule(`.monaco-editor .wordHighlight { background-color: ${x}; }`);const K=D.getColor(t);K&&R.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${K}; }`);const Y=D.getColor(u.editorSelectionHighlightBorder);Y&&R.addRule(`.monaco-editor .selectionHighlight { border: 1px ${D.type==="hc"?"dotted":"solid"} ${Y}; box-sizing: border-box; }`);const ee=D.getColor(l);ee&&R.addRule(`.monaco-editor .wordHighlight { border: 1px ${D.type==="hc"?"dashed":"solid"} ${ee}; box-sizing: border-box; }`);const se=D.getColor(h);se&&R.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${D.type==="hc"?"dashed":"solid"} ${se}; box-sizing: border-box; }`)})}),define(Q[265],J([0,1,517,13,92,42,136,106,14,3,21,25,65,16,38,41,250]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteInsideWord=e.DeleteWordRight=e.DeleteWordEndRight=e.DeleteWordStartRight=e.DeleteWordLeft=e.DeleteWordEndLeft=e.DeleteWordStartLeft=e.DeleteWordRightCommand=e.DeleteWordLeftCommand=e.DeleteWordCommand=e.CursorWordAccessibilityRightSelect=e.CursorWordAccessibilityRight=e.CursorWordRightSelect=e.CursorWordEndRightSelect=e.CursorWordStartRightSelect=e.CursorWordRight=e.CursorWordEndRight=e.CursorWordStartRight=e.CursorWordAccessibilityLeftSelect=e.CursorWordAccessibilityLeft=e.CursorWordLeftSelect=e.CursorWordEndLeftSelect=e.CursorWordStartLeftSelect=e.CursorWordLeft=e.CursorWordEndLeft=e.CursorWordStartLeft=e.WordRightCommand=e.WordLeftCommand=e.MoveWordCommand=void 0;class i extends N.EditorCommand{constructor(z){super(z);this._inSelectionMode=z.inSelectionMode,this._wordNavigationType=z.wordNavigationType}runEditorCommand(z,P,V){if(!!P.hasModel()){const U=C.getMapForWordSeparators(P.getOption(110)),H=P.getModel(),ie=P.getSelections().map(oe=>{const ae=new d.Position(oe.positionLineNumber,oe.positionColumn),G=this._move(U,H,ae,this._wordNavigationType);return this._moveTo(oe,G,this._inSelectionMode)});if(H.pushStackElement(),P._getViewModel().setCursorStates("moveWordCommand",3,ie.map(oe=>w.CursorState.fromModelSelection(oe))),ie.length===1){const oe=new d.Position(ie[0].positionLineNumber,ie[0].positionColumn);P.revealPosition(oe,0)}}}_moveTo(z,P,V){return V?new p.Selection(z.selectionStartLineNumber,z.selectionStartColumn,P.lineNumber,P.column):new p.Selection(P.lineNumber,P.column,P.lineNumber,P.column)}}e.MoveWordCommand=i;class n extends i{_move(z,P,V,U){return S.WordOperations.moveWordLeft(z,P,V,U)}}e.WordLeftCommand=n;class t extends i{_move(z,P,V,U){return S.WordOperations.moveWordRight(z,P,V,U)}}e.WordRightCommand=t;class l extends n{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=l;class h extends n{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=h;class m extends n{constructor(){var z;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:s.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus,(z=s.ContextKeyExpr.and(o.CONTEXT_ACCESSIBILITY_MODE_ENABLED,r.IsWindowsContext))===null||z===void 0?void 0:z.negate()),primary:2048|15,mac:{primary:512|15},weight:100}})}}e.CursorWordLeft=m;class _ extends n{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=_;class f extends n{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=f;class v extends n{constructor(){var z;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:s.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus,(z=s.ContextKeyExpr.and(o.CONTEXT_ACCESSIBILITY_MODE_ENABLED,r.IsWindowsContext))===null||z===void 0?void 0:z.negate()),primary:2048|1024|15,mac:{primary:512|1024|15},weight:100}})}}e.CursorWordLeftSelect=v;class y extends n{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(z,P,V,U){return super._move(C.getMapForWordSeparators(a.EditorOptions.wordSeparators.defaultValue),P,V,U)}}e.CursorWordAccessibilityLeft=y;class L extends n{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(z,P,V,U){return super._move(C.getMapForWordSeparators(a.EditorOptions.wordSeparators.defaultValue),P,V,U)}}e.CursorWordAccessibilityLeftSelect=L;class I extends t{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=I;class k extends t{constructor(){var z;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:s.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus,(z=s.ContextKeyExpr.and(o.CONTEXT_ACCESSIBILITY_MODE_ENABLED,r.IsWindowsContext))===null||z===void 0?void 0:z.negate()),primary:2048|17,mac:{primary:512|17},weight:100}})}}e.CursorWordEndRight=k;class E extends t{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=E;class T extends t{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=T;class O extends t{constructor(){var z;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:s.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus,(z=s.ContextKeyExpr.and(o.CONTEXT_ACCESSIBILITY_MODE_ENABLED,r.IsWindowsContext))===null||z===void 0?void 0:z.negate()),primary:2048|1024|17,mac:{primary:512|1024|17},weight:100}})}}e.CursorWordEndRightSelect=O;class A extends t{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=A;class B extends t{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(z,P,V,U){return super._move(C.getMapForWordSeparators(a.EditorOptions.wordSeparators.defaultValue),P,V,U)}}e.CursorWordAccessibilityRight=B;class F extends t{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(z,P,V,U){return super._move(C.getMapForWordSeparators(a.EditorOptions.wordSeparators.defaultValue),P,V,U)}}e.CursorWordAccessibilityRightSelect=F;class D extends N.EditorCommand{constructor(z){super(z);this._whitespaceHeuristics=z.whitespaceHeuristics,this._wordNavigationType=z.wordNavigationType}runEditorCommand(z,P,V){if(!!P.hasModel()){const U=C.getMapForWordSeparators(P.getOption(110)),H=P.getModel(),$=P.getSelections(),ie=P.getOption(5),oe=P.getOption(7),ae=u.LanguageConfigurationRegistry.getAutoClosingPairs(H.getLanguageIdentifier().id),G=$.map(j=>{const te=this._delete({wordSeparators:U,model:H,selection:j,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingBrackets:ie,autoClosingQuotes:oe,autoClosingPairs:ae},this._wordNavigationType);return new M.ReplaceCommand(te,"")});P.pushUndoStop(),P.executeCommands(this.id,G),P.pushUndoStop()}}}e.DeleteWordCommand=D;class R extends D{_delete(z,P){let V=S.WordOperations.deleteWordLeft(z,P);return V||new g.Range(1,1,1,1)}}e.DeleteWordLeftCommand=R;class W extends D{_delete(z,P){let V=S.WordOperations.deleteWordRight(z,P);if(V)return V;const U=z.model.getLineCount(),H=z.model.getLineMaxColumn(U);return new g.Range(U,H,U,H)}}e.DeleteWordRightCommand=W;class x extends R{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:c.EditorContextKeys.writable})}}e.DeleteWordStartLeft=x;class K extends R{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:c.EditorContextKeys.writable})}}e.DeleteWordEndLeft=K;class Y extends R{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1,mac:{primary:512|1},weight:100}})}}e.DeleteWordLeft=Y;class ee extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:c.EditorContextKeys.writable})}}e.DeleteWordStartRight=ee;class se extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:c.EditorContextKeys.writable})}}e.DeleteWordEndRight=se;class ne extends W{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|20,mac:{primary:512|20},weight:100}})}}e.DeleteWordRight=ne;class le extends N.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:c.EditorContextKeys.writable,label:b.localize(0,null),alias:"Delete Word"})}run(z,P,V){if(!!P.hasModel()){const U=C.getMapForWordSeparators(P.getOption(110)),H=P.getModel(),ie=P.getSelections().map(oe=>{const ae=S.WordOperations.deleteInsideWord(U,H,oe);return new M.ReplaceCommand(ae,"")});P.pushUndoStop(),P.executeCommands(this.id,ie),P.pushUndoStop()}}}e.DeleteInsideWord=le,N.registerEditorCommand(new l),N.registerEditorCommand(new h),N.registerEditorCommand(new m),N.registerEditorCommand(new _),N.registerEditorCommand(new f),N.registerEditorCommand(new v),N.registerEditorCommand(new I),N.registerEditorCommand(new k),N.registerEditorCommand(new E),N.registerEditorCommand(new T),N.registerEditorCommand(new O),N.registerEditorCommand(new A),N.registerEditorCommand(new y),N.registerEditorCommand(new L),N.registerEditorCommand(new B),N.registerEditorCommand(new F),N.registerEditorCommand(new x),N.registerEditorCommand(new K),N.registerEditorCommand(new Y),N.registerEditorCommand(new ee),N.registerEditorCommand(new se),N.registerEditorCommand(new ne),N.registerEditorAction(le)}),define(Q[641],J([0,1,13,136,3,25,265,26]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorWordPartRightSelect=e.CursorWordPartRight=e.WordPartRightCommand=e.CursorWordPartLeftSelect=e.CursorWordPartLeft=e.WordPartLeftCommand=e.DeleteWordPartRight=e.DeleteWordPartLeft=void 0;class d extends S.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:w.EditorContextKeys.writable,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1},weight:100}})}_delete(i,n){let t=N.WordPartOperations.deleteWordPartLeft(i);return t||new M.Range(1,1,1,1)}}e.DeleteWordPartLeft=d;class g extends S.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:w.EditorContextKeys.writable,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|20},weight:100}})}_delete(i,n){let t=N.WordPartOperations.deleteWordPartRight(i);if(t)return t;const l=i.model.getLineCount(),h=i.model.getLineMaxColumn(l);return new M.Range(l,h,l,h)}}e.DeleteWordPartRight=g;class p extends S.MoveWordCommand{_move(i,n,t,l){return N.WordPartOperations.moveWordPartLeft(i,n,t)}}e.WordPartLeftCommand=p;class c extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|15},weight:100}})}}e.CursorWordPartLeft=c,C.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class o extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1024|15},weight:100}})}}e.CursorWordPartLeftSelect=o,C.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class s extends S.MoveWordCommand{_move(i,n,t,l){return N.WordPartOperations.moveWordPartRight(i,n,t)}}e.WordPartRightCommand=s;class a extends s{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|17},weight:100}})}}e.CursorWordPartRight=a;class u extends s{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1024|17},weight:100}})}}e.CursorWordPartRightSelect=u,b.registerEditorCommand(new d),b.registerEditorCommand(new g),b.registerEditorCommand(new c),b.registerEditorCommand(new o),b.registerEditorCommand(new a),b.registerEditorCommand(new u)}),define(Q[642],J([0,1,7,30,156,47,52,2,17,8,24,13,25,264,16,9,37,58,22,11,64,354]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const h=new a.RawContextKey("accessibilityHelpWidgetVisible",!1);let m=class Ht extends C.Disposable{constructor(I,k){super();this._editor=I,this._widget=this._register(k.createInstance(f,this._editor))}static get(I){return I.getContribution(Ht.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};m.ID="editor.contrib.accessibilityHelpController",m=Me([_e(1,u.IInstantiationService)],m);function _(L,I){return!L||L.length===0?l.AccessibilityHelpNLS.noSelection:L.length===1?I?g.format(l.AccessibilityHelpNLS.singleSelectionRange,L[0].positionLineNumber,L[0].positionColumn,I):g.format(l.AccessibilityHelpNLS.singleSelection,L[0].positionLineNumber,L[0].positionColumn):I?g.format(l.AccessibilityHelpNLS.multiSelectionRange,L.length,I):L.length>0?g.format(l.AccessibilityHelpNLS.multiSelection,L.length):""}let f=class ht extends S.Widget{constructor(I,k,E,T){super();this._contextKeyService=k,this._keybindingService=E,this._openerService=T,this._editor=I,this._isVisibleKey=h.bindTo(this._contextKeyService),this._domNode=N.createFastDomNode(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=N.createFastDomNode(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(b.addStandardDisposableListener(this._contentDomNode.domNode,"keydown",O=>{if(!!this._isVisible&&(O.equals(2048|35)&&(w.alert(l.AccessibilityHelpNLS.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),b.clearNode(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),O.preventDefault(),O.stopPropagation()),O.equals(2048|38))){w.alert(l.AccessibilityHelpNLS.openingDocs);let A=this._editor.getRawOptions().accessibilityHelpUrl;typeof A=="undefined"&&(A="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(p.URI.parse(A)),O.preventDefault(),O.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ht.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(I,k,E){let T=this._keybindingService.lookupKeybinding(I);return T?g.format(k,T.getAriaLabel()):g.format(E,I)}_buildContent(){const I=this._editor.getOptions(),k=this._editor.getSelections();let E=0;if(k){const B=this._editor.getModel();B&&k.forEach(F=>{E+=B.getValueLengthInRange(F)})}let T=_(k,E);I.get(49)?I.get(75)?T+=l.AccessibilityHelpNLS.readonlyDiffEditor:T+=l.AccessibilityHelpNLS.editableDiffEditor:I.get(75)?T+=l.AccessibilityHelpNLS.readonlyEditor:T+=l.AccessibilityHelpNLS.editableEditor;const O=d.isMacintosh?l.AccessibilityHelpNLS.changeConfigToOnMac:l.AccessibilityHelpNLS.changeConfigToOnWinLinux;switch(I.get(2)){case 0:T+=`
- `+O;break;case 2:T+=`
- `+l.AccessibilityHelpNLS.auto_on;break;case 1:T+=`
- `+l.AccessibilityHelpNLS.auto_off,T+=" "+O;break}I.get(123)?T+=`
- `+this._descriptionForCommand(s.ToggleTabFocusModeAction.ID,l.AccessibilityHelpNLS.tabFocusModeOnMsg,l.AccessibilityHelpNLS.tabFocusModeOnMsgNoKb):T+=`
- `+this._descriptionForCommand(s.ToggleTabFocusModeAction.ID,l.AccessibilityHelpNLS.tabFocusModeOffMsg,l.AccessibilityHelpNLS.tabFocusModeOffMsgNoKb);const A=d.isMacintosh?l.AccessibilityHelpNLS.openDocMac:l.AccessibilityHelpNLS.openDocWinLinux;T+=`
- `+A,T+=`
`+l.AccessibilityHelpNLS.outroMsg,this._contentDomNode.domNode.appendChild(M.renderFormattedText(T)),this._contentDomNode.domNode.setAttribute("aria-label",T)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,b.clearNode(this._contentDomNode.domNode),this._editor.focus())}_layout(){let I=this._editor.getLayoutInfo(),k=Math.max(5,Math.min(ht.WIDTH,I.width-40)),E=Math.max(5,Math.min(ht.HEIGHT,I.height-40));this._domNode.setWidth(k),this._domNode.setHeight(E);let T=Math.round((I.height-E)/2);this._domNode.setTop(T);let O=Math.round((I.width-k)/2);this._domNode.setLeft(O)}};f.ID="editor.contrib.accessibilityHelpWidget",f.WIDTH=500,f.HEIGHT=300,f=Me([_e(1,a.IContextKeyService),_e(2,r.IKeybindingService),_e(3,i.IOpenerService)],f);class v extends c.EditorAction{constructor(){super({id:"editor.action.showAccessibilityHelp",label:l.AccessibilityHelpNLS.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:512|59,weight:100,linux:{primary:512|1024|59,secondary:[512|59]}}})}run(I,k){let E=m.get(k);E&&E.show()}}c.registerEditorContribution(m.ID,m),c.registerEditorAction(v);const y=c.EditorCommand.bindToContribution(m.get);c.registerEditorCommand(new y({id:"closeAccessibilityHelp",precondition:h,handler:L=>L.hide(),kbOpts:{weight:100+100,kbExpr:o.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),t.registerThemingParticipant((L,I)=>{const k=L.getColor(n.editorWidgetBackground);k&&I.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${k}; }`);const E=L.getColor(n.editorWidgetForeground);E&&I.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${E}; }`);const T=L.getColor(n.widgetShadow);T&&I.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${T}; }`);const O=L.getColor(n.contrastBorder);O&&I.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${O}; }`)})}),define(Q[643],J([0,1,35,7,2,13,355]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class S extends M.Disposable{constructor(g){super();this.editor=g,this.widget=null,b.isIPad&&(this._register(g.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const g=!this.editor.getOption(75);!this.widget&&g?this.widget=new C(this.editor):this.widget&&!g&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}e.IPadShowKeyboard=S,S.ID="editor.contrib.iPadShowKeyboard";class C extends M.Disposable{constructor(g){super();this.editor=g,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(N.addDisposableListener(this._domNode,"touchstart",p=>{this.editor.focus()})),this._register(N.addDisposableListener(this._domNode,"focus",p=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return C.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}C.ID="editor.contrib.ShowKeyboardWidget",w.registerEditorContribution(S.ID,S)}),define(Q[644],J([0,1,7,29,2,13,18,76,57,114,22,11,64,97,356]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let a=class Ut extends M.Disposable{constructor(l,h,m){super();this._editor=l,this._modeService=m,this._widget=null,this._register(this._editor.onDidChangeModel(_=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(_=>this.stop())),this._register(S.TokenizationRegistry.onDidChange(_=>this.stop())),this._register(this._editor.onKeyUp(_=>_.keyCode===9&&this.stop()))}static get(l){return l.getContribution(Ut.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||(this._widget=new n(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};a.ID="editor.contrib.inspectTokens",a=Me([_e(1,g.IStandaloneThemeService),_e(2,d.IModeService)],a);class u extends w.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:o.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(l,h){let m=a.get(h);m&&m.launch()}}function r(t){let l="";for(let h=0,m=t.length;h<m;h++){let _=t.charCodeAt(h);switch(_){case 9:l+="\u2192";break;case 32:l+="\xB7";break;default:l+=String.fromCharCode(_)}}return l}function i(t){let l=S.TokenizationRegistry.get(t.language);return l||{getInitialState:()=>C.NULL_STATE,tokenize:(h,m,_,f)=>C.nullTokenize(t.language,h,_,f),tokenize2:(h,m,_,f)=>C.nullTokenize2(t.id,h,_,f)}}class n extends M.Disposable{constructor(l,h){super();this.allowEditorOverflow=!0,this._editor=l,this._modeService=h,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=i(this._model.getLanguageIdentifier()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(m=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return n._ID}_compute(l){let h=this._getTokensAtLine(l.lineNumber),m=0;for(let L=h.tokens1.length-1;L>=0;L--){let I=h.tokens1[L];if(l.column-1>=I.offset){m=L;break}}let _=0;for(let L=h.tokens2.length>>>1;L>=0;L--)if(l.column-1>=h.tokens2[L<<1]){_=L;break}let f=this._model.getLineContent(l.lineNumber),v="";if(m<h.tokens1.length){let L=h.tokens1[m].offset,I=m+1<h.tokens1.length?h.tokens1[m+1].offset:f.length;v=f.substring(L,I)}b.reset(this._domNode,b.$("h2.tm-token",void 0,r(v),b.$("span.tm-token-length",void 0,`${v.length} ${v.length===1?"char":"chars"}`))),b.append(this._domNode,b.$("hr.tokens-inspect-separator",{style:"clear:both"}));const y=(_<<1)+1<h.tokens2.length?this._decodeMetadata(h.tokens2[(_<<1)+1]):null;b.append(this._domNode,b.$("table.tm-metadata-table",void 0,b.$("tbody",void 0,b.$("tr",void 0,b.$("td.tm-metadata-key",void 0,"language"),b.$("td.tm-metadata-value",void 0,`${y?y.languageIdentifier.language:"-?-"}`)),b.$("tr",void 0,b.$("td.tm-metadata-key",void 0,"token type"),b.$("td.tm-metadata-value",void 0,`${y?this._tokenTypeToString(y.tokenType):"-?-"}`)),b.$("tr",void 0,b.$("td.tm-metadata-key",void 0,"font style"),b.$("td.tm-metadata-value",void 0,`${y?this._fontStyleToString(y.fontStyle):"-?-"}`)),b.$("tr",void 0,b.$("td.tm-metadata-key",void 0,"foreground"),b.$("td.tm-metadata-value",void 0,`${y?N.Color.Format.CSS.formatHex(y.foreground):"-?-"}`)),b.$("tr",void 0,b.$("td.tm-metadata-key",void 0,"background"),b.$("td.tm-metadata-value",void 0,`${y?N.Color.Format.CSS.formatHex(y.background):"-?-"}`))))),b.append(this._domNode,b.$("hr.tokens-inspect-separator")),m<h.tokens1.length&&b.append(this._domNode,b.$("span.tm-token-type",void 0,h.tokens1[m].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(l){let h=S.TokenizationRegistry.getColorMap(),m=S.TokenMetadata.getLanguageId(l),_=S.TokenMetadata.getTokenType(l),f=S.TokenMetadata.getFontStyle(l),v=S.TokenMetadata.getForeground(l),y=S.TokenMetadata.getBackground(l);return{languageIdentifier:this._modeService.getLanguageIdentifier(m),tokenType:_,fontStyle:f,foreground:h[v],background:h[y]}}_tokenTypeToString(l){switch(l){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx";default:return"??"}}_fontStyleToString(l){let h="";return l&1&&(h+="italic "),l&2&&(h+="bold "),l&4&&(h+="underline "),h.length===0&&(h="---"),h}_getTokensAtLine(l){let h=this._getStateBeforeLine(l),m=this._tokenizationSupport.tokenize(this._model.getLineContent(l),!0,h,0),_=this._tokenizationSupport.tokenize2(this._model.getLineContent(l),!0,h,0);return{startState:h,tokens1:m.tokens,tokens2:_.tokens,endState:m.endState}}_getStateBeforeLine(l){let h=this._tokenizationSupport.getInitialState();for(let m=1;m<l;m++)h=this._tokenizationSupport.tokenize(this._model.getLineContent(m),!0,h,0).endState;return h}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}n._ID="editor.contrib.inspectTokensWidget",w.registerEditorContribution(a.ID,a),w.registerEditorAction(u),c.registerThemingParticipant((t,l)=>{const h=t.getColor(p.editorHoverBorder);if(h){let f=t.type===s.ColorScheme.HIGH_CONTRAST?2:1;l.addRule(`.monaco-editor .tokens-inspect-widget { border: ${f}px solid ${h}; }`),l.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${h}; }`)}const m=t.getColor(p.editorHoverBackground);m&&l.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${m}; }`);const _=t.getColor(p.editorHoverForeground);_&&l.addRule(`.monaco-editor .tokens-inspect-widget { color: ${_}; }`)})}),define(Q[645],J([0,1,33,96,64,28,578,20,9,37,26,87,32,13,25,78]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let r=class extends S.AbstractEditorCommandsQuickAccessProvider{constructor(t,l,h,m,_,f){super({showAlias:!1},t,h,m,_,f);this.codeEditorService=l}get activeTextEditorControl(){return C.withNullAsUndefined(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return Ie(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};r=Me([_e(0,d.IInstantiationService),_e(1,w.ICodeEditorService),_e(2,g.IKeybindingService),_e(3,p.ICommandService),_e(4,c.ITelemetryService),_e(5,o.INotificationService)],r),e.StandaloneCommandsQuickAccessProvider=r,b.Registry.as(N.Extensions.Quickaccess).registerQuickAccessProvider({ctor:r,prefix:r.PREFIX,helpEntries:[{description:M.QuickCommandNLS.quickCommandHelp,needsEditor:!0}]});class i extends s.EditorAction{constructor(){super({id:"editor.action.quickCommand",label:M.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:a.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(t){t.get(u.IQuickInputService).quickAccess.show(r.PREFIX)}}e.GotoLineAction=i,s.registerEditorAction(i)}),define(Q[646],J([0,1,602,33,96,28,20,64,6,13,25,78]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoLineQuickAccessProvider=void 0;let o=class extends b.AbstractGotoLineQuickAccessProvider{constructor(u){super();this.editorService=u,this.onDidActiveTextEditorControlChange=d.Event.None}get activeTextEditorControl(){return S.withNullAsUndefined(this.editorService.getFocusedCodeEditor())}};o=Me([_e(0,w.ICodeEditorService)],o),e.StandaloneGotoLineQuickAccessProvider=o,N.Registry.as(M.Extensions.Quickaccess).registerQuickAccessProvider({ctor:o,prefix:o.PREFIX,helpEntries:[{description:C.GoToLineNLS.gotoLineActionLabel,needsEditor:!0}]});class s extends g.EditorAction{constructor(){super({id:"editor.action.gotoLine",label:C.GoToLineNLS.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:2048|37,mac:{primary:256|37},weight:100}})}run(u){u.get(c.IQuickInputService).quickAccess.show(o.PREFIX)}}e.GotoLineAction=s,g.registerEditorAction(s)}),define(Q[647],J([0,1,603,33,96,28,20,64,6,13,25,78,123,259]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoSymbolQuickAccessProvider=void 0;let o=class extends b.AbstractGotoSymbolQuickAccessProvider{constructor(u){super();this.editorService=u,this.onDidActiveTextEditorControlChange=d.Event.None}get activeTextEditorControl(){return S.withNullAsUndefined(this.editorService.getFocusedCodeEditor())}};o=Me([_e(0,w.ICodeEditorService)],o),e.StandaloneGotoSymbolQuickAccessProvider=o,N.Registry.as(M.Extensions.Quickaccess).registerQuickAccessProvider({ctor:o,prefix:b.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:C.QuickOutlineNLS.quickOutlineActionLabel,prefix:b.AbstractGotoSymbolQuickAccessProvider.PREFIX,needsEditor:!0},{description:C.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:b.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY,needsEditor:!0}]});class s extends g.EditorAction{constructor(){super({id:"editor.action.quickOutline",label:C.QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:p.EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:2048|1024|45,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(u){u.get(c.IQuickInputService).quickAccess.show(b.AbstractGotoSymbolQuickAccessProvider.PREFIX)}}e.GotoLineAction=s,g.registerEditorAction(s)}),define(Q[648],J([0,1,13,114,64]),function(q,e,b,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class w extends b.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:M.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0});this._originalThemeName=null}run(C,d){const g=C.get(N.IStandaloneThemeService);this._originalThemeName?(g.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=g.getColorTheme().themeName,g.setTheme("hc-black"))}}b.registerEditorAction(w)}),define(Q[189],J([0,1,7,55,48,2,518,34,68,37,32,11,112,431,17,359]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=void 0;function u(h,m,_,f,v,y){const L=h.getActions(m);return i(L,_,!1,f,v,y),r(L)}e.createAndFillInActionBarActions=u;function r(h){const m=new w.DisposableStore;for(const[,_]of h)for(const f of _)m.add(f);return m}function i(h,m,_,f=L=>L==="navigation",v=Number.MAX_SAFE_INTEGER,y=()=>!1){let L,I;Array.isArray(m)?(L=m,I=m):(L=m.primary,I=m.secondary);const k=new Set;for(const[E,T]of h){let O;f(E)?O=L:(O=I,O.length>0&&O.push(new M.Separator));for(let A of T){_&&(A=A instanceof C.MenuItemAction&&A.alt?A.alt:A);const B=O.push(A);A instanceof M.SubmenuAction&&k.add({group:E,action:A,index:B-1})}}for(const{group:E,action:T,index:O}of k){const A=f(E)?L:I,B=T.actions;(B.length<=1||A.length+B.length-2<=v)&&y(T,E,A.length)&&A.splice(O,1,...B)}if(L!==I&&L.length>v){const E=L.splice(v,L.length-v);I.unshift(...E,new M.Separator)}}let n=class extends o.ActionViewItem{constructor(m,_,f){super(void 0,m,{icon:!!(m.class||m.item.icon),label:!m.class&&!m.item.icon});this._action=m,this._keybindingService=_,this._notificationService=f,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new w.MutableDisposable),this._altKey=b.ModifierKeyEmitter.getInstance()}get _commandAction(){return this._wantsAltCommand&&this._action.alt||this._action}onClick(m){m.preventDefault(),m.stopPropagation(),this.actionRunner.run(this._commandAction,this._context).catch(_=>this._notificationService.error(_))}render(m){super.render(m),m.classList.add("menu-entry"),this._updateItemClass(this._action.item);let _=!1,f=this._altKey.keyStatus.altKey||(a.isWindows||a.isLinux)&&this._altKey.keyStatus.shiftKey;const v=()=>{const y=_&&f;y!==this._wantsAltCommand&&(this._wantsAltCommand=y,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._action.alt&&this._register(this._altKey.event(y=>{f=y.altKey||(a.isWindows||a.isLinux)&&y.shiftKey,v()})),this._register(N.domEvent(m,"mouseleave")(y=>{_=!1,v()})),this._register(N.domEvent(m,"mouseenter")(y=>{_=!0,v()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const m=this._keybindingService.lookupKeybinding(this._commandAction.id),_=m&&m.getLabel(),f=this._commandAction.tooltip||this._commandAction.label;this.label.title=_?S.localize(0,null,f,_):f}}updateClass(){this.options.icon&&(this._commandAction!==this._action?this._action.alt&&this._updateItemClass(this._action.alt.item):this._action.alt&&this._updateItemClass(this._action.item))}_updateItemClass(m){var _;this._itemClassDispose.value=void 0;const{element:f,label:v}=this;if(!(!f||!v)){const y=this._commandAction.checked&&((_=m.toggled)===null||_===void 0?void 0:_.icon)?m.toggled.icon:m.icon;if(!!y)if(c.ThemeIcon.isThemeIcon(y)){const L=c.ThemeIcon.asClassName(y);v.classList.add(...L.split(" ")),this._itemClassDispose.value=w.toDisposable(()=>{v.classList.remove(...L.split(" "))})}else y.light&&v.style.setProperty("--menu-entry-icon-light",b.asCSSUrl(y.light)),y.dark&&v.style.setProperty("--menu-entry-icon-dark",b.asCSSUrl(y.dark)),v.classList.add("icon"),this._itemClassDispose.value=w.toDisposable(()=>{v.classList.remove("icon"),v.style.removeProperty("--menu-entry-icon-light"),v.style.removeProperty("--menu-entry-icon-dark")})}}};n=Me([_e(1,g.IKeybindingService),_e(2,p.INotificationService)],n),e.MenuEntryActionViewItem=n;let t=class extends s.DropdownMenuActionViewItem{constructor(m,_){super(m,{getActions:()=>m.actions},_,{menuAsChild:!0,classNames:c.ThemeIcon.isThemeIcon(m.item.icon)?c.ThemeIcon.asClassName(m.item.icon):void 0})}render(m){if(super.render(m),this.element){m.classList.add("menu-entry");const{icon:_}=this._action.item;_&&!c.ThemeIcon.isThemeIcon(_)&&(this.element.classList.add("icon"),_.light&&this.element.style.setProperty("--menu-entry-icon-light",b.asCSSUrl(_.light)),_.dark&&this.element.style.setProperty("--menu-entry-icon-dark",b.asCSSUrl(_.dark)))}}};t=Me([_e(1,d.IContextMenuService)],t),e.SubmenuEntryActionViewItem=t;function l(h,m){return m instanceof C.MenuItemAction?h.createInstance(n,m):m instanceof C.SubmenuItemAction?h.createInstance(t,m):void 0}e.createActionViewItem=l}),define(Q[118],J([0,1,7,83,48,29,6,40,28,144,543,500,16,9,74,13,22,27,189,349]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.peekViewEditorMatchHighlightBorder=e.peekViewEditorMatchHighlight=e.peekViewResultsMatchHighlight=e.peekViewEditorGutterBackground=e.peekViewEditorBackground=e.peekViewResultsSelectionForeground=e.peekViewResultsSelectionBackground=e.peekViewResultsFileForeground=e.peekViewResultsMatchForeground=e.peekViewResultsBackground=e.peekViewBorder=e.peekViewTitleInfoForeground=e.peekViewTitleForeground=e.peekViewTitleBackground=e.PeekViewWidget=e.getOuterEditor=e.PeekContext=e.IPeekViewService=void 0,e.IPeekViewService=s.createDecorator("IPeekViewService"),a.registerSingleton(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(f,v){const y=this._widgets.get(f);y&&(y.listener.dispose(),y.widget.dispose());const L=()=>{const I=this._widgets.get(f);I&&I.widget===v&&(I.listener.dispose(),this._widgets.delete(f))};this._widgets.set(f,{widget:v,listener:v.onDidClose(L)})}});var t;(function(f){f.inPeekEditor=new o.RawContextKey("inReferenceSearchEditor",!0),f.notInPeekEditor=f.inPeekEditor.toNegated()})(t=e.PeekContext||(e.PeekContext={}));let l=class{constructor(v,y){v instanceof g.EmbeddedCodeEditorWidget&&t.inPeekEditor.bindTo(y)}dispose(){}};l.ID="editor.contrib.referenceController",l=Me([_e(1,o.IContextKeyService)],l),u.registerEditorContribution(l.ID,l);function h(f){let v=f.get(d.ICodeEditorService).getFocusedCodeEditor();return v instanceof g.EmbeddedCodeEditorWidget?v.getParentEditor():v}e.getOuterEditor=h;const m={headerBackgroundColor:w.Color.white,primaryHeadingColor:w.Color.fromHex("#333333"),secondaryHeadingColor:w.Color.fromHex("#6c6c6cb3")};let _=class extends p.ZoneWidget{constructor(v,y,L){super(v,y);this.instantiationService=L,this._onDidClose=new S.Emitter,this.onDidClose=this._onDidClose.event,C.mixin(this.options,m,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(v){let y=this.options;v.headerBackgroundColor&&(y.headerBackgroundColor=v.headerBackgroundColor),v.primaryHeadingColor&&(y.primaryHeadingColor=v.primaryHeadingColor),v.secondaryHeadingColor&&(y.secondaryHeadingColor=v.secondaryHeadingColor),super.style(v)}_applyStyles(){super._applyStyles();let v=this.options;this._headElement&&v.headerBackgroundColor&&(this._headElement.style.backgroundColor=v.headerBackgroundColor.toString()),this._primaryHeading&&v.primaryHeadingColor&&(this._primaryHeading.style.color=v.primaryHeadingColor.toString()),this._secondaryHeading&&v.secondaryHeadingColor&&(this._secondaryHeading.style.color=v.secondaryHeadingColor.toString()),this._bodyElement&&v.frameColor&&(this._bodyElement.style.borderColor=v.frameColor.toString())}_fillContainer(v){this.setCssClass("peekview-widget"),this._headElement=b.$(".head"),this._bodyElement=b.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),v.appendChild(this._headElement),v.appendChild(this._bodyElement)}_fillHead(v,y){const L=b.$(".peekview-title");b.append(this._headElement,L),b.addStandardDisposableListener(L,"click",E=>this._onTitleClick(E)),this._fillTitleIcon(L),this._primaryHeading=b.$("span.filename"),this._secondaryHeading=b.$("span.dirname"),this._metaHeading=b.$("span.meta"),b.append(L,this._primaryHeading,this._secondaryHeading,this._metaHeading);const I=b.$(".peekview-actions");b.append(this._headElement,I);const k=this._getActionBarOptions();this._actionbarWidget=new N.ActionBar(I,k),this._disposables.add(this._actionbarWidget),y||this._actionbarWidget.push(new M.Action("peekview.close",c.localize(0,null),i.Codicon.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(v){}_getActionBarOptions(){return{actionViewItemProvider:n.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(v){}setTitle(v,y){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=v,this._primaryHeading.setAttribute("aria-label",v),y?this._secondaryHeading.innerText=y:b.clearNode(this._secondaryHeading))}setMetaTitle(v){this._metaHeading&&(v?(this._metaHeading.innerText=v,b.show(this._metaHeading)):b.hide(this._metaHeading))}_doLayout(v,y){if(!this._isShowing&&v<0){this.dispose();return}const L=Math.ceil(this.editor.getOption(53)*1.2),I=Math.round(v-(L+2));this._doLayoutHead(L,y),this._doLayoutBody(I,y)}_doLayoutHead(v,y){this._headElement&&(this._headElement.style.height=`${v}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(v,y){this._bodyElement&&(this._bodyElement.style.height=`${v}px`)}};_=Me([_e(2,s.IInstantiationService)],_),e.PeekViewWidget=_,e.peekViewTitleBackground=r.registerColor("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},c.localize(1,null)),e.peekViewTitleForeground=r.registerColor("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},c.localize(2,null)),e.peekViewTitleInfoForeground=r.registerColor("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},c.localize(3,null)),e.peekViewBorder=r.registerColor("peekView.border",{dark:"#007acc",light:"#007acc",hc:r.contrastBorder},c.localize(4,null)),e.peekViewResultsBackground=r.registerColor("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:w.Color.black},c.localize(5,null)),e.peekViewResultsMatchForeground=r.registerColor("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:w.Color.white},c.localize(6,null)),e.peekViewResultsFileForeground=r.registerColor("peekViewResult.fileForeground",{dark:w.Color.white,light:"#1E1E1E",hc:w.Color.white},c.localize(7,null)),e.peekViewResultsSelectionBackground=r.registerColor("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},c.localize(8,null)),e.peekViewResultsSelectionForeground=r.registerColor("peekViewResult.selectionForeground",{dark:w.Color.white,light:"#6C6C6C",hc:w.Color.white},c.localize(9,null)),e.peekViewEditorBackground=r.registerColor("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:w.Color.black},c.localize(10,null)),e.peekViewEditorGutterBackground=r.registerColor("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hc:e.peekViewEditorBackground},c.localize(11,null)),e.peekViewResultsMatchHighlight=r.registerColor("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},c.localize(12,null)),e.peekViewEditorMatchHighlight=r.registerColor("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},c.localize(13,null)),e.peekViewEditorMatchHighlightBorder=r.registerColor("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:r.activeContrastBorder},c.localize(14,null))}),define(Q[649],J([0,1,7,83,2,117,511,189,34,16,9]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class c extends C.MenuEntryActionViewItem{updateLabel(){const a=this._keybindingService.lookupKeybinding(this._action.id);if(!a)return super.updateLabel();this.label&&(this.label.textContent=S.localize(0,null,this._action.label,c.symbolPrintEnter(a)))}static symbolPrintEnter(a){var u;return(u=a.getLabel())===null||u===void 0?void 0:u.replace(/\benter\b/gi,"\u23CE")}}let o=class{constructor(a,u,r,i){this._menuService=r,this._contextKeyService=i,this._menuDisposables=new M.DisposableStore,this.element=b.append(a,b.$(".suggest-status-bar"));const n=t=>t instanceof d.MenuItemAction?u.createInstance(c,t):void 0;this._leftActions=new N.ActionBar(this.element,{actionViewItemProvider:n}),this._rightActions=new N.ActionBar(this.element,{actionViewItemProvider:n}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const a=this._menuService.createMenu(w.suggestWidgetStatusbarMenu,this._contextKeyService),u=()=>{const r=[],i=[];for(let[n,t]of a.getActions())n==="left"?r.push(...t):i.push(...t);this._leftActions.clear(),this._leftActions.push(r),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(a.onDidChange(()=>u())),this._menuDisposables.add(a)}hide(){this._menuDisposables.clear()}};o=Me([_e(1,p.IInstantiationService),_e(2,d.IMenuService),_e(3,g.IContextKeyService)],o),e.SuggestWidgetStatus=o}),define(Q[650],J([0,1,15,6,2,34,26,16]),function(q,e,b,N,M,w,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let d=class{constructor(c){this._commandService=c}createMenu(c,o,s=!1){return new g(c,s,this._commandService,o,this)}};d=Me([_e(0,S.ICommandService)],d),e.MenuService=d;let g=class et{constructor(c,o,s,a,u){this._id=c,this._fireEventsForSubmenuChanges=o,this._commandService=s,this._contextKeyService=a,this._menuService=u,this._dispoables=new M.DisposableStore,this._onDidChange=new N.Emitter,this.onDidChange=this._onDidChange.event,this._menuGroups=[],this._contextKeys=new Set,this._build();const r=new b.RunOnceScheduler(()=>this._build(),50);this._dispoables.add(r),this._dispoables.add(w.MenuRegistry.onDidChangeMenu(n=>{n.has(c)&&r.schedule()}));const i=new b.RunOnceScheduler(()=>this._onDidChange.fire(this),50);this._dispoables.add(i),this._dispoables.add(a.onDidChangeContext(n=>{n.affectsSome(this._contextKeys)&&i.schedule()}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const c=w.MenuRegistry.getMenuItems(this._id);let o;c.sort(et._compareMenuItems);for(let s of c){const a=s.group||"";(!o||o[0]!==a)&&(o=[a,[]],this._menuGroups.push(o)),o[1].push(s),this._collectContextKeys(s)}this._onDidChange.fire(this)}_collectContextKeys(c){if(et._fillInKbExprKeys(c.when,this._contextKeys),w.isIMenuItem(c)){if(c.command.precondition&&et._fillInKbExprKeys(c.command.precondition,this._contextKeys),c.command.toggled){const o=c.command.toggled.condition||c.command.toggled;et._fillInKbExprKeys(o,this._contextKeys)}}else this._fireEventsForSubmenuChanges&&w.MenuRegistry.getMenuItems(c.submenu).forEach(this._collectContextKeys,this)}getActions(c){const o=[];for(let s of this._menuGroups){const[a,u]=s,r=[];for(const i of u)if(this._contextKeyService.contextMatchesRules(i.when)){const n=w.isIMenuItem(i)?new w.MenuItemAction(i.command,i.alt,c,this._contextKeyService,this._commandService):new w.SubmenuItemAction(i,this._menuService,this._contextKeyService,c);r.push(n)}r.length>0&&o.push([a,r])}return o}static _fillInKbExprKeys(c,o){if(c)for(let s of c.keys())o.add(s)}static _compareMenuItems(c,o){let s=c.group,a=o.group;if(s!==a){if(s){if(!a)return-1}else return 1;if(s==="navigation")return-1;if(a==="navigation")return 1;let i=s.localeCompare(a);if(i!==0)return i}let u=c.order||0,r=o.order||0;return u<r?-1:u>r?1:et._compareTitles(w.isIMenuItem(c)?c.command.title:c.title,w.isIMenuItem(o)?o.command.title:o.title)}static _compareTitles(c,o){const s=typeof c=="string"?c:c.original,a=typeof o=="string"?o:o.original;return s.localeCompare(a)}};g=Me([_e(2,S.ICommandService),_e(3,C.IContextKeyService),_e(4,w.IMenuService)],g)}),define(Q[651],J([0,1,579,68,87,32,11,37,2,7]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuService=void 0;let p=class extends d.Disposable{constructor(o,s,a,u,r){super();this.contextMenuHandler=new b.ContextMenuHandler(a,o,s,u,r)}configure(o){this.contextMenuHandler.configure(o)}showContextMenu(o){this.contextMenuHandler.showContextMenu(o),g.ModifierKeyEmitter.getInstance().resetKeyStatus()}};p=Me([_e(0,M.ITelemetryService),_e(1,w.INotificationService),_e(2,N.IContextViewService),_e(3,C.IKeybindingService),_e(4,S.IThemeService)],p),e.ContextMenuService=p}),define(Q[147],J([0,1,7,312,105,6,2,523,46,95,16,9,37,33,116,11,250,234,428,427,65,315]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchCompressibleAsyncDataTree=e.WorkbenchAsyncDataTree=e.WorkbenchDataTree=e.WorkbenchCompressibleObjectTree=e.WorkbenchObjectTree=e.WorkbenchTable=e.WorkbenchPagedList=e.WorkbenchList=e.didBindWorkbenchListAutomaticKeyboardNavigation=e.WorkbenchListAutomaticKeyboardNavigation=e.WorkbenchListAutomaticKeyboardNavigationKey=e.WorkbenchListSupportsKeyboardNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.ListService=e.IListService=void 0,e.IListService=c.createDecorator("listService");let m=class{constructor(oe){this._themeService=oe,this.disposables=new S.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(oe,ae){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const j=new M.DefaultStyleController(b.createStyleSheet(),"");this.disposables.add(a.attachListStyler(j,this._themeService))}if(this.lists.some(j=>j.widget===oe))throw new Error("Cannot register the same widget multiple times");const G={widget:oe,extraContextKeys:ae};return this.lists.push(G),oe.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=oe),S.combinedDisposable(oe.onDidFocus(()=>this._lastFocusedWidget=oe),S.toDisposable(()=>this.lists.splice(this.lists.indexOf(G),1)),oe.onDidDispose(()=>{this.lists=this.lists.filter(j=>j!==G),this._lastFocusedWidget===oe&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};m=Me([_e(0,u.IThemeService)],m),e.ListService=m;const _=new p.RawContextKey("listFocus",!0);e.WorkbenchListSupportsMultiSelectContextKey=new p.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=p.ContextKeyExpr.and(_,p.ContextKeyExpr.not(r.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new p.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new p.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new p.RawContextKey("listMultiSelection",!1),e.WorkbenchListSupportsKeyboardNavigation=new p.RawContextKey("listSupportsKeyboardNavigation",!0),e.WorkbenchListAutomaticKeyboardNavigationKey="listAutomaticKeyboardNavigation",e.WorkbenchListAutomaticKeyboardNavigation=new p.RawContextKey(e.WorkbenchListAutomaticKeyboardNavigationKey,!0),e.didBindWorkbenchListAutomaticKeyboardNavigation=!1;function f(ie,oe){const ae=ie.createScoped(oe.getHTMLElement());return _.bindTo(ae),ae}const v="workbench.list.multiSelectModifier",y="workbench.list.openMode",L="workbench.list.horizontalScrolling",I="workbench.list.keyboardNavigation",k="workbench.list.automaticKeyboardNavigation",E="workbench.tree.indent",T="workbench.tree.renderIndentGuides",O="workbench.list.smoothScrolling",A="workbench.tree.expandMode";function B(ie){return ie.getValue(v)==="alt"}class F extends S.Disposable{constructor(oe){super();this.configurationService=oe,this.useAltAsMultipleSelectionModifier=B(oe),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(oe=>{oe.affectsConfiguration(v)&&(this.useAltAsMultipleSelectionModifier=B(this.configurationService))}))}isSelectionSingleChangeEvent(oe){return this.useAltAsMultipleSelectionModifier?oe.browserEvent.altKey:M.isSelectionSingleChangeEvent(oe)}isSelectionRangeChangeEvent(oe){return M.isSelectionRangeChangeEvent(oe)}}function D(ie,oe,ae){const G=new S.DisposableStore,j=Object.assign({},ie);if(ie.multipleSelectionSupport!==!1&&!ie.multipleSelectionController){const te=new F(oe);j.multipleSelectionController=te,G.add(te)}return j.keyboardNavigationDelegate={mightProducePrintableCharacter(te){return ae.mightProducePrintableCharacter(te)}},j.smoothScrolling=oe.getValue(O),[j,G]}let R=class extends M.List{constructor(oe,ae,G,j,te,Z,ue,he,re,ce){const me=typeof te.horizontalScrolling!="undefined"?te.horizontalScrolling:re.getValue(L),[Ce,be]=D(te,re,ce);super(oe,ae,G,j,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},a.computeStyles(he.getColorTheme(),a.defaultListStyles)),Ce),{horizontalScrolling:me}));this.disposables.add(be),this.contextKeyService=f(Z,this),this.themeService=he,e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(te.multipleSelectionSupport!==!1),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=te.horizontalScrolling,this._useAltAsMultipleSelectionModifier=B(re),this.disposables.add(this.contextKeyService),this.disposables.add(ue.register(this)),te.overrideStyles&&this.updateStyles(te.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const De=this.getSelection(),Re=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(De.length>0||Re.length>0),this.listMultiSelection.set(De.length>1),this.listDoubleSelection.set(De.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const De=this.getSelection(),Re=this.getFocus();this.listHasSelectionOrFocus.set(De.length>0||Re.length>0)})),this.disposables.add(re.onDidChangeConfiguration(De=>{De.affectsConfiguration(v)&&(this._useAltAsMultipleSelectionModifier=B(re));let Re={};if(De.affectsConfiguration(L)&&this.horizontalScrolling===void 0){const Ee=re.getValue(L);Re=Object.assign(Object.assign({},Re),{horizontalScrolling:Ee})}if(De.affectsConfiguration(O)){const Ee=re.getValue(O);Re=Object.assign(Object.assign({},Re),{smoothScrolling:Ee})}Object.keys(Re).length>0&&this.updateOptions(Re)})),this.navigator=new Y(this,Object.assign({configurationService:re},te)),this.disposables.add(this.navigator)}updateOptions(oe){super.updateOptions(oe),oe.overrideStyles&&this.updateStyles(oe.overrideStyles)}updateStyles(oe){var ae;(ae=this._styler)===null||ae===void 0||ae.dispose(),this._styler=a.attachListStyler(this,this.themeService,oe)}dispose(){var oe;(oe=this._styler)===null||oe===void 0||oe.dispose(),super.dispose()}};R=Me([_e(5,p.IContextKeyService),_e(6,e.IListService),_e(7,u.IThemeService),_e(8,d.IConfigurationService),_e(9,o.IKeybindingService)],R),e.WorkbenchList=R;let W=class extends N.PagedList{constructor(oe,ae,G,j,te,Z,ue,he,re,ce){const me=typeof te.horizontalScrolling!="undefined"?te.horizontalScrolling:re.getValue(L),[Ce,be]=D(te,re,ce);super(oe,ae,G,j,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},a.computeStyles(he.getColorTheme(),a.defaultListStyles)),Ce),{horizontalScrolling:me}));this.disposables=new S.DisposableStore,this.disposables.add(be),this.contextKeyService=f(Z,this),this.themeService=he,this.horizontalScrolling=te.horizontalScrolling,e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(te.multipleSelectionSupport!==!1),this._useAltAsMultipleSelectionModifier=B(re),this.disposables.add(this.contextKeyService),this.disposables.add(ue.register(this)),te.overrideStyles&&this.updateStyles(te.overrideStyles),te.overrideStyles&&this.disposables.add(a.attachListStyler(this,he,te.overrideStyles)),this.disposables.add(re.onDidChangeConfiguration(De=>{De.affectsConfiguration(v)&&(this._useAltAsMultipleSelectionModifier=B(re));let Re={};if(De.affectsConfiguration(L)&&this.horizontalScrolling===void 0){const Ee=re.getValue(L);Re=Object.assign(Object.assign({},Re),{horizontalScrolling:Ee})}if(De.affectsConfiguration(O)){const Ee=re.getValue(O);Re=Object.assign(Object.assign({},Re),{smoothScrolling:Ee})}Object.keys(Re).length>0&&this.updateOptions(Re)})),this.navigator=new Y(this,Object.assign({configurationService:re},te)),this.disposables.add(this.navigator)}updateOptions(oe){super.updateOptions(oe),oe.overrideStyles&&this.updateStyles(oe.overrideStyles)}updateStyles(oe){var ae;(ae=this._styler)===null||ae===void 0||ae.dispose(),this._styler=a.attachListStyler(this,this.themeService,oe)}dispose(){var oe;(oe=this._styler)===null||oe===void 0||oe.dispose(),this.disposables.dispose(),super.dispose()}};W=Me([_e(5,p.IContextKeyService),_e(6,e.IListService),_e(7,u.IThemeService),_e(8,d.IConfigurationService),_e(9,o.IKeybindingService)],W),e.WorkbenchPagedList=W;let x=class extends h.Table{constructor(oe,ae,G,j,te,Z,ue,he,re,ce,me){const Ce=typeof Z.horizontalScrolling!="undefined"?Z.horizontalScrolling:ce.getValue(L),[be,Le]=D(Z,ce,me);super(oe,ae,G,j,te,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},a.computeStyles(re.getColorTheme(),a.defaultListStyles)),be),{horizontalScrolling:Ce}));this.disposables=new S.DisposableStore,this.disposables.add(Le),this.contextKeyService=f(ue,this),this.themeService=re,e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(Z.multipleSelectionSupport!==!1),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=Z.horizontalScrolling,this._useAltAsMultipleSelectionModifier=B(ce),this.disposables.add(this.contextKeyService),this.disposables.add(he.register(this)),Z.overrideStyles&&this.updateStyles(Z.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Re=this.getSelection(),Ee=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Re.length>0||Ee.length>0),this.listMultiSelection.set(Re.length>1),this.listDoubleSelection.set(Re.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Re=this.getSelection(),Ee=this.getFocus();this.listHasSelectionOrFocus.set(Re.length>0||Ee.length>0)})),this.disposables.add(ce.onDidChangeConfiguration(Re=>{Re.affectsConfiguration(v)&&(this._useAltAsMultipleSelectionModifier=B(ce));let Ee={};if(Re.affectsConfiguration(L)&&this.horizontalScrolling===void 0){const Ae=ce.getValue(L);Ee=Object.assign(Object.assign({},Ee),{horizontalScrolling:Ae})}if(Re.affectsConfiguration(O)){const Ae=ce.getValue(O);Ee=Object.assign(Object.assign({},Ee),{smoothScrolling:Ae})}Object.keys(Ee).length>0&&this.updateOptions(Ee)})),this.navigator=new ee(this,Object.assign({configurationService:ce},Z)),this.disposables.add(this.navigator)}updateOptions(oe){super.updateOptions(oe),oe.overrideStyles&&this.updateStyles(oe.overrideStyles)}updateStyles(oe){var ae;(ae=this._styler)===null||ae===void 0||ae.dispose(),this._styler=a.attachListStyler(this,this.themeService,oe)}dispose(){var oe;(oe=this._styler)===null||oe===void 0||oe.dispose(),this.disposables.dispose(),super.dispose()}};x=Me([_e(6,p.IContextKeyService),_e(7,e.IListService),_e(8,u.IThemeService),_e(9,d.IConfigurationService),_e(10,o.IKeybindingService)],x),e.WorkbenchTable=x;class K extends S.Disposable{constructor(oe,ae){var G,j;super();this.widget=oe,this._onDidOpen=this._register(new w.Emitter),this.onDidOpen=this._onDidOpen.event,this.openOnFocus=(G=ae==null?void 0:ae.openOnFocus)!==null&&G!==void 0?G:!1,this._register(w.Event.filter(this.widget.onDidChangeSelection,te=>te.browserEvent instanceof KeyboardEvent)(te=>this.onSelectionFromKeyboard(te))),this._register(this.widget.onPointer(te=>this.onPointer(te.element,te.browserEvent))),this._register(this.widget.onMouseDblClick(te=>this.onMouseDblClick(te.element,te.browserEvent))),this.openOnFocus&&this._register(w.Event.filter(this.widget.onDidChangeFocus,te=>te.browserEvent instanceof KeyboardEvent)(te=>this.onFocusFromKeyboard(te))),typeof(ae==null?void 0:ae.openOnSingleClick)!="boolean"&&(ae==null?void 0:ae.configurationService)?(this.openOnSingleClick=(ae==null?void 0:ae.configurationService.getValue(y))!=="doubleClick",this._register(ae==null?void 0:ae.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(ae==null?void 0:ae.configurationService.getValue(y))!=="doubleClick"}))):this.openOnSingleClick=(j=ae==null?void 0:ae.openOnSingleClick)!==null&&j!==void 0?j:!0}onFocusFromKeyboard(oe){const ae=this.widget.getFocus();this.widget.setSelection(ae,oe.browserEvent);const G=oe.browserEvent,j=typeof G.preserveFocus=="boolean"?G.preserveFocus:!0,te=typeof G.pinned=="boolean"?G.pinned:!j,Z=!1;this._open(this.getSelectedElement(),j,te,Z,oe.browserEvent)}onSelectionFromKeyboard(oe){if(oe.elements.length===1){const ae=oe.browserEvent,G=typeof ae.preserveFocus=="boolean"?ae.preserveFocus:!0,j=typeof ae.pinned=="boolean"?ae.pinned:!G,te=!1;this._open(this.getSelectedElement(),G,j,te,oe.browserEvent)}}onPointer(oe,ae){if(!!this.openOnSingleClick&&ae.detail!==2){const j=ae.button===1,te=!0,Z=j,ue=ae.ctrlKey||ae.metaKey||ae.altKey;this._open(oe,te,Z,ue,ae)}}onMouseDblClick(oe,ae){if(!!ae){const G=!1,j=!0,te=ae.ctrlKey||ae.metaKey||ae.altKey;this._open(oe,G,j,te,ae)}}_open(oe,ae,G,j,te){!oe||this._onDidOpen.fire({editorOptions:{preserveFocus:ae,pinned:G,revealIfVisible:!0},sideBySide:j,element:oe,browserEvent:te})}}class Y extends K{constructor(oe,ae){super(oe,ae);this.widget=oe}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ee extends K{constructor(oe,ae){super(oe,ae);this.widget=oe}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class se extends K{constructor(oe,ae){super(oe,ae);this.widget=oe}getSelectedElement(){var oe;return(oe=this.widget.getSelection()[0])!==null&&oe!==void 0?oe:void 0}}function ne(ie,oe){let ae=!1;return G=>{if(ae)return ae=!1,!1;const j=oe.softDispatch(G,ie);return j&&j.enterChord?(ae=!0,!1):(ae=!1,!0)}}let le=class extends i.ObjectTree{constructor(oe,ae,G,j,te,Z,ue,he,re,ce,me){const{options:Ce,getAutomaticKeyboardNavigation:be,disposable:Le}=U(ae,te,Z,re,ce,me);super(oe,ae,G,j,Ce);this.disposables.add(Le),this.internals=new H(this,te,be,te.overrideStyles,Z,ue,he,re,me),this.disposables.add(this.internals)}};le=Me([_e(5,p.IContextKeyService),_e(6,e.IListService),_e(7,u.IThemeService),_e(8,d.IConfigurationService),_e(9,o.IKeybindingService),_e(10,l.IAccessibilityService)],le),e.WorkbenchObjectTree=le;let X=class extends i.CompressibleObjectTree{constructor(oe,ae,G,j,te,Z,ue,he,re,ce,me){const{options:Ce,getAutomaticKeyboardNavigation:be,disposable:Le}=U(ae,te,Z,re,ce,me);super(oe,ae,G,j,Ce);this.disposables.add(Le),this.internals=new H(this,te,be,te.overrideStyles,Z,ue,he,re,me),this.disposables.add(this.internals)}updateOptions(oe={}){super.updateOptions(oe),oe.overrideStyles&&this.internals.updateStyleOverrides(oe.overrideStyles)}};X=Me([_e(5,p.IContextKeyService),_e(6,e.IListService),_e(7,u.IThemeService),_e(8,d.IConfigurationService),_e(9,o.IKeybindingService),_e(10,l.IAccessibilityService)],X),e.WorkbenchCompressibleObjectTree=X;let z=class extends t.DataTree{constructor(oe,ae,G,j,te,Z,ue,he,re,ce,me,Ce){const{options:be,getAutomaticKeyboardNavigation:Le,disposable:De}=U(ae,Z,ue,ce,me,Ce);super(oe,ae,G,j,te,be);this.disposables.add(De),this.internals=new H(this,Z,Le,Z.overrideStyles,ue,he,re,ce,Ce),this.disposables.add(this.internals)}updateOptions(oe={}){super.updateOptions(oe),oe.overrideStyles&&this.internals.updateStyleOverrides(oe.overrideStyles)}};z=Me([_e(6,p.IContextKeyService),_e(7,e.IListService),_e(8,u.IThemeService),_e(9,d.IConfigurationService),_e(10,o.IKeybindingService),_e(11,l.IAccessibilityService)],z),e.WorkbenchDataTree=z;let P=class extends n.AsyncDataTree{constructor(oe,ae,G,j,te,Z,ue,he,re,ce,me,Ce){const{options:be,getAutomaticKeyboardNavigation:Le,disposable:De}=U(ae,Z,ue,ce,me,Ce);super(oe,ae,G,j,te,be);this.disposables.add(De),this.internals=new H(this,Z,Le,Z.overrideStyles,ue,he,re,ce,Ce),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(oe={}){super.updateOptions(oe),oe.overrideStyles&&this.internals.updateStyleOverrides(oe.overrideStyles)}};P=Me([_e(6,p.IContextKeyService),_e(7,e.IListService),_e(8,u.IThemeService),_e(9,d.IConfigurationService),_e(10,o.IKeybindingService),_e(11,l.IAccessibilityService)],P),e.WorkbenchAsyncDataTree=P;let V=class extends n.CompressibleAsyncDataTree{constructor(oe,ae,G,j,te,Z,ue,he,re,ce,me,Ce,be){const{options:Le,getAutomaticKeyboardNavigation:De,disposable:Re}=U(ae,ue,he,me,Ce,be);super(oe,ae,G,j,te,Z,Le);this.disposables.add(Re),this.internals=new H(this,ue,De,ue.overrideStyles,he,re,ce,me,be),this.disposables.add(this.internals)}};V=Me([_e(7,p.IContextKeyService),_e(8,e.IListService),_e(9,u.IThemeService),_e(10,d.IConfigurationService),_e(11,o.IKeybindingService),_e(12,l.IAccessibilityService)],V),e.WorkbenchCompressibleAsyncDataTree=V;function U(ie,oe,ae,G,j,te){var Z;e.WorkbenchListSupportsKeyboardNavigation.bindTo(ae),e.didBindWorkbenchListAutomaticKeyboardNavigation||(e.WorkbenchListAutomaticKeyboardNavigation.bindTo(ae),e.didBindWorkbenchListAutomaticKeyboardNavigation=!0);const ue=()=>{let Le=ae.getContextKeyValue(e.WorkbenchListAutomaticKeyboardNavigationKey);return Le&&(Le=G.getValue(k)),Le},he=te.isScreenReaderOptimized(),re=oe.simpleKeyboardNavigation||he?"simple":G.getValue(I),ce=oe.horizontalScrolling!==void 0?oe.horizontalScrolling:G.getValue(L),[me,Ce]=D(oe,G,j),be=oe.additionalScrollHeight;return{getAutomaticKeyboardNavigation:ue,disposable:Ce,options:Object.assign(Object.assign({keyboardSupport:!1},me),{indent:G.getValue(E),renderIndentGuides:G.getValue(T),smoothScrolling:G.getValue(O),automaticKeyboardNavigation:ue(),simpleKeyboardNavigation:re==="simple",filterOnType:re==="filter",horizontalScrolling:ce,keyboardNavigationEventFilter:ne(ie,j),additionalScrollHeight:be,hideTwistiesOfChildlessElements:oe.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(Z=oe.expandOnlyOnTwistieClick)!==null&&Z!==void 0?Z:G.getValue(A)==="doubleClick"})}}let H=class{constructor(oe,ae,G,j,te,Z,ue,he,re){this.tree=oe,this.themeService=ue,this.disposables=[],this.contextKeyService=f(te,oe),e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(ae.multipleSelectionSupport!==!1),this.hasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.hasDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.hasMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=B(he);const me=new Set;me.add(e.WorkbenchListAutomaticKeyboardNavigationKey);const Ce=()=>{const Le=re.isScreenReaderOptimized()?"simple":he.getValue(I);oe.updateOptions({simpleKeyboardNavigation:Le==="simple",filterOnType:Le==="filter"})};this.updateStyleOverrides(j),this.disposables.push(this.contextKeyService,Z.register(oe),oe.onDidChangeSelection(()=>{const be=oe.getSelection(),Le=oe.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(be.length>0||Le.length>0),this.hasMultiSelection.set(be.length>1),this.hasDoubleSelection.set(be.length===2)})}),oe.onDidChangeFocus(()=>{const be=oe.getSelection(),Le=oe.getFocus();this.hasSelectionOrFocus.set(be.length>0||Le.length>0)}),he.onDidChangeConfiguration(be=>{let Le={};if(be.affectsConfiguration(v)&&(this._useAltAsMultipleSelectionModifier=B(he)),be.affectsConfiguration(E)){const De=he.getValue(E);Le=Object.assign(Object.assign({},Le),{indent:De})}if(be.affectsConfiguration(T)){const De=he.getValue(T);Le=Object.assign(Object.assign({},Le),{renderIndentGuides:De})}if(be.affectsConfiguration(O)){const De=he.getValue(O);Le=Object.assign(Object.assign({},Le),{smoothScrolling:De})}if(be.affectsConfiguration(I)&&Ce(),be.affectsConfiguration(k)&&(Le=Object.assign(Object.assign({},Le),{automaticKeyboardNavigation:G()})),be.affectsConfiguration(L)&&ae.horizontalScrolling===void 0){const De=he.getValue(L);Le=Object.assign(Object.assign({},Le),{horizontalScrolling:De})}be.affectsConfiguration(A)&&ae.expandOnlyOnTwistieClick===void 0&&(Le=Object.assign(Object.assign({},Le),{expandOnlyOnTwistieClick:he.getValue(A)==="doubleClick"})),Object.keys(Le).length>0&&oe.updateOptions(Le)}),this.contextKeyService.onDidChangeContext(be=>{be.affectsSome(me)&&oe.updateOptions({automaticKeyboardNavigation:G()})}),re.onDidChangeScreenReaderOptimized(()=>Ce())),this.navigator=new se(oe,Object.assign({configurationService:he},ae)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateStyleOverrides(oe){S.dispose(this.styler),this.styler=oe?a.attachListStyler(this.tree,this.themeService,oe):S.Disposable.None}dispose(){this.disposables=S.dispose(this.disposables),S.dispose(this.styler),this.styler=void 0}};H=Me([_e(4,p.IContextKeyService),_e(5,e.IListService),_e(6,u.IThemeService),_e(7,d.IConfigurationService),_e(8,l.IAccessibilityService)],H),s.Registry.as(g.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:C.localize(0,null),type:"object",properties:{[v]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[C.localize(1,null),C.localize(2,null)],default:"ctrlCmd",description:C.localize(3,null)},[y]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:C.localize(4,null)},[L]:{type:"boolean",default:!1,description:C.localize(5,null)},[E]:{type:"number",default:8,minimum:0,maximum:40,description:C.localize(6,null)},[T]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:C.localize(7,null)},[O]:{type:"boolean",default:!1,description:C.localize(8,null)},[I]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[C.localize(9,null),C.localize(10,null),C.localize(11,null)],default:"highlight",description:C.localize(12,null)},[k]:{type:"boolean",default:!0,markdownDescription:C.localize(13,null)},[A]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:C.localize(14,null)}}})}),define(Q[652],J([0,1,139,9,11,22,23,116,16,65,443,147,574]),function(q,e,b,N,M,w,S,C,d,g,p,c,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let s=class extends M.Themable{constructor(u,r,i,n,t){super(i);this.instantiationService=u,this.contextKeyService=r,this.accessibilityService=n,this.layoutService=t,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(o.QuickAccessController))),this._quickAccess}createController(u=this.layoutService,r){var i,n;const t={idPrefix:"quickInput_",container:u.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:h=>this.setContextKey(h),returnFocus:()=>u.focus(),createList:(h,m,_,f,v)=>this.instantiationService.createInstance(c.WorkbenchList,h,m,_,f,v),styles:this.computeStyles()},l=this._register(new p.QuickInputController(Object.assign(Object.assign({},t),r)));return l.layout(u.dimension,(n=(i=u.offset)===null||i===void 0?void 0:i.top)!==null&&n!==void 0?n:0),this._register(u.onDidLayout(h=>{var m,_;return l.layout(h,(_=(m=u.offset)===null||m===void 0?void 0:m.top)!==null&&_!==void 0?_:0)})),this._register(l.onShow(()=>this.resetContextKeys())),this._register(l.onHide(()=>this.resetContextKeys())),l}setContextKey(u){let r;u&&(r=this.contexts.get(u),r||(r=new d.RawContextKey(u,!1).bindTo(this.contextKeyService),this.contexts.set(u,r))),!(r&&r.get())&&(this.resetContextKeys(),r&&r.set(!0))}resetContextKeys(){this.contexts.forEach(u=>{u.get()&&u.reset()})}pick(u,r={},i=S.CancellationToken.None){return this.controller.pick(u,r,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},C.computeStyles(this.theme,{quickInputBackground:w.quickInputBackground,quickInputForeground:w.quickInputForeground,quickInputTitleBackground:w.quickInputTitleBackground,contrastBorder:w.contrastBorder,widgetShadow:w.widgetShadow})),inputBox:C.computeStyles(this.theme,{inputForeground:w.inputForeground,inputBackground:w.inputBackground,inputBorder:w.inputBorder,inputValidationInfoBackground:w.inputValidationInfoBackground,inputValidationInfoForeground:w.inputValidationInfoForeground,inputValidationInfoBorder:w.inputValidationInfoBorder,inputValidationWarningBackground:w.inputValidationWarningBackground,inputValidationWarningForeground:w.inputValidationWarningForeground,inputValidationWarningBorder:w.inputValidationWarningBorder,inputValidationErrorBackground:w.inputValidationErrorBackground,inputValidationErrorForeground:w.inputValidationErrorForeground,inputValidationErrorBorder:w.inputValidationErrorBorder}),countBadge:C.computeStyles(this.theme,{badgeBackground:w.badgeBackground,badgeForeground:w.badgeForeground,badgeBorder:w.contrastBorder}),button:C.computeStyles(this.theme,{buttonForeground:w.buttonForeground,buttonBackground:w.buttonBackground,buttonHoverBackground:w.buttonHoverBackground,buttonBorder:w.contrastBorder}),progressBar:C.computeStyles(this.theme,{progressBarBackground:w.progressBarBackground}),list:C.computeStyles(this.theme,{listBackground:w.quickInputBackground,listInactiveFocusForeground:w.listFocusForeground,listInactiveFocusBackground:w.quickInputListFocusBackground,listFocusOutline:w.activeContrastBorder,listInactiveFocusOutline:w.activeContrastBorder,pickerGroupBorder:w.pickerGroupBorder,pickerGroupForeground:w.pickerGroupForeground})}}};s=Me([_e(0,N.IInstantiationService),_e(1,d.IContextKeyService),_e(2,M.IThemeService),_e(3,g.IAccessibilityService),_e(4,b.ILayoutService)],s),e.QuickInputService=s}),define(Q[653],J([0,1,13,11,23,9,16,65,139,28,652,88,357]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputServiceImpl=e.EditorScopedQuickInputServiceImpl=void 0;let o=class extends p.QuickInputService{constructor(i,n,t,l,h,m){super(n,t,l,h,m);this.host=void 0;const _=a.get(i);this.host={_serviceBrand:void 0,get container(){return _.widget.getDomNode()},get dimension(){return i.getLayoutInfo()},get onDidLayout(){return i.onDidLayoutChange},focus:()=>i.focus()}}createController(){return super.createController(this.host)}};o=Me([_e(1,w.IInstantiationService),_e(2,S.IContextKeyService),_e(3,N.IThemeService),_e(4,C.IAccessibilityService),_e(5,d.ILayoutService)],o),e.EditorScopedQuickInputServiceImpl=o;let s=class{constructor(i,n){this.instantiationService=i,this.codeEditorService=n,this.mapEditorToService=new Map}get activeService(){const i=this.codeEditorService.getFocusedCodeEditor();if(!i)throw new Error("Quick input service needs a focused editor to work.");let n=this.mapEditorToService.get(i);if(!n){const t=n=this.instantiationService.createInstance(o,i);this.mapEditorToService.set(i,n),c.once(i.onDidDispose)(()=>{t.dispose(),this.mapEditorToService.delete(i)})}return n}get quickAccess(){return this.activeService.quickAccess}pick(i,n={},t=M.CancellationToken.None){return this.activeService.pick(i,n,t)}createQuickPick(){return this.activeService.createQuickPick()}};s=Me([_e(0,w.IInstantiationService),_e(1,g.ICodeEditorService)],s),e.StandaloneQuickInputServiceImpl=s;class a{constructor(i){this.editor=i,this.widget=new u(this.editor)}static get(i){return i.getContribution(a.ID)}dispose(){this.widget.dispose()}}e.QuickInputEditorContribution=a,a.ID="editor.controller.quickInput";class u{constructor(i){this.codeEditor=i,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return u.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}e.QuickInputEditorWidget=u,u.ID="editor.contrib.quickInputWidget",b.registerEditorContribution(a.ID,a)}),define(Q[654],J([0,1,82,11,22,27]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var S;(function(C){function d(g){switch(g){case b.default.Ignore:return"severity-ignore "+w.Codicon.info.classNames;case b.default.Info:return w.Codicon.info.classNames;case b.default.Warning:return w.Codicon.warning.classNames;case b.default.Error:return w.Codicon.error.classNames;default:return""}}C.className=d})(S=e.SeverityIcon||(e.SeverityIcon={})),N.registerThemingParticipant((C,d)=>{const g=C.getColor(M.problemsErrorIconForeground);if(g){const o=w.Codicon.error.cssSelector;d.addRule(`
.monaco-editor .zone-widget ${o},
.markers-panel .marker-icon${o},
.extensions-viewlet > .extensions ${o} {
color: ${g};
}
`)}const p=C.getColor(M.problemsWarningIconForeground);if(p){const o=w.Codicon.warning.cssSelector;d.addRule(`
.monaco-editor .zone-widget ${o},
.markers-panel .marker-icon${o},
.extensions-viewlet > .extensions ${o},
.extension-editor ${o} {
color: ${p};
}
`)}const c=C.getColor(M.problemsInfoIconForeground);if(c){const o=w.Codicon.info.cssSelector;d.addRule(`
.monaco-editor .zone-widget ${o},
.markers-panel .marker-icon${o},
.extensions-viewlet > .extensions ${o},
.extension-editor ${o} {
color: ${c};
}
`)}})}),define(Q[655],J([0,1,480,7,2,85,3,22,11,29,61,159,19,6,118,44,654,58,34,16,189,9,8,115,343]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorMarkerNavigationBackground=e.editorMarkerNavigationInfo=e.editorMarkerNavigationWarning=e.editorMarkerNavigationError=e.MarkerNavigationWidget=void 0;class f{constructor(E,T,O,A,B){this._openerService=A,this._labelService=B,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new M.DisposableStore,this._editor=T;const F=document.createElement("div");F.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),F.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),F.appendChild(this._relatedBlock),this._disposables.add(N.addStandardDisposableListener(this._relatedBlock,"click",D=>{D.preventDefault();const R=this._relatedDiagnostics.get(D.target);R&&O(R)})),this._scrollable=new p.ScrollableElement(F,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),E.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(D=>{F.style.left=`-${D.scrollLeft}px`,F.style.top=`-${D.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){M.dispose(this._disposables)}update(E){const{source:T,message:O,relatedInformation:A,code:B}=E;let F=((T==null?void 0:T.length)||0)+"()".length;B&&(typeof B=="string"?F+=B.length:F+=B.value.length);const D=m.splitLines(O);this._lines=D.length,this._longestLineLength=0;for(const Y of D)this._longestLineLength=Math.max(Y.length+F,this._longestLineLength);N.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(E)),this._editor.applyFontInfo(this._messageBlock);let R=this._messageBlock;for(const Y of D)R=document.createElement("div"),R.innerText=Y,Y===""&&(R.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(R);if(T||B){const Y=document.createElement("span");if(Y.classList.add("details"),R.appendChild(Y),T){const ee=document.createElement("span");ee.innerText=T,ee.classList.add("source"),Y.appendChild(ee)}if(B)if(typeof B=="string"){const ee=document.createElement("span");ee.innerText=`(${B})`,ee.classList.add("code"),Y.appendChild(ee)}else{this._codeLink=N.$("a.code-link"),this._codeLink.setAttribute("href",`${B.target.toString()}`),this._codeLink.onclick=se=>{this._openerService.open(B.target),se.preventDefault(),se.stopPropagation()};const ee=N.append(this._codeLink,N.$("span"));ee.innerText=B.value,Y.appendChild(this._codeLink)}}if(N.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),o.isNonEmptyArray(A)){const Y=this._relatedBlock.appendChild(document.createElement("div"));Y.style.paddingTop=`${Math.floor(this._editor.getOption(53)*.66)}px`,this._lines+=1;for(const ee of A){let se=document.createElement("div"),ne=document.createElement("a");ne.classList.add("filename"),ne.innerText=`${c.getBaseLabel(ee.resource)}(${ee.startLineNumber}, ${ee.startColumn}): `,ne.title=this._labelService.getUriLabel(ee.resource),this._relatedDiagnostics.set(ne,ee);let le=document.createElement("span");le.innerText=ee.message,se.appendChild(ne),se.appendChild(le),this._lines+=1,Y.appendChild(se)}}const W=this._editor.getOption(38),x=Math.ceil(W.typicalFullwidthCharacterWidth*this._longestLineLength*.75),K=W.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:x,scrollHeight:K})}layout(E,T){this._scrollable.getDomNode().style.height=`${E}px`,this._scrollable.getDomNode().style.width=`${T}px`,this._scrollable.setScrollDimensions({width:T,height:E})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(E){let T="";switch(E.severity){case w.MarkerSeverity.Error:T=b.localize(0,null);break;case w.MarkerSeverity.Warning:T=b.localize(1,null);break;case w.MarkerSeverity.Info:T=b.localize(2,null);break;case w.MarkerSeverity.Hint:T=b.localize(3,null);break}let O=b.localize(4,null,T,E.startLineNumber+":"+E.startColumn);const A=this._editor.getModel();return A&&E.startLineNumber<=A.getLineCount()&&E.startLineNumber>=1&&(O=`${A.getLineContent(E.startLineNumber)}, ${O}`),O}}let v=class Kt extends a.PeekViewWidget{constructor(E,T,O,A,B,F,D){super(E,{showArrow:!0,showFrame:!0,isAccessible:!0},B);this._themeService=T,this._openerService=O,this._menuService=A,this._contextKeyService=F,this._labelService=D,this._callOnDispose=new M.DisposableStore,this._onDidSelectRelatedInformation=new s.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=w.MarkerSeverity.Warning,this._backgroundColor=g.Color.white,this._applyTheme(T.getColorTheme()),this._callOnDispose.add(T.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(E){this._backgroundColor=E.getColor(e.editorMarkerNavigationBackground);let T=e.editorMarkerNavigationError;this._severity===w.MarkerSeverity.Warning?T=e.editorMarkerNavigationWarning:this._severity===w.MarkerSeverity.Info&&(T=e.editorMarkerNavigationInfo);const O=E.getColor(T);this.style({arrowColor:O,frameColor:O,headerBackgroundColor:this._backgroundColor,primaryHeadingColor:E.getColor(a.peekViewTitleForeground),secondaryHeadingColor:E.getColor(a.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(E){super._fillHead(E),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(A=>this.editor.focus()));const T=[],O=this._menuService.createMenu(Kt.TitleMenu,this._contextKeyService);l.createAndFillInActionBarActions(O,void 0,T),this._actionbarWidget.push(T,{label:!1,icon:!0,index:0}),O.dispose()}_fillTitleIcon(E){this._icon=N.append(E,N.$(""))}_fillBody(E){this._parentContainer=E,E.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),E.appendChild(this._container),this._message=new f(this._container,this.editor,T=>this._onDidSelectRelatedInformation.fire(T),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(E,T,O){this._container.classList.remove("stale"),this._message.update(E),this._severity=E.severity,this._applyTheme(this._themeService.getColorTheme());let A=S.Range.lift(E);const B=this.editor.getPosition();let F=B&&A.containsPosition(B)?B:A.getStartPosition();super.show(F,this.computeRequiredHeight());const D=this.editor.getModel();if(D){const R=O>1?b.localize(5,null,T,O):b.localize(6,null,T,O);this.setTitle(u.basename(D.uri),R)}this._icon.className=`codicon ${r.SeverityIcon.className(w.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(F,0),this.editor.focus()}updateMarker(E){this._container.classList.remove("stale"),this._message.update(E)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(E,T){super._doLayoutBody(E,T),this._heightInPixel=E,this._message.layout(E,T),this._container.style.height=`${E}px`}_onWidth(E){this._message.layout(this._heightInPixel,E)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};v.TitleMenu=new n.MenuId("gotoErrorTitleMenu"),v=Me([_e(1,d.IThemeService),_e(2,i.IOpenerService),_e(3,n.IMenuService),_e(4,h.IInstantiationService),_e(5,t.IContextKeyService),_e(6,_.ILabelService)],v),e.MarkerNavigationWidget=v;let y=C.oneOf(C.editorErrorForeground,C.editorErrorBorder),L=C.oneOf(C.editorWarningForeground,C.editorWarningBorder),I=C.oneOf(C.editorInfoForeground,C.editorInfoBorder);e.editorMarkerNavigationError=C.registerColor("editorMarkerNavigationError.background",{dark:y,light:y,hc:y},b.localize(7,null)),e.editorMarkerNavigationWarning=C.registerColor("editorMarkerNavigationWarning.background",{dark:L,light:L,hc:L},b.localize(8,null)),e.editorMarkerNavigationInfo=C.registerColor("editorMarkerNavigationInfo.background",{dark:I,light:I,hc:I},b.localize(9,null)),e.editorMarkerNavigationBackground=C.registerColor("editorMarkerNavigation.background",{dark:"#2D2D30",light:g.Color.white,hc:"#0C141F"},b.localize(10,null)),d.registerThemingParticipant((k,E)=>{const T=k.getColor(C.textLinkForeground);T&&(E.addRule(`.monaco-editor .marker-widget a { color: ${T}; }`),E.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${T}; }`))})}),define(Q[80],J([0,1,33,11,6,528,185,15,27]),function(q,e,b,N,M,w,S,C,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.widgetClose=e.iconsSchemaId=e.getIconRegistry=e.registerIcon=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};class g{constructor(){this._onDidChange=new M.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:w.localize(0,null)},fontCharacter:{type:"string",description:w.localize(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${d.CSSIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(i,n,t,l){const h=this.iconsById[i];if(h){if(t&&!h.description){h.description=t,this.iconSchema.properties[i].markdownDescription=`${t} $(${i})`;const f=this.iconReferenceSchema.enum.indexOf(i);f!==-1&&(this.iconReferenceSchema.enumDescriptions[f]=t),this._onDidChange.fire()}return h}let m={id:i,description:t,defaults:n,deprecationMessage:l};this.iconsById[i]=m;let _={$ref:"#/definitions/icons"};return l&&(_.deprecationMessage=l),t&&(_.markdownDescription=`${t}: $(${i})`),this.iconSchema.properties[i]=_,this.iconReferenceSchema.enum.push(i),this.iconReferenceSchema.enumDescriptions.push(t||""),this._onDidChange.fire(),{id:i}}getIcons(){return Object.keys(this.iconsById).map(i=>this.iconsById[i])}getIcon(i){return this.iconsById[i]}getIconSchema(){return this.iconSchema}getIconFont(i){return this.iconFontsById[i]}toString(){const i=(h,m)=>h.id.localeCompare(m.id),n=h=>{for(;N.ThemeIcon.isThemeIcon(h.defaults);)h=this.iconsById[h.defaults.id];return`codicon codicon-${h?h.id:""}`};let t=[];t.push("| preview | identifier | default codicon ID | description"),t.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const l=Object.keys(this.iconsById).map(h=>this.iconsById[h]);for(const h of l.filter(m=>!!m.description).sort(i))t.push(`|<i class="${n(h)}"></i>|${h.id}|${N.ThemeIcon.isThemeIcon(h.defaults)?h.defaults.id:h.id}|${h.description||""}|`);t.push("| preview | identifier "),t.push("| ----------- | --------------------------------- |");for(const h of l.filter(m=>!N.ThemeIcon.isThemeIcon(m.defaults)).sort(i))t.push(`|<i class="${n(h)}"></i>|${h.id}|`);return t.join(`
`)}}const p=new g;b.Registry.add(e.Extensions.IconContribution,p);function c(r,i,n,t){return p.registerIcon(r,i,n,t)}e.registerIcon=c;function o(){return p}e.getIconRegistry=o;function s(){for(const r of d.iconRegistry.all)p.registerIcon(r.id,r.definition,r.description);d.iconRegistry.onDidRegister(r=>p.registerIcon(r.id,r.definition,r.description))}s(),e.iconsSchemaId="vscode://schemas/icons";let a=b.Registry.as(S.Extensions.JSONContribution);a.registerSchema(e.iconsSchemaId,p.getIconSchema());const u=new C.RunOnceScheduler(()=>a.notifySchemaChanged(e.iconsSchemaId),200);p.onDidChange(()=>{u.isScheduled()||u.schedule()}),e.widgetClose=c("widget-close",d.Codicon.close,w.localize(2,null))}),define(Q[656],J([0,1,450,7,30,83,61,48,2,69,13,28,38,113,14,49,129,63,16,22,11,27,80,333]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const f=3;class v{constructor(F,D,R,W){this.originalLineStart=F,this.originalLineEnd=D,this.modifiedLineStart=R,this.modifiedLineEnd=W}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class y{constructor(F){this.entries=F}}const L=m.registerIcon("diff-review-insert",h.Codicon.add,b.localize(0,null)),I=m.registerIcon("diff-review-remove",h.Codicon.remove,b.localize(1,null)),k=m.registerIcon("diff-review-close",h.Codicon.close,b.localize(2,null));class E extends d.Disposable{constructor(F){super();this._width=0,this._diffEditor=F,this._isVisible=!1,this.shadow=M.createFastDomNode(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=M.createFastDomNode(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new w.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new C.Action("diffreview.close",b.localize(3,null),"close-diff-review "+l.ThemeIcon.asClassName(k),!0,()=>(this.hide(),Promise.resolve(null))),{label:!1,icon:!0}),this.domNode=M.createFastDomNode(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=M.createFastDomNode(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new S.DomScrollableElement(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(F.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(F.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(N.addStandardDisposableListener(this.domNode.domNode,"click",D=>{D.preventDefault();let R=N.findParentWithClass(D.target,"diff-review-row");R&&this._goToRow(R)})),this._register(N.addStandardDisposableListener(this.domNode.domNode,"keydown",D=>{(D.equals(18)||D.equals(2048|18)||D.equals(512|18))&&(D.preventDefault(),this._goToRow(this._getNextRow())),(D.equals(16)||D.equals(2048|16)||D.equals(512|16))&&(D.preventDefault(),this._goToRow(this._getPrevRow())),(D.equals(9)||D.equals(2048|9)||D.equals(512|9)||D.equals(1024|9))&&(D.preventDefault(),this.hide()),(D.equals(10)||D.equals(3))&&(D.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let F=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let R=-1;for(let W=0,x=this._diffs.length;W<x;W++)if(this._diffs[W]===this._currentDiff){R=W;break}F=this._diffs.length+R-1}else F=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length!==0){F=F%this._diffs.length;const D=this._diffs[F].entries;this._diffEditor.setPosition(new a.Position(D[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:D[0].modifiedLineStart,endColumn:1073741824,endLineNumber:D[D.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}}next(){let F=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let R=-1;for(let W=0,x=this._diffs.length;W<x;W++)if(this._diffs[W]===this._currentDiff){R=W;break}F=R+1}else F=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length!==0){F=F%this._diffs.length;const D=this._diffs[F].entries;this._diffEditor.setPosition(new a.Position(D[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:D[0].modifiedLineStart,endColumn:1073741824,endLineNumber:D[D.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}}accept(){let F=-1,D=this._getCurrentFocusedRow();if(D){let R=parseInt(D.getAttribute("data-line"),10);isNaN(R)||(F=R)}this.hide(),F!==-1&&(this._diffEditor.setPosition(new a.Position(F,1)),this._diffEditor.revealPosition(new a.Position(F,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let F=this._getCurrentFocusedRow();return F?F.previousElementSibling?F.previousElementSibling:F:this._getFirstRow()}_getNextRow(){let F=this._getCurrentFocusedRow();return F?F.nextElementSibling?F.nextElementSibling:F:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let F=document.activeElement;return F&&/diff-review-row/.test(F.className)?F:null}_goToRow(F){let D=this._getCurrentFocusedRow();F.tabIndex=0,F.focus(),D&&D!==F&&(D.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(F,D,R){this._width=D,this.shadow.setTop(F-6),this.shadow.setWidth(D),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(F),this.domNode.setWidth(D),this.domNode.setHeight(R),this._content.setHeight(R),this._content.setWidth(D),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const F=this._diffEditor.getLineChanges();if(!F||F.length===0)return[];const D=this._diffEditor.getOriginalEditor().getModel(),R=this._diffEditor.getModifiedEditor().getModel();return!D||!R?[]:E._mergeAdjacent(F,D.getLineCount(),R.getLineCount())}static _mergeAdjacent(F,D,R){if(!F||F.length===0)return[];let W=[],x=0;for(let se=0,ne=F.length;se<ne;se++){const le=F[se],X=le.originalStartLineNumber,z=le.originalEndLineNumber,P=le.modifiedStartLineNumber,V=le.modifiedEndLineNumber;let U=[],H=0;{const $=z===0?X:X-1,ie=V===0?P:P-1;let oe=1,ae=1;if(se>0){const te=F[se-1];te.originalEndLineNumber===0?oe=te.originalStartLineNumber+1:oe=te.originalEndLineNumber+1,te.modifiedEndLineNumber===0?ae=te.modifiedStartLineNumber+1:ae=te.modifiedEndLineNumber+1}let G=$-f+1,j=ie-f+1;if(G<oe){const te=oe-G;G=G+te,j=j+te}if(j<ae){const te=ae-j;G=G+te,j=j+te}U[H++]=new v(G,$,j,ie)}z!==0&&(U[H++]=new v(X,z,0,0)),V!==0&&(U[H++]=new v(0,0,P,V));{const $=z===0?X+1:z+1,ie=V===0?P+1:V+1;let oe=D,ae=R;if(se+1<ne){const te=F[se+1];te.originalEndLineNumber===0?oe=te.originalStartLineNumber:oe=te.originalStartLineNumber-1,te.modifiedEndLineNumber===0?ae=te.modifiedStartLineNumber:ae=te.modifiedStartLineNumber-1}let G=$+f-1,j=ie+f-1;if(G>oe){const te=oe-G;G=G+te,j=j+te}if(j>ae){const te=ae-j;G=G+te,j=j+te}U[H++]=new v($,G,ie,j)}W[x++]=new y(U)}let K=W[0].entries,Y=[],ee=0;for(let se=1,ne=W.length;se<ne;se++){const le=W[se].entries,X=K[K.length-1],z=le[0];if(X.getType()===0&&z.getType()===0&&z.originalLineStart<=X.originalLineEnd){K[K.length-1]=new v(X.originalLineStart,z.originalLineEnd,X.modifiedLineStart,z.modifiedLineEnd),K=K.concat(le.slice(1));continue}Y[ee++]=new y(K),K=le}return Y[ee++]=new y(K),Y}_findDiffIndex(F){const D=F.lineNumber;for(let R=0,W=this._diffs.length;R<W;R++){const x=this._diffs[R].entries,K=x[x.length-1].modifiedLineEnd;if(D<=K)return R}return 0}_render(){const F=this._diffEditor.getOriginalEditor().getOptions(),D=this._diffEditor.getModifiedEditor().getOptions(),R=this._diffEditor.getOriginalEditor().getModel(),W=this._diffEditor.getModifiedEditor().getModel(),x=R.getOptions(),K=W.getOptions();if(!this._isVisible||!R||!W){N.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const Y=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[Y]!==this._currentDiff){this._currentDiff=this._diffs[Y];const ee=this._diffs[Y].entries;let se=document.createElement("div");se.className="diff-review-table",se.setAttribute("role","list"),se.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),g.Configuration.applyFontInfoSlow(se,D.get(38));let ne=0,le=0,X=0,z=0;for(let j=0,te=ee.length;j<te;j++){const Z=ee[j],ue=Z.originalLineStart,he=Z.originalLineEnd,re=Z.modifiedLineStart,ce=Z.modifiedLineEnd;ue!==0&&(ne===0||ue<ne)&&(ne=ue),he!==0&&(le===0||he>le)&&(le=he),re!==0&&(X===0||re<X)&&(X=re),ce!==0&&(z===0||ce>z)&&(z=ce)}let P=document.createElement("div");P.className="diff-review-row";let V=document.createElement("div");V.className="diff-review-cell diff-review-summary";const U=le-ne+1,H=z-X+1;V.appendChild(document.createTextNode(`${Y+1}/${this._diffs.length}: @@ -${ne},${U} +${X},${H} @@`)),P.setAttribute("data-line",String(X));const $=j=>j===0?b.localize(4,null):j===1?b.localize(5,null):b.localize(6,null,j),ie=$(U),oe=$(H);P.setAttribute("aria-label",b.localize(7,null,Y+1,this._diffs.length,ne,ie,X,oe)),P.appendChild(V),P.setAttribute("role","listitem"),se.appendChild(P);const ae=D.get(53);let G=X;for(let j=0,te=ee.length;j<te;j++){const Z=ee[j];E._renderSection(se,Z,G,ae,this._width,F,R,x,D,W,K),Z.modifiedLineStart!==0&&(G=Z.modifiedLineEnd)}N.clearNode(this._content.domNode),this._content.domNode.appendChild(se),this.scrollbar.scanDomNode()}}static _renderSection(F,D,R,W,x,K,Y,ee,se,ne,le){const X=D.getType();let z="diff-review-row",P="";const V="diff-review-spacer";let U=null;switch(X){case 1:z="diff-review-row line-insert",P=" char-insert",U=L;break;case 2:z="diff-review-row line-delete",P=" char-delete",U=I;break}const H=D.originalLineStart,$=D.originalLineEnd,ie=D.modifiedLineStart,oe=D.modifiedLineEnd,ae=Math.max(oe-ie,$-H),G=K.get(124),j=G.glyphMarginWidth+G.lineNumbersWidth,te=se.get(124),Z=10+te.glyphMarginWidth+te.lineNumbersWidth;for(let ue=0;ue<=ae;ue++){const he=H===0?0:H+ue,re=ie===0?0:ie+ue,ce=document.createElement("div");ce.style.minWidth=x+"px",ce.className=z,ce.setAttribute("role","listitem"),re!==0&&(R=re),ce.setAttribute("data-line",String(R));let me=document.createElement("div");me.className="diff-review-cell",me.style.height=`${W}px`,ce.appendChild(me);const Ce=document.createElement("span");Ce.style.width=j+"px",Ce.style.minWidth=j+"px",Ce.className="diff-review-line-number"+P,he!==0?Ce.appendChild(document.createTextNode(String(he))):Ce.innerText="\xA0",me.appendChild(Ce);const be=document.createElement("span");be.style.width=Z+"px",be.style.minWidth=Z+"px",be.style.paddingRight="10px",be.className="diff-review-line-number"+P,re!==0?be.appendChild(document.createTextNode(String(re))):be.innerText="\xA0",me.appendChild(be);const Le=document.createElement("span");if(Le.className=V,U){const Ee=document.createElement("span");Ee.className=l.ThemeIcon.asClassName(U),Ee.innerText="\xA0\xA0",Le.appendChild(Ee)}else Le.innerText="\xA0\xA0";me.appendChild(Le);let De;if(re!==0){let Ee=this._renderLine(ne,se,le.tabSize,re);E._ttPolicy&&(Ee=E._ttPolicy.createHTML(Ee)),me.insertAdjacentHTML("beforeend",Ee),De=ne.getLineContent(re)}else{let Ee=this._renderLine(Y,K,ee.tabSize,he);E._ttPolicy&&(Ee=E._ttPolicy.createHTML(Ee)),me.insertAdjacentHTML("beforeend",Ee),De=Y.getLineContent(he)}De.length===0&&(De=b.localize(8,null));let Re="";switch(X){case 0:he===re?Re=b.localize(9,null,De,he):Re=b.localize(10,null,De,he,re);break;case 1:Re=b.localize(11,null,De,re);break;case 2:Re=b.localize(12,null,De,he);break}ce.setAttribute("aria-label",Re),F.appendChild(ce)}}static _renderLine(F,D,R,W){const x=F.getLineContent(W),K=D.get(38),Y=(0<<11|1<<14|2<<23)>>>0,ee=new Uint32Array(2);ee[0]=x.length,ee[1]=Y;const se=new s.LineTokens(ee,x),ne=i.ViewLineRenderingData.isBasicASCII(x,F.mightContainNonBasicASCII()),le=i.ViewLineRenderingData.containsRTL(x,ne,F.mightContainRTL());return r.renderViewLine2(new r.RenderLineInput(K.isMonospace&&!D.get(26),K.canUseHalfwidthRightwardsArrow,x,!1,ne,le,0,se,[],R,0,K.spaceWidth,K.middotWidth,K.wsmiddotWidth,D.get(100),D.get(83),D.get(77),D.get(39)!==o.EditorFontLigatures.OFF,null)).html}}e.DiffReview=E,E._ttPolicy=(_=window.trustedTypes)===null||_===void 0?void 0:_.createPolicy("diffReview",{createHTML:B=>B}),l.registerThemingParticipant((B,F)=>{const D=B.getColor(u.editorLineNumbers);D&&F.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${D}; }`);const R=B.getColor(t.scrollbarShadow);R&&F.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${R} 0 -6px 6px -6px inset; }`)});class T extends p.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:b.localize(13,null),alias:"Go to Next Difference",precondition:n.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(F,D){const R=A(F);R&&R.diffReviewNext()}}class O extends p.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:b.localize(14,null),alias:"Go to Previous Difference",precondition:n.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1024|65,weight:100}})}run(F,D){const R=A(F);R&&R.diffReviewPrev()}}function A(B){const F=B.get(c.ICodeEditorService),D=F.listDiffEditors(),R=F.getActiveCodeEditor();if(!R)return null;for(let W=0,x=D.length;W<x;W++){const K=D[W];if(K.getModifiedEditor().getId()===R.getId()||K.getOriginalEditor().getId()===R.getId())return K}return null}p.registerEditorAction(T),p.registerEditorAction(O)}),define(Q[266],J([0,1,449,7,30,104,15,6,2,69,70,28,143,656,38,3,93,107,31,75,221,171,129,63,16,9,138,32,22,11,68,452,84,13,12,59,212,27,124,80,332]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I,k,E,T,O,A,B,F,D,R,W,x){"use strict";var K;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;class Y{constructor(re,ce){this._contextMenuService=re,this._clipboardService=ce,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(re){return re.filter(ce=>!this._zonesMap[String(ce.id)])}clean(re){this._zones.length>0&&re.changeViewZones(ce=>{for(const me of this._zones)ce.removeZone(me)}),this._zones=[],this._zonesMap={},this._decorations=re.deltaDecorations(this._decorations,[])}apply(re,ce,me,Ce){const be=Ce?p.StableEditorScrollState.capture(re):null;re.changeViewZones(Le=>{for(const De of this._zones)Le.removeZone(De);for(const De of this._inlineDiffMargins)De.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let De=0,Re=me.zones.length;De<Re;De++){const Ee=me.zones[De];Ee.suppressMouseDown=!0;const Ae=Le.addZone(Ee);this._zones.push(Ae),this._zonesMap[String(Ae)]=!0,me.zones[De].diff&&Ee.marginDomNode&&(Ee.suppressMouseDown=!1,this._inlineDiffMargins.push(new T.InlineDiffMargin(Ae,Ee.marginDomNode,re,me.zones[De].diff,this._contextMenuService,this._clipboardService)))}}),be&&be.restore(re),this._decorations=re.deltaDecorations(this._decorations,me.decorations),ce&&ce.setZones(me.overviewZones)}}let ee=0;const se=x.registerIcon("diff-insert",R.Codicon.add,b.localize(0,null)),ne=x.registerIcon("diff-remove",R.Codicon.remove,b.localize(1,null)),le=(K=window.trustedTypes)===null||K===void 0?void 0:K.createPolicy("diffEditorWidget",{createHTML:he=>he});let X=class Ge extends d.Disposable{constructor(re,ce,me,Ce,be,Le,De,Re,Ee,Ae,Se,we){super();this._editorProgressService=we,this._onDidDispose=this._register(new C.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new C.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new C.Emitter),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=be,this._codeEditorService=Re,this._contextKeyService=this._register(Le.createScoped(re)),this._instantiationService=De.createChild(new y.ServiceCollection([f.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=Ee,this._notificationService=Ae,this._id=++ee,this._state=0,this._updatingDiffProgress=null,this._domElement=re,ce=ce||{},this._renderSideBySide=!0,typeof ce.renderSideBySide!="undefined"&&(this._renderSideBySide=ce.renderSideBySide),this._maxComputationTime=5e3,typeof ce.maxComputationTime!="undefined"&&(this._maxComputationTime=ce.maxComputationTime),this._ignoreTrimWhitespace=!0,typeof ce.ignoreTrimWhitespace!="undefined"&&(this._ignoreTrimWhitespace=ce.ignoreTrimWhitespace),this._renderIndicators=!0,typeof ce.renderIndicators!="undefined"&&(this._renderIndicators=ce.renderIndicators),this._originalIsEditable=a.boolean(ce.originalEditable,!1),this._diffCodeLens=a.boolean(ce.diffCodeLens,!1),this._diffWordWrap=G(ce.diffWordWrap,"inherit"),typeof ce.isInEmbeddedEditor!="undefined"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",ce.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._renderOverviewRuler=!0,typeof ce.renderOverviewRuler!="undefined"&&(this._renderOverviewRuler=Boolean(ce.renderOverviewRuler)),this._updateDecorationsRunner=this._register(new S.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=Ge._getClassName(this._themeService.getColorTheme(),this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=M.createFastDomNode(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(N.addStandardDisposableListener(this._overviewDomElement,"mousedown",fe=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(fe)})),this._renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new Y(Se,Ce),this._modifiedEditorState=new Y(Se,Ce),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new D.ElementSizeObserver(this._containerDomElement,ce.dimension,()=>this._onDidContainerSizeChanged())),ce.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(ce,me.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(ce,me.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new s.DiffReview(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._enableSplitViewResizing=!0,typeof ce.enableSplitViewResizing!="undefined"&&(this._enableSplitViewResizing=ce.enableSplitViewResizing),this._renderSideBySide?this._setStrategy(new $(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new oe(this._createDataSource(),this._enableSplitViewResizing)),this._register(Ee.onDidColorThemeChange(fe=>{this._strategy&&this._strategy.applyColors(fe)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=Ge._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)}));const ye=A.EditorExtensionsRegistry.getDiffEditorContributions();for(const fe of ye)try{this._register(De.createInstance(fe.ctor,this))}catch(de){B.onUnexpectedError(de)}this._codeEditorService.addDiffEditor(this)}_setState(re){this._state!==re&&(this._state=re,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(re,ce){let me="monaco-diff-editor monaco-editor-background ";return ce&&(me+="side-by-side "),me+=k.getThemeTypeSelector(re.type),me}_recreateOverviewRulers(){!this._renderOverviewRuler||(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(re,ce){const me=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(re),ce);this._register(me.onDidScrollChange(be=>{this._isHandlingScrollEvent||!be.scrollTopChanged&&!be.scrollLeftChanged&&!be.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:be.scrollLeft,scrollTop:be.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(me.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(me.onDidChangeConfiguration(be=>{!me.getModel()||(be.hasChanged(38)&&this._updateDecorationsRunner.schedule(),be.hasChanged(125)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(me.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const Ce=this._contextKeyService.createKey("isInDiffLeftEditor",me.hasWidgetFocus());return this._register(me.onDidFocusEditorWidget(()=>Ce.set(!0))),this._register(me.onDidBlurEditorWidget(()=>Ce.set(!1))),this._register(me.onDidContentSizeChange(be=>{const Le=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Ge.ONE_OVERVIEW_WIDTH,De=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:De,contentWidth:Le,contentHeightChanged:be.contentHeightChanged,contentWidthChanged:be.contentWidthChanged})})),me}_createRightHandSideEditor(re,ce){const me=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(re),ce);this._register(me.onDidScrollChange(be=>{this._isHandlingScrollEvent||!be.scrollTopChanged&&!be.scrollLeftChanged&&!be.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:be.scrollLeft,scrollTop:be.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(me.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(me.onDidChangeConfiguration(be=>{!me.getModel()||(be.hasChanged(38)&&this._updateDecorationsRunner.schedule(),be.hasChanged(125)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(me.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(me.onDidChangeModelOptions(be=>{be.tabSize&&this._updateDecorationsRunner.schedule()}));const Ce=this._contextKeyService.createKey("isInDiffRightEditor",me.hasWidgetFocus());return this._register(me.onDidFocusEditorWidget(()=>Ce.set(!0))),this._register(me.onDidBlurEditorWidget(()=>Ce.set(!1))),this._register(me.onDidContentSizeChange(be=>{const Le=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Ge.ONE_OVERVIEW_WIDTH,De=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:De,contentWidth:Le,contentHeightChanged:be.contentHeightChanged,contentWidthChanged:be.contentWidthChanged})})),me}_createInnerEditor(re,ce,me,Ce){return re.createInstance(o.CodeEditorWidget,ce,me,Ce)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return i.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(re){let ce=!1;typeof re.renderSideBySide!="undefined"&&this._renderSideBySide!==re.renderSideBySide&&(this._renderSideBySide=re.renderSideBySide,ce=!0),typeof re.maxComputationTime!="undefined"&&(this._maxComputationTime=re.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());let me=!1;typeof re.ignoreTrimWhitespace!="undefined"&&this._ignoreTrimWhitespace!==re.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=re.ignoreTrimWhitespace,me=!0),typeof re.renderIndicators!="undefined"&&this._renderIndicators!==re.renderIndicators&&(this._renderIndicators=re.renderIndicators,me=!0),me&&this._beginUpdateDecorations(),this._originalIsEditable=a.boolean(re.originalEditable,this._originalIsEditable),this._diffCodeLens=a.boolean(re.diffCodeLens,this._diffCodeLens),this._diffWordWrap=G(re.diffWordWrap,this._diffWordWrap),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(re)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(re)),typeof re.enableSplitViewResizing!="undefined"&&(this._enableSplitViewResizing=re.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),ce&&(this._renderSideBySide?this._setStrategy(new $(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new oe(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=Ge._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)),typeof re.renderOverviewRuler!="undefined"&&this._renderOverviewRuler!==re.renderOverviewRuler&&(this._renderOverviewRuler=re.renderOverviewRuler,this._renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(re){if(re&&(!re.original||!re.modified))throw new Error(re.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(re?re.original:null),this._modifiedEditor.setModel(re?re.modified:null),this._updateDecorationsRunner.cancel(),re&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),re&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(re){return this._modifiedEditor.getVisibleColumnFromPosition(re)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(re){this._modifiedEditor.setPosition(re)}revealLine(re,ce=0){this._modifiedEditor.revealLine(re,ce)}revealLineInCenter(re,ce=0){this._modifiedEditor.revealLineInCenter(re,ce)}revealLineInCenterIfOutsideViewport(re,ce=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(re,ce)}revealLineNearTop(re,ce=0){this._modifiedEditor.revealLineNearTop(re,ce)}revealPosition(re,ce=0){this._modifiedEditor.revealPosition(re,ce)}revealPositionInCenter(re,ce=0){this._modifiedEditor.revealPositionInCenter(re,ce)}revealPositionInCenterIfOutsideViewport(re,ce=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(re,ce)}revealPositionNearTop(re,ce=0){this._modifiedEditor.revealPositionNearTop(re,ce)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(re){this._modifiedEditor.setSelection(re)}setSelections(re){this._modifiedEditor.setSelections(re)}revealLines(re,ce,me=0){this._modifiedEditor.revealLines(re,ce,me)}revealLinesInCenter(re,ce,me=0){this._modifiedEditor.revealLinesInCenter(re,ce,me)}revealLinesInCenterIfOutsideViewport(re,ce,me=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(re,ce,me)}revealLinesNearTop(re,ce,me=0){this._modifiedEditor.revealLinesNearTop(re,ce,me)}revealRange(re,ce=0,me=!1,Ce=!0){this._modifiedEditor.revealRange(re,ce,me,Ce)}revealRangeInCenter(re,ce=0){this._modifiedEditor.revealRangeInCenter(re,ce)}revealRangeInCenterIfOutsideViewport(re,ce=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(re,ce)}revealRangeNearTop(re,ce=0){this._modifiedEditor.revealRangeNearTop(re,ce)}revealRangeNearTopIfOutsideViewport(re,ce=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(re,ce)}revealRangeAtTop(re,ce=0){this._modifiedEditor.revealRangeAtTop(re,ce)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const re=this._originalEditor.saveViewState(),ce=this._modifiedEditor.saveViewState();return{original:re,modified:ce}}restoreViewState(re){if(re&&re.original&&re.modified){const ce=re;this._originalEditor.restoreViewState(ce.original),this._modifiedEditor.restoreViewState(ce.modified)}}layout(re){this._elementSizeObserver.observe(re)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(re,ce,me){this._modifiedEditor.trigger(re,ce,me)}changeDecorations(re){return this._modifiedEditor.changeDecorations(re)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!!this._renderOverviewRuler&&!(!this._originalOverviewRuler||!this._modifiedOverviewRuler)){const re=this._elementSizeObserver.getHeight(),ce=this._getReviewHeight(),me=Ge.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Ge.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:Ge.ONE_OVERVIEW_WIDTH,right:me+Ge.ONE_OVERVIEW_WIDTH,height:re-ce}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:Ge.ONE_OVERVIEW_WIDTH,height:re-ce}))}}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),Ge.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(re,ce){return!re&&!ce?!0:!re||!ce?!1:re.toString()===ce.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const re=this._originalEditor.getModel(),ce=this._modifiedEditor.getModel();if(!(!re||!ce)){this._diffComputationToken++;const me=this._diffComputationToken;if(this._setState(1),!this._editorWorkerService.canComputeDiff(re.uri,ce.uri)){(!Ge._equals(re.uri,this._lastOriginalWarning)||!Ge._equals(ce.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=re.uri,this._lastModifiedWarning=ce.uri,this._notificationService.warn(b.localize(2,null)));return}this._editorWorkerService.computeDiff(re.uri,ce.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then(Ce=>{me===this._diffComputationToken&&re===this._originalEditor.getModel()&&ce===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=Ce,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},Ce=>{me===this._diffComputationToken&&re===this._originalEditor.getModel()&&ce===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())){const re=this._diffComputationResult?this._diffComputationResult.changes:[],ce=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),me=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),Ce=this._strategy.getEditorsDiffDecorations(re,this._ignoreTrimWhitespace,this._renderIndicators,ce,me);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,Ce.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,Ce.modified,!0)}finally{this._currentlyChangingViewZones=!1}}}_adjustOptionsForSubEditor(re){const ce=Object.assign({},re);return ce.inDiffEditor=!0,ce.automaticLayout=!1,ce.scrollbar=Object.assign({},ce.scrollbar||{}),ce.scrollbar.vertical="visible",ce.folding=!1,ce.codeLens=this._diffCodeLens,ce.fixedOverflowWidgets=!0,ce.minimap=Object.assign({},ce.minimap||{}),ce.minimap.enabled=!1,ce}_adjustOptionsForLeftHandSide(re){const ce=this._adjustOptionsForSubEditor(re);return this._renderSideBySide?ce.wordWrapOverride1=this._diffWordWrap:ce.wordWrapOverride1="off",re.originalAriaLabel&&(ce.ariaLabel=re.originalAriaLabel),ce.readOnly=!this._originalIsEditable,ce.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},ce),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(re){const ce=this._adjustOptionsForSubEditor(re);return re.modifiedAriaLabel&&(ce.ariaLabel=re.modifiedAriaLabel),ce.wordWrapOverride1=this._diffWordWrap,ce.revealHorizontalRightPadding=a.EditorOptions.revealHorizontalRightPadding.defaultValue+Ge.ENTIRE_DIFF_OVERVIEW_WIDTH,ce.scrollbar.verticalHasArrows=!1,ce.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},ce),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const re=this._elementSizeObserver.getWidth(),ce=this._elementSizeObserver.getHeight(),me=this._getReviewHeight(),Ce=this._strategy.layout();this._originalDomNode.style.width=Ce+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=re-Ce+"px",this._modifiedDomNode.style.left=Ce+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=ce-me+"px",this._overviewDomElement.style.width=Ge.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=re-Ge.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(Ge.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:Ce,height:ce-me}),this._modifiedEditor.layout({width:re-Ce-(this._renderOverviewRuler?Ge.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:ce-me}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(ce-me,re,me),this._layoutOverviewViewport()}_layoutOverviewViewport(){const re=this._computeOverviewViewport();re?(this._overviewViewportDomElement.setTop(re.top),this._overviewViewportDomElement.setHeight(re.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const re=this._modifiedEditor.getLayoutInfo();if(!re)return null;const ce=this._modifiedEditor.getScrollTop(),me=this._modifiedEditor.getScrollHeight(),Ce=Math.max(0,re.height),be=Math.max(0,Ce-2*0),Le=me>0?be/me:0,De=Math.max(0,Math.floor(re.height*Le)),Re=Math.floor(ce*Le);return{height:De,top:Re}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(re){this._strategy&&this._strategy.dispose(),this._strategy=re,re.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(re,ce){const me=this._diffComputationResult?this._diffComputationResult.changes:[];if(me.length===0||re<ce(me[0]))return null;let Ce=0,be=me.length-1;for(;Ce<be;){const Le=Math.floor((Ce+be)/2),De=ce(me[Le]),Re=Le+1<=be?ce(me[Le+1]):1073741824;re<De?be=Le-1:re>=Re?Ce=Le+1:(Ce=Le,be=Le)}return me[Ce]}_getEquivalentLineForOriginalLineNumber(re){const ce=this._getLineChangeAtOrBeforeLineNumber(re,Re=>Re.originalStartLineNumber);if(!ce)return re;const me=ce.originalStartLineNumber+(ce.originalEndLineNumber>0?-1:0),Ce=ce.modifiedStartLineNumber+(ce.modifiedEndLineNumber>0?-1:0),be=ce.originalEndLineNumber>0?ce.originalEndLineNumber-ce.originalStartLineNumber+1:0,Le=ce.modifiedEndLineNumber>0?ce.modifiedEndLineNumber-ce.modifiedStartLineNumber+1:0,De=re-me;return De<=be?Ce+Math.min(De,Le):Ce+Le-be+De}_getEquivalentLineForModifiedLineNumber(re){const ce=this._getLineChangeAtOrBeforeLineNumber(re,Re=>Re.modifiedStartLineNumber);if(!ce)return re;const me=ce.originalStartLineNumber+(ce.originalEndLineNumber>0?-1:0),Ce=ce.modifiedStartLineNumber+(ce.modifiedEndLineNumber>0?-1:0),be=ce.originalEndLineNumber>0?ce.originalEndLineNumber-ce.originalStartLineNumber+1:0,Le=ce.modifiedEndLineNumber>0?ce.modifiedEndLineNumber-ce.modifiedStartLineNumber+1:0,De=re-Ce;return De<=Le?me+Math.min(De,be):me+be-Le+De}getDiffLineInformationForOriginal(re){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(re)}:null}getDiffLineInformationForModified(re){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(re)}:null}};X.ONE_OVERVIEW_WIDTH=15,X.ENTIRE_DIFF_OVERVIEW_WIDTH=30,X.UPDATE_DIFF_DECORATIONS_DELAY=200,X=Me([_e(3,O.IClipboardService),_e(4,t.IEditorWorkerService),_e(5,f.IContextKeyService),_e(6,v.IInstantiationService),_e(7,c.ICodeEditorService),_e(8,k.IThemeService),_e(9,L.INotificationService),_e(10,E.IContextMenuService),_e(11,F.IEditorProgressService)],X),e.DiffEditorWidget=X;class z extends d.Disposable{constructor(re){super();this._dataSource=re,this._insertColor=null,this._removeColor=null}applyColors(re){const ce=(re.getColor(I.diffInserted)||I.defaultInsertColor).transparent(2),me=(re.getColor(I.diffRemoved)||I.defaultRemoveColor).transparent(2),Ce=!ce.equals(this._insertColor)||!me.equals(this._removeColor);return this._insertColor=ce,this._removeColor=me,Ce}getEditorsDiffDecorations(re,ce,me,Ce,be){be=be.sort((Ee,Ae)=>Ee.afterLineNumber-Ae.afterLineNumber),Ce=Ce.sort((Ee,Ae)=>Ee.afterLineNumber-Ae.afterLineNumber);const Le=this._getViewZones(re,Ce,be,me),De=this._getOriginalEditorDecorations(re,ce,me),Re=this._getModifiedEditorDecorations(re,ce,me);return{original:{decorations:De.decorations,overviewZones:De.overviewZones,zones:Le.original},modified:{decorations:Re.decorations,overviewZones:Re.overviewZones,zones:Le.modified}}}}class P{constructor(re){this._source=re,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class V{constructor(re,ce,me,Ce,be){this._lineChanges=re,this._originalForeignVZ=ce,this._modifiedForeignVZ=me,this._originalEditor=Ce,this._modifiedEditor=be}static _getViewLineCount(re,ce,me){const Ce=re.getModel(),be=re._getViewModel();if(Ce&&be){const Le=ue(Ce,be,ce,me);return Le.endLineNumber-Le.startLineNumber+1}return me-ce+1}getViewZones(){const re=this._originalEditor.getOption(53),ce=this._modifiedEditor.getOption(53),me=this._originalEditor.getOption(125).wrappingColumn!==-1,Ce=this._modifiedEditor.getOption(125).wrappingColumn!==-1,be=me||Ce,Le=this._originalEditor.getModel(),De=this._originalEditor._getViewModel().coordinatesConverter,Re=this._modifiedEditor._getViewModel().coordinatesConverter,Ee={original:[],modified:[]};let Ae=0,Se=0,we=0,ye=0,fe=0,de=0;const ge=(Oe,Fe)=>Oe.afterLineNumber-Fe.afterLineNumber,pe=(Oe,Fe)=>{if(Fe.domNode===null&&Oe.length>0){const Pe=Oe[Oe.length-1];if(Pe.afterLineNumber===Fe.afterLineNumber&&Pe.domNode===null){Pe.heightInLines+=Fe.heightInLines;return}}Oe.push(Fe)},ve=new P(this._modifiedForeignVZ),ke=new P(this._originalForeignVZ);let Ne=1,Te=1;for(let Oe=0,Fe=this._lineChanges.length;Oe<=Fe;Oe++){const Pe=Oe<Fe?this._lineChanges[Oe]:null;Pe!==null?(we=Pe.originalStartLineNumber+(Pe.originalEndLineNumber>0?-1:0),ye=Pe.modifiedStartLineNumber+(Pe.modifiedEndLineNumber>0?-1:0),Se=Pe.originalEndLineNumber>0?V._getViewLineCount(this._originalEditor,Pe.originalStartLineNumber,Pe.originalEndLineNumber):0,Ae=Pe.modifiedEndLineNumber>0?V._getViewLineCount(this._modifiedEditor,Pe.modifiedStartLineNumber,Pe.modifiedEndLineNumber):0,fe=Math.max(Pe.originalStartLineNumber,Pe.originalEndLineNumber),de=Math.max(Pe.modifiedStartLineNumber,Pe.modifiedEndLineNumber)):(we+=1e7+Se,ye+=1e7+Ae,fe=we,de=ye);let xe=[],We=[];if(be){let Be;Pe?Pe.originalEndLineNumber>0?Be=Pe.originalStartLineNumber-Ne:Be=Pe.modifiedStartLineNumber-Te:Be=Le.getLineCount()-Ne;for(let He=0;He<Be;He++){const Ve=Ne+He,Ue=Te+He,Ye=De.getModelLineViewLineCount(Ve),je=Re.getModelLineViewLineCount(Ue);Ye<je?xe.push({afterLineNumber:Ve,heightInLines:je-Ye,domNode:null,marginDomNode:null}):Ye>je&&We.push({afterLineNumber:Ue,heightInLines:Ye-je,domNode:null,marginDomNode:null})}Pe&&(Ne=(Pe.originalEndLineNumber>0?Pe.originalEndLineNumber:Pe.originalStartLineNumber)+1,Te=(Pe.modifiedEndLineNumber>0?Pe.modifiedEndLineNumber:Pe.modifiedStartLineNumber)+1)}for(;ve.current&&ve.current.afterLineNumber<=de;){let Be;ve.current.afterLineNumber<=ye?Be=we-ye+ve.current.afterLineNumber:Be=fe;let He=null;Pe&&Pe.modifiedStartLineNumber<=ve.current.afterLineNumber&&ve.current.afterLineNumber<=Pe.modifiedEndLineNumber&&(He=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),xe.push({afterLineNumber:Be,heightInLines:ve.current.height/ce,domNode:null,marginDomNode:He}),ve.advance()}for(;ke.current&&ke.current.afterLineNumber<=fe;){let Be;ke.current.afterLineNumber<=we?Be=ye-we+ke.current.afterLineNumber:Be=de,We.push({afterLineNumber:Be,heightInLines:ke.current.height/re,domNode:null}),ke.advance()}if(Pe!==null&&j(Pe)){const Be=this._produceOriginalFromDiff(Pe,Se,Ae);Be&&xe.push(Be)}if(Pe!==null&&te(Pe)){const Be=this._produceModifiedFromDiff(Pe,Se,Ae);Be&&We.push(Be)}let ze=0,Ke=0;for(xe=xe.sort(ge),We=We.sort(ge);ze<xe.length&&Ke<We.length;){const Be=xe[ze],He=We[Ke],Ve=Be.afterLineNumber-we,Ue=He.afterLineNumber-ye;Ve<Ue?(pe(Ee.original,Be),ze++):Ue<Ve?(pe(Ee.modified,He),Ke++):Be.shouldNotShrink?(pe(Ee.original,Be),ze++):He.shouldNotShrink?(pe(Ee.modified,He),Ke++):Be.heightInLines>=He.heightInLines?(Be.heightInLines-=He.heightInLines,Ke++):(He.heightInLines-=Be.heightInLines,ze++)}for(;ze<xe.length;)pe(Ee.original,xe[ze]),ze++;for(;Ke<We.length;)pe(Ee.modified,We[Ke]),Ke++}return{original:V._ensureDomNodes(Ee.original),modified:V._ensureDomNodes(Ee.modified)}}static _ensureDomNodes(re){return re.map(ce=>(ce.domNode||(ce.domNode=Z()),ce))}}function U(he,re,ce,me,Ce){return{range:new u.Range(he,re,ce,me),options:Ce}}const H={charDelete:n.ModelDecorationOptions.register({className:"char-delete"}),charDeleteWholeLine:n.ModelDecorationOptions.register({className:"char-delete",isWholeLine:!0}),charInsert:n.ModelDecorationOptions.register({className:"char-insert"}),charInsertWholeLine:n.ModelDecorationOptions.register({className:"char-insert",isWholeLine:!0}),lineInsert:n.ModelDecorationOptions.register({className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:n.ModelDecorationOptions.register({className:"line-insert",linesDecorationsClassName:"insert-sign "+k.ThemeIcon.asClassName(se),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:n.ModelDecorationOptions.register({className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:n.ModelDecorationOptions.register({className:"line-delete",linesDecorationsClassName:"delete-sign "+k.ThemeIcon.asClassName(ne),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:n.ModelDecorationOptions.register({marginClassName:"line-delete"})};class $ extends z{constructor(re,ce){super(re);this._disableSash=ce===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new w.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(me=>this._onSashDrag(me)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(re){const ce=re===!1;this._disableSash!==ce&&(this._disableSash=ce,this._sash.state=this._disableSash?0:3)}layout(re=this._sashRatio){const me=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?X.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let Ce=Math.floor((re||.5)*me);const be=Math.floor(.5*me);return Ce=this._disableSash?be:Ce||be,me>$.MINIMUM_EDITOR_WIDTH*2?(Ce<$.MINIMUM_EDITOR_WIDTH&&(Ce=$.MINIMUM_EDITOR_WIDTH),Ce>me-$.MINIMUM_EDITOR_WIDTH&&(Ce=me-$.MINIMUM_EDITOR_WIDTH)):Ce=be,this._sashPosition!==Ce&&(this._sashPosition=Ce,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(re){const me=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?X.ENTIRE_DIFF_OVERVIEW_WIDTH:0),Ce=this.layout((this._startSashPosition+(re.currentX-re.startX))/me);this._sashRatio=Ce/me,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(re){return 0}getVerticalSashLeft(re){return this._sashPosition}getVerticalSashHeight(re){return this._dataSource.getHeight()}_getViewZones(re,ce,me){const Ce=this._dataSource.getOriginalEditor(),be=this._dataSource.getModifiedEditor();return new ie(re,ce,me,Ce,be).getViewZones()}_getOriginalEditorDecorations(re,ce,me){const Ce=this._dataSource.getOriginalEditor(),be=String(this._removeColor),Le={decorations:[],overviewZones:[]},De=Ce.getModel(),Re=Ce._getViewModel();for(const Ee of re)if(te(Ee)){Le.decorations.push({range:new u.Range(Ee.originalStartLineNumber,1,Ee.originalEndLineNumber,1073741824),options:me?H.lineDeleteWithSign:H.lineDelete}),(!j(Ee)||!Ee.charChanges)&&Le.decorations.push(U(Ee.originalStartLineNumber,1,Ee.originalEndLineNumber,1073741824,H.charDeleteWholeLine));const Ae=ue(De,Re,Ee.originalStartLineNumber,Ee.originalEndLineNumber);if(Le.overviewZones.push(new l.OverviewRulerZone(Ae.startLineNumber,Ae.endLineNumber,be)),Ee.charChanges){for(const Se of Ee.charChanges)if(te(Se))if(ce)for(let we=Se.originalStartLineNumber;we<=Se.originalEndLineNumber;we++){let ye,fe;we===Se.originalStartLineNumber?ye=Se.originalStartColumn:ye=De.getLineFirstNonWhitespaceColumn(we),we===Se.originalEndLineNumber?fe=Se.originalEndColumn:fe=De.getLineLastNonWhitespaceColumn(we),Le.decorations.push(U(we,ye,we,fe,H.charDelete))}else Le.decorations.push(U(Se.originalStartLineNumber,Se.originalStartColumn,Se.originalEndLineNumber,Se.originalEndColumn,H.charDelete))}}return Le}_getModifiedEditorDecorations(re,ce,me){const Ce=this._dataSource.getModifiedEditor(),be=String(this._insertColor),Le={decorations:[],overviewZones:[]},De=Ce.getModel(),Re=Ce._getViewModel();for(const Ee of re)if(j(Ee)){Le.decorations.push({range:new u.Range(Ee.modifiedStartLineNumber,1,Ee.modifiedEndLineNumber,1073741824),options:me?H.lineInsertWithSign:H.lineInsert}),(!te(Ee)||!Ee.charChanges)&&Le.decorations.push(U(Ee.modifiedStartLineNumber,1,Ee.modifiedEndLineNumber,1073741824,H.charInsertWholeLine));const Ae=ue(De,Re,Ee.modifiedStartLineNumber,Ee.modifiedEndLineNumber);if(Le.overviewZones.push(new l.OverviewRulerZone(Ae.startLineNumber,Ae.endLineNumber,be)),Ee.charChanges){for(const Se of Ee.charChanges)if(j(Se))if(ce)for(let we=Se.modifiedStartLineNumber;we<=Se.modifiedEndLineNumber;we++){let ye,fe;we===Se.modifiedStartLineNumber?ye=Se.modifiedStartColumn:ye=De.getLineFirstNonWhitespaceColumn(we),we===Se.modifiedEndLineNumber?fe=Se.modifiedEndColumn:fe=De.getLineLastNonWhitespaceColumn(we),Le.decorations.push(U(we,ye,we,fe,H.charInsert))}else Le.decorations.push(U(Se.modifiedStartLineNumber,Se.modifiedStartColumn,Se.modifiedEndLineNumber,Se.modifiedEndColumn,H.charInsert))}}return Le}}$.MINIMUM_EDITOR_WIDTH=100;class ie extends V{constructor(re,ce,me,Ce,be){super(re,ce,me,Ce,be)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(re,ce,me){return me>ce?{afterLineNumber:Math.max(re.originalStartLineNumber,re.originalEndLineNumber),heightInLines:me-ce,domNode:null}:null}_produceModifiedFromDiff(re,ce,me){return ce>me?{afterLineNumber:Math.max(re.modifiedStartLineNumber,re.modifiedEndLineNumber),heightInLines:ce-me,domNode:null}:null}}class oe extends z{constructor(re,ce){super(re);this._decorationsLeft=re.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(re.getOriginalEditor().onDidLayoutChange(me=>{this._decorationsLeft!==me.decorationsLeft&&(this._decorationsLeft=me.decorationsLeft,re.relayoutEditors())}))}setEnableSplitViewResizing(re){}_getViewZones(re,ce,me,Ce){const be=this._dataSource.getOriginalEditor(),Le=this._dataSource.getModifiedEditor();return new ae(re,ce,me,be,Le,Ce).getViewZones()}_getOriginalEditorDecorations(re,ce,me){const Ce=String(this._removeColor),be={decorations:[],overviewZones:[]},Le=this._dataSource.getOriginalEditor(),De=Le.getModel(),Re=Le._getViewModel();for(const Ee of re)if(te(Ee)){be.decorations.push({range:new u.Range(Ee.originalStartLineNumber,1,Ee.originalEndLineNumber,1073741824),options:H.lineDeleteMargin});const Ae=ue(De,Re,Ee.originalStartLineNumber,Ee.originalEndLineNumber);be.overviewZones.push(new l.OverviewRulerZone(Ae.startLineNumber,Ae.endLineNumber,Ce))}return be}_getModifiedEditorDecorations(re,ce,me){const Ce=this._dataSource.getModifiedEditor(),be=String(this._insertColor),Le={decorations:[],overviewZones:[]},De=Ce.getModel(),Re=Ce._getViewModel();for(const Ee of re)if(j(Ee)){Le.decorations.push({range:new u.Range(Ee.modifiedStartLineNumber,1,Ee.modifiedEndLineNumber,1073741824),options:me?H.lineInsertWithSign:H.lineInsert});const Ae=ue(De,Re,Ee.modifiedStartLineNumber,Ee.modifiedEndLineNumber);if(Le.overviewZones.push(new l.OverviewRulerZone(Ae.startLineNumber,Ae.endLineNumber,be)),Ee.charChanges){for(const Se of Ee.charChanges)if(j(Se))if(ce)for(let we=Se.modifiedStartLineNumber;we<=Se.modifiedEndLineNumber;we++){let ye,fe;we===Se.modifiedStartLineNumber?ye=Se.modifiedStartColumn:ye=De.getLineFirstNonWhitespaceColumn(we),we===Se.modifiedEndLineNumber?fe=Se.modifiedEndColumn:fe=De.getLineLastNonWhitespaceColumn(we),Le.decorations.push(U(we,ye,we,fe,H.charInsert))}else Le.decorations.push(U(Se.modifiedStartLineNumber,Se.modifiedStartColumn,Se.modifiedEndLineNumber,Se.modifiedEndColumn,H.charInsert))}else Le.decorations.push(U(Ee.modifiedStartLineNumber,1,Ee.modifiedEndLineNumber,1073741824,H.charInsertWholeLine))}return Le}layout(){return Math.max(5,this._decorationsLeft)}}class ae extends V{constructor(re,ce,me,Ce,be,Le){super(re,ce,me,Ce,be);this._originalModel=Ce.getModel(),this._renderIndicators=Le,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const re=super.getViewZones();return this._finalize(re),re}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const re=document.createElement("div");return re.className="inline-added-margin-view-zone",re}_produceOriginalFromDiff(re,ce,me){const Ce=document.createElement("div");return Ce.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(re.originalStartLineNumber,re.originalEndLineNumber),heightInLines:me,domNode:document.createElement("div"),marginDomNode:Ce}}_produceModifiedFromDiff(re,ce,me){const Ce=document.createElement("div");Ce.className=`view-lines line-delete ${W.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const be=document.createElement("div");be.className="inline-deleted-margin-view-zone";const Le={shouldNotShrink:!0,afterLineNumber:re.modifiedEndLineNumber===0?re.modifiedStartLineNumber:re.modifiedStartLineNumber-1,heightInLines:ce,minWidthInPx:0,domNode:Ce,marginDomNode:be,diff:{originalStartLineNumber:re.originalStartLineNumber,originalEndLineNumber:re.originalEndLineNumber,modifiedStartLineNumber:re.modifiedStartLineNumber,modifiedEndLineNumber:re.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let De=re.originalStartLineNumber;De<=re.originalEndLineNumber;De++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(De),null);return this._pendingLineChange.push(re),this._pendingViewZones.push(Le),Le}_finalize(re){const ce=this._modifiedEditor.getOptions(),me=this._modifiedEditor.getModel().getOptions().tabSize,Ce=ce.get(38),be=ce.get(26),Le=Ce.typicalHalfwidthCharacterWidth,De=ce.get(88),Re=this._originalModel.mightContainNonBasicASCII(),Ee=this._originalModel.mightContainRTL(),Ae=ce.get(53),we=ce.get(124).decorationsWidth,ye=ce.get(100),fe=ce.get(83),de=ce.get(77),ge=ce.get(39),pe=this._lineBreaksComputer.finalize();let ve=0;for(let ke=0;ke<this._pendingLineChange.length;ke++){const Ne=this._pendingLineChange[ke],Te=this._pendingViewZones[ke],Oe=Te.domNode;g.Configuration.applyFontInfoSlow(Oe,Ce);const Fe=Te.marginDomNode;g.Configuration.applyFontInfoSlow(Fe,Ce);const Pe=[];if(Ne.charChanges)for(const Ue of Ne.charChanges)te(Ue)&&Pe.push(new _.InlineDecoration(new u.Range(Ue.originalStartLineNumber,Ue.originalStartColumn,Ue.originalEndLineNumber,Ue.originalEndColumn),"char-delete",0));const xe=Pe.length>0,We=r.createStringBuilder(1e4);let ze=0,Ke=0,Be=null;for(let Ue=Ne.originalStartLineNumber;Ue<=Ne.originalEndLineNumber;Ue++){const Ye=Ue-Ne.originalStartLineNumber,je=this._originalModel.getLineTokens(Ue),Xe=je.getLineContent(),$e=pe[ve++],Ze=h.LineDecoration.filter(Pe,Ue,1,Xe.length+1);if($e){let Qe=0;for(const Je of $e.breakOffsets){const nt=je.sliceAndInflate(Qe,Je,0),si=Xe.substring(Qe,Je);ze=Math.max(ze,this._renderOriginalLine(Ke++,si,nt,h.LineDecoration.extractWrapped(Ze,Qe,Je),xe,Re,Ee,Ce,be,Ae,we,ye,fe,de,ge,me,We,Fe)),Qe=Je}for(Be||(Be=[]);Be.length<Ye;)Be[Be.length]=1;Be[Ye]=$e.breakOffsets.length,Te.heightInLines+=$e.breakOffsets.length-1;const it=document.createElement("div");it.className="line-delete",re.original.push({afterLineNumber:Ue,afterColumn:0,heightInLines:$e.breakOffsets.length-1,domNode:Z(),marginDomNode:it})}else ze=Math.max(ze,this._renderOriginalLine(Ke++,Xe,je,Ze,xe,Re,Ee,Ce,be,Ae,we,ye,fe,de,ge,me,We,Fe))}ze+=De;const He=We.build(),Ve=le?le.createHTML(He):He;if(Oe.innerHTML=Ve,Te.minWidthInPx=ze*Le,Be){const Ue=Ne.originalEndLineNumber-Ne.originalStartLineNumber;for(;Be.length<=Ue;)Be[Be.length]=1}Te.diff.viewLineCounts=Be}re.original.sort((ke,Ne)=>ke.afterLineNumber-Ne.afterLineNumber)}_renderOriginalLine(re,ce,me,Ce,be,Le,De,Re,Ee,Ae,Se,we,ye,fe,de,ge,pe,ve){pe.appendASCIIString('<div class="view-line'),be||pe.appendASCIIString(" char-delete"),pe.appendASCIIString('" style="top:'),pe.appendASCIIString(String(re*Ae)),pe.appendASCIIString('px;width:1000000px;">');const ke=_.ViewLineRenderingData.isBasicASCII(ce,Le),Ne=_.ViewLineRenderingData.containsRTL(ce,ke,De),Te=m.renderViewLine(new m.RenderLineInput(Re.isMonospace&&!Ee,Re.canUseHalfwidthRightwardsArrow,ce,!1,ke,Ne,0,me,Ce,ge,0,Re.spaceWidth,Re.middotWidth,Re.wsmiddotWidth,we,ye,fe,de!==a.EditorFontLigatures.OFF,null),pe);if(pe.appendASCIIString("</div>"),this._renderIndicators){const Fe=document.createElement("div");Fe.className=`delete-sign ${k.ThemeIcon.asClassName(ne)}`,Fe.setAttribute("style",`position:absolute;top:${re*Ae}px;width:${Se}px;height:${Ae}px;right:0;`),ve.appendChild(Fe)}const Oe=Te.characterMapping.getAbsoluteOffsets();return Oe.length>0?Oe[Oe.length-1]:0}}function G(he,re){return a.stringSet(he,re,["off","on","inherit"])}function j(he){return he.modifiedEndLineNumber>0}function te(he){return he.originalEndLineNumber>0}function Z(){const he=document.createElement("div");return he.className="diagonal-fill",he}function ue(he,re,ce,me){const Ce=he.getLineCount();return ce=Math.min(Ce,Math.max(1,ce)),me=Math.min(Ce,Math.max(1,me)),re.coordinatesConverter.convertModelRangeToViewRange(new u.Range(ce,he.getLineMinColumn(ce),me,he.getLineMaxColumn(me)))}k.registerThemingParticipant((he,re)=>{const ce=he.getColor(I.diffInserted);ce&&(re.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${ce}; }`),re.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${ce}; }`),re.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${ce}; }`));const me=he.getColor(I.diffRemoved);me&&(re.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${me}; }`),re.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${me}; }`),re.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${me}; }`));const Ce=he.getColor(I.diffInsertedOutline);Ce&&re.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${he.type==="hc"?"dashed":"solid"} ${Ce}; }`);const be=he.getColor(I.diffRemovedOutline);be&&re.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${he.type==="hc"?"dashed":"solid"} ${be}; }`);const Le=he.getColor(I.scrollbarShadow);Le&&re.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${Le}; }`);const De=he.getColor(I.diffBorder);De&&re.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${De}; }`);const Re=he.getColor(I.scrollbarSliderBackground);Re&&re.addRule(`
.monaco-diff-editor .diffViewport {
background: ${Re};
}
`);const Ee=he.getColor(I.scrollbarSliderHoverBackground);Ee&&re.addRule(`
.monaco-diff-editor .diffViewport:hover {
background: ${Ee};
}
`);const Ae=he.getColor(I.scrollbarSliderActiveBackground);Ae&&re.addRule(`
.monaco-diff-editor .diffViewport:active {
background: ${Ae};
}
`);const Se=he.getColor(I.diffDiagonalFill);re.addRule(`
.monaco-editor .diagonal-fill {
background-image: linear-gradient(
-45deg,
${Se} 12.5%,
#0000 12.5%, #0000 50%,
${Se} 50%, ${Se} 62.5%,
#0000 62.5%, #0000 100%
);
background-size: 8px 8px;
}
`)})}),define(Q[657],J([0,1,473,7,47,160,104,52,15,12,2,17,8,3,142,22,11,571,27,80,341]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleButton=e.FindWidget=e.FindWidgetViewZone=e.findNextMatchIcon=e.findPreviousMatchIcon=e.findReplaceAllIcon=e.findReplaceIcon=void 0;const l=t.registerIcon("find-selection",n.Codicon.selection,b.localize(0,null)),h=t.registerIcon("find-collapsed",n.Codicon.chevronRight,b.localize(1,null)),m=t.registerIcon("find-expanded",n.Codicon.chevronDown,b.localize(2,null));e.findReplaceIcon=t.registerIcon("find-replace",n.Codicon.replace,b.localize(3,null)),e.findReplaceAllIcon=t.registerIcon("find-replace-all",n.Codicon.replaceAll,b.localize(4,null)),e.findPreviousMatchIcon=t.registerIcon("find-previous-match",n.Codicon.arrowUp,b.localize(5,null)),e.findNextMatchIcon=t.registerIcon("find-next-match",n.Codicon.arrowDown,b.localize(6,null));const _=b.localize(7,null),f=b.localize(8,null),v=b.localize(9,null),y=b.localize(10,null),L=b.localize(11,null),I=b.localize(12,null),k=b.localize(13,null),E=b.localize(14,null),T=b.localize(15,null),O=b.localize(16,null),A=b.localize(17,null),B=b.localize(18,null,a.MATCHES_LIMIT),F=b.localize(19,null),D=b.localize(20,null),R=419,x=275-54;let K=69;const Y=33,ee="ctrlEnterReplaceAll.windows.donotask",se=c.isMacintosh?256:2048;class ne{constructor(U){this.afterLineNumber=U,this.heightInPx=Y,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=ne;function le(V,U,H){const $=!!U.match(/\n/);if(H&&$&&H.selectionStart>0){V.stopPropagation();return}}function X(V,U,H){const $=!!U.match(/\n/);if(H&&$&&H.selectionEnd<H.value.length){V.stopPropagation();return}}class z extends C.Widget{constructor(U,H,$,ie,oe,ae,G,j,te){super();this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=U,this._controller=H,this._state=$,this._contextViewProvider=ie,this._keybindingService=oe,this._contextKeyService=ae,this._storageService=j,this._notificationService=te,this._ctrlEnterReplaceAllWarningPrompted=!!j.getBoolean(ee,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new d.Delayer(500),this._register(p.toDisposable(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(Z=>this._onStateChanged(Z))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(Z=>{if(Z.hasChanged(75)&&(this._codeEditor.getOption(75)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),Z.hasChanged(124)&&this._tryUpdateWidgetWidth(),Z.hasChanged(2)&&this.updateAccessibilitySupport(),Z.hasChanged(31)){const ue=this._codeEditor.getOption(31).addExtraSpaceOnTop;ue&&!this._viewZone&&(this._viewZone=new ne(0),this._showViewZone()),!ue&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Ie(this,void 0,void 0,function*(){if(this._isVisible){let Z=yield this._controller.getGlobalBufferTerm();Z&&Z!==this._state.searchString&&(this._state.change({searchString:Z},!1),this._findInput.select())}}))),this._findInputFocused=a.CONTEXT_FIND_INPUT_FOCUSED.bindTo(ae),this._findFocusTracker=this._register(N.trackFocus(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=a.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(ae),this._replaceFocusTracker=this._register(N.trackFocus(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(31).addExtraSpaceOnTop&&(this._viewZone=new ne(0)),this._applyTheme(G.getColorTheme()),this._register(G.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(Z=>{if(Z.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return z.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(U){if(U.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(U.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),U.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),U.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(75)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=N.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(U.isRevealed||U.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),U.isRegex&&this._findInput.setRegex(this._state.isRegex),U.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),U.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),U.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),U.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),U.searchString||U.matchesCount||U.matchesPosition){let H=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",H),this._updateMatchesCount(),this._updateButtons()}(U.searchString||U.currentMatch)&&this._layoutViewZone(),U.updateHistory&&this._delayedUpdateHistory(),U.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,g.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=K+"px",this._state.matchesCount>=a.MATCHES_LIMIT?this._matchesCount.title=B:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let U;if(this._state.matchesCount>0){let H=String(this._state.matchesCount);this._state.matchesCount>=a.MATCHES_LIMIT&&(H+="+");let $=String(this._state.matchesPosition);$==="0"&&($="?"),U=o.format(F,$,H)}else U=D;this._matchesCount.appendChild(document.createTextNode(U)),M.alert(this._getAriaLabel(U,this._state.currentMatch,this._state.searchString)),K=Math.max(K,this._matchesCount.clientWidth)}_getAriaLabel(U,H,$){if(U===D)return $===""?b.localize(21,null,U):b.localize(22,null,U,$);if(H){const ie=b.localize(23,null,U,$,H.startLineNumber+":"+H.startColumn),oe=this._codeEditor.getModel();return oe&&H.startLineNumber<=oe.getLineCount()&&H.startLineNumber>=1?`${oe.getLineContent(H.startLineNumber)}, ${ie}`:ie}return b.localize(24,null,U,$)}_updateToggleSelectionFindButton(){let U=this._codeEditor.getSelection(),H=U?U.startLineNumber!==U.endLineNumber||U.startColumn!==U.endColumn:!1,$=this._toggleSelectionFind.checked;this._isVisible&&($||H)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let U=this._state.searchString.length>0,H=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&U&&H&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&U&&H&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&U),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&U),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let $=!this._codeEditor.getOption(75);this._toggleReplaceBtn.setEnabled(this._isVisible&&$)}_reveal(){if(this._revealTimeouts.forEach(U=>{clearTimeout(U)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const U=this._codeEditor.getSelection();switch(this._codeEditor.getOption(31).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const $=!!U&&U.startLineNumber!==U.endLineNumber;this._toggleSelectionFind.checked=$;break;default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let H=!0;if(this._codeEditor.getOption(31).seedSearchStringFromSelection&&U){const $=this._codeEditor.getDomNode();if($){const ie=N.getDomNodePagePosition($),oe=this._codeEditor.getScrolledVisiblePosition(U.getStartPosition()),ae=ie.left+(oe?oe.left:0),G=oe?oe.top:0;if(this._viewZone&&G<this._viewZone.heightInPx){U.endLineNumber>U.startLineNumber&&(H=!1);const j=N.getTopLeftOffset(this._domNode).left;ae>j&&(H=!1);const te=this._codeEditor.getScrolledVisiblePosition(U.getEndPosition());ie.left+(te?te.left:0)>j&&(H=!1)}}}this._showViewZone(H)}}_hide(U){this._revealTimeouts.forEach(H=>{clearTimeout(H)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),U&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(U){if(!this._codeEditor.getOption(31).addExtraSpaceOnTop){this._removeViewZone();return}if(!!this._isVisible){const $=this._viewZone;this._viewZoneId!==void 0||!$||this._codeEditor.changeViewZones(ie=>{$.heightInPx=this._getHeight(),this._viewZoneId=ie.addZone($),this._codeEditor.setScrollTop(U||this._codeEditor.getScrollTop()+$.heightInPx)})}}_showViewZone(U=!0){if(!!this._isVisible&&!!this._codeEditor.getOption(31).addExtraSpaceOnTop){this._viewZone===void 0&&(this._viewZone=new ne(0));const $=this._viewZone;this._codeEditor.changeViewZones(ie=>{if(this._viewZoneId!==void 0){const oe=this._getHeight();if(oe===$.heightInPx)return;let ae=oe-$.heightInPx;$.heightInPx=oe,ie.layoutZone(this._viewZoneId),U&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+ae);return}else{let oe=this._getHeight();if(oe-=this._codeEditor.getOption(69).top,oe<=0)return;$.heightInPx=oe,this._viewZoneId=ie.addZone($),U&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+oe)}})}}_removeViewZone(){this._codeEditor.changeViewZones(U=>{this._viewZoneId!==void 0&&(U.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(U){let H={inputActiveOptionBorder:U.getColor(u.inputActiveOptionBorder),inputActiveOptionBackground:U.getColor(u.inputActiveOptionBackground),inputActiveOptionForeground:U.getColor(u.inputActiveOptionForeground),inputBackground:U.getColor(u.inputBackground),inputForeground:U.getColor(u.inputForeground),inputBorder:U.getColor(u.inputBorder),inputValidationInfoBackground:U.getColor(u.inputValidationInfoBackground),inputValidationInfoForeground:U.getColor(u.inputValidationInfoForeground),inputValidationInfoBorder:U.getColor(u.inputValidationInfoBorder),inputValidationWarningBackground:U.getColor(u.inputValidationWarningBackground),inputValidationWarningForeground:U.getColor(u.inputValidationWarningForeground),inputValidationWarningBorder:U.getColor(u.inputValidationWarningBorder),inputValidationErrorBackground:U.getColor(u.inputValidationErrorBackground),inputValidationErrorForeground:U.getColor(u.inputValidationErrorForeground),inputValidationErrorBorder:U.getColor(u.inputValidationErrorBorder)};this._findInput.style(H),this._replaceInput.style(H),this._toggleSelectionFind.style(H)}_tryUpdateWidgetWidth(){if(!!this._isVisible&&!!N.isInDOM(this._domNode)){const U=this._codeEditor.getLayoutInfo();if(U.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const $=U.width,ie=U.minimap.minimapWidth;let oe=!1,ae=!1,G=!1;if(this._resized&&N.getTotalWidth(this._domNode)>R){this._domNode.style.maxWidth=`${$-28-ie-15}px`,this._replaceInput.width=N.getTotalWidth(this._findInput.domNode);return}if(R+28+ie>=$&&(ae=!0),R+28+ie-K>=$&&(G=!0),R+28+ie-K>=$+50&&(oe=!0),this._domNode.classList.toggle("collapsed-find-widget",oe),this._domNode.classList.toggle("narrow-find-widget",G),this._domNode.classList.toggle("reduced-find-widget",ae),!G&&!oe&&(this._domNode.style.maxWidth=`${$-28-ie-15}px`),this._resized){this._findInput.inputBox.layout();let j=this._findInput.inputBox.element.clientWidth;j>0&&(this._replaceInput.width=j)}else this._isReplaceVisible&&(this._replaceInput.width=N.getTotalWidth(this._findInput.domNode))}}_getHeight(){let U=0;return U+=4,U+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(U+=4,U+=this._replaceInput.inputBox.height+2),U+=4,U}_tryUpdateHeight(){const U=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===U?!1:(this._cachedHeight=U,this._domNode.style.height=`${U}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(!!this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let U=this._codeEditor.getSelections();U.map(H=>{H.endColumn===1&&H.endLineNumber>H.startLineNumber&&(H=H.setEndPosition(H.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(H.endLineNumber-1)));const $=this._state.currentMatch;return H.startLineNumber!==H.endLineNumber&&!s.Range.equalsRange(H,$)?H:null}).filter(H=>!!H),U.length&&this._state.change({searchScope:U},!0)}}_onFindInputMouseDown(U){U.middleButton&&U.stopPropagation()}_onFindInputKeyDown(U){if(U.equals(se|3)){this._findInput.inputBox.insertAtCursor(`
`),U.preventDefault();return}if(U.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),U.preventDefault();return}if(U.equals(2048|18)){this._codeEditor.focus(),U.preventDefault();return}if(U.equals(16))return le(U,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(U.equals(18))return X(U,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(U){if(U.equals(se|3)){c.isWindows&&c.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(b.localize(25,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ee,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
`),U.preventDefault();return}if(U.equals(2)){this._findInput.focusOnCaseSensitive(),U.preventDefault();return}if(U.equals(1024|2)){this._findInput.focus(),U.preventDefault();return}if(U.equals(2048|18)){this._codeEditor.focus(),U.preventDefault();return}if(U.equals(16))return le(U,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(U.equals(18))return X(U,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(U){return 0}_keybindingLabelFor(U){let H=this._keybindingService.lookupKeybinding(U);return H?` (${H.getLabel()})`:""}_buildDomNode(){const U=!0,H=!0;this._findInput=this._register(new i.ContextScopedFindInput(null,this._contextViewProvider,{width:x,label:_,placeholder:f,appendCaseSensitiveLabel:this._keybindingLabelFor(a.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(a.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(a.FIND_IDS.ToggleRegexCommand),validation:j=>{if(j.length===0||!this._findInput.getRegex())return null;try{return new RegExp(j,"gu"),null}catch(te){return{content:te.message}}},flexibleHeight:U,flexibleWidth:H,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(j=>this._onFindInputKeyDown(j))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(j=>{j.equals(1024|2)&&this._isReplaceVisible&&(this._replaceInput.focus(),j.preventDefault())})),this._register(this._findInput.onRegexKeyDown(j=>{j.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),j.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(j=>{this._tryUpdateHeight()&&this._showViewZone()})),c.isLinux&&this._register(this._findInput.onMouseDown(j=>this._onFindInputMouseDown(j))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new P({label:v+this._keybindingLabelFor(a.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{this._codeEditor.getAction(a.FIND_IDS.PreviousMatchFindAction).run().then(void 0,g.onUnexpectedError)}})),this._nextBtn=this._register(new P({label:y+this._keybindingLabelFor(a.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{this._codeEditor.getAction(a.FIND_IDS.NextMatchFindAction).run().then(void 0,g.onUnexpectedError)}}));let $=document.createElement("div");$.className="find-part",$.appendChild(this._findInput.domNode);const ie=document.createElement("div");ie.className="find-actions",$.appendChild(ie),ie.appendChild(this._matchesCount),ie.appendChild(this._prevBtn.domNode),ie.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new w.Checkbox({icon:l,title:L+this._keybindingLabelFor(a.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let j=this._codeEditor.getSelections();j.map(te=>(te.endColumn===1&&te.endLineNumber>te.startLineNumber&&(te=te.setEndPosition(te.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(te.endLineNumber-1))),te.isEmpty()?null:te)).filter(te=>!!te),j.length&&this._state.change({searchScope:j},!0)}}else this._state.change({searchScope:null},!0)})),ie.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new P({label:I+this._keybindingLabelFor(a.FIND_IDS.CloseFindWidgetCommand),icon:t.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:j=>{j.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),j.preventDefault())}})),ie.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new i.ContextScopedReplaceInput(null,void 0,{label:k,placeholder:E,appendPreserveCaseLabel:this._keybindingLabelFor(a.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:U,flexibleWidth:H,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(j=>this._onReplaceInputKeyDown(j))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(j=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(j=>{j.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),j.preventDefault())})),this._replaceBtn=this._register(new P({label:T+this._keybindingLabelFor(a.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:j=>{j.equals(1024|2)&&(this._closeBtn.focus(),j.preventDefault())}})),this._replaceAllBtn=this._register(new P({label:O+this._keybindingLabelFor(a.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));let oe=document.createElement("div");oe.className="replace-part",oe.appendChild(this._replaceInput.domNode);const ae=document.createElement("div");ae.className="replace-actions",oe.appendChild(ae),ae.appendChild(this._replaceBtn.domNode),ae.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new P({label:A,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=N.getTotalWidth(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),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=`${R}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild($),this._domNode.appendChild(oe),this._resizeSash=new S.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let G=R;this._register(this._resizeSash.onDidStart(()=>{G=N.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(j=>{this._resized=!0;let te=G+j.startX-j.currentX;if(!(te<R)){const Z=parseFloat(N.getComputedStyle(this._domNode).maxWidth)||0;te>Z||(this._domNode.style.width=`${te}px`,this._isReplaceVisible&&(this._replaceInput.width=N.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}})),this._register(this._resizeSash.onDidReset(()=>{const j=N.getTotalWidth(this._domNode);if(!(j<R)){let te=R;if(!this._resized||j===R){const Z=this._codeEditor.getLayoutInfo();te=Z.width-28-Z.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${te}px`,this._isReplaceVisible&&(this._replaceInput.width=N.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}}))}updateAccessibilitySupport(){const U=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(U!==2)}}e.FindWidget=z,z.ID="editor.contrib.findWidget";class P extends C.Widget{constructor(U){super();this._opts=U;let H="button";this._opts.className&&(H=H+" "+this._opts.className),this._opts.icon&&(H=H+" "+r.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=H,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,$=>{this._opts.onTrigger(),$.preventDefault()}),this.onkeydown(this._domNode,$=>{if($.equals(10)||$.equals(3)){this._opts.onTrigger(),$.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown($)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(U){this._domNode.classList.toggle("disabled",!U),this._domNode.setAttribute("aria-disabled",String(!U)),this._domNode.tabIndex=U?0:-1}setExpanded(U){this._domNode.setAttribute("aria-expanded",String(!!U)),U?(this._domNode.classList.remove(...r.ThemeIcon.asClassNameArray(h)),this._domNode.classList.add(...r.ThemeIcon.asClassNameArray(m))):(this._domNode.classList.remove(...r.ThemeIcon.asClassNameArray(m)),this._domNode.classList.add(...r.ThemeIcon.asClassNameArray(h)))}}e.SimpleButton=P,r.registerThemingParticipant((V,U)=>{const H=(re,ce)=>{ce&&U.addRule(`.monaco-editor ${re} { background-color: ${ce}; }`)};H(".findMatch",V.getColor(u.editorFindMatchHighlight)),H(".currentFindMatch",V.getColor(u.editorFindMatch)),H(".findScope",V.getColor(u.editorFindRangeHighlight));const $=V.getColor(u.editorWidgetBackground);H(".find-widget",$);const ie=V.getColor(u.widgetShadow);ie&&U.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${ie}; }`);const oe=V.getColor(u.editorFindMatchHighlightBorder);oe&&U.addRule(`.monaco-editor .findMatch { border: 1px ${V.type==="hc"?"dotted":"solid"} ${oe}; box-sizing: border-box; }`);const ae=V.getColor(u.editorFindMatchBorder);ae&&U.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${ae}; padding: 1px; box-sizing: border-box; }`);const G=V.getColor(u.editorFindRangeHighlightBorder);G&&U.addRule(`.monaco-editor .findScope { border: 1px ${V.type==="hc"?"dashed":"solid"} ${G}; }`);const j=V.getColor(u.contrastBorder);j&&U.addRule(`.monaco-editor .find-widget { border: 1px solid ${j}; }`);const te=V.getColor(u.editorWidgetForeground);te&&U.addRule(`.monaco-editor .find-widget { color: ${te}; }`);const Z=V.getColor(u.errorForeground);Z&&U.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${Z}; }`);const ue=V.getColor(u.editorWidgetResizeBorder);if(ue)U.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${ue}; }`);else{const re=V.getColor(u.editorWidgetBorder);re&&U.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${re}; }`)}const he=V.getColor(u.focusBorder);he&&U.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${he}; }`)})}),define(Q[267],J([0,1,472,15,2,8,13,25,142,599,600,657,34,84,16,68,37,79,11,32,28]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.PreviousMatchFindAction2=e.PreviousMatchFindAction=e.NextMatchFindAction2=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindAction=e.FindController=e.CommonFindController=e.getSelectionSearchString=void 0;const h=524288;function m(F,D="single"){if(!F.hasModel())return null;const R=F.getSelection();if(D==="single"&&R.startLineNumber===R.endLineNumber||D==="multiple"){if(R.isEmpty()){const W=F.getConfiguredWordAtPosition(R.getStartPosition());if(W)return W.word}else if(F.getModel().getValueLengthInRange(R)<h)return F.getModel().getValueInRange(R)}return null}e.getSelectionSearchString=m;let _=class qt extends M.Disposable{constructor(D,R,W,x){super();this._editor=D,this._findWidgetVisible=d.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(R),this._contextKeyService=R,this._storageService=W,this._clipboardService=x,this._updateHistoryDelayer=new N.Delayer(500),this._state=this._register(new p.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(K=>this._onStateChanged(K))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let K=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),K&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(31).loop})}))}get editor(){return this._editor}static get(D){return D.getContribution(qt.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(D){this.saveQueryState(D),D.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),D.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(D){D.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),D.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),D.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),D.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!d.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let D=this._editor.getSelections();D.map(R=>(R.endColumn===1&&R.endLineNumber>R.startLineNumber&&(R=R.setEndPosition(R.endLineNumber-1,this._editor.getModel().getLineMaxColumn(R.endLineNumber-1))),R.isEmpty()?null:R)).filter(R=>!!R),D.length&&this._state.change({searchScope:D},!0)}}setSearchString(D){this._state.isRegex&&(D=w.escapeRegExpCharacters(D)),this._state.change({searchString:D},!1)}highlightFindOptions(D=!1){}_start(D){return Ie(this,void 0,void 0,function*(){if(this.disposeModel(),!!this._editor.hasModel()){let R={isRevealed:!0};if(D.seedSearchStringFromSelection==="single"){let W=m(this._editor,D.seedSearchStringFromSelection);W&&(this._state.isRegex?R.searchString=w.escapeRegExpCharacters(W):R.searchString=W)}else if(D.seedSearchStringFromSelection==="multiple"&&!D.updateSearchScope){let W=m(this._editor,D.seedSearchStringFromSelection);W&&(R.searchString=W)}if(!R.searchString&&D.seedSearchStringFromGlobalClipboard){let W=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;W&&(R.searchString=W)}if(D.forceRevealReplace?R.isReplaceRevealed=!0:this._findWidgetVisible.get()||(R.isReplaceRevealed=!1),D.updateSearchScope){let W=this._editor.getSelections();W.some(x=>!x.isEmpty())&&(R.searchScope=W)}R.loop=D.loop,this._state.change(R,!1),this._model||(this._model=new d.FindModelBoundToEditorModel(this._editor,this._state))}})}start(D){return this._start(D)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return Ie(this,void 0,void 0,function*(){return this._editor.getOption(31).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(D){this._editor.getOption(31).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(D)}};_.ID="editor.contrib.findController",_=Me([_e(1,a.IContextKeyService),_e(2,i.IStorageService),_e(3,s.IClipboardService)],_),e.CommonFindController=_;let f=class extends _{constructor(D,R,W,x,K,Y,ee,se){super(D,W,ee,se);this._contextViewService=R,this._keybindingService=x,this._themeService=K,this._notificationService=Y,this._widget=null,this._findOptionsWidget=null}_start(D){const R=Object.create(null,{_start:{get:()=>super._start}});return Ie(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const W=this._editor.getSelection();let x=!1;switch(this._editor.getOption(31).autoFindInSelection){case"always":x=!0;break;case"never":x=!1;break;case"multiline":x=!!W&&W.startLineNumber!==W.endLineNumber;break;default:break}D.updateSearchScope=x,yield R._start.call(this,D),this._widget&&(D.shouldFocus===2?this._widget.focusReplaceInput():D.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(D=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!D?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new c.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new g.FindOptionsWidget(this._editor,this._state,this._keybindingService,this._themeService))}};f=Me([_e(1,u.IContextViewService),_e(2,a.IContextKeyService),_e(3,r.IKeybindingService),_e(4,n.IThemeService),_e(5,t.INotificationService),_e(6,i.IStorageService),_e(7,s.IClipboardService)],f),e.FindController=f,e.StartFindAction=S.registerMultiEditorAction(new S.MultiEditorAction({id:d.FIND_IDS.StartFindAction,label:b.localize(0,null),alias:"Find",precondition:a.ContextKeyExpr.or(C.EditorContextKeys.focus,a.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|36,weight:100},menuOpts:{menuId:o.MenuId.MenubarEditMenu,group:"3_find",title:b.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(F,D)=>{const R=F.get(l.ICodeEditorService),W=R.getFocusedCodeEditor()||R.getActiveCodeEditor();if(!W)return!1;const x=_.get(W);return x?x.start({forceRevealReplace:!1,seedSearchStringFromSelection:W.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:W.getOption(31).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:W.getOption(31).loop}):!1});class v extends S.EditorAction{constructor(){super({id:d.FIND_IDS.StartFindWithSelection,label:b.localize(2,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2048|35},weight:100}})}run(D,R){return Ie(this,void 0,void 0,function*(){let W=_.get(R);W&&(yield W.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:R.getOption(31).loop}),W.setGlobalBufferTerm(W.getState().searchString))})}}e.StartFindWithSelectionAction=v;class y extends S.EditorAction{run(D,R){return Ie(this,void 0,void 0,function*(){let W=_.get(R);W&&!this._run(W)&&(yield W.start({forceRevealReplace:!1,seedSearchStringFromSelection:W.getState().searchString.length===0&&R.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:R.getOption(31).loop}),this._run(W))})}}e.MatchFindAction=y;class L extends y{constructor(){super({id:d.FIND_IDS.NextMatchFindAction,label:b.localize(3,null),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:61,mac:{primary:2048|37,secondary:[61]},weight:100}})}_run(D){return D.moveToNextMatch()?(D.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=L;class I extends y{constructor(){super({id:d.FIND_IDS.NextMatchFindAction,label:b.localize(4,null),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:a.ContextKeyExpr.and(C.EditorContextKeys.focus,d.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}})}_run(D){return D.moveToNextMatch()?(D.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction2=I;class k extends y{constructor(){super({id:d.FIND_IDS.PreviousMatchFindAction,label:b.localize(5,null),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:1024|61,mac:{primary:2048|1024|37,secondary:[1024|61]},weight:100}})}_run(D){return D.moveToPrevMatch()}}e.PreviousMatchFindAction=k;class E extends y{constructor(){super({id:d.FIND_IDS.PreviousMatchFindAction,label:b.localize(6,null),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:a.ContextKeyExpr.and(C.EditorContextKeys.focus,d.CONTEXT_FIND_INPUT_FOCUSED),primary:1024|3,weight:100}})}_run(D){return D.moveToPrevMatch()}}e.PreviousMatchFindAction2=E;class T extends S.EditorAction{run(D,R){return Ie(this,void 0,void 0,function*(){let W=_.get(R);if(!!W){let x=m(R);x&&W.setSearchString(x),this._run(W)||(yield W.start({forceRevealReplace:!1,seedSearchStringFromSelection:R.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:R.getOption(31).loop}),this._run(W))}})}}e.SelectionMatchFindAction=T;class O extends T{constructor(){super({id:d.FIND_IDS.NextSelectionMatchFindAction,label:b.localize(7,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:2048|61,weight:100}})}_run(D){return D.moveToNextMatch()}}e.NextSelectionMatchFindAction=O;class A extends T{constructor(){super({id:d.FIND_IDS.PreviousSelectionMatchFindAction,label:b.localize(8,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:2048|1024|61,weight:100}})}_run(D){return D.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=A,e.StartFindReplaceAction=S.registerMultiEditorAction(new S.MultiEditorAction({id:d.FIND_IDS.StartFindReplaceAction,label:b.localize(9,null),alias:"Replace",precondition:a.ContextKeyExpr.or(C.EditorContextKeys.focus,a.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|38,mac:{primary:2048|512|36},weight:100},menuOpts:{menuId:o.MenuId.MenubarEditMenu,group:"3_find",title:b.localize(10,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(F,D)=>{const R=F.get(l.ICodeEditorService),W=R.getFocusedCodeEditor()||R.getActiveCodeEditor();if(!W||!W.hasModel()||W.getOption(75))return!1;const x=_.get(W);if(!x)return!1;const K=W.getSelection(),Y=x.isFindInputFocused(),ee=!K.isEmpty()&&K.startLineNumber===K.endLineNumber&&W.getOption(31).seedSearchStringFromSelection&&!Y,se=Y||ee?2:1;return x.start({forceRevealReplace:!0,seedSearchStringFromSelection:ee?"single":"none",seedSearchStringFromGlobalClipboard:W.getOption(31).seedSearchStringFromSelection,shouldFocus:se,shouldAnimate:!0,updateSearchScope:!1,loop:W.getOption(31).loop})}),S.registerEditorContribution(_.ID,f),S.registerEditorAction(v),S.registerEditorAction(L),S.registerEditorAction(I),S.registerEditorAction(k),S.registerEditorAction(E),S.registerEditorAction(O),S.registerEditorAction(A);const B=S.EditorCommand.bindToContribution(_.get);S.registerEditorCommand(new B({id:d.FIND_IDS.CloseFindWidgetCommand,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:F=>F.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:a.ContextKeyExpr.and(C.EditorContextKeys.focus,a.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1024|9]}})),S.registerEditorCommand(new B({id:d.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:F=>F.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:C.EditorContextKeys.focus,primary:d.ToggleCaseSensitiveKeybinding.primary,mac:d.ToggleCaseSensitiveKeybinding.mac,win:d.ToggleCaseSensitiveKeybinding.win,linux:d.ToggleCaseSensitiveKeybinding.linux}})),S.registerEditorCommand(new B({id:d.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:F=>F.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:C.EditorContextKeys.focus,primary:d.ToggleWholeWordKeybinding.primary,mac:d.ToggleWholeWordKeybinding.mac,win:d.ToggleWholeWordKeybinding.win,linux:d.ToggleWholeWordKeybinding.linux}})),S.registerEditorCommand(new B({id:d.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:F=>F.toggleRegex(),kbOpts:{weight:100+5,kbExpr:C.EditorContextKeys.focus,primary:d.ToggleRegexKeybinding.primary,mac:d.ToggleRegexKeybinding.mac,win:d.ToggleRegexKeybinding.win,linux:d.ToggleRegexKeybinding.linux}})),S.registerEditorCommand(new B({id:d.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:F=>F.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:C.EditorContextKeys.focus,primary:d.ToggleSearchScopeKeybinding.primary,mac:d.ToggleSearchScopeKeybinding.mac,win:d.ToggleSearchScopeKeybinding.win,linux:d.ToggleSearchScopeKeybinding.linux}})),S.registerEditorCommand(new B({id:d.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:F=>F.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:C.EditorContextKeys.focus,primary:d.TogglePreserveCaseKeybinding.primary,mac:d.TogglePreserveCaseKeybinding.mac,win:d.TogglePreserveCaseKeybinding.win,linux:d.TogglePreserveCaseKeybinding.linux}})),S.registerEditorCommand(new B({id:d.FIND_IDS.ReplaceOneAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:F=>F.replace(),kbOpts:{weight:100+5,kbExpr:C.EditorContextKeys.focus,primary:2048|1024|22}})),S.registerEditorCommand(new B({id:d.FIND_IDS.ReplaceOneAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:F=>F.replace(),kbOpts:{weight:100+5,kbExpr:a.ContextKeyExpr.and(C.EditorContextKeys.focus,d.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),S.registerEditorCommand(new B({id:d.FIND_IDS.ReplaceAllAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:F=>F.replaceAll(),kbOpts:{weight:100+5,kbExpr:C.EditorContextKeys.focus,primary:2048|512|3}})),S.registerEditorCommand(new B({id:d.FIND_IDS.ReplaceAllAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:F=>F.replaceAll(),kbOpts:{weight:100+5,kbExpr:a.ContextKeyExpr.and(C.EditorContextKeys.focus,d.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2048|3}}})),S.registerEditorCommand(new B({id:d.FIND_IDS.SelectAllMatchesAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:F=>F.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:C.EditorContextKeys.focus,primary:512|3}}))}),define(Q[658],J([0,1,31,27,475,80,11]),function(q,e,b,N,M,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0,e.foldingExpandedIcon=w.registerIcon("folding-expanded",N.Codicon.chevronDown,M.localize(0,null)),e.foldingCollapsedIcon=w.registerIcon("folding-collapsed",N.Codicon.chevronRight,M.localize(1,null));class C{constructor(g){this.editor=g,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(g,p){return p?C.HIDDEN_RANGE_DECORATION:g?this.showFoldingHighlights?C.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:C.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?C.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:C.EXPANDED_VISUAL_DECORATION}deltaDecorations(g,p){return this.editor.deltaDecorations(g,p)}changeDecorations(g){return this.editor.changeDecorations(g)}}e.FoldingDecorationProvider=C,C.COLLAPSED_VISUAL_DECORATION=b.ModelDecorationOptions.register({stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:S.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),C.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=b.ModelDecorationOptions.register({stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:S.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),C.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=b.ModelDecorationOptions.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:S.ThemeIcon.asClassName(e.foldingExpandedIcon)}),C.EXPANDED_VISUAL_DECORATION=b.ModelDecorationOptions.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+S.ThemeIcon.asClassName(e.foldingExpandedIcon)}),C.HIDDEN_RANGE_DECORATION=b.ModelDecorationOptions.register({stickiness:1})}),define(Q[659],J([0,1,474,20,8,15,39,2,13,405,658,25,406,41,541,18,225,407,12,16,11,22,342]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorFoldForeground=e.foldBackgroundBackground=e.FoldingController=void 0;const m=new t.RawContextKey("foldingEnabled",!1);let _=class $t extends C.Disposable{constructor(W,x){super();this.contextKeyService=x,this.localToDispose=this._register(new C.DisposableStore),this.editor=W;const K=this.editor.getOptions();this._isEnabled=K.get(33),this._useFoldingProviders=K.get(34)!=="indentation",this._unfoldOnClickAfterEndOfLine=K.get(36),this._restoringViewState=!1,this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new p.FoldingDecorationProvider(W),this.foldingDecorationProvider.autoHideFoldingControls=K.get(94)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=K.get(35),this.foldingEnabled=m.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(Y=>{if(Y.hasChanged(33)&&(this._isEnabled=this.editor.getOptions().get(33),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),Y.hasChanged(94)||Y.hasChanged(35)){const ee=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls=ee.get(94)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=ee.get(35),this.onModelContentChanged()}Y.hasChanged(34)&&(this._useFoldingProviders=this.editor.getOptions().get(34)!=="indentation",this.onFoldingStrategyChanged()),Y.hasChanged(36)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(36))})),this.onModelChanged()}static get(W){return W.getContribution($t.ID)}saveViewState(){let W=this.editor.getModel();if(!W||!this._isEnabled||W.isTooLargeForTokenization())return{};if(this.foldingModel){let x=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),K=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:x,lineCount:W.getLineCount(),provider:K}}}restoreViewState(W){let x=this.editor.getModel();if(!(!x||!this._isEnabled||x.isTooLargeForTokenization()||!this.hiddenRangeModel)&&!(!W||!W.collapsedRegions||W.lineCount!==x.getLineCount())){(W.provider===r.ID_SYNTAX_PROVIDER||W.provider===i.ID_INIT_PROVIDER)&&(this.foldingStateMemento=W);const K=W.collapsedRegions;if(this.hiddenRangeModel.applyMemento(K)){const Y=this.getFoldingModel();Y&&Y.then(ee=>{if(ee){this._restoringViewState=!0;try{ee.applyMemento(K)}finally{this._restoringViewState=!1}}}).then(void 0,n.onUnexpectedError)}}}onModelChanged(){this.localToDispose.clear();let W=this.editor.getModel();!this._isEnabled||!W||W.isTooLargeForTokenization()||(this.foldingModel=new g.FoldingModel(W,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new o.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(x=>this.onHiddenRangesChanges(x))),this.updateScheduler=new w.Delayer(200),this.cursorChangedScheduler=new w.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(u.FoldingRangeProviderRegistry.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(()=>this.onModelContentChanged())),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(x=>this.onEditorMouseDown(x))),this.localToDispose.add(this.editor.onMouseUp(x=>this.onEditorMouseUp(x))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(W){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new a.IndentRangeProvider(W),this._useFoldingProviders&&this.foldingModel){let x=u.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);if(x.length===0&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new i.InitializingRangeProvider(W,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4);x.length>0&&(this.rangeProvider=new r.SyntaxRangeProvider(W,x,()=>this.onModelContentChanged()))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const W=this.foldingModel;if(!W)return null;let x=this.foldingRegionPromise=w.createCancelablePromise(K=>this.getRangeProvider(W.textModel).compute(K));return x.then(K=>{if(K&&x===this.foldingRegionPromise){let Y=this.editor.getSelections(),ee=Y?Y.map(se=>se.startLineNumber):[];W.update(K,ee)}return W})}).then(void 0,W=>(n.onUnexpectedError(W),null)))}onHiddenRangesChanges(W){if(this.hiddenRangeModel&&W.length&&!this._restoringViewState){let x=this.editor.getSelections();x&&this.hiddenRangeModel.adjustSelections(x)&&this.editor.setSelections(x)}this.editor.setHiddenAreas(W)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const W=this.getFoldingModel();!W||W.then(x=>{if(x){let K=this.editor.getSelections();if(K&&K.length>0){let Y=[];for(let ee of K){let se=ee.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(se)&&Y.push(...x.getAllRegionsAtLine(se,ne=>ne.isCollapsed&&se>ne.startLineNumber))}Y.length&&(x.toggleCollapseState(Y),this.reveal(K[0].getPosition()))}}}).then(void 0,n.onUnexpectedError)}onEditorMouseDown(W){if(this.mouseDownInfo=null,!(!this.hiddenRangeModel||!W.target||!W.target.range)&&!(!W.event.leftButton&&!W.event.middleButton)){const x=W.target.range;let K=!1;switch(W.target.type){case 4:const Y=W.target.detail,ee=W.target.element.offsetLeft;if(Y.offsetX-ee<5)return;K=!0;break;case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!W.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let ne=this.editor.getModel();if(ne&&x.startColumn===ne.getLineMaxColumn(x.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:x.startLineNumber,iconClicked:K}}}onEditorMouseUp(W){const x=this.getFoldingModel();if(!(!x||!this.mouseDownInfo||!W.target)){let K=this.mouseDownInfo.lineNumber,Y=this.mouseDownInfo.iconClicked,ee=W.target.range;if(!(!ee||ee.startLineNumber!==K)){if(Y){if(W.target.type!==4)return}else{let se=this.editor.getModel();if(!se||ee.startColumn!==se.getLineMaxColumn(K))return}x.then(se=>{if(se){let ne=se.getRegionAtLine(K);if(ne&&ne.startLineNumber===K){let le=ne.isCollapsed;if(Y||le){let X=[],z=W.event.middleButton||W.event.shiftKey;if(z)for(const P of se.getRegionsInside(ne))P.isCollapsed===le&&X.push(P);(le||!z||X.length===0)&&X.push(ne),se.toggleCollapseState(X),this.reveal({lineNumber:K,column:1})}}}}).then(void 0,n.onUnexpectedError)}}}reveal(W){this.editor.revealPositionInCenterIfOutsideViewport(W,0)}};_.ID="editor.contrib.folding",_=Me([_e(1,t.IContextKeyService)],_),e.FoldingController=_;class f extends d.EditorAction{runEditorCommand(W,x,K){let Y=_.get(x);if(!!Y){let ee=Y.getFoldingModel();if(ee)return this.reportTelemetry(W,x),ee.then(se=>{if(se){this.invoke(Y,se,x,K);const ne=x.getSelection();ne&&Y.reveal(ne.getStartPosition())}})}}getSelectedLines(W){let x=W.getSelections();return x?x.map(K=>K.startLineNumber):[]}getLineNumbers(W,x){return W&&W.selectionLines?W.selectionLines.map(K=>K+1):this.getSelectedLines(x)}run(W,x){}}function v(R){if(!N.isUndefined(R)){if(!N.isObject(R))return!1;const W=R;if(!N.isUndefined(W.levels)&&!N.isNumber(W.levels)||!N.isUndefined(W.direction)&&!N.isString(W.direction)||!N.isUndefined(W.selectionLines)&&(!N.isArray(W.selectionLines)||!W.selectionLines.every(N.isNumber)))return!1}return!0}class y extends f{constructor(){super({id:"editor.unfold",label:b.localize(0,null),alias:"Unfold",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2048|1024|89,mac:{primary:2048|512|89},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
* 'levels': Number of levels to unfold. If not set, defaults to 1.
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
`,constraint:v,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(W,x,K,Y){let ee=Y&&Y.levels||1,se=this.getLineNumbers(Y,K);Y&&Y.direction==="up"?g.setCollapseStateLevelsUp(x,!1,ee,se):g.setCollapseStateLevelsDown(x,!1,ee,se)}}class L extends f{constructor(){super({id:"editor.unfoldRecursively",label:b.localize(1,null),alias:"Unfold Recursively",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|89),weight:100}})}invoke(W,x,K,Y){g.setCollapseStateLevelsDown(x,!1,Number.MAX_VALUE,this.getSelectedLines(K))}}class I extends f{constructor(){super({id:"editor.fold",label:b.localize(2,null),alias:"Fold",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2048|1024|87,mac:{primary:2048|512|87},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
* 'levels': Number of levels to fold.
* 'direction': If 'up', folds given number of levels up otherwise folds down.
* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
`,constraint:v,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(W,x,K,Y){let ee=this.getLineNumbers(Y,K);const se=Y&&Y.levels,ne=Y&&Y.direction;typeof se!="number"&&typeof ne!="string"?g.setCollapseStateUp(x,!0,ee):ne==="up"?g.setCollapseStateLevelsUp(x,!0,se||1,ee):g.setCollapseStateLevelsDown(x,!0,se||1,ee)}}class k extends f{constructor(){super({id:"editor.toggleFold",label:b.localize(3,null),alias:"Toggle Fold",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|42),weight:100}})}invoke(W,x,K){let Y=this.getSelectedLines(K);g.toggleCollapseState(x,1,Y)}}class E extends f{constructor(){super({id:"editor.foldRecursively",label:b.localize(4,null),alias:"Fold Recursively",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|87),weight:100}})}invoke(W,x,K){let Y=this.getSelectedLines(K);g.setCollapseStateLevelsDown(x,!0,Number.MAX_VALUE,Y)}}class T extends f{constructor(){super({id:"editor.foldAllBlockComments",label:b.localize(5,null),alias:"Fold All Block Comments",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|85),weight:100}})}invoke(W,x,K){if(x.regions.hasTypes())g.setCollapseStateForType(x,u.FoldingRangeKind.Comment.value,!0);else{const Y=K.getModel();if(!Y)return;let ee=s.LanguageConfigurationRegistry.getComments(Y.getLanguageIdentifier().id);if(ee&&ee.blockCommentStartToken){let se=new RegExp("^\\s*"+M.escapeRegExpCharacters(ee.blockCommentStartToken));g.setCollapseStateForMatchingLines(x,se,!0)}}}}class O extends f{constructor(){super({id:"editor.foldAllMarkerRegions",label:b.localize(6,null),alias:"Fold All Regions",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|29),weight:100}})}invoke(W,x,K){if(x.regions.hasTypes())g.setCollapseStateForType(x,u.FoldingRangeKind.Region.value,!0);else{const Y=K.getModel();if(!Y)return;let ee=s.LanguageConfigurationRegistry.getFoldingRules(Y.getLanguageIdentifier().id);if(ee&&ee.markers&&ee.markers.start){let se=new RegExp(ee.markers.start);g.setCollapseStateForMatchingLines(x,se,!0)}}}}class A extends f{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:b.localize(7,null),alias:"Unfold All Regions",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|30),weight:100}})}invoke(W,x,K){if(x.regions.hasTypes())g.setCollapseStateForType(x,u.FoldingRangeKind.Region.value,!1);else{const Y=K.getModel();if(!Y)return;let ee=s.LanguageConfigurationRegistry.getFoldingRules(Y.getLanguageIdentifier().id);if(ee&&ee.markers&&ee.markers.start){let se=new RegExp(ee.markers.start);g.setCollapseStateForMatchingLines(x,se,!1)}}}}class B extends f{constructor(){super({id:"editor.foldAll",label:b.localize(8,null),alias:"Fold All",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|21),weight:100}})}invoke(W,x,K){g.setCollapseStateLevelsDown(x,!0)}}class F extends f{constructor(){super({id:"editor.unfoldAll",label:b.localize(9,null),alias:"Unfold All",precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|40),weight:100}})}invoke(W,x,K){g.setCollapseStateLevelsDown(x,!1)}}class D extends f{getFoldingLevel(){return parseInt(this.id.substr(D.ID_PREFIX.length))}invoke(W,x,K){g.setCollapseStateAtLevel(x,this.getFoldingLevel(),!0,this.getSelectedLines(K))}}D.ID_PREFIX="editor.foldLevel",D.ID=R=>D.ID_PREFIX+R,d.registerEditorContribution(_.ID,_),d.registerEditorAction(y),d.registerEditorAction(L),d.registerEditorAction(I),d.registerEditorAction(E),d.registerEditorAction(B),d.registerEditorAction(F),d.registerEditorAction(T),d.registerEditorAction(O),d.registerEditorAction(A),d.registerEditorAction(k);for(let R=1;R<=7;R++)d.registerInstantiatedEditorAction(new D({id:D.ID(R),label:b.localize(10,null,R),alias:`Fold Level ${R}`,precondition:m,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:S.KeyChord(2048|41,2048|21+R),weight:100}}));e.foldBackgroundBackground=h.registerColor("editor.foldBackground",{light:h.transparent(h.editorSelectionBackground,.3),dark:h.transparent(h.editorSelectionBackground,.3),hc:null},b.localize(11,null),!0),e.editorFoldForeground=h.registerColor("editorGutter.foldingControlForeground",{dark:h.iconForeground,light:h.iconForeground,hc:h.iconForeground},b.localize(12,null)),l.registerThemingParticipant((R,W)=>{const x=R.getColor(e.foldBackgroundBackground);x&&W.addRule(`.monaco-editor .folded-background { background-color: ${x}; }`);const K=R.getColor(e.editorFoldForeground);K&&W.addRule(`
.monaco-editor .cldr${l.ThemeIcon.asCSSSelector(p.foldingExpandedIcon)},
.monaco-editor .cldr${l.ThemeIcon.asCSSSelector(p.foldingCollapsedIcon)} {
color: ${K} !important;
}
`)})}),define(Q[268],J([0,1,479,2,16,14,3,13,25,655,28,34,27,9,557,80]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let r=class gt{constructor(v,y,L,I,k){this._markerNavigationService=y,this._contextKeyService=L,this._editorService=I,this._instantiationService=k,this._sessionDispoables=new N.DisposableStore,this._editor=v,this._widgetVisible=m.bindTo(this._contextKeyService)}static get(v){return v.getContribution(gt.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(v){if(this._model&&this._model.matches(v))return this._model;let y=!1;return this._model&&(y=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(v),y&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(g.MarkerNavigationWidget,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(L=>{var I,k,E;(!((I=this._model)===null||I===void 0?void 0:I.selected)||!S.Range.containsPosition((k=this._model)===null||k===void 0?void 0:k.selected.marker,L.position))&&((E=this._model)===null||E===void 0||E.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!(!this._widget||!this._widget.position||!this._model)){const L=this._model.find(this._editor.getModel().uri,this._widget.position);L?this._widget.updateMarker(L.marker):this._widget.showStale()}})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(L=>{this._editorService.openCodeEditor({resource:L.resource,options:{pinned:!0,revealIfOpened:!0,selection:S.Range.lift(L).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(v=!0){this._cleanUp(),v&&this._editor.focus()}showAtMarker(v){if(this._editor.hasModel()){const y=this._getOrCreateModel(this._editor.getModel().uri);y.resetIndex(),y.move(!0,this._editor.getModel(),new w.Position(v.startLineNumber,v.startColumn)),y.selected&&this._widget.showAtMarker(y.selected.marker,y.selected.index,y.selected.total)}}nagivate(v,y){return Ie(this,void 0,void 0,function*(){if(this._editor.hasModel()){const L=this._getOrCreateModel(y?void 0:this._editor.getModel().uri);if(L.move(v,this._editor.getModel(),this._editor.getPosition()),!L.selected)return;if(L.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const I=yield this._editorService.openCodeEditor({resource:L.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:L.selected.marker}},this._editor);I&&(gt.get(I).close(),gt.get(I).nagivate(v,y))}else this._widget.showAtMarker(L.selected.marker,L.selected.index,L.selected.total)}})}};r.ID="editor.contrib.markerController",r=Me([_e(1,a.IMarkerNavigationService),_e(2,M.IContextKeyService),_e(3,p.ICodeEditorService),_e(4,s.IInstantiationService)],r),e.MarkerController=r;class i extends C.EditorAction{constructor(v,y,L){super(L);this._next=v,this._multiFile=y}run(v,y){return Ie(this,void 0,void 0,function*(){y.hasModel()&&r.get(y).nagivate(this._next,this._multiFile)})}}class n extends i{constructor(){super(!0,!1,{id:n.ID,label:n.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:512|66,weight:100},menuOpts:{menuId:g.MarkerNavigationWidget.TitleMenu,title:n.LABEL,icon:u.registerIcon("marker-navigation-next",o.Codicon.chevronDown,b.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=n,n.ID="editor.action.marker.next",n.LABEL=b.localize(0,null);class t extends i{constructor(){super(!1,!1,{id:t.ID,label:t.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:1024|512|66,weight:100},menuOpts:{menuId:g.MarkerNavigationWidget.TitleMenu,title:n.LABEL,icon:u.registerIcon("marker-navigation-previous",o.Codicon.chevronUp,b.localize(3,null)),group:"navigation",order:2}})}}t.ID="editor.action.marker.prev",t.LABEL=b.localize(2,null);class l extends i{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:b.localize(4,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:c.MenuId.MenubarGoMenu,title:b.localize(5,null),group:"6_problem_nav",order:1}})}}class h extends i{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:b.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.EditorContextKeys.focus,primary:1024|66,weight:100},menuOpts:{menuId:c.MenuId.MenubarGoMenu,title:b.localize(7,null),group:"6_problem_nav",order:2}})}}C.registerEditorContribution(r.ID,r),C.registerEditorAction(n),C.registerEditorAction(t),C.registerEditorAction(l),C.registerEditorAction(h);const m=new M.RawContextKey("markersNavigationVisible",!1),_=C.EditorCommand.bindToContribution(r.get);C.registerEditorCommand(new _({id:"closeMarkersNavigation",precondition:m,handler:f=>f.close(),kbOpts:{weight:100+50,kbExpr:d.EditorContextKeys.focus,primary:9,secondary:[1024|9]}}))}),define(Q[660],J([0,1,490,7,2,3,19,85,44,178,12,58,268,37,15,145,263,130,59,209]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const l=N.$;class h{constructor(v,y){this.range=v,this.marker=y}equals(v){return v instanceof h?C.IMarkerData.makeKey(this.marker)===C.IMarkerData.makeKey(v.marker):!1}}e.MarkerHover=h;const m={type:2,filter:{include:i.CodeActionKind.QuickFix}};let _=class{constructor(v,y,L,I,k){this._editor=v,this._hover=y,this._markerDecorationsService=L,this._keybindingService=I,this._openerService=k,this.recentMarkerCodeActionsInfo=void 0}computeSync(v,y){if(!this._editor.hasModel())return[];const L=this._editor.getModel(),I=v.startLineNumber,k=L.getLineMaxColumn(I),E=[];for(const T of y){const O=T.range.startLineNumber===I?T.range.startColumn:1,A=T.range.endLineNumber===I?T.range.endColumn:k,B=this._markerDecorationsService.getMarker(L.uri,T);if(!!B){const F=new w.Range(v.startLineNumber,O,v.startLineNumber,A);E.push(new h(F,B))}}return E}renderHoverParts(v,y){if(!v.length)return M.Disposable.None;const L=new M.DisposableStore;v.forEach(k=>y.appendChild(this.renderMarkerHover(k,L)));const I=v.length===1?v[0]:v.sort((k,E)=>C.MarkerSeverity.compare(k.marker.severity,E.marker.severity))[0];return y.appendChild(this.renderMarkerStatusbar(I,L)),L}renderMarkerHover(v,y){const L=l("div.hover-row"),I=N.append(L,l("div.marker.hover-contents")),{source:k,message:E,code:T,relatedInformation:O}=v.marker;this._editor.applyFontInfo(I);const A=N.append(I,l("span"));if(A.style.whiteSpace="pre-wrap",A.innerText=E,k||T)if(T&&typeof T!="string"){const B=l("span");if(k){const W=N.append(B,l("span"));W.innerText=k}const F=N.append(B,l("a.code-link"));F.setAttribute("href",T.target.toString()),y.add(N.addDisposableListener(F,"click",W=>{this._openerService.open(T.target),W.preventDefault(),W.stopPropagation()}));const D=N.append(F,l("span"));D.innerText=T.value;const R=N.append(I,B);R.style.opacity="0.6",R.style.paddingLeft="6px"}else{const B=N.append(I,l("span"));B.style.opacity="0.6",B.style.paddingLeft="6px",B.innerText=k&&T?`${k}(${T})`:k||`(${T})`}if(S.isNonEmptyArray(O))for(const{message:B,resource:F,startLineNumber:D,startColumn:R}of O){const W=N.append(I,l("div"));W.style.marginTop="8px";const x=N.append(W,l("a"));x.innerText=`${d.basename(F)}(${D}, ${R}): `,x.style.cursor="pointer",y.add(N.addDisposableListener(x,"click",Y=>{Y.stopPropagation(),Y.preventDefault(),this._openerService&&this._openerService.open(F,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:D,startColumn:R}}}).catch(p.onUnexpectedError)}));const K=N.append(W,l("span"));K.innerText=B,this._editor.applyFontInfo(K)}return L}renderMarkerStatusbar(v,y){const L=l("div.hover-row.status-bar"),I=N.append(L,l("div.actions"));if((v.marker.severity===C.MarkerSeverity.Error||v.marker.severity===C.MarkerSeverity.Warning||v.marker.severity===C.MarkerSeverity.Info)&&y.add(this.renderAction(I,{label:b.localize(0,null),commandId:o.NextMarkerAction.ID,run:()=>{this._hover.hide(),o.MarkerController.get(this._editor).showAtMarker(v.marker),this._editor.focus()}})),!this._editor.getOption(75)){const k=N.append(I,l("div"));this.recentMarkerCodeActionsInfo&&(C.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===C.IMarkerData.makeKey(v.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(k.textContent=b.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const E=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?M.Disposable.None:y.add(a.disposableTimeout(()=>k.textContent=b.localize(2,null),200));k.textContent||(k.textContent=String.fromCharCode(160));const T=this.getCodeActions(v.marker);y.add(M.toDisposable(()=>T.cancel())),T.then(O=>{if(E.dispose(),this.recentMarkerCodeActionsInfo={marker:v.marker,hasCodeActions:O.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){O.dispose(),k.textContent=b.localize(3,null);return}k.style.display="none";let A=!1;y.add(M.toDisposable(()=>{A||O.dispose()})),y.add(this.renderAction(I,{label:b.localize(4,null),commandId:r.QuickFixAction.Id,run:B=>{A=!0;const F=r.QuickFixController.get(this._editor),D=N.getDomNodePagePosition(B);this._hover.hide(),F.showCodeActions(m,O,{x:D.left+6,y:D.top+D.height+6})}}))})}return L}renderAction(v,y){const L=this._keybindingService.lookupKeybinding(y.commandId),I=L?L.getLabel():null;return t.renderHoverAction(v,y,I)}getCodeActions(v){return a.createCancelablePromise(y=>u.getCodeActions(this._editor.getModel(),new w.Range(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn),m,n.Progress.None,y))}};_=Me([_e(2,g.IMarkerDecorationsService),_e(3,s.IKeybindingService),_e(4,c.IOpenerService)],_),e.MarkerHoverParticipant=_}),define(Q[661],J([0,1,7,23,29,2,14,3,31,18,249,260,400,597,228,11,19,22,52,209,660,627]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesContentHoverWidget=void 0;class m{constructor(I,k,E){this.range=I,this.color=k,this.provider=E}equals(I){return!1}}class _{constructor(I,k){this.owner=I,this.data=k}}class f{constructor(I,k,E){this._markerHoverParticipant=k,this._markdownHoverParticipant=E,this._editor=I,this._result=[],this._range=null}setRange(I){this._range=I,this._result=[]}clearResult(){this._result=[]}computeAsync(I){return Ie(this,void 0,void 0,function*(){return!this._editor.hasModel()||!this._range?Promise.resolve([]):(yield this._markdownHoverParticipant.computeAsync(this._range,I)).map(E=>new _(this._markdownHoverParticipant,E))})}computeSync(){if(!this._editor.hasModel()||!this._range)return[];const I=this._editor.getModel(),k=this._range,E=k.startLineNumber;if(E>this._editor.getModel().getLineCount())return[];const T=I.getLineMaxColumn(E),O=this._editor.getLineDecorations(E).filter(R=>{if(R.options.isWholeLine)return!0;const W=R.range.startLineNumber===E?R.range.startColumn:1,x=R.range.endLineNumber===E?R.range.endColumn:T;return!(W>k.startColumn||k.endColumn>x)});let A=[];const B=c.ColorDetector.get(this._editor);for(const R of O){const W=B.getColorData(R.range.getStartPosition());if(W){const{color:x,range:K}=W.colorInfo;A.push(new _(null,new m(C.Range.lift(K),x,W.provider)));break}}const F=this._markdownHoverParticipant.computeSync(this._range,O);A=A.concat(F.map(R=>new _(this._markdownHoverParticipant,R)));const D=this._markerHoverParticipant.computeSync(this._range,O);return A=A.concat(D.map(R=>new _(this._markerHoverParticipant,R))),r.coalesce(A)}onResult(I,k){k?this._result=I.concat(this._result):this._result=this._result.concat(I)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._range){const I=new _(this._markdownHoverParticipant,this._markdownHoverParticipant.createLoadingMessage(this._range));return this._result.slice(0).concat([I])}return this._result.slice(0)}}class v extends n.Widget{constructor(I,k,E,T){super();this._hoverVisibleKey=k,this._themeService=T,this.allowEditorOverflow=!0,this._markerHoverParticipant=E.createInstance(l.MarkerHoverParticipant,I,this),this._markdownHoverParticipant=E.createInstance(h.MarkdownHoverParticipant,I,this),this._hover=this._register(new t.HoverWidget),this._id=v.ID,this._editor=I,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this.onkeydown(this._hover.containerDomNode,O=>{O.equals(9)&&this.hide()}),this._register(this._editor.onDidChangeConfiguration(O=>{O.hasChanged(38)&&this._updateFont()})),this._editor.onDidLayoutChange(()=>this.layout()),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastRange=null,this._computer=new f(this._editor,this._markerHoverParticipant,this._markdownHoverParticipant),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._hoverOperation=new a.HoverOperation(this._computer,O=>this._withResult(O,!0),null,O=>this._withResult(O,!1),this._editor.getOption(48).delay),this._register(b.addStandardDisposableListener(this.getDomNode(),b.EventType.FOCUS,()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")})),this._register(b.addStandardDisposableListener(this.getDomNode(),b.EventType.BLUR,()=>{this.getDomNode().classList.remove("colorpicker-hover")})),this._register(I.onDidChangeConfiguration(()=>{this._hoverOperation.setHoverTime(this._editor.getOption(48).delay)})),this._register(g.TokenizationRegistry.onDidChange(()=>{this._isVisible&&this._lastRange&&this._messages.length>0&&(this._messages=this._messages.map(O=>{var A,B;if(O.data instanceof m&&!!((A=this._lastRange)===null||A===void 0?void 0:A.intersectRanges(O.data.range))&&((B=this._colorPicker)===null||B===void 0?void 0:B.model.color)){const F=this._colorPicker.model.color,D={red:F.rgba.r/255,green:F.rgba.g/255,blue:F.rgba.b/255,alpha:F.rgba.a};return new _(O.owner,new m(O.data.range,D,O.data.provider))}else return O}),this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastRange,this._messages))}))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return this._id}getDomNode(){return this._hover.containerDomNode}showAt(I,k,E){this._showAtPosition=I,this._showAtRange=k,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=E,E&&this._hover.containerDomNode.focus()}getPosition(){return this._isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(k=>this._editor.applyFontInfo(k))}_updateContents(I){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(I),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const I=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:k,lineHeight:E}=this._editor.getOption(38);this._hover.contentsDomNode.style.fontSize=`${k}px`,this._hover.contentsDomNode.style.lineHeight=`${E}px`,this._hover.contentsDomNode.style.maxHeight=`${I}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}onModelDecorationsChanged(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAt(I,k,E){if(!(this._lastRange&&this._lastRange.equalsRange(I))){if(this._hoverOperation.cancel(),this._isVisible)if(!this._showAtPosition||this._showAtPosition.lineNumber!==I.startLineNumber)this.hide();else{let T=[];for(let O=0,A=this._messages.length;O<A;O++){const B=this._messages[O],F=B.data.range;F&&F.startColumn<=I.startColumn&&F.endColumn>=I.endColumn&&T.push(B)}if(T.length>0){if(y(T,this._messages))return;this._renderMessages(I,T)}else this.hide()}this._lastRange=I,this._computer.setRange(I),this._shouldFocus=E,this._hoverOperation.start(k)}}hide(){this._lastRange=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout(()=>{this._isVisible||this._hoverVisibleKey.set(!1)},0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}onContentsChanged(){this._hover.onContentsChanged()}_withResult(I,k){this._messages=I,this._lastRange&&this._messages.length>0?this._renderMessages(this._lastRange,this._messages):k&&this.hide()}_renderMessages(I,k){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let E=1073741824,T=k[0].data.range?C.Range.lift(k[0].data.range):null,O=document.createDocumentFragment(),A=!1;const B=new w.DisposableStore,F=[],D=[];k.forEach(R=>{const W=R.data;if(!!W.range)if(E=Math.min(E,W.range.startColumn),T=T?C.Range.plusRange(T,W.range):C.Range.lift(W.range),W instanceof m){A=!0;const{red:x,green:K,blue:Y,alpha:ee}=W.color,se=new M.RGBA(Math.round(x*255),Math.round(K*255),Math.round(Y*255),ee),ne=new M.Color(se);if(!this._editor.hasModel())return;const le=this._editor.getModel();let X=new C.Range(W.range.startLineNumber,W.range.startColumn,W.range.endLineNumber,W.range.endColumn),z={range:W.range,color:W.color};const P=new o.ColorPickerModel(ne,[],0),V=new s.ColorPickerWidget(O,P,this._editor.getOption(122),this._themeService);p.getColorPresentations(le,z,W.provider,N.CancellationToken.None).then(U=>{if(P.colorPresentations=U||[],!!this._editor.hasModel()){const H=this._editor.getModel().getValueInRange(W.range);P.guessColorPresentation(ne,H);const $=()=>{let G,j;if(P.presentation.textEdit){G=[P.presentation.textEdit],j=new C.Range(P.presentation.textEdit.range.startLineNumber,P.presentation.textEdit.range.startColumn,P.presentation.textEdit.range.endLineNumber,P.presentation.textEdit.range.endColumn);const te=this._editor.getModel()._setTrackedRange(null,j,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",G),j=this._editor.getModel()._getTrackedRange(te)||j}else G=[{identifier:null,range:X,text:P.presentation.label,forceMoveMarkers:!1}],j=X.setEndPosition(X.endLineNumber,X.startColumn+P.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",G);P.presentation.additionalTextEdits&&(G=[...P.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",G),this.hide()),this._editor.pushUndoStop(),X=j},ie=G=>p.getColorPresentations(le,{range:X,color:{red:G.rgba.r/255,green:G.rgba.g/255,blue:G.rgba.b/255,alpha:G.rgba.a}},W.provider,N.CancellationToken.None).then(j=>{P.colorPresentations=j||[]}),oe=P.onColorFlushed(G=>{ie(G).then($)}),ae=P.onDidChangeColor(ie);this._colorPicker=V,this.showAt(X.getStartPosition(),X,this._shouldFocus),this._updateContents(O),this._colorPicker.layout(),this._renderDisposable=w.combinedDisposable(oe,ae,V,B)}})}else W instanceof l.MarkerHover?F.push(W):W instanceof h.MarkdownHover&&D.push(W)}),D.length>0&&B.add(this._markdownHoverParticipant.renderHoverParts(D,O)),F.length&&B.add(this._markerHoverParticipant.renderHoverParts(F,O)),this._renderDisposable=B,!A&&O.hasChildNodes()&&(this.showAt(new S.Position(I.startLineNumber,E),T,this._shouldFocus),this._updateContents(O)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,T?[{range:T,options:v._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}}e.ModesContentHoverWidget=v,v.ID="editor.contrib.modesContentHoverWidget",v._DECORATION_OPTIONS=d.ModelDecorationOptions.register({className:"hoverHighlight"});function y(L,I){if(L.length!==I.length)return!1;for(let k=0;k<L.length;k++)if(!L[k].data.equals(I[k].data))return!1;return!0}u.registerThemingParticipant((L,I)=>{const k=L.getColor(i.textLinkForeground);k&&I.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${k}; }`)})}),define(Q[662],J([0,1,497,15,39,2,13,241,3,21,25,53,31,18,267,34,22,11,16]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionHighlighter=e.CompatChangeAll=e.SelectHighlightsAction=e.MoveSelectionToPreviousFindMatchAction=e.MoveSelectionToNextFindMatchAction=e.AddSelectionToPreviousFindMatchAction=e.AddSelectionToNextFindMatchAction=e.MultiCursorSelectionControllerAction=e.MultiCursorSelectionController=e.MultiCursorSession=e.MultiCursorSessionResult=e.InsertCursorBelow=e.InsertCursorAbove=void 0;class t extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:b.localize(0,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2048|512|16,linux:{primary:1024|512|16,secondary:[2048|1024|16]},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"3_multi",title:b.localize(1,null),order:2}})}run(x,K,Y){if(!!K.hasModel()){const ee=Y&&Y.logicalLine===!0,se=K._getViewModel();se.cursorConfig.readOnly||(se.pushStackElement(),se.setCursorStates(Y.source,3,C.CursorMoveCommands.addCursorUp(se,se.getCursorStates(),ee)),se.revealTopMostCursor(Y.source))}}}e.InsertCursorAbove=t;class l extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:b.localize(2,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2048|512|18,linux:{primary:1024|512|18,secondary:[2048|1024|18]},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"3_multi",title:b.localize(3,null),order:3}})}run(x,K,Y){if(!!K.hasModel()){const ee=Y&&Y.logicalLine===!0,se=K._getViewModel();se.cursorConfig.readOnly||(se.pushStackElement(),se.setCursorStates(Y.source,3,C.CursorMoveCommands.addCursorDown(se,se.getCursorStates(),ee)),se.revealBottomMostCursor(Y.source))}}}e.InsertCursorBelow=l;class h extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:b.localize(4,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:1024|512|39,weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"3_multi",title:b.localize(5,null),order:4}})}getCursorsForSelection(x,K,Y){if(!x.isEmpty()){for(let ee=x.startLineNumber;ee<x.endLineNumber;ee++){let se=K.getLineMaxColumn(ee);Y.push(new g.Selection(ee,se,ee,se))}x.endColumn>1&&Y.push(new g.Selection(x.endLineNumber,x.endColumn,x.endLineNumber,x.endColumn))}}run(x,K){if(!!K.hasModel()){const Y=K.getModel(),ee=K.getSelections();let se=[];ee.forEach(ne=>this.getCursorsForSelection(ne,Y,se)),se.length>0&&K.setSelections(se)}}}class m extends S.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:b.localize(6,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(x,K){if(!!K.hasModel()){const Y=K.getSelections(),ee=K.getModel().getLineCount();let se=[];for(let ne=Y[0].startLineNumber;ne<=ee;ne++)se.push(new g.Selection(ne,Y[0].startColumn,ne,Y[0].endColumn));se.length>0&&K.setSelections(se)}}}class _ extends S.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:b.localize(7,null),alias:"Add Cursors To Top",precondition:void 0})}run(x,K){if(!!K.hasModel()){const Y=K.getSelections();let ee=[];for(let se=Y[0].startLineNumber;se>=1;se--)ee.push(new g.Selection(se,Y[0].startColumn,se,Y[0].endColumn));ee.length>0&&K.setSelections(ee)}}}class f{constructor(x,K,Y){this.selections=x,this.revealRange=K,this.revealScrollType=Y}}e.MultiCursorSessionResult=f;class v{constructor(x,K,Y,ee,se,ne,le){this._editor=x,this.findController=K,this.isDisconnectedFromFindController=Y,this.searchText=ee,this.wholeWord=se,this.matchCase=ne,this.currentMatch=le}static create(x,K){if(!x.hasModel())return null;const Y=K.getState();if(!x.hasTextFocus()&&Y.isRevealed&&Y.searchString.length>0)return new v(x,K,!1,Y.searchString,Y.wholeWord,Y.matchCase,null);let ee=!1,se,ne;const le=x.getSelections();le.length===1&&le[0].isEmpty()?(ee=!0,se=!0,ne=!0):(se=Y.wholeWord,ne=Y.matchCase);const X=x.getSelection();let z,P=null;if(X.isEmpty()){const V=x.getConfiguredWordAtPosition(X.getStartPosition());if(!V)return null;z=V.word,P=new g.Selection(X.startLineNumber,V.startColumn,X.startLineNumber,V.endColumn)}else z=x.getModel().getValueInRange(X).replace(/\r\n/g,`
`);return new v(x,K,ee,z,se,ne,P)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const x=this._getNextMatch();if(!x)return null;const K=this._editor.getSelections();return new f(K.concat(x),x,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const x=this._getNextMatch();if(!x)return null;const K=this._editor.getSelections();return new f(K.slice(0,K.length-1).concat(x),x,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const ee=this.currentMatch;return this.currentMatch=null,ee}this.findController.highlightFindOptions();const x=this._editor.getSelections(),K=x[x.length-1],Y=this._editor.getModel().findNextMatch(this.searchText,K.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(110):null,!1);return Y?new g.Selection(Y.range.startLineNumber,Y.range.startColumn,Y.range.endLineNumber,Y.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const x=this._getPreviousMatch();if(!x)return null;const K=this._editor.getSelections();return new f(K.concat(x),x,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const x=this._getPreviousMatch();if(!x)return null;const K=this._editor.getSelections();return new f(K.slice(0,K.length-1).concat(x),x,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const ee=this.currentMatch;return this.currentMatch=null,ee}this.findController.highlightFindOptions();const x=this._editor.getSelections(),K=x[x.length-1],Y=this._editor.getModel().findPreviousMatch(this.searchText,K.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(110):null,!1);return Y?new g.Selection(Y.range.startLineNumber,Y.range.startColumn,Y.range.endLineNumber,Y.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(110):null,!1,1073741824)):[]}}e.MultiCursorSession=v;class y extends w.Disposable{constructor(x){super();this._sessionDispose=this._register(new w.DisposableStore),this._editor=x,this._ignoreSelectionChange=!1,this._session=null}static get(x){return x.getContribution(y.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(x){if(!this._session){const K=v.create(this._editor,x);if(!K)return;this._session=K;const Y={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(Y.wholeWordOverride=1,Y.matchCaseOverride=1,Y.isRegexOverride=2),x.getState().change(Y,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(ee=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(x.getState().onFindReplaceStateChange(ee=>{(ee.matchCase||ee.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const x={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(x,!1)}this._session=null}_setSelections(x){this._ignoreSelectionChange=!0,this._editor.setSelections(x),this._ignoreSelectionChange=!1}_expandEmptyToWord(x,K){if(!K.isEmpty())return K;const Y=this._editor.getConfiguredWordAtPosition(K.getStartPosition());return Y?new g.Selection(K.startLineNumber,Y.startColumn,K.startLineNumber,Y.endColumn):K}_applySessionResult(x){!x||(this._setSelections(x.selections),x.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(x.revealRange,x.revealScrollType))}getSession(x){return this._session}addSelectionToNextFindMatch(x){if(!!this._editor.hasModel()){if(!this._session){const K=this._editor.getSelections();if(K.length>1){const ee=x.getState().matchCase;if(!D(this._editor.getModel(),K,ee)){const ne=this._editor.getModel();let le=[];for(let X=0,z=K.length;X<z;X++)le[X]=this._expandEmptyToWord(ne,K[X]);this._editor.setSelections(le);return}}}this._beginSessionIfNeeded(x),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(x){this._beginSessionIfNeeded(x),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(x){this._beginSessionIfNeeded(x),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(x){this._beginSessionIfNeeded(x),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(x){if(!!this._editor.hasModel()){let K=null;const Y=x.getState();if(Y.isRevealed&&Y.searchString.length>0&&Y.isRegex)K=this._editor.getModel().findMatches(Y.searchString,!0,Y.isRegex,Y.matchCase,Y.wholeWord?this._editor.getOption(110):null,!1,1073741824);else{if(this._beginSessionIfNeeded(x),!this._session)return;K=this._session.selectAll()}if(Y.searchScope){const ee=Y.searchScope;let se=[];K.forEach(ne=>{ee.forEach(le=>{ne.range.endLineNumber<=le.endLineNumber&&ne.range.startLineNumber>=le.startLineNumber&&se.push(ne)})}),K=se}if(K.length>0){const ee=this._editor.getSelection();for(let se=0,ne=K.length;se<ne;se++){const le=K[se];if(le.range.intersectRanges(ee)){K[se]=K[0],K[0]=le;break}}this._setSelections(K.map(se=>new g.Selection(se.range.startLineNumber,se.range.startColumn,se.range.endLineNumber,se.range.endColumn)))}}}}e.MultiCursorSelectionController=y,y.ID="editor.contrib.multiCursorController";class L extends S.EditorAction{run(x,K){const Y=y.get(K);if(!!Y){const ee=a.CommonFindController.get(K);!ee||this._run(Y,ee)}}}e.MultiCursorSelectionControllerAction=L;class I extends L{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:b.localize(8,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:2048|34,weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"3_multi",title:b.localize(9,null),order:5}})}_run(x,K){x.addSelectionToNextFindMatch(K)}}e.AddSelectionToNextFindMatchAction=I;class k extends L{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:b.localize(10,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"3_multi",title:b.localize(11,null),order:6}})}_run(x,K){x.addSelectionToPreviousFindMatch(K)}}e.AddSelectionToPreviousFindMatchAction=k;class E extends L{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:b.localize(12,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:M.KeyChord(2048|41,2048|34),weight:100}})}_run(x,K){x.moveSelectionToNextFindMatch(K)}}e.MoveSelectionToNextFindMatchAction=E;class T extends L{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:b.localize(13,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(x,K){x.moveSelectionToPreviousFindMatch(K)}}e.MoveSelectionToPreviousFindMatchAction=T;class O extends L{constructor(){super({id:"editor.action.selectHighlights",label:b.localize(14,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:2048|1024|42,weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"3_multi",title:b.localize(15,null),order:7}})}_run(x,K){x.selectAll(K)}}e.SelectHighlightsAction=O;class A extends L{constructor(){super({id:"editor.action.changeAll",label:b.localize(16,null),alias:"Change All Occurrences",precondition:n.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2048|60,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(x,K){x.selectAll(K)}}e.CompatChangeAll=A;class B{constructor(x,K,Y,ee){this.searchText=x,this.matchCase=K,this.wordSeparators=Y,this.modelVersionId=ee}static softEquals(x,K){return!x&&!K?!0:!x||!K?!1:x.searchText===K.searchText&&x.matchCase===K.matchCase&&x.wordSeparators===K.wordSeparators&&x.modelVersionId===K.modelVersionId}}class F extends w.Disposable{constructor(x){super();this.editor=x,this._isEnabled=x.getOption(92),this.decorations=[],this.updateSoon=this._register(new N.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(x.onDidChangeConfiguration(K=>{this._isEnabled=x.getOption(92)})),this._register(x.onDidChangeCursorSelection(K=>{!this._isEnabled||(K.selection.isEmpty()?K.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(x.onDidChangeModel(K=>{this._setState(null)})),this._register(x.onDidChangeModelContent(K=>{this._isEnabled&&this.updateSoon.schedule()})),this._register(a.CommonFindController.get(x).getState().onFindReplaceStateChange(K=>{this._update()}))}_update(){this._setState(F._createState(this._isEnabled,this.editor))}static _createState(x,K){if(!x||!K.hasModel())return null;const Y=K.getSelection();if(Y.startLineNumber!==Y.endLineNumber)return null;const ee=y.get(K);if(!ee)return null;const se=a.CommonFindController.get(K);if(!se)return null;let ne=ee.getSession(se);if(!ne){const z=K.getSelections();if(z.length>1){const V=se.getState().matchCase;if(!D(K.getModel(),z,V))return null}ne=v.create(K,se)}if(!ne||ne.currentMatch||/^[ \t]+$/.test(ne.searchText)||ne.searchText.length>200)return null;const le=se.getState(),X=le.matchCase;if(le.isRevealed){let z=le.searchString;X||(z=z.toLowerCase());let P=ne.searchText;if(X||(P=P.toLowerCase()),z===P&&ne.matchCase===le.matchCase&&ne.wholeWord===le.wholeWord&&!le.isRegex)return null}return new B(ne.searchText,ne.matchCase,ne.wholeWord?K.getOption(110):null,K.getModel().getVersionId())}_setState(x){if(B.softEquals(this.state,x)){this.state=x;return}if(this.state=x,!this.state){this.decorations=this.editor.deltaDecorations(this.decorations,[]);return}if(!!this.editor.hasModel()){const K=this.editor.getModel();if(!K.isTooLargeForTokenization()){const Y=s.DocumentHighlightProviderRegistry.has(K)&&this.editor.getOption(66);let ee=K.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(X=>X.range);ee.sort(d.Range.compareRangesUsingStarts);let se=this.editor.getSelections();se.sort(d.Range.compareRangesUsingStarts);let ne=[];for(let X=0,z=0,P=ee.length,V=se.length;X<P;){const U=ee[X];if(z>=V)ne.push(U),X++;else{const H=d.Range.compareRangesUsingStarts(U,se[z]);H<0?((se[z].isEmpty()||!d.Range.areIntersecting(U,se[z]))&&ne.push(U),X++):(H>0||X++,z++)}}const le=ne.map(X=>({range:X,options:Y?F._SELECTION_HIGHLIGHT:F._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,le)}}}dispose(){this._setState(null),super.dispose()}}e.SelectionHighlighter=F,F.ID="editor.contrib.selectionHighlighter",F._SELECTION_HIGHLIGHT_OVERVIEW=o.ModelDecorationOptions.register({stickiness:1,className:"selectionHighlight",overviewRuler:{color:i.themeColorFromId(r.overviewRulerSelectionHighlightForeground),position:c.OverviewRulerLane.Center}}),F._SELECTION_HIGHLIGHT=o.ModelDecorationOptions.register({stickiness:1,className:"selectionHighlight"});function D(W,x,K){const Y=R(W,x[0],!K);for(let ee=1,se=x.length;ee<se;ee++){const ne=x[ee];if(ne.isEmpty())return!1;const le=R(W,ne,!K);if(Y!==le)return!1}return!0}function R(W,x,K){const Y=W.getValueInRange(x);return K?Y.toLowerCase():Y}S.registerEditorContribution(y.ID,y),S.registerEditorContribution(F.ID,F),S.registerEditorAction(t),S.registerEditorAction(l),S.registerEditorAction(h),S.registerEditorAction(I),S.registerEditorAction(k),S.registerEditorAction(E),S.registerEditorAction(T),S.registerEditorAction(O),S.registerEditorAction(A),S.registerEditorAction(m),S.registerEditorAction(_)}),define(Q[663],J([0,1,7,55,47,61,6,2,57,140,183,499,16,58,22,11,547,8,27,20,97,80,348]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsWidget=void 0;const m=b.$,_=h.registerIcon("parameter-hints-next",n.Codicon.chevronDown,c.localize(0,null)),f=h.registerIcon("parameter-hints-previous",n.Codicon.chevronUp,c.localize(1,null));let v=class jt extends C.Disposable{constructor(L,I,k,E){super();this.editor=L,this.renderDisposeables=this._register(new C.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new g.MarkdownRenderer({editor:L},E,k)),this.model=this._register(new r.ParameterHintsModel(L)),this.keyVisible=p.Context.Visible.bindTo(I),this.keyMultipleSignatures=p.Context.MultipleSignatures.bindTo(I),this._register(this.model.onChangedHints(T=>{T?(this.show(),this.render(T)):this.hide()}))}createParamaterHintDOMNodes(){const L=m(".editor-widget.parameter-hints-widget"),I=b.append(L,m(".phwrapper"));I.tabIndex=-1;const k=b.append(I,m(".controls")),E=b.append(k,m(".button"+u.ThemeIcon.asCSSSelector(f))),T=b.append(k,m(".overloads")),O=b.append(k,m(".button"+u.ThemeIcon.asCSSSelector(_))),A=N.stop(N.domEvent(E,"click"));this._register(A(this.previous,this));const B=N.stop(N.domEvent(O,"click"));this._register(B(this.next,this));const F=m(".body"),D=new w.DomScrollableElement(F,{});this._register(D),I.appendChild(D.getDomNode());const R=b.append(F,m(".signature")),W=b.append(F,m(".docs"));L.style.userSelect="text",this.domNodes={element:L,signature:R,overloads:T,docs:W,scrollbar:D},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(K=>{this.visible&&this.editor.layoutContentWidget(this)}));const x=()=>{if(!!this.domNodes){const K=this.editor.getOption(38);this.domNodes.element.style.fontSize=`${K.fontSize}px`}};x(),this._register(S.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(K=>K.hasChanged(38)).on(x,null)),this._register(this.editor.onDidLayoutChange(K=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParamaterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),!!this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(L){var I;if(this.renderDisposeables.clear(),!!this.domNodes){const k=L.signatures.length>1;this.domNodes.element.classList.toggle("multiple",k),this.keyMultipleSignatures.set(k),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const E=L.signatures[L.activeSignature];if(!!E){const T=b.append(this.domNodes.signature,m(".code")),O=this.editor.getOption(38);T.style.fontSize=`${O.fontSize}px`,T.style.fontFamily=O.fontFamily;const A=E.parameters.length>0,B=(I=E.activeParameter)!==null&&I!==void 0?I:L.activeParameter;if(A)this.renderParameters(T,E,B);else{const R=b.append(T,m("span"));R.textContent=E.label}const F=E.parameters[B];if(F==null?void 0:F.documentation){const R=m("span.documentation");if(typeof F.documentation=="string")R.textContent=F.documentation;else{const W=this.renderMarkdownDocs(F.documentation);R.appendChild(W.element)}b.append(this.domNodes.docs,m("p",{},R))}if(E.documentation!==void 0)if(typeof E.documentation=="string")b.append(this.domNodes.docs,m("p",{},E.documentation));else{const R=this.renderMarkdownDocs(E.documentation);b.append(this.domNodes.docs,R.element)}const D=this.hasDocs(E,F);if(this.domNodes.signature.classList.toggle("has-docs",D),this.domNodes.docs.classList.toggle("empty",!D),this.domNodes.overloads.textContent=String(L.activeSignature+1).padStart(L.signatures.length.toString().length,"0")+"/"+L.signatures.length,F){const R=this.getParameterLabel(E,B);this.announcedLabel!==R&&(M.alert(c.localize(2,null,R)),this.announcedLabel=R)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}}}renderMarkdownDocs(L){const I=this.renderDisposeables.add(this.markdownRenderer.render(L,{asyncRenderCallback:()=>{var k;(k=this.domNodes)===null||k===void 0||k.scrollbar.scanDomNode()}}));return I.element.classList.add("markdown-docs"),I}hasDocs(L,I){return!!(I&&typeof I.documentation=="string"&&t.assertIsDefined(I.documentation).length>0||I&&typeof I.documentation=="object"&&t.assertIsDefined(I.documentation).value.length>0||L.documentation&&typeof L.documentation=="string"&&t.assertIsDefined(L.documentation).length>0||L.documentation&&typeof L.documentation=="object"&&t.assertIsDefined(L.documentation.value).length>0)}renderParameters(L,I,k){const[E,T]=this.getParameterLabelOffsets(I,k),O=document.createElement("span");O.textContent=I.label.substring(0,E);const A=document.createElement("span");A.textContent=I.label.substring(E,T),A.className="parameter active";const B=document.createElement("span");B.textContent=I.label.substring(T),b.append(L,O,A,B)}getParameterLabel(L,I){const k=L.parameters[I];return Array.isArray(k.label)?L.label.substring(k.label[0],k.label[1]):k.label}getParameterLabelOffsets(L,I){const k=L.parameters[I];if(k){if(Array.isArray(k.label))return k.label;if(k.label.length){const E=new RegExp(`(\\W|^)${i.escapeRegExpCharacters(k.label)}(?=\\W|$)`,"g");E.test(L.label);const T=E.lastIndex-k.label.length;return T>=0?[T,E.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParamaterHintDOMNodes(),this.domNodes.element}getId(){return jt.ID}trigger(L){this.model.trigger(L,0)}updateMaxHeight(){if(!!this.domNodes){const I=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=I;const k=this.domNodes.element.getElementsByClassName("phwrapper");k.length&&(k[0].style.maxHeight=I)}}};v.ID="editor.widget.parameterHintsWidget",v=Me([_e(1,o.IContextKeyService),_e(2,s.IOpenerService),_e(3,d.IModeService)],v),e.ParameterHintsWidget=v,u.registerThemingParticipant((y,L)=>{const I=y.getColor(a.editorHoverBorder);if(I){const A=y.type===l.ColorScheme.HIGH_CONTRAST?2:1;L.addRule(`.monaco-editor .parameter-hints-widget { border: ${A}px solid ${I}; }`),L.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${I.transparent(.5)}; }`),L.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${I.transparent(.5)}; }`)}const k=y.getColor(a.editorHoverBackground);k&&L.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${k}; }`);const E=y.getColor(a.textLinkForeground);E&&L.addRule(`.monaco-editor .parameter-hints-widget a { color: ${E}; }`);const T=y.getColor(a.editorHoverForeground);T&&L.addRule(`.monaco-editor .parameter-hints-widget { color: ${T}; }`);const O=y.getColor(a.textCodeBlockBackground);O&&L.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${O}; }`)})}),define(Q[664],J([0,1,498,2,9,25,16,13,663,183,18]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=void 0;let c=class Gt extends N.Disposable{constructor(r,i){super();this.editor=r,this.widget=this._register(i.createInstance(d.ParameterHintsWidget,this.editor))}static get(r){return r.getContribution(Gt.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(r){this.widget.trigger(r)}};c.ID="editor.controller.parameterHints",c=Me([_e(1,M.IInstantiationService)],c);class o extends C.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:b.localize(0,null),alias:"Trigger Parameter Hints",precondition:w.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:w.EditorContextKeys.editorTextFocus,primary:2048|1024|10,weight:100}})}run(r,i){const n=c.get(i);n&&n.trigger({triggerKind:p.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=o,C.registerEditorContribution(c.ID,c),C.registerEditorAction(o);const s=100+75,a=C.EditorCommand.bindToContribution(c.get);C.registerEditorCommand(new a({id:"closeParameterHints",precondition:g.Context.Visible,handler:u=>u.cancel(),kbOpts:{weight:s,kbExpr:w.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),C.registerEditorCommand(new a({id:"showPrevParameterHint",precondition:S.ContextKeyExpr.and(g.Context.Visible,g.Context.MultipleSignatures),handler:u=>u.previous(),kbOpts:{weight:s,kbExpr:w.EditorContextKeys.focus,primary:16,secondary:[512|16],mac:{primary:16,secondary:[512|16,256|46]}}})),C.registerEditorCommand(new a({id:"showNextParameterHint",precondition:S.ContextKeyExpr.and(g.Context.Visible,g.Context.MultipleSignatures),handler:u=>u.next(),kbOpts:{weight:s,kbExpr:w.EditorContextKeys.focus,primary:18,secondary:[512|18],mac:{primary:18,secondary:[512|18,256|44]}}}))}),define(Q[665],J([0,1,510,66,2,7,11,57,18,175,562,36,24,237,19,254,27,6,80]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.suggestMoreInfoIcon=e.getAriaId=void 0;function l(_){return`suggest-aria-id:${_}`}e.getAriaId=l,e.suggestMoreInfoIcon=n.registerIcon("suggest-more-info",r.Codicon.chevronRight,b.localize(0,null));const h=new(t=class ft{extract(f,v){if(f.textLabel.match(ft._regexStrict))return v[0]=f.textLabel,!0;if(f.completion.detail&&f.completion.detail.match(ft._regexStrict))return v[0]=f.completion.detail,!0;if(typeof f.completion.documentation=="string"){const y=ft._regexRelaxed.exec(f.completion.documentation);if(y&&(y.index===0||y.index+y[0].length===f.completion.documentation.length))return v[0]=y[0],!0}return!1}},t._regexRelaxed=/(#([\da-fA-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*\))/,t._regexStrict=new RegExp(`^${t._regexRelaxed.source}$`,"i"),t);let m=class{constructor(f,v,y,L){this._editor=f,this._modelService=v,this._modeService=y,this._themeService=L,this._onDidToggleDetails=new i.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(f){const v=Object.create(null);v.disposables=new M.DisposableStore,v.root=f,v.root.classList.add("show-file-icons"),v.icon=w.append(f,w.$(".icon")),v.colorspan=w.append(v.icon,w.$("span.colorspan"));const y=w.append(f,w.$(".contents")),L=w.append(y,w.$(".main"));v.iconContainer=w.append(L,w.$(".icon-label.codicon")),v.left=w.append(L,w.$("span.left")),v.right=w.append(L,w.$("span.right")),v.iconLabel=new g.IconLabel(v.left,{supportHighlights:!0,supportIcons:!0}),v.disposables.add(v.iconLabel),v.parametersLabel=w.append(v.left,w.$("span.signature-label")),v.qualifierLabel=w.append(v.left,w.$("span.qualifier-label")),v.detailsLabel=w.append(v.right,w.$("span.details-label")),v.readMore=w.append(v.right,w.$("span.readMore"+S.ThemeIcon.asCSSSelector(e.suggestMoreInfoIcon))),v.readMore.title=b.localize(1,null);const I=()=>{const k=this._editor.getOptions(),E=k.get(38),T=E.fontFamily,O=E.fontFeatureSettings,A=k.get(102)||E.fontSize,B=k.get(103)||E.lineHeight,F=E.fontWeight,D=`${A}px`,R=`${B}px`;v.root.style.fontSize=D,v.root.style.fontWeight=F,L.style.fontFamily=T,L.style.fontFeatureSettings=O,L.style.lineHeight=R,v.icon.style.height=R,v.icon.style.width=R,v.readMore.style.height=R,v.readMore.style.width=R};return I(),v.disposables.add(this._editor.onDidChangeConfiguration(k=>{(k.hasChanged(38)||k.hasChanged(102)||k.hasChanged(103))&&I()})),v}renderElement(f,v,y){var L,I,k;const{completion:E}=f,T=typeof E.label=="string"?E.label:E.label.name;y.root.id=l(v),y.colorspan.style.backgroundColor="";const O={labelEscapeNewLines:!0,matches:N.createMatches(f.score)};let A=[];if(E.kind===19&&h.extract(f,A))y.icon.className="icon customcolor",y.iconContainer.className="icon hide",y.colorspan.style.backgroundColor=A[0];else if(E.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){y.icon.className="icon hide",y.iconContainer.className="icon hide";const B=p.getIconClasses(this._modelService,this._modeService,o.URI.from({scheme:"fake",path:T}),s.FileKind.FILE),F=p.getIconClasses(this._modelService,this._modeService,o.URI.from({scheme:"fake",path:E.detail}),s.FileKind.FILE);O.extraClasses=B.length>F.length?B:F}else E.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(y.icon.className="icon hide",y.iconContainer.className="icon hide",O.extraClasses=a.flatten([p.getIconClasses(this._modelService,this._modeService,o.URI.from({scheme:"fake",path:T}),s.FileKind.FOLDER),p.getIconClasses(this._modelService,this._modeService,o.URI.from({scheme:"fake",path:E.detail}),s.FileKind.FOLDER)])):(y.icon.className="icon hide",y.iconContainer.className="",y.iconContainer.classList.add("suggest-icon",...d.completionKindToCssClass(E.kind).split(" ")));E.tags&&E.tags.indexOf(1)>=0&&(O.extraClasses=(O.extraClasses||[]).concat(["deprecated"]),O.matches=[]),y.iconLabel.setLabel(T,void 0,O),typeof E.label=="string"?(y.parametersLabel.textContent="",y.qualifierLabel.textContent="",y.detailsLabel.textContent=(E.detail||"").replace(/\n.*$/m,""),y.root.classList.add("string-label"),y.root.title=""):(y.parametersLabel.textContent=(E.label.parameters||"").replace(/\n.*$/m,""),y.qualifierLabel.textContent=(E.label.qualifier||"").replace(/\n.*$/m,""),y.detailsLabel.textContent=(E.label.type||"").replace(/\n.*$/m,""),y.root.classList.remove("string-label"),y.root.title=`${T}${(L=E.label.parameters)!==null&&L!==void 0?L:""} ${(I=E.label.qualifier)!==null&&I!==void 0?I:""} ${(k=E.label.type)!==null&&k!==void 0?k:""}`),this._editor.getOption(101).showInlineDetails?w.show(y.detailsLabel):w.hide(y.detailsLabel),u.canExpandCompletionItem(f)?(y.right.classList.add("can-expand-details"),w.show(y.readMore),y.readMore.onmousedown=B=>{B.stopPropagation(),B.preventDefault()},y.readMore.onclick=B=>{B.stopPropagation(),B.preventDefault(),this._onDidToggleDetails.fire()}):(y.right.classList.remove("can-expand-details"),w.hide(y.readMore),y.readMore.onmousedown=null,y.readMore.onclick=null)}disposeTemplate(f){f.disposables.dispose()}};m=Me([_e(1,c.IModelService),_e(2,C.IModeService),_e(3,S.IThemeService)],m),e.ItemRenderer=m}),define(Q[666],J([0,1,508,8,7,6,12,2,105,16,117,116,11,22,79,15,9,254,649,665,231,144,100,352,123,259]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetHighlightForeground=e.editorSuggestWidgetSelectedBackground=e.editorSuggestWidgetForeground=e.editorSuggestWidgetBorder=e.editorSuggestWidgetBackground=void 0,e.editorSuggestWidgetBackground=s.registerColor("editorSuggestWidget.background",{dark:s.editorWidgetBackground,light:s.editorWidgetBackground,hc:s.editorWidgetBackground},b.localize(0,null)),e.editorSuggestWidgetBorder=s.registerColor("editorSuggestWidget.border",{dark:s.editorWidgetBorder,light:s.editorWidgetBorder,hc:s.editorWidgetBorder},b.localize(1,null)),e.editorSuggestWidgetForeground=s.registerColor("editorSuggestWidget.foreground",{dark:s.editorForeground,light:s.editorForeground,hc:s.editorForeground},b.localize(2,null)),e.editorSuggestWidgetSelectedBackground=s.registerColor("editorSuggestWidget.selectedBackground",{dark:s.quickInputListFocusBackground,light:s.quickInputListFocusBackground,hc:s.quickInputListFocusBackground},b.localize(3,null)),e.editorSuggestWidgetHighlightForeground=s.registerColor("editorSuggestWidget.highlightForeground",{dark:s.listHighlightForeground,light:s.listHighlightForeground,hc:s.listHighlightForeground},b.localize(4,null));class _{constructor(L,I){this._service=L,this._key=`suggestWidget.size/${I.getEditorType()}/${I instanceof h.EmbeddedCodeEditorWidget}`}restore(){var L;const I=(L=this._service.get(this._key,0))!==null&&L!==void 0?L:"";try{const k=JSON.parse(I);if(M.Dimension.is(k))return M.Dimension.lift(k)}catch(k){}}store(L){this._service.store(this._key,JSON.stringify(L),0,1)}reset(){this._service.remove(this._key,0)}}let f=class wt{constructor(L,I,k,E,T){this.editor=L,this._storageService=I,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._explainMode=!1,this._showTimeout=new u.TimeoutTimer,this._disposables=new C.DisposableStore,this._onDidSelect=new w.Emitter,this._onDidFocus=new w.Emitter,this._onDidHide=new w.Emitter,this._onDidShow=new w.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new w.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new l.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new v(this,L),this._persistedSize=new _(I,L);class O{constructor(x,K,Y=!1,ee=!1){this.persistedSize=x,this.currentSize=K,this.persistHeight=Y,this.persistWidth=ee}}let A;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),A=new O(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(W=>{var x,K,Y,ee;if(this._resize(W.dimension.width,W.dimension.height),A&&(A.persistHeight=A.persistHeight||!!W.north||!!W.south,A.persistWidth=A.persistWidth||!!W.east||!!W.west),!!W.done){if(A){const{itemHeight:se,defaultSize:ne}=this.getLayoutInfo(),le=Math.round(se/2);let{width:X,height:z}=this.element.size;(!A.persistHeight||Math.abs(A.currentSize.height-z)<=le)&&(z=(K=(x=A.persistedSize)===null||x===void 0?void 0:x.height)!==null&&K!==void 0?K:ne.height),(!A.persistWidth||Math.abs(A.currentSize.width-X)<=le)&&(X=(ee=(Y=A.persistedSize)===null||Y===void 0?void 0:Y.width)!==null&&ee!==void 0?ee:ne.width),this._persistedSize.store(new M.Dimension(X,z))}this._contentWidget.unlockPreference(),A=void 0}})),this._messageElement=M.append(this.element.domNode,M.$(".message")),this._listElement=M.append(this.element.domNode,M.$(".tree"));const B=T.createInstance(i.SuggestDetailsWidget,this.editor);B.onDidClose(this.toggleDetails,this,this._disposables),this._details=new i.SuggestDetailsOverlay(B,this.editor);const F=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(101).showIcons);F();const D=T.createInstance(t.ItemRenderer,this.editor);this._disposables.add(D),this._disposables.add(D.onDidToggleDetails(()=>this.toggleDetails())),this._list=new d.List("SuggestWidget",this._listElement,{getHeight:W=>this.getLayoutInfo().itemHeight,getTemplateId:W=>"suggestion"},[D],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:W=>{const x=typeof W.completion.label=="string"?W.completion.label:W.completion.label.name;if(W.isResolved&&this._isDetailsVisible()){const{documentation:K,detail:Y}=W.completion,ee=N.format("{0}{1}",Y||"",K?typeof K=="string"?K:K.value:"");return b.localize(7,null,x,ee)}else return x},getWidgetAriaLabel:()=>b.localize(8,null),getWidgetRole:()=>"listbox"}}),this._status=T.createInstance(n.SuggestWidgetStatus,this.element.domNode);const R=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(101).showStatusBar);R(),this._disposables.add(c.attachListStyler(this._list,E,{listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:s.activeContrastBorder})),this._disposables.add(E.onDidColorThemeChange(W=>this._onThemeChange(W))),this._onThemeChange(E.getColorTheme()),this._disposables.add(this._list.onMouseDown(W=>this._onListMouseDownOrTap(W))),this._disposables.add(this._list.onTap(W=>this._onListMouseDownOrTap(W))),this._disposables.add(this._list.onDidChangeSelection(W=>this._onListSelection(W))),this._disposables.add(this._list.onDidChangeFocus(W=>this._onListFocus(W))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(W=>{W.hasChanged(101)&&(R(),F())})),this._ctxSuggestWidgetVisible=p.Context.Visible.bindTo(k),this._ctxSuggestWidgetDetailsVisible=p.Context.DetailsVisible.bindTo(k),this._ctxSuggestWidgetMultipleSuggestions=p.Context.MultipleSuggestions.bindTo(k),this._disposables.add(M.addStandardDisposableListener(this._details.widget.domNode,"keydown",W=>{this._onDetailsKeydown.fire(W)})),this._disposables.add(this.editor.onMouseDown(W=>this._onEditorMouseDown(W)))}dispose(){var L;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(L=this._loadingTimeout)===null||L===void 0||L.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(L){this._details.widget.domNode.contains(L.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(L.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(L){typeof L.element=="undefined"||typeof L.index=="undefined"||(L.browserEvent.preventDefault(),L.browserEvent.stopPropagation(),this._select(L.element,L.index))}_onListSelection(L){L.elements.length&&this._select(L.elements[0],L.indexes[0])}_select(L,I){const k=this._completionModel;k&&(this._onDidSelect.fire({item:L,index:I,model:k}),this.editor.focus())}_onThemeChange(L){const I=L.getColor(e.editorSuggestWidgetBackground);I&&(this.element.domNode.style.backgroundColor=I.toString(),this._messageElement.style.backgroundColor=I.toString(),this._details.widget.domNode.style.backgroundColor=I.toString());const k=L.getColor(e.editorSuggestWidgetBorder);k&&(this.element.domNode.style.borderColor=k.toString(),this._messageElement.style.borderColor=k.toString(),this._status.element.style.borderTopColor=k.toString(),this._details.widget.domNode.style.borderColor=k.toString(),this._detailsBorderColor=k.toString());const E=L.getColor(s.focusBorder);E&&(this._detailsFocusBorderColor=E.toString()),this._details.widget.borderWidth=L.type==="hc"?2:1}_onListFocus(L){var I;if(!this._ignoreFocusEvents){if(!L.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0});return}if(!!this._completionModel){const k=L.elements[0],E=L.indexes[0];k!==this._focusedItem&&((I=this._currentSuggestionDetails)===null||I===void 0||I.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=k,this._list.reveal(E),this._currentSuggestionDetails=u.createCancelablePromise(T=>Ie(this,void 0,void 0,function*(){const O=u.disposableTimeout(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250);T.onCancellationRequested(()=>O.dispose());const A=yield k.resolve(T);return O.dispose(),A})),this._currentSuggestionDetails.then(()=>{E>=this._list.length||k!==this._list.element(E)||(this._ignoreFocusEvents=!0,this._list.splice(E,1,[k]),this._list.setFocus([E]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:t.getAriaId(E)}))}).catch(S.onUnexpectedError)),this._onDidFocus.fire({item:k,index:E,model:this._completionModel})}}}_setState(L){if(this._state!==L)switch(this._state=L,this.element.domNode.classList.toggle("frozen",L===4),this.element.domNode.classList.remove("message"),L){case 0:M.hide(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=wt.LOADING_MESSAGE,M.hide(this._listElement,this._status.element),M.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=wt.NO_SUGGESTIONS_MESSAGE,M.hide(this._listElement,this._status.element),M.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:M.hide(this._messageElement),M.show(this._listElement,this._status.element),this._show();break;case 4:M.hide(this._messageElement),M.show(this._listElement,this._status.element),this._show();break;case 5:M.hide(this._messageElement),M.show(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(L,I){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!L,this._isAuto||(this._loadingTimeout=u.disposableTimeout(()=>this._setState(1),I)))}showSuggestions(L,I,k,E){var T,O;if(this._contentWidget.setPosition(this.editor.getPosition()),(T=this._loadingTimeout)===null||T===void 0||T.dispose(),(O=this._currentSuggestionDetails)===null||O===void 0||O.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==L&&(this._completionModel=L),k&&this._state!==2&&this._state!==0){this._setState(4);return}const A=this._completionModel.items.length,B=A===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(A>1),B){this._setState(E?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(k?4:3),this._list.reveal(I,0),this._list.setFocus([I]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):i.canExpandCompletionItem(this._list.getFocusedElements()[0])&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(L){this._details.show(),L?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&this._isDetailsVisible()&&(this._explainMode=!this._explainMode,this.showDetails(!1))}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var L;(L=this._loadingTimeout)===null||L===void 0||L.dispose(),this._setState(0),this._onDidHide.fire(this);const I=this._persistedSize.restore(),k=Math.ceil(this.getLayoutInfo().itemHeight*4.3);I&&I.height<k&&this._persistedSize.store(I.with(void 0,k))}isFrozen(){return this._state===4}_afterRender(L){if(L===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(L){var I,k,E;if(!!this.editor.hasModel()&&!!this.editor.getDomNode()){const T=M.getClientArea(document.body),O=this.getLayoutInfo();L||(L=O.defaultSize);let A=L.height,B=L.width;if(this._status.element.style.lineHeight=`${O.itemHeight}px`,this._state===2||this._state===1)A=O.itemHeight+O.borderHeight,B=O.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new M.Dimension(B,A),this._contentWidget.setPreference(2);else{const F=T.width-O.borderHeight-2*O.horizontalPadding;B>F&&(B=F);const D=this._completionModel?this._completionModel.stats.pLabelLen*O.typicalHalfwidthCharacterWidth:B,R=O.statusBarHeight+this._list.contentHeight+O.borderHeight,W=O.itemHeight+O.statusBarHeight,x=M.getDomNodePagePosition(this.editor.getDomNode()),K=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),Y=x.top+K.top+K.height,ee=Math.min(T.height-Y-O.verticalPadding,R),se=Math.min(x.top+K.top-O.verticalPadding,R);let ne=Math.min(Math.max(se,ee)+O.borderHeight,R);A===((I=this._cappedHeight)===null||I===void 0?void 0:I.capped)&&(A=this._cappedHeight.wanted),A<W&&(A=W),A>ne&&(A=ne),A>ee?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),ne=se):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),ne=ee),this.element.preferredSize=new M.Dimension(D,O.defaultSize.height),this.element.maxSize=new M.Dimension(F,ne),this.element.minSize=new M.Dimension(220,W),this._cappedHeight=A===R?{wanted:(E=(k=this._cappedHeight)===null||k===void 0?void 0:k.wanted)!==null&&E!==void 0?E:L.height,capped:A}:void 0}this._resize(B,A)}}_resize(L,I){const{width:k,height:E}=this.element.maxSize;L=Math.min(k,L),I=Math.min(E,I);const{statusBarHeight:T}=this.getLayoutInfo();this._list.layout(I-T,L),this._listElement.style.height=`${I-T}px`,this.element.layout(I,L),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const L=this.editor.getOption(38),I=m.clamp(this.editor.getOption(103)||L.lineHeight,8,1e3),k=!this.editor.getOption(101).showStatusBar||this._state===2||this._state===1?0:I,E=this._details.widget.borderWidth,T=2*E;return{itemHeight:I,statusBarHeight:k,borderWidth:E,borderHeight:T,typicalHalfwidthCharacterWidth:L.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new M.Dimension(430,k+12*I+T)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(L){this._storageService.store("expandSuggestionDocs",L,0,0)}};f.LOADING_MESSAGE=b.localize(5,null),f.NO_SUGGESTIONS_MESSAGE=b.localize(6,null),f=Me([_e(1,a.IStorageService),_e(2,g.IContextKeyService),_e(3,o.IThemeService),_e(4,r.IInstantiationService)],f),e.SuggestWidget=f;class v{constructor(L,I){this._widget=L,this._editor=I,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:L,width:I}=this._widget.element.size,{borderWidth:k,horizontalPadding:E}=this._widget.getLayoutInfo();return new M.Dimension(I+2*k+E,L+2*k)}afterRender(L){this._widget._afterRender(L)}setPreference(L){this._preferenceLocked||(this._preference=L)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(L){this._position=L}}e.SuggestContentWidget=v,o.registerThemingParticipant((y,L)=>{const I=y.getColor(e.editorSuggestWidgetHighlightForeground);I&&L.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${I}; }`);const k=y.getColor(e.editorSuggestWidgetForeground);k&&L.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${k}; }`);const E=y.getColor(s.textLinkForeground);E&&L.addRule(`.monaco-editor .suggest-details a { color: ${E}; }`);const T=y.getColor(s.textCodeBlockBackground);T&&L.addRule(`.monaco-editor .suggest-details code { background-color: ${T}; }`)})}),define(Q[667],J([0,1,11,80,7,6]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconsStyleSheet=void 0;function S(){const C=new w.Emitter,d=N.getIconRegistry();return d.onDidChange(()=>C.fire()),{onDidChange:C.event,getCSS(){const g={},p=o=>{let s=o.defaults;for(;b.ThemeIcon.isThemeIcon(s);){const u=d.getIcon(s.id);if(!u)return;s=u.defaults}const a=s.fontId;if(a){const u=d.getIconFont(a);if(u)return g[a]=u,`.codicon-${o.id}:before { content: '${s.fontCharacter}'; font-family: ${M.asCSSPropertyValue(a)}; }`}return`.codicon-${o.id}:before { content: '${s.fontCharacter}'; }`},c=[];for(let o of d.getIcons()){const s=p(o);s&&c.push(s)}for(let o in g){const a=g[o].definition.src.map(u=>`${M.asCSSUrl(u.location)} format('${u.format}')`).join(", ");c.push(`@font-face { src: ${a}; font-family: ${M.asCSSPropertyValue(o)}; }`)}return c.join(`
`)}}}e.getIconsStyleSheet=S}),define(Q[668],J([0,1,7,29,6,18,381,606,33,22,11,2,97,667]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneThemeServiceImpl=void 0;const a="vs",u="vs-dark",r="hc-black",i=d.Registry.as(g.Extensions.ColorContribution),n=d.Registry.as(p.Extensions.ThemingContribution);class t{constructor(v,y){this.semanticHighlighting=!1,this.themeData=y;let L=y.base;v.length>0?(l(v)?this.id=v:this.id=L+" "+v,this.themeName=v):(this.id=L,this.themeName=L),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const v=new Map;for(let y in this.themeData.colors)v.set(y,N.Color.fromHex(this.themeData.colors[y]));if(this.themeData.inherit){let y=h(this.themeData.base);for(let L in y.colors)v.has(L)||v.set(L,N.Color.fromHex(y.colors[L]))}this.colors=v}return this.colors}getColor(v,y){const L=this.getColors().get(v);if(L)return L;if(y!==!1)return this.getDefault(v)}getDefault(v){let y=this.defaultColors[v];return y||(y=i.resolveDefaultColor(v,this),this.defaultColors[v]=y,y)}defines(v){return Object.prototype.hasOwnProperty.call(this.getColors(),v)}get type(){switch(this.base){case a:return o.ColorScheme.LIGHT;case r:return o.ColorScheme.HIGH_CONTRAST;default:return o.ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let v=[],y=[];if(this.themeData.inherit){let L=h(this.themeData.base);v=L.rules,L.encodedTokensColors&&(y=L.encodedTokensColors)}v=v.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(y=this.themeData.encodedTokensColors),this._tokenTheme=S.TokenTheme.createFromRawTokenTheme(v,y)}return this._tokenTheme}getTokenStyleMetadata(v,y,L){const k=this.tokenTheme._match([v].concat(y).join(".")).metadata,E=w.TokenMetadata.getForeground(k),T=w.TokenMetadata.getFontStyle(k);return{foreground:E,italic:Boolean(T&1),bold:Boolean(T&2),underline:Boolean(T&4)}}}function l(f){return f===a||f===u||f===r}function h(f){switch(f){case a:return C.vs;case u:return C.vs_dark;case r:return C.hc_black}}function m(f){let v=h(f);return new t(f,v)}class _ extends c.Disposable{constructor(){super();this._onColorThemeChange=this._register(new M.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(a,m(a)),this._knownThemes.set(u,m(u)),this._knownThemes.set(r,m(r));const v=s.getIconsStyleSheet();this._codiconCSS=v.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(a),v.onDidChange(()=>{this._codiconCSS=v.getCSS(),this._updateCSS()}),window.matchMedia("(forced-colors: active)").addEventListener("change",()=>{this._updateActualTheme()})}registerEditorContainer(v){return b.isInShadowDOM(v)?this._registerShadowDomContainer(v):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=b.createStyleSheet(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),c.Disposable.None}_registerShadowDomContainer(v){const y=b.createStyleSheet(v);return y.className="monaco-colors",y.textContent=this._allCSS,this._styleElements.push(y),{dispose:()=>{for(let L=0;L<this._styleElements.length;L++)if(this._styleElements[L]===y){this._styleElements.splice(L,1);return}}}}defineTheme(v,y){if(!/^[a-z0-9\-]+$/i.test(v))throw new Error("Illegal theme name!");if(!l(y.base)&&!l(v))throw new Error("Illegal theme base!");this._knownThemes.set(v,new t(v,y)),l(v)&&this._knownThemes.forEach(L=>{L.base===v&&L.notifyBaseUpdated()}),this._theme.themeName===v&&this.setTheme(v)}getColorTheme(){return this._theme}setColorMapOverride(v){this._colorMapOverride=v,this._updateThemeOrColorMap()}setTheme(v){let y;this._knownThemes.has(v)?y=this._knownThemes.get(v):y=this._knownThemes.get(a),this._desiredTheme=y,this._updateActualTheme()}_updateActualTheme(){const v=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(r):this._desiredTheme;this._theme!==v&&(this._theme=v,this._updateThemeOrColorMap())}setAutoDetectHighContrast(v){this._autoDetectHighContrast=v,this._updateActualTheme()}_updateThemeOrColorMap(){let v=[],y={},L={addRule:k=>{y[k]||(v.push(k),y[k]=!0)}};n.getThemingParticipants().forEach(k=>k(this._theme,L,this._environment));const I=this._colorMapOverride||this._theme.tokenTheme.getColorMap();L.addRule(S.generateTokensCSSForColorMap(I)),this._themeCSS=v.join(`
`),this._updateCSS(),w.TokenizationRegistry.setColorMap(I),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
${this._themeCSS}`,this._styleElements.forEach(v=>v.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}e.StandaloneThemeServiceImpl=_}),define(Q[148],J([0,1,9]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.IUndoRedoService=void 0,e.IUndoRedoService=b.createDecorator("undoRedoService");class N{constructor(C,d){this.resource=C,this.elements=d}}e.ResourceEditStackSnapshot=N;class M{constructor(){this.id=M._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoGroup=M,M._ID=0,M.None=new M;class w{constructor(){this.id=w._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoSource=w,w._ID=0,w.None=new w}),define(Q[269],J([0,1,6,2,17,12,38,31,18,141,137,46,15,23,11,77,148,89,236,43,253,247]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelSemanticColoring=e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=e.ModelServiceImpl=void 0;function m(B){return B.toString()}function _(B){const F=new i.StringSHA1,D=B.createSnapshot();let R;for(;R=D.read();)F.update(R);return F.digest()}class f{constructor(F,D,R){this._modelEventListeners=new N.DisposableStore,this.model=F,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(F.onWillDispose(()=>D(F))),this._modelEventListeners.add(F.onDidChangeLanguage(W=>R(F,W)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(F){this._disposeLanguageSelection(),this._languageSelection=F,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(F.languageIdentifier)),this.model.setMode(F.languageIdentifier)}}const v=M.isLinux||M.isMacintosh?1:2;class y{constructor(F,D,R,W,x,K,Y,ee){this.uri=F,this.initialUndoRedoSnapshot=D,this.time=R,this.sharesUndoRedoStack=W,this.heapSize=x,this.sha1=K,this.versionId=Y,this.alternativeVersionId=ee}}function L(B){return B.scheme===t.Schemas.file||B.scheme===t.Schemas.vscodeRemote||B.scheme===t.Schemas.userData||B.scheme==="fake-fs"}let I=class st extends N.Disposable{constructor(F,D,R,W,x){super();this._configurationService=F,this._resourcePropertiesService=D,this._themeService=R,this._logService=W,this._undoRedoService=x,this._onModelAdded=this._register(new b.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new b.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new b.Emitter),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new T(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new E(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(F,D){let R=S.EDITOR_MODEL_DEFAULTS.tabSize;if(F.editor&&typeof F.editor.tabSize!="undefined"){const le=parseInt(F.editor.tabSize,10);isNaN(le)||(R=le),R<1&&(R=1)}let W=R;if(F.editor&&typeof F.editor.indentSize!="undefined"&&F.editor.indentSize!=="tabSize"){const le=parseInt(F.editor.indentSize,10);isNaN(le)||(W=le),W<1&&(W=1)}let x=S.EDITOR_MODEL_DEFAULTS.insertSpaces;F.editor&&typeof F.editor.insertSpaces!="undefined"&&(x=F.editor.insertSpaces==="false"?!1:Boolean(F.editor.insertSpaces));let K=v;const Y=F.eol;Y===`\r
`?K=2:Y===`
`&&(K=1);let ee=S.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;F.editor&&typeof F.editor.trimAutoWhitespace!="undefined"&&(ee=F.editor.trimAutoWhitespace==="false"?!1:Boolean(F.editor.trimAutoWhitespace));let se=S.EDITOR_MODEL_DEFAULTS.detectIndentation;F.editor&&typeof F.editor.detectIndentation!="undefined"&&(se=F.editor.detectIndentation==="false"?!1:Boolean(F.editor.detectIndentation));let ne=S.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;return F.editor&&typeof F.editor.largeFileOptimizations!="undefined"&&(ne=F.editor.largeFileOptimizations==="false"?!1:Boolean(F.editor.largeFileOptimizations)),{isForSimpleWidget:D,tabSize:R,indentSize:W,insertSpaces:x,detectIndentation:se,defaultEOL:K,trimAutoWhitespace:ee,largeFileOptimizations:ne}}_getEOL(F,D){if(F)return this._resourcePropertiesService.getEOL(F,D);const R=this._configurationService.getValue("files.eol",{overrideIdentifier:D});return R&&R!=="auto"?R:M.OS===3||M.OS===2?`
`:`\r
`}_shouldRestoreUndoStack(){const F=this._configurationService.getValue("files.restoreUndoStack");return typeof F=="boolean"?F:!0}getCreationOptions(F,D,R){let W=this._modelCreationOptionsByLanguageAndResource[F+D];if(!W){const x=this._configurationService.getValue("editor",{overrideIdentifier:F,resource:D}),K=this._getEOL(D,F);W=st._readModelOptions({editor:x,eol:K},R),this._modelCreationOptionsByLanguageAndResource[F+D]=W}return W}_updateModelOptions(){const F=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const D=Object.keys(this._models);for(let R=0,W=D.length;R<W;R++){const x=D[R],K=this._models[x],Y=K.model.getLanguageIdentifier().language,ee=K.model.uri,se=F[Y+ee],ne=this.getCreationOptions(Y,ee,K.model.isForSimpleWidget);st._setModelOptionsForModel(K.model,ne,se)}}static _setModelOptionsForModel(F,D,R){R&&R.defaultEOL!==D.defaultEOL&&F.getLineCount()===1&&F.setEOL(D.defaultEOL===1?0:1),!(R&&R.detectIndentation===D.detectIndentation&&R.insertSpaces===D.insertSpaces&&R.tabSize===D.tabSize&&R.indentSize===D.indentSize&&R.trimAutoWhitespace===D.trimAutoWhitespace)&&(D.detectIndentation?(F.detectIndentation(D.insertSpaces,D.tabSize),F.updateOptions({trimAutoWhitespace:D.trimAutoWhitespace})):F.updateOptions({insertSpaces:D.insertSpaces,tabSize:D.tabSize,indentSize:D.indentSize,trimAutoWhitespace:D.trimAutoWhitespace}))}_insertDisposedModel(F){this._disposedModels.set(m(F.uri),F),this._disposedModelsHeapSize+=F.heapSize}_removeDisposedModel(F){const D=this._disposedModels.get(m(F));return D&&(this._disposedModelsHeapSize-=D.heapSize),this._disposedModels.delete(m(F)),D}_ensureDisposedModelsHeapSize(F){if(this._disposedModelsHeapSize>F){const D=[];for(this._disposedModels.forEach(R=>{R.sharesUndoRedoStack||D.push(R)}),D.sort((R,W)=>R.time-W.time);D.length>0&&this._disposedModelsHeapSize>F;){const R=D.shift();this._removeDisposedModel(R.uri),R.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(R.initialUndoRedoSnapshot)}}}_createModelData(F,D,R,W){const x=this.getCreationOptions(D.language,R,W),K=new C.TextModel(F,x,D,R,this._undoRedoService);if(R&&this._disposedModels.has(m(R))){const se=this._removeDisposedModel(R),ne=this._undoRedoService.getElements(R),le=_(K)===se.sha1;if(le||se.sharesUndoRedoStack){for(const X of ne.past)n.isEditStackElement(X)&&X.matchesResource(R)&&X.setModel(K);for(const X of ne.future)n.isEditStackElement(X)&&X.matchesResource(R)&&X.setModel(K);this._undoRedoService.setElementsValidFlag(R,!0,X=>n.isEditStackElement(X)&&X.matchesResource(R)),le&&(K._overwriteVersionId(se.versionId),K._overwriteAlternativeVersionId(se.alternativeVersionId),K._overwriteInitialUndoRedoSnapshot(se.initialUndoRedoSnapshot))}else se.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(se.initialUndoRedoSnapshot)}const Y=m(K.uri);if(this._models[Y])throw new Error("ModelService: Cannot add model because it already exists!");const ee=new f(K,se=>this._onWillDispose(se),(se,ne)=>this._onDidChangeLanguage(se,ne));return this._models[Y]=ee,ee}createModel(F,D,R,W=!1){let x;return D?(x=this._createModelData(F,D.languageIdentifier,R,W),this.setMode(x.model,D)):x=this._createModelData(F,g.PLAINTEXT_LANGUAGE_IDENTIFIER,R,W),this._onModelAdded.fire(x.model),x.model}setMode(F,D){if(!!D){const R=this._models[m(F.uri)];!R||R.setLanguage(D)}}getModels(){const F=[],D=Object.keys(this._models);for(let R=0,W=D.length;R<W;R++){const x=D[R];F.push(this._models[x].model)}return F}getModel(F){const D=m(F),R=this._models[D];return R?R.model:null}getSemanticTokensProviderStyling(F){return this._semanticStyling.get(F)}_onWillDispose(F){const D=m(F.uri),R=this._models[D],W=this._undoRedoService.getUriComparisonKey(F.uri)!==F.uri.toString();let x=!1,K=0;if(W||this._shouldRestoreUndoStack()&&L(F.uri)){const ee=this._undoRedoService.getElements(F.uri);if(ee.past.length>0||ee.future.length>0){for(const se of ee.past)n.isEditStackElement(se)&&se.matchesResource(F.uri)&&(x=!0,K+=se.heapSize(F.uri),se.setModel(F.uri));for(const se of ee.future)n.isEditStackElement(se)&&se.matchesResource(F.uri)&&(x=!0,K+=se.heapSize(F.uri),se.setModel(F.uri))}}const Y=st.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(x)if(!W&&K>Y){const ee=R.model.getInitialUndoRedoSnapshot();ee!==null&&this._undoRedoService.restoreSnapshot(ee)}else this._ensureDisposedModelsHeapSize(Y-K),this._undoRedoService.setElementsValidFlag(F.uri,!1,ee=>n.isEditStackElement(ee)&&ee.matchesResource(F.uri)),this._insertDisposedModel(new y(F.uri,R.model.getInitialUndoRedoSnapshot(),Date.now(),W,K,_(F),F.getVersionId(),F.getAlternativeVersionId()));else if(!W){const ee=R.model.getInitialUndoRedoSnapshot();ee!==null&&this._undoRedoService.restoreSnapshot(ee)}delete this._models[D],R.dispose(),delete this._modelCreationOptionsByLanguageAndResource[F.getLanguageIdentifier().language+F.uri],this._onModelRemoved.fire(F)}_onDidChangeLanguage(F,D){const R=D.oldLanguage,W=F.getLanguageIdentifier().language,x=this.getCreationOptions(R,F.uri,F.isForSimpleWidget),K=this.getCreationOptions(W,F.uri,F.isForSimpleWidget);st._setModelOptionsForModel(F,K,x),this._onModelModeChanged.fire({model:F,oldModeId:R})}};I.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,I=Me([_e(0,c.IConfigurationService),_e(1,p.ITextResourcePropertiesService),_e(2,a.IThemeService),_e(3,u.ILogService),_e(4,r.IUndoRedoService)],I),e.ModelServiceImpl=I,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function k(B,F,D){var R;const W=(R=D.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:B.getLanguageIdentifier().language,resource:B.uri}))===null||R===void 0?void 0:R.enabled;return typeof W=="boolean"?W:F.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=k;class E extends N.Disposable{constructor(F,D,R,W){super();this._watchers=Object.create(null),this._semanticStyling=W;const x=ee=>{this._watchers[ee.uri.toString()]=new A(ee,D,this._semanticStyling)},K=(ee,se)=>{se.dispose(),delete this._watchers[ee.uri.toString()]},Y=()=>{for(let ee of F.getModels()){const se=this._watchers[ee.uri.toString()];k(ee,D,R)?se||x(ee):se&&K(ee,se)}};this._register(F.onModelAdded(ee=>{k(ee,D,R)&&x(ee)})),this._register(F.onModelRemoved(ee=>{const se=this._watchers[ee.uri.toString()];se&&K(ee,se)})),this._register(R.onDidChangeConfiguration(ee=>{ee.affectsConfiguration(e.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&Y()})),this._register(D.onDidColorThemeChange(Y))}}class T extends N.Disposable{constructor(F,D){super();this._themeService=F,this._logService=D,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(F){return this._caches.has(F)||this._caches.set(F,new l.SemanticTokensProviderStyling(F.getLegend(),this._themeService,this._logService)),this._caches.get(F)}}class O{constructor(F,D,R){this._provider=F,this.resultId=D,this.data=R}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class A extends N.Disposable{constructor(F,D,R){super();this._isDisposed=!1,this._model=F,this._semanticStyling=R,this._fetchDocumentSemanticTokens=this._register(new o.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),A.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}));const W=()=>{N.dispose(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const x of d.DocumentSemanticTokensProviderRegistry.all(F))typeof x.onDidChange=="function"&&this._documentProvidersChangeListeners.push(x.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};W(),this._register(d.DocumentSemanticTokensProviderRegistry.onDidChange(()=>{W(),this._fetchDocumentSemanticTokens.schedule()})),this._register(D.onDidColorThemeChange(x=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(!this._currentDocumentRequestCancellationTokenSource){const F=new s.CancellationTokenSource,D=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,R=h.getDocumentSemanticTokens(this._model,D,F.token);if(!R){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const{provider:W,request:x}=R;this._currentDocumentRequestCancellationTokenSource=F;const K=[],Y=this._model.onDidChangeContent(se=>{K.push(se)}),ee=this._semanticStyling.get(W);x.then(se=>{this._currentDocumentRequestCancellationTokenSource=null,Y.dispose(),this._setDocumentSemanticTokens(W,se||null,ee,K)},se=>{se&&(w.isPromiseCanceledError(se)||typeof se.message=="string"&&se.message.indexOf("busy")!==-1)||w.onUnexpectedError(se),this._currentDocumentRequestCancellationTokenSource=null,Y.dispose(),K.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}}static _copy(F,D,R,W,x){for(let K=0;K<x;K++)R[W+K]=F[D+K]}_setDocumentSemanticTokens(F,D,R,W){const x=this._currentDocumentResponse,K=()=>{W.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){F&&D&&F.releaseDocumentSemanticTokens(D.resultId);return}if(!F||!R){this._model.setSemanticTokens(null,!1);return}if(!D){this._model.setSemanticTokens(null,!0),K();return}if(h.isSemanticTokensEdits(D)){if(!x){this._model.setSemanticTokens(null,!0);return}if(D.edits.length===0)D={resultId:D.resultId,data:x.data};else{let Y=0;for(const X of D.edits)Y+=(X.data?X.data.length:0)-X.deleteCount;const ee=x.data,se=new Uint32Array(ee.length+Y);let ne=ee.length,le=se.length;for(let X=D.edits.length-1;X>=0;X--){const z=D.edits[X],P=ne-(z.start+z.deleteCount);P>0&&(A._copy(ee,ne-P,se,le-P,P),le-=P),z.data&&(A._copy(z.data,0,se,le-z.data.length,z.data.length),le-=z.data.length),ne=z.start}ne>0&&A._copy(ee,0,se,0,ne),D={resultId:D.resultId,data:se}}}if(h.isSemanticTokens(D)){this._currentDocumentResponse=new O(F,D.resultId,D.data);const Y=l.toMultilineTokens2(D,R,this._model.getLanguageIdentifier());if(W.length>0)for(const ee of W)for(const se of Y)for(const ne of ee.changes)se.applyEdit(ne.range,ne.text);this._model.setSemanticTokens(Y,!0)}else this._model.setSemanticTokens(null,!0);K()}}e.ModelSemanticColoring=A,A.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300}),define(Q[669],J([0,1,7,29,6,2,43,44,144,3,31,67,601,485,9,115,147,22,11,118,132,210,148,37,345]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class f{constructor(k,E){this._editor=k,this._model=E,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new w.DisposableStore,this._callOnModelChange=new w.DisposableStore,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const k=this._editor.getModel();if(!!k){for(let E of this._model.references)if(E.uri.toString()===k.uri.toString()){this._addDecorations(E.parent);return}}}_addDecorations(k){if(!!this._editor.hasModel()){this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const E=[],T=[];for(let A=0,B=k.children.length;A<B;A++){let F=k.children[A];this._decorationIgnoreSet.has(F.id)||F.uri.toString()===this._editor.getModel().uri.toString()&&(E.push({range:F.range,options:f.DecorationOptions}),T.push(A))}const O=this._editor.deltaDecorations([],E);for(let A=0;A<O.length;A++)this._decorations.set(O[A],k.children[T[A]])}}_onDecorationChanged(){const k=[],E=this._editor.getModel();if(!!E){for(let[T,O]of this._decorations){const A=E.getDecorationRange(T);if(!!A){let B=!1;if(!g.Range.equalsRange(A,O.range)){if(g.Range.spansMultipleLines(A))B=!0;else{const F=O.range.endColumn-O.range.startColumn,D=A.endColumn-A.startColumn;F!==D&&(B=!0)}B?(this._decorationIgnoreSet.add(O.id),k.push(T)):O.range=A}}}for(let T=0,O=k.length;T<O;T++)this._decorations.delete(k[T]);this._editor.deltaDecorations(k,[])}}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}f.DecorationOptions=p.ModelDecorationOptions.register({stickiness:1,className:"reference-decoration"});class v{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(k){let E,T;try{const O=JSON.parse(k);E=O.ratio,T=O.heightInLines}catch(O){}return{ratio:E||.7,heightInLines:T||18}}}e.LayoutData=v;class y extends r.WorkbenchAsyncDataTree{}let L=class extends t.PeekViewWidget{constructor(k,E,T,O,A,B,F,D,R,W){super(k,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0},B);this._defaultTreeKeyboardSupport=E,this.layoutData=T,this._textModelResolverService=A,this._instantiationService=B,this._peekViewService=F,this._uriLabel=D,this._undoRedoService=R,this._keybindingService=W,this._disposeOnNewModel=new w.DisposableStore,this._callOnDispose=new w.DisposableStore,this._onDidSelectReference=new M.Emitter,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new b.Dimension(0,0),this._applyTheme(O.getColorTheme()),this._callOnDispose.add(O.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(k,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),w.dispose(this._preview),w.dispose(this._previewNotAvailableMessage),w.dispose(this._tree),w.dispose(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(k){const E=k.getColor(t.peekViewBorder)||N.Color.transparent;this.style({arrowColor:E,frameColor:E,headerBackgroundColor:k.getColor(t.peekViewTitleBackground)||N.Color.transparent,primaryHeadingColor:k.getColor(t.peekViewTitleForeground),secondaryHeadingColor:k.getColor(t.peekViewTitleInfoForeground)})}show(k){this.editor.revealRangeInCenterIfOutsideViewport(k,0),super.show(k,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(k){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:k.ctrlKey||k.metaKey||k.altKey?"side":"open",source:"title"})}_fillBody(k){this.setCssClass("reference-zone-widget"),this._messageContainer=b.append(k,b.$("div.messages")),b.hide(this._messageContainer),this._splitView=new h.SplitView(k,{orientation:1}),this._previewContainer=b.append(k,b.$("div.preview.inline"));let E={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(d.EmbeddedCodeEditorWidget,this._previewContainer,E,this.editor),b.hide(this._previewContainer),this._previewNotAvailableMessage=new p.TextModel(s.localize(0,null),p.TextModel.DEFAULT_CREATION_OPTIONS,null,null,this._undoRedoService),this._treeContainer=b.append(k,b.$("div.ref-tree.inline"));const T={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new o.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(o.StringRepresentationProvider),identityProvider:new o.IdentityProvider,openOnSingleClick:!0,openOnFocus:!0,overrideStyles:{listBackground:t.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(b.addStandardDisposableListener(this._treeContainer,"keydown",A=>{A.equals(9)&&(this._keybindingService.dispatchEvent(A,A.target),A.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(y,"ReferencesWidget",this._treeContainer,new o.Delegate,[this._instantiationService.createInstance(o.FileReferencesRenderer),this._instantiationService.createInstance(o.OneReferenceRenderer)],this._instantiationService.createInstance(o.DataSource),T),this._splitView.addView({onDidChange:M.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:A=>{this._preview.layout({height:this._dim.height,width:A})}},h.Sizing.Distribute),this._splitView.addView({onDidChange:M.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:A=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${A}px`,this._tree.layout(this._dim.height,A)}},h.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let O=(A,B)=>{A instanceof l.OneReference&&(B==="show"&&this._revealReference(A,!1),this._onDidSelectReference.fire({element:A,kind:B,source:"tree"}))};this._tree.onDidOpen(A=>{A.sideBySide?O(A.element,"side"):A.editorOptions.pinned?O(A.element,"goto"):O(A.element,"show")}),b.hide(this._treeContainer)}_onWidth(k){this._dim&&this._doLayoutBody(this._dim.height,k)}_doLayoutBody(k,E){super._doLayoutBody(k,E),this._dim=new b.Dimension(E,k),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(E),this._splitView.resizeView(0,E*this.layoutData.ratio)}setSelection(k){return this._revealReference(k,!0).then(()=>{!this._model||(this._tree.setSelection([k]),this._tree.setFocus([k]))})}setModel(k){return this._disposeOnNewModel.clear(),this._model=k,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=s.localize(1,null),b.show(this._messageContainer),Promise.resolve(void 0)):(b.hide(this._messageContainer),this._decorationsManager=new f(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(k=>this._tree.rerender(k))),this._disposeOnNewModel.add(this._preview.onMouseDown(k=>{const{event:E,target:T}=k;if(E.detail===2){const O=this._getFocusedReference();!O||this._onDidSelectReference.fire({element:{uri:O.uri,range:T.range},kind:E.ctrlKey||E.metaKey||E.altKey?"side":"open",source:"editor"})}})),this.container.classList.add("results-loaded"),b.show(this._treeContainer),b.show(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[k]=this._tree.getFocus();if(k instanceof l.OneReference)return k;if(k instanceof l.FileReferences&&k.children.length>0)return k.children[0]}revealReference(k){return Ie(this,void 0,void 0,function*(){yield this._revealReference(k,!1),this._onDidSelectReference.fire({element:k,kind:"goto",source:"tree"})})}_revealReference(k,E){return Ie(this,void 0,void 0,function*(){if(this._revealedReference!==k){this._revealedReference=k,k.uri.scheme!==S.Schemas.inMemory?this.setTitle(C.basenameOrAuthority(k.uri),this._uriLabel.getUriLabel(C.dirname(k.uri))):this.setTitle(s.localize(2,null));const T=this._textModelResolverService.createModelReference(k.uri);this._tree.getInput()===k.parent?this._tree.reveal(k):(E&&this._tree.reveal(k.parent),yield this._tree.expand(k.parent),this._tree.reveal(k));const O=yield T;if(!this._model){O.dispose();return}w.dispose(this._previewModelReference);const A=O.object;if(A){const B=this._preview.getModel()===A.textEditorModel?0:1,F=g.Range.lift(k.range).collapseToStart();this._previewModelReference=O,this._preview.setModel(A.textEditorModel),this._preview.setSelection(F),this._preview.revealRangeInCenter(F,B)}else this._preview.setModel(this._previewNotAvailableMessage),O.dispose()}})}};L=Me([_e(3,n.IThemeService),_e(4,c.ITextModelService),_e(5,a.IInstantiationService),_e(6,t.IPeekViewService),_e(7,u.ILabelService),_e(8,m.IUndoRedoService),_e(9,_.IKeybindingService)],L),e.ReferenceWidget=L,n.registerThemingParticipant((I,k)=>{const E=I.getColor(t.peekViewResultsMatchHighlight);E&&k.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${E}; }`);const T=I.getColor(t.peekViewEditorMatchHighlight);T&&k.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${T}; }`);const O=I.getColor(t.peekViewEditorMatchHighlightBorder);O&&k.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${O}; box-sizing: border-box; }`);const A=I.getColor(i.activeContrastBorder);A&&k.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${A}; box-sizing: border-box; }`);const B=I.getColor(t.peekViewResultsBackground);B&&k.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${B}; }`);const F=I.getColor(t.peekViewResultsMatchForeground);F&&k.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${F}; }`);const D=I.getColor(t.peekViewResultsFileForeground);D&&k.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${D}; }`);const R=I.getColor(t.peekViewResultsSelectionBackground);R&&k.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${R}; }`);const W=I.getColor(t.peekViewResultsSelectionForeground);W&&k.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${W} !important; }`);const x=I.getColor(t.peekViewEditorBackground);x&&k.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input { background-color: ${x};}`);const K=I.getColor(t.peekViewEditorGutterBackground);K&&k.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin { background-color: ${K};}`)})}),define(Q[270],J([0,1,483,12,2,28,9,16,46,79,132,669,3,14,32,15,118,147,86,39,26]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new C.RawContextKey("referenceSearchVisible",!1);let h=class yt{constructor(f,v,y,L,I,k,E,T){this._defaultTreeKeyboardSupport=f,this._editor=v,this._editorService=L,this._notificationService=I,this._instantiationService=k,this._storageService=E,this._configurationService=T,this._disposables=new M.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(y)}static get(f){return f.getContribution(yt.ID)}dispose(){var f,v;this._referenceSearchVisible.reset(),this._disposables.dispose(),(f=this._widget)===null||f===void 0||f.dispose(),(v=this._model)===null||v===void 0||v.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(f,v,y){let L;if(this._widget&&(L=this._widget.position),this.closeWidget(),!(!!L&&f.containsPosition(L))){this._peekMode=y,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const I="peekViewLayout",k=c.LayoutData.fromJSON(this._storageService.get(I,0,"{}"));this._widget=this._instantiationService.createInstance(c.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,k),this._widget.setTitle(b.localize(0,null)),this._widget.show(f),this._disposables.add(this._widget.onDidClose(()=>{v.cancel(),this._widget&&(this._storageService.store(I,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(T=>{let{element:O,kind:A}=T;if(!!O)switch(A){case"open":(T.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(O,!1,!1);break;case"side":this.openReference(O,!0,!1);break;case"goto":y?this._gotoReference(O):this.openReference(O,!1,!0);break}}));const E=++this._requestIdPool;v.then(T=>{var O;if(E!==this._requestIdPool||!this._widget){T.dispose();return}return(O=this._model)===null||O===void 0||O.dispose(),this._model=T,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(b.localize(1,null,this._model.title,this._model.references.length));let A=this._editor.getModel().uri,B=new s.Position(f.startLineNumber,f.startColumn),F=this._model.nearestReference(A,B);if(F)return this._widget.setSelection(F).then(()=>{this._widget&&this._editor.getOption(71)==="editor"&&this._widget.focusOnPreviewEditor()})}})},T=>{this._notificationService.error(T)})}}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(f){return Ie(this,void 0,void 0,function*(){if(!(!this._editor.hasModel()||!this._model||!this._widget)){const v=this._widget.position;if(!!v){const y=this._model.nearestReference(this._editor.getModel().uri,v);if(!!y){const L=this._model.nextOrPreviousReference(y,f),I=this._editor.hasTextFocus(),k=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(L),yield this._gotoReference(L),I?this._editor.focus():this._widget&&k&&this._widget.focusOnPreviewEditor()}}}})}revealReference(f){return Ie(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(f))})}closeWidget(f=!0){var v,y;(v=this._widget)===null||v===void 0||v.dispose(),(y=this._model)===null||y===void 0||y.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,f&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(f){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const v=o.Range.lift(f.range).collapseToStart();return this._editorService.openCodeEditor({resource:f.uri,options:{selection:v}},this._editor).then(y=>{var L;if(this._ignoreModelChangeEvent=!1,!y||!this._widget){this.closeWidget();return}if(this._editor===y)this._widget.show(v),this._widget.focusOnReferenceTree();else{const I=yt.get(y),k=this._model.clone();this.closeWidget(),y.focus(),I.toggleWidget(v,u.createCancelablePromise(E=>Promise.resolve(k)),(L=this._peekMode)!==null&&L!==void 0?L:!1)}},y=>{this._ignoreModelChangeEvent=!1,N.onUnexpectedError(y)})}openReference(f,v,y){v||this.closeWidget();const{uri:L,range:I}=f;this._editorService.openCodeEditor({resource:L,options:{selection:I,pinned:y}},this._editor,v)}};h.ID="editor.contrib.referencesController",h=Me([_e(2,C.IContextKeyService),_e(3,w.ICodeEditorService),_e(4,a.INotificationService),_e(5,S.IInstantiationService),_e(6,g.IStorageService),_e(7,d.IConfigurationService)],h),e.ReferencesController=h;function m(_,f){const v=r.getOuterEditor(_);if(!!v){let y=h.get(v);y&&f(y)}}n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:t.KeyChord(2048|41,60),when:C.ContextKeyExpr.or(e.ctxReferenceSearchVisible,r.PeekContext.inPeekEditor),handler(_){m(_,f=>{f.changeFocusBetweenPreviewAndReferences()})}}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:C.ContextKeyExpr.or(e.ctxReferenceSearchVisible,r.PeekContext.inPeekEditor),handler(_){m(_,f=>{f.goToNextOrPreviousReference(!0)})}}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1024|62,secondary:[1024|70],when:C.ContextKeyExpr.or(e.ctxReferenceSearchVisible,r.PeekContext.inPeekEditor),handler(_){m(_,f=>{f.goToNextOrPreviousReference(!1)})}}),l.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),l.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),l.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),l.CommandsRegistry.registerCommand("closeReferenceSearch",_=>m(_,f=>f.closeWidget())),n.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1024|9],when:C.ContextKeyExpr.and(r.PeekContext.inPeekEditor,C.ContextKeyExpr.not("config.editor.stablePeek"))}),n.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1024|9],when:C.ContextKeyExpr.and(e.ctxReferenceSearchVisible,C.ContextKeyExpr.not("config.editor.stablePeek"))}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2048|18]},when:C.ContextKeyExpr.and(e.ctxReferenceSearchVisible,i.WorkbenchListFocusContextKey),handler(_){var f;const y=(f=_.get(i.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(y)&&y[0]instanceof p.OneReference&&m(_,L=>L.revealReference(y[0]))}}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2048|3,mac:{primary:256|3},when:C.ContextKeyExpr.and(e.ctxReferenceSearchVisible,i.WorkbenchListFocusContextKey),handler(_){var f;const y=(f=_.get(i.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(y)&&y[0]instanceof p.OneReference&&m(_,L=>L.openReference(y[0],!0,!0))}}),l.CommandsRegistry.registerCommand("openReference",_=>{var f;const y=(f=_.get(i.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(y)&&y[0]instanceof p.OneReference&&m(_,L=>L.openReference(y[0],!1,!0))})}),define(Q[271],J([0,1,47,15,39,17,108,13,28,14,3,25,18,146,118,270,132,481,34,16,32,59,262,26,70,625,35,24,9,20,144]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I,k,E){"use strict";var T,O,A,B,F,D,R,W;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=void 0,n.MenuRegistry.appendMenuItem(n.MenuId.EditorContext,{submenu:n.MenuId.EditorContextPeek,title:i.localize(0,null),group:"navigation",order:100});class x extends C.EditorAction{constructor(P,V){super(V);this._configuration=P}run(P,V){if(!V.hasModel())return Promise.resolve(void 0);const U=P.get(l.INotificationService),H=P.get(d.ICodeEditorService),$=P.get(h.IEditorProgressService),ie=P.get(v.ISymbolNavigationService),oe=V.getModel(),ae=V.getPosition(),G=new f.EditorStateCancellationTokenSource(V,1|4),j=N.raceCancellation(this._getLocationModel(oe,ae,G.token),G.token).then(te=>Ie(this,void 0,void 0,function*(){if(!(!te||G.token.isCancellationRequested)){b.alert(te.ariaMessage);let Z;if(te.referenceAt(oe.uri,ae)){const he=this._getAlternativeCommand(V);he!==this.id&&(Z=V.getAction(he))}const ue=te.references.length;if(ue===0){if(!this._configuration.muteMessage){const he=oe.getWordAtPosition(ae);s.MessageController.get(V).showMessage(this._getNoResultFoundMessage(he),ae)}}else if(ue===1&&Z)Z.run();else return this._onResult(H,ie,V,te)}}),te=>{U.error(te)}).finally(()=>{G.dispose()});return $.showWhile(j,250),j}_onResult(P,V,U,H){return Ie(this,void 0,void 0,function*(){const $=this._getGoToPreference(U);if(!(U instanceof E.EmbeddedCodeEditorWidget)&&(this._configuration.openInPeek||$==="peek"&&H.references.length>1))this._openInPeek(U,H);else{const ie=H.firstReference(),oe=H.references.length>1&&$==="gotoAndPeek",ae=yield this._openReference(U,P,ie,this._configuration.openToSide,!oe);oe&&ae?this._openInPeek(ae,H):H.dispose(),$==="goto"&&V.put(ie)}})}_openReference(P,V,U,H,$){return Ie(this,void 0,void 0,function*(){let ie;if(o.isLocationLink(U)&&(ie=U.targetSelectionRange),ie||(ie=U.range),!!ie){const oe=yield V.openCodeEditor({resource:U.uri,options:{selection:p.Range.collapseToStart(ie),selectionRevealType:3}},P,H);if(!!oe){if($){const ae=oe.getModel(),G=oe.deltaDecorations([],[{range:ie,options:{className:"symbolHighlight"}}]);setTimeout(()=>{oe.getModel()===ae&&oe.deltaDecorations(G,[])},350)}return oe}}})}_openInPeek(P,V){let U=u.ReferencesController.get(P);U&&P.hasModel()?U.toggleWidget(P.getSelection(),N.createCancelablePromise(H=>Promise.resolve(V)),this._configuration.openInPeek):V.dispose()}}class K extends x{_getLocationModel(P,V,U){return Ie(this,void 0,void 0,function*(){return new r.ReferencesModel(yield m.getDefinitionsAtPosition(P,V,U),i.localize(1,null))})}_getNoResultFoundMessage(P){return P&&P.word?i.localize(2,null,P.word):i.localize(3,null)}_getAlternativeCommand(P){return P.getOption(45).alternativeDefinitionCommand}_getGoToPreference(P){return P.getOption(45).multipleDefinitions}}e.DefinitionAction=K;const Y=w.isWeb&&!y.isStandalone?2048|70:70;C.registerEditorAction((T=class Lt extends K{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Lt.id,label:i.localize(4,null),alias:"Go to Definition",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:Y,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:n.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:2,title:i.localize(5,null)}});_.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",Lt.id)}},T.id="editor.action.revealDefinition",T)),C.registerEditorAction((O=class Et extends K{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Et.id,label:i.localize(6,null),alias:"Open Definition to the Side",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:M.KeyChord(2048|41,Y),weight:100}});_.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",Et.id)}},O.id="editor.action.revealDefinitionAside",O)),C.registerEditorAction((A=class Dt extends K{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Dt.id,label:i.localize(7,null),alias:"Peek Definition",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,a.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:512|70,linux:{primary:2048|1024|68},weight:100},contextMenuOpts:{menuId:n.MenuId.EditorContextPeek,group:"peek",order:2}});_.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",Dt.id)}},A.id="editor.action.peekDefinition",A));class ee extends x{_getLocationModel(P,V,U){return Ie(this,void 0,void 0,function*(){return new r.ReferencesModel(yield m.getDeclarationsAtPosition(P,V,U),i.localize(8,null))})}_getNoResultFoundMessage(P){return P&&P.word?i.localize(9,null,P.word):i.localize(10,null)}_getAlternativeCommand(P){return P.getOption(45).alternativeDeclarationCommand}_getGoToPreference(P){return P.getOption(45).multipleDeclarations}}C.registerEditorAction((B=class Yt extends ee{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Yt.id,label:i.localize(11,null),alias:"Go to Declaration",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasDeclarationProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:n.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:3,title:i.localize(12,null)}})}_getNoResultFoundMessage(P){return P&&P.word?i.localize(13,null,P.word):i.localize(14,null)}},B.id="editor.action.revealDeclaration",B)),C.registerEditorAction(class extends ee{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:i.localize(15,null),alias:"Peek Declaration",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasDeclarationProvider,a.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:n.MenuId.EditorContextPeek,group:"peek",order:3}})}});class se extends x{_getLocationModel(P,V,U){return Ie(this,void 0,void 0,function*(){return new r.ReferencesModel(yield m.getTypeDefinitionsAtPosition(P,V,U),i.localize(16,null))})}_getNoResultFoundMessage(P){return P&&P.word?i.localize(17,null,P.word):i.localize(18,null)}_getAlternativeCommand(P){return P.getOption(45).alternativeTypeDefinitionCommand}_getGoToPreference(P){return P.getOption(45).multipleTypeDefinitions}}C.registerEditorAction((F=class Zt extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Zt.ID,label:i.localize(19,null),alias:"Go to Type Definition",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasTypeDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:n.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:3,title:i.localize(20,null)}})}},F.ID="editor.action.goToTypeDefinition",F)),C.registerEditorAction((D=class Xt extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Xt.ID,label:i.localize(21,null),alias:"Peek Type Definition",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasTypeDefinitionProvider,a.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:n.MenuId.EditorContextPeek,group:"peek",order:4}})}},D.ID="editor.action.peekTypeDefinition",D));class ne extends x{_getLocationModel(P,V,U){return Ie(this,void 0,void 0,function*(){return new r.ReferencesModel(yield m.getImplementationsAtPosition(P,V,U),i.localize(22,null))})}_getNoResultFoundMessage(P){return P&&P.word?i.localize(23,null,P.word):i.localize(24,null)}_getAlternativeCommand(P){return P.getOption(45).alternativeImplementationCommand}_getGoToPreference(P){return P.getOption(45).multipleImplementations}}C.registerEditorAction((R=class Qt extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Qt.ID,label:i.localize(25,null),alias:"Go to Implementations",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasImplementationProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2048|70,weight:100},menuOpts:{menuId:n.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:4,title:i.localize(26,null)},contextMenuOpts:{group:"navigation",order:1.45}})}},R.ID="editor.action.goToImplementation",R)),C.registerEditorAction((W=class Jt extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Jt.ID,label:i.localize(27,null),alias:"Peek Implementations",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasImplementationProvider,a.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2048|1024|70,weight:100},contextMenuOpts:{menuId:n.MenuId.EditorContextPeek,group:"peek",order:5}})}},W.ID="editor.action.peekImplementation",W));class le extends x{_getNoResultFoundMessage(P){return P?i.localize(28,null,P.word):i.localize(29,null)}_getAlternativeCommand(P){return P.getOption(45).alternativeReferenceCommand}_getGoToPreference(P){return P.getOption(45).multipleReferences}}C.registerEditorAction(class extends le{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:i.localize(30,null),alias:"Go to References",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasReferenceProvider,a.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:1024|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:n.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:5,title:i.localize(31,null)}})}_getLocationModel(P,V,U){return Ie(this,void 0,void 0,function*(){return new r.ReferencesModel(yield m.getReferencesAtPosition(P,V,!0,U),i.localize(32,null))})}}),C.registerEditorAction(class extends le{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:i.localize(33,null),alias:"Peek References",precondition:t.ContextKeyExpr.and(c.EditorContextKeys.hasReferenceProvider,a.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:n.MenuId.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(P,V,U){return Ie(this,void 0,void 0,function*(){return new r.ReferencesModel(yield m.getReferencesAtPosition(P,V,!1,U),i.localize(34,null))})}});class X extends x{constructor(P,V,U){super(P,{id:"editor.action.goToLocation",label:i.localize(35,null),alias:"Go To Any Symbol",precondition:t.ContextKeyExpr.and(a.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated())});this._references=V,this._gotoMultipleBehaviour=U}_getLocationModel(P,V,U){return Ie(this,void 0,void 0,function*(){return new r.ReferencesModel(this._references,i.localize(36,null))})}_getNoResultFoundMessage(P){return P&&i.localize(37,null,P.word)||""}_getGoToPreference(P){var V;return(V=this._gotoMultipleBehaviour)!==null&&V!==void 0?V:P.getOption(45).multipleReferences}_getAlternativeCommand(){return""}}_.CommandsRegistry.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:L.URI},{name:"position",description:"The position at which to start",constraint:g.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(z,P,V,U,H,$,ie)=>Ie(void 0,void 0,void 0,function*(){k.assertType(L.URI.isUri(P)),k.assertType(g.Position.isIPosition(V)),k.assertType(Array.isArray(U)),k.assertType(typeof H=="undefined"||typeof H=="string"),k.assertType(typeof ie=="undefined"||typeof ie=="boolean");const oe=z.get(d.ICodeEditorService),ae=yield oe.openCodeEditor({resource:P},oe.getFocusedCodeEditor());if(S.isCodeEditor(ae))return ae.setPosition(V),ae.revealPositionInCenterIfOutsideViewport(V,0),ae.invokeWithinContext(G=>{const j=new class extends X{_getNoResultFoundMessage(te){return $||super._getNoResultFoundMessage(te)}}({muteMessage:!Boolean($),openInPeek:Boolean(ie),openToSide:!1},U,H);G.get(I.IInstantiationService).invokeFunction(j.run.bind(j),ae)})})}),_.CommandsRegistry.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:L.URI},{name:"position",description:"The position at which to start",constraint:g.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(z,P,V,U,H)=>Ie(void 0,void 0,void 0,function*(){z.get(_.ICommandService).executeCommand("editor.action.goToLocations",P,V,U,H,void 0,!0)})}),_.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(z,P,V)=>{k.assertType(L.URI.isUri(P)),k.assertType(g.Position.isIPosition(V));const U=z.get(d.ICodeEditorService);return U.openCodeEditor({resource:P},U.getFocusedCodeEditor()).then(H=>{if(!(!S.isCodeEditor(H)||!H.hasModel())){const $=u.ReferencesController.get(H);if(!!$){const ie=N.createCancelablePromise(ae=>m.getReferencesAtPosition(H.getModel(),g.Position.lift(V),!1,ae).then(G=>new r.ReferencesModel(G,i.localize(38,null)))),oe=new p.Range(V.lineNumber,V.column,V.lineNumber,V.column);return Promise.resolve($.toggleWidget(oe,ie,!1))}}})}}),_.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(Q[272],J([0,1,482,15,12,73,57,3,18,13,262,2,67,11,22,70,271,227,14,20,118,16,344]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let m=class rt{constructor(f,v,y){this.textModelResolverService=v,this.modeService=y,this.toUnhook=new c.DisposableStore,this.toUnhookForKeyboard=new c.DisposableStore,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=f;let L=new i.ClickLinkGesture(f);this.toUnhook.add(L),this.toUnhook.add(L.onMouseMoveOrRelevantKeyDown(([I,k])=>{this.startFindDefinitionFromMouse(I,t.withNullAsUndefined(k))})),this.toUnhook.add(L.onExecute(I=>{this.isEnabled(I)&&this.gotoDefinition(I.target.position,I.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},k=>{this.removeLinkDecorations(),M.onUnexpectedError(k)})})),this.toUnhook.add(L.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(f){return f.getContribution(rt.ID)}startFindDefinitionFromCursor(f){return this.startFindDefinition(f).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(v=>{v&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(f,v){if(!(f.target.type===9&&this.linkDecorations.length>0)){if(!this.editor.hasModel()||!this.isEnabled(f,v)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const y=f.target.position;this.startFindDefinition(y)}}startFindDefinition(f){var v;this.toUnhookForKeyboard.clear();const y=f?(v=this.editor.getModel())===null||v===void 0?void 0:v.getWordAtPosition(f):null;if(!y)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===y.startColumn&&this.currentWordAtPosition.endColumn===y.endColumn&&this.currentWordAtPosition.word===y.word)return Promise.resolve(0);this.currentWordAtPosition=y;let L=new u.EditorState(this.editor,4|1|2|8);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=N.createCancelablePromise(I=>this.findDefinition(f,I)),this.previousPromise.then(I=>{if(!I||!I.length||!L.validate(this.editor)){this.removeLinkDecorations();return}if(I.length>1)this.addDecoration(new C.Range(f.lineNumber,y.startColumn,f.lineNumber,y.endColumn),new w.MarkdownString().appendText(b.localize(0,null,I.length)));else{let k=I[0];if(!k.uri)return;this.textModelResolverService.createModelReference(k.uri).then(E=>{if(!E.object||!E.object.textEditorModel){E.dispose();return}const{object:{textEditorModel:T}}=E,{startLineNumber:O}=k.range;if(O<1||O>T.getLineCount()){E.dispose();return}const A=this.getPreviewValue(T,O,k);let B;k.originSelectionRange?B=C.Range.lift(k.originSelectionRange):B=new C.Range(f.lineNumber,y.startColumn,f.lineNumber,y.endColumn);const F=this.modeService.getModeIdByFilepathOrFirstLine(T.uri);this.addDecoration(B,new w.MarkdownString().appendCodeblock(F||"",A)),E.dispose()})}}).then(void 0,M.onUnexpectedError)}getPreviewValue(f,v,y){let L=y.targetSelectionRange?y.range:this.getPreviewRangeBasedOnBrackets(f,v);return L.endLineNumber-L.startLineNumber>=rt.MAX_SOURCE_PREVIEW_LINES&&(L=this.getPreviewRangeBasedOnIndentation(f,v)),this.stripIndentationFromPreviewRange(f,v,L)}stripIndentationFromPreviewRange(f,v,y){let I=f.getLineFirstNonWhitespaceColumn(v);for(let E=v+1;E<y.endLineNumber;E++){const T=f.getLineFirstNonWhitespaceColumn(E);I=Math.min(I,T)}return f.getValueInRange(y).replace(new RegExp(`^\\s{${I-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(f,v){const y=f.getLineFirstNonWhitespaceColumn(v),L=Math.min(f.getLineCount(),v+rt.MAX_SOURCE_PREVIEW_LINES);let I=v+1;for(;I<L;I++){let k=f.getLineFirstNonWhitespaceColumn(I);if(y===k)break}return new C.Range(v,1,I+1,1)}getPreviewRangeBasedOnBrackets(f,v){const y=Math.min(f.getLineCount(),v+rt.MAX_SOURCE_PREVIEW_LINES),L=[];let I=!0,k=f.findNextBracket(new n.Position(v,1));for(;k!==null;){if(L.length===0)L.push(k);else{const A=L[L.length-1];if(A.open[0]===k.open[0]&&A.isOpen&&!k.isOpen?L.pop():L.push(k),L.length===0)if(I)I=!1;else return new C.Range(v,1,k.range.endLineNumber+1,1)}const E=f.getLineMaxColumn(v);let T=k.range.endLineNumber,O=k.range.endColumn;if(E===k.range.endColumn&&(T++,O=1),T>y)return new C.Range(v,1,y+1,1);k=f.findNextBracket(new n.Position(T,O))}return new C.Range(v,1,y+1,1)}addDecoration(f,v){const y={range:f,options:{inlineClassName:"goto-definition-link",hoverMessage:v}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[y])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(f,v){return this.editor.hasModel()&&f.isNoneOrSingleMouseDown&&f.target.type===6&&(f.hasTriggerModifier||(v?v.keyCodeIsTriggerKey:!1))&&d.DefinitionProviderRegistry.has(this.editor.getModel())}findDefinition(f,v){const y=this.editor.getModel();return y?p.getDefinitionsAtPosition(y,f,v):Promise.resolve(null)}gotoDefinition(f,v){return this.editor.setPosition(f),this.editor.invokeWithinContext(y=>{const L=!v&&this.editor.getOption(72)&&!this.isInPeekEditor(y);return new r.DefinitionAction({openToSide:v,openInPeek:L,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(y,this.editor)})}isInPeekEditor(f){const v=f.get(h.IContextKeyService);return l.PeekContext.inPeekEditor.getValue(v)}dispose(){this.toUnhook.dispose()}};m.ID="editor.contrib.gotodefinitionatposition",m.MAX_SOURCE_PREVIEW_LINES=8,m=Me([_e(1,o.ITextModelService),_e(2,S.IModeService)],m),e.GotoDefinitionAtPositionEditorContribution=m,g.registerEditorContribution(m.ID,m),s.registerThemingParticipant((_,f)=>{const v=_.getColor(a.editorActiveLinkForeground);v&&f.addRule(`.monaco-editor .goto-definition-link { color: ${v} !important; }`)})}),define(Q[273],J([0,1,488,39,2,13,3,25,57,661,560,58,22,11,272,16,9]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;let i=class ei{constructor(h,m,_,f,v,y){this._editor=h,this._instantiationService=m,this._openerService=_,this._modeService=f,this._themeService=v,this._toUnhook=new M.DisposableStore,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(L=>{L.hasChanged(48)&&(this._unhookEvents(),this._hookEvents())}),this._hoverVisibleKey=C.EditorContextKeys.hoverVisible.bindTo(y)}static get(h){return h.getContribution(ei.ID)}_hookEvents(){const h=()=>this._hideWidgets(),m=this._editor.getOption(48);this._isHoverEnabled=m.enabled,this._isHoverSticky=m.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(_=>this._onEditorMouseDown(_))),this._toUnhook.add(this._editor.onMouseUp(_=>this._onEditorMouseUp(_))),this._toUnhook.add(this._editor.onMouseMove(_=>this._onEditorMouseMove(_))),this._toUnhook.add(this._editor.onKeyDown(_=>this._onKeyDown(_))),this._toUnhook.add(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged()))):(this._toUnhook.add(this._editor.onMouseMove(_=>this._onEditorMouseMove(_))),this._toUnhook.add(this._editor.onKeyDown(_=>this._onKeyDown(_)))),this._toUnhook.add(this._editor.onMouseLeave(h)),this._toUnhook.add(this._editor.onDidChangeModel(h)),this._toUnhook.add(this._editor.onDidScrollChange(_=>this._onEditorScrollChanged(_)))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var h,m;(h=this._contentWidget)===null||h===void 0||h.onModelDecorationsChanged(),(m=this._glyphWidget)===null||m===void 0||m.onModelDecorationsChanged()}_onEditorScrollChanged(h){(h.scrollTopChanged||h.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(h){this._isMouseDown=!0;const m=h.target.type;if(m===9&&h.target.detail===g.ModesContentHoverWidget.ID){this._hoverClicked=!0;return}m===12&&h.target.detail===p.ModesGlyphHoverWidget.ID||(m!==12&&h.target.detail!==p.ModesGlyphHoverWidget.ID&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(h){this._isMouseDown=!1}_onEditorMouseMove(h){var m,_,f,v,y,L;let I=h.target.type;if(!(this._isMouseDown&&this._hoverClicked)&&!(this._isHoverSticky&&I===9&&h.target.detail===g.ModesContentHoverWidget.ID)&&!(this._isHoverSticky&&!((_=(m=h.event.browserEvent.view)===null||m===void 0?void 0:m.getSelection())===null||_===void 0?void 0:_.isCollapsed))&&!(!this._isHoverSticky&&I===9&&h.target.detail===g.ModesContentHoverWidget.ID&&((f=this._contentWidget)===null||f===void 0?void 0:f.isColorPickerVisible()))&&!(this._isHoverSticky&&I===12&&h.target.detail===p.ModesGlyphHoverWidget.ID)){if(I===7){const k=this._editor.getOption(38).typicalHalfwidthCharacterWidth/2,E=h.target.detail;E&&!E.isAfterLines&&typeof E.horizontalDistanceToText=="number"&&E.horizontalDistanceToText<k&&(I=6)}if(I===6){if((v=this._glyphWidget)===null||v===void 0||v.hide(),this._isHoverEnabled&&h.target.range){const E=[...((y=h.target.element)===null||y===void 0?void 0:y.classList.values())||[]].find(T=>T.startsWith("ced-colorBox"))&&h.target.range.endColumn-h.target.range.startColumn==1?new S.Range(h.target.range.startLineNumber,h.target.range.startColumn+1,h.target.range.endLineNumber,h.target.range.endColumn+1):h.target.range;this._contentWidget||(this._contentWidget=new g.ModesContentHoverWidget(this._editor,this._hoverVisibleKey,this._instantiationService,this._themeService)),this._contentWidget.startShowingAt(E,0,!1)}}else I===2?((L=this._contentWidget)===null||L===void 0||L.hide(),this._isHoverEnabled&&h.target.position&&(this._glyphWidget||(this._glyphWidget=new p.ModesGlyphHoverWidget(this._editor,this._modeService,this._openerService)),this._glyphWidget.startShowingAt(h.target.position.lineNumber))):this._hideWidgets()}}_onKeyDown(h){h.keyCode!==5&&h.keyCode!==6&&h.keyCode!==57&&h.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var h,m,_;this._isMouseDown&&this._hoverClicked&&((h=this._contentWidget)===null||h===void 0?void 0:h.isColorPickerVisible())||(this._hoverClicked=!1,(m=this._glyphWidget)===null||m===void 0||m.hide(),(_=this._contentWidget)===null||_===void 0||_.hide())}isColorPickerVisible(){var h;return((h=this._contentWidget)===null||h===void 0?void 0:h.isColorPickerVisible())||!1}showContentHover(h,m,_){this._contentWidget||(this._contentWidget=new g.ModesContentHoverWidget(this._editor,this._hoverVisibleKey,this._instantiationService,this._themeService)),this._contentWidget.startShowingAt(h,m,_)}dispose(){var h,m;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(h=this._glyphWidget)===null||h===void 0||h.dispose(),(m=this._contentWidget)===null||m===void 0||m.dispose()}};i.ID="editor.contrib.hover",i=Me([_e(1,r.IInstantiationService),_e(2,c.IOpenerService),_e(3,d.IModeService),_e(4,s.IThemeService),_e(5,u.IContextKeyService)],i),e.ModesHoverController=i;class n extends w.EditorAction{constructor(){super({id:"editor.action.showHover",label:b.localize(0,null),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:N.KeyChord(2048|41,2048|39),weight:100}})}run(h,m){if(!!m.hasModel()){let _=i.get(m);if(!!_){const f=m.getPosition(),v=new S.Range(f.lineNumber,f.column,f.lineNumber,f.column),y=m.getOption(2)===2;_.showContentHover(v,1,y)}}}}class t extends w.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:b.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(h,m){let _=i.get(m);if(!!_){const f=m.getPosition();if(!!f){const v=new S.Range(f.lineNumber,f.column,f.lineNumber,f.column),L=a.GotoDefinitionAtPositionEditorContribution.get(m).startFindDefinitionFromCursor(f);L?L.then(()=>{_.showContentHover(v,1,!0)}):_.showContentHover(v,1,!0)}}}}w.registerEditorContribution(i.ID,i),w.registerEditorAction(n),w.registerEditorAction(t),s.registerThemingParticipant((l,h)=>{const m=l.getColor(o.editorHoverHighlight);m&&h.addRule(`.monaco-editor .hoverHighlight { background-color: ${m}; }`);const _=l.getColor(o.editorHoverBackground);_&&h.addRule(`.monaco-editor .monaco-hover { background-color: ${_}; }`);const f=l.getColor(o.editorHoverBorder);f&&(h.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${f}; }`),h.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${f.transparent(.5)}; }`),h.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${f.transparent(.5)}; }`),h.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${f.transparent(.5)}; }`));const v=l.getColor(o.textLinkForeground);v&&h.addRule(`.monaco-editor .monaco-hover a { color: ${v}; }`);const y=l.getColor(o.editorHoverForeground);y&&h.addRule(`.monaco-editor .monaco-hover { color: ${y}; }`);const L=l.getColor(o.editorHoverStatusBarBackground);L&&h.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${L}; }`);const I=l.getColor(o.textCodeBlockBackground);I&&h.addRule(`.monaco-editor .monaco-hover code { background-color: ${I}; }`)})}),define(Q[670],J([0,1,2,13,273,3,260]),function(q,e,b,N,M,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class S extends b.Disposable{constructor(d){super();this._editor=d,this._register(d.onMouseDown(g=>this.onMouseDown(g)))}dispose(){super.dispose()}onMouseDown(d){var g;if(d.target.type===6&&!![...((g=d.target.element)===null||g===void 0?void 0:g.classList.values())||[]].find(s=>s.startsWith("ced-colorBox"))&&!!d.target.range){const o=this._editor.getContribution(M.ModesHoverController.ID);if(!o.isColorPickerVisible()){const s=new w.Range(d.target.range.startLineNumber,d.target.range.startColumn+1,d.target.range.endLineNumber,d.target.range.endColumn+1);o.showContentHover(s,0,!1)}}}}e.ColorContribution=S,S.ID="editor.contrib.colorContribution",N.registerEditorContribution(S.ID,S)}),define(Q[671],J([0,1,15,2,13,18,36,253,11,46,269,247]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let o=class extends N.Disposable{constructor(a,u,r,i){super();this._modelService=u,this._themeService=r,this._configurationService=i,this._editor=a,this._tokenizeViewport=new b.RunOnceScheduler(()=>this._tokenizeViewportNow(),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange(()=>{this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModelContent(n=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(w.DocumentRangeSemanticTokensProviderRegistry.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(p.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),this._tokenizeViewport.schedule())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))}_cancelAll(){for(const a of this._outstandingRequests)a.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(a){for(let u=0,r=this._outstandingRequests.length;u<r;u++)if(this._outstandingRequests[u]===a){this._outstandingRequests.splice(u,1);return}}_tokenizeViewportNow(){if(!!this._editor.hasModel()){const a=this._editor.getModel();if(!a.hasCompleteSemanticTokens()){if(!p.isSemanticColoringEnabled(a,this._themeService,this._configurationService)){a.hasSomeSemanticTokens()&&a.setSemanticTokens(null,!1);return}const u=c.getDocumentRangeSemanticTokensProvider(a);if(!u){a.hasSomeSemanticTokens()&&a.setSemanticTokens(null,!1);return}const r=this._modelService.getSemanticTokensProviderStyling(u),i=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(i.map(n=>this._requestRange(a,n,u,r)))}}}_requestRange(a,u,r,i){const n=a.getVersionId(),t=b.createCancelablePromise(l=>Promise.resolve(r.provideDocumentRangeSemanticTokens(a,u,l)));return t.then(l=>{!l||a.isDisposed()||a.getVersionId()!==n||a.setPartialSemanticTokens(u,C.toMultilineTokens2(l,i,a.getLanguageIdentifier()))}).then(()=>this._removeOutstandingRequest(t),()=>this._removeOutstandingRequest(t)),t}};o.ID="editor.contrib.viewportSemanticTokens",o=Me([_e(1,S.IModelService),_e(2,d.IThemeService),_e(3,g.IConfigurationService)],o),M.registerEditorContribution(o.ID,o)}),define(Q[672],J([0,1,13,28,270,46,16,9,32,79]),function(q,e,b,N,M,w,S,C,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let p=class extends M.ReferencesController{constructor(o,s,a,u,r,i,n){super(!0,o,s,a,u,r,i,n)}};p=Me([_e(1,S.IContextKeyService),_e(2,N.ICodeEditorService),_e(3,d.INotificationService),_e(4,C.IInstantiationService),_e(5,g.IStorageService),_e(6,w.IConfigurationService)],p),e.StandaloneReferencesController=p,b.registerEditorContribution(M.ReferencesController.ID,p)}),define(Q[673],J([0,1,529,148,12,74,184,82,43,32,2]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const c=!1;function o(_){return _.scheme===d.Schemas.file?_.fsPath:_.path}let s=0;class a{constructor(f,v,y,L,I,k,E){this.id=++s,this.type=0,this.actual=f,this.label=f.label,this.confirmBeforeUndo=f.confirmBeforeUndo||!1,this.resourceLabel=v,this.strResource=y,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=L,this.groupOrder=I,this.sourceId=k,this.sourceOrder=E,this.isValid=!0}setValid(f){this.isValid=f}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class u{constructor(f,v){this.resourceLabel=f,this.reason=v}}class r{constructor(){this.elements=new Map}createMessage(){const f=[],v=[];for(const[,L]of this.elements)(L.reason===0?f:v).push(L.resourceLabel);let y=[];return f.length>0&&y.push(b.localize(0,null,f.join(", "))),v.length>0&&y.push(b.localize(1,null,v.join(", "))),y.join(`
`)}get size(){return this.elements.size}has(f){return this.elements.has(f)}set(f,v){this.elements.set(f,v)}delete(f){return this.elements.delete(f)}}class i{constructor(f,v,y,L,I,k,E){this.id=++s,this.type=1,this.actual=f,this.label=f.label,this.confirmBeforeUndo=f.confirmBeforeUndo||!1,this.resourceLabels=v,this.strResources=y,this.groupId=L,this.groupOrder=I,this.sourceId=k,this.sourceOrder=E,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(f,v,y){this.removedResources||(this.removedResources=new r),this.removedResources.has(v)||this.removedResources.set(v,new u(f,y))}setValid(f,v,y){y?this.invalidatedResources&&(this.invalidatedResources.delete(v),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new r),this.invalidatedResources.has(v)||this.invalidatedResources.set(v,new u(f,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class n{constructor(f,v){this.resourceLabel=f,this.strResource=v,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const f of this._past)f.type===1&&f.removeResource(this.resourceLabel,this.strResource,0);for(const f of this._future)f.type===1&&f.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let f=[];f.push(`* ${this.strResource}:`);for(let v=0;v<this._past.length;v++)f.push(` * [UNDO] ${this._past[v]}`);for(let v=this._future.length-1;v>=0;v--)f.push(` * [REDO] ${this._future[v]}`);return f.join(`
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(f,v){f.type===1?f.setValid(this.resourceLabel,this.strResource,v):f.setValid(v)}setElementsValidFlag(f,v){for(const y of this._past)v(y.actual)&&this._setElementValidFlag(y,f);for(const y of this._future)v(y.actual)&&this._setElementValidFlag(y,f)}pushElement(f){for(const v of this._future)v.type===1&&v.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(f),this.versionId++}createSnapshot(f){const v=[];for(let y=0,L=this._past.length;y<L;y++)v.push(this._past[y].id);for(let y=this._future.length-1;y>=0;y--)v.push(this._future[y].id);return new N.ResourceEditStackSnapshot(f,v)}restoreSnapshot(f){const v=f.elements.length;let y=!0,L=0,I=-1;for(let E=0,T=this._past.length;E<T;E++,L++){const O=this._past[E];y&&(L>=v||O.id!==f.elements[L])&&(y=!1,I=0),!y&&O.type===1&&O.removeResource(this.resourceLabel,this.strResource,0)}let k=-1;for(let E=this._future.length-1;E>=0;E--,L++){const T=this._future[E];y&&(L>=v||T.id!==f.elements[L])&&(y=!1,k=E),!y&&T.type===1&&T.removeResource(this.resourceLabel,this.strResource,0)}I!==-1&&(this._past=this._past.slice(0,I)),k!==-1&&(this._future=this._future.slice(k+1)),this.versionId++}getElements(){const f=[],v=[];for(const y of this._past)f.push(y.actual);for(const y of this._future)v.push(y.actual);return{past:f,future:v}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(f,v){for(let y=this._past.length-1;y>=0;y--)if(this._past[y]===f){v.has(this.strResource)?this._past[y]=v.get(this.strResource):this._past.splice(y,1);break}this.versionId++}splitFutureWorkspaceElement(f,v){for(let y=this._future.length-1;y>=0;y--)if(this._future[y]===f){v.has(this.strResource)?this._future[y]=v.get(this.strResource):this._future.splice(y,1);break}this.versionId++}moveBackward(f){this._past.pop(),this._future.push(f),this.versionId++}moveForward(f){this._future.pop(),this._past.push(f),this.versionId++}}class t{constructor(f){this.editStacks=f,this._versionIds=[];for(let v=0,y=this.editStacks.length;v<y;v++)this._versionIds[v]=this.editStacks[v].versionId}isValid(){for(let f=0,v=this.editStacks.length;f<v;f++)if(this._versionIds[f]!==this.editStacks[f].versionId)return!1;return!0}}const l=new n("","");l.locked=!0;let h=class{constructor(f,v){this._dialogService=f,this._notificationService=v,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(f){for(const v of this._uriComparisonKeyComputers)if(v[0]===f.scheme)return v[1].getComparisonKey(f);return f.toString()}_print(f){console.log("------------------------------------"),console.log(`AFTER ${f}: `);let v=[];for(const y of this._editStacks)v.push(y[1].toString());console.log(v.join(`
`))}pushElement(f,v=N.UndoRedoGroup.None,y=N.UndoRedoSource.None){if(f.type===0){const L=o(f.resource),I=this.getUriComparisonKey(f.resource);this._pushElement(new a(f,L,I,v.id,v.nextOrder(),y.id,y.nextOrder()))}else{const L=new Set,I=[],k=[];for(const E of f.resources){const T=o(E),O=this.getUriComparisonKey(E);L.has(O)||(L.add(O),I.push(T),k.push(O))}I.length===1?this._pushElement(new a(f,I[0],k[0],v.id,v.nextOrder(),y.id,y.nextOrder())):this._pushElement(new i(f,I,k,v.id,v.nextOrder(),y.id,y.nextOrder()))}c&&this._print("pushElement")}_pushElement(f){for(let v=0,y=f.strResources.length;v<y;v++){const L=f.resourceLabels[v],I=f.strResources[v];let k;this._editStacks.has(I)?k=this._editStacks.get(I):(k=new n(L,I),this._editStacks.set(I,k)),k.pushElement(f)}}getLastElement(f){const v=this.getUriComparisonKey(f);if(this._editStacks.has(v)){const y=this._editStacks.get(v);if(y.hasFutureElements())return null;const L=y.getClosestPastElement();return L?L.actual:null}return null}_splitPastWorkspaceElement(f,v){const y=f.actual.split(),L=new Map;for(const I of y){const k=o(I.resource),E=this.getUriComparisonKey(I.resource),T=new a(I,k,E,0,0,0,0);L.set(T.strResource,T)}for(const I of f.strResources)v&&v.has(I)||this._editStacks.get(I).splitPastWorkspaceElement(f,L)}_splitFutureWorkspaceElement(f,v){const y=f.actual.split(),L=new Map;for(const I of y){const k=o(I.resource),E=this.getUriComparisonKey(I.resource),T=new a(I,k,E,0,0,0,0);L.set(T.strResource,T)}for(const I of f.strResources)v&&v.has(I)||this._editStacks.get(I).splitFutureWorkspaceElement(f,L)}removeElements(f){const v=typeof f=="string"?f:this.getUriComparisonKey(f);this._editStacks.has(v)&&(this._editStacks.get(v).dispose(),this._editStacks.delete(v)),c&&this._print("removeElements")}setElementsValidFlag(f,v,y){const L=this.getUriComparisonKey(f);this._editStacks.has(L)&&this._editStacks.get(L).setElementsValidFlag(v,y),c&&this._print("setElementsValidFlag")}createSnapshot(f){const v=this.getUriComparisonKey(f);return this._editStacks.has(v)?this._editStacks.get(v).createSnapshot(f):new N.ResourceEditStackSnapshot(f,[])}restoreSnapshot(f){const v=this.getUriComparisonKey(f.resource);if(this._editStacks.has(v)){const y=this._editStacks.get(v);y.restoreSnapshot(f),!y.hasPastElements()&&!y.hasFutureElements()&&(y.dispose(),this._editStacks.delete(v))}c&&this._print("restoreSnapshot")}getElements(f){const v=this.getUriComparisonKey(f);return this._editStacks.has(v)?this._editStacks.get(v).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(f){if(!f)return[null,null];let v=null,y=null;for(const[L,I]of this._editStacks){const k=I.getClosestPastElement();!k||k.sourceId===f&&(!v||k.sourceOrder>v.sourceOrder)&&(v=k,y=L)}return[v,y]}canUndo(f){if(f instanceof N.UndoRedoSource){const[,y]=this._findClosestUndoElementWithSource(f.id);return!!y}const v=this.getUriComparisonKey(f);return this._editStacks.has(v)?this._editStacks.get(v).hasPastElements():!1}_onError(f,v){M.onUnexpectedError(f);for(const y of v.strResources)this.removeElements(y);this._notificationService.error(f)}_acquireLocks(f){for(const v of f.editStacks)if(v.locked)throw new Error("Cannot acquire edit stack lock");for(const v of f.editStacks)v.locked=!0;return()=>{for(const v of f.editStacks)v.locked=!1}}_safeInvokeWithLocks(f,v,y,L,I){const k=this._acquireLocks(y);let E;try{E=v()}catch(T){return k(),L.dispose(),this._onError(T,f)}return E?E.then(()=>(k(),L.dispose(),I()),T=>(k(),L.dispose(),this._onError(T,f))):(k(),L.dispose(),I())}_invokeWorkspacePrepare(f){return Ie(this,void 0,void 0,function*(){if(typeof f.actual.prepareUndoRedo=="undefined")return p.Disposable.None;const v=f.actual.prepareUndoRedo();return typeof v=="undefined"?p.Disposable.None:v})}_invokeResourcePrepare(f,v){if(f.actual.type!==1||typeof f.actual.prepareUndoRedo=="undefined")return v(p.Disposable.None);const y=f.actual.prepareUndoRedo();return y?p.isDisposable(y)?v(y):y.then(L=>v(L)):v(p.Disposable.None)}_getAffectedEditStacks(f){const v=[];for(const y of f.strResources)v.push(this._editStacks.get(y)||l);return new t(v)}_tryToSplitAndUndo(f,v,y,L){if(v.canSplit())return this._splitPastWorkspaceElement(v,y),this._notificationService.info(L),new m(this._undo(f,0,!0));for(const I of v.strResources)this.removeElements(I);return this._notificationService.info(L),new m}_checkWorkspaceUndo(f,v,y,L){if(v.removedResources)return this._tryToSplitAndUndo(f,v,v.removedResources,b.localize(2,null,v.label,v.removedResources.createMessage()));if(L&&v.invalidatedResources)return this._tryToSplitAndUndo(f,v,v.invalidatedResources,b.localize(3,null,v.label,v.invalidatedResources.createMessage()));const I=[];for(const E of y.editStacks)E.getClosestPastElement()!==v&&I.push(E.resourceLabel);if(I.length>0)return this._tryToSplitAndUndo(f,v,null,b.localize(4,null,v.label,I.join(", ")));const k=[];for(const E of y.editStacks)E.locked&&k.push(E.resourceLabel);return k.length>0?this._tryToSplitAndUndo(f,v,null,b.localize(5,null,v.label,k.join(", "))):y.isValid()?null:this._tryToSplitAndUndo(f,v,null,b.localize(6,null,v.label))}_workspaceUndo(f,v,y){const L=this._getAffectedEditStacks(v),I=this._checkWorkspaceUndo(f,v,L,!1);return I?I.returnValue:this._confirmAndExecuteWorkspaceUndo(f,v,L,y)}_isPartOfUndoGroup(f){if(!f.groupId)return!1;for(const[,v]of this._editStacks){const y=v.getClosestPastElement();if(!!y){if(y===f){const L=v.getSecondClosestPastElement();if(L&&L.groupId===f.groupId)return!0}if(y.groupId===f.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(f,v,y,L){return Ie(this,void 0,void 0,function*(){if(v.canSplit()&&!this._isPartOfUndoGroup(v)){const E=yield this._dialogService.show(C.default.Info,b.localize(7,null,v.label),[b.localize(8,null,y.editStacks.length),b.localize(9,null),b.localize(10,null)],{cancelId:2});if(E.choice===2)return;if(E.choice===1)return this._splitPastWorkspaceElement(v,null),this._undo(f,0,!0);const T=this._checkWorkspaceUndo(f,v,y,!1);if(T)return T.returnValue;L=!0}let I;try{I=yield this._invokeWorkspacePrepare(v)}catch(E){return this._onError(E,v)}const k=this._checkWorkspaceUndo(f,v,y,!0);if(k)return I.dispose(),k.returnValue;for(const E of y.editStacks)E.moveBackward(v);return this._safeInvokeWithLocks(v,()=>v.actual.undo(),y,I,()=>this._continueUndoInGroup(v.groupId,L))})}_resourceUndo(f,v,y){if(!v.isValid){f.flushAllElements();return}if(f.locked){const L=b.localize(11,null,v.label);this._notificationService.info(L);return}return this._invokeResourcePrepare(v,L=>(f.moveBackward(v),this._safeInvokeWithLocks(v,()=>v.actual.undo(),new t([f]),L,()=>this._continueUndoInGroup(v.groupId,y))))}_findClosestUndoElementInGroup(f){if(!f)return[null,null];let v=null,y=null;for(const[L,I]of this._editStacks){const k=I.getClosestPastElement();!k||k.groupId===f&&(!v||k.groupOrder>v.groupOrder)&&(v=k,y=L)}return[v,y]}_continueUndoInGroup(f,v){if(!!f){const[,y]=this._findClosestUndoElementInGroup(f);if(y)return this._undo(y,0,v)}}undo(f){if(f instanceof N.UndoRedoSource){const[,v]=this._findClosestUndoElementWithSource(f.id);return v?this._undo(v,f.id,!1):void 0}return typeof f=="string"?this._undo(f,0,!1):this._undo(this.getUriComparisonKey(f),0,!1)}_undo(f,v=0,y){if(!!this._editStacks.has(f)){const L=this._editStacks.get(f),I=L.getClosestPastElement();if(!!I){if(I.groupId){const[E,T]=this._findClosestUndoElementInGroup(I.groupId);if(I!==E&&T)return this._undo(T,v,y)}if((I.sourceId!==v||I.confirmBeforeUndo)&&!y)return this._confirmAndContinueUndo(f,v,I);try{return I.type===1?this._workspaceUndo(f,I,y):this._resourceUndo(L,I,y)}finally{c&&this._print("undo")}}}}_confirmAndContinueUndo(f,v,y){return Ie(this,void 0,void 0,function*(){if((yield this._dialogService.show(C.default.Info,b.localize(12,null,y.label),[b.localize(13,null),b.localize(14,null)],{cancelId:1})).choice!==1)return this._undo(f,v,!0)})}_findClosestRedoElementWithSource(f){if(!f)return[null,null];let v=null,y=null;for(const[L,I]of this._editStacks){const k=I.getClosestFutureElement();!k||k.sourceId===f&&(!v||k.sourceOrder<v.sourceOrder)&&(v=k,y=L)}return[v,y]}canRedo(f){if(f instanceof N.UndoRedoSource){const[,y]=this._findClosestRedoElementWithSource(f.id);return!!y}const v=this.getUriComparisonKey(f);return this._editStacks.has(v)?this._editStacks.get(v).hasFutureElements():!1}_tryToSplitAndRedo(f,v,y,L){if(v.canSplit())return this._splitFutureWorkspaceElement(v,y),this._notificationService.info(L),new m(this._redo(f));for(const I of v.strResources)this.removeElements(I);return this._notificationService.info(L),new m}_checkWorkspaceRedo(f,v,y,L){if(v.removedResources)return this._tryToSplitAndRedo(f,v,v.removedResources,b.localize(15,null,v.label,v.removedResources.createMessage()));if(L&&v.invalidatedResources)return this._tryToSplitAndRedo(f,v,v.invalidatedResources,b.localize(16,null,v.label,v.invalidatedResources.createMessage()));const I=[];for(const E of y.editStacks)E.getClosestFutureElement()!==v&&I.push(E.resourceLabel);if(I.length>0)return this._tryToSplitAndRedo(f,v,null,b.localize(17,null,v.label,I.join(", ")));const k=[];for(const E of y.editStacks)E.locked&&k.push(E.resourceLabel);return k.length>0?this._tryToSplitAndRedo(f,v,null,b.localize(18,null,v.label,k.join(", "))):y.isValid()?null:this._tryToSplitAndRedo(f,v,null,b.localize(19,null,v.label))}_workspaceRedo(f,v){const y=this._getAffectedEditStacks(v),L=this._checkWorkspaceRedo(f,v,y,!1);return L?L.returnValue:this._executeWorkspaceRedo(f,v,y)}_executeWorkspaceRedo(f,v,y){return Ie(this,void 0,void 0,function*(){let L;try{L=yield this._invokeWorkspacePrepare(v)}catch(k){return this._onError(k,v)}const I=this._checkWorkspaceRedo(f,v,y,!0);if(I)return L.dispose(),I.returnValue;for(const k of y.editStacks)k.moveForward(v);return this._safeInvokeWithLocks(v,()=>v.actual.redo(),y,L,()=>this._continueRedoInGroup(v.groupId))})}_resourceRedo(f,v){if(!v.isValid){f.flushAllElements();return}if(f.locked){const y=b.localize(20,null,v.label);this._notificationService.info(y);return}return this._invokeResourcePrepare(v,y=>(f.moveForward(v),this._safeInvokeWithLocks(v,()=>v.actual.redo(),new t([f]),y,()=>this._continueRedoInGroup(v.groupId))))}_findClosestRedoElementInGroup(f){if(!f)return[null,null];let v=null,y=null;for(const[L,I]of this._editStacks){const k=I.getClosestFutureElement();!k||k.groupId===f&&(!v||k.groupOrder<v.groupOrder)&&(v=k,y=L)}return[v,y]}_continueRedoInGroup(f){if(!!f){const[,v]=this._findClosestRedoElementInGroup(f);if(v)return this._redo(v)}}redo(f){if(f instanceof N.UndoRedoSource){const[,v]=this._findClosestRedoElementWithSource(f.id);return v?this._redo(v):void 0}return typeof f=="string"?this._redo(f):this._redo(this.getUriComparisonKey(f))}_redo(f){if(!!this._editStacks.has(f)){const v=this._editStacks.get(f),y=v.getClosestFutureElement();if(!!y){if(y.groupId){const[L,I]=this._findClosestRedoElementInGroup(y.groupId);if(y!==L&&I)return this._redo(I)}try{return y.type===1?this._workspaceRedo(f,y):this._resourceRedo(v,y)}finally{c&&this._print("redo")}}}}};h=Me([_e(0,S.IDialogService),_e(1,g.INotificationService)],h),e.UndoRedoService=h;class m{constructor(f){this.returnValue=f}}w.registerSingleton(N.IUndoRedoService,h)}),define(Q[190],J([0,1,9,51]),function(q,e,b,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceFolder=e.Workspace=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=b.createDecorator("contextService");class M{constructor(C,d,g,p){this._id=C,this._configuration=g,this._ignorePathCasing=p,this._foldersMap=N.TernarySearchTree.forUris(this._ignorePathCasing),this.folders=d}get folders(){return this._folders}set folders(C){this._folders=C,this.updateFoldersMap()}get id(){return this._id}get configuration(){return this._configuration}set configuration(C){this._configuration=C}getFolder(C){return C&&this._foldersMap.findSubstr(C.with({scheme:C.scheme,authority:C.authority,path:C.path}))||null}updateFoldersMap(){this._foldersMap=N.TernarySearchTree.forUris(this._ignorePathCasing);for(const C of this.folders)this._foldersMap.set(C.uri,C)}toJSON(){return{id:this.id,folders:this.folders,configuration:this.configuration}}}e.Workspace=M;class w{constructor(C,d){this.raw=d,this.uri=C.uri,this.index=C.index,this.name=C.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=w}),define(Q[191],J([0,1,8,7,56,6,39,2,17,82,24,108,133,186,62,14,3,36,26,46,569,551,251,86,553,554,32,190,64]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleLayoutService=e.SimpleUriLabelService=e.SimpleBulkEditService=e.updateConfigurationService=e.SimpleWorkspaceContextService=e.StandaloneTelemetryService=e.SimpleResourcePropertiesService=e.SimpleResourceConfigurationService=e.SimpleConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.SimpleNotificationService=e.SimpleDialogService=e.SimpleEditorProgressService=e.SimpleEditorModelResolverService=e.SimpleModel=void 0;class k{constructor(P){this.disposed=!1,this.model=P,this._onDispose=new w.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onDispose.fire()}}e.SimpleModel=k;function E(z,P,V){return c.isCodeEditor(z)?P(z):V(z)}let T=class{constructor(P){this.modelService=P}setEditor(P){this.editor=P}createModelReference(P){let V=null;return this.editor&&(V=E(this.editor,U=>this.findModel(U,P),U=>this.findModel(U.getOriginalEditor(),P)||this.findModel(U.getModifiedEditor(),P))),V?Promise.resolve(new C.ImmortalReference(new k(V))):Promise.reject(new Error("Model not found"))}findModel(P,V){let U=this.modelService.getModel(V);return U&&U.uri.toString()!==V.toString()?null:U}};T=Me([_e(0,i.IModelService)],T),e.SimpleEditorModelResolverService=T;class O{show(){return O.NULL_PROGRESS_RUNNER}showWhile(P,V){return Ie(this,void 0,void 0,function*(){yield P})}}e.SimpleEditorProgressService=O,O.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class A{confirm(P){return this.doConfirm(P).then(V=>({confirmed:V,checkboxChecked:!1}))}doConfirm(P){let V=P.message;return P.detail&&(V=V+`
`+P.detail),Promise.resolve(window.confirm(V))}show(P,V,U,H){return Promise.resolve({choice:0})}}e.SimpleDialogService=A;class B{info(P){return this.notify({severity:g.default.Info,message:P})}warn(P){return this.notify({severity:g.default.Warning,message:P})}error(P){return this.notify({severity:g.default.Error,message:P})}notify(P){switch(P.severity){case g.default.Error:console.error(P.message);break;case g.default.Warning:console.warn(P.message);break;default:console.log(P.message);break}return B.NO_OP}status(P,V){return C.Disposable.None}}e.SimpleNotificationService=B,B.NO_OP=new y.NoOpNotification;class F{constructor(P){this._onWillExecuteCommand=new w.Emitter,this._onDidExecuteCommand=new w.Emitter,this._instantiationService=P}executeCommand(P,...V){const U=n.CommandsRegistry.getCommand(P);if(!U)return Promise.reject(new Error(`command '${P}' not found`));try{this._onWillExecuteCommand.fire({commandId:P,args:V});const H=this._instantiationService.invokeFunction.apply(this._instantiationService,[U.handler,...V]);return this._onDidExecuteCommand.fire({commandId:P,args:V}),Promise.resolve(H)}catch(H){return Promise.reject(H)}}}e.StandaloneCommandService=F;class D extends h.AbstractKeybindingService{constructor(P,V,U,H,$,ie){super(P,V,U,H,$);this._cachedResolver=null,this._dynamicKeybindings=[],this._register(N.addDisposableListener(ie,N.EventType.KEY_DOWN,oe=>{const ae=new M.StandardKeyboardEvent(oe);this._dispatch(ae,ae.target)&&(ae.preventDefault(),ae.stopPropagation())})),this._register(N.addDisposableListener(window,N.EventType.KEY_UP,oe=>{const ae=new M.StandardKeyboardEvent(oe);this._singleModifierDispatch(ae,ae.target)&&ae.preventDefault()}))}addDynamicKeybinding(P,V,U,H){const $=S.createKeybinding(V,d.OS),ie=new C.DisposableStore;return $&&(this._dynamicKeybindings.push({keybinding:$,command:P,when:H,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),ie.add(C.toDisposable(()=>{for(let oe=0;oe<this._dynamicKeybindings.length;oe++)if(this._dynamicKeybindings[oe].command===P){this._dynamicKeybindings.splice(oe,1),this.updateResolver({source:1});return}}))),ie.add(n.CommandsRegistry.registerCommand(P,U)),this.updateResolver({source:1}),ie}updateResolver(P){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(P)}_getResolver(){if(!this._cachedResolver){const P=this._toNormalizedKeybindingItems(_.KeybindingsRegistry.getDefaultKeybindings(),!0),V=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new m.KeybindingResolver(P,V,U=>this._log(U))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(P,V){let U=[],H=0;for(const $ of P){const ie=$.when||void 0,oe=$.keybinding;if(!oe)U[H++]=new f.ResolvedKeybindingItem(void 0,$.command,$.commandArgs,ie,V,null,!1);else{const ae=this.resolveKeybinding(oe);for(const G of ae)U[H++]=new f.ResolvedKeybindingItem(G,$.command,$.commandArgs,ie,V,null,!1)}}return U}resolveKeybinding(P){return[new v.USLayoutResolvedKeybinding(P,d.OS)]}resolveKeyboardEvent(P){let V=new S.SimpleKeybinding(P.ctrlKey,P.shiftKey,P.altKey,P.metaKey,P.keyCode).toChord();return new v.USLayoutResolvedKeybinding(V,d.OS)}}e.StandaloneKeybindingService=D;function R(z){return z&&typeof z=="object"&&(!z.overrideIdentifier||typeof z.overrideIdentifier=="string")&&(!z.resource||z.resource instanceof p.URI)}class W{constructor(){this._onDidChangeConfiguration=new w.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new l.Configuration(new l.DefaultConfigurationModel,new l.ConfigurationModel)}getValue(P,V){const U=typeof P=="string"?P:void 0,H=R(P)?P:R(V)?V:{};return this._configuration.getValue(U,H,void 0)}updateValues(P){const V={data:this._configuration.toData()};let U=[];for(const H of P){const[$,ie]=H;this.getValue($)!==ie&&(this._configuration.updateValue($,ie),U.push($))}if(U.length>0){const H=new l.ConfigurationChangeEvent({keys:U,overrides:[]},V,this._configuration);H.source=7,H.sourceConfig=null,this._onDidChangeConfiguration.fire(H)}return Promise.resolve()}}e.SimpleConfigurationService=W;class x{constructor(P){this.configurationService=P,this._onDidChangeConfiguration=new w.Emitter,this.configurationService.onDidChangeConfiguration(V=>{this._onDidChangeConfiguration.fire({affectedKeys:V.affectedKeys,affectsConfiguration:(U,H)=>V.affectsConfiguration(H)})})}getValue(P,V,U){const $=(u.Position.isIPosition(V)?V:null)?typeof U=="string"?U:void 0:typeof V=="string"?V:void 0;return typeof $=="undefined"?this.configurationService.getValue():this.configurationService.getValue($)}}e.SimpleResourceConfigurationService=x;let K=class{constructor(P){this.configurationService=P}getEOL(P,V){const U=this.configurationService.getValue("files.eol",{overrideIdentifier:V,resource:P});return U&&U!=="auto"?U:d.isLinux||d.isMacintosh?`
`:`\r
`}};K=Me([_e(0,t.IConfigurationService)],K),e.SimpleResourcePropertiesService=K;class Y{publicLog(P,V){return Promise.resolve(void 0)}publicLog2(P,V){return this.publicLog(P,V)}}e.StandaloneTelemetryService=Y;class ee{constructor(){const P=p.URI.from({scheme:ee.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new L.WorkspaceFolder({uri:P,name:"",index:0})]}}getWorkspace(){return this.workspace}}e.SimpleWorkspaceContextService=ee,ee.SCHEME="inmemory";function se(z,P,V){if(!!P&&z instanceof W){let U=[];Object.keys(P).forEach(H=>{s.isEditorConfigurationKey(H)&&U.push([`editor.${H}`,P[H]]),V&&s.isDiffEditorConfigurationKey(H)&&U.push([`diffEditor.${H}`,P[H]])}),U.length>0&&z.updateValues(U)}}e.updateConfigurationService=se;class ne{constructor(P){this._modelService=P}hasPreviewHandler(){return!1}apply(P,V){return Ie(this,void 0,void 0,function*(){const U=new Map;for(let ie of P){if(!(ie instanceof o.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const oe=this._modelService.getModel(ie.resource);if(!oe)throw new Error("bad edit - model not found");if(typeof ie.versionId=="number"&&oe.getVersionId()!==ie.versionId)throw new Error("bad state - model changed in the meantime");let ae=U.get(oe);ae||(ae=[],U.set(oe,ae)),ae.push(a.EditOperation.replaceMove(r.Range.lift(ie.textEdit.range),ie.textEdit.text))}let H=0,$=0;for(const[ie,oe]of U)ie.pushStackElement(),ie.pushEditOperations([],oe,()=>[]),ie.pushStackElement(),$+=1,H+=oe.length;return{ariaSummary:b.format(I.SimpleServicesNLS.bulkEditServiceSummary,H,$)}})}}e.SimpleBulkEditService=ne;class le{getUriLabel(P,V){return P.scheme==="file"?P.fsPath:P.path}}e.SimpleUriLabelService=le;class X{constructor(P,V){this._codeEditorService=P,this._container=V,this.onDidLayout=w.Event.None}get dimension(){return this._dimension||(this._dimension=N.getClientArea(window.document.body)),this._dimension}get container(){return this._container}focus(){var P;(P=this._codeEditorService.getFocusedCodeEditor())===null||P===void 0||P.focus()}}e.SimpleLayoutService=X}),define(Q[674],J([0,1,47,2,28,143,266,217,75,191,114,34,26,46,16,68,9,37,32,11,65,64,84,59,36,57]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTextModel=e.StandaloneDiffEditor=e.StandaloneEditor=e.StandaloneCodeEditor=void 0;let y=0,L=!1;function I(){L||(L=!0,b.setARIAContainer(document.body))}let k=class extends w.CodeEditorWidget{constructor(F,D,R,W,x,K,Y,ee,se,ne){const le=Object.assign({},D);le.ariaLabel=le.ariaLabel||h.StandaloneCodeEditorNLS.editorViewAccessibleLabel,le.ariaLabel=le.ariaLabel+";"+h.StandaloneCodeEditorNLS.accessibilityHelpMessage,super(F,le,{},R,W,x,K,ee,se,ne),Y instanceof g.StandaloneKeybindingService?this._standaloneKeybindingService=Y:this._standaloneKeybindingService=null,I()}addCommand(F,D,R){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let W="DYNAMIC_"+ ++y,x=a.ContextKeyExpr.deserialize(R);return this._standaloneKeybindingService.addDynamicKeybinding(W,F,D,x),W}createContextKey(F,D){return this._contextKeyService.createKey(F,D)}addAction(F){if(typeof F.id!="string"||typeof F.label!="string"||typeof F.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),N.Disposable.None;const D=F.id,R=F.label,W=a.ContextKeyExpr.and(a.ContextKeyExpr.equals("editorId",this.getId()),a.ContextKeyExpr.deserialize(F.precondition)),x=F.keybindings,K=a.ContextKeyExpr.and(W,a.ContextKeyExpr.deserialize(F.keybindingContext)),Y=F.contextMenuGroupId||null,ee=F.contextMenuOrder||0,se=(z,...P)=>Promise.resolve(F.run(this,...P)),ne=new N.DisposableStore,le=this.getId()+":"+D;if(ne.add(o.CommandsRegistry.registerCommand(le,se)),Y){let z={command:{id:le,title:R},when:W,group:Y,order:ee};ne.add(c.MenuRegistry.appendMenuItem(c.MenuId.EditorContext,z))}if(Array.isArray(x))for(const z of x)ne.add(this._standaloneKeybindingService.addDynamicKeybinding(le,z,se,K));let X=new C.InternalEditorAction(le,R,R,W,se,this._contextKeyService);return this._actions[D]=X,ne.add(N.toDisposable(()=>{delete this._actions[D]})),ne}};k=Me([_e(2,r.IInstantiationService),_e(3,M.ICodeEditorService),_e(4,o.ICommandService),_e(5,a.IContextKeyService),_e(6,i.IKeybindingService),_e(7,t.IThemeService),_e(8,n.INotificationService),_e(9,l.IAccessibilityService)],k),e.StandaloneCodeEditor=k;let E=class extends k{constructor(F,D,R,W,x,K,Y,ee,se,ne,le,X,z,P,V){const U=Object.assign({},D);g.updateConfigurationService(X,U,!1);const H=ne.registerEditorContainer(F);typeof U.theme=="string"&&ne.setTheme(U.theme),typeof U.autoDetectHighContrast!="undefined"&&ne.setAutoDetectHighContrast(Boolean(U.autoDetectHighContrast));let $=U.model;delete U.model,super(F,U,W,x,K,Y,ee,ne,le,z),this._contextViewService=se,this._configurationService=X,this._standaloneThemeService=ne,this._register(R),this._register(H);let ie;if(typeof $=="undefined"?(ie=O(P,V,U.value||"",U.language||"text/plain",void 0),this._ownsModel=!0):(ie=$,this._ownsModel=!1),this._attachModel(ie),ie){let oe={oldModelUrl:null,newModelUrl:ie.uri};this._onDidChangeModel.fire(oe)}}dispose(){super.dispose()}updateOptions(F){g.updateConfigurationService(this._configurationService,F,!1),typeof F.theme=="string"&&this._standaloneThemeService.setTheme(F.theme),typeof F.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(F.autoDetectHighContrast)),super.updateOptions(F)}_attachModel(F){super._attachModel(F),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(F){super._postDetachModelCleanup(F),F&&this._ownsModel&&(F.dispose(),this._ownsModel=!1)}};E=Me([_e(3,r.IInstantiationService),_e(4,M.ICodeEditorService),_e(5,o.ICommandService),_e(6,a.IContextKeyService),_e(7,i.IKeybindingService),_e(8,u.IContextViewService),_e(9,p.IStandaloneThemeService),_e(10,n.INotificationService),_e(11,s.IConfigurationService),_e(12,l.IAccessibilityService),_e(13,f.IModelService),_e(14,v.IModeService)],E),e.StandaloneEditor=E;let T=class extends S.DiffEditorWidget{constructor(F,D,R,W,x,K,Y,ee,se,ne,le,X,z,P,V){const U=Object.assign({},D);g.updateConfigurationService(X,U,!0);const H=ne.registerEditorContainer(F);typeof U.theme=="string"&&ne.setTheme(U.theme),typeof U.autoDetectHighContrast!="undefined"&&ne.setAutoDetectHighContrast(Boolean(U.autoDetectHighContrast)),super(F,U,{},V,ee,x,W,se,ne,le,z,P),this._contextViewService=Y,this._configurationService=X,this._standaloneThemeService=ne,this._register(R),this._register(H),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(F){g.updateConfigurationService(this._configurationService,F,!0),typeof F.theme=="string"&&this._standaloneThemeService.setTheme(F.theme),typeof F.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(F.autoDetectHighContrast)),super.updateOptions(F)}_createInnerEditor(F,D,R){return F.createInstance(k,D,R)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(F,D,R){return this.getModifiedEditor().addCommand(F,D,R)}createContextKey(F,D){return this.getModifiedEditor().createContextKey(F,D)}addAction(F){return this.getModifiedEditor().addAction(F)}};T=Me([_e(3,r.IInstantiationService),_e(4,a.IContextKeyService),_e(5,i.IKeybindingService),_e(6,u.IContextViewService),_e(7,d.IEditorWorkerService),_e(8,M.ICodeEditorService),_e(9,p.IStandaloneThemeService),_e(10,n.INotificationService),_e(11,s.IConfigurationService),_e(12,u.IContextMenuService),_e(13,_.IEditorProgressService),_e(14,m.IClipboardService)],T),e.StandaloneDiffEditor=T;function O(B,F,D,R,W){if(D=D||"",!R){const x=D.indexOf(`
`);let K=D;return x!==-1&&(K=D.substring(0,x)),A(B,D,F.createByFilepathOrFirstLine(W||null,K),W)}return A(B,D,F.create(R),W)}e.createTextModel=O;function A(B,F,D,R){return B.createModel(F,D,R)}}),define(Q[274],J([0,1,2,133,28,75,252,57,567,36,269,137,191,605,668,114,34,26,46,570,16,651,68,555,184,9,550,138,37,115,147,77,558,85,32,59,79,87,11,190,650,178,594,65,139,74,568,84,530,148,673,653,78]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I,k,E,T,O,A,B,F,D,R,W,x,K,Y,ee,se,ne,le,X,z,P,V,U,H,$){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicStandaloneServices=e.StaticServices=void 0;var ie;(function(ae){const G=new L.ServiceCollection;class j{constructor(ce,me){this._serviceId=ce,this._factory=me,this._value=null}get id(){return this._serviceId}get(ce){if(!this._value){if(ce&&(this._value=ce[this._serviceId.toString()]),this._value||(this._value=this._factory(ce)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");G.set(this._serviceId,this._value)}return this._value}}ae.LazyStaticService=j;let te=[];function Z(re,ce){let me=new j(re,ce);return te.push(me),me}function ue(re){let ce=new L.ServiceCollection;for(const[Ce,be]of le.getSingletonServiceDescriptors())ce.set(Ce,be);for(let Ce in re)re.hasOwnProperty(Ce)&&ce.set(v.createDecorator(Ce),re[Ce]);te.forEach(Ce=>ce.set(Ce.id,Ce.get(re)));let me=new y.InstantiationService(ce,!0);return ce.set(v.IInstantiationService,me),[ce,me]}ae.init=ue,ae.instantiationService=Z(v.IInstantiationService,()=>new y.InstantiationService(G,!0));const he=new o.SimpleConfigurationService;ae.configurationService=Z(n.IConfigurationService,()=>he),ae.resourceConfigurationService=Z(c.ITextResourceConfigurationService,()=>new o.SimpleResourceConfigurationService(he)),ae.resourcePropertiesService=Z(c.ITextResourcePropertiesService,()=>new o.SimpleResourcePropertiesService(he)),ae.contextService=Z(x.IWorkspaceContextService,()=>new o.SimpleWorkspaceContextService),ae.labelService=Z(k.ILabelService,()=>new o.SimpleUriLabelService),ae.telemetryService=Z(R.ITelemetryService,()=>new o.StandaloneTelemetryService),ae.dialogService=Z(f.IDialogService,()=>new o.SimpleDialogService),ae.notificationService=Z(B.INotificationService,()=>new o.SimpleNotificationService),ae.markerService=Z(A.IMarkerService,()=>new O.MarkerService),ae.modeService=Z(C.IModeService,re=>new d.ModeServiceImpl),ae.standaloneThemeService=Z(u.IStandaloneThemeService,()=>new a.StandaloneThemeServiceImpl),ae.logService=Z(T.ILogService,()=>new T.LogService(new T.ConsoleLogger)),ae.undoRedoService=Z(V.IUndoRedoService,re=>new U.UndoRedoService(ae.dialogService.get(re),ae.notificationService.get(re))),ae.modelService=Z(g.IModelService,re=>new p.ModelServiceImpl(ae.configurationService.get(re),ae.resourcePropertiesService.get(re),ae.standaloneThemeService.get(re),ae.logService.get(re),ae.undoRedoService.get(re))),ae.markerDecorationsService=Z(Y.IMarkerDecorationsService,re=>new ee.MarkerDecorationsService(ae.modelService.get(re),ae.markerService.get(re))),ae.contextKeyService=Z(l.IContextKeyService,re=>new t.ContextKeyService(ae.configurationService.get(re))),ae.codeEditorService=Z(M.ICodeEditorService,re=>new s.StandaloneCodeEditorServiceImpl(null,ae.contextKeyService.get(re),ae.standaloneThemeService.get(re))),ae.editorProgressService=Z(F.IEditorProgressService,()=>new o.SimpleEditorProgressService),ae.storageService=Z(D.IStorageService,()=>new D.InMemoryStorageService),ae.editorWorkerService=Z(w.IEditorWorkerService,re=>new S.EditorWorkerServiceImpl(ae.modelService.get(re),ae.resourceConfigurationService.get(re),ae.logService.get(re)))})(ie=e.StaticServices||(e.StaticServices={}));class oe extends b.Disposable{constructor(G,j){super();const[te,Z]=ie.init(j);this._serviceCollection=te,this._instantiationService=Z;const ue=this.get(n.IConfigurationService),he=this.get(B.INotificationService),re=this.get(R.ITelemetryService),ce=this.get(W.IThemeService),me=this.get(T.ILogService),Ce=this.get(l.IContextKeyService);let be=(Ae,Se)=>{let we=null;return j&&(we=j[Ae.toString()]),we||(we=Se()),this._serviceCollection.set(Ae,we),we};be(se.IAccessibilityService,()=>new X.AccessibilityService(Ce,ue)),be(E.IListService,()=>new E.ListService(ce));let Le=be(i.ICommandService,()=>new o.StandaloneCommandService(this._instantiationService)),De=be(I.IKeybindingService,()=>this._register(new o.StandaloneKeybindingService(Ce,Le,re,he,me,G))),Re=be(ne.ILayoutService,()=>new o.SimpleLayoutService(ie.codeEditorService.get(M.ICodeEditorService),G));be($.IQuickInputService,()=>new H.StandaloneQuickInputServiceImpl(Z,ie.codeEditorService.get(M.ICodeEditorService)));let Ee=be(m.IContextViewService,()=>this._register(new _.ContextViewService(Re)));be(z.IClipboardService,()=>new P.BrowserClipboardService),be(m.IContextMenuService,()=>{const Ae=new h.ContextMenuService(re,he,Ee,De,ce);return Ae.configure({blockMouse:!1}),this._register(Ae)}),be(r.IMenuService,()=>new K.MenuService(Le)),be(N.IBulkEditService,()=>new o.SimpleBulkEditService(ie.modelService.get(g.IModelService)))}get(G){let j=this._serviceCollection.get(G);if(!j)throw new Error("Missing service "+G);return j}set(G,j){this._serviceCollection.set(G,j)}has(G){return this._serviceCollection.has(G)}}e.DynamicStandaloneServices=oe}),define(Q[675],J([0,1,28,559,215,38,163,107,53,18,76,75,57,67,556,169,544,191,674,274,114,26,46,16,68,9,37,32,58,65,69,59,84,8,36,358]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I,k,E,T,O,A,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoEditorAPI=e.registerCommand=e.remeasureFonts=e.setTheme=e.defineTheme=e.tokenize=e.colorizeModelLine=e.colorize=e.colorizeElement=e.createWebWorker=e.onDidChangeModelLanguage=e.onWillDisposeModel=e.onDidCreateModel=e.getModels=e.getModel=e.onDidChangeMarkers=e.getModelMarkers=e.setModelMarkers=e.setModelLanguage=e.createModel=e.createDiffNavigator=e.createDiffEditor=e.onDidCreateEditor=e.create=void 0;function F(he,re,ce){let me=new t.DynamicStandaloneServices(he,re),Ce=null;me.has(s.ITextModelService)||(Ce=new i.SimpleEditorModelResolverService(t.StaticServices.modelService.get()),me.set(s.ITextModelService,Ce)),me.has(I.IOpenerService)||me.set(I.IOpenerService,new N.OpenerService(me.get(b.ICodeEditorService),me.get(h.ICommandService)));let be=ce(me);return Ce&&Ce.setEditor(be),be}function D(he,re,ce){return F(he,ce||{},me=>new n.StandaloneEditor(he,re,me,me.get(v.IInstantiationService),me.get(b.ICodeEditorService),me.get(h.ICommandService),me.get(_.IContextKeyService),me.get(y.IKeybindingService),me.get(f.IContextViewService),me.get(l.IStandaloneThemeService),me.get(L.INotificationService),me.get(m.IConfigurationService),me.get(k.IAccessibilityService),me.get(B.IModelService),me.get(o.IModeService)))}e.create=D;function R(he){return t.StaticServices.codeEditorService.get().onCodeEditorAdd(re=>{he(re)})}e.onDidCreateEditor=R;function W(he,re,ce){return F(he,ce||{},me=>new n.StandaloneDiffEditor(he,re,me,me.get(v.IInstantiationService),me.get(_.IContextKeyService),me.get(y.IKeybindingService),me.get(f.IContextViewService),me.get(c.IEditorWorkerService),me.get(b.ICodeEditorService),me.get(l.IStandaloneThemeService),me.get(L.INotificationService),me.get(m.IConfigurationService),me.get(f.IContextMenuService),me.get(T.IEditorProgressService),me.get(O.IClipboardService)))}e.createDiffEditor=W;function x(he,re){return new M.DiffNavigator(he,re)}e.createDiffNavigator=x;function K(he,re,ce){return n.createTextModel(t.StaticServices.modelService.get(),t.StaticServices.modeService.get(),he,re,ce)}e.createModel=K;function Y(he,re){t.StaticServices.modelService.get().setMode(he,t.StaticServices.modeService.get().create(re))}e.setModelLanguage=Y;function ee(he,re,ce){he&&t.StaticServices.markerService.get().changeOne(re,he.uri,ce)}e.setModelMarkers=ee;function se(he){return t.StaticServices.markerService.get().read(he)}e.getModelMarkers=se;function ne(he){return t.StaticServices.markerService.get().onMarkerChanged(he)}e.onDidChangeMarkers=ne;function le(he){return t.StaticServices.modelService.get().getModel(he)}e.getModel=le;function X(){return t.StaticServices.modelService.get().getModels()}e.getModels=X;function z(he){return t.StaticServices.modelService.get().onModelAdded(he)}e.onDidCreateModel=z;function P(he){return t.StaticServices.modelService.get().onModelRemoved(he)}e.onWillDisposeModel=P;function V(he){return t.StaticServices.modelService.get().onModelModeChanged(re=>{he({model:re.model,oldLanguage:re.oldModeId})})}e.onDidChangeModelLanguage=V;function U(he){return a.createWebWorker(t.StaticServices.modelService.get(),he)}e.createWebWorker=U;function H(he,re){const ce=t.StaticServices.standaloneThemeService.get();return ce.registerEditorContainer(he),r.Colorizer.colorizeElement(ce,t.StaticServices.modeService.get(),he,re)}e.colorizeElement=H;function $(he,re,ce){return t.StaticServices.standaloneThemeService.get().registerEditorContainer(document.body),r.Colorizer.colorize(t.StaticServices.modeService.get(),he,re,ce)}e.colorize=$;function ie(he,re,ce=4){return t.StaticServices.standaloneThemeService.get().registerEditorContainer(document.body),r.Colorizer.colorizeModelLine(he,re,ce)}e.colorizeModelLine=ie;function oe(he){let re=g.TokenizationRegistry.get(he);return re||{getInitialState:()=>p.NULL_STATE,tokenize:(ce,me,Ce,be)=>p.nullTokenize(he,ce,Ce,be)}}function ae(he,re){t.StaticServices.modeService.get().triggerMode(re);let me=oe(re),Ce=A.splitLines(he),be=[],Le=me.getInitialState();for(let De=0,Re=Ce.length;De<Re;De++){let Ee=Ce[De],Ae=me.tokenize(Ee,!0,Le,0);be[De]=Ae.tokens,Le=Ae.endState}return be}e.tokenize=ae;function G(he,re){t.StaticServices.standaloneThemeService.get().defineTheme(he,re)}e.defineTheme=G;function j(he){t.StaticServices.standaloneThemeService.get().setTheme(he)}e.setTheme=j;function te(){E.clearAllFontInfos()}e.remeasureFonts=te;function Z(he,re){return h.CommandsRegistry.registerCommand({id:he,handler:re})}e.registerCommand=Z;function ue(){return{create:D,onDidCreateEditor:R,createDiffEditor:W,createDiffNavigator:x,createModel:K,setModelLanguage:Y,setModelMarkers:ee,getModelMarkers:se,onDidChangeMarkers:ne,getModels:X,getModel:le,onDidCreateModel:z,onWillDisposeModel:P,onDidChangeModelLanguage:V,createWebWorker:U,colorizeElement:H,colorize:$,colorizeModelLine:ie,tokenize:ae,defineTheme:G,setTheme:j,remeasureFonts:te,registerCommand:Z,AccessibilitySupport:u.AccessibilitySupport,ContentWidgetPositionPreference:u.ContentWidgetPositionPreference,CursorChangeReason:u.CursorChangeReason,DefaultEndOfLine:u.DefaultEndOfLine,EditorAutoIndentStrategy:u.EditorAutoIndentStrategy,EditorOption:u.EditorOption,EndOfLinePreference:u.EndOfLinePreference,EndOfLineSequence:u.EndOfLineSequence,MinimapPosition:u.MinimapPosition,MouseTargetType:u.MouseTargetType,OverlayWidgetPositionPreference:u.OverlayWidgetPositionPreference,OverviewRulerLane:u.OverviewRulerLane,RenderLineNumbersType:u.RenderLineNumbersType,RenderMinimap:u.RenderMinimap,ScrollbarVisibility:u.ScrollbarVisibility,ScrollType:u.ScrollType,TextEditorCursorBlinkingStyle:u.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:u.TextEditorCursorStyle,TrackedRangeStickiness:u.TrackedRangeStickiness,WrappingIndent:u.WrappingIndent,ConfigurationChangedEvent:w.ConfigurationChangedEvent,BareFontInfo:S.BareFontInfo,FontInfo:S.FontInfo,TextModelResolvedOptions:d.TextModelResolvedOptions,FindMatch:d.FindMatch,EditorType:C.EditorType,EditorOptions:w.EditorOptions}}e.createMonacoEditorAPI=ue}),define(Q[676],J([0,1,29,3,127,18,41,141,169,274,417,246]),function(q,e,b,N,M,w,S,C,d,g,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoLanguagesAPI=e.registerDocumentRangeSemanticTokensProvider=e.registerDocumentSemanticTokensProvider=e.registerSelectionRangeProvider=e.registerDeclarationProvider=e.registerFoldingRangeProvider=e.registerColorProvider=e.registerCompletionItemProvider=e.registerLinkProvider=e.registerOnTypeFormattingEditProvider=e.registerDocumentRangeFormattingEditProvider=e.registerDocumentFormattingEditProvider=e.registerCodeActionProvider=e.registerCodeLensProvider=e.registerTypeDefinitionProvider=e.registerImplementationProvider=e.registerDefinitionProvider=e.registerLinkedEditingRangeProvider=e.registerDocumentHighlightProvider=e.registerDocumentSymbolProvider=e.registerHoverProvider=e.registerSignatureHelpProvider=e.registerRenameProvider=e.registerReferenceProvider=e.setMonarchTokensProvider=e.setTokensProvider=e.setColorMap=e.TokenizationSupport2Adapter=e.EncodedTokenizationSupport2Adapter=e.setLanguageConfiguration=e.onLanguage=e.getEncodedLanguageId=e.getLanguages=e.register=void 0;function o(P){C.ModesRegistry.registerLanguage(P)}e.register=o;function s(){let P=[];return P=P.concat(C.ModesRegistry.getLanguages()),P}e.getLanguages=s;function a(P){let V=g.StaticServices.modeService.get().getLanguageIdentifier(P);return V?V.id:0}e.getEncodedLanguageId=a;function u(P,V){let U=g.StaticServices.modeService.get().onDidCreateMode(H=>{H.getId()===P&&(U.dispose(),V())});return U}e.onLanguage=u;function r(P,V){let U=g.StaticServices.modeService.get().getLanguageIdentifier(P);if(!U)throw new Error(`Cannot set configuration for unknown language ${P}`);return S.LanguageConfigurationRegistry.register(U,V,100)}e.setLanguageConfiguration=r;class i{constructor(V,U){this._languageIdentifier=V,this._actual=U}getInitialState(){return this._actual.getInitialState()}tokenize(V,U,H,$){if(typeof this._actual.tokenize=="function")return n.adaptTokenize(this._languageIdentifier.language,this._actual,V,H,$);throw new Error("Not supported!")}tokenize2(V,U,H){let $=this._actual.tokenizeEncoded(V,H);return new M.TokenizationResult2($.tokens,$.endState)}}e.EncodedTokenizationSupport2Adapter=i;class n{constructor(V,U,H){this._standaloneThemeService=V,this._languageIdentifier=U,this._actual=H}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(V,U,H){let $=[],ie=0;for(let oe=0,ae=V.length;oe<ae;oe++){const G=V[oe];let j=G.startIndex;oe===0?j=0:j<ie&&(j=ie),$[oe]=new M.Token(j+H,G.scopes,U),ie=j}return $}static adaptTokenize(V,U,H,$,ie){let oe=U.tokenize(H,$),ae=n._toClassicTokens(oe.tokens,V,ie),G;return oe.endState.equals($)?G=$:G=oe.endState,new M.TokenizationResult(ae,G)}tokenize(V,U,H,$){return n.adaptTokenize(this._languageIdentifier.language,this._actual,V,H,$)}_toBinaryTokens(V,U){const H=this._languageIdentifier.id,$=this._standaloneThemeService.getColorTheme().tokenTheme;let ie=[],oe=0,ae=0;for(let j=0,te=V.length;j<te;j++){const Z=V[j],ue=$.match(H,Z.scopes);if(!(oe>0&&ie[oe-1]===ue)){let he=Z.startIndex;j===0?he=0:he<ae&&(he=ae),ie[oe++]=he+U,ie[oe++]=ue,ae=he}}let G=new Uint32Array(oe);for(let j=0;j<oe;j++)G[j]=ie[j];return G}tokenize2(V,U,H,$){let ie=this._actual.tokenize(V,H),oe=this._toBinaryTokens(ie.tokens,$),ae;return ie.endState.equals(H)?ae=H:ae=ie.endState,new M.TokenizationResult2(oe,ae)}}e.TokenizationSupport2Adapter=n;function t(P){return"tokenizeEncoded"in P}function l(P){return P&&typeof P.then=="function"}function h(P){if(P){const V=[null];for(let U=1,H=P.length;U<H;U++)V[U]=b.Color.fromHex(P[U]);g.StaticServices.standaloneThemeService.get().setColorMapOverride(V)}else g.StaticServices.standaloneThemeService.get().setColorMapOverride(null)}e.setColorMap=h;function m(P,V){let U=g.StaticServices.modeService.get().getLanguageIdentifier(P);if(!U)throw new Error(`Cannot set tokens provider for unknown language ${P}`);const H=$=>t($)?new i(U,$):new n(g.StaticServices.standaloneThemeService.get(),U,$);return l(V)?w.TokenizationRegistry.registerPromise(P,V.then($=>H($))):w.TokenizationRegistry.register(P,H(V))}e.setTokensProvider=m;function _(P,V){const U=H=>c.createTokenizationSupport(g.StaticServices.modeService.get(),g.StaticServices.standaloneThemeService.get(),P,p.compile(P,H));return l(V)?w.TokenizationRegistry.registerPromise(P,V.then(H=>U(H))):w.TokenizationRegistry.register(P,U(V))}e.setMonarchTokensProvider=_;function f(P,V){return w.ReferenceProviderRegistry.register(P,V)}e.registerReferenceProvider=f;function v(P,V){return w.RenameProviderRegistry.register(P,V)}e.registerRenameProvider=v;function y(P,V){return w.SignatureHelpProviderRegistry.register(P,V)}e.registerSignatureHelpProvider=y;function L(P,V){return w.HoverProviderRegistry.register(P,{provideHover:(U,H,$)=>{let ie=U.getWordAtPosition(H);return Promise.resolve(V.provideHover(U,H,$)).then(oe=>{if(!!oe)return!oe.range&&ie&&(oe.range=new N.Range(H.lineNumber,ie.startColumn,H.lineNumber,ie.endColumn)),oe.range||(oe.range=new N.Range(H.lineNumber,H.column,H.lineNumber,H.column)),oe})}})}e.registerHoverProvider=L;function I(P,V){return w.DocumentSymbolProviderRegistry.register(P,V)}e.registerDocumentSymbolProvider=I;function k(P,V){return w.DocumentHighlightProviderRegistry.register(P,V)}e.registerDocumentHighlightProvider=k;function E(P,V){return w.LinkedEditingRangeProviderRegistry.register(P,V)}e.registerLinkedEditingRangeProvider=E;function T(P,V){return w.DefinitionProviderRegistry.register(P,V)}e.registerDefinitionProvider=T;function O(P,V){return w.ImplementationProviderRegistry.register(P,V)}e.registerImplementationProvider=O;function A(P,V){return w.TypeDefinitionProviderRegistry.register(P,V)}e.registerTypeDefinitionProvider=A;function B(P,V){return w.CodeLensProviderRegistry.register(P,V)}e.registerCodeLensProvider=B;function F(P,V){return w.CodeActionProviderRegistry.register(P,{provideCodeActions:(U,H,$,ie)=>{let oe=g.StaticServices.markerService.get().read({resource:U.uri}).filter(ae=>N.Range.areIntersectingOrTouching(ae,H));return V.provideCodeActions(U,H,{markers:oe,only:$.only},ie)}})}e.registerCodeActionProvider=F;function D(P,V){return w.DocumentFormattingEditProviderRegistry.register(P,V)}e.registerDocumentFormattingEditProvider=D;function R(P,V){return w.DocumentRangeFormattingEditProviderRegistry.register(P,V)}e.registerDocumentRangeFormattingEditProvider=R;function W(P,V){return w.OnTypeFormattingEditProviderRegistry.register(P,V)}e.registerOnTypeFormattingEditProvider=W;function x(P,V){return w.LinkProviderRegistry.register(P,V)}e.registerLinkProvider=x;function K(P,V){return w.CompletionProviderRegistry.register(P,V)}e.registerCompletionItemProvider=K;function Y(P,V){return w.ColorProviderRegistry.register(P,V)}e.registerColorProvider=Y;function ee(P,V){return w.FoldingRangeProviderRegistry.register(P,V)}e.registerFoldingRangeProvider=ee;function se(P,V){return w.DeclarationProviderRegistry.register(P,V)}e.registerDeclarationProvider=se;function ne(P,V){return w.SelectionRangeRegistry.register(P,V)}e.registerSelectionRangeProvider=ne;function le(P,V){return w.DocumentSemanticTokensProviderRegistry.register(P,V)}e.registerDocumentSemanticTokensProvider=le;function X(P,V){return w.DocumentRangeSemanticTokensProviderRegistry.register(P,V)}e.registerDocumentRangeSemanticTokensProvider=X;function z(){return{register:o,getLanguages:s,onLanguage:u,getEncodedLanguageId:a,setLanguageConfiguration:r,setColorMap:h,setTokensProvider:m,setMonarchTokensProvider:_,registerReferenceProvider:f,registerRenameProvider:v,registerCompletionItemProvider:K,registerSignatureHelpProvider:y,registerHoverProvider:L,registerDocumentSymbolProvider:I,registerDocumentHighlightProvider:k,registerLinkedEditingRangeProvider:E,registerDefinitionProvider:T,registerImplementationProvider:O,registerTypeDefinitionProvider:A,registerCodeLensProvider:B,registerCodeActionProvider:F,registerDocumentFormattingEditProvider:D,registerDocumentRangeFormattingEditProvider:R,registerOnTypeFormattingEditProvider:W,registerLinkProvider:x,registerColorProvider:Y,registerFoldingRangeProvider:ee,registerDeclarationProvider:se,registerSelectionRangeProvider:ne,registerDocumentSemanticTokensProvider:le,registerDocumentRangeSemanticTokensProvider:X,DocumentHighlightKind:d.DocumentHighlightKind,CompletionItemKind:d.CompletionItemKind,CompletionItemTag:d.CompletionItemTag,CompletionItemInsertTextRule:d.CompletionItemInsertTextRule,SymbolKind:d.SymbolKind,SymbolTag:d.SymbolTag,IndentAction:d.IndentAction,CompletionTriggerKind:d.CompletionTriggerKind,SignatureHelpTriggerKind:d.SignatureHelpTriggerKind,InlineHintKind:d.InlineHintKind,FoldingRangeKind:w.FoldingRangeKind}}e.createMonacoLanguagesAPI=z}),define(Q[677],J([0,1,38,220,675,676,17,261]),function(q,e,b,N,M,w,S,C){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.languages=e.editor=e.Token=e.Uri=e.MarkerTag=e.MarkerSeverity=e.SelectionDirection=e.Selection=e.Range=e.Position=e.KeyMod=e.KeyCode=e.Emitter=e.CancellationTokenSource=void 0,b.EditorOptions.wrappingIndent.defaultValue=0,b.EditorOptions.glyphMargin.defaultValue=!1,b.EditorOptions.autoIndent.defaultValue=3,b.EditorOptions.overviewRulerLanes.defaultValue=2,C.FormattingConflicts.setFormatterSelector((p,c,o)=>Promise.resolve(p[0]));const g=N.createMonacoBaseAPI();g.editor=M.createMonacoEditorAPI(),g.languages=w.createMonacoLanguagesAPI(),e.CancellationTokenSource=g.CancellationTokenSource,e.Emitter=g.Emitter,e.KeyCode=g.KeyCode,e.KeyMod=g.KeyMod,e.Position=g.Position,e.Range=g.Range,e.Selection=g.Selection,e.SelectionDirection=g.SelectionDirection,e.MarkerSeverity=g.MarkerSeverity,e.MarkerTag=g.MarkerTag,e.Uri=g.Uri,e.Token=g.Token,e.editor=g.editor,e.languages=g.languages,(((d=S.globals.MonacoEnvironment)===null||d===void 0?void 0:d.globalAPI)||typeof define=="function"&&define.amd)&&(self.monaco=g),typeof self.require!="undefined"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})}),define(Q[678],J([0,1,24]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.WORKSPACE_EXTENSION=void 0,e.WORKSPACE_EXTENSION="code-workspace";function N(w){const S=w;return typeof(S==null?void 0:S.id)=="string"&&b.URI.isUri(S.uri)}e.isSingleFolderWorkspaceIdentifier=N;function M(w){if(w.configuration)return{id:w.id,configPath:w.configuration};if(w.folders.length===1)return{id:w.id,uri:w.folders[0].uri}}e.toWorkspaceIdentifier=M}),define(Q[679],J([0,1,506,72,44,131,41,8,678,159,292]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomBasedVariableResolver=e.WorkspaceBasedVariableResolver=e.TimeBasedVariableResolver=e.CommentBasedVariableResolver=e.ClipboardBasedVariableResolver=e.ModelBasedVariableResolver=e.SelectionBasedVariableResolver=e.CompositeSnippetVariableResolver=void 0;class c{constructor(l){this._delegates=l}resolve(l){for(const h of this._delegates){let m=h.resolve(l);if(m!==void 0)return m}}}e.CompositeSnippetVariableResolver=c;class o{constructor(l,h,m,_){this._model=l,this._selection=h,this._selectionIdx=m,this._overtypingCapturer=_}resolve(l){const{name:h}=l;if(h==="SELECTION"||h==="TM_SELECTED_TEXT"){let m=this._model.getValueInRange(this._selection)||void 0,_=this._selection.startLineNumber!==this._selection.endLineNumber;if(!m&&this._overtypingCapturer){const f=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);f&&(m=f.value,_=f.multiline)}if(m&&_&&l.snippet){const f=this._model.getLineContent(this._selection.startLineNumber),v=C.getLeadingWhitespace(f,0,this._selection.startColumn-1);let y=v;l.snippet.walk(I=>I===l?!1:(I instanceof w.Text&&(y=C.getLeadingWhitespace(C.splitLines(I.value).pop())),!0));const L=C.commonPrefixLength(y,v);m=m.replace(/(\r\n|\r|\n)(.*)/g,(I,k,E)=>`${k}${y.substr(L)}${E}`)}return m}else{if(h==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(h==="TM_CURRENT_WORD"){const m=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return m&&m.word||void 0}else{if(h==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(h==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber)}}}}e.SelectionBasedVariableResolver=o;class s{constructor(l,h){this._labelService=l,this._model=h}resolve(l){const{name:h}=l;if(h==="TM_FILENAME")return N.basename(this._model.uri.fsPath);if(h==="TM_FILENAME_BASE"){const m=N.basename(this._model.uri.fsPath),_=m.lastIndexOf(".");return _<=0?m:m.slice(0,_)}else{if(h==="TM_DIRECTORY"&&this._labelService)return N.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(M.dirname(this._model.uri));if(h==="TM_FILEPATH"&&this._labelService)return this._labelService.getUriLabel(this._model.uri);if(h==="RELATIVE_FILEPATH"&&this._labelService)return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=s;class a{constructor(l,h,m,_){this._readClipboardText=l,this._selectionIdx=h,this._selectionCount=m,this._spread=_}resolve(l){if(l.name==="CLIPBOARD"){const h=this._readClipboardText();if(!!h){if(this._spread){const m=h.split(/\r\n|\n|\r/).filter(_=>!C.isFalsyOrWhitespace(_));if(m.length===this._selectionCount)return m[this._selectionIdx]}return h}}}}e.ClipboardBasedVariableResolver=a;class u{constructor(l,h){this._model=l,this._selection=h}resolve(l){const{name:h}=l,m=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),_=S.LanguageConfigurationRegistry.getComments(m);if(!!_){if(h==="LINE_COMMENT")return _.lineCommentToken||void 0;if(h==="BLOCK_COMMENT_START")return _.blockCommentStartToken||void 0;if(h==="BLOCK_COMMENT_END")return _.blockCommentEndToken||void 0}}}e.CommentBasedVariableResolver=u;class r{resolve(l){const{name:h}=l;if(h==="CURRENT_YEAR")return String(new Date().getFullYear());if(h==="CURRENT_YEAR_SHORT")return String(new Date().getFullYear()).slice(-2);if(h==="CURRENT_MONTH")return String(new Date().getMonth().valueOf()+1).padStart(2,"0");if(h==="CURRENT_DATE")return String(new Date().getDate().valueOf()).padStart(2,"0");if(h==="CURRENT_HOUR")return String(new Date().getHours().valueOf()).padStart(2,"0");if(h==="CURRENT_MINUTE")return String(new Date().getMinutes().valueOf()).padStart(2,"0");if(h==="CURRENT_SECOND")return String(new Date().getSeconds().valueOf()).padStart(2,"0");if(h==="CURRENT_DAY_NAME")return r.dayNames[new Date().getDay()];if(h==="CURRENT_DAY_NAME_SHORT")return r.dayNamesShort[new Date().getDay()];if(h==="CURRENT_MONTH_NAME")return r.monthNames[new Date().getMonth()];if(h==="CURRENT_MONTH_NAME_SHORT")return r.monthNamesShort[new Date().getMonth()];if(h==="CURRENT_SECONDS_UNIX")return String(Math.floor(Date.now()/1e3))}}e.TimeBasedVariableResolver=r,r.dayNames=[b.localize(0,null),b.localize(1,null),b.localize(2,null),b.localize(3,null),b.localize(4,null),b.localize(5,null),b.localize(6,null)],r.dayNamesShort=[b.localize(7,null),b.localize(8,null),b.localize(9,null),b.localize(10,null),b.localize(11,null),b.localize(12,null),b.localize(13,null)],r.monthNames=[b.localize(14,null),b.localize(15,null),b.localize(16,null),b.localize(17,null),b.localize(18,null),b.localize(19,null),b.localize(20,null),b.localize(21,null),b.localize(22,null),b.localize(23,null),b.localize(24,null),b.localize(25,null)],r.monthNamesShort=[b.localize(26,null),b.localize(27,null),b.localize(28,null),b.localize(29,null),b.localize(30,null),b.localize(31,null),b.localize(32,null),b.localize(33,null),b.localize(34,null),b.localize(35,null),b.localize(36,null),b.localize(37,null)];class i{constructor(l){this._workspaceService=l}resolve(l){if(!!this._workspaceService){const h=d.toWorkspaceIdentifier(this._workspaceService.getWorkspace());if(!!h){if(l.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(h);if(l.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(h)}}}_resolveWorkspaceName(l){if(d.isSingleFolderWorkspaceIdentifier(l))return N.basename(l.uri.path);let h=N.basename(l.configPath.path);return h.endsWith(d.WORKSPACE_EXTENSION)&&(h=h.substr(0,h.length-d.WORKSPACE_EXTENSION.length-1)),h}_resoveWorkspacePath(l){if(d.isSingleFolderWorkspaceIdentifier(l))return g.normalizeDriveLetter(l.uri.fsPath);let h=N.basename(l.configPath.path),m=l.configPath.fsPath;return m.endsWith(h)&&(m=m.substr(0,m.length-h.length-1)),m?g.normalizeDriveLetter(m):"/"}}e.WorkspaceBasedVariableResolver=i;class n{resolve(l){const{name:h}=l;if(h==="RANDOM")return Math.random().toString().slice(-6);if(h==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(h==="UUID")return p.generateUuid()}}e.RandomBasedVariableResolver=n}),define(Q[680],J([0,1,19,2,8,62,3,21,31,190,9,131,679,11,22,115,351]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0,s.registerThemingParticipant((t,l)=>{function h(m){const _=t.getColor(m);return _?_.toString():"transparent"}l.addRule(`.monaco-editor .snippet-placeholder { background-color: ${h(a.snippetTabstopHighlightBackground)}; outline-color: ${h(a.snippetTabstopHighlightBorder)}; }`),l.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${h(a.snippetFinalTabstopHighlightBackground)}; outline-color: ${h(a.snippetFinalTabstopHighlightBorder)}; }`)});class r{constructor(l,h,m,_){this._editor=l,this._snippet=h,this._offset=m,this._snippetLineLeadingWhitespace=_,this._nestingLevel=1,this._placeholderGroups=b.groupBy(h.placeholders,c.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(!this._placeholderDecorations){this._placeholderDecorations=new Map;const l=this._editor.getModel();this._editor.changeDecorations(h=>{for(const m of this._snippet.placeholders){const _=this._snippet.offset(m),f=this._snippet.fullLen(m),v=S.Range.fromPositions(l.getPositionAt(this._offset+_),l.getPositionAt(this._offset+_+f)),y=m.isFinalTabstop?r._decor.inactiveFinal:r._decor.inactive,L=h.addDecoration(v,y);this._placeholderDecorations.set(m,L)}})}}move(l){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let _=[];for(const f of this._placeholderGroups[this._placeholderGroupsIdx])if(f.transform){const v=this._placeholderDecorations.get(f),y=this._editor.getModel().getDecorationRange(v),L=this._editor.getModel().getValueInRange(y),I=f.transform.resolve(L).split(/\r\n|\r|\n/);for(let k=1;k<I.length;k++)I[k]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+I[k]);_.push(w.EditOperation.replace(y,I.join(this._editor.getModel().getEOL())))}_.length>0&&this._editor.executeEdits("snippet.placeholderTransform",_)}let h=!1;l===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,h=!0):l===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,h=!0);const m=this._editor.getModel().changeDecorations(_=>{const f=new Set,v=[];for(const y of this._placeholderGroups[this._placeholderGroupsIdx]){const L=this._placeholderDecorations.get(y),I=this._editor.getModel().getDecorationRange(L);v.push(new C.Selection(I.startLineNumber,I.startColumn,I.endLineNumber,I.endColumn)),h=h&&this._hasPlaceholderBeenCollapsed(y),_.changeDecorationOptions(L,y.isFinalTabstop?r._decor.activeFinal:r._decor.active),f.add(y);for(const k of this._snippet.enclosingPlaceholders(y)){const E=this._placeholderDecorations.get(k);_.changeDecorationOptions(E,k.isFinalTabstop?r._decor.activeFinal:r._decor.active),f.add(k)}}for(const[y,L]of this._placeholderDecorations)f.has(y)||_.changeDecorationOptions(L,y.isFinalTabstop?r._decor.inactiveFinal:r._decor.inactive);return v});return h?this.move(l):m!=null?m:[]}_hasPlaceholderBeenCollapsed(l){let h=l;for(;h;){if(h instanceof c.Placeholder){const m=this._placeholderDecorations.get(h);if(this._editor.getModel().getDecorationRange(m).isEmpty()&&h.toString().length>0)return!0}h=h.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const l=new Map;for(const h of this._placeholderGroups){let m;for(const _ of h){if(_.isFinalTabstop)break;m||(m=[],l.set(_.index,m));const f=this._placeholderDecorations.get(_),v=this._editor.getModel().getDecorationRange(f);if(!v){l.delete(_.index);break}m.push(v)}}return l}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(l){const h=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(m=>{for(const _ of this._placeholderGroups[this._placeholderGroupsIdx]){const f=l.shift();console.assert(!f._placeholderDecorations);const v=f._snippet.placeholderInfo.last.index;for(const L of f._snippet.placeholderInfo.all)L.isFinalTabstop?L.index=_.index+(v+1)/this._nestingLevel:L.index=_.index+L.index/this._nestingLevel;this._snippet.replace(_,f._snippet.children);const y=this._placeholderDecorations.get(_);m.removeDecoration(y),this._placeholderDecorations.delete(_);for(const L of f._snippet.placeholders){const I=f._snippet.offset(L),k=f._snippet.fullLen(L),E=S.Range.fromPositions(h.getPositionAt(f._offset+I),h.getPositionAt(f._offset+I+k)),T=m.addDecoration(E,r._decor.inactive);this._placeholderDecorations.set(L,T)}}this._placeholderGroups=b.groupBy(this._snippet.placeholders,c.Placeholder.compareByIndex)})}}e.OneSnippet=r,r._decor={active:d.ModelDecorationOptions.register({stickiness:0,className:"snippet-placeholder"}),inactive:d.ModelDecorationOptions.register({stickiness:1,className:"snippet-placeholder"}),activeFinal:d.ModelDecorationOptions.register({stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:d.ModelDecorationOptions.register({stickiness:1,className:"finish-snippet-placeholder"})};const i={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class n{constructor(l,h,m=i){this._templateMerges=[],this._snippets=[],this._editor=l,this._template=h,this._options=m}static adjustWhitespace(l,h,m,_,f){const v=l.getLineContent(h.lineNumber),y=M.getLeadingWhitespace(v,0,h.column-1);let L;return m.walk(I=>{if(!(I instanceof c.Text)||I.parent instanceof c.Choice)return!0;const k=I.value.split(/\r\n|\r|\n/);if(_){const T=m.offset(I);if(T===0)k[0]=l.normalizeIndentation(k[0]);else{L=L!=null?L:m.toString();let O=L.charCodeAt(T-1);(O===10||O===13)&&(k[0]=l.normalizeIndentation(y+k[0]))}for(let O=1;O<k.length;O++)k[O]=l.normalizeIndentation(y+k[O])}const E=k.join(l.getEOL());return E!==I.value&&(I.parent.replace(I,[new c.Text(E)]),L=void 0),!0}),y}static adjustSelection(l,h,m,_){if(m!==0||_!==0){const{positionLineNumber:f,positionColumn:v}=h,y=v-m,L=v+_,I=l.validateRange({startLineNumber:f,startColumn:y,endLineNumber:f,endColumn:L});h=C.Selection.createWithDirection(I.startLineNumber,I.startColumn,I.endLineNumber,I.endColumn,h.getDirection())}return h}static createEditsAndSnippets(l,h,m,_,f,v,y,L){const I=[],k=[];if(!l.hasModel())return{edits:I,snippets:k};const E=l.getModel(),T=l.invokeWithinContext(x=>x.get(g.IWorkspaceContextService,p.optional)),O=l.invokeWithinContext(x=>new o.ModelBasedVariableResolver(x.get(u.ILabelService,p.optional),E)),A=()=>y;let B=0,F=E.getValueInRange(n.adjustSelection(E,l.getSelection(),m,0)),D=E.getValueInRange(n.adjustSelection(E,l.getSelection(),0,_)),R=E.getLineFirstNonWhitespaceColumn(l.getSelection().positionLineNumber);const W=l.getSelections().map((x,K)=>({selection:x,idx:K})).sort((x,K)=>S.Range.compareRangesUsingStarts(x.selection,K.selection));for(const{selection:x,idx:K}of W){let Y=n.adjustSelection(E,x,m,0),ee=n.adjustSelection(E,x,0,_);F!==E.getValueInRange(Y)&&(Y=x),D!==E.getValueInRange(ee)&&(ee=x);const se=x.setStartPosition(Y.startLineNumber,Y.startColumn).setEndPosition(ee.endLineNumber,ee.endColumn),ne=new c.SnippetParser().parse(h,!0,f),le=se.getStartPosition(),X=n.adjustWhitespace(E,le,ne,v||K>0&&R!==E.getLineFirstNonWhitespaceColumn(x.positionLineNumber),!0);ne.resolveVariables(new o.CompositeSnippetVariableResolver([O,new o.ClipboardBasedVariableResolver(A,K,W.length,l.getOption(65)==="spread"),new o.SelectionBasedVariableResolver(E,x,K,L),new o.CommentBasedVariableResolver(E,x),new o.TimeBasedVariableResolver,new o.WorkspaceBasedVariableResolver(T),new o.RandomBasedVariableResolver]));const z=E.getOffsetAt(le)+B;B+=ne.toString().length-E.getValueLengthInRange(se),I[K]=w.EditOperation.replace(se,ne.toString()),I[K].identifier={major:K,minor:0},k[K]=new r(l,ne,z,X)}return{edits:I,snippets:k}}dispose(){N.dispose(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!!this._editor.hasModel()){const{edits:l,snippets:h}=n.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=h,this._editor.executeEdits("snippet",l,m=>this._snippets[0].hasPlaceholder?this._move(!0):m.filter(_=>!!_.identifier).map(_=>C.Selection.fromPositions(_.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}}merge(l,h=i){if(!!this._editor.hasModel()){this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,l]);const{edits:m,snippets:_}=n.createEditsAndSnippets(this._editor,l,h.overwriteBefore,h.overwriteAfter,!0,h.adjustWhitespace,h.clipboardText,h.overtypingCapturer);this._editor.executeEdits("snippet",m,f=>{for(const v of this._snippets)v.merge(_);return console.assert(_.length===0),this._snippets[0].hasPlaceholder?this._move(void 0):f.filter(v=>!!v.identifier).map(v=>C.Selection.fromPositions(v.range.getEndPosition()))})}}next(){const l=this._move(!0);this._editor.setSelections(l),this._editor.revealPositionInCenterIfOutsideViewport(l[0].getPosition())}prev(){const l=this._move(!1);this._editor.setSelections(l),this._editor.revealPositionInCenterIfOutsideViewport(l[0].getPosition())}_move(l){const h=[];for(const m of this._snippets){const _=m.move(l);h.push(..._)}return h}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const l=this._editor.getSelections();if(l.length<this._snippets.length)return!1;let h=new Map;for(const m of this._snippets){const _=m.computePossibleSelections();if(h.size===0)for(const[f,v]of _){v.sort(S.Range.compareRangesUsingStarts);for(const y of l)if(v[0].containsRange(y)){h.set(f,[]);break}}if(h.size===0)return!1;h.forEach((f,v)=>{f.push(..._.get(v))})}l.sort(S.Range.compareRangesUsingStarts);for(let[m,_]of h){if(_.length!==l.length){h.delete(m);continue}_.sort(S.Range.compareRangesUsingStarts);for(let f=0;f<_.length;f++)if(!_[f].containsRange(l[f])){h.delete(m);continue}}return h.size>0}}e.SnippetSession=n}),define(Q[192],J([0,1,2,13,3,21,25,117,16,77,680]),function(q,e,b,N,M,w,S,C,d,g,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const c={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let o=class ot{constructor(u,r,i){this._editor=u,this._logService=r,this._snippetListener=new b.DisposableStore,this._modelVersionId=-1,this._inSnippet=ot.InSnippetMode.bindTo(i),this._hasNextTabstop=ot.HasNextTabstop.bindTo(i),this._hasPrevTabstop=ot.HasPrevTabstop.bindTo(i)}static get(u){return u.getContribution(ot.ID)}dispose(){var u;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(u=this._session)===null||u===void 0||u.dispose(),this._snippetListener.dispose()}insert(u,r){try{this._doInsert(u,typeof r=="undefined"?c:Object.assign(Object.assign({},c),r))}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",u),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(u,r){!this._editor.hasModel()||(this._snippetListener.clear(),r.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(u,r):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new p.SnippetSession(this._editor,u,r),this._session.insert()),r.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(i=>i.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState())))}_updateState(){if(!(!this._session||!this._editor.hasModel())){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()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{choice:u}=this._session;if(!u){this._currentChoice=void 0;return}if(this._currentChoice!==u){this._currentChoice=u,this._editor.setSelections(this._editor.getSelections().map(i=>w.Selection.fromPositions(i.getStartPosition())));const[r]=u.options;C.showSimpleSuggestions(this._editor,u.options.map((i,n)=>({kind:13,label:i.value,insertText:i.value,sortText:"a".repeat(n+1),range:M.Range.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,r.value.length))})))}}finish(){for(;this._inSnippet.get();)this.next()}cancel(u=!1){var r;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),(r=this._session)===null||r===void 0||r.dispose(),this._session=void 0,this._modelVersionId=-1,u&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};o.ID="snippetController2",o.InSnippetMode=new d.RawContextKey("inSnippetMode",!1),o.HasNextTabstop=new d.RawContextKey("hasNextTabstop",!1),o.HasPrevTabstop=new d.RawContextKey("hasPrevTabstop",!1),o=Me([_e(1,g.ILogService),_e(2,d.IContextKeyService)],o),e.SnippetController2=o,N.registerEditorContribution(o.ID,o);const s=N.EditorCommand.bindToContribution(o.get);N.registerEditorCommand(new s({id:"jumpToNextSnippetPlaceholder",precondition:d.ContextKeyExpr.and(o.InSnippetMode,o.HasNextTabstop),handler:a=>a.next(),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:2}})),N.registerEditorCommand(new s({id:"jumpToPrevSnippetPlaceholder",precondition:d.ContextKeyExpr.and(o.InSnippetMode,o.HasPrevTabstop),handler:a=>a.prev(),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:1024|2}})),N.registerEditorCommand(new s({id:"leaveSnippet",precondition:o.InSnippetMode,handler:a=>a.cancel(!0),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:9,secondary:[1024|9]}})),N.registerEditorCommand(new s({id:"acceptSnippet",precondition:o.InSnippetMode,handler:a=>a.finish()}))}),define(Q[681],J([0,1,15,12,6,2,21,18,413,117,192,23,75,416,8,84,87,77]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class n{constructor(h,m,_,f){this.leadingLineContent=h.getLineContent(m.lineNumber).substr(0,m.column-1),this.leadingWord=h.getWordUntilPosition(m),this.lineNumber=m.lineNumber,this.column=m.column,this.auto=_,this.shy=f}static shouldAutoTrigger(h){if(!h.hasModel())return!1;const m=h.getModel(),_=h.getPosition();m.tokenizeIfCheap(_.lineNumber);const f=m.getWordAtPosition(_);return!(!f||f.endColumn!==_.column||!isNaN(Number(f.word)))}}e.LineContext=n;let t=class ti{constructor(h,m,_,f,v){this._editor=h,this._editorWorkerService=m,this._clipboardService=_,this._telemetryService=f,this._logService=v,this._toDispose=new w.DisposableStore,this._quickSuggestDelay=10,this._triggerCharacterListener=new w.DisposableStore,this._triggerQuickSuggest=new b.TimeoutTimer,this._state=0,this._completionDisposables=new w.DisposableStore,this._onDidCancel=new M.Emitter,this._onDidTrigger=new M.Emitter,this._onDidSuggest=new M.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new S.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(C.CompletionProviderRegistry.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(L=>{this._onCursorChange(L)}));let y=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{y=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{y=!1,this._refilterCompletionItems()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{y||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){w.dispose(this._triggerCharacterListener),w.dispose([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(74),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&this._quickSuggestDelay!==0||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),!(this._editor.getOption(75)||!this._editor.hasModel()||!this._editor.getOption(104))){const h=new Map;for(const _ of C.CompletionProviderRegistry.all(this._editor.getModel()))for(const f of _.triggerCharacters||[]){let v=h.get(f);v||(v=new Set,v.add(g.getSnippetSuggestSupport()),h.set(f,v)),v.add(_)}const m=_=>{if(!_){const y=this._editor.getPosition();_=this._editor.getModel().getLineContent(y.lineNumber).substr(0,y.column-1)}let f="";a.isLowSurrogate(_.charCodeAt(_.length-1))?a.isHighSurrogate(_.charCodeAt(_.length-2))&&(f=_.substr(_.length-2)):f=_.charAt(_.length-1);const v=h.get(f);if(v){const y=this._completionModel?{items:this._completionModel.adopt(v),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:f},Boolean(this._completionModel),v,y)}};this._triggerCharacterListener.add(this._editor.onDidType(m)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(m))}}get state(){return this._state}cancel(h=!1){var m;this._state!==0&&(this._triggerQuickSuggest.cancel(),(m=this._requestToken)===null||m===void 0||m.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:h}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!C.CompletionProviderRegistry.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1},!0))}_onCursorChange(h){if(!!this._editor.hasModel()){const m=this._editor.getModel(),_=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!h.selection.isEmpty()||h.reason!==0&&h.reason!==3||h.source!=="keyboard"&&h.source!=="deleteLeft"){this.cancel();return}if(!!C.CompletionProviderRegistry.has(m))if(this._state===0&&h.reason===0){if(this._editor.getOption(73)===!1||!_.containsRange(this._currentSelection)&&!_.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())||this._editor.getOption(101).snippetsPreventQuickSuggestions&&p.SnippetController2.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state===0&&!!n.shouldAutoTrigger(this._editor)&&!!this._editor.hasModel()){const f=this._editor.getModel(),v=this._editor.getPosition(),y=this._editor.getOption(73);if(y!==!1){if(y!==!0){f.tokenizeIfCheap(v.lineNumber);const L=f.getLineTokens(v.lineNumber),I=L.getStandardTokenType(L.findTokenIndexAtOffset(Math.max(v.column-1-1,0)));if(!(y.other&&I===0||y.comments&&I===1||y.strings&&I===2))return}this.trigger({auto:!0,shy:!1})}}},this._quickSuggestDelay)}else this._state!==0&&h.reason===3&&this._refilterCompletionItems()}}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state!==0&&!!this._editor.hasModel()){const h=this._editor.getModel(),m=this._editor.getPosition(),_=new n(h,m,this._state===2,!1);this._onNewContext(_)}})}trigger(h,m=!1,_,f){var v;if(!!this._editor.hasModel()){const y=this._editor.getModel(),L=h.auto,I=new n(y,this._editor.getPosition(),L,h.shy);this.cancel(m),this._state=L?2:1,this._onDidTrigger.fire({auto:L,shy:h.shy,position:this._editor.getPosition()}),this._context=I;let k={triggerKind:(v=h.triggerKind)!==null&&v!==void 0?v:0};h.triggerCharacter&&(k={triggerKind:1,triggerCharacter:h.triggerCharacter}),this._requestToken=new c.CancellationTokenSource;const E=this._editor.getOption(96);let T=1;switch(E){case"top":T=0;break;case"bottom":T=2;break}const O=ti._createItemKindFilter(this._editor),A=s.WordDistance.create(this._editorWorkerService,this._editor),B=g.provideSuggestionItems(y,this._editor.getPosition(),new g.CompletionOptions(T,O,_),k,this._requestToken.token);Promise.all([B,A]).then(([F,D])=>Ie(this,void 0,void 0,function*(){var R;if((R=this._requestToken)===null||R===void 0||R.dispose(),!!this._editor.hasModel()){let W=f==null?void 0:f.clipboardText;if(!W&&F.needsClipboard&&(W=yield this._clipboardService.readText()),this._state!==0){const x=this._editor.getModel();let K=F.items;if(f){const ee=g.getSuggestionComparator(T);K=K.concat(f.items).sort(ee)}const Y=new n(x,this._editor.getPosition(),L,h.shy);this._completionModel=new d.CompletionModel(K,this._context.column,{leadingLineContent:Y.leadingLineContent,characterCountDelta:Y.column-this._context.column},D,this._editor.getOption(101),this._editor.getOption(96),W),this._completionDisposables.add(F.disposable),this._onNewContext(Y),this._reportDurationsTelemetry(F.durations)}}})).catch(N.onUnexpectedError)}}_reportDurationsTelemetry(h){this._telemetryGate++%230==0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(h)}),this._logService.debug("suggest.durations.json",h)})}static _createItemKindFilter(h){const m=new Set;h.getOption(96)==="none"&&m.add(27);const f=h.getOption(101);return f.showMethods||m.add(0),f.showFunctions||m.add(1),f.showConstructors||m.add(2),f.showFields||m.add(3),f.showVariables||m.add(4),f.showClasses||m.add(5),f.showStructs||m.add(6),f.showInterfaces||m.add(7),f.showModules||m.add(8),f.showProperties||m.add(9),f.showEvents||m.add(10),f.showOperators||m.add(11),f.showUnits||m.add(12),f.showValues||m.add(13),f.showConstants||m.add(14),f.showEnums||m.add(15),f.showEnumMembers||m.add(16),f.showKeywords||m.add(17),f.showWords||m.add(18),f.showColors||m.add(19),f.showFiles||m.add(20),f.showReferences||m.add(21),f.showColors||m.add(22),f.showFolders||m.add(23),f.showTypeParameters||m.add(24),f.showSnippets||m.add(27),f.showUsers||m.add(25),f.showIssues||m.add(26),m}_onNewContext(h){if(!!this._context){if(h.lineNumber!==this._context.lineNumber){this.cancel();return}if(a.getLeadingWhitespace(h.leadingLineContent)!==a.getLeadingWhitespace(this._context.leadingLineContent)){this.cancel();return}if(h.column<this._context.column){h.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();return}if(!!this._completionModel){if(h.leadingWord.word.length!==0&&h.leadingWord.startColumn>this._context.leadingWord.startColumn){const m=new Set(C.CompletionProviderRegistry.all(this._editor.getModel()));for(let f of this._completionModel.allProvider)m.delete(f);const _=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,m,{items:_,clipboardText:this._completionModel.clipboardText});return}if(h.column>this._context.column&&this._completionModel.incomplete.size>0&&h.leadingWord.word.length!==0){const{incomplete:m}=this._completionModel,_=this._completionModel.adopt(m);this.trigger({auto:this._state===2,shy:!1,triggerKind:2},!0,m,{items:_,clipboardText:this._completionModel.clipboardText})}else{let m=this._completionModel.lineContext,_=!1;if(this._completionModel.lineContext={leadingLineContent:h.leadingLineContent,characterCountDelta:h.column-this._context.column},this._completionModel.items.length===0){if(n.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<h.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=m,_=this._completionModel.items.length>0,_&&h.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:_})}}}}};t=Me([_e(1,o.IEditorWorkerService),_e(2,u.IClipboardService),_e(3,r.ITelemetryService),_e(4,i.ILogService)],t),e.SuggestModel=t}),define(Q[682],J([0,1,47,19,12,39,2,70,13,62,3,25,192,131,576,507,26,16,9,86,117,548,681,666,549,6,15,20,414,415,14,17,34,23,77,81]),function(q,e,b,N,M,w,S,C,d,g,p,c,o,s,a,u,r,i,n,t,l,h,m,_,f,v,y,L,I,k,E,T,O,A,B,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;let D=!1;class R{constructor(se,ne){if(this._model=se,this._position=ne,se.getLineMaxColumn(ne.lineNumber)!==ne.column){const X=se.getOffsetAt(ne),z=se.getPositionAt(X+1);this._marker=se.deltaDecorations([],[{range:p.Range.fromPositions(ne,z),options:{stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(se){if(this._model.isDisposed()||this._position.lineNumber!==se.lineNumber)return 0;if(this._marker){const ne=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(ne.getStartPosition())-this._model.getOffsetAt(se)}else return this._model.getLineMaxColumn(se.lineNumber)-se.column}}let W=class ii{constructor(se,ne,le,X,z,P){this._memoryService=ne,this._commandService=le,this._contextKeyService=X,this._instantiationService=z,this._logService=P,this._lineSuffix=new S.MutableDisposable,this._toDispose=new S.DisposableStore,this.editor=se,this.model=z.createInstance(m.SuggestModel,this.editor);const V=l.Context.InsertMode.bindTo(X);V.set(se.getOption(101).insertMode),this.model.onDidTrigger(()=>V.set(se.getOption(101).insertMode)),this.widget=this._toDispose.add(new y.IdleValue(()=>{const $=this._instantiationService.createInstance(_.SuggestWidget,this.editor);this._toDispose.add($),this._toDispose.add($.onDidSelect(j=>this._insertSuggestion(j,0),this));const ie=new I.CommitCharacterController(this.editor,$,j=>this._insertSuggestion(j,2));this._toDispose.add(ie),this._toDispose.add(this.model.onDidSuggest(j=>{j.completionModel.items.length===0&&ie.reset()}));const oe=l.Context.MakesTextEdit.bindTo(this._contextKeyService),ae=l.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),G=l.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(S.toDisposable(()=>{oe.reset(),ae.reset(),G.reset()})),this._toDispose.add($.onDidFocus(({item:j})=>{const te=this.editor.getPosition(),Z=j.editStart.column,ue=te.column;let he=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!j.completion.command&&!j.completion.additionalTextEdits&&!(j.completion.insertTextRules&4)&&ue-Z===j.completion.insertText.length&&(he=this.editor.getModel().getValueInRange({startLineNumber:te.lineNumber,startColumn:Z,endLineNumber:te.lineNumber,endColumn:ue})!==j.completion.insertText),oe.set(he),ae.set(!E.Position.equals(j.editInsertEnd,j.editReplaceEnd)),G.set(Boolean(j.provider.resolveCompletionItem)||Boolean(j.completion.documentation)||j.completion.detail!==j.completion.label)})),this._toDispose.add($.onDetailsKeyDown(j=>{if(j.toKeybinding().equals(new w.SimpleKeybinding(!0,!1,!1,!1,33))||T.isMacintosh&&j.toKeybinding().equals(new w.SimpleKeybinding(!1,!1,!1,!0,33))){j.stopPropagation();return}j.toKeybinding().isModifierKey()||this.editor.focus()})),$})),this._overtypingCapturer=this._toDispose.add(new y.IdleValue(()=>this._toDispose.add(new k.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new y.IdleValue(()=>this._toDispose.add(new h.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(z.createInstance(f.WordContextKey,se)),this._toDispose.add(this.model.onDidTrigger($=>{this.widget.value.showTriggered($.auto,$.shy?250:50),this._lineSuffix.value=new R(this.editor.getModel(),$.position)})),this._toDispose.add(this.model.onDidSuggest($=>{if(!$.shy){let ie=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),$.completionModel.items);this.widget.value.showSuggestions($.completionModel,ie,$.isFrozen,$.auto)}})),this._toDispose.add(this.model.onDidCancel($=>{$.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{D||(this.model.cancel(),this.model.clear())}));let U=l.Context.AcceptSuggestionsOnEnter.bindTo(X),H=()=>{const $=this.editor.getOption(1);U.set($==="on"||$==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>H())),H()}static get(se){return se.getContribution(ii.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(se,ne){if(!se||!se.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!!this.editor.hasModel()){const le=this.editor.getModel(),X=le.getAlternativeVersionId(),{item:z}=se,P=[],V=new A.CancellationTokenSource;ne&1||this.editor.pushUndoStop();const U=this.getOverwriteInfo(z,Boolean(ne&8));if(this._memoryService.memorize(le,this.editor.getPosition(),z),Array.isArray(z.completion.additionalTextEdits)){const $=C.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",z.completion.additionalTextEdits.map(ie=>g.EditOperation.replace(p.Range.lift(ie.range),ie.text))),$.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!z.isResolved){const $=new F.StopWatch(!0);let ie;const oe=le.onDidChangeContent(te=>{if(te.isFlush){V.cancel(),oe.dispose();return}for(let Z of te.changes){const ue=p.Range.getEndPosition(Z.range);(!ie||E.Position.isBefore(ue,ie))&&(ie=ue)}});let ae=ne;ne|=2;let G=!1,j=this.editor.onWillType(()=>{j.dispose(),G=!0,ae&2||this.editor.pushUndoStop()});P.push(z.resolve(V.token).then(()=>{if(!z.completion.additionalTextEdits||V.token.isCancellationRequested||ie&&z.completion.additionalTextEdits.some(Z=>E.Position.isBefore(ie,p.Range.getStartPosition(Z.range))))return!1;G&&this.editor.pushUndoStop();const te=C.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",z.completion.additionalTextEdits.map(Z=>g.EditOperation.replace(p.Range.lift(Z.range),Z.text))),te.restoreRelativeVerticalPositionOfCursor(this.editor),(G||!(ae&2))&&this.editor.pushUndoStop(),!0}).then(te=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",$.elapsed(),te),oe.dispose(),j.dispose()}))}let{insertText:H}=z.completion;z.completion.insertTextRules&4||(H=s.SnippetParser.escape(H)),o.SnippetController2.get(this.editor).insert(H,{overwriteBefore:U.overwriteBefore,overwriteAfter:U.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(z.completion.insertTextRules&1),clipboardText:se.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),ne&2||this.editor.pushUndoStop(),z.completion.command?z.completion.command.id===x.id?this.model.trigger({auto:!0,shy:!1},!0):(P.push(this._commandService.executeCommand(z.completion.command.id,...z.completion.command.arguments?[...z.completion.command.arguments]:[]).catch(M.onUnexpectedError)),this.model.cancel()):this.model.cancel(),ne&4&&this._alternatives.value.set(se,$=>{for(V.cancel();le.canUndo();){X!==le.getAlternativeVersionId()&&le.undo(),this._insertSuggestion($,1|2|(ne&8?8:0));break}}),this._alertCompletionItem(z),Promise.all(P).finally(()=>{this.model.clear(),V.dispose()})}}getOverwriteInfo(se,ne){L.assertType(this.editor.hasModel());let le=this.editor.getOption(101).insertMode==="replace";ne&&(le=!le);const X=se.position.column-se.editStart.column,z=(le?se.editReplaceEnd.column:se.editInsertEnd.column)-se.position.column,P=this.editor.getPosition().column-se.position.column,V=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:X+P,overwriteAfter:z+V}}_alertCompletionItem({completion:se}){const ne=typeof se.label=="string"?se.label:se.label.name;if(N.isNonEmptyArray(se.additionalTextEdits)){let le=u.localize(0,null,ne,se.additionalTextEdits.length);b.alert(le)}}triggerSuggest(se){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,se),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}triggerSuggestAndAcceptBest(se){if(!!this.editor.hasModel()){const ne=this.editor.getPosition(),le=()=>{ne.equals(this.editor.getPosition())&&this._commandService.executeCommand(se.fallback)},X=z=>{if(z.completion.insertTextRules&4||z.completion.additionalTextEdits)return!0;const P=this.editor.getPosition(),V=z.editStart.column,U=P.column;return U-V!==z.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:P.lineNumber,startColumn:V,endLineNumber:P.lineNumber,endColumn:U})!==z.completion.insertText};v.Event.once(this.model.onDidTrigger)(z=>{let P=[];v.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{S.dispose(P),le()},void 0,P),this.model.onDidSuggest(({completionModel:V})=>{if(S.dispose(P),V.items.length===0){le();return}const U=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),V.items),H=V.items[U];if(!X(H)){le();return}this.editor.pushUndoStop(),this._insertSuggestion({index:U,item:H,model:V},4|1|2)},void 0,P)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(ne.lineNumber,0),this.editor.focus()}}acceptSelectedSuggestion(se,ne){const le=this.widget.value.getFocusedItem();let X=0;se&&(X|=4),ne&&(X|=8),this._insertSuggestion(le,X)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}};W.ID="editor.contrib.suggestController",W=Me([_e(1,a.ISuggestMemoryService),_e(2,r.ICommandService),_e(3,i.IContextKeyService),_e(4,n.IInstantiationService),_e(5,B.ILogService)],W),e.SuggestController=W;class x extends d.EditorAction{constructor(){super({id:x.id,label:u.localize(1,null),alias:"Trigger Suggest",precondition:i.ContextKeyExpr.and(c.EditorContextKeys.writable,c.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[512|9,2048|39]},weight:100}})}run(se,ne){const le=W.get(ne);!le||le.triggerSuggest()}}e.TriggerSuggestAction=x,x.id="editor.action.triggerSuggest",d.registerEditorContribution(W.ID,W),d.registerEditorAction(x);const K=100+90,Y=d.EditorCommand.bindToContribution(W.get);d.registerEditorCommand(new Y({id:"acceptSelectedSuggestion",precondition:l.Context.Visible,handler(ee){ee.acceptSelectedSuggestion(!0,!1)}})),t.KeybindingsRegistry.registerKeybindingRule({id:"acceptSelectedSuggestion",when:i.ContextKeyExpr.and(l.Context.Visible,c.EditorContextKeys.textInputFocus),primary:2,weight:K}),t.KeybindingsRegistry.registerKeybindingRule({id:"acceptSelectedSuggestion",when:i.ContextKeyExpr.and(l.Context.Visible,c.EditorContextKeys.textInputFocus,l.Context.AcceptSuggestionsOnEnter,l.Context.MakesTextEdit),primary:3,weight:K}),O.MenuRegistry.appendMenuItem(l.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:u.localize(2,null)},group:"left",order:1,when:l.Context.HasInsertAndReplaceRange.toNegated()}),O.MenuRegistry.appendMenuItem(l.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:u.localize(3,null)},group:"left",order:1,when:i.ContextKeyExpr.and(l.Context.HasInsertAndReplaceRange,l.Context.InsertMode.isEqualTo("insert"))}),O.MenuRegistry.appendMenuItem(l.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:u.localize(4,null)},group:"left",order:1,when:i.ContextKeyExpr.and(l.Context.HasInsertAndReplaceRange,l.Context.InsertMode.isEqualTo("replace"))}),d.registerEditorCommand(new Y({id:"acceptAlternativeSelectedSuggestion",precondition:i.ContextKeyExpr.and(l.Context.Visible,c.EditorContextKeys.textInputFocus),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|3,secondary:[1024|2]},handler(ee){ee.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:l.suggestWidgetStatusbarMenu,group:"left",order:2,when:i.ContextKeyExpr.and(l.Context.HasInsertAndReplaceRange,l.Context.InsertMode.isEqualTo("insert")),title:u.localize(5,null)},{menuId:l.suggestWidgetStatusbarMenu,group:"left",order:2,when:i.ContextKeyExpr.and(l.Context.HasInsertAndReplaceRange,l.Context.InsertMode.isEqualTo("replace")),title:u.localize(6,null)}]})),r.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),d.registerEditorCommand(new Y({id:"hideSuggestWidget",precondition:l.Context.Visible,handler:ee=>ee.cancelSuggestWidget(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})),d.registerEditorCommand(new Y({id:"selectNextSuggestion",precondition:i.ContextKeyExpr.and(l.Context.Visible,l.Context.MultipleSuggestions),handler:ee=>ee.selectNextSuggestion(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:18,secondary:[2048|18],mac:{primary:18,secondary:[2048|18,256|44]}}})),d.registerEditorCommand(new Y({id:"selectNextPageSuggestion",precondition:i.ContextKeyExpr.and(l.Context.Visible,l.Context.MultipleSuggestions),handler:ee=>ee.selectNextPageSuggestion(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:12,secondary:[2048|12]}})),d.registerEditorCommand(new Y({id:"selectLastSuggestion",precondition:i.ContextKeyExpr.and(l.Context.Visible,l.Context.MultipleSuggestions),handler:ee=>ee.selectLastSuggestion()})),d.registerEditorCommand(new Y({id:"selectPrevSuggestion",precondition:i.ContextKeyExpr.and(l.Context.Visible,l.Context.MultipleSuggestions),handler:ee=>ee.selectPrevSuggestion(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:16,secondary:[2048|16],mac:{primary:16,secondary:[2048|16,256|46]}}})),d.registerEditorCommand(new Y({id:"selectPrevPageSuggestion",precondition:i.ContextKeyExpr.and(l.Context.Visible,l.Context.MultipleSuggestions),handler:ee=>ee.selectPrevPageSuggestion(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:11,secondary:[2048|11]}})),d.registerEditorCommand(new Y({id:"selectFirstSuggestion",precondition:i.ContextKeyExpr.and(l.Context.Visible,l.Context.MultipleSuggestions),handler:ee=>ee.selectFirstSuggestion()})),d.registerEditorCommand(new Y({id:"toggleSuggestionDetails",precondition:l.Context.Visible,handler:ee=>ee.toggleSuggestionDetails(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|10,mac:{primary:256|10}},menuOpts:[{menuId:l.suggestWidgetStatusbarMenu,group:"right",order:1,when:i.ContextKeyExpr.and(l.Context.DetailsVisible,l.Context.CanResolve),title:u.localize(7,null)},{menuId:l.suggestWidgetStatusbarMenu,group:"right",order:1,when:i.ContextKeyExpr.and(l.Context.DetailsVisible.toNegated(),l.Context.CanResolve),title:u.localize(8,null)}]})),d.registerEditorCommand(new Y({id:"toggleExplainMode",precondition:l.Context.Visible,handler:ee=>ee.toggleExplainMode(),kbOpts:{weight:100,primary:2048|85}})),d.registerEditorCommand(new Y({id:"toggleSuggestionFocus",precondition:l.Context.Visible,handler:ee=>ee.toggleSuggestionFocus(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|512|10,mac:{primary:256|512|10}}})),d.registerEditorCommand(new Y({id:"insertBestCompletion",precondition:i.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus,i.ContextKeyExpr.equals("config.editor.tabCompletion","on"),f.WordContextKey.AtEnd,l.Context.Visible.toNegated(),h.SuggestAlternatives.OtherSuggestions.toNegated(),o.SnippetController2.InSnippetMode.toNegated()),handler:(ee,se)=>{ee.triggerSuggestAndAcceptBest(L.isObject(se)?Object.assign({fallback:"tab"},se):{fallback:"tab"})},kbOpts:{weight:K,primary:2}})),d.registerEditorCommand(new Y({id:"insertNextSuggestion",precondition:i.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus,i.ContextKeyExpr.equals("config.editor.tabCompletion","on"),h.SuggestAlternatives.OtherSuggestions,l.Context.Visible.toNegated(),o.SnippetController2.InSnippetMode.toNegated()),handler:ee=>ee.acceptNextSuggestion(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:2}})),d.registerEditorCommand(new Y({id:"insertPrevSuggestion",precondition:i.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus,i.ContextKeyExpr.equals("config.editor.tabCompletion","on"),h.SuggestAlternatives.OtherSuggestions,l.Context.Visible.toNegated(),o.SnippetController2.InSnippetMode.toNegated()),handler:ee=>ee.acceptPrevSuggestion(),kbOpts:{weight:K,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|2}})),d.registerEditorAction(class extends d.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:u.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(ee,se){W.get(se).resetWidgetSize()}})}),define(Q[683],J([0,1,188,143,266,215,611,612,613,614,615,635,618,670,619,620,621,622,267,659,623,624,545,271,272,268,273,629,630,628,631,632,633,662,664,636,637,192,682,638,264,639,671,640,265,641,64,123]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})});var mt=this&&this.__createBinding||(Object.create?function(q,e,b,N){N===void 0&&(N=b),Object.defineProperty(q,N,{enumerable:!0,get:function(){return e[b]}})}:function(q,e,b,N){N===void 0&&(N=b),q[N]=e[b]}),pt=this&&this.__exportStar||function(q,e){for(var b in q)b!=="default"&&!Object.prototype.hasOwnProperty.call(e,b)&&mt(e,q,b)};define(Q[686],J([0,1,677,683,642,643,644,573,646,647,645,672,648]),function(q,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),pt(b,e)})}).call(this);
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-typescript version: 4.3.1(d4e91e07d8144e428885c93029b3d3cbf1994c33)
* Released under the MIT license
* https://github.com/Microsoft/monaco-typescript/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/language/typescript/lib/typescriptServicesMetadata",["require","exports"],(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typescriptVersion=void 0,e.typescriptVersion="4.2.3"})),define("vs/language/typescript/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/language/typescript/monaco.contribution",["require","exports","./lib/typescriptServicesMetadata","./fillers/monaco-editor-core"],(function(t,e,i,n){"use strict";var r,o,s,a,c;Object.defineProperty(e,"__esModule",{value:!0}),e.getJavaScriptWorker=e.getTypeScriptWorker=e.javascriptDefaults=e.typescriptDefaults=e.typescriptVersion=e.ModuleResolutionKind=e.ScriptTarget=e.NewLineKind=e.JsxEmit=e.ModuleKind=void 0,function(t){t[t.None=0]="None",t[t.CommonJS=1]="CommonJS",t[t.AMD=2]="AMD",t[t.UMD=3]="UMD",t[t.System=4]="System",t[t.ES2015=5]="ES2015",t[t.ESNext=99]="ESNext"}(r=e.ModuleKind||(e.ModuleKind={})),function(t){t[t.None=0]="None",t[t.Preserve=1]="Preserve",t[t.React=2]="React",t[t.ReactNative=3]="ReactNative",t[t.ReactJSX=4]="ReactJSX",t[t.ReactJSXDev=5]="ReactJSXDev"}(o=e.JsxEmit||(e.JsxEmit={})),function(t){t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed"}(s=e.NewLineKind||(e.NewLineKind={})),function(t){t[t.ES3=0]="ES3",t[t.ES5=1]="ES5",t[t.ES2015=2]="ES2015",t[t.ES2016=3]="ES2016",t[t.ES2017=4]="ES2017",t[t.ES2018=5]="ES2018",t[t.ES2019=6]="ES2019",t[t.ES2020=7]="ES2020",t[t.ESNext=99]="ESNext",t[t.JSON=100]="JSON",t[t.Latest=99]="Latest"}(a=e.ScriptTarget||(e.ScriptTarget={})),function(t){t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs"}(c=e.ModuleResolutionKind||(e.ModuleResolutionKind={}));var p=function(){function t(t,e,i){this._onDidChange=new n.Emitter,this._onDidExtraLibsChange=new n.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(t),this.setDiagnosticsOptions(e),this.setWorkerOptions(i),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(t.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),t.prototype.getExtraLibs=function(){return this._extraLibs},t.prototype.addExtraLib=function(t,e){var i,n=this;if(i=void 0===e?"ts:extralib-"+Math.random().toString(36).substring(2,15):e,this._extraLibs[i]&&this._extraLibs[i].content===t)return{dispose:function(){}};var r=1;return this._removedExtraLibs[i]&&(r=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(r=this._extraLibs[i].version+1),this._extraLibs[i]={content:t,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var t=n._extraLibs[i];t&&t.version===r&&(delete n._extraLibs[i],n._removedExtraLibs[i]=r,n._fireOnDidExtraLibsChangeSoon())}}},t.prototype.setExtraLibs=function(t){for(var e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),t&&t.length>0)for(var i=0,n=t;i<n.length;i++){var r=n[i],o=(e=r.filePath||"ts:extralib-"+Math.random().toString(36).substring(2,15),r.content),s=1;this._removedExtraLibs[e]&&(s=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:o,version:s}}this._fireOnDidExtraLibsChangeSoon()},t.prototype._fireOnDidExtraLibsChangeSoon=function(){var t=this;-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=setTimeout((function(){t._onDidExtraLibsChangeTimeout=-1,t._onDidExtraLibsChange.fire(void 0)}),0))},t.prototype.getCompilerOptions=function(){return this._compilerOptions},t.prototype.setCompilerOptions=function(t){this._compilerOptions=t||Object.create(null),this._onDidChange.fire(void 0)},t.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},t.prototype.setDiagnosticsOptions=function(t){this._diagnosticsOptions=t||Object.create(null),this._onDidChange.fire(void 0)},t.prototype.setWorkerOptions=function(t){this._workerOptions=t||Object.create(null),this._onDidChange.fire(void 0)},t.prototype.setMaximumWorkerIdleTime=function(t){},t.prototype.setEagerModelSync=function(t){this._eagerModelSync=t},t.prototype.getEagerModelSync=function(){return this._eagerModelSync},t}();e.typescriptVersion=i.typescriptVersion,e.typescriptDefaults=new p({allowNonTsExtensions:!0,target:a.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1},{}),e.javascriptDefaults=new p({allowNonTsExtensions:!0,allowJs:!0,target:a.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1},{});e.getTypeScriptWorker=function(){return u().then((function(t){return t.getTypeScriptWorker()}))};function u(){return new Promise((function(e,i){t(["./tsMode"],e,i)}))}e.getJavaScriptWorker=function(){return u().then((function(t){return t.getJavaScriptWorker()}))},n.languages.typescript={ModuleKind:r,JsxEmit:o,NewLineKind:s,ScriptTarget:a,ModuleResolutionKind:c,typescriptVersion:e.typescriptVersion,typescriptDefaults:e.typescriptDefaults,javascriptDefaults:e.javascriptDefaults,getTypeScriptWorker:e.getTypeScriptWorker,getJavaScriptWorker:e.getJavaScriptWorker},n.languages.onLanguage("typescript",(function(){return u().then((function(t){return t.setupTypeScript(e.typescriptDefaults)}))})),n.languages.onLanguage("javascript",(function(){return u().then((function(t){return t.setupJavaScript(e.javascriptDefaults)}))}))}));
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-css version: 3.3.0(ed57760e69ec24098de2b4e49fa5be7f48be019a)
* Released under the MIT license
* https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/language/css/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/language/css/monaco.contribution",["require","exports","./fillers/monaco-editor-core"],(function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.lessDefaults=n.scssDefaults=n.cssDefaults=void 0;var o=function(){function e(e,n,o){this._onDidChange=new t.Emitter,this._languageId=e,this.setDiagnosticsOptions(n),this.setModeConfiguration(o)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),s={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"}},i={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0};function r(){return new Promise((function(n,t){e(["./cssMode"],n,t)}))}n.cssDefaults=new o("css",s,i),n.scssDefaults=new o("scss",s,i),n.lessDefaults=new o("less",s,i),t.languages.css={cssDefaults:n.cssDefaults,lessDefaults:n.lessDefaults,scssDefaults:n.scssDefaults},t.languages.onLanguage("less",(function(){r().then((function(e){return e.setupMode(n.lessDefaults)}))})),t.languages.onLanguage("scss",(function(){r().then((function(e){return e.setupMode(n.scssDefaults)}))})),t.languages.onLanguage("css",(function(){r().then((function(e){return e.setupMode(n.cssDefaults)}))}))}));
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-json version: 3.4.0(a61dba6bc59a36a9a7e3092a93ad1260c5786b4f)
* Released under the MIT license
* https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/language/json/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/language/json/monaco.contribution",["require","exports","./fillers/monaco-editor-core"],(function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsonDefaults=void 0;var o=function(){function e(e,n,o){this._onDidChange=new t.Emitter,this._languageId=e,this.setDiagnosticsOptions(n),this.setModeConfiguration(o)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}();n.jsonDefaults=new o("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0}),t.languages.json={jsonDefaults:n.jsonDefaults},t.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),t.languages.onLanguage("json",(function(){new Promise((function(n,t){e(["./jsonMode"],n,t)})).then((function(e){return e.setupMode(n.jsonDefaults)}))}))}));
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-html version: 3.3.0(2a94362905dce7bcd84ac5dab72aa5ad6610a2e2)
* Released under the MIT license
* https://github.com/Microsoft/monaco-html/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/language/html/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/language/html/monaco.contribution",["require","exports","./fillers/monaco-editor-core"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.razorDefaults=t.handlebarDefaults=t.htmlDefaults=void 0;var o=function(){function e(e,t,o){this._onDidChange=new n.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(o)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),e.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),a={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},r={format:a,suggest:{html5:!0,angular1:!0,ionic:!0}},i={format:a,suggest:{html5:!0}},u={format:a,suggest:{html5:!0,razor:!0}};function s(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===l,documentFormattingEdits:e===l,documentRangeFormattingEdits:e===l}}var l="html",f="handlebars",g="razor";function c(){return new Promise((function(t,n){e(["./htmlMode"],t,n)}))}t.htmlDefaults=new o(l,r,s(l)),t.handlebarDefaults=new o(f,i,s(f)),t.razorDefaults=new o(g,u,s(g)),n.languages.html={htmlDefaults:t.htmlDefaults,razorDefaults:t.razorDefaults,handlebarDefaults:t.handlebarDefaults},n.languages.onLanguage(l,(function(){c().then((function(e){return e.setupMode(t.htmlDefaults)}))})),n.languages.onLanguage(f,(function(){c().then((function(e){return e.setupMode(t.handlebarDefaults)}))})),n.languages.onLanguage(g,(function(){c().then((function(e){return e.setupMode(t.razorDefaults)}))}))}));
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-languages version: 2.3.0(57af10ae0184db4e0f7f9a92ff972629c39ccb53)
* Released under the MIT license
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/basic-languages/_.contribution",["require","exports","./fillers/monaco-editor-core"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.registerLanguage=i.loadLanguage=void 0;var n={},s={},r=function(){function e(e){var i=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,t){i._lazyLoadPromiseResolve=e,i._lazyLoadPromiseReject=t}))}return e.getOrCreate=function(i){return s[i]||(s[i]=new e(i)),s[i]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,n[this._languageId].loader().then((function(i){return e._lazyLoadPromiseResolve(i)}),(function(i){return e._lazyLoadPromiseReject(i)}))),this._lazyLoadPromise},e}();i.loadLanguage=function(e){return r.getOrCreate(e).load()},i.registerLanguage=function(e){var i=e.id;n[i]=e,t.languages.register(e);var s=r.getOrCreate(i);t.languages.setMonarchTokensProvider(i,s.whenLoaded().then((function(e){return e.language}))),t.languages.onLanguage(i,(function(){s.load().then((function(e){t.languages.setLanguageConfiguration(i,e.conf)}))}))}})),define("vs/basic-languages/abap/abap.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return new Promise((function(i,t){e(["./abap"],i,t)}))}})})),define("vs/basic-languages/apex/apex.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return new Promise((function(i,t){e(["./apex"],i,t)}))}})})),define("vs/basic-languages/azcli/azcli.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return new Promise((function(i,t){e(["./azcli"],i,t)}))}})})),define("vs/basic-languages/bat/bat.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return new Promise((function(i,t){e(["./bat"],i,t)}))}})})),define("vs/basic-languages/cameligo/cameligo.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return new Promise((function(i,t){e(["./cameligo"],i,t)}))}})})),define("vs/basic-languages/clojure/clojure.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return new Promise((function(i,t){e(["./clojure"],i,t)}))}})})),define("vs/basic-languages/coffee/coffee.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return new Promise((function(i,t){e(["./coffee"],i,t)}))}})})),define("vs/basic-languages/cpp/cpp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return new Promise((function(i,t){e(["./cpp"],i,t)}))}}),t.registerLanguage({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return new Promise((function(i,t){e(["./cpp"],i,t)}))}})})),define("vs/basic-languages/csharp/csharp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return new Promise((function(i,t){e(["./csharp"],i,t)}))}})})),define("vs/basic-languages/csp/csp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return new Promise((function(i,t){e(["./csp"],i,t)}))}})})),define("vs/basic-languages/css/css.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return new Promise((function(i,t){e(["./css"],i,t)}))}})})),define("vs/basic-languages/dart/dart.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return new Promise((function(i,t){e(["./dart"],i,t)}))}})})),define("vs/basic-languages/dockerfile/dockerfile.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return new Promise((function(i,t){e(["./dockerfile"],i,t)}))}})})),define("vs/basic-languages/ecl/ecl.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return new Promise((function(i,t){e(["./ecl"],i,t)}))}})})),define("vs/basic-languages/fsharp/fsharp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return new Promise((function(i,t){e(["./fsharp"],i,t)}))}})})),define("vs/basic-languages/go/go.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return new Promise((function(i,t){e(["./go"],i,t)}))}})})),define("vs/basic-languages/graphql/graphql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return new Promise((function(i,t){e(["./graphql"],i,t)}))}})})),define("vs/basic-languages/handlebars/handlebars.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars"],mimetypes:["text/x-handlebars-template"],loader:function(){return new Promise((function(i,t){e(["./handlebars"],i,t)}))}})})),define("vs/basic-languages/hcl/hcl.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return new Promise((function(i,t){e(["./hcl"],i,t)}))}})})),define("vs/basic-languages/html/html.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return new Promise((function(i,t){e(["./html"],i,t)}))}})})),define("vs/basic-languages/ini/ini.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return new Promise((function(i,t){e(["./ini"],i,t)}))}})})),define("vs/basic-languages/java/java.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return new Promise((function(i,t){e(["./java"],i,t)}))}})})),define("vs/basic-languages/javascript/javascript.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return new Promise((function(i,t){e(["./javascript"],i,t)}))}})})),define("vs/basic-languages/julia/julia.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return new Promise((function(i,t){e(["./julia"],i,t)}))}})})),define("vs/basic-languages/kotlin/kotlin.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return new Promise((function(i,t){e(["./kotlin"],i,t)}))}})})),define("vs/basic-languages/less/less.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return new Promise((function(i,t){e(["./less"],i,t)}))}})})),define("vs/basic-languages/lexon/lexon.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return new Promise((function(i,t){e(["./lexon"],i,t)}))}})})),define("vs/basic-languages/lua/lua.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return new Promise((function(i,t){e(["./lua"],i,t)}))}})})),define("vs/basic-languages/m3/m3.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return new Promise((function(i,t){e(["./m3"],i,t)}))}})})),define("vs/basic-languages/markdown/markdown.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return new Promise((function(i,t){e(["./markdown"],i,t)}))}})})),define("vs/basic-languages/mips/mips.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return new Promise((function(i,t){e(["./mips"],i,t)}))}})})),define("vs/basic-languages/msdax/msdax.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return new Promise((function(i,t){e(["./msdax"],i,t)}))}})})),define("vs/basic-languages/mysql/mysql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return new Promise((function(i,t){e(["./mysql"],i,t)}))}})})),define("vs/basic-languages/objective-c/objective-c.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return new Promise((function(i,t){e(["./objective-c"],i,t)}))}})})),define("vs/basic-languages/pascal/pascal.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return new Promise((function(i,t){e(["./pascal"],i,t)}))}})})),define("vs/basic-languages/pascaligo/pascaligo.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return new Promise((function(i,t){e(["./pascaligo"],i,t)}))}})})),define("vs/basic-languages/perl/perl.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return new Promise((function(i,t){e(["./perl"],i,t)}))}})})),define("vs/basic-languages/pgsql/pgsql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return new Promise((function(i,t){e(["./pgsql"],i,t)}))}})})),define("vs/basic-languages/php/php.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return new Promise((function(i,t){e(["./php"],i,t)}))}})})),define("vs/basic-languages/postiats/postiats.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return new Promise((function(i,t){e(["./postiats"],i,t)}))}})})),define("vs/basic-languages/powerquery/powerquery.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return new Promise((function(i,t){e(["./powerquery"],i,t)}))}})})),define("vs/basic-languages/powershell/powershell.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return new Promise((function(i,t){e(["./powershell"],i,t)}))}})})),define("vs/basic-languages/pug/pug.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return new Promise((function(i,t){e(["./pug"],i,t)}))}})})),define("vs/basic-languages/python/python.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return new Promise((function(i,t){e(["./python"],i,t)}))}})})),define("vs/basic-languages/r/r.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return new Promise((function(i,t){e(["./r"],i,t)}))}})})),define("vs/basic-languages/razor/razor.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return new Promise((function(i,t){e(["./razor"],i,t)}))}})})),define("vs/basic-languages/redis/redis.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return new Promise((function(i,t){e(["./redis"],i,t)}))}})})),define("vs/basic-languages/redshift/redshift.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return new Promise((function(i,t){e(["./redshift"],i,t)}))}})})),define("vs/basic-languages/restructuredtext/restructuredtext.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return new Promise((function(i,t){e(["./restructuredtext"],i,t)}))}})})),define("vs/basic-languages/ruby/ruby.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return new Promise((function(i,t){e(["./ruby"],i,t)}))}})})),define("vs/basic-languages/rust/rust.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return new Promise((function(i,t){e(["./rust"],i,t)}))}})})),define("vs/basic-languages/sb/sb.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return new Promise((function(i,t){e(["./sb"],i,t)}))}})})),define("vs/basic-languages/scala/scala.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:function(){return new Promise((function(i,t){e(["./scala"],i,t)}))}})})),define("vs/basic-languages/scheme/scheme.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return new Promise((function(i,t){e(["./scheme"],i,t)}))}})})),define("vs/basic-languages/scss/scss.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return new Promise((function(i,t){e(["./scss"],i,t)}))}})})),define("vs/basic-languages/shell/shell.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return new Promise((function(i,t){e(["./shell"],i,t)}))}})})),define("vs/basic-languages/solidity/solidity.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return new Promise((function(i,t){e(["./solidity"],i,t)}))}})})),define("vs/basic-languages/sophia/sophia.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return new Promise((function(i,t){e(["./sophia"],i,t)}))}})})),define("vs/basic-languages/sql/sql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return new Promise((function(i,t){e(["./sql"],i,t)}))}})})),define("vs/basic-languages/st/st.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return new Promise((function(i,t){e(["./st"],i,t)}))}})})),define("vs/basic-languages/swift/swift.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return new Promise((function(i,t){e(["./swift"],i,t)}))}})})),define("vs/basic-languages/systemverilog/systemverilog.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return new Promise((function(i,t){e(["./systemverilog"],i,t)}))}}),t.registerLanguage({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return new Promise((function(i,t){e(["./systemverilog"],i,t)}))}})})),define("vs/basic-languages/tcl/tcl.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return new Promise((function(i,t){e(["./tcl"],i,t)}))}})})),define("vs/basic-languages/twig/twig.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return new Promise((function(i,t){e(["./twig"],i,t)}))}})})),define("vs/basic-languages/typescript/typescript.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return new Promise((function(i,t){e(["./typescript"],i,t)}))}})})),define("vs/basic-languages/vb/vb.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return new Promise((function(i,t){e(["./vb"],i,t)}))}})})),define("vs/basic-languages/xml/xml.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:function(){return new Promise((function(i,t){e(["./xml"],i,t)}))}})})),define("vs/basic-languages/yaml/yaml.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),t.registerLanguage({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:function(){return new Promise((function(i,t){e(["./yaml"],i,t)}))}})})),define("vs/basic-languages/monaco.contribution",["require","exports","./abap/abap.contribution","./apex/apex.contribution","./azcli/azcli.contribution","./bat/bat.contribution","./cameligo/cameligo.contribution","./clojure/clojure.contribution","./coffee/coffee.contribution","./cpp/cpp.contribution","./csharp/csharp.contribution","./csp/csp.contribution","./css/css.contribution","./dart/dart.contribution","./dockerfile/dockerfile.contribution","./ecl/ecl.contribution","./fsharp/fsharp.contribution","./go/go.contribution","./graphql/graphql.contribution","./handlebars/handlebars.contribution","./hcl/hcl.contribution","./html/html.contribution","./ini/ini.contribution","./java/java.contribution","./javascript/javascript.contribution","./julia/julia.contribution","./kotlin/kotlin.contribution","./less/less.contribution","./lexon/lexon.contribution","./lua/lua.contribution","./m3/m3.contribution","./markdown/markdown.contribution","./mips/mips.contribution","./msdax/msdax.contribution","./mysql/mysql.contribution","./objective-c/objective-c.contribution","./pascal/pascal.contribution","./pascaligo/pascaligo.contribution","./perl/perl.contribution","./pgsql/pgsql.contribution","./php/php.contribution","./postiats/postiats.contribution","./powerquery/powerquery.contribution","./powershell/powershell.contribution","./pug/pug.contribution","./python/python.contribution","./r/r.contribution","./razor/razor.contribution","./redis/redis.contribution","./redshift/redshift.contribution","./restructuredtext/restructuredtext.contribution","./ruby/ruby.contribution","./rust/rust.contribution","./sb/sb.contribution","./scala/scala.contribution","./scheme/scheme.contribution","./scss/scss.contribution","./shell/shell.contribution","./solidity/solidity.contribution","./sophia/sophia.contribution","./sql/sql.contribution","./st/st.contribution","./swift/swift.contribution","./systemverilog/systemverilog.contribution","./tcl/tcl.contribution","./twig/twig.contribution","./typescript/typescript.contribution","./vb/vb.contribution","./xml/xml.contribution","./yaml/yaml.contribution"],(function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0})}));
define("vs/editor/editor.main", ["vs/editor/edcore.main","vs/language/typescript/monaco.contribution","vs/language/css/monaco.contribution","vs/language/json/monaco.contribution","vs/language/html/monaco.contribution","vs/basic-languages/monaco.contribution"], function(api) { return api; });
//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map