mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
2 lines
No EOL
3.2 MiB
2 lines
No EOL
3.2 MiB
(self.webpackChunkmy_application=self.webpackChunkmy_application||[]).push([[1234],{9685:e=>{e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},1248:(e,t,i)=>{i(9685)(i(6367))},2775:(e,t,i)=>{i(9685)(i(5802))},3564:(e,t,i)=>{i(9685)(i(4372))},6367:e=>{e.exports='/*!-----------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773)\n * Released under the MIT license\n * https://github.com/microsoft/vscode/blob/main/LICENSE.txt\n *-----------------------------------------------------------*/(function(){var J=["exports","require","vs/base/common/lifecycle","vs/nls","vs/nls!vs/editor/editor.main","vs/editor/common/core/range","vs/base/common/event","vs/base/browser/dom","vs/platform/instantiation/common/instantiation","vs/base/common/strings","vs/css!vs/editor/editor.main","vs/base/common/errors","vs/base/common/async","vs/editor/common/core/position","vs/platform/contextkey/common/contextkey","vs/editor/browser/editorExtensions","vs/base/common/arrays","vs/base/common/platform","vs/base/common/types","vs/editor/common/services/languageFeatures","vs/base/common/uri","vs/base/common/cancellation","vs/editor/common/editorContextKeys","vs/editor/common/core/selection","vs/platform/theme/common/themeService","vs/platform/commands/common/commands","vs/editor/common/languages","vs/platform/configuration/common/configuration","vs/platform/actions/common/actions","vs/base/common/codicons","vs/editor/browser/services/codeEditorService","vs/platform/theme/common/colorRegistry","vs/base/common/themables","vs/editor/common/languages/languageConfigurationRegistry","vs/platform/registry/common/platform","vs/base/browser/fastDomNode","vs/platform/keybinding/common/keybinding","vs/base/common/color","vs/editor/common/languages/language","vs/editor/common/model/textModel","vs/editor/common/config/editorOptions","vs/base/common/actions","vs/base/common/resources","vs/platform/notification/common/notification","vs/base/browser/keyboardEvent","vs/base/common/objects","vs/base/browser/browser","vs/platform/opener/common/opener","vs/editor/common/model","vs/base/common/network","vs/base/browser/ui/aria/aria","vs/platform/instantiation/common/extensions","vs/editor/browser/view/viewPart","vs/editor/common/services/model","vs/base/common/iterator","vs/base/common/map","vs/base/browser/touch","vs/platform/contextview/browser/contextView","vs/base/common/keyCodes","vs/base/common/linkedList","vs/base/common/stopwatch","vs/editor/common/services/resolverService","vs/platform/log/common/log","vs/base/common/filters","vs/editor/common/core/editOperation","vs/editor/common/cursorCommon","vs/base/browser/mouseEvent","vs/base/browser/ui/widget","vs/base/common/htmlContent","vs/base/browser/ui/actionbar/actionbar","vs/editor/common/services/languageFeatureDebounce","vs/platform/progress/common/progress","vs/editor/common/languages/modesRegistry","vs/editor/common/core/editorColorRegistry","vs/editor/browser/config/domFontInfo","vs/editor/common/core/cursorColumns","vs/base/browser/event","vs/base/browser/ui/scrollbar/scrollableElement","vs/platform/quickinput/common/quickInput","vs/platform/telemetry/common/telemetry","vs/platform/theme/common/iconRegistry","vs/editor/common/viewModel","vs/editor/common/standaloneStrings","vs/platform/storage/common/storage","vs/base/common/assert","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","vs/editor/common/tokens/lineTokens","vs/base/common/path","vs/platform/accessibility/common/accessibility","vs/platform/markers/common/markers","vs/platform/configuration/common/configurationRegistry","vs/platform/theme/common/theme","vs/base/common/functional","vs/editor/contrib/hover/browser/hoverTypes","vs/editor/contrib/snippet/browser/snippetParser","vs/editor/common/core/stringBuilder","vs/platform/clipboard/common/clipboardService","vs/editor/contrib/editorState/browser/editorState","vs/platform/theme/browser/defaultStyles","vs/base/common/decorators","vs/base/common/lazy","vs/base/common/mime","vs/base/common/severity","vs/editor/common/core/lineRange","vs/editor/common/languages/languageConfiguration","vs/editor/common/textModelEvents","vs/editor/browser/view/dynamicViewOverlay","vs/editor/contrib/codeAction/common/types","vs/base/browser/ui/list/listWidget","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/common/services/editorWorker","vs/platform/keybinding/common/keybindingsRegistry","vs/base/common/keybindings","vs/base/common/iconLabels","vs/editor/browser/stableEditorScroll","vs/editor/common/core/characterClassifier","vs/editor/common/core/eolCounter","vs/editor/common/core/offsetRange","vs/editor/common/commands/replaceCommand","vs/editor/common/encodedTokenAttributes","vs/editor/common/languages/supports","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/editor/standalone/common/standaloneTheme","vs/platform/layout/browser/layoutService","vs/editor/contrib/markdownRenderer/browser/markdownRenderer","vs/editor/contrib/suggest/browser/suggest","vs/platform/quickinput/common/quickAccess","vs/editor/contrib/codeAction/browser/codeAction","vs/editor/contrib/peekView/browser/peekView","vs/base/browser/ui/tree/tree","vs/base/common/buffer","vs/base/browser/dnd","vs/base/common/numbers","vs/base/common/hash","vs/editor/browser/view/renderingContext","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/core/wordHelper","vs/editor/common/viewEventHandler","vs/editor/common/viewLayout/lineDecorations","vs/base/browser/globalPointerMoveMonitor","vs/base/browser/ui/iconLabel/iconLabels","vs/base/browser/ui/sash/sash","vs/base/browser/ui/toggle/toggle","vs/base/browser/ui/actionbar/actionViewItems","vs/editor/common/config/editorZoom","vs/editor/common/languages/nullTokenize","vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/editor/browser/services/bulkEditService","vs/platform/dialogs/common/dialogs","vs/platform/label/common/label","vs/editor/contrib/message/browser/messageController","vs/editor/browser/editorDom","vs/platform/actions/browser/menuEntryActionViewItem","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/platform/workspace/common/workspace","vs/base/common/idGenerator","vs/base/common/range","vs/base/common/diff/diff","vs/base/common/uint","vs/base/common/uuid","vs/base/browser/ui/codicons/codiconStyles","vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/platform/quickinput/browser/media/quickInput","vs/editor/common/core/textModelDefaults","vs/editor/common/diff/algorithms/diffAlgorithm","vs/editor/common/diff/linesDiffComputer","vs/editor/common/editorCommon","vs/editor/browser/editorBrowser","vs/editor/common/cursor/cursorWordOperations","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast","vs/editor/common/model/textModelSearch","vs/editor/contrib/folding/browser/foldingRanges","vs/base/common/scrollable","vs/base/browser/ui/tree/abstractTree","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture","vs/editor/contrib/inlineCompletions/browser/ghostText","vs/editor/common/services/textResourceConfiguration","vs/platform/audioCues/browser/audioCueService","vs/platform/instantiation/common/serviceCollection","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/editor/browser/coreCommands","vs/platform/list/browser/listService","vs/platform/undoRedo/common/undoRedo","vs/editor/browser/widget/codeEditorWidget","vs/editor/contrib/find/browser/findModel","vs/base/common/ternarySearchTree","vs/base/common/dataTransfer","vs/editor/common/core/indentation","vs/editor/common/cursor/cursorMoveOperations","vs/editor/common/cursor/cursorDeleteOperations","vs/editor/common/cursor/cursorMoveCommands","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer","vs/editor/common/model/utils","vs/editor/common/standalone/standaloneEnums","vs/editor/common/textModelGuides","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewEvents","vs/editor/contrib/inlineCompletions/browser/consts","vs/editor/contrib/inlineCompletions/browser/utils","vs/editor/contrib/stickyScroll/browser/stickyScrollElement","vs/base/common/keybindingLabels","vs/base/common/extpath","vs/base/browser/canIUse","vs/base/browser/ui/tree/indexTreeModel","vs/base/browser/ui/tree/objectTreeModel","vs/base/common/marshalling","vs/base/browser/formattedTextRenderer","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/browser/ui/list/listView","vs/base/browser/markdownRenderer","vs/base/browser/ui/iconLabel/iconLabel","vs/base/browser/ui/inputbox/inputBox","vs/base/browser/ui/findinput/findInput","vs/editor/browser/config/tabFocus","vs/editor/browser/controller/textAreaInput","vs/editor/browser/view/viewLayer","vs/editor/common/languages/supports/richEditBrackets","vs/editor/common/viewModelEventDispatcher","vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText","vs/editor/common/config/fontInfo","vs/platform/instantiation/common/descriptors","vs/editor/common/services/markerDecorations","vs/editor/common/services/semanticTokensStyling","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/editor/common/config/editorConfigurationSchema","vs/editor/common/languages/autoIndent","vs/editor/common/languages/enterAction","vs/editor/common/commands/shiftCommand","vs/editor/common/cursor/cursorTypeOperations","vs/editor/contrib/gotoSymbol/browser/goToSymbol","vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/editor/contrib/codeAction/browser/codeActionController","vs/editor/common/services/semanticTokensProviderStyling","vs/editor/contrib/inlineCompletions/browser/inlineSuggestionHintsWidget","vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/editor/contrib/snippet/browser/snippetController2","vs/editor/standalone/browser/standaloneServices","vs/base/browser/performance","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/cache","vs/base/common/symbols","vs/css!vs/base/browser/ui/actionbar/actionbar","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/css!vs/platform/actionWidget/browser/actionWidget","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/browser/controller/textAreaState","vs/editor/common/core/rgba","vs/editor/common/cursor/cursorAtomicMoveOperations","vs/editor/common/editorAction","vs/editor/common/editorFeatures","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets","vs/editor/common/model/prefixSumComputer","vs/editor/common/model/textModelPart","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/modelLineProjectionData","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/model/guidesTextModelPart","vs/editor/common/tokens/contiguousMultilineTokensBuilder","vs/editor/browser/viewParts/margin/margin","vs/editor/common/viewModel/overviewZoneManager","vs/editor/contrib/comment/browser/blockCommentCommand","vs/editor/contrib/folding/browser/indentRangeProvider","vs/editor/contrib/folding/browser/syntaxRangeProvider","vs/editor/contrib/format/browser/formattingEdit","vs/editor/contrib/indentation/browser/indentUtils","vs/editor/contrib/semanticTokens/common/semanticTokensConfig","vs/editor/contrib/smartSelect/browser/bracketSelections","vs/editor/contrib/suggest/browser/completionModel","vs/editor/contrib/suggest/browser/wordDistance","vs/editor/standalone/common/monarch/monarchCommon","vs/base/common/glob","vs/base/common/ime","vs/base/browser/dompurify/dompurify","vs/base/browser/ui/contextview/contextview","vs/base/browser/ui/countBadge/countBadge","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/base/browser/ui/resizable/resizable","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/browser/ui/hover/hoverWidget","vs/base/browser/ui/splitview/splitview","vs/base/browser/ui/findinput/findInputToggles","vs/base/browser/ui/iconLabel/iconLabelHover","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/base/browser/ui/tree/objectTree","vs/base/common/worker/simpleWorker","vs/editor/browser/config/elementSizeObserver","vs/editor/common/core/textChange","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/languages/textToHtmlTokenizer","vs/editor/common/services/editorBaseApi","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/contrib/hover/browser/hoverOperation","vs/editor/contrib/inlayHints/browser/inlayHints","vs/editor/browser/config/fontMeasurements","vs/editor/common/viewModel/viewModelDecorations","vs/editor/common/model/editStack","vs/platform/files/common/files","vs/editor/contrib/codelens/browser/codelens","vs/editor/contrib/colorPicker/browser/color","vs/editor/contrib/semanticTokens/common/getSemanticTokens","vs/editor/standalone/common/monarch/monarchLexer","vs/editor/browser/widget/diffNavigator","vs/platform/contextkey/common/contextkeys","vs/platform/keybinding/common/resolvedKeybindingItem","vs/editor/standalone/browser/standaloneLayoutService","vs/platform/quickinput/browser/quickInputUtils","vs/editor/browser/dnd","vs/editor/browser/services/editorWorkerService","vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/platform/configuration/common/configurationModels","vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/platform/history/browser/contextScopedHistoryWidget","vs/editor/contrib/suggest/browser/suggestMemory","vs/editor/contrib/codeAction/browser/codeActionModel","vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/editor/contrib/format/browser/format","vs/editor/contrib/hover/browser/getHover","vs/editor/contrib/wordOperations/browser/wordOperations","vs/editor/browser/viewParts/lines/viewLine","vs/editor/browser/controller/mouseTarget","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess","vs/editor/standalone/browser/standaloneCodeEditorService","vs/editor/standalone/browser/standaloneThemeService","vs/editor/browser/widget/diffEditorWidget","vs/editor/contrib/colorPicker/browser/colorDetector","vs/editor/contrib/find/browser/findController","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/editor/contrib/gotoError/browser/gotoError","vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/editor/contrib/hover/browser/hover","vs/editor/contrib/inlayHints/browser/inlayHintsLocations","vs/editor/contrib/inlayHints/browser/inlayHintsController","vs/editor/contrib/stickyScroll/browser/stickyScrollController","vs/editor/contrib/snippet/browser/snippetSession","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","vs/editor/contrib/suggest/browser/suggestController","vs/editor/contrib/inlineCompletions/browser/ghostTextController","vs/platform/workspace/common/workspaceTrust","vs/base/browser/iframe","vs/base/browser/ui/list/list","vs/base/browser/ui/list/splice","vs/base/common/collections","vs/base/common/diff/diffChange","vs/base/common/comparers","vs/base/common/linkedText","vs/base/common/marked/marked","vs/base/common/navigator","vs/base/common/history","vs/base/browser/ui/list/rangeMap","vs/base/common/search","vs/css!vs/base/browser/ui/aria/aria","vs/css!vs/base/browser/ui/button/button","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/css!vs/base/browser/ui/sash/sash","vs/css!vs/base/browser/ui/scrollbar/media/scrollbars","vs/css!vs/base/browser/ui/selectBox/selectBox","vs/css!vs/base/browser/ui/selectBox/selectBoxCustom","vs/css!vs/base/browser/ui/splitview/splitview","vs/css!vs/base/browser/ui/table/table","vs/css!vs/base/browser/ui/toggle/toggle","vs/css!vs/base/browser/ui/toolbar/toolbar","vs/css!vs/base/browser/ui/tree/media/tree","vs/css!vs/editor/browser/controller/textAreaHandler","vs/css!vs/editor/browser/viewParts/blockDecorations/blockDecorations","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/margin/margin","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/viewParts/whitespace/whitespace","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/browser/anchorSelect","vs/css!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/css!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/css!vs/editor/contrib/codelens/browser/codelensWidget","vs/css!vs/editor/contrib/colorPicker/browser/colorPicker","vs/css!vs/editor/contrib/dnd/browser/dnd","vs/css!vs/editor/contrib/find/browser/findOptionsWidget","vs/css!vs/editor/contrib/find/browser/findWidget","vs/css!vs/editor/contrib/folding/browser/folding","vs/css!vs/editor/contrib/gotoError/browser/media/gotoErrorWidget","vs/css!vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/css!vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/css!vs/editor/contrib/hover/browser/hover","vs/css!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/css!vs/editor/contrib/inlineCompletions/browser/ghostText","vs/css!vs/editor/contrib/inlineCompletions/browser/inlineSuggestionHintsWidget","vs/css!vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/css!vs/editor/contrib/links/browser/links","vs/css!vs/editor/contrib/markdownRenderer/browser/renderedMarkdown","vs/css!vs/editor/contrib/message/browser/messageController","vs/css!vs/editor/contrib/parameterHints/browser/parameterHints","vs/css!vs/editor/contrib/peekView/browser/media/peekViewWidget","vs/css!vs/editor/contrib/rename/browser/renameInputField","vs/css!vs/editor/contrib/snippet/browser/snippetSession","vs/css!vs/editor/contrib/stickyScroll/browser/stickyScroll","vs/css!vs/editor/contrib/suggest/browser/media/suggest","vs/css!vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/css!vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/css!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/css!vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/css!vs/editor/contrib/zoneWidget/browser/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/opener/browser/link","vs/css!vs/platform/severityIcon/browser/media/severityIcon","vs/editor/browser/config/charWidthReader","vs/editor/browser/config/migrateOptions","vs/editor/browser/viewParts/lines/domReadingContext","vs/editor/browser/viewParts/lines/rangeUtil","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/cursor/cursorContext","vs/editor/common/diff/algorithms/joinSequenceDiffs","vs/editor/common/diff/algorithms/myersDiffAlgorithm","vs/editor/common/diff/algorithms/utils","vs/editor/common/diff/algorithms/dynamicProgrammingDiffing","vs/editor/common/diff/smartLinesDiffComputer","vs/editor/common/diff/standardLinesDiffComputer","vs/editor/common/diff/linesDiffComputers","vs/editor/common/editorTheme","vs/editor/common/languages/linkComputer","vs/editor/common/cursor/cursorColumnSelection","vs/editor/common/cursor/oneCursor","vs/editor/common/cursor/cursorCollection","vs/editor/common/languages/supports/characterPair","vs/editor/common/languages/supports/indentRules","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/languages/supports/languageBracketsConfiguration","vs/editor/common/languages/supports/onEnter","vs/editor/common/languages/supports/tokenization","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees","vs/editor/common/model/bracketPairsTextModelPart/fixBrackets","vs/editor/common/model/fixedArray","vs/editor/common/model/indentationGuesser","vs/editor/common/model/intervalTree","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/model/mirrorTextModel","vs/editor/common/textModelBracketPairs","vs/editor/common/tokens/contiguousMultilineTokens","vs/editor/common/tokens/contiguousTokensEditing","vs/editor/common/tokens/contiguousTokensStore","vs/editor/common/tokens/sparseMultilineTokens","vs/editor/common/tokens/sparseTokensStore","vs/editor/browser/viewParts/blockDecorations/blockDecorations","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/rulers/rulers","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewLayout/linePart","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/viewModel/modelLineProjection","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/common/viewModel/viewContext","vs/editor/contrib/caretOperations/browser/moveCaretCommand","vs/editor/contrib/comment/browser/lineCommentCommand","vs/editor/contrib/dnd/browser/dragAndDropCommand","vs/editor/contrib/find/browser/replaceAllCommand","vs/editor/contrib/find/browser/replacePattern","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/browser/copyLinesCommand","vs/editor/contrib/linesOperations/browser/sortLinesCommand","vs/editor/contrib/smartSelect/browser/wordSelections","vs/editor/contrib/suggest/browser/suggestCommitCharacters","vs/editor/contrib/suggest/browser/suggestOvertypingCapturer","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/findInputToggles","vs/nls!vs/base/browser/ui/findinput/replaceInput","vs/nls!vs/base/browser/ui/iconLabel/iconLabelHover","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/browser/ui/selectBox/selectBoxCustom","vs/nls!vs/base/browser/ui/toolbar/toolbar","vs/nls!vs/base/browser/ui/tree/abstractTree","vs/nls!vs/base/common/actions","vs/nls!vs/base/common/errorMessage","vs/base/common/errorMessage","vs/nls!vs/base/common/keybindingLabels","vs/nls!vs/base/common/platform","vs/base/common/process","vs/base/common/fuzzyScorer","vs/base/common/labels","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/browser/ui/tree/compressedObjectTreeModel","vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/list/rowCache","vs/base/browser/ui/progressbar/progressbar","vs/base/browser/ui/selectBox/selectBoxNative","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/base/browser/ui/list/listPaging","vs/base/browser/ui/table/tableWidget","vs/base/browser/ui/button/button","vs/base/browser/ui/selectBox/selectBoxCustom","vs/base/browser/ui/selectBox/selectBox","vs/base/browser/ui/findinput/replaceInput","vs/base/browser/ui/menu/menu","vs/base/browser/ui/toolbar/toolbar","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/tree/asyncDataTree","vs/base/browser/defaultWorkerFactory","vs/base/parts/storage/common/storage","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/widget/codeEditorContributions","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/common/languageSelector","vs/editor/common/languageFeatureRegistry","vs/editor/common/languages/supports/electricCharacter","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/services/semanticTokensDto","vs/editor/common/tokenizationRegistry","vs/editor/common/model/textModelTokens","vs/editor/common/model/tokenizationTextModelPart","vs/editor/common/services/editorSimpleWorker","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/colorPicker/browser/colorPickerModel","vs/editor/contrib/folding/browser/foldingModel","vs/editor/contrib/folding/browser/hiddenRangeModel","vs/nls!vs/editor/browser/controller/textAreaHandler","vs/nls!vs/editor/browser/coreCommands","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/editorConfigurationSchema","vs/nls!vs/editor/common/config/editorOptions","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/nls!vs/editor/common/core/editorColorRegistry","vs/nls!vs/editor/common/editorContextKeys","vs/nls!vs/editor/common/languages/modesRegistry","vs/nls!vs/editor/common/model/editStack","vs/nls!vs/editor/common/standaloneStrings","vs/nls!vs/editor/common/viewLayout/viewLineRenderer","vs/nls!vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/nls!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/nls!vs/editor/contrib/caretOperations/browser/caretOperations","vs/nls!vs/editor/contrib/caretOperations/browser/transpose","vs/nls!vs/editor/contrib/clipboard/browser/clipboard","vs/nls!vs/editor/contrib/codeAction/browser/codeAction","vs/nls!vs/editor/contrib/codeAction/browser/codeActionCommands","vs/nls!vs/editor/contrib/codeAction/browser/codeActionContributions","vs/nls!vs/editor/contrib/codeAction/browser/codeActionMenu","vs/nls!vs/editor/contrib/codeAction/browser/codeActionUi","vs/nls!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/nls!vs/editor/contrib/codelens/browser/codelensController","vs/nls!vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/nls!vs/editor/contrib/comment/browser/comment","vs/nls!vs/editor/contrib/contextmenu/browser/contextmenu","vs/nls!vs/editor/contrib/copyPaste/browser/copyPasteContribution","vs/nls!vs/editor/contrib/copyPaste/browser/copyPasteController","vs/nls!vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/nls!vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution","vs/nls!vs/editor/contrib/editorState/browser/keybindingCancellation","vs/nls!vs/editor/contrib/find/browser/findController","vs/nls!vs/editor/contrib/find/browser/findWidget","vs/nls!vs/editor/contrib/folding/browser/folding","vs/nls!vs/editor/contrib/folding/browser/foldingDecorations","vs/nls!vs/editor/contrib/fontZoom/browser/fontZoom","vs/nls!vs/editor/contrib/format/browser/format","vs/nls!vs/editor/contrib/format/browser/formatActions","vs/nls!vs/editor/contrib/gotoError/browser/gotoError","vs/nls!vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/nls!vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/nls!vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/nls!vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/nls!vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/nls!vs/editor/contrib/hover/browser/hover","vs/nls!vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/nls!vs/editor/contrib/hover/browser/markerHoverParticipant","vs/nls!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/nls!vs/editor/contrib/indentation/browser/indentation","vs/nls!vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/nls!vs/editor/contrib/inlineCompletions/browser/ghostTextController","vs/nls!vs/editor/contrib/inlineCompletions/browser/ghostTextHoverParticipant","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineSuggestionHintsWidget","vs/nls!vs/editor/contrib/lineSelection/browser/lineSelection","vs/nls!vs/editor/contrib/linesOperations/browser/linesOperations","vs/nls!vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/nls!vs/editor/contrib/links/browser/links","vs/nls!vs/editor/contrib/message/browser/messageController","vs/nls!vs/editor/contrib/multicursor/browser/multicursor","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHints","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/nls!vs/editor/contrib/peekView/browser/peekView","vs/nls!vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/nls!vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/nls!vs/editor/contrib/readOnlyMessage/browser/contribution","vs/nls!vs/editor/contrib/rename/browser/rename","vs/nls!vs/editor/contrib/rename/browser/renameInputField","vs/nls!vs/editor/contrib/smartSelect/browser/smartSelect","vs/nls!vs/editor/contrib/snippet/browser/snippetController2","vs/nls!vs/editor/contrib/snippet/browser/snippetVariables","vs/nls!vs/editor/contrib/stickyScroll/browser/stickyScrollActions","vs/nls!vs/editor/contrib/suggest/browser/suggest","vs/nls!vs/editor/contrib/suggest/browser/suggestController","vs/nls!vs/editor/contrib/suggest/browser/suggestWidget","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/nls!vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/nls!vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/nls!vs/editor/contrib/tokenization/browser/tokenization","vs/nls!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/nls!vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/nls!vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/nls!vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/nls!vs/editor/contrib/wordOperations/browser/wordOperations","vs/nls!vs/platform/action/common/actionCommonCategories","vs/nls!vs/platform/actionWidget/browser/actionList","vs/nls!vs/platform/actionWidget/browser/actionWidget","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/actions/browser/toolbar","vs/nls!vs/platform/actions/common/menuService","vs/nls!vs/platform/audioCues/browser/audioCueService","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/browser/contextKeyService","vs/nls!vs/platform/contextkey/common/contextkey","vs/nls!vs/platform/contextkey/common/contextkeys","vs/nls!vs/platform/contextkey/common/scanner","vs/nls!vs/platform/history/browser/contextScopedHistoryWidget","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/quickinput/browser/quickInput","vs/nls!vs/platform/quickinput/browser/quickInputList","vs/nls!vs/platform/quickinput/browser/quickInputUtils","vs/nls!vs/platform/theme/common/colorRegistry","vs/nls!vs/platform/theme/common/iconRegistry","vs/nls!vs/platform/undoRedo/common/undoRedoService","vs/nls!vs/platform/workspace/common/workspace","vs/platform/action/common/action","vs/platform/action/common/actionCommonCategories","vs/platform/contextkey/common/scanner","vs/platform/editor/common/editor","vs/platform/extensions/common/extensions","vs/platform/history/browser/historyWidgetKeybindingHint","vs/platform/instantiation/common/graph","vs/editor/browser/widget/workerBasedDocumentDiffProvider","vs/editor/common/services/languageFeaturesService","vs/editor/contrib/inlineCompletions/browser/ghostTextWidget","vs/editor/contrib/links/browser/getLinks","vs/editor/standalone/browser/colorizer","vs/editor/contrib/parameterHints/browser/parameterHintsModel","vs/editor/contrib/suggest/browser/suggestAlternatives","vs/editor/contrib/suggest/browser/wordContextKey","vs/editor/browser/config/editorConfiguration","vs/platform/contextkey/browser/contextKeyService","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keybinding/common/keybindingResolver","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/accessibility/browser/accessibilityService","vs/platform/contextview/browser/contextViewService","vs/platform/clipboard/browser/clipboardService","vs/platform/log/common/logService","vs/editor/contrib/gotoError/browser/markerNavigationService","vs/platform/markers/common/markerService","vs/editor/browser/services/openerService","vs/editor/contrib/documentSymbols/browser/documentSymbols","vs/platform/opener/browser/link","vs/platform/quickinput/browser/pickerQuickAccess","vs/platform/quickinput/browser/quickInputBox","vs/platform/quickinput/browser/quickInputList","vs/platform/quickinput/browser/quickInput","vs/platform/dnd/browser/dnd","vs/editor/browser/services/webWorker","vs/editor/common/cursor/cursor","vs/editor/common/services/getIconClasses","vs/editor/common/services/languagesAssociations","vs/editor/common/services/languagesRegistry","vs/editor/common/services/languageService","vs/editor/contrib/linesOperations/browser/moveLinesCommand","vs/editor/contrib/hover/browser/marginHover","vs/platform/configuration/common/configurations","vs/platform/quickinput/browser/helpQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/platform/severityIcon/browser/severityIcon","vs/editor/contrib/codelens/browser/codeLensCache","vs/platform/actions/common/menuService","vs/editor/browser/services/markerDecorations","vs/editor/browser/view/viewController","vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/editor/contrib/caretOperations/browser/caretOperations","vs/editor/contrib/caretOperations/browser/transpose","vs/editor/contrib/clipboard/browser/clipboard","vs/editor/contrib/comment/browser/comment","vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/editor/contrib/editorState/browser/keybindingCancellation","vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver","vs/editor/contrib/copyPaste/browser/copyPasteController","vs/editor/contrib/copyPaste/browser/copyPasteContribution","vs/editor/contrib/fontZoom/browser/fontZoom","vs/editor/contrib/format/browser/formatActions","vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/editor/contrib/indentation/browser/indentation","vs/editor/contrib/lineSelection/browser/lineSelection","vs/editor/contrib/linesOperations/browser/linesOperations","vs/editor/contrib/longLinesHelper/browser/longLinesHelper","vs/editor/contrib/readOnlyMessage/browser/contribution","vs/editor/contrib/smartSelect/browser/smartSelect","vs/editor/contrib/suggest/browser/suggestInlineCompletions","vs/editor/contrib/suggest/browser/suggestModel","vs/editor/contrib/tokenization/browser/tokenization","vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/editor/contrib/wordPartOperations/browser/wordPartOperations","vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/platform/actions/browser/toolbar","vs/platform/quickinput/browser/commandsQuickAccess","vs/editor/contrib/quickAccess/browser/commandsQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess","vs/editor/browser/viewParts/minimap/minimap","vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/editor/contrib/codeAction/browser/codeActionMenu","vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/platform/actionWidget/browser/actionList","vs/platform/actionWidget/browser/actionWidget","vs/editor/contrib/codeAction/browser/codeActionUi","vs/editor/contrib/codeAction/browser/codeActionCommands","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/widget/diffReview","vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/editor/contrib/parameterHints/browser/parameterHints","vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/platform/theme/browser/iconsStyleSheet","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","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/viewCursors/viewCursors","vs/editor/browser/viewParts/whitespace/whitespace","vs/editor/browser/view","vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider","vs/editor/common/services/markerDecorationsService","vs/editor/common/services/semanticTokensStylingService","vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/editor/contrib/rename/browser/renameInputField","vs/editor/contrib/rename/browser/rename","vs/editor/contrib/semanticTokens/browser/documentSemanticTokens","vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens","vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess","vs/editor/standalone/common/themes","vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast","vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/platform/contextview/browser/contextMenuService","vs/platform/quickinput/browser/quickInputService","vs/editor/standalone/browser/quickInput/standaloneQuickInputService","vs/editor/common/services/modelService","vs/editor/common/viewModel/viewModelLines","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/editor/contrib/codelens/browser/codelensWidget","vs/editor/contrib/codelens/browser/codelensController","vs/editor/contrib/colorPicker/browser/colorHoverParticipant","vs/editor/contrib/dnd/browser/dnd","vs/editor/contrib/find/browser/findDecorations","vs/editor/contrib/find/browser/findOptionsWidget","vs/editor/contrib/find/browser/findState","vs/editor/contrib/find/browser/findWidget","vs/editor/contrib/folding/browser/foldingDecorations","vs/editor/contrib/hover/browser/contentHover","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/editor/contrib/links/browser/links","vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollWidget","vs/editor/contrib/suggest/browser/suggestWidget","vs/editor/contrib/multicursor/browser/multicursor","vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/editor/contrib/hover/browser/markerHoverParticipant","vs/editor/contrib/colorPicker/browser/colorContributions","vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/editor/contrib/inlayHints/browser/inlayHintsContribution","vs/editor/contrib/stickyScroll/browser/stickyScrollActions","vs/editor/contrib/stickyScroll/browser/stickyScrollContribution","vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch","vs/platform/undoRedo/common/undoRedoService","vs/editor/contrib/contextmenu/browser/contextmenu","vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider","vs/editor/contrib/inlineCompletions/browser/suggestWidgetPreviewModel","vs/editor/contrib/inlineCompletions/browser/ghostTextModel","vs/editor/contrib/inlineCompletions/browser/ghostTextHoverParticipant","vs/editor/contrib/inlineCompletions/browser/ghostText.contribution","vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/editor/editor.all","vs/editor/standalone/browser/standaloneCodeEditor","vs/editor/standalone/browser/standaloneEditor","vs/editor/standalone/browser/standaloneLanguages","vs/editor/editor.api","vs/css","vs/editor/edcore.main"],ee=function(q){for(var e=[],S=0,k=q.length;S<k;S++)e[S]=J[q[S]];return e};define(J[866],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=void 0;function S(b,_,h,m){if(m=m||{},(m["vs/css"]||{}).disabled){h({});return}const t=_.toUrl(b+".css");k(b,t,()=>{h({})},i=>{typeof h.error=="function"&&h.error("Could not find "+t+".")})}e.load=S;function k(b,_,h,m){if(y(b,_)){h();return}D(b,_,h,m)}function y(b,_){const h=document.getElementsByTagName("link");for(let m=0,n=h.length;m<n;m++){const t=h[m].getAttribute("data-name"),i=h[m].getAttribute("href");if(t===b||i===_)return!0}return!1}function D(b,_,h,m){const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("data-name",b),w(b,n,h,m),n.setAttribute("href",_),(document.head||document.getElementsByTagName("head")[0]).appendChild(n)}function w(b,_,h,m){const n=()=>{_.removeEventListener("load",t),_.removeEventListener("error",i)},t=s=>{n(),h()},i=s=>{n(),m(s)};_.addEventListener("load",t),_.addEventListener("error",i)}});var Ee=this&&this.__awaiter||function(q,e,S,k){function y(D){return D instanceof S?D:new S(function(w){w(D)})}return new(S||(S=Promise))(function(D,w){function b(m){try{h(k.next(m))}catch(n){w(n)}}function _(m){try{h(k.throw(m))}catch(n){w(n)}}function h(m){m.done?D(m.value):y(m.value).then(b,_)}h((k=k.apply(q,e||[])).next())})};define(J[3],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=e.create=e.setPseudoTranslation=e.getConfiguredDefaultLocale=e.localize=void 0;let S=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;const k="i-default";function y(s,r){let c;return r.length===0?c=s:c=s.replace(/\\{(\\d+)\\}/g,(g,o)=>{const l=o[0],a=r[l];let d=g;return typeof a=="string"?d=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(d=String(a)),d}),S&&(c="\\uFF3B"+c.replace(/[aouei]/g,"$&$&")+"\\uFF3D"),c}function D(s,r){let c=s[r];return c||(c=s["*"],c)?c:null}function w(s){return s.charAt(s.length-1)==="/"?s:s+"/"}function b(s,r,c){return Ee(this,void 0,void 0,function*(){const g=w(s)+w(r)+"vscode/"+w(c),o=yield fetch(g);if(o.ok)return yield o.json();throw new Error(`${o.status} - ${o.statusText}`)})}function _(s){return function(r,c){const g=Array.prototype.slice.call(arguments,2);return y(s[r],g)}}function h(s,r,...c){return y(r,c)}e.localize=h;function m(s){}e.getConfiguredDefaultLocale=m;function n(s){S=s}e.setPseudoTranslation=n;function t(s,r){var c;return{localize:_(r[s]),getConfiguredDefaultLocale:(c=r.getConfiguredDefaultLocale)!==null&&c!==void 0?c:g=>{}}}e.create=t;function i(s,r,c,g){var o;const l=(o=g["vs/nls"])!==null&&o!==void 0?o:{};if(!s||s.length===0)return c({localize:h,getConfiguredDefaultLocale:()=>{var f;return(f=l.availableLanguages)===null||f===void 0?void 0:f["*"]}});const a=l.availableLanguages?D(l.availableLanguages,s):null,d=a===null||a===k;let u=".nls";d||(u=u+"."+a);const C=f=>{Array.isArray(f)?f.localize=_(f):f.localize=_(f[s]),f.getConfiguredDefaultLocale=()=>{var v;return(v=l.availableLanguages)===null||v===void 0?void 0:v["*"]},c(f)};typeof l.loadBundle=="function"?l.loadBundle(s,a,(f,v)=>{f?r([s+".nls"],C):C(v)}):l.translationServiceUrl&&!d?Ee(this,void 0,void 0,function*(){var f;try{const v=yield b(l.translationServiceUrl,a,s);return C(v)}catch(v){if(!a.includes("-"))return console.error(v),r([s+".nls"],C);try{const p=a.split("-")[0],L=yield b(l.translationServiceUrl,p,s);return(f=l.availableLanguages)!==null&&f!==void 0||(l.availableLanguages={}),l.availableLanguages["*"]=p,C(L)}catch(p){return console.error(p),r([s+".nls"],C)}}}):r([s+u],C,f=>{if(u===".nls"){console.error("Failed trying to load default language strings",f);return}console.error(`Failed to load message bundle for language ${a}. Falling back to the default language:`,f),r([s+".nls"],C)})}e.load=i});/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function dn(q){if(Array.isArray(q)){for(var e=0,S=Array(q.length);e<q.length;e++)S[e]=q[e];return S}else return Array.from(q)}var cn=Object.hasOwnProperty,Si=Object.setPrototypeOf,un=Object.isFrozen,hn=Object.getPrototypeOf,gn=Object.getOwnPropertyDescriptor,ft=Object.freeze,bt=Object.seal,fn=Object.create,wi=typeof Reflect<"u"&&Reflect,Ht=wi.apply,ei=wi.construct;Ht||(Ht=function(e,S,k){return e.apply(S,k)}),ft||(ft=function(e){return e}),bt||(bt=function(e){return e}),ei||(ei=function(e,S){return new(Function.prototype.bind.apply(e,[null].concat(dn(S))))});var mn=mt(Array.prototype.forEach),Li=mt(Array.prototype.pop),Rt=mt(Array.prototype.push),Dt=mt(String.prototype.toLowerCase),yi=mt(String.prototype.match),Lt=mt(String.prototype.replace),pn=mt(String.prototype.indexOf),vn=mt(String.prototype.trim),_t=mt(RegExp.prototype.test),Ei=Cn(TypeError);function mt(q){return function(e){for(var S=arguments.length,k=Array(S>1?S-1:0),y=1;y<S;y++)k[y-1]=arguments[y];return Ht(q,e,k)}}function Cn(q){return function(){for(var e=arguments.length,S=Array(e),k=0;k<e;k++)S[k]=arguments[k];return ei(q,S)}}function et(q,e){Si&&Si(q,null);for(var S=e.length;S--;){var k=e[S];if(typeof k=="string"){var y=Dt(k);y!==k&&(un(e)||(e[S]=y),k=y)}q[k]=!0}return q}function It(q){var e=fn(null),S=void 0;for(S in q)Ht(cn,q,[S])&&(e[S]=q[S]);return e}function Ut(q,e){for(;q!==null;){var S=gn(q,e);if(S){if(S.get)return mt(S.get);if(typeof S.value=="function")return mt(S.value)}q=hn(q)}function k(y){return console.warn("fallback value for",y),null}return k}var Di=ft(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ti=ft(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ii=ft(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bn=ft(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ni=ft(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),_n=ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ii=ft(["#text"]),ki=ft(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),si=ft(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ti=ft(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kt=ft(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Sn=bt(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm),wn=bt(/<%[\\s\\S]*|[\\s\\S]*%>/gm),Ln=bt(/^data-[\\-\\w.\\u00B7-\\uFFFF]/),yn=bt(/^aria-[\\-\\w]+$/),En=bt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),Dn=bt(/^(?:\\w+script|data):/i),In=bt(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),Ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q};function pt(q){if(Array.isArray(q)){for(var e=0,S=Array(q.length);e<q.length;e++)S[e]=q[e];return S}else return Array.from(q)}var kn=function(){return typeof window>"u"?null:window},Tn=function(e,S){if((typeof e>"u"?"undefined":Ot(e))!=="object"||typeof e.createPolicy!="function")return null;var k=null,y="data-tt-policy-suffix";S.currentScript&&S.currentScript.hasAttribute(y)&&(k=S.currentScript.getAttribute(y));var D="dompurify"+(k?"#"+k:"");try{return e.createPolicy(D,{createHTML:function(b){return b}})}catch{return console.warn("TrustedTypes policy "+D+" could not be created."),null}};function Ni(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kn(),e=function(Me){return Ni(Me)};if(e.version="2.3.1",e.removed=[],!q||!q.document||q.document.nodeType!==9)return e.isSupported=!1,e;var S=q.document,k=q.document,y=q.DocumentFragment,D=q.HTMLTemplateElement,w=q.Node,b=q.Element,_=q.NodeFilter,h=q.NamedNodeMap,m=h===void 0?q.NamedNodeMap||q.MozNamedAttrMap:h,n=q.Text,t=q.Comment,i=q.DOMParser,s=q.trustedTypes,r=b.prototype,c=Ut(r,"cloneNode"),g=Ut(r,"nextSibling"),o=Ut(r,"childNodes"),l=Ut(r,"parentNode");if(typeof D=="function"){var a=k.createElement("template");a.content&&a.content.ownerDocument&&(k=a.content.ownerDocument)}var d=Tn(s,S),u=d&&he?d.createHTML(""):"",C=k,f=C.implementation,v=C.createNodeIterator,p=C.createDocumentFragment,L=C.getElementsByTagName,E=S.importNode,I={};try{I=It(k).documentMode?k.documentMode:{}}catch{}var T={};e.isSupported=typeof l=="function"&&f&&typeof f.createHTMLDocument<"u"&&I!==9;var F=Sn,R=wn,M=Ln,N=yn,A=Dn,P=In,x=En,W=null,U=et({},[].concat(pt(Di),pt(ti),pt(ii),pt(ni),pt(Ii))),O=null,$=et({},[].concat(pt(ki),pt(si),pt(Ti),pt(Kt))),Q=null,se=null,le=!0,te=!0,re=!1,H=!1,B=!1,j=!1,G=!1,Y=!1,ne=!1,de=!0,he=!1,oe=!0,ce=!0,z=!1,V={},K=null,ie=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),X=null,Z=et({},["audio","video","img","source","image","track"]),ue=null,me=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ce="http://www.w3.org/1998/Math/MathML",_e="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml",ye=we,ke=!1,De=null,ge=k.createElement("form"),pe=function(Me){De&&De===Me||((!Me||(typeof Me>"u"?"undefined":Ot(Me))!=="object")&&(Me={}),Me=It(Me),W="ALLOWED_TAGS"in Me?et({},Me.ALLOWED_TAGS):U,O="ALLOWED_ATTR"in Me?et({},Me.ALLOWED_ATTR):$,ue="ADD_URI_SAFE_ATTR"in Me?et(It(me),Me.ADD_URI_SAFE_ATTR):me,X="ADD_DATA_URI_TAGS"in Me?et(It(Z),Me.ADD_DATA_URI_TAGS):Z,K="FORBID_CONTENTS"in Me?et({},Me.FORBID_CONTENTS):ie,Q="FORBID_TAGS"in Me?et({},Me.FORBID_TAGS):{},se="FORBID_ATTR"in Me?et({},Me.FORBID_ATTR):{},V="USE_PROFILES"in Me?Me.USE_PROFILES:!1,le=Me.ALLOW_ARIA_ATTR!==!1,te=Me.ALLOW_DATA_ATTR!==!1,re=Me.ALLOW_UNKNOWN_PROTOCOLS||!1,H=Me.SAFE_FOR_TEMPLATES||!1,B=Me.WHOLE_DOCUMENT||!1,Y=Me.RETURN_DOM||!1,ne=Me.RETURN_DOM_FRAGMENT||!1,de=Me.RETURN_DOM_IMPORT!==!1,he=Me.RETURN_TRUSTED_TYPE||!1,G=Me.FORCE_BODY||!1,oe=Me.SANITIZE_DOM!==!1,ce=Me.KEEP_CONTENT!==!1,z=Me.IN_PLACE||!1,x=Me.ALLOWED_URI_REGEXP||x,ye=Me.NAMESPACE||we,H&&(te=!1),ne&&(Y=!0),V&&(W=et({},[].concat(pt(Ii))),O=[],V.html===!0&&(et(W,Di),et(O,ki)),V.svg===!0&&(et(W,ti),et(O,si),et(O,Kt)),V.svgFilters===!0&&(et(W,ii),et(O,si),et(O,Kt)),V.mathMl===!0&&(et(W,ni),et(O,Ti),et(O,Kt))),Me.ADD_TAGS&&(W===U&&(W=It(W)),et(W,Me.ADD_TAGS)),Me.ADD_ATTR&&(O===$&&(O=It(O)),et(O,Me.ADD_ATTR)),Me.ADD_URI_SAFE_ATTR&&et(ue,Me.ADD_URI_SAFE_ATTR),Me.FORBID_CONTENTS&&(K===ie&&(K=It(K)),et(K,Me.FORBID_CONTENTS)),ce&&(W["#text"]=!0),B&&et(W,["html","head","body"]),W.table&&(et(W,["tbody"]),delete Q.tbody),ft&&ft(Me),De=Me)},ae=et({},["mi","mo","mn","ms","mtext"]),ve=et({},["foreignobject","desc","title","annotation-xml"]),Le=et({},ti);et(Le,ii),et(Le,bn);var Ie=et({},ni);et(Ie,_n);var Ae=function(Me){var Be=l(Me);(!Be||!Be.tagName)&&(Be={namespaceURI:we,tagName:"template"});var We=Dt(Me.tagName),$e=Dt(Be.tagName);if(Me.namespaceURI===_e)return Be.namespaceURI===we?We==="svg":Be.namespaceURI===Ce?We==="svg"&&($e==="annotation-xml"||ae[$e]):!!Le[We];if(Me.namespaceURI===Ce)return Be.namespaceURI===we?We==="math":Be.namespaceURI===_e?We==="math"&&ve[$e]:!!Ie[We];if(Me.namespaceURI===we){if(Be.namespaceURI===_e&&!ve[$e]||Be.namespaceURI===Ce&&!ae[$e])return!1;var Ue=et({},["title","style","font","a","script"]);return!Ie[We]&&(Ue[We]||!Le[We])}return!1},be=function(Me){Rt(e.removed,{element:Me});try{Me.parentNode.removeChild(Me)}catch{try{Me.outerHTML=u}catch{Me.remove()}}},Se=function(Me,Be){try{Rt(e.removed,{attribute:Be.getAttributeNode(Me),from:Be})}catch{Rt(e.removed,{attribute:null,from:Be})}if(Be.removeAttribute(Me),Me==="is"&&!O[Me])if(Y||ne)try{be(Be)}catch{}else try{Be.setAttribute(Me,"")}catch{}},Te=function(Me){var Be=void 0,We=void 0;if(G)Me="<remove></remove>"+Me;else{var $e=yi(Me,/^[\\r\\n\\t ]+/);We=$e&&$e[0]}var Ue=d?d.createHTML(Me):Me;if(ye===we)try{Be=new i().parseFromString(Ue,"text/html")}catch{}if(!Be||!Be.documentElement){Be=f.createDocument(ye,"template",null);try{Be.documentElement.innerHTML=ke?"":Ue}catch{}}var Xe=Be.body||Be.documentElement;return Me&&We&&Xe.insertBefore(k.createTextNode(We),Xe.childNodes[0]||null),ye===we?L.call(Be,B?"html":"body")[0]:B?Be.documentElement:Xe},Pe=function(Me){return v.call(Me.ownerDocument||Me,Me,_.SHOW_ELEMENT|_.SHOW_COMMENT|_.SHOW_TEXT,null,!1)},Fe=function(Me){return Me instanceof n||Me instanceof t?!1:typeof Me.nodeName!="string"||typeof Me.textContent!="string"||typeof Me.removeChild!="function"||!(Me.attributes instanceof m)||typeof Me.removeAttribute!="function"||typeof Me.setAttribute!="function"||typeof Me.namespaceURI!="string"||typeof Me.insertBefore!="function"},Oe=function(Me){return(typeof w>"u"?"undefined":Ot(w))==="object"?Me instanceof w:Me&&(typeof Me>"u"?"undefined":Ot(Me))==="object"&&typeof Me.nodeType=="number"&&typeof Me.nodeName=="string"},xe=function(Me,Be,We){T[Me]&&mn(T[Me],function($e){$e.call(e,Be,We,De)})},Ke=function(Me){var Be=void 0;if(xe("beforeSanitizeElements",Me,null),Fe(Me)||yi(Me.nodeName,/[\\u0080-\\uFFFF]/))return be(Me),!0;var We=Dt(Me.nodeName);if(xe("uponSanitizeElement",Me,{tagName:We,allowedTags:W}),!Oe(Me.firstElementChild)&&(!Oe(Me.content)||!Oe(Me.content.firstElementChild))&&_t(/<[/\\w]/g,Me.innerHTML)&&_t(/<[/\\w]/g,Me.textContent)||We==="select"&&_t(/<template/i,Me.innerHTML))return be(Me),!0;if(!W[We]||Q[We]){if(ce&&!K[We]){var $e=l(Me)||Me.parentNode,Ue=o(Me)||Me.childNodes;if(Ue&&$e)for(var Xe=Ue.length,Je=Xe-1;Je>=0;--Je)$e.insertBefore(c(Ue[Je],!0),g(Me))}return be(Me),!0}return Me instanceof b&&!Ae(Me)||(We==="noscript"||We==="noembed")&&_t(/<\\/no(script|embed)/i,Me.innerHTML)?(be(Me),!0):(H&&Me.nodeType===3&&(Be=Me.textContent,Be=Lt(Be,F," "),Be=Lt(Be,R," "),Me.textContent!==Be&&(Rt(e.removed,{element:Me.cloneNode()}),Me.textContent=Be)),xe("afterSanitizeElements",Me,null),!1)},Ye=function(Me,Be,We){if(oe&&(Be==="id"||Be==="name")&&(We in k||We in ge))return!1;if(!(te&&!se[Be]&&_t(M,Be))){if(!(le&&_t(N,Be))){if(!O[Be]||se[Be])return!1;if(!ue[Be]){if(!_t(x,Lt(We,P,""))){if(!((Be==="src"||Be==="xlink:href"||Be==="href")&&Me!=="script"&&pn(We,"data:")===0&&X[Me])){if(!(re&&!_t(A,Lt(We,P,"")))){if(We)return!1}}}}}}return!0},qe=function(Me){var Be=void 0,We=void 0,$e=void 0,Ue=void 0;xe("beforeSanitizeAttributes",Me,null);var Xe=Me.attributes;if(Xe){var Je={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O};for(Ue=Xe.length;Ue--;){Be=Xe[Ue];var nt=Be,dt=nt.name,Ge=nt.namespaceURI;if(We=vn(Be.value),$e=Dt(dt),Je.attrName=$e,Je.attrValue=We,Je.keepAttr=!0,Je.forceKeepAttr=void 0,xe("uponSanitizeAttribute",Me,Je),We=Je.attrValue,!Je.forceKeepAttr&&(Se(dt,Me),!!Je.keepAttr)){if(_t(/\\/>/i,We)){Se(dt,Me);continue}H&&(We=Lt(We,F," "),We=Lt(We,R," "));var lt=Me.nodeName.toLowerCase();if(Ye(lt,$e,We))try{Ge?Me.setAttributeNS(Ge,dt,We):Me.setAttribute(dt,We),Li(e.removed)}catch{}}}xe("afterSanitizeAttributes",Me,null)}},st=function Ve(Me){var Be=void 0,We=Pe(Me);for(xe("beforeSanitizeShadowDOM",Me,null);Be=We.nextNode();)xe("uponSanitizeShadowNode",Be,null),!Ke(Be)&&(Be.content instanceof y&&Ve(Be.content),qe(Be));xe("afterSanitizeShadowDOM",Me,null)};return e.sanitize=function(Ve,Me){var Be=void 0,We=void 0,$e=void 0,Ue=void 0,Xe=void 0;if(ke=!Ve,ke&&(Ve="\x3c!--\x3e"),typeof Ve!="string"&&!Oe(Ve)){if(typeof Ve.toString!="function")throw Ei("toString is not a function");if(Ve=Ve.toString(),typeof Ve!="string")throw Ei("dirty is not a string, aborting")}if(!e.isSupported){if(Ot(q.toStaticHTML)==="object"||typeof q.toStaticHTML=="function"){if(typeof Ve=="string")return q.toStaticHTML(Ve);if(Oe(Ve))return q.toStaticHTML(Ve.outerHTML)}return Ve}if(j||pe(Me),e.removed=[],typeof Ve=="string"&&(z=!1),!z)if(Ve instanceof w)Be=Te("\x3c!----\x3e"),We=Be.ownerDocument.importNode(Ve,!0),We.nodeType===1&&We.nodeName==="BODY"||We.nodeName==="HTML"?Be=We:Be.appendChild(We);else{if(!Y&&!H&&!B&&Ve.indexOf("<")===-1)return d&&he?d.createHTML(Ve):Ve;if(Be=Te(Ve),!Be)return Y?null:u}Be&&G&&be(Be.firstChild);for(var Je=Pe(z?Ve:Be);$e=Je.nextNode();)$e.nodeType===3&&$e===Ue||Ke($e)||($e.content instanceof y&&st($e.content),qe($e),Ue=$e);if(Ue=null,z)return Ve;if(Y){if(ne)for(Xe=p.call(Be.ownerDocument);Be.firstChild;)Xe.appendChild(Be.firstChild);else Xe=Be;return de&&(Xe=E.call(S,Xe,!0)),Xe}var nt=B?Be.outerHTML:Be.innerHTML;return H&&(nt=Lt(nt,F," "),nt=Lt(nt,R," ")),d&&he?d.createHTML(nt):nt},e.setConfig=function(Ve){pe(Ve),j=!0},e.clearConfig=function(){De=null,j=!1},e.isValidAttribute=function(Ve,Me,Be){De||pe({});var We=Dt(Ve),$e=Dt(Me);return Ye(We,$e,Be)},e.addHook=function(Ve,Me){typeof Me=="function"&&(T[Ve]=T[Ve]||[],Rt(T[Ve],Me))},e.removeHook=function(Ve){T[Ve]&&Li(T[Ve])},e.removeHooks=function(Ve){T[Ve]&&(T[Ve]=[])},e.removeAllHooks=function(){T={}},e}var Nn=Ni();define("vs/base/browser/dompurify/dompurify",function(){return Nn}),define(J[35],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class S{constructor(w){this.domNode=w,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(w){const b=k(w);this._maxWidth!==b&&(this._maxWidth=b,this.domNode.style.maxWidth=this._maxWidth)}setWidth(w){const b=k(w);this._width!==b&&(this._width=b,this.domNode.style.width=this._width)}setHeight(w){const b=k(w);this._height!==b&&(this._height=b,this.domNode.style.height=this._height)}setTop(w){const b=k(w);this._top!==b&&(this._top=b,this.domNode.style.top=this._top)}setLeft(w){const b=k(w);this._left!==b&&(this._left=b,this.domNode.style.left=this._left)}setBottom(w){const b=k(w);this._bottom!==b&&(this._bottom=b,this.domNode.style.bottom=this._bottom)}setRight(w){const b=k(w);this._right!==b&&(this._right=b,this.domNode.style.right=this._right)}setPaddingLeft(w){const b=k(w);this._paddingLeft!==b&&(this._paddingLeft=b,this.domNode.style.paddingLeft=this._paddingLeft)}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){const b=k(w);this._fontSize!==b&&(this._fontSize=b,this.domNode.style.fontSize=this._fontSize)}setFontStyle(w){this._fontStyle!==w&&(this._fontStyle=w,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(w){this._fontFeatureSettings!==w&&(this._fontFeatureSettings=w,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(w){this._fontVariationSettings!==w&&(this._fontVariationSettings=w,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(w){this._textDecoration!==w&&(this._textDecoration=w,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(w){const b=k(w);this._lineHeight!==b&&(this._lineHeight=b,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(w){const b=k(w);this._letterSpacing!==b&&(this._letterSpacing=b,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(w){this._className!==w&&(this._className=w,this.domNode.className=this._className)}toggleClassName(w,b){this.domNode.classList.toggle(w,b),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)}setColor(w){this._color!==w&&(this._color=w,this.domNode.style.color=this._color)}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,b){this.domNode.setAttribute(w,b)}removeAttribute(w){this.domNode.removeAttribute(w)}appendChild(w){this.domNode.appendChild(w.domNode)}removeChild(w){this.domNode.removeChild(w.domNode)}}e.FastDomNode=S;function k(D){return typeof D=="number"?`${D}px`:D}function y(D){return new S(D)}e.createFastDomNode=y}),define(J[349],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let S=!1,k=null;function y(w){if(!w.parent||w.parent===w)return null;try{const b=w.location,_=w.parent.location;if(b.origin!=="null"&&_.origin!=="null"&&b.origin!==_.origin)return S=!0,null}catch{return S=!0,null}return w.parent}class D{static getSameOriginWindowChain(){if(!k){k=[];let b=window,_;do _=y(b),_?k.push({window:b,iframeElement:b.frameElement||null}):k.push({window:b,iframeElement:null}),b=_;while(b)}return k.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(b,_){if(!_||b===_)return{top:0,left:0};let h=0,m=0;const n=this.getSameOriginWindowChain();for(const t of n){if(h+=t.window.scrollY,m+=t.window.scrollX,t.window===_||!t.iframeElement)break;const i=t.iframeElement.getBoundingClientRect();h+=i.top,m+=i.left}return{top:h,left:m}}}e.IframeUtils=D}),define(J[241],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputLatency=void 0;var S;(function(k){const y={total:0,min:Number.MAX_VALUE,max:0},D=Object.assign({},y),w=Object.assign({},y),b=Object.assign({},y);let _=0;const h={keydown:0,input:0,render:0};function m(){a(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),h.keydown=1,queueMicrotask(n)}k.onKeyDown=m;function n(){h.keydown===1&&(performance.mark("keydown/end"),h.keydown=2)}function t(){performance.mark("input/start"),h.input=1,l()}k.onBeforeInput=t;function i(){h.input===0&&t(),queueMicrotask(s)}k.onInput=i;function s(){h.input===1&&(performance.mark("input/end"),h.input=2)}function r(){a()}k.onKeyUp=r;function c(){a()}k.onSelectionChange=c;function g(){h.keydown===2&&h.input===2&&h.render===0&&(performance.mark("render/start"),h.render=1,queueMicrotask(o),l())}k.onRenderStart=g;function o(){h.render===1&&(performance.mark("render/end"),h.render=2)}function l(){setTimeout(a)}function a(){h.keydown===2&&h.input===2&&h.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),d("keydown",y),d("input",D),d("render",w),d("inputlatency",b),_++,u())}function d(p,L){const E=performance.getEntriesByName(p)[0].duration;L.total+=E,L.min=Math.min(L.min,E),L.max=Math.max(L.max,E)}function u(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),h.keydown=0,h.input=0,h.render=0}function C(){if(_===0)return;const p={keydown:f(y),input:f(D),render:f(w),total:f(b),sampleCount:_};return v(y),v(D),v(w),v(b),_=0,p}k.getAndClearMeasurements=C;function f(p){return{average:p.total/_,max:p.max,min:p.min}}function v(p){p.total=0,p.min=Number.MAX_VALUE,p.max=0}})(S=e.inputLatency||(e.inputLatency={}))}),define(J[350],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListError=void 0;class S extends Error{constructor(y,D){super(`ListError [${y}] ${D}`)}}e.ListError=S}),define(J[351],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class S{constructor(y){this.spliceables=y}splice(y,D,w){this.spliceables.forEach(b=>b.splice(y,D,w))}}e.CombinedSpliceable=S}),define(J[242],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const S=20;class k{constructor(D,w,b,_,h,m){this._scrollbarSize=Math.round(w),this._oppositeScrollbarSize=Math.round(b),this._arrowSize=Math.round(D),this._visibleSize=_,this._scrollSize=h,this._scrollPosition=m,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new k(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(D){const w=Math.round(D);return this._visibleSize!==w?(this._visibleSize=w,this._refreshComputedValues(),!0):!1}setScrollSize(D){const w=Math.round(D);return this._scrollSize!==w?(this._scrollSize=w,this._refreshComputedValues(),!0):!1}setScrollPosition(D){const w=Math.round(D);return this._scrollPosition!==w?(this._scrollPosition=w,this._refreshComputedValues(),!0):!1}setScrollbarSize(D){this._scrollbarSize=Math.round(D)}setOppositeScrollbarSize(D){this._oppositeScrollbarSize=Math.round(D)}static _computeValues(D,w,b,_,h){const m=Math.max(0,b-D),n=Math.max(0,m-2*w),t=_>0&&_>b;if(!t)return{computedAvailableSize:Math.round(m),computedIsNeeded:t,computedSliderSize:Math.round(n),computedSliderRatio:0,computedSliderPosition:0};const i=Math.round(Math.max(S,Math.floor(b*n/_))),s=(n-i)/(_-b),r=h*s;return{computedAvailableSize:Math.round(m),computedIsNeeded:t,computedSliderSize:Math.round(i),computedSliderRatio:s,computedSliderPosition:Math.round(r)}}_refreshComputedValues(){const D=k._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=D.computedAvailableSize,this._computedIsNeeded=D.computedIsNeeded,this._computedSliderSize=D.computedSliderSize,this._computedSliderRatio=D.computedSliderRatio,this._computedSliderPosition=D.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(D){if(!this._computedIsNeeded)return 0;const w=D-this._arrowSize-this._computedSliderSize/2;return Math.round(w/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(D){if(!this._computedIsNeeded)return 0;const w=D-this._arrowSize;let b=this._scrollPosition;return w<this._computedSliderPosition?b-=this._visibleSize:b+=this._visibleSize,b}getDesiredScrollPositionFromDelta(D){if(!this._computedIsNeeded)return 0;const w=this._computedSliderPosition+D;return Math.round(w/this._computedSliderRatio)}}e.ScrollbarState=k}),define(J[129],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WeakMapper=e.TreeError=e.TreeMouseEventTarget=e.ObjectTreeElementCollapseState=void 0;var S;(function(w){w[w.Expanded=0]="Expanded",w[w.Collapsed=1]="Collapsed",w[w.PreserveOrExpanded=2]="PreserveOrExpanded",w[w.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(S=e.ObjectTreeElementCollapseState||(e.ObjectTreeElementCollapseState={}));var k;(function(w){w[w.Unknown=0]="Unknown",w[w.Twistie=1]="Twistie",w[w.Element=2]="Element",w[w.Filter=3]="Filter"})(k=e.TreeMouseEventTarget||(e.TreeMouseEventTarget={}));class y extends Error{constructor(b,_){super(`TreeError [${b}] ${_}`)}}e.TreeError=y;class D{constructor(b){this.fn=b,this._map=new WeakMap}map(b){let _=this._map.get(b);return _||(_=this.fn(b),this._map.set(b,_)),_}}e.WeakMapper=D}),define(J[16],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackIterable=e.ArrayQueue=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.numberComparator=e.compareBy=e.CompareResult=e.splice=e.insertInto=e.asArray=e.pushMany=e.pushToEnd=e.pushToStart=e.arrayInsert=e.range=e.firstOrDefault=e.lastIndex=e.findLast=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.coalesceInPlace=e.coalesce=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch2=e.binarySearch=e.removeFastWithoutKeepingOrder=e.equals=e.tail2=e.tail=void 0;function S(P,x=0){return P[P.length-(1+x)]}e.tail=S;function k(P){if(P.length===0)throw new Error("Invalid tail call");return[P.slice(0,P.length-1),P[P.length-1]]}e.tail2=k;function y(P,x,W=(U,O)=>U===O){if(P===x)return!0;if(!P||!x||P.length!==x.length)return!1;for(let U=0,O=P.length;U<O;U++)if(!W(P[U],x[U]))return!1;return!0}e.equals=y;function D(P,x){const W=P.length-1;x<W&&(P[x]=P[W]),P.pop()}e.removeFastWithoutKeepingOrder=D;function w(P,x,W){return b(P.length,U=>W(P[U],x))}e.binarySearch=w;function b(P,x){let W=0,U=P-1;for(;W<=U;){const O=(W+U)/2|0,$=x(O);if($<0)W=O+1;else if($>0)U=O-1;else return O}return-(W+1)}e.binarySearch2=b;function _(P,x){let W=0,U=P.length;if(U===0)return 0;for(;W<U;){const O=Math.floor((W+U)/2);x(P[O])?U=O:W=O+1}return W}e.findFirstInSorted=_;function h(P,x,W){if(P=P|0,P>=x.length)throw new TypeError("invalid index");const U=x[Math.floor(x.length*Math.random())],O=[],$=[],Q=[];for(const se of x){const le=W(se,U);le<0?O.push(se):le>0?$.push(se):Q.push(se)}return P<O.length?h(P,O,W):P<O.length+Q.length?Q[0]:h(P-(O.length+Q.length),$,W)}e.quickSelect=h;function m(P,x){const W=[];let U;for(const O of P.slice(0).sort(x))!U||x(U[0],O)!==0?(U=[O],W.push(U)):U.push(O);return W}e.groupBy=m;function n(P){return P.filter(x=>!!x)}e.coalesce=n;function t(P){let x=0;for(let W=0;W<P.length;W++)P[W]&&(P[x]=P[W],x+=1);P.length=x}e.coalesceInPlace=t;function i(P){return!Array.isArray(P)||P.length===0}e.isFalsyOrEmpty=i;function s(P){return Array.isArray(P)&&P.length>0}e.isNonEmptyArray=s;function r(P,x=W=>W){const W=new Set;return P.filter(U=>{const O=x(U);return W.has(O)?!1:(W.add(O),!0)})}e.distinct=r;function c(P,x){const W=g(P,x);if(W!==-1)return P[W]}e.findLast=c;function g(P,x){for(let W=P.length-1;W>=0;W--){const U=P[W];if(x(U))return W}return-1}e.lastIndex=g;function o(P,x){return P.length>0?P[0]:x}e.firstOrDefault=o;function l(P,x){let W=typeof x=="number"?P:0;typeof x=="number"?W=P:(W=0,x=P);const U=[];if(W<=x)for(let O=W;O<x;O++)U.push(O);else for(let O=W;O>x;O--)U.push(O);return U}e.range=l;function a(P,x,W){const U=P.slice(0,x),O=P.slice(x);return U.concat(W,O)}e.arrayInsert=a;function d(P,x){const W=P.indexOf(x);W>-1&&(P.splice(W,1),P.unshift(x))}e.pushToStart=d;function u(P,x){const W=P.indexOf(x);W>-1&&(P.splice(W,1),P.push(x))}e.pushToEnd=u;function C(P,x){for(const W of x)P.push(W)}e.pushMany=C;function f(P){return Array.isArray(P)?P:[P]}e.asArray=f;function v(P,x,W){const U=L(P,x),O=P.length,$=W.length;P.length=O+$;for(let Q=O-1;Q>=U;Q--)P[Q+$]=P[Q];for(let Q=0;Q<$;Q++)P[Q+U]=W[Q]}e.insertInto=v;function p(P,x,W,U){const O=L(P,x),$=P.splice(O,W);return v(P,O,U),$}e.splice=p;function L(P,x){return x<0?Math.max(x+P.length,0):Math.min(x,P.length)}var E;(function(P){function x(O){return O<0}P.isLessThan=x;function W(O){return O>0}P.isGreaterThan=W;function U(O){return O===0}P.isNeitherLessOrGreaterThan=U,P.greaterThan=1,P.lessThan=-1,P.neitherLessOrGreaterThan=0})(E=e.CompareResult||(e.CompareResult={}));function I(P,x){return(W,U)=>x(P(W),P(U))}e.compareBy=I;const T=(P,x)=>P-x;e.numberComparator=T;function F(P,x){if(P.length===0)return;let W=P[0];for(let U=1;U<P.length;U++){const O=P[U];x(O,W)>0&&(W=O)}return W}e.findMaxBy=F;function R(P,x){if(P.length===0)return;let W=P[0];for(let U=1;U<P.length;U++){const O=P[U];x(O,W)>=0&&(W=O)}return W}e.findLastMaxBy=R;function M(P,x){return F(P,(W,U)=>-x(W,U))}e.findMinBy=M;class N{constructor(x){this.items=x,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(x){let W=this.firstIdx;for(;W<this.items.length&&x(this.items[W]);)W++;const U=W===this.firstIdx?null:this.items.slice(this.firstIdx,W);return this.firstIdx=W,U}takeFromEndWhile(x){let W=this.lastIdx;for(;W>=0&&x(this.items[W]);)W--;const U=W===this.lastIdx?null:this.items.slice(W+1,this.lastIdx+1);return this.lastIdx=W,U}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const x=this.items[this.firstIdx];return this.firstIdx++,x}takeCount(x){const W=this.items.slice(this.firstIdx,this.firstIdx+x);return this.firstIdx+=x,W}}e.ArrayQueue=N;class A{constructor(x){this.iterate=x}toArray(){const x=[];return this.iterate(W=>(x.push(W),!0)),x}filter(x){return new A(W=>this.iterate(U=>x(U)?W(U):!0))}map(x){return new A(W=>this.iterate(U=>W(x(U))))}findLast(x){let W;return this.iterate(U=>(x(U)&&(W=U),!0)),W}findLastMaxBy(x){let W,U=!0;return this.iterate(O=>((U||E.isGreaterThan(x(O,W)))&&(U=!1,W=O),!0)),W}}A.empty=new A(P=>{}),e.CallbackIterable=A}),define(J[130],ee([1,0]),function(q,e){"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 S=typeof Buffer<"u";let k;class y{static wrap(t){return S&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new y(t)}constructor(t){this.buffer=t,this.byteLength=this.buffer.byteLength}toString(){return S?this.buffer.toString():(k||(k=new TextDecoder),k.decode(this.buffer))}}e.VSBuffer=y;function D(n,t){return n[t+0]<<0>>>0|n[t+1]<<8>>>0}e.readUInt16LE=D;function w(n,t,i){n[i+0]=t&255,t=t>>>8,n[i+1]=t&255}e.writeUInt16LE=w;function b(n,t){return n[t]*Math.pow(2,24)+n[t+1]*Math.pow(2,16)+n[t+2]*Math.pow(2,8)+n[t+3]}e.readUInt32BE=b;function _(n,t,i){n[i+3]=t,t=t>>>8,n[i+2]=t,t=t>>>8,n[i+1]=t,t=t>>>8,n[i]=t}e.writeUInt32BE=_;function h(n,t){return n[t]}e.readUInt8=h;function m(n,t,i){n[i]=t}e.writeUInt8=m}),define(J[243],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=void 0;class S{constructor(D){this.fn=D,this.lastCache=void 0,this.lastArgKey=void 0}get(D){const w=JSON.stringify(D);return this.lastArgKey!==w&&(this.lastArgKey=w,this.lastCache=this.fn(D)),this.lastCache}}e.LRUCachedFunction=S;class k{get cachedValues(){return this._map}constructor(D){this.fn=D,this._map=new Map}get(D){if(this._map.has(D))return this._map.get(D);const w=this.fn(D);return this._map.set(D,w),w}}e.CachedFunction=k}),define(J[352],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=void 0;class S{constructor(){this.map=new Map}add(y,D){let w=this.map.get(y);w||(w=new Set,this.map.set(y,w)),w.add(D)}delete(y,D){const w=this.map.get(y);w&&(w.delete(D),w.size===0&&this.map.delete(y))}forEach(y,D){const w=this.map.get(y);w&&w.forEach(D)}}e.SetMap=S}),define(J[37],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function S(b,_){const h=Math.pow(10,_);return Math.round(b*h)/h}class k{constructor(_,h,m,n=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,_))|0,this.g=Math.min(255,Math.max(0,h))|0,this.b=Math.min(255,Math.max(0,m))|0,this.a=S(Math.max(Math.min(1,n),0),3)}static equals(_,h){return _.r===h.r&&_.g===h.g&&_.b===h.b&&_.a===h.a}}e.RGBA=k;class y{constructor(_,h,m,n){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,_),0)|0,this.s=S(Math.max(Math.min(1,h),0),3),this.l=S(Math.max(Math.min(1,m),0),3),this.a=S(Math.max(Math.min(1,n),0),3)}static equals(_,h){return _.h===h.h&&_.s===h.s&&_.l===h.l&&_.a===h.a}static fromRGBA(_){const h=_.r/255,m=_.g/255,n=_.b/255,t=_.a,i=Math.max(h,m,n),s=Math.min(h,m,n);let r=0,c=0;const g=(s+i)/2,o=i-s;if(o>0){switch(c=Math.min(g<=.5?o/(2*g):o/(2-2*g),1),i){case h:r=(m-n)/o+(m<n?6:0);break;case m:r=(n-h)/o+2;break;case n:r=(h-m)/o+4;break}r*=60,r=Math.round(r)}return new y(r,c,g,t)}static _hue2rgb(_,h,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?_+(h-_)*6*m:m<1/2?h:m<2/3?_+(h-_)*(2/3-m)*6:_}static toRGBA(_){const h=_.h/360,{s:m,l:n,a:t}=_;let i,s,r;if(m===0)i=s=r=n;else{const c=n<.5?n*(1+m):n+m-n*m,g=2*n-c;i=y._hue2rgb(g,c,h+1/3),s=y._hue2rgb(g,c,h),r=y._hue2rgb(g,c,h-1/3)}return new k(Math.round(i*255),Math.round(s*255),Math.round(r*255),t)}}e.HSLA=y;class D{constructor(_,h,m,n){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,_),0)|0,this.s=S(Math.max(Math.min(1,h),0),3),this.v=S(Math.max(Math.min(1,m),0),3),this.a=S(Math.max(Math.min(1,n),0),3)}static equals(_,h){return _.h===h.h&&_.s===h.s&&_.v===h.v&&_.a===h.a}static fromRGBA(_){const h=_.r/255,m=_.g/255,n=_.b/255,t=Math.max(h,m,n),i=Math.min(h,m,n),s=t-i,r=t===0?0:s/t;let c;return s===0?c=0:t===h?c=((m-n)/s%6+6)%6:t===m?c=(n-h)/s+2:c=(h-m)/s+4,new D(Math.round(c*60),r,t,_.a)}static toRGBA(_){const{h,s:m,v:n,a:t}=_,i=n*m,s=i*(1-Math.abs(h/60%2-1)),r=n-i;let[c,g,o]=[0,0,0];return h<60?(c=i,g=s):h<120?(c=s,g=i):h<180?(g=i,o=s):h<240?(g=s,o=i):h<300?(c=s,o=i):h<=360&&(c=i,o=s),c=Math.round((c+r)*255),g=Math.round((g+r)*255),o=Math.round((o+r)*255),new k(c,g,o,t)}}e.HSVA=D;class w{static fromHex(_){return w.Format.CSS.parseHex(_)||w.red}static equals(_,h){return!_&&!h?!0:!_||!h?!1:_.equals(h)}get hsla(){return this._hsla?this._hsla:y.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:D.fromRGBA(this.rgba)}constructor(_){if(_)if(_ instanceof k)this.rgba=_;else if(_ instanceof y)this._hsla=_,this.rgba=y.toRGBA(_);else if(_ instanceof D)this._hsva=_,this.rgba=D.toRGBA(_);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(_){return!!_&&k.equals(this.rgba,_.rgba)&&y.equals(this.hsla,_.hsla)&&D.equals(this.hsva,_.hsva)}getRelativeLuminance(){const _=w._relativeLuminanceForComponent(this.rgba.r),h=w._relativeLuminanceForComponent(this.rgba.g),m=w._relativeLuminanceForComponent(this.rgba.b),n=.2126*_+.7152*h+.0722*m;return S(n,4)}static _relativeLuminanceForComponent(_){const h=_/255;return h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(_){const h=this.getRelativeLuminance(),m=_.getRelativeLuminance();return h>m}isDarkerThan(_){const h=this.getRelativeLuminance(),m=_.getRelativeLuminance();return h<m}lighten(_){return new w(new y(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*_,this.hsla.a))}darken(_){return new w(new y(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*_,this.hsla.a))}transparent(_){const{r:h,g:m,b:n,a:t}=this.rgba;return new w(new k(h,m,n,t*_))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new w(new k(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}makeOpaque(_){if(this.isOpaque()||_.rgba.a!==1)return this;const{r:h,g:m,b:n,a:t}=this.rgba;return new w(new k(_.rgba.r-t*(_.rgba.r-h),_.rgba.g-t*(_.rgba.g-m),_.rgba.b-t*(_.rgba.b-n),1))}toString(){return this._toString||(this._toString=w.Format.CSS.format(this)),this._toString}static getLighterColor(_,h,m){if(_.isLighterThan(h))return _;m=m||.5;const n=_.getRelativeLuminance(),t=h.getRelativeLuminance();return m=m*(t-n)/t,_.lighten(m)}static getDarkerColor(_,h,m){if(_.isDarkerThan(h))return _;m=m||.5;const n=_.getRelativeLuminance(),t=h.getRelativeLuminance();return m=m*(n-t)/n,_.darken(m)}}w.white=new w(new k(255,255,255,1)),w.black=new w(new k(0,0,0,1)),w.red=new w(new k(255,0,0,1)),w.blue=new w(new k(0,0,255,1)),w.green=new w(new k(0,255,0,1)),w.cyan=new w(new k(0,255,255,1)),w.lightgrey=new w(new k(211,211,211,1)),w.transparent=new w(new k(0,0,0,0)),e.Color=w,function(b){let _;(function(h){let m;(function(n){function t(u){return u.rgba.a===1?`rgb(${u.rgba.r}, ${u.rgba.g}, ${u.rgba.b})`:b.Format.CSS.formatRGBA(u)}n.formatRGB=t;function i(u){return`rgba(${u.rgba.r}, ${u.rgba.g}, ${u.rgba.b}, ${+u.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(u){return u.hsla.a===1?`hsl(${u.hsla.h}, ${(u.hsla.s*100).toFixed(2)}%, ${(u.hsla.l*100).toFixed(2)}%)`:b.Format.CSS.formatHSLA(u)}n.formatHSL=s;function r(u){return`hsla(${u.hsla.h}, ${(u.hsla.s*100).toFixed(2)}%, ${(u.hsla.l*100).toFixed(2)}%, ${u.hsla.a.toFixed(2)})`}n.formatHSLA=r;function c(u){const C=u.toString(16);return C.length!==2?"0"+C:C}function g(u){return`#${c(u.rgba.r)}${c(u.rgba.g)}${c(u.rgba.b)}`}n.formatHex=g;function o(u,C=!1){return C&&u.rgba.a===1?b.Format.CSS.formatHex(u):`#${c(u.rgba.r)}${c(u.rgba.g)}${c(u.rgba.b)}${c(Math.round(u.rgba.a*255))}`}n.formatHexA=o;function l(u){return u.isOpaque()?b.Format.CSS.formatHex(u):b.Format.CSS.formatRGBA(u)}n.format=l;function a(u){const C=u.length;if(C===0||u.charCodeAt(0)!==35)return null;if(C===7){const f=16*d(u.charCodeAt(1))+d(u.charCodeAt(2)),v=16*d(u.charCodeAt(3))+d(u.charCodeAt(4)),p=16*d(u.charCodeAt(5))+d(u.charCodeAt(6));return new b(new k(f,v,p,1))}if(C===9){const f=16*d(u.charCodeAt(1))+d(u.charCodeAt(2)),v=16*d(u.charCodeAt(3))+d(u.charCodeAt(4)),p=16*d(u.charCodeAt(5))+d(u.charCodeAt(6)),L=16*d(u.charCodeAt(7))+d(u.charCodeAt(8));return new b(new k(f,v,p,L/255))}if(C===4){const f=d(u.charCodeAt(1)),v=d(u.charCodeAt(2)),p=d(u.charCodeAt(3));return new b(new k(16*f+f,16*v+v,16*p+p))}if(C===5){const f=d(u.charCodeAt(1)),v=d(u.charCodeAt(2)),p=d(u.charCodeAt(3)),L=d(u.charCodeAt(4));return new b(new k(16*f+f,16*v+v,16*p+p,(16*L+L)/255))}return null}n.parseHex=a;function d(u){switch(u){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}})(m=h.CSS||(h.CSS={}))})(_=b.Format||(b.Format={}))}(w=e.Color||(e.Color={})),e.Color=w}),define(J[99],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.memoize=void 0;function S(k,y,D){let w=null,b=null;if(typeof D.value=="function"?(w="value",b=D.value,b.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof D.get=="function"&&(w="get",b=D.get),!b)throw new Error("not supported");const _=`$memoize$${y}`;D[w]=function(...h){return this.hasOwnProperty(_)||Object.defineProperty(this,_,{configurable:!1,enumerable:!1,writable:!1,value:b.apply(this,h)}),this[_]}}e.memoize=S}),define(J[353],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class S{constructor(y,D,w,b){this.originalStart=y,this.originalLength=D,this.modifiedStart=w,this.modifiedLength=b}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=S}),define(J[11],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BugIndicatingError=e.ErrorNoTelemetry=e.NotSupportedError=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.errorHandler=e.ErrorHandler=void 0;class S{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?i.isErrorNoTelemetry(c)?new i(c.message+`\n\n`+c.stack):new Error(c.message+`\n\n`+c.stack):c},0)}}emit(c){this.listeners.forEach(g=>{g(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}e.ErrorHandler=S,e.errorHandler=new S;function k(r){b(r)||e.errorHandler.onUnexpectedError(r)}e.onUnexpectedError=k;function y(r){b(r)||e.errorHandler.onUnexpectedExternalError(r)}e.onUnexpectedExternalError=y;function D(r){if(r instanceof Error){const{name:c,message:g}=r,o=r.stacktrace||r.stack;return{$isError:!0,name:c,message:g,stack:o,noTelemetry:i.isErrorNoTelemetry(r)}}return r}e.transformErrorForSerialization=D;const w="Canceled";function b(r){return r instanceof _?!0:r instanceof Error&&r.name===w&&r.message===w}e.isCancellationError=b;class _ extends Error{constructor(){super(w),this.name=this.message}}e.CancellationError=_;function h(){const r=new Error(w);return r.name=r.message,r}e.canceled=h;function m(r){return r?new Error(`Illegal argument: ${r}`):new Error("Illegal argument")}e.illegalArgument=m;function n(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}e.illegalState=n;class t extends Error{constructor(c){super("NotSupported"),c&&(this.message=c)}}e.NotSupportedError=t;class i extends Error{constructor(c){super(c),this.name="CodeExpectedError"}static fromError(c){if(c instanceof i)return c;const g=new i;return g.message=c.message,g.stack=c.stack,g}static isErrorNoTelemetry(c){return c.name==="CodeExpectedError"}}e.ErrorNoTelemetry=i;class s extends Error{constructor(c){super(c||"An unexpected bug occurred."),Object.setPrototypeOf(this,s.prototype);debugger}}e.BugIndicatingError=s}),define(J[84],ee([1,0,11]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assertNever=e.ok=void 0;function k(b,_){if(!b)throw new Error(_?`Assertion failed (${_})`:"Assertion Failed")}e.ok=k;function y(b,_="Unreachable"){throw new Error(_)}e.assertNever=y;function D(b){if(!b()){debugger;b(),(0,S.onUnexpectedError)(new S.BugIndicatingError("Assertion Failed"))}}e.assertFn=D;function w(b,_){let h=0;for(;h<b.length-1;){const m=b[h],n=b[h+1];if(!_(m,n))return!1;h++}return!0}e.checkAdjacentItems=w}),define(J[92],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function S(k){const y=this;let D=!1,w;return function(){return D||(D=!0,w=k.apply(y,arguments)),w}}e.once=S}),define(J[155],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class S{constructor(y){this._prefix=y,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=S,e.defaultGenerator=new S("id#")}),define(J[54],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var S;(function(k){function y(a){return a&&typeof a=="object"&&typeof a[Symbol.iterator]=="function"}k.is=y;const D=Object.freeze([]);function w(){return D}k.empty=w;function*b(a){yield a}k.single=b;function _(a){return y(a)?a:b(a)}k.wrap=_;function h(a){return a||D}k.from=h;function m(a){return!a||a[Symbol.iterator]().next().done===!0}k.isEmpty=m;function n(a){return a[Symbol.iterator]().next().value}k.first=n;function t(a,d){for(const u of a)if(d(u))return!0;return!1}k.some=t;function i(a,d){for(const u of a)if(d(u))return u}k.find=i;function*s(a,d){for(const u of a)d(u)&&(yield u)}k.filter=s;function*r(a,d){let u=0;for(const C of a)yield d(C,u++)}k.map=r;function*c(...a){for(const d of a)for(const u of d)yield u}k.concat=c;function g(a,d,u){let C=u;for(const f of a)C=d(C,f);return C}k.reduce=g;function*o(a,d,u=a.length){for(d<0&&(d+=a.length),u<0?u+=a.length:u>a.length&&(u=a.length);d<u;d++)yield a[d]}k.slice=o;function l(a,d=Number.POSITIVE_INFINITY){const u=[];if(d===0)return[u,a];const C=a[Symbol.iterator]();for(let f=0;f<d;f++){const v=C.next();if(v.done)return[u,k.empty()];u.push(v.value)}return[u,{[Symbol.iterator](){return C}}]}k.consume=l})(S=e.Iterable||(e.Iterable={}))}),define(J[58],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyChord=e.KeyCodeUtils=e.IMMUTABLE_KEY_CODE_TO_CODE=e.IMMUTABLE_CODE_TO_KEY_CODE=e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE=e.EVENT_KEY_CODE_MAP=void 0;class S{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,i){this._keyCodeToStr[t]=i,this._strToKeyCode[i.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const k=new S,y=new S,D=new S;e.EVENT_KEY_CODE_MAP=new Array(230),e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const w=[],b=Object.create(null),_=Object.create(null);e.IMMUTABLE_CODE_TO_KEY_CODE=[],e.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let n=0;n<=193;n++)e.IMMUTABLE_CODE_TO_KEY_CODE[n]=-1;for(let n=0;n<=127;n++)e.IMMUTABLE_KEY_CODE_TO_CODE[n]=-1;(function(){const n="",t=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",n,n],[0,1,1,"Hyper",0,n,0,n,n,n],[0,1,2,"Super",0,n,0,n,n,n],[0,1,3,"Fn",0,n,0,n,n,n],[0,1,4,"FnLock",0,n,0,n,n,n],[0,1,5,"Suspend",0,n,0,n,n,n],[0,1,6,"Resume",0,n,0,n,n,n],[0,1,7,"Turbo",0,n,0,n,n,n],[0,1,8,"Sleep",0,n,0,"VK_SLEEP",n,n],[0,1,9,"WakeUp",0,n,0,n,n,n],[31,0,10,"KeyA",31,"A",65,"VK_A",n,n],[32,0,11,"KeyB",32,"B",66,"VK_B",n,n],[33,0,12,"KeyC",33,"C",67,"VK_C",n,n],[34,0,13,"KeyD",34,"D",68,"VK_D",n,n],[35,0,14,"KeyE",35,"E",69,"VK_E",n,n],[36,0,15,"KeyF",36,"F",70,"VK_F",n,n],[37,0,16,"KeyG",37,"G",71,"VK_G",n,n],[38,0,17,"KeyH",38,"H",72,"VK_H",n,n],[39,0,18,"KeyI",39,"I",73,"VK_I",n,n],[40,0,19,"KeyJ",40,"J",74,"VK_J",n,n],[41,0,20,"KeyK",41,"K",75,"VK_K",n,n],[42,0,21,"KeyL",42,"L",76,"VK_L",n,n],[43,0,22,"KeyM",43,"M",77,"VK_M",n,n],[44,0,23,"KeyN",44,"N",78,"VK_N",n,n],[45,0,24,"KeyO",45,"O",79,"VK_O",n,n],[46,0,25,"KeyP",46,"P",80,"VK_P",n,n],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",n,n],[48,0,27,"KeyR",48,"R",82,"VK_R",n,n],[49,0,28,"KeyS",49,"S",83,"VK_S",n,n],[50,0,29,"KeyT",50,"T",84,"VK_T",n,n],[51,0,30,"KeyU",51,"U",85,"VK_U",n,n],[52,0,31,"KeyV",52,"V",86,"VK_V",n,n],[53,0,32,"KeyW",53,"W",87,"VK_W",n,n],[54,0,33,"KeyX",54,"X",88,"VK_X",n,n],[55,0,34,"KeyY",55,"Y",89,"VK_Y",n,n],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",n,n],[22,0,36,"Digit1",22,"1",49,"VK_1",n,n],[23,0,37,"Digit2",23,"2",50,"VK_2",n,n],[24,0,38,"Digit3",24,"3",51,"VK_3",n,n],[25,0,39,"Digit4",25,"4",52,"VK_4",n,n],[26,0,40,"Digit5",26,"5",53,"VK_5",n,n],[27,0,41,"Digit6",27,"6",54,"VK_6",n,n],[28,0,42,"Digit7",28,"7",55,"VK_7",n,n],[29,0,43,"Digit8",29,"8",56,"VK_8",n,n],[30,0,44,"Digit9",30,"9",57,"VK_9",n,n],[21,0,45,"Digit0",21,"0",48,"VK_0",n,n],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",n,n],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",n,n],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",n,n],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",n,n],[10,1,50,"Space",10,"Space",32,"VK_SPACE",n,n],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\\\",220,"VK_OEM_5","\\\\","OEM_5"],[0,0,56,"IntlHash",0,n,0,n,n,n],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"\'",222,"VK_OEM_7","\'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",n,n],[59,1,64,"F1",59,"F1",112,"VK_F1",n,n],[60,1,65,"F2",60,"F2",113,"VK_F2",n,n],[61,1,66,"F3",61,"F3",114,"VK_F3",n,n],[62,1,67,"F4",62,"F4",115,"VK_F4",n,n],[63,1,68,"F5",63,"F5",116,"VK_F5",n,n],[64,1,69,"F6",64,"F6",117,"VK_F6",n,n],[65,1,70,"F7",65,"F7",118,"VK_F7",n,n],[66,1,71,"F8",66,"F8",119,"VK_F8",n,n],[67,1,72,"F9",67,"F9",120,"VK_F9",n,n],[68,1,73,"F10",68,"F10",121,"VK_F10",n,n],[69,1,74,"F11",69,"F11",122,"VK_F11",n,n],[70,1,75,"F12",70,"F12",123,"VK_F12",n,n],[0,1,76,"PrintScreen",0,n,0,n,n,n],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",n,n],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",n,n],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",n,n],[14,1,80,"Home",14,"Home",36,"VK_HOME",n,n],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",n,n],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",n,n],[13,1,83,"End",13,"End",35,"VK_END",n,n],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",n,n],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",n],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",n],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",n],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",n],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",n,n],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",n,n],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",n,n],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",n,n],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",n,n],[3,1,94,"NumpadEnter",3,n,0,n,n,n],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",n,n],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",n,n],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",n,n],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",n,n],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",n,n],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",n,n],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",n,n],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",n,n],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",n,n],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",n,n],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",n,n],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",n,n],[58,1,107,"ContextMenu",58,"ContextMenu",93,n,n,n],[0,1,108,"Power",0,n,0,n,n,n],[0,1,109,"NumpadEqual",0,n,0,n,n,n],[71,1,110,"F13",71,"F13",124,"VK_F13",n,n],[72,1,111,"F14",72,"F14",125,"VK_F14",n,n],[73,1,112,"F15",73,"F15",126,"VK_F15",n,n],[74,1,113,"F16",74,"F16",127,"VK_F16",n,n],[75,1,114,"F17",75,"F17",128,"VK_F17",n,n],[76,1,115,"F18",76,"F18",129,"VK_F18",n,n],[77,1,116,"F19",77,"F19",130,"VK_F19",n,n],[0,1,117,"F20",0,n,0,"VK_F20",n,n],[0,1,118,"F21",0,n,0,"VK_F21",n,n],[0,1,119,"F22",0,n,0,"VK_F22",n,n],[0,1,120,"F23",0,n,0,"VK_F23",n,n],[0,1,121,"F24",0,n,0,"VK_F24",n,n],[0,1,122,"Open",0,n,0,n,n,n],[0,1,123,"Help",0,n,0,n,n,n],[0,1,124,"Select",0,n,0,n,n,n],[0,1,125,"Again",0,n,0,n,n,n],[0,1,126,"Undo",0,n,0,n,n,n],[0,1,127,"Cut",0,n,0,n,n,n],[0,1,128,"Copy",0,n,0,n,n,n],[0,1,129,"Paste",0,n,0,n,n,n],[0,1,130,"Find",0,n,0,n,n,n],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",n,n],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",n,n],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",n,n],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",n,n],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",n,n],[0,1,136,"KanaMode",0,n,0,n,n,n],[0,0,137,"IntlYen",0,n,0,n,n,n],[0,1,138,"Convert",0,n,0,n,n,n],[0,1,139,"NonConvert",0,n,0,n,n,n],[0,1,140,"Lang1",0,n,0,n,n,n],[0,1,141,"Lang2",0,n,0,n,n,n],[0,1,142,"Lang3",0,n,0,n,n,n],[0,1,143,"Lang4",0,n,0,n,n,n],[0,1,144,"Lang5",0,n,0,n,n,n],[0,1,145,"Abort",0,n,0,n,n,n],[0,1,146,"Props",0,n,0,n,n,n],[0,1,147,"NumpadParenLeft",0,n,0,n,n,n],[0,1,148,"NumpadParenRight",0,n,0,n,n,n],[0,1,149,"NumpadBackspace",0,n,0,n,n,n],[0,1,150,"NumpadMemoryStore",0,n,0,n,n,n],[0,1,151,"NumpadMemoryRecall",0,n,0,n,n,n],[0,1,152,"NumpadMemoryClear",0,n,0,n,n,n],[0,1,153,"NumpadMemoryAdd",0,n,0,n,n,n],[0,1,154,"NumpadMemorySubtract",0,n,0,n,n,n],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",n,n],[0,1,156,"NumpadClearEntry",0,n,0,n,n,n],[5,1,0,n,5,"Ctrl",17,"VK_CONTROL",n,n],[4,1,0,n,4,"Shift",16,"VK_SHIFT",n,n],[6,1,0,n,6,"Alt",18,"VK_MENU",n,n],[57,1,0,n,57,"Meta",91,"VK_COMMAND",n,n],[5,1,157,"ControlLeft",5,n,0,"VK_LCONTROL",n,n],[4,1,158,"ShiftLeft",4,n,0,"VK_LSHIFT",n,n],[6,1,159,"AltLeft",6,n,0,"VK_LMENU",n,n],[57,1,160,"MetaLeft",57,n,0,"VK_LWIN",n,n],[5,1,161,"ControlRight",5,n,0,"VK_RCONTROL",n,n],[4,1,162,"ShiftRight",4,n,0,"VK_RSHIFT",n,n],[6,1,163,"AltRight",6,n,0,"VK_RMENU",n,n],[57,1,164,"MetaRight",57,n,0,"VK_RWIN",n,n],[0,1,165,"BrightnessUp",0,n,0,n,n,n],[0,1,166,"BrightnessDown",0,n,0,n,n,n],[0,1,167,"MediaPlay",0,n,0,n,n,n],[0,1,168,"MediaRecord",0,n,0,n,n,n],[0,1,169,"MediaFastForward",0,n,0,n,n,n],[0,1,170,"MediaRewind",0,n,0,n,n,n],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",n,n],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",n,n],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",n,n],[0,1,174,"Eject",0,n,0,n,n,n],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",n,n],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",n,n],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",n,n],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",n,n],[0,1,179,"LaunchApp1",0,n,0,"VK_MEDIA_LAUNCH_APP1",n,n],[0,1,180,"SelectTask",0,n,0,n,n,n],[0,1,181,"LaunchScreenSaver",0,n,0,n,n,n],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",n,n],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",n,n],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",n,n],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",n,n],[0,1,186,"BrowserStop",0,n,0,"VK_BROWSER_STOP",n,n],[0,1,187,"BrowserRefresh",0,n,0,"VK_BROWSER_REFRESH",n,n],[0,1,188,"BrowserFavorites",0,n,0,"VK_BROWSER_FAVORITES",n,n],[0,1,189,"ZoomToggle",0,n,0,n,n,n],[0,1,190,"MailReply",0,n,0,n,n,n],[0,1,191,"MailForward",0,n,0,n,n,n],[0,1,192,"MailSend",0,n,0,n,n,n],[109,1,0,n,109,"KeyInComposition",229,n,n,n],[111,1,0,n,111,"ABNT_C2",194,"VK_ABNT_C2",n,n],[91,1,0,n,91,"OEM_8",223,"VK_OEM_8",n,n],[0,1,0,n,0,n,0,"VK_KANA",n,n],[0,1,0,n,0,n,0,"VK_HANGUL",n,n],[0,1,0,n,0,n,0,"VK_JUNJA",n,n],[0,1,0,n,0,n,0,"VK_FINAL",n,n],[0,1,0,n,0,n,0,"VK_HANJA",n,n],[0,1,0,n,0,n,0,"VK_KANJI",n,n],[0,1,0,n,0,n,0,"VK_CONVERT",n,n],[0,1,0,n,0,n,0,"VK_NONCONVERT",n,n],[0,1,0,n,0,n,0,"VK_ACCEPT",n,n],[0,1,0,n,0,n,0,"VK_MODECHANGE",n,n],[0,1,0,n,0,n,0,"VK_SELECT",n,n],[0,1,0,n,0,n,0,"VK_PRINT",n,n],[0,1,0,n,0,n,0,"VK_EXECUTE",n,n],[0,1,0,n,0,n,0,"VK_SNAPSHOT",n,n],[0,1,0,n,0,n,0,"VK_HELP",n,n],[0,1,0,n,0,n,0,"VK_APPS",n,n],[0,1,0,n,0,n,0,"VK_PROCESSKEY",n,n],[0,1,0,n,0,n,0,"VK_PACKET",n,n],[0,1,0,n,0,n,0,"VK_DBE_SBCSCHAR",n,n],[0,1,0,n,0,n,0,"VK_DBE_DBCSCHAR",n,n],[0,1,0,n,0,n,0,"VK_ATTN",n,n],[0,1,0,n,0,n,0,"VK_CRSEL",n,n],[0,1,0,n,0,n,0,"VK_EXSEL",n,n],[0,1,0,n,0,n,0,"VK_EREOF",n,n],[0,1,0,n,0,n,0,"VK_PLAY",n,n],[0,1,0,n,0,n,0,"VK_ZOOM",n,n],[0,1,0,n,0,n,0,"VK_NONAME",n,n],[0,1,0,n,0,n,0,"VK_PA1",n,n],[0,1,0,n,0,n,0,"VK_OEM_CLEAR",n,n]],i=[],s=[];for(const r of t){const[c,g,o,l,a,d,u,C,f,v]=r;if(s[o]||(s[o]=!0,w[o]=l,b[l]=o,_[l.toLowerCase()]=o,g&&(e.IMMUTABLE_CODE_TO_KEY_CODE[o]=a,a!==0&&a!==3&&a!==5&&a!==4&&a!==6&&a!==57&&(e.IMMUTABLE_KEY_CODE_TO_CODE[a]=o))),!i[a]){if(i[a]=!0,!d)throw new Error(`String representation missing for key code ${a} around scan code ${l}`);k.define(a,d),y.define(a,f||d),D.define(a,v||f||d)}u&&(e.EVENT_KEY_CODE_MAP[u]=a),C&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[C]=a)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var h;(function(n){function t(o){return k.keyCodeToStr(o)}n.toString=t;function i(o){return k.strToKeyCode(o)}n.fromString=i;function s(o){return y.keyCodeToStr(o)}n.toUserSettingsUS=s;function r(o){return D.keyCodeToStr(o)}n.toUserSettingsGeneral=r;function c(o){return y.strToKeyCode(o)||D.strToKeyCode(o)}n.fromUserSettings=c;function g(o){if(o>=93&&o<=108)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return k.keyCodeToStr(o)}n.toElectronAccelerator=g})(h=e.KeyCodeUtils||(e.KeyCodeUtils={}));function m(n,t){const i=(t&65535)<<16>>>0;return(n|i)>>>0}e.KeyChord=m}),define(J[112],ee([1,0,11]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedKeybinding=e.ResolvedChord=e.Keybinding=e.ScanCodeChord=e.KeyCodeChord=e.createSimpleKeybinding=e.decodeKeybinding=void 0;function k(m,n){if(typeof m=="number"){if(m===0)return null;const t=(m&65535)>>>0,i=(m&4294901760)>>>16;return i!==0?new b([y(t,n),y(i,n)]):new b([y(t,n)])}else{const t=[];for(let i=0;i<m.length;i++)t.push(y(m[i],n));return new b(t)}}e.decodeKeybinding=k;function y(m,n){const t=!!(m&2048),i=!!(m&256),s=n===2?i:t,r=!!(m&1024),c=!!(m&512),g=n===2?t:i,o=m&255;return new D(s,r,c,g,o)}e.createSimpleKeybinding=y;class D{constructor(n,t,i,s,r){this.ctrlKey=n,this.shiftKey=t,this.altKey=i,this.metaKey=s,this.keyCode=r}equals(n){return n instanceof D&&this.ctrlKey===n.ctrlKey&&this.shiftKey===n.shiftKey&&this.altKey===n.altKey&&this.metaKey===n.metaKey&&this.keyCode===n.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}e.KeyCodeChord=D;class w{constructor(n,t,i,s,r){this.ctrlKey=n,this.shiftKey=t,this.altKey=i,this.metaKey=s,this.scanCode=r}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}e.ScanCodeChord=w;class b{constructor(n){if(n.length===0)throw(0,S.illegalArgument)("chords");this.chords=n}}e.Keybinding=b;class _{constructor(n,t,i,s,r,c){this.ctrlKey=n,this.shiftKey=t,this.altKey=i,this.metaKey=s,this.keyLabel=r,this.keyAriaLabel=c}}e.ResolvedChord=_;class h{}e.ResolvedKeybinding=h}),define(J[100],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class S{constructor(y){this.executor=y,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(y){this._error=y}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=S}),define(J[354],ee([1,0,100]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.compareFileNames=void 0;const k=new S.Lazy(()=>{const h=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:h,collatorIsNumeric:h.resolvedOptions().numeric}}),y=new S.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),D=new S.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function w(h,m,n=!1){const t=h||"",i=m||"",s=k.value.collator.compare(t,i);return k.value.collatorIsNumeric&&s===0&&t!==i?t<i?-1:1:s}e.compareFileNames=w;function b(h,m,n){const t=h.toLowerCase(),i=m.toLowerCase(),s=_(h,m,n);if(s)return s;const r=t.endsWith(n),c=i.endsWith(n);if(r!==c)return r?-1:1;const g=w(t,i);return g!==0?g:t.localeCompare(i)}e.compareAnything=b;function _(h,m,n){const t=h.toLowerCase(),i=m.toLowerCase(),s=t.startsWith(n),r=i.startsWith(n);if(s!==r)return s?-1:1;if(s&&r){if(t.length<i.length)return-1;if(t.length>i.length)return 1}return 0}e.compareByPrefix=_}),define(J[2],ee([1,0,92,54]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.ImmortalReference=e.SafeDisposable=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.setDisposableTracker=void 0;const y=!1;let D=null;function w(C){D=C}if(e.setDisposableTracker=w,y){const C="__is_disposable_tracked__";w(new class{trackDisposable(f){const v=new Error("Potentially leaked disposable").stack;setTimeout(()=>{f[C]||console.log(v)},3e3)}setParent(f,v){if(f&&f!==g.None)try{f[C]=!0}catch{}}markAsDisposed(f){if(f&&f!==g.None)try{f[C]=!0}catch{}}markAsSingleton(f){}})}function b(C){return D?.trackDisposable(C),C}function _(C){D?.markAsDisposed(C)}function h(C,f){D?.setParent(C,f)}function m(C,f){if(D)for(const v of C)D.setParent(v,f)}function n(C){return D?.markAsSingleton(C),C}e.markAsSingleton=n;function t(C){return typeof C.dispose=="function"&&C.dispose.length===0}e.isDisposable=t;function i(C){if(k.Iterable.is(C)){const f=[];for(const v of C)if(v)try{v.dispose()}catch(p){f.push(p)}if(f.length===1)throw f[0];if(f.length>1)throw new AggregateError(f,"Encountered errors while disposing of store");return Array.isArray(C)?[]:C}else if(C)return C.dispose(),C}e.dispose=i;function s(...C){const f=r(()=>i(C));return m(C,f),f}e.combinedDisposable=s;function r(C){const f=b({dispose:(0,S.once)(()=>{_(f),C()})});return f}e.toDisposable=r;class c{constructor(){this._toDispose=new Set,this._isDisposed=!1,b(this)}dispose(){this._isDisposed||(_(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{i(this._toDispose)}finally{this._toDispose.clear()}}add(f){if(!f)return f;if(f===this)throw new Error("Cannot register a disposable on itself!");return h(f,this),this._isDisposed?c.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(f),f}}c.DISABLE_DISPOSED_WARNING=!1,e.DisposableStore=c;class g{constructor(){this._store=new c,b(this),h(this._store,this)}dispose(){_(this),this._store.dispose()}_register(f){if(f===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(f)}}g.None=Object.freeze({dispose(){}}),e.Disposable=g;class o{constructor(){this._isDisposed=!1,b(this)}get value(){return this._isDisposed?void 0:this._value}set value(f){var v;this._isDisposed||f===this._value||((v=this._value)===null||v===void 0||v.dispose(),f&&h(f,this),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,_(this),(f=this._value)===null||f===void 0||f.dispose(),this._value=void 0}clearAndLeak(){const f=this._value;return this._value=void 0,f&&h(f,null),f}}e.MutableDisposable=o;class l{constructor(f){this._disposable=f,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=l;class a{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,b(this)}set(f){let v=f;return this.unset=()=>v=void 0,this.isset=()=>v!==void 0,this.dispose=()=>{v&&(v(),v=void 0,_(this))},this}}e.SafeDisposable=a;class d{constructor(f){this.object=f}dispose(){}}e.ImmortalReference=d;class u{constructor(){this._store=new Map,this._isDisposed=!1,b(this)}dispose(){_(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{i(this._store.values())}finally{this._store.clear()}}get(f){return this._store.get(f)}set(f,v,p=!1){var L;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),p||(L=this._store.get(f))===null||L===void 0||L.dispose(),this._store.set(f,v)}deleteAndDispose(f){var v;(v=this._store.get(f))===null||v===void 0||v.dispose(),this._store.delete(f)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=u}),define(J[59],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class S{constructor(D){this.element=D,this.next=S.Undefined,this.prev=S.Undefined}}S.Undefined=new S(void 0);class k{constructor(){this._first=S.Undefined,this._last=S.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===S.Undefined}clear(){let D=this._first;for(;D!==S.Undefined;){const w=D.next;D.prev=S.Undefined,D.next=S.Undefined,D=w}this._first=S.Undefined,this._last=S.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,w){const b=new S(D);if(this._first===S.Undefined)this._first=b,this._last=b;else if(w){const h=this._last;this._last=b,b.prev=h,h.next=b}else{const h=this._first;this._first=b,b.next=h,h.prev=b}this._size+=1;let _=!1;return()=>{_||(_=!0,this._remove(b))}}shift(){if(this._first!==S.Undefined){const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last!==S.Undefined){const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==S.Undefined&&D.next!==S.Undefined){const w=D.prev;w.next=D.next,D.next.prev=w}else D.prev===S.Undefined&&D.next===S.Undefined?(this._first=S.Undefined,this._last=S.Undefined):D.next===S.Undefined?(this._last=this._last.prev,this._last.next=S.Undefined):D.prev===S.Undefined&&(this._first=this._first.next,this._first.prev=S.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==S.Undefined;)yield D.element,D=D.next}}e.LinkedList=k});var Ne=this&&this.__decorate||function(q,e,S,k){var y=arguments.length,D=y<3?e:k===null?k=Object.getOwnPropertyDescriptor(e,S):k,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(q,e,S,k);else for(var b=q.length-1;b>=0;b--)(w=q[b])&&(D=(y<3?w(D):y>3?w(e,S,D):w(e,S))||D);return y>3&&D&&Object.defineProperty(e,S,D),D};define(J[355],ee([1,0,99]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseLinkedText=e.LinkedText=void 0;class k{constructor(b){this.nodes=b}toString(){return this.nodes.map(b=>typeof b=="string"?b:b.label).join("")}}Ne([S.memoize],k.prototype,"toString",null),e.LinkedText=k;const y=/\\[([^\\]]+)\\]\\(((?:https?:\\/\\/|command:|file:)[^\\)\\s]+)(?: (["\'])(.+?)(\\3))?\\)/gi;function D(w){const b=[];let _=0,h;for(;h=y.exec(w);){h.index-_>0&&b.push(w.substring(_,h.index));const[,m,n,,t]=h;t?b.push({label:m,href:n,title:t}):b.push({label:m,href:n}),_=h.index+h[0].length}return _<w.length&&b.push(w.substring(_)),new k(b)}e.parseLinkedText=D}),define(J[55],ee([1,0]),function(q,e){"use strict";var S,k;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.ResourceMap=void 0;class y{constructor(h,m){this.uri=h,this.value=m}}class D{constructor(h,m){this[S]="ResourceMap",h instanceof D?(this.map=new Map(h.map),this.toKey=m??D.defaultToKey):(this.map=new Map,this.toKey=h??D.defaultToKey)}set(h,m){return this.map.set(this.toKey(h),new y(h,m)),this}get(h){var m;return(m=this.map.get(this.toKey(h)))===null||m===void 0?void 0:m.value}has(h){return this.map.has(this.toKey(h))}get size(){return this.map.size}clear(){this.map.clear()}delete(h){return this.map.delete(this.toKey(h))}forEach(h,m){typeof m<"u"&&(h=h.bind(m));for(const[n,t]of this.map)h(t.value,t.uri,this)}*values(){for(const h of this.map.values())yield h.value}*keys(){for(const h of this.map.values())yield h.uri}*entries(){for(const h of this.map.values())yield[h.uri,h.value]}*[(S=Symbol.toStringTag,Symbol.iterator)](){for(const[,h]of this.map)yield[h.uri,h.value]}}D.defaultToKey=_=>_.toString(),e.ResourceMap=D;class w{constructor(){this[k]="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 h;return(h=this._head)===null||h===void 0?void 0:h.value}get last(){var h;return(h=this._tail)===null||h===void 0?void 0:h.value}has(h){return this._map.has(h)}get(h,m=0){const n=this._map.get(h);if(n)return m!==0&&this.touch(n,m),n.value}set(h,m,n=0){let t=this._map.get(h);if(t)t.value=m,n!==0&&this.touch(t,n);else{switch(t={key:h,value:m,next:void 0,previous:void 0},n){case 0:this.addItemLast(t);break;case 1:this.addItemFirst(t);break;case 2:this.addItemLast(t);break;default:this.addItemLast(t);break}this._map.set(h,t),this._size++}return this}delete(h){return!!this.remove(h)}remove(h){const m=this._map.get(h);if(m)return this._map.delete(h),this.removeItem(m),this._size--,m.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const h=this._head;return this._map.delete(h.key),this.removeItem(h),this._size--,h.value}forEach(h,m){const n=this._state;let t=this._head;for(;t;){if(m?h.bind(m)(t.value,t.key,this):h(t.value,t.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");t=t.next}}keys(){const h=this,m=this._state;let n=this._head;const t={[Symbol.iterator](){return t},next(){if(h._state!==m)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return t}values(){const h=this,m=this._state;let n=this._head;const t={[Symbol.iterator](){return t},next(){if(h._state!==m)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return t}entries(){const h=this,m=this._state;let n=this._head;const t={[Symbol.iterator](){return t},next(){if(h._state!==m)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return t}[(k=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(h){if(h>=this.size)return;if(h===0){this.clear();return}let m=this._head,n=this.size;for(;m&&n>h;)this._map.delete(m.key),m=m.next,n--;this._head=m,this._size=n,m&&(m.previous=void 0),this._state++}addItemFirst(h){if(!this._head&&!this._tail)this._tail=h;else if(this._head)h.next=this._head,this._head.previous=h;else throw new Error("Invalid list");this._head=h,this._state++}addItemLast(h){if(!this._head&&!this._tail)this._head=h;else if(this._tail)h.previous=this._tail,this._tail.next=h;else throw new Error("Invalid list");this._tail=h,this._state++}removeItem(h){if(h===this._head&&h===this._tail)this._head=void 0,this._tail=void 0;else if(h===this._head){if(!h.next)throw new Error("Invalid list");h.next.previous=void 0,this._head=h.next}else if(h===this._tail){if(!h.previous)throw new Error("Invalid list");h.previous.next=void 0,this._tail=h.previous}else{const m=h.next,n=h.previous;if(!m||!n)throw new Error("Invalid list");m.previous=n,n.next=m}h.next=void 0,h.previous=void 0,this._state++}touch(h,m){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(m!==1&&m!==2)){if(m===1){if(h===this._head)return;const n=h.next,t=h.previous;h===this._tail?(t.next=void 0,this._tail=t):(n.previous=t,t.next=n),h.previous=void 0,h.next=this._head,this._head.previous=h,this._head=h,this._state++}else if(m===2){if(h===this._tail)return;const n=h.next,t=h.previous;h===this._head?(n.previous=void 0,this._head=n):(n.previous=t,t.next=n),h.next=void 0,h.previous=this._tail,this._tail.next=h,this._tail=h,this._state++}}}toJSON(){const h=[];return this.forEach((m,n)=>{h.push([n,m])}),h}fromJSON(h){this.clear();for(const[m,n]of h)this.set(m,n)}}e.LinkedMap=w;class b extends w{constructor(h,m=1){super(),this._limit=h,this._ratio=Math.min(Math.max(0,m),1)}get limit(){return this._limit}set limit(h){this._limit=h,this.checkTrim()}get(h,m=2){return super.get(h,m)}peek(h){return super.get(h,0)}set(h,m){return super.set(h,m,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=b}),function(q,e){typeof define=="function"&&define.amd?define(J[356],ee([0]),e):typeof exports=="object"&&typeof module<"u"?e(exports):(q=typeof globalThis<"u"?globalThis:q||self,e(q.marked={}))}(this,function(q){"use strict";function e(oe,ce){for(var z=0;z<ce.length;z++){var V=ce[z];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(oe,V.key,V)}}function S(oe,ce,z){return ce&&e(oe.prototype,ce),z&&e(oe,z),Object.defineProperty(oe,"prototype",{writable:!1}),oe}function k(oe,ce){if(oe){if(typeof oe=="string")return y(oe,ce);var z=Object.prototype.toString.call(oe).slice(8,-1);if(z==="Object"&&oe.constructor&&(z=oe.constructor.name),z==="Map"||z==="Set")return Array.from(oe);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return y(oe,ce)}}function y(oe,ce){(ce==null||ce>oe.length)&&(ce=oe.length);for(var z=0,V=new Array(ce);z<ce;z++)V[z]=oe[z];return V}function D(oe,ce){var z=typeof Symbol<"u"&&oe[Symbol.iterator]||oe["@@iterator"];if(z)return(z=z.call(oe)).next.bind(z);if(Array.isArray(oe)||(z=k(oe))||ce&&oe&&typeof oe.length=="number"){z&&(oe=z);var V=0;return function(){return V>=oe.length?{done:!0}:{done:!1,value:oe[V++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,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}}q.defaults=w();function b(oe){q.defaults=oe}var _=/[&<>"\']/,h=/[&<>"\']/g,m=/[<>"\']|&(?!#?\\w+;)/,n=/[<>"\']|&(?!#?\\w+;)/g,t={"&":"&","<":"<",">":">",\'"\':""","\'":"'"},i=function(ce){return t[ce]};function s(oe,ce){if(ce){if(_.test(oe))return oe.replace(h,i)}else if(m.test(oe))return oe.replace(n,i);return oe}var r=/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;function c(oe){return oe.replace(r,function(ce,z){return z=z.toLowerCase(),z==="colon"?":":z.charAt(0)==="#"?z.charAt(1)==="x"?String.fromCharCode(parseInt(z.substring(2),16)):String.fromCharCode(+z.substring(1)):""})}var g=/(^|[^\\[])\\^/g;function o(oe,ce){oe=typeof oe=="string"?oe:oe.source,ce=ce||"";var z={replace:function(K,ie){return ie=ie.source||ie,ie=ie.replace(g,"$1"),oe=oe.replace(K,ie),z},getRegex:function(){return new RegExp(oe,ce)}};return z}var l=/[^\\w:]/g,a=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(oe,ce,z){if(oe){var V;try{V=decodeURIComponent(c(z)).replace(l,"").toLowerCase()}catch{return null}if(V.indexOf("javascript:")===0||V.indexOf("vbscript:")===0||V.indexOf("data:")===0)return null}ce&&!a.test(z)&&(z=p(ce,z));try{z=encodeURI(z).replace(/%25/g,"%")}catch{return null}return z}var u={},C=/^[^:]+:\\/*[^/]*$/,f=/^([^:]+:)[\\s\\S]*$/,v=/^([^:]+:\\/*[^/]*)[\\s\\S]*$/;function p(oe,ce){u[" "+oe]||(C.test(oe)?u[" "+oe]=oe+"/":u[" "+oe]=T(oe,"/",!0)),oe=u[" "+oe];var z=oe.indexOf(":")===-1;return ce.substring(0,2)==="//"?z?ce:oe.replace(f,"$1")+ce:ce.charAt(0)==="/"?z?ce:oe.replace(v,"$1")+ce:oe+ce}var L={exec:function(){}};function E(oe){for(var ce=1,z,V;ce<arguments.length;ce++){z=arguments[ce];for(V in z)Object.prototype.hasOwnProperty.call(z,V)&&(oe[V]=z[V])}return oe}function I(oe,ce){var z=oe.replace(/\\|/g,function(ie,X,Z){for(var ue=!1,me=X;--me>=0&&Z[me]==="\\\\";)ue=!ue;return ue?"|":" |"}),V=z.split(/ \\|/),K=0;if(V[0].trim()||V.shift(),V.length>0&&!V[V.length-1].trim()&&V.pop(),V.length>ce)V.splice(ce);else for(;V.length<ce;)V.push("");for(;K<V.length;K++)V[K]=V[K].trim().replace(/\\\\\\|/g,"|");return V}function T(oe,ce,z){var V=oe.length;if(V===0)return"";for(var K=0;K<V;){var ie=oe.charAt(V-K-1);if(ie===ce&&!z)K++;else if(ie!==ce&&z)K++;else break}return oe.slice(0,V-K)}function F(oe,ce){if(oe.indexOf(ce[1])===-1)return-1;for(var z=oe.length,V=0,K=0;K<z;K++)if(oe[K]==="\\\\")K++;else if(oe[K]===ce[0])V++;else if(oe[K]===ce[1]&&(V--,V<0))return K;return-1}function R(oe){oe&&oe.sanitize&&!oe.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 M(oe,ce){if(ce<1)return"";for(var z="";ce>1;)ce&1&&(z+=oe),ce>>=1,oe+=oe;return z+oe}function N(oe,ce,z,V){var K=ce.href,ie=ce.title?s(ce.title):null,X=oe[1].replace(/\\\\([\\[\\]])/g,"$1");if(oe[0].charAt(0)!=="!"){V.state.inLink=!0;var Z={type:"link",raw:z,href:K,title:ie,text:X,tokens:V.inlineTokens(X)};return V.state.inLink=!1,Z}return{type:"image",raw:z,href:K,title:ie,text:s(X)}}function A(oe,ce){var z=oe.match(/^(\\s+)(?:```)/);if(z===null)return ce;var V=z[1];return ce.split(`\n`).map(function(K){var ie=K.match(/^\\s+/);if(ie===null)return K;var X=ie[0];return X.length>=V.length?K.slice(V.length):K}).join(`\n`)}var P=function(){function oe(z){this.options=z||q.defaults}var ce=oe.prototype;return ce.space=function(V){var K=this.rules.block.newline.exec(V);if(K&&K[0].length>0)return{type:"space",raw:K[0]}},ce.code=function(V){var K=this.rules.block.code.exec(V);if(K){var ie=K[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:K[0],codeBlockStyle:"indented",text:this.options.pedantic?ie:T(ie,`\n`)}}},ce.fences=function(V){var K=this.rules.block.fences.exec(V);if(K){var ie=K[0],X=A(ie,K[3]||"");return{type:"code",raw:ie,lang:K[2]?K[2].trim():K[2],text:X}}},ce.heading=function(V){var K=this.rules.block.heading.exec(V);if(K){var ie=K[2].trim();if(/#$/.test(ie)){var X=T(ie,"#");(this.options.pedantic||!X||/ $/.test(X))&&(ie=X.trim())}return{type:"heading",raw:K[0],depth:K[1].length,text:ie,tokens:this.lexer.inline(ie)}}},ce.hr=function(V){var K=this.rules.block.hr.exec(V);if(K)return{type:"hr",raw:K[0]}},ce.blockquote=function(V){var K=this.rules.block.blockquote.exec(V);if(K){var ie=K[0].replace(/^ *>[ \\t]?/gm,"");return{type:"blockquote",raw:K[0],tokens:this.lexer.blockTokens(ie,[]),text:ie}}},ce.list=function(V){var K=this.rules.block.list.exec(V);if(K){var ie,X,Z,ue,me,Ce,_e,we,ye,ke,De,ge,pe=K[1].trim(),ae=pe.length>1,ve={type:"list",raw:"",ordered:ae,start:ae?+pe.slice(0,-1):"",loose:!1,items:[]};pe=ae?"\\\\d{1,9}\\\\"+pe.slice(-1):"\\\\"+pe,this.options.pedantic&&(pe=ae?pe:"[*+-]");for(var Le=new RegExp("^( {0,3}"+pe+")((?:[\t ][^\\\\n]*)?(?:\\\\n|$))");V&&(ge=!1,!(!(K=Le.exec(V))||this.rules.block.hr.test(V)));){if(ie=K[0],V=V.substring(ie.length),we=K[2].split(`\n`,1)[0],ye=V.split(`\n`,1)[0],this.options.pedantic?(ue=2,De=we.trimLeft()):(ue=K[2].search(/[^ ]/),ue=ue>4?1:ue,De=we.slice(ue),ue+=K[1].length),Ce=!1,!we&&/^ *$/.test(ye)&&(ie+=ye+`\n`,V=V.substring(ye.length+1),ge=!0),!ge)for(var Ie=new RegExp("^ {0,"+Math.min(3,ue-1)+"}(?:[*+-]|\\\\d{1,9}[.)])((?: [^\\\\n]*)?(?:\\\\n|$))"),Ae=new RegExp("^ {0,"+Math.min(3,ue-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)"),be=new RegExp("^ {0,"+Math.min(3,ue-1)+"}(?:```|~~~)"),Se=new RegExp("^ {0,"+Math.min(3,ue-1)+"}#");V&&(ke=V.split(`\n`,1)[0],we=ke,this.options.pedantic&&(we=we.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(be.test(we)||Se.test(we)||Ie.test(we)||Ae.test(V)));){if(we.search(/[^ ]/)>=ue||!we.trim())De+=`\n`+we.slice(ue);else if(!Ce)De+=`\n`+we;else break;!Ce&&!we.trim()&&(Ce=!0),ie+=ke+`\n`,V=V.substring(ke.length+1)}ve.loose||(_e?ve.loose=!0:/\\n *\\n *$/.test(ie)&&(_e=!0)),this.options.gfm&&(X=/^\\[[ xX]\\] /.exec(De),X&&(Z=X[0]!=="[ ] ",De=De.replace(/^\\[[ xX]\\] +/,""))),ve.items.push({type:"list_item",raw:ie,task:!!X,checked:Z,loose:!1,text:De}),ve.raw+=ie}ve.items[ve.items.length-1].raw=ie.trimRight(),ve.items[ve.items.length-1].text=De.trimRight(),ve.raw=ve.raw.trimRight();var Te=ve.items.length;for(me=0;me<Te;me++){this.lexer.state.top=!1,ve.items[me].tokens=this.lexer.blockTokens(ve.items[me].text,[]);var Pe=ve.items[me].tokens.filter(function(Oe){return Oe.type==="space"}),Fe=Pe.every(function(Oe){for(var xe=Oe.raw.split(""),Ke=0,Ye=D(xe),qe;!(qe=Ye()).done;){var st=qe.value;if(st===`\n`&&(Ke+=1),Ke>1)return!0}return!1});!ve.loose&&Pe.length&&Fe&&(ve.loose=!0,ve.items[me].loose=!0)}return ve}},ce.html=function(V){var K=this.rules.block.html.exec(V);if(K){var ie={type:"html",raw:K[0],pre:!this.options.sanitizer&&(K[1]==="pre"||K[1]==="script"||K[1]==="style"),text:K[0]};if(this.options.sanitize){var X=this.options.sanitizer?this.options.sanitizer(K[0]):s(K[0]);ie.type="paragraph",ie.text=X,ie.tokens=this.lexer.inline(X)}return ie}},ce.def=function(V){var K=this.rules.block.def.exec(V);if(K){K[3]&&(K[3]=K[3].substring(1,K[3].length-1));var ie=K[1].toLowerCase().replace(/\\s+/g," ");return{type:"def",tag:ie,raw:K[0],href:K[2],title:K[3]}}},ce.table=function(V){var K=this.rules.block.table.exec(V);if(K){var ie={type:"table",header:I(K[1]).map(function(_e){return{text:_e}}),align:K[2].replace(/^ *|\\| *$/g,"").split(/ *\\| */),rows:K[3]&&K[3].trim()?K[3].replace(/\\n[ \\t]*$/,"").split(`\n`):[]};if(ie.header.length===ie.align.length){ie.raw=K[0];var X=ie.align.length,Z,ue,me,Ce;for(Z=0;Z<X;Z++)/^ *-+: *$/.test(ie.align[Z])?ie.align[Z]="right":/^ *:-+: *$/.test(ie.align[Z])?ie.align[Z]="center":/^ *:-+ *$/.test(ie.align[Z])?ie.align[Z]="left":ie.align[Z]=null;for(X=ie.rows.length,Z=0;Z<X;Z++)ie.rows[Z]=I(ie.rows[Z],ie.header.length).map(function(_e){return{text:_e}});for(X=ie.header.length,ue=0;ue<X;ue++)ie.header[ue].tokens=this.lexer.inline(ie.header[ue].text);for(X=ie.rows.length,ue=0;ue<X;ue++)for(Ce=ie.rows[ue],me=0;me<Ce.length;me++)Ce[me].tokens=this.lexer.inline(Ce[me].text);return ie}}},ce.lheading=function(V){var K=this.rules.block.lheading.exec(V);if(K)return{type:"heading",raw:K[0],depth:K[2].charAt(0)==="="?1:2,text:K[1],tokens:this.lexer.inline(K[1])}},ce.paragraph=function(V){var K=this.rules.block.paragraph.exec(V);if(K){var ie=K[1].charAt(K[1].length-1)===`\n`?K[1].slice(0,-1):K[1];return{type:"paragraph",raw:K[0],text:ie,tokens:this.lexer.inline(ie)}}},ce.text=function(V){var K=this.rules.block.text.exec(V);if(K)return{type:"text",raw:K[0],text:K[0],tokens:this.lexer.inline(K[0])}},ce.escape=function(V){var K=this.rules.inline.escape.exec(V);if(K)return{type:"escape",raw:K[0],text:s(K[1])}},ce.tag=function(V){var K=this.rules.inline.tag.exec(V);if(K)return!this.lexer.state.inLink&&/^<a /i.test(K[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\\/a>/i.test(K[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\\s|>)/i.test(K[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\\/(pre|code|kbd|script)(\\s|>)/i.test(K[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:K[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(K[0]):s(K[0]):K[0]}},ce.link=function(V){var K=this.rules.inline.link.exec(V);if(K){var ie=K[2].trim();if(!this.options.pedantic&&/^</.test(ie)){if(!/>$/.test(ie))return;var X=T(ie.slice(0,-1),"\\\\");if((ie.length-X.length)%2===0)return}else{var Z=F(K[2],"()");if(Z>-1){var ue=K[0].indexOf("!")===0?5:4,me=ue+K[1].length+Z;K[2]=K[2].substring(0,Z),K[0]=K[0].substring(0,me).trim(),K[3]=""}}var Ce=K[2],_e="";if(this.options.pedantic){var we=/^([^\'"]*[^\\s])\\s+([\'"])(.*)\\2/.exec(Ce);we&&(Ce=we[1],_e=we[3])}else _e=K[3]?K[3].slice(1,-1):"";return Ce=Ce.trim(),/^</.test(Ce)&&(this.options.pedantic&&!/>$/.test(ie)?Ce=Ce.slice(1):Ce=Ce.slice(1,-1)),N(K,{href:Ce&&Ce.replace(this.rules.inline._escapes,"$1"),title:_e&&_e.replace(this.rules.inline._escapes,"$1")},K[0],this.lexer)}},ce.reflink=function(V,K){var ie;if((ie=this.rules.inline.reflink.exec(V))||(ie=this.rules.inline.nolink.exec(V))){var X=(ie[2]||ie[1]).replace(/\\s+/g," ");if(X=K[X.toLowerCase()],!X||!X.href){var Z=ie[0].charAt(0);return{type:"text",raw:Z,text:Z}}return N(ie,X,ie[0],this.lexer)}},ce.emStrong=function(V,K,ie){ie===void 0&&(ie="");var X=this.rules.inline.emStrong.lDelim.exec(V);if(X&&!(X[3]&&ie.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\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\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\\u0C5D\\u0C60\\u0C61\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\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-\\u1711\\u171F-\\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-\\u1B4C\\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-\\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-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\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\\uDD70-\\uDD7A\\uDD7C-\\uDD8A\\uDD8C-\\uDD92\\uDD94\\uDD95\\uDD97-\\uDDA1\\uDDA3-\\uDDB1\\uDDB3-\\uDDB9\\uDDBB\\uDDBC\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67\\uDF80-\\uDF85\\uDF87-\\uDFB0\\uDFB2-\\uDFBA]|\\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\\uDF70-\\uDF81\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC52-\\uDC6F\\uDC71\\uDC72\\uDC75\\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\\uDF40-\\uDF46]|\\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\\uDEB0-\\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]|\\uD80B[\\uDF90-\\uDFF0]|[\\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\\uDE70-\\uDEBE\\uDEC0-\\uDEC9\\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]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\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]|\\uD837[\\uDF00-\\uDF1E]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD40-\\uDD49\\uDD4E\\uDE90-\\uDEAD\\uDEC0-\\uDEEB\\uDEF0-\\uDEF9]|\\uD839[\\uDFE0-\\uDFE6\\uDFE8-\\uDFEB\\uDFED\\uDFEE\\uDFF0-\\uDFFE]|\\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-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF38\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])/))){var Z=X[1]||X[2]||"";if(!Z||Z&&(ie===""||this.rules.inline.punctuation.exec(ie))){var ue=X[0].length-1,me,Ce,_e=ue,we=0,ye=X[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(ye.lastIndex=0,K=K.slice(-1*V.length+ue);(X=ye.exec(K))!=null;)if(me=X[1]||X[2]||X[3]||X[4]||X[5]||X[6],!!me){if(Ce=me.length,X[3]||X[4]){_e+=Ce;continue}else if((X[5]||X[6])&&ue%3&&!((ue+Ce)%3)){we+=Ce;continue}if(_e-=Ce,!(_e>0)){if(Ce=Math.min(Ce,Ce+_e+we),Math.min(ue,Ce)%2){var ke=V.slice(1,ue+X.index+Ce);return{type:"em",raw:V.slice(0,ue+X.index+Ce+1),text:ke,tokens:this.lexer.inlineTokens(ke)}}var De=V.slice(2,ue+X.index+Ce-1);return{type:"strong",raw:V.slice(0,ue+X.index+Ce+1),text:De,tokens:this.lexer.inlineTokens(De)}}}}}},ce.codespan=function(V){var K=this.rules.inline.code.exec(V);if(K){var ie=K[2].replace(/\\n/g," "),X=/[^ ]/.test(ie),Z=/^ /.test(ie)&&/ $/.test(ie);return X&&Z&&(ie=ie.substring(1,ie.length-1)),ie=s(ie,!0),{type:"codespan",raw:K[0],text:ie}}},ce.br=function(V){var K=this.rules.inline.br.exec(V);if(K)return{type:"br",raw:K[0]}},ce.del=function(V){var K=this.rules.inline.del.exec(V);if(K)return{type:"del",raw:K[0],text:K[2],tokens:this.lexer.inlineTokens(K[2])}},ce.autolink=function(V,K){var ie=this.rules.inline.autolink.exec(V);if(ie){var X,Z;return ie[2]==="@"?(X=s(this.options.mangle?K(ie[1]):ie[1]),Z="mailto:"+X):(X=s(ie[1]),Z=X),{type:"link",raw:ie[0],text:X,href:Z,tokens:[{type:"text",raw:X,text:X}]}}},ce.url=function(V,K){var ie;if(ie=this.rules.inline.url.exec(V)){var X,Z;if(ie[2]==="@")X=s(this.options.mangle?K(ie[0]):ie[0]),Z="mailto:"+X;else{var ue;do ue=ie[0],ie[0]=this.rules.inline._backpedal.exec(ie[0])[0];while(ue!==ie[0]);X=s(ie[0]),ie[1]==="www."?Z="http://"+X:Z=X}return{type:"link",raw:ie[0],text:X,href:Z,tokens:[{type:"text",raw:X,text:X}]}}},ce.inlineText=function(V,K){var ie=this.rules.inline.text.exec(V);if(ie){var X;return this.lexer.state.inRawBlock?X=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):s(ie[0]):ie[0]:X=s(this.options.smartypants?K(ie[0]):ie[0]),{type:"text",raw:ie[0],text:X}}},oe}(),x={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}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,list:/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\\\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 *)+\\\\n|$)|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$))",def:/^ {0,3}\\[(label)\\]: *(?:\\n *)?<?([^\\s>]+)>?(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/,table:L,lheading:/^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,_paragraph:/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,text:/^[^\\n]+/};x._label=/(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/,x._title=/(?:"(?:\\\\"?|[^"\\\\])*"|\'[^\'\\n]*(?:\\n[^\'\\n]+)*\\n?\'|\\([^()]*\\))/,x.def=o(x.def).replace("label",x._label).replace("title",x._title).getRegex(),x.bullet=/(?:[*+-]|\\d{1,9}[.)])/,x.listItemStart=o(/^( *)(bull) */).replace("bull",x.bullet).getRegex(),x.list=o(x.list).replace(/bull/g,x.bullet).replace("hr","\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))").replace("def","\\\\n+(?="+x.def.source+")").getRegex(),x._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",x._comment=/\x3c!--(?!-?>)[\\s\\S]*?(?:--\x3e|$)/,x.html=o(x.html,"i").replace("comment",x._comment).replace("tag",x._tag).replace("attribute",/ +[a-zA-Z:_][\\w.:-]*(?: *= *"[^"\\n]*"| *= *\'[^\'\\n]*\'| *= *[^\\s"\'=<>`]+)?/).getRegex(),x.paragraph=o(x._paragraph).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").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|textarea|!--)").replace("tag",x._tag).getRegex(),x.blockquote=o(x.blockquote).replace("paragraph",x.paragraph).getRegex(),x.normal=E({},x),x.gfm=E({},x.normal,{table:"^ *([^\\\\n ].*\\\\|.*)\\\\n {0,3}(?:\\\\| *)?(:?-+:? *(?:\\\\| *:?-+:? *)*)(?:\\\\| *)?(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)"}),x.gfm.table=o(x.gfm.table).replace("hr",x.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|textarea|!--)").replace("tag",x._tag).getRegex(),x.gfm.paragraph=o(x._paragraph).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",x.gfm.table).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|textarea|!--)").replace("tag",x._tag).getRegex(),x.pedantic=E({},x.normal,{html:o(`^ *(?:comment *(?:\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)|<tag(?:"[^"]*"|\'[^\']*\'|\\\\s[^\'"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))`).replace("comment",x._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:L,paragraph:o(x.normal._paragraph).replace("hr",x.hr).replace("heading",` *#{1,6} *[^\n]`).replace("lheading",x.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var W={escape:/^\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,autolink:/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,url:L,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)\\]\\[(ref)\\]/,nolink:/^!?\\[(ref)\\](?:\\[\\])?/,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:L,text:/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,punctuation:/^([\\spunctuation])/};W._punctuation="!\\"#$%&\'()+\\\\-.,/:;<=>?@\\\\[\\\\]`^{|}~",W.punctuation=o(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=/\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g,W.escapedEmSt=/\\\\\\*|\\\\_/g,W._comment=o(x._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),W.emStrong.lDelim=o(W.emStrong.lDelim).replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimAst=o(W.emStrong.rDelimAst,"g").replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimUnd=o(W.emStrong.rDelimUnd,"g").replace(/punct/g,W._punctuation).getRegex(),W._escapes=/\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._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])?)+(?![-_])/,W.autolink=o(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*"[^"]*"|\\s*=\\s*\'[^\']*\'|\\s*=\\s*[^\\s"\'=<>`]+)?/,W.tag=o(W.tag).replace("comment",W._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/,W._href=/<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/,W._title=/"(?:\\\\"?|[^"\\\\])*"|\'(?:\\\\\'?|[^\'\\\\])*\'|\\((?:\\\\\\)?|[^)\\\\])*\\)/,W.link=o(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=o(W.reflink).replace("label",W._label).replace("ref",x._label).getRegex(),W.nolink=o(W.nolink).replace("ref",x._label).getRegex(),W.reflinkSearch=o(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=E({},W),W.pedantic=E({},W.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:o(/^!?\\[(label)\\]\\((.*?)\\)/).replace("label",W._label).getRegex(),reflink:o(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace("label",W._label).getRegex()}),W.gfm=E({},W.normal,{escape:o(W.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)|(?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)))/}),W.gfm.url=o(W.gfm.url,"i").replace("email",W.gfm._extended_email).getRegex(),W.breaks=E({},W.gfm,{br:o(W.br).replace("{2,}","*").getRegex(),text:o(W.gfm.text).replace("\\\\b_","\\\\b_| {2,}\\\\n").replace(/\\{2,\\}/g,"*").getRegex()});function U(oe){return oe.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 O(oe){var ce="",z,V,K=oe.length;for(z=0;z<K;z++)V=oe.charCodeAt(z),Math.random()>.5&&(V="x"+V.toString(16)),ce+="&#"+V+";";return ce}var $=function(){function oe(z){this.tokens=[],this.tokens.links=Object.create(null),this.options=z||q.defaults,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var V={block:x.normal,inline:W.normal};this.options.pedantic?(V.block=x.pedantic,V.inline=W.pedantic):this.options.gfm&&(V.block=x.gfm,this.options.breaks?V.inline=W.breaks:V.inline=W.gfm),this.tokenizer.rules=V}oe.lex=function(V,K){var ie=new oe(K);return ie.lex(V)},oe.lexInline=function(V,K){var ie=new oe(K);return ie.inlineTokens(V)};var ce=oe.prototype;return ce.lex=function(V){V=V.replace(/\\r\\n|\\r/g,`\n`),this.blockTokens(V,this.tokens);for(var K;K=this.inlineQueue.shift();)this.inlineTokens(K.src,K.tokens);return this.tokens},ce.blockTokens=function(V,K){var ie=this;K===void 0&&(K=[]),this.options.pedantic?V=V.replace(/\\t/g," ").replace(/^ +$/gm,""):V=V.replace(/^( *)(\\t+)/gm,function(_e,we,ye){return we+" ".repeat(ye.length)});for(var X,Z,ue,me;V;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(_e){return(X=_e.call({lexer:ie},V,K))?(V=V.substring(X.raw.length),K.push(X),!0):!1}))){if(X=this.tokenizer.space(V)){V=V.substring(X.raw.length),X.raw.length===1&&K.length>0?K[K.length-1].raw+=`\n`:K.push(X);continue}if(X=this.tokenizer.code(V)){V=V.substring(X.raw.length),Z=K[K.length-1],Z&&(Z.type==="paragraph"||Z.type==="text")?(Z.raw+=`\n`+X.raw,Z.text+=`\n`+X.text,this.inlineQueue[this.inlineQueue.length-1].src=Z.text):K.push(X);continue}if(X=this.tokenizer.fences(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.heading(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.hr(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.blockquote(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.list(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.html(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.def(V)){V=V.substring(X.raw.length),Z=K[K.length-1],Z&&(Z.type==="paragraph"||Z.type==="text")?(Z.raw+=`\n`+X.raw,Z.text+=`\n`+X.raw,this.inlineQueue[this.inlineQueue.length-1].src=Z.text):this.tokens.links[X.tag]||(this.tokens.links[X.tag]={href:X.href,title:X.title});continue}if(X=this.tokenizer.table(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.lheading(V)){V=V.substring(X.raw.length),K.push(X);continue}if(ue=V,this.options.extensions&&this.options.extensions.startBlock&&function(){var _e=1/0,we=V.slice(1),ye=void 0;ie.options.extensions.startBlock.forEach(function(ke){ye=ke.call({lexer:this},we),typeof ye=="number"&&ye>=0&&(_e=Math.min(_e,ye))}),_e<1/0&&_e>=0&&(ue=V.substring(0,_e+1))}(),this.state.top&&(X=this.tokenizer.paragraph(ue))){Z=K[K.length-1],me&&Z.type==="paragraph"?(Z.raw+=`\n`+X.raw,Z.text+=`\n`+X.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Z.text):K.push(X),me=ue.length!==V.length,V=V.substring(X.raw.length);continue}if(X=this.tokenizer.text(V)){V=V.substring(X.raw.length),Z=K[K.length-1],Z&&Z.type==="text"?(Z.raw+=`\n`+X.raw,Z.text+=`\n`+X.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Z.text):K.push(X);continue}if(V){var Ce="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(Ce);break}else throw new Error(Ce)}}return this.state.top=!0,K},ce.inline=function(V,K){return K===void 0&&(K=[]),this.inlineQueue.push({src:V,tokens:K}),K},ce.inlineTokens=function(V,K){var ie=this;K===void 0&&(K=[]);var X,Z,ue,me=V,Ce,_e,we;if(this.tokens.links){var ye=Object.keys(this.tokens.links);if(ye.length>0)for(;(Ce=this.tokenizer.rules.inline.reflinkSearch.exec(me))!=null;)ye.includes(Ce[0].slice(Ce[0].lastIndexOf("[")+1,-1))&&(me=me.slice(0,Ce.index)+"["+M("a",Ce[0].length-2)+"]"+me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ce=this.tokenizer.rules.inline.blockSkip.exec(me))!=null;)me=me.slice(0,Ce.index)+"["+M("a",Ce[0].length-2)+"]"+me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ce=this.tokenizer.rules.inline.escapedEmSt.exec(me))!=null;)me=me.slice(0,Ce.index)+"++"+me.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;V;)if(_e||(we=""),_e=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(De){return(X=De.call({lexer:ie},V,K))?(V=V.substring(X.raw.length),K.push(X),!0):!1}))){if(X=this.tokenizer.escape(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.tag(V)){V=V.substring(X.raw.length),Z=K[K.length-1],Z&&X.type==="text"&&Z.type==="text"?(Z.raw+=X.raw,Z.text+=X.text):K.push(X);continue}if(X=this.tokenizer.link(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.reflink(V,this.tokens.links)){V=V.substring(X.raw.length),Z=K[K.length-1],Z&&X.type==="text"&&Z.type==="text"?(Z.raw+=X.raw,Z.text+=X.text):K.push(X);continue}if(X=this.tokenizer.emStrong(V,me,we)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.codespan(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.br(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.del(V)){V=V.substring(X.raw.length),K.push(X);continue}if(X=this.tokenizer.autolink(V,O)){V=V.substring(X.raw.length),K.push(X);continue}if(!this.state.inLink&&(X=this.tokenizer.url(V,O))){V=V.substring(X.raw.length),K.push(X);continue}if(ue=V,this.options.extensions&&this.options.extensions.startInline&&function(){var De=1/0,ge=V.slice(1),pe=void 0;ie.options.extensions.startInline.forEach(function(ae){pe=ae.call({lexer:this},ge),typeof pe=="number"&&pe>=0&&(De=Math.min(De,pe))}),De<1/0&&De>=0&&(ue=V.substring(0,De+1))}(),X=this.tokenizer.inlineText(ue,U)){V=V.substring(X.raw.length),X.raw.slice(-1)!=="_"&&(we=X.raw.slice(-1)),_e=!0,Z=K[K.length-1],Z&&Z.type==="text"?(Z.raw+=X.raw,Z.text+=X.text):K.push(X);continue}if(V){var ke="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(ke);break}else throw new Error(ke)}}return K},S(oe,null,[{key:"rules",get:function(){return{block:x,inline:W}}}]),oe}(),Q=function(){function oe(z){this.options=z||q.defaults}var ce=oe.prototype;return ce.code=function(V,K,ie){var X=(K||"").match(/\\S*/)[0];if(this.options.highlight){var Z=this.options.highlight(V,X);Z!=null&&Z!==V&&(ie=!0,V=Z)}return V=V.replace(/\\n$/,"")+`\n`,X?\'<pre><code class="\'+this.options.langPrefix+s(X,!0)+\'">\'+(ie?V:s(V,!0))+`</code></pre>\n`:"<pre><code>"+(ie?V:s(V,!0))+`</code></pre>\n`},ce.blockquote=function(V){return`<blockquote>\n`+V+`</blockquote>\n`},ce.html=function(V){return V},ce.heading=function(V,K,ie,X){if(this.options.headerIds){var Z=this.options.headerPrefix+X.slug(ie);return"<h"+K+\' id="\'+Z+\'">\'+V+"</h"+K+`>\n`}return"<h"+K+">"+V+"</h"+K+`>\n`},ce.hr=function(){return this.options.xhtml?`<hr/>\n`:`<hr>\n`},ce.list=function(V,K,ie){var X=K?"ol":"ul",Z=K&&ie!==1?\' start="\'+ie+\'"\':"";return"<"+X+Z+`>\n`+V+"</"+X+`>\n`},ce.listitem=function(V){return"<li>"+V+`</li>\n`},ce.checkbox=function(V){return"<input "+(V?\'checked="" \':"")+\'disabled="" type="checkbox"\'+(this.options.xhtml?" /":"")+"> "},ce.paragraph=function(V){return"<p>"+V+`</p>\n`},ce.table=function(V,K){return K&&(K="<tbody>"+K+"</tbody>"),`<table>\n<thead>\n`+V+`</thead>\n`+K+`</table>\n`},ce.tablerow=function(V){return`<tr>\n`+V+`</tr>\n`},ce.tablecell=function(V,K){var ie=K.header?"th":"td",X=K.align?"<"+ie+\' align="\'+K.align+\'">\':"<"+ie+">";return X+V+("</"+ie+`>\n`)},ce.strong=function(V){return"<strong>"+V+"</strong>"},ce.em=function(V){return"<em>"+V+"</em>"},ce.codespan=function(V){return"<code>"+V+"</code>"},ce.br=function(){return this.options.xhtml?"<br/>":"<br>"},ce.del=function(V){return"<del>"+V+"</del>"},ce.link=function(V,K,ie){if(V=d(this.options.sanitize,this.options.baseUrl,V),V===null)return ie;var X=\'<a href="\'+s(V)+\'"\';return K&&(X+=\' title="\'+K+\'"\'),X+=">"+ie+"</a>",X},ce.image=function(V,K,ie){if(V=d(this.options.sanitize,this.options.baseUrl,V),V===null)return ie;var X=\'<img src="\'+V+\'" alt="\'+ie+\'"\';return K&&(X+=\' title="\'+K+\'"\'),X+=this.options.xhtml?"/>":">",X},ce.text=function(V){return V},oe}(),se=function(){function oe(){}var ce=oe.prototype;return ce.strong=function(V){return V},ce.em=function(V){return V},ce.codespan=function(V){return V},ce.del=function(V){return V},ce.html=function(V){return V},ce.text=function(V){return V},ce.link=function(V,K,ie){return""+ie},ce.image=function(V,K,ie){return""+ie},ce.br=function(){return""},oe}(),le=function(){function oe(){this.seen={}}var ce=oe.prototype;return ce.serialize=function(V){return V.toLowerCase().trim().replace(/<[!\\/a-z].*?>/ig,"").replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\\'!"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g,"").replace(/\\s/g,"-")},ce.getNextSafeSlug=function(V,K){var ie=V,X=0;if(this.seen.hasOwnProperty(ie)){X=this.seen[V];do X++,ie=V+"-"+X;while(this.seen.hasOwnProperty(ie))}return K||(this.seen[V]=X,this.seen[ie]=0),ie},ce.slug=function(V,K){K===void 0&&(K={});var ie=this.serialize(V);return this.getNextSafeSlug(ie,K.dryrun)},oe}(),te=function(){function oe(z){this.options=z||q.defaults,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new se,this.slugger=new le}oe.parse=function(V,K){var ie=new oe(K);return ie.parse(V)},oe.parseInline=function(V,K){var ie=new oe(K);return ie.parseInline(V)};var ce=oe.prototype;return ce.parse=function(V,K){K===void 0&&(K=!0);var ie="",X,Z,ue,me,Ce,_e,we,ye,ke,De,ge,pe,ae,ve,Le,Ie,Ae,be,Se,Te=V.length;for(X=0;X<Te;X++){if(De=V[X],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[De.type]&&(Se=this.options.extensions.renderers[De.type].call({parser:this},De),Se!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(De.type))){ie+=Se||"";continue}switch(De.type){case"space":continue;case"hr":{ie+=this.renderer.hr();continue}case"heading":{ie+=this.renderer.heading(this.parseInline(De.tokens),De.depth,c(this.parseInline(De.tokens,this.textRenderer)),this.slugger);continue}case"code":{ie+=this.renderer.code(De.text,De.lang,De.escaped);continue}case"table":{for(ye="",we="",me=De.header.length,Z=0;Z<me;Z++)we+=this.renderer.tablecell(this.parseInline(De.header[Z].tokens),{header:!0,align:De.align[Z]});for(ye+=this.renderer.tablerow(we),ke="",me=De.rows.length,Z=0;Z<me;Z++){for(_e=De.rows[Z],we="",Ce=_e.length,ue=0;ue<Ce;ue++)we+=this.renderer.tablecell(this.parseInline(_e[ue].tokens),{header:!1,align:De.align[ue]});ke+=this.renderer.tablerow(we)}ie+=this.renderer.table(ye,ke);continue}case"blockquote":{ke=this.parse(De.tokens),ie+=this.renderer.blockquote(ke);continue}case"list":{for(ge=De.ordered,pe=De.start,ae=De.loose,me=De.items.length,ke="",Z=0;Z<me;Z++)Le=De.items[Z],Ie=Le.checked,Ae=Le.task,ve="",Le.task&&(be=this.renderer.checkbox(Ie),ae?Le.tokens.length>0&&Le.tokens[0].type==="paragraph"?(Le.tokens[0].text=be+" "+Le.tokens[0].text,Le.tokens[0].tokens&&Le.tokens[0].tokens.length>0&&Le.tokens[0].tokens[0].type==="text"&&(Le.tokens[0].tokens[0].text=be+" "+Le.tokens[0].tokens[0].text)):Le.tokens.unshift({type:"text",text:be}):ve+=be),ve+=this.parse(Le.tokens,ae),ke+=this.renderer.listitem(ve,Ae,Ie);ie+=this.renderer.list(ke,ge,pe);continue}case"html":{ie+=this.renderer.html(De.text);continue}case"paragraph":{ie+=this.renderer.paragraph(this.parseInline(De.tokens));continue}case"text":{for(ke=De.tokens?this.parseInline(De.tokens):De.text;X+1<Te&&V[X+1].type==="text";)De=V[++X],ke+=`\n`+(De.tokens?this.parseInline(De.tokens):De.text);ie+=K?this.renderer.paragraph(ke):ke;continue}default:{var Pe=\'Token with "\'+De.type+\'" type was not found.\';if(this.options.silent){console.error(Pe);return}else throw new Error(Pe)}}}return ie},ce.parseInline=function(V,K){K=K||this.renderer;var ie="",X,Z,ue,me=V.length;for(X=0;X<me;X++){if(Z=V[X],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Z.type]&&(ue=this.options.extensions.renderers[Z.type].call({parser:this},Z),ue!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Z.type))){ie+=ue||"";continue}switch(Z.type){case"escape":{ie+=K.text(Z.text);break}case"html":{ie+=K.html(Z.text);break}case"link":{ie+=K.link(Z.href,Z.title,this.parseInline(Z.tokens,K));break}case"image":{ie+=K.image(Z.href,Z.title,Z.text);break}case"strong":{ie+=K.strong(this.parseInline(Z.tokens,K));break}case"em":{ie+=K.em(this.parseInline(Z.tokens,K));break}case"codespan":{ie+=K.codespan(Z.text);break}case"br":{ie+=K.br();break}case"del":{ie+=K.del(this.parseInline(Z.tokens,K));break}case"text":{ie+=K.text(Z.text);break}default:{var Ce=\'Token with "\'+Z.type+\'" type was not found.\';if(this.options.silent){console.error(Ce);return}else throw new Error(Ce)}}}return ie},oe}();function re(oe,ce,z){if(typeof oe>"u"||oe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof oe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(oe)+", string expected");if(typeof ce=="function"&&(z=ce,ce=null),ce=E({},re.defaults,ce||{}),R(ce),z){var V=ce.highlight,K;try{K=$.lex(oe,ce)}catch(me){return z(me)}var ie=function(Ce){var _e;if(!Ce)try{ce.walkTokens&&re.walkTokens(K,ce.walkTokens),_e=te.parse(K,ce)}catch(we){Ce=we}return ce.highlight=V,Ce?z(Ce):z(null,_e)};if(!V||V.length<3||(delete ce.highlight,!K.length))return ie();var X=0;re.walkTokens(K,function(me){me.type==="code"&&(X++,setTimeout(function(){V(me.text,me.lang,function(Ce,_e){if(Ce)return ie(Ce);_e!=null&&_e!==me.text&&(me.text=_e,me.escaped=!0),X--,X===0&&ie()})},0))}),X===0&&ie();return}function Z(me){if(me.message+=`\nPlease report this to https://github.com/markedjs/marked.`,ce.silent)return"<p>An error occurred:</p><pre>"+s(me.message+"",!0)+"</pre>";throw me}try{var ue=$.lex(oe,ce);if(ce.walkTokens){if(ce.async)return Promise.all(re.walkTokens(ue,ce.walkTokens)).then(function(){return te.parse(ue,ce)}).catch(Z);re.walkTokens(ue,ce.walkTokens)}return te.parse(ue,ce)}catch(me){Z(me)}}re.options=re.setOptions=function(oe){return E(re.defaults,oe),b(re.defaults),re},re.getDefaults=w,re.defaults=q.defaults,re.use=function(){for(var oe=arguments.length,ce=new Array(oe),z=0;z<oe;z++)ce[z]=arguments[z];var V=E.apply(void 0,[{}].concat(ce)),K=re.defaults.extensions||{renderers:{},childTokens:{}},ie;ce.forEach(function(X){if(X.extensions&&(ie=!0,X.extensions.forEach(function(ue){if(!ue.name)throw new Error("extension name required");if(ue.renderer){var me=K.renderers?K.renderers[ue.name]:null;me?K.renderers[ue.name]=function(){for(var Ce=arguments.length,_e=new Array(Ce),we=0;we<Ce;we++)_e[we]=arguments[we];var ye=ue.renderer.apply(this,_e);return ye===!1&&(ye=me.apply(this,_e)),ye}:K.renderers[ue.name]=ue.renderer}if(ue.tokenizer){if(!ue.level||ue.level!=="block"&&ue.level!=="inline")throw new Error("extension level must be \'block\' or \'inline\'");K[ue.level]?K[ue.level].unshift(ue.tokenizer):K[ue.level]=[ue.tokenizer],ue.start&&(ue.level==="block"?K.startBlock?K.startBlock.push(ue.start):K.startBlock=[ue.start]:ue.level==="inline"&&(K.startInline?K.startInline.push(ue.start):K.startInline=[ue.start]))}ue.childTokens&&(K.childTokens[ue.name]=ue.childTokens)})),X.renderer&&function(){var ue=re.defaults.renderer||new Q,me=function(we){var ye=ue[we];ue[we]=function(){for(var ke=arguments.length,De=new Array(ke),ge=0;ge<ke;ge++)De[ge]=arguments[ge];var pe=X.renderer[we].apply(ue,De);return pe===!1&&(pe=ye.apply(ue,De)),pe}};for(var Ce in X.renderer)me(Ce);V.renderer=ue}(),X.tokenizer&&function(){var ue=re.defaults.tokenizer||new P,me=function(we){var ye=ue[we];ue[we]=function(){for(var ke=arguments.length,De=new Array(ke),ge=0;ge<ke;ge++)De[ge]=arguments[ge];var pe=X.tokenizer[we].apply(ue,De);return pe===!1&&(pe=ye.apply(ue,De)),pe}};for(var Ce in X.tokenizer)me(Ce);V.tokenizer=ue}(),X.walkTokens){var Z=re.defaults.walkTokens;V.walkTokens=function(ue){var me=[];return me.push(X.walkTokens.call(this,ue)),Z&&(me=me.concat(Z.call(this,ue))),me}}ie&&(V.extensions=K),re.setOptions(V)})},re.walkTokens=function(oe,ce){for(var z=[],V=function(){var Z=ie.value;switch(z=z.concat(ce.call(re,Z)),Z.type){case"table":{for(var ue=D(Z.header),me;!(me=ue()).done;){var Ce=me.value;z=z.concat(re.walkTokens(Ce.tokens,ce))}for(var _e=D(Z.rows),we;!(we=_e()).done;)for(var ye=we.value,ke=D(ye),De;!(De=ke()).done;){var ge=De.value;z=z.concat(re.walkTokens(ge.tokens,ce))}break}case"list":{z=z.concat(re.walkTokens(Z.items,ce));break}default:re.defaults.extensions&&re.defaults.extensions.childTokens&&re.defaults.extensions.childTokens[Z.type]?re.defaults.extensions.childTokens[Z.type].forEach(function(pe){z=z.concat(re.walkTokens(Z[pe],ce))}):Z.tokens&&(z=z.concat(re.walkTokens(Z.tokens,ce)))}},K=D(oe),ie;!(ie=K()).done;)V();return z},re.parseInline=function(oe,ce){if(typeof oe>"u"||oe===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof oe!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(oe)+", string expected");ce=E({},re.defaults,ce||{}),R(ce);try{var z=$.lexInline(oe,ce);return ce.walkTokens&&re.walkTokens(z,ce.walkTokens),te.parseInline(z,ce)}catch(V){if(V.message+=`\nPlease report this to https://github.com/markedjs/marked.`,ce.silent)return"<p>An error occurred:</p><pre>"+s(V.message+"",!0)+"</pre>";throw V}},re.Parser=te,re.parser=te.parse,re.Renderer=Q,re.TextRenderer=se,re.Lexer=$,re.lexer=$.lex,re.Tokenizer=P,re.Slugger=le,re.parse=re;var H=re.options,B=re.setOptions,j=re.use,G=re.walkTokens,Y=re.parseInline,ne=re,de=te.parse,he=$.lex;q.Lexer=$,q.Parser=te,q.Renderer=Q,q.Slugger=le,q.TextRenderer=se,q.Tokenizer=P,q.getDefaults=w,q.lexer=he,q.marked=re,q.options=H,q.parse=ne,q.parseInline=Y,q.parser=de,q.setOptions=B,q.use=j,q.walkTokens=G,Object.defineProperty(q,"__esModule",{value:!0})}),define(J[101],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mimes=void 0,e.Mimes=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})}),define(J[131],ee([1,0,101]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransfers=void 0,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:S.Mimes.text}}),define(J[357],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class S{constructor(y,D=0,w=y.length,b=D-1){this.items=y,this.start=D,this.end=w,this.index=b}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=S}),define(J[358],ee([1,0,357]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class k{constructor(D=[],w=10){this._initialize(D),this._limit=w,this._onChange()}getHistory(){return this._elements}add(D){this._history.delete(D),this._history.add(D),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()}isLast(){return this._currentPosition()===this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(D){return this._history.has(D)}_onChange(){this._reduceToLimit();const D=this._elements;this._navigator=new S.ArrayNavigator(D,0,D.length,D.length)}_reduceToLimit(){const D=this._elements;D.length>this._limit&&this._initialize(D.slice(D.length-this._limit))}_currentPosition(){const D=this._navigator.current();return D?this._elements.indexOf(D):-1}_initialize(D){this._history=new Set;for(const w of D)this._history.add(w)}get _elements(){const D=[];return this._history.forEach(w=>D.push(w)),D}}e.HistoryNavigator=k}),define(J[132],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.clamp=void 0;function S(D,w,b){return Math.min(Math.max(D,w),b)}e.clamp=S;class k{constructor(){this._n=1,this._val=0}update(w){return this._val=this._val+(w-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=k;class y{constructor(w){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(w),this._values.fill(0,0,w)}update(w){const b=this._values[this._index];return this._values[this._index]=w,this._index=(this._index+1)%this._values.length,this._sum-=b,this._sum+=w,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=y}),define(J[156],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var S;(function(k){function y(_,h){if(_.start>=h.end||h.start>=_.end)return{start:0,end:0};const m=Math.max(_.start,h.start),n=Math.min(_.end,h.end);return n-m<=0?{start:0,end:0}:{start:m,end:n}}k.intersect=y;function D(_){return _.end-_.start<=0}k.isEmpty=D;function w(_,h){return!D(y(_,h))}k.intersects=w;function b(_,h){const m=[],n={start:_.start,end:Math.min(h.start,_.end)},t={start:Math.max(h.end,_.start),end:_.end};return D(n)||m.push(n),D(t)||m.push(t),m}k.relativeComplement=b})(S=e.Range||(e.Range={}))}),define(J[359],ee([1,0,156]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function k(_,h){const m=[];for(const n of h){if(_.start>=n.range.end)continue;if(_.end<n.range.start)break;const t=S.Range.intersect(_,n.range);S.Range.isEmpty(t)||m.push({range:t,size:n.size})}return m}e.groupIntersect=k;function y({start:_,end:h},m){return{start:_+m,end:h+m}}e.shift=y;function D(_){const h=[];let m=null;for(const n of _){const t=n.range.start,i=n.range.end,s=n.size;if(m&&s===m.size){m.range.end=i;continue}m={range:{start:t,end:i},size:s},h.push(m)}return h}e.consolidate=D;function w(..._){return D(_.reduce((h,m)=>h.concat(m),[]))}class b{constructor(){this.groups=[],this._size=0}splice(h,m,n=[]){const t=n.length-m,i=k({start:0,end:h},this.groups),s=k({start:h+m,end:Number.POSITIVE_INFINITY},this.groups).map(c=>({range:y(c.range,t),size:c.size})),r=n.map((c,g)=>({range:{start:h+g,end:h+g+1},size:c.size}));this.groups=w(i,r,s),this._size=this.groups.reduce((c,g)=>c+g.size*(g.range.end-g.range.start),0)}get count(){const h=this.groups.length;return h?this.groups[h-1].range.end:0}get size(){return this._size}indexAt(h){if(h<0)return-1;let m=0,n=0;for(const t of this.groups){const i=t.range.end-t.range.start,s=n+i*t.size;if(h<s)return m+Math.floor((h-n)/t.size);m+=i,n=s}return m}indexAfter(h){return Math.min(this.indexAt(h)+1,this.count)}positionAt(h){if(h<0)return-1;let m=0,n=0;for(const t of this.groups){const i=t.range.end-t.range.start,s=n+i;if(h<s)return m+(h-n)*t.size;m+=i*t.size,n=s}return-1}}e.RangeMap=b}),define(J[9],ee([1,0,243,100]),function(q,e,S,k){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.singleLetterHash=e.containsUppercaseCharacter=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.isAsciiDigit=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 D(Z){return!Z||typeof Z!="string"?!0:Z.trim().length===0}e.isFalsyOrWhitespace=D;const w=/{(\\d+)}/g;function b(Z,...ue){return ue.length===0?Z:Z.replace(w,function(me,Ce){const _e=parseInt(Ce,10);return isNaN(_e)||_e<0||_e>=ue.length?me:ue[_e]})}e.format=b;function _(Z){return Z.replace(/[<>&]/g,function(ue){switch(ue){case"<":return"<";case">":return">";case"&":return"&";default:return ue}})}e.escape=_;function h(Z){return Z.replace(/[\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\[\\]\\(\\)]/g,"\\\\$&")}e.escapeRegExpCharacters=h;function m(Z,ue=" "){const me=n(Z,ue);return t(me,ue)}e.trim=m;function n(Z,ue){if(!Z||!ue)return Z;const me=ue.length;if(me===0||Z.length===0)return Z;let Ce=0;for(;Z.indexOf(ue,Ce)===Ce;)Ce=Ce+me;return Z.substring(Ce)}e.ltrim=n;function t(Z,ue){if(!Z||!ue)return Z;const me=ue.length,Ce=Z.length;if(me===0||Ce===0)return Z;let _e=Ce,we=-1;for(;we=Z.lastIndexOf(ue,_e-1),!(we===-1||we+me!==_e);){if(we===0)return"";_e=we}return Z.substring(0,_e)}e.rtrim=t;function i(Z){return Z.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g,"\\\\$&").replace(/[\\*]/g,".*")}e.convertSimple2RegExpPattern=i;function s(Z){return Z.replace(/\\*/g,"")}e.stripWildcards=s;function r(Z,ue,me={}){if(!Z)throw new Error("Cannot create regex from empty string");ue||(Z=h(Z)),me.wholeWord&&(/\\B/.test(Z.charAt(0))||(Z="\\\\b"+Z),/\\B/.test(Z.charAt(Z.length-1))||(Z=Z+"\\\\b"));let Ce="";return me.global&&(Ce+="g"),me.matchCase||(Ce+="i"),me.multiline&&(Ce+="m"),me.unicode&&(Ce+="u"),new RegExp(Z,Ce)}e.createRegExp=r;function c(Z){return Z.source==="^"||Z.source==="^$"||Z.source==="$"||Z.source==="^\\\\s*$"?!1:!!(Z.exec("")&&Z.lastIndex===0)}e.regExpLeadsToEndlessLoop=c;function g(Z){return(Z.global?"g":"")+(Z.ignoreCase?"i":"")+(Z.multiline?"m":"")+(Z.unicode?"u":"")}e.regExpFlags=g;function o(Z){return Z.split(/\\r\\n|\\r|\\n/)}e.splitLines=o;function l(Z){for(let ue=0,me=Z.length;ue<me;ue++){const Ce=Z.charCodeAt(ue);if(Ce!==32&&Ce!==9)return ue}return-1}e.firstNonWhitespaceIndex=l;function a(Z,ue=0,me=Z.length){for(let Ce=ue;Ce<me;Ce++){const _e=Z.charCodeAt(Ce);if(_e!==32&&_e!==9)return Z.substring(ue,Ce)}return Z.substring(ue,me)}e.getLeadingWhitespace=a;function d(Z,ue=Z.length-1){for(let me=ue;me>=0;me--){const Ce=Z.charCodeAt(me);if(Ce!==32&&Ce!==9)return me}return-1}e.lastNonWhitespaceIndex=d;function u(Z,ue){return Z<ue?-1:Z>ue?1:0}e.compare=u;function C(Z,ue,me=0,Ce=Z.length,_e=0,we=ue.length){for(;me<Ce&&_e<we;me++,_e++){const De=Z.charCodeAt(me),ge=ue.charCodeAt(_e);if(De<ge)return-1;if(De>ge)return 1}const ye=Ce-me,ke=we-_e;return ye<ke?-1:ye>ke?1:0}e.compareSubstring=C;function f(Z,ue){return v(Z,ue,0,Z.length,0,ue.length)}e.compareIgnoreCase=f;function v(Z,ue,me=0,Ce=Z.length,_e=0,we=ue.length){for(;me<Ce&&_e<we;me++,_e++){let De=Z.charCodeAt(me),ge=ue.charCodeAt(_e);if(De===ge)continue;if(De>=128||ge>=128)return C(Z.toLowerCase(),ue.toLowerCase(),me,Ce,_e,we);L(De)&&(De-=32),L(ge)&&(ge-=32);const pe=De-ge;if(pe!==0)return pe}const ye=Ce-me,ke=we-_e;return ye<ke?-1:ye>ke?1:0}e.compareSubstringIgnoreCase=v;function p(Z){return Z>=48&&Z<=57}e.isAsciiDigit=p;function L(Z){return Z>=97&&Z<=122}e.isLowerAsciiLetter=L;function E(Z){return Z>=65&&Z<=90}e.isUpperAsciiLetter=E;function I(Z,ue){return Z.length===ue.length&&v(Z,ue)===0}e.equalsIgnoreCase=I;function T(Z,ue){const me=ue.length;return ue.length>Z.length?!1:v(Z,ue,0,me)===0}e.startsWithIgnoreCase=T;function F(Z,ue){const me=Math.min(Z.length,ue.length);let Ce;for(Ce=0;Ce<me;Ce++)if(Z.charCodeAt(Ce)!==ue.charCodeAt(Ce))return Ce;return me}e.commonPrefixLength=F;function R(Z,ue){const me=Math.min(Z.length,ue.length);let Ce;const _e=Z.length-1,we=ue.length-1;for(Ce=0;Ce<me;Ce++)if(Z.charCodeAt(_e-Ce)!==ue.charCodeAt(we-Ce))return Ce;return me}e.commonSuffixLength=R;function M(Z){return 55296<=Z&&Z<=56319}e.isHighSurrogate=M;function N(Z){return 56320<=Z&&Z<=57343}e.isLowSurrogate=N;function A(Z,ue){return(Z-55296<<10)+(ue-56320)+65536}e.computeCodePoint=A;function P(Z,ue,me){const Ce=Z.charCodeAt(me);if(M(Ce)&&me+1<ue){const _e=Z.charCodeAt(me+1);if(N(_e))return A(Ce,_e)}return Ce}e.getNextCodePoint=P;function x(Z,ue){const me=Z.charCodeAt(ue-1);if(N(me)&&ue>1){const Ce=Z.charCodeAt(ue-2);if(M(Ce))return A(Ce,me)}return me}class W{get offset(){return this._offset}constructor(ue,me=0){this._str=ue,this._len=ue.length,this._offset=me}setOffset(ue){this._offset=ue}prevCodePoint(){const ue=x(this._str,this._offset);return this._offset-=ue>=65536?2:1,ue}nextCodePoint(){const ue=P(this._str,this._len,this._offset);return this._offset+=ue>=65536?2:1,ue}eol(){return this._offset>=this._len}}e.CodePointIterator=W;class U{get offset(){return this._iterator.offset}constructor(ue,me=0){this._iterator=new W(ue,me)}nextGraphemeLength(){const ue=oe.getInstance(),me=this._iterator,Ce=me.offset;let _e=ue.getGraphemeBreakType(me.nextCodePoint());for(;!me.eol();){const we=me.offset,ye=ue.getGraphemeBreakType(me.nextCodePoint());if(he(_e,ye)){me.setOffset(we);break}_e=ye}return me.offset-Ce}prevGraphemeLength(){const ue=oe.getInstance(),me=this._iterator,Ce=me.offset;let _e=ue.getGraphemeBreakType(me.prevCodePoint());for(;me.offset>0;){const we=me.offset,ye=ue.getGraphemeBreakType(me.prevCodePoint());if(he(ye,_e)){me.setOffset(we);break}_e=ye}return Ce-me.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=U;function O(Z,ue){return new U(Z,ue).nextGraphemeLength()}e.nextCharLength=O;function $(Z,ue){return new U(Z,ue).prevGraphemeLength()}e.prevCharLength=$;function Q(Z,ue){ue>0&&N(Z.charCodeAt(ue))&&ue--;const me=ue+O(Z,ue);return[me-$(Z,me),me]}e.getCharContainingOffset=Q;let se;function le(){return/(?:[\\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\\u07FE-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u0858\\u085E-\\u088E\\u08A0-\\u08C9\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFD3D\\uFD50-\\uFDC7\\uFDF0-\\uFDFC\\uFE70-\\uFEFC]|\\uD802[\\uDC00-\\uDD1B\\uDD20-\\uDE00\\uDE10-\\uDE35\\uDE40-\\uDEE4\\uDEEB-\\uDF35\\uDF40-\\uDFFF]|\\uD803[\\uDC00-\\uDD23\\uDE80-\\uDEA9\\uDEAD-\\uDF45\\uDF51-\\uDF81\\uDF86-\\uDFF6]|\\uD83A[\\uDC00-\\uDCCF\\uDD00-\\uDD43\\uDD4B-\\uDFFF]|\\uD83B[\\uDC00-\\uDEBB])/}function te(Z){return se||(se=le()),se.test(Z)}e.containsRTL=te;const re=/^[\\t\\n\\r\\x20-\\x7E]*$/;function H(Z){return re.test(Z)}e.isBasicASCII=H,e.UNUSUAL_LINE_TERMINATORS=/[\\u2028\\u2029]/;function B(Z){return e.UNUSUAL_LINE_TERMINATORS.test(Z)}e.containsUnusualLineTerminators=B;function j(Z){return Z>=11904&&Z<=55215||Z>=63744&&Z<=64255||Z>=65281&&Z<=65374}e.isFullWidthCharacter=j;function G(Z){return Z>=127462&&Z<=127487||Z===8986||Z===8987||Z===9200||Z===9203||Z>=9728&&Z<=10175||Z===11088||Z===11093||Z>=127744&&Z<=128591||Z>=128640&&Z<=128764||Z>=128992&&Z<=129008||Z>=129280&&Z<=129535||Z>=129648&&Z<=129782}e.isEmojiImprecise=G,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function Y(Z){return!!(Z&&Z.length>0&&Z.charCodeAt(0)===65279)}e.startsWithUTF8BOM=Y;function ne(Z,ue=!1){return Z?(ue&&(Z=Z.replace(/\\\\./g,"")),Z.toLowerCase()!==Z):!1}e.containsUppercaseCharacter=ne;function de(Z){return Z=Z%(2*26),Z<26?String.fromCharCode(97+Z):String.fromCharCode(65+Z-26)}e.singleLetterHash=de;function he(Z,ue){return Z===0?ue!==5&&ue!==7:Z===2&&ue===3?!1:Z===4||Z===2||Z===3||ue===4||ue===2||ue===3?!0:!(Z===8&&(ue===8||ue===9||ue===11||ue===12)||(Z===11||Z===9)&&(ue===9||ue===10)||(Z===12||Z===10)&&ue===10||ue===5||ue===13||ue===7||Z===1||Z===13&&ue===14||Z===6&&ue===6)}class oe{static getInstance(){return oe._INSTANCE||(oe._INSTANCE=new oe),oe._INSTANCE}constructor(){this._data=ce()}getGraphemeBreakType(ue){if(ue<32)return ue===10?3:ue===13?2:4;if(ue<127)return 0;const me=this._data,Ce=me.length/3;let _e=1;for(;_e<=Ce;)if(ue<me[3*_e])_e=2*_e;else if(ue>me[3*_e+1])_e=2*_e+1;else return me[3*_e+2];return 0}}oe._INSTANCE=null;function ce(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,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,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,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,129008,129008,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,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,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,2192,2193,1,2250,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,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,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,6862,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,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,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,9775,9775,14,9784,9785,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,9874,14,9876,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,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,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,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,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,118528,118573,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,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function z(Z,ue){if(Z===0)return 0;const me=V(Z,ue);if(me!==void 0)return me;const Ce=new W(ue,Z);return Ce.prevCodePoint(),Ce.offset}e.getLeftDeleteOffset=z;function V(Z,ue){const me=new W(ue,Z);let Ce=me.prevCodePoint();for(;K(Ce)||Ce===65039||Ce===8419;){if(me.offset===0)return;Ce=me.prevCodePoint()}if(!G(Ce))return;let _e=me.offset;return _e>0&&me.prevCodePoint()===8205&&(_e=me.offset),_e}function K(Z){return 127995<=Z&&Z<=127999}e.noBreakWhitespace="\\xA0";class ie{static getInstance(ue){return ie.cache.get(Array.from(ue))}static getLocales(){return ie._locales.value}constructor(ue){this.confusableDictionary=ue}isAmbiguous(ue){return this.confusableDictionary.has(ue)}getPrimaryConfusable(ue){return this.confusableDictionary.get(ue)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}y=ie,ie.ambiguousCharacterData=new k.Lazy(()=>JSON.parse(\'{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}\')),ie.cache=new S.LRUCachedFunction(Z=>{function ue(ge){const pe=new Map;for(let ae=0;ae<ge.length;ae+=2)pe.set(ge[ae],ge[ae+1]);return pe}function me(ge,pe){const ae=new Map(ge);for(const[ve,Le]of pe)ae.set(ve,Le);return ae}function Ce(ge,pe){if(!ge)return pe;const ae=new Map;for(const[ve,Le]of ge)pe.has(ve)&&ae.set(ve,Le);return ae}const _e=y.ambiguousCharacterData.value;let we=Z.filter(ge=>!ge.startsWith("_")&&ge in _e);we.length===0&&(we=["_default"]);let ye;for(const ge of we){const pe=ue(_e[ge]);ye=Ce(ye,pe)}const ke=ue(_e._common),De=me(ke,ye);return new ie(De)}),ie._locales=new k.Lazy(()=>Object.keys(ie.ambiguousCharacterData.value).filter(Z=>!Z.startsWith("_"))),e.AmbiguousCharacters=ie;class X{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(X.getRawData())),this._data}static isInvisibleCharacter(ue){return X.getData().has(ue)}static get codePoints(){return X.getData()}}X._data=void 0,e.InvisibleCharacters=X}),define(J[63],ee([1,0,55,9]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScoreOptions=e.FuzzyScore=e.isPatternInWord=e.createMatches=e.anyScore=e.matchesFuzzy=e.matchesWords=e.matchesCamelCase=e.isUpper=e.matchesSubString=e.matchesContiguousSubString=e.matchesPrefix=e.matchesStrictPrefix=e.or=void 0;function y(...z){return function(V,K){for(let ie=0,X=z.length;ie<X;ie++){const Z=z[ie](V,K);if(Z)return Z}return null}}e.or=y,e.matchesStrictPrefix=D.bind(void 0,!1),e.matchesPrefix=D.bind(void 0,!0);function D(z,V,K){if(!K||K.length<V.length)return null;let ie;return z?ie=k.startsWithIgnoreCase(K,V):ie=K.indexOf(V)===0,ie?V.length>0?[{start:0,end:V.length}]:[]:null}function w(z,V){const K=V.toLowerCase().indexOf(z.toLowerCase());return K===-1?null:[{start:K,end:K+z.length}]}e.matchesContiguousSubString=w;function b(z,V){return _(z.toLowerCase(),V.toLowerCase(),0,0)}e.matchesSubString=b;function _(z,V,K,ie){if(K===z.length)return[];if(ie===V.length)return null;if(z[K]===V[ie]){let X=null;return(X=_(z,V,K+1,ie+1))?g({start:ie,end:ie+1},X):null}return _(z,V,K,ie+1)}function h(z){return 97<=z&&z<=122}function m(z){return 65<=z&&z<=90}e.isUpper=m;function n(z){return 48<=z&&z<=57}function t(z){return z===32||z===9||z===10||z===13}const i=new Set;"()[]{}<>`\'\\"-/;:,.?!".split("").forEach(z=>i.add(z.charCodeAt(0)));function s(z){return t(z)||i.has(z)}function r(z,V){return z===V||s(z)&&s(V)}function c(z){return h(z)||m(z)||n(z)}function g(z,V){return V.length===0?V=[z]:z.end===V[0].start?V[0].start=z.start:V.unshift(z),V}function o(z,V){for(let K=V;K<z.length;K++){const ie=z.charCodeAt(K);if(m(ie)||n(ie)||K>0&&!c(z.charCodeAt(K-1)))return K}return z.length}function l(z,V,K,ie){if(K===z.length)return[];if(ie===V.length)return null;if(z[K]!==V[ie].toLowerCase())return null;{let X=null,Z=ie+1;for(X=l(z,V,K+1,ie+1);!X&&(Z=o(V,Z))<V.length;)X=l(z,V,K+1,Z),Z++;return X===null?null:g({start:ie,end:ie+1},X)}}function a(z){let V=0,K=0,ie=0,X=0,Z=0;for(let we=0;we<z.length;we++)Z=z.charCodeAt(we),m(Z)&&V++,h(Z)&&K++,c(Z)&&ie++,n(Z)&&X++;const ue=V/z.length,me=K/z.length,Ce=ie/z.length,_e=X/z.length;return{upperPercent:ue,lowerPercent:me,alphaPercent:Ce,numericPercent:_e}}function d(z){const{upperPercent:V,lowerPercent:K}=z;return K===0&&V>.6}function u(z){const{upperPercent:V,lowerPercent:K,alphaPercent:ie,numericPercent:X}=z;return K>.2&&V<.8&&ie>.6&&X<.2}function C(z){let V=0,K=0,ie=0,X=0;for(let Z=0;Z<z.length;Z++)ie=z.charCodeAt(Z),m(ie)&&V++,h(ie)&&K++,t(ie)&&X++;return(V===0||K===0)&&X===0?z.length<=30:V<=5}function f(z,V){if(!V||(V=V.trim(),V.length===0)||!C(z)||V.length>60)return null;const K=a(V);if(!u(K)){if(!d(K))return null;V=V.toLowerCase()}let ie=null,X=0;for(z=z.toLowerCase();X<V.length&&(ie=l(z,V,0,X))===null;)X=o(V,X+1);return ie}e.matchesCamelCase=f;function v(z,V,K=!1){if(!V||V.length===0)return null;let ie=null,X=0;for(z=z.toLowerCase(),V=V.toLowerCase();X<V.length&&(ie=p(z,V,0,X,K))===null;)X=L(V,X+1);return ie}e.matchesWords=v;function p(z,V,K,ie,X){if(K===z.length)return[];if(ie===V.length)return null;if(r(z.charCodeAt(K),V.charCodeAt(ie))){let Z=null,ue=ie+1;if(Z=p(z,V,K+1,ie+1,X),!X)for(;!Z&&(ue=L(V,ue))<V.length;)Z=p(z,V,K+1,ue,X),ue++;return Z?z.charCodeAt(K)!==V.charCodeAt(ie)?Z:g({start:ie,end:ie+1},Z):null}else return null}function L(z,V){for(let K=V;K<z.length;K++)if(s(z.charCodeAt(K))||K>0&&s(z.charCodeAt(K-1)))return K;return z.length}const E=y(e.matchesPrefix,f,w),I=y(e.matchesPrefix,f,b),T=new S.LRUCache(1e4);function F(z,V,K=!1){if(typeof z!="string"||typeof V!="string")return null;let ie=T.get(z);ie||(ie=new RegExp(k.convertSimple2RegExpPattern(z),"i"),T.set(z,ie));const X=ie.exec(V);return X?[{start:X.index,end:X.index+X[0].length}]:K?I(z,V):E(z,V)}e.matchesFuzzy=F;function R(z,V,K,ie,X,Z){const ue=Math.min(13,z.length);for(;K<ue;K++){const me=Y(z,V,K,ie,X,Z,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(me)return me}return[0,Z]}e.anyScore=R;function M(z){if(typeof z>"u")return[];const V=[],K=z[1];for(let ie=z.length-1;ie>1;ie--){const X=z[ie]+K,Z=V[V.length-1];Z&&Z.end===X?Z.end=X+1:V.push({start:X,end:X+1})}return V}e.createMatches=M;const N=128;function A(){const z=[],V=[];for(let K=0;K<=N;K++)V[K]=0;for(let K=0;K<=N;K++)z.push(V.slice(0));return z}function P(z){const V=[];for(let K=0;K<=z;K++)V[K]=0;return V}const x=P(2*N),W=P(2*N),U=A(),O=A(),$=A(),Q=!1;function se(z,V,K,ie,X){function Z(me,Ce,_e=" "){for(;me.length<Ce;)me=_e+me;return me}let ue=` | |${ie.split("").map(me=>Z(me,3)).join("|")}\n`;for(let me=0;me<=K;me++)me===0?ue+=" |":ue+=`${V[me-1]}|`,ue+=z[me].slice(0,X+1).map(Ce=>Z(Ce.toString(),3)).join("|")+`\n`;return ue}function le(z,V,K,ie){z=z.substr(V),K=K.substr(ie),console.log(se(O,z,z.length,K,K.length)),console.log(se($,z,z.length,K,K.length)),console.log(se(U,z,z.length,K,K.length))}function te(z,V){if(V<0||V>=z.length)return!1;const K=z.codePointAt(V);switch(K){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!k.isEmojiImprecise(K)}}function re(z,V){if(V<0||V>=z.length)return!1;switch(z.charCodeAt(V)){case 32:case 9:return!0;default:return!1}}function H(z,V,K){return V[z]!==K[z]}function B(z,V,K,ie,X,Z,ue=!1){for(;V<K&&X<Z;)z[V]===ie[X]&&(ue&&(x[V]=X),V+=1),X+=1;return V===K}e.isPatternInWord=B;var j;(function(z){z.Default=[-100,0];function V(K){return!K||K.length===2&&K[0]===-100&&K[1]===0}z.isDefault=V})(j=e.FuzzyScore||(e.FuzzyScore={}));class G{constructor(V,K){this.firstMatchCanBeWeak=V,this.boostFullMatch=K}}G.default={boostFullMatch:!0,firstMatchCanBeWeak:!1},e.FuzzyScoreOptions=G;function Y(z,V,K,ie,X,Z,ue=G.default){const me=z.length>N?N:z.length,Ce=ie.length>N?N:ie.length;if(K>=me||Z>=Ce||me-K>Ce-Z||!B(V,K,me,X,Z,Ce,!0))return;ne(me,Ce,K,Z,V,X);let _e=1,we=1,ye=K,ke=Z;const De=[!1];for(_e=1,ye=K;ye<me;_e++,ye++){const Le=x[ye],Ie=W[ye],Ae=ye+1<me?W[ye+1]:Ce;for(we=Le-Z+1,ke=Le;ke<Ae;we++,ke++){let be=Number.MIN_SAFE_INTEGER,Se=!1;ke<=Ie&&(be=de(z,V,ye,K,ie,X,ke,Ce,Z,U[_e-1][we-1]===0,De));let Te=0;be!==Number.MAX_SAFE_INTEGER&&(Se=!0,Te=be+O[_e-1][we-1]);const Pe=ke>Le,Fe=Pe?O[_e][we-1]+(U[_e][we-1]>0?-5:0):0,Oe=ke>Le+1&&U[_e][we-1]>0,xe=Oe?O[_e][we-2]+(U[_e][we-2]>0?-5:0):0;if(Oe&&(!Pe||xe>=Fe)&&(!Se||xe>=Te))O[_e][we]=xe,$[_e][we]=3,U[_e][we]=0;else if(Pe&&(!Se||Fe>=Te))O[_e][we]=Fe,$[_e][we]=2,U[_e][we]=0;else if(Se)O[_e][we]=Te,$[_e][we]=1,U[_e][we]=U[_e-1][we-1]+1;else throw new Error("not possible")}}if(Q&&le(z,K,ie,Z),!De[0]&&!ue.firstMatchCanBeWeak)return;_e--,we--;const ge=[O[_e][we],Z];let pe=0,ae=0;for(;_e>=1;){let Le=we;do{const Ie=$[_e][Le];if(Ie===3)Le=Le-2;else if(Ie===2)Le=Le-1;else break}while(Le>=1);pe>1&&V[K+_e-1]===X[Z+we-1]&&!H(Le+Z-1,ie,X)&&pe+1>U[_e][Le]&&(Le=we),Le===we?pe++:pe=1,ae||(ae=Le),_e--,we=Le-1,ge.push(we)}Ce===me&&ue.boostFullMatch&&(ge[0]+=2);const ve=ae-me;return ge[0]-=ve,ge}e.fuzzyScore=Y;function ne(z,V,K,ie,X,Z){let ue=z-1,me=V-1;for(;ue>=K&&me>=ie;)X[ue]===Z[me]&&(W[ue]=me,ue--),me--}function de(z,V,K,ie,X,Z,ue,me,Ce,_e,we){if(V[K]!==Z[ue])return Number.MIN_SAFE_INTEGER;let ye=1,ke=!1;return ue===K-ie?ye=z[K]===X[ue]?7:5:H(ue,X,Z)&&(ue===0||!H(ue-1,X,Z))?(ye=z[K]===X[ue]?7:5,ke=!0):te(Z,ue)&&(ue===0||!te(Z,ue-1))?ye=5:(te(Z,ue-1)||re(Z,ue-1))&&(ye=5,ke=!0),ye>1&&K===ie&&(we[0]=!0),ke||(ke=H(ue,X,Z)||te(Z,ue-1)||re(Z,ue-1)),K===ie?ue>Ce&&(ye-=ke?3:5):_e?ye+=ke?2:0:ye+=ke?0:1,ue+1===me&&(ye-=ke?3:5),ye}function he(z,V,K,ie,X,Z,ue){return oe(z,V,K,ie,X,Z,!0,ue)}e.fuzzyScoreGracefulAggressive=he;function oe(z,V,K,ie,X,Z,ue,me){let Ce=Y(z,V,K,ie,X,Z,me);if(Ce&&!ue)return Ce;if(z.length>=3){const _e=Math.min(7,z.length-1);for(let we=K+1;we<_e;we++){const ye=ce(z,we);if(ye){const ke=Y(ye,ye.toLowerCase(),K,ie,X,Z,me);ke&&(ke[0]-=3,(!Ce||ke[0]>Ce[0])&&(Ce=ke))}}}return Ce}function ce(z,V){if(V+1>=z.length)return;const K=z[V],ie=z[V+1];if(K!==ie)return z.slice(0,V)+ie+K+z.slice(V+2)}}),define(J[133],ee([1,0,9]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function k(r){return y(r,0)}e.hash=k;function y(r,c){switch(typeof r){case"object":return r===null?D(349,c):Array.isArray(r)?_(r,c):h(r,c);case"string":return b(r,c);case"boolean":return w(r,c);case"number":return D(r,c);case"undefined":return D(937,c);default:return D(617,c)}}e.doHash=y;function D(r,c){return(c<<5)-c+r|0}e.numberHash=D;function w(r,c){return D(r?433:863,c)}function b(r,c){c=D(149417,c);for(let g=0,o=r.length;g<o;g++)c=D(r.charCodeAt(g),c);return c}e.stringHash=b;function _(r,c){return c=D(104579,c),r.reduce((g,o)=>y(o,g),c)}function h(r,c){return c=D(181387,c),Object.keys(r).sort().reduce((g,o)=>(g=b(o,g),y(r[o],g)),c)}function m(r,c,g=32){const o=g-c,l=~((1<<o)-1);return(r<<c|(l&r)>>>o)>>>0}function n(r,c=0,g=r.byteLength,o=0){for(let l=0;l<g;l++)r[c+l]=o}function t(r,c,g="0"){for(;r.length<c;)r=g+r;return r}function i(r,c=32){return r instanceof ArrayBuffer?Array.from(new Uint8Array(r)).map(g=>g.toString(16).padStart(2,"0")).join(""):t((r>>>0).toString(16),c/4)}e.toHexString=i;class s{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(c){const g=c.length;if(g===0)return;const o=this._buff;let l=this._buffLen,a=this._leftoverHighSurrogate,d,u;for(a!==0?(d=a,u=-1,a=0):(d=c.charCodeAt(0),u=0);;){let C=d;if(S.isHighSurrogate(d))if(u+1<g){const f=c.charCodeAt(u+1);S.isLowSurrogate(f)?(u++,C=S.computeCodePoint(d,f)):C=65533}else{a=d;break}else S.isLowSurrogate(d)&&(C=65533);if(l=this._push(o,l,C),u++,u<g)d=c.charCodeAt(u);else break}this._buffLen=l,this._leftoverHighSurrogate=a}_push(c,g,o){return o<128?c[g++]=o:o<2048?(c[g++]=192|(o&1984)>>>6,c[g++]=128|(o&63)>>>0):o<65536?(c[g++]=224|(o&61440)>>>12,c[g++]=128|(o&4032)>>>6,c[g++]=128|(o&63)>>>0):(c[g++]=240|(o&1835008)>>>18,c[g++]=128|(o&258048)>>>12,c[g++]=128|(o&4032)>>>6,c[g++]=128|(o&63)>>>0),g>=64&&(this._step(),g-=64,this._totalLen+=64,c[0]=c[64+0],c[1]=c[64+1],c[2]=c[64+2]),g}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()),i(this._h0)+i(this._h1)+i(this._h2)+i(this._h3)+i(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,n(this._buff,this._buffLen),this._buffLen>56&&(this._step(),n(this._buff));const c=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(c/4294967296),!1),this._buffDV.setUint32(60,c%4294967296,!1),this._step()}_step(){const c=s._bigBlock32,g=this._buffDV;for(let p=0;p<64;p+=4)c.setUint32(p,g.getUint32(p,!1),!1);for(let p=64;p<320;p+=4)c.setUint32(p,m(c.getUint32(p-12,!1)^c.getUint32(p-32,!1)^c.getUint32(p-56,!1)^c.getUint32(p-64,!1),1),!1);let o=this._h0,l=this._h1,a=this._h2,d=this._h3,u=this._h4,C,f,v;for(let p=0;p<80;p++)p<20?(C=l&a|~l&d,f=1518500249):p<40?(C=l^a^d,f=1859775393):p<60?(C=l&a|l&d|a&d,f=2400959708):(C=l^a^d,f=3395469782),v=m(o,5)+C+u+f+c.getUint32(p*4,!1)&4294967295,u=d,d=a,a=m(l,30),l=o,o=v;this._h0=this._h0+o&4294967295,this._h1=this._h1+l&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+d&4294967295,this._h4=this._h4+u&4294967295}}s._bigBlock32=new DataView(new ArrayBuffer(320)),e.StringSHA1=s}),define(J[157],ee([1,0,353,133]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.stringDiff=e.StringDiffSequence=void 0;class y{constructor(n){this.source=n}getElements(){const n=this.source,t=new Int32Array(n.length);for(let i=0,s=n.length;i<s;i++)t[i]=n.charCodeAt(i);return t}}e.StringDiffSequence=y;function D(m,n,t){return new h(new y(m),new y(n)).ComputeDiff(t).changes}e.stringDiff=D;class w{static Assert(n,t){if(!n)throw new Error(t)}}class b{static Copy(n,t,i,s,r){for(let c=0;c<r;c++)i[s+c]=n[t+c]}static Copy2(n,t,i,s,r){for(let c=0;c<r;c++)i[s+c]=n[t+c]}}class _{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 S.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(n,t){this.m_originalStart=Math.min(this.m_originalStart,n),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(n,t){this.m_originalStart=Math.min(this.m_originalStart,n),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),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 h{constructor(n,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=n,this._modifiedSequence=t;const[s,r,c]=h._getElements(n),[g,o,l]=h._getElements(t);this._hasStrings=c&&l,this._originalStringElements=s,this._originalElementsOrHash=r,this._modifiedStringElements=g,this._modifiedElementsOrHash=o,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(n){return n.length>0&&typeof n[0]=="string"}static _getElements(n){const t=n.getElements();if(h._isStringArray(t)){const i=new Int32Array(t.length);for(let s=0,r=t.length;s<r;s++)i[s]=(0,k.stringHash)(t[s],0);return[t,i,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(n,t){return this._originalElementsOrHash[n]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[n]===this._modifiedStringElements[t]:!0}ElementsAreStrictEqual(n,t){if(!this.ElementsAreEqual(n,t))return!1;const i=h._getStrictElement(this._originalSequence,n),s=h._getStrictElement(this._modifiedSequence,t);return i===s}static _getStrictElement(n,t){return typeof n.getStrictElement=="function"?n.getStrictElement(t):null}OriginalElementsAreEqual(n,t){return this._originalElementsOrHash[n]!==this._originalElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[n]===this._originalStringElements[t]:!0}ModifiedElementsAreEqual(n,t){return this._modifiedElementsOrHash[n]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._modifiedStringElements[n]===this._modifiedStringElements[t]:!0}ComputeDiff(n){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,n)}_ComputeDiff(n,t,i,s,r){const c=[!1];let g=this.ComputeDiffRecursive(n,t,i,s,c);return r&&(g=this.PrettifyChanges(g)),{quitEarly:c[0],changes:g}}ComputeDiffRecursive(n,t,i,s,r){for(r[0]=!1;n<=t&&i<=s&&this.ElementsAreEqual(n,i);)n++,i++;for(;t>=n&&s>=i&&this.ElementsAreEqual(t,s);)t--,s--;if(n>t||i>s){let d;return i<=s?(w.Assert(n===t+1,"originalStart should only be one more than originalEnd"),d=[new S.DiffChange(n,0,i,s-i+1)]):n<=t?(w.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),d=[new S.DiffChange(n,t-n+1,i,0)]):(w.Assert(n===t+1,"originalStart should only be one more than originalEnd"),w.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}const c=[0],g=[0],o=this.ComputeRecursionPoint(n,t,i,s,c,g,r),l=c[0],a=g[0];if(o!==null)return o;if(!r[0]){const d=this.ComputeDiffRecursive(n,l,i,a,r);let u=[];return r[0]?u=[new S.DiffChange(l+1,t-(l+1)+1,a+1,s-(a+1)+1)]:u=this.ComputeDiffRecursive(l+1,t,a+1,s,r),this.ConcatenateChanges(d,u)}return[new S.DiffChange(n,t-n+1,i,s-i+1)]}WALKTRACE(n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E){let I=null,T=null,F=new _,R=t,M=i,N=C[0]-p[0]-s,A=-1073741824,P=this.m_forwardHistory.length-1;do{const x=N+n;x===R||x<M&&l[x-1]<l[x+1]?(d=l[x+1],f=d-N-s,d<A&&F.MarkNextChange(),A=d,F.AddModifiedElement(d+1,f),N=x+1-n):(d=l[x-1]+1,f=d-N-s,d<A&&F.MarkNextChange(),A=d-1,F.AddOriginalElement(d,f+1),N=x-1-n),P>=0&&(l=this.m_forwardHistory[P],n=l[0],R=1,M=l.length-1)}while(--P>=-1);if(I=F.getReverseChanges(),E[0]){let x=C[0]+1,W=p[0]+1;if(I!==null&&I.length>0){const U=I[I.length-1];x=Math.max(x,U.getOriginalEnd()),W=Math.max(W,U.getModifiedEnd())}T=[new S.DiffChange(x,u-x+1,W,v-W+1)]}else{F=new _,R=c,M=g,N=C[0]-p[0]-o,A=1073741824,P=L?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const x=N+r;x===R||x<M&&a[x-1]>=a[x+1]?(d=a[x+1]-1,f=d-N-o,d>A&&F.MarkNextChange(),A=d+1,F.AddOriginalElement(d+1,f+1),N=x+1-r):(d=a[x-1],f=d-N-o,d>A&&F.MarkNextChange(),A=d,F.AddModifiedElement(d+1,f+1),N=x-1-r),P>=0&&(a=this.m_reverseHistory[P],r=a[0],R=1,M=a.length-1)}while(--P>=-1);T=F.getChanges()}return this.ConcatenateChanges(I,T)}ComputeRecursionPoint(n,t,i,s,r,c,g){let o=0,l=0,a=0,d=0,u=0,C=0;n--,i--,r[0]=0,c[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-n+(s-i),v=f+1,p=new Int32Array(v),L=new Int32Array(v),E=s-i,I=t-n,T=n-i,F=t-s,M=(I-E)%2===0;p[E]=n,L[I]=t,g[0]=!1;for(let N=1;N<=f/2+1;N++){let A=0,P=0;a=this.ClipDiagonalBound(E-N,N,E,v),d=this.ClipDiagonalBound(E+N,N,E,v);for(let W=a;W<=d;W+=2){W===a||W<d&&p[W-1]<p[W+1]?o=p[W+1]:o=p[W-1]+1,l=o-(W-E)-T;const U=o;for(;o<t&&l<s&&this.ElementsAreEqual(o+1,l+1);)o++,l++;if(p[W]=o,o+l>A+P&&(A=o,P=l),!M&&Math.abs(W-I)<=N-1&&o>=L[W])return r[0]=o,c[0]=l,U<=L[W]&&1447>0&&N<=1447+1?this.WALKTRACE(E,a,d,T,I,u,C,F,p,L,o,t,r,l,s,c,M,g):null}const x=(A-n+(P-i)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(A,x))return g[0]=!0,r[0]=A,c[0]=P,x>0&&1447>0&&N<=1447+1?this.WALKTRACE(E,a,d,T,I,u,C,F,p,L,o,t,r,l,s,c,M,g):(n++,i++,[new S.DiffChange(n,t-n+1,i,s-i+1)]);u=this.ClipDiagonalBound(I-N,N,I,v),C=this.ClipDiagonalBound(I+N,N,I,v);for(let W=u;W<=C;W+=2){W===u||W<C&&L[W-1]>=L[W+1]?o=L[W+1]-1:o=L[W-1],l=o-(W-I)-F;const U=o;for(;o>n&&l>i&&this.ElementsAreEqual(o,l);)o--,l--;if(L[W]=o,M&&Math.abs(W-E)<=N&&o<=p[W])return r[0]=o,c[0]=l,U>=p[W]&&1447>0&&N<=1447+1?this.WALKTRACE(E,a,d,T,I,u,C,F,p,L,o,t,r,l,s,c,M,g):null}if(N<=1447){let W=new Int32Array(d-a+2);W[0]=E-a+1,b.Copy2(p,a,W,1,d-a+1),this.m_forwardHistory.push(W),W=new Int32Array(C-u+2),W[0]=I-u+1,b.Copy2(L,u,W,1,C-u+1),this.m_reverseHistory.push(W)}}return this.WALKTRACE(E,a,d,T,I,u,C,F,p,L,o,t,r,l,s,c,M,g)}PrettifyChanges(n){for(let t=0;t<n.length;t++){const i=n[t],s=t<n.length-1?n[t+1].originalStart:this._originalElementsOrHash.length,r=t<n.length-1?n[t+1].modifiedStart:this._modifiedElementsOrHash.length,c=i.originalLength>0,g=i.modifiedLength>0;for(;i.originalStart+i.originalLength<s&&i.modifiedStart+i.modifiedLength<r&&(!c||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!g||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const l=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!l)break;i.originalStart++,i.modifiedStart++}const o=[null];if(t<n.length-1&&this.ChangesOverlap(n[t],n[t+1],o)){n[t]=o[0],n.splice(t+1,1),t--;continue}}for(let t=n.length-1;t>=0;t--){const i=n[t];let s=0,r=0;if(t>0){const d=n[t-1];s=d.originalStart+d.originalLength,r=d.modifiedStart+d.modifiedLength}const c=i.originalLength>0,g=i.modifiedLength>0;let o=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let d=1;;d++){const u=i.originalStart-d,C=i.modifiedStart-d;if(u<s||C<r||c&&!this.OriginalElementsAreEqual(u,u+i.originalLength)||g&&!this.ModifiedElementsAreEqual(C,C+i.modifiedLength))break;const v=(u===s&&C===r?5:0)+this._boundaryScore(u,i.originalLength,C,i.modifiedLength);v>l&&(l=v,o=d)}i.originalStart-=o,i.modifiedStart-=o;const a=[null];if(t>0&&this.ChangesOverlap(n[t-1],n[t],a)){n[t-1]=a[0],n.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,i=n.length;t<i;t++){const s=n[t-1],r=n[t],c=r.originalStart-s.originalStart-s.originalLength,g=s.originalStart,o=r.originalStart+r.originalLength,l=o-g,a=s.modifiedStart,d=r.modifiedStart+r.modifiedLength,u=d-a;if(c<5&&l<20&&u<20){const C=this._findBetterContiguousSequence(g,l,a,u,c);if(C){const[f,v]=C;(f!==s.originalStart+s.originalLength||v!==s.modifiedStart+s.modifiedLength)&&(s.originalLength=f-s.originalStart,s.modifiedLength=v-s.modifiedStart,r.originalStart=f+c,r.modifiedStart=v+c,r.originalLength=o-r.originalStart,r.modifiedLength=d-r.modifiedStart)}}}return n}_findBetterContiguousSequence(n,t,i,s,r){if(t<r||s<r)return null;const c=n+t-r+1,g=i+s-r+1;let o=0,l=0,a=0;for(let d=n;d<c;d++)for(let u=i;u<g;u++){const C=this._contiguousSequenceScore(d,u,r);C>0&&C>o&&(o=C,l=d,a=u)}return o>0?[l,a]:null}_contiguousSequenceScore(n,t,i){let s=0;for(let r=0;r<i;r++){if(!this.ElementsAreEqual(n+r,t+r))return 0;s+=this._originalStringElements[n+r].length}return s}_OriginalIsBoundary(n){return n<=0||n>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\\s*$/.test(this._originalStringElements[n])}_OriginalRegionIsBoundary(n,t){if(this._OriginalIsBoundary(n)||this._OriginalIsBoundary(n-1))return!0;if(t>0){const i=n+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(n){return n<=0||n>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\\s*$/.test(this._modifiedStringElements[n])}_ModifiedRegionIsBoundary(n,t){if(this._ModifiedIsBoundary(n)||this._ModifiedIsBoundary(n-1))return!0;if(t>0){const i=n+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(n,t,i,s){const r=this._OriginalRegionIsBoundary(n,t)?1:0,c=this._ModifiedRegionIsBoundary(i,s)?1:0;return r+c}ConcatenateChanges(n,t){const i=[];if(n.length===0||t.length===0)return t.length>0?t:n;if(this.ChangesOverlap(n[n.length-1],t[0],i)){const s=new Array(n.length+t.length-1);return b.Copy(n,0,s,0,n.length-1),s[n.length-1]=i[0],b.Copy(t,1,s,n.length,t.length-1),s}else{const s=new Array(n.length+t.length);return b.Copy(n,0,s,0,n.length),b.Copy(t,0,s,n.length,t.length),s}}ChangesOverlap(n,t,i){if(w.Assert(n.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),w.Assert(n.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),n.originalStart+n.originalLength>=t.originalStart||n.modifiedStart+n.modifiedLength>=t.modifiedStart){const s=n.originalStart;let r=n.originalLength;const c=n.modifiedStart;let g=n.modifiedLength;return n.originalStart+n.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-n.originalStart),n.modifiedStart+n.modifiedLength>=t.modifiedStart&&(g=t.modifiedStart+t.modifiedLength-n.modifiedStart),i[0]=new S.DiffChange(s,r,c,g),!0}else return i[0]=null,!1}ClipDiagonalBound(n,t,i,s){if(n>=0&&n<s)return n;const r=i,c=s-i-1,g=t%2===0;if(n<0){const o=r%2===0;return g===o?0:1}else{const o=c%2===0;return g===o?s-1:s-2}}}e.LcsDiff=h}),define(J[360],ee([1,0,9]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function k(w,b){if(w&&w[0]!==""){const _=y(w,b,"-"),h=y(w,b,"_");return _&&!h?D(w,b,"-"):!_&&h?D(w,b,"_"):w[0].toUpperCase()===w[0]?b.toUpperCase():w[0].toLowerCase()===w[0]?b.toLowerCase():S.containsUppercaseCharacter(w[0][0])&&b.length>0?b[0].toUpperCase()+b.substr(1):w[0][0].toUpperCase()!==w[0][0]&&b.length>0?b[0].toLowerCase()+b.substr(1):b}else return b}e.buildReplaceStringWithCasePreserved=k;function y(w,b,_){return w[0].indexOf(_)!==-1&&b.indexOf(_)!==-1&&w[0].split(_).length===b.split(_).length}function D(w,b,_){const h=b.split(_),m=w[0].split(_);let n="";return h.forEach((t,i)=>{n+=k([m[i]],t)+_}),n.slice(0,-1)}}),define(J[102],ee([1,0,9]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var k;(function(y){y[y.Ignore=0]="Ignore",y[y.Info=1]="Info",y[y.Warning=2]="Warning",y[y.Error=3]="Error"})(k||(k={})),function(y){const D="error",w="warning",b="warn",_="info",h="ignore";function m(t){return t?S.equalsIgnoreCase(D,t)?y.Error:S.equalsIgnoreCase(w,t)||S.equalsIgnoreCase(b,t)?y.Warning:S.equalsIgnoreCase(_,t)?y.Info:y.Ignore:y.Ignore}y.fromValue=m;function n(t){switch(t){case y.Error:return D;case y.Warning:return w;case y.Info:return _;default:return h}}y.toString=n}(k||(k={})),e.default=k}),define(J[244],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(J[185],ee([1,0,9]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class k{constructor(){this._value="",this._pos=0}reset(m){return this._value=m,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(m){const n=m.charCodeAt(0),t=this._value.charCodeAt(this._pos);return n-t}value(){return this._value[this._pos]}}e.StringIterator=k;class y{constructor(m=!0){this._caseSensitive=m}reset(m){return this._value=m,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let m=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(m)this._from++;else break;else m=!1;return this}cmp(m){return this._caseSensitive?(0,S.compareSubstring)(m,this._value,0,m.length,this._from,this._to):(0,S.compareSubstringIgnoreCase)(m,this._value,0,m.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=y;class D{constructor(m=!0,n=!0){this._splitOnBackslash=m,this._caseSensitive=n}reset(m){this._from=0,this._to=0,this._value=m,this._valueLen=m.length;for(let n=m.length-1;n>=0;n--,this._valueLen--){const t=this._value.charCodeAt(n);if(!(t===47||this._splitOnBackslash&&t===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let m=!0;for(;this._to<this._valueLen;this._to++){const n=this._value.charCodeAt(this._to);if(n===47||this._splitOnBackslash&&n===92)if(m)this._from++;else break;else m=!1}return this}cmp(m){return this._caseSensitive?(0,S.compareSubstring)(m,this._value,0,m.length,this._from,this._to):(0,S.compareSubstringIgnoreCase)(m,this._value,0,m.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=D;class w{constructor(m,n){this._ignorePathCasing=m,this._ignoreQueryAndFragment=n,this._states=[],this._stateIdx=0}reset(m){return this._value=m,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new D(!1,!this._ignorePathCasing(m)),this._pathIterator.reset(m.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(m)||(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(m){if(this._states[this._stateIdx]===1)return(0,S.compareIgnoreCase)(m,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,S.compareIgnoreCase)(m,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(m);if(this._states[this._stateIdx]===4)return(0,S.compare)(m,this._value.query);if(this._states[this._stateIdx]===5)return(0,S.compare)(m,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=w;class b{constructor(){this.height=1}rotateLeft(){const m=this.right;return this.right=m.left,m.left=this,this.updateHeight(),m.updateHeight(),m}rotateRight(){const m=this.left;return this.left=m.right,m.right=this,this.updateHeight(),m.updateHeight(),m}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var m,n;return(n=(m=this.left)===null||m===void 0?void 0:m.height)!==null&&n!==void 0?n:0}get heightRight(){var m,n;return(n=(m=this.right)===null||m===void 0?void 0:m.height)!==null&&n!==void 0?n:0}}class _{static forUris(m=()=>!1,n=()=>!1){return new _(new w(m,n))}static forStrings(){return new _(new k)}static forConfigKeys(){return new _(new y)}constructor(m){this._iter=m}clear(){this._root=void 0}set(m,n){const t=this._iter.reset(m);let i;this._root||(this._root=new b,this._root.segment=t.value());const s=[];for(i=this._root;;){const c=t.cmp(i.segment);if(c>0)i.left||(i.left=new b,i.left.segment=t.value()),s.push([-1,i]),i=i.left;else if(c<0)i.right||(i.right=new b,i.right.segment=t.value()),s.push([1,i]),i=i.right;else if(t.hasNext())t.next(),i.mid||(i.mid=new b,i.mid.segment=t.value()),s.push([0,i]),i=i.mid;else break}const r=i.value;i.value=n,i.key=m;for(let c=s.length-1;c>=0;c--){const g=s[c][1];g.updateHeight();const o=g.balanceFactor();if(o<-1||o>1){const l=s[c][0],a=s[c+1][0];if(l===1&&a===1)s[c][1]=g.rotateLeft();else if(l===-1&&a===-1)s[c][1]=g.rotateRight();else if(l===1&&a===-1)g.right=s[c+1][1]=s[c+1][1].rotateRight(),s[c][1]=g.rotateLeft();else if(l===-1&&a===1)g.left=s[c+1][1]=s[c+1][1].rotateLeft(),s[c][1]=g.rotateRight();else throw new Error;if(c>0)switch(s[c-1][0]){case-1:s[c-1][1].left=s[c][1];break;case 1:s[c-1][1].right=s[c][1];break;case 0:s[c-1][1].mid=s[c][1];break}else this._root=s[0][1]}}return r}get(m){var n;return(n=this._getNode(m))===null||n===void 0?void 0:n.value}_getNode(m){const n=this._iter.reset(m);let t=this._root;for(;t;){const i=n.cmp(t.segment);if(i>0)t=t.left;else if(i<0)t=t.right;else if(n.hasNext())n.next(),t=t.mid;else break}return t}has(m){const n=this._getNode(m);return!(n?.value===void 0&&n?.mid===void 0)}delete(m){return this._delete(m,!1)}deleteSuperstr(m){return this._delete(m,!0)}_delete(m,n){var t;const i=this._iter.reset(m),s=[];let r=this._root;for(;r;){const c=i.cmp(r.segment);if(c>0)s.push([-1,r]),r=r.left;else if(c<0)s.push([1,r]),r=r.right;else if(i.hasNext())i.next(),s.push([0,r]),r=r.mid;else break}if(r){if(n?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const c=this._min(r.right);if(c.key){const{key:g,value:o,segment:l}=c;this._delete(c.key,!1),r.key=g,r.value=o,r.segment=l}}else{const c=(t=r.left)!==null&&t!==void 0?t:r.right;if(s.length>0){const[g,o]=s[s.length-1];switch(g){case-1:o.left=c;break;case 0:o.mid=c;break;case 1:o.right=c;break}}else this._root=c}for(let c=s.length-1;c>=0;c--){const g=s[c][1];g.updateHeight();const o=g.balanceFactor();if(o>1?(g.right.balanceFactor()>=0||(g.right=g.right.rotateRight()),s[c][1]=g.rotateLeft()):o<-1&&(g.left.balanceFactor()<=0||(g.left=g.left.rotateLeft()),s[c][1]=g.rotateRight()),c>0)switch(s[c-1][0]){case-1:s[c-1][1].left=s[c][1];break;case 1:s[c-1][1].right=s[c][1];break;case 0:s[c-1][1].mid=s[c][1];break}else this._root=s[0][1]}}}_min(m){for(;m.left;)m=m.left;return m}findSubstr(m){const n=this._iter.reset(m);let t=this._root,i;for(;t;){const s=n.cmp(t.segment);if(s>0)t=t.left;else if(s<0)t=t.right;else if(n.hasNext())n.next(),i=t.value||i,t=t.mid;else break}return t&&t.value||i}findSuperstr(m){return this._findSuperstrOrElement(m,!1)}_findSuperstrOrElement(m,n){const t=this._iter.reset(m);let i=this._root;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):n?i.value:void 0}}forEach(m){for(const[n,t]of this)m(t,n)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(m){const n=[];return this._dfsEntries(m,n),n[Symbol.iterator]()}_dfsEntries(m,n){m&&(m.left&&this._dfsEntries(m.left,n),m.value&&n.push([m.key,m.value]),m.mid&&this._dfsEntries(m.mid,n),m.right&&this._dfsEntries(m.right,n))}}e.TernarySearchTree=_}),define(J[18],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withNullAsUndefined=e.validateConstraint=e.validateConstraints=e.isFunction=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isString=void 0;function S(g){return typeof g=="string"}e.isString=S;function k(g){return typeof g=="object"&&g!==null&&!Array.isArray(g)&&!(g instanceof RegExp)&&!(g instanceof Date)}e.isObject=k;function y(g){const o=Object.getPrototypeOf(Uint8Array);return typeof g=="object"&&g instanceof o}e.isTypedArray=y;function D(g){return typeof g=="number"&&!isNaN(g)}e.isNumber=D;function w(g){return!!g&&typeof g[Symbol.iterator]=="function"}e.isIterable=w;function b(g){return g===!0||g===!1}e.isBoolean=b;function _(g){return typeof g>"u"}e.isUndefined=_;function h(g){return!m(g)}e.isDefined=h;function m(g){return _(g)||g===null}e.isUndefinedOrNull=m;function n(g,o){if(!g)throw new Error(o?`Unexpected type, expected \'${o}\'`:"Unexpected type")}e.assertType=n;function t(g){if(m(g))throw new Error("Assertion Failed: argument is undefined or null");return g}e.assertIsDefined=t;function i(g){return typeof g=="function"}e.isFunction=i;function s(g,o){const l=Math.min(g.length,o.length);for(let a=0;a<l;a++)r(g[a],o[a])}e.validateConstraints=s;function r(g,o){if(S(o)){if(typeof g!==o)throw new Error(`argument does not match constraint: typeof ${o}`)}else if(i(o)){try{if(g instanceof o)return}catch{}if(!m(g)&&g.constructor===o||o.length===1&&o.call(void 0,g)===!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=r;function c(g){return g===null?void 0:g}e.withNullAsUndefined=c}),define(J[29],ee([1,0,18]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Codicon=e.getCodiconFontCharacters=void 0;const k=Object.create(null);function y(w,b){if((0,S.isString)(b)){const _=k[b];if(_===void 0)throw new Error(`${w} references an unknown codicon: ${b}`);b=_}return k[w]=b,{id:w}}function D(){return k}e.getCodiconFontCharacters=D,e.Codicon={add:y("add",6e4),plus:y("plus",6e4),gistNew:y("gist-new",6e4),repoCreate:y("repo-create",6e4),lightbulb:y("lightbulb",60001),lightBulb:y("light-bulb",60001),repo:y("repo",60002),repoDelete:y("repo-delete",60002),gistFork:y("gist-fork",60003),repoForked:y("repo-forked",60003),gitPullRequest:y("git-pull-request",60004),gitPullRequestAbandoned:y("git-pull-request-abandoned",60004),recordKeys:y("record-keys",60005),keyboard:y("keyboard",60005),tag:y("tag",60006),tagAdd:y("tag-add",60006),tagRemove:y("tag-remove",60006),person:y("person",60007),personFollow:y("person-follow",60007),personOutline:y("person-outline",60007),personFilled:y("person-filled",60007),gitBranch:y("git-branch",60008),gitBranchCreate:y("git-branch-create",60008),gitBranchDelete:y("git-branch-delete",60008),sourceControl:y("source-control",60008),mirror:y("mirror",60009),mirrorPublic:y("mirror-public",60009),star:y("star",60010),starAdd:y("star-add",60010),starDelete:y("star-delete",60010),starEmpty:y("star-empty",60010),comment:y("comment",60011),commentAdd:y("comment-add",60011),alert:y("alert",60012),warning:y("warning",60012),search:y("search",60013),searchSave:y("search-save",60013),logOut:y("log-out",60014),signOut:y("sign-out",60014),logIn:y("log-in",60015),signIn:y("sign-in",60015),eye:y("eye",60016),eyeUnwatch:y("eye-unwatch",60016),eyeWatch:y("eye-watch",60016),circleFilled:y("circle-filled",60017),primitiveDot:y("primitive-dot",60017),closeDirty:y("close-dirty",60017),debugBreakpoint:y("debug-breakpoint",60017),debugBreakpointDisabled:y("debug-breakpoint-disabled",60017),debugHint:y("debug-hint",60017),primitiveSquare:y("primitive-square",60018),edit:y("edit",60019),pencil:y("pencil",60019),info:y("info",60020),issueOpened:y("issue-opened",60020),gistPrivate:y("gist-private",60021),gitForkPrivate:y("git-fork-private",60021),lock:y("lock",60021),mirrorPrivate:y("mirror-private",60021),close:y("close",60022),removeClose:y("remove-close",60022),x:y("x",60022),repoSync:y("repo-sync",60023),sync:y("sync",60023),clone:y("clone",60024),desktopDownload:y("desktop-download",60024),beaker:y("beaker",60025),microscope:y("microscope",60025),vm:y("vm",60026),deviceDesktop:y("device-desktop",60026),file:y("file",60027),fileText:y("file-text",60027),more:y("more",60028),ellipsis:y("ellipsis",60028),kebabHorizontal:y("kebab-horizontal",60028),mailReply:y("mail-reply",60029),reply:y("reply",60029),organization:y("organization",60030),organizationFilled:y("organization-filled",60030),organizationOutline:y("organization-outline",60030),newFile:y("new-file",60031),fileAdd:y("file-add",60031),newFolder:y("new-folder",60032),fileDirectoryCreate:y("file-directory-create",60032),trash:y("trash",60033),trashcan:y("trashcan",60033),history:y("history",60034),clock:y("clock",60034),folder:y("folder",60035),fileDirectory:y("file-directory",60035),symbolFolder:y("symbol-folder",60035),logoGithub:y("logo-github",60036),markGithub:y("mark-github",60036),github:y("github",60036),terminal:y("terminal",60037),console:y("console",60037),repl:y("repl",60037),zap:y("zap",60038),symbolEvent:y("symbol-event",60038),error:y("error",60039),stop:y("stop",60039),variable:y("variable",60040),symbolVariable:y("symbol-variable",60040),array:y("array",60042),symbolArray:y("symbol-array",60042),symbolModule:y("symbol-module",60043),symbolPackage:y("symbol-package",60043),symbolNamespace:y("symbol-namespace",60043),symbolObject:y("symbol-object",60043),symbolMethod:y("symbol-method",60044),symbolFunction:y("symbol-function",60044),symbolConstructor:y("symbol-constructor",60044),symbolBoolean:y("symbol-boolean",60047),symbolNull:y("symbol-null",60047),symbolNumeric:y("symbol-numeric",60048),symbolNumber:y("symbol-number",60048),symbolStructure:y("symbol-structure",60049),symbolStruct:y("symbol-struct",60049),symbolParameter:y("symbol-parameter",60050),symbolTypeParameter:y("symbol-type-parameter",60050),symbolKey:y("symbol-key",60051),symbolText:y("symbol-text",60051),symbolReference:y("symbol-reference",60052),goToFile:y("go-to-file",60052),symbolEnum:y("symbol-enum",60053),symbolValue:y("symbol-value",60053),symbolRuler:y("symbol-ruler",60054),symbolUnit:y("symbol-unit",60054),activateBreakpoints:y("activate-breakpoints",60055),archive:y("archive",60056),arrowBoth:y("arrow-both",60057),arrowDown:y("arrow-down",60058),arrowLeft:y("arrow-left",60059),arrowRight:y("arrow-right",60060),arrowSmallDown:y("arrow-small-down",60061),arrowSmallLeft:y("arrow-small-left",60062),arrowSmallRight:y("arrow-small-right",60063),arrowSmallUp:y("arrow-small-up",60064),arrowUp:y("arrow-up",60065),bell:y("bell",60066),bold:y("bold",60067),book:y("book",60068),bookmark:y("bookmark",60069),debugBreakpointConditionalUnverified:y("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:y("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:y("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:y("debug-breakpoint-data-unverified",60072),debugBreakpointData:y("debug-breakpoint-data",60073),debugBreakpointDataDisabled:y("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:y("debug-breakpoint-log-unverified",60074),debugBreakpointLog:y("debug-breakpoint-log",60075),debugBreakpointLogDisabled:y("debug-breakpoint-log-disabled",60075),briefcase:y("briefcase",60076),broadcast:y("broadcast",60077),browser:y("browser",60078),bug:y("bug",60079),calendar:y("calendar",60080),caseSensitive:y("case-sensitive",60081),check:y("check",60082),checklist:y("checklist",60083),chevronDown:y("chevron-down",60084),dropDownButton:y("drop-down-button",60084),chevronLeft:y("chevron-left",60085),chevronRight:y("chevron-right",60086),chevronUp:y("chevron-up",60087),chromeClose:y("chrome-close",60088),chromeMaximize:y("chrome-maximize",60089),chromeMinimize:y("chrome-minimize",60090),chromeRestore:y("chrome-restore",60091),circle:y("circle",60092),circleOutline:y("circle-outline",60092),debugBreakpointUnverified:y("debug-breakpoint-unverified",60092),circleSlash:y("circle-slash",60093),circuitBoard:y("circuit-board",60094),clearAll:y("clear-all",60095),clippy:y("clippy",60096),closeAll:y("close-all",60097),cloudDownload:y("cloud-download",60098),cloudUpload:y("cloud-upload",60099),code:y("code",60100),collapseAll:y("collapse-all",60101),colorMode:y("color-mode",60102),commentDiscussion:y("comment-discussion",60103),compareChanges:y("compare-changes",60157),creditCard:y("credit-card",60105),dash:y("dash",60108),dashboard:y("dashboard",60109),database:y("database",60110),debugContinue:y("debug-continue",60111),debugDisconnect:y("debug-disconnect",60112),debugPause:y("debug-pause",60113),debugRestart:y("debug-restart",60114),debugStart:y("debug-start",60115),debugStepInto:y("debug-step-into",60116),debugStepOut:y("debug-step-out",60117),debugStepOver:y("debug-step-over",60118),debugStop:y("debug-stop",60119),debug:y("debug",60120),deviceCameraVideo:y("device-camera-video",60121),deviceCamera:y("device-camera",60122),deviceMobile:y("device-mobile",60123),diffAdded:y("diff-added",60124),diffIgnored:y("diff-ignored",60125),diffModified:y("diff-modified",60126),diffRemoved:y("diff-removed",60127),diffRenamed:y("diff-renamed",60128),diff:y("diff",60129),discard:y("discard",60130),editorLayout:y("editor-layout",60131),emptyWindow:y("empty-window",60132),exclude:y("exclude",60133),extensions:y("extensions",60134),eyeClosed:y("eye-closed",60135),fileBinary:y("file-binary",60136),fileCode:y("file-code",60137),fileMedia:y("file-media",60138),filePdf:y("file-pdf",60139),fileSubmodule:y("file-submodule",60140),fileSymlinkDirectory:y("file-symlink-directory",60141),fileSymlinkFile:y("file-symlink-file",60142),fileZip:y("file-zip",60143),files:y("files",60144),filter:y("filter",60145),flame:y("flame",60146),foldDown:y("fold-down",60147),foldUp:y("fold-up",60148),fold:y("fold",60149),folderActive:y("folder-active",60150),folderOpened:y("folder-opened",60151),gear:y("gear",60152),gift:y("gift",60153),gistSecret:y("gist-secret",60154),gist:y("gist",60155),gitCommit:y("git-commit",60156),gitCompare:y("git-compare",60157),gitMerge:y("git-merge",60158),githubAction:y("github-action",60159),githubAlt:y("github-alt",60160),globe:y("globe",60161),grabber:y("grabber",60162),graph:y("graph",60163),gripper:y("gripper",60164),heart:y("heart",60165),home:y("home",60166),horizontalRule:y("horizontal-rule",60167),hubot:y("hubot",60168),inbox:y("inbox",60169),issueClosed:y("issue-closed",60324),issueReopened:y("issue-reopened",60171),issues:y("issues",60172),italic:y("italic",60173),jersey:y("jersey",60174),json:y("json",60175),bracket:y("bracket",60175),kebabVertical:y("kebab-vertical",60176),key:y("key",60177),law:y("law",60178),lightbulbAutofix:y("lightbulb-autofix",60179),linkExternal:y("link-external",60180),link:y("link",60181),listOrdered:y("list-ordered",60182),listUnordered:y("list-unordered",60183),liveShare:y("live-share",60184),loading:y("loading",60185),location:y("location",60186),mailRead:y("mail-read",60187),mail:y("mail",60188),markdown:y("markdown",60189),megaphone:y("megaphone",60190),mention:y("mention",60191),milestone:y("milestone",60192),mortarBoard:y("mortar-board",60193),move:y("move",60194),multipleWindows:y("multiple-windows",60195),mute:y("mute",60196),noNewline:y("no-newline",60197),note:y("note",60198),octoface:y("octoface",60199),openPreview:y("open-preview",60200),package_:y("package",60201),paintcan:y("paintcan",60202),pin:y("pin",60203),play:y("play",60204),run:y("run",60204),plug:y("plug",60205),preserveCase:y("preserve-case",60206),preview:y("preview",60207),project:y("project",60208),pulse:y("pulse",60209),question:y("question",60210),quote:y("quote",60211),radioTower:y("radio-tower",60212),reactions:y("reactions",60213),references:y("references",60214),refresh:y("refresh",60215),regex:y("regex",60216),remoteExplorer:y("remote-explorer",60217),remote:y("remote",60218),remove:y("remove",60219),replaceAll:y("replace-all",60220),replace:y("replace",60221),repoClone:y("repo-clone",60222),repoForcePush:y("repo-force-push",60223),repoPull:y("repo-pull",60224),repoPush:y("repo-push",60225),report:y("report",60226),requestChanges:y("request-changes",60227),rocket:y("rocket",60228),rootFolderOpened:y("root-folder-opened",60229),rootFolder:y("root-folder",60230),rss:y("rss",60231),ruby:y("ruby",60232),saveAll:y("save-all",60233),saveAs:y("save-as",60234),save:y("save",60235),screenFull:y("screen-full",60236),screenNormal:y("screen-normal",60237),searchStop:y("search-stop",60238),server:y("server",60240),settingsGear:y("settings-gear",60241),settings:y("settings",60242),shield:y("shield",60243),smiley:y("smiley",60244),sortPrecedence:y("sort-precedence",60245),splitHorizontal:y("split-horizontal",60246),splitVertical:y("split-vertical",60247),squirrel:y("squirrel",60248),starFull:y("star-full",60249),starHalf:y("star-half",60250),symbolClass:y("symbol-class",60251),symbolColor:y("symbol-color",60252),symbolCustomColor:y("symbol-customcolor",60252),symbolConstant:y("symbol-constant",60253),symbolEnumMember:y("symbol-enum-member",60254),symbolField:y("symbol-field",60255),symbolFile:y("symbol-file",60256),symbolInterface:y("symbol-interface",60257),symbolKeyword:y("symbol-keyword",60258),symbolMisc:y("symbol-misc",60259),symbolOperator:y("symbol-operator",60260),symbolProperty:y("symbol-property",60261),wrench:y("wrench",60261),wrenchSubaction:y("wrench-subaction",60261),symbolSnippet:y("symbol-snippet",60262),tasklist:y("tasklist",60263),telescope:y("telescope",60264),textSize:y("text-size",60265),threeBars:y("three-bars",60266),thumbsdown:y("thumbsdown",60267),thumbsup:y("thumbsup",60268),tools:y("tools",60269),triangleDown:y("triangle-down",60270),triangleLeft:y("triangle-left",60271),triangleRight:y("triangle-right",60272),triangleUp:y("triangle-up",60273),twitter:y("twitter",60274),unfold:y("unfold",60275),unlock:y("unlock",60276),unmute:y("unmute",60277),unverified:y("unverified",60278),verified:y("verified",60279),versions:y("versions",60280),vmActive:y("vm-active",60281),vmOutline:y("vm-outline",60282),vmRunning:y("vm-running",60283),watch:y("watch",60284),whitespace:y("whitespace",60285),wholeWord:y("whole-word",60286),window:y("window",60287),wordWrap:y("word-wrap",60288),zoomIn:y("zoom-in",60289),zoomOut:y("zoom-out",60290),listFilter:y("list-filter",60291),listFlat:y("list-flat",60292),listSelection:y("list-selection",60293),selection:y("selection",60293),listTree:y("list-tree",60294),debugBreakpointFunctionUnverified:y("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:y("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:y("debug-breakpoint-function-disabled",60296),debugStackframeActive:y("debug-stackframe-active",60297),circleSmallFilled:y("circle-small-filled",60298),debugStackframeDot:y("debug-stackframe-dot",60298),debugStackframe:y("debug-stackframe",60299),debugStackframeFocused:y("debug-stackframe-focused",60299),debugBreakpointUnsupported:y("debug-breakpoint-unsupported",60300),symbolString:y("symbol-string",60301),debugReverseContinue:y("debug-reverse-continue",60302),debugStepBack:y("debug-step-back",60303),debugRestartFrame:y("debug-restart-frame",60304),callIncoming:y("call-incoming",60306),callOutgoing:y("call-outgoing",60307),menu:y("menu",60308),expandAll:y("expand-all",60309),feedback:y("feedback",60310),groupByRefType:y("group-by-ref-type",60311),ungroupByRefType:y("ungroup-by-ref-type",60312),account:y("account",60313),bellDot:y("bell-dot",60314),debugConsole:y("debug-console",60315),library:y("library",60316),output:y("output",60317),runAll:y("run-all",60318),syncIgnored:y("sync-ignored",60319),pinned:y("pinned",60320),githubInverted:y("github-inverted",60321),debugAlt:y("debug-alt",60305),serverProcess:y("server-process",60322),serverEnvironment:y("server-environment",60323),pass:y("pass",60324),stopCircle:y("stop-circle",60325),playCircle:y("play-circle",60326),record:y("record",60327),debugAltSmall:y("debug-alt-small",60328),vmConnect:y("vm-connect",60329),cloud:y("cloud",60330),merge:y("merge",60331),exportIcon:y("export",60332),graphLeft:y("graph-left",60333),magnet:y("magnet",60334),notebook:y("notebook",60335),redo:y("redo",60336),checkAll:y("check-all",60337),pinnedDirty:y("pinned-dirty",60338),passFilled:y("pass-filled",60339),circleLargeFilled:y("circle-large-filled",60340),circleLarge:y("circle-large",60341),circleLargeOutline:y("circle-large-outline",60341),combine:y("combine",60342),gather:y("gather",60342),table:y("table",60343),variableGroup:y("variable-group",60344),typeHierarchy:y("type-hierarchy",60345),typeHierarchySub:y("type-hierarchy-sub",60346),typeHierarchySuper:y("type-hierarchy-super",60347),gitPullRequestCreate:y("git-pull-request-create",60348),runAbove:y("run-above",60349),runBelow:y("run-below",60350),notebookTemplate:y("notebook-template",60351),debugRerun:y("debug-rerun",60352),workspaceTrusted:y("workspace-trusted",60353),workspaceUntrusted:y("workspace-untrusted",60354),workspaceUnspecified:y("workspace-unspecified",60355),terminalCmd:y("terminal-cmd",60356),terminalDebian:y("terminal-debian",60357),terminalLinux:y("terminal-linux",60358),terminalPowershell:y("terminal-powershell",60359),terminalTmux:y("terminal-tmux",60360),terminalUbuntu:y("terminal-ubuntu",60361),terminalBash:y("terminal-bash",60362),arrowSwap:y("arrow-swap",60363),copy:y("copy",60364),personAdd:y("person-add",60365),filterFilled:y("filter-filled",60366),wand:y("wand",60367),debugLineByLine:y("debug-line-by-line",60368),inspect:y("inspect",60369),layers:y("layers",60370),layersDot:y("layers-dot",60371),layersActive:y("layers-active",60372),compass:y("compass",60373),compassDot:y("compass-dot",60374),compassActive:y("compass-active",60375),azure:y("azure",60376),issueDraft:y("issue-draft",60377),gitPullRequestClosed:y("git-pull-request-closed",60378),gitPullRequestDraft:y("git-pull-request-draft",60379),debugAll:y("debug-all",60380),debugCoverage:y("debug-coverage",60381),runErrors:y("run-errors",60382),folderLibrary:y("folder-library",60383),debugContinueSmall:y("debug-continue-small",60384),beakerStop:y("beaker-stop",60385),graphLine:y("graph-line",60386),graphScatter:y("graph-scatter",60387),pieChart:y("pie-chart",60388),bracketDot:y("bracket-dot",60389),bracketError:y("bracket-error",60390),lockSmall:y("lock-small",60391),azureDevops:y("azure-devops",60392),verifiedFilled:y("verified-filled",60393),newLine:y("newline",60394),layout:y("layout",60395),layoutActivitybarLeft:y("layout-activitybar-left",60396),layoutActivitybarRight:y("layout-activitybar-right",60397),layoutPanelLeft:y("layout-panel-left",60398),layoutPanelCenter:y("layout-panel-center",60399),layoutPanelJustify:y("layout-panel-justify",60400),layoutPanelRight:y("layout-panel-right",60401),layoutPanel:y("layout-panel",60402),layoutSidebarLeft:y("layout-sidebar-left",60403),layoutSidebarRight:y("layout-sidebar-right",60404),layoutStatusbar:y("layout-statusbar",60405),layoutMenubar:y("layout-menubar",60406),layoutCentered:y("layout-centered",60407),layoutSidebarRightOff:y("layout-sidebar-right-off",60416),layoutPanelOff:y("layout-panel-off",60417),layoutSidebarLeftOff:y("layout-sidebar-left-off",60418),target:y("target",60408),indent:y("indent",60409),recordSmall:y("record-small",60410),errorSmall:y("error-small",60411),arrowCircleDown:y("arrow-circle-down",60412),arrowCircleLeft:y("arrow-circle-left",60413),arrowCircleRight:y("arrow-circle-right",60414),arrowCircleUp:y("arrow-circle-up",60415),heartFilled:y("heart-filled",60420),map:y("map",60421),mapFilled:y("map-filled",60422),circleSmall:y("circle-small",60423),bellSlash:y("bell-slash",60424),bellSlashDot:y("bell-slash-dot",60425),commentUnresolved:y("comment-unresolved",60426),gitPullRequestGoToChanges:y("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:y("git-pull-request-new-changes",60428),searchFuzzy:y("search-fuzzy",60429),commentDraft:y("comment-draft",60430),send:y("send",60431),sparkle:y("sparkle",60432),insert:y("insert",60433),dialogError:y("dialog-error","error"),dialogWarning:y("dialog-warning","warning"),dialogInfo:y("dialog-info","info"),dialogClose:y("dialog-close","close"),treeItemExpanded:y("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:y("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:y("tree-filter-on-type-off","list-selection"),treeFilterClear:y("tree-filter-clear","close"),treeItemLoading:y("tree-item-loading","loading"),menuSelection:y("menu-selection","check"),menuSubmenu:y("menu-submenu","chevron-right"),menuBarMore:y("menubar-more","more"),scrollbarButtonLeft:y("scrollbar-button-left","triangle-left"),scrollbarButtonRight:y("scrollbar-button-right","triangle-right"),scrollbarButtonUp:y("scrollbar-button-up","triangle-up"),scrollbarButtonDown:y("scrollbar-button-down","triangle-down"),toolBarMore:y("toolbar-more","more"),quickInputBack:y("quick-input-back","arrow-left")}}),define(J[45],ee([1,0,18]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function k(i){if(!i||typeof i!="object"||i instanceof RegExp)return i;const s=Array.isArray(i)?[]:{};return Object.entries(i).forEach(([r,c])=>{s[r]=c&&typeof c=="object"?k(c):c}),s}e.deepClone=k;function y(i){if(!i||typeof i!="object")return i;const s=[i];for(;s.length>0;){const r=s.shift();Object.freeze(r);for(const c in r)if(D.call(r,c)){const g=r[c];typeof g=="object"&&!Object.isFrozen(g)&&!(0,S.isTypedArray)(g)&&s.push(g)}}return i}e.deepFreeze=y;const D=Object.prototype.hasOwnProperty;function w(i,s){return b(i,s,new Set)}e.cloneAndChange=w;function b(i,s,r){if((0,S.isUndefinedOrNull)(i))return i;const c=s(i);if(typeof c<"u")return c;if(Array.isArray(i)){const g=[];for(const o of i)g.push(b(o,s,r));return g}if((0,S.isObject)(i)){if(r.has(i))throw new Error("Cannot clone recursive data-structure");r.add(i);const g={};for(const o in i)D.call(i,o)&&(g[o]=b(i[o],s,r));return r.delete(i),g}return i}function _(i,s,r=!0){return(0,S.isObject)(i)?((0,S.isObject)(s)&&Object.keys(s).forEach(c=>{c in i?r&&((0,S.isObject)(i[c])&&(0,S.isObject)(s[c])?_(i[c],s[c],r):i[c]=s[c]):i[c]=s[c]}),i):s}e.mixin=_;function h(i,s){if(i===s)return!0;if(i==null||s===null||s===void 0||typeof i!=typeof s||typeof i!="object"||Array.isArray(i)!==Array.isArray(s))return!1;let r,c;if(Array.isArray(i)){if(i.length!==s.length)return!1;for(r=0;r<i.length;r++)if(!h(i[r],s[r]))return!1}else{const g=[];for(c in i)g.push(c);g.sort();const o=[];for(c in s)o.push(c);if(o.sort(),!h(g,o))return!1;for(r=0;r<g.length;r++)if(!h(i[g[r]],s[g[r]]))return!1}return!0}e.equals=h;function m(i){let s=[],r=Object.getPrototypeOf(i);for(;Object.prototype!==r;)s=s.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return s}e.getAllPropertyNames=m;function n(i){const s=[];for(const r of m(i))typeof i[r]=="function"&&s.push(r);return s}e.getAllMethodNames=n;function t(i,s){const r=g=>function(){const o=Array.prototype.slice.call(arguments,0);return s(g,o)},c={};for(const g of i)c[g]=r(g);return c}e.createProxyObject=t}),define(J[32],ee([1,0,29]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeIcon=e.ThemeColor=void 0;var k;(function(D){function w(b){return b&&typeof b=="object"&&typeof b.id=="string"}D.isThemeColor=w})(k=e.ThemeColor||(e.ThemeColor={}));var y;(function(D){D.iconNameSegment="[A-Za-z0-9]+",D.iconNameExpression="[A-Za-z0-9-]+",D.iconModifierExpression="~[A-Za-z]+",D.iconNameCharacter="[A-Za-z0-9~-]";const w=new RegExp(`^(${D.iconNameExpression})(${D.iconModifierExpression})?$`);function b(g){const o=w.exec(g.id);if(!o)return b(S.Codicon.error);const[,l,a]=o,d=["codicon","codicon-"+l];return a&&d.push("codicon-modifier-"+a.substring(1)),d}D.asClassNameArray=b;function _(g){return b(g).join(" ")}D.asClassName=_;function h(g){return"."+b(g).join(".")}D.asCSSSelector=h;function m(g){return g&&typeof g=="object"&&typeof g.id=="string"&&(typeof g.color>"u"||k.isThemeColor(g.color))}D.isThemeIcon=m;const n=new RegExp(`^\\\\$\\\\((${D.iconNameExpression}(?:${D.iconModifierExpression})?)\\\\)$`);function t(g){const o=n.exec(g);if(!o)return;const[,l]=o;return{id:l}}D.fromString=t;function i(g){return{id:g}}D.fromId=i;function s(g,o){let l=g.id;const a=l.lastIndexOf("~");return a!==-1&&(l=l.substring(0,a)),o&&(l=`${l}~${o}`),{id:l}}D.modify=s;function r(g){const o=g.id.lastIndexOf("~");if(o!==-1)return g.id.substring(o+1)}D.getModifier=r;function c(g,o){var l,a;return g.id===o.id&&((l=g.color)===null||l===void 0?void 0:l.id)===((a=o.color)===null||a===void 0?void 0:a.id)}D.isEqual=c})(y=e.ThemeIcon||(e.ThemeIcon={}))}),define(J[113],ee([1,0,63,9,32]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.getCodiconAriaLabel=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=void 0;const D="$(",w=new RegExp(`\\\\$\\\\(${y.ThemeIcon.iconNameExpression}(?:${y.ThemeIcon.iconModifierExpression})?\\\\)`,"g"),b=new RegExp(`(\\\\\\\\)?${w.source}`,"g");function _(g){return g.replace(b,(o,l)=>l?o:`\\\\${o}`)}e.escapeIcons=_;const h=new RegExp(`\\\\\\\\${w.source}`,"g");function m(g){return g.replace(h,o=>`\\\\${o}`)}e.markdownEscapeEscapedIcons=m;const n=new RegExp(`(\\\\s)?(\\\\\\\\)?${w.source}(\\\\s)?`,"g");function t(g){return g.indexOf(D)===-1?g:g.replace(n,(o,l,a,d)=>a?o:l||d||"")}e.stripIcons=t;function i(g){return g?g.replace(/\\$\\((.*?)\\)/g,(o,l)=>` ${l} `).trim():""}e.getCodiconAriaLabel=i;const s=new RegExp(`\\\\$\\\\(${y.ThemeIcon.iconNameCharacter}+\\\\)`,"g");function r(g){s.lastIndex=0;let o="";const l=[];let a=0;for(;;){const d=s.lastIndex,u=s.exec(g),C=g.substring(d,u?.index);if(C.length>0){o+=C;for(let f=0;f<C.length;f++)l.push(a)}if(!u)break;a+=u[0].length}return{text:o,iconOffsets:l}}e.parseLabelWithIcons=r;function c(g,o,l=!1){const{text:a,iconOffsets:d}=o;if(!d||d.length===0)return(0,S.matchesFuzzy)(g,a,l);const u=(0,k.ltrim)(a," "),C=a.length-u.length,f=(0,S.matchesFuzzy)(g,u,l);if(f)for(const v of f){const p=d[v.start+C]+C;v.start+=p,v.end+=p}return f}e.matchesFuzzyIconAware=c}),define(J[158],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=void 0;function S(y){return y<0?0:y>255?255:y|0}e.toUint8=S;function k(y){return y<0?0:y>4294967295?4294967295:y|0}e.toUint32=k}),define(J[159],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let S;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?S=crypto.getRandomValues.bind(crypto):S=function(D){for(let w=0;w<D.length;w++)D[w]=Math.floor(Math.random()*256);return D};const k=new Uint8Array(16),y=[];for(let D=0;D<256;D++)y.push(D.toString(16).padStart(2,"0"));return function(){S(k),k[6]=k[6]&15|64,k[8]=k[8]&63|128;let w=0,b="";return b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+="-",b+=y[k[w++]],b+=y[k[w++]],b+="-",b+=y[k[w++]],b+=y[k[w++]],b+="-",b+=y[k[w++]],b+=y[k[w++]],b+="-",b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b+=y[k[w++]],b}}()}),define(J[186],ee([1,0,16,159]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriList=e.VSDataTransfer=e.createFileDataTransferItem=e.createStringDataTransferItem=void 0;function y(b){return{id:(0,k.generateUuid)(),asString:()=>Ee(this,void 0,void 0,function*(){return b}),asFile:()=>{},value:typeof b=="string"?b:void 0}}e.createStringDataTransferItem=y;function D(b,_,h){return{id:(0,k.generateUuid)(),asString:()=>Ee(this,void 0,void 0,function*(){return""}),asFile:()=>({name:b,uri:_,data:h}),value:void 0}}e.createFileDataTransferItem=D;class w{constructor(){this._entries=new Map}get size(){return this._entries.size}has(_){return this._entries.has(this.toKey(_))}get(_){var h;return(h=this._entries.get(this.toKey(_)))===null||h===void 0?void 0:h[0]}append(_,h){const m=this._entries.get(_);m?m.push(h):this._entries.set(this.toKey(_),[h])}replace(_,h){this._entries.set(this.toKey(_),[h])}delete(_){this._entries.delete(this.toKey(_))}*entries(){for(const[_,h]of this._entries.entries())for(const m of h)yield[_,m]}values(){return Array.from(this._entries.values()).flat()}forEach(_){for(const[h,m]of this.entries())_(m,h)}toKey(_){return _.toLowerCase()}}e.VSDataTransfer=w,e.UriList=Object.freeze({create:b=>(0,S.distinct)(b.map(_=>_.toString())).join(`\\r\n`),split:b=>b.split(`\\r\n`),parse:b=>e.UriList.split(b).filter(_=>!_.startsWith("#"))})}),define(J[245],ee([10]),{}),define(J[361],ee([10]),{}),define(J[362],ee([10]),{}),define(J[363],ee([10]),{}),define(J[364],ee([10]),{}),define(J[160],ee([1,0,363,364]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(J[365],ee([10]),{}),define(J[366],ee([10]),{}),define(J[246],ee([10]),{}),define(J[247],ee([10]),{}),define(J[367],ee([10]),{}),define(J[368],ee([10]),{}),define(J[369],ee([10]),{}),define(J[370],ee([10]),{}),define(J[248],ee([10]),{}),define(J[371],ee([10]),{}),define(J[161],ee([1,0,371]),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(J[372],ee([10]),{}),define(J[373],ee([10]),{}),define(J[374],ee([10]),{}),define(J[375],ee([10]),{}),define(J[376],ee([10]),{}),define(J[377],ee([10]),{}),define(J[378],ee([10]),{}),define(J[379],ee([10]),{}),define(J[380],ee([10]),{}),define(J[381],ee([10]),{}),define(J[382],ee([10]),{}),define(J[383],ee([10]),{}),define(J[384],ee([10]),{}),define(J[385],ee([10]),{}),define(J[386],ee([10]),{}),define(J[387],ee([10]),{}),define(J[388],ee([10]),{}),define(J[389],ee([10]),{}),define(J[390],ee([10]),{}),define(J[391],ee([10]),{}),define(J[392],ee([10]),{}),define(J[393],ee([10]),{}),define(J[394],ee([10]),{}),define(J[395],ee([10]),{}),define(J[396],ee([10]),{}),define(J[397],ee([10]),{}),define(J[398],ee([10]),{}),define(J[399],ee([10]),{}),define(J[400],ee([10]),{}),define(J[401],ee([10]),{}),define(J[402],ee([10]),{}),define(J[403],ee([10]),{}),define(J[404],ee([10]),{}),define(J[405],ee([10]),{}),define(J[406],ee([10]),{}),define(J[407],ee([10]),{}),define(J[408],ee([10]),{}),define(J[409],ee([10]),{}),define(J[410],ee([10]),{}),define(J[411],ee([10]),{}),define(J[412],ee([10]),{}),define(J[413],ee([10]),{}),define(J[414],ee([10]),{}),define(J[415],ee([10]),{}),define(J[416],ee([10]),{}),define(J[417],ee([10]),{}),define(J[418],ee([10]),{}),define(J[419],ee([10]),{}),define(J[420],ee([10]),{}),define(J[421],ee([10]),{}),define(J[422],ee([10]),{}),define(J[423],ee([10]),{}),define(J[424],ee([10]),{}),define(J[425],ee([10]),{}),define(J[426],ee([10]),{}),define(J[427],ee([10]),{}),define(J[428],ee([10]),{}),define(J[429],ee([10]),{}),define(J[430],ee([10]),{}),define(J[431],ee([10]),{}),define(J[432],ee([10]),{}),define(J[433],ee([10]),{}),define(J[434],ee([10]),{}),define(J[435],ee([10]),{}),define(J[436],ee([10]),{}),define(J[437],ee([10]),{}),define(J[438],ee([10]),{}),define(J[249],ee([10]),{}),define(J[439],ee([10]),{}),define(J[440],ee([10]),{}),define(J[162],ee([10]),{}),define(J[441],ee([10]),{}),define(J[74],ee([1,0,35]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function k(y,D){y instanceof S.FastDomNode?(y.setFontFamily(D.getMassagedFontFamily()),y.setFontWeight(D.fontWeight),y.setFontSize(D.fontSize),y.setFontFeatureSettings(D.fontFeatureSettings),y.setFontVariationSettings(D.fontVariationSettings),y.setLineHeight(D.lineHeight),y.setLetterSpacing(D.letterSpacing)):(y.style.fontFamily=D.getMassagedFontFamily(),y.style.fontWeight=D.fontWeight,y.style.fontSize=D.fontSize+"px",y.style.fontFeatureSettings=D.fontFeatureSettings,y.style.fontVariationSettings=D.fontVariationSettings,y.style.lineHeight=D.lineHeight+"px",y.style.letterSpacing=D.letterSpacing+"px")}e.applyFontInfo=k}),define(J[442],ee([1,0,74]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=void 0;class k{constructor(b,_){this.chr=b,this.type=_,this.width=0}fulfill(b){this.width=b}}e.CharWidthRequest=k;class y{constructor(b,_){this._bareFontInfo=b,this._requests=_,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 b=document.createElement("div");b.style.position="absolute",b.style.top="-50000px",b.style.width="50000px";const _=document.createElement("div");(0,S.applyFontInfo)(_,this._bareFontInfo),b.appendChild(_);const h=document.createElement("div");(0,S.applyFontInfo)(h,this._bareFontInfo),h.style.fontWeight="bold",b.appendChild(h);const m=document.createElement("div");(0,S.applyFontInfo)(m,this._bareFontInfo),m.style.fontStyle="italic",b.appendChild(m);const n=[];for(const t of this._requests){let i;t.type===0&&(i=_),t.type===2&&(i=h),t.type===1&&(i=m),i.appendChild(document.createElement("br"));const s=document.createElement("span");y._render(s,t),i.appendChild(s),n.push(s)}this._container=b,this._testElements=n}static _render(b,_){if(_.chr===" "){let h="\\xA0";for(let m=0;m<8;m++)h+=h;b.innerText=h}else{let h=_.chr;for(let m=0;m<8;m++)h+=h;b.textContent=h}}_readFromDomElements(){for(let b=0,_=this._requests.length;b<_;b++){const h=this._requests[b],m=this._testElements[b];h.fulfill(m.offsetWidth/256)}}}function D(w,b){new y(w,b).read()}e.readCharWidths=D}),define(J[443],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateOptions=e.EditorSettingMigration=void 0;class S{constructor(_,h){this.key=_,this.migrate=h}apply(_){const h=S._read(_,this.key),m=t=>S._read(_,t),n=(t,i)=>S._write(_,t,i);this.migrate(h,m,n)}static _read(_,h){if(typeof _>"u")return;const m=h.indexOf(".");if(m>=0){const n=h.substring(0,m);return this._read(_[n],h.substring(m+1))}return _[h]}static _write(_,h,m){const n=h.indexOf(".");if(n>=0){const t=h.substring(0,n);_[t]=_[t]||{},this._write(_[t],h.substring(n+1),m);return}_[h]=m}}S.items=[],e.EditorSettingMigration=S;function k(b,_){S.items.push(new S(b,_))}function y(b,_){k(b,(h,m,n)=>{if(typeof h<"u"){for(const[t,i]of _)if(h===t){n(b,i);return}}})}function D(b){S.items.forEach(_=>_.apply(b))}e.migrateOptions=D,y("wordWrap",[[!0,"on"],[!1,"off"]]),y("lineNumbers",[[!0,"on"],[!1,"off"]]),y("cursorBlinking",[["visible","solid"]]),y("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),y("renderLineHighlight",[[!0,"line"],[!1,"none"]]),y("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),y("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),y("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("autoIndent",[[!1,"advanced"],[!0,"full"]]),y("matchBrackets",[[!0,"always"],[!1,"never"]]),y("renderFinalNewline",[[!0,"on"],[!1,"off"]]),y("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),k("autoClosingBrackets",(b,_,h)=>{b===!1&&(h("autoClosingBrackets","never"),typeof _("autoClosingQuotes")>"u"&&h("autoClosingQuotes","never"),typeof _("autoSurround")>"u"&&h("autoSurround","never"))}),k("renderIndentGuides",(b,_,h)=>{typeof b<"u"&&(h("renderIndentGuides",void 0),typeof _("guides.indentation")>"u"&&h("guides.indentation",!!b))}),k("highlightActiveIndentGuide",(b,_,h)=>{typeof b<"u"&&(h("highlightActiveIndentGuide",void 0),typeof _("guides.highlightActiveIndentation")>"u"&&h("guides.highlightActiveIndentation",!!b))});const w={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};k("suggest.filteredTypes",(b,_,h)=>{if(b&&typeof b=="object"){for(const m of Object.entries(w))b[m[0]]===!1&&typeof _(`suggest.${m[1]}`)>"u"&&h(`suggest.${m[1]}`,!1);h("suggest.filteredTypes",void 0)}}),k("quickSuggestions",(b,_,h)=>{if(typeof b=="boolean"){const m=b?"on":"off";h("quickSuggestions",{comments:m,strings:m,other:m})}}),k("experimental.stickyScroll.enabled",(b,_,h)=>{typeof b=="boolean"&&(h("experimental.stickyScroll.enabled",void 0),typeof _("stickyScroll.enabled")>"u"&&h("stickyScroll.enabled",b))}),k("experimental.stickyScroll.maxLineCount",(b,_,h)=>{typeof b=="number"&&(h("experimental.stickyScroll.maxLineCount",void 0),typeof _("stickyScroll.maxLineCount")>"u"&&h("stickyScroll.maxLineCount",b))})}),define(J[114],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class S{static capture(y){let D=null,w=0;if(y.getScrollTop()!==0){const b=y.getVisibleRanges();if(b.length>0){D=b[0].getStartPosition();const _=y.getTopForPosition(D.lineNumber,D.column);w=y.getScrollTop()-_}}return new S(D,w,y.getPosition())}constructor(y,D,w){this._visiblePosition=y,this._visiblePositionScrollDelta=D,this._cursorPosition=w}restore(y){if(this._visiblePosition){const D=y.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);y.setScrollTop(D+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(y){const D=y.getPosition();if(!this._cursorPosition||!D)return;const w=y.getTopForLineNumber(D.lineNumber)-y.getTopForLineNumber(this._cursorPosition.lineNumber);y.setScrollTop(y.getScrollTop()+w)}}e.StableEditorScrollState=S}),define(J[134],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.FloatHorizontalRange=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class S{constructor(m,n){this._restrictedRenderingContextBrand=void 0,this._viewLayout=m,this.viewportData=n,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const t=this._viewLayout.getCurrentViewport();this.scrollTop=t.top,this.scrollLeft=t.left,this.viewportWidth=t.width,this.viewportHeight=t.height}getScrolledTopFromAbsoluteTop(m){return m-this.scrollTop}getVerticalOffsetForLineNumber(m,n){return this._viewLayout.getVerticalOffsetForLineNumber(m,n)}getVerticalOffsetAfterLineNumber(m,n){return this._viewLayout.getVerticalOffsetAfterLineNumber(m,n)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=S;class k extends S{constructor(m,n,t){super(m,n),this._renderingContextBrand=void 0,this._viewLines=t}linesVisibleRangesForRange(m,n){return this._viewLines.linesVisibleRangesForRange(m,n)}visibleRangeForPosition(m){return this._viewLines.visibleRangeForPosition(m)}}e.RenderingContext=k;class y{constructor(m,n,t){this.outsideRenderedLine=m,this.lineNumber=n,this.ranges=t}}e.LineVisibleRanges=y;class D{static from(m){const n=new Array(m.length);for(let t=0,i=m.length;t<i;t++){const s=m[t];n[t]=new D(s.left,s.width)}return n}constructor(m,n){this._horizontalRangeBrand=void 0,this.left=Math.round(m),this.width=Math.round(n)}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=D;class w{constructor(m,n){this._floatHorizontalRangeBrand=void 0,this.left=m,this.width=n}toString(){return`[${this.left},${this.width}]`}static compare(m,n){return m.left-n.left}}e.FloatHorizontalRange=w;class b{constructor(m,n){this.outsideRenderedLine=m,this.originalLeft=n,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=b;class _{constructor(m,n){this.outsideRenderedLine=m,this.ranges=n}}e.VisibleRanges=_}),define(J[250],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class S{constructor(y){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=y}emitKeyDown(y){var D;(D=this.onKeyDown)===null||D===void 0||D.call(this,y)}emitKeyUp(y){var D;(D=this.onKeyUp)===null||D===void 0||D.call(this,y)}emitContextMenu(y){var D;(D=this.onContextMenu)===null||D===void 0||D.call(this,this._convertViewToModelMouseEvent(y))}emitMouseMove(y){var D;(D=this.onMouseMove)===null||D===void 0||D.call(this,this._convertViewToModelMouseEvent(y))}emitMouseLeave(y){var D;(D=this.onMouseLeave)===null||D===void 0||D.call(this,this._convertViewToModelMouseEvent(y))}emitMouseDown(y){var D;(D=this.onMouseDown)===null||D===void 0||D.call(this,this._convertViewToModelMouseEvent(y))}emitMouseUp(y){var D;(D=this.onMouseUp)===null||D===void 0||D.call(this,this._convertViewToModelMouseEvent(y))}emitMouseDrag(y){var D;(D=this.onMouseDrag)===null||D===void 0||D.call(this,this._convertViewToModelMouseEvent(y))}emitMouseDrop(y){var D;(D=this.onMouseDrop)===null||D===void 0||D.call(this,this._convertViewToModelMouseEvent(y))}emitMouseDropCanceled(){var y;(y=this.onMouseDropCanceled)===null||y===void 0||y.call(this)}emitMouseWheel(y){var D;(D=this.onMouseWheel)===null||D===void 0||D.call(this,y)}_convertViewToModelMouseEvent(y){return y.target?{event:y.event,target:this._convertViewToModelMouseTarget(y.target)}:y}_convertViewToModelMouseTarget(y){return S.convertViewToModelMouseTarget(y,this._coordinatesConverter)}static convertViewToModelMouseTarget(y,D){const w=Object.assign({},y);return w.position&&(w.position=D.convertViewPositionToModelPosition(w.position)),w.range&&(w.range=D.convertViewRangeToModelRange(w.range)),w}}e.ViewUserInputEvents=S}),define(J[444],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomReadingContext=void 0;class S{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const y=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=y.left,this._clientRectScale=y.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(y,D){this._domNode=y,this.endNode=D,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}e.DomReadingContext=S}),define(J[445],ee([1,0,134]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class k{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(D,w){D.selectNodeContents(w)}static _readClientRects(D,w,b,_,h){const m=this._createRange();try{return m.setStart(D,w),m.setEnd(b,_),m.getClientRects()}catch{return null}finally{this._detachRange(m,h)}}static _mergeAdjacentRanges(D){if(D.length===1)return D;D.sort(S.FloatHorizontalRange.compare);const w=[];let b=0,_=D[0];for(let h=1,m=D.length;h<m;h++){const n=D[h];_.left+_.width+.9>=n.left?_.width=Math.max(_.width,n.left+n.width-_.left):(w[b++]=_,_=n)}return w[b++]=_,w}static _createHorizontalRangesFromClientRects(D,w,b){if(!D||D.length===0)return null;const _=[];for(let h=0,m=D.length;h<m;h++){const n=D[h];_[h]=new S.FloatHorizontalRange(Math.max(0,(n.left-w)/b),n.width/b)}return this._mergeAdjacentRanges(_)}static readHorizontalRanges(D,w,b,_,h,m){const t=D.children.length-1;if(0>t)return null;if(w=Math.min(t,Math.max(0,w)),_=Math.min(t,Math.max(0,_)),w===_&&b===h&&b===0&&!D.children[w].firstChild){const c=D.children[w].getClientRects();return m.markDidDomLayout(),this._createHorizontalRangesFromClientRects(c,m.clientRectDeltaLeft,m.clientRectScale)}w!==_&&_>0&&h===0&&(_--,h=1073741824);let i=D.children[w].firstChild,s=D.children[_].firstChild;if((!i||!s)&&(!i&&b===0&&w>0&&(i=D.children[w-1].firstChild,b=1073741824),!s&&h===0&&_>0&&(s=D.children[_-1].firstChild,h=1073741824)),!i||!s)return null;b=Math.min(i.textContent.length,Math.max(0,b)),h=Math.min(s.textContent.length,Math.max(0,h));const r=this._readClientRects(i,b,s,h,m.endNode);return m.markDidDomLayout(),this._createHorizontalRangesFromClientRects(r,m.clientRectDeltaLeft,m.clientRectScale)}}e.RangeUtil=k}),define(J[251],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=void 0,e.allCharCodes=(()=>{const k=[];for(let y=32;y<=126;y++)k.push(y);return k.push(65533),k})();const S=(k,y)=>(k-=32,k<0||k>96?y<=2?(k+96)%96:96-1:k);e.getCharIndex=S}),define(J[446],ee([1,0,251,158]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class y{constructor(w,b){this.scale=b,this._minimapCharRendererBrand=void 0,this.charDataNormal=y.soften(w,12/15),this.charDataLight=y.soften(w,50/60)}static soften(w,b){const _=new Uint8ClampedArray(w.length);for(let h=0,m=w.length;h<m;h++)_[h]=(0,k.toUint8)(w[h]*b);return _}renderChar(w,b,_,h,m,n,t,i,s,r,c){const g=1*this.scale,o=2*this.scale,l=c?1:o;if(b+g>w.width||_+l>w.height){console.warn("bad render request outside image data");return}const a=r?this.charDataLight:this.charDataNormal,d=(0,S.getCharIndex)(h,s),u=w.width*4,C=t.r,f=t.g,v=t.b,p=m.r-C,L=m.g-f,E=m.b-v,I=Math.max(n,i),T=w.data;let F=d*g*o,R=_*u+b*4;for(let M=0;M<l;M++){let N=R;for(let A=0;A<g;A++){const P=a[F++]/255*(n/255);T[N++]=C+p*P,T[N++]=f+L*P,T[N++]=v+E*P,T[N++]=I}R+=u}}blockRenderChar(w,b,_,h,m,n,t,i){const s=1*this.scale,r=2*this.scale,c=i?1:r;if(b+s>w.width||_+c>w.height){console.warn("bad render request outside image data");return}const g=w.width*4,o=.5*(m/255),l=n.r,a=n.g,d=n.b,u=h.r-l,C=h.g-a,f=h.b-d,v=l+u*o,p=a+C*o,L=d+f*o,E=Math.max(m,t),I=w.data;let T=_*g+b*4;for(let F=0;F<c;F++){let R=T;for(let M=0;M<s;M++)I[R++]=v,I[R++]=p,I[R++]=L,I[R++]=E;T+=g}}}e.MinimapCharRenderer=y}),define(J[447],ee([1,0,92]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prebakedMiniMaps=void 0;const k={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},y=D=>{const w=new Uint8ClampedArray(D.length/2);for(let b=0;b<D.length;b+=2)w[b>>1]=k[D[b]]<<4|k[D[b+1]]&15;return w};e.prebakedMiniMaps={1:(0,S.once)(()=>y("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,S.once)(()=>y("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(J[448],ee([1,0,446,251,447,158]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class w{static create(_,h){if(this.lastCreated&&_===this.lastCreated.scale&&h===this.lastFontFamily)return this.lastCreated;let m;return y.prebakedMiniMaps[_]?m=new S.MinimapCharRenderer(y.prebakedMiniMaps[_](),_):m=w.createFromSampleData(w.createSampleData(h).data,_),this.lastFontFamily=h,this.lastCreated=m,m}static createSampleData(_){const h=document.createElement("canvas"),m=h.getContext("2d");h.style.height="16px",h.height=16,h.width=96*10,h.style.width=96*10+"px",m.fillStyle="#ffffff",m.font=`bold 16px ${_}`,m.textBaseline="middle";let n=0;for(const t of k.allCharCodes)m.fillText(String.fromCharCode(t),n,16/2),n+=10;return m.getImageData(0,0,96*10,16)}static createFromSampleData(_,h){if(_.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const n=w._downsample(_,h);return new S.MinimapCharRenderer(n,h)}static _downsampleChar(_,h,m,n,t){const i=1*t,s=2*t;let r=n,c=0;for(let g=0;g<s;g++){const o=g/s*16,l=(g+1)/s*16;for(let a=0;a<i;a++){const d=a/i*10,u=(a+1)/i*10;let C=0,f=0;for(let p=o;p<l;p++){const L=h+Math.floor(p)*3840,E=1-(p-Math.floor(p));for(let I=d;I<u;I++){const T=1-(I-Math.floor(I)),F=L+Math.floor(I)*4,R=T*E;f+=R,C+=_[F]*_[F+3]/255*R}}const v=C/f;c=Math.max(c,v),m[r++]=(0,D.toUint8)(v)}}return c}static _downsample(_,h){const m=2*h*1*h,n=m*96,t=new Uint8ClampedArray(n);let i=0,s=0,r=0;for(let c=0;c<96;c++)r=Math.max(r,this._downsampleChar(_,s,t,i,h)),i+=m,s+=10*4;if(r>0){const c=255/r;for(let g=0;g<n;g++)t[g]*=c}return t}}e.MinimapCharRendererFactory=w}),define(J[115],ee([1,0,158]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class k{constructor(w){const b=(0,S.toUint8)(w);this._defaultValue=b,this._asciiMap=k._createAsciiMap(b),this._map=new Map}static _createAsciiMap(w){const b=new Uint8Array(256);return b.fill(w),b}set(w,b){const _=(0,S.toUint8)(b);w>=0&&w<256?this._asciiMap[w]=_:this._map.set(w,_)}get(w){return w>=0&&w<256?this._asciiMap[w]:this._map.get(w)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}e.CharacterClassifier=k;class y{constructor(){this._actual=new k(0)}add(w){this._actual.set(w,1)}has(w){return this._actual.get(w)===1}clear(){return this._actual.clear()}}e.CharacterSet=y}),define(J[75],ee([1,0,9]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class k{static _nextVisibleColumn(D,w,b){return D===9?k.nextRenderTabStop(w,b):S.isFullWidthCharacter(D)||S.isEmojiImprecise(D)?w+2:w+1}static visibleColumnFromColumn(D,w,b){const _=Math.min(w-1,D.length),h=D.substring(0,_),m=new S.GraphemeIterator(h);let n=0;for(;!m.eol();){const t=S.getNextCodePoint(h,_,m.offset);m.nextGraphemeLength(),n=this._nextVisibleColumn(t,n,b)}return n}static columnFromVisibleColumn(D,w,b){if(w<=0)return 1;const _=D.length,h=new S.GraphemeIterator(D);let m=0,n=1;for(;!h.eol();){const t=S.getNextCodePoint(D,_,h.offset);h.nextGraphemeLength();const i=this._nextVisibleColumn(t,m,b),s=h.offset+1;if(i>=w){const r=w-m;return i-w<r?s:n}m=i,n=s}return _+1}static nextRenderTabStop(D,w){return D+w-D%w}static nextIndentTabStop(D,w){return D+w-D%w}static prevRenderTabStop(D,w){return Math.max(0,D-1-(D-1)%w)}static prevIndentTabStop(D,w){return Math.max(0,D-1-(D-1)%w)}}e.CursorColumns=k}),define(J[116],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countEOL=void 0;function S(k){let y=0,D=0,w=0,b=0;for(let _=0,h=k.length;_<h;_++){const m=k.charCodeAt(_);m===13?(y===0&&(D=_),y++,_+1<h&&k.charCodeAt(_+1)===10?(b|=2,_++):b|=3,w=_+1):m===10&&(b|=1,y===0&&(D=_),y++,w=_+1)}return y===0&&(D=k.length),[y,D,k.length-w,b]}e.countEOL=S}),define(J[187],ee([1,0,9,75]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeIndentation=void 0;function y(w,b,_){let h=0;for(let n=0;n<w.length;n++)w.charAt(n)==="\t"?h=k.CursorColumns.nextIndentTabStop(h,b):h++;let m="";if(!_){const n=Math.floor(h/b);h=h%b;for(let t=0;t<n;t++)m+="\t"}for(let n=0;n<h;n++)m+=" ";return m}function D(w,b,_){let h=S.firstNonWhitespaceIndex(w);return h===-1&&(h=w.length),y(w.substring(0,h),b,_)+w.substring(h)}e.normalizeIndentation=D}),define(J[103],ee([1,0,11]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=void 0;class k{static joinMany(D){if(D.length===0)return[];let w=D[0];for(let b=1;b<D.length;b++)w=this.join(w,D[b]);return w}static join(D,w){if(D.length===0)return w;if(w.length===0)return D;const b=[];let _=0,h=0,m=null;for(;_<D.length||h<w.length;){let n=null;if(_<D.length&&h<w.length){const t=D[_],i=w[h];t.startLineNumber<i.startLineNumber?(n=t,_++):(n=i,h++)}else _<D.length?(n=D[_],_++):(n=w[h],h++);m===null?m=n:m.endLineNumberExclusive>=n.startLineNumber?m=new k(m.startLineNumber,Math.max(m.endLineNumberExclusive,n.endLineNumberExclusive)):(b.push(m),m=n)}return m!==null&&b.push(m),b}constructor(D,w){if(D>w)throw new S.BugIndicatingError(`startLineNumber ${D} cannot be after endLineNumberExclusive ${w}`);this.startLineNumber=D,this.endLineNumberExclusive=w}contains(D){return this.startLineNumber<=D&&D<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(D){return new k(this.startLineNumber+D,this.endLineNumberExclusive+D)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(D){return new k(Math.min(this.startLineNumber,D.startLineNumber),Math.max(this.endLineNumberExclusive,D.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(D){const w=Math.max(this.startLineNumber,D.startLineNumber),b=Math.min(this.endLineNumberExclusive,D.endLineNumberExclusive);if(w<=b)return new k(w,b)}overlapOrTouch(D){return this.startLineNumber<=D.endLineNumberExclusive&&D.startLineNumber<=this.endLineNumberExclusive}equals(D){return this.startLineNumber===D.startLineNumber&&this.endLineNumberExclusive===D.endLineNumberExclusive}}e.LineRange=k}),define(J[117],ee([1,0,11]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OffsetRange=void 0;class k{static addRange(D,w){let b=0;for(;b<w.length&&w[b].endExclusive<D.start;)b++;let _=b;for(;_<w.length&&w[_].start<=D.endExclusive;)_++;if(b===_)w.splice(b,0,D);else{const h=Math.min(D.start,w[b].start),m=Math.max(D.endExclusive,w[_-1].endExclusive);w.splice(b,_-b,new k(h,m))}}static tryCreate(D,w){if(!(D>w))return new k(D,w)}constructor(D,w){if(this.start=D,this.endExclusive=w,D>w)throw new S.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(D){return new k(this.start+D,this.endExclusive+D)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(D){return this.start===D.start&&this.endExclusive===D.endExclusive}containsRange(D){return this.start<=D.start&&D.endExclusive<=this.endExclusive}join(D){return new k(Math.min(this.start,D.start),Math.max(this.endExclusive,D.endExclusive))}intersect(D){const w=Math.max(this.start,D.start),b=Math.min(this.endExclusive,D.endExclusive);if(w<=b)return new k(w,b)}}e.OffsetRange=k}),define(J[13],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class S{constructor(y,D){this.lineNumber=y,this.column=D}with(y=this.lineNumber,D=this.column){return y===this.lineNumber&&D===this.column?this:new S(y,D)}delta(y=0,D=0){return this.with(this.lineNumber+y,this.column+D)}equals(y){return S.equals(this,y)}static equals(y,D){return!y&&!D?!0:!!y&&!!D&&y.lineNumber===D.lineNumber&&y.column===D.column}isBefore(y){return S.isBefore(this,y)}static isBefore(y,D){return y.lineNumber<D.lineNumber?!0:D.lineNumber<y.lineNumber?!1:y.column<D.column}isBeforeOrEqual(y){return S.isBeforeOrEqual(this,y)}static isBeforeOrEqual(y,D){return y.lineNumber<D.lineNumber?!0:D.lineNumber<y.lineNumber?!1:y.column<=D.column}static compare(y,D){const w=y.lineNumber|0,b=D.lineNumber|0;if(w===b){const _=y.column|0,h=D.column|0;return _-h}return w-b}clone(){return new S(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(y){return new S(y.lineNumber,y.column)}static isIPosition(y){return y&&typeof y.lineNumber=="number"&&typeof y.column=="number"}}e.Position=S}),define(J[5],ee([1,0,13]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class k{constructor(D,w,b,_){D>b||D===b&&w>_?(this.startLineNumber=b,this.startColumn=_,this.endLineNumber=D,this.endColumn=w):(this.startLineNumber=D,this.startColumn=w,this.endLineNumber=b,this.endColumn=_)}isEmpty(){return k.isEmpty(this)}static isEmpty(D){return D.startLineNumber===D.endLineNumber&&D.startColumn===D.endColumn}containsPosition(D){return k.containsPosition(this,D)}static containsPosition(D,w){return!(w.lineNumber<D.startLineNumber||w.lineNumber>D.endLineNumber||w.lineNumber===D.startLineNumber&&w.column<D.startColumn||w.lineNumber===D.endLineNumber&&w.column>D.endColumn)}static strictContainsPosition(D,w){return!(w.lineNumber<D.startLineNumber||w.lineNumber>D.endLineNumber||w.lineNumber===D.startLineNumber&&w.column<=D.startColumn||w.lineNumber===D.endLineNumber&&w.column>=D.endColumn)}containsRange(D){return k.containsRange(this,D)}static containsRange(D,w){return!(w.startLineNumber<D.startLineNumber||w.endLineNumber<D.startLineNumber||w.startLineNumber>D.endLineNumber||w.endLineNumber>D.endLineNumber||w.startLineNumber===D.startLineNumber&&w.startColumn<D.startColumn||w.endLineNumber===D.endLineNumber&&w.endColumn>D.endColumn)}strictContainsRange(D){return k.strictContainsRange(this,D)}static strictContainsRange(D,w){return!(w.startLineNumber<D.startLineNumber||w.endLineNumber<D.startLineNumber||w.startLineNumber>D.endLineNumber||w.endLineNumber>D.endLineNumber||w.startLineNumber===D.startLineNumber&&w.startColumn<=D.startColumn||w.endLineNumber===D.endLineNumber&&w.endColumn>=D.endColumn)}plusRange(D){return k.plusRange(this,D)}static plusRange(D,w){let b,_,h,m;return w.startLineNumber<D.startLineNumber?(b=w.startLineNumber,_=w.startColumn):w.startLineNumber===D.startLineNumber?(b=w.startLineNumber,_=Math.min(w.startColumn,D.startColumn)):(b=D.startLineNumber,_=D.startColumn),w.endLineNumber>D.endLineNumber?(h=w.endLineNumber,m=w.endColumn):w.endLineNumber===D.endLineNumber?(h=w.endLineNumber,m=Math.max(w.endColumn,D.endColumn)):(h=D.endLineNumber,m=D.endColumn),new k(b,_,h,m)}intersectRanges(D){return k.intersectRanges(this,D)}static intersectRanges(D,w){let b=D.startLineNumber,_=D.startColumn,h=D.endLineNumber,m=D.endColumn;const n=w.startLineNumber,t=w.startColumn,i=w.endLineNumber,s=w.endColumn;return b<n?(b=n,_=t):b===n&&(_=Math.max(_,t)),h>i?(h=i,m=s):h===i&&(m=Math.min(m,s)),b>h||b===h&&_>m?null:new k(b,_,h,m)}equalsRange(D){return k.equalsRange(this,D)}static equalsRange(D,w){return!D&&!w?!0:!!D&&!!w&&D.startLineNumber===w.startLineNumber&&D.startColumn===w.startColumn&&D.endLineNumber===w.endLineNumber&&D.endColumn===w.endColumn}getEndPosition(){return k.getEndPosition(this)}static getEndPosition(D){return new S.Position(D.endLineNumber,D.endColumn)}getStartPosition(){return k.getStartPosition(this)}static getStartPosition(D){return new S.Position(D.startLineNumber,D.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(D,w){return new k(this.startLineNumber,this.startColumn,D,w)}setStartPosition(D,w){return new k(D,w,this.endLineNumber,this.endColumn)}collapseToStart(){return k.collapseToStart(this)}static collapseToStart(D){return new k(D.startLineNumber,D.startColumn,D.startLineNumber,D.startColumn)}collapseToEnd(){return k.collapseToEnd(this)}static collapseToEnd(D){return new k(D.endLineNumber,D.endColumn,D.endLineNumber,D.endColumn)}delta(D){return new k(this.startLineNumber+D,this.startColumn,this.endLineNumber+D,this.endColumn)}static fromPositions(D,w=D){return new k(D.lineNumber,D.column,w.lineNumber,w.column)}static lift(D){return D?new k(D.startLineNumber,D.startColumn,D.endLineNumber,D.endColumn):null}static isIRange(D){return D&&typeof D.startLineNumber=="number"&&typeof D.startColumn=="number"&&typeof D.endLineNumber=="number"&&typeof D.endColumn=="number"}static areIntersectingOrTouching(D,w){return!(D.endLineNumber<w.startLineNumber||D.endLineNumber===w.startLineNumber&&D.endColumn<w.startColumn||w.endLineNumber<D.startLineNumber||w.endLineNumber===D.startLineNumber&&w.endColumn<D.startColumn)}static areIntersecting(D,w){return!(D.endLineNumber<w.startLineNumber||D.endLineNumber===w.startLineNumber&&D.endColumn<=w.startColumn||w.endLineNumber<D.startLineNumber||w.endLineNumber===D.startLineNumber&&w.endColumn<=D.startColumn)}static compareRangesUsingStarts(D,w){if(D&&w){const h=D.startLineNumber|0,m=w.startLineNumber|0;if(h===m){const n=D.startColumn|0,t=w.startColumn|0;if(n===t){const i=D.endLineNumber|0,s=w.endLineNumber|0;if(i===s){const r=D.endColumn|0,c=w.endColumn|0;return r-c}return i-s}return n-t}return h-m}return(D?1:0)-(w?1:0)}static compareRangesUsingEnds(D,w){return D.endLineNumber===w.endLineNumber?D.endColumn===w.endColumn?D.startLineNumber===w.startLineNumber?D.startColumn-w.startColumn:D.startLineNumber-w.startLineNumber:D.endColumn-w.endColumn:D.endLineNumber-w.endLineNumber}static spansMultipleLines(D){return D.endLineNumber>D.startLineNumber}toJSON(){return this}}e.Range=k}),define(J[252],ee([1,0,9,5]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class y{constructor(b,_,h,m,n){this.value=b,this.selectionStart=_,this.selectionEnd=h,this.selection=m,this.newlineCountBeforeSelection=n}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(b,_){const h=b.getValue(),m=b.getSelectionStart(),n=b.getSelectionEnd();let t;if(_){const i=h.substring(0,m),s=_.value.substring(0,_.selectionStart);i===s&&(t=_.newlineCountBeforeSelection)}return new y(h,m,n,null,t)}collapseSelection(){return this.selectionStart===this.value.length?this:new y(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(b,_,h){e._debugComposition&&console.log(`writeToTextArea ${b}: ${this.toString()}`),_.setValue(b,this.value),h&&_.setSelectionRange(b,this.selectionStart,this.selectionEnd)}deduceEditorPosition(b){var _,h,m,n,t,i,s,r;if(b<=this.selectionStart){const o=this.value.substring(b,this.selectionStart);return this._finishDeduceEditorPosition((h=(_=this.selection)===null||_===void 0?void 0:_.getStartPosition())!==null&&h!==void 0?h:null,o,-1)}if(b>=this.selectionEnd){const o=this.value.substring(this.selectionEnd,b);return this._finishDeduceEditorPosition((n=(m=this.selection)===null||m===void 0?void 0:m.getEndPosition())!==null&&n!==void 0?n:null,o,1)}const c=this.value.substring(this.selectionStart,b);if(c.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition((i=(t=this.selection)===null||t===void 0?void 0:t.getStartPosition())!==null&&i!==void 0?i:null,c,1);const g=this.value.substring(b,this.selectionEnd);return this._finishDeduceEditorPosition((r=(s=this.selection)===null||s===void 0?void 0:s.getEndPosition())!==null&&r!==void 0?r:null,g,-1)}_finishDeduceEditorPosition(b,_,h){let m=0,n=-1;for(;(n=_.indexOf(`\n`,n+1))!==-1;)m++;return[b,h*_.length,m]}static deduceInput(b,_,h){if(!b)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${b.toString()}`),console.log(`CURRENT STATE: ${_.toString()}`));const m=Math.min(S.commonPrefixLength(b.value,_.value),b.selectionStart,_.selectionStart),n=Math.min(S.commonSuffixLength(b.value,_.value),b.value.length-b.selectionEnd,_.value.length-_.selectionEnd),t=b.value.substring(m,b.value.length-n),i=_.value.substring(m,_.value.length-n),s=b.selectionStart-m,r=b.selectionEnd-m,c=_.selectionStart-m,g=_.selectionEnd-m;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${t}>, selectionStart: ${s}, selectionEnd: ${r}`),console.log(`AFTER DIFFING CURRENT STATE: <${i}>, selectionStart: ${c}, selectionEnd: ${g}`)),c===g){const l=b.selectionStart-m;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${l} chars`),{text:i,replacePrevCharCnt:l,replaceNextCharCnt:0,positionDelta:0}}const o=r-s;return{text:i,replacePrevCharCnt:o,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(b,_){if(!b)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${b.toString()}`),console.log(`CURRENT STATE: ${_.toString()}`)),b.value===_.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:_.selectionEnd-b.selectionEnd};const h=Math.min(S.commonPrefixLength(b.value,_.value),b.selectionEnd),m=Math.min(S.commonSuffixLength(b.value,_.value),b.value.length-b.selectionEnd),n=b.value.substring(h,b.value.length-m),t=_.value.substring(h,_.value.length-m),i=b.selectionStart-h,s=b.selectionEnd-h,r=_.selectionStart-h,c=_.selectionEnd-h;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${n}>, selectionStart: ${i}, selectionEnd: ${s}`),console.log(`AFTER DIFFING CURRENT STATE: <${t}>, selectionStart: ${r}, selectionEnd: ${c}`)),{text:t,replacePrevCharCnt:s,replaceNextCharCnt:n.length-s,positionDelta:c-t.length}}}y.EMPTY=new y("",0,0,null,void 0),e.TextAreaState=y;class D{static _getPageOfLine(b,_){return Math.floor((b-1)/_)}static _getRangeForPage(b,_){const h=b*_,m=h+1,n=h+_;return new k.Range(m,1,n+1,1)}static fromEditorSelection(b,_,h,m){const t=D._getPageOfLine(_.startLineNumber,h),i=D._getRangeForPage(t,h),s=D._getPageOfLine(_.endLineNumber,h),r=D._getRangeForPage(s,h);let c=i.intersectRanges(new k.Range(1,1,_.startLineNumber,_.startColumn));if(m&&b.getValueLengthInRange(c,1)>500){const C=b.modifyPosition(c.getEndPosition(),-500);c=k.Range.fromPositions(C,c.getEndPosition())}const g=b.getValueInRange(c,1),o=b.getLineCount(),l=b.getLineMaxColumn(o);let a=r.intersectRanges(new k.Range(_.endLineNumber,_.endColumn,o,l));if(m&&b.getValueLengthInRange(a,1)>500){const C=b.modifyPosition(a.getStartPosition(),500);a=k.Range.fromPositions(a.getStartPosition(),C)}const d=b.getValueInRange(a,1);let u;if(t===s||t+1===s)u=b.getValueInRange(_,1);else{const C=i.intersectRanges(_),f=r.intersectRanges(_);u=b.getValueInRange(C,1)+String.fromCharCode(8230)+b.getValueInRange(f,1)}return m&&u.length>2*500&&(u=u.substring(0,500)+String.fromCharCode(8230)+u.substring(u.length-500,u.length)),new y(g+u+d,g.length,g.length+u.length,_,c.endLineNumber-c.startLineNumber)}}e.PagedScreenReaderStrategy=D}),define(J[64],ee([1,0,5]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class k{static insert(D,w){return{range:new S.Range(D.lineNumber,D.column,D.lineNumber,D.column),text:w,forceMoveMarkers:!0}}static delete(D){return{range:D,text:null}}static replace(D,w){return{range:D,text:w}}static replaceMove(D,w){return{range:D,text:w,forceMoveMarkers:!0}}}e.EditOperation=k}),define(J[449],ee([1,0,9,64,5]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class D{constructor(_,h){this._selection=_,this._cursors=h,this._selectionId=null}getEditOperations(_,h){const m=w(_,this._cursors);for(let n=0,t=m.length;n<t;n++){const i=m[n];h.addEditOperation(i.range,i.text)}this._selectionId=h.trackSelection(this._selection)}computeCursorState(_,h){return h.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=D;function w(b,_){_.sort((i,s)=>i.lineNumber===s.lineNumber?i.column-s.column:i.lineNumber-s.lineNumber);for(let i=_.length-2;i>=0;i--)_[i].lineNumber===_[i+1].lineNumber&&_.splice(i,1);const h=[];let m=0,n=0;const t=_.length;for(let i=1,s=b.getLineCount();i<=s;i++){const r=b.getLineContent(i),c=r.length+1;let g=0;if(n<t&&_[n].lineNumber===i&&(g=_[n].column,n++,g===c)||r.length===0)continue;const o=S.lastNonWhitespaceIndex(r);let l=0;if(o===-1)l=1;else if(o!==r.length-1)l=o+2;else continue;l=Math.max(g,l),h[m++]=k.EditOperation.delete(new y.Range(i,l,i,c))}return h}e.trimTrailingWhitespace=w}),define(J[253],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class S{constructor(y,D,w,b){this._rgba8Brand=void 0,this.r=S._clamp(y),this.g=S._clamp(D),this.b=S._clamp(w),this.a=S._clamp(b)}equals(y){return this.r===y.r&&this.g===y.g&&this.b===y.b&&this.a===y.a}static _clamp(y){return y<0?0:y>255?255:y|0}}S.Empty=new S(0,0,0,0),e.RGBA8=S}),define(J[23],ee([1,0,13,5]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class y extends k.Range{constructor(w,b,_,h){super(w,b,_,h),this.selectionStartLineNumber=w,this.selectionStartColumn=b,this.positionLineNumber=_,this.positionColumn=h}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(w){return y.selectionsEqual(this,w)}static selectionsEqual(w,b){return w.selectionStartLineNumber===b.selectionStartLineNumber&&w.selectionStartColumn===b.selectionStartColumn&&w.positionLineNumber===b.positionLineNumber&&w.positionColumn===b.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(w,b){return this.getDirection()===0?new y(this.startLineNumber,this.startColumn,w,b):new y(w,b,this.startLineNumber,this.startColumn)}getPosition(){return new S.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new S.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(w,b){return this.getDirection()===0?new y(w,b,this.endLineNumber,this.endColumn):new y(this.endLineNumber,this.endColumn,w,b)}static fromPositions(w,b=w){return new y(w.lineNumber,w.column,b.lineNumber,b.column)}static fromRange(w,b){return b===0?new y(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn):new y(w.endLineNumber,w.endColumn,w.startLineNumber,w.startColumn)}static liftSelection(w){return new y(w.selectionStartLineNumber,w.selectionStartColumn,w.positionLineNumber,w.positionColumn)}static selectionsArrEqual(w,b){if(w&&!b||!w&&b)return!1;if(!w&&!b)return!0;if(w.length!==b.length)return!1;for(let _=0,h=w.length;_<h;_++)if(!this.selectionsEqual(w[_],b[_]))return!1;return!0}static isISelection(w){return w&&typeof w.selectionStartLineNumber=="number"&&typeof w.selectionStartColumn=="number"&&typeof w.positionLineNumber=="number"&&typeof w.positionColumn=="number"}static createWithDirection(w,b,_,h,m){return m===0?new y(w,b,_,h):new y(_,h,w,b)}}e.Selection=y}),define(J[118],ee([1,0,23]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class k{constructor(h,m,n=!1){this._range=h,this._text=m,this.insertsAutoWhitespace=n}getEditOperations(h,m){m.addTrackedEditOperation(this._range,this._text)}computeCursorState(h,m){const t=m.getInverseEditOperations()[0].range;return S.Selection.fromPositions(t.getEndPosition())}}e.ReplaceCommand=k;class y{constructor(h,m){this._range=h,this._text=m}getEditOperations(h,m){m.addTrackedEditOperation(this._range,this._text)}computeCursorState(h,m){const t=m.getInverseEditOperations()[0].range;return S.Selection.fromRange(t,0)}}e.ReplaceCommandThatSelectsText=y;class D{constructor(h,m,n=!1){this._range=h,this._text=m,this.insertsAutoWhitespace=n}getEditOperations(h,m){m.addTrackedEditOperation(this._range,this._text)}computeCursorState(h,m){const t=m.getInverseEditOperations()[0].range;return S.Selection.fromPositions(t.getStartPosition())}}e.ReplaceCommandWithoutChangingPosition=D;class w{constructor(h,m,n,t,i=!1){this._range=h,this._text=m,this._columnDeltaOffset=t,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=i}getEditOperations(h,m){m.addTrackedEditOperation(this._range,this._text)}computeCursorState(h,m){const t=m.getInverseEditOperations()[0].range;return S.Selection.fromPositions(t.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}e.ReplaceCommandWithOffsetCursorState=w;class b{constructor(h,m,n,t=!1){this._range=h,this._text=m,this._initialSelection=n,this._forceMoveMarkers=t,this._selectionId=null}getEditOperations(h,m){m.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=m.trackSelection(this._initialSelection)}computeCursorState(h,m){return m.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=b}),define(J[450],ee([1,0,5,23]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionSurroundSelectionCommand=e.SurroundSelectionCommand=void 0;class y{constructor(b,_,h){this._range=b,this._charBeforeSelection=_,this._charAfterSelection=h}getEditOperations(b,_){_.addTrackedEditOperation(new S.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),_.addTrackedEditOperation(new S.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(b,_){const h=_.getInverseEditOperations(),m=h[0].range,n=h[1].range;return new k.Selection(m.endLineNumber,m.endColumn,n.endLineNumber,n.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=y;class D{constructor(b,_,h){this._position=b,this._text=_,this._charAfter=h}getEditOperations(b,_){_.addTrackedEditOperation(new S.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(b,_){const m=_.getInverseEditOperations()[0].range;return new k.Selection(m.endLineNumber,m.startColumn,m.endLineNumber,m.endColumn-this._charAfter.length)}}e.CompositionSurroundSelectionCommand=D}),define(J[163],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EDITOR_MODEL_DEFAULTS=void 0,e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}}),define(J[135],ee([1,0,115]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=void 0;class k extends S.CharacterClassifier{constructor(w){super(0);for(let b=0,_=w.length;b<_;b++)this.set(w.charCodeAt(b),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=k;function y(D){const w={};return b=>(w.hasOwnProperty(b)||(w[b]=D(b)),w[b])}e.getMapForWordSeparators=y(D=>new k(D))}),define(J[136],ee([1,0,54,59]),function(q,e,S,k){"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 y(h=""){let m="(-?\\\\d*\\\\.\\\\d\\\\w*)|([^";for(const n of e.USUAL_WORD_SEPARATORS)h.indexOf(n)>=0||(m+="\\\\"+n);return m+="\\\\s]+)",new RegExp(m,"g")}e.DEFAULT_WORD_REGEXP=y();function D(h){let m=e.DEFAULT_WORD_REGEXP;if(h&&h instanceof RegExp)if(h.global)m=h;else{let n="g";h.ignoreCase&&(n+="i"),h.multiline&&(n+="m"),h.unicode&&(n+="u"),m=new RegExp(h.source,n)}return m.lastIndex=0,m}e.ensureValidWordDefinition=D;const w=new k.LinkedList;w.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function b(h,m,n,t,i){if(i||(i=S.Iterable.first(w)),n.length>i.maxLen){let o=h-i.maxLen/2;return o<0?o=0:t+=o,n=n.substring(o,h+i.maxLen/2),b(h,m,n,t,i)}const s=Date.now(),r=h-1-t;let c=-1,g=null;for(let o=1;!(Date.now()-s>=i.timeBudget);o++){const l=r-i.windowSize*o;m.lastIndex=Math.max(0,l);const a=_(m,n,r,c);if(!a&&g||(g=a,l<=0))break;c=l}if(g){const o={word:g[0],startColumn:t+1+g.index,endColumn:t+1+g.index+g[0].length};return m.lastIndex=0,o}return null}e.getWordAtText=b;function _(h,m,n,t){let i;for(;i=h.exec(m);){const s=i.index||0;if(s<=n&&h.lastIndex>=n)return i;if(t>0&&s>t)return null}return null}}),define(J[254],ee([1,0,75]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class k{static whitespaceVisibleColumn(D,w,b){const _=D.length;let h=0,m=-1,n=-1;for(let t=0;t<_;t++){if(t===w)return[m,n,h];switch(h%b===0&&(m=t,n=h),D.charCodeAt(t)){case 32:h+=1;break;case 9:h=S.CursorColumns.nextRenderTabStop(h,b);break;default:return[-1,-1,-1]}}return w===_?[m,n,h]:[-1,-1,-1]}static atomicPosition(D,w,b,_){const h=D.length,[m,n,t]=k.whitespaceVisibleColumn(D,w,b);if(t===-1)return-1;let i;switch(_){case 0:i=!0;break;case 1:i=!1;break;case 2:if(t%b===0)return w;i=t%b<=b/2;break}if(i){if(m===-1)return-1;let c=n;for(let g=m;g<h;++g){if(c===n+b)return m;switch(D.charCodeAt(g)){case 32:c+=1;break;case 9:c=S.CursorColumns.nextRenderTabStop(c,b);break;default:return-1}}return c===n+b?m:-1}const s=S.CursorColumns.nextRenderTabStop(t,b);let r=t;for(let c=w;c<h;c++){if(r===s)return c;switch(D.charCodeAt(c)){case 32:r+=1;break;case 9:r=S.CursorColumns.nextRenderTabStop(r,b);break;default:return-1}}return r===s?h:-1}}e.AtomicTabMoveOperations=k}),define(J[451],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorContext=void 0;class S{constructor(y,D,w,b){this._cursorContextBrand=void 0,this.model=y,this.viewModel=D,this.coordinatesConverter=w,this.cursorConfig=b}}e.CursorContext=S}),define(J[164],ee([1,0,11,117]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DateTimeout=e.InfiniteTimeout=e.SequenceDiff=e.DiffAlgorithmResult=void 0;class y{static trivial(h,m){return new y([new D(new k.OffsetRange(0,h.length),new k.OffsetRange(0,m.length))],!1)}static trivialTimedOut(h,m){return new y([new D(new k.OffsetRange(0,h.length),new k.OffsetRange(0,m.length))],!0)}constructor(h,m){this.diffs=h,this.hitTimeout=m}}e.DiffAlgorithmResult=y;class D{constructor(h,m){this.seq1Range=h,this.seq2Range=m}reverse(){return new D(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(h){return new D(this.seq1Range.join(h.seq1Range),this.seq2Range.join(h.seq2Range))}}e.SequenceDiff=D;class w{isValid(){return!0}}w.instance=new w,e.InfiniteTimeout=w;class b{constructor(h){if(this.timeout=h,this.startTime=Date.now(),this.valid=!0,h<=0)throw new S.BugIndicatingError("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime<this.timeout)&&this.valid){this.valid=!1;debugger}return this.valid}}e.DateTimeout=b}),define(J[452],ee([1,0,117,164]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shiftSequenceDiffs=e.joinSequenceDiffs=e.smoothenSequenceDiffs=e.optimizeSequenceDiffs=void 0;function y(h,m,n){let t=n;return t=w(h,m,t),t=b(h,m,t),t}e.optimizeSequenceDiffs=y;function D(h,m,n){const t=[];for(const i of n){const s=t[t.length-1];if(!s){t.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?t[t.length-1]=new k.SequenceDiff(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):t.push(i)}return t}e.smoothenSequenceDiffs=D;function w(h,m,n){const t=[];n.length>0&&t.push(n[0]);for(let i=1;i<n.length;i++){const s=t[t.length-1],r=n[i];if(r.seq1Range.isEmpty){let c=!0;const g=r.seq1Range.start-s.seq1Range.endExclusive;for(let o=1;o<=g;o++)if(m.getElement(r.seq2Range.start-o)!==m.getElement(r.seq2Range.endExclusive-o)){c=!1;break}if(c){t[t.length-1]=new k.SequenceDiff(s.seq1Range,new S.OffsetRange(s.seq2Range.start,r.seq2Range.endExclusive-g));continue}}t.push(r)}return t}e.joinSequenceDiffs=w;function b(h,m,n){if(!h.getBoundaryScore||!m.getBoundaryScore)return n;for(let t=0;t<n.length;t++){const i=n[t];if(i.seq1Range.isEmpty){const s=t>0?n[t-1].seq2Range.endExclusive:-1,r=t+1<n.length?n[t+1].seq2Range.start:m.length;n[t]=_(i,h,m,r,s)}else if(i.seq2Range.isEmpty){const s=t>0?n[t-1].seq1Range.endExclusive:-1,r=t+1<n.length?n[t+1].seq1Range.start:h.length;n[t]=_(i.reverse(),m,h,r,s).reverse()}}return n}e.shiftSequenceDiffs=b;function _(h,m,n,t,i){let r=1;for(;h.seq2Range.start-r>i&&n.getElement(h.seq2Range.start-r)===n.getElement(h.seq2Range.endExclusive-r)&&r<20;)r++;r--;let c=0;for(;h.seq2Range.start+c<t&&n.getElement(h.seq2Range.start+c)===n.getElement(h.seq2Range.endExclusive+c)&&c<20;)c++;if(r===0&&c===0)return h;let g=0,o=-1;for(let l=-r;l<=c;l++){const a=h.seq2Range.start+l,d=h.seq2Range.endExclusive+l,u=h.seq1Range.start+l,C=m.getBoundaryScore(u)+n.getBoundaryScore(a)+n.getBoundaryScore(d);C>o&&(o=C,g=l)}return g!==0?new k.SequenceDiff(h.seq1Range.delta(g),h.seq2Range.delta(g)):h}}),define(J[453],ee([1,0,117,164]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MyersDiffAlgorithm=void 0;class y{compute(h,m,n=k.InfiniteTimeout.instance){if(h.length===0||m.length===0)return k.DiffAlgorithmResult.trivial(h,m);function t(d,u){for(;d<h.length&&u<m.length&&h.getElement(d)===m.getElement(u);)d++,u++;return d}let i=0;const s=new w;s.set(0,t(0,0));const r=new b;r.set(0,s.get(0)===0?null:new D(null,0,0,s.get(0)));let c=0;e:for(;;)for(i++,c=-i;c<=i;c+=2){if(!n.isValid())return k.DiffAlgorithmResult.trivialTimedOut(h,m);const d=c===i?-1:s.get(c+1),u=c===-i?-1:s.get(c-1)+1,C=Math.min(Math.max(d,u),h.length),f=C-c,v=t(C,f);s.set(c,v);const p=C===d?r.get(c+1):r.get(c-1);if(r.set(c,v!==C?new D(p,C,f,v-C):p),s.get(c)===h.length&&s.get(c)-c===m.length)break e}let g=r.get(c);const o=[];let l=h.length,a=m.length;for(;;){const d=g?g.x+g.length:0,u=g?g.y+g.length:0;if((d!==l||u!==a)&&o.push(new k.SequenceDiff(new S.OffsetRange(d,l),new S.OffsetRange(u,a))),!g)break;l=g.x,a=g.y,g=g.prev}return o.reverse(),new k.DiffAlgorithmResult(o,!1)}}e.MyersDiffAlgorithm=y;class D{constructor(h,m,n,t){this.prev=h,this.x=m,this.y=n,this.length=t}}class w{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(h){return h<0?(h=-h-1,this.negativeArr[h]):this.positiveArr[h]}set(h,m){if(h<0){if(h=-h-1,h>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[h]=m}else{if(h>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[h]=m}}}class b{constructor(){this.positiveArr=[],this.negativeArr=[]}get(h){return h<0?(h=-h-1,this.negativeArr[h]):this.positiveArr[h]}set(h,m){h<0?(h=-h-1,this.negativeArr[h]=m):this.positiveArr[h]=m}}}),define(J[454],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Array2D=void 0;class S{constructor(y,D){this.width=y,this.height=D,this.array=[],this.array=new Array(y*D)}get(y,D){return this.array[y+D*this.width]}set(y,D,w){this.array[y+D*this.width]=w}}e.Array2D=S}),define(J[455],ee([1,0,117,164,454]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicProgrammingDiffing=void 0;class D{compute(b,_,h=k.InfiniteTimeout.instance,m){if(b.length===0||_.length===0)return k.DiffAlgorithmResult.trivial(b,_);const n=new y.Array2D(b.length,_.length),t=new y.Array2D(b.length,_.length),i=new y.Array2D(b.length,_.length);for(let a=0;a<b.length;a++)for(let d=0;d<_.length;d++){if(!h.isValid())return k.DiffAlgorithmResult.trivialTimedOut(b,_);const u=a===0?0:n.get(a-1,d),C=d===0?0:n.get(a,d-1);let f;b.getElement(a)===_.getElement(d)?(a===0||d===0?f=0:f=n.get(a-1,d-1),a>0&&d>0&&t.get(a-1,d-1)===3&&(f+=i.get(a-1,d-1)),f+=m?m(a,d):1):f=-1;const v=Math.max(u,C,f);if(v===f){const p=a>0&&d>0?i.get(a-1,d-1):0;i.set(a,d,p+1),t.set(a,d,3)}else v===u?(i.set(a,d,0),t.set(a,d,1)):v===C&&(i.set(a,d,0),t.set(a,d,2));n.set(a,d,v)}const s=[];let r=b.length,c=_.length;function g(a,d){(a+1!==r||d+1!==c)&&s.push(new k.SequenceDiff(new S.OffsetRange(a+1,r),new S.OffsetRange(d+1,c))),r=a,c=d}let o=b.length-1,l=_.length-1;for(;o>=0&&l>=0;)t.get(o,l)===3?(g(o,l),o--,l--):t.get(o,l)===1?o--:l--;return g(-1,-1),s.reverse(),new k.DiffAlgorithmResult(s,!1)}}e.DynamicProgrammingDiffing=D}),define(J[165],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMapping=e.LineRangeMapping=e.LinesDiff=void 0;class S{constructor(w,b){this.changes=w,this.hitTimeout=b}}e.LinesDiff=S;class k{constructor(w,b,_){this.originalRange=w,this.modifiedRange=b,this.innerChanges=_}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}e.LineRangeMapping=k;class y{constructor(w,b){this.originalRange=w,this.modifiedRange=b}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}e.RangeMapping=y}),define(J[456],ee([1,0,157,165,9,5,84,103]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=e.SmartLinesDiffComputer=void 0;const _=3;class h{computeDiff(d,u,C){var f;const p=new c(d,u,{maxComputationTime:C.maxComputationTimeMs,shouldIgnoreTrimWhitespace:C.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),L=[];let E=null;for(const I of p.changes){let T;I.originalEndLineNumber===0?T=new b.LineRange(I.originalStartLineNumber+1,I.originalStartLineNumber+1):T=new b.LineRange(I.originalStartLineNumber,I.originalEndLineNumber+1);let F;I.modifiedEndLineNumber===0?F=new b.LineRange(I.modifiedStartLineNumber+1,I.modifiedStartLineNumber+1):F=new b.LineRange(I.modifiedStartLineNumber,I.modifiedEndLineNumber+1);let R=new k.LineRangeMapping(T,F,(f=I.charChanges)===null||f===void 0?void 0:f.map(M=>new k.RangeMapping(new D.Range(M.originalStartLineNumber,M.originalStartColumn,M.originalEndLineNumber,M.originalEndColumn),new D.Range(M.modifiedStartLineNumber,M.modifiedStartColumn,M.modifiedEndLineNumber,M.modifiedEndColumn))));E&&(E.modifiedRange.endLineNumberExclusive===R.modifiedRange.startLineNumber||E.originalRange.endLineNumberExclusive===R.originalRange.startLineNumber)&&(R=new k.LineRangeMapping(E.originalRange.join(R.originalRange),E.modifiedRange.join(R.modifiedRange),E.innerChanges&&R.innerChanges?E.innerChanges.concat(R.innerChanges):void 0),L.pop()),L.push(R),E=R}return(0,w.assertFn)(()=>(0,w.checkAdjacentItems)(L,(I,T)=>T.originalRange.startLineNumber-I.originalRange.endLineNumberExclusive===T.modifiedRange.startLineNumber-I.modifiedRange.endLineNumberExclusive&&I.originalRange.endLineNumberExclusive<T.originalRange.startLineNumber&&I.modifiedRange.endLineNumberExclusive<T.modifiedRange.startLineNumber)),new k.LinesDiff(L,p.quitEarly)}}e.SmartLinesDiffComputer=h;function m(a,d,u,C){return new S.LcsDiff(a,d,u).ComputeDiff(C)}class n{constructor(d){const u=[],C=[];for(let f=0,v=d.length;f<v;f++)u[f]=g(d[f],1),C[f]=o(d[f],1);this.lines=d,this._startColumns=u,this._endColumns=C}getElements(){const d=[];for(let u=0,C=this.lines.length;u<C;u++)d[u]=this.lines[u].substring(this._startColumns[u]-1,this._endColumns[u]-1);return d}getStrictElement(d){return this.lines[d]}getStartLineNumber(d){return d+1}getEndLineNumber(d){return d+1}createCharSequence(d,u,C){const f=[],v=[],p=[];let L=0;for(let E=u;E<=C;E++){const I=this.lines[E],T=d?this._startColumns[E]:1,F=d?this._endColumns[E]:I.length+1;for(let R=T;R<F;R++)f[L]=I.charCodeAt(R-1),v[L]=E+1,p[L]=R,L++;!d&&E<C&&(f[L]=10,v[L]=E+1,p[L]=I.length+1,L++)}return new t(f,v,p)}}class t{constructor(d,u,C){this._charCodes=d,this._lineNumbers=u,this._columns=C}toString(){return"["+this._charCodes.map((d,u)=>(d===10?"\\\\n":String.fromCharCode(d))+`-(${this._lineNumbers[u]},${this._columns[u]})`).join(", ")+"]"}_assertIndex(d,u){if(d<0||d>=u.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(d){return d>0&&d===this._lineNumbers.length?this.getEndLineNumber(d-1):(this._assertIndex(d,this._lineNumbers),this._lineNumbers[d])}getEndLineNumber(d){return d===-1?this.getStartLineNumber(d+1):(this._assertIndex(d,this._lineNumbers),this._charCodes[d]===10?this._lineNumbers[d]+1:this._lineNumbers[d])}getStartColumn(d){return d>0&&d===this._columns.length?this.getEndColumn(d-1):(this._assertIndex(d,this._columns),this._columns[d])}getEndColumn(d){return d===-1?this.getStartColumn(d+1):(this._assertIndex(d,this._columns),this._charCodes[d]===10?1:this._columns[d]+1)}}class i{constructor(d,u,C,f,v,p,L,E){this.originalStartLineNumber=d,this.originalStartColumn=u,this.originalEndLineNumber=C,this.originalEndColumn=f,this.modifiedStartLineNumber=v,this.modifiedStartColumn=p,this.modifiedEndLineNumber=L,this.modifiedEndColumn=E}static createFromDiffChange(d,u,C){const f=u.getStartLineNumber(d.originalStart),v=u.getStartColumn(d.originalStart),p=u.getEndLineNumber(d.originalStart+d.originalLength-1),L=u.getEndColumn(d.originalStart+d.originalLength-1),E=C.getStartLineNumber(d.modifiedStart),I=C.getStartColumn(d.modifiedStart),T=C.getEndLineNumber(d.modifiedStart+d.modifiedLength-1),F=C.getEndColumn(d.modifiedStart+d.modifiedLength-1);return new i(f,v,p,L,E,I,T,F)}}function s(a){if(a.length<=1)return a;const d=[a[0]];let u=d[0];for(let C=1,f=a.length;C<f;C++){const v=a[C],p=v.originalStart-(u.originalStart+u.originalLength),L=v.modifiedStart-(u.modifiedStart+u.modifiedLength);Math.min(p,L)<_?(u.originalLength=v.originalStart+v.originalLength-u.originalStart,u.modifiedLength=v.modifiedStart+v.modifiedLength-u.modifiedStart):(d.push(v),u=v)}return d}class r{constructor(d,u,C,f,v){this.originalStartLineNumber=d,this.originalEndLineNumber=u,this.modifiedStartLineNumber=C,this.modifiedEndLineNumber=f,this.charChanges=v}static createFromDiffResult(d,u,C,f,v,p,L){let E,I,T,F,R;if(u.originalLength===0?(E=C.getStartLineNumber(u.originalStart)-1,I=0):(E=C.getStartLineNumber(u.originalStart),I=C.getEndLineNumber(u.originalStart+u.originalLength-1)),u.modifiedLength===0?(T=f.getStartLineNumber(u.modifiedStart)-1,F=0):(T=f.getStartLineNumber(u.modifiedStart),F=f.getEndLineNumber(u.modifiedStart+u.modifiedLength-1)),p&&u.originalLength>0&&u.originalLength<20&&u.modifiedLength>0&&u.modifiedLength<20&&v()){const M=C.createCharSequence(d,u.originalStart,u.originalStart+u.originalLength-1),N=f.createCharSequence(d,u.modifiedStart,u.modifiedStart+u.modifiedLength-1);if(M.getElements().length>0&&N.getElements().length>0){let A=m(M,N,v,!0).changes;L&&(A=s(A)),R=[];for(let P=0,x=A.length;P<x;P++)R.push(i.createFromDiffChange(A[P],M,N))}}return new r(E,I,T,F,R)}}class c{constructor(d,u,C){this.shouldComputeCharChanges=C.shouldComputeCharChanges,this.shouldPostProcessCharChanges=C.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=C.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=C.shouldMakePrettyDiff,this.originalLines=d,this.modifiedLines=u,this.original=new n(d),this.modified=new n(u),this.continueLineDiff=l(C.maxComputationTime),this.continueCharDiff=l(C.maxComputationTime===0?0:Math.min(C.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:void 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:void 0}]};const d=m(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),u=d.changes,C=d.quitEarly;if(this.shouldIgnoreTrimWhitespace){const L=[];for(let E=0,I=u.length;E<I;E++)L.push(r.createFromDiffResult(this.shouldIgnoreTrimWhitespace,u[E],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:C,changes:L}}const f=[];let v=0,p=0;for(let L=-1,E=u.length;L<E;L++){const I=L+1<E?u[L+1]:null,T=I?I.originalStart:this.originalLines.length,F=I?I.modifiedStart:this.modifiedLines.length;for(;v<T&&p<F;){const R=this.originalLines[v],M=this.modifiedLines[p];if(R!==M){{let N=g(R,1),A=g(M,1);for(;N>1&&A>1;){const P=R.charCodeAt(N-2),x=M.charCodeAt(A-2);if(P!==x)break;N--,A--}(N>1||A>1)&&this._pushTrimWhitespaceCharChange(f,v+1,1,N,p+1,1,A)}{let N=o(R,1),A=o(M,1);const P=R.length+1,x=M.length+1;for(;N<P&&A<x;){const W=R.charCodeAt(N-1),U=R.charCodeAt(A-1);if(W!==U)break;N++,A++}(N<P||A<x)&&this._pushTrimWhitespaceCharChange(f,v+1,N,P,p+1,A,x)}}v++,p++}I&&(f.push(r.createFromDiffResult(this.shouldIgnoreTrimWhitespace,I,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),v+=I.originalLength,p+=I.modifiedLength)}return{quitEarly:C,changes:f}}_pushTrimWhitespaceCharChange(d,u,C,f,v,p,L){if(this._mergeTrimWhitespaceCharChange(d,u,C,f,v,p,L))return;let E;this.shouldComputeCharChanges&&(E=[new i(u,C,u,f,v,p,v,L)]),d.push(new r(u,u,v,v,E))}_mergeTrimWhitespaceCharChange(d,u,C,f,v,p,L){const E=d.length;if(E===0)return!1;const I=d[E-1];return I.originalEndLineNumber===0||I.modifiedEndLineNumber===0?!1:I.originalEndLineNumber===u&&I.modifiedEndLineNumber===v?(this.shouldComputeCharChanges&&I.charChanges&&I.charChanges.push(new i(u,C,u,f,v,p,v,L)),!0):I.originalEndLineNumber+1===u&&I.modifiedEndLineNumber+1===v?(I.originalEndLineNumber=u,I.modifiedEndLineNumber=v,this.shouldComputeCharChanges&&I.charChanges&&I.charChanges.push(new i(u,C,u,f,v,p,v,L)),!0):!1}}e.DiffComputer=c;function g(a,d){const u=y.firstNonWhitespaceIndex(a);return u===-1?d:u+1}function o(a,d){const u=y.lastNonWhitespaceIndex(a);return u===-1?d:u+2}function l(a){if(a===0)return()=>!0;const d=Date.now();return()=>Date.now()-d<a}}),define(J[457],ee([1,0,84,103,117,13,5,164,455,452,453,165]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineSequence=e.getLineRangeMapping=e.lineRangeMappingFromRangeMappings=e.StandardLinesDiffComputer=void 0;class t{constructor(){this.dynamicProgrammingDiffing=new _.DynamicProgrammingDiffing,this.myersDiffingAlgorithm=new m.MyersDiffAlgorithm}computeDiff(L,E,I){const T=I.maxComputationTimeMs===0?b.InfiniteTimeout.instance:new b.DateTimeout(I.maxComputationTimeMs),F=!I.ignoreTrimWhitespace,R=new Map;function M(re){let H=R.get(re);return H===void 0&&(H=R.size,R.set(re,H)),H}const N=L.map(re=>M(re.trim())),A=E.map(re=>M(re.trim())),P=new o(N,L),x=new o(A,E),W=(()=>P.length+x.length<1500?this.dynamicProgrammingDiffing.compute(P,x,T,(re,H)=>L[re]===E[H]?E[H].length===0?.1:1+Math.log(1+E[H].length):.99):this.myersDiffingAlgorithm.compute(P,x))();let U=W.diffs,O=W.hitTimeout;U=(0,h.optimizeSequenceDiffs)(P,x,U);const $=[],Q=re=>{if(F)for(let H=0;H<re;H++){const B=se+H,j=le+H;if(L[B]!==E[j]){const G=this.refineDiff(L,E,new b.SequenceDiff(new y.OffsetRange(B,B+1),new y.OffsetRange(j,j+1)),T,F);for(const Y of G.mappings)$.push(Y);G.hitTimeout&&(O=!0)}}};let se=0,le=0;for(const re of U){(0,S.assertFn)(()=>re.seq1Range.start-se===re.seq2Range.start-le);const H=re.seq1Range.start-se;Q(H),se=re.seq1Range.endExclusive,le=re.seq2Range.endExclusive;const B=this.refineDiff(L,E,re,T,F);B.hitTimeout&&(O=!0);for(const j of B.mappings)$.push(j)}Q(L.length-se);const te=r($,L,E);return new n.LinesDiff(te,O)}refineDiff(L,E,I,T,F){const R=new a(L,I.seq1Range,F),M=new a(E,I.seq2Range,F),N=R.length+M.length<500?this.dynamicProgrammingDiffing.compute(R,M,T):this.myersDiffingAlgorithm.compute(R,M,T);let A=N.diffs;return A=(0,h.optimizeSequenceDiffs)(R,M,A),A=i(R,M,A),A=(0,h.smoothenSequenceDiffs)(R,M,A),{mappings:A.map(x=>new n.RangeMapping(R.translateRange(x.seq1Range),M.translateRange(x.seq2Range))),hitTimeout:N.hitTimeout}}}e.StandardLinesDiffComputer=t;function i(p,L,E){const I=[];let T;function F(){if(!T)return;const M=T.s1Range.length-T.deleted,N=T.s2Range.length-T.added;Math.max(T.deleted,T.added)+(T.count-1)>M&&I.push(new b.SequenceDiff(T.s1Range,T.s2Range)),T=void 0}for(const M of E){let N=function(U,O){var $,Q,se,le;if(!T||!T.s1Range.containsRange(U)||!T.s2Range.containsRange(O))if(T&&!(T.s1Range.endExclusive<U.start&&T.s2Range.endExclusive<O.start)){const H=y.OffsetRange.tryCreate(T.s1Range.endExclusive,U.start),B=y.OffsetRange.tryCreate(T.s2Range.endExclusive,O.start);T.deleted+=($=H?.length)!==null&&$!==void 0?$:0,T.added+=(Q=B?.length)!==null&&Q!==void 0?Q:0,T.s1Range=T.s1Range.join(U),T.s2Range=T.s2Range.join(O)}else F(),T={added:0,deleted:0,count:0,s1Range:U,s2Range:O};const te=U.intersect(M.seq1Range),re=O.intersect(M.seq2Range);T.count++,T.deleted+=(se=te?.length)!==null&&se!==void 0?se:0,T.added+=(le=re?.length)!==null&&le!==void 0?le:0};const A=p.findWordContaining(M.seq1Range.start-1),P=L.findWordContaining(M.seq2Range.start-1),x=p.findWordContaining(M.seq1Range.endExclusive),W=L.findWordContaining(M.seq2Range.endExclusive);A&&x&&P&&W&&A.equals(x)&&P.equals(W)?N(A,P):(A&&P&&N(A,P),x&&W&&N(x,W))}return F(),s(E,I)}function s(p,L){const E=[];for(;p.length>0||L.length>0;){const I=p[0],T=L[0];let F;I&&(!T||I.seq1Range.start<T.seq1Range.start)?F=p.shift():F=L.shift(),E.length>0&&E[E.length-1].seq1Range.endExclusive>=F.seq1Range.start?E[E.length-1]=E[E.length-1].join(F):E.push(F)}return E}function r(p,L,E){const I=[];for(const T of g(p.map(F=>c(F,L,E)),(F,R)=>F.originalRange.overlapOrTouch(R.originalRange)||F.modifiedRange.overlapOrTouch(R.modifiedRange))){const F=T[0],R=T[T.length-1];I.push(new n.LineRangeMapping(F.originalRange.join(R.originalRange),F.modifiedRange.join(R.modifiedRange),T.map(M=>M.innerChanges[0])))}return(0,S.assertFn)(()=>(0,S.checkAdjacentItems)(I,(T,F)=>F.originalRange.startLineNumber-T.originalRange.endLineNumberExclusive===F.modifiedRange.startLineNumber-T.modifiedRange.endLineNumberExclusive&&T.originalRange.endLineNumberExclusive<F.originalRange.startLineNumber&&T.modifiedRange.endLineNumberExclusive<F.modifiedRange.startLineNumber)),I}e.lineRangeMappingFromRangeMappings=r;function c(p,L,E){let I=0,T=0;p.modifiedRange.startColumn-1>=E[p.modifiedRange.startLineNumber-1].length&&p.originalRange.startColumn-1>=L[p.originalRange.startLineNumber-1].length&&(I=1),p.modifiedRange.endColumn===1&&p.originalRange.endColumn===1&&p.originalRange.startLineNumber+I<=p.originalRange.endLineNumber&&p.modifiedRange.startLineNumber+I<=p.modifiedRange.endLineNumber&&(T=-1);const F=new k.LineRange(p.originalRange.startLineNumber+I,p.originalRange.endLineNumber+1+T),R=new k.LineRange(p.modifiedRange.startLineNumber+I,p.modifiedRange.endLineNumber+1+T);return new n.LineRangeMapping(F,R,[p])}e.getLineRangeMapping=c;function*g(p,L){let E,I;for(const T of p)I!==void 0&&L(I,T)?E.push(T):(E&&(yield E),E=[T]),I=T;E&&(yield E)}class o{constructor(L,E){this.trimmedHash=L,this.lines=E}getElement(L){return this.trimmedHash[L]}get length(){return this.trimmedHash.length}getBoundaryScore(L){const E=L===0?0:l(this.lines[L-1]),I=L===this.lines.length?0:l(this.lines[L]);return 1e3-(E+I)}}e.LineSequence=o;function l(p){let L=0;for(;L<p.length&&(p.charCodeAt(L)===32||p.charCodeAt(L)===9);)L++;return L}class a{constructor(L,E,I){this.lines=L,this.considerWhitespaceChanges=I,this.elements=[],this.firstCharOffsetByLineMinusOne=[],this.offsetByLine=[];let T=!1;E.start>0&&E.endExclusive>=L.length&&(E=new y.OffsetRange(E.start-1,E.endExclusive),T=!0),this.lineRange=E;for(let F=this.lineRange.start;F<this.lineRange.endExclusive;F++){let R=L[F],M=0;if(T)M=R.length,R="",T=!1;else if(!I){const N=R.trimStart();M=R.length-N.length,R=N.trimEnd()}this.offsetByLine.push(M);for(let N=0;N<R.length;N++)this.elements.push(R.charCodeAt(N));F<L.length-1&&(this.elements.push(`\n`.charCodeAt(0)),this.firstCharOffsetByLineMinusOne[F-this.lineRange.start]=this.elements.length)}this.offsetByLine.push(0)}toString(){return`Slice: "${this.text}"`}get text(){return[...this.elements].map(L=>String.fromCharCode(L)).join("")}getElement(L){return this.elements[L]}get length(){return this.elements.length}getBoundaryScore(L){const E=f(L>0?this.elements[L-1]:-1),I=f(L<this.elements.length?this.elements[L]:-1);if(E===6&&I===7)return 0;let T=0;return E!==I&&(T+=10,I===1&&(T+=1)),T+=C(E),T+=C(I),T}translateOffset(L){if(this.lineRange.isEmpty)return new D.Position(this.lineRange.start+1,1);let E=0,I=this.firstCharOffsetByLineMinusOne.length;for(;E<I;){const F=Math.floor((E+I)/2);this.firstCharOffsetByLineMinusOne[F]>L?I=F:E=F+1}const T=E===0?0:this.firstCharOffsetByLineMinusOne[E-1];return new D.Position(this.lineRange.start+E+1,L-T+1+this.offsetByLine[E])}translateRange(L){return w.Range.fromPositions(this.translateOffset(L.start),this.translateOffset(L.endExclusive))}findWordContaining(L){if(L<0||L>=this.elements.length||!d(this.elements[L]))return;let E=L;for(;E>0&&d(this.elements[E-1]);)E--;let I=L;for(;I<this.elements.length&&d(this.elements[I]);)I++;return new y.OffsetRange(E,I)}}function d(p){return p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57}const u={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:3,[6]:10,[7]:10};function C(p){return u[p]}function f(p){return p===10?7:p===13?6:v(p)?5:p>=97&&p<=122?0:p>=65&&p<=90?1:p>=48&&p<=57?2:p===-1?3:4}function v(p){return p===32||p===9}}),define(J[458],ee([1,0,456,457]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linesDiffComputers=void 0,e.linesDiffComputers={smart:new S.SmartLinesDiffComputer,experimental:new k.StandardLinesDiffComputer}}),define(J[255],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class S{constructor(y,D,w,b,_,h){this.id=y,this.label=D,this.alias=w,this._precondition=b,this._run=_,this._contextKeyService=h}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(y){return this.isSupported()?this._run(y):Promise.resolve(void 0)}}e.InternalEditorAction=S}),define(J[166],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorType=void 0,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}}),define(J[167],ee([1,0,166]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeEditor=e.isCompositeEditor=e.isDiffEditor=e.isCodeEditor=void 0;function k(b){return b&&typeof b.getEditorType=="function"?b.getEditorType()===S.EditorType.ICodeEditor:!1}e.isCodeEditor=k;function y(b){return b&&typeof b.getEditorType=="function"?b.getEditorType()===S.EditorType.IDiffEditor:!1}e.isDiffEditor=y;function D(b){return!!b&&typeof b=="object"&&typeof b.onDidChangeActiveEditor=="function"}e.isCompositeEditor=D;function w(b){return k(b)?b:y(b)?b.getModifiedEditor():D(b)&&k(b.activeCodeEditor)?b.activeCodeEditor:null}e.getCodeEditor=w}),define(J[256],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditorFeatures=e.registerEditorFeature=void 0;const S=[];function k(D){S.push(D)}e.registerEditorFeature=k;function y(){return S.slice(0)}e.getEditorFeatures=y}),define(J[459],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTheme=void 0;class S{get type(){return this._theme.type}get value(){return this._theme}constructor(y){this._theme=y}update(y){this._theme=y}getColor(y){return this._theme.getColor(y)}}e.EditorTheme=S}),define(J[119],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMetadata=void 0;class S{static getLanguageId(y){return(y&255)>>>0}static getTokenType(y){return(y&768)>>>8}static containsBalancedBrackets(y){return(y&1024)!==0}static getFontStyle(y){return(y&30720)>>>11}static getForeground(y){return(y&16744448)>>>15}static getBackground(y){return(y&4278190080)>>>24}static getClassNameFromMetadata(y){let w="mtk"+this.getForeground(y);const b=this.getFontStyle(y);return b&1&&(w+=" mtki"),b&2&&(w+=" mtkb"),b&4&&(w+=" mtku"),b&8&&(w+=" mtks"),w}static getInlineStyleFromMetadata(y,D){const w=this.getForeground(y),b=this.getFontStyle(y);let _=`color: ${D[w]};`;b&1&&(_+="font-style: italic;"),b&2&&(_+="font-weight: bold;");let h="";return b&4&&(h+=" underline"),b&8&&(h+=" line-through"),h&&(_+=`text-decoration:${h};`),_}static getPresentationFromMetadata(y){const D=this.getForeground(y),w=this.getFontStyle(y);return{foreground:D,italic:!!(w&1),bold:!!(w&2),underline:!!(w&4),strikethrough:!!(w&8)}}}e.TokenMetadata=S}),define(J[104],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var S;(function(w){w[w.None=0]="None",w[w.Indent=1]="Indent",w[w.IndentOutdent=2]="IndentOutdent",w[w.Outdent=3]="Outdent"})(S=e.IndentAction||(e.IndentAction={}));class k{constructor(b){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=b.open,this.close=b.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(b.notIn))for(let _=0,h=b.notIn.length;_<h;_++)switch(b.notIn[_]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(b){switch(b){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(b,_){if(b.getTokenCount()===0)return!0;const h=b.findTokenIndexAtOffset(_-2),m=b.getStandardTokenType(h);return this.isOK(m)}_findNeutralCharacterInRange(b,_){for(let h=b;h<=_;h++){const m=String.fromCharCode(h);if(!this.open.includes(m)&&!this.close.includes(m))return m}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}e.StandardAutoClosingPairConditional=k;class y{constructor(b){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const _ of b)D(this.autoClosingPairsOpenByStart,_.open.charAt(0),_),D(this.autoClosingPairsOpenByEnd,_.open.charAt(_.open.length-1),_),D(this.autoClosingPairsCloseByStart,_.close.charAt(0),_),D(this.autoClosingPairsCloseByEnd,_.close.charAt(_.close.length-1),_),_.close.length===1&&_.open.length===1&&D(this.autoClosingPairsCloseSingleChar,_.close,_)}}e.AutoClosingPairs=y;function D(w,b,_){w.has(b)?w.get(b).push(_):w.set(b,[_])}}),define(J[460],ee([1,0,115]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=void 0;class k{constructor(t,i,s){const r=new Uint8Array(t*i);for(let c=0,g=t*i;c<g;c++)r[c]=s;this._data=r,this.rows=t,this.cols=i}get(t,i){return this._data[t*this.cols+i]}set(t,i,s){this._data[t*this.cols+i]=s}}class y{constructor(t){let i=0,s=0;for(let c=0,g=t.length;c<g;c++){const[o,l,a]=t[c];l>i&&(i=l),o>s&&(s=o),a>s&&(s=a)}i++,s++;const r=new k(s,i,0);for(let c=0,g=t.length;c<g;c++){const[o,l,a]=t[c];r.set(o,l,a)}this._states=r,this._maxCharCode=i}nextState(t,i){return i<0||i>=this._maxCharCode?0:this._states.get(t,i)}}e.StateMachine=y;let D=null;function w(){return D===null&&(D=new y([[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]])),D}let b=null;function _(){if(b===null){b=new S.CharacterClassifier(0);const n=` \t<>\'"\\u3001\\u3002\\uFF61\\uFF64\\uFF0C\\uFF0E\\uFF1A\\uFF1B\\u2018\\u3008\\u300C\\u300E\\u3014\\uFF08\\uFF3B\\uFF5B\\uFF62\\uFF63\\uFF5D\\uFF3D\\uFF09\\u3015\\u300F\\u300D\\u3009\\u2019\\uFF40\\uFF5E\\u2026`;for(let i=0;i<n.length;i++)b.set(n.charCodeAt(i),1);const t=".,;:";for(let i=0;i<t.length;i++)b.set(t.charCodeAt(i),2)}return b}class h{static _createLink(t,i,s,r,c){let g=c-1;do{const o=i.charCodeAt(g);if(t.get(o)!==2)break;g--}while(g>r);if(r>0){const o=i.charCodeAt(r-1),l=i.charCodeAt(g);(o===40&&l===41||o===91&&l===93||o===123&&l===125)&&g--}return{range:{startLineNumber:s,startColumn:r+1,endLineNumber:s,endColumn:g+2},url:i.substring(r,g+1)}}static computeLinks(t,i=w()){const s=_(),r=[];for(let c=1,g=t.getLineCount();c<=g;c++){const o=t.getLineContent(c),l=o.length;let a=0,d=0,u=0,C=1,f=!1,v=!1,p=!1,L=!1;for(;a<l;){let E=!1;const I=o.charCodeAt(a);if(C===13){let T;switch(I){case 40:f=!0,T=0;break;case 41:T=f?0:1;break;case 91:p=!0,v=!0,T=0;break;case 93:p=!1,T=v?0:1;break;case 123:L=!0,T=0;break;case 125:T=L?0:1;break;case 39:case 34:case 96:u===I?T=1:u===39||u===34||u===96?T=0:T=1;break;case 42:T=u===42?1:0;break;case 124:T=u===124?1:0;break;case 32:T=p?0:1;break;default:T=s.get(I)}T===1&&(r.push(h._createLink(s,o,c,d,a)),E=!0)}else if(C===12){let T;I===91?(v=!0,T=0):T=s.get(I),T===1?E=!0:C=13}else C=i.nextState(C,I),C===0&&(E=!0);E&&(C=1,f=!1,v=!1,L=!1,d=a+1,u=I),a++}C===13&&r.push(h._createLink(s,o,c,d,l))}return r}}e.LinkComputer=h;function m(n){return!n||typeof n.getLineCount!="function"||typeof n.getLineContent!="function"?[]:h.computeLinks(n)}e.computeLinks=m}),define(J[120],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function S(D,w){const b=D.getCount(),_=D.findTokenIndexAtOffset(w),h=D.getLanguageId(_);let m=_;for(;m+1<b&&D.getLanguageId(m+1)===h;)m++;let n=_;for(;n>0&&D.getLanguageId(n-1)===h;)n--;return new k(D,h,n,m+1,D.getStartOffset(n),D.getEndOffset(m))}e.createScopedLineTokens=S;class k{constructor(w,b,_,h,m,n){this._scopedLineTokensBrand=void 0,this._actual=w,this.languageId=b,this._firstTokenIndex=_,this._lastTokenIndex=h,this.firstCharOffset=m,this._lastCharOffset=n}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(w){return this._actual.getLineContent().substring(0,this.firstCharOffset+w)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(w){return this._actual.findTokenIndexAtOffset(w+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(w){return this._actual.getStandardTokenType(w+this._firstTokenIndex)}}e.ScopedLineTokens=k;function y(D){return(D&3)!==0}e.ignoreBracketsInToken=y}),define(J[65],ee([1,0,13,5,23,120,75,187]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQuote=e.EditOperationResult=e.SingleCursorState=e.PartialViewCursorState=e.PartialModelCursorState=e.CursorState=e.CursorConfiguration=void 0;const _=()=>!0,h=()=>!1,m=o=>o===" "||o==="\t";class n{static shouldRecreate(l){return l.hasChanged(139)||l.hasChanged(125)||l.hasChanged(35)||l.hasChanged(74)||l.hasChanged(76)||l.hasChanged(77)||l.hasChanged(5)||l.hasChanged(9)||l.hasChanged(7)||l.hasChanged(8)||l.hasChanged(12)||l.hasChanged(123)||l.hasChanged(48)||l.hasChanged(87)}constructor(l,a,d,u){this.languageConfigurationService=u,this._cursorMoveConfigurationBrand=void 0,this._languageId=l;const C=d.options,f=C.get(139),v=C.get(48);this.readOnly=C.get(87),this.tabSize=a.tabSize,this.indentSize=a.indentSize,this.insertSpaces=a.insertSpaces,this.stickyTabStops=C.get(111),this.lineHeight=v.lineHeight,this.typicalHalfwidthCharacterWidth=v.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(f.height/this.lineHeight)-2),this.useTabStops=C.get(123),this.wordSeparators=C.get(125),this.emptySelectionClipboard=C.get(35),this.copyWithSyntaxHighlighting=C.get(23),this.multiCursorMergeOverlapping=C.get(74),this.multiCursorPaste=C.get(76),this.multiCursorLimit=C.get(77),this.autoClosingBrackets=C.get(5),this.autoClosingQuotes=C.get(9),this.autoClosingDelete=C.get(7),this.autoClosingOvertype=C.get(8),this.autoSurround=C.get(12),this.autoIndent=C.get(10),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(l,this.autoClosingQuotes,!0),bracket:this._getShouldAutoClose(l,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(l).getAutoClosingPairs();const p=this.languageConfigurationService.getLanguageConfiguration(l).getSurroundingPairs();if(p)for(const L of p)this.surroundingPairs[L.open]=L.close}get electricChars(){var l;if(!this._electricChars){this._electricChars={};const a=(l=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||l===void 0?void 0:l.getElectricCharacters();if(a)for(const d of a)this._electricChars[d]=!0}return this._electricChars}onElectricCharacter(l,a,d){const u=(0,D.createScopedLineTokens)(a,d-1),C=this.languageConfigurationService.getLanguageConfiguration(u.languageId).electricCharacter;return C?C.onElectricCharacter(l,u,d-u.firstCharOffset):null}normalizeIndentation(l){return(0,b.normalizeIndentation)(l,this.indentSize,this.insertSpaces)}_getShouldAutoClose(l,a,d){switch(a){case"beforeWhitespace":return m;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(l,d);case"always":return _;case"never":return h}}_getLanguageDefinedShouldAutoClose(l,a){const d=this.languageConfigurationService.getLanguageConfiguration(l).getAutoCloseBeforeSet(a);return u=>d.indexOf(u)!==-1}visibleColumnFromColumn(l,a){return w.CursorColumns.visibleColumnFromColumn(l.getLineContent(a.lineNumber),a.column,this.tabSize)}columnFromVisibleColumn(l,a,d){const u=w.CursorColumns.columnFromVisibleColumn(l.getLineContent(a),d,this.tabSize),C=l.getLineMinColumn(a);if(u<C)return C;const f=l.getLineMaxColumn(a);return u>f?f:u}}e.CursorConfiguration=n;class t{static fromModelState(l){return new i(l)}static fromViewState(l){return new s(l)}static fromModelSelection(l){const a=y.Selection.liftSelection(l),d=new r(k.Range.fromPositions(a.getSelectionStart()),0,0,a.getPosition(),0);return t.fromModelState(d)}static fromModelSelections(l){const a=[];for(let d=0,u=l.length;d<u;d++)a[d]=this.fromModelSelection(l[d]);return a}constructor(l,a){this._cursorStateBrand=void 0,this.modelState=l,this.viewState=a}equals(l){return this.viewState.equals(l.viewState)&&this.modelState.equals(l.modelState)}}e.CursorState=t;class i{constructor(l){this.modelState=l,this.viewState=null}}e.PartialModelCursorState=i;class s{constructor(l){this.modelState=null,this.viewState=l}}e.PartialViewCursorState=s;class r{constructor(l,a,d,u,C){this.selectionStart=l,this.selectionStartKind=a,this.selectionStartLeftoverVisibleColumns=d,this.position=u,this.leftoverVisibleColumns=C,this._singleCursorStateBrand=void 0,this.selection=r._computeSelection(this.selectionStart,this.position)}equals(l){return this.selectionStartLeftoverVisibleColumns===l.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===l.leftoverVisibleColumns&&this.selectionStartKind===l.selectionStartKind&&this.position.equals(l.position)&&this.selectionStart.equalsRange(l.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(l,a,d,u){return l?new r(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new S.Position(a,d),u):new r(new k.Range(a,d,a,d),0,u,new S.Position(a,d),u)}static _computeSelection(l,a){return l.isEmpty()||!a.isBeforeOrEqual(l.getStartPosition())?y.Selection.fromPositions(l.getStartPosition(),a):y.Selection.fromPositions(l.getEndPosition(),a)}}e.SingleCursorState=r;class c{constructor(l,a,d){this._editOperationResultBrand=void 0,this.type=l,this.commands=a,this.shouldPushStackElementBefore=d.shouldPushStackElementBefore,this.shouldPushStackElementAfter=d.shouldPushStackElementAfter}}e.EditOperationResult=c;function g(o){return o==="\'"||o===\'"\'||o==="`"}e.isQuote=g}),define(J[461],ee([1,0,65,13,5]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class D{static columnSelect(b,_,h,m,n,t){const i=Math.abs(n-h)+1,s=h>n,r=m>t,c=m<t,g=[];for(let o=0;o<i;o++){const l=h+(s?-o:o),a=b.columnFromVisibleColumn(_,l,m),d=b.columnFromVisibleColumn(_,l,t),u=b.visibleColumnFromColumn(_,new k.Position(l,a)),C=b.visibleColumnFromColumn(_,new k.Position(l,d));c&&(u>t||C<m)||r&&(C>m||u<t)||g.push(new S.SingleCursorState(new y.Range(l,a,l,a),0,0,new k.Position(l,d),0))}if(g.length===0)for(let o=0;o<i;o++){const l=h+(s?-o:o),a=_.getLineMaxColumn(l);g.push(new S.SingleCursorState(new y.Range(l,a,l,a),0,0,new k.Position(l,a),0))}return{viewStates:g,reversed:s,fromLineNumber:h,fromVisualColumn:m,toLineNumber:n,toVisualColumn:t}}static columnSelectLeft(b,_,h){let m=h.toViewVisualColumn;return m>0&&m--,D.columnSelect(b,_,h.fromViewLineNumber,h.fromViewVisualColumn,h.toViewLineNumber,m)}static columnSelectRight(b,_,h){let m=0;const n=Math.min(h.fromViewLineNumber,h.toViewLineNumber),t=Math.max(h.fromViewLineNumber,h.toViewLineNumber);for(let s=n;s<=t;s++){const r=_.getLineMaxColumn(s),c=b.visibleColumnFromColumn(_,new k.Position(s,r));m=Math.max(m,c)}let i=h.toViewVisualColumn;return i<m&&i++,this.columnSelect(b,_,h.fromViewLineNumber,h.fromViewVisualColumn,h.toViewLineNumber,i)}static columnSelectUp(b,_,h,m){const n=m?b.pageSize:1,t=Math.max(1,h.toViewLineNumber-n);return this.columnSelect(b,_,h.fromViewLineNumber,h.fromViewVisualColumn,t,h.toViewVisualColumn)}static columnSelectDown(b,_,h,m){const n=m?b.pageSize:1,t=Math.min(_.getLineCount(),h.toViewLineNumber+n);return this.columnSelect(b,_,h.fromViewLineNumber,h.fromViewVisualColumn,t,h.toViewVisualColumn)}}e.ColumnSelection=D}),define(J[188],ee([1,0,65,75,13,5,9,254]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class _{constructor(n,t,i){this._cursorPositionBrand=void 0,this.lineNumber=n,this.column=t,this.leftoverVisibleColumns=i}}e.CursorPosition=_;class h{static leftPosition(n,t){if(t.column>n.getLineMinColumn(t.lineNumber))return t.delta(void 0,-w.prevCharLength(n.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new y.Position(i,n.getLineMaxColumn(i))}else return t}static leftPositionAtomicSoftTabs(n,t,i){if(t.column<=n.getLineIndentColumn(t.lineNumber)){const s=n.getLineMinColumn(t.lineNumber),r=n.getLineContent(t.lineNumber),c=b.AtomicTabMoveOperations.atomicPosition(r,t.column-1,i,0);if(c!==-1&&c+1>=s)return new y.Position(t.lineNumber,c+1)}return this.leftPosition(n,t)}static left(n,t,i){const s=n.stickyTabStops?h.leftPositionAtomicSoftTabs(t,i,n.tabSize):h.leftPosition(t,i);return new _(s.lineNumber,s.column,0)}static moveLeft(n,t,i,s,r){let c,g;if(i.hasSelection()&&!s)c=i.selection.startLineNumber,g=i.selection.startColumn;else{const o=i.position.delta(void 0,-(r-1)),l=t.normalizePosition(h.clipPositionColumn(o,t),0),a=h.left(n,t,l);c=a.lineNumber,g=a.column}return i.move(s,c,g,0)}static clipPositionColumn(n,t){return new y.Position(n.lineNumber,h.clipRange(n.column,t.getLineMinColumn(n.lineNumber),t.getLineMaxColumn(n.lineNumber)))}static clipRange(n,t,i){return n<t?t:n>i?i:n}static rightPosition(n,t,i){return i<n.getLineMaxColumn(t)?i=i+w.nextCharLength(n.getLineContent(t),i-1):t<n.getLineCount()&&(t=t+1,i=n.getLineMinColumn(t)),new y.Position(t,i)}static rightPositionAtomicSoftTabs(n,t,i,s,r){if(i<n.getLineIndentColumn(t)){const c=n.getLineContent(t),g=b.AtomicTabMoveOperations.atomicPosition(c,i-1,s,1);if(g!==-1)return new y.Position(t,g+1)}return this.rightPosition(n,t,i)}static right(n,t,i){const s=n.stickyTabStops?h.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,n.tabSize,n.indentSize):h.rightPosition(t,i.lineNumber,i.column);return new _(s.lineNumber,s.column,0)}static moveRight(n,t,i,s,r){let c,g;if(i.hasSelection()&&!s)c=i.selection.endLineNumber,g=i.selection.endColumn;else{const o=i.position.delta(void 0,r-1),l=t.normalizePosition(h.clipPositionColumn(o,t),1),a=h.right(n,t,l);c=a.lineNumber,g=a.column}return i.move(s,c,g,0)}static vertical(n,t,i,s,r,c,g,o){const l=k.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),s,n.tabSize)+r,a=t.getLineCount(),d=i===1&&s===1,u=i===a&&s===t.getLineMaxColumn(i),C=c<i?d:u;if(i=c,i<1?(i=1,g?s=t.getLineMinColumn(i):s=Math.min(t.getLineMaxColumn(i),s)):i>a?(i=a,g?s=t.getLineMaxColumn(i):s=Math.min(t.getLineMaxColumn(i),s)):s=n.columnFromVisibleColumn(t,i,l),C?r=0:r=l-k.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),s,n.tabSize),o!==void 0){const f=new y.Position(i,s),v=t.normalizePosition(f,o);r=r+(s-v.column),i=v.lineNumber,s=v.column}return new _(i,s,r)}static down(n,t,i,s,r,c,g){return this.vertical(n,t,i,s,r,i+c,g,4)}static moveDown(n,t,i,s,r){let c,g;i.hasSelection()&&!s?(c=i.selection.endLineNumber,g=i.selection.endColumn):(c=i.position.lineNumber,g=i.position.column);const o=h.down(n,t,c,g,i.leftoverVisibleColumns,r,!0);return i.move(s,o.lineNumber,o.column,o.leftoverVisibleColumns)}static translateDown(n,t,i){const s=i.selection,r=h.down(n,t,s.selectionStartLineNumber,s.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),c=h.down(n,t,s.positionLineNumber,s.positionColumn,i.leftoverVisibleColumns,1,!1);return new S.SingleCursorState(new D.Range(r.lineNumber,r.column,r.lineNumber,r.column),0,r.leftoverVisibleColumns,new y.Position(c.lineNumber,c.column),c.leftoverVisibleColumns)}static up(n,t,i,s,r,c,g){return this.vertical(n,t,i,s,r,i-c,g,3)}static moveUp(n,t,i,s,r){let c,g;i.hasSelection()&&!s?(c=i.selection.startLineNumber,g=i.selection.startColumn):(c=i.position.lineNumber,g=i.position.column);const o=h.up(n,t,c,g,i.leftoverVisibleColumns,r,!0);return i.move(s,o.lineNumber,o.column,o.leftoverVisibleColumns)}static translateUp(n,t,i){const s=i.selection,r=h.up(n,t,s.selectionStartLineNumber,s.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),c=h.up(n,t,s.positionLineNumber,s.positionColumn,i.leftoverVisibleColumns,1,!1);return new S.SingleCursorState(new D.Range(r.lineNumber,r.column,r.lineNumber,r.column),0,r.leftoverVisibleColumns,new y.Position(c.lineNumber,c.column),c.leftoverVisibleColumns)}static _isBlankLine(n,t){return n.getLineFirstNonWhitespaceColumn(t)===0}static moveToPrevBlankLine(n,t,i,s){let r=i.position.lineNumber;for(;r>1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return i.move(s,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(n,t,i,s){const r=t.getLineCount();let c=i.position.lineNumber;for(;c<r&&this._isBlankLine(t,c);)c++;for(;c<r&&!this._isBlankLine(t,c);)c++;return i.move(s,c,t.getLineMinColumn(c),0)}static moveToBeginningOfLine(n,t,i,s){const r=i.position.lineNumber,c=t.getLineMinColumn(r),g=t.getLineFirstNonWhitespaceColumn(r)||c;let o;return i.position.column===g?o=c:o=g,i.move(s,r,o,0)}static moveToEndOfLine(n,t,i,s,r){const c=i.position.lineNumber,g=t.getLineMaxColumn(c);return i.move(s,c,g,r?1073741824-g:0)}static moveToBeginningOfBuffer(n,t,i,s){return i.move(s,1,1,0)}static moveToEndOfBuffer(n,t,i,s){const r=t.getLineCount(),c=t.getLineMaxColumn(r);return i.move(s,r,c,0)}}e.MoveOperations=h}),define(J[189],ee([1,0,9,118,65,75,188,5,13]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class h{static deleteRight(n,t,i,s){const r=[];let c=n!==3;for(let g=0,o=s.length;g<o;g++){const l=s[g];let a=l;if(a.isEmpty()){const d=l.getPosition(),u=w.MoveOperations.right(t,i,d);a=new b.Range(u.lineNumber,u.column,d.lineNumber,d.column)}if(a.isEmpty()){r[g]=null;continue}a.startLineNumber!==a.endLineNumber&&(c=!0),r[g]=new k.ReplaceCommand(a,"")}return[c,r]}static isAutoClosingPairDelete(n,t,i,s,r,c,g){if(t==="never"&&i==="never"||n==="never")return!1;for(let o=0,l=c.length;o<l;o++){const a=c[o],d=a.getPosition();if(!a.isEmpty())return!1;const u=r.getLineContent(d.lineNumber);if(d.column<2||d.column>=u.length+1)return!1;const C=u.charAt(d.column-2),f=s.get(C);if(!f)return!1;if((0,y.isQuote)(C)){if(i==="never")return!1}else if(t==="never")return!1;const v=u.charAt(d.column-1);let p=!1;for(const L of f)L.open===C&&L.close===v&&(p=!0);if(!p)return!1;if(n==="auto"){let L=!1;for(let E=0,I=g.length;E<I;E++){const T=g[E];if(d.lineNumber===T.startLineNumber&&d.column===T.startColumn){L=!0;break}}if(!L)return!1}}return!0}static _runAutoClosingPairDelete(n,t,i){const s=[];for(let r=0,c=i.length;r<c;r++){const g=i[r].getPosition(),o=new b.Range(g.lineNumber,g.column-1,g.lineNumber,g.column+1);s[r]=new k.ReplaceCommand(o,"")}return[!0,s]}static deleteLeft(n,t,i,s,r){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,s,r))return this._runAutoClosingPairDelete(t,i,s);const c=[];let g=n!==2;for(let o=0,l=s.length;o<l;o++){const a=h.getDeleteRange(s[o],i,t);if(a.isEmpty()){c[o]=null;continue}a.startLineNumber!==a.endLineNumber&&(g=!0),c[o]=new k.ReplaceCommand(a,"")}return[g,c]}static getDeleteRange(n,t,i){if(!n.isEmpty())return n;const s=n.getPosition();if(i.useTabStops&&s.column>1){const r=t.getLineContent(s.lineNumber),c=S.firstNonWhitespaceIndex(r),g=c===-1?r.length+1:c+1;if(s.column<=g){const o=i.visibleColumnFromColumn(t,s),l=D.CursorColumns.prevIndentTabStop(o,i.indentSize),a=i.columnFromVisibleColumn(t,s.lineNumber,l);return new b.Range(s.lineNumber,a,s.lineNumber,s.column)}}return b.Range.fromPositions(h.getPositionAfterDeleteLeft(s,t),s)}static getPositionAfterDeleteLeft(n,t){if(n.column>1){const i=S.getLeftDeleteOffset(n.column-1,t.getLineContent(n.lineNumber));return n.with(void 0,i+1)}else if(n.lineNumber>1){const i=n.lineNumber-1;return new _.Position(i,t.getLineMaxColumn(i))}else return n}static cut(n,t,i){const s=[];let r=null;i.sort((c,g)=>_.Position.compare(c.getStartPosition(),g.getEndPosition()));for(let c=0,g=i.length;c<g;c++){const o=i[c];if(o.isEmpty())if(n.emptySelectionClipboard){const l=o.getPosition();let a,d,u,C;l.lineNumber<t.getLineCount()?(a=l.lineNumber,d=1,u=l.lineNumber+1,C=1):l.lineNumber>1&&r?.endLineNumber!==l.lineNumber?(a=l.lineNumber-1,d=t.getLineMaxColumn(l.lineNumber-1),u=l.lineNumber,C=t.getLineMaxColumn(l.lineNumber)):(a=l.lineNumber,d=1,u=l.lineNumber,C=t.getLineMaxColumn(l.lineNumber));const f=new b.Range(a,d,u,C);r=f,f.isEmpty()?s[c]=null:s[c]=new k.ReplaceCommand(f,"")}else s[c]=null;else s[c]=new k.ReplaceCommand(o,"")}return new y.EditOperationResult(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=h}),define(J[168],ee([1,0,9,65,189,135,13,5]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class _{static _createWord(t,i,s,r,c){return{start:r,end:c,wordType:i,nextCharClass:s}}static _findPreviousWordOnLine(t,i,s){const r=i.getLineContent(s.lineNumber);return this._doFindPreviousWordOnLine(r,t,s)}static _doFindPreviousWordOnLine(t,i,s){let r=0;for(let c=s.column-2;c>=0;c--){const g=t.charCodeAt(c),o=i.get(g);if(o===0){if(r===2)return this._createWord(t,r,o,c+1,this._findEndOfWord(t,i,r,c+1));r=1}else if(o===2){if(r===1)return this._createWord(t,r,o,c+1,this._findEndOfWord(t,i,r,c+1));r=2}else if(o===1&&r!==0)return this._createWord(t,r,o,c+1,this._findEndOfWord(t,i,r,c+1))}return r!==0?this._createWord(t,r,1,0,this._findEndOfWord(t,i,r,0)):null}static _findEndOfWord(t,i,s,r){const c=t.length;for(let g=r;g<c;g++){const o=t.charCodeAt(g),l=i.get(o);if(l===1||s===1&&l===2||s===2&&l===0)return g}return c}static _findNextWordOnLine(t,i,s){const r=i.getLineContent(s.lineNumber);return this._doFindNextWordOnLine(r,t,s)}static _doFindNextWordOnLine(t,i,s){let r=0;const c=t.length;for(let g=s.column-1;g<c;g++){const o=t.charCodeAt(g),l=i.get(o);if(l===0){if(r===2)return this._createWord(t,r,l,this._findStartOfWord(t,i,r,g-1),g);r=1}else if(l===2){if(r===1)return this._createWord(t,r,l,this._findStartOfWord(t,i,r,g-1),g);r=2}else if(l===1&&r!==0)return this._createWord(t,r,l,this._findStartOfWord(t,i,r,g-1),g)}return r!==0?this._createWord(t,r,1,this._findStartOfWord(t,i,r,c-1),c):null}static _findStartOfWord(t,i,s,r){for(let c=r;c>=0;c--){const g=t.charCodeAt(c),o=i.get(g);if(o===1||s===1&&o===2||s===2&&o===0)return c+1}return 0}static moveWordLeft(t,i,s,r){let c=s.lineNumber,g=s.column;g===1&&c>1&&(c=c-1,g=i.getLineMaxColumn(c));let o=_._findPreviousWordOnLine(t,i,new w.Position(c,g));if(r===0)return new w.Position(c,o?o.start+1:1);if(r===1)return o&&o.wordType===2&&o.end-o.start===1&&o.nextCharClass===0&&(o=_._findPreviousWordOnLine(t,i,new w.Position(c,o.start+1))),new w.Position(c,o?o.start+1:1);if(r===3){for(;o&&o.wordType===2;)o=_._findPreviousWordOnLine(t,i,new w.Position(c,o.start+1));return new w.Position(c,o?o.start+1:1)}return o&&g<=o.end+1&&(o=_._findPreviousWordOnLine(t,i,new w.Position(c,o.start+1))),new w.Position(c,o?o.end+1:1)}static _moveWordPartLeft(t,i){const s=i.lineNumber,r=t.getLineMaxColumn(s);if(i.column===1)return s>1?new w.Position(s-1,t.getLineMaxColumn(s-1)):i;const c=t.getLineContent(s);for(let g=i.column-1;g>1;g--){const o=c.charCodeAt(g-2),l=c.charCodeAt(g-1);if(o===95&&l!==95)return new w.Position(s,g);if(o===45&&l!==45)return new w.Position(s,g);if((S.isLowerAsciiLetter(o)||S.isAsciiDigit(o))&&S.isUpperAsciiLetter(l))return new w.Position(s,g);if(S.isUpperAsciiLetter(o)&&S.isUpperAsciiLetter(l)&&g+1<r){const a=c.charCodeAt(g);if(S.isLowerAsciiLetter(a)||S.isAsciiDigit(a))return new w.Position(s,g)}}return new w.Position(s,1)}static moveWordRight(t,i,s,r){let c=s.lineNumber,g=s.column,o=!1;g===i.getLineMaxColumn(c)&&c<i.getLineCount()&&(o=!0,c=c+1,g=1);let l=_._findNextWordOnLine(t,i,new w.Position(c,g));if(r===2)l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=_._findNextWordOnLine(t,i,new w.Position(c,l.end+1))),l?g=l.end+1:g=i.getLineMaxColumn(c);else if(r===3){for(o&&(g=0);l&&(l.wordType===2||l.start+1<=g);)l=_._findNextWordOnLine(t,i,new w.Position(c,l.end+1));l?g=l.start+1:g=i.getLineMaxColumn(c)}else l&&!o&&g>=l.start+1&&(l=_._findNextWordOnLine(t,i,new w.Position(c,l.end+1))),l?g=l.start+1:g=i.getLineMaxColumn(c);return new w.Position(c,g)}static _moveWordPartRight(t,i){const s=i.lineNumber,r=t.getLineMaxColumn(s);if(i.column===r)return s<t.getLineCount()?new w.Position(s+1,1):i;const c=t.getLineContent(s);for(let g=i.column+1;g<r;g++){const o=c.charCodeAt(g-2),l=c.charCodeAt(g-1);if(o!==95&&l===95)return new w.Position(s,g);if(o!==45&&l===45)return new w.Position(s,g);if((S.isLowerAsciiLetter(o)||S.isAsciiDigit(o))&&S.isUpperAsciiLetter(l))return new w.Position(s,g);if(S.isUpperAsciiLetter(o)&&S.isUpperAsciiLetter(l)&&g+1<r){const a=c.charCodeAt(g);if(S.isLowerAsciiLetter(a)||S.isAsciiDigit(a))return new w.Position(s,g)}}return new w.Position(s,r)}static _deleteWordLeftWhitespace(t,i){const s=t.getLineContent(i.lineNumber),r=i.column-2,c=S.lastNonWhitespaceIndex(s,r);return c+1<r?new b.Range(i.lineNumber,c+2,i.lineNumber,i.column):null}static deleteWordLeft(t,i){const s=t.wordSeparators,r=t.model,c=t.selection,g=t.whitespaceHeuristics;if(!c.isEmpty())return c;if(y.DeleteOperations.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,t.model,[t.selection],t.autoClosedCharacters)){const u=t.selection.getPosition();return new b.Range(u.lineNumber,u.column-1,u.lineNumber,u.column+1)}const o=new w.Position(c.positionLineNumber,c.positionColumn);let l=o.lineNumber,a=o.column;if(l===1&&a===1)return null;if(g){const u=this._deleteWordLeftWhitespace(r,o);if(u)return u}let d=_._findPreviousWordOnLine(s,r,o);return i===0?d?a=d.start+1:a>1?a=1:(l--,a=r.getLineMaxColumn(l)):(d&&a<=d.end+1&&(d=_._findPreviousWordOnLine(s,r,new w.Position(l,d.start+1))),d?a=d.end+1:a>1?a=1:(l--,a=r.getLineMaxColumn(l))),new b.Range(l,a,o.lineNumber,o.column)}static deleteInsideWord(t,i,s){if(!s.isEmpty())return s;const r=new w.Position(s.positionLineNumber,s.positionColumn),c=this._deleteInsideWordWhitespace(i,r);return c||this._deleteInsideWordDetermineDeleteRange(t,i,r)}static _charAtIsWhitespace(t,i){const s=t.charCodeAt(i);return s===32||s===9}static _deleteInsideWordWhitespace(t,i){const s=t.getLineContent(i.lineNumber),r=s.length;if(r===0)return null;let c=Math.max(i.column-2,0);if(!this._charAtIsWhitespace(s,c))return null;let g=Math.min(i.column-1,r-1);if(!this._charAtIsWhitespace(s,g))return null;for(;c>0&&this._charAtIsWhitespace(s,c-1);)c--;for(;g+1<r&&this._charAtIsWhitespace(s,g+1);)g++;return new b.Range(i.lineNumber,c+1,i.lineNumber,g+2)}static _deleteInsideWordDetermineDeleteRange(t,i,s){const r=i.getLineContent(s.lineNumber),c=r.length;if(c===0)return s.lineNumber>1?new b.Range(s.lineNumber-1,i.getLineMaxColumn(s.lineNumber-1),s.lineNumber,1):s.lineNumber<i.getLineCount()?new b.Range(s.lineNumber,1,s.lineNumber+1,1):new b.Range(s.lineNumber,1,s.lineNumber,1);const g=u=>u.start+1<=s.column&&s.column<=u.end+1,o=(u,C)=>(u=Math.min(u,s.column),C=Math.max(C,s.column),new b.Range(s.lineNumber,u,s.lineNumber,C)),l=u=>{let C=u.start+1,f=u.end+1,v=!1;for(;f-1<c&&this._charAtIsWhitespace(r,f-1);)v=!0,f++;if(!v)for(;C>1&&this._charAtIsWhitespace(r,C-2);)C--;return o(C,f)},a=_._findPreviousWordOnLine(t,i,s);if(a&&g(a))return l(a);const d=_._findNextWordOnLine(t,i,s);return d&&g(d)?l(d):a&&d?o(a.end+1,d.start+1):a?o(a.start+1,a.end+1):d?o(d.start+1,d.end+1):o(1,c+1)}static _deleteWordPartLeft(t,i){if(!i.isEmpty())return i;const s=i.getPosition(),r=_._moveWordPartLeft(t,s);return new b.Range(s.lineNumber,s.column,r.lineNumber,r.column)}static _findFirstNonWhitespaceChar(t,i){const s=t.length;for(let r=i;r<s;r++){const c=t.charAt(r);if(c!==" "&&c!=="\t")return r}return s}static _deleteWordRightWhitespace(t,i){const s=t.getLineContent(i.lineNumber),r=i.column-1,c=this._findFirstNonWhitespaceChar(s,r);return r+1<c?new b.Range(i.lineNumber,i.column,i.lineNumber,c+1):null}static deleteWordRight(t,i){const s=t.wordSeparators,r=t.model,c=t.selection,g=t.whitespaceHeuristics;if(!c.isEmpty())return c;const o=new w.Position(c.positionLineNumber,c.positionColumn);let l=o.lineNumber,a=o.column;const d=r.getLineCount(),u=r.getLineMaxColumn(l);if(l===d&&a===u)return null;if(g){const f=this._deleteWordRightWhitespace(r,o);if(f)return f}let C=_._findNextWordOnLine(s,r,o);return i===2?C?a=C.end+1:a<u||l===d?a=u:(l++,C=_._findNextWordOnLine(s,r,new w.Position(l,1)),C?a=C.start+1:a=r.getLineMaxColumn(l)):(C&&a>=C.start+1&&(C=_._findNextWordOnLine(s,r,new w.Position(l,C.end+1))),C?a=C.start+1:a<u||l===d?a=u:(l++,C=_._findNextWordOnLine(s,r,new w.Position(l,1)),C?a=C.start+1:a=r.getLineMaxColumn(l))),new b.Range(l,a,o.lineNumber,o.column)}static _deleteWordPartRight(t,i){if(!i.isEmpty())return i;const s=i.getPosition(),r=_._moveWordPartRight(t,s);return new b.Range(s.lineNumber,s.column,r.lineNumber,r.column)}static _createWordAtPosition(t,i,s){const r=new b.Range(i,s.start+1,i,s.end+1);return{word:t.getValueInRange(r),startColumn:r.startColumn,endColumn:r.endColumn}}static getWordAtPosition(t,i,s){const r=(0,D.getMapForWordSeparators)(i),c=_._findPreviousWordOnLine(r,t,s);if(c&&c.wordType===1&&c.start<=s.column-1&&s.column-1<=c.end)return _._createWordAtPosition(t,s.lineNumber,c);const g=_._findNextWordOnLine(r,t,s);return g&&g.wordType===1&&g.start<=s.column-1&&s.column-1<=g.end?_._createWordAtPosition(t,s.lineNumber,g):null}static word(t,i,s,r,c){const g=(0,D.getMapForWordSeparators)(t.wordSeparators),o=_._findPreviousWordOnLine(g,i,c),l=_._findNextWordOnLine(g,i,c);if(!r){let f,v;return o&&o.wordType===1&&o.start<=c.column-1&&c.column-1<=o.end?(f=o.start+1,v=o.end+1):l&&l.wordType===1&&l.start<=c.column-1&&c.column-1<=l.end?(f=l.start+1,v=l.end+1):(o?f=o.end+1:f=1,l?v=l.start+1:v=i.getLineMaxColumn(c.lineNumber)),new k.SingleCursorState(new b.Range(c.lineNumber,f,c.lineNumber,v),1,0,new w.Position(c.lineNumber,v),0)}let a,d;o&&o.wordType===1&&o.start<c.column-1&&c.column-1<o.end?(a=o.start+1,d=o.end+1):l&&l.wordType===1&&l.start<c.column-1&&c.column-1<l.end?(a=l.start+1,d=l.end+1):(a=c.column,d=c.column);const u=c.lineNumber;let C;if(s.selectionStart.containsPosition(c))C=s.selectionStart.endColumn;else if(c.isBeforeOrEqual(s.selectionStart.getStartPosition())){C=a;const f=new w.Position(u,C);s.selectionStart.containsPosition(f)&&(C=s.selectionStart.endColumn)}else{C=d;const f=new w.Position(u,C);s.selectionStart.containsPosition(f)&&(C=s.selectionStart.startColumn)}return s.move(!0,u,C,0)}}e.WordOperations=_;class h extends _{static deleteWordPartLeft(t){const i=m([_.deleteWordLeft(t,0),_.deleteWordLeft(t,2),_._deleteWordPartLeft(t.model,t.selection)]);return i.sort(b.Range.compareRangesUsingEnds),i[2]}static deleteWordPartRight(t){const i=m([_.deleteWordRight(t,0),_.deleteWordRight(t,2),_._deleteWordPartRight(t.model,t.selection)]);return i.sort(b.Range.compareRangesUsingStarts),i[0]}static moveWordPartLeft(t,i,s){const r=m([_.moveWordLeft(t,i,s,0),_.moveWordLeft(t,i,s,2),_._moveWordPartLeft(i,s)]);return r.sort(w.Position.compare),r[2]}static moveWordPartRight(t,i,s){const r=m([_.moveWordRight(t,i,s,0),_.moveWordRight(t,i,s,2),_._moveWordPartRight(i,s)]);return r.sort(w.Position.compare),r[0]}}e.WordPartOperations=h;function m(n){return n.filter(t=>!!t)}}),define(J[190],ee([1,0,18,65,188,168,13,5]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class _{static addCursorDown(n,t,i){const s=[];let r=0;for(let c=0,g=t.length;c<g;c++){const o=t[c];s[r++]=new k.CursorState(o.modelState,o.viewState),i?s[r++]=k.CursorState.fromModelState(y.MoveOperations.translateDown(n.cursorConfig,n.model,o.modelState)):s[r++]=k.CursorState.fromViewState(y.MoveOperations.translateDown(n.cursorConfig,n,o.viewState))}return s}static addCursorUp(n,t,i){const s=[];let r=0;for(let c=0,g=t.length;c<g;c++){const o=t[c];s[r++]=new k.CursorState(o.modelState,o.viewState),i?s[r++]=k.CursorState.fromModelState(y.MoveOperations.translateUp(n.cursorConfig,n.model,o.modelState)):s[r++]=k.CursorState.fromViewState(y.MoveOperations.translateUp(n.cursorConfig,n,o.viewState))}return s}static moveToBeginningOfLine(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r];s[r]=this._moveToLineStart(n,g,i)}return s}static _moveToLineStart(n,t,i){const s=t.viewState.position.column,r=t.modelState.position.column,c=s===r,g=t.viewState.position.lineNumber,o=n.getLineFirstNonWhitespaceColumn(g);return!c&&!(s===o)?this._moveToLineStartByView(n,t,i):this._moveToLineStartByModel(n,t,i)}static _moveToLineStartByView(n,t,i){return k.CursorState.fromViewState(y.MoveOperations.moveToBeginningOfLine(n.cursorConfig,n,t.viewState,i))}static _moveToLineStartByModel(n,t,i){return k.CursorState.fromModelState(y.MoveOperations.moveToBeginningOfLine(n.cursorConfig,n.model,t.modelState,i))}static moveToEndOfLine(n,t,i,s){const r=[];for(let c=0,g=t.length;c<g;c++){const o=t[c];r[c]=this._moveToLineEnd(n,o,i,s)}return r}static _moveToLineEnd(n,t,i,s){const r=t.viewState.position,c=n.getLineMaxColumn(r.lineNumber),g=r.column===c,o=t.modelState.position,l=n.model.getLineMaxColumn(o.lineNumber),a=c-r.column===l-o.column;return g||a?this._moveToLineEndByModel(n,t,i,s):this._moveToLineEndByView(n,t,i,s)}static _moveToLineEndByView(n,t,i,s){return k.CursorState.fromViewState(y.MoveOperations.moveToEndOfLine(n.cursorConfig,n,t.viewState,i,s))}static _moveToLineEndByModel(n,t,i,s){return k.CursorState.fromModelState(y.MoveOperations.moveToEndOfLine(n.cursorConfig,n.model,t.modelState,i,s))}static expandLineSelection(n,t){const i=[];for(let s=0,r=t.length;s<r;s++){const c=t[s],g=c.modelState.selection.startLineNumber,o=n.model.getLineCount();let l=c.modelState.selection.endLineNumber,a;l===o?a=n.model.getLineMaxColumn(o):(l++,a=1),i[s]=k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(g,1,g,1),0,0,new w.Position(l,a),0))}return i}static moveToBeginningOfBuffer(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r];s[r]=k.CursorState.fromModelState(y.MoveOperations.moveToBeginningOfBuffer(n.cursorConfig,n.model,g.modelState,i))}return s}static moveToEndOfBuffer(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r];s[r]=k.CursorState.fromModelState(y.MoveOperations.moveToEndOfBuffer(n.cursorConfig,n.model,g.modelState,i))}return s}static selectAll(n,t){const i=n.model.getLineCount(),s=n.model.getLineMaxColumn(i);return k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(1,1,1,1),0,0,new w.Position(i,s),0))}static line(n,t,i,s,r){const c=n.model.validatePosition(s),g=r?n.coordinatesConverter.validateViewPosition(new w.Position(r.lineNumber,r.column),c):n.coordinatesConverter.convertModelPositionToViewPosition(c);if(!i){const l=n.model.getLineCount();let a=c.lineNumber+1,d=1;return a>l&&(a=l,d=n.model.getLineMaxColumn(a)),k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(c.lineNumber,1,a,d),2,0,new w.Position(a,d),0))}const o=t.modelState.selectionStart.getStartPosition().lineNumber;if(c.lineNumber<o)return k.CursorState.fromViewState(t.viewState.move(!0,g.lineNumber,1,0));if(c.lineNumber>o){const l=n.getLineCount();let a=g.lineNumber+1,d=1;return a>l&&(a=l,d=n.getLineMaxColumn(a)),k.CursorState.fromViewState(t.viewState.move(!0,a,d,0))}else{const l=t.modelState.selectionStart.getEndPosition();return k.CursorState.fromModelState(t.modelState.move(!0,l.lineNumber,l.column,0))}}static word(n,t,i,s){const r=n.model.validatePosition(s);return k.CursorState.fromModelState(D.WordOperations.word(n.cursorConfig,n.model,t.modelState,i,r))}static cancelSelection(n,t){if(!t.modelState.hasSelection())return new k.CursorState(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,s=t.viewState.position.column;return k.CursorState.fromViewState(new k.SingleCursorState(new b.Range(i,s,i,s),0,0,new w.Position(i,s),0))}static moveTo(n,t,i,s,r){if(i){if(t.modelState.selectionStartKind===1)return this.word(n,t,i,s);if(t.modelState.selectionStartKind===2)return this.line(n,t,i,s,r)}const c=n.model.validatePosition(s),g=r?n.coordinatesConverter.validateViewPosition(new w.Position(r.lineNumber,r.column),c):n.coordinatesConverter.convertModelPositionToViewPosition(c);return k.CursorState.fromViewState(t.viewState.move(i,g.lineNumber,g.column,0))}static simpleMove(n,t,i,s,r,c){switch(i){case 0:return c===4?this._moveHalfLineLeft(n,t,s):this._moveLeft(n,t,s,r);case 1:return c===4?this._moveHalfLineRight(n,t,s):this._moveRight(n,t,s,r);case 2:return c===2?this._moveUpByViewLines(n,t,s,r):this._moveUpByModelLines(n,t,s,r);case 3:return c===2?this._moveDownByViewLines(n,t,s,r):this._moveDownByModelLines(n,t,s,r);case 4:return c===2?t.map(g=>k.CursorState.fromViewState(y.MoveOperations.moveToPrevBlankLine(n.cursorConfig,n,g.viewState,s))):t.map(g=>k.CursorState.fromModelState(y.MoveOperations.moveToPrevBlankLine(n.cursorConfig,n.model,g.modelState,s)));case 5:return c===2?t.map(g=>k.CursorState.fromViewState(y.MoveOperations.moveToNextBlankLine(n.cursorConfig,n,g.viewState,s))):t.map(g=>k.CursorState.fromModelState(y.MoveOperations.moveToNextBlankLine(n.cursorConfig,n.model,g.modelState,s)));case 6:return this._moveToViewMinColumn(n,t,s);case 7:return this._moveToViewFirstNonWhitespaceColumn(n,t,s);case 8:return this._moveToViewCenterColumn(n,t,s);case 9:return this._moveToViewMaxColumn(n,t,s);case 10:return this._moveToViewLastNonWhitespaceColumn(n,t,s);default:return null}}static viewportMove(n,t,i,s,r){const c=n.getCompletelyVisibleViewRange(),g=n.coordinatesConverter.convertViewRangeToModelRange(c);switch(i){case 11:{const o=this._firstLineNumberInRange(n.model,g,r),l=n.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(n,t[0],s,o,l)]}case 13:{const o=this._lastLineNumberInRange(n.model,g,r),l=n.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(n,t[0],s,o,l)]}case 12:{const o=Math.round((g.startLineNumber+g.endLineNumber)/2),l=n.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(n,t[0],s,o,l)]}case 14:{const o=[];for(let l=0,a=t.length;l<a;l++){const d=t[l];o[l]=this.findPositionInViewportIfOutside(n,d,c,s)}return o}default:return null}}static findPositionInViewportIfOutside(n,t,i,s){const r=t.viewState.position.lineNumber;if(i.startLineNumber<=r&&r<=i.endLineNumber-1)return new k.CursorState(t.modelState,t.viewState);{let c;r>i.endLineNumber-1?c=i.endLineNumber-1:r<i.startLineNumber?c=i.startLineNumber:c=r;const g=y.MoveOperations.vertical(n.cursorConfig,n,r,t.viewState.position.column,t.viewState.leftoverVisibleColumns,c,!1);return k.CursorState.fromViewState(t.viewState.move(s,g.lineNumber,g.column,g.leftoverVisibleColumns))}}static _firstLineNumberInRange(n,t,i){let s=t.startLineNumber;return t.startColumn!==n.getLineMinColumn(s)&&s++,Math.min(t.endLineNumber,s+i-1)}static _lastLineNumberInRange(n,t,i){let s=t.startLineNumber;return t.startColumn!==n.getLineMinColumn(s)&&s++,Math.max(s,t.endLineNumber-i+1)}static _moveLeft(n,t,i,s){return t.map(r=>k.CursorState.fromViewState(y.MoveOperations.moveLeft(n.cursorConfig,n,r.viewState,i,s)))}static _moveHalfLineLeft(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r],o=g.viewState.position.lineNumber,l=Math.round(n.getLineContent(o).length/2);s[r]=k.CursorState.fromViewState(y.MoveOperations.moveLeft(n.cursorConfig,n,g.viewState,i,l))}return s}static _moveRight(n,t,i,s){return t.map(r=>k.CursorState.fromViewState(y.MoveOperations.moveRight(n.cursorConfig,n,r.viewState,i,s)))}static _moveHalfLineRight(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r],o=g.viewState.position.lineNumber,l=Math.round(n.getLineContent(o).length/2);s[r]=k.CursorState.fromViewState(y.MoveOperations.moveRight(n.cursorConfig,n,g.viewState,i,l))}return s}static _moveDownByViewLines(n,t,i,s){const r=[];for(let c=0,g=t.length;c<g;c++){const o=t[c];r[c]=k.CursorState.fromViewState(y.MoveOperations.moveDown(n.cursorConfig,n,o.viewState,i,s))}return r}static _moveDownByModelLines(n,t,i,s){const r=[];for(let c=0,g=t.length;c<g;c++){const o=t[c];r[c]=k.CursorState.fromModelState(y.MoveOperations.moveDown(n.cursorConfig,n.model,o.modelState,i,s))}return r}static _moveUpByViewLines(n,t,i,s){const r=[];for(let c=0,g=t.length;c<g;c++){const o=t[c];r[c]=k.CursorState.fromViewState(y.MoveOperations.moveUp(n.cursorConfig,n,o.viewState,i,s))}return r}static _moveUpByModelLines(n,t,i,s){const r=[];for(let c=0,g=t.length;c<g;c++){const o=t[c];r[c]=k.CursorState.fromModelState(y.MoveOperations.moveUp(n.cursorConfig,n.model,o.modelState,i,s))}return r}static _moveToViewPosition(n,t,i,s,r){return k.CursorState.fromViewState(t.viewState.move(i,s,r,0))}static _moveToModelPosition(n,t,i,s,r){return k.CursorState.fromModelState(t.modelState.move(i,s,r,0))}static _moveToViewMinColumn(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r],o=g.viewState.position.lineNumber,l=n.getLineMinColumn(o);s[r]=this._moveToViewPosition(n,g,i,o,l)}return s}static _moveToViewFirstNonWhitespaceColumn(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r],o=g.viewState.position.lineNumber,l=n.getLineFirstNonWhitespaceColumn(o);s[r]=this._moveToViewPosition(n,g,i,o,l)}return s}static _moveToViewCenterColumn(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r],o=g.viewState.position.lineNumber,l=Math.round((n.getLineMaxColumn(o)+n.getLineMinColumn(o))/2);s[r]=this._moveToViewPosition(n,g,i,o,l)}return s}static _moveToViewMaxColumn(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r],o=g.viewState.position.lineNumber,l=n.getLineMaxColumn(o);s[r]=this._moveToViewPosition(n,g,i,o,l)}return s}static _moveToViewLastNonWhitespaceColumn(n,t,i){const s=[];for(let r=0,c=t.length;r<c;r++){const g=t[r],o=g.viewState.position.lineNumber,l=n.getLineLastNonWhitespaceColumn(o);s[r]=this._moveToViewPosition(n,g,i,o,l)}return s}}e.CursorMoveCommands=_;var h;(function(m){const n=function(i){if(!S.isObject(i))return!1;const s=i;return!(!S.isString(s.to)||!S.isUndefined(s.select)&&!S.isBoolean(s.select)||!S.isUndefined(s.by)&&!S.isString(s.by)||!S.isUndefined(s.value)&&!S.isNumber(s.value))};m.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:\n\t\t\t\t\t* \'to\': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t\'left\', \'right\', \'up\', \'down\', \'prevBlankLine\', \'nextBlankLine\',\n\t\t\t\t\t\t\'wrappedLineStart\', \'wrappedLineEnd\', \'wrappedLineColumnCenter\'\n\t\t\t\t\t\t\'wrappedLineFirstNonWhitespaceCharacter\', \'wrappedLineLastNonWhitespaceCharacter\'\n\t\t\t\t\t\t\'viewPortTop\', \'viewPortCenter\', \'viewPortBottom\', \'viewPortIfOutside\'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* \'by\': Unit to move. Default is computed based on \'to\' value.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t\'line\', \'wrappedLine\', \'character\', \'halfLine\'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* \'value\': Number of units to move. Default is \'1\'.\n\t\t\t\t\t* \'select\': If \'true\' makes the selection. Default is \'false\'.\n\t\t\t\t`,constraint:n,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}}}}]},m.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"},m.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(i){if(!i.to)return null;let s;switch(i.to){case m.RawDirection.Left:s=0;break;case m.RawDirection.Right:s=1;break;case m.RawDirection.Up:s=2;break;case m.RawDirection.Down:s=3;break;case m.RawDirection.PrevBlankLine:s=4;break;case m.RawDirection.NextBlankLine:s=5;break;case m.RawDirection.WrappedLineStart:s=6;break;case m.RawDirection.WrappedLineFirstNonWhitespaceCharacter:s=7;break;case m.RawDirection.WrappedLineColumnCenter:s=8;break;case m.RawDirection.WrappedLineEnd:s=9;break;case m.RawDirection.WrappedLineLastNonWhitespaceCharacter:s=10;break;case m.RawDirection.ViewPortTop:s=11;break;case m.RawDirection.ViewPortBottom:s=13;break;case m.RawDirection.ViewPortCenter:s=12;break;case m.RawDirection.ViewPortIfOutside:s=14;break;default:return null}let r=0;switch(i.by){case m.RawUnit.Line:r=1;break;case m.RawUnit.WrappedLine:r=2;break;case m.RawUnit.Character:r=3;break;case m.RawUnit.HalfLine:r=4;break}return{direction:s,unit:r,select:!!i.select,value:i.value||1}}m.parse=t})(h=e.CursorMove||(e.CursorMove={}))}),define(J[462],ee([1,0,65,13,5,23]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=void 0;class w{constructor(_){this._selTrackedRange=null,this._trackSelection=!0,this._setState(_,new S.SingleCursorState(new y.Range(1,1,1,1),0,0,new k.Position(1,1),0),new S.SingleCursorState(new y.Range(1,1,1,1),0,0,new k.Position(1,1),0))}dispose(_){this._removeTrackedRange(_)}startTrackingSelection(_){this._trackSelection=!0,this._updateTrackedRange(_)}stopTrackingSelection(_){this._trackSelection=!1,this._removeTrackedRange(_)}_updateTrackedRange(_){this._trackSelection&&(this._selTrackedRange=_.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(_){this._selTrackedRange=_.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new S.CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(_){const h=_.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!h.isEmpty()?D.Selection.fromRange(h.collapseToEnd(),this.modelState.selection.getDirection()):D.Selection.fromRange(h,this.modelState.selection.getDirection())}ensureValidState(_){this._setState(_,this.modelState,this.viewState)}setState(_,h,m){this._setState(_,h,m)}static _validatePositionWithCache(_,h,m,n){return h.equals(m)?n:_.normalizePosition(h,2)}static _validateViewState(_,h){const m=h.position,n=h.selectionStart.getStartPosition(),t=h.selectionStart.getEndPosition(),i=_.normalizePosition(m,2),s=this._validatePositionWithCache(_,n,m,i),r=this._validatePositionWithCache(_,t,n,s);return m.equals(i)&&n.equals(s)&&t.equals(r)?h:new S.SingleCursorState(y.Range.fromPositions(s,r),h.selectionStartKind,h.selectionStartLeftoverVisibleColumns+n.column-s.column,i,h.leftoverVisibleColumns+m.column-i.column)}_setState(_,h,m){if(m&&(m=w._validateViewState(_.viewModel,m)),h){const n=_.model.validateRange(h.selectionStart),t=h.selectionStart.equalsRange(n)?h.selectionStartLeftoverVisibleColumns:0,i=_.model.validatePosition(h.position),s=h.position.equals(i)?h.leftoverVisibleColumns:0;h=new S.SingleCursorState(n,h.selectionStartKind,t,i,s)}else{if(!m)return;const n=_.model.validateRange(_.coordinatesConverter.convertViewRangeToModelRange(m.selectionStart)),t=_.model.validatePosition(_.coordinatesConverter.convertViewPositionToModelPosition(m.position));h=new S.SingleCursorState(n,m.selectionStartKind,m.selectionStartLeftoverVisibleColumns,t,m.leftoverVisibleColumns)}if(m){const n=_.coordinatesConverter.validateViewRange(m.selectionStart,h.selectionStart),t=_.coordinatesConverter.validateViewPosition(m.position,h.position);m=new S.SingleCursorState(n,h.selectionStartKind,h.selectionStartLeftoverVisibleColumns,t,h.leftoverVisibleColumns)}else{const n=_.coordinatesConverter.convertModelPositionToViewPosition(new k.Position(h.selectionStart.startLineNumber,h.selectionStart.startColumn)),t=_.coordinatesConverter.convertModelPositionToViewPosition(new k.Position(h.selectionStart.endLineNumber,h.selectionStart.endColumn)),i=new y.Range(n.lineNumber,n.column,t.lineNumber,t.column),s=_.coordinatesConverter.convertModelPositionToViewPosition(h.position);m=new S.SingleCursorState(i,h.selectionStartKind,h.selectionStartLeftoverVisibleColumns,s,h.leftoverVisibleColumns)}this.modelState=h,this.viewState=m,this._updateTrackedRange(_)}}e.Cursor=w}),define(J[463],ee([1,0,16,65,462,13,5,23]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class _{constructor(m){this.context=m,this.cursors=[new y.Cursor(m)],this.lastAddedCursorIndex=0}dispose(){for(const m of this.cursors)m.dispose(this.context)}startTrackingSelections(){for(const m of this.cursors)m.startTrackingSelection(this.context)}stopTrackingSelections(){for(const m of this.cursors)m.stopTrackingSelection(this.context)}updateContext(m){this.context=m}ensureValidState(){for(const m of this.cursors)m.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(m=>m.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(m=>m.asCursorState())}getViewPositions(){return this.cursors.map(m=>m.viewState.position)}getTopMostViewPosition(){return(0,S.findMinBy)(this.cursors,(0,S.compareBy)(m=>m.viewState.position,D.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,S.findLastMaxBy)(this.cursors,(0,S.compareBy)(m=>m.viewState.position,D.Position.compare)).viewState.position}getSelections(){return this.cursors.map(m=>m.modelState.selection)}getViewSelections(){return this.cursors.map(m=>m.viewState.selection)}setSelections(m){this.setStates(k.CursorState.fromModelSelections(m))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(m){m!==null&&(this.cursors[0].setState(this.context,m[0].modelState,m[0].viewState),this._setSecondaryStates(m.slice(1)))}_setSecondaryStates(m){const n=this.cursors.length-1,t=m.length;if(n<t){const i=t-n;for(let s=0;s<i;s++)this._addSecondaryCursor()}else if(n>t){const i=n-t;for(let s=0;s<i;s++)this._removeSecondaryCursor(this.cursors.length-2)}for(let i=0;i<t;i++)this.cursors[i+1].setState(this.context,m[i].modelState,m[i].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new y.Cursor(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(m){this.lastAddedCursorIndex>=m+1&&this.lastAddedCursorIndex--,this.cursors[m+1].dispose(this.context),this.cursors.splice(m+1,1)}normalize(){if(this.cursors.length===1)return;const m=this.cursors.slice(0),n=[];for(let t=0,i=m.length;t<i;t++)n.push({index:t,selection:m[t].modelState.selection});n.sort((0,S.compareBy)(t=>t.selection,w.Range.compareRangesUsingStarts));for(let t=0;t<n.length-1;t++){const i=n[t],s=n[t+1],r=i.selection,c=s.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let g;if(c.isEmpty()||r.isEmpty()?g=c.getStartPosition().isBeforeOrEqual(r.getEndPosition()):g=c.getStartPosition().isBefore(r.getEndPosition()),g){const o=i.index<s.index?t:t+1,l=i.index<s.index?t+1:t,a=n[l].index,d=n[o].index,u=n[l].selection,C=n[o].selection;if(!u.equalsSelection(C)){const f=u.plusRange(C),v=u.selectionStartLineNumber===u.startLineNumber&&u.selectionStartColumn===u.startColumn,p=C.selectionStartLineNumber===C.startLineNumber&&C.selectionStartColumn===C.startColumn;let L;a===this.lastAddedCursorIndex?(L=v,this.lastAddedCursorIndex=d):L=p;let E;L?E=new b.Selection(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn):E=new b.Selection(f.endLineNumber,f.endColumn,f.startLineNumber,f.startColumn),n[o].selection=E;const I=k.CursorState.fromModelSelection(E);m[d].setState(this.context,I.modelState,I.viewState)}for(const f of n)f.index>a&&f.index--;m.splice(a,1),n.splice(l,1),this._removeSecondaryCursor(a-1),t--}}}}e.CursorCollection=_}),define(J[464],ee([1,0,104]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class k{constructor(D){if(D.autoClosingPairs?this._autoClosingPairs=D.autoClosingPairs.map(w=>new S.StandardAutoClosingPairConditional(w)):D.brackets?this._autoClosingPairs=D.brackets.map(w=>new S.StandardAutoClosingPairConditional({open:w[0],close:w[1]})):this._autoClosingPairs=[],D.__electricCharacterSupport&&D.__electricCharacterSupport.docComment){const w=D.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new S.StandardAutoClosingPairConditional({open:w.open,close:w.close||""}))}this._autoCloseBeforeForQuotes=typeof D.autoCloseBefore=="string"?D.autoCloseBefore:k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof D.autoCloseBefore=="string"?D.autoCloseBefore:k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=D.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(D){return D?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> \n\t`,k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`\'"\\`;:.,=}])> \n\t`,e.CharacterPairSupport=k}),define(J[465],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=void 0;function S(y){return y.global&&(y.lastIndex=0),!0}class k{constructor(D){this._indentationRules=D}shouldIncrease(D){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&S(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(D))}shouldDecrease(D){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&S(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(D))}shouldIndentNextLine(D){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&S(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(D))}shouldIgnore(D){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&S(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(D))}getIndentMetadata(D){let w=0;return this.shouldIncrease(D)&&(w+=1),this.shouldDecrease(D)&&(w+=2),this.shouldIndentNextLine(D)&&(w+=4),this.shouldIgnore(D)&&(w+=8),w}}e.IndentRulesSupport=k}),define(J[466],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class S{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(y,D,w,b,_){if(y&&D){const h=this.doNavigateValueSet(D,_);if(h)return{range:y,value:h}}if(w&&b){const h=this.doNavigateValueSet(b,_);if(h)return{range:w,value:h}}return null}doNavigateValueSet(y,D){const w=this.numberReplace(y,D);return w!==null?w:this.textReplace(y,D)}numberReplace(y,D){const w=Math.pow(10,y.length-(y.lastIndexOf(".")+1));let b=Number(y);const _=parseFloat(y);return!isNaN(b)&&!isNaN(_)&&b===_?b===0&&!D?null:(b=Math.floor(b*w),b+=D?w:-w,String(b/w)):null}textReplace(y,D){return this.valueSetsReplace(this._defaultValueSet,y,D)}valueSetsReplace(y,D,w){let b=null;for(let _=0,h=y.length;b===null&&_<h;_++)b=this.valueSetReplace(y[_],D,w);return b}valueSetReplace(y,D,w){let b=y.indexOf(D);return b>=0?(b+=w?1:-1,b<0?b=y.length-1:b%=y.length,y[b]):null}}S.INSTANCE=new S,e.BasicInplaceReplace=S}),define(J[467],ee([1,0,243]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClosingBracketKind=e.OpeningBracketKind=e.BracketKindBase=e.LanguageBracketsConfiguration=void 0;class k{constructor(h,m){this.languageId=h;const n=m.brackets?y(m.brackets):[],t=new S.CachedFunction(r=>{const c=new Set;return{info:new w(this,r,c),closing:c}}),i=new S.CachedFunction(r=>{const c=new Set,g=new Set;return{info:new b(this,r,c,g),opening:c,openingColorized:g}});for(const[r,c]of n){const g=t.get(r),o=i.get(c);g.closing.add(o.info),o.opening.add(g.info)}const s=m.colorizedBracketPairs?y(m.colorizedBracketPairs):n.filter(r=>!(r[0]==="<"&&r[1]===">"));for(const[r,c]of s){const g=t.get(r),o=i.get(c);g.closing.add(o.info),o.openingColorized.add(g.info),o.opening.add(g.info)}this._openingBrackets=new Map([...t.cachedValues].map(([r,c])=>[r,c.info])),this._closingBrackets=new Map([...i.cachedValues].map(([r,c])=>[r,c.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(h){return this._openingBrackets.get(h)}getClosingBracketInfo(h){return this._closingBrackets.get(h)}getBracketInfo(h){return this.getOpeningBracketInfo(h)||this.getClosingBracketInfo(h)}}e.LanguageBracketsConfiguration=k;function y(_){return _.filter(([h,m])=>h!==""&&m!=="")}class D{constructor(h,m){this.config=h,this.bracketText=m}get languageId(){return this.config.languageId}}e.BracketKindBase=D;class w extends D{constructor(h,m,n){super(h,m),this.openedBrackets=n,this.isOpeningBracket=!0}}e.OpeningBracketKind=w;class b extends D{constructor(h,m,n,t){super(h,m),this.openingBrackets=n,this.openingColorizedBrackets=t,this.isOpeningBracket=!1}closes(h){return h.config!==this.config?!1:this.openingBrackets.has(h)}closesColorized(h){return h.config!==this.config?!1:this.openingColorizedBrackets.has(h)}getOpeningBrackets(){return[...this.openingBrackets]}}e.ClosingBracketKind=b}),define(J[468],ee([1,0,11,9,104]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class D{constructor(b){b=b||{},b.brackets=b.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],b.brackets.forEach(_=>{const h=D._createOpenBracketRegExp(_[0]),m=D._createCloseBracketRegExp(_[1]);h&&m&&this._brackets.push({open:_[0],openRegExp:h,close:_[1],closeRegExp:m})}),this._regExpRules=b.onEnterRules||[]}onEnter(b,_,h,m){if(b>=3)for(let n=0,t=this._regExpRules.length;n<t;n++){const i=this._regExpRules[n];if([{reg:i.beforeText,text:h},{reg:i.afterText,text:m},{reg:i.previousLineText,text:_}].every(r=>r.reg?(r.reg.lastIndex=0,r.reg.test(r.text)):!0))return i.action}if(b>=2&&h.length>0&&m.length>0)for(let n=0,t=this._brackets.length;n<t;n++){const i=this._brackets[n];if(i.openRegExp.test(h)&&i.closeRegExp.test(m))return{indentAction:y.IndentAction.IndentOutdent}}if(b>=2&&h.length>0){for(let n=0,t=this._brackets.length;n<t;n++)if(this._brackets[n].openRegExp.test(h))return{indentAction:y.IndentAction.Indent}}return null}static _createOpenBracketRegExp(b){let _=k.escapeRegExpCharacters(b);return/\\B/.test(_.charAt(0))||(_="\\\\b"+_),_+="\\\\s*$",D._safeRegExp(_)}static _createCloseBracketRegExp(b){let _=k.escapeRegExpCharacters(b);return/\\B/.test(_.charAt(_.length-1))||(_=_+"\\\\b"),_="^\\\\s*"+_,D._safeRegExp(_)}static _safeRegExp(b){try{return new RegExp(b)}catch(_){return(0,S.onUnexpectedError)(_),null}}}e.OnEnterSupport=D}),define(J[469],ee([1,0,37]),function(q,e,S){"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 k{constructor(c,g,o,l,a){this._parsedThemeRuleBrand=void 0,this.token=c,this.index=g,this.fontStyle=o,this.foreground=l,this.background=a}}e.ParsedTokenThemeRule=k;function y(r){if(!r||!Array.isArray(r))return[];const c=[];let g=0;for(let o=0,l=r.length;o<l;o++){const a=r[o];let d=-1;if(typeof a.fontStyle=="string"){d=0;const f=a.fontStyle.split(" ");for(let v=0,p=f.length;v<p;v++)switch(f[v]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let u=null;typeof a.foreground=="string"&&(u=a.foreground);let C=null;typeof a.background=="string"&&(C=a.background),c[g++]=new k(a.token||"",o,d,u,C)}return c}e.parseTokenTheme=y;function D(r,c){r.sort((v,p)=>{const L=n(v.token,p.token);return L!==0?L:v.index-p.index});let g=0,o="000000",l="ffffff";for(;r.length>=1&&r[0].token==="";){const v=r.shift();v.fontStyle!==-1&&(g=v.fontStyle),v.foreground!==null&&(o=v.foreground),v.background!==null&&(l=v.background)}const a=new b;for(const v of c)a.getId(v);const d=a.getId(o),u=a.getId(l),C=new t(g,d,u),f=new i(C);for(let v=0,p=r.length;v<p;v++){const L=r[v];f.insert(L.token,L.fontStyle,a.getId(L.foreground),a.getId(L.background))}return new _(a,f)}const w=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class b{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(c){if(c===null)return 0;const g=c.match(w);if(!g)throw new Error("Illegal value for token color: "+c);c=g[1].toUpperCase();let o=this._color2id.get(c);return o||(o=++this._lastColorId,this._color2id.set(c,o),this._id2color[o]=S.Color.fromHex("#"+c),o)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=b;class _{static createFromRawTokenTheme(c,g){return this.createFromParsedTokenTheme(y(c),g)}static createFromParsedTokenTheme(c,g){return D(c,g)}constructor(c,g){this._colorMap=c,this._root=g,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(c){return this._root.match(c)}match(c,g){let o=this._cache.get(g);if(typeof o>"u"){const l=this._match(g),a=m(g);o=(l.metadata|a<<8)>>>0,this._cache.set(g,o)}return(o|c<<0)>>>0}}e.TokenTheme=_;const h=/\\b(comment|string|regex|regexp)\\b/;function m(r){const c=r.match(h);if(!c)return 0;switch(c[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}e.toStandardTokenType=m;function n(r,c){return r<c?-1:r>c?1:0}e.strcmp=n;class t{constructor(c,g,o){this._themeTrieElementRuleBrand=void 0,this._fontStyle=c,this._foreground=g,this._background=o,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new t(this._fontStyle,this._foreground,this._background)}acceptOverwrite(c,g,o){c!==-1&&(this._fontStyle=c),g!==0&&(this._foreground=g),o!==0&&(this._background=o),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}e.ThemeTrieElementRule=t;class i{constructor(c){this._themeTrieElementBrand=void 0,this._mainRule=c,this._children=new Map}match(c){if(c==="")return this._mainRule;const g=c.indexOf(".");let o,l;g===-1?(o=c,l=""):(o=c.substring(0,g),l=c.substring(g+1));const a=this._children.get(o);return typeof a<"u"?a.match(l):this._mainRule}insert(c,g,o,l){if(c===""){this._mainRule.acceptOverwrite(g,o,l);return}const a=c.indexOf(".");let d,u;a===-1?(d=c,u=""):(d=c.substring(0,a),u=c.substring(a+1));let C=this._children.get(d);typeof C>"u"&&(C=new i(this._mainRule.clone()),this._children.set(d,C)),C.insert(u,g,o,l)}}e.ThemeTrieElement=i;function s(r){const c=[];for(let g=1,o=r.length;g<o;g++){const l=r[g];c[g]=`.mtk${g} { color: ${l}; }`}return c.push(".mtki { font-style: italic; }"),c.push(".mtkb { font-weight: bold; }"),c.push(".mtku { text-decoration: underline; text-underline-position: under; }"),c.push(".mtks { text-decoration: line-through; }"),c.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),c.join(`\n`)}e.generateTokensCSSForColorMap=s}),define(J[48],ee([1,0,45]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSynchronizeModel=e.ApplyEditsResult=e.SearchData=e.ValidAnnotatedEditOperation=e.isITextSnapshot=e.FindMatch=e.TextModelResolvedOptions=e.InjectedTextCursorStops=e.MinimapPosition=e.OverviewRulerLane=void 0;var k;(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(k=e.OverviewRulerLane||(e.OverviewRulerLane={}));var y;(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(y=e.MinimapPosition||(e.MinimapPosition={}));var D;(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(D=e.InjectedTextCursorStops||(e.InjectedTextCursorStops={}));class w{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(s){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,s.tabSize|0),s.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,s.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!s.insertSpaces,this.defaultEOL=s.defaultEOL|0,this.trimAutoWhitespace=!!s.trimAutoWhitespace,this.bracketPairColorizationOptions=s.bracketPairColorizationOptions}equals(s){return this.tabSize===s.tabSize&&this._indentSizeIsTabSize===s._indentSizeIsTabSize&&this.indentSize===s.indentSize&&this.insertSpaces===s.insertSpaces&&this.defaultEOL===s.defaultEOL&&this.trimAutoWhitespace===s.trimAutoWhitespace&&(0,S.equals)(this.bracketPairColorizationOptions,s.bracketPairColorizationOptions)}createChangeEvent(s){return{tabSize:this.tabSize!==s.tabSize,indentSize:this.indentSize!==s.indentSize,insertSpaces:this.insertSpaces!==s.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==s.trimAutoWhitespace}}}e.TextModelResolvedOptions=w;class b{constructor(s,r){this._findMatchBrand=void 0,this.range=s,this.matches=r}}e.FindMatch=b;function _(i){return i&&typeof i.read=="function"}e.isITextSnapshot=_;class h{constructor(s,r,c,g,o,l){this.identifier=s,this.range=r,this.text=c,this.forceMoveMarkers=g,this.isAutoWhitespaceEdit=o,this._isTracked=l}}e.ValidAnnotatedEditOperation=h;class m{constructor(s,r,c){this.regex=s,this.wordSeparators=r,this.simpleSearch=c}}e.SearchData=m;class n{constructor(s,r,c){this.reverseEdits=s,this.changes=r,this.trimAutoWhitespaceLineNumbers=c}}e.ApplyEditsResult=n;function t(i){return!i.isTooLargeForSyncing()&&!i.isForSimpleWidget}e.shouldSynchronizeModel=t}),define(J[85],ee([1,0,9,5]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthOfString=e.lengthsToRange=e.positionToLength=e.lengthGreaterThanEqual=e.lengthLessThanEqual=e.lengthLessThan=e.lengthDiffNonNegative=e.lengthEquals=e.sumLengths=e.lengthAdd=e.lengthGetColumnCountIfZeroLineCount=e.lengthGetLineCount=e.lengthToObj=e.toLength=e.lengthIsZero=e.lengthZero=e.lengthDiff=e.LengthObj=void 0;class y{constructor(C,f){this.lineCount=C,this.columnCount=f}toString(){return`${this.lineCount},${this.columnCount}`}}y.zero=new y(0,0),e.LengthObj=y;function D(u,C,f,v){return u!==f?_(f-u,v):_(0,v-C)}e.lengthDiff=D,e.lengthZero=0;function w(u){return u===0}e.lengthIsZero=w;const b=Math.pow(2,26);function _(u,C){return u*b+C}e.toLength=_;function h(u){const C=u,f=Math.floor(C/b),v=C-f*b;return new y(f,v)}e.lengthToObj=h;function m(u){return Math.floor(u/b)}e.lengthGetLineCount=m;function n(u){return u}e.lengthGetColumnCountIfZeroLineCount=n;function t(u,C){let f=u+C;return C>=b&&(f=f-u%b),f}e.lengthAdd=t;function i(u,C){return u.reduce((f,v)=>t(f,C(v)),e.lengthZero)}e.sumLengths=i;function s(u,C){return u===C}e.lengthEquals=s;function r(u,C){const f=u,v=C;if(v-f<=0)return e.lengthZero;const L=Math.floor(f/b),E=Math.floor(v/b),I=v-E*b;if(L===E){const T=f-L*b;return _(0,I-T)}else return _(E-L,I)}e.lengthDiffNonNegative=r;function c(u,C){return u<C}e.lengthLessThan=c;function g(u,C){return u<=C}e.lengthLessThanEqual=g;function o(u,C){return u>=C}e.lengthGreaterThanEqual=o;function l(u){return _(u.lineNumber-1,u.column-1)}e.positionToLength=l;function a(u,C){const f=u,v=Math.floor(f/b),p=f-v*b,L=C,E=Math.floor(L/b),I=L-E*b;return new k.Range(v+1,p+1,E+1,I+1)}e.lengthsToRange=a;function d(u){const C=(0,S.splitLines)(u);return _(C.length-1,C[C.length-1].length)}e.lengthOfString=d}),define(J[191],ee([1,0,85]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class k{constructor(b,_,h){this.startOffset=b,this.endOffset=_,this.newLength=h}toString(){return`[${(0,S.lengthToObj)(this.startOffset)}...${(0,S.lengthToObj)(this.endOffset)}) -> ${(0,S.lengthToObj)(this.newLength)}`}}e.TextEditInfo=k;class y{constructor(b){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=b.map(_=>D.from(_))}getOffsetBeforeChange(b){return this.adjustNextEdit(b),this.translateCurToOld(b)}getDistanceToNextChange(b){this.adjustNextEdit(b);const _=this.edits[this.nextEditIdx],h=_?this.translateOldToCur(_.offsetObj):null;return h===null?null:(0,S.lengthDiffNonNegative)(b,h)}translateOldToCur(b){return b.lineCount===this.deltaLineIdxInOld?(0,S.toLength)(b.lineCount+this.deltaOldToNewLineCount,b.columnCount+this.deltaOldToNewColumnCount):(0,S.toLength)(b.lineCount+this.deltaOldToNewLineCount,b.columnCount)}translateCurToOld(b){const _=(0,S.lengthToObj)(b);return _.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,S.toLength)(_.lineCount-this.deltaOldToNewLineCount,_.columnCount-this.deltaOldToNewColumnCount):(0,S.toLength)(_.lineCount-this.deltaOldToNewLineCount,_.columnCount)}adjustNextEdit(b){for(;this.nextEditIdx<this.edits.length;){const _=this.edits[this.nextEditIdx],h=this.translateOldToCur(_.endOffsetAfterObj);if((0,S.lengthLessThanEqual)(h,b)){this.nextEditIdx++;const m=(0,S.lengthToObj)(h),n=(0,S.lengthToObj)(this.translateOldToCur(_.endOffsetBeforeObj)),t=m.lineCount-n.lineCount;this.deltaOldToNewLineCount+=t;const i=this.deltaLineIdxInOld===_.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,s=m.columnCount-n.columnCount;this.deltaOldToNewColumnCount=i+s,this.deltaLineIdxInOld=_.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=y;class D{static from(b){return new D(b.startOffset,b.endOffset,b.newLength)}constructor(b,_,h){this.endOffsetBeforeObj=(0,S.lengthToObj)(_),this.endOffsetAfterObj=(0,S.lengthToObj)((0,S.lengthAdd)(b,h)),this.offsetObj=(0,S.lengthToObj)(b)}}}),define(J[470],ee([1,0,16,191,85]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineTextEditInfos=void 0;function D(_,h){if(_.length===0)return h;if(h.length===0)return _;const m=new S.ArrayQueue(b(_)),n=b(h);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let t=m.dequeue();function i(g){if(g===void 0){const l=m.takeWhile(a=>!0)||[];return t&&l.unshift(t),l}const o=[];for(;t&&!(0,y.lengthIsZero)(g);){const[l,a]=t.splitAt(g);o.push(l),g=(0,y.lengthDiffNonNegative)(l.lengthAfter,g),t=a??m.dequeue()}return(0,y.lengthIsZero)(g)||o.push(new w(!1,g,g)),o}const s=[];function r(g,o,l){if(s.length>0&&(0,y.lengthEquals)(s[s.length-1].endOffset,g)){const a=s[s.length-1];s[s.length-1]=new k.TextEditInfo(a.startOffset,o,(0,y.lengthAdd)(a.newLength,l))}else s.push({startOffset:g,endOffset:o,newLength:l})}let c=y.lengthZero;for(const g of n){const o=i(g.lengthBefore);if(g.modified){const l=(0,y.sumLengths)(o,d=>d.lengthBefore),a=(0,y.lengthAdd)(c,l);r(c,a,g.lengthAfter),c=a}else for(const l of o){const a=c;c=(0,y.lengthAdd)(c,l.lengthBefore),l.modified&&r(a,c,l.lengthAfter)}}return s}e.combineTextEditInfos=D;class w{constructor(h,m,n){this.modified=h,this.lengthBefore=m,this.lengthAfter=n}splitAt(h){const m=(0,y.lengthDiffNonNegative)(h,this.lengthAfter);return(0,y.lengthEquals)(m,y.lengthZero)?[this,void 0]:this.modified?[new w(this.modified,this.lengthBefore,h),new w(this.modified,y.lengthZero,m)]:[new w(this.modified,h,h),new w(this.modified,m,m)]}toString(){return`${this.modified?"M":"U"}:${(0,y.lengthToObj)(this.lengthBefore)} -> ${(0,y.lengthToObj)(this.lengthAfter)}`}}function b(_){const h=[];let m=y.lengthZero;for(const n of _){const t=(0,y.lengthDiffNonNegative)(m,n.startOffset);(0,y.lengthIsZero)(t)||h.push(new w(!1,t,t));const i=(0,y.lengthDiffNonNegative)(n.startOffset,n.endOffset);h.push(new w(!0,i,n.newLength)),m=n.endOffset}return h}}),define(J[471],ee([1,0,85]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class k{constructor(b){this.lastOffset=S.lengthZero,this.nextNodes=[b],this.offsets=[S.lengthZero],this.idxs=[]}readLongestNodeAt(b,_){if((0,S.lengthLessThan)(b,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=b;;){const h=D(this.nextNodes);if(!h)return;const m=D(this.offsets);if((0,S.lengthLessThan)(b,m))return;if((0,S.lengthLessThan)(m,b))if((0,S.lengthAdd)(m,h.length)<=b)this.nextNodeAfterCurrent();else{const n=y(h);n!==-1?(this.nextNodes.push(h.getChild(n)),this.offsets.push(m),this.idxs.push(n)):this.nextNodeAfterCurrent()}else{if(_(h))return this.nextNodeAfterCurrent(),h;{const n=y(h);if(n===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(h.getChild(n)),this.offsets.push(m),this.idxs.push(n)}}}}nextNodeAfterCurrent(){for(;;){const b=D(this.offsets),_=D(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const h=D(this.nextNodes),m=y(h,this.idxs[this.idxs.length-1]);if(m!==-1){this.nextNodes.push(h.getChild(m)),this.offsets.push((0,S.lengthAdd)(b,_.length)),this.idxs[this.idxs.length-1]=m;break}else this.idxs.pop()}}}e.NodeReader=k;function y(w,b=-1){for(;;){if(b++,b>=w.childrenLength)return-1;if(w.getChild(b))return b}}function D(w){return w.length>0?w[w.length-1]:void 0}}),define(J[121],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const S=[];class k{static create(w,b){if(w<=128&&b.length===0){let _=k.cache[w];return _||(_=new k(w,b),k.cache[w]=_),_}return new k(w,b)}static getEmpty(){return this.empty}constructor(w,b){this.items=w,this.additionalItems=b}add(w,b){const _=b.getKey(w);let h=_>>5;if(h===0){const n=1<<_|this.items;return n===this.items?this:k.create(n,this.additionalItems)}h--;const m=this.additionalItems.slice(0);for(;m.length<h;)m.push(0);return m[h]|=1<<(_&31),k.create(this.items,m)}merge(w){const b=this.items|w.items;if(this.additionalItems===S&&w.additionalItems===S)return b===this.items?this:b===w.items?w:k.create(b,S);const _=[];for(let h=0;h<Math.max(this.additionalItems.length,w.additionalItems.length);h++){const m=this.additionalItems[h]||0,n=w.additionalItems[h]||0;_.push(m|n)}return k.create(b,_)}intersects(w){if(this.items&w.items)return!0;for(let b=0;b<Math.min(this.additionalItems.length,w.additionalItems.length);b++)if(this.additionalItems[b]&w.additionalItems[b])return!0;return!1}}k.cache=new Array(129),k.empty=k.create(0,S),e.SmallImmutableSet=k,e.identityKeyProvider={getKey(D){return D}};class y{constructor(){this.items=new Map}getKey(w){let b=this.items.get(w);return b===void 0&&(b=this.items.size,this.items.set(w,b)),b}}e.DenseKeyProvider=y}),define(J[169],ee([1,0,11,75,85,121]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidBracketAstNode=e.BracketAstNode=e.TextAstNode=e.ListAstNode=e.PairAstNode=void 0;class w{get length(){return this._length}constructor(l){this._length=l}}class b extends w{static create(l,a,d){let u=l.length;return a&&(u=(0,y.lengthAdd)(u,a.length)),d&&(u=(0,y.lengthAdd)(u,d.length)),new b(u,l,a,d,a?a.missingOpeningBracketIds:D.SmallImmutableSet.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(l){switch(l){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const l=[];return l.push(this.openingBracket),this.child&&l.push(this.child),this.closingBracket&&l.push(this.closingBracket),l}constructor(l,a,d,u,C){super(l),this.openingBracket=a,this.child=d,this.closingBracket=u,this.missingOpeningBracketIds=C}canBeReused(l){return!(this.closingBracket===null||l.intersects(this.missingOpeningBracketIds))}deepClone(){return new b(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(l,a){return this.child?this.child.computeMinIndentation((0,y.lengthAdd)(l,this.openingBracket.length),a):Number.MAX_SAFE_INTEGER}}e.PairAstNode=b;class _ extends w{static create23(l,a,d,u=!1){let C=l.length,f=l.missingOpeningBracketIds;if(l.listHeight!==a.listHeight)throw new Error("Invalid list heights");if(C=(0,y.lengthAdd)(C,a.length),f=f.merge(a.missingOpeningBracketIds),d){if(l.listHeight!==d.listHeight)throw new Error("Invalid list heights");C=(0,y.lengthAdd)(C,d.length),f=f.merge(d.missingOpeningBracketIds)}return u?new m(C,l.listHeight+1,l,a,d,f):new h(C,l.listHeight+1,l,a,d,f)}static getEmpty(){return new t(y.lengthZero,0,[],D.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(l,a,d){super(l),this.listHeight=a,this._missingOpeningBracketIds=d,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const l=this.childrenLength;if(l===0)return;const a=this.getChild(l-1),d=a.kind===4?a.toMutable():a;return a!==d&&this.setChild(l-1,d),d}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const a=this.getChild(0),d=a.kind===4?a.toMutable():a;return a!==d&&this.setChild(0,d),d}canBeReused(l){if(l.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let a=this;for(;a.kind===4;){const d=a.childrenLength;if(d===0)throw new S.BugIndicatingError;a=a.getChild(d-1)}return a.canBeReused(l)}handleChildrenChanged(){this.throwIfImmutable();const l=this.childrenLength;let a=this.getChild(0).length,d=this.getChild(0).missingOpeningBracketIds;for(let u=1;u<l;u++){const C=this.getChild(u);a=(0,y.lengthAdd)(a,C.length),d=d.merge(C.missingOpeningBracketIds)}this._length=a,this._missingOpeningBracketIds=d,this.cachedMinIndentation=-1}computeMinIndentation(l,a){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let d=Number.MAX_SAFE_INTEGER,u=l;for(let C=0;C<this.childrenLength;C++){const f=this.getChild(C);f&&(d=Math.min(d,f.computeMinIndentation(u,a)),u=(0,y.lengthAdd)(u,f.length))}return this.cachedMinIndentation=d,d}}e.ListAstNode=_;class h extends _{get childrenLength(){return this._item3!==null?3:2}getChild(l){switch(l){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(l,a){switch(l){case 0:this._item1=a;return;case 1:this._item2=a;return;case 2:this._item3=a;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(l,a,d,u,C,f){super(l,a,f),this._item1=d,this._item2=u,this._item3=C}deepClone(){return new h(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(l){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=l,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const l=this._item3;return this._item3=null,this.handleChildrenChanged(),l}prependChildOfSameHeight(l){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=l,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const l=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),l}toMutable(){return this}}class m extends h{toMutable(){return new h(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class n extends _{get childrenLength(){return this._children.length}getChild(l){return this._children[l]}setChild(l,a){this._children[l]=a}get children(){return this._children}constructor(l,a,d,u){super(l,a,u),this._children=d}deepClone(){const l=new Array(this._children.length);for(let a=0;a<this._children.length;a++)l[a]=this._children[a].deepClone();return new n(this.length,this.listHeight,l,this.missingOpeningBracketIds)}appendChildOfSameHeight(l){this.throwIfImmutable(),this._children.push(l),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const l=this._children.pop();return this.handleChildrenChanged(),l}prependChildOfSameHeight(l){this.throwIfImmutable(),this._children.unshift(l),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const l=this._children.shift();return this.handleChildrenChanged(),l}toMutable(){return this}}class t extends n{toMutable(){return new n(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const i=[];class s extends w{get listHeight(){return 0}get childrenLength(){return 0}getChild(l){return null}get children(){return i}deepClone(){return this}}class r extends s{get kind(){return 0}get missingOpeningBracketIds(){return D.SmallImmutableSet.getEmpty()}canBeReused(l){return!0}computeMinIndentation(l,a){const d=(0,y.lengthToObj)(l),u=(d.columnCount===0?d.lineCount:d.lineCount+1)+1,C=(0,y.lengthGetLineCount)((0,y.lengthAdd)(l,this.length))+1;let f=Number.MAX_SAFE_INTEGER;for(let v=u;v<=C;v++){const p=a.getLineFirstNonWhitespaceColumn(v),L=a.getLineContent(v);if(p===0)continue;const E=k.CursorColumns.visibleColumnFromColumn(L,p,a.getOptions().tabSize);f=Math.min(f,E)}return f}}e.TextAstNode=r;class c extends s{static create(l,a,d){return new c(l,a,d)}get kind(){return 1}get missingOpeningBracketIds(){return D.SmallImmutableSet.getEmpty()}constructor(l,a,d){super(l),this.bracketInfo=a,this.bracketIds=d}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(l){return!1}computeMinIndentation(l,a){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=c;class g extends s{get kind(){return 3}constructor(l,a){super(a),this.missingOpeningBracketIds=l}canBeReused(l){return!l.intersects(this.missingOpeningBracketIds)}computeMinIndentation(l,a){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=g}),define(J[472],ee([1,0,169]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat23TreesOfSameHeight=e.concat23Trees=void 0;function k(h){if(h.length===0)return null;if(h.length===1)return h[0];let m=0;function n(){if(m>=h.length)return null;const r=m,c=h[r].listHeight;for(m++;m<h.length&&h[m].listHeight===c;)m++;return m-r>=2?y(r===0&&m===h.length?h:h.slice(r,m),!1):h[r]}let t=n(),i=n();if(!i)return t;for(let r=n();r;r=n())D(t,i)<=D(i,r)?(t=w(t,i),i=r):i=w(i,r);return w(t,i)}e.concat23Trees=k;function y(h,m=!1){if(h.length===0)return null;if(h.length===1)return h[0];let n=h.length;for(;n>3;){const t=n>>1;for(let i=0;i<t;i++){const s=i<<1;h[i]=S.ListAstNode.create23(h[s],h[s+1],s+3===n?h[s+2]:null,m)}n=t}return S.ListAstNode.create23(h[0],h[1],n>=3?h[2]:null,m)}e.concat23TreesOfSameHeight=y;function D(h,m){return Math.abs(h.listHeight-m.listHeight)}function w(h,m){return h.listHeight===m.listHeight?S.ListAstNode.create23(h,m,null,!1):h.listHeight>m.listHeight?b(h,m):_(m,h)}function b(h,m){h=h.toMutable();let n=h;const t=[];let i;for(;;){if(m.listHeight===n.listHeight){i=m;break}if(n.kind!==4)throw new Error("unexpected");t.push(n),n=n.makeLastElementMutable()}for(let s=t.length-1;s>=0;s--){const r=t[s];i?r.childrenLength>=3?i=S.ListAstNode.create23(r.unappendChild(),i,null,!1):(r.appendChildOfSameHeight(i),i=void 0):r.handleChildrenChanged()}return i?S.ListAstNode.create23(h,i,null,!1):h}function _(h,m){h=h.toMutable();let n=h;const t=[];for(;m.listHeight!==n.listHeight;){if(n.kind!==4)throw new Error("unexpected");t.push(n),n=n.makeFirstElementMutable()}let i=m;for(let s=t.length-1;s>=0;s--){const r=t[s];i?r.childrenLength>=3?i=S.ListAstNode.create23(i,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(i),i=void 0):r.handleChildrenChanged()}return i?S.ListAstNode.create23(i,h,null,!1):h}}),define(J[257],ee([1,0,169,191,121,85,472,471]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function _(m,n,t,i){return new h(m,n,t,i).parseDocument()}e.parseDocument=_;class h{constructor(n,t,i,s){if(this.tokenizer=n,this.createImmutableLists=s,this._itemsConstructed=0,this._itemsFromCache=0,i&&s)throw new Error("Not supported");this.oldNodeReader=i?new b.NodeReader(i):void 0,this.positionMapper=new k.BeforeEditPositionMapper(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let n=this.parseList(y.SmallImmutableSet.getEmpty());return n||(n=S.ListAstNode.getEmpty()),n}parseList(n){const t=[];for(;;){let s=this.tryReadChildFromCache(n);if(!s){const r=this.tokenizer.peek();if(!r||r.kind===2&&r.bracketIds.intersects(n))break;s=this.parseChild(n)}s.kind===4&&s.childrenLength===0||t.push(s)}return this.oldNodeReader?(0,w.concat23Trees)(t):(0,w.concat23TreesOfSameHeight)(t,this.createImmutableLists)}tryReadChildFromCache(n){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!(0,D.lengthIsZero)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>t!==null&&!(0,D.lengthLessThan)(s.length,t)?!1:s.canBeReused(n));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(n){this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new S.InvalidBracketAstNode(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=n.merge(t.bracketIds),s=this.parseList(i),r=this.tokenizer.peek();return r&&r.kind===2&&(r.bracketId===t.bracketId||r.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),S.PairAstNode.create(t.astNode,s,r.astNode)):S.PairAstNode.create(t.astNode,s,null)}default:throw new Error("unexpected")}}}}),define(J[192],ee([1,0,11,119,169,85,121]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=void 0;class b{constructor(t,i,s,r,c){this.length=t,this.kind=i,this.bracketId=s,this.bracketIds=r,this.astNode=c}}e.Token=b;class _{constructor(t,i){this.textModel=t,this.bracketTokens=i,this.reader=new h(this.textModel,this.bracketTokens),this._offset=D.lengthZero,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=t.getLineCount(),this.textBufferLastLineLength=t.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,D.toLength)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(t){this.didPeek=!1,this._offset=(0,D.lengthAdd)(this._offset,t);const i=(0,D.lengthToObj)(this._offset);this.reader.setPosition(i.lineCount,i.columnCount)}read(){let t;return this.peeked?(this.didPeek=!1,t=this.peeked):t=this.reader.read(),t&&(this._offset=(0,D.lengthAdd)(this._offset,t.length)),t}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}e.TextBufferTokenizer=_;class h{constructor(t,i){this.textModel=t,this.bracketTokens=i,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=t.getLineCount(),this.textBufferLastLineLength=t.getLineLength(this.textBufferLineCount)}setPosition(t,i){t===this.lineIdx?(this.lineCharOffset=i,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=t,this.lineCharOffset=i,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const c=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,D.lengthGetColumnCountIfZeroLineCount)(c.length),c}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const t=this.lineIdx,i=this.lineCharOffset;let s=0;for(;;){const c=this.lineTokens,g=c.getCount();let o=null;if(this.lineTokenOffset<g){const l=c.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<g&&l===c.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const a=k.TokenMetadata.getTokenType(l)===0,d=k.TokenMetadata.containsBalancedBrackets(l),u=c.getEndOffset(this.lineTokenOffset);if(d&&a&&this.lineCharOffset<u){const C=c.getLanguageId(this.lineTokenOffset),f=this.line.substring(this.lineCharOffset,u),v=this.bracketTokens.getSingleLanguageBracketTokens(C),p=v.regExpGlobal;if(p){p.lastIndex=0;const L=p.exec(f);L&&(o=v.getToken(L[0]),o&&(this.lineCharOffset+=L.index))}}if(s+=u-this.lineCharOffset,o)if(t!==this.lineIdx||i!==this.lineCharOffset){this.peekedToken=o;break}else return this.lineCharOffset+=(0,D.lengthGetColumnCountIfZeroLineCount)(o.length),o;else this.lineTokenOffset++,this.lineCharOffset=u}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,s+=33,s>1e3))break;if(s>1500)break}const r=(0,D.lengthDiff)(t,i,this.lineIdx,this.lineCharOffset);return new b(r,0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode(r))}}class m{constructor(t,i){this.text=t,this._offset=D.lengthZero,this.idx=0;const s=i.getRegExpStr(),r=s?new RegExp(s+`|\n`,"gi"):null,c=[];let g,o=0,l=0,a=0,d=0;const u=[];for(let v=0;v<60;v++)u.push(new b((0,D.toLength)(0,v),0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,D.toLength)(0,v))));const C=[];for(let v=0;v<60;v++)C.push(new b((0,D.toLength)(1,v),0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,D.toLength)(1,v))));if(r)for(r.lastIndex=0;(g=r.exec(t))!==null;){const v=g.index,p=g[0];if(p===`\n`)o++,l=v+1;else{if(a!==v){let L;if(d===o){const E=v-a;if(E<u.length)L=u[E];else{const I=(0,D.toLength)(0,E);L=new b(I,0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode(I))}}else{const E=o-d,I=v-l;if(E===1&&I<C.length)L=C[I];else{const T=(0,D.toLength)(E,I);L=new b(T,0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode(T))}}c.push(L)}c.push(i.getToken(p)),a=v+p.length,d=o}}const f=t.length;if(a!==f){const v=d===o?(0,D.toLength)(0,f-a):(0,D.toLength)(o-d,f-l);c.push(new b(v,0,-1,w.SmallImmutableSet.getEmpty(),new y.TextAstNode(v)))}this.length=(0,D.toLength)(o,f-l),this.tokens=c}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(t){throw new S.NotSupportedError}}e.FastTokenizer=m}),define(J[258],ee([1,0,9,169,85,121,192]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class b{static createFromLanguage(n,t){function i(r){return t.getKey(`${r.languageId}:::${r.bracketText}`)}const s=new Map;for(const r of n.bracketsNew.openingBrackets){const c=(0,y.toLength)(0,r.bracketText.length),g=i(r),o=D.SmallImmutableSet.getEmpty().add(g,D.identityKeyProvider);s.set(r.bracketText,new w.Token(c,1,g,o,k.BracketAstNode.create(c,r,o)))}for(const r of n.bracketsNew.closingBrackets){const c=(0,y.toLength)(0,r.bracketText.length);let g=D.SmallImmutableSet.getEmpty();const o=r.getOpeningBrackets();for(const l of o)g=g.add(i(l),D.identityKeyProvider);s.set(r.bracketText,new w.Token(c,2,i(o[0]),g,k.BracketAstNode.create(c,r,g)))}return new b(s)}constructor(n){this.map=n,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const n=[...this.map.keys()];return n.sort(),n.reverse(),n.map(t=>_(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const n=this.getRegExpStr();this._regExpGlobal=n?new RegExp(n,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(n){return this.map.get(n.toLowerCase())}findClosingTokenText(n){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(n))return t}get isEmpty(){return this.map.size===0}}e.BracketTokens=b;function _(m){let n=(0,S.escapeRegExpCharacters)(m);return/^[\\w ]+/.test(m)&&(n=`\\\\b${n}`),/[\\w ]+$/.test(m)&&(n=`${n}\\\\b`),n}class h{constructor(n,t){this.denseKeyProvider=n,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(n){return this.languageIdToBracketTokens.has(n)}getSingleLanguageBracketTokens(n){let t=this.languageIdToBracketTokens.get(n);return t||(t=b.createFromLanguage(this.getLanguageConfiguration(n),this.denseKeyProvider),this.languageIdToBracketTokens.set(n,t)),t}}e.LanguageAgnosticBracketTokens=h}),define(J[473],ee([1,0,258,85,257,121,192]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function b(h,m){const n=new D.DenseKeyProvider,t=new S.LanguageAgnosticBracketTokens(n,o=>m.getLanguageConfiguration(o)),i=new w.TextBufferTokenizer(new _([h]),t),s=(0,y.parseDocument)(i,[],void 0,!0);let r="";const c=h.getLineContent();function g(o,l){if(o.kind===2)if(g(o.openingBracket,l),l=(0,k.lengthAdd)(l,o.openingBracket.length),o.child&&(g(o.child,l),l=(0,k.lengthAdd)(l,o.child.length)),o.closingBracket)g(o.closingBracket,l),l=(0,k.lengthAdd)(l,o.closingBracket.length);else{const d=t.getSingleLanguageBracketTokens(o.openingBracket.languageId).findClosingTokenText(o.openingBracket.bracketIds);r+=d}else if(o.kind!==3){if(o.kind===0||o.kind===1)r+=c.substring((0,k.lengthGetColumnCountIfZeroLineCount)(l),(0,k.lengthGetColumnCountIfZeroLineCount)((0,k.lengthAdd)(l,o.length)));else if(o.kind===4)for(const a of o.children)g(a,l),l=(0,k.lengthAdd)(l,a.length)}}return g(s,k.lengthZero),r}e.fixBracketsInLine=b;class _{constructor(m){this.lines=m,this.tokenization={getLineTokens:n=>this.lines[n-1]}}getLineCount(){return this.lines.length}getLineLength(m){return this.lines[m-1].getLineContent().length}}}),define(J[474],ee([1,0,16]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FixedArray=void 0;class k{constructor(w){this._default=w,this._store=[]}get(w){return w<this._store.length?this._store[w]:this._default}set(w,b){for(;w>=this._store.length;)this._store[this._store.length]=this._default;this._store[w]=b}replace(w,b,_){if(w>=this._store.length)return;if(b===0){this.insert(w,_);return}else if(_===0){this.delete(w,b);return}const h=this._store.slice(0,w),m=this._store.slice(w+b),n=y(_,this._default);this._store=h.concat(n,m)}delete(w,b){b===0||w>=this._store.length||this._store.splice(w,b)}insert(w,b){if(b===0||w>=this._store.length)return;const _=[];for(let h=0;h<b;h++)_[h]=this._default;this._store=(0,S.arrayInsert)(this._store,w,_)}}e.FixedArray=k;function y(D,w){const b=[];for(let _=0;_<D;_++)b[_]=w;return b}}),define(J[475],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class S{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function k(D,w,b,_,h){h.spacesDiff=0,h.looksLikeAlignment=!1;let m;for(m=0;m<w&&m<_;m++){const g=D.charCodeAt(m),o=b.charCodeAt(m);if(g!==o)break}let n=0,t=0;for(let g=m;g<w;g++)D.charCodeAt(g)===32?n++:t++;let i=0,s=0;for(let g=m;g<_;g++)b.charCodeAt(g)===32?i++:s++;if(n>0&&t>0||i>0&&s>0)return;const r=Math.abs(t-s),c=Math.abs(n-i);if(r===0){h.spacesDiff=c,c>0&&0<=i-1&&i-1<D.length&&i<b.length&&b.charCodeAt(i)!==32&&D.charCodeAt(i-1)===32&&D.charCodeAt(D.length-1)===44&&(h.looksLikeAlignment=!0);return}if(c%r===0){h.spacesDiff=c/r;return}}function y(D,w,b){const _=Math.min(D.getLineCount(),1e4);let h=0,m=0,n="",t=0;const i=[2,4,6,8,3,5,7],s=8,r=[0,0,0,0,0,0,0,0,0],c=new S;for(let l=1;l<=_;l++){const a=D.getLineLength(l),d=D.getLineContent(l),u=a<=65536;let C=!1,f=0,v=0,p=0;for(let E=0,I=a;E<I;E++){const T=u?d.charCodeAt(E):D.getLineCharCode(l,E);if(T===9)p++;else if(T===32)v++;else{C=!0,f=E;break}}if(!C||(p>0?h++:v>1&&m++,k(n,t,d,f,c),c.looksLikeAlignment&&!(b&&w===c.spacesDiff)))continue;const L=c.spacesDiff;L<=s&&r[L]++,n=d,t=f}let g=b;h!==m&&(g=h<m);let o=w;if(g){let l=g?0:.1*_;i.forEach(a=>{const d=r[a];d>l&&(l=d,o=a)}),o===4&&r[4]>0&&r[2]>0&&r[2]>=r[4]/2&&(o=2)}return{insertSpaces:g,tabSize:o}}e.guessIndentation=y}),define(J[476],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.getNodeColor=void 0;function S(N){return(N.metadata&1)>>>0}e.getNodeColor=S;function k(N,A){N.metadata=N.metadata&254|A<<0}function y(N){return(N.metadata&2)>>>1===1}function D(N,A){N.metadata=N.metadata&253|(A?1:0)<<1}function w(N){return(N.metadata&4)>>>2===1}function b(N,A){N.metadata=N.metadata&251|(A?1:0)<<2}function _(N){return(N.metadata&24)>>>3}function h(N,A){N.metadata=N.metadata&231|A<<3}function m(N){return(N.metadata&32)>>>5===1}function n(N,A){N.metadata=N.metadata&223|(A?1:0)<<5}class t{constructor(A,P,x){this.metadata=0,this.parent=this,this.left=this,this.right=this,k(this,1),this.start=P,this.end=x,this.delta=0,this.maxEnd=x,this.id=A,this.ownerId=0,this.options=null,b(this,!1),h(this,1),n(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=P,this.cachedAbsoluteEnd=x,this.range=null,D(this,!1)}reset(A,P,x,W){this.start=P,this.end=x,this.maxEnd=x,this.cachedVersionId=A,this.cachedAbsoluteStart=P,this.cachedAbsoluteEnd=x,this.range=W}setOptions(A){this.options=A;const P=this.options.className;b(this,P==="squiggly-error"||P==="squiggly-warning"||P==="squiggly-info"),h(this,this.options.stickiness),n(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(A,P,x){this.cachedVersionId!==x&&(this.range=null),this.cachedVersionId=x,this.cachedAbsoluteStart=A,this.cachedAbsoluteEnd=P}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=t,e.SENTINEL=new t(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,k(e.SENTINEL,0);class i{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(A,P,x,W,U){return this.root===e.SENTINEL?[]:u(this,A,P,x,W,U)}search(A,P,x){return this.root===e.SENTINEL?[]:d(this,A,P,x)}collectNodesFromOwner(A){return l(this,A)}collectNodesPostOrder(){return a(this)}insert(A){C(this,A),this._normalizeDeltaIfNecessary()}delete(A){v(this,A),this._normalizeDeltaIfNecessary()}resolveNode(A,P){const x=A;let W=0;for(;A!==this.root;)A===A.parent.right&&(W+=A.parent.delta),A=A.parent;const U=x.start+W,O=x.end+W;x.setCachedOffsets(U,O,P)}acceptReplace(A,P,x,W){const U=g(this,A,A+P);for(let O=0,$=U.length;O<$;O++){const Q=U[O];v(this,Q)}this._normalizeDeltaIfNecessary(),o(this,A,A+P,x),this._normalizeDeltaIfNecessary();for(let O=0,$=U.length;O<$;O++){const Q=U[O];Q.start=Q.cachedAbsoluteStart,Q.end=Q.cachedAbsoluteEnd,c(Q,A,A+P,x,W),Q.maxEnd=Q.end,C(this,Q)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,s(this))}}e.IntervalTree=i;function s(N){let A=N.root,P=0;for(;A!==e.SENTINEL;){if(A.left!==e.SENTINEL&&!y(A.left)){A=A.left;continue}if(A.right!==e.SENTINEL&&!y(A.right)){P+=A.delta,A=A.right;continue}A.start=P+A.start,A.end=P+A.end,A.delta=0,F(A),D(A,!0),D(A.left,!1),D(A.right,!1),A===A.parent.right&&(P-=A.parent.delta),A=A.parent}D(N.root,!1)}function r(N,A,P,x){return N<P?!0:N>P||x===1?!1:x===2?!0:A}function c(N,A,P,x,W){const U=_(N),O=U===0||U===2,$=U===1||U===2,Q=P-A,se=x,le=Math.min(Q,se),te=N.start;let re=!1;const H=N.end;let B=!1;A<=te&&H<=P&&m(N)&&(N.start=A,re=!0,N.end=A,B=!0);{const G=W?1:Q>0?2:0;!re&&r(te,O,A,G)&&(re=!0),!B&&r(H,$,A,G)&&(B=!0)}if(le>0&&!W){const G=Q>se?2:0;!re&&r(te,O,A+le,G)&&(re=!0),!B&&r(H,$,A+le,G)&&(B=!0)}{const G=W?1:0;!re&&r(te,O,P,G)&&(N.start=A+se,re=!0),!B&&r(H,$,P,G)&&(N.end=A+se,B=!0)}const j=se-Q;re||(N.start=Math.max(0,te+j)),B||(N.end=Math.max(0,H+j)),N.start>N.end&&(N.end=N.start)}e.nodeAcceptEdit=c;function g(N,A,P){let x=N.root,W=0,U=0,O=0,$=0;const Q=[];let se=0;for(;x!==e.SENTINEL;){if(y(x)){D(x.left,!1),D(x.right,!1),x===x.parent.right&&(W-=x.parent.delta),x=x.parent;continue}if(!y(x.left)){if(U=W+x.maxEnd,U<A){D(x,!0);continue}if(x.left!==e.SENTINEL){x=x.left;continue}}if(O=W+x.start,O>P){D(x,!0);continue}if($=W+x.end,$>=A&&(x.setCachedOffsets(O,$,0),Q[se++]=x),D(x,!0),x.right!==e.SENTINEL&&!y(x.right)){W+=x.delta,x=x.right;continue}}return D(N.root,!1),Q}function o(N,A,P,x){let W=N.root,U=0,O=0,$=0;const Q=x-(P-A);for(;W!==e.SENTINEL;){if(y(W)){D(W.left,!1),D(W.right,!1),W===W.parent.right&&(U-=W.parent.delta),F(W),W=W.parent;continue}if(!y(W.left)){if(O=U+W.maxEnd,O<A){D(W,!0);continue}if(W.left!==e.SENTINEL){W=W.left;continue}}if($=U+W.start,$>P){W.start+=Q,W.end+=Q,W.delta+=Q,(W.delta<-1073741824||W.delta>1073741824)&&(N.requestNormalizeDelta=!0),D(W,!0);continue}if(D(W,!0),W.right!==e.SENTINEL&&!y(W.right)){U+=W.delta,W=W.right;continue}}D(N.root,!1)}function l(N,A){let P=N.root;const x=[];let W=0;for(;P!==e.SENTINEL;){if(y(P)){D(P.left,!1),D(P.right,!1),P=P.parent;continue}if(P.left!==e.SENTINEL&&!y(P.left)){P=P.left;continue}if(P.ownerId===A&&(x[W++]=P),D(P,!0),P.right!==e.SENTINEL&&!y(P.right)){P=P.right;continue}}return D(N.root,!1),x}function a(N){let A=N.root;const P=[];let x=0;for(;A!==e.SENTINEL;){if(y(A)){D(A.left,!1),D(A.right,!1),A=A.parent;continue}if(A.left!==e.SENTINEL&&!y(A.left)){A=A.left;continue}if(A.right!==e.SENTINEL&&!y(A.right)){A=A.right;continue}P[x++]=A,D(A,!0)}return D(N.root,!1),P}function d(N,A,P,x){let W=N.root,U=0,O=0,$=0;const Q=[];let se=0;for(;W!==e.SENTINEL;){if(y(W)){D(W.left,!1),D(W.right,!1),W===W.parent.right&&(U-=W.parent.delta),W=W.parent;continue}if(W.left!==e.SENTINEL&&!y(W.left)){W=W.left;continue}O=U+W.start,$=U+W.end,W.setCachedOffsets(O,$,x);let le=!0;if(A&&W.ownerId&&W.ownerId!==A&&(le=!1),P&&w(W)&&(le=!1),le&&(Q[se++]=W),D(W,!0),W.right!==e.SENTINEL&&!y(W.right)){U+=W.delta,W=W.right;continue}}return D(N.root,!1),Q}function u(N,A,P,x,W,U){let O=N.root,$=0,Q=0,se=0,le=0;const te=[];let re=0;for(;O!==e.SENTINEL;){if(y(O)){D(O.left,!1),D(O.right,!1),O===O.parent.right&&($-=O.parent.delta),O=O.parent;continue}if(!y(O.left)){if(Q=$+O.maxEnd,Q<A){D(O,!0);continue}if(O.left!==e.SENTINEL){O=O.left;continue}}if(se=$+O.start,se>P){D(O,!0);continue}if(le=$+O.end,le>=A){O.setCachedOffsets(se,le,U);let H=!0;x&&O.ownerId&&O.ownerId!==x&&(H=!1),W&&w(O)&&(H=!1),H&&(te[re++]=O)}if(D(O,!0),O.right!==e.SENTINEL&&!y(O.right)){$+=O.delta,O=O.right;continue}}return D(N.root,!1),te}function C(N,A){if(N.root===e.SENTINEL)return A.parent=e.SENTINEL,A.left=e.SENTINEL,A.right=e.SENTINEL,k(A,0),N.root=A,N.root;f(N,A),R(A.parent);let P=A;for(;P!==N.root&&S(P.parent)===1;)if(P.parent===P.parent.parent.left){const x=P.parent.parent.right;S(x)===1?(k(P.parent,0),k(x,0),k(P.parent.parent,1),P=P.parent.parent):(P===P.parent.right&&(P=P.parent,E(N,P)),k(P.parent,0),k(P.parent.parent,1),I(N,P.parent.parent))}else{const x=P.parent.parent.left;S(x)===1?(k(P.parent,0),k(x,0),k(P.parent.parent,1),P=P.parent.parent):(P===P.parent.left&&(P=P.parent,I(N,P)),k(P.parent,0),k(P.parent.parent,1),E(N,P.parent.parent))}return k(N.root,0),A}function f(N,A){let P=0,x=N.root;const W=A.start,U=A.end;for(;;)if(M(W,U,x.start+P,x.end+P)<0)if(x.left===e.SENTINEL){A.start-=P,A.end-=P,A.maxEnd-=P,x.left=A;break}else x=x.left;else if(x.right===e.SENTINEL){A.start-=P+x.delta,A.end-=P+x.delta,A.maxEnd-=P+x.delta,x.right=A;break}else P+=x.delta,x=x.right;A.parent=x,A.left=e.SENTINEL,A.right=e.SENTINEL,k(A,1)}function v(N,A){let P,x;if(A.left===e.SENTINEL?(P=A.right,x=A,P.delta+=A.delta,(P.delta<-1073741824||P.delta>1073741824)&&(N.requestNormalizeDelta=!0),P.start+=A.delta,P.end+=A.delta):A.right===e.SENTINEL?(P=A.left,x=A):(x=p(A.right),P=x.right,P.start+=x.delta,P.end+=x.delta,P.delta+=x.delta,(P.delta<-1073741824||P.delta>1073741824)&&(N.requestNormalizeDelta=!0),x.start+=A.delta,x.end+=A.delta,x.delta=A.delta,(x.delta<-1073741824||x.delta>1073741824)&&(N.requestNormalizeDelta=!0)),x===N.root){N.root=P,k(P,0),A.detach(),L(),F(P),N.root.parent=e.SENTINEL;return}const W=S(x)===1;if(x===x.parent.left?x.parent.left=P:x.parent.right=P,x===A?P.parent=x.parent:(x.parent===A?P.parent=x:P.parent=x.parent,x.left=A.left,x.right=A.right,x.parent=A.parent,k(x,S(A)),A===N.root?N.root=x:A===A.parent.left?A.parent.left=x:A.parent.right=x,x.left!==e.SENTINEL&&(x.left.parent=x),x.right!==e.SENTINEL&&(x.right.parent=x)),A.detach(),W){R(P.parent),x!==A&&(R(x),R(x.parent)),L();return}R(P),R(P.parent),x!==A&&(R(x),R(x.parent));let U;for(;P!==N.root&&S(P)===0;)P===P.parent.left?(U=P.parent.right,S(U)===1&&(k(U,0),k(P.parent,1),E(N,P.parent),U=P.parent.right),S(U.left)===0&&S(U.right)===0?(k(U,1),P=P.parent):(S(U.right)===0&&(k(U.left,0),k(U,1),I(N,U),U=P.parent.right),k(U,S(P.parent)),k(P.parent,0),k(U.right,0),E(N,P.parent),P=N.root)):(U=P.parent.left,S(U)===1&&(k(U,0),k(P.parent,1),I(N,P.parent),U=P.parent.left),S(U.left)===0&&S(U.right)===0?(k(U,1),P=P.parent):(S(U.left)===0&&(k(U.right,0),k(U,1),E(N,U),U=P.parent.left),k(U,S(P.parent)),k(P.parent,0),k(U.left,0),I(N,P.parent),P=N.root));k(P,0),L()}function p(N){for(;N.left!==e.SENTINEL;)N=N.left;return N}function L(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function E(N,A){const P=A.right;P.delta+=A.delta,(P.delta<-1073741824||P.delta>1073741824)&&(N.requestNormalizeDelta=!0),P.start+=A.delta,P.end+=A.delta,A.right=P.left,P.left!==e.SENTINEL&&(P.left.parent=A),P.parent=A.parent,A.parent===e.SENTINEL?N.root=P:A===A.parent.left?A.parent.left=P:A.parent.right=P,P.left=A,A.parent=P,F(A),F(P)}function I(N,A){const P=A.left;A.delta-=P.delta,(A.delta<-1073741824||A.delta>1073741824)&&(N.requestNormalizeDelta=!0),A.start-=P.delta,A.end-=P.delta,A.left=P.right,P.right!==e.SENTINEL&&(P.right.parent=A),P.parent=A.parent,A.parent===e.SENTINEL?N.root=P:A===A.parent.right?A.parent.right=P:A.parent.left=P,P.right=A,A.parent=P,F(A),F(P)}function T(N){let A=N.end;if(N.left!==e.SENTINEL){const P=N.left.maxEnd;P>A&&(A=P)}if(N.right!==e.SENTINEL){const P=N.right.maxEnd+N.delta;P>A&&(A=P)}return A}function F(N){N.maxEnd=T(N)}e.recomputeMaxEnd=F;function R(N){for(;N!==e.SENTINEL;){const A=T(N);if(N.maxEnd===A)return;N.maxEnd=A,N=N.parent}}function M(N,A,P,x){return N===P?A-x:N-P}e.intervalCompare=M}),define(J[477],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeTreeMetadata=e.updateTreeMetadata=e.fixInsert=e.rbDelete=e.rightRotate=e.leftRotate=e.righttest=e.leftest=e.SENTINEL=e.TreeNode=void 0;class S{constructor(r,c){this.piece=r,this.color=c,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==e.SENTINEL)return k(this.right);let r=this;for(;r.parent!==e.SENTINEL&&r.parent.left!==r;)r=r.parent;return r.parent===e.SENTINEL?e.SENTINEL:r.parent}prev(){if(this.left!==e.SENTINEL)return y(this.left);let r=this;for(;r.parent!==e.SENTINEL&&r.parent.right!==r;)r=r.parent;return r.parent===e.SENTINEL?e.SENTINEL:r.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=S,e.SENTINEL=new S(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function k(s){for(;s.left!==e.SENTINEL;)s=s.left;return s}e.leftest=k;function y(s){for(;s.right!==e.SENTINEL;)s=s.right;return s}e.righttest=y;function D(s){return s===e.SENTINEL?0:s.size_left+s.piece.length+D(s.right)}function w(s){return s===e.SENTINEL?0:s.lf_left+s.piece.lineFeedCnt+w(s.right)}function b(){e.SENTINEL.parent=e.SENTINEL}function _(s,r){const c=r.right;c.size_left+=r.size_left+(r.piece?r.piece.length:0),c.lf_left+=r.lf_left+(r.piece?r.piece.lineFeedCnt:0),r.right=c.left,c.left!==e.SENTINEL&&(c.left.parent=r),c.parent=r.parent,r.parent===e.SENTINEL?s.root=c:r.parent.left===r?r.parent.left=c:r.parent.right=c,c.left=r,r.parent=c}e.leftRotate=_;function h(s,r){const c=r.left;r.left=c.right,c.right!==e.SENTINEL&&(c.right.parent=r),c.parent=r.parent,r.size_left-=c.size_left+(c.piece?c.piece.length:0),r.lf_left-=c.lf_left+(c.piece?c.piece.lineFeedCnt:0),r.parent===e.SENTINEL?s.root=c:r===r.parent.right?r.parent.right=c:r.parent.left=c,c.right=r,r.parent=c}e.rightRotate=h;function m(s,r){let c,g;if(r.left===e.SENTINEL?(g=r,c=g.right):r.right===e.SENTINEL?(g=r,c=g.left):(g=k(r.right),c=g.right),g===s.root){s.root=c,c.color=0,r.detach(),b(),s.root.parent=e.SENTINEL;return}const o=g.color===1;if(g===g.parent.left?g.parent.left=c:g.parent.right=c,g===r?(c.parent=g.parent,i(s,c)):(g.parent===r?c.parent=g:c.parent=g.parent,i(s,c),g.left=r.left,g.right=r.right,g.parent=r.parent,g.color=r.color,r===s.root?s.root=g:r===r.parent.left?r.parent.left=g:r.parent.right=g,g.left!==e.SENTINEL&&(g.left.parent=g),g.right!==e.SENTINEL&&(g.right.parent=g),g.size_left=r.size_left,g.lf_left=r.lf_left,i(s,g)),r.detach(),c.parent.left===c){const a=D(c),d=w(c);if(a!==c.parent.size_left||d!==c.parent.lf_left){const u=a-c.parent.size_left,C=d-c.parent.lf_left;c.parent.size_left=a,c.parent.lf_left=d,t(s,c.parent,u,C)}}if(i(s,c.parent),o){b();return}let l;for(;c!==s.root&&c.color===0;)c===c.parent.left?(l=c.parent.right,l.color===1&&(l.color=0,c.parent.color=1,_(s,c.parent),l=c.parent.right),l.left.color===0&&l.right.color===0?(l.color=1,c=c.parent):(l.right.color===0&&(l.left.color=0,l.color=1,h(s,l),l=c.parent.right),l.color=c.parent.color,c.parent.color=0,l.right.color=0,_(s,c.parent),c=s.root)):(l=c.parent.left,l.color===1&&(l.color=0,c.parent.color=1,h(s,c.parent),l=c.parent.left),l.left.color===0&&l.right.color===0?(l.color=1,c=c.parent):(l.left.color===0&&(l.right.color=0,l.color=1,_(s,l),l=c.parent.left),l.color=c.parent.color,c.parent.color=0,l.left.color=0,h(s,c.parent),c=s.root));c.color=0,b()}e.rbDelete=m;function n(s,r){for(i(s,r);r!==s.root&&r.parent.color===1;)if(r.parent===r.parent.parent.left){const c=r.parent.parent.right;c.color===1?(r.parent.color=0,c.color=0,r.parent.parent.color=1,r=r.parent.parent):(r===r.parent.right&&(r=r.parent,_(s,r)),r.parent.color=0,r.parent.parent.color=1,h(s,r.parent.parent))}else{const c=r.parent.parent.left;c.color===1?(r.parent.color=0,c.color=0,r.parent.parent.color=1,r=r.parent.parent):(r===r.parent.left&&(r=r.parent,h(s,r)),r.parent.color=0,r.parent.parent.color=1,_(s,r.parent.parent))}s.root.color=0}e.fixInsert=n;function t(s,r,c,g){for(;r!==s.root&&r!==e.SENTINEL;)r.parent.left===r&&(r.parent.size_left+=c,r.parent.lf_left+=g),r=r.parent}e.updateTreeMetadata=t;function i(s,r){let c=0,g=0;if(r!==s.root){for(;r!==s.root&&r===r.parent.right;)r=r.parent;if(r!==s.root)for(r=r.parent,c=D(r.left)-r.size_left,g=w(r.left)-r.lf_left,r.size_left+=c,r.lf_left+=g;r!==s.root&&(c!==0||g!==0);)r.parent.left===r&&(r.parent.size_left+=c,r.parent.lf_left+=g),r=r.parent}}e.recomputeTreeMetadata=i}),define(J[259],ee([1,0,16,158]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class y{constructor(_){this.values=_,this.prefixSum=new Uint32Array(_.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(_,h){_=(0,k.toUint32)(_);const m=this.values,n=this.prefixSum,t=h.length;return t===0?!1:(this.values=new Uint32Array(m.length+t),this.values.set(m.subarray(0,_),0),this.values.set(m.subarray(_),_+t),this.values.set(h,_),_-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=_-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(_,h){return _=(0,k.toUint32)(_),h=(0,k.toUint32)(h),this.values[_]===h?!1:(this.values[_]=h,_-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=_-1),!0)}removeValues(_,h){_=(0,k.toUint32)(_),h=(0,k.toUint32)(h);const m=this.values,n=this.prefixSum;if(_>=m.length)return!1;const t=m.length-_;return h>=t&&(h=t),h===0?!1:(this.values=new Uint32Array(m.length-h),this.values.set(m.subarray(0,_),0),this.values.set(m.subarray(_+h),_),this.prefixSum=new Uint32Array(this.values.length),_-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=_-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(_){return _<0?0:(_=(0,k.toUint32)(_),this._getPrefixSum(_))}_getPrefixSum(_){if(_<=this.prefixSumValidIndex[0])return this.prefixSum[_];let h=this.prefixSumValidIndex[0]+1;h===0&&(this.prefixSum[0]=this.values[0],h++),_>=this.values.length&&(_=this.values.length-1);for(let m=h;m<=_;m++)this.prefixSum[m]=this.prefixSum[m-1]+this.values[m];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],_),this.prefixSum[_]}getIndexOf(_){_=Math.floor(_),this.getTotalSum();let h=0,m=this.values.length-1,n=0,t=0,i=0;for(;h<=m;)if(n=h+(m-h)/2|0,t=this.prefixSum[n],i=t-this.values[n],_<i)m=n-1;else if(_>=t)h=n+1;else break;return new w(n,_-i)}}e.PrefixSumComputer=y;class D{constructor(_){this._values=_,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(_){return this._ensureValid(),_===0?0:this._prefixSum[_-1]}getIndexOf(_){this._ensureValid();const h=this._indexBySum[_],m=h>0?this._prefixSum[h-1]:0;return new w(h,_-m)}removeValues(_,h){this._values.splice(_,h),this._invalidate(_)}insertValues(_,h){this._values=(0,S.arrayInsert)(this._values,_,h),this._invalidate(_)}_invalidate(_){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,_-1)}_ensureValid(){if(!this._isValid){for(let _=this._validEndIndex+1,h=this._values.length;_<h;_++){const m=this._values[_],n=_>0?this._prefixSum[_-1]:0;this._prefixSum[_]=n+m;for(let t=0;t<m;t++)this._indexBySum[n+t]=_}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(_,h){this._values[_]!==h&&(this._values[_]=h,this._invalidate(_))}}e.ConstantTimePrefixSumComputer=D;class w{constructor(_,h){this.index=_,this.remainder=h,this._prefixSumIndexOfResultBrand=void 0,this.index=_,this.remainder=h}}e.PrefixSumIndexOfResult=w}),define(J[478],ee([1,0,9,13,259]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class D{constructor(b,_,h,m){this._uri=b,this._lines=_,this._eol=h,this._versionId=m,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(b){b.eol&&b.eol!==this._eol&&(this._eol=b.eol,this._lineStarts=null);const _=b.changes;for(const h of _)this._acceptDeleteRange(h.range),this._acceptInsertText(new k.Position(h.range.startLineNumber,h.range.startColumn),h.text);this._versionId=b.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const b=this._eol.length,_=this._lines.length,h=new Uint32Array(_);for(let m=0;m<_;m++)h[m]=this._lines[m].length+b;this._lineStarts=new y.PrefixSumComputer(h)}}_setLineText(b,_){this._lines[b]=_,this._lineStarts&&this._lineStarts.setValue(b,this._lines[b].length+this._eol.length)}_acceptDeleteRange(b){if(b.startLineNumber===b.endLineNumber){if(b.startColumn===b.endColumn)return;this._setLineText(b.startLineNumber-1,this._lines[b.startLineNumber-1].substring(0,b.startColumn-1)+this._lines[b.startLineNumber-1].substring(b.endColumn-1));return}this._setLineText(b.startLineNumber-1,this._lines[b.startLineNumber-1].substring(0,b.startColumn-1)+this._lines[b.endLineNumber-1].substring(b.endColumn-1)),this._lines.splice(b.startLineNumber,b.endLineNumber-b.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(b.startLineNumber,b.endLineNumber-b.startLineNumber)}_acceptInsertText(b,_){if(_.length===0)return;const h=(0,S.splitLines)(_);if(h.length===1){this._setLineText(b.lineNumber-1,this._lines[b.lineNumber-1].substring(0,b.column-1)+h[0]+this._lines[b.lineNumber-1].substring(b.column-1));return}h[h.length-1]+=this._lines[b.lineNumber-1].substring(b.column-1),this._setLineText(b.lineNumber-1,this._lines[b.lineNumber-1].substring(0,b.column-1)+h[0]);const m=new Uint32Array(h.length-1);for(let n=1;n<h.length;n++)this._lines.splice(b.lineNumber+n-1,0,h[n]),m[n-1]=h[n].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(b.lineNumber,m)}}e.MirrorTextModel=D}),define(J[260],ee([1,0,2]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelPart=void 0;class k extends S.Disposable{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}e.TextModelPart=k}),define(J[170],ee([1,0,9,135,13,5,48]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Searcher=e.isValidMatch=e.TextModelSearch=e.createFindMatch=e.isMultilineRegexSource=e.SearchParams=void 0;const b=999;class _{constructor(o,l,a,d){this.searchString=o,this.isRegex=l,this.matchCase=a,this.wordSeparators=d}parseSearchRequest(){if(this.searchString==="")return null;let o;this.isRegex?o=h(this.searchString):o=this.searchString.indexOf(`\n`)>=0;let l=null;try{l=S.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:o,global:!0,unicode:!0})}catch{return null}if(!l)return null;let a=!this.isRegex&&!o;return a&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(a=this.matchCase),new w.SearchData(l,this.wordSeparators?(0,k.getMapForWordSeparators)(this.wordSeparators):null,a?this.searchString:null)}}e.SearchParams=_;function h(g){if(!g||g.length===0)return!1;for(let o=0,l=g.length;o<l;o++){const a=g.charCodeAt(o);if(a===10)return!0;if(a===92){if(o++,o>=l)break;const d=g.charCodeAt(o);if(d===110||d===114||d===87)return!0}}return!1}e.isMultilineRegexSource=h;function m(g,o,l){if(!l)return new w.FindMatch(g,null);const a=[];for(let d=0,u=o.length;d<u;d++)a[d]=o[d];return new w.FindMatch(g,a)}e.createFindMatch=m;class n{constructor(o){const l=[];let a=0;for(let d=0,u=o.length;d<u;d++)o.charCodeAt(d)===10&&(l[a++]=d);this._lineFeedsOffsets=l}findLineFeedCountBeforeOffset(o){const l=this._lineFeedsOffsets;let a=0,d=l.length-1;if(d===-1||o<=l[0])return 0;for(;a<d;){const u=a+((d-a)/2>>0);l[u]>=o?d=u-1:l[u+1]>=o?(a=u,d=u):a=u+1}return a+1}}class t{static findMatches(o,l,a,d,u){const C=l.parseSearchRequest();return C?C.regex.multiline?this._doFindMatchesMultiline(o,a,new c(C.wordSeparators,C.regex),d,u):this._doFindMatchesLineByLine(o,a,C,d,u):[]}static _getMultilineMatchRange(o,l,a,d,u,C){let f,v=0;d?(v=d.findLineFeedCountBeforeOffset(u),f=l+u+v):f=l+u;let p;if(d){const T=d.findLineFeedCountBeforeOffset(u+C.length)-v;p=f+C.length+T}else p=f+C.length;const L=o.getPositionAt(f),E=o.getPositionAt(p);return new D.Range(L.lineNumber,L.column,E.lineNumber,E.column)}static _doFindMatchesMultiline(o,l,a,d,u){const C=o.getOffsetAt(l.getStartPosition()),f=o.getValueInRange(l,1),v=o.getEOL()===`\\r\n`?new n(f):null,p=[];let L=0,E;for(a.reset(0);E=a.next(f);)if(p[L++]=m(this._getMultilineMatchRange(o,C,f,v,E.index,E[0]),E,d),L>=u)return p;return p}static _doFindMatchesLineByLine(o,l,a,d,u){const C=[];let f=0;if(l.startLineNumber===l.endLineNumber){const p=o.getLineContent(l.startLineNumber).substring(l.startColumn-1,l.endColumn-1);return f=this._findMatchesInLine(a,p,l.startLineNumber,l.startColumn-1,f,C,d,u),C}const v=o.getLineContent(l.startLineNumber).substring(l.startColumn-1);f=this._findMatchesInLine(a,v,l.startLineNumber,l.startColumn-1,f,C,d,u);for(let p=l.startLineNumber+1;p<l.endLineNumber&&f<u;p++)f=this._findMatchesInLine(a,o.getLineContent(p),p,0,f,C,d,u);if(f<u){const p=o.getLineContent(l.endLineNumber).substring(0,l.endColumn-1);f=this._findMatchesInLine(a,p,l.endLineNumber,0,f,C,d,u)}return C}static _findMatchesInLine(o,l,a,d,u,C,f,v){const p=o.wordSeparators;if(!f&&o.simpleSearch){const I=o.simpleSearch,T=I.length,F=l.length;let R=-T;for(;(R=l.indexOf(I,R+T))!==-1;)if((!p||r(p,l,F,R,T))&&(C[u++]=new w.FindMatch(new D.Range(a,R+1+d,a,R+1+T+d),null),u>=v))return u;return u}const L=new c(o.wordSeparators,o.regex);let E;L.reset(0);do if(E=L.next(l),E&&(C[u++]=m(new D.Range(a,E.index+1+d,a,E.index+1+E[0].length+d),E,f),u>=v))return u;while(E);return u}static findNextMatch(o,l,a,d){const u=l.parseSearchRequest();if(!u)return null;const C=new c(u.wordSeparators,u.regex);return u.regex.multiline?this._doFindNextMatchMultiline(o,a,C,d):this._doFindNextMatchLineByLine(o,a,C,d)}static _doFindNextMatchMultiline(o,l,a,d){const u=new y.Position(l.lineNumber,1),C=o.getOffsetAt(u),f=o.getLineCount(),v=o.getValueInRange(new D.Range(u.lineNumber,u.column,f,o.getLineMaxColumn(f)),1),p=o.getEOL()===`\\r\n`?new n(v):null;a.reset(l.column-1);const L=a.next(v);return L?m(this._getMultilineMatchRange(o,C,v,p,L.index,L[0]),L,d):l.lineNumber!==1||l.column!==1?this._doFindNextMatchMultiline(o,new y.Position(1,1),a,d):null}static _doFindNextMatchLineByLine(o,l,a,d){const u=o.getLineCount(),C=l.lineNumber,f=o.getLineContent(C),v=this._findFirstMatchInLine(a,f,C,l.column,d);if(v)return v;for(let p=1;p<=u;p++){const L=(C+p-1)%u,E=o.getLineContent(L+1),I=this._findFirstMatchInLine(a,E,L+1,1,d);if(I)return I}return null}static _findFirstMatchInLine(o,l,a,d,u){o.reset(d-1);const C=o.next(l);return C?m(new D.Range(a,C.index+1,a,C.index+1+C[0].length),C,u):null}static findPreviousMatch(o,l,a,d){const u=l.parseSearchRequest();if(!u)return null;const C=new c(u.wordSeparators,u.regex);return u.regex.multiline?this._doFindPreviousMatchMultiline(o,a,C,d):this._doFindPreviousMatchLineByLine(o,a,C,d)}static _doFindPreviousMatchMultiline(o,l,a,d){const u=this._doFindMatchesMultiline(o,new D.Range(1,1,l.lineNumber,l.column),a,d,10*b);if(u.length>0)return u[u.length-1];const C=o.getLineCount();return l.lineNumber!==C||l.column!==o.getLineMaxColumn(C)?this._doFindPreviousMatchMultiline(o,new y.Position(C,o.getLineMaxColumn(C)),a,d):null}static _doFindPreviousMatchLineByLine(o,l,a,d){const u=o.getLineCount(),C=l.lineNumber,f=o.getLineContent(C).substring(0,l.column-1),v=this._findLastMatchInLine(a,f,C,d);if(v)return v;for(let p=1;p<=u;p++){const L=(u+C-p-1)%u,E=o.getLineContent(L+1),I=this._findLastMatchInLine(a,E,L+1,d);if(I)return I}return null}static _findLastMatchInLine(o,l,a,d){let u=null,C;for(o.reset(0);C=o.next(l);)u=m(new D.Range(a,C.index+1,a,C.index+1+C[0].length),C,d);return u}}e.TextModelSearch=t;function i(g,o,l,a,d){if(a===0)return!0;const u=o.charCodeAt(a-1);if(g.get(u)!==0||u===13||u===10)return!0;if(d>0){const C=o.charCodeAt(a);if(g.get(C)!==0)return!0}return!1}function s(g,o,l,a,d){if(a+d===l)return!0;const u=o.charCodeAt(a+d);if(g.get(u)!==0||u===13||u===10)return!0;if(d>0){const C=o.charCodeAt(a+d-1);if(g.get(C)!==0)return!0}return!1}function r(g,o,l,a,d){return i(g,o,l,a,d)&&s(g,o,l,a,d)}e.isValidMatch=r;class c{constructor(o,l){this._wordSeparators=o,this._searchRegex=l,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(o){this._searchRegex.lastIndex=o,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(o){const l=o.length;let a;do{if(this._prevMatchStartIndex+this._prevMatchLength===l||(a=this._searchRegex.exec(o),!a))return null;const d=a.index,u=a[0].length;if(d===this._prevMatchStartIndex&&u===this._prevMatchLength){if(u===0){S.getNextCodePoint(o,l,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=d,this._prevMatchLength=u,!this._wordSeparators||r(this._wordSeparators,o,l,d,u))return a}while(a);return null}}e.Searcher=c}),define(J[261],ee([1,0,13,5,48,477,170]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=void 0;const b=65535;function _(g){let o;return g[g.length-1]<65536?o=new Uint16Array(g.length):o=new Uint32Array(g.length),o.set(g,0),o}class h{constructor(o,l,a,d,u){this.lineStarts=o,this.cr=l,this.lf=a,this.crlf=d,this.isBasicASCII=u}}function m(g,o=!0){const l=[0];let a=1;for(let d=0,u=g.length;d<u;d++){const C=g.charCodeAt(d);C===13?d+1<u&&g.charCodeAt(d+1)===10?(l[a++]=d+2,d++):l[a++]=d+1:C===10&&(l[a++]=d+1)}return o?_(l):l}e.createLineStartsFast=m;function n(g,o){g.length=0,g[0]=0;let l=1,a=0,d=0,u=0,C=!0;for(let v=0,p=o.length;v<p;v++){const L=o.charCodeAt(v);L===13?v+1<p&&o.charCodeAt(v+1)===10?(u++,g[l++]=v+2,v++):(a++,g[l++]=v+1):L===10?(d++,g[l++]=v+1):C&&L!==9&&(L<32||L>126)&&(C=!1)}const f=new h(_(g),a,d,u,C);return g.length=0,f}e.createLineStarts=n;class t{constructor(o,l,a,d,u){this.bufferIndex=o,this.start=l,this.end=a,this.lineFeedCnt=d,this.length=u}}e.Piece=t;class i{constructor(o,l){this.buffer=o,this.lineStarts=l}}e.StringBuffer=i;class s{constructor(o,l){this._pieces=[],this._tree=o,this._BOM=l,this._index=0,o.root!==D.SENTINEL&&o.iterate(o.root,a=>(a!==D.SENTINEL&&this._pieces.push(a.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 r{constructor(o){this._limit=o,this._cache=[]}get(o){for(let l=this._cache.length-1;l>=0;l--){const a=this._cache[l];if(a.nodeStartOffset<=o&&a.nodeStartOffset+a.node.piece.length>=o)return a}return null}get2(o){for(let l=this._cache.length-1;l>=0;l--){const a=this._cache[l];if(a.nodeStartLineNumber&&a.nodeStartLineNumber<o&&a.nodeStartLineNumber+a.node.piece.lineFeedCnt>=o)return a}return null}set(o){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(o)}validate(o){let l=!1;const a=this._cache;for(let d=0;d<a.length;d++){const u=a[d];if(u.node.parent===null||u.nodeStartOffset>=o){a[d]=null,l=!0;continue}}if(l){const d=[];for(const u of a)u!==null&&d.push(u);this._cache=d}}}class c{constructor(o,l,a){this.create(o,l,a)}create(o,l,a){this._buffers=[new i("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=D.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=l,this._EOLLength=l.length,this._EOLNormalized=a;let d=null;for(let u=0,C=o.length;u<C;u++)if(o[u].buffer.length>0){o[u].lineStarts||(o[u].lineStarts=m(o[u].buffer));const f=new t(u+1,{line:0,column:0},{line:o[u].lineStarts.length-1,column:o[u].buffer.length-o[u].lineStarts[o[u].lineStarts.length-1]},o[u].lineStarts.length-1,o[u].buffer.length);this._buffers.push(o[u]),d=this.rbInsertRight(d,f)}this._searchCache=new r(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(o){const l=b,a=l-Math.floor(l/3),d=a*2;let u="",C=0;const f=[];if(this.iterate(this.root,v=>{const p=this.getNodeContent(v),L=p.length;if(C<=a||C+L<d)return u+=p,C+=L,!0;const E=u.replace(/\\r\\n|\\r|\\n/g,o);return f.push(new i(E,m(E))),u=p,C=L,!0}),C>0){const v=u.replace(/\\r\\n|\\r|\\n/g,o);f.push(new i(v,m(v)))}this.create(f,o,!0)}getEOL(){return this._EOL}setEOL(o){this._EOL=o,this._EOLLength=this._EOL.length,this.normalizeEOL(o)}createSnapshot(o){return new s(this,o)}getOffsetAt(o,l){let a=0,d=this.root;for(;d!==D.SENTINEL;)if(d.left!==D.SENTINEL&&d.lf_left+1>=o)d=d.left;else if(d.lf_left+d.piece.lineFeedCnt+1>=o){a+=d.size_left;const u=this.getAccumulatedValue(d,o-d.lf_left-2);return a+=u+l-1}else o-=d.lf_left+d.piece.lineFeedCnt,a+=d.size_left+d.piece.length,d=d.right;return a}getPositionAt(o){o=Math.floor(o),o=Math.max(0,o);let l=this.root,a=0;const d=o;for(;l!==D.SENTINEL;)if(l.size_left!==0&&l.size_left>=o)l=l.left;else if(l.size_left+l.piece.length>=o){const u=this.getIndexOf(l,o-l.size_left);if(a+=l.lf_left+u.index,u.index===0){const C=this.getOffsetAt(a+1,1),f=d-C;return new S.Position(a+1,f+1)}return new S.Position(a+1,u.remainder+1)}else if(o-=l.size_left+l.piece.length,a+=l.lf_left+l.piece.lineFeedCnt,l.right===D.SENTINEL){const u=this.getOffsetAt(a+1,1),C=d-o-u;return new S.Position(a+1,C+1)}else l=l.right;return new S.Position(1,1)}getValueInRange(o,l){if(o.startLineNumber===o.endLineNumber&&o.startColumn===o.endColumn)return"";const a=this.nodeAt2(o.startLineNumber,o.startColumn),d=this.nodeAt2(o.endLineNumber,o.endColumn),u=this.getValueInRange2(a,d);return l?l!==this._EOL||!this._EOLNormalized?u.replace(/\\r\\n|\\r|\\n/g,l):l===this.getEOL()&&this._EOLNormalized?u:u.replace(/\\r\\n|\\r|\\n/g,l):u}getValueInRange2(o,l){if(o.node===l.node){const f=o.node,v=this._buffers[f.piece.bufferIndex].buffer,p=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start);return v.substring(p+o.remainder,p+l.remainder)}let a=o.node;const d=this._buffers[a.piece.bufferIndex].buffer,u=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);let C=d.substring(u+o.remainder,u+a.piece.length);for(a=a.next();a!==D.SENTINEL;){const f=this._buffers[a.piece.bufferIndex].buffer,v=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);if(a===l.node){C+=f.substring(v,v+l.remainder);break}else C+=f.substr(v,a.piece.length);a=a.next()}return C}getLinesContent(){const o=[];let l=0,a="",d=!1;return this.iterate(this.root,u=>{if(u===D.SENTINEL)return!0;const C=u.piece;let f=C.length;if(f===0)return!0;const v=this._buffers[C.bufferIndex].buffer,p=this._buffers[C.bufferIndex].lineStarts,L=C.start.line,E=C.end.line;let I=p[L]+C.start.column;if(d&&(v.charCodeAt(I)===10&&(I++,f--),o[l++]=a,a="",d=!1,f===0))return!0;if(L===E)return!this._EOLNormalized&&v.charCodeAt(I+f-1)===13?(d=!0,a+=v.substr(I,f-1)):a+=v.substr(I,f),!0;a+=this._EOLNormalized?v.substring(I,Math.max(I,p[L+1]-this._EOLLength)):v.substring(I,p[L+1]).replace(/(\\r\\n|\\r|\\n)$/,""),o[l++]=a;for(let T=L+1;T<E;T++)a=this._EOLNormalized?v.substring(p[T],p[T+1]-this._EOLLength):v.substring(p[T],p[T+1]).replace(/(\\r\\n|\\r|\\n)$/,""),o[l++]=a;return!this._EOLNormalized&&v.charCodeAt(p[E]+C.end.column-1)===13?(d=!0,C.end.column===0?l--:a=v.substr(p[E],C.end.column-1)):a=v.substr(p[E],C.end.column),!0}),d&&(o[l++]=a,a=""),o[l++]=a,o}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(o){return this._lastVisitedLine.lineNumber===o?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=o,o===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(o):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(o,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(o).replace(/(\\r\\n|\\r|\\n)$/,""),this._lastVisitedLine.value)}_getCharCode(o){if(o.remainder===o.node.piece.length){const l=o.node.next();if(!l)return 0;const a=this._buffers[l.piece.bufferIndex],d=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start);return a.buffer.charCodeAt(d)}else{const l=this._buffers[o.node.piece.bufferIndex],d=this.offsetInBuffer(o.node.piece.bufferIndex,o.node.piece.start)+o.remainder;return l.buffer.charCodeAt(d)}}getLineCharCode(o,l){const a=this.nodeAt2(o,l+1);return this._getCharCode(a)}getLineLength(o){if(o===this.getLineCount()){const l=this.getOffsetAt(o,1);return this.getLength()-l}return this.getOffsetAt(o+1,1)-this.getOffsetAt(o,1)-this._EOLLength}findMatchesInNode(o,l,a,d,u,C,f,v,p,L,E){const I=this._buffers[o.piece.bufferIndex],T=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start),F=this.offsetInBuffer(o.piece.bufferIndex,u),R=this.offsetInBuffer(o.piece.bufferIndex,C);let M;const N={line:0,column:0};let A,P;l._wordSeparators?(A=I.buffer.substring(F,R),P=x=>x+F,l.reset(0)):(A=I.buffer,P=x=>x,l.reset(F));do if(M=l.next(A),M){if(P(M.index)>=R)return L;this.positionInBuffer(o,P(M.index)-T,N);const x=this.getLineFeedCnt(o.piece.bufferIndex,u,N),W=N.line===u.line?N.column-u.column+d:N.column+1,U=W+M[0].length;if(E[L++]=(0,w.createFindMatch)(new k.Range(a+x,W,a+x,U),M,v),P(M.index)+M[0].length>=R||L>=p)return L}while(M);return L}findMatchesLineByLine(o,l,a,d){const u=[];let C=0;const f=new w.Searcher(l.wordSeparators,l.regex);let v=this.nodeAt2(o.startLineNumber,o.startColumn);if(v===null)return[];const p=this.nodeAt2(o.endLineNumber,o.endColumn);if(p===null)return[];let L=this.positionInBuffer(v.node,v.remainder);const E=this.positionInBuffer(p.node,p.remainder);if(v.node===p.node)return this.findMatchesInNode(v.node,f,o.startLineNumber,o.startColumn,L,E,l,a,d,C,u),u;let I=o.startLineNumber,T=v.node;for(;T!==p.node;){const R=this.getLineFeedCnt(T.piece.bufferIndex,L,T.piece.end);if(R>=1){const N=this._buffers[T.piece.bufferIndex].lineStarts,A=this.offsetInBuffer(T.piece.bufferIndex,T.piece.start),P=N[L.line+R],x=I===o.startLineNumber?o.startColumn:1;if(C=this.findMatchesInNode(T,f,I,x,L,this.positionInBuffer(T,P-A),l,a,d,C,u),C>=d)return u;I+=R}const M=I===o.startLineNumber?o.startColumn-1:0;if(I===o.endLineNumber){const N=this.getLineContent(I).substring(M,o.endColumn-1);return C=this._findMatchesInLine(l,f,N,o.endLineNumber,M,C,u,a,d),u}if(C=this._findMatchesInLine(l,f,this.getLineContent(I).substr(M),I,M,C,u,a,d),C>=d)return u;I++,v=this.nodeAt2(I,1),T=v.node,L=this.positionInBuffer(v.node,v.remainder)}if(I===o.endLineNumber){const R=I===o.startLineNumber?o.startColumn-1:0,M=this.getLineContent(I).substring(R,o.endColumn-1);return C=this._findMatchesInLine(l,f,M,o.endLineNumber,R,C,u,a,d),u}const F=I===o.startLineNumber?o.startColumn:1;return C=this.findMatchesInNode(p.node,f,I,F,L,E,l,a,d,C,u),u}_findMatchesInLine(o,l,a,d,u,C,f,v,p){const L=o.wordSeparators;if(!v&&o.simpleSearch){const I=o.simpleSearch,T=I.length,F=a.length;let R=-T;for(;(R=a.indexOf(I,R+T))!==-1;)if((!L||(0,w.isValidMatch)(L,a,F,R,T))&&(f[C++]=new y.FindMatch(new k.Range(d,R+1+u,d,R+1+T+u),null),C>=p))return C;return C}let E;l.reset(0);do if(E=l.next(a),E&&(f[C++]=(0,w.createFindMatch)(new k.Range(d,E.index+1+u,d,E.index+1+E[0].length+u),E,v),C>=p))return C;while(E);return C}insert(o,l,a=!1){if(this._EOLNormalized=this._EOLNormalized&&a,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==D.SENTINEL){const{node:d,remainder:u,nodeStartOffset:C}=this.nodeAt(o),f=d.piece,v=f.bufferIndex,p=this.positionInBuffer(d,u);if(d.piece.bufferIndex===0&&f.end.line===this._lastChangeBufferPos.line&&f.end.column===this._lastChangeBufferPos.column&&C+f.length===o&&l.length<b){this.appendToNode(d,l),this.computeBufferMetadata();return}if(C===o)this.insertContentToNodeLeft(l,d),this._searchCache.validate(o);else if(C+d.piece.length>o){const L=[];let E=new t(f.bufferIndex,p,f.end,this.getLineFeedCnt(f.bufferIndex,p,f.end),this.offsetInBuffer(v,f.end)-this.offsetInBuffer(v,p));if(this.shouldCheckCRLF()&&this.endWithCR(l)&&this.nodeCharCodeAt(d,u)===10){const R={line:E.start.line+1,column:0};E=new t(E.bufferIndex,R,E.end,this.getLineFeedCnt(E.bufferIndex,R,E.end),E.length-1),l+=`\n`}if(this.shouldCheckCRLF()&&this.startWithLF(l))if(this.nodeCharCodeAt(d,u-1)===13){const R=this.positionInBuffer(d,u-1);this.deleteNodeTail(d,R),l="\\r"+l,d.piece.length===0&&L.push(d)}else this.deleteNodeTail(d,p);else this.deleteNodeTail(d,p);const I=this.createNewPieces(l);E.length>0&&this.rbInsertRight(d,E);let T=d;for(let F=0;F<I.length;F++)T=this.rbInsertRight(T,I[F]);this.deleteNodes(L)}else this.insertContentToNodeRight(l,d)}else{const d=this.createNewPieces(l);let u=this.rbInsertLeft(null,d[0]);for(let C=1;C<d.length;C++)u=this.rbInsertRight(u,d[C])}this.computeBufferMetadata()}delete(o,l){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",l<=0||this.root===D.SENTINEL)return;const a=this.nodeAt(o),d=this.nodeAt(o+l),u=a.node,C=d.node;if(u===C){const I=this.positionInBuffer(u,a.remainder),T=this.positionInBuffer(u,d.remainder);if(a.nodeStartOffset===o){if(l===u.piece.length){const F=u.next();(0,D.rbDelete)(this,u),this.validateCRLFWithPrevNode(F),this.computeBufferMetadata();return}this.deleteNodeHead(u,T),this._searchCache.validate(o),this.validateCRLFWithPrevNode(u),this.computeBufferMetadata();return}if(a.nodeStartOffset+u.piece.length===o+l){this.deleteNodeTail(u,I),this.validateCRLFWithNextNode(u),this.computeBufferMetadata();return}this.shrinkNode(u,I,T),this.computeBufferMetadata();return}const f=[],v=this.positionInBuffer(u,a.remainder);this.deleteNodeTail(u,v),this._searchCache.validate(o),u.piece.length===0&&f.push(u);const p=this.positionInBuffer(C,d.remainder);this.deleteNodeHead(C,p),C.piece.length===0&&f.push(C);const L=u.next();for(let I=L;I!==D.SENTINEL&&I!==C;I=I.next())f.push(I);const E=u.piece.length===0?u.prev():u;this.deleteNodes(f),this.validateCRLFWithNextNode(E),this.computeBufferMetadata()}insertContentToNodeLeft(o,l){const a=[];if(this.shouldCheckCRLF()&&this.endWithCR(o)&&this.startWithLF(l)){const C=l.piece,f={line:C.start.line+1,column:0},v=new t(C.bufferIndex,f,C.end,this.getLineFeedCnt(C.bufferIndex,f,C.end),C.length-1);l.piece=v,o+=`\n`,(0,D.updateTreeMetadata)(this,l,-1,-1),l.piece.length===0&&a.push(l)}const d=this.createNewPieces(o);let u=this.rbInsertLeft(l,d[d.length-1]);for(let C=d.length-2;C>=0;C--)u=this.rbInsertLeft(u,d[C]);this.validateCRLFWithPrevNode(u),this.deleteNodes(a)}insertContentToNodeRight(o,l){this.adjustCarriageReturnFromNext(o,l)&&(o+=`\n`);const a=this.createNewPieces(o),d=this.rbInsertRight(l,a[0]);let u=d;for(let C=1;C<a.length;C++)u=this.rbInsertRight(u,a[C]);this.validateCRLFWithPrevNode(d)}positionInBuffer(o,l,a){const d=o.piece,u=o.piece.bufferIndex,C=this._buffers[u].lineStarts,v=C[d.start.line]+d.start.column+l;let p=d.start.line,L=d.end.line,E=0,I=0,T=0;for(;p<=L&&(E=p+(L-p)/2|0,T=C[E],E!==L);)if(I=C[E+1],v<T)L=E-1;else if(v>=I)p=E+1;else break;return a?(a.line=E,a.column=v-T,null):{line:E,column:v-T}}getLineFeedCnt(o,l,a){if(a.column===0)return a.line-l.line;const d=this._buffers[o].lineStarts;if(a.line===d.length-1)return a.line-l.line;const u=d[a.line+1],C=d[a.line]+a.column;if(u>C+1)return a.line-l.line;const f=C-1;return this._buffers[o].buffer.charCodeAt(f)===13?a.line-l.line+1:a.line-l.line}offsetInBuffer(o,l){return this._buffers[o].lineStarts[l.line]+l.column}deleteNodes(o){for(let l=0;l<o.length;l++)(0,D.rbDelete)(this,o[l])}createNewPieces(o){if(o.length>b){const L=[];for(;o.length>b;){const I=o.charCodeAt(b-1);let T;I===13||I>=55296&&I<=56319?(T=o.substring(0,b-1),o=o.substring(b-1)):(T=o.substring(0,b),o=o.substring(b));const F=m(T);L.push(new t(this._buffers.length,{line:0,column:0},{line:F.length-1,column:T.length-F[F.length-1]},F.length-1,T.length)),this._buffers.push(new i(T,F))}const E=m(o);return L.push(new t(this._buffers.length,{line:0,column:0},{line:E.length-1,column:o.length-E[E.length-1]},E.length-1,o.length)),this._buffers.push(new i(o,E)),L}let l=this._buffers[0].buffer.length;const a=m(o,!1);let d=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===l&&l!==0&&this.startWithLF(o)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},d=this._lastChangeBufferPos;for(let L=0;L<a.length;L++)a[L]+=l+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1)),this._buffers[0].buffer+="_"+o,l+=1}else{if(l!==0)for(let L=0;L<a.length;L++)a[L]+=l;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1)),this._buffers[0].buffer+=o}const u=this._buffers[0].buffer.length,C=this._buffers[0].lineStarts.length-1,f=u-this._buffers[0].lineStarts[C],v={line:C,column:f},p=new t(0,d,v,this.getLineFeedCnt(0,d,v),u-l);return this._lastChangeBufferPos=v,[p]}getLineRawContent(o,l=0){let a=this.root,d="";const u=this._searchCache.get2(o);if(u){a=u.node;const C=this.getAccumulatedValue(a,o-u.nodeStartLineNumber-1),f=this._buffers[a.piece.bufferIndex].buffer,v=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);if(u.nodeStartLineNumber+a.piece.lineFeedCnt===o)d=f.substring(v+C,v+a.piece.length);else{const p=this.getAccumulatedValue(a,o-u.nodeStartLineNumber);return f.substring(v+C,v+p-l)}}else{let C=0;const f=o;for(;a!==D.SENTINEL;)if(a.left!==D.SENTINEL&&a.lf_left>=o-1)a=a.left;else if(a.lf_left+a.piece.lineFeedCnt>o-1){const v=this.getAccumulatedValue(a,o-a.lf_left-2),p=this.getAccumulatedValue(a,o-a.lf_left-1),L=this._buffers[a.piece.bufferIndex].buffer,E=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return C+=a.size_left,this._searchCache.set({node:a,nodeStartOffset:C,nodeStartLineNumber:f-(o-1-a.lf_left)}),L.substring(E+v,E+p-l)}else if(a.lf_left+a.piece.lineFeedCnt===o-1){const v=this.getAccumulatedValue(a,o-a.lf_left-2),p=this._buffers[a.piece.bufferIndex].buffer,L=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);d=p.substring(L+v,L+a.piece.length);break}else o-=a.lf_left+a.piece.lineFeedCnt,C+=a.size_left+a.piece.length,a=a.right}for(a=a.next();a!==D.SENTINEL;){const C=this._buffers[a.piece.bufferIndex].buffer;if(a.piece.lineFeedCnt>0){const f=this.getAccumulatedValue(a,0),v=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return d+=C.substring(v,v+f-l),d}else{const f=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);d+=C.substr(f,a.piece.length)}a=a.next()}return d}computeBufferMetadata(){let o=this.root,l=1,a=0;for(;o!==D.SENTINEL;)l+=o.lf_left+o.piece.lineFeedCnt,a+=o.size_left+o.piece.length,o=o.right;this._lineCnt=l,this._length=a,this._searchCache.validate(this._length)}getIndexOf(o,l){const a=o.piece,d=this.positionInBuffer(o,l),u=d.line-a.start.line;if(this.offsetInBuffer(a.bufferIndex,a.end)-this.offsetInBuffer(a.bufferIndex,a.start)===l){const C=this.getLineFeedCnt(o.piece.bufferIndex,a.start,d);if(C!==u)return{index:C,remainder:0}}return{index:u,remainder:d.column}}getAccumulatedValue(o,l){if(l<0)return 0;const a=o.piece,d=this._buffers[a.bufferIndex].lineStarts,u=a.start.line+l+1;return u>a.end.line?d[a.end.line]+a.end.column-d[a.start.line]-a.start.column:d[u]-d[a.start.line]-a.start.column}deleteNodeTail(o,l){const a=o.piece,d=a.lineFeedCnt,u=this.offsetInBuffer(a.bufferIndex,a.end),C=l,f=this.offsetInBuffer(a.bufferIndex,C),v=this.getLineFeedCnt(a.bufferIndex,a.start,C),p=v-d,L=f-u,E=a.length+L;o.piece=new t(a.bufferIndex,a.start,C,v,E),(0,D.updateTreeMetadata)(this,o,L,p)}deleteNodeHead(o,l){const a=o.piece,d=a.lineFeedCnt,u=this.offsetInBuffer(a.bufferIndex,a.start),C=l,f=this.getLineFeedCnt(a.bufferIndex,C,a.end),v=this.offsetInBuffer(a.bufferIndex,C),p=f-d,L=u-v,E=a.length+L;o.piece=new t(a.bufferIndex,C,a.end,f,E),(0,D.updateTreeMetadata)(this,o,L,p)}shrinkNode(o,l,a){const d=o.piece,u=d.start,C=d.end,f=d.length,v=d.lineFeedCnt,p=l,L=this.getLineFeedCnt(d.bufferIndex,d.start,p),E=this.offsetInBuffer(d.bufferIndex,l)-this.offsetInBuffer(d.bufferIndex,u);o.piece=new t(d.bufferIndex,d.start,p,L,E),(0,D.updateTreeMetadata)(this,o,E-f,L-v);const I=new t(d.bufferIndex,a,C,this.getLineFeedCnt(d.bufferIndex,a,C),this.offsetInBuffer(d.bufferIndex,C)-this.offsetInBuffer(d.bufferIndex,a)),T=this.rbInsertRight(o,I);this.validateCRLFWithPrevNode(T)}appendToNode(o,l){this.adjustCarriageReturnFromNext(l,o)&&(l+=`\n`);const a=this.shouldCheckCRLF()&&this.startWithLF(l)&&this.endWithCR(o),d=this._buffers[0].buffer.length;this._buffers[0].buffer+=l;const u=m(l,!1);for(let T=0;T<u.length;T++)u[T]+=d;if(a){const T=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:d-T}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(u.slice(1));const C=this._buffers[0].lineStarts.length-1,f=this._buffers[0].buffer.length-this._buffers[0].lineStarts[C],v={line:C,column:f},p=o.piece.length+l.length,L=o.piece.lineFeedCnt,E=this.getLineFeedCnt(0,o.piece.start,v),I=E-L;o.piece=new t(o.piece.bufferIndex,o.piece.start,v,E,p),this._lastChangeBufferPos=v,(0,D.updateTreeMetadata)(this,o,l.length,I)}nodeAt(o){let l=this.root;const a=this._searchCache.get(o);if(a)return{node:a.node,nodeStartOffset:a.nodeStartOffset,remainder:o-a.nodeStartOffset};let d=0;for(;l!==D.SENTINEL;)if(l.size_left>o)l=l.left;else if(l.size_left+l.piece.length>=o){d+=l.size_left;const u={node:l,remainder:o-l.size_left,nodeStartOffset:d};return this._searchCache.set(u),u}else o-=l.size_left+l.piece.length,d+=l.size_left+l.piece.length,l=l.right;return null}nodeAt2(o,l){let a=this.root,d=0;for(;a!==D.SENTINEL;)if(a.left!==D.SENTINEL&&a.lf_left>=o-1)a=a.left;else if(a.lf_left+a.piece.lineFeedCnt>o-1){const u=this.getAccumulatedValue(a,o-a.lf_left-2),C=this.getAccumulatedValue(a,o-a.lf_left-1);return d+=a.size_left,{node:a,remainder:Math.min(u+l-1,C),nodeStartOffset:d}}else if(a.lf_left+a.piece.lineFeedCnt===o-1){const u=this.getAccumulatedValue(a,o-a.lf_left-2);if(u+l-1<=a.piece.length)return{node:a,remainder:u+l-1,nodeStartOffset:d};l-=a.piece.length-u;break}else o-=a.lf_left+a.piece.lineFeedCnt,d+=a.size_left+a.piece.length,a=a.right;for(a=a.next();a!==D.SENTINEL;){if(a.piece.lineFeedCnt>0){const u=this.getAccumulatedValue(a,0),C=this.offsetOfNode(a);return{node:a,remainder:Math.min(l-1,u),nodeStartOffset:C}}else if(a.piece.length>=l-1){const u=this.offsetOfNode(a);return{node:a,remainder:l-1,nodeStartOffset:u}}else l-=a.piece.length;a=a.next()}return null}nodeCharCodeAt(o,l){if(o.piece.lineFeedCnt<1)return-1;const a=this._buffers[o.piece.bufferIndex],d=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start)+l;return a.buffer.charCodeAt(d)}offsetOfNode(o){if(!o)return 0;let l=o.size_left;for(;o!==this.root;)o.parent.right===o&&(l+=o.parent.size_left+o.parent.piece.length),o=o.parent;return l}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`\n`)}startWithLF(o){if(typeof o=="string")return o.charCodeAt(0)===10;if(o===D.SENTINEL||o.piece.lineFeedCnt===0)return!1;const l=o.piece,a=this._buffers[l.bufferIndex].lineStarts,d=l.start.line,u=a[d]+l.start.column;return d===a.length-1||a[d+1]>u+1?!1:this._buffers[l.bufferIndex].buffer.charCodeAt(u)===10}endWithCR(o){return typeof o=="string"?o.charCodeAt(o.length-1)===13:o===D.SENTINEL||o.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(o,o.piece.length-1)===13}validateCRLFWithPrevNode(o){if(this.shouldCheckCRLF()&&this.startWithLF(o)){const l=o.prev();this.endWithCR(l)&&this.fixCRLF(l,o)}}validateCRLFWithNextNode(o){if(this.shouldCheckCRLF()&&this.endWithCR(o)){const l=o.next();this.startWithLF(l)&&this.fixCRLF(o,l)}}fixCRLF(o,l){const a=[],d=this._buffers[o.piece.bufferIndex].lineStarts;let u;o.piece.end.column===0?u={line:o.piece.end.line-1,column:d[o.piece.end.line]-d[o.piece.end.line-1]-1}:u={line:o.piece.end.line,column:o.piece.end.column-1};const C=o.piece.length-1,f=o.piece.lineFeedCnt-1;o.piece=new t(o.piece.bufferIndex,o.piece.start,u,f,C),(0,D.updateTreeMetadata)(this,o,-1,-1),o.piece.length===0&&a.push(o);const v={line:l.piece.start.line+1,column:0},p=l.piece.length-1,L=this.getLineFeedCnt(l.piece.bufferIndex,v,l.piece.end);l.piece=new t(l.piece.bufferIndex,v,l.piece.end,L,p),(0,D.updateTreeMetadata)(this,l,-1,-1),l.piece.length===0&&a.push(l);const E=this.createNewPieces(`\\r\n`);this.rbInsertRight(o,E[0]);for(let I=0;I<a.length;I++)(0,D.rbDelete)(this,a[I])}adjustCarriageReturnFromNext(o,l){if(this.shouldCheckCRLF()&&this.endWithCR(o)){const a=l.next();if(this.startWithLF(a)){if(o+=`\n`,a.piece.length===1)(0,D.rbDelete)(this,a);else{const d=a.piece,u={line:d.start.line+1,column:0},C=d.length-1,f=this.getLineFeedCnt(d.bufferIndex,u,d.end);a.piece=new t(d.bufferIndex,u,d.end,f,C),(0,D.updateTreeMetadata)(this,a,-1,-1)}return!0}}return!1}iterate(o,l){if(o===D.SENTINEL)return l(D.SENTINEL);const a=this.iterate(o.left,l);return a&&l(o)&&this.iterate(o.right,l)}getNodeContent(o){if(o===D.SENTINEL)return"";const l=this._buffers[o.piece.bufferIndex],a=o.piece,d=this.offsetInBuffer(a.bufferIndex,a.start),u=this.offsetInBuffer(a.bufferIndex,a.end);return l.buffer.substring(d,u)}getPieceContent(o){const l=this._buffers[o.bufferIndex],a=this.offsetInBuffer(o.bufferIndex,o.start),d=this.offsetInBuffer(o.bufferIndex,o.end);return l.buffer.substring(a,d)}rbInsertRight(o,l){const a=new D.TreeNode(l,1);if(a.left=D.SENTINEL,a.right=D.SENTINEL,a.parent=D.SENTINEL,a.size_left=0,a.lf_left=0,this.root===D.SENTINEL)this.root=a,a.color=0;else if(o.right===D.SENTINEL)o.right=a,a.parent=o;else{const u=(0,D.leftest)(o.right);u.left=a,a.parent=u}return(0,D.fixInsert)(this,a),a}rbInsertLeft(o,l){const a=new D.TreeNode(l,1);if(a.left=D.SENTINEL,a.right=D.SENTINEL,a.parent=D.SENTINEL,a.size_left=0,a.lf_left=0,this.root===D.SENTINEL)this.root=a,a.color=0;else if(o.left===D.SENTINEL)o.left=a,a.parent=o;else{const d=(0,D.righttest)(o.left);d.right=a,a.parent=d}return(0,D.fixInsert)(this,a),a}}e.PieceTreeBase=c}),define(J[193],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeIndentLevel=void 0;function S(k,y){let D=0,w=0;const b=k.length;for(;w<b;){const _=k.charCodeAt(w);if(_===32)D++;else if(_===9)D=D-D%y+y;else break;w++}return w===b?-1:D}e.computeIndentLevel=S}),define(J[262],ee([1,0,84,13,48]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputPosition=e.InjectedText=e.ModelLineProjectionData=void 0;class D{constructor(n,t,i,s,r){this.injectionOffsets=n,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=s,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(n){return n>0?this.wrappedTextIndentLength:0}getLineLength(n){const t=n>0?this.breakOffsets[n-1]:0;let s=this.breakOffsets[n]-t;return n>0&&(s+=this.wrappedTextIndentLength),s}getMaxOutputOffset(n){return this.getLineLength(n)}translateToInputOffset(n,t){n>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let s=n===0?t:this.breakOffsets[n-1]+t;if(this.injectionOffsets!==null)for(let r=0;r<this.injectionOffsets.length&&s>this.injectionOffsets[r];r++)s<this.injectionOffsets[r]+this.injectionOptions[r].content.length?s=this.injectionOffsets[r]:s-=this.injectionOptions[r].content.length;return s}translateToOutputPosition(n,t=2){let i=n;if(this.injectionOffsets!==null)for(let s=0;s<this.injectionOffsets.length&&!(n<this.injectionOffsets[s]||t!==1&&n===this.injectionOffsets[s]);s++)i+=this.injectionOptions[s].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,t)}offsetInInputWithInjectionsToOutputPosition(n,t=2){let i=0,s=this.breakOffsets.length-1,r=0,c=0;for(;i<=s;){r=i+(s-i)/2|0;const o=this.breakOffsets[r];if(c=r>0?this.breakOffsets[r-1]:0,t===0)if(n<=c)s=r-1;else if(n>o)i=r+1;else break;else if(n<c)s=r-1;else if(n>=o)i=r+1;else break}let g=n-c;return r>0&&(g+=this.wrappedTextIndentLength),new h(r,g)}normalizeOutputPosition(n,t,i){if(this.injectionOffsets!==null){const s=this.outputPositionToOffsetInInputWithInjections(n,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(s,i);if(r!==s)return this.offsetInInputWithInjectionsToOutputPosition(r,i)}if(i===0){if(n>0&&t===this.getMinOutputOffset(n))return new h(n-1,this.getMaxOutputOffset(n-1))}else if(i===1){const s=this.getOutputLineCount()-1;if(n<s&&t===this.getMaxOutputOffset(n))return new h(n+1,this.getMinOutputOffset(n+1))}return new h(n,t)}outputPositionToOffsetInInputWithInjections(n,t){return n>0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(n>0?this.breakOffsets[n-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(n,t){const i=this.getInjectedTextAtOffset(n);if(!i)return n;if(t===2){if(n===i.offsetInInputWithInjections+i.length&&w(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let s=i.offsetInInputWithInjections;if(b(this.injectionOptions[i.injectedTextIndex].cursorStops))return s;let r=i.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[i.injectedTextIndex]&&!(w(this.injectionOptions[r].cursorStops)||(s-=this.injectionOptions[r].content.length,b(this.injectionOptions[r].cursorStops)));)r--;return s}}else if(t===1||t===4){let s=i.offsetInInputWithInjections+i.length,r=i.injectedTextIndex;for(;r+1<this.injectionOffsets.length&&this.injectionOffsets[r+1]===this.injectionOffsets[r];)s+=this.injectionOptions[r+1].content.length,r++;return s}else if(t===0||t===3){let s=i.offsetInInputWithInjections,r=i.injectedTextIndex;for(;r-1>=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)s-=this.injectionOptions[r-1].content.length,r--;return s}(0,S.assertNever)(t)}getInjectedText(n,t){const i=this.outputPositionToOffsetInInputWithInjections(n,t),s=this.getInjectedTextAtOffset(i);return s?{options:this.injectionOptions[s.injectedTextIndex]}:null}getInjectedTextAtOffset(n){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let s=0;for(let r=0;r<t.length;r++){const c=i[r].content.length,g=t[r]+s,o=t[r]+s+c;if(g>n)break;if(n<=o)return{injectedTextIndex:r,offsetInInputWithInjections:g,length:c};s+=c}}}}e.ModelLineProjectionData=D;function w(m){return m==null?!0:m===y.InjectedTextCursorStops.Right||m===y.InjectedTextCursorStops.Both}function b(m){return m==null?!0:m===y.InjectedTextCursorStops.Left||m===y.InjectedTextCursorStops.Both}class _{constructor(n){this.options=n}}e.InjectedText=_;class h{constructor(n,t){this.outputLineIndex=n,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(n){return new k.Position(n+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=h}),define(J[263],ee([1,0,5,170,9,84,136]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeTextModelHighlighter=void 0;class b{static computeUnicodeHighlights(t,i,s){const r=s?s.startLineNumber:1,c=s?s.endLineNumber:t.getLineCount(),g=new h(i),o=g.getCandidateCodePoints();let l;o==="allNonBasicAscii"?l=new RegExp("[^\\\\t\\\\n\\\\r\\\\x20-\\\\x7E]","g"):l=new RegExp(`${_(Array.from(o))}`,"g");const a=new k.Searcher(null,l),d=[];let u=!1,C,f=0,v=0,p=0;e:for(let L=r,E=c;L<=E;L++){const I=t.getLineContent(L),T=I.length;a.reset(0);do if(C=a.next(I),C){let F=C.index,R=C.index+C[0].length;if(F>0){const P=I.charCodeAt(F-1);y.isHighSurrogate(P)&&F--}if(R+1<T){const P=I.charCodeAt(R-1);y.isHighSurrogate(P)&&R++}const M=I.substring(F,R);let N=(0,w.getWordAtText)(F+1,w.DEFAULT_WORD_REGEXP,I,0);N&&N.endColumn<=F+1&&(N=null);const A=g.shouldHighlightNonBasicASCII(M,N?N.word:null);if(A!==0){A===3?f++:A===2?v++:A===1?p++:(0,D.assertNever)(A);const P=1e3;if(d.length>=P){u=!0;break e}d.push(new S.Range(L,F+1,L,R+1))}}while(C)}return{ranges:d,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:v,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(t,i){const s=new h(i);switch(s.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{const c=t.codePointAt(0),g=s.ambiguousCharacters.getPrimaryConfusable(c),o=y.AmbiguousCharacters.getLocales().filter(l=>!y.AmbiguousCharacters.getInstance(new Set([...i.allowedLocales,l])).isAmbiguous(c));return{kind:0,confusableWith:String.fromCodePoint(g),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}e.UnicodeTextModelHighlighter=b;function _(n,t){return`[${y.escapeRegExpCharacters(n.map(s=>String.fromCodePoint(s)).join(""))}]`}class h{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=y.AmbiguousCharacters.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const i of y.InvisibleCharacters.codePoints)m(String.fromCodePoint(i))||t.add(i);if(this.options.ambiguousCharacters)for(const i of this.ambiguousCharacters.getConfusableCodePoints())t.add(i);for(const i of this.allowedCodePoints)t.delete(i);return t}shouldHighlightNonBasicASCII(t,i){const s=t.codePointAt(0);if(this.allowedCodePoints.has(s))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,c=!1;if(i)for(const g of i){const o=g.codePointAt(0),l=y.isBasicASCII(g);r=r||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!y.InvisibleCharacters.isInvisibleCharacter(o)&&(c=!0)}return!r&&c?0:this.options.invisibleCharacters&&!m(t)&&y.InvisibleCharacters.isInvisibleCharacter(s)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(s)?3:0}}function m(n){return n===" "||n===`\n`||n==="\t"}}),define(J[194],ee([1,0]),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.PositionAffinity=e.OverviewRulerLane=e.OverlayWidgetPositionPreference=e.MouseTargetType=e.MinimapPosition=e.MarkerTag=e.MarkerSeverity=e.KeyCode=e.InlineCompletionTriggerKind=e.InlayHintKind=e.InjectedTextCursorStops=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.CodeActionTriggerType=e.AccessibilitySupport=void 0;var S;(function(O){O[O.Unknown=0]="Unknown",O[O.Disabled=1]="Disabled",O[O.Enabled=2]="Enabled"})(S=e.AccessibilitySupport||(e.AccessibilitySupport={}));var k;(function(O){O[O.Invoke=1]="Invoke",O[O.Auto=2]="Auto"})(k=e.CodeActionTriggerType||(e.CodeActionTriggerType={}));var y;(function(O){O[O.None=0]="None",O[O.KeepWhitespace=1]="KeepWhitespace",O[O.InsertAsSnippet=4]="InsertAsSnippet"})(y=e.CompletionItemInsertTextRule||(e.CompletionItemInsertTextRule={}));var D;(function(O){O[O.Method=0]="Method",O[O.Function=1]="Function",O[O.Constructor=2]="Constructor",O[O.Field=3]="Field",O[O.Variable=4]="Variable",O[O.Class=5]="Class",O[O.Struct=6]="Struct",O[O.Interface=7]="Interface",O[O.Module=8]="Module",O[O.Property=9]="Property",O[O.Event=10]="Event",O[O.Operator=11]="Operator",O[O.Unit=12]="Unit",O[O.Value=13]="Value",O[O.Constant=14]="Constant",O[O.Enum=15]="Enum",O[O.EnumMember=16]="EnumMember",O[O.Keyword=17]="Keyword",O[O.Text=18]="Text",O[O.Color=19]="Color",O[O.File=20]="File",O[O.Reference=21]="Reference",O[O.Customcolor=22]="Customcolor",O[O.Folder=23]="Folder",O[O.TypeParameter=24]="TypeParameter",O[O.User=25]="User",O[O.Issue=26]="Issue",O[O.Snippet=27]="Snippet"})(D=e.CompletionItemKind||(e.CompletionItemKind={}));var w;(function(O){O[O.Deprecated=1]="Deprecated"})(w=e.CompletionItemTag||(e.CompletionItemTag={}));var b;(function(O){O[O.Invoke=0]="Invoke",O[O.TriggerCharacter=1]="TriggerCharacter",O[O.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(b=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var _;(function(O){O[O.EXACT=0]="EXACT",O[O.ABOVE=1]="ABOVE",O[O.BELOW=2]="BELOW"})(_=e.ContentWidgetPositionPreference||(e.ContentWidgetPositionPreference={}));var h;(function(O){O[O.NotSet=0]="NotSet",O[O.ContentFlush=1]="ContentFlush",O[O.RecoverFromMarkers=2]="RecoverFromMarkers",O[O.Explicit=3]="Explicit",O[O.Paste=4]="Paste",O[O.Undo=5]="Undo",O[O.Redo=6]="Redo"})(h=e.CursorChangeReason||(e.CursorChangeReason={}));var m;(function(O){O[O.LF=1]="LF",O[O.CRLF=2]="CRLF"})(m=e.DefaultEndOfLine||(e.DefaultEndOfLine={}));var n;(function(O){O[O.Text=0]="Text",O[O.Read=1]="Read",O[O.Write=2]="Write"})(n=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));var t;(function(O){O[O.None=0]="None",O[O.Keep=1]="Keep",O[O.Brackets=2]="Brackets",O[O.Advanced=3]="Advanced",O[O.Full=4]="Full"})(t=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={}));var i;(function(O){O[O.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",O[O.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",O[O.accessibilitySupport=2]="accessibilitySupport",O[O.accessibilityPageSize=3]="accessibilityPageSize",O[O.ariaLabel=4]="ariaLabel",O[O.autoClosingBrackets=5]="autoClosingBrackets",O[O.screenReaderAnnounceInlineSuggestion=6]="screenReaderAnnounceInlineSuggestion",O[O.autoClosingDelete=7]="autoClosingDelete",O[O.autoClosingOvertype=8]="autoClosingOvertype",O[O.autoClosingQuotes=9]="autoClosingQuotes",O[O.autoIndent=10]="autoIndent",O[O.automaticLayout=11]="automaticLayout",O[O.autoSurround=12]="autoSurround",O[O.bracketPairColorization=13]="bracketPairColorization",O[O.guides=14]="guides",O[O.codeLens=15]="codeLens",O[O.codeLensFontFamily=16]="codeLensFontFamily",O[O.codeLensFontSize=17]="codeLensFontSize",O[O.colorDecorators=18]="colorDecorators",O[O.colorDecoratorsLimit=19]="colorDecoratorsLimit",O[O.columnSelection=20]="columnSelection",O[O.comments=21]="comments",O[O.contextmenu=22]="contextmenu",O[O.copyWithSyntaxHighlighting=23]="copyWithSyntaxHighlighting",O[O.cursorBlinking=24]="cursorBlinking",O[O.cursorSmoothCaretAnimation=25]="cursorSmoothCaretAnimation",O[O.cursorStyle=26]="cursorStyle",O[O.cursorSurroundingLines=27]="cursorSurroundingLines",O[O.cursorSurroundingLinesStyle=28]="cursorSurroundingLinesStyle",O[O.cursorWidth=29]="cursorWidth",O[O.disableLayerHinting=30]="disableLayerHinting",O[O.disableMonospaceOptimizations=31]="disableMonospaceOptimizations",O[O.domReadOnly=32]="domReadOnly",O[O.dragAndDrop=33]="dragAndDrop",O[O.dropIntoEditor=34]="dropIntoEditor",O[O.emptySelectionClipboard=35]="emptySelectionClipboard",O[O.experimentalWhitespaceRendering=36]="experimentalWhitespaceRendering",O[O.extraEditorClassName=37]="extraEditorClassName",O[O.fastScrollSensitivity=38]="fastScrollSensitivity",O[O.find=39]="find",O[O.fixedOverflowWidgets=40]="fixedOverflowWidgets",O[O.folding=41]="folding",O[O.foldingStrategy=42]="foldingStrategy",O[O.foldingHighlight=43]="foldingHighlight",O[O.foldingImportsByDefault=44]="foldingImportsByDefault",O[O.foldingMaximumRegions=45]="foldingMaximumRegions",O[O.unfoldOnClickAfterEndOfLine=46]="unfoldOnClickAfterEndOfLine",O[O.fontFamily=47]="fontFamily",O[O.fontInfo=48]="fontInfo",O[O.fontLigatures=49]="fontLigatures",O[O.fontSize=50]="fontSize",O[O.fontWeight=51]="fontWeight",O[O.fontVariations=52]="fontVariations",O[O.formatOnPaste=53]="formatOnPaste",O[O.formatOnType=54]="formatOnType",O[O.glyphMargin=55]="glyphMargin",O[O.gotoLocation=56]="gotoLocation",O[O.hideCursorInOverviewRuler=57]="hideCursorInOverviewRuler",O[O.hover=58]="hover",O[O.inDiffEditor=59]="inDiffEditor",O[O.inlineSuggest=60]="inlineSuggest",O[O.letterSpacing=61]="letterSpacing",O[O.lightbulb=62]="lightbulb",O[O.lineDecorationsWidth=63]="lineDecorationsWidth",O[O.lineHeight=64]="lineHeight",O[O.lineNumbers=65]="lineNumbers",O[O.lineNumbersMinChars=66]="lineNumbersMinChars",O[O.linkedEditing=67]="linkedEditing",O[O.links=68]="links",O[O.matchBrackets=69]="matchBrackets",O[O.minimap=70]="minimap",O[O.mouseStyle=71]="mouseStyle",O[O.mouseWheelScrollSensitivity=72]="mouseWheelScrollSensitivity",O[O.mouseWheelZoom=73]="mouseWheelZoom",O[O.multiCursorMergeOverlapping=74]="multiCursorMergeOverlapping",O[O.multiCursorModifier=75]="multiCursorModifier",O[O.multiCursorPaste=76]="multiCursorPaste",O[O.multiCursorLimit=77]="multiCursorLimit",O[O.occurrencesHighlight=78]="occurrencesHighlight",O[O.overviewRulerBorder=79]="overviewRulerBorder",O[O.overviewRulerLanes=80]="overviewRulerLanes",O[O.padding=81]="padding",O[O.parameterHints=82]="parameterHints",O[O.peekWidgetDefaultFocus=83]="peekWidgetDefaultFocus",O[O.definitionLinkOpensInPeek=84]="definitionLinkOpensInPeek",O[O.quickSuggestions=85]="quickSuggestions",O[O.quickSuggestionsDelay=86]="quickSuggestionsDelay",O[O.readOnly=87]="readOnly",O[O.renameOnType=88]="renameOnType",O[O.renderControlCharacters=89]="renderControlCharacters",O[O.renderFinalNewline=90]="renderFinalNewline",O[O.renderLineHighlight=91]="renderLineHighlight",O[O.renderLineHighlightOnlyWhenFocus=92]="renderLineHighlightOnlyWhenFocus",O[O.renderValidationDecorations=93]="renderValidationDecorations",O[O.renderWhitespace=94]="renderWhitespace",O[O.revealHorizontalRightPadding=95]="revealHorizontalRightPadding",O[O.roundedSelection=96]="roundedSelection",O[O.rulers=97]="rulers",O[O.scrollbar=98]="scrollbar",O[O.scrollBeyondLastColumn=99]="scrollBeyondLastColumn",O[O.scrollBeyondLastLine=100]="scrollBeyondLastLine",O[O.scrollPredominantAxis=101]="scrollPredominantAxis",O[O.selectionClipboard=102]="selectionClipboard",O[O.selectionHighlight=103]="selectionHighlight",O[O.selectOnLineNumbers=104]="selectOnLineNumbers",O[O.showFoldingControls=105]="showFoldingControls",O[O.showUnused=106]="showUnused",O[O.snippetSuggestions=107]="snippetSuggestions",O[O.smartSelect=108]="smartSelect",O[O.smoothScrolling=109]="smoothScrolling",O[O.stickyScroll=110]="stickyScroll",O[O.stickyTabStops=111]="stickyTabStops",O[O.stopRenderingLineAfter=112]="stopRenderingLineAfter",O[O.suggest=113]="suggest",O[O.suggestFontSize=114]="suggestFontSize",O[O.suggestLineHeight=115]="suggestLineHeight",O[O.suggestOnTriggerCharacters=116]="suggestOnTriggerCharacters",O[O.suggestSelection=117]="suggestSelection",O[O.tabCompletion=118]="tabCompletion",O[O.tabIndex=119]="tabIndex",O[O.unicodeHighlighting=120]="unicodeHighlighting",O[O.unusualLineTerminators=121]="unusualLineTerminators",O[O.useShadowDOM=122]="useShadowDOM",O[O.useTabStops=123]="useTabStops",O[O.wordBreak=124]="wordBreak",O[O.wordSeparators=125]="wordSeparators",O[O.wordWrap=126]="wordWrap",O[O.wordWrapBreakAfterCharacters=127]="wordWrapBreakAfterCharacters",O[O.wordWrapBreakBeforeCharacters=128]="wordWrapBreakBeforeCharacters",O[O.wordWrapColumn=129]="wordWrapColumn",O[O.wordWrapOverride1=130]="wordWrapOverride1",O[O.wordWrapOverride2=131]="wordWrapOverride2",O[O.wrappingIndent=132]="wrappingIndent",O[O.wrappingStrategy=133]="wrappingStrategy",O[O.showDeprecated=134]="showDeprecated",O[O.inlayHints=135]="inlayHints",O[O.editorClassName=136]="editorClassName",O[O.pixelRatio=137]="pixelRatio",O[O.tabFocusMode=138]="tabFocusMode",O[O.layoutInfo=139]="layoutInfo",O[O.wrappingInfo=140]="wrappingInfo"})(i=e.EditorOption||(e.EditorOption={}));var s;(function(O){O[O.TextDefined=0]="TextDefined",O[O.LF=1]="LF",O[O.CRLF=2]="CRLF"})(s=e.EndOfLinePreference||(e.EndOfLinePreference={}));var r;(function(O){O[O.LF=0]="LF",O[O.CRLF=1]="CRLF"})(r=e.EndOfLineSequence||(e.EndOfLineSequence={}));var c;(function(O){O[O.None=0]="None",O[O.Indent=1]="Indent",O[O.IndentOutdent=2]="IndentOutdent",O[O.Outdent=3]="Outdent"})(c=e.IndentAction||(e.IndentAction={}));var g;(function(O){O[O.Both=0]="Both",O[O.Right=1]="Right",O[O.Left=2]="Left",O[O.None=3]="None"})(g=e.InjectedTextCursorStops||(e.InjectedTextCursorStops={}));var o;(function(O){O[O.Type=1]="Type",O[O.Parameter=2]="Parameter"})(o=e.InlayHintKind||(e.InlayHintKind={}));var l;(function(O){O[O.Automatic=0]="Automatic",O[O.Explicit=1]="Explicit"})(l=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var a;(function(O){O[O.DependsOnKbLayout=-1]="DependsOnKbLayout",O[O.Unknown=0]="Unknown",O[O.Backspace=1]="Backspace",O[O.Tab=2]="Tab",O[O.Enter=3]="Enter",O[O.Shift=4]="Shift",O[O.Ctrl=5]="Ctrl",O[O.Alt=6]="Alt",O[O.PauseBreak=7]="PauseBreak",O[O.CapsLock=8]="CapsLock",O[O.Escape=9]="Escape",O[O.Space=10]="Space",O[O.PageUp=11]="PageUp",O[O.PageDown=12]="PageDown",O[O.End=13]="End",O[O.Home=14]="Home",O[O.LeftArrow=15]="LeftArrow",O[O.UpArrow=16]="UpArrow",O[O.RightArrow=17]="RightArrow",O[O.DownArrow=18]="DownArrow",O[O.Insert=19]="Insert",O[O.Delete=20]="Delete",O[O.Digit0=21]="Digit0",O[O.Digit1=22]="Digit1",O[O.Digit2=23]="Digit2",O[O.Digit3=24]="Digit3",O[O.Digit4=25]="Digit4",O[O.Digit5=26]="Digit5",O[O.Digit6=27]="Digit6",O[O.Digit7=28]="Digit7",O[O.Digit8=29]="Digit8",O[O.Digit9=30]="Digit9",O[O.KeyA=31]="KeyA",O[O.KeyB=32]="KeyB",O[O.KeyC=33]="KeyC",O[O.KeyD=34]="KeyD",O[O.KeyE=35]="KeyE",O[O.KeyF=36]="KeyF",O[O.KeyG=37]="KeyG",O[O.KeyH=38]="KeyH",O[O.KeyI=39]="KeyI",O[O.KeyJ=40]="KeyJ",O[O.KeyK=41]="KeyK",O[O.KeyL=42]="KeyL",O[O.KeyM=43]="KeyM",O[O.KeyN=44]="KeyN",O[O.KeyO=45]="KeyO",O[O.KeyP=46]="KeyP",O[O.KeyQ=47]="KeyQ",O[O.KeyR=48]="KeyR",O[O.KeyS=49]="KeyS",O[O.KeyT=50]="KeyT",O[O.KeyU=51]="KeyU",O[O.KeyV=52]="KeyV",O[O.KeyW=53]="KeyW",O[O.KeyX=54]="KeyX",O[O.KeyY=55]="KeyY",O[O.KeyZ=56]="KeyZ",O[O.Meta=57]="Meta",O[O.ContextMenu=58]="ContextMenu",O[O.F1=59]="F1",O[O.F2=60]="F2",O[O.F3=61]="F3",O[O.F4=62]="F4",O[O.F5=63]="F5",O[O.F6=64]="F6",O[O.F7=65]="F7",O[O.F8=66]="F8",O[O.F9=67]="F9",O[O.F10=68]="F10",O[O.F11=69]="F11",O[O.F12=70]="F12",O[O.F13=71]="F13",O[O.F14=72]="F14",O[O.F15=73]="F15",O[O.F16=74]="F16",O[O.F17=75]="F17",O[O.F18=76]="F18",O[O.F19=77]="F19",O[O.NumLock=78]="NumLock",O[O.ScrollLock=79]="ScrollLock",O[O.Semicolon=80]="Semicolon",O[O.Equal=81]="Equal",O[O.Comma=82]="Comma",O[O.Minus=83]="Minus",O[O.Period=84]="Period",O[O.Slash=85]="Slash",O[O.Backquote=86]="Backquote",O[O.BracketLeft=87]="BracketLeft",O[O.Backslash=88]="Backslash",O[O.BracketRight=89]="BracketRight",O[O.Quote=90]="Quote",O[O.OEM_8=91]="OEM_8",O[O.IntlBackslash=92]="IntlBackslash",O[O.Numpad0=93]="Numpad0",O[O.Numpad1=94]="Numpad1",O[O.Numpad2=95]="Numpad2",O[O.Numpad3=96]="Numpad3",O[O.Numpad4=97]="Numpad4",O[O.Numpad5=98]="Numpad5",O[O.Numpad6=99]="Numpad6",O[O.Numpad7=100]="Numpad7",O[O.Numpad8=101]="Numpad8",O[O.Numpad9=102]="Numpad9",O[O.NumpadMultiply=103]="NumpadMultiply",O[O.NumpadAdd=104]="NumpadAdd",O[O.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",O[O.NumpadSubtract=106]="NumpadSubtract",O[O.NumpadDecimal=107]="NumpadDecimal",O[O.NumpadDivide=108]="NumpadDivide",O[O.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",O[O.ABNT_C1=110]="ABNT_C1",O[O.ABNT_C2=111]="ABNT_C2",O[O.AudioVolumeMute=112]="AudioVolumeMute",O[O.AudioVolumeUp=113]="AudioVolumeUp",O[O.AudioVolumeDown=114]="AudioVolumeDown",O[O.BrowserSearch=115]="BrowserSearch",O[O.BrowserHome=116]="BrowserHome",O[O.BrowserBack=117]="BrowserBack",O[O.BrowserForward=118]="BrowserForward",O[O.MediaTrackNext=119]="MediaTrackNext",O[O.MediaTrackPrevious=120]="MediaTrackPrevious",O[O.MediaStop=121]="MediaStop",O[O.MediaPlayPause=122]="MediaPlayPause",O[O.LaunchMediaPlayer=123]="LaunchMediaPlayer",O[O.LaunchMail=124]="LaunchMail",O[O.LaunchApp2=125]="LaunchApp2",O[O.Clear=126]="Clear",O[O.MAX_VALUE=127]="MAX_VALUE"})(a=e.KeyCode||(e.KeyCode={}));var d;(function(O){O[O.Hint=1]="Hint",O[O.Info=2]="Info",O[O.Warning=4]="Warning",O[O.Error=8]="Error"})(d=e.MarkerSeverity||(e.MarkerSeverity={}));var u;(function(O){O[O.Unnecessary=1]="Unnecessary",O[O.Deprecated=2]="Deprecated"})(u=e.MarkerTag||(e.MarkerTag={}));var C;(function(O){O[O.Inline=1]="Inline",O[O.Gutter=2]="Gutter"})(C=e.MinimapPosition||(e.MinimapPosition={}));var f;(function(O){O[O.UNKNOWN=0]="UNKNOWN",O[O.TEXTAREA=1]="TEXTAREA",O[O.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",O[O.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",O[O.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",O[O.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",O[O.CONTENT_TEXT=6]="CONTENT_TEXT",O[O.CONTENT_EMPTY=7]="CONTENT_EMPTY",O[O.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",O[O.CONTENT_WIDGET=9]="CONTENT_WIDGET",O[O.OVERVIEW_RULER=10]="OVERVIEW_RULER",O[O.SCROLLBAR=11]="SCROLLBAR",O[O.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",O[O.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(f=e.MouseTargetType||(e.MouseTargetType={}));var v;(function(O){O[O.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",O[O.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",O[O.TOP_CENTER=2]="TOP_CENTER"})(v=e.OverlayWidgetPositionPreference||(e.OverlayWidgetPositionPreference={}));var p;(function(O){O[O.Left=1]="Left",O[O.Center=2]="Center",O[O.Right=4]="Right",O[O.Full=7]="Full"})(p=e.OverviewRulerLane||(e.OverviewRulerLane={}));var L;(function(O){O[O.Left=0]="Left",O[O.Right=1]="Right",O[O.None=2]="None",O[O.LeftOfInjectedText=3]="LeftOfInjectedText",O[O.RightOfInjectedText=4]="RightOfInjectedText"})(L=e.PositionAffinity||(e.PositionAffinity={}));var E;(function(O){O[O.Off=0]="Off",O[O.On=1]="On",O[O.Relative=2]="Relative",O[O.Interval=3]="Interval",O[O.Custom=4]="Custom"})(E=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));var I;(function(O){O[O.None=0]="None",O[O.Text=1]="Text",O[O.Blocks=2]="Blocks"})(I=e.RenderMinimap||(e.RenderMinimap={}));var T;(function(O){O[O.Smooth=0]="Smooth",O[O.Immediate=1]="Immediate"})(T=e.ScrollType||(e.ScrollType={}));var F;(function(O){O[O.Auto=1]="Auto",O[O.Hidden=2]="Hidden",O[O.Visible=3]="Visible"})(F=e.ScrollbarVisibility||(e.ScrollbarVisibility={}));var R;(function(O){O[O.LTR=0]="LTR",O[O.RTL=1]="RTL"})(R=e.SelectionDirection||(e.SelectionDirection={}));var M;(function(O){O[O.Invoke=1]="Invoke",O[O.TriggerCharacter=2]="TriggerCharacter",O[O.ContentChange=3]="ContentChange"})(M=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var N;(function(O){O[O.File=0]="File",O[O.Module=1]="Module",O[O.Namespace=2]="Namespace",O[O.Package=3]="Package",O[O.Class=4]="Class",O[O.Method=5]="Method",O[O.Property=6]="Property",O[O.Field=7]="Field",O[O.Constructor=8]="Constructor",O[O.Enum=9]="Enum",O[O.Interface=10]="Interface",O[O.Function=11]="Function",O[O.Variable=12]="Variable",O[O.Constant=13]="Constant",O[O.String=14]="String",O[O.Number=15]="Number",O[O.Boolean=16]="Boolean",O[O.Array=17]="Array",O[O.Object=18]="Object",O[O.Key=19]="Key",O[O.Null=20]="Null",O[O.EnumMember=21]="EnumMember",O[O.Struct=22]="Struct",O[O.Event=23]="Event",O[O.Operator=24]="Operator",O[O.TypeParameter=25]="TypeParameter"})(N=e.SymbolKind||(e.SymbolKind={}));var A;(function(O){O[O.Deprecated=1]="Deprecated"})(A=e.SymbolTag||(e.SymbolTag={}));var P;(function(O){O[O.Hidden=0]="Hidden",O[O.Blink=1]="Blink",O[O.Smooth=2]="Smooth",O[O.Phase=3]="Phase",O[O.Expand=4]="Expand",O[O.Solid=5]="Solid"})(P=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));var x;(function(O){O[O.Line=1]="Line",O[O.Block=2]="Block",O[O.Underline=3]="Underline",O[O.LineThin=4]="LineThin",O[O.BlockOutline=5]="BlockOutline",O[O.UnderlineThin=6]="UnderlineThin"})(x=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));var W;(function(O){O[O.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",O[O.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",O[O.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",O[O.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(W=e.TrackedRangeStickiness||(e.TrackedRangeStickiness={}));var U;(function(O){O[O.None=0]="None",O[O.Same=1]="Same",O[O.Indent=2]="Indent",O[O.DeepIndent=3]="DeepIndent"})(U=e.WrappingIndent||(e.WrappingIndent={}))}),define(J[479],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class S{constructor(w,b,_,h){this.range=w,this.nestingLevel=b,this.nestingLevelOfEqualBracketType=_,this.isInvalid=h}}e.BracketInfo=S;class k{constructor(w,b,_,h,m,n){this.range=w,this.openingBracketRange=b,this.closingBracketRange=_,this.nestingLevel=h,this.nestingLevelOfEqualBracketType=m,this.bracketPairNode=n}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}e.BracketPairInfo=k;class y extends k{constructor(w,b,_,h,m,n,t){super(w,b,_,h,m,n),this.minVisibleColumnIndentation=t}}e.BracketPairWithMinIndentationInfo=y}),define(J[105],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalModelContentChangeEvent=e.ModelInjectedTextChangedEvent=e.ModelRawContentChangedEvent=e.ModelRawEOLChanged=e.ModelRawLinesInserted=e.ModelRawLinesDeleted=e.ModelRawLineChanged=e.LineInjectedText=e.ModelRawFlush=void 0;class S{constructor(){this.changeType=1}}e.ModelRawFlush=S;class k{static applyInjectedText(t,i){if(!i||i.length===0)return t;let s="",r=0;for(const c of i)s+=t.substring(r,c.column-1),r=c.column-1,s+=c.options.content;return s+=t.substring(r),s}static fromDecorations(t){const i=[];for(const s of t)s.options.before&&s.options.before.content.length>0&&i.push(new k(s.ownerId,s.range.startLineNumber,s.range.startColumn,s.options.before,0)),s.options.after&&s.options.after.content.length>0&&i.push(new k(s.ownerId,s.range.endLineNumber,s.range.endColumn,s.options.after,1));return i.sort((s,r)=>s.lineNumber===r.lineNumber?s.column===r.column?s.order-r.order:s.column-r.column:s.lineNumber-r.lineNumber),i}constructor(t,i,s,r,c){this.ownerId=t,this.lineNumber=i,this.column=s,this.options=r,this.order=c}}e.LineInjectedText=k;class y{constructor(t,i,s){this.changeType=2,this.lineNumber=t,this.detail=i,this.injectedText=s}}e.ModelRawLineChanged=y;class D{constructor(t,i){this.changeType=3,this.fromLineNumber=t,this.toLineNumber=i}}e.ModelRawLinesDeleted=D;class w{constructor(t,i,s,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=t,this.toLineNumber=i,this.detail=s}}e.ModelRawLinesInserted=w;class b{constructor(){this.changeType=5}}e.ModelRawEOLChanged=b;class _{constructor(t,i,s,r){this.changes=t,this.versionId=i,this.isUndoing=s,this.isRedoing=r,this.resultingSelection=null}containsEvent(t){for(let i=0,s=this.changes.length;i<s;i++)if(this.changes[i].changeType===t)return!0;return!1}static merge(t,i){const s=[].concat(t.changes).concat(i.changes),r=i.versionId,c=t.isUndoing||i.isUndoing,g=t.isRedoing||i.isRedoing;return new _(s,r,c,g)}}e.ModelRawContentChangedEvent=_;class h{constructor(t){this.changes=t}}e.ModelInjectedTextChangedEvent=h;class m{constructor(t,i){this.rawContentChangedEvent=t,this.contentChangedEvent=i}merge(t){const i=_.merge(this.rawContentChangedEvent,t.rawContentChangedEvent),s=m._mergeChangeEvents(this.contentChangedEvent,t.contentChangedEvent);return new m(i,s)}static _mergeChangeEvents(t,i){const s=[].concat(t.changes).concat(i.changes),r=i.eol,c=i.versionId,g=t.isUndoing||i.isUndoing,o=t.isRedoing||i.isRedoing,l=t.isFlush||i.isFlush,a=t.isEolChange&&i.isEolChange;return{changes:s,eol:r,isEolChange:a,versionId:c,isUndoing:g,isRedoing:o,isFlush:l}}}e.InternalModelContentChangeEvent=m}),define(J[195],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuideHorizontalLine=e.IndentGuide=e.HorizontalGuidesState=void 0;var S;(function(D){D[D.Disabled=0]="Disabled",D[D.EnabledForActive=1]="EnabledForActive",D[D.Enabled=2]="Enabled"})(S=e.HorizontalGuidesState||(e.HorizontalGuidesState={}));class k{constructor(w,b,_,h,m,n){if(this.visibleColumn=w,this.column=b,this.className=_,this.horizontalLine=h,this.forWrappedLinesAfterColumn=m,this.forWrappedLinesBeforeOrAtColumn=n,w!==-1==(b!==-1))throw new Error}}e.IndentGuide=k;class y{constructor(w,b){this.top=w,this.endColumn=b}}e.IndentGuideHorizontalLine=y}),define(J[264],ee([1,0,16,9,75,5,260,193,195]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairGuidesClassNames=e.GuidesTextModelPart=void 0;class h extends w.TextModelPart{constructor(t,i){super(),this.textModel=t,this.languageConfigurationService=i}getLanguageConfiguration(t){return this.languageConfigurationService.getLanguageConfiguration(t)}_computeIndentLevel(t){return(0,b.computeIndentLevel)(this.textModel.getLineContent(t+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(t,i,s){this.assertNotDisposed();const r=this.textModel.getLineCount();if(t<1||t>r)throw new Error("Illegal value for lineNumber");const c=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,g=!!(c&&c.offSide);let o=-2,l=-1,a=-2,d=-1;const u=N=>{if(o!==-1&&(o===-2||o>N-1)){o=-1,l=-1;for(let A=N-2;A>=0;A--){const P=this._computeIndentLevel(A);if(P>=0){o=A,l=P;break}}}if(a===-2){a=-1,d=-1;for(let A=N;A<r;A++){const P=this._computeIndentLevel(A);if(P>=0){a=A,d=P;break}}}};let C=-2,f=-1,v=-2,p=-1;const L=N=>{if(C===-2){C=-1,f=-1;for(let A=N-2;A>=0;A--){const P=this._computeIndentLevel(A);if(P>=0){C=A,f=P;break}}}if(v!==-1&&(v===-2||v<N-1)){v=-1,p=-1;for(let A=N;A<r;A++){const P=this._computeIndentLevel(A);if(P>=0){v=A,p=P;break}}}};let E=0,I=!0,T=0,F=!0,R=0,M=0;for(let N=0;I||F;N++){const A=t-N,P=t+N;N>1&&(A<1||A<i)&&(I=!1),N>1&&(P>r||P>s)&&(F=!1),N>5e4&&(I=!1,F=!1);let x=-1;if(I&&A>=1){const U=this._computeIndentLevel(A-1);U>=0?(a=A-1,d=U,x=Math.ceil(U/this.textModel.getOptions().indentSize)):(u(A),x=this._getIndentLevelForWhitespaceLine(g,l,d))}let W=-1;if(F&&P<=r){const U=this._computeIndentLevel(P-1);U>=0?(C=P-1,f=U,W=Math.ceil(U/this.textModel.getOptions().indentSize)):(L(P),W=this._getIndentLevelForWhitespaceLine(g,f,p))}if(N===0){M=x;continue}if(N===1){if(P<=r&&W>=0&&M+1===W){I=!1,E=P,T=P,R=W;continue}if(A>=1&&x>=0&&x-1===M){F=!1,E=A,T=A,R=x;continue}if(E=t,T=t,R=M,R===0)return{startLineNumber:E,endLineNumber:T,indent:R}}I&&(x>=R?E=A:I=!1),F&&(W>=R?T=P:F=!1)}return{startLineNumber:E,endLineNumber:T,indent:R}}getLinesBracketGuides(t,i,s,r){var c;const g=[];for(let C=t;C<=i;C++)g.push([]);const o=!0,l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new D.Range(t,1,i,this.textModel.getLineMaxColumn(i))).toArray();let a;if(s&&l.length>0){const C=(t<=s.lineNumber&&s.lineNumber<=i?l:this.textModel.bracketPairs.getBracketPairsInRange(D.Range.fromPositions(s)).toArray()).filter(f=>D.Range.strictContainsPosition(f.range,s));a=(c=(0,S.findLast)(C,f=>o||f.range.startLineNumber!==f.range.endLineNumber))===null||c===void 0?void 0:c.range}const d=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new m;for(const C of l){if(!C.closingBracketRange)continue;const f=a&&C.range.equalsRange(a);if(!f&&!r.includeInactive)continue;const v=u.getInlineClassName(C.nestingLevel,C.nestingLevelOfEqualBracketType,d)+(r.highlightActive&&f?" "+u.activeClassName:""),p=C.openingBracketRange.getStartPosition(),L=C.closingBracketRange.getStartPosition(),E=r.horizontalGuides===_.HorizontalGuidesState.Enabled||r.horizontalGuides===_.HorizontalGuidesState.EnabledForActive&&f;if(C.range.startLineNumber===C.range.endLineNumber){o&&E&&g[C.range.startLineNumber-t].push(new _.IndentGuide(-1,C.openingBracketRange.getEndPosition().column,v,new _.IndentGuideHorizontalLine(!1,L.column),-1,-1));continue}const I=this.getVisibleColumnFromPosition(L),T=this.getVisibleColumnFromPosition(C.openingBracketRange.getStartPosition()),F=Math.min(T,I,C.minVisibleColumnIndentation+1);let R=!1;k.firstNonWhitespaceIndex(this.textModel.getLineContent(C.closingBracketRange.startLineNumber))<C.closingBracketRange.startColumn-1&&(R=!0);const A=Math.max(p.lineNumber,t),P=Math.min(L.lineNumber,i),x=R?1:0;for(let W=A;W<P+x;W++)g[W-t].push(new _.IndentGuide(F,-1,v,null,W===p.lineNumber?p.column:-1,W===L.lineNumber?L.column:-1));E&&(p.lineNumber>=t&&T>F&&g[p.lineNumber-t].push(new _.IndentGuide(F,-1,v,new _.IndentGuideHorizontalLine(!1,p.column),-1,-1)),L.lineNumber<=i&&I>F&&g[L.lineNumber-t].push(new _.IndentGuide(F,-1,v,new _.IndentGuideHorizontalLine(!R,L.column),-1,-1)))}for(const C of g)C.sort((f,v)=>f.visibleColumn-v.visibleColumn);return g}getVisibleColumnFromPosition(t){return y.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(t.lineNumber),t.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(t,i){this.assertNotDisposed();const s=this.textModel.getLineCount();if(t<1||t>s)throw new Error("Illegal value for startLineNumber");if(i<1||i>s)throw new Error("Illegal value for endLineNumber");const r=this.textModel.getOptions(),c=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,g=!!(c&&c.offSide),o=new Array(i-t+1);let l=-2,a=-1,d=-2,u=-1;for(let C=t;C<=i;C++){const f=C-t,v=this._computeIndentLevel(C-1);if(v>=0){l=C-1,a=v,o[f]=Math.ceil(v/r.indentSize);continue}if(l===-2){l=-1,a=-1;for(let p=C-2;p>=0;p--){const L=this._computeIndentLevel(p);if(L>=0){l=p,a=L;break}}}if(d!==-1&&(d===-2||d<C-1)){d=-1,u=-1;for(let p=C;p<s;p++){const L=this._computeIndentLevel(p);if(L>=0){d=p,u=L;break}}}o[f]=this._getIndentLevelForWhitespaceLine(g,a,u)}return o}_getIndentLevelForWhitespaceLine(t,i,s){const r=this.textModel.getOptions();return i===-1||s===-1?0:i<s?1+Math.floor(i/r.indentSize):i===s||t?Math.ceil(s/r.indentSize):1+Math.floor(s/r.indentSize)}}e.GuidesTextModelPart=h;class m{constructor(){this.activeClassName="indent-active"}getInlineClassName(t,i,s){return this.getInlineClassNameOfLevel(s?i:t)}getInlineClassNameOfLevel(t){return`bracket-indent-guide lvl-${t%30}`}}e.BracketPairGuidesClassNames=m}),define(J[480],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokens=void 0;class S{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(y,D){this._startLineNumber=y,this._tokens=D}getLineTokens(y){return this._tokens[y-this._startLineNumber]}appendLineTokens(y){this._tokens.push(y)}}e.ContiguousMultilineTokens=S}),define(J[265],ee([1,0,480]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class k{constructor(){this._tokens=[]}add(D,w){if(this._tokens.length>0){const b=this._tokens[this._tokens.length-1];if(b.endLineNumber+1===D){b.appendLineTokens(w);return}}this._tokens.push(new S.ContiguousMultilineTokens(D,[w]))}finalize(){return this._tokens}}e.ContiguousMultilineTokensBuilder=k}),define(J[86],ee([1,0,119]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class k{static createEmpty(w,b){const _=k.defaultTokenMetadata,h=new Uint32Array(2);return h[0]=w.length,h[1]=_,new k(h,w,b)}constructor(w,b,_){this._lineTokensBrand=void 0,this._tokens=w,this._tokensCount=this._tokens.length>>>1,this._text=b,this._languageIdCodec=_}equals(w){return w instanceof k?this.slicedEquals(w,0,this._tokensCount):!1}slicedEquals(w,b,_){if(this._text!==w._text||this._tokensCount!==w._tokensCount)return!1;const h=b<<1,m=h+(_<<1);for(let n=h;n<m;n++)if(this._tokens[n]!==w._tokens[n])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(w){return w>0?this._tokens[w-1<<1]:0}getMetadata(w){return this._tokens[(w<<1)+1]}getLanguageId(w){const b=this._tokens[(w<<1)+1],_=S.TokenMetadata.getLanguageId(b);return this._languageIdCodec.decodeLanguageId(_)}getStandardTokenType(w){const b=this._tokens[(w<<1)+1];return S.TokenMetadata.getTokenType(b)}getForeground(w){const b=this._tokens[(w<<1)+1];return S.TokenMetadata.getForeground(b)}getClassName(w){const b=this._tokens[(w<<1)+1];return S.TokenMetadata.getClassNameFromMetadata(b)}getInlineStyle(w,b){const _=this._tokens[(w<<1)+1];return S.TokenMetadata.getInlineStyleFromMetadata(_,b)}getPresentation(w){const b=this._tokens[(w<<1)+1];return S.TokenMetadata.getPresentationFromMetadata(b)}getEndOffset(w){return this._tokens[w<<1]}findTokenIndexAtOffset(w){return k.findIndexInTokensArray(this._tokens,w)}inflate(){return this}sliceAndInflate(w,b,_){return new y(this,w,b,_)}static convertToEndOffset(w,b){const h=(w.length>>>1)-1;for(let m=0;m<h;m++)w[m<<1]=w[m+1<<1];w[h<<1]=b}static findIndexInTokensArray(w,b){if(w.length<=2)return 0;let _=0,h=(w.length>>>1)-1;for(;_<h;){const m=_+Math.floor((h-_)/2),n=w[m<<1];if(n===b)return m+1;n<b?_=m+1:n>b&&(h=m)}return _}withInserted(w){if(w.length===0)return this;let b=0,_=0,h="";const m=new Array;let n=0;for(;;){const t=b<this._tokensCount?this._tokens[b<<1]:-1,i=_<w.length?w[_]:null;if(t!==-1&&(i===null||t<=i.offset)){h+=this._text.substring(n,t);const s=this._tokens[(b<<1)+1];m.push(h.length,s),b++,n=t}else if(i){if(i.offset>n){h+=this._text.substring(n,i.offset);const s=this._tokens[(b<<1)+1];m.push(h.length,s),n=i.offset}h+=i.text,m.push(h.length,i.tokenMetadata),_++}else break}return new k(new Uint32Array(m),h,this._languageIdCodec)}}k.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0,e.LineTokens=k;class y{constructor(w,b,_,h){this._source=w,this._startOffset=b,this._endOffset=_,this._deltaOffset=h,this._firstTokenIndex=w.findTokenIndexAtOffset(b),this._tokensCount=0;for(let m=this._firstTokenIndex,n=w.getCount();m<n&&!(w.getStartOffset(m)>=_);m++)this._tokensCount++}getMetadata(w){return this._source.getMetadata(this._firstTokenIndex+w)}getLanguageId(w){return this._source.getLanguageId(this._firstTokenIndex+w)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(w){return w instanceof y?this._startOffset===w._startOffset&&this._endOffset===w._endOffset&&this._deltaOffset===w._deltaOffset&&this._source.slicedEquals(w._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(w){return this._source.getForeground(this._firstTokenIndex+w)}getEndOffset(w){const b=this._source.getEndOffset(this._firstTokenIndex+w);return Math.min(this._endOffset,b)-this._startOffset+this._deltaOffset}getClassName(w){return this._source.getClassName(this._firstTokenIndex+w)}getInlineStyle(w,b){return this._source.getInlineStyle(this._firstTokenIndex+w,b)}getPresentation(w){return this._source.getPresentation(this._firstTokenIndex+w)}findTokenIndexAtOffset(w){return this._source.findTokenIndexAtOffset(w+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(J[481],ee([1,0,86]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32Array=e.ContiguousTokensEditing=e.EMPTY_LINE_TOKENS=void 0,e.EMPTY_LINE_TOKENS=new Uint32Array(0).buffer;class k{static deleteBeginning(w,b){return w===null||w===e.EMPTY_LINE_TOKENS?w:k.delete(w,0,b)}static deleteEnding(w,b){if(w===null||w===e.EMPTY_LINE_TOKENS)return w;const _=y(w),h=_[_.length-2];return k.delete(w,b,h)}static delete(w,b,_){if(w===null||w===e.EMPTY_LINE_TOKENS||b===_)return w;const h=y(w),m=h.length>>>1;if(b===0&&h[h.length-2]===_)return e.EMPTY_LINE_TOKENS;const n=S.LineTokens.findIndexInTokensArray(h,b),t=n>0?h[n-1<<1]:0,i=h[n<<1];if(_<i){const o=_-b;for(let l=n;l<m;l++)h[l<<1]-=o;return w}let s,r;t!==b?(h[n<<1]=b,s=n+1<<1,r=b):(s=n<<1,r=t);const c=_-b;for(let o=n+1;o<m;o++){const l=h[o<<1]-c;l>r&&(h[s++]=l,h[s++]=h[(o<<1)+1],r=l)}if(s===h.length)return w;const g=new Uint32Array(s);return g.set(h.subarray(0,s),0),g.buffer}static append(w,b){if(b===e.EMPTY_LINE_TOKENS)return w;if(w===e.EMPTY_LINE_TOKENS)return b;if(w===null)return w;if(b===null)return null;const _=y(w),h=y(b),m=h.length>>>1,n=new Uint32Array(_.length+h.length);n.set(_,0);let t=_.length;const i=_[_.length-2];for(let s=0;s<m;s++)n[t++]=h[s<<1]+i,n[t++]=h[(s<<1)+1];return n.buffer}static insert(w,b,_){if(w===null||w===e.EMPTY_LINE_TOKENS)return w;const h=y(w),m=h.length>>>1;let n=S.LineTokens.findIndexInTokensArray(h,b);n>0&&h[n-1<<1]===b&&n--;for(let t=n;t<m;t++)h[t<<1]+=_;return w}}e.ContiguousTokensEditing=k;function y(D){return D instanceof Uint32Array?D:new Uint32Array(D)}e.toUint32Array=y}),define(J[482],ee([1,0,16,13,481,86,119]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousTokensStore=void 0;class b{constructor(m){this._lineTokens=[],this._len=0,this._languageIdCodec=m}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(m,n,t){let i=null;if(n<this._len&&(i=this._lineTokens[n]),i!==null&&i!==y.EMPTY_LINE_TOKENS)return new D.LineTokens((0,y.toUint32Array)(i),t,this._languageIdCodec);const s=new Uint32Array(2);return s[0]=t.length,s[1]=_(this._languageIdCodec.encodeLanguageId(m)),new D.LineTokens(s,t,this._languageIdCodec)}static _massageTokens(m,n,t){const i=t?(0,y.toUint32Array)(t):null;if(n===0){let s=!1;if(i&&i.length>1&&(s=w.TokenMetadata.getLanguageId(i[1])!==m),!s)return y.EMPTY_LINE_TOKENS}if(!i||i.length===0){const s=new Uint32Array(2);return s[0]=n,s[1]=_(m),s.buffer}return i[i.length-2]=n,i.byteOffset===0&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(m){for(;m>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(m,n){n!==0&&(m+n>this._len&&(n=this._len-m),this._lineTokens.splice(m,n),this._len-=n)}_insertLines(m,n){if(n===0)return;const t=[];for(let i=0;i<n;i++)t[i]=null;this._lineTokens=S.arrayInsert(this._lineTokens,m,t),this._len+=n}setTokens(m,n,t,i,s){const r=b._massageTokens(this._languageIdCodec.encodeLanguageId(m),t,i);this._ensureLine(n);const c=this._lineTokens[n];return this._lineTokens[n]=r,s?!b._equals(c,r):!1}static _equals(m,n){if(!m||!n)return!m&&!n;const t=(0,y.toUint32Array)(m),i=(0,y.toUint32Array)(n);if(t.length!==i.length)return!1;for(let s=0,r=t.length;s<r;s++)if(t[s]!==i[s])return!1;return!0}acceptEdit(m,n,t){this._acceptDeleteRange(m),this._acceptInsertText(new k.Position(m.startLineNumber,m.startColumn),n,t)}_acceptDeleteRange(m){const n=m.startLineNumber-1;if(n>=this._len)return;if(m.startLineNumber===m.endLineNumber){if(m.startColumn===m.endColumn)return;this._lineTokens[n]=y.ContiguousTokensEditing.delete(this._lineTokens[n],m.startColumn-1,m.endColumn-1);return}this._lineTokens[n]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[n],m.startColumn-1);const t=m.endLineNumber-1;let i=null;t<this._len&&(i=y.ContiguousTokensEditing.deleteBeginning(this._lineTokens[t],m.endColumn-1)),this._lineTokens[n]=y.ContiguousTokensEditing.append(this._lineTokens[n],i),this._deleteLines(m.startLineNumber,m.endLineNumber-m.startLineNumber)}_acceptInsertText(m,n,t){if(n===0&&t===0)return;const i=m.lineNumber-1;if(!(i>=this._len)){if(n===0){this._lineTokens[i]=y.ContiguousTokensEditing.insert(this._lineTokens[i],m.column-1,t);return}this._lineTokens[i]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[i],m.column-1),this._lineTokens[i]=y.ContiguousTokensEditing.insert(this._lineTokens[i],m.column-1,t),this._insertLines(m.lineNumber,n)}}setMultilineTokens(m,n){if(m.length===0)return{changes:[]};const t=[];for(let i=0,s=m.length;i<s;i++){const r=m[i];let c=0,g=0,o=!1;for(let l=r.startLineNumber;l<=r.endLineNumber;l++)o?(this.setTokens(n.getLanguageId(),l-1,n.getLineLength(l),r.getLineTokens(l),!1),g=l):this.setTokens(n.getLanguageId(),l-1,n.getLineLength(l),r.getLineTokens(l),!0)&&(o=!0,c=l,g=l);o&&t.push({fromLineNumber:c,toLineNumber:g})}return{changes:t}}}e.ContiguousTokensStore=b;function _(h){return(h<<0|0<<8|0<<11|1<<15|2<<24|1024)>>>0}}),define(J[483],ee([1,0,13,5,116]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class D{static create(h,m){return new D(h,new w(m))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(h,m){this._startLineNumber=h,this._tokens=m,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(h){return this._startLineNumber<=h&&h<=this._endLineNumber?this._tokens.getLineTokens(h-this._startLineNumber):null}getRange(){const h=this._tokens.getRange();return h&&new k.Range(this._startLineNumber+h.startLineNumber,h.startColumn,this._startLineNumber+h.endLineNumber,h.endColumn)}removeTokens(h){const m=h.startLineNumber-this._startLineNumber,n=h.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(m,h.startColumn-1,n,h.endColumn-1),this._updateEndLineNumber()}split(h){const m=h.startLineNumber-this._startLineNumber,n=h.endLineNumber-this._startLineNumber,[t,i,s]=this._tokens.split(m,h.startColumn-1,n,h.endColumn-1);return[new D(this._startLineNumber,t),new D(this._startLineNumber+s,i)]}applyEdit(h,m){const[n,t,i]=(0,y.countEOL)(m);this.acceptEdit(h,n,t,i,m.length>0?m.charCodeAt(0):0)}acceptEdit(h,m,n,t,i){this._acceptDeleteRange(h),this._acceptInsertText(new S.Position(h.startLineNumber,h.startColumn),m,n,t,i),this._updateEndLineNumber()}_acceptDeleteRange(h){if(h.startLineNumber===h.endLineNumber&&h.startColumn===h.endColumn)return;const m=h.startLineNumber-this._startLineNumber,n=h.endLineNumber-this._startLineNumber;if(n<0){const i=n-m;this._startLineNumber-=i;return}const t=this._tokens.getMaxDeltaLine();if(!(m>=t+1)){if(m<0&&n>=t+1){this._startLineNumber=0,this._tokens.clear();return}if(m<0){const i=-m;this._startLineNumber-=i,this._tokens.acceptDeleteRange(h.startColumn-1,0,0,n,h.endColumn-1)}else this._tokens.acceptDeleteRange(0,m,h.startColumn-1,n,h.endColumn-1)}}_acceptInsertText(h,m,n,t,i){if(m===0&&n===0)return;const s=h.lineNumber-this._startLineNumber;if(s<0){this._startLineNumber+=m;return}const r=this._tokens.getMaxDeltaLine();s>=r+1||this._tokens.acceptInsertText(s,h.column-1,m,n,t,i)}}e.SparseMultilineTokens=D;class w{constructor(h){this._tokens=h,this._tokenCount=h.length/4}toString(h){const m=[];for(let n=0;n<this._tokenCount;n++)m.push(`(${this._getDeltaLine(n)+h},${this._getStartCharacter(n)}-${this._getEndCharacter(n)})`);return`[${m.join(",")}]`}getMaxDeltaLine(){const h=this._getTokenCount();return h===0?-1:this._getDeltaLine(h-1)}getRange(){const h=this._getTokenCount();if(h===0)return null;const m=this._getStartCharacter(0),n=this._getDeltaLine(h-1),t=this._getEndCharacter(h-1);return new k.Range(0,m+1,n,t+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(h){return this._tokens[4*h]}_getStartCharacter(h){return this._tokens[4*h+1]}_getEndCharacter(h){return this._tokens[4*h+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(h){let m=0,n=this._getTokenCount()-1;for(;m<n;){const t=m+Math.floor((n-m)/2),i=this._getDeltaLine(t);if(i<h)m=t+1;else if(i>h)n=t-1;else{let s=t;for(;s>m&&this._getDeltaLine(s-1)===h;)s--;let r=t;for(;r<n&&this._getDeltaLine(r+1)===h;)r++;return new b(this._tokens.subarray(4*s,4*r+4))}}return this._getDeltaLine(m)===h?new b(this._tokens.subarray(4*m,4*m+4)):null}clear(){this._tokenCount=0}removeTokens(h,m,n,t){const i=this._tokens,s=this._tokenCount;let r=0,c=!1,g=0;for(let o=0;o<s;o++){const l=4*o,a=i[l],d=i[l+1],u=i[l+2],C=i[l+3];if((a>h||a===h&&u>=m)&&(a<n||a===n&&d<=t))c=!0;else{if(r===0&&(g=a),c){const f=4*r;i[f]=a-g,i[f+1]=d,i[f+2]=u,i[f+3]=C}r++}}return this._tokenCount=r,g}split(h,m,n,t){const i=this._tokens,s=this._tokenCount,r=[],c=[];let g=r,o=0,l=0;for(let a=0;a<s;a++){const d=4*a,u=i[d],C=i[d+1],f=i[d+2],v=i[d+3];if(u>h||u===h&&f>=m){if(u<n||u===n&&C<=t)continue;g!==c&&(g=c,o=0,l=u)}g[o++]=u-l,g[o++]=C,g[o++]=f,g[o++]=v}return[new w(new Uint32Array(r)),new w(new Uint32Array(c)),l]}acceptDeleteRange(h,m,n,t,i){const s=this._tokens,r=this._tokenCount,c=t-m;let g=0,o=!1;for(let l=0;l<r;l++){const a=4*l;let d=s[a],u=s[a+1],C=s[a+2];const f=s[a+3];if(d<m||d===m&&C<=n){g++;continue}else if(d===m&&u<n)d===t&&C>i?C-=i-n:C=n;else if(d===m&&u===n)if(d===t&&C>i)C-=i-n;else{o=!0;continue}else if(d<t||d===t&&u<i)if(d===t&&C>i)d===m?(u=n,C=u+(C-i)):(u=0,C=u+(C-i));else{o=!0;continue}else if(d>t){if(c===0&&!o){g=r;break}d-=c}else if(d===t&&u>=i)h&&d===0&&(u+=h,C+=h),d-=c,u-=i-n,C-=i-n;else throw new Error("Not possible!");const v=4*g;s[v]=d,s[v+1]=u,s[v+2]=C,s[v+3]=f,g++}this._tokenCount=g}acceptInsertText(h,m,n,t,i,s){const r=n===0&&t===1&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),c=this._tokens,g=this._tokenCount;for(let o=0;o<g;o++){const l=4*o;let a=c[l],d=c[l+1],u=c[l+2];if(!(a<h||a===h&&u<m)){if(a===h&&u===m)if(r)u+=1;else continue;else if(a===h&&d<m&&m<u)n===0?u+=t:u=m;else{if(a===h&&d===m&&r)continue;if(a===h)if(a+=n,n===0)d+=t,u+=t;else{const C=u-d;d=i+(d-m),u=d+C}else a+=n}c[l]=a,c[l+1]=d,c[l+2]=u}}}}class b{constructor(h){this._tokens=h}getCount(){return this._tokens.length/4}getStartCharacter(h){return this._tokens[4*h+1]}getEndCharacter(h){return this._tokens[4*h+2]}getMetadata(h){return this._tokens[4*h+3]}}e.SparseLineTokens=b}),define(J[484],ee([1,0,16,86]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseTokensStore=void 0;class y{constructor(w){this._pieces=[],this._isComplete=!1,this._languageIdCodec=w}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(w,b){this._pieces=w||[],this._isComplete=b}setPartial(w,b){let _=w;if(b.length>0){const m=b[0].getRange(),n=b[b.length-1].getRange();if(!m||!n)return w;_=w.plusRange(m).plusRange(n)}let h=null;for(let m=0,n=this._pieces.length;m<n;m++){const t=this._pieces[m];if(t.endLineNumber<_.startLineNumber)continue;if(t.startLineNumber>_.endLineNumber){h=h||{index:m};break}if(t.removeTokens(_),t.isEmpty()){this._pieces.splice(m,1),m--,n--;continue}if(t.endLineNumber<_.startLineNumber)continue;if(t.startLineNumber>_.endLineNumber){h=h||{index:m};continue}const[i,s]=t.split(_);if(i.isEmpty()){h=h||{index:m};continue}s.isEmpty()||(this._pieces.splice(m,1,i,s),m++,n++,h=h||{index:m})}return h=h||{index:this._pieces.length},b.length>0&&(this._pieces=S.arrayInsert(this._pieces,h.index,b)),_}isComplete(){return this._isComplete}addSparseTokens(w,b){if(b.getLineContent().length===0)return b;const _=this._pieces;if(_.length===0)return b;const h=y._findFirstPieceWithLine(_,w),m=_[h].getLineTokens(w);if(!m)return b;const n=b.getCount(),t=m.getCount();let i=0;const s=[];let r=0,c=0;const g=(o,l)=>{o!==c&&(c=o,s[r++]=o,s[r++]=l)};for(let o=0;o<t;o++){const l=m.getStartCharacter(o),a=m.getEndCharacter(o),d=m.getMetadata(o),u=((d&1?2048:0)|(d&2?4096:0)|(d&4?8192:0)|(d&8?16384:0)|(d&16?16744448:0)|(d&32?4278190080:0))>>>0,C=~u>>>0;for(;i<n&&b.getEndOffset(i)<=l;)g(b.getEndOffset(i),b.getMetadata(i)),i++;for(i<n&&b.getStartOffset(i)<l&&g(l,b.getMetadata(i));i<n&&b.getEndOffset(i)<a;)g(b.getEndOffset(i),b.getMetadata(i)&C|d&u),i++;if(i<n)g(a,b.getMetadata(i)&C|d&u),b.getEndOffset(i)===a&&i++;else{const f=Math.min(Math.max(0,i-1),n-1);g(a,b.getMetadata(f)&C|d&u)}}for(;i<n;)g(b.getEndOffset(i),b.getMetadata(i)),i++;return new k.LineTokens(new Uint32Array(s),b.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(w,b){let _=0,h=w.length-1;for(;_<h;){let m=_+Math.floor((h-_)/2);if(w[m].endLineNumber<b)_=m+1;else if(w[m].startLineNumber>b)h=m-1;else{for(;m>_&&w[m-1].startLineNumber<=b&&b<=w[m-1].endLineNumber;)m--;return m}}return _}acceptEdit(w,b,_,h,m){for(const n of this._pieces)n.acceptEdit(w,b,_,h,m)}}e.SparseTokensStore=y}),define(J[137],ee([1,0,2]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class k extends S.Disposable{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(D){return!1}onCompositionEnd(D){return!1}onConfigurationChanged(D){return!1}onCursorStateChanged(D){return!1}onDecorationsChanged(D){return!1}onFlushed(D){return!1}onFocusChanged(D){return!1}onLanguageConfigurationChanged(D){return!1}onLineMappingChanged(D){return!1}onLinesChanged(D){return!1}onLinesDeleted(D){return!1}onLinesInserted(D){return!1}onRevealRangeRequest(D){return!1}onScrollChanged(D){return!1}onThemeChanged(D){return!1}onTokensChanged(D){return!1}onTokensColorsChanged(D){return!1}onZonesChanged(D){return!1}handleEvents(D){let w=!1;for(let b=0,_=D.length;b<_;b++){const h=D[b];switch(h.type){case 0:this.onCompositionStart(h)&&(w=!0);break;case 1:this.onCompositionEnd(h)&&(w=!0);break;case 2:this.onConfigurationChanged(h)&&(w=!0);break;case 3:this.onCursorStateChanged(h)&&(w=!0);break;case 4:this.onDecorationsChanged(h)&&(w=!0);break;case 5:this.onFlushed(h)&&(w=!0);break;case 6:this.onFocusChanged(h)&&(w=!0);break;case 7:this.onLanguageConfigurationChanged(h)&&(w=!0);break;case 8:this.onLineMappingChanged(h)&&(w=!0);break;case 9:this.onLinesChanged(h)&&(w=!0);break;case 10:this.onLinesDeleted(h)&&(w=!0);break;case 11:this.onLinesInserted(h)&&(w=!0);break;case 12:this.onRevealRangeRequest(h)&&(w=!0);break;case 13:this.onScrollChanged(h)&&(w=!0);break;case 15:this.onTokensChanged(h)&&(w=!0);break;case 14:this.onThemeChanged(h)&&(w=!0);break;case 16:this.onTokensColorsChanged(h)&&(w=!0);break;case 17:this.onZonesChanged(h)&&(w=!0);break;default:console.info("View received unknown event: "),console.info(h)}}w&&(this._shouldRender=!0)}}e.ViewEventHandler=k}),define(J[106],ee([1,0,137]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class k extends S.ViewEventHandler{}e.DynamicViewOverlay=k}),define(J[52],ee([1,0,137]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.ViewPart=void 0;class k extends S.ViewEventHandler{constructor(w){super(),this._context=w,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=k;class y{static write(w,b){w.setAttribute("data-mprt",String(b))}static read(w){const b=w.getAttribute("data-mprt");return b===null?0:parseInt(b,10)}static collect(w,b){const _=[];let h=0;for(;w&&w!==document.body&&w!==b;)w.nodeType===w.ELEMENT_NODE&&(_[h++]=this.read(w)),w=w.parentElement;const m=new Uint8Array(h);for(let n=0;n<h;n++)m[n]=_[h-n-1];return m}}e.PartFingerprints=y}),define(J[485],ee([1,0,35,52,383]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockDecorations=void 0;class y extends k.ViewPart{constructor(w){super(w),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,S.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let w=!1;const _=this._context.configuration.options.get(139),h=_.contentWidth-_.verticalScrollbarWidth;this.contentWidth!==h&&(this.contentWidth=h,w=!0);const m=_.contentLeft;return this.contentLeft!==m&&(this.contentLeft=m,w=!0),w}dispose(){super.dispose()}onConfigurationChanged(w){return this.update()}onScrollChanged(w){return w.scrollTopChanged||w.scrollLeftChanged}onDecorationsChanged(w){return!0}onZonesChanged(w){return!0}prepareRender(w){}render(w){var b;let _=0;const h=w.getDecorationsInViewport();for(const m of h){if(!m.options.blockClassName)continue;let n=this.blocks[_];n||(n=this.blocks[_]=(0,S.createFastDomNode)(document.createElement("div")),this.domNode.appendChild(n));let t,i;m.options.blockIsAfterEnd?(t=w.getVerticalOffsetAfterLineNumber(m.range.endLineNumber,!1),i=w.getVerticalOffsetAfterLineNumber(m.range.endLineNumber,!0)):(t=w.getVerticalOffsetForLineNumber(m.range.startLineNumber,!0),i=m.range.isEmpty()&&!m.options.blockDoesNotCollapse?w.getVerticalOffsetForLineNumber(m.range.startLineNumber,!1):w.getVerticalOffsetAfterLineNumber(m.range.endLineNumber,!0));const[s,r,c,g]=(b=m.options.blockPadding)!==null&&b!==void 0?b:[0,0,0,0];n.setClassName("blockDecorations-block "+m.options.blockClassName),n.setLeft(this.contentLeft-g),n.setWidth(this.contentWidth+g+r),n.setTop(t-w.scrollTop-s),n.setHeight(i-t+s+c),_++}for(let m=_;m<this.blocks.length;m++)this.blocks[m].domNode.remove();this.blocks.length=_}}e.BlockDecorations=y}),define(J[486],ee([1,0,106,5,134,385]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class D extends S.DynamicViewOverlay{constructor(b){super(),this._context=b;const _=this._context.configuration.options;this._lineHeight=_.get(64),this._typicalHalfwidthCharacterWidth=_.get(48).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(b){const _=this._context.configuration.options;return this._lineHeight=_.get(64),this._typicalHalfwidthCharacterWidth=_.get(48).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(b){return!0}onFlushed(b){return!0}onLinesChanged(b){return!0}onLinesDeleted(b){return!0}onLinesInserted(b){return!0}onScrollChanged(b){return b.scrollTopChanged||b.scrollWidthChanged}onZonesChanged(b){return!0}prepareRender(b){const _=b.getDecorationsInViewport();let h=[],m=0;for(let s=0,r=_.length;s<r;s++){const c=_[s];c.options.className&&(h[m++]=c)}h=h.sort((s,r)=>{if(s.options.zIndex<r.options.zIndex)return-1;if(s.options.zIndex>r.options.zIndex)return 1;const c=s.options.className,g=r.options.className;return c<g?-1:c>g?1:k.Range.compareRangesUsingStarts(s.range,r.range)});const n=b.visibleRange.startLineNumber,t=b.visibleRange.endLineNumber,i=[];for(let s=n;s<=t;s++){const r=s-n;i[r]=""}this._renderWholeLineDecorations(b,h,i),this._renderNormalDecorations(b,h,i),this._renderResult=i}_renderWholeLineDecorations(b,_,h){const m=String(this._lineHeight),n=b.visibleRange.startLineNumber,t=b.visibleRange.endLineNumber;for(let i=0,s=_.length;i<s;i++){const r=_[i];if(!r.options.isWholeLine)continue;const c=\'<div class="cdr \'+r.options.className+\'" style="left:0;width:100%;height:\'+m+\'px;"></div>\',g=Math.max(r.range.startLineNumber,n),o=Math.min(r.range.endLineNumber,t);for(let l=g;l<=o;l++){const a=l-n;h[a]+=c}}}_renderNormalDecorations(b,_,h){const m=String(this._lineHeight),n=b.visibleRange.startLineNumber;let t=null,i=!1,s=null;for(let r=0,c=_.length;r<c;r++){const g=_[r];if(g.options.isWholeLine)continue;const o=g.options.className,l=!!g.options.showIfCollapsed;let a=g.range;if(l&&a.endColumn===1&&a.endLineNumber!==a.startLineNumber&&(a=new k.Range(a.startLineNumber,a.startColumn,a.endLineNumber-1,this._context.viewModel.getLineMaxColumn(a.endLineNumber-1))),t===o&&i===l&&k.Range.areIntersectingOrTouching(s,a)){s=k.Range.plusRange(s,a);continue}t!==null&&this._renderNormalDecoration(b,s,t,i,m,n,h),t=o,i=l,s=a}t!==null&&this._renderNormalDecoration(b,s,t,i,m,n,h)}_renderNormalDecoration(b,_,h,m,n,t,i){const s=b.linesVisibleRangesForRange(_,h==="findMatch");if(s)for(let r=0,c=s.length;r<c;r++){const g=s[r];if(g.outsideRenderedLine)continue;const o=g.lineNumber-t;if(m&&g.ranges.length===1){const l=g.ranges[0];if(l.width<this._typicalHalfwidthCharacterWidth){const a=Math.round(l.left+l.width/2),d=Math.max(0,Math.round(a-this._typicalHalfwidthCharacterWidth/2));g.ranges[0]=new y.HorizontalRange(d,this._typicalHalfwidthCharacterWidth)}}for(let l=0,a=g.ranges.length;l<a;l++){const d=g.ranges[l],u=\'<div class="cdr \'+h+\'" style="left:\'+String(d.left)+"px;width:"+String(d.width)+"px;height:"+n+\'px;"></div>\';i[o]+=u}}}render(b,_){if(!this._renderResult)return"";const h=_-b;return h<0||h>=this._renderResult.length?"":this._renderResult[h]}}e.DecorationsOverlay=D}),define(J[196],ee([1,0,106,386]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginOverlay=e.DedupOverlay=e.DecorationToRender=void 0;class k{constructor(b,_,h){this._decorationToRenderBrand=void 0,this.startLineNumber=+b,this.endLineNumber=+_,this.className=String(h)}}e.DecorationToRender=k;class y extends S.DynamicViewOverlay{_render(b,_,h){const m=[];for(let i=b;i<=_;i++){const s=i-b;m[s]=[]}if(h.length===0)return m;h.sort((i,s)=>i.className===s.className?i.startLineNumber===s.startLineNumber?i.endLineNumber-s.endLineNumber:i.startLineNumber-s.startLineNumber:i.className<s.className?-1:1);let n=null,t=0;for(let i=0,s=h.length;i<s;i++){const r=h[i],c=r.className;let g=Math.max(r.startLineNumber,b)-b;const o=Math.min(r.endLineNumber,_)-b;n===c?(g=Math.max(t+1,g),t=Math.max(t,o)):(n=c,t=o);for(let l=g;l<=t;l++)m[l].push(n)}return m}}e.DedupOverlay=y;class D extends y{constructor(b){super(),this._context=b;const _=this._context.configuration.options,h=_.get(139);this._lineHeight=_.get(64),this._glyphMargin=_.get(55),this._glyphMarginLeft=h.glyphMarginLeft,this._glyphMarginWidth=h.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(b){const _=this._context.configuration.options,h=_.get(139);return this._lineHeight=_.get(64),this._glyphMargin=_.get(55),this._glyphMarginLeft=h.glyphMarginLeft,this._glyphMarginWidth=h.glyphMarginWidth,!0}onDecorationsChanged(b){return!0}onFlushed(b){return!0}onLinesChanged(b){return!0}onLinesDeleted(b){return!0}onLinesInserted(b){return!0}onScrollChanged(b){return b.scrollTopChanged}onZonesChanged(b){return!0}_getDecorations(b){const _=b.getDecorationsInViewport(),h=[];let m=0;for(let n=0,t=_.length;n<t;n++){const i=_[n],s=i.options.glyphMarginClassName;s&&(h[m++]=new k(i.range.startLineNumber,i.range.endLineNumber,s))}return h}prepareRender(b){if(!this._glyphMargin){this._renderResult=null;return}const _=b.visibleRange.startLineNumber,h=b.visibleRange.endLineNumber,m=this._render(_,h,this._getDecorations(b)),n=this._lineHeight.toString(),t=this._glyphMarginLeft.toString(),i=this._glyphMarginWidth.toString(),s=\'" style="left:\'+t+"px;width:"+i+"px;height:"+n+\'px;"></div>\',r=[];for(let c=_;c<=h;c++){const g=c-_,o=m[g];o.length===0?r[g]="":r[g]=\'<div class="cgmr codicon \'+o.join(" ")+s}this._renderResult=r}render(b,_){if(!this._renderResult)return"";const h=_-b;return h<0||h>=this._renderResult.length?"":this._renderResult[h]}}e.GlyphMarginOverlay=D}),define(J[487],ee([1,0,196,390]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class k extends S.DedupOverlay{constructor(D){super(),this._context=D;const b=this._context.configuration.options.get(139);this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){const b=this._context.configuration.options.get(139);return this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,!0}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}_getDecorations(D){const w=D.getDecorationsInViewport(),b=[];let _=0;for(let h=0,m=w.length;h<m;h++){const n=w[h],t=n.options.linesDecorationsClassName;t&&(b[_++]=new S.DecorationToRender(n.range.startLineNumber,n.range.endLineNumber,t));const i=n.options.firstLineDecorationClassName;i&&(b[_++]=new S.DecorationToRender(n.range.startLineNumber,n.range.startLineNumber,i))}return b}prepareRender(D){const w=D.visibleRange.startLineNumber,b=D.visibleRange.endLineNumber,_=this._render(w,b,this._getDecorations(D)),h=this._decorationsLeft.toString(),m=this._decorationsWidth.toString(),n=\'" style="left:\'+h+"px;width:"+m+\'px;"></div>\',t=[];for(let i=w;i<=b;i++){const s=i-w,r=_[s];let c="";for(let g=0,o=r.length;g<o;g++)c+=\'<div class="cldr \'+r[g]+n;t[s]=c}this._renderResult=t}render(D,w){return this._renderResult?this._renderResult[w-D]:""}}e.LinesDecorationsOverlay=k}),define(J[266],ee([1,0,35,52,391]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class y extends k.ViewPart{constructor(w){super(w);const b=this._context.configuration.options,_=b.get(139);this._canUseLayerHinting=!b.get(30),this._contentLeft=_.contentLeft,this._glyphMarginLeft=_.glyphMarginLeft,this._glyphMarginWidth=_.glyphMarginWidth,this._domNode=(0,S.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(y.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,S.createFastDomNode)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(y.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(w){const b=this._context.configuration.options,_=b.get(139);return this._canUseLayerHinting=!b.get(30),this._contentLeft=_.contentLeft,this._glyphMarginLeft=_.glyphMarginLeft,this._glyphMarginWidth=_.glyphMarginWidth,!0}onScrollChanged(w){return super.onScrollChanged(w)||w.scrollTopChanged}prepareRender(w){}render(w){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const b=w.scrollTop-w.bigNumbersDelta;this._domNode.setTop(-b);const _=Math.min(w.scrollHeight,1e6);this._domNode.setHeight(_),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(_)}}y.CLASS_NAME="glyph-margin",y.OUTER_CLASS_NAME="margin",e.Margin=y}),define(J[488],ee([1,0,196,392]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class k extends S.DedupOverlay{constructor(D){super(),this._context=D,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){return!0}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}_getDecorations(D){const w=D.getDecorationsInViewport(),b=[];let _=0;for(let h=0,m=w.length;h<m;h++){const n=w[h],t=n.options.marginClassName;t&&(b[_++]=new S.DecorationToRender(n.range.startLineNumber,n.range.endLineNumber,t))}return b}prepareRender(D){const w=D.visibleRange.startLineNumber,b=D.visibleRange.endLineNumber,_=this._render(w,b,this._getDecorations(D)),h=[];for(let m=w;m<=b;m++){const n=m-w,t=_[n];let i="";for(let s=0,r=t.length;s<r;s++)i+=\'<div class="cmdr \'+t[s]+\'" style=""></div>\';h[n]=i}this._renderResult=h}render(D,w){return this._renderResult?this._renderResult[w-D]:""}}e.MarginViewLineDecorationsOverlay=k}),define(J[489],ee([1,0,35,52,394]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class y extends k.ViewPart{constructor(w){super(w);const _=this._context.configuration.options.get(139);this._widgets={},this._verticalScrollbarWidth=_.verticalScrollbarWidth,this._minimapWidth=_.minimap.minimapWidth,this._horizontalScrollbarHeight=_.horizontalScrollbarHeight,this._editorHeight=_.height,this._editorWidth=_.width,this._domNode=(0,S.createFastDomNode)(document.createElement("div")),k.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(w){const _=this._context.configuration.options.get(139);return this._verticalScrollbarWidth=_.verticalScrollbarWidth,this._minimapWidth=_.minimap.minimapWidth,this._horizontalScrollbarHeight=_.horizontalScrollbarHeight,this._editorHeight=_.height,this._editorWidth=_.width,!0}addWidget(w){const b=(0,S.createFastDomNode)(w.getDomNode());this._widgets[w.getId()]={widget:w,preference:null,domNode:b},b.setPosition("absolute"),b.setAttribute("widgetId",w.getId()),this._domNode.appendChild(b),this.setShouldRender()}setWidgetPosition(w,b){const _=this._widgets[w.getId()];return _.preference===b?!1:(_.preference=b,this.setShouldRender(),!0)}removeWidget(w){const b=w.getId();if(this._widgets.hasOwnProperty(b)){const h=this._widgets[b].domNode.domNode;delete this._widgets[b],h.parentNode.removeChild(h),this.setShouldRender()}}_renderWidget(w){const b=w.domNode;if(w.preference===null){b.setTop("");return}if(w.preference===0)b.setTop(0),b.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(w.preference===1){const _=b.domNode.clientHeight;b.setTop(this._editorHeight-_-2*this._horizontalScrollbarHeight),b.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else w.preference===2&&(b.setTop(0),b.domNode.style.right="50%")}prepareRender(w){}render(w){this._domNode.setWidth(this._editorWidth);const b=Object.keys(this._widgets);for(let _=0,h=b.length;_<h;_++){const m=b[_];this._renderWidget(this._widgets[m])}}}e.ViewOverlayWidgets=y}),define(J[490],ee([1,0,35,52,395]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class y extends k.ViewPart{constructor(w){super(w),this.domNode=(0,S.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const b=this._context.configuration.options;this._rulers=b.get(97),this._typicalHalfwidthCharacterWidth=b.get(48).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(w){const b=this._context.configuration.options;return this._rulers=b.get(97),this._typicalHalfwidthCharacterWidth=b.get(48).typicalHalfwidthCharacterWidth,!0}onScrollChanged(w){return w.scrollHeightChanged}prepareRender(w){}_ensureRulersCount(){const w=this._renderedRulers.length,b=this._rulers.length;if(w===b)return;if(w<b){const{tabSize:h}=this._context.viewModel.model.getOptions(),m=h;let n=b-w;for(;n>0;){const t=(0,S.createFastDomNode)(document.createElement("div"));t.setClassName("view-ruler"),t.setWidth(m),this.domNode.appendChild(t),this._renderedRulers.push(t),n--}return}let _=w-b;for(;_>0;){const h=this._renderedRulers.pop();this.domNode.removeChild(h),_--}}render(w){this._ensureRulersCount();for(let b=0,_=this._rulers.length;b<_;b++){const h=this._renderedRulers[b],m=this._rulers[b];h.setBoxShadow(m.color?`1px 0 0 0 ${m.color} inset`:""),h.setHeight(Math.min(w.scrollHeight,1e6)),h.setLeft(m.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=y}),define(J[491],ee([1,0,35,52,396]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class y extends k.ViewPart{constructor(w){super(w),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const _=this._context.configuration.options.get(98);this._useShadows=_.useShadows,this._domNode=(0,S.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const w=this._useShadows&&this._scrollTop>0;return this._shouldShow!==w?(this._shouldShow=w,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const b=this._context.configuration.options.get(139);b.minimap.renderMinimap===0||b.minimap.minimapWidth>0&&b.minimap.minimapLeft===0?this._width=b.width:this._width=b.width-b.verticalScrollbarWidth}onConfigurationChanged(w){const _=this._context.configuration.options.get(98);return this._useShadows=_.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(w){return this._scrollTop=w.scrollTop,this._updateShouldShow()}prepareRender(w){}render(w){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=y}),define(J[492],ee([1,0,35,11,52,13]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const w=()=>{throw new Error("Invalid change accessor")};class b extends y.ViewPart{constructor(m){super(m);const n=this._context.configuration.options,t=n.get(139);this._lineHeight=n.get(64),this._contentWidth=t.contentWidth,this._contentLeft=t.contentLeft,this.domNode=(0,S.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=(0,S.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 m=this._context.viewLayout.getWhitespaces(),n=new Map;for(const i of m)n.set(i.id,i);let t=!1;return this._context.viewModel.changeWhitespace(i=>{const s=Object.keys(this._zones);for(let r=0,c=s.length;r<c;r++){const g=s[r],o=this._zones[g],l=this._computeWhitespaceProps(o.delegate);o.isInHiddenArea=l.isInHiddenArea;const a=n.get(g);a&&(a.afterLineNumber!==l.afterViewLineNumber||a.height!==l.heightInPx)&&(i.changeOneWhitespace(g,l.afterViewLineNumber,l.heightInPx),this._safeCallOnComputedHeight(o.delegate,l.heightInPx),t=!0)}}),t}onConfigurationChanged(m){const n=this._context.configuration.options,t=n.get(139);return this._lineHeight=n.get(64),this._contentWidth=t.contentWidth,this._contentLeft=t.contentLeft,m.hasChanged(64)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(m){return this._recomputeWhitespacesProps()}onLinesDeleted(m){return!0}onScrollChanged(m){return m.scrollTopChanged||m.scrollWidthChanged}onZonesChanged(m){return!0}onLinesInserted(m){return!0}_getZoneOrdinal(m){return typeof m.afterColumn<"u"?m.afterColumn:1e4}_computeWhitespaceProps(m){if(m.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(m),minWidthInPx:this._minWidthInPixels(m)};let n;if(typeof m.afterColumn<"u")n=this._context.viewModel.model.validatePosition({lineNumber:m.afterLineNumber,column:m.afterColumn});else{const r=this._context.viewModel.model.validatePosition({lineNumber:m.afterLineNumber,column:1}).lineNumber;n=new D.Position(r,this._context.viewModel.model.getLineMaxColumn(r))}let t;n.column===this._context.viewModel.model.getLineMaxColumn(n.lineNumber)?t=this._context.viewModel.model.validatePosition({lineNumber:n.lineNumber+1,column:1}):t=this._context.viewModel.model.validatePosition({lineNumber:n.lineNumber,column:n.column+1});const i=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n,m.afterColumnAffinity),s=this._context.viewModel.coordinatesConverter.modelPositionIsVisible(t);return{isInHiddenArea:!s,afterViewLineNumber:i.lineNumber,heightInPx:s?this._heightInPixels(m):0,minWidthInPx:this._minWidthInPixels(m)}}changeViewZones(m){let n=!1;return this._context.viewModel.changeWhitespace(t=>{const i={addZone:s=>(n=!0,this._addZone(t,s)),removeZone:s=>{s&&(n=this._removeZone(t,s)||n)},layoutZone:s=>{s&&(n=this._layoutZone(t,s)||n)}};_(m,i),i.addZone=w,i.removeZone=w,i.layoutZone=w}),n}_addZone(m,n){const t=this._computeWhitespaceProps(n),s={whitespaceId:m.insertWhitespace(t.afterViewLineNumber,this._getZoneOrdinal(n),t.heightInPx,t.minWidthInPx),delegate:n,isInHiddenArea:t.isInHiddenArea,isVisible:!1,domNode:(0,S.createFastDomNode)(n.domNode),marginDomNode:n.marginDomNode?(0,S.createFastDomNode)(n.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,t.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(m,n){if(this._zones.hasOwnProperty(n)){const t=this._zones[n];return delete this._zones[n],m.removeWhitespace(t.whitespaceId),t.domNode.removeAttribute("monaco-visible-view-zone"),t.domNode.removeAttribute("monaco-view-zone"),t.domNode.domNode.parentNode.removeChild(t.domNode.domNode),t.marginDomNode&&(t.marginDomNode.removeAttribute("monaco-visible-view-zone"),t.marginDomNode.removeAttribute("monaco-view-zone"),t.marginDomNode.domNode.parentNode.removeChild(t.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(m,n){if(this._zones.hasOwnProperty(n)){const t=this._zones[n],i=this._computeWhitespaceProps(t.delegate);return t.isInHiddenArea=i.isInHiddenArea,m.changeOneWhitespace(t.whitespaceId,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(t.delegate,i.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(m){return this._zones.hasOwnProperty(m)?!!this._zones[m].delegate.suppressMouseDown:!1}_heightInPixels(m){return typeof m.heightInPx=="number"?m.heightInPx:typeof m.heightInLines=="number"?this._lineHeight*m.heightInLines:this._lineHeight}_minWidthInPixels(m){return typeof m.minWidthInPx=="number"?m.minWidthInPx:0}_safeCallOnComputedHeight(m,n){if(typeof m.onComputedHeight=="function")try{m.onComputedHeight(n)}catch(t){(0,k.onUnexpectedError)(t)}}_safeCallOnDomNodeTop(m,n){if(typeof m.onDomNodeTop=="function")try{m.onDomNodeTop(n)}catch(t){(0,k.onUnexpectedError)(t)}}prepareRender(m){}render(m){const n=m.viewportData.whitespaceViewportData,t={};let i=!1;for(const r of n)this._zones[r.id].isInHiddenArea||(t[r.id]=r,i=!0);const s=Object.keys(this._zones);for(let r=0,c=s.length;r<c;r++){const g=s[r],o=this._zones[g];let l=0,a=0,d="none";t.hasOwnProperty(g)?(l=t[g].verticalOffset-m.bigNumbersDelta,a=t[g].height,d="block",o.isVisible||(o.domNode.setAttribute("monaco-visible-view-zone","true"),o.isVisible=!0),this._safeCallOnDomNodeTop(o.delegate,m.getScrolledTopFromAbsoluteTop(t[g].verticalOffset))):(o.isVisible&&(o.domNode.removeAttribute("monaco-visible-view-zone"),o.isVisible=!1),this._safeCallOnDomNodeTop(o.delegate,m.getScrolledTopFromAbsoluteTop(-1e6))),o.domNode.setTop(l),o.domNode.setHeight(a),o.domNode.setDisplay(d),o.marginDomNode&&(o.marginDomNode.setTop(l),o.marginDomNode.setHeight(a),o.marginDomNode.setDisplay(d))}i&&(this.domNode.setWidth(Math.max(m.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=b;function _(h,m){try{return h(m)}catch(n){(0,k.onUnexpectedError)(n)}}}),define(J[197],ee([1,0]),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 S{constructor(){this.type=0}}e.ViewCompositionStartEvent=S;class k{constructor(){this.type=1}}e.ViewCompositionEndEvent=k;class y{constructor(d){this.type=2,this._source=d}hasChanged(d){return this._source.hasChanged(d)}}e.ViewConfigurationChangedEvent=y;class D{constructor(d,u,C){this.selections=d,this.modelSelections=u,this.reason=C,this.type=3}}e.ViewCursorStateChangedEvent=D;class w{constructor(d){this.type=4,d?(this.affectsMinimap=d.affectsMinimap,this.affectsOverviewRuler=d.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}e.ViewDecorationsChangedEvent=w;class b{constructor(){this.type=5}}e.ViewFlushedEvent=b;class _{constructor(d){this.type=6,this.isFocused=d}}e.ViewFocusChangedEvent=_;class h{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=h;class m{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=m;class n{constructor(d,u){this.fromLineNumber=d,this.count=u,this.type=9}}e.ViewLinesChangedEvent=n;class t{constructor(d,u){this.type=10,this.fromLineNumber=d,this.toLineNumber=u}}e.ViewLinesDeletedEvent=t;class i{constructor(d,u){this.type=11,this.fromLineNumber=d,this.toLineNumber=u}}e.ViewLinesInsertedEvent=i;class s{constructor(d,u,C,f,v,p,L){this.source=d,this.minimalReveal=u,this.range=C,this.selections=f,this.verticalType=v,this.revealHorizontal=p,this.scrollType=L,this.type=12}}e.ViewRevealRangeRequestEvent=s;class r{constructor(d){this.type=13,this.scrollWidth=d.scrollWidth,this.scrollLeft=d.scrollLeft,this.scrollHeight=d.scrollHeight,this.scrollTop=d.scrollTop,this.scrollWidthChanged=d.scrollWidthChanged,this.scrollLeftChanged=d.scrollLeftChanged,this.scrollHeightChanged=d.scrollHeightChanged,this.scrollTopChanged=d.scrollTopChanged}}e.ViewScrollChangedEvent=r;class c{constructor(d){this.theme=d,this.type=14}}e.ViewThemeChangedEvent=c;class g{constructor(d){this.type=15,this.ranges=d}}e.ViewTokensChangedEvent=g;class o{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=o;class l{constructor(){this.type=17}}e.ViewZonesChangedEvent=l}),define(J[138],ee([1,0,9]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class k{constructor(_,h,m,n){this.startColumn=_,this.endColumn=h,this.className=m,this.type=n,this._lineDecorationBrand=void 0}static _equals(_,h){return _.startColumn===h.startColumn&&_.endColumn===h.endColumn&&_.className===h.className&&_.type===h.type}static equalsArr(_,h){const m=_.length,n=h.length;if(m!==n)return!1;for(let t=0;t<m;t++)if(!k._equals(_[t],h[t]))return!1;return!0}static extractWrapped(_,h,m){if(_.length===0)return _;const n=h+1,t=m+1,i=m-h,s=[];let r=0;for(const c of _)c.endColumn<=n||c.startColumn>=t||(s[r++]=new k(Math.max(1,c.startColumn-n+1),Math.min(i+1,c.endColumn-n+1),c.className,c.type));return s}static filter(_,h,m,n){if(_.length===0)return[];const t=[];let i=0;for(let s=0,r=_.length;s<r;s++){const c=_[s],g=c.range;if(g.endLineNumber<h||g.startLineNumber>h||g.isEmpty()&&(c.type===0||c.type===3))continue;const o=g.startLineNumber===h?g.startColumn:m,l=g.endLineNumber===h?g.endColumn:n;t[i++]=new k(o,l,c.inlineClassName,c.type)}return t}static _typeCompare(_,h){const m=[2,0,1,3];return m[_]-m[h]}static compare(_,h){if(_.startColumn!==h.startColumn)return _.startColumn-h.startColumn;if(_.endColumn!==h.endColumn)return _.endColumn-h.endColumn;const m=k._typeCompare(_.type,h.type);return m!==0?m:_.className!==h.className?_.className<h.className?-1:1:0}}e.LineDecoration=k;class y{constructor(_,h,m,n){this.startOffset=_,this.endOffset=h,this.className=m,this.metadata=n}}e.DecorationSegment=y;class D{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(_){let h=0;for(let m=0,n=_.length;m<n;m++)h|=_[m];return h}consumeLowerThan(_,h,m){for(;this.count>0&&this.stopOffsets[0]<_;){let n=0;for(;n+1<this.count&&this.stopOffsets[n]===this.stopOffsets[n+1];)n++;m.push(new y(h,this.stopOffsets[n],this.classNames.join(" "),D._metadata(this.metadata))),h=this.stopOffsets[n]+1,this.stopOffsets.splice(0,n+1),this.classNames.splice(0,n+1),this.metadata.splice(0,n+1),this.count-=n+1}return this.count>0&&h<_&&(m.push(new y(h,_-1,this.classNames.join(" "),D._metadata(this.metadata))),h=_),h}insert(_,h,m){if(this.count===0||this.stopOffsets[this.count-1]<=_)this.stopOffsets.push(_),this.classNames.push(h),this.metadata.push(m);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=_){this.stopOffsets.splice(n,0,_),this.classNames.splice(n,0,h),this.metadata.splice(n,0,m);break}this.count++}}class w{static normalize(_,h){if(h.length===0)return[];const m=[],n=new D;let t=0;for(let i=0,s=h.length;i<s;i++){const r=h[i];let c=r.startColumn,g=r.endColumn;const o=r.className,l=r.type===1?2:r.type===2?4:0;if(c>1){const u=_.charCodeAt(c-2);S.isHighSurrogate(u)&&c--}if(g>1){const u=_.charCodeAt(g-2);S.isHighSurrogate(u)&&g--}const a=c-1,d=g-2;t=n.consumeLowerThan(a,t,m),n.count===0&&(t=a),n.insert(d,o,l)}return n.consumeLowerThan(1073741824,t,m),m}}e.LineDecorationsNormalizer=w}),define(J[493],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinePart=void 0;class S{constructor(y,D,w,b){this.endIndex=y,this.type=D,this.metadata=w,this.containsRTL=b,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}e.LinePart=S}),define(J[494],ee([1,0,9]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class k{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(b){this._hasPending=!0,this._inserts.push(b)}change(b){this._hasPending=!0,this._changes.push(b)}remove(b){this._hasPending=!0,this._removes.push(b)}mustCommit(){return this._hasPending}commit(b){if(!this._hasPending)return;const _=this._inserts,h=this._changes,m=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],b._commitPendingChanges(_,h,m)}}class y{constructor(b,_,h,m,n){this.id=b,this.afterLineNumber=_,this.ordinal=h,this.height=m,this.minWidth=n,this.prefixSum=0}}e.EditorWhitespace=y;class D{constructor(b,_,h,m){this._instanceId=S.singleLetterHash(++D.INSTANCE_COUNT),this._pendingChanges=new k,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=b,this._lineHeight=_,this._paddingTop=h,this._paddingBottom=m}static findInsertionIndex(b,_,h){let m=0,n=b.length;for(;m<n;){const t=m+n>>>1;_===b[t].afterLineNumber?h<b[t].ordinal?n=t:m=t+1:_<b[t].afterLineNumber?n=t:m=t+1}return m}setLineHeight(b){this._checkPendingChanges(),this._lineHeight=b}setPadding(b,_){this._paddingTop=b,this._paddingBottom=_}onFlushed(b){this._checkPendingChanges(),this._lineCount=b}changeWhitespace(b){let _=!1;try{b({insertWhitespace:(m,n,t,i)=>{_=!0,m=m|0,n=n|0,t=t|0,i=i|0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new y(s,m,n,t,i)),s},changeOneWhitespace:(m,n,t)=>{_=!0,n=n|0,t=t|0,this._pendingChanges.change({id:m,newAfterLineNumber:n,newHeight:t})},removeWhitespace:m=>{_=!0,this._pendingChanges.remove({id:m})}})}finally{this._pendingChanges.commit(this)}return _}_commitPendingChanges(b,_,h){if((b.length>0||h.length>0)&&(this._minWidth=-1),b.length+_.length+h.length<=1){for(const s of b)this._insertWhitespace(s);for(const s of _)this._changeOneWhitespace(s.id,s.newAfterLineNumber,s.newHeight);for(const s of h){const r=this._findWhitespaceIndex(s.id);r!==-1&&this._removeWhitespace(r)}return}const m=new Set;for(const s of h)m.add(s.id);const n=new Map;for(const s of _)n.set(s.id,s);const t=s=>{const r=[];for(const c of s)if(!m.has(c.id)){if(n.has(c.id)){const g=n.get(c.id);c.afterLineNumber=g.newAfterLineNumber,c.height=g.newHeight}r.push(c)}return r},i=t(this._arr).concat(t(b));i.sort((s,r)=>s.afterLineNumber===r.afterLineNumber?s.ordinal-r.ordinal:s.afterLineNumber-r.afterLineNumber),this._arr=i,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(b){const _=D.findInsertionIndex(this._arr,b.afterLineNumber,b.ordinal);this._arr.splice(_,0,b),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,_-1)}_findWhitespaceIndex(b){const _=this._arr;for(let h=0,m=_.length;h<m;h++)if(_[h].id===b)return h;return-1}_changeOneWhitespace(b,_,h){const m=this._findWhitespaceIndex(b);if(m!==-1&&(this._arr[m].height!==h&&(this._arr[m].height=h,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,m-1)),this._arr[m].afterLineNumber!==_)){const n=this._arr[m];this._removeWhitespace(m),n.afterLineNumber=_,this._insertWhitespace(n)}}_removeWhitespace(b){this._arr.splice(b,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,b-1)}onLinesDeleted(b,_){this._checkPendingChanges(),b=b|0,_=_|0,this._lineCount-=_-b+1;for(let h=0,m=this._arr.length;h<m;h++){const n=this._arr[h].afterLineNumber;b<=n&&n<=_?this._arr[h].afterLineNumber=b-1:n>_&&(this._arr[h].afterLineNumber-=_-b+1)}}onLinesInserted(b,_){this._checkPendingChanges(),b=b|0,_=_|0,this._lineCount+=_-b+1;for(let h=0,m=this._arr.length;h<m;h++){const n=this._arr[h].afterLineNumber;b<=n&&(this._arr[h].afterLineNumber+=_-b+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(b){this._checkPendingChanges(),b=b|0;let _=Math.max(0,this._prefixSumValidIndex+1);_===0&&(this._arr[0].prefixSum=this._arr[0].height,_++);for(let h=_;h<=b;h++)this._arr[h].prefixSum=this._arr[h-1].prefixSum+this._arr[h].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,b),this._arr[b].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const b=this._lineHeight*this._lineCount,_=this.getWhitespacesTotalHeight();return b+_+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(b){this._checkPendingChanges(),b=b|0;const _=this._findLastWhitespaceBeforeLineNumber(b);return _===-1?0:this.getWhitespacesAccumulatedHeight(_)}_findLastWhitespaceBeforeLineNumber(b){b=b|0;const _=this._arr;let h=0,m=_.length-1;for(;h<=m;){const t=(m-h|0)/2|0,i=h+t|0;if(_[i].afterLineNumber<b){if(i+1>=_.length||_[i+1].afterLineNumber>=b)return i;h=i+1|0}else m=i-1|0}return-1}_findFirstWhitespaceAfterLineNumber(b){b=b|0;const h=this._findLastWhitespaceBeforeLineNumber(b)+1;return h<this._arr.length?h:-1}getFirstWhitespaceIndexAfterLineNumber(b){return this._checkPendingChanges(),b=b|0,this._findFirstWhitespaceAfterLineNumber(b)}getVerticalOffsetForLineNumber(b,_=!1){this._checkPendingChanges(),b=b|0;let h;b>1?h=this._lineHeight*(b-1):h=0;const m=this.getWhitespaceAccumulatedHeightBeforeLineNumber(b-(_?1:0));return h+m+this._paddingTop}getVerticalOffsetAfterLineNumber(b,_=!1){this._checkPendingChanges(),b=b|0;const h=this._lineHeight*b,m=this.getWhitespaceAccumulatedHeightBeforeLineNumber(b+(_?1:0));return h+m+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let b=0;for(let _=0,h=this._arr.length;_<h;_++)b=Math.max(b,this._arr[_].minWidth);this._minWidth=b}return this._minWidth}isAfterLines(b){this._checkPendingChanges();const _=this.getLinesTotalHeight();return b>_}isInTopPadding(b){return this._paddingTop===0?!1:(this._checkPendingChanges(),b<this._paddingTop)}isInBottomPadding(b){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const _=this.getLinesTotalHeight();return b>=_-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(b){if(this._checkPendingChanges(),b=b|0,b<0)return 1;const _=this._lineCount|0,h=this._lineHeight;let m=1,n=_;for(;m<n;){const t=(m+n)/2|0,i=this.getVerticalOffsetForLineNumber(t)|0;if(b>=i+h)m=t+1;else{if(b>=i)return t;n=t}}return m>_?_:m}getLinesViewportData(b,_){this._checkPendingChanges(),b=b|0,_=_|0;const h=this._lineHeight,m=this.getLineNumberAtOrAfterVerticalOffset(b)|0,n=this.getVerticalOffsetForLineNumber(m)|0;let t=this._lineCount|0,i=this.getFirstWhitespaceIndexAfterLineNumber(m)|0;const s=this.getWhitespacesCount()|0;let r,c;i===-1?(i=s,c=t+1,r=0):(c=this.getAfterLineNumberForWhitespaceIndex(i)|0,r=this.getHeightForWhitespaceIndex(i)|0);let g=n,o=g;const l=5e5;let a=0;n>=l&&(a=Math.floor(n/l)*l,a=Math.floor(a/h)*h,o-=a);const d=[],u=b+(_-b)/2;let C=-1;for(let L=m;L<=t;L++){if(C===-1){const E=g,I=g+h;(E<=u&&u<I||E>u)&&(C=L)}for(g+=h,d[L-m]=o,o+=h;c===L;)o+=r,g+=r,i++,i>=s?c=t+1:(c=this.getAfterLineNumberForWhitespaceIndex(i)|0,r=this.getHeightForWhitespaceIndex(i)|0);if(g>=_){t=L;break}}C===-1&&(C=t);const f=this.getVerticalOffsetForLineNumber(t)|0;let v=m,p=t;return v<p&&n<b&&v++,v<p&&f+h>_&&p--,{bigNumbersDelta:a,startLineNumber:m,endLineNumber:t,relativeVerticalOffset:d,centeredLineNumber:C,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:p}}getVerticalOffsetForWhitespaceIndex(b){this._checkPendingChanges(),b=b|0;const _=this.getAfterLineNumberForWhitespaceIndex(b);let h;_>=1?h=this._lineHeight*_:h=0;let m;return b>0?m=this.getWhitespacesAccumulatedHeight(b-1):m=0,h+m+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(b){this._checkPendingChanges(),b=b|0;let _=0,h=this.getWhitespacesCount()-1;if(h<0)return-1;const m=this.getVerticalOffsetForWhitespaceIndex(h),n=this.getHeightForWhitespaceIndex(h);if(b>=m+n)return-1;for(;_<h;){const t=Math.floor((_+h)/2),i=this.getVerticalOffsetForWhitespaceIndex(t),s=this.getHeightForWhitespaceIndex(t);if(b>=i+s)_=t+1;else{if(b>=i)return t;h=t}}return _}getWhitespaceAtVerticalOffset(b){this._checkPendingChanges(),b=b|0;const _=this.getWhitespaceIndexAtOrAfterVerticallOffset(b);if(_<0||_>=this.getWhitespacesCount())return null;const h=this.getVerticalOffsetForWhitespaceIndex(_);if(h>b)return null;const m=this.getHeightForWhitespaceIndex(_),n=this.getIdForWhitespaceIndex(_),t=this.getAfterLineNumberForWhitespaceIndex(_);return{id:n,afterLineNumber:t,verticalOffset:h,height:m}}getWhitespaceViewportData(b,_){this._checkPendingChanges(),b=b|0,_=_|0;const h=this.getWhitespaceIndexAtOrAfterVerticallOffset(b),m=this.getWhitespacesCount()-1;if(h<0)return[];const n=[];for(let t=h;t<=m;t++){const i=this.getVerticalOffsetForWhitespaceIndex(t),s=this.getHeightForWhitespaceIndex(t);if(i>=_)break;n.push({id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:s})}return n}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].id}getAfterLineNumberForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].afterLineNumber}getHeightForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].height}}D.INSTANCE_COUNT=0,e.LinesLayout=D}),define(J[495],ee([1,0,5]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class k{constructor(D,w,b,_){this.selections=D,this.startLineNumber=w.startLineNumber|0,this.endLineNumber=w.endLineNumber|0,this.relativeVerticalOffset=w.relativeVerticalOffset,this.bigNumbersDelta=w.bigNumbersDelta|0,this.whitespaceViewportData=b,this._model=_,this.visibleRange=new S.Range(w.startLineNumber,this._model.getLineMinColumn(w.startLineNumber),w.endLineNumber,this._model.getLineMaxColumn(w.endLineNumber))}getViewLineRenderingData(D){return this._model.getViewportViewLineRenderingData(this.visibleRange,D)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=k}),define(J[81],ee([1,0,9,5]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerDecorationsGroup=e.ViewModelDecoration=e.SingleLineInlineDecoration=e.InlineDecoration=e.ViewLineRenderingData=e.ViewLineData=e.MinimapLinesRenderingData=e.Viewport=void 0;class y{constructor(i,s,r,c){this._viewportBrand=void 0,this.top=i|0,this.left=s|0,this.width=r|0,this.height=c|0}}e.Viewport=y;class D{constructor(i,s){this.tabSize=i,this.data=s}}e.MinimapLinesRenderingData=D;class w{constructor(i,s,r,c,g,o,l){this._viewLineDataBrand=void 0,this.content=i,this.continuesWithWrappedLine=s,this.minColumn=r,this.maxColumn=c,this.startVisibleColumn=g,this.tokens=o,this.inlineDecorations=l}}e.ViewLineData=w;class b{constructor(i,s,r,c,g,o,l,a,d,u){this.minColumn=i,this.maxColumn=s,this.content=r,this.continuesWithWrappedLine=c,this.isBasicASCII=b.isBasicASCII(r,o),this.containsRTL=b.containsRTL(r,this.isBasicASCII,g),this.tokens=l,this.inlineDecorations=a,this.tabSize=d,this.startVisibleColumn=u}static isBasicASCII(i,s){return s?S.isBasicASCII(i):!0}static containsRTL(i,s,r){return!s&&r?S.containsRTL(i):!1}}e.ViewLineRenderingData=b;class _{constructor(i,s,r){this.range=i,this.inlineClassName=s,this.type=r}}e.InlineDecoration=_;class h{constructor(i,s,r,c){this.startOffset=i,this.endOffset=s,this.inlineClassName=r,this.inlineClassNameAffectsLetterSpacing=c}toInlineDecoration(i){return new _(new k.Range(i,this.startOffset+1,i,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=h;class m{constructor(i,s){this._viewModelDecorationBrand=void 0,this.range=i,this.options=s}}e.ViewModelDecoration=m;class n{constructor(i,s,r){this.color=i,this.zIndex=s,this.data=r}static cmp(i,s){return i.zIndex===s.zIndex?i.color<s.color?-1:i.color>s.color?1:0:i.zIndex-s.zIndex}}e.OverviewRulerDecorationsGroup=n}),define(J[496],ee([1,0,86,13,105,81]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function w(i,s){return i===null?s?_.INSTANCE:h.INSTANCE:new b(i,s)}e.createModelLineProjection=w;class b{constructor(s,r){this._projectionData=s,this._isVisible=r}isVisible(){return this._isVisible}setVisible(s){return this._isVisible=s,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(s,r,c){this._assertVisible();const g=c>0?this._projectionData.breakOffsets[c-1]:0,o=this._projectionData.breakOffsets[c];let l;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((u,C)=>new y.LineInjectedText(0,0,u+1,this._projectionData.injectionOptions[C],0));l=y.LineInjectedText.applyInjectedText(s.getLineContent(r),a).substring(g,o)}else l=s.getValueInRange({startLineNumber:r,startColumn:g+1,endLineNumber:r,endColumn:o+1});return c>0&&(l=n(this._projectionData.wrappedTextIndentLength)+l),l}getViewLineLength(s,r,c){return this._assertVisible(),this._projectionData.getLineLength(c)}getViewLineMinColumn(s,r,c){return this._assertVisible(),this._projectionData.getMinOutputOffset(c)+1}getViewLineMaxColumn(s,r,c){return this._assertVisible(),this._projectionData.getMaxOutputOffset(c)+1}getViewLineData(s,r,c){const g=new Array;return this.getViewLinesData(s,r,c,1,0,[!0],g),g[0]}getViewLinesData(s,r,c,g,o,l,a){this._assertVisible();const d=this._projectionData,u=d.injectionOffsets,C=d.injectionOptions;let f=null;if(u){f=[];let p=0,L=0;for(let E=0;E<d.getOutputLineCount();E++){const I=new Array;f[E]=I;const T=E>0?d.breakOffsets[E-1]:0,F=d.breakOffsets[E];for(;L<u.length;){const R=C[L].content.length,M=u[L]+p,N=M+R;if(M>F)break;if(T<N){const A=C[L];if(A.inlineClassName){const P=E>0?d.wrappedTextIndentLength:0,x=P+Math.max(M-T,0),W=P+Math.min(N-T,F);x!==W&&I.push(new D.SingleLineInlineDecoration(x,W,A.inlineClassName,A.inlineClassNameAffectsLetterSpacing))}}if(N<=F)p+=R,L++;else break}}}let v;u?v=s.tokenization.getLineTokens(r).withInserted(u.map((p,L)=>({offset:p,text:C[L].content,tokenMetadata:S.LineTokens.defaultTokenMetadata}))):v=s.tokenization.getLineTokens(r);for(let p=c;p<c+g;p++){const L=o+p-c;if(!l[L]){a[L]=null;continue}a[L]=this._getViewLineData(v,f?f[p]:null,p)}}_getViewLineData(s,r,c){this._assertVisible();const g=this._projectionData,o=c>0?g.wrappedTextIndentLength:0,l=c>0?g.breakOffsets[c-1]:0,a=g.breakOffsets[c],d=s.sliceAndInflate(l,a,o);let u=d.getLineContent();c>0&&(u=n(g.wrappedTextIndentLength)+u);const C=this._projectionData.getMinOutputOffset(c)+1,f=u.length+1,v=c+1<this.getViewLineCount(),p=c===0?0:g.breakOffsetsVisibleColumn[c-1];return new D.ViewLineData(u,v,C,f,p,d,r)}getModelColumnOfViewPosition(s,r){return this._assertVisible(),this._projectionData.translateToInputOffset(s,r-1)+1}getViewPositionOfModelPosition(s,r,c=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(r-1,c).toPosition(s)}getViewLineNumberOfModelPosition(s,r){this._assertVisible();const c=this._projectionData.translateToOutputPosition(r-1);return s+c.outputLineIndex}normalizePosition(s,r,c){const g=r.lineNumber-s;return this._projectionData.normalizeOutputPosition(s,r.column-1,c).toPosition(g)}getInjectedTextAt(s,r){return this._projectionData.getInjectedText(s,r-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class _{constructor(){}isVisible(){return!0}setVisible(s){return s?this:h.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(s,r,c){return s.getLineContent(r)}getViewLineLength(s,r,c){return s.getLineLength(r)}getViewLineMinColumn(s,r,c){return s.getLineMinColumn(r)}getViewLineMaxColumn(s,r,c){return s.getLineMaxColumn(r)}getViewLineData(s,r,c){const g=s.tokenization.getLineTokens(r),o=g.getLineContent();return new D.ViewLineData(o,!1,1,o.length+1,0,g.inflate(),null)}getViewLinesData(s,r,c,g,o,l,a){if(!l[o]){a[o]=null;return}a[o]=this.getViewLineData(s,r,0)}getModelColumnOfViewPosition(s,r){return r}getViewPositionOfModelPosition(s,r){return new k.Position(s,r)}getViewLineNumberOfModelPosition(s,r){return s}normalizePosition(s,r,c){return r}getInjectedTextAt(s,r){return null}}_.INSTANCE=new _;class h{constructor(){}isVisible(){return!1}setVisible(s){return s?_.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(s,r,c){throw new Error("Not supported")}getViewLineLength(s,r,c){throw new Error("Not supported")}getViewLineMinColumn(s,r,c){throw new Error("Not supported")}getViewLineMaxColumn(s,r,c){throw new Error("Not supported")}getViewLineData(s,r,c){throw new Error("Not supported")}getViewLinesData(s,r,c,g,o,l,a){throw new Error("Not supported")}getModelColumnOfViewPosition(s,r){throw new Error("Not supported")}getViewPositionOfModelPosition(s,r){throw new Error("Not supported")}getViewLineNumberOfModelPosition(s,r){throw new Error("Not supported")}normalizePosition(s,r,c){throw new Error("Not supported")}getInjectedTextAt(s,r){throw new Error("Not supported")}}h.INSTANCE=new h;const m=[""];function n(i){if(i>=m.length)for(let s=1;s<=i;s++)m[s]=t(s);return m[i]}function t(i){return new Array(i+1).join(" ")}}),define(J[497],ee([1,0,9,115,105,262]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class w{static create(g){return new w(g.get(128),g.get(127))}constructor(g,o){this.classifier=new b(g,o)}createLineBreaksComputer(g,o,l,a,d){const u=[],C=[],f=[];return{addRequest:(v,p,L)=>{u.push(v),C.push(p),f.push(L)},finalize:()=>{const v=g.typicalFullwidthCharacterWidth/g.typicalHalfwidthCharacterWidth,p=[];for(let L=0,E=u.length;L<E;L++){const I=C[L],T=f[L];T&&!T.injectionOptions&&!I?p[L]=m(this.classifier,T,u[L],o,l,v,a,d):p[L]=n(this.classifier,u[L],I,o,l,v,a,d)}return _.length=0,h.length=0,p}}}}e.MonospaceLineBreaksComputerFactory=w;class b extends k.CharacterClassifier{constructor(g,o){super(0);for(let l=0;l<g.length;l++)this.set(g.charCodeAt(l),1);for(let l=0;l<o.length;l++)this.set(o.charCodeAt(l),2)}get(g){return g>=0&&g<256?this._asciiMap[g]:g>=12352&&g<=12543||g>=13312&&g<=19903||g>=19968&&g<=40959?3:this._map.get(g)||this._defaultValue}}let _=[],h=[];function m(c,g,o,l,a,d,u,C){if(a===-1)return null;const f=o.length;if(f<=1)return null;const v=C==="keepAll",p=g.breakOffsets,L=g.breakOffsetsVisibleColumn,E=r(o,l,a,d,u),I=a-E,T=_,F=h;let R=0,M=0,N=0,A=a;const P=p.length;let x=0;if(x>=0){let W=Math.abs(L[x]-A);for(;x+1<P;){const U=Math.abs(L[x+1]-A);if(U>=W)break;W=U,x++}}for(;x<P;){let W=x<0?0:p[x],U=x<0?0:L[x];M>W&&(W=M,U=N);let O=0,$=0,Q=0,se=0;if(U<=A){let te=U,re=W===0?0:o.charCodeAt(W-1),H=W===0?0:c.get(re),B=!0;for(let j=W;j<f;j++){const G=j,Y=o.charCodeAt(j);let ne,de;if(S.isHighSurrogate(Y)?(j++,ne=0,de=2):(ne=c.get(Y),de=t(Y,te,l,d)),G>M&&s(re,H,Y,ne,v)&&(O=G,$=te),te+=de,te>A){G>M?(Q=G,se=te-de):(Q=j+1,se=te),te-$>I&&(O=0),B=!1;break}re=Y,H=ne}if(B){R>0&&(T[R]=p[p.length-1],F[R]=L[p.length-1],R++);break}}if(O===0){let te=U,re=o.charCodeAt(W),H=c.get(re),B=!1;for(let j=W-1;j>=M;j--){const G=j+1,Y=o.charCodeAt(j);if(Y===9){B=!0;break}let ne,de;if(S.isLowSurrogate(Y)?(j--,ne=0,de=2):(ne=c.get(Y),de=S.isFullWidthCharacter(Y)?d:1),te<=A){if(Q===0&&(Q=G,se=te),te<=A-I)break;if(s(Y,ne,re,H,v)){O=G,$=te;break}}te-=de,re=Y,H=ne}if(O!==0){const j=I-(se-$);if(j<=l){const G=o.charCodeAt(Q);let Y;S.isHighSurrogate(G)?Y=2:Y=t(G,se,l,d),j-Y<0&&(O=0)}}if(B){x--;continue}}if(O===0&&(O=Q,$=se),O<=M){const te=o.charCodeAt(M);S.isHighSurrogate(te)?(O=M+2,$=N+2):(O=M+1,$=N+t(te,N,l,d))}for(M=O,T[R]=O,N=$,F[R]=$,R++,A=$+I;x<0||x<P&&L[x]<$;)x++;let le=Math.abs(L[x]-A);for(;x+1<P;){const te=Math.abs(L[x+1]-A);if(te>=le)break;le=te,x++}}return R===0?null:(T.length=R,F.length=R,_=g.breakOffsets,h=g.breakOffsetsVisibleColumn,g.breakOffsets=T,g.breakOffsetsVisibleColumn=F,g.wrappedTextIndentLength=E,g)}function n(c,g,o,l,a,d,u,C){const f=y.LineInjectedText.applyInjectedText(g,o);let v,p;if(o&&o.length>0?(v=o.map($=>$.options),p=o.map($=>$.column-1)):(v=null,p=null),a===-1)return v?new D.ModelLineProjectionData(p,v,[f.length],[],0):null;const L=f.length;if(L<=1)return v?new D.ModelLineProjectionData(p,v,[f.length],[],0):null;const E=C==="keepAll",I=r(f,l,a,d,u),T=a-I,F=[],R=[];let M=0,N=0,A=0,P=a,x=f.charCodeAt(0),W=c.get(x),U=t(x,0,l,d),O=1;S.isHighSurrogate(x)&&(U+=1,x=f.charCodeAt(1),W=c.get(x),O++);for(let $=O;$<L;$++){const Q=$,se=f.charCodeAt($);let le,te;S.isHighSurrogate(se)?($++,le=0,te=2):(le=c.get(se),te=t(se,U,l,d)),s(x,W,se,le,E)&&(N=Q,A=U),U+=te,U>P&&((N===0||U-A>T)&&(N=Q,A=U-te),F[M]=N,R[M]=A,M++,P=A+T,N=0),x=se,W=le}return M===0&&(!o||o.length===0)?null:(F[M]=L,R[M]=U,new D.ModelLineProjectionData(p,v,F,R,I))}function t(c,g,o,l){return c===9?o-g%o:S.isFullWidthCharacter(c)||c<32?l:1}function i(c,g){return g-c%g}function s(c,g,o,l,a){return o!==32&&(g===2&&l!==2||g!==1&&l===1||!a&&g===3&&l!==2||!a&&l===3&&g!==1)}function r(c,g,o,l,a){let d=0;if(a!==0){const u=S.firstNonWhitespaceIndex(c);if(u!==-1){for(let f=0;f<u;f++){const v=c.charCodeAt(f)===9?i(d,g):1;d+=v}const C=a===3?2:a===2?1:0;for(let f=0;f<C;f++){const v=i(d,g);d+=v}d+l>o&&(d=0)}}return d}}),define(J[267],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class S{constructor(w,b,_){this._colorZoneBrand=void 0,this.from=w|0,this.to=b|0,this.colorId=_|0}static compare(w,b){return w.colorId===b.colorId?w.from===b.from?w.to-b.to:w.from-b.from:w.colorId-b.colorId}}e.ColorZone=S;class k{constructor(w,b,_,h){this._overviewRulerZoneBrand=void 0,this.startLineNumber=w,this.endLineNumber=b,this.heightInLines=_,this.color=h,this._colorZone=null}static compare(w,b){return w.color===b.color?w.startLineNumber===b.startLineNumber?w.heightInLines===b.heightInLines?w.endLineNumber-b.endLineNumber:w.heightInLines-b.heightInLines:w.startLineNumber-b.startLineNumber:w.color<b.color?-1:1}setColorZone(w){this._colorZone=w}getColorZones(){return this._colorZone}}e.OverviewRulerZone=k;class y{constructor(w){this._getVerticalOffsetForLine=w,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(w){this._zones=w,this._zones.sort(k.compare)}setLineHeight(w){return this._lineHeight===w?!1:(this._lineHeight=w,this._colorZonesInvalid=!0,!0)}setPixelRatio(w){this._pixelRatio=w,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(w){return this._domWidth===w?!1:(this._domWidth=w,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(w){return this._domHeight===w?!1:(this._domHeight=w,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(w){return this._outerHeight===w?!1:(this._outerHeight=w,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const w=this._colorZonesInvalid,b=Math.floor(this._lineHeight),_=Math.floor(this.getCanvasHeight()),h=Math.floor(this._outerHeight),m=_/h,n=Math.floor(4*this._pixelRatio/2),t=[];for(let i=0,s=this._zones.length;i<s;i++){const r=this._zones[i];if(!w){const v=r.getColorZones();if(v){t.push(v);continue}}const c=this._getVerticalOffsetForLine(r.startLineNumber),g=r.heightInLines===0?this._getVerticalOffsetForLine(r.endLineNumber)+b:c+r.heightInLines*b,o=Math.floor(m*c),l=Math.floor(m*g);let a=Math.floor((o+l)/2),d=l-a;d<n&&(d=n),a-d<0&&(a=d),a+d>_&&(a=_-d);const u=r.color;let C=this._color2Id[u];C||(C=++this._lastAssignedId,this._color2Id[u]=C,this._id2Color[C]=u);const f=new S(a-d,a+d,C);r.setColorZone(f),t.push(f)}return this._colorZonesInvalid=!1,t.sort(S.compare),t}}e.OverviewZoneManager=y}),define(J[498],ee([1,0,35,267,137]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class D extends y.ViewEventHandler{constructor(b,_){super(),this._context=b;const h=this._context.configuration.options;this._domNode=(0,S.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(_),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new k.OverviewZoneManager(m=>this._context.viewLayout.getVerticalOffsetForLineNumber(m)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(h.get(64)),this._zoneManager.setPixelRatio(h.get(137)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(b){const _=this._context.configuration.options;return b.hasChanged(64)&&(this._zoneManager.setLineHeight(_.get(64)),this._render()),b.hasChanged(137)&&(this._zoneManager.setPixelRatio(_.get(137)),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(b){return this._render(),!0}onScrollChanged(b){return b.scrollHeightChanged&&(this._zoneManager.setOuterHeight(b.scrollHeight),this._render()),!0}onZonesChanged(b){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(b){this._domNode.setTop(b.top),this._domNode.setRight(b.right);let _=!1;_=this._zoneManager.setDOMWidth(b.width)||_,_=this._zoneManager.setDOMHeight(b.height)||_,_&&(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(b){this._zoneManager.setZones(b),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const b=this._zoneManager.getCanvasWidth(),_=this._zoneManager.getCanvasHeight(),h=this._zoneManager.resolveColorZones(),m=this._zoneManager.getId2Color(),n=this._domNode.domNode.getContext("2d");return n.clearRect(0,0,b,_),h.length>0&&this._renderOneLane(n,h,m,b),!0}_renderOneLane(b,_,h,m){let n=0,t=0,i=0;for(const s of _){const r=s.colorId,c=s.from,g=s.to;r!==n?(b.fillRect(0,t,m,i-t),n=r,b.fillStyle=h[n],t=c,i=g):i>=c?i=Math.max(i,g):(b.fillRect(0,t,m,i-t),t=c,i=g)}b.fillRect(0,t,m,i-t)}}e.OverviewRuler=D}),define(J[499],ee([1,0,459]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class k{constructor(D,w,b){this.configuration=D,this.theme=new S.EditorTheme(w),this.viewModel=b,this.viewLayout=b.viewLayout}addEventHandler(D){this.viewModel.addViewEventHandler(D)}removeEventHandler(D){this.viewModel.removeViewEventHandler(D)}}e.ViewContext=k}),define(J[500],ee([1,0,5,23]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class y{constructor(w,b){this._selection=w,this._isMovingLeft=b}getEditOperations(w,b){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const _=this._selection.startLineNumber,h=this._selection.startColumn,m=this._selection.endColumn;if(!(this._isMovingLeft&&h===1)&&!(!this._isMovingLeft&&m===w.getLineMaxColumn(_)))if(this._isMovingLeft){const n=new S.Range(_,h-1,_,h),t=w.getValueInRange(n);b.addEditOperation(n,null),b.addEditOperation(new S.Range(_,m,_,m),t)}else{const n=new S.Range(_,m,_,m+1),t=w.getValueInRange(n);b.addEditOperation(n,null),b.addEditOperation(new S.Range(_,h,_,h),t)}}computeCursorState(w,b){return this._isMovingLeft?new k.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new k.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=y}),define(J[107],ee([1,0,11]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionItem=e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionTriggerSource=e.CodeActionKind=void 0;class k{constructor(n){this.value=n}equals(n){return this.value===n.value}contains(n){return this.equals(n)||this.value===""||n.value.startsWith(this.value+k.sep)}intersects(n){return this.contains(n)||n.contains(this)}append(n){return new k(this.value+k.sep+n)}}k.sep=".",k.None=new k("@@none@@"),k.Empty=new k(""),k.QuickFix=new k("quickfix"),k.Refactor=new k("refactor"),k.RefactorExtract=k.Refactor.append("extract"),k.RefactorInline=k.Refactor.append("inline"),k.RefactorMove=k.Refactor.append("move"),k.RefactorRewrite=k.Refactor.append("rewrite"),k.Source=new k("source"),k.SourceOrganizeImports=k.Source.append("organizeImports"),k.SourceFixAll=k.Source.append("fixAll"),k.SurroundWith=k.Refactor.append("surround"),e.CodeActionKind=k;var y;(function(m){m.Refactor="refactor",m.RefactorPreview="refactor preview",m.Lightbulb="lightbulb",m.Default="other (default)",m.SourceAction="source action",m.QuickFix="quick fix action",m.FixAll="fix all",m.OrganizeImports="organize imports",m.AutoFix="auto fix",m.QuickFixHover="quick fix hover window",m.OnSave="save participants",m.ProblemsView="problems view"})(y=e.CodeActionTriggerSource||(e.CodeActionTriggerSource={}));function D(m,n){return!(m.include&&!m.include.intersects(n)||m.excludes&&m.excludes.some(t=>b(n,t,m.include))||!m.includeSourceActions&&k.Source.contains(n))}e.mayIncludeActionsOfKind=D;function w(m,n){const t=n.kind?new k(n.kind):void 0;return!(m.include&&(!t||!m.include.contains(t))||m.excludes&&t&&m.excludes.some(i=>b(t,i,m.include))||!m.includeSourceActions&&t&&k.Source.contains(t)||m.onlyIncludePreferredActions&&!n.isPreferred)}e.filtersAction=w;function b(m,n,t){return!(!n.contains(m)||t&&n.contains(t))}class _{static fromUser(n,t){return!n||typeof n!="object"?new _(t.kind,t.apply,!1):new _(_.getKindFromUser(n,t.kind),_.getApplyFromUser(n,t.apply),_.getPreferredUser(n))}static getApplyFromUser(n,t){switch(typeof n.apply=="string"?n.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(n,t){return typeof n.kind=="string"?new k(n.kind):t}static getPreferredUser(n){return typeof n.preferred=="boolean"?n.preferred:!1}constructor(n,t,i){this.kind=n,this.apply=t,this.preferred=i}}e.CodeActionCommandArgs=_;class h{constructor(n,t){this.action=n,this.provider=t}resolve(n){var t;return Ee(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,n)}catch(s){(0,S.onUnexpectedExternalError)(s)}i&&(this.action.edit=i.edit)}return this})}}e.CodeActionItem=h}),define(J[268],ee([1,0,64,13,5,23]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class w{constructor(_,h,m){this.languageConfigurationService=m,this._selection=_,this._insertSpace=h,this._usedEndToken=null}static _haystackHasNeedleAtOffset(_,h,m){if(m<0)return!1;const n=h.length,t=_.length;if(m+n>t)return!1;for(let i=0;i<n;i++){const s=_.charCodeAt(m+i),r=h.charCodeAt(i);if(s!==r&&!(s>=65&&s<=90&&s+32===r)&&!(r>=65&&r<=90&&r+32===s))return!1}return!0}_createOperationsForBlockComment(_,h,m,n,t,i){const s=_.startLineNumber,r=_.startColumn,c=_.endLineNumber,g=_.endColumn,o=t.getLineContent(s),l=t.getLineContent(c);let a=o.lastIndexOf(h,r-1+h.length),d=l.indexOf(m,g-1-m.length);if(a!==-1&&d!==-1)if(s===c)o.substring(a+h.length,d).indexOf(m)>=0&&(a=-1,d=-1);else{const C=o.substring(a+h.length),f=l.substring(0,d);(C.indexOf(m)>=0||f.indexOf(m)>=0)&&(a=-1,d=-1)}let u;a!==-1&&d!==-1?(n&&a+h.length<o.length&&o.charCodeAt(a+h.length)===32&&(h=h+" "),n&&d>0&&l.charCodeAt(d-1)===32&&(m=" "+m,d-=1),u=w._createRemoveBlockCommentOperations(new y.Range(s,a+h.length+1,c,d+1),h,m)):(u=w._createAddBlockCommentOperations(_,h,m,this._insertSpace),this._usedEndToken=u.length===1?m:null);for(const C of u)i.addTrackedEditOperation(C.range,C.text)}static _createRemoveBlockCommentOperations(_,h,m){const n=[];return y.Range.isEmpty(_)?n.push(S.EditOperation.delete(new y.Range(_.startLineNumber,_.startColumn-h.length,_.endLineNumber,_.endColumn+m.length))):(n.push(S.EditOperation.delete(new y.Range(_.startLineNumber,_.startColumn-h.length,_.startLineNumber,_.startColumn))),n.push(S.EditOperation.delete(new y.Range(_.endLineNumber,_.endColumn,_.endLineNumber,_.endColumn+m.length)))),n}static _createAddBlockCommentOperations(_,h,m,n){const t=[];return y.Range.isEmpty(_)?t.push(S.EditOperation.replace(new y.Range(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn),h+" "+m)):(t.push(S.EditOperation.insert(new k.Position(_.startLineNumber,_.startColumn),h+(n?" ":""))),t.push(S.EditOperation.insert(new k.Position(_.endLineNumber,_.endColumn),(n?" ":"")+m))),t}getEditOperations(_,h){const m=this._selection.startLineNumber,n=this._selection.startColumn;_.tokenization.tokenizeIfCheap(m);const t=_.getLanguageIdAtPosition(m,n),i=this.languageConfigurationService.getLanguageConfiguration(t).comments;!i||!i.blockCommentStartToken||!i.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,i.blockCommentStartToken,i.blockCommentEndToken,this._insertSpace,_,h)}computeCursorState(_,h){const m=h.getInverseEditOperations();if(m.length===2){const n=m[0],t=m[1];return new D.Selection(n.range.endLineNumber,n.range.endColumn,t.range.startLineNumber,t.range.startColumn)}else{const n=m[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new D.Selection(n.endLineNumber,n.endColumn+t,n.endLineNumber,n.endColumn+t)}}}e.BlockCommentCommand=w}),define(J[501],ee([1,0,9,64,13,5,23,268]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class _{constructor(m,n,t,i,s,r,c){this.languageConfigurationService=m,this._selection=n,this._tabSize=t,this._type=i,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=c||!1}static _gatherPreflightCommentStrings(m,n,t,i){m.tokenization.tokenizeIfCheap(n);const s=m.getLanguageIdAtPosition(n,1),r=i.getLanguageConfiguration(s).comments,c=r?r.lineCommentToken:null;if(!c)return null;const g=[];for(let o=0,l=t-n+1;o<l;o++)g[o]={ignore:!1,commentStr:c,commentStrOffset:0,commentStrLength:c.length};return g}static _analyzeLines(m,n,t,i,s,r,c,g){let o=!0,l;m===0?l=!0:m===1?l=!1:l=!0;for(let a=0,d=i.length;a<d;a++){const u=i[a],C=s+a;if(C===s&&c){u.ignore=!0;continue}const f=t.getLineContent(C),v=S.firstNonWhitespaceIndex(f);if(v===-1){u.ignore=r,u.commentStrOffset=f.length;continue}if(o=!1,u.ignore=!1,u.commentStrOffset=v,l&&!b.BlockCommentCommand._haystackHasNeedleAtOffset(f,u.commentStr,v)&&(m===0?l=!1:m===1||(u.ignore=!0)),l&&n){const p=v+u.commentStrLength;p<f.length&&f.charCodeAt(p)===32&&(u.commentStrLength+=1)}}if(m===0&&o){l=!1;for(let a=0,d=i.length;a<d;a++)i[a].ignore=!1}return{supported:!0,shouldRemoveComments:l,lines:i}}static _gatherPreflightData(m,n,t,i,s,r,c,g){const o=_._gatherPreflightCommentStrings(t,i,s,g);return o===null?{supported:!1}:_._analyzeLines(m,n,t,o,i,r,c,g)}_executeLineComments(m,n,t,i){let s;t.shouldRemoveComments?s=_._createRemoveLineCommentsOperations(t.lines,i.startLineNumber):(_._normalizeInsertionPoint(m,t.lines,i.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(t.lines,i.startLineNumber));const r=new y.Position(i.positionLineNumber,i.positionColumn);for(let c=0,g=s.length;c<g;c++)n.addEditOperation(s[c].range,s[c].text),D.Range.isEmpty(s[c].range)&&D.Range.getStartPosition(s[c].range).equals(r)&&m.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(s[c].text||"").length);this._selectionId=n.trackSelection(i)}_attemptRemoveBlockComment(m,n,t,i){let s=n.startLineNumber,r=n.endLineNumber;const c=i.length+Math.max(m.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.startColumn);let g=m.getLineContent(s).lastIndexOf(t,c-1),o=m.getLineContent(r).indexOf(i,n.endColumn-1-t.length);return g!==-1&&o===-1&&(o=m.getLineContent(s).indexOf(i,g+t.length),r=s),g===-1&&o!==-1&&(g=m.getLineContent(r).lastIndexOf(t,o),s=r),n.isEmpty()&&(g===-1||o===-1)&&(g=m.getLineContent(s).indexOf(t),g!==-1&&(o=m.getLineContent(s).indexOf(i,g+t.length))),g!==-1&&m.getLineContent(s).charCodeAt(g+t.length)===32&&(t+=" "),o!==-1&&m.getLineContent(r).charCodeAt(o-1)===32&&(i=" "+i,o-=1),g!==-1&&o!==-1?b.BlockCommentCommand._createRemoveBlockCommentOperations(new D.Range(s,g+t.length+1,r,o+1),t,i):null}_executeBlockComment(m,n,t){m.tokenization.tokenizeIfCheap(t.startLineNumber);const i=m.getLanguageIdAtPosition(t.startLineNumber,1),s=this.languageConfigurationService.getLanguageConfiguration(i).comments;if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const r=s.blockCommentStartToken,c=s.blockCommentEndToken;let g=this._attemptRemoveBlockComment(m,t,r,c);if(!g){if(t.isEmpty()){const o=m.getLineContent(t.startLineNumber);let l=S.firstNonWhitespaceIndex(o);l===-1&&(l=o.length),g=b.BlockCommentCommand._createAddBlockCommentOperations(new D.Range(t.startLineNumber,l+1,t.startLineNumber,o.length+1),r,c,this._insertSpace)}else g=b.BlockCommentCommand._createAddBlockCommentOperations(new D.Range(t.startLineNumber,m.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.endLineNumber,m.getLineMaxColumn(t.endLineNumber)),r,c,this._insertSpace);g.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=n.trackSelection(t);for(const o of g)n.addEditOperation(o.range,o.text)}getEditOperations(m,n){let t=this._selection;if(this._moveEndPositionDown=!1,t.startLineNumber===t.endLineNumber&&this._ignoreFirstLine){n.addEditOperation(new D.Range(t.startLineNumber,m.getLineMaxColumn(t.startLineNumber),t.startLineNumber+1,1),t.startLineNumber===m.getLineCount()?"":`\n`),this._selectionId=n.trackSelection(t);return}t.startLineNumber<t.endLineNumber&&t.endColumn===1&&(this._moveEndPositionDown=!0,t=t.setEndPosition(t.endLineNumber-1,m.getLineMaxColumn(t.endLineNumber-1)));const i=_._gatherPreflightData(this._type,this._insertSpace,m,t.startLineNumber,t.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return i.supported?this._executeLineComments(m,n,i,t):this._executeBlockComment(m,n,t)}computeCursorState(m,n){let t=n.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(t=t.setEndPosition(t.endLineNumber+1,1)),new w.Selection(t.selectionStartLineNumber,t.selectionStartColumn+this._deltaColumn,t.positionLineNumber,t.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(m,n){const t=[];for(let i=0,s=m.length;i<s;i++){const r=m[i];r.ignore||t.push(k.EditOperation.delete(new D.Range(n+i,r.commentStrOffset+1,n+i,r.commentStrOffset+r.commentStrLength+1)))}return t}_createAddLineCommentsOperations(m,n){const t=[],i=this._insertSpace?" ":"";for(let s=0,r=m.length;s<r;s++){const c=m[s];c.ignore||t.push(k.EditOperation.insert(new y.Position(n+s,c.commentStrOffset+1),c.commentStr+i))}return t}static nextVisibleColumn(m,n,t,i){return t?m+(n-m%n):m+i}static _normalizeInsertionPoint(m,n,t,i){let s=1073741824,r,c;for(let g=0,o=n.length;g<o;g++){if(n[g].ignore)continue;const l=m.getLineContent(t+g);let a=0;for(let d=0,u=n[g].commentStrOffset;a<s&&d<u;d++)a=_.nextVisibleColumn(a,i,l.charCodeAt(d)===9,1);a<s&&(s=a)}s=Math.floor(s/i)*i;for(let g=0,o=n.length;g<o;g++){if(n[g].ignore)continue;const l=m.getLineContent(t+g);let a=0;for(r=0,c=n[g].commentStrOffset;a<s&&r<c;r++)a=_.nextVisibleColumn(a,i,l.charCodeAt(r)===9,1);a>s?n[g].commentStrOffset=r-1:n[g].commentStrOffset=r}}}e.LineCommentCommand=_}),define(J[502],ee([1,0,5,23]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class y{constructor(w,b,_){this.selection=w,this.targetPosition=b,this.copy=_,this.targetSelection=null}getEditOperations(w,b){const _=w.getValueInRange(this.selection);if(this.copy||b.addEditOperation(this.selection,null),b.addEditOperation(new S.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),_),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 k.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 k.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 k.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 k.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 k.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(w,b){return this.targetSelection}}e.DragAndDropCommand=y}),define(J[503],ee([1,0,5]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class k{constructor(D,w,b){this._editorSelection=D,this._ranges=w,this._replaceStrings=b,this._trackedEditorSelectionId=null}getEditOperations(D,w){if(this._ranges.length>0){const b=[];for(let m=0;m<this._ranges.length;m++)b.push({range:this._ranges[m],text:this._replaceStrings[m]});b.sort((m,n)=>S.Range.compareRangesUsingStarts(m.range,n.range));const _=[];let h=b[0];for(let m=1;m<b.length;m++)h.range.endLineNumber===b[m].range.startLineNumber&&h.range.endColumn===b[m].range.startColumn?(h.range=h.range.plusRange(b[m].range),h.text=h.text+b[m].text):(_.push(h),h=b[m]);_.push(h);for(const m of _)w.addEditOperation(m.range,m.text)}this._trackedEditorSelectionId=w.trackSelection(this._editorSelection)}computeCursorState(D,w){return w.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=k}),define(J[504],ee([1,0,360]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;class k{constructor(m){this.staticValue=m,this.kind=0}}class y{constructor(m){this.pieces=m,this.kind=1}}class D{static fromStaticValue(m){return new D([w.staticValue(m)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(m){!m||m.length===0?this._state=new k(""):m.length===1&&m[0].staticValue!==null?this._state=new k(m[0].staticValue):this._state=new y(m)}buildReplaceString(m,n){if(this._state.kind===0)return n?(0,S.buildReplaceStringWithCasePreserved)(m,this._state.staticValue):this._state.staticValue;let t="";for(let i=0,s=this._state.pieces.length;i<s;i++){const r=this._state.pieces[i];if(r.staticValue!==null){t+=r.staticValue;continue}let c=D._substitute(r.matchIndex,m);if(r.caseOps!==null&&r.caseOps.length>0){const g=[],o=r.caseOps.length;let l=0;for(let a=0,d=c.length;a<d;a++){if(l>=o){g.push(c.slice(a));break}switch(r.caseOps[l]){case"U":g.push(c[a].toUpperCase());break;case"u":g.push(c[a].toUpperCase()),l++;break;case"L":g.push(c[a].toLowerCase());break;case"l":g.push(c[a].toLowerCase()),l++;break;default:g.push(c[a])}}c=g.join("")}t+=c}return t}static _substitute(m,n){if(n===null)return"";if(m===0)return n[0];let t="";for(;m>0;){if(m<n.length)return(n[m]||"")+t;t=String(m%10)+t,m=Math.floor(m/10)}return"$"+t}}e.ReplacePattern=D;class w{static staticValue(m){return new w(m,-1,null)}static caseOps(m,n){return new w(null,m,n)}constructor(m,n,t){this.staticValue=m,this.matchIndex=n,!t||t.length===0?this.caseOps=null:this.caseOps=t.slice(0)}}e.ReplacePiece=w;class b{constructor(m){this._source=m,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(m){this._emitStatic(this._source.substring(this._lastCharIndex,m)),this._lastCharIndex=m}emitStatic(m,n){this._emitStatic(m),this._lastCharIndex=n}_emitStatic(m){m.length!==0&&(this._currentStaticPiece+=m)}emitMatchIndex(m,n,t){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=w.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=w.caseOps(m,t),this._lastCharIndex=n}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=w.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new D(this._result)}}function _(h){if(!h||h.length===0)return new D(null);const m=[],n=new b(h);for(let t=0,i=h.length;t<i;t++){const s=h.charCodeAt(t);if(s===92){if(t++,t>=i)break;const r=h.charCodeAt(t);switch(r){case 92:n.emitUnchanged(t-1),n.emitStatic("\\\\",t+1);break;case 110:n.emitUnchanged(t-1),n.emitStatic(`\n`,t+1);break;case 116:n.emitUnchanged(t-1),n.emitStatic("\t",t+1);break;case 117:case 85:case 108:case 76:n.emitUnchanged(t-1),n.emitStatic("",t+1),m.push(String.fromCharCode(r));break}continue}if(s===36){if(t++,t>=i)break;const r=h.charCodeAt(t);if(r===36){n.emitUnchanged(t-1),n.emitStatic("$",t+1);continue}if(r===48||r===38){n.emitUnchanged(t-1),n.emitMatchIndex(0,t+1,m),m.length=0;continue}if(49<=r&&r<=57){let c=r-48;if(t+1<i){const g=h.charCodeAt(t+1);if(48<=g&&g<=57){t++,c=c*10+(g-48),n.emitUnchanged(t-2),n.emitMatchIndex(c,t+1,m),m.length=0;continue}}n.emitUnchanged(t-1),n.emitMatchIndex(c,t+1,m),m.length=0;continue}}}return n.finalize()}e.parseReplaceString=_}),define(J[171],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRegion=e.FoldingRegions=e.MAX_LINE_NUMBER=e.MAX_FOLDING_REGIONS=e.foldSourceAbbr=void 0,e.foldSourceAbbr={[0]:" ",[1]:"u",[2]:"r"},e.MAX_FOLDING_REGIONS=65535,e.MAX_LINE_NUMBER=16777215;const S=4278190080;class k{constructor(b){const _=Math.ceil(b/32);this._states=new Uint32Array(_)}get(b){const _=b/32|0,h=b%32;return(this._states[_]&1<<h)!==0}set(b,_){const h=b/32|0,m=b%32,n=this._states[h];_?this._states[h]=n|1<<m:this._states[h]=n&~(1<<m)}}class y{constructor(b,_,h){if(b.length!==_.length||b.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=b,this._endIndexes=_,this._collapseStates=new k(b.length),this._userDefinedStates=new k(b.length),this._recoveredStates=new k(b.length),this._types=h,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const b=[],_=(h,m)=>{const n=b[b.length-1];return this.getStartLineNumber(n)<=h&&this.getEndLineNumber(n)>=m};for(let h=0,m=this._startIndexes.length;h<m;h++){const n=this._startIndexes[h],t=this._endIndexes[h];if(n>e.MAX_LINE_NUMBER||t>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;b.length>0&&!_(n,t);)b.pop();const i=b.length>0?b[b.length-1]:-1;b.push(h),this._startIndexes[h]=n+((i&255)<<24),this._endIndexes[h]=t+((i&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(b){return this._startIndexes[b]&e.MAX_LINE_NUMBER}getEndLineNumber(b){return this._endIndexes[b]&e.MAX_LINE_NUMBER}getType(b){return this._types?this._types[b]:void 0}hasTypes(){return!!this._types}isCollapsed(b){return this._collapseStates.get(b)}setCollapsed(b,_){this._collapseStates.set(b,_)}isUserDefined(b){return this._userDefinedStates.get(b)}setUserDefined(b,_){return this._userDefinedStates.set(b,_)}isRecovered(b){return this._recoveredStates.get(b)}setRecovered(b,_){return this._recoveredStates.set(b,_)}getSource(b){return this.isUserDefined(b)?1:this.isRecovered(b)?2:0}setSource(b,_){_===1?(this.setUserDefined(b,!0),this.setRecovered(b,!1)):_===2?(this.setUserDefined(b,!1),this.setRecovered(b,!0)):(this.setUserDefined(b,!1),this.setRecovered(b,!1))}setCollapsedAllOfType(b,_){let h=!1;if(this._types)for(let m=0;m<this._types.length;m++)this._types[m]===b&&(this.setCollapsed(m,_),h=!0);return h}toRegion(b){return new D(this,b)}getParentIndex(b){this.ensureParentIndices();const _=((this._startIndexes[b]&S)>>>24)+((this._endIndexes[b]&S)>>>16);return _===e.MAX_FOLDING_REGIONS?-1:_}contains(b,_){return this.getStartLineNumber(b)<=_&&this.getEndLineNumber(b)>=_}findIndex(b){let _=0,h=this._startIndexes.length;if(h===0)return-1;for(;_<h;){const m=Math.floor((_+h)/2);b<this.getStartLineNumber(m)?h=m:_=m+1}return _-1}findRange(b){let _=this.findIndex(b);if(_>=0){if(this.getEndLineNumber(_)>=b)return _;for(_=this.getParentIndex(_);_!==-1;){if(this.contains(_,b))return _;_=this.getParentIndex(_)}}return-1}toString(){const b=[];for(let _=0;_<this.length;_++)b[_]=`[${e.foldSourceAbbr[this.getSource(_)]}${this.isCollapsed(_)?"+":"-"}] ${this.getStartLineNumber(_)}/${this.getEndLineNumber(_)}`;return b.join(", ")}toFoldRange(b){return{startLineNumber:this._startIndexes[b]&e.MAX_LINE_NUMBER,endLineNumber:this._endIndexes[b]&e.MAX_LINE_NUMBER,type:this._types?this._types[b]:void 0,isCollapsed:this.isCollapsed(b),source:this.getSource(b)}}static fromFoldRanges(b){const _=b.length,h=new Uint32Array(_),m=new Uint32Array(_);let n=[],t=!1;for(let s=0;s<_;s++){const r=b[s];h[s]=r.startLineNumber,m[s]=r.endLineNumber,n.push(r.type),r.type&&(t=!0)}t||(n=void 0);const i=new y(h,m,n);for(let s=0;s<_;s++)b[s].isCollapsed&&i.setCollapsed(s,!0),i.setSource(s,b[s].source);return i}static sanitizeAndMerge(b,_,h){h=h??Number.MAX_VALUE;const m=(d,u)=>Array.isArray(d)?C=>C<u?d[C]:void 0:C=>C<u?d.toFoldRange(C):void 0,n=m(b,b.length),t=m(_,_.length);let i=0,s=0,r=n(0),c=t(0);const g=[];let o,l=0;const a=[];for(;r||c;){let d;if(c&&(!r||r.startLineNumber>=c.startLineNumber))r&&r.startLineNumber===c.startLineNumber?(c.source===1?d=c:(d=r,d.isCollapsed=c.isCollapsed&&r.endLineNumber===c.endLineNumber,d.source=0),r=n(++i)):(d=c,c.isCollapsed&&c.source===0&&(d.source=2)),c=t(++s);else{let u=s,C=c;for(;;){if(!C||C.startLineNumber>r.endLineNumber){d=r;break}if(C.source===1&&C.endLineNumber>r.endLineNumber)break;C=t(++u)}r=n(++i)}if(d){for(;o&&o.endLineNumber<d.startLineNumber;)o=g.pop();d.endLineNumber>d.startLineNumber&&d.startLineNumber>l&&d.endLineNumber<=h&&(!o||o.endLineNumber>=d.endLineNumber)&&(a.push(d),l=d.startLineNumber,o&&g.push(o),o=d)}}return a}}e.FoldingRegions=y;class D{constructor(b,_){this.ranges=b,this.index=_}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(b){return b.startLineNumber<=this.startLineNumber&&b.endLineNumber>=this.endLineNumber}containsLine(b){return this.startLineNumber<=b&&b<=this.endLineNumber}}e.FoldingRegion=D}),define(J[269],ee([1,0,193,171]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=void 0;const y=5e3,D="indent";class w{constructor(n,t,i){this.editorModel=n,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id=D}dispose(){}compute(n){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,s=t&&t.markers;return Promise.resolve(h(this.editorModel,i,s,this.foldingRangesLimit))}}e.IndentRangeProvider=w;class b{constructor(n){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=n}insertFirst(n,t,i){if(n>k.MAX_LINE_NUMBER||t>k.MAX_LINE_NUMBER)return;const s=this._length;this._startIndexes[s]=n,this._endIndexes[s]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(n){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let r=this._length-1,c=0;r>=0;r--,c++)i[c]=this._startIndexes[r],s[c]=this._endIndexes[r];return new k.FoldingRegions(i,s)}else{this._foldingRangesLimit.update(this._length,t);let i=0,s=this._indentOccurrences.length;for(let o=0;o<this._indentOccurrences.length;o++){const l=this._indentOccurrences[o];if(l){if(l+i>t){s=o;break}i+=l}}const r=n.getOptions().tabSize,c=new Uint32Array(t),g=new Uint32Array(t);for(let o=this._length-1,l=0;o>=0;o--){const a=this._startIndexes[o],d=n.getLineContent(a),u=(0,S.computeIndentLevel)(d,r);(u<s||u===s&&i++<t)&&(c[l]=a,g[l]=this._endIndexes[o],l++)}return new k.FoldingRegions(c,g)}}}e.RangesCollector=b;const _={limit:y,update:()=>{}};function h(m,n,t,i=_){const s=m.getOptions().tabSize,r=new b(i);let c;t&&(c=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const g=[],o=m.getLineCount()+1;g.push({indent:-1,endAbove:o,line:o});for(let l=m.getLineCount();l>0;l--){const a=m.getLineContent(l),d=(0,S.computeIndentLevel)(a,s);let u=g[g.length-1];if(d===-1){n&&(u.endAbove=l);continue}let C;if(c&&(C=a.match(c)))if(C[1]){let f=g.length-1;for(;f>0&&g[f].indent!==-2;)f--;if(f>0){g.length=f+1,u=g[f],r.insertFirst(l,u.line,d),u.line=l,u.indent=d,u.endAbove=l;continue}}else{g.push({indent:-2,endAbove:l,line:l});continue}if(u.indent>d){do g.pop(),u=g[g.length-1];while(u.indent>d);const f=u.endAbove-1;f-l>=1&&r.insertFirst(l,f,d)}u.indent===d?u.endAbove=l:g.push({indent:d,endAbove:l,line:l})}return r.toIndentRanges(m)}e.computeRanges=h}),define(J[270],ee([1,0,11,2,171]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.SyntaxRangeProvider=void 0;const D={},w="syntax";class b{constructor(t,i,s,r,c){this.editorModel=t,this.providers=i,this.handleFoldingRangesChange=s,this.foldingRangesLimit=r,this.fallbackRangeProvider=c,this.id=w,this.disposables=new k.DisposableStore,c&&this.disposables.add(c);for(const g of i)typeof g.onDidChange=="function"&&this.disposables.add(g.onDidChange(s))}compute(t){return _(this.providers,this.editorModel,t).then(i=>{var s,r;return i?m(i,this.foldingRangesLimit):(r=(s=this.fallbackRangeProvider)===null||s===void 0?void 0:s.compute(t))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}}e.SyntaxRangeProvider=b;function _(n,t,i){let s=null;const r=n.map((c,g)=>Promise.resolve(c.provideFoldingRanges(t,D,i)).then(o=>{if(!i.isCancellationRequested&&Array.isArray(o)){Array.isArray(s)||(s=[]);const l=t.getLineCount();for(const a of o)a.start>0&&a.end>a.start&&a.end<=l&&s.push({start:a.start,end:a.end,rank:g,kind:a.kind})}},S.onUnexpectedExternalError));return Promise.all(r).then(c=>s)}class h{constructor(t){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=t}add(t,i,s,r){if(t>y.MAX_LINE_NUMBER||i>y.MAX_LINE_NUMBER)return;const c=this._length;this._startIndexes[c]=t,this._endIndexes[c]=i,this._nestingLevels[c]=r,this._types[c]=s,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let r=0;r<this._length;r++)i[r]=this._startIndexes[r],s[r]=this._endIndexes[r];return new y.FoldingRegions(i,s,this._types)}else{this._foldingRangesLimit.update(this._length,t);let i=0,s=this._nestingLevelCounts.length;for(let o=0;o<this._nestingLevelCounts.length;o++){const l=this._nestingLevelCounts[o];if(l){if(l+i>t){s=o;break}i+=l}}const r=new Uint32Array(t),c=new Uint32Array(t),g=[];for(let o=0,l=0;o<this._length;o++){const a=this._nestingLevels[o];(a<s||a===s&&i++<t)&&(r[l]=this._startIndexes[o],c[l]=this._endIndexes[o],g[l]=this._types[o],l++)}return new y.FoldingRegions(r,c,g)}}}function m(n,t){const i=n.sort((g,o)=>{let l=g.start-o.start;return l===0&&(l=g.rank-o.rank),l}),s=new h(t);let r;const c=[];for(const g of i)if(!r)r=g,s.add(g.start,g.end,g.kind&&g.kind.value,c.length);else if(g.start>r.start)if(g.end<=r.end)c.push(r),r=g,s.add(g.start,g.end,g.kind&&g.kind.value,c.length);else{if(g.start>r.end){do r=c.pop();while(r&&g.start>r.end);r&&c.push(r),r=g}s.add(g.start,g.end,g.kind&&g.kind.value,c.length)}return s.toIndentRanges()}e.sanitizeRanges=m}),define(J[271],ee([1,0,64,5,114]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class D{static _handleEolEdits(b,_){let h;const m=[];for(const n of _)typeof n.eol=="number"&&(h=n.eol),n.range&&typeof n.text=="string"&&m.push(n);return typeof h=="number"&&b.hasModel()&&b.getModel().pushEOL(h),m}static _isFullModelReplaceEdit(b,_){if(!b.hasModel())return!1;const h=b.getModel(),m=h.validateRange(_.range);return h.getFullModelRange().equalsRange(m)}static execute(b,_,h){h&&b.pushUndoStop();const m=y.StableEditorScrollState.capture(b),n=D._handleEolEdits(b,_);n.length===1&&D._isFullModelReplaceEdit(b,n[0])?b.executeEdits("formatEditsCommand",n.map(t=>S.EditOperation.replace(k.Range.lift(t.range),t.text))):b.executeEdits("formatEditsCommand",n.map(t=>S.EditOperation.replaceMove(k.Range.lift(t.range),t.text))),h&&b.pushUndoStop(),m.restoreRelativeVerticalPositionOfCursor(b)}}e.FormattingEdit=D}),define(J[93],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class S{constructor(D,w,b,_){this.priority=D,this.range=w,this.initialMousePosX=b,this.initialMousePosY=_,this.type=1}equals(D){return D.type===1&&this.range.equalsRange(D.range)}canAdoptVisibleHover(D,w){return D.type===1&&w.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=S;class k{constructor(D,w,b,_,h,m){this.priority=D,this.owner=w,this.range=b,this.initialMousePosX=_,this.initialMousePosY=h,this.supportsMarkerHover=m,this.type=2}equals(D){return D.type===2&&this.owner===D.owner}canAdoptVisibleHover(D,w){return D.type===2&&this.owner===D.owner}}e.HoverForeignElementAnchor=k,e.HoverParticipantRegistry=new class{constructor(){this._participants=[]}register(D){this._participants.push(D)}getAll(){return this._participants}}}),define(J[505],ee([1,0,23]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class k{constructor(D,w,b){this._editRange=D,this._originalSelection=w,this._text=b}getEditOperations(D,w){w.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(D,w){const _=w.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new S.Selection(_.endLineNumber,Math.min(this._originalSelection.positionColumn,_.endColumn),_.endLineNumber,Math.min(this._originalSelection.positionColumn,_.endColumn)):new S.Selection(_.endLineNumber,_.endColumn-this._text.length,_.endLineNumber,_.endColumn)}}e.InPlaceReplaceCommand=k}),define(J[272],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function S(y,D){let w=0;for(let b=0;b<y.length;b++)y.charAt(b)==="\t"?w+=D:w++;return w}e.getSpaceCnt=S;function k(y,D,w){y=y<0?0:y;let b="";if(!w){const _=Math.floor(y/D);y=y%D;for(let h=0;h<_;h++)b+="\t"}for(let _=0;_<y;_++)b+=" ";return b}e.generateIndent=k}),define(J[198],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showNextInlineSuggestionActionId=e.showPreviousInlineSuggestionActionId=e.inlineSuggestCommitId=void 0,e.inlineSuggestCommitId="editor.action.inlineSuggest.commit",e.showPreviousInlineSuggestionActionId="editor.action.inlineSuggest.showPrevious",e.showNextInlineSuggestionActionId="editor.action.inlineSuggest.showNext"}),define(J[199],ee([1,0,5]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReadonlyEmptyArray=e.applyEdits=e.createDisposableRef=void 0;function k(_,h){return{object:_,dispose:()=>h?.dispose()}}e.createDisposableRef=k;function y(_,h){const m=new D(_),n=h.map(t=>{const i=S.Range.lift(t.range);return{startOffset:m.getOffset(i.getStartPosition()),endOffset:m.getOffset(i.getEndPosition()),text:t.text}});n.sort((t,i)=>i.startOffset-t.startOffset);for(const t of n)_=_.substring(0,t.startOffset)+t.text+_.substring(t.endOffset);return _}e.applyEdits=y;class D{constructor(h){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let m=0;m<h.length;m++)h.charAt(m)===`\n`&&this.lineStartOffsetByLineIdx.push(m+1)}getOffset(h){return this.lineStartOffsetByLineIdx[h.lineNumber-1]+h.column-1}}const w=[];function b(){return w}e.getReadonlyEmptyArray=b}),define(J[506],ee([1,0,5,23]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class y{constructor(w,b,_){this._selection=w,this._isCopyingDown=b,this._noop=_||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(w,b){let _=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,_.startLineNumber<_.endLineNumber&&_.endColumn===1&&(this._endLineNumberDelta=1,_=_.setEndPosition(_.endLineNumber-1,w.getLineMaxColumn(_.endLineNumber-1)));const h=[];for(let n=_.startLineNumber;n<=_.endLineNumber;n++)h.push(w.getLineContent(n));const m=h.join(`\n`);m===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?b.addEditOperation(new S.Range(_.endLineNumber,w.getLineMaxColumn(_.endLineNumber),_.endLineNumber+1,1),_.endLineNumber===w.getLineCount()?"":`\n`):this._isCopyingDown?b.addEditOperation(new S.Range(_.startLineNumber,1,_.startLineNumber,1),m+`\n`):b.addEditOperation(new S.Range(_.endLineNumber,w.getLineMaxColumn(_.endLineNumber),_.endLineNumber,w.getLineMaxColumn(_.endLineNumber)),`\n`+m),this._selectionId=b.trackSelection(_),this._selectionDirection=this._selection.getDirection()}computeCursorState(w,b){let _=b.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let h=_.startLineNumber,m=_.startColumn,n=_.endLineNumber,t=_.endColumn;this._startLineNumberDelta!==0&&(h=h+this._startLineNumberDelta,m=1),this._endLineNumberDelta!==0&&(n=n+this._endLineNumberDelta,t=1),_=k.Selection.createWithDirection(h,m,n,t,this._selectionDirection)}return _}}e.CopyLinesCommand=y}),define(J[507],ee([1,0,64,5]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class y{static getCollator(){return y._COLLATOR||(y._COLLATOR=new Intl.Collator),y._COLLATOR}constructor(_,h){this.selection=_,this.descending=h,this.selectionId=null}getEditOperations(_,h){const m=w(_,this.selection,this.descending);m&&h.addEditOperation(m.range,m.text),this.selectionId=h.trackSelection(this.selection)}computeCursorState(_,h){return h.getTrackedSelection(this.selectionId)}static canRun(_,h,m){if(_===null)return!1;const n=D(_,h,m);if(!n)return!1;for(let t=0,i=n.before.length;t<i;t++)if(n.before[t]!==n.after[t])return!0;return!1}}y._COLLATOR=null,e.SortLinesCommand=y;function D(b,_,h){const m=_.startLineNumber;let n=_.endLineNumber;if(_.endColumn===1&&n--,m>=n)return null;const t=[];for(let s=m;s<=n;s++)t.push(b.getLineContent(s));let i=t.slice(0);return i.sort(y.getCollator().compare),h===!0&&(i=i.reverse()),{startLineNumber:m,endLineNumber:n,before:t,after:i}}function w(b,_,h){const m=D(b,_,h);return m?S.EditOperation.replace(new k.Range(m.startLineNumber,1,m.endLineNumber,b.getLineMaxColumn(m.endLineNumber)),m.after.join(`\n`)):null}}),define(J[273],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=void 0,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function S(k,y,D){var w;const b=(w=D.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:k.getLanguageId(),resource:k.uri}))===null||w===void 0?void 0:w.enabled;return typeof b=="boolean"?b:y.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=S}),define(J[274],ee([1,0,59,13,5]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class D{provideSelectionRanges(b,_){return Ee(this,void 0,void 0,function*(){const h=[];for(const m of _){const n=[];h.push(n);const t=new Map;yield new Promise(i=>D._bracketsRightYield(i,0,b,m,t)),yield new Promise(i=>D._bracketsLeftYield(i,0,b,m,t,n))}return h})}static _bracketsRightYield(b,_,h,m,n){const t=new Map,i=Date.now();for(;;){if(_>=D._maxRounds){b();break}if(!m){b();break}const s=h.bracketPairs.findNextBracket(m);if(!s){b();break}if(Date.now()-i>D._maxDuration){setTimeout(()=>D._bracketsRightYield(b,_+1,h,m,n));break}if(s.bracketInfo.isOpeningBracket){const c=s.bracketInfo.bracketText,g=t.has(c)?t.get(c):0;t.set(c,g+1)}else{const c=s.bracketInfo.getOpeningBrackets()[0].bracketText;let g=t.has(c)?t.get(c):0;if(g-=1,t.set(c,Math.max(0,g)),g<0){let o=n.get(c);o||(o=new S.LinkedList,n.set(c,o)),o.push(s.range)}}m=s.range.getEndPosition()}}static _bracketsLeftYield(b,_,h,m,n,t){const i=new Map,s=Date.now();for(;;){if(_>=D._maxRounds&&n.size===0){b();break}if(!m){b();break}const r=h.bracketPairs.findPrevBracket(m);if(!r){b();break}if(Date.now()-s>D._maxDuration){setTimeout(()=>D._bracketsLeftYield(b,_+1,h,m,n,t));break}if(r.bracketInfo.isOpeningBracket){const g=r.bracketInfo.bracketText;let o=i.has(g)?i.get(g):0;if(o-=1,i.set(g,Math.max(0,o)),o<0){const l=n.get(g);if(l){const a=l.shift();l.size===0&&n.delete(g);const d=y.Range.fromPositions(r.range.getEndPosition(),a.getStartPosition()),u=y.Range.fromPositions(r.range.getStartPosition(),a.getEndPosition());t.push({range:d}),t.push({range:u}),D._addBracketLeading(h,u,t)}}}else{const g=r.bracketInfo.getOpeningBrackets()[0].bracketText,o=i.has(g)?i.get(g):0;i.set(g,o+1)}m=r.range.getStartPosition()}}static _addBracketLeading(b,_,h){if(_.startLineNumber===_.endLineNumber)return;const m=_.startLineNumber,n=b.getLineFirstNonWhitespaceColumn(m);n!==0&&n!==_.startColumn&&(h.push({range:y.Range.fromPositions(new k.Position(m,n),_.getEndPosition())}),h.push({range:y.Range.fromPositions(new k.Position(m,1),_.getEndPosition())}));const t=m-1;if(t>0){const i=b.getLineFirstNonWhitespaceColumn(t);i===_.startColumn&&i!==b.getLineLastNonWhitespaceColumn(t)&&(h.push({range:y.Range.fromPositions(new k.Position(t,i),_.getEndPosition())}),h.push({range:y.Range.fromPositions(new k.Position(t,1),_.getEndPosition())}))}}}D._maxDuration=30,D._maxRounds=2,e.BracketSelectionRangeProvider=D}),define(J[508],ee([1,0,9,5]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class y{provideSelectionRanges(w,b){const _=[];for(const h of b){const m=[];_.push(m),this._addInWordRanges(m,w,h),this._addWordRanges(m,w,h),this._addWhitespaceLine(m,w,h),m.push({range:w.getFullModelRange()})}return _}_addInWordRanges(w,b,_){const h=b.getWordAtPosition(_);if(!h)return;const{word:m,startColumn:n}=h,t=_.column-n;let i=t,s=t,r=0;for(;i>=0;i--){const c=m.charCodeAt(i);if(i!==t&&(c===95||c===45))break;if((0,S.isLowerAsciiLetter)(c)&&(0,S.isUpperAsciiLetter)(r))break;r=c}for(i+=1;s<m.length;s++){const c=m.charCodeAt(s);if((0,S.isUpperAsciiLetter)(c)&&(0,S.isLowerAsciiLetter)(r))break;if(c===95||c===45)break;r=c}i<s&&w.push({range:new k.Range(_.lineNumber,n+i,_.lineNumber,n+s)})}_addWordRanges(w,b,_){const h=b.getWordAtPosition(_);h&&w.push({range:new k.Range(_.lineNumber,h.startColumn,_.lineNumber,h.endColumn)})}_addWhitespaceLine(w,b,_){b.getLineLength(_.lineNumber)>0&&b.getLineFirstNonWhitespaceColumn(_.lineNumber)===0&&b.getLineLastNonWhitespaceColumn(_.lineNumber)===0&&w.push({range:new k.Range(_.lineNumber,1,_.lineNumber,b.getLineMaxColumn(_.lineNumber))})}}e.WordSelectionRangeProvider=y}),define(J[94],ee([1,0]),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 S{constructor(){this.value="",this.pos=0}static isDigitCharacter(r){return r>=48&&r<=57}static isVariableCharacter(r){return r===95||r>=97&&r<=122||r>=65&&r<=90}text(r){this.value=r,this.pos=0}tokenText(r){return this.value.substr(r.pos,r.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const r=this.pos;let c=0,g=this.value.charCodeAt(r),o;if(o=S._table[g],typeof o=="number")return this.pos+=1,{type:o,pos:r,len:1};if(S.isDigitCharacter(g)){o=8;do c+=1,g=this.value.charCodeAt(r+c);while(S.isDigitCharacter(g));return this.pos+=c,{type:o,pos:r,len:c}}if(S.isVariableCharacter(g)){o=9;do g=this.value.charCodeAt(r+ ++c);while(S.isVariableCharacter(g)||S.isDigitCharacter(g));return this.pos+=c,{type:o,pos:r,len:c}}o=10;do c+=1,g=this.value.charCodeAt(r+c);while(!isNaN(g)&&typeof S._table[g]>"u"&&!S.isDigitCharacter(g)&&!S.isVariableCharacter(g));return this.pos+=c,{type:o,pos:r,len:c}}}S._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13},e.Scanner=S;class k{constructor(){this._children=[]}appendChild(r){return r instanceof y&&this._children[this._children.length-1]instanceof y?this._children[this._children.length-1].value+=r.value:(r.parent=this,this._children.push(r)),this}replace(r,c){const{parent:g}=r,o=g.children.indexOf(r),l=g.children.slice(0);l.splice(o,1,...c),g._children=l,function a(d,u){for(const C of d)C.parent=u,a(C.children,C)}(c,g)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let r=this;for(;;){if(!r)return;if(r instanceof t)return r;r=r.parent}}toString(){return this.children.reduce((r,c)=>r+c.toString(),"")}len(){return 0}}e.Marker=k;class y extends k{constructor(r){super(),this.value=r}toString(){return this.value}len(){return this.value.length}clone(){return new y(this.value)}}e.Text=y;class D extends k{}e.TransformableMarker=D;class w extends D{static compareByIndex(r,c){return r.index===c.index?0:r.isFinalTabstop?1:c.isFinalTabstop||r.index<c.index?-1:r.index>c.index?1:0}constructor(r){super(),this.index=r}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof b?this._children[0]:void 0}clone(){const r=new w(this.index);return this.transform&&(r.transform=this.transform.clone()),r._children=this.children.map(c=>c.clone()),r}}e.Placeholder=w;class b extends k{constructor(){super(...arguments),this.options=[]}appendChild(r){return r instanceof y&&(r.parent=this,this.options.push(r)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const r=new b;return this.options.forEach(r.appendChild,r),r}}e.Choice=b;class _ extends k{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(r){const c=this;let g=!1,o=r.replace(this.regexp,function(){return g=!0,c._replace(Array.prototype.slice.call(arguments,0,-2))});return!g&&this._children.some(l=>l instanceof h&&!!l.elseValue)&&(o=this._replace([])),o}_replace(r){let c="";for(const g of this._children)if(g instanceof h){let o=r[g.index]||"";o=g.resolve(o),c+=o}else c+=g.toString();return c}toString(){return""}clone(){const r=new _;return r.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),r._children=this.children.map(c=>c.clone()),r}}e.Transform=_;class h extends k{constructor(r,c,g,o){super(),this.index=r,this.shorthandName=c,this.ifValue=g,this.elseValue=o}resolve(r){return this.shorthandName==="upcase"?r?r.toLocaleUpperCase():"":this.shorthandName==="downcase"?r?r.toLocaleLowerCase():"":this.shorthandName==="capitalize"?r?r[0].toLocaleUpperCase()+r.substr(1):"":this.shorthandName==="pascalcase"?r?this._toPascalCase(r):"":this.shorthandName==="camelcase"?r?this._toCamelCase(r):"":r&&typeof this.ifValue=="string"?this.ifValue:!r&&typeof this.elseValue=="string"?this.elseValue:r||""}_toPascalCase(r){const c=r.match(/[a-z0-9]+/gi);return c?c.map(g=>g.charAt(0).toUpperCase()+g.substr(1)).join(""):r}_toCamelCase(r){const c=r.match(/[a-z0-9]+/gi);return c?c.map((g,o)=>o===0?g.charAt(0).toLowerCase()+g.substr(1):g.charAt(0).toUpperCase()+g.substr(1)).join(""):r}clone(){return new h(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=h;class m extends D{constructor(r){super(),this.name=r}resolve(r){let c=r.resolve(this);return this.transform&&(c=this.transform.resolve(c||"")),c!==void 0?(this._children=[new y(c)],!0):!1}clone(){const r=new m(this.name);return this.transform&&(r.transform=this.transform.clone()),r._children=this.children.map(c=>c.clone()),r}}e.Variable=m;function n(s,r){const c=[...s];for(;c.length>0;){const g=c.shift();if(!r(g))break;c.unshift(...g.children)}}class t extends k{get placeholderInfo(){if(!this._placeholders){const r=[];let c;this.walk(function(g){return g instanceof w&&(r.push(g),c=!c||c.index<g.index?g:c),!0}),this._placeholders={all:r,last:c}}return this._placeholders}get placeholders(){const{all:r}=this.placeholderInfo;return r}offset(r){let c=0,g=!1;return this.walk(o=>o===r?(g=!0,!1):(c+=o.len(),!0)),g?c:-1}fullLen(r){let c=0;return n([r],g=>(c+=g.len(),!0)),c}enclosingPlaceholders(r){const c=[];let{parent:g}=r;for(;g;)g instanceof w&&c.push(g),g=g.parent;return c}resolveVariables(r){return this.walk(c=>(c instanceof m&&c.resolve(r)&&(this._placeholders=void 0),!0)),this}appendChild(r){return this._placeholders=void 0,super.appendChild(r)}replace(r,c){return this._placeholders=void 0,super.replace(r,c)}clone(){const r=new t;return this._children=this.children.map(c=>c.clone()),r}walk(r){n(this.children,r)}}e.TextmateSnippet=t;class i{constructor(){this._scanner=new S,this._token={type:14,pos:0,len:0}}static escape(r){return r.replace(/\\$|}|\\\\/g,"\\\\$&")}static guessNeedsClipboard(r){return/\\${?CLIPBOARD/.test(r)}parse(r,c,g){const o=new t;return this.parseFragment(r,o),this.ensureFinalTabstop(o,g??!1,c??!1),o}parseFragment(r,c){const g=c.children.length;for(this._scanner.text(r),this._token=this._scanner.next();this._parse(c););const o=new Map,l=[];c.walk(u=>(u instanceof w&&(u.isFinalTabstop?o.set(0,void 0):!o.has(u.index)&&u.children.length>0?o.set(u.index,u.children):l.push(u)),!0));const a=(u,C)=>{const f=o.get(u.index);if(!f)return;const v=new w(u.index);v.transform=u.transform;for(const p of f){const L=p.clone();v.appendChild(L),L instanceof w&&o.has(L.index)&&!C.has(L.index)&&(C.add(L.index),a(L,C),C.delete(L.index))}c.replace(u,[v])},d=new Set;for(const u of l)a(u,d);return c.children.slice(g)}ensureFinalTabstop(r,c,g){(c||g&&r.placeholders.length>0)&&(r.placeholders.find(l=>l.index===0)||r.appendChild(new w(0)))}_accept(r,c){if(r===void 0||this._token.type===r){const g=c?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),g}return!1}_backTo(r){return this._scanner.pos=r.pos+r.len,this._token=r,!1}_until(r){const c=this._token;for(;this._token.type!==r;){if(this._token.type===14)return!1;if(this._token.type===5){const o=this._scanner.next();if(o.type!==0&&o.type!==4&&o.type!==5)return!1}this._token=this._scanner.next()}const g=this._scanner.value.substring(c.pos,this._token.pos).replace(/\\\\(\\$|}|\\\\)/g,"$1");return this._token=this._scanner.next(),g}_parse(r){return this._parseEscaped(r)||this._parseTabstopOrVariableName(r)||this._parseComplexPlaceholder(r)||this._parseComplexVariable(r)||this._parseAnything(r)}_parseEscaped(r){let c;return(c=this._accept(5,!0))?(c=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||c,r.appendChild(new y(c)),!0):!1}_parseTabstopOrVariableName(r){let c;const g=this._token;return this._accept(0)&&(c=this._accept(9,!0)||this._accept(8,!0))?(r.appendChild(/^\\d+$/.test(c)?new w(Number(c)):new m(c)),!0):this._backTo(g)}_parseComplexPlaceholder(r){let c;const g=this._token;if(!(this._accept(0)&&this._accept(3)&&(c=this._accept(8,!0))))return this._backTo(g);const l=new w(Number(c));if(this._accept(1))for(;;){if(this._accept(4))return r.appendChild(l),!0;if(!this._parse(l))return r.appendChild(new y("${"+c+":")),l.children.forEach(r.appendChild,r),!0}else if(l.index>0&&this._accept(7)){const a=new b;for(;;){if(this._parseChoiceElement(a)){if(this._accept(2))continue;if(this._accept(7)&&(l.appendChild(a),this._accept(4)))return r.appendChild(l),!0}return this._backTo(g),!1}}else return this._accept(6)?this._parseTransform(l)?(r.appendChild(l),!0):(this._backTo(g),!1):this._accept(4)?(r.appendChild(l),!0):this._backTo(g)}_parseChoiceElement(r){const c=this._token,g=[];for(;!(this._token.type===2||this._token.type===7);){let o;if((o=this._accept(5,!0))?o=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||o:o=this._accept(void 0,!0),!o)return this._backTo(c),!1;g.push(o)}return g.length===0?(this._backTo(c),!1):(r.appendChild(new y(g.join(""))),!0)}_parseComplexVariable(r){let c;const g=this._token;if(!(this._accept(0)&&this._accept(3)&&(c=this._accept(9,!0))))return this._backTo(g);const l=new m(c);if(this._accept(1))for(;;){if(this._accept(4))return r.appendChild(l),!0;if(!this._parse(l))return r.appendChild(new y("${"+c+":")),l.children.forEach(r.appendChild,r),!0}else return this._accept(6)?this._parseTransform(l)?(r.appendChild(l),!0):(this._backTo(g),!1):this._accept(4)?(r.appendChild(l),!0):this._backTo(g)}_parseTransform(r){const c=new _;let g="",o="";for(;!this._accept(6);){let l;if(l=this._accept(5,!0)){l=this._accept(6,!0)||l,g+=l;continue}if(this._token.type!==14){g+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let l;if(l=this._accept(5,!0)){l=this._accept(5,!0)||this._accept(6,!0)||l,c.appendChild(new y(l));continue}if(!(this._parseFormatString(c)||this._parseAnything(c)))return!1}for(;!this._accept(4);){if(this._token.type!==14){o+=this._accept(void 0,!0);continue}return!1}try{c.regexp=new RegExp(g,o)}catch{return!1}return r.transform=c,!0}_parseFormatString(r){const c=this._token;if(!this._accept(0))return!1;let g=!1;this._accept(3)&&(g=!0);const o=this._accept(8,!0);if(o)if(g){if(this._accept(4))return r.appendChild(new h(Number(o))),!0;if(!this._accept(1))return this._backTo(c),!1}else return r.appendChild(new h(Number(o))),!0;else return this._backTo(c),!1;if(this._accept(6)){const l=this._accept(9,!0);return!l||!this._accept(4)?(this._backTo(c),!1):(r.appendChild(new h(Number(o),l)),!0)}else if(this._accept(11)){const l=this._until(4);if(l)return r.appendChild(new h(Number(o),void 0,l,void 0)),!0}else if(this._accept(12)){const l=this._until(4);if(l)return r.appendChild(new h(Number(o),void 0,void 0,l)),!0}else if(this._accept(13)){const l=this._until(1);if(l){const a=this._until(4);if(a)return r.appendChild(new h(Number(o),void 0,l,a)),!0}}else{const l=this._until(4);if(l)return r.appendChild(new h(Number(o),void 0,void 0,l)),!0}return this._backTo(c),!1}_parseAnything(r){return this._token.type!==14?(r.appendChild(new y(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=i}),define(J[200],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModel=e.StickyElement=e.StickyRange=void 0;class S{constructor(w,b){this.startLineNumber=w,this.endLineNumber=b}}e.StickyRange=S;class k{constructor(w,b,_){this.range=w,this.children=b,this.parent=_}}e.StickyElement=k;class y{constructor(w,b,_,h){this.uri=w,this.version=b,this.element=_,this.outlineProviderId=h}}e.StickyModel=y}),define(J[275],ee([1,0,16,63,9]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class D{constructor(_,h){this.leadingLineContent=_,this.characterCountDelta=h}}e.LineContext=D;class w{constructor(_,h,m,n,t,i,s=k.FuzzyScoreOptions.default,r=void 0){this.clipboardText=r,this._snippetCompareFn=w._compareCompletionItems,this._items=_,this._column=h,this._wordDistance=n,this._options=t,this._refilterKind=1,this._lineContext=m,this._fuzzyScoreOptions=s,i==="top"?this._snippetCompareFn=w._compareCompletionItemsSnippetsUp:i==="bottom"&&(this._snippetCompareFn=w._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(_){(this._lineContext.leadingLineContent!==_.leadingLineContent||this._lineContext.characterCountDelta!==_.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<_.characterCountDelta&&this._filteredItems?2:1,this._lineContext=_)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const _=new Set;for(const[h,m]of this.getItemsByProvider())m.length>0&&m[0].container.incomplete&&_.add(h);return _}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const _=[],{leadingLineContent:h,characterCountDelta:m}=this._lineContext;let n="",t="";const i=this._refilterKind===1?this._items:this._filteredItems,s=[],r=!this._options.filterGraceful||i.length>2e3?k.fuzzyScore:k.fuzzyScoreGracefulAggressive;for(let c=0;c<i.length;c++){const g=i[c];if(g.isInvalid)continue;const o=this._itemsByProvider.get(g.provider);o?o.push(g):this._itemsByProvider.set(g.provider,[g]);const l=g.position.column-g.editStart.column,a=l+m-(g.position.column-this._column);if(n.length!==a&&(n=a===0?"":h.slice(-a),t=n.toLowerCase()),g.word=n,a===0)g.score=k.FuzzyScore.Default;else{let d=0;for(;d<l;){const u=n.charCodeAt(d);if(u===32||u===9)d+=1;else break}if(d>=a)g.score=k.FuzzyScore.Default;else if(typeof g.completion.filterText=="string"){const u=r(n,t,d,g.completion.filterText,g.filterTextLow,0,this._fuzzyScoreOptions);if(!u)continue;(0,y.compareIgnoreCase)(g.completion.filterText,g.textLabel)===0?g.score=u:(g.score=(0,k.anyScore)(n,t,d,g.textLabel,g.labelLow,0),g.score[0]=u[0])}else{const u=r(n,t,d,g.textLabel,g.labelLow,0,this._fuzzyScoreOptions);if(!u)continue;g.score=u}}g.idx=c,g.distance=this._wordDistance.distance(g.position,g.completion),s.push(g),_.push(g.textLabel.length)}this._filteredItems=s.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:_.length?(0,S.quickSelect)(_.length-.85,_,(c,g)=>c-g):0}}static _compareCompletionItems(_,h){return _.score[0]>h.score[0]?-1:_.score[0]<h.score[0]?1:_.distance<h.distance?-1:_.distance>h.distance?1:_.idx<h.idx?-1:_.idx>h.idx?1:0}static _compareCompletionItemsSnippetsDown(_,h){if(_.completion.kind!==h.completion.kind){if(_.completion.kind===27)return 1;if(h.completion.kind===27)return-1}return w._compareCompletionItems(_,h)}static _compareCompletionItemsSnippetsUp(_,h){if(_.completion.kind!==h.completion.kind){if(_.completion.kind===27)return-1;if(h.completion.kind===27)return 1}return w._compareCompletionItems(_,h)}}e.CompletionModel=w}),define(J[509],ee([1,0,16,2,115]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class D{constructor(b,_,h,m){this._disposables=new k.DisposableStore,this._disposables.add(h.onDidSuggest(n=>{n.completionModel.items.length===0&&this.reset()})),this._disposables.add(h.onDidCancel(n=>{this.reset()})),this._disposables.add(_.onDidShow(()=>this._onItem(_.getFocusedItem()))),this._disposables.add(_.onDidFocus(this._onItem,this)),this._disposables.add(_.onDidHide(this.reset,this)),this._disposables.add(b.onWillType(n=>{if(this._active&&!_.isFrozen()&&h.state!==0){const t=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(t)&&b.getOption(0)&&m(this._active.item)}}))}_onItem(b){if(!b||!(0,S.isNonEmptyArray)(b.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===b.item)return;const _=new y.CharacterSet;for(const h of b.item.completion.commitCharacters)h.length>0&&_.add(h.charCodeAt(0));this._active={acceptCharacters:_,item:b}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=D}),define(J[510],ee([1,0,2]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class k{constructor(D,w){this._disposables=new S.DisposableStore,this._lastOvertyped=[],this._locked=!1,this._disposables.add(D.onWillType(()=>{if(this._locked||!D.hasModel())return;const b=D.getSelections(),_=b.length;let h=!1;for(let n=0;n<_;n++)if(!b[n].isEmpty()){h=!0;break}if(!h){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];const m=D.getModel();for(let n=0;n<_;n++){const t=b[n];if(m.getValueLengthInRange(t)>k._maxSelectionLength)return;this._lastOvertyped[n]={value:m.getValueInRange(t),multiline:t.startLineNumber!==t.endLineNumber}}})),this._disposables.add(w.onDidTrigger(b=>{this._locked=!0})),this._disposables.add(w.onDidCancel(b=>{this._locked=!1}))}getLastOvertypedInfo(D){if(D>=0&&D<this._lastOvertyped.length)return this._lastOvertyped[D]}dispose(){this._disposables.dispose()}}k._maxSelectionLength=51200,e.OvertypingCapturer=k}),define(J[276],ee([1,0,16,5,274]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class D{static create(b,_){return Ee(this,void 0,void 0,function*(){if(!_.getOption(113).localityBonus||!_.hasModel())return D.None;const h=_.getModel(),m=_.getPosition();if(!b.canComputeWordRanges(h.uri))return D.None;const[n]=yield new y.BracketSelectionRangeProvider().provideSelectionRanges(h,[m]);if(n.length===0)return D.None;const t=yield b.computeWordRanges(h.uri,n[0].range);if(!t)return D.None;const i=h.getWordUntilPosition(m);return delete t[i.word],new class extends D{distance(s,r){if(!m.equals(_.getPosition()))return 0;if(r.kind===17)return 2<<20;const c=typeof r.label=="string"?r.label:r.label.label,g=t[c];if((0,S.isFalsyOrEmpty)(g))return 2<<20;const o=(0,S.binarySearch)(g,k.Range.fromPositions(s),k.Range.compareRangesUsingStarts),l=o>=0?g[o]:g[Math.max(0,~o-1)];let a=n.length;for(const d of n){if(!k.Range.containsRange(d.range,l))break;a-=1}return a}}})}}D.None=new class extends D{distance(){return 0}},e.WordDistance=D}),define(J[277],ee([1,0]),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 S(s){return Array.isArray(s)}e.isFuzzyActionArr=S;function k(s){return!S(s)}e.isFuzzyAction=k;function y(s){return typeof s=="string"}e.isString=y;function D(s){return!y(s)}e.isIAction=D;function w(s){return!s}e.empty=w;function b(s,r){return s.ignoreCase&&r?r.toLowerCase():r}e.fixCase=b;function _(s){return s.replace(/[&<>\'"_]/g,"-")}e.sanitize=_;function h(s,r){console.log(`${s.languageId}: ${r}`)}e.log=h;function m(s,r){return new Error(`${s.languageId}: ${r}`)}e.createError=m;function n(s,r,c,g,o){const l=/\\$((\\$)|(#)|(\\d\\d?)|[sS](\\d\\d?)|@(\\w+))/g;let a=null;return r.replace(l,function(d,u,C,f,v,p,L,E,I){return w(C)?w(f)?!w(v)&&v<g.length?b(s,g[v]):!w(L)&&s&&typeof s[L]=="string"?s[L]:(a===null&&(a=o.split("."),a.unshift(o)),!w(p)&&p<a.length?b(s,a[p]):""):b(s,c):"$"})}e.substituteMatches=n;function t(s,r){let c=r;for(;c&&c.length>0;){const g=s.tokenizer[c];if(g)return g;const o=c.lastIndexOf(".");o<0?c=null:c=c.substr(0,o)}return null}e.findRules=t;function i(s,r){let c=r;for(;c&&c.length>0;){if(s.stateNames[c])return!0;const o=c.lastIndexOf(".");o<0?c=null:c=c.substr(0,o)}return!1}e.stateExists=i}),define(J[511],ee([1,0,277]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function k(s,r){if(!r||!Array.isArray(r))return!1;for(const c of r)if(!s(c))return!1;return!0}function y(s,r){return typeof s=="boolean"?s:r}function D(s,r){return typeof s=="string"?s:r}function w(s){const r={};for(const c of s)r[c]=!0;return r}function b(s,r=!1){r&&(s=s.map(function(g){return g.toLowerCase()}));const c=w(s);return r?function(g){return c[g.toLowerCase()]!==void 0&&c.hasOwnProperty(g.toLowerCase())}:function(g){return c[g]!==void 0&&c.hasOwnProperty(g)}}function _(s,r){r=r.replace(/@@/g,"");let c=0,g;do g=!1,r=r.replace(/@(\\w+)/g,function(l,a){g=!0;let d="";if(typeof s[a]=="string")d=s[a];else if(s[a]&&s[a]instanceof RegExp)d=s[a].source;else throw s[a]===void 0?S.createError(s,"language definition does not contain attribute \'"+a+"\', used at: "+r):S.createError(s,"attribute reference \'"+a+"\' must be a string, used at: "+r);return S.empty(d)?"":"(?:"+d+")"}),c++;while(g&&c<5);r=r.replace(/\\x01/g,"@");const o=(s.ignoreCase?"i":"")+(s.unicode?"u":"");return new RegExp(r,o)}function h(s,r,c,g){if(g<0)return s;if(g<r.length)return r[g];if(g>=100){g=g-100;const o=c.split(".");if(o.unshift(c),g<o.length)return o[g]}return null}function m(s,r,c,g){let o=-1,l=c,a=c.match(/^\\$(([sS]?)(\\d\\d?)|#)(.*)$/);a&&(a[3]&&(o=parseInt(a[3]),a[2]&&(o=o+100)),l=a[4]);let d="~",u=l;!l||l.length===0?(d="!=",u=""):/^\\w*$/.test(u)?d="==":(a=l.match(/^(@|!@|~|!~|==|!=)(.*)$/),a&&(d=a[1],u=a[2]));let C;if((d==="~"||d==="!~")&&/^(\\w|\\|)*$/.test(u)){const f=b(u.split("|"),s.ignoreCase);C=function(v){return d==="~"?f(v):!f(v)}}else if(d==="@"||d==="!@"){const f=s[u];if(!f)throw S.createError(s,"the @ match target \'"+u+"\' is not defined, in rule: "+r);if(!k(function(p){return typeof p=="string"},f))throw S.createError(s,"the @ match target \'"+u+"\' must be an array of strings, in rule: "+r);const v=b(f,s.ignoreCase);C=function(p){return d==="@"?v(p):!v(p)}}else if(d==="~"||d==="!~")if(u.indexOf("$")<0){const f=_(s,"^"+u+"$");C=function(v){return d==="~"?f.test(v):!f.test(v)}}else C=function(f,v,p,L){return _(s,"^"+S.substituteMatches(s,u,v,p,L)+"$").test(f)};else if(u.indexOf("$")<0){const f=S.fixCase(s,u);C=function(v){return d==="=="?v===f:v!==f}}else{const f=S.fixCase(s,u);C=function(v,p,L,E,I){const T=S.substituteMatches(s,f,p,L,E);return d==="=="?v===T:v!==T}}return o===-1?{name:c,value:g,test:function(f,v,p,L){return C(f,f,v,p,L)}}:{name:c,value:g,test:function(f,v,p,L){const E=h(f,v,p,o);return C(E||"",f,v,p,L)}}}function n(s,r,c){if(c){if(typeof c=="string")return c;if(c.token||c.token===""){if(typeof c.token!="string")throw S.createError(s,"a \'token\' attribute must be of type string, in rule: "+r);{const g={token:c.token};if(c.token.indexOf("$")>=0&&(g.tokenSubst=!0),typeof c.bracket=="string")if(c.bracket==="@open")g.bracket=1;else if(c.bracket==="@close")g.bracket=-1;else throw S.createError(s,"a \'bracket\' attribute must be either \'@open\' or \'@close\', in rule: "+r);if(c.next){if(typeof c.next!="string")throw S.createError(s,"the next state must be a string value in rule: "+r);{let o=c.next;if(!/^(@pop|@push|@popall)$/.test(o)&&(o[0]==="@"&&(o=o.substr(1)),o.indexOf("$")<0&&!S.stateExists(s,S.substituteMatches(s,o,"",[],""))))throw S.createError(s,"the next state \'"+c.next+"\' is not defined in rule: "+r);g.next=o}}return typeof c.goBack=="number"&&(g.goBack=c.goBack),typeof c.switchTo=="string"&&(g.switchTo=c.switchTo),typeof c.log=="string"&&(g.log=c.log),typeof c.nextEmbedded=="string"&&(g.nextEmbedded=c.nextEmbedded,s.usesEmbedded=!0),g}}else if(Array.isArray(c)){const g=[];for(let o=0,l=c.length;o<l;o++)g[o]=n(s,r,c[o]);return{group:g}}else if(c.cases){const g=[];for(const l in c.cases)if(c.cases.hasOwnProperty(l)){const a=n(s,r,c.cases[l]);l==="@default"||l==="@"||l===""?g.push({test:void 0,value:a,name:l}):l==="@eos"?g.push({test:function(d,u,C,f){return f},value:a,name:l}):g.push(m(s,r,l,a))}const o=s.defaultToken;return{test:function(l,a,d,u){for(const C of g)if(!C.test||C.test(l,a,d,u))return C.value;return o}}}else throw S.createError(s,"an action must be a string, an object with a \'token\' or \'cases\' attribute, or an array of actions; in rule: "+r)}else return{token:""}}class t{constructor(r){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=r}setRegex(r,c){let g;if(typeof c=="string")g=c;else if(c instanceof RegExp)g=c.source;else throw S.createError(r,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=g.length>0&&g[0]==="^",this.name=this.name+": "+g,this.regex=_(r,"^(?:"+(this.matchOnlyAtLineStart?g.substr(1):g)+")")}setAction(r,c){this.action=n(r,this.name,c)}}function i(s,r){if(!r||typeof r!="object")throw new Error("Monarch: expecting a language definition object");const c={};c.languageId=s,c.includeLF=y(r.includeLF,!1),c.noThrow=!1,c.maxStack=100,c.start=typeof r.start=="string"?r.start:null,c.ignoreCase=y(r.ignoreCase,!1),c.unicode=y(r.unicode,!1),c.tokenPostfix=D(r.tokenPostfix,"."+c.languageId),c.defaultToken=D(r.defaultToken,"source"),c.usesEmbedded=!1;const g=r;g.languageId=s,g.includeLF=c.includeLF,g.ignoreCase=c.ignoreCase,g.unicode=c.unicode,g.noThrow=c.noThrow,g.usesEmbedded=c.usesEmbedded,g.stateNames=r.tokenizer,g.defaultToken=c.defaultToken;function o(a,d,u){for(const C of u){let f=C.include;if(f){if(typeof f!="string")throw S.createError(c,"an \'include\' attribute must be a string at: "+a);if(f[0]==="@"&&(f=f.substr(1)),!r.tokenizer[f])throw S.createError(c,"include target \'"+f+"\' is not defined at: "+a);o(a+"."+f,d,r.tokenizer[f])}else{const v=new t(a);if(Array.isArray(C)&&C.length>=1&&C.length<=3)if(v.setRegex(g,C[0]),C.length>=3)if(typeof C[1]=="string")v.setAction(g,{token:C[1],next:C[2]});else if(typeof C[1]=="object"){const p=C[1];p.next=C[2],v.setAction(g,p)}else throw S.createError(c,"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: "+a);else v.setAction(g,C[1]);else{if(!C.regex)throw S.createError(c,"a rule must either be an array, or an object with a \'regex\' or \'include\' field at: "+a);C.name&&typeof C.name=="string"&&(v.name=C.name),C.matchOnlyAtStart&&(v.matchOnlyAtLineStart=y(C.matchOnlyAtLineStart,!1)),v.setRegex(g,C.regex),v.setAction(g,C.action)}d.push(v)}}}if(!r.tokenizer||typeof r.tokenizer!="object")throw S.createError(c,"a language definition must define the \'tokenizer\' attribute as an object");c.tokenizer=[];for(const a in r.tokenizer)if(r.tokenizer.hasOwnProperty(a)){c.start||(c.start=a);const d=r.tokenizer[a];c.tokenizer[a]=new Array,o("tokenizer."+a,c.tokenizer[a],d)}if(c.usesEmbedded=g.usesEmbedded,r.brackets){if(!Array.isArray(r.brackets))throw S.createError(c,"the \'brackets\' attribute must be defined as an array")}else r.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const l=[];for(const a of r.brackets){let d=a;if(d&&Array.isArray(d)&&d.length===3&&(d={token:d[2],open:d[0],close:d[1]}),d.open===d.close)throw S.createError(c,"open and close brackets in a \'brackets\' attribute must be different: "+d.open+`\n hint: use the \'bracket\' attribute if matching on equal brackets is required.`);if(typeof d.open=="string"&&typeof d.token=="string"&&typeof d.close=="string")l.push({token:d.token+c.tokenPostfix,open:S.fixCase(c,d.open),close:S.fixCase(c,d.close)});else throw S.createError(c,"every element in the \'brackets\' array must be a \'{open,close,token}\' object or array")}return c.brackets=l,c.noThrow=!0,c}e.compile=i}),define(J[512],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(J[513],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/findinput/findInput",e)}),define(J[514],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(J[515],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(J[516],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(J[517],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(J[518],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(J[519],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(J[520],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(J[521],ee([3,4]),function(q,e){return q.create("vs/base/browser/ui/tree/abstractTree",e)}),define(J[522],ee([3,4]),function(q,e){return q.create("vs/base/common/actions",e)}),define(J[523],ee([3,4]),function(q,e){return q.create("vs/base/common/errorMessage",e)}),define(J[524],ee([1,0,16,18,523]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function D(h,m){return m&&(h.stack||h.stacktrace)?y.localize(0,null,b(h),w(h.stack)||w(h.stacktrace)):b(h)}function w(h){return Array.isArray(h)?h.join(`\n`):h}function b(h){return typeof h.code=="string"&&typeof h.errno=="number"&&typeof h.syscall=="string"?y.localize(1,null,h.message):h.message||y.localize(2,null)}function _(h=null,m=!1){if(!h)return y.localize(3,null);if(Array.isArray(h)){const n=S.coalesce(h),t=_(n[0],m);return n.length>1?y.localize(4,null,t,n.length):t}if(k.isString(h))return h;if(h.detail){const n=h.detail;if(n.error)return D(n.error,m);if(n.exception)return D(n.exception,m)}return h.stack?D(h,m):h.message?h.message:y.localize(5,null)}e.toErrorMessage=_}),define(J[525],ee([3,4]),function(q,e){return q.create("vs/base/common/keybindingLabels",e)}),define(J[201],ee([1,0,525]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserSettingsLabelProvider=e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class k{constructor(w,b,_=b){this.modifierLabels=[null],this.modifierLabels[2]=w,this.modifierLabels[1]=b,this.modifierLabels[3]=_}toLabel(w,b,_){if(b.length===0)return null;const h=[];for(let m=0,n=b.length;m<n;m++){const t=b[m],i=_(t);if(i===null)return null;h[m]=y(t,i,this.modifierLabels[w])}return h.join(" ")}}e.ModifierLabelProvider=k,e.UILabelProvider=new k({ctrlKey:"\\u2303",shiftKey:"\\u21E7",altKey:"\\u2325",metaKey:"\\u2318",separator:""},{ctrlKey:S.localize(0,null),shiftKey:S.localize(1,null),altKey:S.localize(2,null),metaKey:S.localize(3,null),separator:"+"},{ctrlKey:S.localize(4,null),shiftKey:S.localize(5,null),altKey:S.localize(6,null),metaKey:S.localize(7,null),separator:"+"}),e.AriaLabelProvider=new k({ctrlKey:S.localize(8,null),shiftKey:S.localize(9,null),altKey:S.localize(10,null),metaKey:S.localize(11,null),separator:"+"},{ctrlKey:S.localize(12,null),shiftKey:S.localize(13,null),altKey:S.localize(14,null),metaKey:S.localize(15,null),separator:"+"},{ctrlKey:S.localize(16,null),shiftKey:S.localize(17,null),altKey:S.localize(18,null),metaKey:S.localize(19,null),separator:"+"}),e.ElectronAcceleratorLabelProvider=new k({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),e.UserSettingsLabelProvider=new k({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});function y(D,w,b){if(w===null)return"";const _=[];return D.ctrlKey&&_.push(b.ctrlKey),D.shiftKey&&_.push(b.shiftKey),D.altKey&&_.push(b.altKey),D.metaKey&&_.push(b.metaKey),w!==""&&_.push(w),_.join(b.separator)}}),define(J[526],ee([3,4]),function(q,e){return q.create("vs/base/common/platform",e)}),define(J[17],ee([1,0,526]),function(q,e,S){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.setTimeout0=e.setTimeout0IsFaster=e.language=e.userAgent=e.isMobile=e.isIOS=e.isWebWorker=e.isWeb=e.isNative=e.isLinux=e.isMacintosh=e.isWindows=e.globals=e.LANGUAGE_DEFAULT=void 0,e.LANGUAGE_DEFAULT="en";let y=!1,D=!1,w=!1,b=!1,_=!1,h=!1,m=!1,n=!1,t=!1,i=!1,s,r=e.LANGUAGE_DEFAULT,c=e.LANGUAGE_DEFAULT,g,o;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let l;typeof e.globals.vscode<"u"&&typeof e.globals.vscode.process<"u"?l=e.globals.vscode.process:typeof process<"u"&&(l=process);const a=typeof((k=l?.versions)===null||k===void 0?void 0:k.electron)=="string",d=a&&l?.type==="renderer";if(typeof navigator=="object"&&!d)o=navigator.userAgent,y=o.indexOf("Windows")>=0,D=o.indexOf("Macintosh")>=0,n=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,w=o.indexOf("Linux")>=0,i=o?.indexOf("Mobi")>=0,h=!0,s=S.getConfiguredDefaultLocale(S.localize(0,null))||e.LANGUAGE_DEFAULT,r=s,c=navigator.language;else if(typeof l=="object"){y=l.platform==="win32",D=l.platform==="darwin",w=l.platform==="linux",b=w&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,m=a,t=!!l.env.CI||!!l.env.BUILD_ARTIFACTSTAGINGDIRECTORY,s=e.LANGUAGE_DEFAULT,r=e.LANGUAGE_DEFAULT;const p=l.env.VSCODE_NLS_CONFIG;if(p)try{const L=JSON.parse(p),E=L.availableLanguages["*"];s=L.locale,c=L.osLocale,r=E||e.LANGUAGE_DEFAULT,g=L._translationsConfigFile}catch{}_=!0}else console.error("Unable to resolve platform.");let u=0;D?u=1:y?u=3:w&&(u=2),e.isWindows=y,e.isMacintosh=D,e.isLinux=w,e.isNative=_,e.isWeb=h,e.isWebWorker=h&&typeof e.globals.importScripts=="function",e.isIOS=n,e.isMobile=i,e.userAgent=o,e.language=r,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const p=[];e.globals.addEventListener("message",E=>{if(E.data&&E.data.vscodeScheduleAsyncWork)for(let I=0,T=p.length;I<T;I++){const F=p[I];if(F.id===E.data.vscodeScheduleAsyncWork){p.splice(I,1),F.callback();return}}});let L=0;return E=>{const I=++L;p.push({id:I,callback:E}),e.globals.postMessage({vscodeScheduleAsyncWork:I},"*")}}return p=>setTimeout(p)})(),e.OS=D||n?2:y?1:3;let C=!0,f=!1;function v(){if(!f){f=!0;const p=new Uint8Array(2);p[0]=1,p[1]=2,C=new Uint16Array(p.buffer)[0]===(2<<8)+1}return C}e.isLittleEndian=v,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(J[527],ee([1,0,17]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.env=e.cwd=void 0;let k;if(typeof S.globals.vscode<"u"&&typeof S.globals.vscode.process<"u"){const y=S.globals.vscode.process;k={get platform(){return y.platform},get arch(){return y.arch},get env(){return y.env},cwd(){return y.cwd()}}}else typeof process<"u"?k={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:k={get platform(){return S.isWindows?"win32":S.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=k.cwd,e.env=k.env,e.platform=k.platform}),define(J[87],ee([1,0,527]),function(q,e,S){"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 k=65,y=97,D=90,w=122,b=46,_=47,h=92,m=58,n=63;class t extends Error{constructor(C,f,v){let p;typeof f=="string"&&f.indexOf("not ")===0?(p="must not be",f=f.replace(/^not /,"")):p="must be";const L=C.indexOf(".")!==-1?"property":"argument";let E=`The "${C}" ${L} ${p} of type ${f}`;E+=`. Received type ${typeof v}`,super(E),this.code="ERR_INVALID_ARG_TYPE"}}function i(u,C){if(u===null||typeof u!="object")throw new t(C,"Object",u)}function s(u,C){if(typeof u!="string")throw new t(C,"string",u)}const r=S.platform==="win32";function c(u){return u===_||u===h}function g(u){return u===_}function o(u){return u>=k&&u<=D||u>=y&&u<=w}function l(u,C,f,v){let p="",L=0,E=-1,I=0,T=0;for(let F=0;F<=u.length;++F){if(F<u.length)T=u.charCodeAt(F);else{if(v(T))break;T=_}if(v(T)){if(!(E===F-1||I===1))if(I===2){if(p.length<2||L!==2||p.charCodeAt(p.length-1)!==b||p.charCodeAt(p.length-2)!==b){if(p.length>2){const R=p.lastIndexOf(f);R===-1?(p="",L=0):(p=p.slice(0,R),L=p.length-1-p.lastIndexOf(f)),E=F,I=0;continue}else if(p.length!==0){p="",L=0,E=F,I=0;continue}}C&&(p+=p.length>0?`${f}..`:"..",L=2)}else p.length>0?p+=`${f}${u.slice(E+1,F)}`:p=u.slice(E+1,F),L=F-E-1;E=F,I=0}else T===b&&I!==-1?++I:I=-1}return p}function a(u,C){i(C,"pathObject");const f=C.dir||C.root,v=C.base||`${C.name||""}${C.ext||""}`;return f?f===C.root?`${f}${v}`:`${f}${u}${v}`:v}e.win32={resolve(...u){let C="",f="",v=!1;for(let p=u.length-1;p>=-1;p--){let L;if(p>=0){if(L=u[p],s(L,"path"),L.length===0)continue}else C.length===0?L=S.cwd():(L=S.env[`=${C}`]||S.cwd(),(L===void 0||L.slice(0,2).toLowerCase()!==C.toLowerCase()&&L.charCodeAt(2)===h)&&(L=`${C}\\\\`));const E=L.length;let I=0,T="",F=!1;const R=L.charCodeAt(0);if(E===1)c(R)&&(I=1,F=!0);else if(c(R))if(F=!0,c(L.charCodeAt(1))){let M=2,N=M;for(;M<E&&!c(L.charCodeAt(M));)M++;if(M<E&&M!==N){const A=L.slice(N,M);for(N=M;M<E&&c(L.charCodeAt(M));)M++;if(M<E&&M!==N){for(N=M;M<E&&!c(L.charCodeAt(M));)M++;(M===E||M!==N)&&(T=`\\\\\\\\${A}\\\\${L.slice(N,M)}`,I=M)}}}else I=1;else o(R)&&L.charCodeAt(1)===m&&(T=L.slice(0,2),I=2,E>2&&c(L.charCodeAt(2))&&(F=!0,I=3));if(T.length>0)if(C.length>0){if(T.toLowerCase()!==C.toLowerCase())continue}else C=T;if(v){if(C.length>0)break}else if(f=`${L.slice(I)}\\\\${f}`,v=F,F&&C.length>0)break}return f=l(f,!v,"\\\\",c),v?`${C}\\\\${f}`:`${C}${f}`||"."},normalize(u){s(u,"path");const C=u.length;if(C===0)return".";let f=0,v,p=!1;const L=u.charCodeAt(0);if(C===1)return g(L)?"\\\\":u;if(c(L))if(p=!0,c(u.charCodeAt(1))){let I=2,T=I;for(;I<C&&!c(u.charCodeAt(I));)I++;if(I<C&&I!==T){const F=u.slice(T,I);for(T=I;I<C&&c(u.charCodeAt(I));)I++;if(I<C&&I!==T){for(T=I;I<C&&!c(u.charCodeAt(I));)I++;if(I===C)return`\\\\\\\\${F}\\\\${u.slice(T)}\\\\`;I!==T&&(v=`\\\\\\\\${F}\\\\${u.slice(T,I)}`,f=I)}}}else f=1;else o(L)&&u.charCodeAt(1)===m&&(v=u.slice(0,2),f=2,C>2&&c(u.charCodeAt(2))&&(p=!0,f=3));let E=f<C?l(u.slice(f),!p,"\\\\",c):"";return E.length===0&&!p&&(E="."),E.length>0&&c(u.charCodeAt(C-1))&&(E+="\\\\"),v===void 0?p?`\\\\${E}`:E:p?`${v}\\\\${E}`:`${v}${E}`},isAbsolute(u){s(u,"path");const C=u.length;if(C===0)return!1;const f=u.charCodeAt(0);return c(f)||C>2&&o(f)&&u.charCodeAt(1)===m&&c(u.charCodeAt(2))},join(...u){if(u.length===0)return".";let C,f;for(let L=0;L<u.length;++L){const E=u[L];s(E,"path"),E.length>0&&(C===void 0?C=f=E:C+=`\\\\${E}`)}if(C===void 0)return".";let v=!0,p=0;if(typeof f=="string"&&c(f.charCodeAt(0))){++p;const L=f.length;L>1&&c(f.charCodeAt(1))&&(++p,L>2&&(c(f.charCodeAt(2))?++p:v=!1))}if(v){for(;p<C.length&&c(C.charCodeAt(p));)p++;p>=2&&(C=`\\\\${C.slice(p)}`)}return e.win32.normalize(C)},relative(u,C){if(s(u,"from"),s(C,"to"),u===C)return"";const f=e.win32.resolve(u),v=e.win32.resolve(C);if(f===v||(u=f.toLowerCase(),C=v.toLowerCase(),u===C))return"";let p=0;for(;p<u.length&&u.charCodeAt(p)===h;)p++;let L=u.length;for(;L-1>p&&u.charCodeAt(L-1)===h;)L--;const E=L-p;let I=0;for(;I<C.length&&C.charCodeAt(I)===h;)I++;let T=C.length;for(;T-1>I&&C.charCodeAt(T-1)===h;)T--;const F=T-I,R=E<F?E:F;let M=-1,N=0;for(;N<R;N++){const P=u.charCodeAt(p+N);if(P!==C.charCodeAt(I+N))break;P===h&&(M=N)}if(N!==R){if(M===-1)return v}else{if(F>R){if(C.charCodeAt(I+N)===h)return v.slice(I+N+1);if(N===2)return v.slice(I+N)}E>R&&(u.charCodeAt(p+N)===h?M=N:N===2&&(M=3)),M===-1&&(M=0)}let A="";for(N=p+M+1;N<=L;++N)(N===L||u.charCodeAt(N)===h)&&(A+=A.length===0?"..":"\\\\..");return I+=M,A.length>0?`${A}${v.slice(I,T)}`:(v.charCodeAt(I)===h&&++I,v.slice(I,T))},toNamespacedPath(u){if(typeof u!="string"||u.length===0)return u;const C=e.win32.resolve(u);if(C.length<=2)return u;if(C.charCodeAt(0)===h){if(C.charCodeAt(1)===h){const f=C.charCodeAt(2);if(f!==n&&f!==b)return`\\\\\\\\?\\\\UNC\\\\${C.slice(2)}`}}else if(o(C.charCodeAt(0))&&C.charCodeAt(1)===m&&C.charCodeAt(2)===h)return`\\\\\\\\?\\\\${C}`;return u},dirname(u){s(u,"path");const C=u.length;if(C===0)return".";let f=-1,v=0;const p=u.charCodeAt(0);if(C===1)return c(p)?u:".";if(c(p)){if(f=v=1,c(u.charCodeAt(1))){let I=2,T=I;for(;I<C&&!c(u.charCodeAt(I));)I++;if(I<C&&I!==T){for(T=I;I<C&&c(u.charCodeAt(I));)I++;if(I<C&&I!==T){for(T=I;I<C&&!c(u.charCodeAt(I));)I++;if(I===C)return u;I!==T&&(f=v=I+1)}}}}else o(p)&&u.charCodeAt(1)===m&&(f=C>2&&c(u.charCodeAt(2))?3:2,v=f);let L=-1,E=!0;for(let I=C-1;I>=v;--I)if(c(u.charCodeAt(I))){if(!E){L=I;break}}else E=!1;if(L===-1){if(f===-1)return".";L=f}return u.slice(0,L)},basename(u,C){C!==void 0&&s(C,"ext"),s(u,"path");let f=0,v=-1,p=!0,L;if(u.length>=2&&o(u.charCodeAt(0))&&u.charCodeAt(1)===m&&(f=2),C!==void 0&&C.length>0&&C.length<=u.length){if(C===u)return"";let E=C.length-1,I=-1;for(L=u.length-1;L>=f;--L){const T=u.charCodeAt(L);if(c(T)){if(!p){f=L+1;break}}else I===-1&&(p=!1,I=L+1),E>=0&&(T===C.charCodeAt(E)?--E===-1&&(v=L):(E=-1,v=I))}return f===v?v=I:v===-1&&(v=u.length),u.slice(f,v)}for(L=u.length-1;L>=f;--L)if(c(u.charCodeAt(L))){if(!p){f=L+1;break}}else v===-1&&(p=!1,v=L+1);return v===-1?"":u.slice(f,v)},extname(u){s(u,"path");let C=0,f=-1,v=0,p=-1,L=!0,E=0;u.length>=2&&u.charCodeAt(1)===m&&o(u.charCodeAt(0))&&(C=v=2);for(let I=u.length-1;I>=C;--I){const T=u.charCodeAt(I);if(c(T)){if(!L){v=I+1;break}continue}p===-1&&(L=!1,p=I+1),T===b?f===-1?f=I:E!==1&&(E=1):f!==-1&&(E=-1)}return f===-1||p===-1||E===0||E===1&&f===p-1&&f===v+1?"":u.slice(f,p)},format:a.bind(null,"\\\\"),parse(u){s(u,"path");const C={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return C;const f=u.length;let v=0,p=u.charCodeAt(0);if(f===1)return c(p)?(C.root=C.dir=u,C):(C.base=C.name=u,C);if(c(p)){if(v=1,c(u.charCodeAt(1))){let M=2,N=M;for(;M<f&&!c(u.charCodeAt(M));)M++;if(M<f&&M!==N){for(N=M;M<f&&c(u.charCodeAt(M));)M++;if(M<f&&M!==N){for(N=M;M<f&&!c(u.charCodeAt(M));)M++;M===f?v=M:M!==N&&(v=M+1)}}}}else if(o(p)&&u.charCodeAt(1)===m){if(f<=2)return C.root=C.dir=u,C;if(v=2,c(u.charCodeAt(2))){if(f===3)return C.root=C.dir=u,C;v=3}}v>0&&(C.root=u.slice(0,v));let L=-1,E=v,I=-1,T=!0,F=u.length-1,R=0;for(;F>=v;--F){if(p=u.charCodeAt(F),c(p)){if(!T){E=F+1;break}continue}I===-1&&(T=!1,I=F+1),p===b?L===-1?L=F:R!==1&&(R=1):L!==-1&&(R=-1)}return I!==-1&&(L===-1||R===0||R===1&&L===I-1&&L===E+1?C.base=C.name=u.slice(E,I):(C.name=u.slice(E,L),C.base=u.slice(E,I),C.ext=u.slice(L,I))),E>0&&E!==v?C.dir=u.slice(0,E-1):C.dir=C.root,C},sep:"\\\\",delimiter:";",win32:null,posix:null};const d=(()=>{if(r){const u=/\\\\/g;return()=>{const C=S.cwd().replace(u,"/");return C.slice(C.indexOf("/"))}}return()=>S.cwd()})();e.posix={resolve(...u){let C="",f=!1;for(let v=u.length-1;v>=-1&&!f;v--){const p=v>=0?u[v]:d();s(p,"path"),p.length!==0&&(C=`${p}/${C}`,f=p.charCodeAt(0)===_)}return C=l(C,!f,"/",g),f?`/${C}`:C.length>0?C:"."},normalize(u){if(s(u,"path"),u.length===0)return".";const C=u.charCodeAt(0)===_,f=u.charCodeAt(u.length-1)===_;return u=l(u,!C,"/",g),u.length===0?C?"/":f?"./":".":(f&&(u+="/"),C?`/${u}`:u)},isAbsolute(u){return s(u,"path"),u.length>0&&u.charCodeAt(0)===_},join(...u){if(u.length===0)return".";let C;for(let f=0;f<u.length;++f){const v=u[f];s(v,"path"),v.length>0&&(C===void 0?C=v:C+=`/${v}`)}return C===void 0?".":e.posix.normalize(C)},relative(u,C){if(s(u,"from"),s(C,"to"),u===C||(u=e.posix.resolve(u),C=e.posix.resolve(C),u===C))return"";const f=1,v=u.length,p=v-f,L=1,E=C.length-L,I=p<E?p:E;let T=-1,F=0;for(;F<I;F++){const M=u.charCodeAt(f+F);if(M!==C.charCodeAt(L+F))break;M===_&&(T=F)}if(F===I)if(E>I){if(C.charCodeAt(L+F)===_)return C.slice(L+F+1);if(F===0)return C.slice(L+F)}else p>I&&(u.charCodeAt(f+F)===_?T=F:F===0&&(T=0));let R="";for(F=f+T+1;F<=v;++F)(F===v||u.charCodeAt(F)===_)&&(R+=R.length===0?"..":"/..");return`${R}${C.slice(L+T)}`},toNamespacedPath(u){return u},dirname(u){if(s(u,"path"),u.length===0)return".";const C=u.charCodeAt(0)===_;let f=-1,v=!0;for(let p=u.length-1;p>=1;--p)if(u.charCodeAt(p)===_){if(!v){f=p;break}}else v=!1;return f===-1?C?"/":".":C&&f===1?"//":u.slice(0,f)},basename(u,C){C!==void 0&&s(C,"ext"),s(u,"path");let f=0,v=-1,p=!0,L;if(C!==void 0&&C.length>0&&C.length<=u.length){if(C===u)return"";let E=C.length-1,I=-1;for(L=u.length-1;L>=0;--L){const T=u.charCodeAt(L);if(T===_){if(!p){f=L+1;break}}else I===-1&&(p=!1,I=L+1),E>=0&&(T===C.charCodeAt(E)?--E===-1&&(v=L):(E=-1,v=I))}return f===v?v=I:v===-1&&(v=u.length),u.slice(f,v)}for(L=u.length-1;L>=0;--L)if(u.charCodeAt(L)===_){if(!p){f=L+1;break}}else v===-1&&(p=!1,v=L+1);return v===-1?"":u.slice(f,v)},extname(u){s(u,"path");let C=-1,f=0,v=-1,p=!0,L=0;for(let E=u.length-1;E>=0;--E){const I=u.charCodeAt(E);if(I===_){if(!p){f=E+1;break}continue}v===-1&&(p=!1,v=E+1),I===b?C===-1?C=E:L!==1&&(L=1):C!==-1&&(L=-1)}return C===-1||v===-1||L===0||L===1&&C===v-1&&C===f+1?"":u.slice(C,v)},format:a.bind(null,"/"),parse(u){s(u,"path");const C={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return C;const f=u.charCodeAt(0)===_;let v;f?(C.root="/",v=1):v=0;let p=-1,L=0,E=-1,I=!0,T=u.length-1,F=0;for(;T>=v;--T){const R=u.charCodeAt(T);if(R===_){if(!I){L=T+1;break}continue}E===-1&&(I=!1,E=T+1),R===b?p===-1?p=T:F!==1&&(F=1):p!==-1&&(F=-1)}if(E!==-1){const R=L===0&&f?1:L;p===-1||F===0||F===1&&p===E-1&&p===L+1?C.base=C.name=u.slice(R,E):(C.name=u.slice(R,p),C.base=u.slice(R,E),C.ext=u.slice(p,E))}return L>0?C.dir=u.slice(0,L-1):f&&(C.dir="/"),C},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=r?e.win32.normalize:e.posix.normalize,e.resolve=r?e.win32.resolve:e.posix.resolve,e.relative=r?e.win32.relative:e.posix.relative,e.dirname=r?e.win32.dirname:e.posix.dirname,e.basename=r?e.win32.basename:e.posix.basename,e.extname=r?e.win32.extname:e.posix.extname,e.sep=r?e.win32.sep:e.posix.sep}),define(J[202],ee([1,0,87,17,9]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasDriveLetter=e.isWindowsDriveLetter=e.isEqualOrParent=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function D(t){return t===47||t===92}e.isPathSeparator=D;function w(t){return t.replace(/[\\\\/]/g,S.posix.sep)}e.toSlashes=w;function b(t){return t.indexOf("/")===-1&&(t=w(t)),/^[a-zA-Z]:(\\/|$)/.test(t)&&(t="/"+t),t}e.toPosixPath=b;function _(t,i=S.posix.sep){if(!t)return"";const s=t.length,r=t.charCodeAt(0);if(D(r)){if(D(t.charCodeAt(1))&&!D(t.charCodeAt(2))){let g=3;const o=g;for(;g<s&&!D(t.charCodeAt(g));g++);if(o!==g&&!D(t.charCodeAt(g+1))){for(g+=1;g<s;g++)if(D(t.charCodeAt(g)))return t.slice(0,g+1).replace(/[\\\\/]/g,i)}}return i}else if(m(r)&&t.charCodeAt(1)===58)return D(t.charCodeAt(2))?t.slice(0,2)+i:t.slice(0,2);let c=t.indexOf("://");if(c!==-1){for(c+=3;c<s;c++)if(D(t.charCodeAt(c)))return t.slice(0,c+1)}return""}e.getRoot=_;function h(t,i,s,r=S.sep){if(t===i)return!0;if(!t||!i||i.length>t.length)return!1;if(s){if(!(0,y.startsWithIgnoreCase)(t,i))return!1;if(i.length===t.length)return!0;let g=i.length;return i.charAt(i.length-1)===r&&g--,t.charAt(g)===r}return i.charAt(i.length-1)!==r&&(i+=r),t.indexOf(i)===0}e.isEqualOrParent=h;function m(t){return t>=65&&t<=90||t>=97&&t<=122}e.isWindowsDriveLetter=m;function n(t,i=k.isWindows){return i?m(t.charCodeAt(0))&&t.charCodeAt(1)===58:!1}e.hasDriveLetter=n}),define(J[528],ee([1,0,63,87,17,9]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const w=[void 0,[]];function b(o,l,a=0,d=0){const u=l;return u.values&&u.values.length>1?_(o,u.values,a,d):h(o,l,a,d)}e.scoreFuzzy2=b;function _(o,l,a,d){let u=0;const C=[];for(const f of l){const[v,p]=h(o,f,a,d);if(typeof v!="number")return w;u+=v,C.push(...p)}return[u,n(C)]}function h(o,l,a,d){const u=(0,S.fuzzyScore)(l.original,l.originalLowercase,a,o,o.toLowerCase(),d,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return u?[u[0],(0,S.createMatches)(u)]:w}const m=Object.freeze({score:0});function n(o){const l=o.sort((u,C)=>u.start-C.start),a=[];let d;for(const u of l)!d||!t(d,u)?(d=u,a.push(u)):(d.start=Math.min(d.start,u.start),d.end=Math.max(d.end,u.end));return a}function t(o,l){return!(o.end<l.start||l.end<o.start)}function i(o){return o.startsWith(\'"\')&&o.endsWith(\'"\')}const s=" ";function r(o){typeof o!="string"&&(o="");const l=o.toLowerCase(),{pathNormalized:a,normalized:d,normalizedLowercase:u}=c(o),C=a.indexOf(k.sep)>=0,f=i(o);let v;const p=o.split(s);if(p.length>1)for(const L of p){const E=i(L),{pathNormalized:I,normalized:T,normalizedLowercase:F}=c(L);T&&(v||(v=[]),v.push({original:L,originalLowercase:L.toLowerCase(),pathNormalized:I,normalized:T,normalizedLowercase:F,expectContiguousMatch:E}))}return{original:o,originalLowercase:l,pathNormalized:a,normalized:d,normalizedLowercase:u,values:v,containsPathSeparator:C,expectContiguousMatch:f}}e.prepareQuery=r;function c(o){let l;y.isWindows?l=o.replace(/\\//g,k.sep):l=o.replace(/\\\\/g,k.sep);const a=(0,D.stripWildcards)(l).replace(/\\s|"/g,"");return{pathNormalized:l,normalized:a,normalizedLowercase:a.toLowerCase()}}function g(o){return Array.isArray(o)?r(o.map(l=>l.original).join(s)):r(o.original)}e.pieceToQuery=g}),define(J[529],ee([1,0,202,17]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=void 0;function y(w,b=k.isWindows){return(0,S.hasDriveLetter)(w,b)?w.charAt(0).toUpperCase()+w.slice(1):w}e.normalizeDriveLetter=y;let D=Object.create(null)}),define(J[60],ee([1,0,17]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const k=S.globals.performance&&typeof S.globals.performance.now=="function";class y{static create(w=!0){return new y(w)}constructor(w){this._highResolution=k&&w,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?S.globals.performance.now():Date.now()}}e.StopWatch=y}),define(J[6],ee([1,0,11,92,2,59,60]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.EventMultiplexer=e.MicrotaskEmitter=e.DebounceEmitter=e.PauseableEmitter=e.EventDeliveryQueue=e.Emitter=e.EventProfiling=e.Event=void 0;const b=!1,_=!1;var h;(function(v){v.None=()=>y.Disposable.None;function p(G){if(_){const{onDidAddListener:Y}=G,ne=i.create();let de=0;G.onDidAddListener=()=>{++de===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),ne.print()),Y?.()}}}function L(G,Y){return P(G,()=>{},0,void 0,!0,void 0,Y)}v.defer=L;function E(G){return(Y,ne=null,de)=>{let he=!1,oe;return oe=G(ce=>{if(!he)return oe?oe.dispose():he=!0,Y.call(ne,ce)},null,de),he&&oe.dispose(),oe}}v.once=E;function I(G,Y,ne){return A((de,he=null,oe)=>G(ce=>de.call(he,Y(ce)),null,oe),ne)}v.map=I;function T(G,Y,ne){return A((de,he=null,oe)=>G(ce=>{Y(ce),de.call(he,ce)},null,oe),ne)}v.forEach=T;function F(G,Y,ne){return A((de,he=null,oe)=>G(ce=>Y(ce)&&de.call(he,ce),null,oe),ne)}v.filter=F;function R(G){return G}v.signal=R;function M(...G){return(Y,ne=null,de)=>(0,y.combinedDisposable)(...G.map(he=>he(oe=>Y.call(ne,oe),null,de)))}v.any=M;function N(G,Y,ne,de){let he=ne;return I(G,oe=>(he=Y(he,oe),he),de)}v.reduce=N;function A(G,Y){let ne;const de={onWillAddFirstListener(){ne=G(he.fire,he)},onDidRemoveLastListener(){ne?.dispose()}};Y||p(de);const he=new r(de);return Y?.add(he),he.event}function P(G,Y,ne=100,de=!1,he=!1,oe,ce){let z,V,K,ie=0,X;const Z={leakWarningThreshold:oe,onWillAddFirstListener(){z=G(me=>{ie++,V=Y(V,me),de&&!K&&(ue.fire(V),V=void 0),X=()=>{const Ce=V;V=void 0,K=void 0,(!de||ie>1)&&ue.fire(Ce),ie=0},typeof ne=="number"?(clearTimeout(K),K=setTimeout(X,ne)):K===void 0&&(K=0,queueMicrotask(X))})},onWillRemoveListener(){he&&ie>0&&X?.()},onDidRemoveLastListener(){X=void 0,z.dispose()}};ce||p(Z);const ue=new r(Z);return ce?.add(ue),ue.event}v.debounce=P;function x(G,Y=0,ne){return v.debounce(G,(de,he)=>de?(de.push(he),de):[he],Y,void 0,!0,void 0,ne)}v.accumulate=x;function W(G,Y=(de,he)=>de===he,ne){let de=!0,he;return F(G,oe=>{const ce=de||!Y(oe,he);return de=!1,he=oe,ce},ne)}v.latch=W;function U(G,Y,ne){return[v.filter(G,Y,ne),v.filter(G,de=>!Y(de),ne)]}v.split=U;function O(G,Y=!1,ne=[]){let de=ne.slice(),he=G(z=>{de?de.push(z):ce.fire(z)});const oe=()=>{de?.forEach(z=>ce.fire(z)),de=null},ce=new r({onWillAddFirstListener(){he||(he=G(z=>ce.fire(z)))},onDidAddFirstListener(){de&&(Y?setTimeout(oe):oe())},onDidRemoveLastListener(){he&&he.dispose(),he=null}});return ce.event}v.buffer=O;class ${constructor(Y){this.event=Y,this.disposables=new y.DisposableStore}map(Y){return new $(I(this.event,Y,this.disposables))}forEach(Y){return new $(T(this.event,Y,this.disposables))}filter(Y){return new $(F(this.event,Y,this.disposables))}reduce(Y,ne){return new $(N(this.event,Y,ne,this.disposables))}latch(){return new $(W(this.event,void 0,this.disposables))}debounce(Y,ne=100,de=!1,he=!1,oe){return new $(P(this.event,Y,ne,de,he,oe,this.disposables))}on(Y,ne,de){return this.event(Y,ne,de)}once(Y,ne,de){return E(this.event)(Y,ne,de)}dispose(){this.disposables.dispose()}}function Q(G){return new $(G)}v.chain=Q;function se(G,Y,ne=de=>de){const de=(...z)=>ce.fire(ne(...z)),he=()=>G.on(Y,de),oe=()=>G.removeListener(Y,de),ce=new r({onWillAddFirstListener:he,onDidRemoveLastListener:oe});return ce.event}v.fromNodeEventEmitter=se;function le(G,Y,ne=de=>de){const de=(...z)=>ce.fire(ne(...z)),he=()=>G.addEventListener(Y,de),oe=()=>G.removeEventListener(Y,de),ce=new r({onWillAddFirstListener:he,onDidRemoveLastListener:oe});return ce.event}v.fromDOMEventEmitter=le;function te(G){return new Promise(Y=>E(G)(Y))}v.toPromise=te;function re(G,Y){return Y(void 0),G(ne=>Y(ne))}v.runAndSubscribe=re;function H(G,Y){let ne=null;function de(oe){ne?.dispose(),ne=new y.DisposableStore,Y(oe,ne)}de(void 0);const he=G(oe=>de(oe));return(0,y.toDisposable)(()=>{he.dispose(),ne?.dispose()})}v.runAndSubscribeWithStore=H;class B{constructor(Y,ne){this.obs=Y,this._counter=0,this._hasChanged=!1;const de={onWillAddFirstListener:()=>{Y.addObserver(this)},onDidRemoveLastListener:()=>{Y.removeObserver(this)}};ne||p(de),this.emitter=new r(de),ne&&ne.add(this.emitter)}beginUpdate(Y){this._counter++}handleChange(Y,ne){this._hasChanged=!0}endUpdate(Y){--this._counter===0&&this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this.obs.get()))}}function j(G,Y){return new B(G,Y).emitter.event}v.fromObservable=j})(h=e.Event||(e.Event={}));class m{constructor(p){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${p}_${m._idPool++}`,m.all.add(this)}start(p){this._stopWatch=new w.StopWatch(!0),this.listenerCount=p}stop(){if(this._stopWatch){const p=this._stopWatch.elapsed();this.durations.push(p),this.elapsedOverall+=p,this.invocationCount+=1,this._stopWatch=void 0}}}m.all=new Set,m._idPool=0,e.EventProfiling=m;let n=-1;class t{constructor(p,L=Math.random().toString(18).slice(2,5)){this.threshold=p,this.name=L,this._warnCountdown=0}dispose(){var p;(p=this._stacks)===null||p===void 0||p.clear()}check(p,L){const E=this.threshold;if(E<=0||L<E)return;this._stacks||(this._stacks=new Map);const I=this._stacks.get(p.value)||0;if(this._stacks.set(p.value,I+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=E*.5;let T,F=0;for(const[R,M]of this._stacks)(!T||F<M)&&(T=R,F=M);console.warn(`[${this.name}] potential listener LEAK detected, having ${L} listeners already. MOST frequent listener (${F}):`),console.warn(T)}return()=>{const T=this._stacks.get(p.value)||0;this._stacks.set(p.value,T-1)}}}class i{static create(){var p;return new i((p=new Error().stack)!==null&&p!==void 0?p:"")}constructor(p){this.value=p}print(){console.warn(this.value.split(`\n`).slice(2).join(`\n`))}}class s{constructor(p,L,E){this.callback=p,this.callbackThis=L,this.stack=E,this.subscription=new y.SafeDisposable}invoke(p){this.callback.call(this.callbackThis,p)}}class r{constructor(p){var L,E,I,T,F;this._disposed=!1,this._options=p,this._leakageMon=n>0||!((L=this._options)===null||L===void 0)&&L.leakWarningThreshold?new t((I=(E=this._options)===null||E===void 0?void 0:E.leakWarningThreshold)!==null&&I!==void 0?I:n):void 0,this._perfMon=!((T=this._options)===null||T===void 0)&&T._profName?new m(this._options._profName):void 0,this._deliveryQueue=(F=this._options)===null||F===void 0?void 0:F.deliveryQueue}dispose(){var p,L,E,I;if(!this._disposed){if(this._disposed=!0,this._listeners){if(b){const T=Array.from(this._listeners);queueMicrotask(()=>{var F;for(const R of T)R.subscription.isset()&&(R.subscription.unset(),(F=R.stack)===null||F===void 0||F.print())})}this._listeners.clear()}(p=this._deliveryQueue)===null||p===void 0||p.clear(this),(E=(L=this._options)===null||L===void 0?void 0:L.onDidRemoveLastListener)===null||E===void 0||E.call(L),(I=this._leakageMon)===null||I===void 0||I.dispose()}}get event(){return this._event||(this._event=(p,L,E)=>{var I,T,F;if(this._listeners||(this._listeners=new D.LinkedList),this._leakageMon&&this._listeners.size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),y.Disposable.None;const R=this._listeners.isEmpty();R&&(!((I=this._options)===null||I===void 0)&&I.onWillAddFirstListener)&&this._options.onWillAddFirstListener(this);let M,N;this._leakageMon&&this._listeners.size>=Math.ceil(this._leakageMon.threshold*.2)&&(N=i.create(),M=this._leakageMon.check(N,this._listeners.size+1)),b&&(N=N??i.create());const A=new s(p,L,N),P=this._listeners.push(A);R&&(!((T=this._options)===null||T===void 0)&&T.onDidAddFirstListener)&&this._options.onDidAddFirstListener(this),!((F=this._options)===null||F===void 0)&&F.onDidAddListener&&this._options.onDidAddListener(this,p,L);const x=A.subscription.set(()=>{var W,U;M?.(),this._disposed||((U=(W=this._options)===null||W===void 0?void 0:W.onWillRemoveListener)===null||U===void 0||U.call(W,this),P(),this._options&&this._options.onDidRemoveLastListener&&(this._listeners&&!this._listeners.isEmpty()||this._options.onDidRemoveLastListener(this)))});return E instanceof y.DisposableStore?E.add(x):Array.isArray(E)&&E.push(x),x}),this._event}fire(p){var L,E,I;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new g((L=this._options)===null||L===void 0?void 0:L.onListenerError));for(const T of this._listeners)this._deliveryQueue.push(this,T,p);(E=this._perfMon)===null||E===void 0||E.start(this._deliveryQueue.size),this._deliveryQueue.deliver(),(I=this._perfMon)===null||I===void 0||I.stop()}}hasListeners(){return this._listeners?!this._listeners.isEmpty():!1}}e.Emitter=r;class c{constructor(p=S.onUnexpectedError){this._onListenerError=p,this._queue=new D.LinkedList}get size(){return this._queue.size}push(p,L,E){this._queue.push(new o(p,L,E))}clear(p){const L=new D.LinkedList;for(const E of this._queue)E.emitter!==p&&L.push(E);this._queue=L}deliver(){for(;this._queue.size>0;){const p=this._queue.shift();try{p.listener.invoke(p.event)}catch(L){this._onListenerError(L)}}}}e.EventDeliveryQueue=c;class g extends c{clear(p){this._queue.clear()}}class o{constructor(p,L,E){this.emitter=p,this.listener=L,this.event=E}}class l extends r{constructor(p){super(p),this._isPaused=0,this._eventQueue=new D.LinkedList,this._mergeFn=p?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const p=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(p))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(p){this._listeners&&(this._isPaused!==0?this._eventQueue.push(p):super.fire(p))}}e.PauseableEmitter=l;class a extends l{constructor(p){var L;super(p),this._delay=(L=p.delay)!==null&&L!==void 0?L:100}fire(p){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(p)}}e.DebounceEmitter=a;class d extends r{constructor(p){super(p),this._queuedEvents=[],this._mergeFn=p?.merge}fire(p){this.hasListeners()&&(this._queuedEvents.push(p),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(L=>super.fire(L)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=d;class u{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new r({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(p){const L={event:p,listener:null};this.events.push(L),this.hasListeners&&this.hook(L);const E=()=>{this.hasListeners&&this.unhook(L);const I=this.events.indexOf(L);this.events.splice(I,1)};return(0,y.toDisposable)((0,k.once)(E))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(p=>this.hook(p))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(p=>this.unhook(p))}hook(p){p.listener=p.event(L=>this.emitter.fire(L))}unhook(p){p.listener&&p.listener.dispose(),p.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=u;class C{constructor(){this.buffers=[]}wrapEvent(p){return(L,E,I)=>p(T=>{const F=this.buffers[this.buffers.length-1];F?F.push(()=>L.call(E,T)):L.call(E,T)},void 0,I)}bufferEvents(p){const L=[];this.buffers.push(L);const E=p();return this.buffers.pop(),L.forEach(I=>I()),E}}e.EventBufferer=C;class f{constructor(){this.listening=!1,this.inputEvent=h.None,this.inputEventListener=y.Disposable.None,this.emitter=new r({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(p){this.inputEvent=p,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=p(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=f}),define(J[46],ee([1,0,6,2]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandalone=e.isAndroid=e.isElectron=e.isWebkitWebView=e.isSafari=e.isChrome=e.isWebKit=e.isFirefox=e.getZoomFactor=e.PixelRatio=e.addMatchMediaChangeListener=void 0;class y{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}y.INSTANCE=new y;class D extends k.Disposable{constructor(){super(),this._onDidChange=this._register(new S.Emitter),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(s){var r;(r=this._mediaQueryList)===null||r===void 0||r.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),s&&this._onDidChange.fire()}}class w extends k.Disposable{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new S.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const s=this._register(new D);this._register(s.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const s=document.createElement("canvas").getContext("2d"),r=window.devicePixelRatio||1,c=s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1;return r/c}}class b{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,k.markAsSingleton)(new w)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function _(i,s){typeof i=="string"&&(i=window.matchMedia(i)),i.addEventListener("change",s)}e.addMatchMediaChangeListener=_,e.PixelRatio=new b;function h(){return y.INSTANCE.getZoomFactor()}e.getZoomFactor=h;const m=navigator.userAgent;e.isFirefox=m.indexOf("Firefox")>=0,e.isWebKit=m.indexOf("AppleWebKit")>=0,e.isChrome=m.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&m.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isElectron=m.indexOf("Electron/")>=0,e.isAndroid=m.indexOf("Android")>=0;let n=!1;if(window.matchMedia){const i=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),s=window.matchMedia("(display-mode: fullscreen)");n=i.matches,_(i,({matches:r})=>{n&&s.matches||(n=r)})}function t(){return n}e.isStandalone=t}),define(J[203],ee([1,0,46,17]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=void 0,e.BrowserFeatures={clipboard:{writeText:k.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:k.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>k.isNative||S.isStandalone()?0:navigator.keyboard||S.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}}),define(J[76],ee([1,0,6]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomEmitter=void 0;class k{get event(){return this.emitter.event}constructor(D,w,b){const _=h=>this.emitter.fire(h);this.emitter=new S.Emitter({onWillAddFirstListener:()=>D.addEventListener(w,_,b),onDidRemoveLastListener:()=>D.removeEventListener(w,_,b)})}dispose(){this.emitter.dispose()}}e.DomEmitter=k}),define(J[44],ee([1,0,46,58,112,17]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;function w(t){if(t.charCode){const s=String.fromCharCode(t.charCode).toUpperCase();return k.KeyCodeUtils.fromString(s)}const i=t.keyCode;if(i===3)return 7;if(S.isFirefox)switch(i){case 59:return 80;case 107:return 104;case 109:return 106;case 224:if(D.isMacintosh)return 57}else if(S.isWebKit){if(D.isMacintosh&&i===93)return 57;if(!D.isMacintosh&&i===92)return 57}return k.EVENT_KEY_CODE_MAP[i]||0}const b=D.isMacintosh?256:2048,_=512,h=1024,m=D.isMacintosh?2048:256;class n{constructor(i){this._standardKeyboardEventBrand=!0;const s=i;this.browserEvent=s,this.target=s.target,this.ctrlKey=s.ctrlKey,this.shiftKey=s.shiftKey,this.altKey=s.altKey,this.metaKey=s.metaKey,this.altGraphKey=s.getModifierState("AltGraph"),this.keyCode=w(s),this.code=s.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._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(i){return this._asKeybinding===i}_computeKeybinding(){let i=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(i=this.keyCode);let s=0;return this.ctrlKey&&(s|=b),this.altKey&&(s|=_),this.shiftKey&&(s|=h),this.metaKey&&(s|=m),s|=i,s}_computeKeyCodeChord(){let i=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(i=this.keyCode),new y.KeyCodeChord(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,i)}}e.StandardKeyboardEvent=n}),define(J[66],ee([1,0,46,349,17]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class D{constructor(_){this.timestamp=Date.now(),this.browserEvent=_,this.leftButton=_.button===0,this.middleButton=_.button===1,this.rightButton=_.button===2,this.buttons=_.buttons,this.target=_.target,this.detail=_.detail||1,_.type==="dblclick"&&(this.detail=2),this.ctrlKey=_.ctrlKey,this.shiftKey=_.shiftKey,this.altKey=_.altKey,this.metaKey=_.metaKey,typeof _.pageX=="number"?(this.posx=_.pageX,this.posy=_.pageY):(this.posx=_.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=_.clientY+document.body.scrollTop+document.documentElement.scrollTop);const h=k.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(window,_.view);this.posx-=h.left,this.posy-=h.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=D;class w{constructor(_,h=0,m=0){if(this.browserEvent=_||null,this.target=_?_.target||_.targetNode||_.srcElement:null,this.deltaY=m,this.deltaX=h,_){const n=_,t=_;if(typeof n.wheelDeltaY<"u")this.deltaY=n.wheelDeltaY/120;else if(typeof t.VERTICAL_AXIS<"u"&&t.axis===t.VERTICAL_AXIS)this.deltaY=-t.detail/3;else if(_.type==="wheel"){const i=_;i.deltaMode===i.DOM_DELTA_LINE?S.isFirefox&&!y.isMacintosh?this.deltaY=-_.deltaY/3:this.deltaY=-_.deltaY:this.deltaY=-_.deltaY/40}if(typeof n.wheelDeltaX<"u")S.isSafari&&y.isWindows?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof t.HORIZONTAL_AXIS<"u"&&t.axis===t.HORIZONTAL_AXIS)this.deltaX=-_.detail/3;else if(_.type==="wheel"){const i=_;i.deltaMode===i.DOM_DELTA_LINE?S.isFirefox&&!y.isMacintosh?this.deltaX=-_.deltaX/3:this.deltaX=-_.deltaX:this.deltaX=-_.deltaX/40}this.deltaY===0&&this.deltaX===0&&_.wheelDelta&&(this.deltaY=_.wheelDelta/120)}}preventDefault(){var _;(_=this.browserEvent)===null||_===void 0||_.preventDefault()}stopPropagation(){var _;(_=this.browserEvent)===null||_===void 0||_.stopPropagation()}}e.StandardWheelEvent=w}),define(J[41],ee([1,0,6,2,522]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toAction=e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class D extends k.Disposable{constructor(t,i="",s="",r=!0,c){super(),this._onDidChange=this._register(new S.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=t,this._label=i,this._cssClass=s,this._enabled=r,this._actionCallback=c}get id(){return this._id}get label(){return this._label}set label(t){this._setLabel(t)}_setLabel(t){this._label!==t&&(this._label=t,this._onDidChange.fire({label:t}))}get tooltip(){return this._tooltip||""}set tooltip(t){this._setTooltip(t)}_setTooltip(t){this._tooltip!==t&&(this._tooltip=t,this._onDidChange.fire({tooltip:t}))}get class(){return this._cssClass}set class(t){this._setClass(t)}_setClass(t){this._cssClass!==t&&(this._cssClass=t,this._onDidChange.fire({class:t}))}get enabled(){return this._enabled}set enabled(t){this._setEnabled(t)}_setEnabled(t){this._enabled!==t&&(this._enabled=t,this._onDidChange.fire({enabled:t}))}get checked(){return this._checked}set checked(t){this._setChecked(t)}_setChecked(t){this._checked!==t&&(this._checked=t,this._onDidChange.fire({checked:t}))}run(t,i){return Ee(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(t))})}}e.Action=D;class w extends k.Disposable{constructor(){super(...arguments),this._onWillRun=this._register(new S.Emitter),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new S.Emitter),this.onDidRun=this._onDidRun.event}run(t,i){return Ee(this,void 0,void 0,function*(){if(!t.enabled)return;this._onWillRun.fire({action:t});let s;try{yield this.runAction(t,i)}catch(r){s=r}this._onDidRun.fire({action:t,error:s})})}runAction(t,i){return Ee(this,void 0,void 0,function*(){yield t.run(i)})}}e.ActionRunner=w;class b{constructor(){this.id=b.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...t){let i=[];for(const s of t)s.length&&(i.length?i=[...i,new b,...s]:i=s);return i}run(){return Ee(this,void 0,void 0,function*(){})}}b.ID="vs.actions.separator",e.Separator=b;class _{get actions(){return this._actions}constructor(t,i,s,r){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=t,this.label=i,this.class=r,this._actions=s}run(){return Ee(this,void 0,void 0,function*(){})}}e.SubmenuAction=_;class h extends D{constructor(){super(h.ID,y.localize(0,null),void 0,!1)}}h.ID="vs.actions.empty",e.EmptySubmenuAction=h;function m(n){var t,i;return{id:n.id,label:n.label,class:void 0,enabled:(t=n.enabled)!==null&&t!==void 0?t:!0,checked:(i=n.checked)!==null&&i!==void 0?i:!1,run:()=>Ee(this,void 0,void 0,function*(){return n.run()}),tooltip:n.label}}e.toAction=m}),define(J[21],ee([1,0,6]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const k=Object.freeze(function(b,_){const h=setTimeout(b.bind(_),0);return{dispose(){clearTimeout(h)}}});var y;(function(b){function _(h){return h===b.None||h===b.Cancelled||h instanceof D?!0:!h||typeof h!="object"?!1:typeof h.isCancellationRequested=="boolean"&&typeof h.onCancellationRequested=="function"}b.isCancellationToken=_,b.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:S.Event.None}),b.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:k})})(y=e.CancellationToken||(e.CancellationToken={}));class D{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?k:(this._emitter||(this._emitter=new S.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class w{constructor(_){this._token=void 0,this._parentListener=void 0,this._parentListener=_&&_.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new D),this._token}cancel(){this._token?this._token instanceof D&&this._token.cancel():this._token=y.Cancelled}dispose(_=!1){var h;_&&this.cancel(),(h=this._parentListener)===null||h===void 0||h.dispose(),this._token?this._token instanceof D&&this._token.dispose():this._token=y.None}}e.CancellationTokenSource=w});var St=this&&this.__asyncValues||function(q){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=q[Symbol.asyncIterator],S;return e?e.call(q):(q=typeof __values=="function"?__values(q):q[Symbol.iterator](),S={},k("next"),k("throw"),k("return"),S[Symbol.asyncIterator]=function(){return this},S);function k(D){S[D]=q[D]&&function(w){return new Promise(function(b,_){w=q[D](w),y(b,_,w.done,w.value)})}}function y(D,w,b,_){Promise.resolve(_).then(function(h){D({value:h,done:b})},w)}};define(J[12],ee([1,0,21,11,6,2,17,244]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=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 _(E){return!!E&&typeof E.then=="function"}e.isThenable=_;function h(E){const I=new S.CancellationTokenSource,T=E(I.token),F=new Promise((R,M)=>{const N=I.token.onCancellationRequested(()=>{N.dispose(),I.dispose(),M(new k.CancellationError)});Promise.resolve(T).then(A=>{N.dispose(),I.dispose(),R(A)},A=>{N.dispose(),I.dispose(),M(A)})});return new class{cancel(){I.cancel()}then(R,M){return F.then(R,M)}catch(R){return this.then(void 0,R)}finally(R){return F.finally(R)}}}e.createCancelablePromise=h;function m(E,I,T){return new Promise((F,R)=>{const M=I.onCancellationRequested(()=>{M.dispose(),F(T)});E.then(F,R).finally(()=>M.dispose())})}e.raceCancellation=m;class n{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(I){if(this.activePromise){if(this.queuedPromiseFactory=I,!this.queuedPromise){const T=()=>{this.queuedPromise=null;const F=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,F};this.queuedPromise=new Promise(F=>{this.activePromise.then(T,T).then(F)})}return new Promise((T,F)=>{this.queuedPromise.then(T,F)})}return this.activePromise=I(),new Promise((T,F)=>{this.activePromise.then(R=>{this.activePromise=null,T(R)},R=>{this.activePromise=null,F(R)})})}}e.Throttler=n;const t=(E,I)=>{let T=!0;const F=setTimeout(()=>{T=!1,I()},E);return{isTriggered:()=>T,dispose:()=>{clearTimeout(F),T=!1}}},i=E=>{let I=!0;return queueMicrotask(()=>{I&&(I=!1,E())}),{isTriggered:()=>I,dispose:()=>{I=!1}}};class s{constructor(I){this.defaultDelay=I,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(I,T=this.defaultDelay){this.task=I,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((R,M)=>{this.doResolve=R,this.doReject=M}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const R=this.task;return this.task=null,R()}}));const F=()=>{var R;this.deferred=null,(R=this.doResolve)===null||R===void 0||R.call(this,null)};return this.deferred=T===b.MicrotaskDelay?i(F):t(T,F),this.completionPromise}isTriggered(){var I;return!!(!((I=this.deferred)===null||I===void 0)&&I.isTriggered())}cancel(){var I;this.cancelTimeout(),this.completionPromise&&((I=this.doReject)===null||I===void 0||I.call(this,new k.CancellationError),this.completionPromise=null)}cancelTimeout(){var I;(I=this.deferred)===null||I===void 0||I.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=s;class r{constructor(I){this.delayer=new s(I),this.throttler=new n}trigger(I,T){return this.delayer.trigger(()=>this.throttler.queue(I),T)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=r;function c(E,I){return I?new Promise((T,F)=>{const R=setTimeout(()=>{M.dispose(),T()},E),M=I.onCancellationRequested(()=>{clearTimeout(R),M.dispose(),F(new k.CancellationError)})}):h(T=>c(E,T))}e.timeout=c;function g(E,I=0){const T=setTimeout(E,I);return(0,D.toDisposable)(()=>clearTimeout(T))}e.disposableTimeout=g;function o(E,I=F=>!!F,T=null){let F=0;const R=E.length,M=()=>{if(F>=R)return Promise.resolve(T);const N=E[F++];return Promise.resolve(N()).then(P=>I(P)?Promise.resolve(P):M())};return M()}e.first=o;class l{constructor(I,T){this._token=-1,typeof I=="function"&&typeof T=="number"&&this.setIfNotSet(I,T)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(I,T){this.cancel(),this._token=setTimeout(()=>{this._token=-1,I()},T)}setIfNotSet(I,T){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,I()},T))}}e.TimeoutTimer=l;class a{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(I,T){this.cancel(),this._token=setInterval(()=>{I()},T)}}e.IntervalTimer=a;class d{constructor(I,T){this.timeoutToken=-1,this.runner=I,this.timeout=T,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(I=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,I)}get delay(){return this.timeout}set delay(I){this.timeout=I}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var I;(I=this.runner)===null||I===void 0||I.call(this)}}e.RunOnceScheduler=d,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=E=>{(0,w.setTimeout0)(()=>{if(I)return;const T=Date.now()+15;E(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,T-Date.now())}}))});let I=!1;return{dispose(){I||(I=!0)}}}:e.runWhenIdle=(E,I)=>{const T=requestIdleCallback(E,typeof I=="number"?{timeout:I}:void 0);let F=!1;return{dispose(){F||(F=!0,cancelIdleCallback(T))}}}}();class u{constructor(I){this._didRun=!1,this._executor=()=>{try{this._value=I()}catch(T){this._error=T}finally{this._didRun=!0}},this._handle=(0,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}get isInitialized(){return this._didRun}}e.IdleValue=u;class C{get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((I,T)=>{this.completeCallback=I,this.errorCallback=T})}complete(I){return new Promise(T=>{this.completeCallback(I),this.resolved=!0,T()})}cancel(){new Promise(I=>{this.errorCallback(new k.CancellationError),this.rejected=!0,I()})}}e.DeferredPromise=C;var f;(function(E){function I(F){return Ee(this,void 0,void 0,function*(){let R;const M=yield Promise.all(F.map(N=>N.then(A=>A,A=>{R||(R=A)})));if(typeof R<"u")throw R;return M})}E.settled=I;function T(F){return new Promise((R,M)=>Ee(this,void 0,void 0,function*(){try{yield F(R,M)}catch(N){M(N)}}))}E.withAsyncBody=T})(f=e.Promises||(e.Promises={}));class v{static fromArray(I){return new v(T=>{T.emitMany(I)})}static fromPromise(I){return new v(T=>Ee(this,void 0,void 0,function*(){T.emitMany(yield I)}))}static fromPromises(I){return new v(T=>Ee(this,void 0,void 0,function*(){yield Promise.all(I.map(F=>Ee(this,void 0,void 0,function*(){return T.emitOne(yield F)})))}))}static merge(I){return new v(T=>Ee(this,void 0,void 0,function*(){yield Promise.all(I.map(F=>{var R,M,N;return Ee(this,void 0,void 0,function*(){var A,P,x,W;try{for(R=!0,M=St(F);N=yield M.next(),A=N.done,!A;){W=N.value,R=!1;try{const U=W;T.emitOne(U)}finally{R=!0}}}catch(U){P={error:U}}finally{try{!R&&!A&&(x=M.return)&&(yield x.call(M))}finally{if(P)throw P.error}}})}))}))}constructor(I){this._state=0,this._results=[],this._error=null,this._onStateChanged=new y.Emitter,queueMicrotask(()=>Ee(this,void 0,void 0,function*(){const T={emitOne:F=>this.emitOne(F),emitMany:F=>this.emitMany(F),reject:F=>this.reject(F)};try{yield Promise.resolve(I(T)),this.resolve()}catch(F){this.reject(F)}finally{T.emitOne=void 0,T.emitMany=void 0,T.reject=void 0}}))}[Symbol.asyncIterator](){let I=0;return{next:()=>Ee(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(I<this._results.length)return{done:!1,value:this._results[I++]};if(this._state===1)return{done:!0,value:void 0};yield y.Event.toPromise(this._onStateChanged.event)}while(!0)})}}static map(I,T){return new v(F=>Ee(this,void 0,void 0,function*(){var R,M,N,A;try{for(var P=!0,x=St(I),W;W=yield x.next(),R=W.done,!R;){A=W.value,P=!1;try{const U=A;F.emitOne(T(U))}finally{P=!0}}}catch(U){M={error:U}}finally{try{!P&&!R&&(N=x.return)&&(yield N.call(x))}finally{if(M)throw M.error}}}))}map(I){return v.map(this,I)}static filter(I,T){return new v(F=>Ee(this,void 0,void 0,function*(){var R,M,N,A;try{for(var P=!0,x=St(I),W;W=yield x.next(),R=W.done,!R;){A=W.value,P=!1;try{const U=A;T(U)&&F.emitOne(U)}finally{P=!0}}}catch(U){M={error:U}}finally{try{!P&&!R&&(N=x.return)&&(yield N.call(x))}finally{if(M)throw M.error}}}))}filter(I){return v.filter(this,I)}static coalesce(I){return v.filter(I,T=>!!T)}coalesce(){return v.coalesce(this)}static toPromise(I){var T,F,R,M,N,A,P;return Ee(this,void 0,void 0,function*(){const x=[];try{for(T=!0,F=St(I);R=yield F.next(),M=R.done,!M;){P=R.value,T=!1;try{const W=P;x.push(W)}finally{T=!0}}}catch(W){N={error:W}}finally{try{!T&&!M&&(A=F.return)&&(yield A.call(F))}finally{if(N)throw N.error}}return x})}toPromise(){return v.toPromise(this)}emitOne(I){this._state===0&&(this._results.push(I),this._onStateChanged.fire())}emitMany(I){this._state===0&&(this._results=this._results.concat(I),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(I){this._state===0&&(this._state=2,this._error=I,this._onStateChanged.fire())}}v.EMPTY=v.fromArray([]),e.AsyncIterableObject=v;class p extends v{constructor(I,T){super(T),this._source=I}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=p;function L(E){const I=new S.CancellationTokenSource,T=E(I.token);return new p(I,F=>Ee(this,void 0,void 0,function*(){var R,M,N,A;const P=I.token.onCancellationRequested(()=>{P.dispose(),I.dispose(),F.reject(new k.CancellationError)});try{try{for(var x=!0,W=St(T),U;U=yield W.next(),R=U.done,!R;){A=U.value,x=!1;try{const O=A;if(I.token.isCancellationRequested)return;F.emitOne(O)}finally{x=!0}}}catch(O){M={error:O}}finally{try{!x&&!R&&(N=W.return)&&(yield N.call(W))}finally{if(M)throw M.error}}P.dispose(),I.dispose()}catch(O){P.dispose(),I.dispose(),F.reject(O)}}))}e.createCancelableAsyncIterable=L}),define(J[530],ee([1,0,12,2]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class y extends k.Disposable{constructor(w,b,_){super(),this._visibility=w,this._visibleClassName=b,this._invisibleClassName=_,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new S.TimeoutTimer)}setVisibility(w){this._visibility!==w&&(this._visibility=w,this._updateShouldBeVisible())}setShouldBeVisible(w){this._rawShouldBeVisible=w,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const w=this._applyVisibilitySetting();this._shouldBeVisible!==w&&(this._shouldBeVisible=w,this.ensureVisibility())}setIsNeeded(w){this._isNeeded!==w&&(this._isNeeded=w,this.ensureVisibility())}setDomNode(w){this._domNode=w,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(()=>{var w;(w=this._domNode)===null||w===void 0||w.setClassName(this._visibleClassName)},0))}_hide(w){var b;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(b=this._domNode)===null||b===void 0||b.setClassName(this._invisibleClassName+(w?" fade":"")))}}e.ScrollbarVisibilityController=y}),define(J[204],ee([1,0,129,16,12,244,157,6,54]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function h(i){return typeof i=="object"&&"visibility"in i&&"data"in i}e.isFilterResult=h;function m(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}e.getVisibleState=m;function n(i){return typeof i.collapsible=="boolean"}class t{constructor(s,r,c,g={}){this.user=s,this.list=r,this.rootRef=[],this.eventBufferer=new b.EventBufferer,this._onDidChangeCollapseState=new b.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new b.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new b.Emitter,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new y.Delayer(D.MicrotaskDelay),this.collapseByDefault=typeof g.collapseByDefault>"u"?!1:g.collapseByDefault,this.filter=g.filter,this.autoExpandSingleChildren=typeof g.autoExpandSingleChildren>"u"?!1:g.autoExpandSingleChildren,this.root={parent:void 0,element:c,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(s,r,c=_.Iterable.empty(),g={}){if(s.length===0)throw new S.TreeError(this.user,"Invalid tree location");g.diffIdentityProvider?this.spliceSmart(g.diffIdentityProvider,s,r,c,g):this.spliceSimple(s,r,c,g)}spliceSmart(s,r,c,g,o,l){var a;g===void 0&&(g=_.Iterable.empty()),l===void 0&&(l=(a=o.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:d}=this.getParentNodeWithListIndex(r);if(!d.lastDiffIds)return this.spliceSimple(r,c,g,o);const u=[...g],C=r[r.length-1],f=new w.LcsDiff({getElements:()=>d.lastDiffIds},{getElements:()=>[...d.children.slice(0,C),...u,...d.children.slice(C+c)].map(I=>s.getId(I.element).toString())}).ComputeDiff(!1);if(f.quitEarly)return d.lastDiffIds=void 0,this.spliceSimple(r,c,u,o);const v=r.slice(0,-1),p=(I,T,F)=>{if(l>0)for(let R=0;R<F;R++)I--,T--,this.spliceSmart(s,[...v,I,0],Number.MAX_SAFE_INTEGER,u[T].children,o,l-1)};let L=Math.min(d.children.length,C+c),E=u.length;for(const I of f.changes.sort((T,F)=>F.originalStart-T.originalStart))p(L,E,L-(I.originalStart+I.originalLength)),L=I.originalStart,E=I.modifiedStart-C,this.spliceSimple([...v,L],I.originalLength,_.Iterable.slice(u,E,E+I.modifiedLength),o);p(L,E,L)}spliceSimple(s,r,c=_.Iterable.empty(),{onDidCreateNode:g,onDidDeleteNode:o,diffIdentityProvider:l}){const{parentNode:a,listIndex:d,revealed:u,visible:C}=this.getParentNodeWithListIndex(s),f=[],v=_.Iterable.map(c,P=>this.createTreeNode(P,a,a.visible?1:0,u,f,g)),p=s[s.length-1],L=a.children.length>0;let E=0;for(let P=p;P>=0&&P<a.children.length;P--){const x=a.children[P];if(x.visible){E=x.visibleChildIndex;break}}const I=[];let T=0,F=0;for(const P of v)I.push(P),F+=P.renderNodeCount,P.visible&&(P.visibleChildIndex=E+T++);const R=(0,k.splice)(a.children,p,r,I);l?a.lastDiffIds?(0,k.splice)(a.lastDiffIds,p,r,I.map(P=>l.getId(P.element).toString())):a.lastDiffIds=a.children.map(P=>l.getId(P.element).toString()):a.lastDiffIds=void 0;let M=0;for(const P of R)P.visible&&M++;if(M!==0)for(let P=p+I.length;P<a.children.length;P++){const x=a.children[P];x.visible&&(x.visibleChildIndex-=M)}if(a.visibleChildrenCount+=T-M,u&&C){const P=R.reduce((x,W)=>x+(W.visible?W.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,F-P),this.list.splice(d,P,f)}if(R.length>0&&o){const P=x=>{o(x),x.children.forEach(P)};R.forEach(P)}this._onDidSplice.fire({insertedNodes:I,deletedNodes:R});const N=a.children.length>0;L!==N&&this.setCollapsible(s.slice(0,-1),N);let A=a;for(;A;){if(A.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}A=A.parent}}rerender(s){if(s.length===0)throw new S.TreeError(this.user,"Invalid tree location");const{node:r,listIndex:c,revealed:g}=this.getTreeNodeWithListIndex(s);r.visible&&g&&this.list.splice(c,1,[r])}has(s){return this.hasTreeNode(s)}getListIndex(s){const{listIndex:r,visible:c,revealed:g}=this.getTreeNodeWithListIndex(s);return c&&g?r:-1}getListRenderCount(s){return this.getTreeNode(s).renderNodeCount}isCollapsible(s){return this.getTreeNode(s).collapsible}setCollapsible(s,r){const c=this.getTreeNode(s);typeof r>"u"&&(r=!c.collapsible);const g={collapsible:r};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(s,g))}isCollapsed(s){return this.getTreeNode(s).collapsed}setCollapsed(s,r,c){const g=this.getTreeNode(s);typeof r>"u"&&(r=!g.collapsed);const o={collapsed:r,recursive:c||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(s,o))}_setCollapseState(s,r){const{node:c,listIndex:g,revealed:o}=this.getTreeNodeWithListIndex(s),l=this._setListNodeCollapseState(c,g,o,r);if(c!==this.root&&this.autoExpandSingleChildren&&l&&!n(r)&&c.collapsible&&!c.collapsed&&!r.recursive){let a=-1;for(let d=0;d<c.children.length;d++)if(c.children[d].visible)if(a>-1){a=-1;break}else a=d;a>-1&&this._setCollapseState([...s,a],r)}return l}_setListNodeCollapseState(s,r,c,g){const o=this._setNodeCollapseState(s,g,!1);if(!c||!s.visible||!o)return o;const l=s.renderNodeCount,a=this.updateNodeAfterCollapseChange(s),d=l-(r===-1?0:1);return this.list.splice(r+1,d,a.slice(1)),o}_setNodeCollapseState(s,r,c){let g;if(s===this.root?g=!1:(n(r)?(g=s.collapsible!==r.collapsible,s.collapsible=r.collapsible):s.collapsible?(g=s.collapsed!==r.collapsed,s.collapsed=r.collapsed):g=!1,g&&this._onDidChangeCollapseState.fire({node:s,deep:c})),!n(r)&&r.recursive)for(const o of s.children)g=this._setNodeCollapseState(o,r,!0)||g;return g}expandTo(s){this.eventBufferer.bufferEvents(()=>{let r=this.getTreeNode(s);for(;r.parent;)r=r.parent,s=s.slice(0,s.length-1),r.collapsed&&this._setCollapseState(s,{collapsed:!1,recursive:!1})})}refilter(){const s=this.root.renderNodeCount,r=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,s,r),this.refilterDelayer.cancel()}createTreeNode(s,r,c,g,o,l){const a={parent:r,element:s.element,children:[],depth:r.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof s.collapsible=="boolean"?s.collapsible:typeof s.collapsed<"u",collapsed:typeof s.collapsed>"u"?this.collapseByDefault:s.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},d=this._filterNode(a,c);a.visibility=d,g&&o.push(a);const u=s.children||_.Iterable.empty(),C=g&&d!==0&&!a.collapsed;let f=0,v=1;for(const p of u){const L=this.createTreeNode(p,a,d,C,o,l);a.children.push(L),v+=L.renderNodeCount,L.visible&&(L.visibleChildIndex=f++)}return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=f,a.visible=d===2?f>0:d===1,a.visible?a.collapsed||(a.renderNodeCount=v):(a.renderNodeCount=0,g&&o.pop()),l?.(a),a}updateNodeAfterCollapseChange(s){const r=s.renderNodeCount,c=[];return this._updateNodeAfterCollapseChange(s,c),this._updateAncestorsRenderNodeCount(s.parent,c.length-r),c}_updateNodeAfterCollapseChange(s,r){if(s.visible===!1)return 0;if(r.push(s),s.renderNodeCount=1,!s.collapsed)for(const c of s.children)s.renderNodeCount+=this._updateNodeAfterCollapseChange(c,r);return this._onDidChangeRenderNodeCount.fire(s),s.renderNodeCount}updateNodeAfterFilterChange(s){const r=s.renderNodeCount,c=[];return this._updateNodeAfterFilterChange(s,s.visible?1:0,c),this._updateAncestorsRenderNodeCount(s.parent,c.length-r),c}_updateNodeAfterFilterChange(s,r,c,g=!0){let o;if(s!==this.root){if(o=this._filterNode(s,r),o===0)return s.visible=!1,s.renderNodeCount=0,!1;g&&c.push(s)}const l=c.length;s.renderNodeCount=s===this.root?0:1;let a=!1;if(!s.collapsed||o!==0){let d=0;for(const u of s.children)a=this._updateNodeAfterFilterChange(u,o,c,g&&!s.collapsed)||a,u.visible&&(u.visibleChildIndex=d++);s.visibleChildrenCount=d}else s.visibleChildrenCount=0;return s!==this.root&&(s.visible=o===2?a:o===1,s.visibility=o),s.visible?s.collapsed||(s.renderNodeCount+=c.length-l):(s.renderNodeCount=0,g&&c.pop()),this._onDidChangeRenderNodeCount.fire(s),s.visible}_updateAncestorsRenderNodeCount(s,r){if(r!==0)for(;s;)s.renderNodeCount+=r,this._onDidChangeRenderNodeCount.fire(s),s=s.parent}_filterNode(s,r){const c=this.filter?this.filter.filter(s.element,r):1;return typeof c=="boolean"?(s.filterData=void 0,c?1:0):h(c)?(s.filterData=c.data,m(c.visibility)):(s.filterData=void 0,m(c))}hasTreeNode(s,r=this.root){if(!s||s.length===0)return!0;const[c,...g]=s;return c<0||c>r.children.length?!1:this.hasTreeNode(g,r.children[c])}getTreeNode(s,r=this.root){if(!s||s.length===0)return r;const[c,...g]=s;if(c<0||c>r.children.length)throw new S.TreeError(this.user,"Invalid tree location");return this.getTreeNode(g,r.children[c])}getTreeNodeWithListIndex(s){if(s.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:r,listIndex:c,revealed:g,visible:o}=this.getParentNodeWithListIndex(s),l=s[s.length-1];if(l<0||l>r.children.length)throw new S.TreeError(this.user,"Invalid tree location");const a=r.children[l];return{node:a,listIndex:c,revealed:g,visible:o&&a.visible}}getParentNodeWithListIndex(s,r=this.root,c=0,g=!0,o=!0){const[l,...a]=s;if(l<0||l>r.children.length)throw new S.TreeError(this.user,"Invalid tree location");for(let d=0;d<l;d++)c+=r.children[d].renderNodeCount;return g=g&&!r.collapsed,o=o&&r.visible,a.length===0?{parentNode:r,listIndex:c,revealed:g,visible:o}:this.getParentNodeWithListIndex(a,r.children[l],c+1,g,o)}getNode(s=[]){return this.getTreeNode(s)}getNodeLocation(s){const r=[];let c=s;for(;c.parent;)r.push(c.parent.children.indexOf(c)),c=c.parent;return r.reverse()}getParentNodeLocation(s){if(s.length!==0)return s.length===1?[]:(0,k.tail2)(s)[0]}getFirstElementChild(s){const r=this.getTreeNode(s);if(r.children.length!==0)return r.children[0].element}}e.IndexTreeModel=t}),define(J[205],ee([1,0,204,129,54]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class D{constructor(b,_,h={}){this.user=b,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new S.IndexTreeModel(b,_,null,h),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,h.sorter&&(this.sorter={compare(m,n){return h.sorter.compare(m.element,n.element)}}),this.identityProvider=h.identityProvider}setChildren(b,_=y.Iterable.empty(),h={}){const m=this.getElementLocation(b);this._setChildren(m,this.preserveCollapseState(_),h)}_setChildren(b,_=y.Iterable.empty(),h){const m=new Set,n=new Set,t=s=>{var r;if(s.element===null)return;const c=s;if(m.add(c.element),this.nodes.set(c.element,c),this.identityProvider){const g=this.identityProvider.getId(c.element).toString();n.add(g),this.nodesByIdentity.set(g,c)}(r=h.onDidCreateNode)===null||r===void 0||r.call(h,c)},i=s=>{var r;if(s.element===null)return;const c=s;if(m.has(c.element)||this.nodes.delete(c.element),this.identityProvider){const g=this.identityProvider.getId(c.element).toString();n.has(g)||this.nodesByIdentity.delete(g)}(r=h.onDidDeleteNode)===null||r===void 0||r.call(h,c)};this.model.splice([...b,0],Number.MAX_VALUE,_,Object.assign(Object.assign({},h),{onDidCreateNode:t,onDidDeleteNode:i}))}preserveCollapseState(b=y.Iterable.empty()){return this.sorter&&(b=[...b].sort(this.sorter.compare.bind(this.sorter))),y.Iterable.map(b,_=>{let h=this.nodes.get(_.element);if(!h&&this.identityProvider){const t=this.identityProvider.getId(_.element).toString();h=this.nodesByIdentity.get(t)}if(!h){let t;return typeof _.collapsed>"u"?t=void 0:_.collapsed===k.ObjectTreeElementCollapseState.Collapsed||_.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed?t=!0:_.collapsed===k.ObjectTreeElementCollapseState.Expanded||_.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?t=!1:t=!!_.collapsed,Object.assign(Object.assign({},_),{children:this.preserveCollapseState(_.children),collapsed:t})}const m=typeof _.collapsible=="boolean"?_.collapsible:h.collapsible;let n;return typeof _.collapsed>"u"||_.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed||_.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?n=h.collapsed:_.collapsed===k.ObjectTreeElementCollapseState.Collapsed?n=!0:_.collapsed===k.ObjectTreeElementCollapseState.Expanded?n=!1:n=!!_.collapsed,Object.assign(Object.assign({},_),{collapsible:m,collapsed:n,children:this.preserveCollapseState(_.children)})})}rerender(b){const _=this.getElementLocation(b);this.model.rerender(_)}getFirstElementChild(b=null){const _=this.getElementLocation(b);return this.model.getFirstElementChild(_)}has(b){return this.nodes.has(b)}getListIndex(b){const _=this.getElementLocation(b);return this.model.getListIndex(_)}getListRenderCount(b){const _=this.getElementLocation(b);return this.model.getListRenderCount(_)}isCollapsible(b){const _=this.getElementLocation(b);return this.model.isCollapsible(_)}setCollapsible(b,_){const h=this.getElementLocation(b);return this.model.setCollapsible(h,_)}isCollapsed(b){const _=this.getElementLocation(b);return this.model.isCollapsed(_)}setCollapsed(b,_,h){const m=this.getElementLocation(b);return this.model.setCollapsed(m,_,h)}expandTo(b){const _=this.getElementLocation(b);this.model.expandTo(_)}refilter(){this.model.refilter()}getNode(b=null){if(b===null)return this.model.getNode(this.model.rootRef);const _=this.nodes.get(b);if(!_)throw new k.TreeError(this.user,`Tree element not found: ${b}`);return _}getNodeLocation(b){return b.element}getParentNodeLocation(b){if(b===null)throw new k.TreeError(this.user,"Invalid getParentNodeLocation call");const _=this.nodes.get(b);if(!_)throw new k.TreeError(this.user,`Tree element not found: ${b}`);const h=this.model.getNodeLocation(_),m=this.model.getParentNodeLocation(h);return this.model.getNode(m).element}getElementLocation(b){if(b===null)return[];const _=this.nodes.get(b);if(!_)throw new k.TreeError(this.user,`Tree element not found: ${b}`);return this.model.getNodeLocation(_)}}e.ObjectTreeModel=D}),define(J[531],ee([1,0,205,129,6,54]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function w(o){const l=[o.element],a=o.incompressible||!1;return{element:{elements:l,incompressible:a},children:D.Iterable.map(D.Iterable.from(o.children),w),collapsible:o.collapsible,collapsed:o.collapsed}}function b(o){const l=[o.element],a=o.incompressible||!1;let d,u;for(;[u,d]=D.Iterable.consume(D.Iterable.from(o.children),2),!(u.length!==1||u[0].incompressible);)o=u[0],l.push(o.element);return{element:{elements:l,incompressible:a},children:D.Iterable.map(D.Iterable.concat(u,d),b),collapsible:o.collapsible,collapsed:o.collapsed}}e.compress=b;function _(o,l=0){let a;return l<o.element.elements.length-1?a=[_(o,l+1)]:a=D.Iterable.map(D.Iterable.from(o.children),d=>_(d,0)),l===0&&o.element.incompressible?{element:o.element.elements[l],children:a,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[l],children:a,collapsible:o.collapsible,collapsed:o.collapsed}}function h(o){return _(o,0)}e.decompress=h;function m(o,l,a){return o.element===l?Object.assign(Object.assign({},o),{children:a}):Object.assign(Object.assign({},o),{children:D.Iterable.map(D.Iterable.from(o.children),d=>m(d,l,a))})}const n=o=>({getId(l){return l.elements.map(a=>o.getId(a).toString()).join("\\0")}});class t{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(l,a,d={}){this.user=l,this.rootRef=null,this.nodes=new Map,this.model=new S.ObjectTreeModel(l,a,d),this.enabled=typeof d.compressionEnabled>"u"?!0:d.compressionEnabled,this.identityProvider=d.identityProvider}setChildren(l,a=D.Iterable.empty(),d){const u=d.diffIdentityProvider&&n(d.diffIdentityProvider);if(l===null){const F=D.Iterable.map(a,this.enabled?b:w);this._setChildren(null,F,{diffIdentityProvider:u,diffDepth:1/0});return}const C=this.nodes.get(l);if(!C)throw new k.TreeError(this.user,"Unknown compressed tree node");const f=this.model.getNode(C),v=this.model.getParentNodeLocation(C),p=this.model.getNode(v),L=h(f),E=m(L,l,a),I=(this.enabled?b:w)(E),T=p.children.map(F=>F===f?I:F);this._setChildren(p.element,T,{diffIdentityProvider:u,diffDepth:f.depth-p.depth})}setCompressionEnabled(l){if(l===this.enabled)return;this.enabled=l;const d=this.model.getNode().children,u=D.Iterable.map(d,h),C=D.Iterable.map(u,l?b:w);this._setChildren(null,C,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(l,a,d){const u=new Set,C=v=>{for(const p of v.element.elements)u.add(p),this.nodes.set(p,v.element)},f=v=>{for(const p of v.element.elements)u.has(p)||this.nodes.delete(p)};this.model.setChildren(l,a,Object.assign(Object.assign({},d),{onDidCreateNode:C,onDidDeleteNode:f}))}has(l){return this.nodes.has(l)}getListIndex(l){const a=this.getCompressedNode(l);return this.model.getListIndex(a)}getListRenderCount(l){const a=this.getCompressedNode(l);return this.model.getListRenderCount(a)}getNode(l){if(typeof l>"u")return this.model.getNode();const a=this.getCompressedNode(l);return this.model.getNode(a)}getNodeLocation(l){const a=this.model.getNodeLocation(l);return a===null?null:a.elements[a.elements.length-1]}getParentNodeLocation(l){const a=this.getCompressedNode(l),d=this.model.getParentNodeLocation(a);return d===null?null:d.elements[d.elements.length-1]}getFirstElementChild(l){const a=this.getCompressedNode(l);return this.model.getFirstElementChild(a)}isCollapsible(l){const a=this.getCompressedNode(l);return this.model.isCollapsible(a)}setCollapsible(l,a){const d=this.getCompressedNode(l);return this.model.setCollapsible(d,a)}isCollapsed(l){const a=this.getCompressedNode(l);return this.model.isCollapsed(a)}setCollapsed(l,a,d){const u=this.getCompressedNode(l);return this.model.setCollapsed(u,a,d)}expandTo(l){const a=this.getCompressedNode(l);this.model.expandTo(a)}rerender(l){const a=this.getCompressedNode(l);this.model.rerender(a)}refilter(){this.model.refilter()}getCompressedNode(l){if(l===null)return null;const a=this.nodes.get(l);if(!a)throw new k.TreeError(this.user,`Tree element not found: ${l}`);return a}}e.CompressedObjectTreeModel=t;const i=o=>o[o.length-1];e.DefaultElementMapper=i;class s{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(l=>new s(this.unwrapper,l))}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}constructor(l,a){this.unwrapper=l,this.node=a}}function r(o,l){return{splice(a,d,u){l.splice(a,d,u.map(C=>o.map(C)))},updateElementHeight(a,d){l.updateElementHeight(a,d)}}}function c(o,l){return Object.assign(Object.assign({},l),{identityProvider:l.identityProvider&&{getId(a){return l.identityProvider.getId(o(a))}},sorter:l.sorter&&{compare(a,d){return l.sorter.compare(a.elements[0],d.elements[0])}},filter:l.filter&&{filter(a,d){return l.filter.filter(o(a),d)}}})}class g{get onDidSplice(){return y.Event.map(this.model.onDidSplice,({insertedNodes:l,deletedNodes:a})=>({insertedNodes:l.map(d=>this.nodeMapper.map(d)),deletedNodes:a.map(d=>this.nodeMapper.map(d))}))}get onDidChangeCollapseState(){return y.Event.map(this.model.onDidChangeCollapseState,({node:l,deep:a})=>({node:this.nodeMapper.map(l),deep:a}))}get onDidChangeRenderNodeCount(){return y.Event.map(this.model.onDidChangeRenderNodeCount,l=>this.nodeMapper.map(l))}constructor(l,a,d={}){this.rootRef=null,this.elementMapper=d.elementMapper||e.DefaultElementMapper;const u=C=>this.elementMapper(C.elements);this.nodeMapper=new k.WeakMapper(C=>new s(u,C)),this.model=new t(l,r(this.nodeMapper,a),c(u,d))}setChildren(l,a=D.Iterable.empty(),d={}){this.model.setChildren(l,a,d)}setCompressionEnabled(l){this.model.setCompressionEnabled(l)}has(l){return this.model.has(l)}getListIndex(l){return this.model.getListIndex(l)}getListRenderCount(l){return this.model.getListRenderCount(l)}getNode(l){return this.nodeMapper.map(this.model.getNode(l))}getNodeLocation(l){return l.element}getParentNodeLocation(l){return this.model.getParentNodeLocation(l)}getFirstElementChild(l){const a=this.model.getFirstElementChild(l);return a===null||typeof a>"u"?a:this.elementMapper(a.elements)}isCollapsible(l){return this.model.isCollapsible(l)}setCollapsible(l,a){return this.model.setCollapsible(l,a)}isCollapsed(l){return this.model.isCollapsed(l)}setCollapsed(l,a,d){return this.model.setCollapsed(l,a,d)}expandTo(l){return this.model.expandTo(l)}rerender(l){return this.model.rerender(l)}refilter(){return this.model.refilter()}getCompressedTreeNode(l=null){return this.model.getNode(l)}}e.CompressibleObjectTreeModel=g}),define(J[278],ee([1,0,12,202,55,87,17,9]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=void 0,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const _="[/\\\\\\\\]",h="[^/\\\\\\\\]",m=/\\//g;function n(x,W){switch(x){case 0:return"";case 1:return`${h}*?`;default:return`(?:${_}|${h}+${_}${W?`|${_}${h}+`:""})*?`}}function t(x,W){if(!x)return[];const U=[];let O=!1,$=!1,Q="";for(const se of x){switch(se){case W:if(!O&&!$){U.push(Q),Q="";continue}break;case"{":O=!0;break;case"}":O=!1;break;case"[":$=!0;break;case"]":$=!1;break}Q+=se}return Q&&U.push(Q),U}e.splitGlobAware=t;function i(x){if(!x)return"";let W="";const U=t(x,e.GLOB_SPLIT);if(U.every(O=>O===e.GLOBSTAR))W=".*";else{let O=!1;U.forEach(($,Q)=>{if($===e.GLOBSTAR){if(O)return;W+=n(2,Q===U.length-1)}else{let se=!1,le="",te=!1,re="";for(const H of $){if(H!=="}"&&se){le+=H;continue}if(te&&(H!=="]"||!re)){let B;H==="-"?B=H:(H==="^"||H==="!")&&!re?B="^":H===e.GLOB_SPLIT?B="":B=(0,b.escapeRegExpCharacters)(H),re+=B;continue}switch(H){case"{":se=!0;continue;case"[":te=!0;continue;case"}":{const j=`(?:${t(le,",").map(G=>i(G)).join("|")})`;W+=j,se=!1,le="";break}case"]":{W+="["+re+"]",te=!1,re="";break}case"?":W+=h;continue;case"*":W+=n(1);continue;default:W+=(0,b.escapeRegExpCharacters)(H)}}Q<U.length-1&&(U[Q+1]!==e.GLOBSTAR||Q+2<U.length)&&(W+=_)}O=$===e.GLOBSTAR})}return W}const s=/^\\*\\*\\/\\*\\.[\\w\\.-]+$/,r=/^\\*\\*\\/([\\w\\.-]+)\\/?$/,c=/^{\\*\\*\\/\\*?[\\w\\.-]+\\/?(,\\*\\*\\/\\*?[\\w\\.-]+\\/?)*}$/,g=/^{\\*\\*\\/\\*?[\\w\\.-]+(\\/(\\*\\*)?)?(,\\*\\*\\/\\*?[\\w\\.-]+(\\/(\\*\\*)?)?)*}$/,o=/^\\*\\*((\\/[\\w\\.-]+)+)\\/?$/,l=/^([\\w\\.-]+(\\/[\\w\\.-]+)*)\\/?$/,a=new y.LRUCache(1e4),d=function(){return!1},u=function(){return null};function C(x,W){if(!x)return u;let U;typeof x!="string"?U=x.pattern:U=x,U=U.trim();const O=`${U}_${!!W.trimForExclusions}`;let $=a.get(O);if($)return f($,x);let Q;return s.test(U)?$=p(U.substr(4),U):(Q=r.exec(v(U,W)))?$=L(Q[1],U):(W.trimForExclusions?g:c).test(U)?$=E(U,W):(Q=o.exec(v(U,W)))?$=I(Q[1].substr(1),U,!0):(Q=l.exec(v(U,W)))?$=I(Q[1],U,!1):$=T(U),a.set(O,$),f($,x)}function f(x,W){if(typeof W=="string")return x;const U=function(O,$){return(0,k.isEqualOrParent)(O,W.base,!w.isLinux)?x((0,b.ltrim)(O.substr(W.base.length),D.sep),$):null};return U.allBasenames=x.allBasenames,U.allPaths=x.allPaths,U.basenames=x.basenames,U.patterns=x.patterns,U}function v(x,W){return W.trimForExclusions&&x.endsWith("/**")?x.substr(0,x.length-2):x}function p(x,W){return function(U,O){return typeof U=="string"&&U.endsWith(x)?W:null}}function L(x,W){const U=`/${x}`,O=`\\\\${x}`,$=function(se,le){return typeof se!="string"?null:le?le===x?W:null:se===x||se.endsWith(U)||se.endsWith(O)?W:null},Q=[x];return $.basenames=Q,$.patterns=[W],$.allBasenames=Q,$}function E(x,W){const U=P(x.slice(1,-1).split(",").map(le=>C(le,W)).filter(le=>le!==u),x),O=U.length;if(!O)return u;if(O===1)return U[0];const $=function(le,te){for(let re=0,H=U.length;re<H;re++)if(U[re](le,te))return x;return null},Q=U.find(le=>!!le.allBasenames);Q&&($.allBasenames=Q.allBasenames);const se=U.reduce((le,te)=>te.allPaths?le.concat(te.allPaths):le,[]);return se.length&&($.allPaths=se),$}function I(x,W,U){const O=D.sep===D.posix.sep,$=O?x:x.replace(m,D.sep),Q=D.sep+$,se=D.posix.sep+x;let le;return U?le=function(te,re){return typeof te=="string"&&(te===$||te.endsWith(Q)||!O&&(te===x||te.endsWith(se)))?W:null}:le=function(te,re){return typeof te=="string"&&(te===$||!O&&te===x)?W:null},le.allPaths=[(U?"*/":"./")+x],le}function T(x){try{const W=new RegExp(`^${i(x)}$`);return function(U){return W.lastIndex=0,typeof U=="string"&&W.test(U)?x:null}}catch{return u}}function F(x,W,U){return!x||typeof W!="string"?!1:R(x)(W,void 0,U)}e.match=F;function R(x,W={}){if(!x)return d;if(typeof x=="string"||M(x)){const U=C(x,W);if(U===u)return d;const O=function($,Q){return!!U($,Q)};return U.allBasenames&&(O.allBasenames=U.allBasenames),U.allPaths&&(O.allPaths=U.allPaths),O}return N(x,W)}e.parse=R;function M(x){const W=x;return W?typeof W.base=="string"&&typeof W.pattern=="string":!1}e.isRelativePattern=M;function N(x,W){const U=P(Object.getOwnPropertyNames(x).map(le=>A(le,x[le],W)).filter(le=>le!==u)),O=U.length;if(!O)return u;if(!U.some(le=>!!le.requiresSiblings)){if(O===1)return U[0];const le=function(H,B){let j;for(let G=0,Y=U.length;G<Y;G++){const ne=U[G](H,B);if(typeof ne=="string")return ne;(0,S.isThenable)(ne)&&(j||(j=[]),j.push(ne))}return j?(()=>Ee(this,void 0,void 0,function*(){for(const G of j){const Y=yield G;if(typeof Y=="string")return Y}return null}))():null},te=U.find(H=>!!H.allBasenames);te&&(le.allBasenames=te.allBasenames);const re=U.reduce((H,B)=>B.allPaths?H.concat(B.allPaths):H,[]);return re.length&&(le.allPaths=re),le}const $=function(le,te,re){let H,B;for(let j=0,G=U.length;j<G;j++){const Y=U[j];Y.requiresSiblings&&re&&(te||(te=(0,D.basename)(le)),H||(H=te.substr(0,te.length-(0,D.extname)(le).length)));const ne=Y(le,te,H,re);if(typeof ne=="string")return ne;(0,S.isThenable)(ne)&&(B||(B=[]),B.push(ne))}return B?(()=>Ee(this,void 0,void 0,function*(){for(const j of B){const G=yield j;if(typeof G=="string")return G}return null}))():null},Q=U.find(le=>!!le.allBasenames);Q&&($.allBasenames=Q.allBasenames);const se=U.reduce((le,te)=>te.allPaths?le.concat(te.allPaths):le,[]);return se.length&&($.allPaths=se),$}function A(x,W,U){if(W===!1)return u;const O=C(x,U);if(O===u)return u;if(typeof W=="boolean")return O;if(W){const $=W.when;if(typeof $=="string"){const Q=(se,le,te,re)=>{if(!re||!O(se,le))return null;const H=$.replace("$(basename)",()=>te),B=re(H);return(0,S.isThenable)(B)?B.then(j=>j?x:null):B?x:null};return Q.requiresSiblings=!0,Q}}return O}function P(x,W){const U=x.filter(le=>!!le.basenames);if(U.length<2)return x;const O=U.reduce((le,te)=>{const re=te.basenames;return re?le.concat(re):le},[]);let $;if(W){$=[];for(let le=0,te=O.length;le<te;le++)$.push(W)}else $=U.reduce((le,te)=>{const re=te.patterns;return re?le.concat(re):le},[]);const Q=function(le,te){if(typeof le!="string")return null;if(!te){let H;for(H=le.length;H>0;H--){const B=le.charCodeAt(H-1);if(B===47||B===92)break}te=le.substr(H)}const re=O.indexOf(te);return re!==-1?$[re]:null};Q.basenames=O,Q.patterns=$,Q.allBasenames=O;const se=x.filter(le=>!le.basenames);return se.push(Q),se}}),define(J[279],ee([1,0,6]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IME=e.IMEImpl=void 0;class k{constructor(){this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}e.IMEImpl=k,e.IME=new k}),define(J[172],ee([1,0,6,2]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=void 0;class y{constructor(i,s,r,c,g,o,l){this._forceIntegerValues=i,this._scrollStateBrand=void 0,this._forceIntegerValues&&(s=s|0,r=r|0,c=c|0,g=g|0,o=o|0,l=l|0),this.rawScrollLeft=c,this.rawScrollTop=l,s<0&&(s=0),c+s>r&&(c=r-s),c<0&&(c=0),g<0&&(g=0),l+g>o&&(l=o-g),l<0&&(l=0),this.width=s,this.scrollWidth=r,this.scrollLeft=c,this.height=g,this.scrollHeight=o,this.scrollTop=l}equals(i){return this.rawScrollLeft===i.rawScrollLeft&&this.rawScrollTop===i.rawScrollTop&&this.width===i.width&&this.scrollWidth===i.scrollWidth&&this.scrollLeft===i.scrollLeft&&this.height===i.height&&this.scrollHeight===i.scrollHeight&&this.scrollTop===i.scrollTop}withScrollDimensions(i,s){return new y(this._forceIntegerValues,typeof i.width<"u"?i.width:this.width,typeof i.scrollWidth<"u"?i.scrollWidth:this.scrollWidth,s?this.rawScrollLeft:this.scrollLeft,typeof i.height<"u"?i.height:this.height,typeof i.scrollHeight<"u"?i.scrollHeight:this.scrollHeight,s?this.rawScrollTop:this.scrollTop)}withScrollPosition(i){return new y(this._forceIntegerValues,this.width,this.scrollWidth,typeof i.scrollLeft<"u"?i.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof i.scrollTop<"u"?i.scrollTop:this.rawScrollTop)}createScrollEvent(i,s){const r=this.width!==i.width,c=this.scrollWidth!==i.scrollWidth,g=this.scrollLeft!==i.scrollLeft,o=this.height!==i.height,l=this.scrollHeight!==i.scrollHeight,a=this.scrollTop!==i.scrollTop;return{inSmoothScrolling:s,oldWidth:i.width,oldScrollWidth:i.scrollWidth,oldScrollLeft:i.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:i.height,oldScrollHeight:i.scrollHeight,oldScrollTop:i.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:r,scrollWidthChanged:c,scrollLeftChanged:g,heightChanged:o,scrollHeightChanged:l,scrollTopChanged:a}}}e.ScrollState=y;class D extends k.Disposable{constructor(i){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new S.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=i.smoothScrollDuration,this._scheduleAtNextAnimationFrame=i.scheduleAtNextAnimationFrame,this._state=new y(i.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(i){this._smoothScrollDuration=i}validateScrollPosition(i){return this._state.withScrollPosition(i)}getScrollDimensions(){return this._state}setScrollDimensions(i,s){var r;const c=this._state.withScrollDimensions(i,s);this._setState(c,!!this._smoothScrolling),(r=this._smoothScrolling)===null||r===void 0||r.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(i){const s=this._state.withScrollPosition(i);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(s,!1)}setScrollPositionSmooth(i,s){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(i);if(this._smoothScrolling){i={scrollLeft:typeof i.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:i.scrollLeft,scrollTop:typeof i.scrollTop>"u"?this._smoothScrolling.to.scrollTop:i.scrollTop};const r=this._state.withScrollPosition(i);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let c;s?c=new h(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):c=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=c}else{const r=this._state.withScrollPosition(i);this._smoothScrolling=h.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const i=this._smoothScrolling.tick(),s=this._state.withScrollPosition(i);if(this._setState(s,!0),!!this._smoothScrolling){if(i.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(i,s){const r=this._state;r.equals(i)||(this._state=i,this._onScroll.fire(this._state.createScrollEvent(r,s)))}}e.Scrollable=D;class w{constructor(i,s,r){this.scrollLeft=i,this.scrollTop=s,this.isDone=r}}e.SmoothScrollingUpdate=w;function b(t,i){const s=i-t;return function(r){return t+s*n(r)}}function _(t,i,s){return function(r){return r<s?t(r/s):i((r-s)/(1-s))}}class h{constructor(i,s,r,c){this.from=i,this.to=s,this.duration=c,this.startTime=r,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(i,s,r){if(Math.abs(i-s)>2.5*r){let g,o;return i<s?(g=i+.75*r,o=s-.75*r):(g=i-.75*r,o=s+.75*r),_(b(i,g),b(o,s),.33)}return b(i,s)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(i){this.to=i.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(i){const s=(i-this.startTime)/this.duration;if(s<1){const r=this.scrollLeft(s),c=this.scrollTop(s);return new w(r,c,!1)}return new w(this.to.scrollLeft,this.to.scrollTop,!0)}combine(i,s,r){return h.start(i,s,r)}static start(i,s,r){r=r+10;const c=Date.now()-10;return new h(i,s,c,r)}}e.SmoothScrollingOperation=h;function m(t){return Math.pow(t,3)}function n(t){return 1-m(1-t)}}),define(J[20],ee([1,0,87,17]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const y=/^\\w[\\w\\d+.-]*$/,D=/^\\//,w=/^\\/\\//;function b(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&&!y.test(f.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(f.path){if(f.authority){if(!D.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(w.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 _(f,v){return!f&&!v?"file":f}function h(f,v){switch(f){case"https":case"http":case"file":v?v[0]!==n&&(v=n+v):v=n;break}return v}const m="",n="/",t=/^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;class i{static isUri(v){return v instanceof i?!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}constructor(v,p,L,E,I,T=!1){typeof v=="object"?(this.scheme=v.scheme||m,this.authority=v.authority||m,this.path=v.path||m,this.query=v.query||m,this.fragment=v.fragment||m):(this.scheme=_(v,T),this.authority=p||m,this.path=h(this.scheme,L||m),this.query=E||m,this.fragment=I||m,b(this,T))}get fsPath(){return l(this,!1)}with(v){if(!v)return this;let{scheme:p,authority:L,path:E,query:I,fragment:T}=v;return p===void 0?p=this.scheme:p===null&&(p=m),L===void 0?L=this.authority:L===null&&(L=m),E===void 0?E=this.path:E===null&&(E=m),I===void 0?I=this.query:I===null&&(I=m),T===void 0?T=this.fragment:T===null&&(T=m),p===this.scheme&&L===this.authority&&E===this.path&&I===this.query&&T===this.fragment?this:new r(p,L,E,I,T)}static parse(v,p=!1){const L=t.exec(v);return L?new r(L[2]||m,C(L[4]||m),C(L[5]||m),C(L[7]||m),C(L[9]||m),p):new r(m,m,m,m,m)}static file(v){let p=m;if(k.isWindows&&(v=v.replace(/\\\\/g,n)),v[0]===n&&v[1]===n){const L=v.indexOf(n,2);L===-1?(p=v.substring(2),v=n):(p=v.substring(2,L),v=v.substring(L)||n)}return new r("file",p,v,m,m)}static from(v){const p=new r(v.scheme,v.authority,v.path,v.query,v.fragment);return b(p,!0),p}static joinPath(v,...p){if(!v.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let L;return k.isWindows&&v.scheme==="file"?L=i.file(S.win32.join(l(v,!0),...p)).path:L=S.posix.join(v.path,...p),v.with({path:L})}toString(v=!1){return a(this,v)}toJSON(){return this}static revive(v){if(v){if(v instanceof i)return v;{const p=new r(v);return p._formatted=v.external,p._fsPath=v._sep===s?v.fsPath:null,p}}else return v}}e.URI=i;const s=k.isWindows?1:void 0;class r extends i{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=l(this,!1)),this._fsPath}toString(v=!1){return v?a(this,!0):(this._formatted||(this._formatted=a(this,!1)),this._formatted)}toJSON(){const v={$mid:1};return this._fsPath&&(v.fsPath=this._fsPath,v._sep=s),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 c={[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 g(f,v,p){let L,E=-1;for(let I=0;I<f.length;I++){const T=f.charCodeAt(I);if(T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===45||T===46||T===95||T===126||v&&T===47||p&&T===91||p&&T===93||p&&T===58)E!==-1&&(L+=encodeURIComponent(f.substring(E,I)),E=-1),L!==void 0&&(L+=f.charAt(I));else{L===void 0&&(L=f.substr(0,I));const F=c[T];F!==void 0?(E!==-1&&(L+=encodeURIComponent(f.substring(E,I)),E=-1),L+=F):E===-1&&(E=I)}}return E!==-1&&(L+=encodeURIComponent(f.substring(E))),L!==void 0?L:f}function o(f){let v;for(let p=0;p<f.length;p++){const L=f.charCodeAt(p);L===35||L===63?(v===void 0&&(v=f.substr(0,p)),v+=c[L]):v!==void 0&&(v+=f[p])}return v!==void 0?v:f}function l(f,v){let p;return f.authority&&f.path.length>1&&f.scheme==="file"?p=`//${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?p=f.path.substr(1):p=f.path[1].toLowerCase()+f.path.substr(2):p=f.path,k.isWindows&&(p=p.replace(/\\//g,"\\\\")),p}e.uriToFsPath=l;function a(f,v){const p=v?o:g;let L="",{scheme:E,authority:I,path:T,query:F,fragment:R}=f;if(E&&(L+=E,L+=":"),(I||E==="file")&&(L+=n,L+=n),I){let M=I.indexOf("@");if(M!==-1){const N=I.substr(0,M);I=I.substr(M+1),M=N.lastIndexOf(":"),M===-1?L+=p(N,!1,!1):(L+=p(N.substr(0,M),!1,!1),L+=":",L+=p(N.substr(M+1),!1,!0)),L+="@"}I=I.toLowerCase(),M=I.lastIndexOf(":"),M===-1?L+=p(I,!1,!0):(L+=p(I.substr(0,M),!1,!0),L+=I.substr(M))}if(T){if(T.length>=3&&T.charCodeAt(0)===47&&T.charCodeAt(2)===58){const M=T.charCodeAt(1);M>=65&&M<=90&&(T=`/${String.fromCharCode(M+32)}:${T.substr(3)}`)}else if(T.length>=2&&T.charCodeAt(1)===58){const M=T.charCodeAt(0);M>=65&&M<=90&&(T=`${String.fromCharCode(M+32)}:${T.substr(2)}`)}L+=p(T,!0,!1)}return F&&(L+="?",L+=p(F,!1,!1)),R&&(L+="#",L+=v?R:g(R,!1,!1)),L}function d(f){try{return decodeURIComponent(f)}catch{return f.length>3?f.substr(0,3)+d(f.substr(3)):f}}const u=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(f){return f.match(u)?f.replace(u,v=>d(v)):f}}),define(J[206],ee([1,0,130,20]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=void 0;function y(w){let b=JSON.parse(w);return b=D(b),b}e.parse=y;function D(w,b=0){if(!w||b>200)return w;if(typeof w=="object"){switch(w.$mid){case 1:return k.URI.revive(w);case 2:return new RegExp(w.source,w.flags);case 16:return new Date(w.source)}if(w instanceof S.VSBuffer||w instanceof Uint8Array)return w;if(Array.isArray(w))for(let _=0;_<w.length;++_)w[_]=D(w[_],b+1);else for(const _ in w)Object.hasOwnProperty.call(w,_)&&(w[_]=D(w[_],b+1))}return w}e.revive=D}),define(J[49],ee([1,0,11,17,20]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.RemoteAuthorities=e.connectionTokenQueryName=e.Schemas=void 0;var D;(function(h){h.inMemory="inmemory",h.vscode="vscode",h.internal="private",h.walkThrough="walkThrough",h.walkThroughSnippet="walkThroughSnippet",h.http="http",h.https="https",h.file="file",h.mailto="mailto",h.untitled="untitled",h.data="data",h.command="command",h.vscodeRemote="vscode-remote",h.vscodeRemoteResource="vscode-remote-resource",h.vscodeUserData="vscode-userdata",h.vscodeCustomEditor="vscode-custom-editor",h.vscodeNotebookCell="vscode-notebook-cell",h.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",h.vscodeNotebookCellOutput="vscode-notebook-cell-output",h.vscodeInteractive="vscode-interactive",h.vscodeInteractiveInput="vscode-interactive-input",h.vscodeSettings="vscode-settings",h.vscodeWorkspaceTrust="vscode-workspace-trust",h.vscodeTerminal="vscode-terminal",h.webviewPanel="webview-panel",h.vscodeWebview="vscode-webview",h.extension="extension",h.vscodeFileResource="vscode-file",h.tmp="tmp",h.vsls="vsls",h.vscodeSourceControl="vscode-scm"})(D=e.Schemas||(e.Schemas={})),e.connectionTokenQueryName="tkn";class w{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${D.vscodeRemoteResource}`}setPreferredWebSchema(m){this._preferredWebSchema=m}rewrite(m){if(this._delegate)try{return this._delegate(m)}catch(c){return S.onUnexpectedError(c),m}const n=m.authority;let t=this._hosts[n];t&&t.indexOf(":")!==-1&&t.indexOf("[")===-1&&(t=`[${t}]`);const i=this._ports[n],s=this._connectionTokens[n];let r=`path=${encodeURIComponent(m.path)}`;return typeof s=="string"&&(r+=`&${e.connectionTokenQueryName}=${encodeURIComponent(s)}`),y.URI.from({scheme:k.isWeb?this._preferredWebSchema:D.vscodeRemoteResource,authority:`${t}:${i}`,path:this._remoteResourcesPath,query:r})}}e.RemoteAuthorities=new w;class b{uriToBrowserUri(m){return m.scheme===D.vscodeRemote?e.RemoteAuthorities.rewrite(m):m.scheme===D.file&&(k.isNative||k.isWebWorker&&k.globals.origin===`${D.vscodeFileResource}://${b.FALLBACK_AUTHORITY}`)?m.with({scheme:D.vscodeFileResource,authority:m.authority||b.FALLBACK_AUTHORITY,query:null,fragment:null}):m}}b.FALLBACK_AUTHORITY="vscode-app",e.FileAccess=new b;var _;(function(h){const m=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);h.CoopAndCoep=Object.freeze(m.get("3"));const n="vscode-coi";function t(s){let r;typeof s=="string"?r=new URL(s).searchParams:s instanceof URL?r=s.searchParams:y.URI.isUri(s)&&(r=new URL(s.toString(!0)).searchParams);const c=r?.get(n);if(c)return m.get(c)}h.getHeadersFromQuery=t;function i(s,r,c){if(!globalThis.crossOriginIsolated)return;const g=r&&c?"3":c?"2":"1";s instanceof URLSearchParams?s.set(n,g):s[n]=g}h.addSearchParam=i})(_=e.COI||(e.COI={}))}),define(J[7],ee([1,0,46,203,44,66,11,6,280,2,49,17]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.h=e.DragAndDropObserver=e.ModifierKeyEmitter=e.basicMarkupHtmlTags=e.hookDomPurifyHrefAndSrcSanitizer=e.asCssValueWithDefault=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenNoOpener=e.computeScreenAwareSize=e.hide=e.show=e.setVisibility=e.$=e.Namespace=e.reset=e.prepend=e.append=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.isEventLike=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.getDomNodeZoomLevel=e.getDomNodePagePosition=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.addDisposableGenericMouseUpListener=e.addDisposableGenericMouseDownListener=e.addStandardDisposableGenericMouseUpListener=e.addStandardDisposableGenericMouseDownListener=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=void 0;function t(be){for(;be.firstChild;)be.firstChild.remove()}e.clearNode=t;function i(be){var Se;return(Se=be?.isConnected)!==null&&Se!==void 0?Se:!1}e.isInDOM=i;class s{constructor(Se,Te,Pe,Fe){this._node=Se,this._type=Te,this._handler=Pe,this._options=Fe||!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(be,Se,Te,Pe){return new s(be,Se,Te,Pe)}e.addDisposableListener=r;function c(be){return function(Se){return be(new D.StandardMouseEvent(Se))}}function g(be){return function(Se){return be(new y.StandardKeyboardEvent(Se))}}const o=function(Se,Te,Pe,Fe){let Oe=Pe;return Te==="click"||Te==="mousedown"?Oe=c(Pe):(Te==="keydown"||Te==="keypress"||Te==="keyup")&&(Oe=g(Pe)),r(Se,Te,Oe,Fe)};e.addStandardDisposableListener=o;const l=function(Se,Te,Pe){const Fe=c(Te);return d(Se,Fe,Pe)};e.addStandardDisposableGenericMouseDownListener=l;const a=function(Se,Te,Pe){const Fe=c(Te);return u(Se,Fe,Pe)};e.addStandardDisposableGenericMouseUpListener=a;function d(be,Se,Te){return r(be,n.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,Se,Te)}e.addDisposableGenericMouseDownListener=d;function u(be,Se,Te){return r(be,n.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,Se,Te)}e.addDisposableGenericMouseUpListener=u;class C{constructor(Se,Te=0){this._runner=Se,this.priority=Te,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(Se){(0,w.onUnexpectedError)(Se)}}static sort(Se,Te){return Te.priority-Se.priority}}(function(){let be=[],Se=null,Te=!1,Pe=!1;const Fe=()=>{for(Te=!1,Se=be,be=[],Pe=!0;Se.length>0;)Se.sort(C.sort),Se.shift().execute();Pe=!1};e.scheduleAtNextAnimationFrame=(Oe,xe=0)=>{const Ke=new C(Oe,xe);return be.push(Ke),Te||(Te=!0,requestAnimationFrame(Fe)),Ke},e.runAtThisOrScheduleAtNextAnimationFrame=(Oe,xe)=>{if(Pe){const Ke=new C(Oe,xe);return Se.push(Ke),Ke}else return(0,e.scheduleAtNextAnimationFrame)(Oe,xe)}})();function f(be){return document.defaultView.getComputedStyle(be,null)}e.getComputedStyle=f;function v(be){if(be!==document.body)return new L(be.clientWidth,be.clientHeight);if(n.isIOS&&window.visualViewport)return new L(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new L(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new L(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new L(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=v;class p{static convertToPixels(Se,Te){return parseFloat(Te)||0}static getDimension(Se,Te,Pe){const Fe=f(Se),Oe=Fe?Fe.getPropertyValue(Te):"0";return p.convertToPixels(Se,Oe)}static getBorderLeftWidth(Se){return p.getDimension(Se,"border-left-width","borderLeftWidth")}static getBorderRightWidth(Se){return p.getDimension(Se,"border-right-width","borderRightWidth")}static getBorderTopWidth(Se){return p.getDimension(Se,"border-top-width","borderTopWidth")}static getBorderBottomWidth(Se){return p.getDimension(Se,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(Se){return p.getDimension(Se,"padding-left","paddingLeft")}static getPaddingRight(Se){return p.getDimension(Se,"padding-right","paddingRight")}static getPaddingTop(Se){return p.getDimension(Se,"padding-top","paddingTop")}static getPaddingBottom(Se){return p.getDimension(Se,"padding-bottom","paddingBottom")}static getMarginLeft(Se){return p.getDimension(Se,"margin-left","marginLeft")}static getMarginTop(Se){return p.getDimension(Se,"margin-top","marginTop")}static getMarginRight(Se){return p.getDimension(Se,"margin-right","marginRight")}static getMarginBottom(Se){return p.getDimension(Se,"margin-bottom","marginBottom")}}class L{constructor(Se,Te){this.width=Se,this.height=Te}with(Se=this.width,Te=this.height){return Se!==this.width||Te!==this.height?new L(Se,Te):this}static is(Se){return typeof Se=="object"&&typeof Se.height=="number"&&typeof Se.width=="number"}static lift(Se){return Se instanceof L?Se:new L(Se.width,Se.height)}static equals(Se,Te){return Se===Te?!0:!Se||!Te?!1:Se.width===Te.width&&Se.height===Te.height}}L.None=new L(0,0),e.Dimension=L;function E(be){let Se=be.offsetParent,Te=be.offsetTop,Pe=be.offsetLeft;for(;(be=be.parentNode)!==null&&be!==document.body&&be!==document.documentElement;){Te-=be.scrollTop;const Fe=U(be)?null:f(be);Fe&&(Pe-=Fe.direction!=="rtl"?be.scrollLeft:-be.scrollLeft),be===Se&&(Pe+=p.getBorderLeftWidth(be),Te+=p.getBorderTopWidth(be),Te+=be.offsetTop,Pe+=be.offsetLeft,Se=be.offsetParent)}return{left:Pe,top:Te}}e.getTopLeftOffset=E;function I(be,Se,Te){typeof Se=="number"&&(be.style.width=`${Se}px`),typeof Te=="number"&&(be.style.height=`${Te}px`)}e.size=I;function T(be){const Se=be.getBoundingClientRect();return{left:Se.left+window.scrollX,top:Se.top+window.scrollY,width:Se.width,height:Se.height}}e.getDomNodePagePosition=T;function F(be){let Se=be,Te=1;do{const Pe=f(Se).zoom;Pe!=null&&Pe!=="1"&&(Te*=Pe),Se=Se.parentElement}while(Se!==null&&Se!==document.documentElement);return Te}e.getDomNodeZoomLevel=F;function R(be){const Se=p.getMarginLeft(be)+p.getMarginRight(be);return be.offsetWidth+Se}e.getTotalWidth=R;function M(be){const Se=p.getBorderLeftWidth(be)+p.getBorderRightWidth(be),Te=p.getPaddingLeft(be)+p.getPaddingRight(be);return be.offsetWidth-Se-Te}e.getContentWidth=M;function N(be){const Se=p.getBorderTopWidth(be)+p.getBorderBottomWidth(be),Te=p.getPaddingTop(be)+p.getPaddingBottom(be);return be.offsetHeight-Se-Te}e.getContentHeight=N;function A(be){const Se=p.getMarginTop(be)+p.getMarginBottom(be);return be.offsetHeight+Se}e.getTotalHeight=A;function P(be,Se){for(;be;){if(be===Se)return!0;be=be.parentNode}return!1}e.isAncestor=P;function x(be,Se,Te){for(;be&&be.nodeType===be.ELEMENT_NODE;){if(be.classList.contains(Se))return be;if(Te){if(typeof Te=="string"){if(be.classList.contains(Te))return null}else if(be===Te)return null}be=be.parentNode}return null}e.findParentWithClass=x;function W(be,Se,Te){return!!x(be,Se,Te)}e.hasParentWithClass=W;function U(be){return be&&!!be.host&&!!be.mode}e.isShadowRoot=U;function O(be){return!!$(be)}e.isInShadowDOM=O;function $(be){for(;be.parentNode;){if(be===document.body)return null;be=be.parentNode}return U(be)?be:null}e.getShadowRoot=$;function Q(){let be=document.activeElement;for(;be?.shadowRoot;)be=be.shadowRoot.activeElement;return be}e.getActiveElement=Q;function se(be=document.getElementsByTagName("head")[0],Se){const Te=document.createElement("style");return Te.type="text/css",Te.media="screen",Se?.(Te),be.appendChild(Te),Te}e.createStyleSheet=se;let le=null;function te(){return le||(le=se()),le}function re(be){var Se,Te;return!((Se=be?.sheet)===null||Se===void 0)&&Se.rules?be.sheet.rules:!((Te=be?.sheet)===null||Te===void 0)&&Te.cssRules?be.sheet.cssRules:[]}function H(be,Se,Te=te()){!Te||!Se||Te.sheet.insertRule(be+"{"+Se+"}",0)}e.createCSSRule=H;function B(be,Se=te()){if(!Se)return;const Te=re(Se),Pe=[];for(let Fe=0;Fe<Te.length;Fe++)Te[Fe].selectorText.indexOf(be)!==-1&&Pe.push(Fe);for(let Fe=Pe.length-1;Fe>=0;Fe--)Se.sheet.deleteRule(Pe[Fe])}e.removeCSSRulesContainingSelector=B;function j(be){return typeof HTMLElement=="object"?be instanceof HTMLElement:be&&typeof be=="object"&&be.nodeType===1&&typeof be.nodeName=="string"}e.isHTMLElement=j,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",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",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:S.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:S.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:S.isWebKit?"webkitAnimationIteration":"animationiteration"};function G(be){const Se=be;return!!(Se&&typeof Se.preventDefault=="function"&&typeof Se.stopPropagation=="function")}e.isEventLike=G,e.EventHelper={stop:(be,Se)=>(be.preventDefault(),Se&&be.stopPropagation(),be)};function Y(be){const Se=[];for(let Te=0;be&&be.nodeType===be.ELEMENT_NODE;Te++)Se[Te]=be.scrollTop,be=be.parentNode;return Se}e.saveParentsScrollTop=Y;function ne(be,Se){for(let Te=0;be&&be.nodeType===be.ELEMENT_NODE;Te++)be.scrollTop!==Se[Te]&&(be.scrollTop=Se[Te]),be=be.parentNode}e.restoreParentsScrollTop=ne;class de extends h.Disposable{static hasFocusWithin(Se){const Te=$(Se),Pe=Te?Te.activeElement:document.activeElement;return P(Pe,Se)}constructor(Se){super(),this._onDidFocus=this._register(new b.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new b.Emitter),this.onDidBlur=this._onDidBlur.event;let Te=de.hasFocusWithin(Se),Pe=!1;const Fe=()=>{Pe=!1,Te||(Te=!0,this._onDidFocus.fire())},Oe=()=>{Te&&(Pe=!0,window.setTimeout(()=>{Pe&&(Pe=!1,Te=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{de.hasFocusWithin(Se)!==Te&&(Te?Oe():Fe())},this._register(r(Se,e.EventType.FOCUS,Fe,!0)),this._register(r(Se,e.EventType.BLUR,Oe,!0)),this._register(r(Se,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(r(Se,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler()))}}function he(be){return new de(be)}e.trackFocus=he;function oe(be,...Se){if(be.append(...Se),Se.length===1&&typeof Se[0]!="string")return Se[0]}e.append=oe;function ce(be,Se){return be.insertBefore(Se,be.firstChild),Se}e.prepend=ce;function z(be,...Se){be.innerText="",oe(be,...Se)}e.reset=z;const V=/([\\w\\-]+)?(#([\\w\\-]+))?((\\.([\\w\\-]+))*)/;var K;(function(be){be.HTML="http://www.w3.org/1999/xhtml",be.SVG="http://www.w3.org/2000/svg"})(K=e.Namespace||(e.Namespace={}));function ie(be,Se,Te,...Pe){const Fe=V.exec(Se);if(!Fe)throw new Error("Bad use of emmet");const Oe=Fe[1]||"div";let xe;return be!==K.HTML?xe=document.createElementNS(be,Oe):xe=document.createElement(Oe),Fe[3]&&(xe.id=Fe[3]),Fe[4]&&(xe.className=Fe[4].replace(/\\./g," ").trim()),Te&&Object.entries(Te).forEach(([Ke,Ye])=>{typeof Ye>"u"||(/^on\\w+$/.test(Ke)?xe[Ke]=Ye:Ke==="selected"?Ye&&xe.setAttribute(Ke,"true"):xe.setAttribute(Ke,Ye))}),xe.append(...Pe),xe}function X(be,Se,...Te){return ie(K.HTML,be,Se,...Te)}e.$=X,X.SVG=function(be,Se,...Te){return ie(K.SVG,be,Se,...Te)};function Z(be,...Se){be?ue(...Se):me(...Se)}e.setVisibility=Z;function ue(...be){for(const Se of be)Se.style.display="",Se.removeAttribute("aria-hidden")}e.show=ue;function me(...be){for(const Se of be)Se.style.display="none",Se.setAttribute("aria-hidden","true")}e.hide=me;function Ce(be){const Se=window.devicePixelRatio*be;return Math.max(1,Math.floor(Se))/window.devicePixelRatio}e.computeScreenAwareSize=Ce;function _e(be){window.open(be,"_blank","noopener")}e.windowOpenNoOpener=_e;function we(be){const Se=()=>{be(),Te=(0,e.scheduleAtNextAnimationFrame)(Se)};let Te=(0,e.scheduleAtNextAnimationFrame)(Se);return(0,h.toDisposable)(()=>Te.dispose())}e.animate=we,m.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function ye(be){return be?`url(\'${m.FileAccess.uriToBrowserUri(be).toString(!0).replace(/\'/g,"%27")}\')`:"url(\'\')"}e.asCSSUrl=ye;function ke(be){return`\'${be.replace(/\'/g,"%27")}\'`}e.asCSSPropertyValue=ke;function De(be,Se){if(be!==void 0){const Te=be.match(/^\\s*var\\((.+)\\)$/);if(Te){const Pe=Te[1].split(",",2);return Pe.length===2&&(Se=De(Pe[1].trim(),Se)),`var(${Pe[0]}, ${Se})`}return be}return Se}e.asCssValueWithDefault=De;function ge(be,Se=!1){const Te=document.createElement("a");return _.addHook("afterSanitizeAttributes",Pe=>{for(const Fe of["href","src"])if(Pe.hasAttribute(Fe)){const Oe=Pe.getAttribute(Fe);if(Fe==="href"&&Oe.startsWith("#"))continue;if(Te.href=Oe,!be.includes(Te.protocol.replace(/:$/,""))){if(Se&&Fe==="src"&&Te.href.startsWith("data:"))continue;Pe.removeAttribute(Fe)}}}),(0,h.toDisposable)(()=>{_.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=ge,e.basicMarkupHtmlTags=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);const pe=Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class ae extends b.Emitter{constructor(){super(),this._subscriptions=new h.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(r(window,"keydown",Se=>{if(Se.defaultPrevented)return;const Te=new y.StandardKeyboardEvent(Se);if(!(Te.keyCode===6&&Se.repeat)){if(Se.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Se.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Se.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Se.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(Te.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Se.altKey,this._keyStatus.ctrlKey=Se.ctrlKey,this._keyStatus.metaKey=Se.metaKey,this._keyStatus.shiftKey=Se.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Se,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(r(window,"keyup",Se=>{Se.defaultPrevented||(!Se.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Se.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Se.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Se.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=Se.altKey,this._keyStatus.ctrlKey=Se.ctrlKey,this._keyStatus.metaKey=Se.metaKey,this._keyStatus.shiftKey=Se.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Se,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(r(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(r(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(r(document.body,"mousemove",Se=>{Se.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(r(window,"blur",()=>{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 ae.instance||(ae.instance=new ae),ae.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=ae;class ve extends h.Disposable{constructor(Se,Te){super(),this.element=Se,this.callbacks=Te,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(r(this.element,e.EventType.DRAG_ENTER,Se=>{this.counter++,this.dragStartTime=Se.timeStamp,this.callbacks.onDragEnter(Se)})),this._register(r(this.element,e.EventType.DRAG_OVER,Se=>{var Te,Pe;Se.preventDefault(),(Pe=(Te=this.callbacks).onDragOver)===null||Pe===void 0||Pe.call(Te,Se,Se.timeStamp-this.dragStartTime)})),this._register(r(this.element,e.EventType.DRAG_LEAVE,Se=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(Se))})),this._register(r(this.element,e.EventType.DRAG_END,Se=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(Se)})),this._register(r(this.element,e.EventType.DROP,Se=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(Se)}))}}e.DragAndDropObserver=ve;const Le=/(?<tag>[\\w\\-]+)?(?:#(?<id>[\\w\\-]+))?(?<class>(?:\\.(?:[\\w\\-]+))*)(?:@(?<name>(?:[\\w\\_])+))?/;function Ie(be,...Se){let Te,Pe;Array.isArray(Se[0])?(Te={},Pe=Se[0]):(Te=Se[0]||{},Pe=Se[1]);const Fe=Le.exec(be);if(!Fe||!Fe.groups)throw new Error("Bad use of h");const Oe=Fe.groups.tag||"div",xe=document.createElement(Oe);Fe.groups.id&&(xe.id=Fe.groups.id);const Ke=[];if(Fe.groups.class)for(const qe of Fe.groups.class.split("."))qe!==""&&Ke.push(qe);if(Te.className!==void 0)for(const qe of Te.className.split("."))qe!==""&&Ke.push(qe);Ke.length>0&&(xe.className=Ke.join(" "));const Ye={};if(Fe.groups.name&&(Ye[Fe.groups.name]=xe),Pe)for(const qe of Pe)qe instanceof HTMLElement?xe.appendChild(qe):typeof qe=="string"?xe.append(qe):(Object.assign(Ye,qe),xe.appendChild(qe.root));for(const[qe,st]of Object.entries(Te))if(qe!=="className")if(qe==="style")for(const[Ve,Me]of Object.entries(st))xe.style.setProperty(Ae(Ve),typeof Me=="number"?Me+"px":""+Me);else qe==="tabIndex"?xe.tabIndex=st:xe.setAttribute(Ae(qe),st.toString());return Ye.root=xe,Ye}e.h=Ie;function Ae(be){return be.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}),define(J[207],ee([1,0,7]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function k(n,t={}){const i=D(t);return i.textContent=n,i}e.renderText=k;function y(n,t={}){const i=D(t);return b(i,_(n,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}e.renderFormattedText=y;function D(n){const t=n.inline?"span":"div",i=document.createElement(t);return n.className&&(i.className=n.className),i}e.createElement=D;class w{constructor(t){this.source=t,this.index=0}eos(){return this.index>=this.source.length}next(){const t=this.peek();return this.advance(),t}peek(){return this.source[this.index]}advance(){this.index++}}function b(n,t,i,s){let r;if(t.type===2)r=document.createTextNode(t.content||"");else if(t.type===3)r=document.createElement("b");else if(t.type===4)r=document.createElement("i");else if(t.type===7&&s)r=document.createElement("code");else if(t.type===5&&i){const c=document.createElement("a");i.disposables.add(S.addStandardDisposableListener(c,"click",g=>{i.callback(String(t.index),g)})),r=c}else t.type===8?r=document.createElement("br"):t.type===1&&(r=n);r&&n!==r&&n.appendChild(r),r&&Array.isArray(t.children)&&t.children.forEach(c=>{b(r,c,i,s)})}function _(n,t){const i={type:1,children:[]};let s=0,r=i;const c=[],g=new w(n);for(;!g.eos();){let o=g.next();const l=o==="\\\\"&&m(g.peek(),t)!==0;if(l&&(o=g.next()),!l&&h(o,t)&&o===g.peek()){g.advance(),r.type===2&&(r=c.pop());const a=m(o,t);if(r.type===a||r.type===5&&a===6)r=c.pop();else{const d={type:a,children:[]};a===5&&(d.index=s,s++),r.children.push(d),c.push(r),r=d}}else if(o===`\n`)r.type===2&&(r=c.pop()),r.children.push({type:8});else if(r.type!==2){const a={type:2,content:o};r.children.push(a),c.push(r),r=a}else r.content+=o}return r.type===2&&(r=c.pop()),c.length,i}function h(n,t){return m(n,t)!==0}function m(n,t){switch(n){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}}),define(J[139],ee([1,0,7,2]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalPointerMoveMonitor=void 0;class y{constructor(){this._hooks=new k.DisposableStore,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(w,b){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const _=this._onStopCallback;this._onStopCallback=null,w&&_&&_(b)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(w,b,_,h,m){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=h,this._onStopCallback=m;let n=w;try{w.setPointerCapture(b),this._hooks.add((0,k.toDisposable)(()=>{try{w.releasePointerCapture(b)}catch{}}))}catch{n=window}this._hooks.add(S.addDisposableListener(n,S.EventType.POINTER_MOVE,t=>{if(t.buttons!==_){this.stopMonitoring(!0);return}t.preventDefault(),this._pointerMoveCallback(t)})),this._hooks.add(S.addDisposableListener(n,S.EventType.POINTER_UP,t=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=y}),define(J[56],ee([1,0,7,16,99,2,59]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var b;(function(h){h.Tap="-monaco-gesturetap",h.Change="-monaco-gesturechange",h.Start="-monaco-gesturestart",h.End="-monaco-gesturesend",h.Contextmenu="-monaco-gesturecontextmenu"})(b=e.EventType||(e.EventType={}));class _ extends D.Disposable{constructor(){super(),this.dispatched=!1,this.targets=new w.LinkedList,this.ignoreTargets=new w.LinkedList,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(S.addDisposableListener(document,"touchstart",m=>this.onTouchStart(m),{passive:!1})),this._register(S.addDisposableListener(document,"touchend",m=>this.onTouchEnd(m))),this._register(S.addDisposableListener(document,"touchmove",m=>this.onTouchMove(m),{passive:!1}))}static addTarget(m){if(!_.isTouchDevice())return D.Disposable.None;_.INSTANCE||(_.INSTANCE=new _);const n=_.INSTANCE.targets.push(m);return(0,D.toDisposable)(n)}static ignoreTarget(m){if(!_.isTouchDevice())return D.Disposable.None;_.INSTANCE||(_.INSTANCE=new _);const n=_.INSTANCE.ignoreTargets.push(m);return(0,D.toDisposable)(n)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(m){const n=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let t=0,i=m.targetTouches.length;t<i;t++){const s=m.targetTouches.item(t);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:n,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[n],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};const r=this.newGestureEvent(b.Start,s.target);r.pageX=s.pageX,r.pageY=s.pageY,this.dispatchEvent(r)}this.dispatched&&(m.preventDefault(),m.stopPropagation(),this.dispatched=!1)}onTouchEnd(m){const n=Date.now(),t=Object.keys(this.activeTouches).length;for(let i=0,s=m.changedTouches.length;i<s;i++){const r=m.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(r.identifier))){console.warn("move of an UNKNOWN touch",r);continue}const c=this.activeTouches[r.identifier],g=Date.now()-c.initialTimeStamp;if(g<_.HOLD_DELAY&&Math.abs(c.initialPageX-k.tail(c.rollingPageX))<30&&Math.abs(c.initialPageY-k.tail(c.rollingPageY))<30){const o=this.newGestureEvent(b.Tap,c.initialTarget);o.pageX=k.tail(c.rollingPageX),o.pageY=k.tail(c.rollingPageY),this.dispatchEvent(o)}else if(g>=_.HOLD_DELAY&&Math.abs(c.initialPageX-k.tail(c.rollingPageX))<30&&Math.abs(c.initialPageY-k.tail(c.rollingPageY))<30){const o=this.newGestureEvent(b.Contextmenu,c.initialTarget);o.pageX=k.tail(c.rollingPageX),o.pageY=k.tail(c.rollingPageY),this.dispatchEvent(o)}else if(t===1){const o=k.tail(c.rollingPageX),l=k.tail(c.rollingPageY),a=k.tail(c.rollingTimestamps)-c.rollingTimestamps[0],d=o-c.rollingPageX[0],u=l-c.rollingPageY[0],C=[...this.targets].filter(f=>c.initialTarget instanceof Node&&f.contains(c.initialTarget));this.inertia(C,n,Math.abs(d)/a,d>0?1:-1,o,Math.abs(u)/a,u>0?1:-1,l)}this.dispatchEvent(this.newGestureEvent(b.End,c.initialTarget)),delete this.activeTouches[r.identifier]}this.dispatched&&(m.preventDefault(),m.stopPropagation(),this.dispatched=!1)}newGestureEvent(m,n){const t=document.createEvent("CustomEvent");return t.initEvent(m,!1,!0),t.initialTarget=n,t.tapCount=0,t}dispatchEvent(m){if(m.type===b.Tap){const n=new Date().getTime();let t=0;n-this._lastSetTapCountTime>_.CLEAR_TAP_COUNT_TIME?t=1:t=2,this._lastSetTapCountTime=n,m.tapCount=t}else(m.type===b.Change||m.type===b.Contextmenu)&&(this._lastSetTapCountTime=0);if(m.initialTarget instanceof Node){for(const n of this.ignoreTargets)if(n.contains(m.initialTarget))return;for(const n of this.targets)n.contains(m.initialTarget)&&(n.dispatchEvent(m),this.dispatched=!0)}}inertia(m,n,t,i,s,r,c,g){this.handle=S.scheduleAtNextAnimationFrame(()=>{const o=Date.now(),l=o-n;let a=0,d=0,u=!0;t+=_.SCROLL_FRICTION*l,r+=_.SCROLL_FRICTION*l,t>0&&(u=!1,a=i*t*l),r>0&&(u=!1,d=c*r*l);const C=this.newGestureEvent(b.Change);C.translationX=a,C.translationY=d,m.forEach(f=>f.dispatchEvent(C)),u||this.inertia(m,o,t,i,s+a,r,c,g+d)})}onTouchMove(m){const n=Date.now();for(let t=0,i=m.changedTouches.length;t<i;t++){const s=m.changedTouches.item(t);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("end of an UNKNOWN touch",s);continue}const r=this.activeTouches[s.identifier],c=this.newGestureEvent(b.Change,r.initialTarget);c.translationX=s.pageX-k.tail(r.rollingPageX),c.translationY=s.pageY-k.tail(r.rollingPageY),c.pageX=s.pageX,c.pageY=s.pageY,this.dispatchEvent(c),r.rollingPageX.length>3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(s.pageX),r.rollingPageY.push(s.pageY),r.rollingTimestamps.push(n)}this.dispatched&&(m.preventDefault(),m.stopPropagation(),this.dispatched=!1)}}_.SCROLL_FRICTION=-.005,_.HOLD_DELAY=700,_.CLEAR_TAP_COUNT_TIME=400,Ne([y.memoize],_,"isTouchDevice",null),e.Gesture=_}),define(J[50],ee([1,0,7,17,361]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const y=2e4;let D,w,b,_,h;function m(s){D=document.createElement("div"),D.className="monaco-aria-container";const r=()=>{const g=document.createElement("div");return g.className="monaco-alert",g.setAttribute("role","alert"),g.setAttribute("aria-atomic","true"),D.appendChild(g),g};w=r(),b=r();const c=()=>{const g=document.createElement("div");return g.className="monaco-status",g.setAttribute("role","complementary"),g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true"),D.appendChild(g),g};_=c(),h=c(),s.appendChild(D)}e.setARIAContainer=m;function n(s){D&&(w.textContent!==s?(S.clearNode(b),i(w,s)):(S.clearNode(w),i(b,s)))}e.alert=n;function t(s){D&&(k.isMacintosh?n(s):_.textContent!==s?(S.clearNode(h),i(_,s)):(S.clearNode(_),i(h,s)))}e.status=t;function i(s,r){S.clearNode(s),r.length>y&&(r=r.substr(0,y)),s.textContent=r,s.style.visibility="hidden",s.style.visibility="visible"}}),define(J[281],ee([1,0,203,7,2,17,156,365]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=void 0;var b;(function(n){n[n.AVOID=0]="AVOID",n[n.ALIGN=1]="ALIGN"})(b=e.LayoutAnchorMode||(e.LayoutAnchorMode={}));function _(n,t,i){const s=i.mode===b.ALIGN?i.offset:i.offset+i.size,r=i.mode===b.ALIGN?i.offset+i.size:i.offset;return i.position===0?t<=n-s?s:t<=r?r-t:Math.max(n-t,0):t<=r?r-t:t<=n-s?s:0}e.layout=_;class h extends y.Disposable{constructor(t,i){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=y.Disposable.None,this.toDisposeOnSetContainer=y.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=k.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,k.hide(this.view),this.setContainer(t,i),this._register((0,y.toDisposable)(()=>this.setContainer(null,1)))}setContainer(t,i){var s;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(s=this.shadowRootHostElement)===null||s===void 0||s.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),t){if(this.container=t,this.useFixedPosition=i!==1,this.useShadowDOM=i===3,this.useShadowDOM){this.shadowRootHostElement=k.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const c=document.createElement("style");c.textContent=m,this.shadowRoot.appendChild(c),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(k.$("slot"))}else this.container.appendChild(this.view);const r=new y.DisposableStore;h.BUBBLE_UP_EVENTS.forEach(c=>{r.add(k.addStandardDisposableListener(this.container,c,g=>{this.onDOMEvent(g,!1)}))}),h.BUBBLE_DOWN_EVENTS.forEach(c=>{r.add(k.addStandardDisposableListener(this.container,c,g=>{this.onDOMEvent(g,!0)},!0))}),this.toDisposeOnSetContainer=r}}show(t){var i,s;this.isVisible()&&this.hide(),k.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",k.show(this.view),this.toDisposeOnClean=t.render(this.view)||y.Disposable.None,this.delegate=t,this.doLayout(),(s=(i=this.delegate).focus)===null||s===void 0||s.call(i)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(D.isIOS&&S.BrowserFeatures.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const t=this.delegate.getAnchor();let i;if(k.isHTMLElement(t)){const u=k.getDomNodePagePosition(t),C=k.getDomNodeZoomLevel(t);i={top:u.top*C,left:u.left*C,width:u.width*C,height:u.height*C}}else i={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const s=k.getTotalWidth(this.view),r=k.getTotalHeight(this.view),c=this.delegate.anchorPosition||0,g=this.delegate.anchorAlignment||0,o=this.delegate.anchorAxisAlignment||0;let l,a;if(o===0){const u={offset:i.top-window.pageYOffset,size:i.height,position:c===0?0:1},C={offset:i.left,size:i.width,position:g===0?0:1,mode:b.ALIGN};l=_(window.innerHeight,r,u)+window.pageYOffset,w.Range.intersects({start:l,end:l+r},{start:u.offset,end:u.offset+u.size})&&(C.mode=b.AVOID),a=_(window.innerWidth,s,C)}else{const u={offset:i.left,size:i.width,position:g===0?0:1},C={offset:i.top,size:i.height,position:c===0?0:1,mode:b.ALIGN};a=_(window.innerWidth,s,u),w.Range.intersects({start:a,end:a+s},{start:u.offset,end:u.offset+u.size})&&(C.mode=b.AVOID),l=_(window.innerHeight,r,C)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(c===0?"bottom":"top"),this.view.classList.add(g===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=k.getDomNodePagePosition(this.container);this.view.style.top=`${l-(this.useFixedPosition?k.getDomNodePagePosition(this.view).top:d.top)}px`,this.view.style.left=`${a-(this.useFixedPosition?k.getDomNodePagePosition(this.view).left:d.left)}px`,this.view.style.width="initial"}hide(t){const i=this.delegate;this.delegate=null,i?.onHide&&i.onHide(t),this.toDisposeOnClean.dispose(),k.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(t,i){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(t,document.activeElement):i&&!k.isAncestor(t.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}h.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],h.BUBBLE_DOWN_EVENTS=["click"],e.ContextView=h;const m=`\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t: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; }\n\t: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; }\n\t: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; }\n\t: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; }\n`}),define(J[282],ee([1,0,7,9,366]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;class y{constructor(w,b,_){this.options=b,this.styles=_,this.count=0,this.element=(0,S.append)(w,(0,S.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(w){this.count=w,this.render()}setTitleFormat(w){this.titleFormat=w,this.render()}render(){var w,b;this.element.textContent=(0,k.format)(this.countFormat,this.count),this.element.title=(0,k.format)(this.titleFormat,this.count),this.element.style.backgroundColor=(w=this.styles.badgeBackground)!==null&&w!==void 0?w:"",this.element.style.color=(b=this.styles.badgeForeground)!==null&&b!==void 0?b:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}e.CountBadge=y}),define(J[532],ee([1,0,7,44,56,41,6,246]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=void 0;class b extends D.ActionRunner{constructor(m,n){super(),this._onDidChangeVisibility=this._register(new w.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,S.append)(m,(0,S.$)(".monaco-dropdown")),this._label=(0,S.append)(this._element,(0,S.$)(".dropdown-label"));let t=n.labelRenderer;t||(t=s=>(s.textContent=n.label||"",null));for(const s of[S.EventType.CLICK,S.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,S.addDisposableListener)(this.element,s,r=>S.EventHelper.stop(r,!0)));for(const s of[S.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,S.addDisposableListener)(this._label,s,r=>{r instanceof MouseEvent&&(r.detail>1||r.button!==0)||(this.visible?this.hide():this.show())}));this._register((0,S.addDisposableListener)(this._label,S.EventType.KEY_UP,s=>{const r=new k.StandardKeyboardEvent(s);(r.equals(3)||r.equals(10))&&(S.EventHelper.stop(s,!0),this.visible?this.hide():this.show())}));const i=t(this._label);i&&this._register(i),this._register(y.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)}}class _ extends b{constructor(m,n){super(m,n),this._actions=[],this._contextMenuProvider=n.contextMenuProvider,this.actions=n.actions||[],this.actionProvider=n.actionProvider,this.menuClassName=n.menuClassName||"",this.menuAsChild=!!n.menuAsChild}set menuOptions(m){this._menuOptions=m}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(m){this._actions=m}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:(m,n)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(m,n):void 0,getKeyBinding:m=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(m):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=_}),define(J[140],ee([1,0,7,32]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const y=new RegExp(`(\\\\\\\\)?\\\\$\\\\((${k.ThemeIcon.iconNameExpression}(?:${k.ThemeIcon.iconModifierExpression})?)\\\\)`,"g");function D(b){const _=new Array;let h,m=0,n=0;for(;(h=y.exec(b))!==null;){n=h.index||0,m<n&&_.push(b.substring(m,n)),m=(h.index||0)+h[0].length;const[,t,i]=h;_.push(t?`$(${i})`:w({id:i}))}return m<b.length&&_.push(b.substring(m)),_}e.renderLabelWithIcons=D;function w(b){const _=S.$("span");return _.classList.add(...k.ThemeIcon.asClassNameArray(b)),_}e.renderIcon=w}),define(J[283],ee([1,0,7,140,45]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class D{constructor(b,_){var h;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(h=_?.supportIcons)!==null&&h!==void 0?h:!1,this.domNode=S.append(b,S.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(b,_=[],h="",m){b||(b=""),m&&(b=D.escapeNewLines(b,_)),!(this.didEverRender&&this.text===b&&this.title===h&&y.equals(this.highlights,_))&&(this.text=b,this.title=h,this.highlights=_,this.render())}render(){const b=[];let _=0;for(const h of this.highlights){if(h.end===h.start)continue;if(_<h.start){const t=this.text.substring(_,h.start);this.supportIcons?b.push(...(0,k.renderLabelWithIcons)(t)):b.push(t),_=h.start}const m=this.text.substring(_,h.end),n=S.$("span.highlight",void 0,...this.supportIcons?(0,k.renderLabelWithIcons)(m):[m]);h.extraClasses&&n.classList.add(...h.extraClasses),b.push(n),_=h.end}if(_<this.text.length){const h=this.text.substring(_);this.supportIcons?b.push(...(0,k.renderLabelWithIcons)(h)):b.push(h)}S.reset(this.domNode,...b),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(b,_){let h=0,m=0;return b.replace(/\\r\\n|\\r|\\n/g,(n,t)=>{m=n===`\\r\n`?-1:0,t+=h;for(const i of _)i.end<=t||(i.start>=t&&(i.start+=m),i.end>=t&&(i.end+=m));return h+=m,"\\u23CE"})}}e.HighlightedLabel=D}),define(J[208],ee([1,0,7,201,45,518,370]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=e.unthemedKeybindingLabelOptions=void 0;const w=S.$;e.unthemedKeybindingLabelOptions={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class b{constructor(h,m,n){this.os=m,this.keyElements=new Set,this.options=n||Object.create(null);const t=this.options.keybindingLabelForeground;this.domNode=S.append(h,w(".monaco-keybinding")),t&&(this.domNode.style.color=t),this.didEverRender=!1,h.appendChild(this.domNode)}get element(){return this.domNode}set(h,m){this.didEverRender&&this.keybinding===h&&b.areSame(this.matches,m)||(this.keybinding=h,this.matches=m,this.render())}render(){var h;if(this.clear(),this.keybinding){const m=this.keybinding.getChords();m[0]&&this.renderChord(this.domNode,m[0],this.matches?this.matches.firstPart:null);for(let t=1;t<m.length;t++)S.append(this.domNode,w("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,m[t],this.matches?this.matches.chordPart:null);const n=(h=this.options.disableTitle)!==null&&h!==void 0&&h?void 0:this.keybinding.getAriaLabel()||void 0;n!==void 0?this.domNode.title=n:this.domNode.removeAttribute("title")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){S.clearNode(this.domNode),this.keyElements.clear()}renderChord(h,m,n){const t=k.UILabelProvider.modifierLabels[this.os];m.ctrlKey&&this.renderKey(h,t.ctrlKey,!!n?.ctrlKey,t.separator),m.shiftKey&&this.renderKey(h,t.shiftKey,!!n?.shiftKey,t.separator),m.altKey&&this.renderKey(h,t.altKey,!!n?.altKey,t.separator),m.metaKey&&this.renderKey(h,t.metaKey,!!n?.metaKey,t.separator);const i=m.keyLabel;i&&this.renderKey(h,i,!!n?.keyCode,"")}renderKey(h,m,n,t){S.append(h,this.createKeyElement(m,n?".highlight":"")),t&&S.append(h,w("span.monaco-keybinding-key-separator",void 0,t))}renderUnbound(h){S.append(h,this.createKeyElement((0,D.localize)(0,null)))}createKeyElement(h,m=""){const n=w("span.monaco-keybinding-key"+m,void 0,h);return this.keyElements.add(n),this.options.keybindingLabelBackground&&(n.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(n.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(n.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(n.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),n}static areSame(h,m){return h===m||!h&&!m?!0:!!h&&!!m&&(0,y.equals)(h.firstPart,m.firstPart)&&(0,y.equals)(h.chordPart,m.chordPart)}}e.KeybindingLabel=b}),define(J[533],ee([1,0,7]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function k(D){var w;try{(w=D.parentElement)===null||w===void 0||w.removeChild(D)}catch{}}class y{constructor(w){this.renderers=w,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(w){let b=this.getTemplateCache(w).pop(),_=!1;if(b)_=this.transactionNodesPendingRemoval.has(b.domNode),_&&this.transactionNodesPendingRemoval.delete(b.domNode);else{const h=(0,S.$)(".monaco-list-row"),n=this.getRenderer(w).renderTemplate(h);b={domNode:h,templateId:w,templateData:n}}return{row:b,isReusingConnectedDomNode:_}}release(w){w&&this.releaseRow(w)}transact(w){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{w()}finally{for(const b of this.transactionNodesPendingRemoval)this.doRemoveNode(b);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(w){const{domNode:b,templateId:_}=w;b&&(this.inTransaction?this.transactionNodesPendingRemoval.add(b):this.doRemoveNode(b)),this.getTemplateCache(_).push(w)}doRemoveNode(w){w.classList.remove("scrolling"),k(w)}getTemplateCache(w){let b=this.cache.get(w);return b||(b=[],this.cache.set(w,b)),b}dispose(){this.cache.forEach((w,b)=>{for(const _ of w)this.getRenderer(b).disposeTemplate(_.templateData),_.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(w){const b=this.renderers.get(w);if(!b)throw new Error(`No renderer found for ${w}`);return b}}e.RowCache=y}),define(J[534],ee([1,0,7,12,2,372]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const D="done",w="active",b="infinite",_="infinite-long-running",h="discrete";class m extends y.Disposable{constructor(t,i){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new k.RunOnceScheduler(()=>(0,S.show)(this.element),0)),this.longRunningScheduler=this._register(new k.RunOnceScheduler(()=>this.infiniteLongRunning(),m.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(t,i)}create(t,i){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),t.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=i?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(w,b,_,h),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(t){return this.element.classList.add(D),this.element.classList.contains(b)?(this.bit.style.opacity="0",t?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",t?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(h,D,_),this.element.classList.add(w,b),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(_)}getContainer(){return this.element}}m.LONG_RUNNING_INFINITE_THRESHOLD=1e4,e.ProgressBar=m}),define(J[141],ee([1,0,7,76,56,12,99,6,2,17,373]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;const m=!1;var n;(function(d){d.North="north",d.South="south",d.East="east",d.West="west"})(n=e.OrthogonalEdge||(e.OrthogonalEdge={}));let t=4;const i=new b.Emitter;let s=300;const r=new b.Emitter;class c{constructor(){this.disposables=new _.DisposableStore}get onPointerMove(){return this.disposables.add(new k.DomEmitter(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new k.DomEmitter(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Ne([w.memoize],c.prototype,"onPointerMove",null),Ne([w.memoize],c.prototype,"onPointerUp",null);class g{get onPointerMove(){return this.disposables.add(new k.DomEmitter(this.el,y.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new k.DomEmitter(this.el,y.EventType.End)).event}constructor(u){this.el=u,this.disposables=new _.DisposableStore}dispose(){this.disposables.dispose()}}Ne([w.memoize],g.prototype,"onPointerMove",null),Ne([w.memoize],g.prototype,"onPointerUp",null);class o{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(u){this.factory=u}dispose(){}}Ne([w.memoize],o.prototype,"onPointerMove",null),Ne([w.memoize],o.prototype,"onPointerUp",null);const l="pointer-events-disabled";class a extends _.Disposable{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(u){this._state!==u&&(this.el.classList.toggle("disabled",u===0),this.el.classList.toggle("minimum",u===1),this.el.classList.toggle("maximum",u===2),this._state=u,this.onDidEnablementChange.fire(u))}set orthogonalStartSash(u){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),u){const C=f=>{this.orthogonalStartDragHandleDisposables.clear(),f!==0&&(this._orthogonalStartDragHandle=(0,S.append)(this.el,(0,S.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,_.toDisposable)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new k.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>a.onMouseEnter(u),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new k.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>a.onMouseLeave(u),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(u.onDidEnablementChange.event(C,this)),C(u.state)}this._orthogonalStartSash=u}set orthogonalEndSash(u){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),u){const C=f=>{this.orthogonalEndDragHandleDisposables.clear(),f!==0&&(this._orthogonalEndDragHandle=(0,S.append)(this.el,(0,S.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,_.toDisposable)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new k.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>a.onMouseEnter(u),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new k.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>a.onMouseLeave(u),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(u.onDidEnablementChange.event(C,this)),C(u.state)}this._orthogonalEndSash=u}constructor(u,C,f){super(),this.hoverDelay=s,this.hoverDelayer=this._register(new D.Delayer(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new b.Emitter),this._onDidStart=this._register(new b.Emitter),this._onDidChange=this._register(new b.Emitter),this._onDidReset=this._register(new b.Emitter),this._onDidEnd=this._register(new b.Emitter),this.orthogonalStartSashDisposables=this._register(new _.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new _.DisposableStore),this.orthogonalEndSashDisposables=this._register(new _.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new _.DisposableStore),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,S.append)(u,(0,S.$)(".monaco-sash")),f.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${f.orthogonalEdge}`),h.isMacintosh&&this.el.classList.add("mac");const v=this._register(new k.DomEmitter(this.el,"mousedown")).event;this._register(v(R=>this.onPointerStart(R,new c),this));const p=this._register(new k.DomEmitter(this.el,"dblclick")).event;this._register(p(this.onPointerDoublePress,this));const L=this._register(new k.DomEmitter(this.el,"mouseenter")).event;this._register(L(()=>a.onMouseEnter(this)));const E=this._register(new k.DomEmitter(this.el,"mouseleave")).event;this._register(E(()=>a.onMouseLeave(this))),this._register(y.Gesture.addTarget(this.el));const I=this._register(new k.DomEmitter(this.el,y.EventType.Start)).event;this._register(I(R=>this.onPointerStart(R,new g(this.el)),this));const T=this._register(new k.DomEmitter(this.el,y.EventType.Tap)).event;let F;this._register(T(R=>{if(F){clearTimeout(F),F=void 0,this.onPointerDoublePress(R);return}clearTimeout(F),F=setTimeout(()=>F=void 0,250)},this)),typeof f.size=="number"?(this.size=f.size,f.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=t,this._register(i.event(R=>{this.size=R,this.layout()}))),this._register(r.event(R=>this.hoverDelay=R)),this.layoutProvider=C,this.orthogonalStartSash=f.orthogonalStartSash,this.orthogonalEndSash=f.orthogonalEndSash,this.orientation=f.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",m),this.layout()}onPointerStart(u,C){S.EventHelper.stop(u);let f=!1;if(!u.__orthogonalSashEvent){const A=this.getOrthogonalSash(u);A&&(f=!0,u.__orthogonalSashEvent=!0,A.onPointerStart(u,new o(C)))}if(this.linkedSash&&!u.__linkedSashEvent&&(u.__linkedSashEvent=!0,this.linkedSash.onPointerStart(u,new o(C))),!this.state)return;const v=document.getElementsByTagName("iframe");for(const A of v)A.classList.add(l);const p=u.pageX,L=u.pageY,E=u.altKey,I={startX:p,currentX:p,startY:L,currentY:L,altKey:E};this.el.classList.add("active"),this._onDidStart.fire(I);const T=(0,S.createStyleSheet)(this.el),F=()=>{let A="";f?A="all-scroll":this.orientation===1?this.state===1?A="s-resize":this.state===2?A="n-resize":A=h.isMacintosh?"row-resize":"ns-resize":this.state===1?A="e-resize":this.state===2?A="w-resize":A=h.isMacintosh?"col-resize":"ew-resize",T.textContent=`* { cursor: ${A} !important; }`},R=new _.DisposableStore;F(),f||this.onDidEnablementChange.event(F,null,R);const M=A=>{S.EventHelper.stop(A,!1);const P={startX:p,currentX:A.pageX,startY:L,currentY:A.pageY,altKey:E};this._onDidChange.fire(P)},N=A=>{S.EventHelper.stop(A,!1),this.el.removeChild(T),this.el.classList.remove("active"),this._onDidEnd.fire(),R.dispose();for(const P of v)P.classList.remove(l)};C.onPointerMove(M,null,R),C.onPointerUp(N,null,R),R.add(C)}onPointerDoublePress(u){const C=this.getOrthogonalSash(u);C&&C._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(u,C=!1){u.el.classList.contains("active")?(u.hoverDelayer.cancel(),u.el.classList.add("hover")):u.hoverDelayer.trigger(()=>u.el.classList.add("hover"),u.hoverDelay).then(void 0,()=>{}),!C&&u.linkedSash&&a.onMouseEnter(u.linkedSash,!0)}static onMouseLeave(u,C=!1){u.hoverDelayer.cancel(),u.el.classList.remove("hover"),!C&&u.linkedSash&&a.onMouseLeave(u.linkedSash,!0)}clearSashHoverState(){a.onMouseLeave(this)}layout(){if(this.orientation===0){const u=this.layoutProvider;this.el.style.left=u.getVerticalSashLeft(this)-this.size/2+"px",u.getVerticalSashTop&&(this.el.style.top=u.getVerticalSashTop(this)+"px"),u.getVerticalSashHeight&&(this.el.style.height=u.getVerticalSashHeight(this)+"px")}else{const u=this.layoutProvider;this.el.style.top=u.getHorizontalSashTop(this)-this.size/2+"px",u.getHorizontalSashLeft&&(this.el.style.left=u.getHorizontalSashLeft(this)+"px"),u.getHorizontalSashWidth&&(this.el.style.width=u.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(u){var C;const f=(C=u.initialTarget)!==null&&C!==void 0?C:u.target;if(!(!f||!(f instanceof HTMLElement))&&f.classList.contains("orthogonal-drag-handle"))return f.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=a}),define(J[284],ee([1,0,7,141,6,2]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class w{constructor(){this._onDidWillResize=new y.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new y.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new D.DisposableStore,this._size=new S.Dimension(0,0),this._minSize=new S.Dimension(0,0),this._maxSize=new S.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new k.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new k.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new k.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:k.OrthogonalEdge.North}),this._southSash=new k.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:k.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let _,h=0,m=0;this._sashListener.add(y.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{_===void 0&&(this._onDidWillResize.fire(),_=this._size,h=0,m=0)})),this._sashListener.add(y.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{_!==void 0&&(_=void 0,h=0,m=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{_&&(m=n.currentX-n.startX,this.layout(_.height+h,_.width+m),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{_&&(m=-(n.currentX-n.startX),this.layout(_.height+h,_.width+m),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{_&&(h=-(n.currentY-n.startY),this.layout(_.height+h,_.width+m),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{_&&(h=n.currentY-n.startY,this.layout(_.height+h,_.width+m),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(y.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(y.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{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._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(_,h,m,n){this._northSash.state=_?3:0,this._eastSash.state=h?3:0,this._southSash.state=m?3:0,this._westSash.state=n?3:0}layout(_=this.size.height,h=this.size.width){const{height:m,width:n}=this._minSize,{height:t,width:i}=this._maxSize;_=Math.max(m,Math.min(t,_)),h=Math.max(n,Math.min(i,h));const s=new S.Dimension(h,_);S.Dimension.equals(s,this._size)||(this.domNode.style.height=_+"px",this.domNode.style.width=h+"px",this._size=s,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(_){this._maxSize=_}get maxSize(){return this._maxSize}set minSize(_){this._minSize=_}get minSize(){return this._minSize}set preferredSize(_){this._preferredSize=_}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=w}),define(J[535],ee([1,0,7,56,16,6,2,17]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class _ extends w.Disposable{constructor(m,n,t,i){super(),this.selected=0,this.selectBoxOptions=i||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new D.Emitter),this.styles=t,this.registerListeners(),this.setOptions(m,n)}registerListeners(){this._register(k.Gesture.addTarget(this.selectElement)),[k.EventType.Tap].forEach(m=>{this._register(S.addDisposableListener(this.selectElement,m,n=>{this.selectElement.focus()}))}),this._register(S.addStandardDisposableListener(this.selectElement,"click",m=>{S.EventHelper.stop(m,!0)})),this._register(S.addStandardDisposableListener(this.selectElement,"change",m=>{this.selectElement.title=m.target.value,this._onDidSelect.fire({index:m.target.selectedIndex,selected:m.target.value})})),this._register(S.addStandardDisposableListener(this.selectElement,"keydown",m=>{let n=!1;b.isMacintosh?(m.keyCode===18||m.keyCode===16||m.keyCode===10)&&(n=!0):(m.keyCode===18&&m.altKey||m.keyCode===10||m.keyCode===3)&&(n=!0),n&&m.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(m,n){(!this.options||!y.equals(this.options,m))&&(this.options=m,this.selectElement.options.length=0,this.options.forEach((t,i)=>{this.selectElement.add(this.createOption(t.text,i,t.isDisabled))})),n!==void 0&&this.select(n)}select(m){this.options.length===0?this.selected=0:m>=0&&m<this.options.length?this.selected=m:m>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&typeof this.options[this.selected].text=="string"?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(m){this.selectElement.tabIndex=m?0:-1}render(m){m.classList.add("select-container"),m.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){var m,n,t;this.selectElement&&(this.selectElement.style.backgroundColor=(m=this.styles.selectBackground)!==null&&m!==void 0?m:"",this.selectElement.style.color=(n=this.styles.selectForeground)!==null&&n!==void 0?n:"",this.selectElement.style.borderColor=(t=this.styles.selectBorder)!==null&&t!==void 0?t:"")}createOption(m,n,t){const i=document.createElement("option");return i.value=m,i.text=m,i.disabled=!!t,i}}e.SelectBoxNative=_}),define(J[67],ee([1,0,7,44,66,56,2]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class b extends w.Disposable{onclick(h,m){this._register(S.addDisposableListener(h,S.EventType.CLICK,n=>m(new y.StandardMouseEvent(n))))}onmousedown(h,m){this._register(S.addDisposableListener(h,S.EventType.MOUSE_DOWN,n=>m(new y.StandardMouseEvent(n))))}onmouseover(h,m){this._register(S.addDisposableListener(h,S.EventType.MOUSE_OVER,n=>m(new y.StandardMouseEvent(n))))}onmouseleave(h,m){this._register(S.addDisposableListener(h,S.EventType.MOUSE_LEAVE,n=>m(new y.StandardMouseEvent(n))))}onkeydown(h,m){this._register(S.addDisposableListener(h,S.EventType.KEY_DOWN,n=>m(new k.StandardKeyboardEvent(n))))}onkeyup(h,m){this._register(S.addDisposableListener(h,S.EventType.KEY_UP,n=>m(new k.StandardKeyboardEvent(n))))}oninput(h,m){this._register(S.addDisposableListener(h,S.EventType.INPUT,m))}onblur(h,m){this._register(S.addDisposableListener(h,S.EventType.BLUR,m))}onfocus(h,m){this._register(S.addDisposableListener(h,S.EventType.FOCUS,m))}ignoreGesture(h){return D.Gesture.ignoreTarget(h)}}e.Widget=b}),define(J[209],ee([1,0,139,67,12,32,7]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarArrow=e.ARROW_IMG_SIZE=void 0,e.ARROW_IMG_SIZE=11;class b extends k.Widget{constructor(h){super(),this._onActivate=h.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=h.bgWidth+"px",this.bgDomNode.style.height=h.bgHeight+"px",typeof h.top<"u"&&(this.bgDomNode.style.top="0px"),typeof h.left<"u"&&(this.bgDomNode.style.left="0px"),typeof h.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof h.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=h.className,this.domNode.classList.add(...D.ThemeIcon.asClassNameArray(h.icon)),this.domNode.style.position="absolute",this.domNode.style.width=e.ARROW_IMG_SIZE+"px",this.domNode.style.height=e.ARROW_IMG_SIZE+"px",typeof h.top<"u"&&(this.domNode.style.top=h.top+"px"),typeof h.left<"u"&&(this.domNode.style.left=h.left+"px"),typeof h.bottom<"u"&&(this.domNode.style.bottom=h.bottom+"px"),typeof h.right<"u"&&(this.domNode.style.right=h.right+"px"),this._pointerMoveMonitor=this._register(new S.GlobalPointerMoveMonitor),this._register(w.addStandardDisposableListener(this.bgDomNode,w.EventType.POINTER_DOWN,m=>this._arrowPointerDown(m))),this._register(w.addStandardDisposableListener(this.domNode,w.EventType.POINTER_DOWN,m=>this._arrowPointerDown(m))),this._pointerdownRepeatTimer=this._register(new y.IntervalTimer),this._pointerdownScheduleRepeatTimer=this._register(new y.TimeoutTimer)}_arrowPointerDown(h){if(!h.target||!(h.target instanceof Element))return;const m=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(m,200),this._pointerMoveMonitor.startMonitoring(h.target,h.pointerId,h.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),h.preventDefault()}}e.ScrollbarArrow=b}),define(J[285],ee([1,0,7,35,139,209,530,67,17]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const h=140;class m extends b.Widget{constructor(t){super(),this._lazyRender=t.lazyRender,this._host=t.host,this._scrollable=t.scrollable,this._scrollByPage=t.scrollByPage,this._scrollbarState=t.scrollbarState,this._visibilityController=this._register(new w.ScrollbarVisibilityController(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new y.GlobalPointerMoveMonitor),this._shouldRender=!0,this.domNode=(0,k.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._register(S.addDisposableListener(this.domNode.domNode,S.EventType.POINTER_DOWN,i=>this._domNodePointerDown(i)))}_createArrow(t){const i=this._register(new D.ScrollbarArrow(t));this.domNode.domNode.appendChild(i.bgDomNode),this.domNode.domNode.appendChild(i.domNode)}_createSlider(t,i,s,r){this.slider=(0,k.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(t),this.slider.setLeft(i),typeof s=="number"&&this.slider.setWidth(s),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(S.addDisposableListener(this.slider.domNode,S.EventType.POINTER_DOWN,c=>{c.button===0&&(c.preventDefault(),this._sliderPointerDown(c))})),this.onclick(this.slider.domNode,c=>{c.leftButton&&c.stopPropagation()})}_onElementSize(t){return this._scrollbarState.setVisibleSize(t)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(t){return this._scrollbarState.setScrollSize(t)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(t){return this._scrollbarState.setScrollPosition(t)&&(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()))}_domNodePointerDown(t){t.target===this.domNode.domNode&&this._onPointerDown(t)}delegatePointerDown(t){const i=this.domNode.domNode.getClientRects()[0].top,s=i+this._scrollbarState.getSliderPosition(),r=i+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),c=this._sliderPointerPosition(t);s<=c&&c<=r?t.button===0&&(t.preventDefault(),this._sliderPointerDown(t)):this._onPointerDown(t)}_onPointerDown(t){let i,s;if(t.target===this.domNode.domNode&&typeof t.offsetX=="number"&&typeof t.offsetY=="number")i=t.offsetX,s=t.offsetY;else{const c=S.getDomNodePagePosition(this.domNode.domNode);i=t.pageX-c.left,s=t.pageY-c.top}const r=this._pointerDownRelativePosition(i,s);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),t.button===0&&(t.preventDefault(),this._sliderPointerDown(t))}_sliderPointerDown(t){if(!t.target||!(t.target instanceof Element))return;const i=this._sliderPointerPosition(t),s=this._sliderOrthogonalPointerPosition(t),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(t.target,t.pointerId,t.buttons,c=>{const g=this._sliderOrthogonalPointerPosition(c),o=Math.abs(g-s);if(_.isWindows&&o>h){this._setDesiredScrollPositionNow(r.getScrollPosition());return}const a=this._sliderPointerPosition(c)-i;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(a))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(t){const i={};this.writeScrollPosition(i,t),this._scrollable.setScrollPositionNow(i)}updateScrollbarSize(t){this._updateScrollbarSize(t),this._scrollbarState.setScrollbarSize(t),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=m}),define(J[536],ee([1,0,66,285,209,242,29]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class b extends k.AbstractScrollbar{constructor(h,m,n){const t=h.getScrollDimensions(),i=h.getCurrentScrollPosition();if(super({lazyRender:m.lazyRender,host:n,scrollbarState:new D.ScrollbarState(m.horizontalHasArrows?m.arrowSize:0,m.horizontal===2?0:m.horizontalScrollbarSize,m.vertical===2?0:m.verticalScrollbarSize,t.width,t.scrollWidth,i.scrollLeft),visibility:m.horizontal,extraScrollbarClassName:"horizontal",scrollable:h,scrollByPage:m.scrollByPage}),m.horizontalHasArrows){const s=(m.arrowSize-y.ARROW_IMG_SIZE)/2,r=(m.horizontalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonLeft,top:r,left:s,bottom:void 0,right:void 0,bgWidth:m.arrowSize,bgHeight:m.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new S.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonRight,top:r,left:void 0,bottom:void 0,right:s,bgWidth:m.arrowSize,bgHeight:m.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new S.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((m.horizontalScrollbarSize-m.horizontalSliderSize)/2),0,void 0,m.horizontalSliderSize)}_updateSlider(h,m){this.slider.setWidth(h),this.slider.setLeft(m)}_renderDomNode(h,m){this.domNode.setWidth(h),this.domNode.setHeight(m),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(h){return this._shouldRender=this._onElementScrollSize(h.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(h.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(h.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(h,m){return h}_sliderPointerPosition(h){return h.pageX}_sliderOrthogonalPointerPosition(h){return h.pageY}_updateScrollbarSize(h){this.slider.setHeight(h)}writeScrollPosition(h,m){h.scrollLeft=m}updateOptions(h){this.updateScrollbarSize(h.horizontal===2?0:h.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(h.vertical===2?0:h.verticalScrollbarSize),this._visibilityController.setVisibility(h.horizontal),this._scrollByPage=h.scrollByPage}}e.HorizontalScrollbar=b}),define(J[537],ee([1,0,66,285,209,242,29]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class b extends k.AbstractScrollbar{constructor(h,m,n){const t=h.getScrollDimensions(),i=h.getCurrentScrollPosition();if(super({lazyRender:m.lazyRender,host:n,scrollbarState:new D.ScrollbarState(m.verticalHasArrows?m.arrowSize:0,m.vertical===2?0:m.verticalScrollbarSize,0,t.height,t.scrollHeight,i.scrollTop),visibility:m.vertical,extraScrollbarClassName:"vertical",scrollable:h,scrollByPage:m.scrollByPage}),m.verticalHasArrows){const s=(m.arrowSize-y.ARROW_IMG_SIZE)/2,r=(m.verticalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonUp,top:s,left:r,bottom:void 0,right:void 0,bgWidth:m.verticalScrollbarSize,bgHeight:m.arrowSize,onActivate:()=>this._host.onMouseWheel(new S.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonDown,top:void 0,left:r,bottom:s,right:void 0,bgWidth:m.verticalScrollbarSize,bgHeight:m.arrowSize,onActivate:()=>this._host.onMouseWheel(new S.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((m.verticalScrollbarSize-m.verticalSliderSize)/2),m.verticalSliderSize,void 0)}_updateSlider(h,m){this.slider.setHeight(h),this.slider.setTop(m)}_renderDomNode(h,m){this.domNode.setWidth(m),this.domNode.setHeight(h),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(h){return this._shouldRender=this._onElementScrollSize(h.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(h.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(h.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(h,m){return m}_sliderPointerPosition(h){return h.pageY}_sliderOrthogonalPointerPosition(h){return h.pageX}_updateScrollbarSize(h){this.slider.setWidth(h)}writeScrollPosition(h,m){h.scrollTop=m}updateOptions(h){this.updateScrollbarSize(h.vertical===2?0:h.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(h.vertical),this._scrollByPage=h.scrollByPage}}e.VerticalScrollbar=b}),define(J[77],ee([1,0,46,7,35,66,536,537,67,12,6,2,17,172,374]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const s=500,r=50,c=!0;class g{constructor(v,p,L){this.timestamp=v,this.deltaX=p,this.deltaY=L,this.score=0}}class o{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,p=0,L=1,E=this._rear;do{const I=E===this._front?v:Math.pow(2,-L);if(v-=I,p+=this._memory[E].score*I,E===this._front)break;E=(this._capacity+E-1)%this._capacity,L++}while(!0);return p<=.5}acceptStandardWheelEvent(v){const p=window.devicePixelRatio/(0,S.getZoomFactor)();t.isWindows||t.isLinux?this.accept(Date.now(),v.deltaX/p,v.deltaY/p):this.accept(Date.now(),v.deltaX,v.deltaY)}accept(v,p,L){const E=new g(v,p,L);E.score=this._computeScore(E),this._front===-1&&this._rear===-1?(this._memory[0]=E,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]=E)}_computeScore(v){if(Math.abs(v.deltaX)>0&&Math.abs(v.deltaY)>0)return 1;let p=.5;const L=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(v.deltaX)||!this._isAlmostInt(v.deltaY))&&(p+=.25),Math.min(Math.max(p,0),1)}_isAlmostInt(v){return Math.abs(Math.round(v)-v)<.01}}o.INSTANCE=new o,e.MouseWheelClassifier=o;class l extends _.Widget{get options(){return this._options}constructor(v,p,L){super(),this._onScroll=this._register(new m.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new m.Emitter),v.style.overflow="hidden",this._options=C(p),this._scrollable=L,this._register(this._scrollable.onScroll(I=>{this._onWillScroll.fire(I),this._onDidScroll(I),this._onScroll.fire(I)}));const E={onMouseWheel:I=>this._onMouseWheel(I),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b.VerticalScrollbar(this._scrollable,this._options,E)),this._horizontalScrollbar=this._register(new w.HorizontalScrollbar(this._scrollable,this._options,E)),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=(0,y.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),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,I=>this._onMouseOver(I)),this.onmouseleave(this._listenOnDomNode,I=>this._onMouseLeave(I)),this._hideTimeout=this._register(new h.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,n.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(v){this._verticalScrollbar.delegatePointerDown(v)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(v){this._scrollable.setScrollDimensions(v,!1)}updateClassName(v){this._options.className=v,t.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(v){typeof v.handleMouseWheel<"u"&&(this._options.handleMouseWheel=v.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof v.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=v.mouseWheelScrollSensitivity),typeof v.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=v.fastScrollSensitivity),typeof v.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=v.scrollPredominantAxis),typeof v.horizontal<"u"&&(this._options.horizontal=v.horizontal),typeof v.vertical<"u"&&(this._options.vertical=v.vertical),typeof v.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=v.horizontalScrollbarSize),typeof v.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=v.verticalScrollbarSize),typeof v.scrollByPage<"u"&&(this._options.scrollByPage=v.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(v){this._onMouseWheel(new D.StandardWheelEvent(v))}_setListeningToMouseWheel(v){if(this._mouseWheelToDispose.length>0!==v&&(this._mouseWheelToDispose=(0,n.dispose)(this._mouseWheelToDispose),v)){const L=E=>{this._onMouseWheel(new D.StandardWheelEvent(E))};this._mouseWheelToDispose.push(k.addDisposableListener(this._listenOnDomNode,k.EventType.MOUSE_WHEEL,L,{passive:!1}))}}_onMouseWheel(v){const p=o.INSTANCE;c&&p.acceptStandardWheelEvent(v);let L=!1;if(v.deltaY||v.deltaX){let I=v.deltaY*this._options.mouseWheelScrollSensitivity,T=v.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(I)>=Math.abs(T)?T=0:I=0),this._options.flipAxes&&([I,T]=[T,I]);const F=!t.isMacintosh&&v.browserEvent&&v.browserEvent.shiftKey;(this._options.scrollYToX||F)&&!T&&(T=I,I=0),v.browserEvent&&v.browserEvent.altKey&&(T=T*this._options.fastScrollSensitivity,I=I*this._options.fastScrollSensitivity);const R=this._scrollable.getFutureScrollPosition();let M={};if(I){const N=r*I,A=R.scrollTop-(N<0?Math.floor(N):Math.ceil(N));this._verticalScrollbar.writeScrollPosition(M,A)}if(T){const N=r*T,A=R.scrollLeft-(N<0?Math.floor(N):Math.ceil(N));this._horizontalScrollbar.writeScrollPosition(M,A)}M=this._scrollable.validateScrollPosition(M),(R.scrollLeft!==M.scrollLeft||R.scrollTop!==M.scrollTop)&&(c&&this._options.mouseWheelSmoothScroll&&p.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(M):this._scrollable.setScrollPositionNow(M),L=!0)}let E=L;!E&&this._options.alwaysConsumeMouseWheel&&(E=!0),!E&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(E=!0),E&&(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(),p=v.scrollTop>0,L=v.scrollLeft>0,E=L?" left":"",I=p?" top":"",T=L||p?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${E}`),this._topShadowDomNode.setClassName(`shadow${I}`),this._topLeftShadowDomNode.setClassName(`shadow${T}${I}${E}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(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(),s)}}e.AbstractScrollableElement=l;class a extends l{constructor(v,p){p=p||{},p.mouseWheelSmoothScroll=!1;const L=new i.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>k.scheduleAtNextAnimationFrame(E)});super(v,p,L),this._register(L)}setScrollPosition(v){this._scrollable.setScrollPositionNow(v)}}e.ScrollableElement=a;class d extends l{constructor(v,p,L){super(v,p,L)}setScrollPosition(v){v.reuseAnimation?this._scrollable.setScrollPositionSmooth(v,v.reuseAnimation):this._scrollable.setScrollPositionNow(v)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=d;class u extends l{constructor(v,p){p=p||{},p.mouseWheelSmoothScroll=!1;const L=new i.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>k.scheduleAtNextAnimationFrame(E)});super(v,p,L),this._register(L),this._element=v,this.onScroll(E=>{E.scrollTopChanged&&(this._element.scrollTop=E.scrollTop),E.scrollLeftChanged&&(this._element.scrollLeft=E.scrollLeft)}),this.scanDomNode()}setScrollPosition(v){this._scrollable.setScrollPositionNow(v)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}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=u;function C(f){const v={lazyRender:typeof f.lazyRender<"u"?f.lazyRender:!1,className:typeof f.className<"u"?f.className:"",useShadows:typeof f.useShadows<"u"?f.useShadows:!0,handleMouseWheel:typeof f.handleMouseWheel<"u"?f.handleMouseWheel:!0,flipAxes:typeof f.flipAxes<"u"?f.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof f.consumeMouseWheelIfScrollbarIsNeeded<"u"?f.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof f.alwaysConsumeMouseWheel<"u"?f.alwaysConsumeMouseWheel:!1,scrollYToX:typeof f.scrollYToX<"u"?f.scrollYToX:!1,mouseWheelScrollSensitivity:typeof f.mouseWheelScrollSensitivity<"u"?f.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof f.fastScrollSensitivity<"u"?f.fastScrollSensitivity:5,scrollPredominantAxis:typeof f.scrollPredominantAxis<"u"?f.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof f.mouseWheelSmoothScroll<"u"?f.mouseWheelSmoothScroll:!0,arrowSize:typeof f.arrowSize<"u"?f.arrowSize:11,listenOnDomNode:typeof f.listenOnDomNode<"u"?f.listenOnDomNode:null,horizontal:typeof f.horizontal<"u"?f.horizontal:1,horizontalScrollbarSize:typeof f.horizontalScrollbarSize<"u"?f.horizontalScrollbarSize:10,horizontalSliderSize:typeof f.horizontalSliderSize<"u"?f.horizontalSliderSize:0,horizontalHasArrows:typeof f.horizontalHasArrows<"u"?f.horizontalHasArrows:!1,vertical:typeof f.vertical<"u"?f.vertical:1,verticalScrollbarSize:typeof f.verticalScrollbarSize<"u"?f.verticalScrollbarSize:10,verticalHasArrows:typeof f.verticalHasArrows<"u"?f.verticalHasArrows:!1,verticalSliderSize:typeof f.verticalSliderSize<"u"?f.verticalSliderSize:0,scrollByPage:typeof f.scrollByPage<"u"?f.scrollByPage:!1};return v.horizontalSliderSize=typeof f.horizontalSliderSize<"u"?f.horizontalSliderSize:v.horizontalScrollbarSize,v.verticalSliderSize=typeof f.verticalSliderSize<"u"?f.verticalSliderSize:v.verticalScrollbarSize,t.isMacintosh&&(v.className+=" mac"),v}}),define(J[286],ee([1,0,7,44,77,2,367]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverAction=e.HoverWidget=void 0;const w=S.$;class b extends D.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 y.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=b;class _ extends D.Disposable{static render(m,n,t){return new _(m,n,t)}constructor(m,n,t){super(),this.actionContainer=S.append(m,w("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=S.append(this.actionContainer,w("a.action")),this.action.setAttribute("role","button"),n.iconClass&&S.append(this.action,w(`span.icon.${n.iconClass}`));const i=S.append(this.action,w("span"));i.textContent=t?`${n.label} (${t})`:n.label,this._register(S.addDisposableListener(this.actionContainer,S.EventType.CLICK,s=>{s.stopPropagation(),s.preventDefault(),n.run(this.actionContainer)})),this._register(S.addDisposableListener(this.actionContainer,S.EventType.KEY_DOWN,s=>{const r=new k.StandardKeyboardEvent(s);(r.equals(3)||r.equals(10))&&(s.stopPropagation(),s.preventDefault(),n.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(m){m?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}e.HoverAction=_}),define(J[210],ee([1,0,131,7,76,56,77,16,12,99,6,2,156,172,359,533,11]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const g={CurrentDragAndDropData:void 0},o={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 l{constructor(p){this.elements=p}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=l;class a{constructor(p){this.elements=p}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=a;class d{constructor(){this.types=[],this.files=[]}update(p){if(p.types&&this.types.splice(0,this.types.length,...p.types),p.files){this.files.splice(0,this.files.length);for(let L=0;L<p.files.length;L++){const E=p.files.item(L);E&&(E.size||E.type)&&this.files.push(E)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=d;function u(v,p){return Array.isArray(v)&&Array.isArray(p)?(0,b.equals)(v,p):v===p}class C{constructor(p){p?.getSetSize?this.getSetSize=p.getSetSize.bind(p):this.getSetSize=(L,E,I)=>I,p?.getPosInSet?this.getPosInSet=p.getPosInSet.bind(p):this.getPosInSet=(L,E)=>E+1,p?.getRole?this.getRole=p.getRole.bind(p):this.getRole=L=>"listitem",p?.isChecked?this.isChecked=p.isChecked.bind(p):this.isChecked=L=>{}}}class f{get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(p){if(p!==this._horizontalScrolling){if(p&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=p,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:(0,k.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=""}}constructor(p,L,E,I=o){var T,F,R,M,N,A,P,x,W,U,O,$;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 _.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 m.Emitter,this._horizontalScrolling=!1,I.horizontalScrolling&&I.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new s.RangeMap;for(const se of E)this.renderers.set(se.templateId,se);this.cache=this.disposables.add(new r.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 I.mouseSupport=="boolean"?I.mouseSupport:!0),this._horizontalScrolling=(T=I.horizontalScrolling)!==null&&T!==void 0?T:o.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof I.additionalScrollHeight>"u"?0:I.additionalScrollHeight,this.accessibilityProvider=new C(I.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((F=I.transformOptimization)!==null&&F!==void 0?F:o.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(D.Gesture.addTarget(this.rowsContainer)),this.scrollable=new i.Scrollable({forceIntegerValues:!0,smoothScrollDuration:(R=I.smoothScrolling)!==null&&R!==void 0&&R?125:0,scheduleAtNextAnimationFrame:se=>(0,k.scheduleAtNextAnimationFrame)(se)}),this.scrollableElement=this.disposables.add(new w.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:(M=I.alwaysConsumeMouseWheel)!==null&&M!==void 0?M:o.alwaysConsumeMouseWheel,horizontal:1,vertical:(N=I.verticalScrollMode)!==null&&N!==void 0?N:o.verticalScrollMode,useShadows:(A=I.useShadows)!==null&&A!==void 0?A:o.useShadows,mouseWheelScrollSensitivity:I.mouseWheelScrollSensitivity,fastScrollSensitivity:I.fastScrollSensitivity,scrollByPage:I.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),p.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,k.addDisposableListener)(this.rowsContainer,D.EventType.Change,se=>this.onTouchChange(se))),this.disposables.add((0,k.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",se=>se.target.scrollTop=0)),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragover",se=>this.onDragOver(this.toDragEvent(se)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"drop",se=>this.onDrop(this.toDragEvent(se)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragleave",se=>this.onDragLeave(this.toDragEvent(se)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragend",se=>this.onDragEnd(se))),this.setRowLineHeight=(P=I.setRowLineHeight)!==null&&P!==void 0?P:o.setRowLineHeight,this.setRowHeight=(x=I.setRowHeight)!==null&&x!==void 0?x:o.setRowHeight,this.supportDynamicHeights=(W=I.supportDynamicHeights)!==null&&W!==void 0?W:o.supportDynamicHeights,this.dnd=(U=I.dnd)!==null&&U!==void 0?U:o.dnd,this.layout((O=I.initialSize)===null||O===void 0?void 0:O.height,($=I.initialSize)===null||$===void 0?void 0:$.width)}updateOptions(p){p.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=p.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),p.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(p.smoothScrolling?125:0),p.horizontalScrolling!==void 0&&(this.horizontalScrolling=p.horizontalScrolling);let L;p.scrollByPage!==void 0&&(L=Object.assign(Object.assign({},L??{}),{scrollByPage:p.scrollByPage})),p.mouseWheelScrollSensitivity!==void 0&&(L=Object.assign(Object.assign({},L??{}),{mouseWheelScrollSensitivity:p.mouseWheelScrollSensitivity})),p.fastScrollSensitivity!==void 0&&(L=Object.assign(Object.assign({},L??{}),{fastScrollSensitivity:p.fastScrollSensitivity})),L&&this.scrollableElement.updateOptions(L)}splice(p,L,E=[]){if(this.splicing)throw new Error("Can\'t run recursive splices.");this.splicing=!0;try{return this._splice(p,L,E)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(p,L,E=[]){const I=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),T={start:p,end:p+L},F=t.Range.intersect(I,T),R=new Map;for(let H=F.end-1;H>=F.start;H--){const B=this.items[H];if(B.dragStartDisposable.dispose(),B.checkedDisposable.dispose(),B.row){let j=R.get(B.templateId);j||(j=[],R.set(B.templateId,j));const G=this.renderers.get(B.templateId);G&&G.disposeElement&&G.disposeElement(B.element,H,B.row.templateData,B.size),j.push(B.row)}B.row=null}const M={start:p+L,end:this.items.length},N=t.Range.intersect(M,I),A=t.Range.relativeComplement(M,I),P=E.map(H=>({id:String(this.itemId++),element:H,templateId:this.virtualDelegate.getTemplateId(H),size:this.virtualDelegate.getHeight(H),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(H),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:n.Disposable.None,checkedDisposable:n.Disposable.None}));let x;p===0&&L>=this.items.length?(this.rangeMap=new s.RangeMap,this.rangeMap.splice(0,0,P),x=this.items,this.items=P):(this.rangeMap.splice(p,L,P),x=this.items.splice(p,L,...P));const W=E.length-L,U=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),O=(0,s.shift)(N,W),$=t.Range.intersect(U,O);for(let H=$.start;H<$.end;H++)this.updateItemInDOM(this.items[H],H);const Q=t.Range.relativeComplement(O,U);for(const H of Q)for(let B=H.start;B<H.end;B++)this.removeItemFromDOM(B);const se=A.map(H=>(0,s.shift)(H,W)),te=[{start:p,end:p+E.length},...se].map(H=>t.Range.intersect(U,H)),re=this.getNextToLastElement(te);for(const H of te)for(let B=H.start;B<H.end;B++){const j=this.items[B],G=R.get(j.templateId),Y=G?.pop();this.insertItemInDOM(B,re,Y)}for(const H of R.values())for(const B of H)this.cache.release(B);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),x.map(H=>H.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,k.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)return;let p=0;for(const L of this.items)typeof L.width<"u"&&(p=Math.max(p,L.width));this.scrollWidth=p,this.scrollableElement.setScrollDimensions({scrollWidth:p===0?0:p+10})}rerender(){if(this.supportDynamicHeights){for(const p of this.items)p.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const p=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),L=this.rangeMap.positionAt(p.start),E=this.rangeMap.positionAt(p.start+1);return E!==-1&&(E-L)/2+L<this.scrollTop?p.start+1:p.start}element(p){return this.items[p].element}domElement(p){const L=this.items[p].row;return L&&L.domNode}elementHeight(p){return this.items[p].size}elementTop(p){return this.rangeMap.positionAt(p)}indexAt(p){return this.rangeMap.indexAt(p)}indexAfter(p){return this.rangeMap.indexAfter(p)}layout(p,L){const E={height:typeof p=="number"?p:(0,k.getContentHeight)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,E.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(E),typeof L<"u"&&(this.renderWidth=L,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof L=="number"?L:(0,k.getContentWidth)(this.domNode)})}render(p,L,E,I,T,F=!1){const R=this.getRenderRange(L,E),M=t.Range.relativeComplement(R,p),N=t.Range.relativeComplement(p,R),A=this.getNextToLastElement(M);if(F){const P=t.Range.intersect(p,R);for(let x=P.start;x<P.end;x++)this.updateItemInDOM(this.items[x],x)}this.cache.transact(()=>{for(const P of N)for(let x=P.start;x<P.end;x++)this.removeItemFromDOM(x);for(const P of M)for(let x=P.start;x<P.end;x++)this.insertItemInDOM(x,A)}),I!==void 0&&(this.rowsContainer.style.left=`-${I}px`),this.rowsContainer.style.top=`-${L}px`,this.horizontalScrolling&&T!==void 0&&(this.rowsContainer.style.width=`${Math.max(T,this.renderWidth)}px`),this.lastRenderTop=L,this.lastRenderHeight=E}insertItemInDOM(p,L,E){const I=this.items[p];let T=!1;if(!I.row)if(E)I.row=E;else{const A=this.cache.alloc(I.templateId);I.row=A.row,T=A.isReusingConnectedDomNode}const F=this.accessibilityProvider.getRole(I.element)||"listitem";I.row.domNode.setAttribute("role",F);const R=this.accessibilityProvider.isChecked(I.element);if(typeof R=="boolean")I.row.domNode.setAttribute("aria-checked",String(!!R));else if(R){const A=P=>I.row.domNode.setAttribute("aria-checked",String(!!P));A(R.value),I.checkedDisposable=R.onDidChange(A)}(T||!I.row.domNode.parentElement)&&(L?this.rowsContainer.insertBefore(I.row.domNode,L):this.rowsContainer.appendChild(I.row.domNode)),this.updateItemInDOM(I,p);const M=this.renderers.get(I.templateId);if(!M)throw new Error(`No renderer found for template id ${I.templateId}`);M?.renderElement(I.element,p,I.row.templateData,I.size);const N=this.dnd.getDragURI(I.element);I.dragStartDisposable.dispose(),I.row.domNode.draggable=!!N,N&&(I.dragStartDisposable=(0,k.addDisposableListener)(I.row.domNode,"dragstart",A=>this.onDragStart(I.element,N,A))),this.horizontalScrolling&&(this.measureItemWidth(I),this.eventuallyUpdateScrollWidth())}measureItemWidth(p){if(!p.row||!p.row.domNode)return;p.row.domNode.style.width="fit-content",p.width=(0,k.getContentWidth)(p.row.domNode);const L=window.getComputedStyle(p.row.domNode);L.paddingLeft&&(p.width+=parseFloat(L.paddingLeft)),L.paddingRight&&(p.width+=parseFloat(L.paddingRight)),p.row.domNode.style.width=""}updateItemInDOM(p,L){p.row.domNode.style.top=`${this.elementTop(L)}px`,this.setRowHeight&&(p.row.domNode.style.height=`${p.size}px`),this.setRowLineHeight&&(p.row.domNode.style.lineHeight=`${p.size}px`),p.row.domNode.setAttribute("data-index",`${L}`),p.row.domNode.setAttribute("data-last-element",L===this.length-1?"true":"false"),p.row.domNode.setAttribute("data-parity",L%2===0?"even":"odd"),p.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(p.element,L,this.length))),p.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(p.element,L))),p.row.domNode.setAttribute("id",this.getElementDomId(L)),p.row.domNode.classList.toggle("drop-target",p.dropTarget)}removeItemFromDOM(p){const L=this.items[p];if(L.dragStartDisposable.dispose(),L.checkedDisposable.dispose(),L.row){const E=this.renderers.get(L.templateId);E&&E.disposeElement&&E.disposeElement(L.element,p,L.row.templateData,L.size),this.cache.release(L.row),L.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(p,L){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:p,reuseAnimation:L})}get scrollTop(){return this.getScrollTop()}set scrollTop(p){this.setScrollTop(p)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"click")).event,p=>this.toMouseEvent(p),this.disposables)}get onMouseDblClick(){return m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"dblclick")).event,p=>this.toMouseEvent(p),this.disposables)}get onMouseMiddleClick(){return m.Event.filter(m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"auxclick")).event,p=>this.toMouseEvent(p),this.disposables),p=>p.browserEvent.button===1,this.disposables)}get onMouseDown(){return m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mousedown")).event,p=>this.toMouseEvent(p),this.disposables)}get onMouseOver(){return m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mouseover")).event,p=>this.toMouseEvent(p),this.disposables)}get onMouseOut(){return m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mouseout")).event,p=>this.toMouseEvent(p),this.disposables)}get onContextMenu(){return m.Event.any(m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"contextmenu")).event,p=>this.toMouseEvent(p),this.disposables),m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,D.EventType.Contextmenu)).event,p=>this.toGestureEvent(p),this.disposables))}get onTouchStart(){return m.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"touchstart")).event,p=>this.toTouchEvent(p),this.disposables)}get onTap(){return m.Event.map(this.disposables.add(new y.DomEmitter(this.rowsContainer,D.EventType.Tap)).event,p=>this.toGestureEvent(p),this.disposables)}toMouseEvent(p){const L=this.getItemIndexFromEventTarget(p.target||null),E=typeof L>"u"?void 0:this.items[L],I=E&&E.element;return{browserEvent:p,index:L,element:I}}toTouchEvent(p){const L=this.getItemIndexFromEventTarget(p.target||null),E=typeof L>"u"?void 0:this.items[L],I=E&&E.element;return{browserEvent:p,index:L,element:I}}toGestureEvent(p){const L=this.getItemIndexFromEventTarget(p.initialTarget||null),E=typeof L>"u"?void 0:this.items[L],I=E&&E.element;return{browserEvent:p,index:L,element:I}}toDragEvent(p){const L=this.getItemIndexFromEventTarget(p.target||null),E=typeof L>"u"?void 0:this.items[L],I=E&&E.element;return{browserEvent:p,index:L,element:I}}onScroll(p){try{const L=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(L,p.scrollTop,p.height,p.scrollLeft,p.scrollWidth),this.supportDynamicHeights&&this._rerender(p.scrollTop,p.height,p.inSmoothScrolling)}catch(L){throw console.error("Got bad scroll event:",p),L}}onTouchChange(p){p.preventDefault(),p.stopPropagation(),this.scrollTop-=p.translationY}onDragStart(p,L,E){var I,T;if(!E.dataTransfer)return;const F=this.dnd.getDragElements(p);if(E.dataTransfer.effectAllowed="copyMove",E.dataTransfer.setData(S.DataTransfers.TEXT,L),E.dataTransfer.setDragImage){let R;this.dnd.getDragLabel&&(R=this.dnd.getDragLabel(F,E)),typeof R>"u"&&(R=String(F.length));const M=(0,k.$)(".monaco-drag-image");M.textContent=R;const A=(P=>{for(;P&&!P.classList.contains("monaco-workbench");)P=P.parentElement;return P||document.body})(this.domNode);A.appendChild(M),E.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>A.removeChild(M),0)}this.domNode.classList.add("dragging"),this.currentDragData=new l(F),g.CurrentDragAndDropData=new a(F),(T=(I=this.dnd).onDragStart)===null||T===void 0||T.call(I,this.currentDragData,E)}onDragOver(p){var L;if(p.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),g.CurrentDragAndDropData&&g.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(p.browserEvent),!p.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(g.CurrentDragAndDropData)this.currentDragData=g.CurrentDragAndDropData;else{if(!p.browserEvent.dataTransfer.types)return!1;this.currentDragData=new d}const E=this.dnd.onDragOver(this.currentDragData,p.element,p.index,p.browserEvent);if(this.canDrop=typeof E=="boolean"?E:E.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;p.browserEvent.dataTransfer.dropEffect=typeof E!="boolean"&&E.effect===0?"copy":"move";let I;if(typeof E!="boolean"&&E.feedback?I=E.feedback:typeof p.index>"u"?I=[-1]:I=[p.index],I=(0,b.distinct)(I).filter(T=>T>=-1&&T<this.length).sort((T,F)=>T-F),I=I[0]===-1?[-1]:I,u(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=(0,n.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const T of I){const F=this.items[T];F.dropTarget=!0,(L=F.row)===null||L===void 0||L.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,n.toDisposable)(()=>{var T;for(const F of I){const R=this.items[F];R.dropTarget=!1,(T=R.row)===null||T===void 0||T.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(p){var L,E;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,_.disposableTimeout)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((E=(L=this.dnd).onDragLeave)===null||E===void 0||E.call(L,this.currentDragData,p.element,p.index,p.browserEvent))}onDrop(p){if(!this.canDrop)return;const L=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,g.CurrentDragAndDropData=void 0,!(!L||!p.browserEvent.dataTransfer)&&(p.browserEvent.preventDefault(),L.update(p.browserEvent.dataTransfer),this.dnd.drop(L,p.element,p.index,p.browserEvent))}onDragEnd(p){var L,E;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,g.CurrentDragAndDropData=void 0,(E=(L=this.dnd).onDragEnd)===null||E===void 0||E.call(L,p)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=n.Disposable.None}setupDragAndDropScrollTopAnimation(p){if(!this.dragOverAnimationDisposable){const L=(0,k.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,k.animate)(this.animateDragAndDropScrollTop.bind(this,L))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,_.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=p.pageY}animateDragAndDropScrollTop(p){if(this.dragOverMouseY===void 0)return;const L=this.dragOverMouseY-p,E=this.renderHeight-35;L<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(L-35))):L>E&&(this.scrollTop+=Math.min(14,Math.floor(.3*(L-E))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(p){const L=this.scrollableElement.getDomNode();let E=p;for(;E instanceof HTMLElement&&E!==this.rowsContainer&&L.contains(E);){const I=E.getAttribute("data-index");if(I){const T=Number(I);if(!isNaN(T))return T}E=E.parentElement}}getRenderRange(p,L){return{start:this.rangeMap.indexAt(p),end:this.rangeMap.indexAfter(p+L-1)}}_rerender(p,L,E){const I=this.getRenderRange(p,L);let T,F;p===this.elementTop(I.start)?(T=I.start,F=0):I.end-I.start>1&&(T=I.start+1,F=this.elementTop(T)-p);let R=0;for(;;){const M=this.getRenderRange(p,L);let N=!1;for(let A=M.start;A<M.end;A++){const P=this.probeDynamicHeight(A);P!==0&&this.rangeMap.splice(A,1,[this.items[A]]),R+=P,N=N||P!==0}if(!N){R!==0&&this.eventuallyUpdateScrollDimensions();const A=t.Range.relativeComplement(I,M);for(const x of A)for(let W=x.start;W<x.end;W++)this.items[W].row&&this.removeItemFromDOM(W);const P=t.Range.relativeComplement(M,I);for(const x of P)for(let W=x.start;W<x.end;W++){const U=W+1,O=U<this.items.length?this.items[U].row:null,$=O?O.domNode:null;this.insertItemInDOM(W,$)}for(let x=M.start;x<M.end;x++)this.items[x].row&&this.updateItemInDOM(this.items[x],x);if(typeof T=="number"){const x=this.scrollable.getFutureScrollPosition().scrollTop-p,W=this.elementTop(T)-F+x;this.setScrollTop(W,E)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(p){var L,E,I;const T=this.items[p];if(this.virtualDelegate.getDynamicHeight){const N=this.virtualDelegate.getDynamicHeight(T.element);if(N!==null){const A=T.size;return T.size=N,T.lastDynamicHeightWidth=this.renderWidth,N-A}}if(!T.hasDynamicHeight||T.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(T.element))return 0;const F=T.size;if(T.row)return T.row.domNode.style.height="",T.size=T.row.domNode.offsetHeight,T.lastDynamicHeightWidth=this.renderWidth,T.size-F;const{row:R}=this.cache.alloc(T.templateId);R.domNode.style.height="",this.rowsContainer.appendChild(R.domNode);const M=this.renderers.get(T.templateId);if(!M)throw new c.BugIndicatingError("Missing renderer for templateId: "+T.templateId);return M.renderElement(T.element,p,R.templateData,void 0),T.size=R.domNode.offsetHeight,(L=M.disposeElement)===null||L===void 0||L.call(M,T.element,p,R.templateData,void 0),(I=(E=this.virtualDelegate).setDynamicHeight)===null||I===void 0||I.call(E,T.element,T.size),T.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(R.domNode),this.cache.release(R),T.size-F}getNextToLastElement(p){const L=p[p.length-1];if(!L)return null;const E=this.items[L.end];return!E||!E.row?null:E.row.domNode}getElementDomId(p){return`${this.domId}_${p}`}dispose(){var p;if(this.items){for(const L of this.items)if(L.row){const E=this.renderers.get(L.row.templateId);E&&((p=E.disposeElement)===null||p===void 0||p.call(E,L.element,-1,L.row.templateData,void 0),E.disposeTemplate(L.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,n.dispose)(this.disposables)}}f.InstanceCount=0,Ne([h.memoize],f.prototype,"onMouseClick",null),Ne([h.memoize],f.prototype,"onMouseDblClick",null),Ne([h.memoize],f.prototype,"onMouseMiddleClick",null),Ne([h.memoize],f.prototype,"onMouseDown",null),Ne([h.memoize],f.prototype,"onMouseOver",null),Ne([h.memoize],f.prototype,"onMouseOut",null),Ne([h.memoize],f.prototype,"onContextMenu",null),Ne([h.memoize],f.prototype,"onTouchStart",null),Ne([h.memoize],f.prototype,"onTap",null),e.ListView=f}),define(J[108],ee([1,0,7,76,44,56,50,351,16,12,37,99,6,63,2,132,17,18,350,210,248]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.unthemedListStyles=e.DefaultStyleController=e.MouseController=e.isSelectionRangeChangeEvent=e.isSelectionSingleChangeEvent=e.DefaultKeyboardNavigationDelegate=e.TypeNavigationMode=e.isButton=e.isMonacoEditor=e.isInputElement=void 0;class a{constructor(B){this.trait=B,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(B){return B}renderElement(B,j,G){const Y=this.renderedElements.findIndex(ne=>ne.templateData===G);if(Y>=0){const ne=this.renderedElements[Y];this.trait.unrender(G),ne.index=j}else{const ne={index:j,templateData:G};this.renderedElements.push(ne)}this.trait.renderIndex(j,G)}splice(B,j,G){const Y=[];for(const ne of this.renderedElements)ne.index<B?Y.push(ne):ne.index>=B+j&&Y.push({index:ne.index+G-j,templateData:ne.templateData});this.renderedElements=Y}renderIndexes(B){for(const{index:j,templateData:G}of this.renderedElements)B.indexOf(j)>-1&&this.trait.renderIndex(j,G)}disposeTemplate(B){const j=this.renderedElements.findIndex(G=>G.templateData===B);j<0||this.renderedElements.splice(j,1)}}class d{get name(){return this._trait}get renderer(){return new a(this)}constructor(B){this._trait=B,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new t.Emitter,this.onChange=this._onChange.event}splice(B,j,G){var Y;j=Math.max(0,Math.min(j,this.length-B));const ne=G.length-j,de=B+j,he=[...this.sortedIndexes.filter(ce=>ce<B),...G.map((ce,z)=>ce?z+B:-1).filter(ce=>ce!==-1),...this.sortedIndexes.filter(ce=>ce>=de).map(ce=>ce+ne)],oe=this.length+ne;if(this.sortedIndexes.length>0&&he.length===0&&oe>0){const ce=(Y=this.sortedIndexes.find(z=>z>=B))!==null&&Y!==void 0?Y:oe-1;he.push(Math.min(ce,oe-1))}this.renderer.splice(B,j,G.length),this._set(he,he),this.length=oe}renderIndex(B,j){j.classList.toggle(this._trait,this.contains(B))}unrender(B){B.classList.remove(this._trait)}set(B,j){return this._set(B,[...B].sort(Q),j)}_set(B,j,G){const Y=this.indexes,ne=this.sortedIndexes;this.indexes=B,this.sortedIndexes=j;const de=O(ne,B);return this.renderer.renderIndexes(de),this._onChange.fire({indexes:B,browserEvent:G}),Y}get(){return this.indexes}contains(B){return(0,_.binarySearch)(this.sortedIndexes,B,Q)>=0}dispose(){(0,s.dispose)(this._onChange)}}Ne([n.memoize],d.prototype,"renderer",null);class u extends d{constructor(B){super("selected"),this.setAriaSelected=B}renderIndex(B,j){super.renderIndex(B,j),this.setAriaSelected&&(this.contains(B)?j.setAttribute("aria-selected","true"):j.setAttribute("aria-selected","false"))}}class C{constructor(B,j,G){this.trait=B,this.view=j,this.identityProvider=G}splice(B,j,G){if(!this.identityProvider)return this.trait.splice(B,j,G.map(()=>!1));const Y=this.trait.get().map(de=>this.identityProvider.getId(this.view.element(de)).toString()),ne=G.map(de=>Y.indexOf(this.identityProvider.getId(de).toString())>-1);this.trait.splice(B,j,ne)}}function f(H){return H.tagName==="INPUT"||H.tagName==="TEXTAREA"}e.isInputElement=f;function v(H){return H.classList.contains("monaco-editor")?!0:H.classList.contains("monaco-list")||!H.parentElement?!1:v(H.parentElement)}e.isMonacoEditor=v;function p(H){return H.tagName==="A"&&H.classList.contains("monaco-button")||H.tagName==="DIV"&&H.classList.contains("monaco-button-dropdown")?!0:H.classList.contains("monaco-list")||!H.parentElement?!1:p(H.parentElement)}e.isButton=p;class L{get onKeyDown(){return this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event).filter(B=>!f(B.target)).map(B=>new y.StandardKeyboardEvent(B)))}constructor(B,j,G){this.list=B,this.view=j,this.disposables=new s.DisposableStore,this.multipleSelectionDisposables=new s.DisposableStore,this.onKeyDown.filter(Y=>Y.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(Y=>Y.keyCode===9).on(this.onEscape,this,this.disposables),G.multipleSelectionSupport!==!1&&this.onKeyDown.filter(Y=>(c.isMacintosh?Y.metaKey:Y.ctrlKey)&&Y.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}updateOptions(B){B.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),B.multipleSelectionSupport&&this.onKeyDown.filter(j=>(c.isMacintosh?j.metaKey:j.ctrlKey)&&j.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(B){B.preventDefault(),B.stopPropagation(),this.list.setSelection(this.list.getFocus(),B.browserEvent)}onUpArrow(B){B.preventDefault(),B.stopPropagation(),this.list.focusPrevious(1,!1,B.browserEvent);const j=this.list.getFocus()[0];this.list.setAnchor(j),this.list.reveal(j),this.view.domNode.focus()}onDownArrow(B){B.preventDefault(),B.stopPropagation(),this.list.focusNext(1,!1,B.browserEvent);const j=this.list.getFocus()[0];this.list.setAnchor(j),this.list.reveal(j),this.view.domNode.focus()}onPageUpArrow(B){B.preventDefault(),B.stopPropagation(),this.list.focusPreviousPage(B.browserEvent);const j=this.list.getFocus()[0];this.list.setAnchor(j),this.list.reveal(j),this.view.domNode.focus()}onPageDownArrow(B){B.preventDefault(),B.stopPropagation(),this.list.focusNextPage(B.browserEvent);const j=this.list.getFocus()[0];this.list.setAnchor(j),this.list.reveal(j),this.view.domNode.focus()}onCtrlA(B){B.preventDefault(),B.stopPropagation(),this.list.setSelection((0,_.range)(this.list.length),B.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(B){this.list.getSelection().length&&(B.preventDefault(),B.stopPropagation(),this.list.setSelection([],B.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Ne([n.memoize],L.prototype,"onKeyDown",null);var E;(function(H){H[H.Automatic=0]="Automatic",H[H.Trigger=1]="Trigger"})(E=e.TypeNavigationMode||(e.TypeNavigationMode={}));var I;(function(H){H[H.Idle=0]="Idle",H[H.Typing=1]="Typing"})(I||(I={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(H){return H.ctrlKey||H.metaKey||H.altKey?!1:H.keyCode>=31&&H.keyCode<=56||H.keyCode>=21&&H.keyCode<=30||H.keyCode>=93&&H.keyCode<=102||H.keyCode>=80&&H.keyCode<=90}};class T{constructor(B,j,G,Y,ne){this.list=B,this.view=j,this.keyboardNavigationLabelProvider=G,this.keyboardNavigationEventFilter=Y,this.delegate=ne,this.enabled=!1,this.state=I.Idle,this.mode=E.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new s.DisposableStore,this.disposables=new s.DisposableStore,this.updateOptions(B.options)}updateOptions(B){var j,G;!((j=B.typeNavigationEnabled)!==null&&j!==void 0)||j?this.enable():this.disable(),this.mode=(G=B.typeNavigationMode)!==null&&G!==void 0?G:E.Automatic}enable(){if(this.enabled)return;let B=!1;const j=this.enabledDisposables.add(t.Event.chain(this.enabledDisposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event)).filter(ne=>!f(ne.target)).filter(()=>this.mode===E.Automatic||this.triggered).map(ne=>new y.StandardKeyboardEvent(ne)).filter(ne=>B||this.keyboardNavigationEventFilter(ne)).filter(ne=>this.delegate.mightProducePrintableCharacter(ne)).forEach(ne=>S.EventHelper.stop(ne,!0)).map(ne=>ne.browserEvent.key).event,G=t.Event.debounce(j,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);t.Event.reduce(t.Event.any(j,G),(ne,de)=>de===null?null:(ne||"")+de,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),G(this.onClear,this,this.enabledDisposables),j(()=>B=!0,void 0,this.enabledDisposables),G(()=>B=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var B;const j=this.list.getFocus();if(j.length>0&&j[0]===this.previouslyFocused){const G=(B=this.list.options.accessibilityProvider)===null||B===void 0?void 0:B.getAriaLabel(this.list.element(j[0]));G&&(0,w.alert)(G)}this.previouslyFocused=-1}onInput(B){if(!B){this.state=I.Idle,this.triggered=!1;return}const j=this.list.getFocus(),G=j.length>0?j[0]:0,Y=this.state===I.Idle?1:0;this.state=I.Typing;for(let ne=0;ne<this.list.length;ne++){const de=(G+ne+Y)%this.list.length,he=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(de)),oe=he&&he.toString();if(typeof oe>"u"||(0,i.matchesPrefix)(B,oe)){this.previouslyFocused=G,this.list.setFocus([de]),this.list.reveal(de);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class F{constructor(B,j){this.list=B,this.view=j,this.disposables=new s.DisposableStore,this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(j.domNode,"keydown")).event)).filter(Y=>!f(Y.target)).map(Y=>new y.StandardKeyboardEvent(Y)).filter(Y=>Y.keyCode===2&&!Y.ctrlKey&&!Y.metaKey&&!Y.shiftKey&&!Y.altKey).on(this.onTab,this,this.disposables)}onTab(B){if(B.target!==this.view.domNode)return;const j=this.list.getFocus();if(j.length===0)return;const G=this.view.domElement(j[0]);if(!G)return;const Y=G.querySelector("[tabIndex]");if(!Y||!(Y instanceof HTMLElement)||Y.tabIndex===-1)return;const ne=window.getComputedStyle(Y);ne.visibility==="hidden"||ne.display==="none"||(B.preventDefault(),B.stopPropagation(),Y.focus())}dispose(){this.disposables.dispose()}}function R(H){return c.isMacintosh?H.browserEvent.metaKey:H.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=R;function M(H){return H.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=M;function N(H){return H instanceof MouseEvent&&H.button===2}const A={isSelectionSingleChangeEvent:R,isSelectionRangeChangeEvent:M};class P{constructor(B){this.list=B,this.disposables=new s.DisposableStore,this._onPointer=new t.Emitter,this.onPointer=this._onPointer.event,B.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||A),this.mouseSupport=typeof B.options.mouseSupport>"u"||!!B.options.mouseSupport,this.mouseSupport&&(B.onMouseDown(this.onMouseDown,this,this.disposables),B.onContextMenu(this.onContextMenu,this,this.disposables),B.onMouseDblClick(this.onDoubleClick,this,this.disposables),B.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(D.Gesture.addTarget(B.getHTMLElement()))),t.Event.any(B.onMouseClick,B.onMouseMiddleClick,B.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(B){B.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,B.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||A))}isSelectionSingleChangeEvent(B){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(B):!1}isSelectionRangeChangeEvent(B){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(B):!1}isSelectionChangeEvent(B){return this.isSelectionSingleChangeEvent(B)||this.isSelectionRangeChangeEvent(B)}onMouseDown(B){v(B.browserEvent.target)||document.activeElement!==B.browserEvent.target&&this.list.domFocus()}onContextMenu(B){if(f(B.browserEvent.target)||v(B.browserEvent.target))return;const j=typeof B.index>"u"?[]:[B.index];this.list.setFocus(j,B.browserEvent)}onViewPointer(B){if(!this.mouseSupport||f(B.browserEvent.target)||v(B.browserEvent.target))return;const j=B.index;if(typeof j>"u"){this.list.setFocus([],B.browserEvent),this.list.setSelection([],B.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(B))return this.changeSelection(B);if(this.isSelectionChangeEvent(B))return this.changeSelection(B);this.list.setFocus([j],B.browserEvent),this.list.setAnchor(j),N(B.browserEvent)||this.list.setSelection([j],B.browserEvent),this._onPointer.fire(B)}onDoubleClick(B){if(f(B.browserEvent.target)||v(B.browserEvent.target)||this.isSelectionChangeEvent(B))return;const j=this.list.getFocus();this.list.setSelection(j,B.browserEvent)}changeSelection(B){const j=B.index;let G=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(B)){if(typeof G>"u"){const z=this.list.getFocus()[0];G=z??j,this.list.setAnchor(G)}const Y=Math.min(G,j),ne=Math.max(G,j),de=(0,_.range)(Y,ne+1),he=this.list.getSelection(),oe=U(O(he,[G]),G);if(oe.length===0)return;const ce=O(de,$(he,oe));this.list.setSelection(ce,B.browserEvent),this.list.setFocus([j],B.browserEvent)}else if(this.isSelectionSingleChangeEvent(B)){const Y=this.list.getSelection(),ne=Y.filter(de=>de!==j);this.list.setFocus([j]),this.list.setAnchor(j),Y.length===ne.length?this.list.setSelection([...ne,j],B.browserEvent):this.list.setSelection(ne,B.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=P;class x{constructor(B,j){this.styleElement=B,this.selectorSuffix=j}style(B){var j,G;const Y=this.selectorSuffix&&`.${this.selectorSuffix}`,ne=[];B.listBackground&&ne.push(`.monaco-list${Y} .monaco-list-rows { background: ${B.listBackground}; }`),B.listFocusBackground&&(ne.push(`.monaco-list${Y}:focus .monaco-list-row.focused { background-color: ${B.listFocusBackground}; }`),ne.push(`.monaco-list${Y}:focus .monaco-list-row.focused:hover { background-color: ${B.listFocusBackground}; }`)),B.listFocusForeground&&ne.push(`.monaco-list${Y}:focus .monaco-list-row.focused { color: ${B.listFocusForeground}; }`),B.listActiveSelectionBackground&&(ne.push(`.monaco-list${Y}:focus .monaco-list-row.selected { background-color: ${B.listActiveSelectionBackground}; }`),ne.push(`.monaco-list${Y}:focus .monaco-list-row.selected:hover { background-color: ${B.listActiveSelectionBackground}; }`)),B.listActiveSelectionForeground&&ne.push(`.monaco-list${Y}:focus .monaco-list-row.selected { color: ${B.listActiveSelectionForeground}; }`),B.listActiveSelectionIconForeground&&ne.push(`.monaco-list${Y}:focus .monaco-list-row.selected .codicon { color: ${B.listActiveSelectionIconForeground}; }`),B.listFocusAndSelectionBackground&&ne.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${Y}:focus .monaco-list-row.selected.focused { background-color: ${B.listFocusAndSelectionBackground}; }\n\t\t\t`),B.listFocusAndSelectionForeground&&ne.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${Y}:focus .monaco-list-row.selected.focused { color: ${B.listFocusAndSelectionForeground}; }\n\t\t\t`),B.listInactiveFocusForeground&&(ne.push(`.monaco-list${Y} .monaco-list-row.focused { color: ${B.listInactiveFocusForeground}; }`),ne.push(`.monaco-list${Y} .monaco-list-row.focused:hover { color: ${B.listInactiveFocusForeground}; }`)),B.listInactiveSelectionIconForeground&&ne.push(`.monaco-list${Y} .monaco-list-row.focused .codicon { color: ${B.listInactiveSelectionIconForeground}; }`),B.listInactiveFocusBackground&&(ne.push(`.monaco-list${Y} .monaco-list-row.focused { background-color: ${B.listInactiveFocusBackground}; }`),ne.push(`.monaco-list${Y} .monaco-list-row.focused:hover { background-color: ${B.listInactiveFocusBackground}; }`)),B.listInactiveSelectionBackground&&(ne.push(`.monaco-list${Y} .monaco-list-row.selected { background-color: ${B.listInactiveSelectionBackground}; }`),ne.push(`.monaco-list${Y} .monaco-list-row.selected:hover { background-color: ${B.listInactiveSelectionBackground}; }`)),B.listInactiveSelectionForeground&&ne.push(`.monaco-list${Y} .monaco-list-row.selected { color: ${B.listInactiveSelectionForeground}; }`),B.listHoverBackground&&ne.push(`.monaco-list${Y}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${B.listHoverBackground}; }`),B.listHoverForeground&&ne.push(`.monaco-list${Y}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${B.listHoverForeground}; }`);const de=(0,S.asCssValueWithDefault)(B.listFocusAndSelectionOutline,(0,S.asCssValueWithDefault)(B.listSelectionOutline,(j=B.listFocusOutline)!==null&&j!==void 0?j:""));de&&ne.push(`.monaco-list${Y}:focus .monaco-list-row.focused.selected { outline: 1px solid ${de}; outline-offset: -1px;}`),B.listFocusOutline&&ne.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${Y}:focus .monaco-list-row.focused { outline: 1px solid ${B.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${Y}.last-focused .monaco-list-row.focused { outline: 1px solid ${B.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const he=(0,S.asCssValueWithDefault)(B.listSelectionOutline,(G=B.listInactiveFocusOutline)!==null&&G!==void 0?G:"");he&&ne.push(`.monaco-list${Y} .monaco-list-row.focused.selected { outline: 1px dotted ${he}; outline-offset: -1px; }`),B.listSelectionOutline&&ne.push(`.monaco-list${Y} .monaco-list-row.selected { outline: 1px dotted ${B.listSelectionOutline}; outline-offset: -1px; }`),B.listInactiveFocusOutline&&ne.push(`.monaco-list${Y} .monaco-list-row.focused { outline: 1px dotted ${B.listInactiveFocusOutline}; outline-offset: -1px; }`),B.listHoverOutline&&ne.push(`.monaco-list${Y} .monaco-list-row:hover { outline: 1px dashed ${B.listHoverOutline}; outline-offset: -1px; }`),B.listDropBackground&&ne.push(`\n\t\t\t\t.monaco-list${Y}.drop-target,\n\t\t\t\t.monaco-list${Y} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${Y} .monaco-list-row.drop-target { background-color: ${B.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),B.tableColumnsBorder&&ne.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${B.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),B.tableOddRowsBackgroundColor&&ne.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${B.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=ne.join(`\n`)}}e.DefaultStyleController=x,e.unthemedListStyles={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:m.Color.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:m.Color.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:m.Color.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0};const W={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function U(H,B){const j=H.indexOf(B);if(j===-1)return[];const G=[];let Y=j-1;for(;Y>=0&&H[Y]===B-(j-Y);)G.push(H[Y--]);for(G.reverse(),Y=j;Y<H.length&&H[Y]===B+(Y-j);)G.push(H[Y++]);return G}function O(H,B){const j=[];let G=0,Y=0;for(;G<H.length||Y<B.length;)if(G>=H.length)j.push(B[Y++]);else if(Y>=B.length)j.push(H[G++]);else if(H[G]===B[Y]){j.push(H[G]),G++,Y++;continue}else H[G]<B[Y]?j.push(H[G++]):j.push(B[Y++]);return j}function $(H,B){const j=[];let G=0,Y=0;for(;G<H.length||Y<B.length;)if(G>=H.length)j.push(B[Y++]);else if(Y>=B.length)j.push(H[G++]);else if(H[G]===B[Y]){G++,Y++;continue}else H[G]<B[Y]?j.push(H[G++]):Y++;return j}const Q=(H,B)=>H-B;class se{constructor(B,j){this._templateId=B,this.renderers=j}get templateId(){return this._templateId}renderTemplate(B){return this.renderers.map(j=>j.renderTemplate(B))}renderElement(B,j,G,Y){let ne=0;for(const de of this.renderers)de.renderElement(B,j,G[ne++],Y)}disposeElement(B,j,G,Y){var ne;let de=0;for(const he of this.renderers)(ne=he.disposeElement)===null||ne===void 0||ne.call(he,B,j,G[de],Y),de+=1}disposeTemplate(B){let j=0;for(const G of this.renderers)G.disposeTemplate(B[j++])}}class le{constructor(B){this.accessibilityProvider=B,this.templateId="a18n"}renderTemplate(B){return B}renderElement(B,j,G){const Y=this.accessibilityProvider.getAriaLabel(B);Y?G.setAttribute("aria-label",Y):G.removeAttribute("aria-label");const ne=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(B);typeof ne=="number"?G.setAttribute("aria-level",`${ne}`):G.removeAttribute("aria-level")}disposeTemplate(B){}}class te{constructor(B,j){this.list=B,this.dnd=j}getDragElements(B){const j=this.list.getSelectedElements();return j.indexOf(B)>-1?j:[B]}getDragURI(B){return this.dnd.getDragURI(B)}getDragLabel(B,j){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(B,j)}onDragStart(B,j){var G,Y;(Y=(G=this.dnd).onDragStart)===null||Y===void 0||Y.call(G,B,j)}onDragOver(B,j,G,Y){return this.dnd.onDragOver(B,j,G,Y)}onDragLeave(B,j,G,Y){var ne,de;(de=(ne=this.dnd).onDragLeave)===null||de===void 0||de.call(ne,B,j,G,Y)}onDragEnd(B){var j,G;(G=(j=this.dnd).onDragEnd)===null||G===void 0||G.call(j,B)}drop(B,j,G,Y){this.dnd.drop(B,j,G,Y)}}class re{get onDidChangeFocus(){return t.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),B=>this.toListEvent(B),this.disposables)}get onDidChangeSelection(){return t.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),B=>this.toListEvent(B),this.disposables)}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 onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let B=!1;const j=this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event)).map(ne=>new y.StandardKeyboardEvent(ne)).filter(ne=>B=ne.keyCode===58||ne.shiftKey&&ne.keyCode===68).map(ne=>S.EventHelper.stop(ne,!0)).filter(()=>!1).event,G=this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keyup")).event)).forEach(()=>B=!1).map(ne=>new y.StandardKeyboardEvent(ne)).filter(ne=>ne.keyCode===58||ne.shiftKey&&ne.keyCode===68).map(ne=>S.EventHelper.stop(ne,!0)).map(({browserEvent:ne})=>{const de=this.getFocus(),he=de.length?de[0]:void 0,oe=typeof he<"u"?this.view.element(he):void 0,ce=typeof he<"u"?this.view.domElement(he):this.view.domNode;return{index:he,element:oe,anchor:ce,browserEvent:ne}}).event,Y=this.disposables.add(t.Event.chain(this.view.onContextMenu)).filter(ne=>!B).map(({element:ne,index:de,browserEvent:he})=>({element:ne,index:de,anchor:{x:he.pageX+1,y:he.pageY},browserEvent:he})).event;return t.Event.any(j,G,Y)}get onKeyDown(){return this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event}get onDidFocus(){return t.Event.signal(this.disposables.add(new k.DomEmitter(this.view.domNode,"focus",!0)).event)}constructor(B,j,G,Y,ne=W){var de,he,oe,ce;this.user=B,this._options=ne,this.focus=new d("focused"),this.anchor=new d("anchor"),this.eventBufferer=new t.EventBufferer,this._ariaLabel="",this.disposables=new s.DisposableStore,this._onDidDispose=new t.Emitter,this.onDidDispose=this._onDidDispose.event;const z=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(de=this._options.accessibilityProvider)===null||de===void 0?void 0:de.getWidgetRole():"list";this.selection=new u(z!=="listbox");const V=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=ne.accessibilityProvider,this.accessibilityProvider&&(V.push(new le(this.accessibilityProvider)),(oe=(he=this.accessibilityProvider).onDidChangeActiveDescendant)===null||oe===void 0||oe.call(he,this.onDidChangeActiveDescendant,this,this.disposables)),Y=Y.map(ie=>new se(ie.templateId,[...V,ie]));const K=Object.assign(Object.assign({},ne),{dnd:ne.dnd&&new te(this,ne.dnd)});if(this.view=this.createListView(j,G,Y,K),this.view.domNode.setAttribute("role",z),ne.styleController)this.styleController=ne.styleController(this.view.domId);else{const ie=(0,S.createStyleSheet)(this.view.domNode);this.styleController=new x(ie,this.view.domId)}if(this.spliceable=new b.CombinedSpliceable([new C(this.focus,this.view,ne.identityProvider),new C(this.selection,this.view,ne.identityProvider),new C(this.anchor,this.view,ne.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new F(this,this.view)),(typeof ne.keyboardSupport!="boolean"||ne.keyboardSupport)&&(this.keyboardController=new L(this,this.view,ne),this.disposables.add(this.keyboardController)),ne.keyboardNavigationLabelProvider){const ie=ne.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeNavigationController=new T(this,this.view,ne.keyboardNavigationLabelProvider,(ce=ne.keyboardNavigationEventFilter)!==null&&ce!==void 0?ce:()=>!0,ie),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(ne),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()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(B,j,G,Y){return new l.ListView(B,j,G,Y)}createMouseController(B){return new P(this)}updateOptions(B={}){var j,G;this._options=Object.assign(Object.assign({},this._options),B),(j=this.typeNavigationController)===null||j===void 0||j.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(B),(G=this.keyboardController)===null||G===void 0||G.updateOptions(B),this.view.updateOptions(B)}get options(){return this._options}splice(B,j,G=[]){if(B<0||B>this.view.length)throw new o.ListError(this.user,`Invalid start index: ${B}`);if(j<0)throw new o.ListError(this.user,`Invalid delete count: ${j}`);j===0&&G.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(B,j,G))}rerender(){this.view.rerender()}element(B){return this.view.element(B)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(B){this.view.setScrollTop(B)}get scrollHeight(){return this.view.scrollHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(B){this._ariaLabel=B,this.view.domNode.setAttribute("aria-label",B)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(B,j){this.view.layout(B,j)}setSelection(B,j){for(const G of B)if(G<0||G>=this.length)throw new o.ListError(this.user,`Invalid index ${G}`);this.selection.set(B,j)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(B=>this.view.element(B))}setAnchor(B){if(typeof B>"u"){this.anchor.set([]);return}if(B<0||B>=this.length)throw new o.ListError(this.user,`Invalid index ${B}`);this.anchor.set([B])}getAnchor(){return(0,_.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const B=this.getAnchor();return typeof B>"u"?void 0:this.element(B)}setFocus(B,j){for(const G of B)if(G<0||G>=this.length)throw new o.ListError(this.user,`Invalid index ${G}`);this.focus.set(B,j)}focusNext(B=1,j=!1,G,Y){if(this.length===0)return;const ne=this.focus.get(),de=this.findNextIndex(ne.length>0?ne[0]+B:0,j,Y);de>-1&&this.setFocus([de],G)}focusPrevious(B=1,j=!1,G,Y){if(this.length===0)return;const ne=this.focus.get(),de=this.findPreviousIndex(ne.length>0?ne[0]-B:0,j,Y);de>-1&&this.setFocus([de],G)}focusNextPage(B,j){return Ee(this,void 0,void 0,function*(){let G=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);G=G===0?0:G-1;const Y=this.getFocus()[0];if(Y!==G&&(Y===void 0||G>Y)){const ne=this.findPreviousIndex(G,!1,j);ne>-1&&Y!==ne?this.setFocus([ne],B):this.setFocus([G],B)}else{const ne=this.view.getScrollTop();let de=ne+this.view.renderHeight;G>Y&&(de-=this.view.elementHeight(G)),this.view.setScrollTop(de),this.view.getScrollTop()!==ne&&(this.setFocus([]),yield(0,h.timeout)(0),yield this.focusNextPage(B,j))}})}focusPreviousPage(B,j){return Ee(this,void 0,void 0,function*(){let G;const Y=this.view.getScrollTop();Y===0?G=this.view.indexAt(Y):G=this.view.indexAfter(Y-1);const ne=this.getFocus()[0];if(ne!==G&&(ne===void 0||ne>=G)){const de=this.findNextIndex(G,!1,j);de>-1&&ne!==de?this.setFocus([de],B):this.setFocus([G],B)}else{const de=Y;this.view.setScrollTop(Y-this.view.renderHeight),this.view.getScrollTop()!==de&&(this.setFocus([]),yield(0,h.timeout)(0),yield this.focusPreviousPage(B,j))}})}focusLast(B,j){if(this.length===0)return;const G=this.findPreviousIndex(this.length-1,!1,j);G>-1&&this.setFocus([G],B)}focusFirst(B,j){this.focusNth(0,B,j)}focusNth(B,j,G){if(this.length===0)return;const Y=this.findNextIndex(B,!1,G);Y>-1&&this.setFocus([Y],j)}findNextIndex(B,j=!1,G){for(let Y=0;Y<this.length;Y++){if(B>=this.length&&!j)return-1;if(B=B%this.length,!G||G(this.element(B)))return B;B++}return-1}findPreviousIndex(B,j=!1,G){for(let Y=0;Y<this.length;Y++){if(B<0&&!j)return-1;if(B=(this.length+B%this.length)%this.length,!G||G(this.element(B)))return B;B--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(B=>this.view.element(B))}reveal(B,j){if(B<0||B>=this.length)throw new o.ListError(this.user,`Invalid index ${B}`);const G=this.view.getScrollTop(),Y=this.view.elementTop(B),ne=this.view.elementHeight(B);if((0,g.isNumber)(j)){const de=ne-this.view.renderHeight;this.view.setScrollTop(de*(0,r.clamp)(j,0,1)+Y)}else{const de=Y+ne,he=G+this.view.renderHeight;Y<G&&de>=he||(Y<G||de>=he&&ne>=this.view.renderHeight?this.view.setScrollTop(Y):de>=he&&this.view.setScrollTop(de-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(B){return this.view.getElementDomId(B)}style(B){this.styleController.style(B)}toListEvent({indexes:B,browserEvent:j}){return{indexes:B,elements:B.map(G=>this.view.element(G)),browserEvent:j}}_onFocusChange(){const B=this.focus.get();this.view.domNode.classList.toggle("element-focused",B.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var B;const j=this.focus.get();if(j.length>0){let G;!((B=this.accessibilityProvider)===null||B===void 0)&&B.getActiveDescendantId&&(G=this.accessibilityProvider.getActiveDescendantId(this.view.element(j[0]))),this.view.domNode.setAttribute("aria-activedescendant",G||this.view.getElementDomId(j[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const B=this.selection.get();this.view.domNode.classList.toggle("selection-none",B.length===0),this.view.domNode.classList.toggle("selection-single",B.length===1),this.view.domNode.classList.toggle("selection-multiple",B.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Ne([n.memoize],re.prototype,"onDidChangeFocus",null),Ne([n.memoize],re.prototype,"onDidChangeSelection",null),Ne([n.memoize],re.prototype,"onContextMenu",null),Ne([n.memoize],re.prototype,"onKeyDown",null),Ne([n.memoize],re.prototype,"onDidFocus",null),e.List=re}),define(J[538],ee([1,0,16,21,6,2,108,248]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class b{get templateId(){return this.renderer.templateId}constructor(t,i){this.renderer=t,this.modelProvider=i}renderTemplate(t){return{data:this.renderer.renderTemplate(t),disposable:D.Disposable.None}}renderElement(t,i,s,r){var c;if((c=s.disposable)===null||c===void 0||c.dispose(),!s.data)return;const g=this.modelProvider();if(g.isResolved(t))return this.renderer.renderElement(g.get(t),t,s.data,r);const o=new k.CancellationTokenSource,l=g.resolve(t,o.token);s.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(t,s.data),l.then(a=>this.renderer.renderElement(a,t,s.data,r))}disposeTemplate(t){t.disposable&&(t.disposable.dispose(),t.disposable=void 0),t.data&&(this.renderer.disposeTemplate(t.data),t.data=void 0)}}class _{constructor(t,i){this.modelProvider=t,this.accessibilityProvider=i}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(t){const i=this.modelProvider();return i.isResolved(t)?this.accessibilityProvider.getAriaLabel(i.get(t)):null}}function h(n,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new _(n,t.accessibilityProvider)})}class m{constructor(t,i,s,r,c={}){const g=()=>this.model,o=r.map(l=>new b(l,g));this.list=new w.List(t,i,s,o,h(g,c))}updateOptions(t){this.list.updateOptions(t)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return y.Event.map(this.list.onMouseDblClick,({element:t,index:i,browserEvent:s})=>({element:t===void 0?void 0:this._model.get(t),index:i,browserEvent:s}))}get onPointer(){return y.Event.map(this.list.onPointer,({element:t,index:i,browserEvent:s})=>({element:t===void 0?void 0:this._model.get(t),index:i,browserEvent:s}))}get onDidChangeSelection(){return y.Event.map(this.list.onDidChangeSelection,({elements:t,indexes:i,browserEvent:s})=>({elements:t.map(r=>this._model.get(r)),indexes:i,browserEvent:s}))}get model(){return this._model}set model(t){this._model=t,this.list.splice(0,this.list.length,(0,S.range)(t.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(t=>this.model.get(t))}style(t){this.list.style(t)}dispose(){this.list.dispose()}}e.PagedList=m}),define(J[287],ee([1,0,7,76,141,77,16,37,6,2,132,172,18,377]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const i={separatorBorder:b.Color.transparent};class s{set size(d){this._size=d}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(d,u){var C,f;d!==this.visible&&(d?(this.size=(0,m.clamp)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof u=="number"?u:this.size,this.size=0),this.container.classList.toggle("visible",d),(f=(C=this.view).setVisible)===null||f===void 0||f.call(C,d))}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 proportionalLayout(){var d;return(d=this.view.proportionalLayout)!==null&&d!==void 0?d:!0}get snap(){return!!this.view.snap}set enabled(d){this.container.style.pointerEvents=d?"":"none"}constructor(d,u,C,f){this.container=d,this.view=u,this.disposable=f,this._cachedVisibleSize=void 0,typeof C=="number"?(this._size=C,this._cachedVisibleSize=void 0,d.classList.add("visible")):(this._size=0,this._cachedVisibleSize=C.cachedVisibleSize)}layout(d,u){this.layoutContainer(d),this.view.layout(this.size,d,u)}dispose(){return this.disposable.dispose(),this.view}}class r extends s{layoutContainer(d){this.container.style.top=`${d}px`,this.container.style.height=`${this.size}px`}}class c extends s{layoutContainer(d){this.container.style.left=`${d}px`,this.container.style.width=`${this.size}px`}}var g;(function(a){a[a.Idle=0]="Idle",a[a.Busy=1]="Busy"})(g||(g={}));var o;(function(a){a.Distribute={type:"distribute"};function d(C){return{type:"split",index:C}}a.Split=d;function u(C){return{type:"invisible",cachedVisibleSize:C}}a.Invisible=u})(o=e.Sizing||(e.Sizing={}));class l extends h.Disposable{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(d){for(const u of this.sashItems)u.sash.orthogonalStartSash=d;this._orthogonalStartSash=d}set orthogonalEndSash(d){for(const u of this.sashItems)u.sash.orthogonalEndSash=d;this._orthogonalEndSash=d}set startSnappingEnabled(d){this._startSnappingEnabled!==d&&(this._startSnappingEnabled=d,this.updateSashEnablement())}set endSnappingEnabled(d){this._endSnappingEnabled!==d&&(this._endSnappingEnabled=d,this.updateSashEnablement())}constructor(d,u={}){var C,f,v,p,L;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=g.Idle,this._onDidSashChange=this._register(new _.Emitter),this._onDidSashReset=this._register(new _.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(C=u.orientation)!==null&&C!==void 0?C:0,this.inverseAltBehavior=(f=u.inverseAltBehavior)!==null&&f!==void 0?f:!1,this.proportionalLayout=(v=u.proportionalLayout)!==null&&v!==void 0?v:!0,this.getSashOrthogonalSize=u.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),d.appendChild(this.el),this.sashContainer=(0,S.append)(this.el,(0,S.$)(".sash-container")),this.viewContainer=(0,S.$)(".split-view-container"),this.scrollable=new n.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:S.scheduleAtNextAnimationFrame}),this.scrollableElement=this._register(new D.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(p=u.scrollbarVisibility)!==null&&p!==void 0?p:1:2,horizontal:this.orientation===1?(L=u.scrollbarVisibility)!==null&&L!==void 0?L:1:2},this.scrollable));const E=this._register(new k.DomEmitter(this.viewContainer,"scroll")).event;this._register(E(I=>{const T=this.scrollableElement.getScrollPosition(),F=Math.abs(this.viewContainer.scrollLeft-T.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,R=Math.abs(this.viewContainer.scrollTop-T.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(F!==void 0||R!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:F,scrollTop:R})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(I=>{I.scrollTopChanged&&(this.viewContainer.scrollTop=I.scrollTop),I.scrollLeftChanged&&(this.viewContainer.scrollLeft=I.scrollLeft)})),(0,S.append)(this.el,this.scrollableElement.getDomNode()),this.style(u.styles||i),u.descriptor&&(this.size=u.descriptor.size,u.descriptor.views.forEach((I,T)=>{const F=t.isUndefined(I.visible)||I.visible?I.size:{type:"invisible",cachedVisibleSize:I.size},R=I.view;this.doAddView(R,F,T,!0)}),this.contentSize=this.viewItems.reduce((I,T)=>I+T.size,0),this.saveProportions())}style(d){d.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",d.separatorBorder.toString()))}addView(d,u,C=this.viewItems.length,f){this.doAddView(d,u,C,f)}layout(d,u){const C=Math.max(this.size,this.contentSize);if(this.size=d,this.layoutContext=u,this.proportions){let f=0;for(let v=0;v<this.viewItems.length;v++){const p=this.viewItems[v],L=this.proportions[v];typeof L=="number"?f+=L:d-=p.size}for(let v=0;v<this.viewItems.length;v++){const p=this.viewItems[v],L=this.proportions[v];typeof L=="number"&&(p.size=(0,m.clamp)(Math.round(L*d/f),p.minimumSize,p.maximumSize))}}else{const f=(0,w.range)(this.viewItems.length),v=f.filter(L=>this.viewItems[L].priority===1),p=f.filter(L=>this.viewItems[L].priority===2);this.resize(this.viewItems.length-1,d-C,void 0,v,p)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(d=>d.proportionalLayout?d.size/this.contentSize:void 0))}onSashStart({sash:d,start:u,alt:C}){for(const L of this.viewItems)L.enabled=!1;const f=this.sashItems.findIndex(L=>L.sash===d),v=(0,h.combinedDisposable)((0,S.addDisposableListener)(document.body,"keydown",L=>p(this.sashDragState.current,L.altKey)),(0,S.addDisposableListener)(document.body,"keyup",()=>p(this.sashDragState.current,!1))),p=(L,E)=>{const I=this.viewItems.map(N=>N.size);let T=Number.NEGATIVE_INFINITY,F=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(E=!E),E)if(f===this.sashItems.length-1){const A=this.viewItems[f];T=(A.minimumSize-A.size)/2,F=(A.maximumSize-A.size)/2}else{const A=this.viewItems[f+1];T=(A.size-A.maximumSize)/2,F=(A.size-A.minimumSize)/2}let R,M;if(!E){const N=(0,w.range)(f,-1),A=(0,w.range)(f+1,this.viewItems.length),P=N.reduce((le,te)=>le+(this.viewItems[te].minimumSize-I[te]),0),x=N.reduce((le,te)=>le+(this.viewItems[te].viewMaximumSize-I[te]),0),W=A.length===0?Number.POSITIVE_INFINITY:A.reduce((le,te)=>le+(I[te]-this.viewItems[te].minimumSize),0),U=A.length===0?Number.NEGATIVE_INFINITY:A.reduce((le,te)=>le+(I[te]-this.viewItems[te].viewMaximumSize),0),O=Math.max(P,U),$=Math.min(W,x),Q=this.findFirstSnapIndex(N),se=this.findFirstSnapIndex(A);if(typeof Q=="number"){const le=this.viewItems[Q],te=Math.floor(le.viewMinimumSize/2);R={index:Q,limitDelta:le.visible?O-te:O+te,size:le.size}}if(typeof se=="number"){const le=this.viewItems[se],te=Math.floor(le.viewMinimumSize/2);M={index:se,limitDelta:le.visible?$+te:$-te,size:le.size}}}this.sashDragState={start:L,current:L,index:f,sizes:I,minDelta:T,maxDelta:F,alt:E,snapBefore:R,snapAfter:M,disposable:v}};p(u,C)}onSashChange({current:d}){const{index:u,start:C,sizes:f,alt:v,minDelta:p,maxDelta:L,snapBefore:E,snapAfter:I}=this.sashDragState;this.sashDragState.current=d;const T=d-C,F=this.resize(u,T,f,void 0,void 0,p,L,E,I);if(v){const R=u===this.sashItems.length-1,M=this.viewItems.map(U=>U.size),N=R?u:u+1,A=this.viewItems[N],P=A.size-A.maximumSize,x=A.size-A.minimumSize,W=R?u-1:u+1;this.resize(W,-F,M,void 0,void 0,P,x)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(d){this._onDidSashChange.fire(d),this.sashDragState.disposable.dispose(),this.saveProportions();for(const u of this.viewItems)u.enabled=!0}onViewChange(d,u){const C=this.viewItems.indexOf(d);C<0||C>=this.viewItems.length||(u=typeof u=="number"?u:d.size,u=(0,m.clamp)(u,d.minimumSize,d.maximumSize),this.inverseAltBehavior&&C>0?(this.resize(C-1,Math.floor((d.size-u)/2)),this.distributeEmptySpace(),this.layoutViews()):(d.size=u,this.relayout([C],void 0)))}resizeView(d,u){if(this.state!==g.Idle)throw new Error("Cant modify splitview");if(this.state=g.Busy,d<0||d>=this.viewItems.length)return;const C=(0,w.range)(this.viewItems.length).filter(L=>L!==d),f=[...C.filter(L=>this.viewItems[L].priority===1),d],v=C.filter(L=>this.viewItems[L].priority===2),p=this.viewItems[d];u=Math.round(u),u=(0,m.clamp)(u,p.minimumSize,Math.min(p.maximumSize,this.size)),p.size=u,this.relayout(f,v),this.state=g.Idle}distributeViewSizes(){const d=[];let u=0;for(const L of this.viewItems)L.maximumSize-L.minimumSize>0&&(d.push(L),u+=L.size);const C=Math.floor(u/d.length);for(const L of d)L.size=(0,m.clamp)(C,L.minimumSize,L.maximumSize);const f=(0,w.range)(this.viewItems.length),v=f.filter(L=>this.viewItems[L].priority===1),p=f.filter(L=>this.viewItems[L].priority===2);this.relayout(v,p)}getViewSize(d){return d<0||d>=this.viewItems.length?-1:this.viewItems[d].size}doAddView(d,u,C=this.viewItems.length,f){if(this.state!==g.Idle)throw new Error("Cant modify splitview");this.state=g.Busy;const v=(0,S.$)(".split-view-view");C===this.viewItems.length?this.viewContainer.appendChild(v):this.viewContainer.insertBefore(v,this.viewContainer.children.item(C));const p=d.onDidChange(R=>this.onViewChange(T,R)),L=(0,h.toDisposable)(()=>this.viewContainer.removeChild(v)),E=(0,h.combinedDisposable)(p,L);let I;typeof u=="number"?I=u:u.type==="split"?I=this.getViewSize(u.index)/2:u.type==="invisible"?I={cachedVisibleSize:u.cachedVisibleSize}:I=d.minimumSize;const T=this.orientation===0?new r(v,d,I,E):new c(v,d,I,E);if(this.viewItems.splice(C,0,T),this.viewItems.length>1){const R={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},M=this.orientation===0?new y.Sash(this.sashContainer,{getHorizontalSashTop:le=>this.getSashPosition(le),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},R),{orientation:1})):new y.Sash(this.sashContainer,{getVerticalSashLeft:le=>this.getSashPosition(le),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},R),{orientation:0})),N=this.orientation===0?le=>({sash:M,start:le.startY,current:le.currentY,alt:le.altKey}):le=>({sash:M,start:le.startX,current:le.currentX,alt:le.altKey}),P=_.Event.map(M.onDidStart,N)(this.onSashStart,this),W=_.Event.map(M.onDidChange,N)(this.onSashChange,this),O=_.Event.map(M.onDidEnd,()=>this.sashItems.findIndex(le=>le.sash===M))(this.onSashEnd,this),$=M.onDidReset(()=>{const le=this.sashItems.findIndex(j=>j.sash===M),te=(0,w.range)(le,-1),re=(0,w.range)(le+1,this.viewItems.length),H=this.findFirstSnapIndex(te),B=this.findFirstSnapIndex(re);typeof H=="number"&&!this.viewItems[H].visible||typeof B=="number"&&!this.viewItems[B].visible||this._onDidSashReset.fire(le)}),Q=(0,h.combinedDisposable)(P,W,O,$,M),se={sash:M,disposable:Q};this.sashItems.splice(C-1,0,se)}v.appendChild(d.element);let F;typeof u!="number"&&u.type==="split"&&(F=[u.index]),f||this.relayout([C],F),this.state=g.Idle,!f&&typeof u!="number"&&u.type==="distribute"&&this.distributeViewSizes()}relayout(d,u){const C=this.viewItems.reduce((f,v)=>f+v.size,0);this.resize(this.viewItems.length-1,this.size-C,void 0,d,u),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(d,u,C=this.viewItems.map(T=>T.size),f,v,p=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,E,I){if(d<0||d>=this.viewItems.length)return 0;const T=(0,w.range)(d,-1),F=(0,w.range)(d+1,this.viewItems.length);if(v)for(const se of v)(0,w.pushToStart)(T,se),(0,w.pushToStart)(F,se);if(f)for(const se of f)(0,w.pushToEnd)(T,se),(0,w.pushToEnd)(F,se);const R=T.map(se=>this.viewItems[se]),M=T.map(se=>C[se]),N=F.map(se=>this.viewItems[se]),A=F.map(se=>C[se]),P=T.reduce((se,le)=>se+(this.viewItems[le].minimumSize-C[le]),0),x=T.reduce((se,le)=>se+(this.viewItems[le].maximumSize-C[le]),0),W=F.length===0?Number.POSITIVE_INFINITY:F.reduce((se,le)=>se+(C[le]-this.viewItems[le].minimumSize),0),U=F.length===0?Number.NEGATIVE_INFINITY:F.reduce((se,le)=>se+(C[le]-this.viewItems[le].maximumSize),0),O=Math.max(P,U,p),$=Math.min(W,x,L);let Q=!1;if(E){const se=this.viewItems[E.index],le=u>=E.limitDelta;Q=le!==se.visible,se.setVisible(le,E.size)}if(!Q&&I){const se=this.viewItems[I.index],le=u<I.limitDelta;Q=le!==se.visible,se.setVisible(le,I.size)}if(Q)return this.resize(d,u,C,f,v,p,L);u=(0,m.clamp)(u,O,$);for(let se=0,le=u;se<R.length;se++){const te=R[se],re=(0,m.clamp)(M[se]+le,te.minimumSize,te.maximumSize),H=re-M[se];le-=H,te.size=re}for(let se=0,le=u;se<N.length;se++){const te=N[se],re=(0,m.clamp)(A[se]-le,te.minimumSize,te.maximumSize),H=re-A[se];le+=H,te.size=re}return u}distributeEmptySpace(d){const u=this.viewItems.reduce((L,E)=>L+E.size,0);let C=this.size-u;const f=(0,w.range)(this.viewItems.length-1,-1),v=f.filter(L=>this.viewItems[L].priority===1),p=f.filter(L=>this.viewItems[L].priority===2);for(const L of p)(0,w.pushToStart)(f,L);for(const L of v)(0,w.pushToEnd)(f,L);typeof d=="number"&&(0,w.pushToEnd)(f,d);for(let L=0;C!==0&&L<f.length;L++){const E=this.viewItems[f[L]],I=(0,m.clamp)(E.size+C,E.minimumSize,E.maximumSize),T=I-E.size;C-=T,E.size=I}}layoutViews(){this.contentSize=this.viewItems.reduce((u,C)=>u+C.size,0);let d=0;for(const u of this.viewItems)u.layout(d,this.layoutContext),d+=u.size;this.sashItems.forEach(u=>u.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 d=!1;const u=this.viewItems.map(E=>d=E.size-E.minimumSize>0||d);d=!1;const C=this.viewItems.map(E=>d=E.maximumSize-E.size>0||d),f=[...this.viewItems].reverse();d=!1;const v=f.map(E=>d=E.size-E.minimumSize>0||d).reverse();d=!1;const p=f.map(E=>d=E.maximumSize-E.size>0||d).reverse();let L=0;for(let E=0;E<this.sashItems.length;E++){const{sash:I}=this.sashItems[E],T=this.viewItems[E];L+=T.size;const F=!(u[E]&&p[E+1]),R=!(C[E]&&v[E+1]);if(F&&R){const M=(0,w.range)(E,-1),N=(0,w.range)(E+1,this.viewItems.length),A=this.findFirstSnapIndex(M),P=this.findFirstSnapIndex(N),x=typeof A=="number"&&!this.viewItems[A].visible,W=typeof P=="number"&&!this.viewItems[P].visible;x&&v[E]&&(L>0||this.startSnappingEnabled)?I.state=1:W&&u[E]&&(L<this.contentSize||this.endSnappingEnabled)?I.state=2:I.state=0}else F&&!R?I.state=1:!F&&R?I.state=2:I.state=3}}getSashPosition(d){let u=0;for(let C=0;C<this.sashItems.length;C++)if(u+=this.viewItems[C].size,this.sashItems[C].sash===d)return u;return 0}findFirstSnapIndex(d){for(const u of d){const C=this.viewItems[u];if(C.visible&&C.snap)return u}for(const u of d){const C=this.viewItems[u];if(C.visible&&C.maximumSize-C.minimumSize>0)return;if(!C.visible&&C.snap)return u}}dispose(){var d;(d=this.sashDragState)===null||d===void 0||d.disposable.dispose(),(0,h.dispose)(this.viewItems),this.viewItems=[],this.sashItems.forEach(u=>u.disposable.dispose()),this.sashItems=[],super.dispose()}}e.SplitView=l}),define(J[539],ee([1,0,7,108,287,6,2,378]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class b{constructor(t,i,s){this.columns=t,this.getColumnSize=s,this.templateId=b.TemplateId,this.renderedTemplates=new Set;const r=new Map(i.map(c=>[c.templateId,c]));this.renderers=[];for(const c of t){const g=r.get(c.templateId);if(!g)throw new Error(`Table cell renderer for template id ${c.templateId} not found.`);this.renderers.push(g)}}renderTemplate(t){const i=(0,S.append)(t,(0,S.$)(".monaco-table-tr")),s=[],r=[];for(let g=0;g<this.columns.length;g++){const o=this.renderers[g],l=(0,S.append)(i,(0,S.$)(".monaco-table-td",{"data-col-index":g}));l.style.width=`${this.getColumnSize(g)}px`,s.push(l),r.push(o.renderTemplate(l))}const c={container:t,cellContainers:s,cellTemplateData:r};return this.renderedTemplates.add(c),c}renderElement(t,i,s,r){for(let c=0;c<this.columns.length;c++){const o=this.columns[c].project(t);this.renderers[c].renderElement(o,i,s.cellTemplateData[c],r)}}disposeElement(t,i,s,r){for(let c=0;c<this.columns.length;c++){const g=this.renderers[c];if(g.disposeElement){const l=this.columns[c].project(t);g.disposeElement(l,i,s.cellTemplateData[c],r)}}}disposeTemplate(t){for(let i=0;i<this.columns.length;i++)this.renderers[i].disposeTemplate(t.cellTemplateData[i]);(0,S.clearNode)(t.container),this.renderedTemplates.delete(t)}layoutColumn(t,i){for(const{cellContainers:s}of this.renderedTemplates)s[t].style.width=`${i}px`}}b.TemplateId="row";function _(n){return{getHeight(t){return n.getHeight(t)},getTemplateId(){return b.TemplateId}}}class h{get minimumSize(){var t;return(t=this.column.minimumWidth)!==null&&t!==void 0?t:120}get maximumSize(){var t;return(t=this.column.maximumWidth)!==null&&t!==void 0?t:Number.POSITIVE_INFINITY}get onDidChange(){var t;return(t=this.column.onDidChangeWidthConstraints)!==null&&t!==void 0?t:D.Event.None}constructor(t,i){this.column=t,this.index=i,this._onDidLayout=new D.Emitter,this.onDidLayout=this._onDidLayout.event,this.element=(0,S.$)(".monaco-table-th",{"data-col-index":i,title:t.tooltip},t.label)}layout(t){this._onDidLayout.fire([this.index,t])}}class m{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}constructor(t,i,s,r,c,g){this.virtualDelegate=s,this.domId=`table_id_${++m.InstanceCount}`,this.disposables=new w.DisposableStore,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,S.append)(i,(0,S.$)(`.monaco-table.${this.domId}`));const o=r.map((d,u)=>new h(d,u)),l={size:o.reduce((d,u)=>d+u.column.weight,0),views:o.map(d=>({size:d.column.weight,view:d}))};this.splitview=this.disposables.add(new y.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${s.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${s.headerRowHeight}px`;const a=new b(r,c,d=>this.splitview.getViewSize(d));this.list=this.disposables.add(new k.List(t,this.domNode,_(s),[a],g)),D.Event.any(...o.map(d=>d.onDidLayout))(([d,u])=>a.layoutColumn(d,u),null,this.disposables),this.splitview.onDidSashReset(d=>{const u=r.reduce((f,v)=>f+v.weight,0),C=r[d].weight/u*this.cachedWidth;this.splitview.resizeView(d,C)},null,this.disposables),this.styleElement=(0,S.createStyleSheet)(this.domNode),this.style(k.unthemedListStyles)}updateOptions(t){this.list.updateOptions(t)}splice(t,i,s=[]){this.list.splice(t,i,s)}getHTMLElement(){return this.domNode}style(t){const i=[];i.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=i.join(`\n`),this.list.style(t)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}m.InstanceCount=0,e.Table=m}),define(J[142],ee([1,0,67,32,6,379]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=e.unthemedToggleStyles=void 0,e.unthemedToggleStyles={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class D extends S.Widget{constructor(b){super(),this._onChange=this._register(new y.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new y.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=b,this._checked=this._opts.isChecked;const _=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,_.push(...k.ThemeIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&_.push(...this._opts.actionClassName.split(" ")),this._checked&&_.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(..._),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,h=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),h.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,h=>{if(h.keyCode===10||h.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),h.preventDefault(),h.stopPropagation();return}this._onKeyDown.fire(h)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(b){this._checked=b,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}e.Toggle=D}),define(J[288],ee([1,0,142,29,514]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexToggle=e.WholeWordsToggle=e.CaseSensitiveToggle=void 0;const D=y.localize(0,null),w=y.localize(1,null),b=y.localize(2,null);class _ extends S.Toggle{constructor(t){super({icon:k.Codicon.caseSensitive,title:D+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}}e.CaseSensitiveToggle=_;class h extends S.Toggle{constructor(t){super({icon:k.Codicon.wholeWord,title:w+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}}e.WholeWordsToggle=h;class m extends S.Toggle{constructor(t){super({icon:k.Codicon.regex,title:b+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}}e.RegexToggle=m}),define(J[42],ee([1,0,202,49,87,17,9,20]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataUri=e.addTrailingPathSeparator=e.removeTrailingPathSeparator=e.hasTrailingPathSeparator=e.isEqualAuthority=e.isAbsolutePath=e.resolvePath=e.relativePath=e.normalizePath=e.joinPath=e.dirname=e.extname=e.basename=e.basenameOrAuthority=e.getComparisonKey=e.isEqualOrParent=e.isEqual=e.extUriIgnorePathCase=e.extUriBiasedIgnorePathCase=e.extUri=e.ExtUri=e.originalFSPath=void 0;function _(n){return(0,b.uriToFsPath)(n,!0)}e.originalFSPath=_;class h{constructor(t){this._ignorePathCasing=t}compare(t,i,s=!1){return t===i?0:(0,w.compare)(this.getComparisonKey(t,s),this.getComparisonKey(i,s))}isEqual(t,i,s=!1){return t===i?!0:!t||!i?!1:this.getComparisonKey(t,s)===this.getComparisonKey(i,s)}getComparisonKey(t,i=!1){return t.with({path:this._ignorePathCasing(t)?t.path.toLowerCase():void 0,fragment:i?null:void 0}).toString()}isEqualOrParent(t,i,s=!1){if(t.scheme===i.scheme){if(t.scheme===k.Schemas.file)return S.isEqualOrParent(_(t),_(i),this._ignorePathCasing(t))&&t.query===i.query&&(s||t.fragment===i.fragment);if((0,e.isEqualAuthority)(t.authority,i.authority))return S.isEqualOrParent(t.path,i.path,this._ignorePathCasing(t),"/")&&t.query===i.query&&(s||t.fragment===i.fragment)}return!1}joinPath(t,...i){return b.URI.joinPath(t,...i)}basenameOrAuthority(t){return(0,e.basename)(t)||t.authority}basename(t){return y.posix.basename(t.path)}extname(t){return y.posix.extname(t.path)}dirname(t){if(t.path.length===0)return t;let i;return t.scheme===k.Schemas.file?i=b.URI.file(y.dirname(_(t))).path:(i=y.posix.dirname(t.path),t.authority&&i.length&&i.charCodeAt(0)!==47&&(console.error(`dirname("${t.toString})) resulted in a relative path`),i="/")),t.with({path:i})}normalizePath(t){if(!t.path.length)return t;let i;return t.scheme===k.Schemas.file?i=b.URI.file(y.normalize(_(t))).path:i=y.posix.normalize(t.path),t.with({path:i})}relativePath(t,i){if(t.scheme!==i.scheme||!(0,e.isEqualAuthority)(t.authority,i.authority))return;if(t.scheme===k.Schemas.file){const c=y.relative(_(t),_(i));return D.isWindows?S.toSlashes(c):c}let s=t.path||"/";const r=i.path||"/";if(this._ignorePathCasing(t)){let c=0;for(const g=Math.min(s.length,r.length);c<g&&!(s.charCodeAt(c)!==r.charCodeAt(c)&&s.charAt(c).toLowerCase()!==r.charAt(c).toLowerCase());c++);s=r.substr(0,c)+s.substr(c)}return y.posix.relative(s,r)}resolvePath(t,i){if(t.scheme===k.Schemas.file){const s=b.URI.file(y.resolve(_(t),i));return t.with({authority:s.authority,path:s.path})}return i=S.toPosixPath(i),t.with({path:y.posix.resolve(t.path,i)})}isAbsolutePath(t){return!!t.path&&t.path[0]==="/"}isEqualAuthority(t,i){return t===i||t!==void 0&&i!==void 0&&(0,w.equalsIgnoreCase)(t,i)}hasTrailingPathSeparator(t,i=y.sep){if(t.scheme===k.Schemas.file){const s=_(t);return s.length>S.getRoot(s).length&&s[s.length-1]===i}else{const s=t.path;return s.length>1&&s.charCodeAt(s.length-1)===47&&!/^[a-zA-Z]:(\\/$|\\\\$)/.test(t.fsPath)}}removeTrailingPathSeparator(t,i=y.sep){return(0,e.hasTrailingPathSeparator)(t,i)?t.with({path:t.path.substr(0,t.path.length-1)}):t}addTrailingPathSeparator(t,i=y.sep){let s=!1;if(t.scheme===k.Schemas.file){const r=_(t);s=r!==void 0&&r.length===S.getRoot(r).length&&r[r.length-1]===i}else{i="/";const r=t.path;s=r.length===1&&r.charCodeAt(r.length-1)===47}return!s&&!(0,e.hasTrailingPathSeparator)(t,i)?t.with({path:t.path+"/"}):t}}e.ExtUri=h,e.extUri=new h(()=>!1),e.extUriBiasedIgnorePathCase=new h(n=>n.scheme===k.Schemas.file?!D.isLinux:!0),e.extUriIgnorePathCase=new h(n=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.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.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);var m;(function(n){n.META_DATA_LABEL="label",n.META_DATA_DESCRIPTION="description",n.META_DATA_SIZE="size",n.META_DATA_MIME="mime";function t(i){const s=new Map;i.path.substring(i.path.indexOf(";")+1,i.path.lastIndexOf(";")).split(";").forEach(g=>{const[o,l]=g.split(":");o&&l&&s.set(o,l)});const c=i.path.substring(0,i.path.indexOf(";"));return c&&s.set(n.META_DATA_MIME,c),s}n.parseMetaData=t})(m=e.DataUri||(e.DataUri={}))}),define(J[68],ee([1,0,11,113,42,9,20]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeDoubleQuotes=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=void 0;class b{constructor(c="",g=!1){var o,l,a;if(this.value=c,typeof this.value!="string")throw(0,S.illegalArgument)("value");typeof g=="boolean"?(this.isTrusted=g,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(o=g.isTrusted)!==null&&o!==void 0?o:void 0,this.supportThemeIcons=(l=g.supportThemeIcons)!==null&&l!==void 0?l:!1,this.supportHtml=(a=g.supportHtml)!==null&&a!==void 0?a:!1)}appendText(c,g=0){return this.value+=n(this.supportThemeIcons?(0,k.escapeIcons)(c):c).replace(/([ \\t]+)/g,(o,l)=>" ".repeat(l.length)).replace(/\\>/gm,"\\\\>").replace(/\\n/g,g===1?`\\\\\n`:`\n\n`),this}appendMarkdown(c){return this.value+=c,this}appendCodeblock(c,g){return this.value+="\\n```",this.value+=c,this.value+=`\n`,this.value+=g,this.value+="\\n```\\n",this}appendLink(c,g,o){return this.value+="[",this.value+=this._escape(g,"]"),this.value+="](",this.value+=this._escape(String(c),")"),o&&(this.value+=` "${this._escape(this._escape(o,\'"\'),")")}"`),this.value+=")",this}_escape(c,g){const o=new RegExp((0,D.escapeRegExpCharacters)(g),"g");return c.replace(o,(l,a)=>c.charAt(a-1)!=="\\\\"?`\\\\${l}`:l)}}e.MarkdownString=b;function _(r){return h(r)?!r.value:Array.isArray(r)?r.every(_):!0}e.isEmptyMarkdownString=_;function h(r){return r instanceof b?!0:r&&typeof r=="object"?typeof r.value=="string"&&(typeof r.isTrusted=="boolean"||r.isTrusted===void 0)&&(typeof r.supportThemeIcons=="boolean"||r.supportThemeIcons===void 0):!1}e.isMarkdownString=h;function m(r,c){return r===c?!0:!r||!c?!1:r.value===c.value&&r.isTrusted===c.isTrusted&&r.supportThemeIcons===c.supportThemeIcons&&r.supportHtml===c.supportHtml&&(r.baseUri===c.baseUri||!!r.baseUri&&!!c.baseUri&&(0,y.isEqual)(w.URI.from(r.baseUri),w.URI.from(c.baseUri)))}e.markdownStringEqual=m;function n(r){return r.replace(/[\\\\`*_{}[\\]()#+\\-!~]/g,"\\\\$&")}e.escapeMarkdownSyntaxTokens=n;function t(r){return r.replace(/"/g,""")}e.escapeDoubleQuotes=t;function i(r){return r&&r.replace(/\\\\([\\\\`*_{}[\\]()#+\\-.!~])/g,"$1")}e.removeMarkdownEscapes=i;function s(r){const c=[],g=r.split("|").map(l=>l.trim());r=g[0];const o=g[1];if(o){const l=/height=(\\d+)/.exec(o),a=/width=(\\d+)/.exec(o),d=l?l[1]:"",u=a?a[1]:"",C=isFinite(parseInt(u)),f=isFinite(parseInt(d));C&&c.push(`width="${u}"`),f&&c.push(`height="${d}"`)}return{href:r,dimensions:c}}e.parseHrefAndDimensions=s}),define(J[211],ee([1,0,7,280,76,207,44,66,140,11,6,68,113,155,100,2,356,206,49,45,42,9,20]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fillInIncompleteTokens=e.renderMarkdownAsPlaintext=e.renderStringAsPlaintext=e.allowedMarkdownAttr=e.renderMarkdown=void 0;const C=Object.freeze({image:(H,B,j)=>{let G=[],Y=[];return H&&({href:H,dimensions:G}=(0,n.parseHrefAndDimensions)(H),Y.push(`src="${(0,n.escapeDoubleQuotes)(H)}"`)),j&&Y.push(`alt="${(0,n.escapeDoubleQuotes)(j)}"`),B&&Y.push(`title="${(0,n.escapeDoubleQuotes)(B)}"`),G.length&&(Y=Y.concat(G)),"<img "+Y.join(" ")+">"},paragraph:H=>`<p>${H}</p>`,link:(H,B,j)=>typeof H!="string"?"":(H===j&&(j=(0,n.removeMarkdownEscapes)(j)),B=typeof B=="string"?(0,n.escapeDoubleQuotes)((0,n.removeMarkdownEscapes)(B)):"",H=(0,n.removeMarkdownEscapes)(H),H=H.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'"),`<a href="${H}" title="${B||H}">${j}</a>`)});function f(H,B={},j={}){var G,Y;const ne=new r.DisposableStore;let de=!1;const he=(0,D.createElement)(B),oe=function(me){let Ce;try{Ce=(0,g.parse)(decodeURIComponent(me))}catch{}return Ce?(Ce=(0,l.cloneAndChange)(Ce,_e=>{if(H.uris&&H.uris[_e])return u.URI.revive(H.uris[_e])}),encodeURIComponent(JSON.stringify(Ce))):me},ce=function(me,Ce){const _e=H.uris&&H.uris[me];let we=u.URI.revive(_e);return Ce?me.startsWith(o.Schemas.data+":")?me:(we||(we=u.URI.parse(me)),o.FileAccess.uriToBrowserUri(we).toString(!0)):!we||u.URI.parse(me).toString()===we.toString()?me:(we.query&&(we=we.with({query:oe(we.query)})),we.toString())},z=new c.marked.Renderer;z.image=C.image,z.link=C.link,z.paragraph=C.paragraph;const V=[],K=[];if(B.codeBlockRendererSync?z.code=(me,Ce)=>{const _e=i.defaultGenerator.nextId(),we=B.codeBlockRendererSync(v(Ce),me);return K.push([_e,we]),`<div class="code" data-code="${_e}">${(0,d.escape)(me)}</div>`}:B.codeBlockRenderer&&(z.code=(me,Ce)=>{const _e=i.defaultGenerator.nextId(),we=B.codeBlockRenderer(v(Ce),me);return V.push(we.then(ye=>[_e,ye])),`<div class="code" data-code="${_e}">${(0,d.escape)(me)}</div>`}),B.actionHandler){const me=function(we){let ye=we.target;if(!(ye.tagName!=="A"&&(ye=ye.parentElement,!ye||ye.tagName!=="A")))try{let ke=ye.dataset.href;ke&&(H.baseUri&&(ke=p(u.URI.from(H.baseUri),ke)),B.actionHandler.callback(ke,we))}catch(ke){(0,h.onUnexpectedError)(ke)}finally{we.preventDefault()}},Ce=B.actionHandler.disposables.add(new y.DomEmitter(he,"click")),_e=B.actionHandler.disposables.add(new y.DomEmitter(he,"auxclick"));B.actionHandler.disposables.add(m.Event.any(Ce.event,_e.event)(we=>{const ye=new b.StandardMouseEvent(we);!ye.leftButton&&!ye.middleButton||me(ye)})),B.actionHandler.disposables.add(S.addDisposableListener(he,"keydown",we=>{const ye=new w.StandardKeyboardEvent(we);!ye.equals(10)&&!ye.equals(3)||me(ye)}))}H.supportHtml||(j.sanitizer=me=>(H.isTrusted?me.match(/^(<span[^>]+>)|(<\\/\\s*span>)$/):void 0)?me:"",j.sanitize=!0,j.silent=!0),j.renderer=z;let ie=(G=H.value)!==null&&G!==void 0?G:"";ie.length>1e5&&(ie=`${ie.substr(0,1e5)}\\u2026`),H.supportThemeIcons&&(ie=(0,t.markdownEscapeEscapedIcons)(ie));let X;if(B.fillInIncompleteTokens){const me=Object.assign(Object.assign({},c.marked.defaults),j),Ce=c.marked.lexer(ie,me),_e=P(Ce);X=c.marked.parser(_e,me)}else X=c.marked.parse(ie,j);H.supportThemeIcons&&(X=(0,_.renderLabelWithIcons)(X).map(Ce=>typeof Ce=="string"?Ce:Ce.outerHTML).join(""));const ue=new DOMParser().parseFromString(L(H,X),"text/html");if(ue.body.querySelectorAll("img").forEach(me=>{const Ce=me.getAttribute("src");if(Ce){let _e=Ce;try{H.baseUri&&(_e=p(u.URI.from(H.baseUri),_e))}catch{}me.src=ce(_e,!0)}}),ue.body.querySelectorAll("a").forEach(me=>{const Ce=me.getAttribute("href");if(me.setAttribute("href",""),!Ce||/^data:|javascript:/i.test(Ce)||/^command:/i.test(Ce)&&!H.isTrusted||/^command:(\\/\\/\\/)?_workbench\\.downloadResource/i.test(Ce))me.replaceWith(...me.childNodes);else{let _e=ce(Ce,!1);H.baseUri&&(_e=p(u.URI.from(H.baseUri),Ce)),me.dataset.href=_e}}),he.innerHTML=L(H,ue.body.innerHTML),V.length>0)Promise.all(V).then(me=>{var Ce,_e;if(de)return;const we=new Map(me),ye=he.querySelectorAll("div[data-code]");for(const ke of ye){const De=we.get((Ce=ke.dataset.code)!==null&&Ce!==void 0?Ce:"");De&&S.reset(ke,De)}(_e=B.asyncRenderCallback)===null||_e===void 0||_e.call(B)});else if(K.length>0){const me=new Map(K),Ce=he.querySelectorAll("div[data-code]");for(const _e of Ce){const we=me.get((Y=_e.dataset.code)!==null&&Y!==void 0?Y:"");we&&S.reset(_e,we)}}if(B.asyncRenderCallback)for(const me of he.getElementsByTagName("img")){const Ce=ne.add(S.addDisposableListener(me,"load",()=>{Ce.dispose(),B.asyncRenderCallback()}))}return{element:he,dispose:()=>{de=!0,ne.dispose()}}}e.renderMarkdown=f;function v(H){if(!H)return"";const B=H.split(/[\\s+|:|,|\\{|\\?]/,1);return B.length?B[0]:H}function p(H,B){return/^\\w[\\w\\d+.-]*:/.test(B)?B:H.path.endsWith("/")?(0,a.resolvePath)(H,B).toString():(0,a.resolvePath)((0,a.dirname)(H),B).toString()}function L(H,B){const{config:j,allowedSchemes:G}=E(H);k.addHook("uponSanitizeAttribute",(ne,de)=>{if(de.attrName==="style"||de.attrName==="class"){if(ne.tagName==="SPAN"){if(de.attrName==="style"){de.keepAttr=/^(color\\:(#[0-9a-fA-F]+|var\\(--vscode(-[a-zA-Z]+)+\\));)?(background-color\\:(#[0-9a-fA-F]+|var\\(--vscode(-[a-zA-Z]+)+\\));)?$/.test(de.attrValue);return}else if(de.attrName==="class"){de.keepAttr=/^codicon codicon-[a-z\\-]+( codicon-modifier-[a-z\\-]+)?$/.test(de.attrValue);return}}de.keepAttr=!1;return}});const Y=S.hookDomPurifyHrefAndSrcSanitizer(G);try{return k.sanitize(B,Object.assign(Object.assign({},j),{RETURN_TRUSTED_TYPE:!0}))}finally{k.removeHook("uponSanitizeAttribute"),Y.dispose()}}e.allowedMarkdownAttr=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function E(H){const B=[o.Schemas.http,o.Schemas.https,o.Schemas.mailto,o.Schemas.data,o.Schemas.file,o.Schemas.vscodeFileResource,o.Schemas.vscodeRemote,o.Schemas.vscodeRemoteResource];return H.isTrusted&&B.push(o.Schemas.command),{config:{ALLOWED_TAGS:[...S.basicMarkupHtmlTags],ALLOWED_ATTR:e.allowedMarkdownAttr,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:B}}function I(H){return typeof H=="string"?H:T(H)}e.renderStringAsPlaintext=I;function T(H){var B;let j=(B=H.value)!==null&&B!==void 0?B:"";j.length>1e5&&(j=`${j.substr(0,1e5)}\\u2026`);const G=c.marked.parse(j,{renderer:R.value}).replace(/&(#\\d+|[a-zA-Z]+);/g,Y=>{var ne;return(ne=F.get(Y))!==null&&ne!==void 0?ne:Y});return L({isTrusted:!1},G).toString()}e.renderMarkdownAsPlaintext=T;const F=new Map([[""",\'"\'],[" "," "],["&","&"],["'","\'"],["<","<"],[">",">"]]),R=new s.Lazy(()=>{const H=new c.marked.Renderer;return H.code=B=>B,H.blockquote=B=>B,H.html=B=>"",H.heading=(B,j,G)=>B+`\n`,H.hr=()=>"",H.list=(B,j)=>B,H.listitem=B=>B+`\n`,H.paragraph=B=>B+`\n`,H.table=(B,j)=>B+j+`\n`,H.tablerow=B=>B,H.tablecell=(B,j)=>B+" ",H.strong=B=>B,H.em=B=>B,H.codespan=B=>B,H.br=()=>`\n`,H.del=B=>B,H.image=(B,j,G)=>"",H.text=B=>B,H.link=(B,j,G)=>G,H});function M(H){let B="";return H.forEach(j=>{B+=j.raw}),B}function N(H){const B=H.tokens[0];if(B.type==="text"){const j=B.raw.split(`\n`),G=j[j.length-1];if(G.includes("`"))return W(H);if(G.includes("**"))return se(H);if(G.match(/\\*\\w/))return U(H);if(G.match(/(^|\\s)__\\w/))return le(H);if(G.match(/(^|\\s)_\\w/))return O(H);if(G.match(/(^|\\s)\\[.*\\]\\(\\w*/))return $(H);if(G.match(/(^|\\s)\\[\\w/))return Q(H)}}function A(H){const B=H.items[H.items.length-1],j=N(B);if(!j||j.type!=="list")return;const G=c.marked.lexer(M(H.items.slice(0,H.items.length-1))+j.items[0].raw);if(G.length===1&&G[0].type==="list")return G[0]}function P(H){let B,j;for(B=0;B<H.length;B++){const G=H[B];if(G.type==="paragraph"&&G.raw.match(/(\\n|^)```/)){j=x(H.slice(B));break}if(G.type==="paragraph"&&G.raw.match(/(\\n|^)\\|/)){j=re(H.slice(B));break}if(B===H.length-1&&G.type==="list"){const Y=A(G);if(Y){j=[Y];break}}if(B===H.length-1&&G.type==="paragraph"){const Y=N(G);if(Y){j=[Y];break}}}if(j){const G=[...H.slice(0,B),...j];return G.links=H.links,G}return H}e.fillInIncompleteTokens=P;function x(H){const B=M(H);return c.marked.lexer(B+"\\n```")}function W(H){return te(H,"`")}function U(H){return te(H,"*")}function O(H){return te(H,"_")}function $(H){return te(H,")")}function Q(H){return te(H,"](about:blank)")}function se(H){return te(H,"**")}function le(H){return te(H,"__")}function te(H,B){const j=M(Array.isArray(H)?H:[H]);return c.marked.lexer(j+B)[0]}function re(H){const B=M(H),j=B.split(`\n`);let G,Y=!1;for(let ne=0;ne<j.length;ne++){const de=j[ne].trim();if(typeof G>"u"&&de.match(/^\\s*\\|/)){const he=de.match(/(\\|[^\\|]+)(?=\\||$)/g);he&&(G=he.length)}else if(typeof G=="number")if(de.match(/^\\s*\\|/)){if(ne!==j.length-1)return;Y=!0}else return}if(typeof G=="number"&&G>0){const ne=Y?j.slice(0,-1).join(`\n`):B,de=!!ne.match(/\\|\\s*$/),he=ne+(de?"":"|")+`\n|${" --- |".repeat(G)}`;return c.marked.lexer(he)}}}),define(J[540],ee([1,0,7,280,44,211,56,140,37,6,68,2,362]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=e.unthemedButtonStyles=void 0,e.unthemedButtonStyles={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:_.Color.white.toString(),buttonForeground:_.Color.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0};class t extends n.Disposable{get onDidClick(){return this._onDidClick.event}constructor(s,r){super(),this._label="",this._onDidClick=this._register(new h.Emitter),this.options=r,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button");const c=r.secondary?r.buttonSecondaryBackground:r.buttonBackground,g=r.secondary?r.buttonSecondaryForeground:r.buttonForeground;this._element.style.color=g||"",this._element.style.backgroundColor=c||"",r.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),s.appendChild(this._element),this._register(w.Gesture.addTarget(this._element)),[S.EventType.CLICK,w.EventType.Tap].forEach(o=>{this._register((0,S.addDisposableListener)(this._element,o,l=>{if(!this.enabled){S.EventHelper.stop(l);return}this._onDidClick.fire(l)}))}),this._register((0,S.addDisposableListener)(this._element,S.EventType.KEY_DOWN,o=>{const l=new y.StandardKeyboardEvent(o);let a=!1;this.enabled&&(l.equals(3)||l.equals(10))?(this._onDidClick.fire(o),a=!0):l.equals(9)&&(this._element.blur(),a=!0),a&&S.EventHelper.stop(l,!0)})),this._register((0,S.addDisposableListener)(this._element,S.EventType.MOUSE_OVER,o=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register((0,S.addDisposableListener)(this._element,S.EventType.MOUSE_OUT,o=>{this.updateBackground(!1)})),this.focusTracker=this._register((0,S.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}getContentElements(s){const r=[];for(let c of(0,b.renderLabelWithIcons)(s))if(typeof c=="string"){if(c=c.trim(),c==="")continue;const g=document.createElement("span");g.textContent=c,r.push(g)}else r.push(c);return r}updateBackground(s){let r;this.options.secondary?r=s?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:r=s?this.options.buttonHoverBackground:this.options.buttonBackground,r&&(this._element.style.backgroundColor=r)}get element(){return this._element}set label(s){var r;if(this._label===s||(0,m.isMarkdownString)(this._label)&&(0,m.isMarkdownString)(s)&&(0,m.markdownStringEqual)(this._label,s))return;this._element.classList.add("monaco-text-button");const c=this.options.supportShortLabel?this._labelElement:this._element;if((0,m.isMarkdownString)(s)){const g=(0,D.renderMarkdown)(s,{inline:!0});g.dispose();const o=(r=g.element.querySelector("p"))===null||r===void 0?void 0:r.innerHTML;if(o){const l=(0,k.sanitize)(o,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});c.innerHTML=l}else(0,S.reset)(c)}else this.options.supportIcons?(0,S.reset)(c,...this.getContentElements(s)):c.textContent=s;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=(0,D.renderStringAsPlaintext)(s)),this._label=s}get label(){return this._label}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=t}),define(J[289],ee([1,0,7,12,21,68,113,2,18,516]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function m(i,s){(0,_.isString)(s)?i.title=(0,w.stripIcons)(s):s?.markdownNotSupportedFallback?i.title=s.markdownNotSupportedFallback:i.removeAttribute("title")}e.setupNativeHover=m;class n{constructor(s,r,c){this.hoverDelegate=s,this.target=r,this.fadeInAnimation=c}update(s,r,c){var g;return Ee(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(s===void 0||(0,_.isString)(s)||s instanceof HTMLElement)o=s;else if(!(0,_.isFunction)(s.markdown))o=(g=s.markdown)!==null&&g!==void 0?g:s.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,h.localize)(0,null),r),this._cancellationTokenSource=new y.CancellationTokenSource;const l=this._cancellationTokenSource.token;if(o=yield s.markdown(l),o===void 0&&(o=s.markdownNotSupportedFallback),this.isDisposed||l.isCancellationRequested)return}this.show(o,r,c)})}show(s,r,c){const g=this._hoverWidget;if(this.hasContent(s)){const o=Object.assign({content:s,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!g},c);this._hoverWidget=this.hoverDelegate.showHover(o,r)}g?.dispose()}hasContent(s){return s?(0,D.isMarkdownString)(s)?!!s.value:!0:!1}get isDisposed(){var s;return(s=this._hoverWidget)===null||s===void 0?void 0:s.isDisposed}dispose(){var s,r;(s=this._hoverWidget)===null||s===void 0||s.dispose(),(r=this._cancellationTokenSource)===null||r===void 0||r.dispose(!0),this._cancellationTokenSource=void 0}}function t(i,s,r,c){let g,o;const l=(f,v)=>{var p;const L=o!==void 0;f&&(o?.dispose(),o=void 0),v&&(g?.dispose(),g=void 0),L&&((p=i.onDidHideHover)===null||p===void 0||p.call(i))},a=(f,v,p)=>new k.TimeoutTimer(()=>Ee(this,void 0,void 0,function*(){(!o||o.isDisposed)&&(o=new n(i,p||s,f>0),yield o.update(r,v,c))}),f),d=()=>{if(g)return;const f=new b.DisposableStore,v=E=>l(!1,E.fromElement===s);f.add(S.addDisposableListener(s,S.EventType.MOUSE_LEAVE,v,!0));const p=()=>l(!0,!0);f.add(S.addDisposableListener(s,S.EventType.MOUSE_DOWN,p,!0));const L={targetElements:[s],dispose:()=>{}};if(i.placement===void 0||i.placement==="mouse"){const E=I=>{L.x=I.x+10,I.target instanceof HTMLElement&&I.target.classList.contains("action-label")&&l(!0,!0)};f.add(S.addDisposableListener(s,S.EventType.MOUSE_MOVE,E,!0))}f.add(a(i.delay,!1,L)),g=f},u=S.addDisposableListener(s,S.EventType.MOUSE_OVER,d,!0);return{show:f=>{l(!1,!0),a(0,f)},hide:()=>{l(!0,!0)},update:(f,v)=>Ee(this,void 0,void 0,function*(){r=f,yield o?.update(r,void 0,v)}),dispose:()=>{u.dispose(),l(!0,!0)}}}e.setupCustomHover=t}),define(J[212],ee([1,0,7,283,289,2,45,156,368]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class _{constructor(s){this._element=s}get element(){return this._element}set textContent(s){this.disposed||s===this._textContent||(this._textContent=s,this._element.textContent=s)}set className(s){this.disposed||s===this._className||(this._className=s,this._element.className=s)}set empty(s){this.disposed||s===this._empty||(this._empty=s,this._element.style.marginLeft=s?"0":"")}dispose(){this.disposed=!0}}class h extends D.Disposable{constructor(s,r){super(),this.customHovers=new Map,this.creationOptions=r,this.domNode=this._register(new _(S.append(s,S.$(".monaco-icon-label")))),this.labelContainer=S.append(this.domNode.element,S.$(".monaco-icon-label-container"));const c=S.append(this.labelContainer,S.$("span.monaco-icon-name-container"));r?.supportHighlights||r?.supportIcons?this.nameNode=new t(c,!!r.supportIcons):this.nameNode=new m(c),this.hoverDelegate=r?.hoverDelegate}get element(){return this.domNode.element}setLabel(s,r,c){const g=["monaco-icon-label"],o=["monaco-icon-label-container"];if(c&&(c.extraClasses&&g.push(...c.extraClasses),c.italic&&g.push("italic"),c.strikethrough&&g.push("strikethrough"),c.disabledCommand&&o.push("disabled")),this.domNode.className=g.join(" "),this.labelContainer.className=o.join(" "),this.setupHover(c?.descriptionTitle?this.labelContainer:this.element,c?.title),this.nameNode.setLabel(s,c),r||this.descriptionNode){const l=this.getOrCreateDescriptionNode();l instanceof k.HighlightedLabel?(l.set(r||"",c?c.descriptionMatches:void 0,void 0,c?.labelEscapeNewLines),this.setupHover(l.element,c?.descriptionTitle)):(l.textContent=r&&c?.labelEscapeNewLines?k.HighlightedLabel.escapeNewLines(r,[]):r||"",this.setupHover(l.element,c?.descriptionTitle||""),l.empty=!r)}}setupHover(s,r){const c=this.customHovers.get(s);if(c&&(c.dispose(),this.customHovers.delete(s)),!r){s.removeAttribute("title");return}if(!this.hoverDelegate)(0,y.setupNativeHover)(s,r);else{const g=(0,y.setupCustomHover)(this.hoverDelegate,s,r);g&&this.customHovers.set(s,g)}}dispose(){super.dispose();for(const s of this.customHovers.values())s.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var s;if(!this.descriptionNode){const r=this._register(new _(S.append(this.labelContainer,S.$("span.monaco-icon-description-container"))));!((s=this.creationOptions)===null||s===void 0)&&s.supportDescriptionHighlights?this.descriptionNode=new k.HighlightedLabel(S.append(r.element,S.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new _(S.append(r.element,S.$("span.label-description"))))}return this.descriptionNode}}e.IconLabel=h;class m{constructor(s){this.container=s,this.label=void 0,this.singleLabel=void 0}setLabel(s,r){if(!(this.label===s&&(0,w.equals)(this.options,r)))if(this.label=s,this.options=r,typeof s=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=S.append(this.container,S.$("a.label-name",{id:r?.domId}))),this.singleLabel.textContent=s;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let c=0;c<s.length;c++){const g=s[c],o=r?.domId&&`${r?.domId}_${c}`;S.append(this.container,S.$("a.label-name",{id:o,"data-icon-label-count":s.length,"data-icon-label-index":c,role:"treeitem"},g)),c<s.length-1&&S.append(this.container,S.$("span.label-separator",void 0,r?.separator||"/"))}}}}function n(i,s,r){if(!r)return;let c=0;return i.map(g=>{const o={start:c,end:c+g.length},l=r.map(a=>b.Range.intersect(o,a)).filter(a=>!b.Range.isEmpty(a)).map(({start:a,end:d})=>({start:a-c,end:d-c}));return c=o.end+s.length,l})}class t{constructor(s,r){this.container=s,this.supportIcons=r,this.label=void 0,this.singleLabel=void 0}setLabel(s,r){if(!(this.label===s&&(0,w.equals)(this.options,r)))if(this.label=s,this.options=r,typeof s=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new k.HighlightedLabel(S.append(this.container,S.$("a.label-name",{id:r?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(s,r?.matches,void 0,r?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const c=r?.separator||"/",g=n(s,c,r?.matches);for(let o=0;o<s.length;o++){const l=s[o],a=g?g[o]:void 0,d=r?.domId&&`${r?.domId}_${o}`,u=S.$("a.label-name",{id:d,"data-icon-label-count":s.length,"data-icon-label-index":o,role:"treeitem"});new k.HighlightedLabel(S.append(this.container,u),{supportIcons:this.supportIcons}).set(l,a,void 0,r?.labelEscapeNewLines),o<s.length-1&&S.append(u,S.$("span.label-separator",void 0,c))}}}}}),define(J[541],ee([1,0,7,76,44,211,108,16,6,58,2,17,519,376]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxList=void 0;const i=S.$,s="selectOption.entry.template";class r{get templateId(){return s}renderTemplate(o){const l=Object.create(null);return l.root=o,l.text=S.append(o,i(".option-text")),l.detail=S.append(o,i(".option-detail")),l.decoratorRight=S.append(o,i(".option-decorator-right")),l}renderElement(o,l,a){const d=a,u=o.text,C=o.detail,f=o.decoratorRight,v=o.isDisabled;d.text.textContent=u,d.detail.textContent=C||"",d.decoratorRight.innerText=f||"",v?d.root.classList.add("option-disabled"):d.root.classList.remove("option-disabled")}disposeTemplate(o){}}class c extends m.Disposable{constructor(o,l,a,d,u){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=d,this.selectBoxOptions=u||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=c.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new _.Emitter,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(a),this.selected=l||0,o&&this.setOptions(o,l),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return s}constructSelectDropDown(o){this.contextViewProvider=o,this.selectDropDownContainer=S.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=S.append(this.selectDropDownContainer,i(".select-box-details-pane"));const l=S.append(this.selectDropDownContainer,i(".select-box-dropdown-container-width-control")),a=S.append(l,i(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",S.append(a,this.widthControlElement),this._dropDownPosition=0,this.styleElement=S.createStyleSheet(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(S.addDisposableListener(this.selectDropDownContainer,S.EventType.DRAG_START,d=>{S.EventHelper.stop(d,!0)}))}registerListeners(){this._register(S.addStandardDisposableListener(this.selectElement,"change",l=>{this.selected=l.target.selectedIndex,this._onDidSelect.fire({index:l.target.selectedIndex,selected:l.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(S.addDisposableListener(this.selectElement,S.EventType.CLICK,l=>{S.EventHelper.stop(l),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(S.addDisposableListener(this.selectElement,S.EventType.MOUSE_DOWN,l=>{S.EventHelper.stop(l)}));let o;this._register(S.addDisposableListener(this.selectElement,"touchstart",l=>{o=this._isVisible})),this._register(S.addDisposableListener(this.selectElement,"touchend",l=>{S.EventHelper.stop(l),o?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(S.addDisposableListener(this.selectElement,S.EventType.KEY_DOWN,l=>{const a=new y.StandardKeyboardEvent(l);let d=!1;n.isMacintosh?(a.keyCode===18||a.keyCode===16||a.keyCode===10||a.keyCode===3)&&(d=!0):(a.keyCode===18&&a.altKey||a.keyCode===16&&a.altKey||a.keyCode===10||a.keyCode===3)&&(d=!0),d&&(this.showSelectDropDown(),S.EventHelper.stop(l,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(o,l){b.equals(this.options,o)||(this.options=o,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((a,d)=>{this.selectElement.add(this.createOption(a.text,d,a.isDisabled)),typeof a.description=="string"&&(this._hasDetails=!0)})),l!==void 0&&(this.select(l),this._currentSelection=this.selected)}setOptionsList(){var o;(o=this.selectList)===null||o===void 0||o.splice(0,this.selectList.length,this.options)}select(o){o>=0&&o<this.options.length?this.selected=o:o>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(o){this.selectElement.tabIndex=o?0:-1}render(o){this.container=o,o.classList.add("select-container"),o.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const o=[];this.styles.listFocusBackground&&o.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&o.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&o.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(o.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),o.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),o.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(o.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),o.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&o.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&o.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&o.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&o.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),o.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),o.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=o.join(`\n`)}styleSelectElement(){var o,l,a;const d=(o=this.styles.selectBackground)!==null&&o!==void 0?o:"",u=(l=this.styles.selectForeground)!==null&&l!==void 0?l:"",C=(a=this.styles.selectBorder)!==null&&a!==void 0?a:"";this.selectElement.style.backgroundColor=d,this.selectElement.style.color=u,this.selectElement.style.borderColor=C}styleList(){var o,l;const a=(o=this.styles.selectBackground)!==null&&o!==void 0?o:"",d=S.asCssValueWithDefault(this.styles.selectListBackground,a);this.selectDropDownListContainer.style.backgroundColor=d,this.selectionDetailsPane.style.backgroundColor=d;const u=(l=this.styles.focusBorder)!==null&&l!==void 0?l:"";this.selectDropDownContainer.style.outlineColor=u,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(o,l,a){const d=document.createElement("option");return d.value=o,d.text=o,d.disabled=!!a,d}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:o=>this.renderSelectDropDown(o,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:o=>this.renderSelectDropDown(o),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(o){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),o&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(o,l){return o.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(l),{dispose:()=>{try{o.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let o=0;return this.options.forEach((l,a)=>{this.updateDetail(a),this.selectionDetailsPane.offsetHeight>o&&(o=this.selectionDetailsPane.offsetHeight)}),o}layoutSelectDropDown(o){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const l=S.getDomNodePagePosition(this.selectElement),a=getComputedStyle(this.selectElement),d=parseFloat(a.getPropertyValue("--dropdown-padding-top"))+parseFloat(a.getPropertyValue("--dropdown-padding-bottom")),u=window.innerHeight-l.top-l.height-(this.selectBoxOptions.minBottomMargin||0),C=l.top-c.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,f=this.selectElement.offsetWidth,v=this.setWidthControlElement(this.widthControlElement),p=Math.max(v,Math.round(f)).toString()+"px";this.selectDropDownContainer.style.width=p,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let L=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const E=this._hasDetails?this._cachedMaxDetailsHeight:0,I=L+d+E,T=Math.floor((u-d-E)/this.getHeight()),F=Math.floor((C-d-E)/this.getHeight());if(o)return l.top+l.height>window.innerHeight-22||l.top<c.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||T<1&&F<1?!1:(T<c.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&F>T&&this.options.length>T?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(l.top+l.height>window.innerHeight-22||l.top<c.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&T<1||this._dropDownPosition===1&&F<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&T+F<1)return this.hideSelectDropDown(!0),!1;I>u&&(L=T*this.getHeight())}else I>C&&(L=F*this.getHeight());return this.selectList.layout(L),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=L+d+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=L+d+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=p,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(o){let l=0;if(o){let a=0,d=0;this.options.forEach((u,C)=>{const f=u.detail?u.detail.length:0,v=u.decoratorRight?u.decoratorRight.length:0,p=u.text.length+f+v;p>d&&(a=C,d=p)}),o.textContent=this.options[a].text+(this.options[a].decoratorRight?this.options[a].decoratorRight+" ":""),l=S.getTotalWidth(o)}return l}createSelectList(o){if(this.selectList)return;this.selectDropDownListContainer=S.append(o,i(".select-box-dropdown-list-container")),this.listRenderer=new r,this.selectList=new w.List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:d=>{let u=d.text;return d.detail&&(u+=`. ${d.detail}`),d.decoratorRight&&(u+=`. ${d.decoratorRight}`),d.description&&(u+=`. ${d.description}`),u},getWidgetAriaLabel:()=>(0,t.localize)(0,null),getRole:()=>"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const l=this._register(new k.DomEmitter(this.selectDropDownListContainer,"keydown")),a=_.Event.chain(l.event).filter(()=>this.selectList.length>0).map(d=>new y.StandardKeyboardEvent(d));this._register(a.filter(d=>d.keyCode===3).on(d=>this.onEnter(d),this)),this._register(a.filter(d=>d.keyCode===2).on(d=>this.onEnter(d),this)),this._register(a.filter(d=>d.keyCode===9).on(d=>this.onEscape(d),this)),this._register(a.filter(d=>d.keyCode===16).on(d=>this.onUpArrow(d),this)),this._register(a.filter(d=>d.keyCode===18).on(d=>this.onDownArrow(d),this)),this._register(a.filter(d=>d.keyCode===12).on(this.onPageDown,this)),this._register(a.filter(d=>d.keyCode===11).on(this.onPageUp,this)),this._register(a.filter(d=>d.keyCode===14).on(this.onHome,this)),this._register(a.filter(d=>d.keyCode===13).on(this.onEnd,this)),this._register(a.filter(d=>d.keyCode>=21&&d.keyCode<=56||d.keyCode>=80&&d.keyCode<=108).on(this.onCharacter,this)),this._register(S.addDisposableListener(this.selectList.getHTMLElement(),S.EventType.POINTER_UP,d=>this.onPointerUp(d))),this._register(this.selectList.onMouseOver(d=>typeof d.index<"u"&&this.selectList.setFocus([d.index]))),this._register(this.selectList.onDidChangeFocus(d=>this.onListFocus(d))),this._register(S.addDisposableListener(this.selectDropDownContainer,S.EventType.FOCUS_OUT,d=>{!this._isVisible||S.isAncestor(d.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(o){if(!this.selectList.length)return;S.EventHelper.stop(o);const l=o.target;if(!l||l.classList.contains("slider"))return;const a=l.closest(".monaco-list-row");if(!a)return;const d=Number(a.getAttribute("data-index")),u=a.classList.contains("option-disabled");d>=0&&d<this.options.length&&!u&&(this.selected=d,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(o,l){const a=u=>{for(let C=0;C<u.childNodes.length;C++){const f=u.childNodes.item(C);(f.tagName&&f.tagName.toLowerCase())==="img"?u.removeChild(f):a(f)}},d=(0,D.renderMarkdown)({value:o,supportThemeIcons:!0},{actionHandler:l});return d.element.classList.add("select-box-description-markdown"),a(d.element),d.element}onListFocus(o){!this._isVisible||!this._hasDetails||this.updateDetail(o.indexes[0])}updateDetail(o){var l,a;this.selectionDetailsPane.innerText="";const d=this.options[o],u=(l=d?.description)!==null&&l!==void 0?l:"",C=(a=d?.descriptionIsMarkdown)!==null&&a!==void 0?a:!1;if(u){if(C){const f=d.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(u,f))}else this.selectionDetailsPane.innerText=u;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(o){S.EventHelper.stop(o),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(o){S.EventHelper.stop(o),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(o){if(this.selected<this.options.length-1){S.EventHelper.stop(o,!0);const l=this.options[this.selected+1].isDisabled;if(l&&this.options.length>this.selected+2)this.selected+=2;else{if(l)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(o){this.selected>0&&(S.EventHelper.stop(o,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(o){S.EventHelper.stop(o),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onPageDown(o){S.EventHelper.stop(o),this.selectList.focusNextPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(o){S.EventHelper.stop(o),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(o){S.EventHelper.stop(o),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(o){const l=h.KeyCodeUtils.toString(o.keyCode);let a=-1;for(let d=0;d<this.options.length-1;d++)if(a=(d+this.selected+1)%this.options.length,this.options[a].text.charAt(0).toUpperCase()===l&&!this.options[a].isDisabled){this.select(a),this.selectList.setFocus([a]),this.selectList.reveal(this.selectList.getFocus()[0]),S.EventHelper.stop(o);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}c.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,c.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,c.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3,e.SelectBoxList=c}),define(J[542],ee([1,0,541,535,67,17,375]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBox=void 0;class w extends y.Widget{constructor(_,h,m,n,t){super(),D.isMacintosh&&!t?.useCustomDrawn?this.selectBoxDelegate=new k.SelectBoxNative(_,h,n,t):this.selectBoxDelegate=new S.SelectBoxList(_,h,m,n,t),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(_,h){this.selectBoxDelegate.setOptions(_,h)}select(_){this.selectBoxDelegate.select(_)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(_){this.selectBoxDelegate.setFocusable(_)}render(_){this.selectBoxDelegate.render(_)}}e.SelectBox=w}),define(J[143],ee([1,0,46,131,7,56,289,542,41,2,17,18,512,245]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectActionViewItem=e.ActionViewItem=e.BaseActionViewItem=void 0;class i extends h.Disposable{get action(){return this._action}constructor(g,o,l={}){super(),this.options=l,this._context=g||this,this._action=o,o instanceof _.Action&&this._register(o.onDidChange(a=>{this.element&&this.handleActionChangeEvent(a)}))}handleActionChangeEvent(g){g.enabled!==void 0&&this.updateEnabled(),g.checked!==void 0&&this.updateChecked(),g.class!==void 0&&this.updateClass(),g.label!==void 0&&(this.updateLabel(),this.updateTooltip()),g.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new _.ActionRunner)),this._actionRunner}set actionRunner(g){this._actionRunner=g}isEnabled(){return this._action.enabled}setActionContext(g){this._context=g}render(g){const o=this.element=g;this._register(D.Gesture.addTarget(g));const l=this.options&&this.options.draggable;l&&(g.draggable=!0,S.isFirefox&&this._register((0,y.addDisposableListener)(g,y.EventType.DRAG_START,a=>{var d;return(d=a.dataTransfer)===null||d===void 0?void 0:d.setData(k.DataTransfers.TEXT,this._action.label)}))),this._register((0,y.addDisposableListener)(o,D.EventType.Tap,a=>this.onClick(a,!0))),this._register((0,y.addDisposableListener)(o,y.EventType.MOUSE_DOWN,a=>{l||y.EventHelper.stop(a,!0),this._action.enabled&&a.button===0&&o.classList.add("active")})),m.isMacintosh&&this._register((0,y.addDisposableListener)(o,y.EventType.CONTEXT_MENU,a=>{a.button===0&&a.ctrlKey===!0&&this.onClick(a)})),this._register((0,y.addDisposableListener)(o,y.EventType.CLICK,a=>{y.EventHelper.stop(a,!0),this.options&&this.options.isMenu||this.onClick(a)})),this._register((0,y.addDisposableListener)(o,y.EventType.DBLCLICK,a=>{y.EventHelper.stop(a,!0)})),[y.EventType.MOUSE_UP,y.EventType.MOUSE_OUT].forEach(a=>{this._register((0,y.addDisposableListener)(o,a,d=>{y.EventHelper.stop(d),o.classList.remove("active")}))})}onClick(g,o=!1){var l;y.EventHelper.stop(g,!0);const a=n.isUndefinedOrNull(this._context)?!((l=this.options)===null||l===void 0)&&l.useEventAsContext?g:{preserveFocus:o}:this._context;this.actionRunner.run(this._action,a)}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(g){this.element&&(this.element.tabIndex=g?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var g;if(!this.element)return;const o=(g=this.getTooltip())!==null&&g!==void 0?g:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(o):(this.customHover=(0,w.setupCustomHover)(this.options.hoverDelegate,this.element,o),this._store.add(this.customHover))):this.element.title=o}updateAriaLabel(){var g;if(this.element){const o=(g=this.getTooltip())!==null&&g!==void 0?g:"";this.element.setAttribute("aria-label",o)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}e.BaseActionViewItem=i;class s extends i{constructor(g,o,l){super(g,o,l),this.options=l,this.options.icon=l.icon!==void 0?l.icon:!1,this.options.label=l.label!==void 0?l.label:!0,this.cssClass=""}render(g){super.render(g),this.element&&(this.label=(0,y.append)(this.element,(0,y.$)("a.action-label"))),this.label&&(this._action.id===_.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&&((0,y.append)(this.element,(0,y.$)("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(g){this.label&&(this.label.tabIndex=g?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let g=null;return this.action.tooltip?g=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(g=this.action.label,this.options.keybinding&&(g=t.localize(0,null,g,this.options.keybinding))),g??void 0}updateClass(){var g;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(g=this.label)===null||g===void 0||g.classList.remove("codicon")}updateEnabled(){var g,o;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(g=this.element)===null||g===void 0||g.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(o=this.element)===null||o===void 0||o.classList.add("disabled"))}updateAriaLabel(){var g;if(this.label){const o=(g=this.getTooltip())!==null&&g!==void 0?g:"";this.label.setAttribute("aria-label",o)}}updateChecked(){this.label&&(this.action.checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}e.ActionViewItem=s;class r extends i{constructor(g,o,l,a,d,u,C){super(g,o),this.selectBox=new b.SelectBox(l,a,d,u,C),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(g){this.selectBox.select(g)}registerListeners(){this._register(this.selectBox.onDidSelect(g=>this.runAction(g.selected,g.index)))}runAction(g,o){this.actionRunner.run(this._action,this.getActionContext(g,o))}getActionContext(g,o){return g}setFocusable(g){this.selectBox.setFocusable(g)}focus(){var g;(g=this.selectBox)===null||g===void 0||g.focus()}blur(){var g;(g=this.selectBox)===null||g===void 0||g.blur()}render(g){this.selectBox.render(g)}}e.SelectActionViewItem=r}),define(J[69],ee([1,0,7,44,143,41,6,2,18,245]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class h extends b.Disposable{constructor(n,t={}){var i,s,r,c,g,o;super(),this._actionRunnerDisposables=this._register(new b.DisposableStore),this.viewItemDisposables=this._register(new b.DisposableMap),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new w.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new w.Emitter({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new w.Emitter),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new w.Emitter),this.onWillRun=this._onWillRun.event,this.options=t,this._context=(i=t.context)!==null&&i!==void 0?i:null,this._orientation=(s=this.options.orientation)!==null&&s!==void 0?s:0,this._triggerKeys={keyDown:(c=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.keyDown)!==null&&c!==void 0?c:!1,keys:(o=(g=this.options.triggerKeys)===null||g===void 0?void 0:g.keys)!==null&&o!==void 0?o:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new D.ActionRunner,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(d=>this._onDidRun.fire(d))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(d=>this._onWillRun.fire(d))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let l,a;switch(this._orientation){case 0:l=[15],a=[17];break;case 1:l=[16],a=[18],this.domNode.className+=" vertical";break}this._register(S.addDisposableListener(this.domNode,S.EventType.KEY_DOWN,d=>{const u=new k.StandardKeyboardEvent(d);let C=!0;const f=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;l&&(u.equals(l[0])||u.equals(l[1]))?C=this.focusPrevious():a&&(u.equals(a[0])||u.equals(a[1]))?C=this.focusNext():u.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():u.equals(14)?C=this.focusFirst():u.equals(13)?C=this.focusLast():u.equals(2)&&f instanceof y.BaseActionViewItem&&f.trapsArrowNavigation?C=this.focusNext():this.isTriggerKeyEvent(u)?this._triggerKeys.keyDown?this.doTrigger(u):this.triggerKeyDown=!0:C=!1,C&&(u.preventDefault(),u.stopPropagation())})),this._register(S.addDisposableListener(this.domNode,S.EventType.KEY_UP,d=>{const u=new k.StandardKeyboardEvent(d);this.isTriggerKeyEvent(u)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(u)),u.preventDefault(),u.stopPropagation()):(u.equals(2)||u.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(S.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(S.getActiveElement()===this.domNode||!S.isAncestor(S.getActiveElement(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=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",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),n.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(n){if(this.focusable=n,this.focusable){const t=this.viewItems.find(i=>i instanceof y.BaseActionViewItem&&i.isEnabled());t instanceof y.BaseActionViewItem&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof y.BaseActionViewItem&&t.setFocusable(!1)})}isTriggerKeyEvent(n){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||n.equals(i)}),t}updateFocusedItem(){for(let n=0;n<this.actionsList.children.length;n++){const t=this.actionsList.children[n];if(S.isAncestor(S.getActiveElement(),t)){this.focusedItem=n;break}}}get context(){return this._context}set context(n){this._context=n,this.viewItems.forEach(t=>t.setActionContext(n))}get actionRunner(){return this._actionRunner}set actionRunner(n){this._actionRunner=n,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=n)}getContainer(){return this.domNode}getAction(n){var t;if(typeof n=="number")return(t=this.viewItems[n])===null||t===void 0?void 0:t.action;if(n instanceof HTMLElement){for(;n.parentElement!==this.actionsList;){if(!n.parentElement)return;n=n.parentElement}for(let i=0;i<this.actionsList.childNodes.length;i++)if(this.actionsList.childNodes[i]===n)return this.viewItems[i].action}}push(n,t={}){const i=Array.isArray(n)?n:[n];let s=_.isNumber(t.index)?t.index:null;i.forEach(r=>{const c=document.createElement("li");c.className="action-item",c.setAttribute("role","presentation");let g;const o=Object.assign({hoverDelegate:this.options.hoverDelegate},t);this.options.actionViewItemProvider&&(g=this.options.actionViewItemProvider(r,o)),g||(g=new y.ActionViewItem(this.context,r,o)),this.options.allowContextMenu||this.viewItemDisposables.set(g,S.addDisposableListener(c,S.EventType.CONTEXT_MENU,l=>{S.EventHelper.stop(l,!0)})),g.actionRunner=this._actionRunner,g.setActionContext(this.context),g.render(c),this.focusable&&g instanceof y.BaseActionViewItem&&this.viewItems.length===0&&g.setFocusable(!0),s===null||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(c),this.viewItems.push(g)):(this.actionsList.insertBefore(c,this.actionsList.children[s]),this.viewItems.splice(s,0,g),s++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,b.dispose)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),S.clearNode(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(n){let t=!1,i;if(n===void 0?t=!0:typeof n=="number"?i=n:typeof n=="boolean"&&(t=n),t&&typeof this.focusedItem>"u"){const s=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=s===-1?void 0:s,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(n){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!n&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===D.Separator.ID));return this.updateFocus(),!0}focusPrevious(n){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!n&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===D.Separator.ID));return this.updateFocus(!0),!0}updateFocus(n,t,i=!1){var s;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((s=this.viewItems[this.previouslyFocusedItem])===null||s===void 0||s.blur());const r=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(r){let c=!0;_.isFunction(r.focus)||(c=!1),this.options.focusOnlyEnabledItems&&_.isFunction(r.isEnabled)&&!r.isEnabled()&&(c=!1),r.action.id===D.Separator.ID&&(c=!1),c?(i||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(n),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(n){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof y.BaseActionViewItem){const i=t._context===null||t._context===void 0?n:t._context;this.run(t._action,i)}}run(n,t){return Ee(this,void 0,void 0,function*(){yield this._actionRunner.run(n,t)})}dispose(){this._context=void 0,this.viewItems=(0,b.dispose)(this.viewItems),this.getContainer().remove(),super.dispose()}}e.ActionBar=h}),define(J[290],ee([1,0,7,143,532,6,246]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class w extends k.BaseActionViewItem{constructor(_,h,m,n=Object.create(null)){super(null,_,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new D.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=h,this.contextMenuProvider=m,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(_){this.actionItem=_;const h=t=>{this.element=(0,S.append)(t,(0,S.$)("a.action-label"));let i=[];return typeof this.options.classNames=="string"?i=this.options.classNames.split(/\\s+/g).filter(s=>!!s):this.options.classNames&&(i=this.options.classNames),i.find(s=>s==="icon")||i.push("codicon"),this.element.classList.add(...i),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},m=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:h,menuAsChild:this.options.menuAsChild,actions:m?this.menuActionsOrProvider:void 0,actionProvider:m?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new y.DropdownMenu(_,n)),this._register(this.dropdownMenu.onDidChangeVisibility(t=>{var i;(i=this.element)===null||i===void 0||i.setAttribute("aria-expanded",`${t}`),this._onDidChangeVisibility.fire(t)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const t=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return t.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let _=null;return this.action.tooltip?_=this.action.tooltip:this.action.label&&(_=this.action.label),_??void 0}setActionContext(_){super.setActionContext(_),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=_:this.dropdownMenu.menuOptions={context:_})}show(){var _;(_=this.dropdownMenu)===null||_===void 0||_.show()}updateEnabled(){var _,h;const m=!this.action.enabled;(_=this.actionItem)===null||_===void 0||_.classList.toggle("disabled",m),(h=this.element)===null||h===void 0||h.classList.toggle("disabled",m)}}e.DropdownMenuActionViewItem=w}),define(J[213],ee([1,0,7,76,207,69,50,77,67,6,358,45,517,369]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=e.unthemedInboxStyles=void 0;const i=S.$;e.unthemedInboxStyles={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class s extends _.Widget{constructor(g,o,l){var a;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new h.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new h.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=o,this.options=l,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(a=this.options.tooltip)!==null&&a!==void 0?a:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=S.append(g,i(".monaco-inputbox.idle"));const d=this.options.flexibleHeight?"textarea":"input",u=S.append(this.element,i(".ibwrapper"));if(this.input=S.append(u,i(d+".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=S.append(u,i("div.mirror")),this.mirror.innerText="\\xA0",this.scrollableElement=new b.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),S.append(g,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(v=>this.input.scrollTop=v.scrollTop));const C=this._register(new k.DomEmitter(document,"selectionchange")),f=h.Event.filter(C.event,()=>{const v=document.getSelection();return v?.anchorNode===u});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.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new D.ActionBar(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(g){this.placeholder=g,this.input.setAttribute("placeholder",g)}setTooltip(g){this.tooltip=g,this.input.title=g}get inputElement(){return this.input}get value(){return this.input.value}set value(g){this.input.value!==g&&(this.input.value=g,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:S.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(g=null){this.input.select(),g&&(this.input.setSelectionRange(g.start,g.end),g.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()}set paddingRight(g){this.input.style.width=`calc(100% - ${g}px)`,this.mirror&&(this.mirror.style.paddingRight=g+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const g=this.cachedContentHeight,o=this.cachedHeight,l=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:g,height:o}),this.scrollableElement.setScrollPosition({scrollTop:l})}showMessage(g,o){if(this.state==="open"&&(0,n.equals)(this.message,g))return;this.message=g,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(g.type));const l=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${S.asCssValueWithDefault(l.border,"transparent")}`,this.message.content&&(this.hasFocus()||o)&&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 g=null;return this.validation&&(g=this.validation(this.value),g?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(g)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),g?.type}stylesForType(g){const o=this.options.inputBoxStyles;switch(g){case 1:return{border:o.inputValidationInfoBorder,background:o.inputValidationInfoBackground,foreground:o.inputValidationInfoForeground};case 2:return{border:o.inputValidationWarningBorder,background:o.inputValidationWarningBackground,foreground:o.inputValidationWarningForeground};default:return{border:o.inputValidationErrorBorder,background:o.inputValidationErrorBackground,foreground:o.inputValidationErrorForeground}}}classForType(g){switch(g){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let g;const o=()=>g.style.width=S.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:a=>{var d,u;if(!this.message)return null;g=S.append(a,i(".monaco-inputbox-container")),o();const C={inline:!0,className:"monaco-inputbox-message"},f=this.message.formatContent?(0,y.renderFormattedText)(this.message.content,C):(0,y.renderText)(this.message.content,C);f.classList.add(this.classForType(this.message.type));const v=this.stylesForType(this.message.type);return f.style.backgroundColor=(d=v.background)!==null&&d!==void 0?d:"",f.style.color=(u=v.foreground)!==null&&u!==void 0?u:"",f.style.border=v.border?`1px solid ${v.border}`:"",S.append(g,f),null},onHide:()=>{this.state="closed"},layout:o});let l;this.message.type===3?l=t.localize(0,null,this.message.content):this.message.type===2?l=t.localize(1,null,this.message.content):l=t.localize(2,null,this.message.content),w.alert(l),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)return;const g=this.value,l=g.charCodeAt(g.length-1)===10?" ":"";(g+l).replace(/\\u000c/g,"")?this.mirror.textContent=g+l:this.mirror.innerText="\\xA0",this.layout()}applyStyles(){var g,o,l;const a=this.options.inputBoxStyles,d=(g=a.inputBackground)!==null&&g!==void 0?g:"",u=(o=a.inputForeground)!==null&&o!==void 0?o:"",C=(l=a.inputBorder)!==null&&l!==void 0?l:"";this.element.style.backgroundColor=d,this.element.style.color=u,this.input.style.backgroundColor="inherit",this.input.style.color=u,this.element.style.border=`1px solid ${S.asCssValueWithDefault(C,"transparent")}`}layout(){if(!this.mirror)return;const g=this.cachedContentHeight;this.cachedContentHeight=S.getTotalHeight(this.mirror),g!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(g){const o=this.inputElement,l=o.selectionStart,a=o.selectionEnd,d=o.value;l!==null&&a!==null&&(this.value=d.substr(0,l)+g+d.substr(a),o.setSelectionRange(l+1,l+1),this.layout())}dispose(){var g;this._hideMessage(),this.message=null,(g=this.actionbar)===null||g===void 0||g.dispose(),super.dispose()}}e.InputBox=s;class r extends s{constructor(g,o,l){const a=t.localize(3,null),d=` or \\u21C5 ${a}`,u=` (\\u21C5 ${a})`;super(g,o,l),this._onDidFocus=this._register(new h.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new h.Emitter),this.onDidBlur=this._onDidBlur.event,this.history=new m.HistoryNavigator(l.history,100);const C=()=>{if(l.showHistoryHint&&l.showHistoryHint()&&!this.placeholder.endsWith(d)&&!this.placeholder.endsWith(u)&&this.history.getHistory().length){const f=this.placeholder.endsWith(")")?d:u,v=this.placeholder+f;l.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=v:this.setPlaceHolder(v)}};this.observer=new MutationObserver((f,v)=>{f.forEach(p=>{p.target.textContent||C()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>C()),this.onblur(this.input,()=>{const f=v=>{if(this.placeholder.endsWith(v)){const p=this.placeholder.slice(0,this.placeholder.length-v.length);return l.showPlaceholderOnFocus?this.placeholder=p:this.setPlaceHolder(p),!0}else return!1};f(u)||f(d)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(g){this.value&&(g||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let g=this.getNextValue();g&&(g=g===this.value?this.getNextValue():g),g&&(this.value=g,w.status(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let g=this.getPreviousValue();g&&(g=g===this.value?this.getPreviousValue():g),g&&(this.value=g,w.status(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let g=this.history.current();return g||(g=this.history.last(),this.history.next()),g}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}e.HistoryInputBox=r}),define(J[214],ee([1,0,7,288,213,67,6,513,2,247]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const h=b.localize(0,null);class m extends D.Widget{constructor(t,i,s){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=new _.DisposableStore,this.additionalToggles=[],this._onDidOptionChange=this._register(new w.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new w.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new w.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new w.Emitter),this._onKeyUp=this._register(new w.Emitter),this._onCaseSensitiveKeyDown=this._register(new w.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new w.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=s.placeholder||"",this.validation=s.validation,this.label=s.label||h,this.showCommonFindToggles=!!s.showCommonFindToggles;const r=s.appendCaseSensitiveLabel||"",c=s.appendWholeWordsLabel||"",g=s.appendRegexLabel||"",o=s.history||[],l=!!s.flexibleHeight,a=!!s.flexibleWidth,d=s.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y.HistoryInputBox(this.domNode,i,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:o,showHistoryHint:s.showHistoryHint,flexibleHeight:l,flexibleWidth:a,flexibleMaxHeight:d,inputBoxStyles:s.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new k.RegexToggle(Object.assign({appendTitle:g,isChecked:!1},s.toggleStyles))),this._register(this.regex.onChange(C=>{this._onDidOptionChange.fire(C),!C&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(C=>{this._onRegexKeyDown.fire(C)})),this.wholeWords=this._register(new k.WholeWordsToggle(Object.assign({appendTitle:c,isChecked:!1},s.toggleStyles))),this._register(this.wholeWords.onChange(C=>{this._onDidOptionChange.fire(C),!C&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new k.CaseSensitiveToggle(Object.assign({appendTitle:r,isChecked:!1},s.toggleStyles))),this._register(this.caseSensitive.onChange(C=>{this._onDidOptionChange.fire(C),!C&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(C=>{this._onCaseSensitiveKeyDown.fire(C)}));const u=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,C=>{if(C.equals(15)||C.equals(17)||C.equals(9)){const f=u.indexOf(document.activeElement);if(f>=0){let v=-1;C.equals(17)?v=(f+1)%u.length:C.equals(15)&&(f===0?v=u.length-1:v=f-1),C.equals(9)?(u[f].blur(),this.inputBox.focus()):v>=0&&u[v].focus(),S.EventHelper.stop(C,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(s?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),t?.appendChild(this.domNode),this._register(S.addDisposableListener(this.inputBox.inputElement,"compositionstart",u=>{this.imeSessionInProgress=!0})),this._register(S.addDisposableListener(this.inputBox.inputElement,"compositionend",u=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}get onDidChange(){return this.inputBox.onDidChange}layout(t){this.inputBox.layout(),this.updateInputBoxPadding(t.collapsedFindWidget)}enable(){var t,i,s;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(t=this.regex)===null||t===void 0||t.enable(),(i=this.wholeWords)===null||i===void 0||i.enable(),(s=this.caseSensitive)===null||s===void 0||s.enable();for(const r of this.additionalToggles)r.enable()}disable(){var t,i,s;this.domNode.classList.add("disabled"),this.inputBox.disable(),(t=this.regex)===null||t===void 0||t.disable(),(i=this.wholeWords)===null||i===void 0||i.disable(),(s=this.caseSensitive)===null||s===void 0||s.disable();for(const r of this.additionalToggles)r.disable()}setFocusInputOnOptionClick(t){this.fixFocusOnOptionClickEnabled=t}setEnabled(t){t?this.enable():this.disable()}setAdditionalToggles(t){for(const i of this.additionalToggles)i.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.dispose(),this.additionalTogglesDisposables=new _.DisposableStore;for(const i of t??[])this.additionalTogglesDisposables.add(i),this.controls.appendChild(i.domNode),this.additionalTogglesDisposables.add(i.onChange(s=>{this._onDidOptionChange.fire(s),!s&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(i);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(t=!1){var i,s,r,c,g,o;t?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((s=(i=this.caseSensitive)===null||i===void 0?void 0:i.width())!==null&&s!==void 0?s:0)+((c=(r=this.wholeWords)===null||r===void 0?void 0:r.width())!==null&&c!==void 0?c:0)+((o=(g=this.regex)===null||g===void 0?void 0:g.width())!==null&&o!==void 0?o:0)+this.additionalToggles.reduce((l,a)=>l+a.width(),0)}getValue(){return this.inputBox.value}setValue(t){this.inputBox.value!==t&&(this.inputBox.value=t)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var t,i;return(i=(t=this.caseSensitive)===null||t===void 0?void 0:t.checked)!==null&&i!==void 0?i:!1}setCaseSensitive(t){this.caseSensitive&&(this.caseSensitive.checked=t)}getWholeWords(){var t,i;return(i=(t=this.wholeWords)===null||t===void 0?void 0:t.checked)!==null&&i!==void 0?i:!1}setWholeWords(t){this.wholeWords&&(this.wholeWords.checked=t)}getRegex(){var t,i;return(i=(t=this.regex)===null||t===void 0?void 0:t.checked)!==null&&i!==void 0?i:!1}setRegex(t){this.regex&&(this.regex.checked=t,this.validate())}focusOnCaseSensitive(){var t;(t=this.caseSensitive)===null||t===void 0||t.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()}showMessage(t){this.inputBox.showMessage(t)}clearMessage(){this.inputBox.hideMessage()}}e.FindInput=m}),define(J[543],ee([1,0,7,142,213,67,29,6,515,247]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=void 0;const h=_.localize(0,null),m=_.localize(1,null);class n extends k.Toggle{constructor(s){super({icon:w.Codicon.preserveCase,title:m+s.appendTitle,isChecked:s.isChecked,inputActiveOptionBorder:s.inputActiveOptionBorder,inputActiveOptionForeground:s.inputActiveOptionForeground,inputActiveOptionBackground:s.inputActiveOptionBackground})}}class t extends D.Widget{constructor(s,r,c,g){super(),this._showOptionButtons=c,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new b.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new b.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new b.Emitter),this._onInput=this._register(new b.Emitter),this._onKeyUp=this._register(new b.Emitter),this._onPreserveCaseKeyDown=this._register(new b.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=r,this.placeholder=g.placeholder||"",this.validation=g.validation,this.label=g.label||h;const o=g.appendPreserveCaseLabel||"",l=g.history||[],a=!!g.flexibleHeight,d=!!g.flexibleWidth,u=g.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:l,showHistoryHint:g.showHistoryHint,flexibleHeight:a,flexibleWidth:d,flexibleMaxHeight:u,inputBoxStyles:g.inputBoxStyles})),this.preserveCase=this._register(new n(Object.assign({appendTitle:o,isChecked:!1},g.toggleStyles))),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;const C=[this.preserveCase.domNode];this.onkeydown(this.domNode,v=>{if(v.equals(15)||v.equals(17)||v.equals(9)){const p=C.indexOf(document.activeElement);if(p>=0){let L=-1;v.equals(17)?L=(p+1)%C.length:v.equals(15)&&(p===0?L=C.length-1:L=p-1),v.equals(9)?(C[p].blur(),this.inputBox.focus()):L>=0&&C[L].focus(),S.EventHelper.stop(v,!0)}}});const f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.preserveCase.domNode),this.domNode.appendChild(f),s?.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(s){s?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(s){this.preserveCase.checked=s}focusOnPreserve(){this.preserveCase.focus()}validate(){var s;(s=this.inputBox)===null||s===void 0||s.validate()}set width(s){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=s+"px"}dispose(){super.dispose()}}e.ReplaceInput=t}),define(J[544],ee([1,0,46,56,7,44,66,69,143,281,77,41,12,29,32,113,2,17,9]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=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=/(&)?(&)([^\\s&])/g;var l;(function(L){L[L.Right=0]="Right",L[L.Left=1]="Left"})(l=e.Direction||(e.Direction={}));class a extends b.ActionBar{constructor(E,I,T,F){E.classList.add("monaco-menu-container"),E.setAttribute("role","presentation");const R=document.createElement("div");R.classList.add("monaco-menu"),R.setAttribute("role","presentation"),super(R,{orientation:1,actionViewItemProvider:A=>this.doGetActionViewItem(A,T,M),context:T.context,actionRunner:T.actionRunner,ariaLabel:T.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...g.isMacintosh||g.isLinux?[10]:[]],keyDown:!0}}),this.menuStyles=F,this.menuElement=R,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new c.DisposableStore),this.initializeOrUpdateStyleSheet(E,F),this._register(k.Gesture.addTarget(R)),(0,y.addDisposableListener)(R,y.EventType.KEY_DOWN,A=>{new D.StandardKeyboardEvent(A).equals(2)&&A.preventDefault()}),T.enableMnemonics&&this.menuDisposables.add((0,y.addDisposableListener)(R,y.EventType.KEY_DOWN,A=>{const P=A.key.toLocaleLowerCase();if(this.mnemonics.has(P)){y.EventHelper.stop(A,!0);const x=this.mnemonics.get(P);if(x.length===1&&(x[0]instanceof u&&x[0].container&&this.focusItemByElement(x[0].container),x[0].onClick(A)),x.length>1){const W=x.shift();W&&W.container&&(this.focusItemByElement(W.container),x.push(W)),this.mnemonics.set(P,x)}}})),g.isLinux&&this._register((0,y.addDisposableListener)(R,y.EventType.KEY_DOWN,A=>{const P=new D.StandardKeyboardEvent(A);P.equals(14)||P.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),y.EventHelper.stop(A,!0)):(P.equals(13)||P.equals(12))&&(this.focusedItem=0,this.focusPrevious(),y.EventHelper.stop(A,!0))})),this._register((0,y.addDisposableListener)(this.domNode,y.EventType.MOUSE_OUT,A=>{const P=A.relatedTarget;(0,y.isAncestor)(P,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),A.stopPropagation())})),this._register((0,y.addDisposableListener)(this.actionsList,y.EventType.MOUSE_OVER,A=>{let P=A.target;if(!(!P||!(0,y.isAncestor)(P,this.actionsList)||P===this.actionsList)){for(;P.parentElement!==this.actionsList&&P.parentElement!==null;)P=P.parentElement;if(P.classList.contains("action-item")){const x=this.focusedItem;this.setFocusedItem(P),x!==this.focusedItem&&this.updateFocus()}}})),this._register(k.Gesture.addTarget(this.actionsList)),this._register((0,y.addDisposableListener)(this.actionsList,k.EventType.Tap,A=>{let P=A.initialTarget;if(!(!P||!(0,y.isAncestor)(P,this.actionsList)||P===this.actionsList)){for(;P.parentElement!==this.actionsList&&P.parentElement!==null;)P=P.parentElement;if(P.classList.contains("action-item")){const x=this.focusedItem;this.setFocusedItem(P),x!==this.focusedItem&&this.updateFocus()}}}));const M={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new m.DomScrollableElement(R,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const N=this.scrollableElement.getDomNode();N.style.position="",this.styleScrollElement(N,F),this._register((0,y.addDisposableListener)(R,k.EventType.Change,A=>{y.EventHelper.stop(A,!0);const P=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:P-A.translationY})})),this._register((0,y.addDisposableListener)(N,y.EventType.MOUSE_UP,A=>{A.preventDefault()})),R.style.maxHeight=`${Math.max(10,window.innerHeight-E.getBoundingClientRect().top-35)}px`,I=I.filter(A=>{var P;return!((P=T.submenuIds)===null||P===void 0)&&P.has(A.id)?(console.warn(`Found submenu cycle: ${A.id}`),!1):!0}),this.push(I,{icon:!0,label:!0,isMenu:!0}),E.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(A=>!(A instanceof C)).forEach((A,P,x)=>{A.updatePositionInSet(P+1,x.length)})}initializeOrUpdateStyleSheet(E,I){this.styleSheet||((0,y.isInShadowDOM)(E)?this.styleSheet=(0,y.createStyleSheet)(E):(a.globalStyleSheet||(a.globalStyleSheet=(0,y.createStyleSheet)()),this.styleSheet=a.globalStyleSheet)),this.styleSheet.textContent=p(I,(0,y.isInShadowDOM)(E))}styleScrollElement(E,I){var T,F;const R=(T=I.foregroundColor)!==null&&T!==void 0?T:"",M=(F=I.backgroundColor)!==null&&F!==void 0?F:"",N=I.borderColor?`1px solid ${I.borderColor}`:"",A="5px",P=I.shadowColor?`0 2px 8px ${I.shadowColor}`:"";E.style.outline=N,E.style.borderRadius=A,E.style.color=R,E.style.backgroundColor=M,E.style.boxShadow=P}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(E){const I=this.focusedItem;this.setFocusedItem(E),I!==this.focusedItem&&this.updateFocus()}setFocusedItem(E){for(let I=0;I<this.actionsList.children.length;I++){const T=this.actionsList.children[I];if(E===T){this.focusedItem=I;break}}}updateFocus(E){super.updateFocus(E,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(E,I,T){if(E instanceof n.Separator)return new C(I.context,E,{icon:!0},this.menuStyles);if(E instanceof n.SubmenuAction){const F=new u(E,E.actions,T,Object.assign(Object.assign({},I),{submenuIds:new Set([...I.submenuIds||[],E.id])}),this.menuStyles);if(I.enableMnemonics){const R=F.getMnemonic();if(R&&F.isEnabled()){let M=[];this.mnemonics.has(R)&&(M=this.mnemonics.get(R)),M.push(F),this.mnemonics.set(R,M)}}return F}else{const F={enableMnemonics:I.enableMnemonics,useEventAsContext:I.useEventAsContext};if(I.getKeyBinding){const M=I.getKeyBinding(E);if(M){const N=M.getLabel();N&&(F.keybinding=N)}}const R=new d(I.context,E,F,this.menuStyles);if(I.enableMnemonics){const M=R.getMnemonic();if(M&&R.isEnabled()){let N=[];this.mnemonics.has(M)&&(N=this.mnemonics.get(M)),N.push(R),this.mnemonics.set(M,N)}}return R}}}e.Menu=a;class d extends _.BaseActionViewItem{constructor(E,I,T,F){if(T.isMenu=!0,super(I,I,T),this.menuStyle=F,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){const R=this.action.label;if(R){const M=e.MENU_MNEMONIC_REGEX.exec(R);M&&(this.mnemonic=(M[1]?M[1]:M[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new t.RunOnceScheduler(()=>{this.element&&(this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_UP,R=>{if(y.EventHelper.stop(R,!0),S.isFirefox){if(new w.StandardMouseEvent(R).rightButton)return;this.onClick(R)}else setTimeout(()=>{this.onClick(R)},0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.CONTEXT_MENU,R=>{y.EventHelper.stop(R,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(E){super.render(E),this.element&&(this.container=E,this.item=(0,y.append)(this.element,(0,y.$)("a.action-menu-item")),this._action.id===n.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,y.append)(this.item,(0,y.$)("span.menu-item-check"+s.ThemeIcon.asCSSSelector(i.Codicon.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,y.append)(this.item,(0,y.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,y.append)(this.item,(0,y.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var E;super.focus(),(E=this.item)===null||E===void 0||E.focus(),this.applyStyle()}updatePositionInSet(E,I){this.item&&(this.item.setAttribute("aria-posinset",`${E}`),this.item.setAttribute("aria-setsize",`${I}`))}updateLabel(){var E;if(this.label&&this.options.label){(0,y.clearNode)(this.label);let I=(0,r.stripIcons)(this.action.label);if(I){const T=f(I);this.options.enableMnemonics||(I=T),this.label.setAttribute("aria-label",T.replace(/&&/g,"&"));const F=e.MENU_MNEMONIC_REGEX.exec(I);if(F){I=o.escape(I),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let R=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(I);for(;R&&R[1];)R=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(I);const M=N=>N.replace(/&&/g,"&");R?this.label.append(o.ltrim(M(I.substr(0,R.index))," "),(0,y.$)("u",{"aria-hidden":"true"},R[3]),o.rtrim(M(I.substr(R.index+R[0].length))," ")):this.label.innerText=M(I).trim(),(E=this.item)===null||E===void 0||E.setAttribute("aria-keyshortcuts",(F[1]?F[1]:F[3]).toLocaleLowerCase())}else this.label.innerText=I.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.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.action.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(){if(!this.item)return;const E=this.action.checked;this.item.classList.toggle("checked",!!E),E!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",E?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const E=this.element&&this.element.classList.contains("focused"),I=E&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,T=E&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,F=E&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",R=E&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=I??"",this.item.style.backgroundColor=T??"",this.item.style.outline=F,this.item.style.outlineOffset=R),this.check&&(this.check.style.color=I??"")}}class u extends d{constructor(E,I,T,F,R){super(E,E,F,R),this.submenuActions=I,this.parentData=T,this.submenuOptions=F,this.mysubmenu=null,this.submenuDisposables=this._register(new c.DisposableStore),this.mouseOver=!1,this.expandDirection=F&&F.expandDirection!==void 0?F.expandDirection:l.Right,this.showScheduler=new t.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new t.RunOnceScheduler(()=>{this.element&&!(0,y.isAncestor)((0,y.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(E){super.render(E),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=(0,y.append)(this.item,(0,y.$)("span.submenu-indicator"+s.ThemeIcon.asCSSSelector(i.Codicon.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_UP,I=>{const T=new D.StandardKeyboardEvent(I);(T.equals(17)||T.equals(3))&&(y.EventHelper.stop(I,!0),this.createSubmenu(!0))})),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_DOWN,I=>{const T=new D.StandardKeyboardEvent(I);(0,y.getActiveElement)()===this.item&&(T.equals(17)||T.equals(3))&&y.EventHelper.stop(I,!0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_OVER,I=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_LEAVE,I=>{this.mouseOver=!1})),this._register((0,y.addDisposableListener)(this.element,y.EventType.FOCUS_OUT,I=>{this.element&&!(0,y.isAncestor)((0,y.getActiveElement)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(E){y.EventHelper.stop(E,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(E){if(this.parentData.submenu&&(E||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(E,I,T,F){const R={top:0,left:0};return R.left=(0,h.layout)(E.width,I.width,{position:F===l.Right?0:1,offset:T.left,size:T.width}),R.left>=T.left&&R.left<T.left+T.width&&(T.left+10+I.width<=E.width&&(R.left=T.left+10),T.top+=10,T.height=0),R.top=(0,h.layout)(E.height,I.height,{position:0,offset:T.top,size:0}),R.top+I.height===T.top&&R.top+T.height+I.height<=E.height&&(R.top+=T.height),R}createSubmenu(E=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,y.append)(this.element,(0,y.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const I=getComputedStyle(this.parentData.parent.domNode),T=parseFloat(I.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 a(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new n.EmptySubmenuAction],this.submenuOptions,this.menuStyle);const F=this.element.getBoundingClientRect(),R={top:F.top-T,left:F.left,height:F.height+2*T,width:F.width},M=this.submenuContainer.getBoundingClientRect(),{top:N,left:A}=this.calculateSubmenuMenuLayout(new y.Dimension(window.innerWidth,window.innerHeight),y.Dimension.lift(M),R,this.expandDirection);this.submenuContainer.style.left=`${A-M.left}px`,this.submenuContainer.style.top=`${N-M.top}px`,this.submenuDisposables.add((0,y.addDisposableListener)(this.submenuContainer,y.EventType.KEY_UP,P=>{new D.StandardKeyboardEvent(P).equals(15)&&(y.EventHelper.stop(P,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,y.addDisposableListener)(this.submenuContainer,y.EventType.KEY_DOWN,P=>{new D.StandardKeyboardEvent(P).equals(15)&&y.EventHelper.stop(P,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(E),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(E){var I;this.item&&((I=this.item)===null||I===void 0||I.setAttribute("aria-expanded",E))}applyStyle(){super.applyStyle();const I=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=I??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class C extends _.ActionViewItem{constructor(E,I,T,F){super(E,I,T),this.menuStyles=F}render(E){super.render(E),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function f(L){const E=e.MENU_MNEMONIC_REGEX,I=E.exec(L);if(!I)return L;const T=!I[1];return L.replace(E,T?"$2$3":"").trim()}e.cleanMnemonic=f;function v(L){const E=(0,i.getCodiconFontCharacters)()[L.id];return`.codicon-${L.id}:before { content: \'\\\\${E.toString(16)}\'; }`}e.formatRule=v;function p(L,E){let I=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${v(i.Codicon.menuSelection)}\n${v(i.Codicon.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = \\u221A\\u03C6 */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(E){I+=`\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t`;const T=L.scrollbarShadow;T&&(I+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${T} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${T} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${T} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const F=L.scrollbarSliderBackground;F&&(I+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${F};\n\t\t\t\t}\n\t\t\t`);const R=L.scrollbarSliderHoverBackground;R&&(I+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${R};\n\t\t\t\t}\n\t\t\t`);const M=L.scrollbarSliderActiveBackground;M&&(I+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${M};\n\t\t\t\t}\n\t\t\t`)}return I}}),define(J[545],ee([1,0,69,290,41,29,32,6,2,18,520,380]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class n extends _.Disposable{constructor(s,r,c={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new b.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new _.DisposableStore,this.options=c,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new t(()=>{var g;return(g=this.toggleMenuActionViewItem)===null||g===void 0?void 0:g.show()},c.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",s.appendChild(this.element),this.actionBar=this._register(new S.ActionBar(this.element,{orientation:c.orientation,ariaLabel:c.ariaLabel,actionRunner:c.actionRunner,allowContextMenu:c.allowContextMenu,actionViewItemProvider:(g,o)=>{var l;if(g.id===t.ID)return this.toggleMenuActionViewItem=new k.DropdownMenuActionViewItem(g,g.menuActions,r,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:w.ThemeIcon.asClassNameArray((l=c.moreIcon)!==null&&l!==void 0?l:D.Codicon.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(c.actionViewItemProvider){const a=c.actionViewItemProvider(g,o);if(a)return a}if(g instanceof y.SubmenuAction){const a=new k.DropdownMenuActionViewItem(g,g.actions,r,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:g.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(s){this.actionBar.actionRunner=s}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(s){return this.actionBar.getAction(s)}setActions(s,r){this.clear();const c=s?s.slice(0):[];this.hasSecondaryActions=!!(r&&r.length>0),this.hasSecondaryActions&&r&&(this.toggleMenuAction.menuActions=r.slice(0),c.push(this.toggleMenuAction)),c.forEach(g=>{this.actionBar.push(g,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(g)})})}getKeybindingLabel(s){var r,c;const g=this.lookupKeybindings?(c=(r=this.options).getKeyBinding)===null||c===void 0?void 0:c.call(r,s):void 0;return(0,h.withNullAsUndefined)(g?.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}e.ToolBar=n;class t extends y.Action{constructor(s,r){r=r||m.localize(0,null),super(t.ID,r,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=s}run(){return Ee(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(s){this._menuActions=s}}t.ID="toolbar.toggle.more",e.ToggleMenuAction=t}),define(J[173],ee([1,0,7,76,44,69,214,213,210,108,142,204,129,41,16,12,29,32,352,6,63,2,132,18,521,381]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.TreeFindMatchType=e.TreeFindMode=e.FuzzyToggle=e.ModeToggle=e.RenderIndentGuides=e.ComposedTreeDelegate=void 0;class v extends _.ElementsDragAndDropData{constructor(B){super(B.elements.map(j=>j.element)),this.data=B}}function p(H){return H instanceof _.ElementsDragAndDropData?new v(H):H}class L{constructor(B,j){this.modelProvider=B,this.dnd=j,this.autoExpandDisposable=d.Disposable.None}getDragURI(B){return this.dnd.getDragURI(B.element)}getDragLabel(B,j){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(B.map(G=>G.element),j)}onDragStart(B,j){var G,Y;(Y=(G=this.dnd).onDragStart)===null||Y===void 0||Y.call(G,p(B),j)}onDragOver(B,j,G,Y,ne=!0){const de=this.dnd.onDragOver(p(B),j&&j.element,G,Y),he=this.autoExpandNode!==j;if(he&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=j),typeof j>"u")return de;if(he&&typeof de!="boolean"&&de.autoExpand&&(this.autoExpandDisposable=(0,r.disposableTimeout)(()=>{const K=this.modelProvider(),ie=K.getNodeLocation(j);K.isCollapsed(ie)&&K.setCollapsed(ie,!1),this.autoExpandNode=void 0},500)),typeof de=="boolean"||!de.accept||typeof de.bubble>"u"||de.feedback){if(!ne){const K=typeof de=="boolean"?de:de.accept,ie=typeof de=="boolean"?void 0:de.effect;return{accept:K,effect:ie,feedback:[G]}}return de}if(de.bubble===1){const K=this.modelProvider(),ie=K.getNodeLocation(j),X=K.getParentNodeLocation(ie),Z=K.getNode(X),ue=X&&K.getListIndex(X);return this.onDragOver(B,Z,ue,Y,!1)}const oe=this.modelProvider(),ce=oe.getNodeLocation(j),z=oe.getListIndex(ce),V=oe.getListRenderCount(ce);return Object.assign(Object.assign({},de),{feedback:(0,s.range)(z,z+V)})}drop(B,j,G,Y){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(p(B),j&&j.element,G,Y)}onDragEnd(B){var j,G;(G=(j=this.dnd).onDragEnd)===null||G===void 0||G.call(j,B)}}function E(H,B){return B&&Object.assign(Object.assign({},B),{identityProvider:B.identityProvider&&{getId(j){return B.identityProvider.getId(j.element)}},dnd:B.dnd&&new L(H,B.dnd),multipleSelectionController:B.multipleSelectionController&&{isSelectionSingleChangeEvent(j){return B.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},j),{element:j.element}))},isSelectionRangeChangeEvent(j){return B.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},j),{element:j.element}))}},accessibilityProvider:B.accessibilityProvider&&Object.assign(Object.assign({},B.accessibilityProvider),{getSetSize(j){const G=H(),Y=G.getNodeLocation(j),ne=G.getParentNodeLocation(Y);return G.getNode(ne).visibleChildrenCount},getPosInSet(j){return j.visibleChildIndex+1},isChecked:B.accessibilityProvider&&B.accessibilityProvider.isChecked?j=>B.accessibilityProvider.isChecked(j.element):void 0,getRole:B.accessibilityProvider&&B.accessibilityProvider.getRole?j=>B.accessibilityProvider.getRole(j.element):()=>"treeitem",getAriaLabel(j){return B.accessibilityProvider.getAriaLabel(j.element)},getWidgetAriaLabel(){return B.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:B.accessibilityProvider&&B.accessibilityProvider.getWidgetRole?()=>B.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:B.accessibilityProvider&&B.accessibilityProvider.getAriaLevel?j=>B.accessibilityProvider.getAriaLevel(j.element):j=>j.depth,getActiveDescendantId:B.accessibilityProvider.getActiveDescendantId&&(j=>B.accessibilityProvider.getActiveDescendantId(j.element))}),keyboardNavigationLabelProvider:B.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},B.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(j){return B.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(j.element)}})})}class I{constructor(B){this.delegate=B}getHeight(B){return this.delegate.getHeight(B.element)}getTemplateId(B){return this.delegate.getTemplateId(B.element)}hasDynamicHeight(B){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(B.element)}setDynamicHeight(B,j){var G,Y;(Y=(G=this.delegate).setDynamicHeight)===null||Y===void 0||Y.call(G,B.element,j)}}e.ComposedTreeDelegate=I;var T;(function(H){H.None="none",H.OnHover="onHover",H.Always="always"})(T=e.RenderIndentGuides||(e.RenderIndentGuides={}));class F{get elements(){return this._elements}constructor(B,j=[]){this._elements=j,this.disposables=new d.DisposableStore,this.onDidChange=l.Event.forEach(B,G=>this._elements=G,this.disposables)}dispose(){this.disposables.dispose()}}class R{constructor(B,j,G,Y,ne,de={}){var he;this.renderer=B,this.modelProvider=j,this.activeNodes=Y,this.renderedIndentGuides=ne,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=R.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=d.Disposable.None,this.disposables=new d.DisposableStore,this.templateId=B.templateId,this.updateOptions(de),l.Event.map(G,oe=>oe.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(he=B.onDidChangeTwistieState)===null||he===void 0||he.call(B,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(B={}){if(typeof B.indent<"u"){const j=(0,u.clamp)(B.indent,0,40);if(j!==this.indent){this.indent=j;for(const[G,Y]of this.renderedNodes)this.renderTreeElement(G,Y)}}if(typeof B.renderIndentGuides<"u"){const j=B.renderIndentGuides!==T.None;if(j!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=j;for(const[G,Y]of this.renderedNodes)this._renderIndentGuides(G,Y);if(this.indentGuidesDisposable.dispose(),j){const G=new d.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,G),this.indentGuidesDisposable=G,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof B.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=B.hideTwistiesOfChildlessElements)}renderTemplate(B){const j=(0,S.append)(B,(0,S.$)(".monaco-tl-row")),G=(0,S.append)(j,(0,S.$)(".monaco-tl-indent")),Y=(0,S.append)(j,(0,S.$)(".monaco-tl-twistie")),ne=(0,S.append)(j,(0,S.$)(".monaco-tl-contents")),de=this.renderer.renderTemplate(ne);return{container:B,indent:G,twistie:Y,indentGuidesDisposable:d.Disposable.None,templateData:de}}renderElement(B,j,G,Y){this.renderedNodes.set(B,G),this.renderedElements.set(B.element,B),this.renderTreeElement(B,G),this.renderer.renderElement(B,j,G.templateData,Y)}disposeElement(B,j,G,Y){var ne,de;G.indentGuidesDisposable.dispose(),(de=(ne=this.renderer).disposeElement)===null||de===void 0||de.call(ne,B,j,G.templateData,Y),typeof Y=="number"&&(this.renderedNodes.delete(B),this.renderedElements.delete(B.element))}disposeTemplate(B){this.renderer.disposeTemplate(B.templateData)}onDidChangeTwistieState(B){const j=this.renderedElements.get(B);j&&this.onDidChangeNodeTwistieState(j)}onDidChangeNodeTwistieState(B){const j=this.renderedNodes.get(B);j&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(B,j))}renderTreeElement(B,j){const G=R.DefaultIndent+(B.depth-1)*this.indent;j.twistie.style.paddingLeft=`${G}px`,j.indent.style.width=`${G+this.indent-16}px`,B.collapsible?j.container.setAttribute("aria-expanded",String(!B.collapsed)):j.container.removeAttribute("aria-expanded"),j.twistie.classList.remove(...g.ThemeIcon.asClassNameArray(c.Codicon.treeItemExpanded));let Y=!1;this.renderer.renderTwistie&&(Y=this.renderer.renderTwistie(B.element,j.twistie)),B.collapsible&&(!this.hideTwistiesOfChildlessElements||B.visibleChildrenCount>0)?(Y||j.twistie.classList.add(...g.ThemeIcon.asClassNameArray(c.Codicon.treeItemExpanded)),j.twistie.classList.add("collapsible"),j.twistie.classList.toggle("collapsed",B.collapsed)):j.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(B,j)}_renderIndentGuides(B,j){if((0,S.clearNode)(j.indent),j.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const G=new d.DisposableStore,Y=this.modelProvider();for(;;){const ne=Y.getNodeLocation(B),de=Y.getParentNodeLocation(ne);if(!de)break;const he=Y.getNode(de),oe=(0,S.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(he)&&oe.classList.add("active"),j.indent.childElementCount===0?j.indent.appendChild(oe):j.indent.insertBefore(oe,j.indent.firstElementChild),this.renderedIndentGuides.add(he,oe),G.add((0,d.toDisposable)(()=>this.renderedIndentGuides.delete(he,oe))),B=he}j.indentGuidesDisposable=G}_onDidChangeActiveNodes(B){if(!this.shouldRenderIndentGuides)return;const j=new Set,G=this.modelProvider();B.forEach(Y=>{const ne=G.getNodeLocation(Y);try{const de=G.getParentNodeLocation(ne);Y.collapsible&&Y.children.length>0&&!Y.collapsed?j.add(Y):de&&j.add(G.getNode(de))}catch{}}),this.activeIndentNodes.forEach(Y=>{j.has(Y)||this.renderedIndentGuides.forEach(Y,ne=>ne.classList.remove("active"))}),j.forEach(Y=>{this.activeIndentNodes.has(Y)||this.renderedIndentGuides.forEach(Y,ne=>ne.classList.add("active"))}),this.activeIndentNodes=j}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,d.dispose)(this.disposables)}}R.DefaultIndent=8;class M{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(B,j,G){this.tree=B,this.keyboardNavigationLabelProvider=j,this._filter=G,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new d.DisposableStore,B.onWillRefilter(this.reset,this,this.disposables)}filter(B,j){let G=1;if(this._filter){const de=this._filter.filter(B,j);if(typeof de=="boolean"?G=de?1:0:(0,n.isFilterResult)(de)?G=(0,n.getVisibleState)(de.visibility):G=de,G===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:a.FuzzyScore.Default,visibility:G};const Y=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(B),ne=Array.isArray(Y)?Y:[Y];for(const de of ne){const he=de&&de.toString();if(typeof he>"u")return{data:a.FuzzyScore.Default,visibility:G};let oe;if(this.tree.findMatchType===W.Contiguous){const ce=he.toLowerCase().indexOf(this._lowercasePattern);if(ce>-1){oe=[Number.MAX_SAFE_INTEGER,0];for(let z=this._lowercasePattern.length;z>0;z--)oe.push(ce+z-1)}}else oe=(0,a.fuzzyScore)(this._pattern,this._lowercasePattern,0,he,he.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(oe)return this._matchCount++,ne.length===1?{data:oe,visibility:G}:{data:{label:he,score:oe},visibility:G}}return this.tree.findMode===x.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(B):2:{data:a.FuzzyScore.Default,visibility:G}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,d.dispose)(this.disposables)}}class N extends m.Toggle{constructor(B){var j;super({icon:c.Codicon.listFilter,title:(0,f.localize)(0,null),isChecked:(j=B.isChecked)!==null&&j!==void 0?j:!1,inputActiveOptionBorder:B.inputActiveOptionBorder,inputActiveOptionForeground:B.inputActiveOptionForeground,inputActiveOptionBackground:B.inputActiveOptionBackground})}}e.ModeToggle=N;class A extends m.Toggle{constructor(B){var j;super({icon:c.Codicon.searchFuzzy,title:(0,f.localize)(1,null),isChecked:(j=B.isChecked)!==null&&j!==void 0?j:!1,inputActiveOptionBorder:B.inputActiveOptionBorder,inputActiveOptionForeground:B.inputActiveOptionForeground,inputActiveOptionBackground:B.inputActiveOptionBackground})}}e.FuzzyToggle=A;const P={inputBoxStyles:b.unthemedInboxStyles,toggleStyles:m.unthemedToggleStyles,listFilterWidgetBackground:void 0,listFilterWidgetNoMatchesOutline:void 0,listFilterWidgetOutline:void 0,listFilterWidgetShadow:void 0};var x;(function(H){H[H.Highlight=0]="Highlight",H[H.Filter=1]="Filter"})(x=e.TreeFindMode||(e.TreeFindMode={}));var W;(function(H){H[H.Fuzzy=0]="Fuzzy",H[H.Contiguous=1]="Contiguous"})(W=e.TreeFindMatchType||(e.TreeFindMatchType={}));class U extends d.Disposable{set mode(B){this.modeToggle.checked=B===x.Filter,this.findInput.inputBox.setPlaceHolder(B===x.Filter?(0,f.localize)(2,null):(0,f.localize)(3,null))}set matchType(B){this.matchTypeToggle.checked=B===W.Fuzzy}constructor(B,j,G,Y,ne,de){var he;super(),this.tree=j,this.elements=(0,S.h)(".monaco-tree-type-filter",[(0,S.h)(".monaco-tree-type-filter-grab.codicon.codicon-debug-gripper@grab",{tabIndex:0}),(0,S.h)(".monaco-tree-type-filter-input@findInput"),(0,S.h)(".monaco-tree-type-filter-actionbar@actionbar")]),this.width=0,this.right=0,this.top=0,this._onDidDisable=new l.Emitter,B.appendChild(this.elements.root),this._register((0,d.toDisposable)(()=>B.removeChild(this.elements.root)));const oe=(he=de?.styles)!==null&&he!==void 0?he:P;oe.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=oe.listFilterWidgetBackground),oe.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${oe.listFilterWidgetShadow}`),this.modeToggle=this._register(new N(Object.assign(Object.assign({},oe.toggleStyles),{isChecked:Y===x.Filter}))),this.matchTypeToggle=this._register(new A(Object.assign(Object.assign({},oe.toggleStyles),{isChecked:ne===W.Fuzzy}))),this.onDidChangeMode=l.Event.map(this.modeToggle.onChange,()=>this.modeToggle.checked?x.Filter:x.Highlight,this._store),this.onDidChangeMatchType=l.Event.map(this.matchTypeToggle.onChange,()=>this.matchTypeToggle.checked?W.Fuzzy:W.Contiguous,this._store),this.findInput=this._register(new w.FindInput(this.elements.findInput,G,{label:(0,f.localize)(4,null),additionalToggles:[this.modeToggle,this.matchTypeToggle],showCommonFindToggles:!1,inputBoxStyles:oe.inputBoxStyles,toggleStyles:oe.toggleStyles,history:de?.history})),this.actionbar=this._register(new D.ActionBar(this.elements.actionbar)),this.mode=Y;const ce=this._register(new k.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),z=this._register(l.Event.chain(ce.event)).map(X=>new y.StandardKeyboardEvent(X)).event;this._register(z(X=>{if(X.equals(3)){X.preventDefault(),X.stopPropagation(),this.findInput.inputBox.addToHistory(),this.tree.domFocus();return}if(X.equals(18)){X.preventDefault(),X.stopPropagation(),this.findInput.inputBox.isAtLastInHistory()||this.findInput.inputBox.isNowhereInHistory()?(this.findInput.inputBox.addToHistory(),this.tree.domFocus()):this.findInput.inputBox.showNextValue();return}if(X.equals(16)){X.preventDefault(),X.stopPropagation(),this.findInput.inputBox.showPreviousValue();return}}));const V=this._register(new i.Action("close",(0,f.localize)(5,null),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push(V,{icon:!0,label:!1});const K=this._register(new k.DomEmitter(this.elements.grab,"mousedown"));this._register(K.event(X=>{const Z=new d.DisposableStore,ue=Z.add(new k.DomEmitter(window,"mousemove")),me=Z.add(new k.DomEmitter(window,"mouseup")),Ce=this.right,_e=X.pageX,we=this.top,ye=X.pageY;this.elements.grab.classList.add("grabbing");const ke=this.elements.root.style.transition;this.elements.root.style.transition="unset";const De=ge=>{const pe=ge.pageX-_e;this.right=Ce-pe;const ae=ge.pageY-ye;this.top=we+ae,this.layout()};Z.add(ue.event(De)),Z.add(me.event(ge=>{De(ge),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=ke,Z.dispose()}))}));const ie=this._register(l.Event.chain(this._register(new k.DomEmitter(this.elements.grab,"keydown")).event)).map(X=>new y.StandardKeyboardEvent(X)).event;this._register(ie(X=>{let Z,ue;if(X.keyCode===15?Z=Number.POSITIVE_INFINITY:X.keyCode===17?Z=0:X.keyCode===10&&(Z=this.right===0?Number.POSITIVE_INFINITY:0),X.keyCode===16?ue=0:X.keyCode===18&&(ue=Number.POSITIVE_INFINITY),Z!==void 0&&(X.preventDefault(),X.stopPropagation(),this.right=Z,this.layout()),ue!==void 0){X.preventDefault(),X.stopPropagation(),this.top=ue;const me=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=me},0)}})),this.onDidChangeValue=this.findInput.onDidChange}layout(B=this.width){this.width=B,this.right=(0,u.clamp)(this.right,0,Math.max(0,B-212)),this.elements.root.style.right=`${this.right}px`,this.top=(0,u.clamp)(this.top,0,24),this.elements.root.style.top=`${this.top}px`}showMessage(B){this.findInput.showMessage(B)}clearMessage(){this.findInput.clearMessage()}dispose(){const B=Object.create(null,{dispose:{get:()=>super.dispose}});return Ee(this,void 0,void 0,function*(){this._onDidDisable.fire(),this.elements.root.classList.add("disabled"),yield(0,r.timeout)(300),B.dispose.call(this)})}}class O{get pattern(){return this._pattern}get mode(){return this._mode}set mode(B){B!==this._mode&&(this._mode=B,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(B))}get matchType(){return this._matchType}set matchType(B){B!==this._matchType&&(this._matchType=B,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(B))}constructor(B,j,G,Y,ne,de={}){var he,oe;this.tree=B,this.view=G,this.filter=Y,this.contextViewProvider=ne,this.options=de,this._pattern="",this.width=0,this._onDidChangeMode=new l.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new l.Emitter,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new l.Emitter,this._onDidChangeOpenState=new l.Emitter,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new d.DisposableStore,this.disposables=new d.DisposableStore,this._mode=(he=B.options.defaultFindMode)!==null&&he!==void 0?he:x.Highlight,this._matchType=(oe=B.options.defaultFindMatchType)!==null&&oe!==void 0?oe:W.Fuzzy,j.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(B={}){B.defaultFindMode!==void 0&&(this.mode=B.defaultFindMode),B.defaultFindMatchType!==void 0&&(this.matchType=B.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var B,j,G,Y;const ne=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&ne?!((B=this.tree.options.showNotFoundMessage)!==null&&B!==void 0)||B?(j=this.widget)===null||j===void 0||j.showMessage({type:2,content:(0,f.localize)(6,null)}):(G=this.widget)===null||G===void 0||G.showMessage({type:2}):(Y=this.widget)===null||Y===void 0||Y.clearMessage()}shouldAllowFocus(B){return!this.widget||!this.pattern||this._mode===x.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!a.FuzzyScore.isDefault(B.filterData)}layout(B){var j;this.width=B,(j=this.widget)===null||j===void 0||j.layout(B)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function $(H){let B=t.TreeMouseEventTarget.Unknown;return(0,S.hasParentWithClass)(H.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?B=t.TreeMouseEventTarget.Twistie:(0,S.hasParentWithClass)(H.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?B=t.TreeMouseEventTarget.Element:(0,S.hasParentWithClass)(H.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(B=t.TreeMouseEventTarget.Filter),{browserEvent:H.browserEvent,element:H.element?H.element.element:null,target:B}}function Q(H,B){B(H),H.children.forEach(j=>Q(j,B))}class se{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(B,j){this.getFirstViewElementWithTrait=B,this.identityProvider=j,this.nodes=[],this._onDidChange=new l.Emitter,this.onDidChange=this._onDidChange.event}set(B,j){!j?.__forceEvent&&(0,s.equals)(this.nodes,B)||this._set(B,!1,j)}_set(B,j,G){if(this.nodes=[...B],this.elements=void 0,this._nodeSet=void 0,!j){const Y=this;this._onDidChange.fire({get elements(){return Y.get()},browserEvent:G})}}get(){return this.elements||(this.elements=this.nodes.map(B=>B.element)),[...this.elements]}getNodes(){return this.nodes}has(B){return this.nodeSet.has(B)}onDidModelSplice({insertedNodes:B,deletedNodes:j}){if(!this.identityProvider){const oe=this.createNodeSet(),ce=z=>oe.delete(z);j.forEach(z=>Q(z,ce)),this.set([...oe.values()]);return}const G=new Set,Y=oe=>G.add(this.identityProvider.getId(oe.element).toString());j.forEach(oe=>Q(oe,Y));const ne=new Map,de=oe=>ne.set(this.identityProvider.getId(oe.element).toString(),oe);B.forEach(oe=>Q(oe,de));const he=[];for(const oe of this.nodes){const ce=this.identityProvider.getId(oe.element).toString();if(!G.has(ce))he.push(oe);else{const V=ne.get(ce);V&&he.push(V)}}if(this.nodes.length>0&&he.length===0){const oe=this.getFirstViewElementWithTrait();oe&&he.push(oe)}this._set(he,!0)}createNodeSet(){const B=new Set;for(const j of this.nodes)B.add(j);return B}}class le extends h.MouseController{constructor(B,j){super(B),this.tree=j}onViewPointer(B){if((0,h.isButton)(B.browserEvent.target)||(0,h.isInputElement)(B.browserEvent.target)||(0,h.isMonacoEditor)(B.browserEvent.target))return;const j=B.element;if(!j)return super.onViewPointer(B);if(this.isSelectionRangeChangeEvent(B)||this.isSelectionSingleChangeEvent(B))return super.onViewPointer(B);const G=B.browserEvent.target,Y=G.classList.contains("monaco-tl-twistie")||G.classList.contains("monaco-icon-label")&&G.classList.contains("folder-icon")&&B.browserEvent.offsetX<16;let ne=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?ne=this.tree.expandOnlyOnTwistieClick(j.element):ne=!!this.tree.expandOnlyOnTwistieClick,ne&&!Y&&B.browserEvent.detail!==2)return super.onViewPointer(B);if(!this.tree.expandOnDoubleClick&&B.browserEvent.detail===2)return super.onViewPointer(B);if(j.collapsible){const de=this.tree.getNodeLocation(j),he=B.browserEvent.altKey;if(this.tree.setFocus([de]),this.tree.toggleCollapsed(de,he),ne&&Y)return}super.onViewPointer(B)}onDoubleClick(B){B.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(B)}}class te extends h.List{constructor(B,j,G,Y,ne,de,he,oe){super(B,j,G,Y,oe),this.focusTrait=ne,this.selectionTrait=de,this.anchorTrait=he}createMouseController(B){return new le(this,B.tree)}splice(B,j,G=[]){if(super.splice(B,j,G),G.length===0)return;const Y=[],ne=[];let de;G.forEach((he,oe)=>{this.focusTrait.has(he)&&Y.push(B+oe),this.selectionTrait.has(he)&&ne.push(B+oe),this.anchorTrait.has(he)&&(de=B+oe)}),Y.length>0&&super.setFocus((0,s.distinct)([...super.getFocus(),...Y])),ne.length>0&&super.setSelection((0,s.distinct)([...super.getSelection(),...ne])),typeof de=="number"&&super.setAnchor(de)}setFocus(B,j,G=!1){super.setFocus(B,j),G||this.focusTrait.set(B.map(Y=>this.element(Y)),j)}setSelection(B,j,G=!1){super.setSelection(B,j),G||this.selectionTrait.set(B.map(Y=>this.element(Y)),j)}setAnchor(B,j=!1){super.setAnchor(B),j||(typeof B>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(B)]))}}class re{get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return l.Event.filter(l.Event.map(this.view.onMouseDblClick,$),B=>B.target!==t.TreeMouseEventTarget.Filter)}get onPointer(){return l.Event.map(this.view.onPointer,$)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return l.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var B,j;return(j=(B=this.findController)===null||B===void 0?void 0:B.mode)!==null&&j!==void 0?j:x.Highlight}set findMode(B){this.findController&&(this.findController.mode=B)}get findMatchType(){var B,j;return(j=(B=this.findController)===null||B===void 0?void 0:B.matchType)!==null&&j!==void 0?j:W.Fuzzy}set findMatchType(B){this.findController&&(this.findController.matchType=B)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(B,j,G,Y,ne={}){var de;this._user=B,this._options=ne,this.eventBufferer=new l.EventBufferer,this.onDidChangeFindOpenState=l.Event.None,this.disposables=new d.DisposableStore,this._onWillRefilter=new l.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new l.Emitter;const he=new I(G),oe=new l.Relay,ce=new l.Relay,z=this.disposables.add(new F(ce.event)),V=new o.SetMap;this.renderers=Y.map(X=>new R(X,()=>this.model,oe.event,z,V,ne));for(const X of this.renderers)this.disposables.add(X);let K;ne.keyboardNavigationLabelProvider&&(K=new M(this,ne.keyboardNavigationLabelProvider,ne.filter),ne=Object.assign(Object.assign({},ne),{filter:K}),this.disposables.add(K)),this.focus=new se(()=>this.view.getFocusedElements()[0],ne.identityProvider),this.selection=new se(()=>this.view.getSelectedElements()[0],ne.identityProvider),this.anchor=new se(()=>this.view.getAnchorElement(),ne.identityProvider),this.view=new te(B,j,he,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},E(()=>this.model,ne)),{tree:this})),this.model=this.createModel(B,this.view,ne),oe.input=this.model.onDidChangeCollapseState;const ie=l.Event.forEach(this.model.onDidSplice,X=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(X),this.selection.onDidModelSplice(X)})},this.disposables);if(ie(()=>null,null,this.disposables),ce.input=l.Event.chain(l.Event.any(ie,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const X=new Set;for(const Z of this.focus.getNodes())X.add(Z);for(const Z of this.selection.getNodes())X.add(Z);return[...X.values()]}).event,ne.keyboardSupport!==!1){const X=l.Event.chain(this.view.onKeyDown).filter(Z=>!(0,h.isInputElement)(Z.target)).map(Z=>new y.StandardKeyboardEvent(Z));X.filter(Z=>Z.keyCode===15).on(this.onLeftArrow,this,this.disposables),X.filter(Z=>Z.keyCode===17).on(this.onRightArrow,this,this.disposables),X.filter(Z=>Z.keyCode===10).on(this.onSpace,this,this.disposables)}if((!((de=ne.findWidgetEnabled)!==null&&de!==void 0)||de)&&ne.keyboardNavigationLabelProvider&&ne.contextViewProvider){const X=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new O(this,this.model,this.view,K,ne.contextViewProvider,X),this.focusNavigationFilter=Z=>this.findController.shouldAllowFocus(Z),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=l.Event.None,this.onDidChangeFindMatchType=l.Event.None;this.styleElement=(0,S.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===T.Always)}updateOptions(B={}){var j;this._options=Object.assign(Object.assign({},this._options),B);for(const G of this.renderers)G.updateOptions(B);this.view.updateOptions(this._options),(j=this.findController)===null||j===void 0||j.updateOptions(B),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===T.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(B){this.view.scrollTop=B}domFocus(){this.view.domFocus()}layout(B,j){var G;this.view.layout(B,j),(0,C.isNumber)(j)&&((G=this.findController)===null||G===void 0||G.layout(j))}style(B){const j=`.${this.view.domId}`,G=[];B.treeIndentGuidesStroke&&(G.push(`.monaco-list${j}:hover .monaco-tl-indent > .indent-guide, .monaco-list${j}.always .monaco-tl-indent > .indent-guide { border-color: ${B.treeInactiveIndentGuidesStroke}; }`),G.push(`.monaco-list${j} .monaco-tl-indent > .indent-guide.active { border-color: ${B.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=G.join(`\n`),this.view.style(B)}getParentElement(B){const j=this.model.getParentNodeLocation(B);return this.model.getNode(j).element}getFirstElementChild(B){return this.model.getFirstElementChild(B)}getNode(B){return this.model.getNode(B)}getNodeLocation(B){return this.model.getNodeLocation(B)}collapse(B,j=!1){return this.model.setCollapsed(B,!0,j)}expand(B,j=!1){return this.model.setCollapsed(B,!1,j)}toggleCollapsed(B,j=!1){return this.model.setCollapsed(B,void 0,j)}isCollapsible(B){return this.model.isCollapsible(B)}setCollapsible(B,j){return this.model.setCollapsible(B,j)}isCollapsed(B){return this.model.isCollapsed(B)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(B,j){const G=B.map(ne=>this.model.getNode(ne));this.selection.set(G,j);const Y=B.map(ne=>this.model.getListIndex(ne)).filter(ne=>ne>-1);this.view.setSelection(Y,j,!0)}getSelection(){return this.selection.get()}setFocus(B,j){const G=B.map(ne=>this.model.getNode(ne));this.focus.set(G,j);const Y=B.map(ne=>this.model.getListIndex(ne)).filter(ne=>ne>-1);this.view.setFocus(Y,j,!0)}getFocus(){return this.focus.get()}reveal(B,j){this.model.expandTo(B);const G=this.model.getListIndex(B);G!==-1&&this.view.reveal(G,j)}onLeftArrow(B){B.preventDefault(),B.stopPropagation();const j=this.view.getFocusedElements();if(j.length===0)return;const G=j[0],Y=this.model.getNodeLocation(G);if(!this.model.setCollapsed(Y,!0)){const de=this.model.getParentNodeLocation(Y);if(!de)return;const he=this.model.getListIndex(de);this.view.reveal(he),this.view.setFocus([he])}}onRightArrow(B){B.preventDefault(),B.stopPropagation();const j=this.view.getFocusedElements();if(j.length===0)return;const G=j[0],Y=this.model.getNodeLocation(G);if(!this.model.setCollapsed(Y,!1)){if(!G.children.some(oe=>oe.visible))return;const[de]=this.view.getFocus(),he=de+1;this.view.reveal(he),this.view.setFocus([he])}}onSpace(B){B.preventDefault(),B.stopPropagation();const j=this.view.getFocusedElements();if(j.length===0)return;const G=j[0],Y=this.model.getNodeLocation(G),ne=B.browserEvent.altKey;this.model.setCollapsed(Y,void 0,ne)}dispose(){(0,d.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=re}),define(J[546],ee([1,0,173,205]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class y extends S.AbstractTree{constructor(w,b,_,h,m,n={}){super(w,b,_,h,n),this.user=w,this.dataSource=m,this.identityProvider=n.identityProvider}createModel(w,b,_){return new k.ObjectTreeModel(w,b,_)}}e.DataTree=y}),define(J[291],ee([1,0,173,531,205,99,54]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class b extends S.AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(t,i,s,r,c={}){super(t,i,s,r,c),this.user=t}setChildren(t,i=w.Iterable.empty(),s){this.model.setChildren(t,i,s)}rerender(t){if(t===void 0){this.view.rerender();return}this.model.rerender(t)}hasElement(t){return this.model.has(t)}createModel(t,i,s){return new y.ObjectTreeModel(t,i,s)}}e.ObjectTree=b;class _{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(t,i){this._compressedTreeNodeProvider=t,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(t){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(t)}}renderElement(t,i,s,r){const c=this.compressedTreeNodeProvider.getCompressedTreeNode(t.element);c.element.elements.length===1?(s.compressedTreeNode=void 0,this.renderer.renderElement(t,i,s.data,r)):(s.compressedTreeNode=c,this.renderer.renderCompressedElements(c,i,s.data,r))}disposeElement(t,i,s,r){var c,g,o,l;s.compressedTreeNode?(g=(c=this.renderer).disposeCompressedElements)===null||g===void 0||g.call(c,s.compressedTreeNode,i,s.data,r):(l=(o=this.renderer).disposeElement)===null||l===void 0||l.call(o,t,i,s.data,r)}disposeTemplate(t){this.renderer.disposeTemplate(t.data)}renderTwistie(t,i){return this.renderer.renderTwistie?this.renderer.renderTwistie(t,i):!1}}Ne([D.memoize],_.prototype,"compressedTreeNodeProvider",null);function h(n,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let s;try{s=n().getCompressedTreeNode(i)}catch{return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return s.element.elements.length===1?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(s.element.elements)}}})}class m extends b{constructor(t,i,s,r,c={}){const g=()=>this,o=r.map(l=>new _(g,l));super(t,i,s,o,h(g,c))}setChildren(t,i=w.Iterable.empty(),s){this.model.setChildren(t,i,s)}createModel(t,i,s){return new k.CompressibleObjectTreeModel(t,i,s)}updateOptions(t={}){super.updateOptions(t),typeof t.compressionEnabled<"u"&&this.model.setCompressionEnabled(t.compressionEnabled)}getCompressedTreeNode(t=null){return this.model.getCompressedTreeNode(t)}}e.CompressibleObjectTree=m}),define(J[547],ee([1,0,210,173,204,291,129,12,29,32,11,6,54,2,18]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function r(M){return Object.assign(Object.assign({},M),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function c(M,N){return N.parent?N.parent===M?!0:c(M,N.parent):!1}function g(M,N){return M===N||c(M,N)||c(N,M)}class o{get element(){return this.node.element.element}get children(){return this.node.children.map(N=>new o(N))}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}constructor(N){this.node=N}}class l{constructor(N,A,P){this.renderer=N,this.nodeMapper=A,this.onDidChangeTwistieState=P,this.renderedNodes=new Map,this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,A,P,x){this.renderer.renderElement(this.nodeMapper.map(N),A,P.templateData,x)}renderTwistie(N,A){return N.slow?(A.classList.add(...h.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(A.classList.remove(...h.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(N,A,P,x){var W,U;(U=(W=this.renderer).disposeElement)===null||U===void 0||U.call(W,this.nodeMapper.map(N),A,P.templateData,x)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear()}}function a(M){return{browserEvent:M.browserEvent,elements:M.elements.map(N=>N.element)}}function d(M){return{browserEvent:M.browserEvent,element:M.element&&M.element.element,target:M.target}}class u extends S.ElementsDragAndDropData{constructor(N){super(N.elements.map(A=>A.element)),this.data=N}}function C(M){return M instanceof S.ElementsDragAndDropData?new u(M):M}class f{constructor(N){this.dnd=N}getDragURI(N){return this.dnd.getDragURI(N.element)}getDragLabel(N,A){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(N.map(P=>P.element),A)}onDragStart(N,A){var P,x;(x=(P=this.dnd).onDragStart)===null||x===void 0||x.call(P,C(N),A)}onDragOver(N,A,P,x,W=!0){return this.dnd.onDragOver(C(N),A&&A.element,P,x)}drop(N,A,P,x){this.dnd.drop(C(N),A&&A.element,P,x)}onDragEnd(N){var A,P;(P=(A=this.dnd).onDragEnd)===null||P===void 0||P.call(A,N)}}function v(M){return M&&Object.assign(Object.assign({},M),{collapseByDefault:!0,identityProvider:M.identityProvider&&{getId(N){return M.identityProvider.getId(N.element)}},dnd:M.dnd&&new f(M.dnd),multipleSelectionController:M.multipleSelectionController&&{isSelectionSingleChangeEvent(N){return M.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},N),{element:N.element}))},isSelectionRangeChangeEvent(N){return M.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},N),{element:N.element}))}},accessibilityProvider:M.accessibilityProvider&&Object.assign(Object.assign({},M.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:M.accessibilityProvider.getRole?N=>M.accessibilityProvider.getRole(N.element):()=>"treeitem",isChecked:M.accessibilityProvider.isChecked?N=>{var A;return!!(!((A=M.accessibilityProvider)===null||A===void 0)&&A.isChecked(N.element))}:void 0,getAriaLabel(N){return M.accessibilityProvider.getAriaLabel(N.element)},getWidgetAriaLabel(){return M.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:M.accessibilityProvider.getWidgetRole?()=>M.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:M.accessibilityProvider.getAriaLevel&&(N=>M.accessibilityProvider.getAriaLevel(N.element)),getActiveDescendantId:M.accessibilityProvider.getActiveDescendantId&&(N=>M.accessibilityProvider.getActiveDescendantId(N.element))}),filter:M.filter&&{filter(N,A){return M.filter.filter(N.element,A)}},keyboardNavigationLabelProvider:M.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},M.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(N){return M.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(N.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof M.expandOnlyOnTwistieClick>"u"?void 0:typeof M.expandOnlyOnTwistieClick!="function"?M.expandOnlyOnTwistieClick:N=>M.expandOnlyOnTwistieClick(N.element),defaultFindVisibility:N=>N.hasChildren&&N.stale?1:typeof M.defaultFindVisibility=="number"?M.defaultFindVisibility:typeof M.defaultFindVisibility>"u"?2:M.defaultFindVisibility(N.element)})}function p(M,N){N(M),M.children.forEach(A=>p(A,N))}class L{get onDidChangeFocus(){return n.Event.map(this.tree.onDidChangeFocus,a)}get onDidChangeSelection(){return n.Event.map(this.tree.onDidChangeSelection,a)}get onMouseDblClick(){return n.Event.map(this.tree.onMouseDblClick,d)}get onPointer(){return n.Event.map(this.tree.onPointer,d)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(N,A,P,x,W,U={}){this.user=N,this.dataSource=W,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new n.Emitter,this._onDidChangeNodeSlowState=new n.Emitter,this.nodeMapper=new w.WeakMapper(O=>new o(O)),this.disposables=new i.DisposableStore,this.identityProvider=U.identityProvider,this.autoExpandSingleChildren=typeof U.autoExpandSingleChildren>"u"?!1:U.autoExpandSingleChildren,this.sorter=U.sorter,this.collapseByDefault=U.collapseByDefault,this.tree=this.createTree(N,A,P,x,U),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=r({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)}createTree(N,A,P,x,W){const U=new k.ComposedTreeDelegate(P),O=x.map(Q=>new l(Q,this.nodeMapper,this._onDidChangeNodeSlowState.event)),$=v(W)||{};return new D.ObjectTree(N,A,U,O,$)}updateOptions(N={}){this.tree.updateOptions(N)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(N){this.tree.scrollTop=N}domFocus(){this.tree.domFocus()}layout(N,A){this.tree.layout(N,A)}style(N){this.tree.style(N)}getInput(){return this.root.element}setInput(N,A){return Ee(this,void 0,void 0,function*(){this.refreshPromises.forEach(x=>x.cancel()),this.refreshPromises.clear(),this.root.element=N;const P=A&&{viewState:A,focus:[],selection:[]};yield this._updateChildren(N,!0,!1,P),P&&(this.tree.setFocus(P.focus),this.tree.setSelection(P.selection)),A&&typeof A.scrollTop=="number"&&(this.scrollTop=A.scrollTop)})}_updateChildren(N=this.root.element,A=!0,P=!1,x,W){return Ee(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new w.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield n.Event.toPromise(this._onDidRender.event));const U=this.getDataNode(N);if(yield this.refreshAndRenderNode(U,A,x,W),P)try{this.tree.rerender(U)}catch{}})}rerender(N){if(N===void 0||N===this.root.element){this.tree.rerender();return}const A=this.getDataNode(N);this.tree.rerender(A)}getNode(N=this.root.element){const A=this.getDataNode(N),P=this.tree.getNode(A===this.root?null:A);return this.nodeMapper.map(P)}collapse(N,A=!1){const P=this.getDataNode(N);return this.tree.collapse(P===this.root?null:P,A)}expand(N,A=!1){return Ee(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new w.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield n.Event.toPromise(this._onDidRender.event));const P=this.getDataNode(N);if(this.tree.hasElement(P)&&!this.tree.isCollapsible(P)||(P.refreshPromise&&(yield this.root.refreshPromise,yield n.Event.toPromise(this._onDidRender.event)),P!==this.root&&!P.refreshPromise&&!this.tree.isCollapsed(P)))return!1;const x=this.tree.expand(P===this.root?null:P,A);return P.refreshPromise&&(yield this.root.refreshPromise,yield n.Event.toPromise(this._onDidRender.event)),x})}setSelection(N,A){const P=N.map(x=>this.getDataNode(x));this.tree.setSelection(P,A)}getSelection(){return this.tree.getSelection().map(A=>A.element)}setFocus(N,A){const P=N.map(x=>this.getDataNode(x));this.tree.setFocus(P,A)}getFocus(){return this.tree.getFocus().map(A=>A.element)}reveal(N,A){this.tree.reveal(this.getDataNode(N),A)}getParentElement(N){const A=this.tree.getParentElement(this.getDataNode(N));return A&&A.element}getFirstElementChild(N=this.root.element){const A=this.getDataNode(N),P=this.tree.getFirstElementChild(A===this.root?null:A);return P&&P.element}getDataNode(N){const A=this.nodes.get(N===this.root.element?null:N);if(!A)throw new w.TreeError(this.user,`Data tree node not found: ${N}`);return A}refreshAndRenderNode(N,A,P,x){return Ee(this,void 0,void 0,function*(){yield this.refreshNode(N,A,P),this.render(N,P,x)})}refreshNode(N,A,P){return Ee(this,void 0,void 0,function*(){let x;if(this.subTreeRefreshPromises.forEach((W,U)=>{!x&&g(U,N)&&(x=W.then(()=>this.refreshNode(N,A,P)))}),x)return x;if(N!==this.root&&this.tree.getNode(N).collapsed){N.hasChildren=!!this.dataSource.hasChildren(N.element),N.stale=!0;return}return this.doRefreshSubTree(N,A,P)})}doRefreshSubTree(N,A,P){return Ee(this,void 0,void 0,function*(){let x;N.refreshPromise=new Promise(W=>x=W),this.subTreeRefreshPromises.set(N,N.refreshPromise),N.refreshPromise.finally(()=>{N.refreshPromise=void 0,this.subTreeRefreshPromises.delete(N)});try{const W=yield this.doRefreshNode(N,A,P);N.stale=!1,yield b.Promises.settled(W.map(U=>this.doRefreshSubTree(U,A,P)))}finally{x()}})}doRefreshNode(N,A,P){return Ee(this,void 0,void 0,function*(){N.hasChildren=!!this.dataSource.hasChildren(N.element);let x;if(!N.hasChildren)x=Promise.resolve(t.Iterable.empty());else{const W=this.doGetChildren(N);if((0,s.isIterable)(W))x=Promise.resolve(W);else{const U=(0,b.timeout)(800);U.then(()=>{N.slow=!0,this._onDidChangeNodeSlowState.fire(N)},O=>null),x=W.finally(()=>U.cancel())}}try{const W=yield x;return this.setChildren(N,W,A,P)}catch(W){if(N!==this.root&&this.tree.hasElement(N)&&this.tree.collapse(N),(0,m.isCancellationError)(W))return[];throw W}finally{N.slow&&(N.slow=!1,this._onDidChangeNodeSlowState.fire(N))}})}doGetChildren(N){let A=this.refreshPromises.get(N);if(A)return A;const P=this.dataSource.getChildren(N.element);return(0,s.isIterable)(P)?this.processChildren(P):(A=(0,b.createCancelablePromise)(()=>Ee(this,void 0,void 0,function*(){return this.processChildren(yield P)})),this.refreshPromises.set(N,A),A.finally(()=>{this.refreshPromises.delete(N)}))}_onDidChangeCollapseState({node:N,deep:A}){N.element!==null&&!N.collapsed&&N.element.stale&&(A?this.collapse(N.element.element):this.refreshAndRenderNode(N.element,!1).catch(m.onUnexpectedError))}setChildren(N,A,P,x){const W=[...A];if(N.children.length===0&&W.length===0)return[];const U=new Map,O=new Map;for(const se of N.children)if(U.set(se.element,se),this.identityProvider){const le=this.tree.isCollapsed(se);O.set(se.id,{node:se,collapsed:le})}const $=[],Q=W.map(se=>{const le=!!this.dataSource.hasChildren(se);if(!this.identityProvider){const B=r({element:se,parent:N,hasChildren:le});return le&&this.collapseByDefault&&!this.collapseByDefault(se)&&(B.collapsedByDefault=!1,$.push(B)),B}const te=this.identityProvider.getId(se).toString(),re=O.get(te);if(re){const B=re.node;return U.delete(B.element),this.nodes.delete(B.element),this.nodes.set(se,B),B.element=se,B.hasChildren=le,P?re.collapsed?(B.children.forEach(j=>p(j,G=>this.nodes.delete(G.element))),B.children.splice(0,B.children.length),B.stale=!0):$.push(B):le&&this.collapseByDefault&&!this.collapseByDefault(se)&&(B.collapsedByDefault=!1,$.push(B)),B}const H=r({element:se,parent:N,id:te,hasChildren:le});return x&&x.viewState.focus&&x.viewState.focus.indexOf(te)>-1&&x.focus.push(H),x&&x.viewState.selection&&x.viewState.selection.indexOf(te)>-1&&x.selection.push(H),x&&x.viewState.expanded&&x.viewState.expanded.indexOf(te)>-1?$.push(H):le&&this.collapseByDefault&&!this.collapseByDefault(se)&&(H.collapsedByDefault=!1,$.push(H)),H});for(const se of U.values())p(se,le=>this.nodes.delete(le.element));for(const se of Q)this.nodes.set(se.element,se);return N.children.splice(0,N.children.length,...Q),N!==this.root&&this.autoExpandSingleChildren&&Q.length===1&&$.length===0&&(Q[0].collapsedByDefault=!1,$.push(Q[0])),$}render(N,A,P){const x=N.children.map(U=>this.asTreeElement(U,A)),W=P&&Object.assign(Object.assign({},P),{diffIdentityProvider:P.diffIdentityProvider&&{getId(U){return P.diffIdentityProvider.getId(U.element)}}});this.tree.setChildren(N===this.root?null:N,x,W),N!==this.root&&this.tree.setCollapsible(N,N.hasChildren),this._onDidRender.fire()}asTreeElement(N,A){if(N.stale)return{element:N,collapsible:N.hasChildren,collapsed:!0};let P;return A&&A.viewState.expanded&&N.id&&A.viewState.expanded.indexOf(N.id)>-1?P=!1:P=N.collapsedByDefault,N.collapsedByDefault=void 0,{element:N,children:N.hasChildren?t.Iterable.map(N.children,x=>this.asTreeElement(x,A)):[],collapsible:N.hasChildren,collapsed:P}}processChildren(N){return this.sorter&&(N=[...N].sort(this.sorter.compare.bind(this.sorter))),N}dispose(){this.disposables.dispose()}}e.AsyncDataTree=L;class E{get element(){return{elements:this.node.element.elements.map(N=>N.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(N=>new E(N))}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}constructor(N){this.node=N}}class I{constructor(N,A,P,x){this.renderer=N,this.nodeMapper=A,this.compressibleNodeMapperProvider=P,this.onDidChangeTwistieState=x,this.renderedNodes=new Map,this.disposables=[],this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,A,P,x){this.renderer.renderElement(this.nodeMapper.map(N),A,P.templateData,x)}renderCompressedElements(N,A,P,x){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(N),A,P.templateData,x)}renderTwistie(N,A){return N.slow?(A.classList.add(...h.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(A.classList.remove(...h.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(N,A,P,x){var W,U;(U=(W=this.renderer).disposeElement)===null||U===void 0||U.call(W,this.nodeMapper.map(N),A,P.templateData,x)}disposeCompressedElements(N,A,P,x){var W,U;(U=(W=this.renderer).disposeCompressedElements)===null||U===void 0||U.call(W,this.compressibleNodeMapperProvider().map(N),A,P.templateData,x)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,i.dispose)(this.disposables)}}function T(M){const N=M&&v(M);return N&&Object.assign(Object.assign({},N),{keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},N.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(A){return M.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(A.map(P=>P.element))}})})}class F extends L{constructor(N,A,P,x,W,U,O={}){super(N,A,P,W,U,O),this.compressionDelegate=x,this.compressibleNodeMapper=new w.WeakMapper($=>new E($)),this.filter=O.filter}createTree(N,A,P,x,W){const U=new k.ComposedTreeDelegate(P),O=x.map(Q=>new I(Q,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),$=T(W)||{};return new D.CompressibleObjectTree(N,A,U,O,$)}asTreeElement(N,A){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(N.element)},super.asTreeElement(N,A))}updateOptions(N={}){this.tree.updateOptions(N)}render(N,A){if(!this.identityProvider)return super.render(N,A);const P=te=>this.identityProvider.getId(te).toString(),x=te=>{const re=new Set;for(const H of te){const B=this.tree.getCompressedTreeNode(H===this.root?null:H);if(B.element)for(const j of B.element.elements)re.add(P(j.element))}return re},W=x(this.tree.getSelection()),U=x(this.tree.getFocus());super.render(N,A);const O=this.getSelection();let $=!1;const Q=this.getFocus();let se=!1;const le=te=>{const re=te.element;if(re)for(let H=0;H<re.elements.length;H++){const B=P(re.elements[H].element),j=re.elements[re.elements.length-1].element;W.has(B)&&O.indexOf(j)===-1&&(O.push(j),$=!0),U.has(B)&&Q.indexOf(j)===-1&&(Q.push(j),se=!0)}te.children.forEach(le)};le(this.tree.getCompressedTreeNode(N===this.root?null:N)),$&&this.setSelection(O),se&&this.setFocus(Q)}processChildren(N){return this.filter&&(N=t.Iterable.filter(N,A=>{const P=this.filter.filter(A,1),x=R(P);if(x===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return x===1})),super.processChildren(N)}}e.CompressibleAsyncDataTree=F;function R(M){return typeof M=="boolean"?M?1:0:(0,y.isFilterResult)(M)?(0,y.getVisibleState)(M.visibility):(0,y.getVisibleState)(M)}}),define(J[292],ee([1,0,11,6,2,45,17,9]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const _="$initialize";let h=!1;function m(C){w.isWeb&&(h||(h=!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(C.message))}e.logOnceWebWorkerWarning=m;class n{constructor(f,v,p,L){this.vsWorker=f,this.req=v,this.method=p,this.args=L,this.type=0}}class t{constructor(f,v,p,L){this.vsWorker=f,this.seq=v,this.res=p,this.err=L,this.type=1}}class i{constructor(f,v,p,L){this.vsWorker=f,this.req=v,this.eventName=p,this.arg=L,this.type=2}}class s{constructor(f,v,p){this.vsWorker=f,this.req=v,this.event=p,this.type=3}}class r{constructor(f,v){this.vsWorker=f,this.req=v,this.type=4}}class c{constructor(f){this._workerId=-1,this._handler=f,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(f){this._workerId=f}sendMessage(f,v){const p=String(++this._lastSentReq);return new Promise((L,E)=>{this._pendingReplies[p]={resolve:L,reject:E},this._send(new n(this._workerId,p,f,v))})}listen(f,v){let p=null;const L=new k.Emitter({onWillAddFirstListener:()=>{p=String(++this._lastSentReq),this._pendingEmitters.set(p,L),this._send(new i(this._workerId,p,f,v))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(p),this._send(new r(this._workerId,p)),p=null}});return L.event}handleMessage(f){!f||!f.vsWorker||this._workerId!==-1&&f.vsWorker!==this._workerId||this._handleMessage(f)}_handleMessage(f){switch(f.type){case 1:return this._handleReplyMessage(f);case 0:return this._handleRequestMessage(f);case 2:return this._handleSubscribeEventMessage(f);case 3:return this._handleEventMessage(f);case 4:return this._handleUnsubscribeEventMessage(f)}}_handleReplyMessage(f){if(!this._pendingReplies[f.seq]){console.warn("Got reply to unknown seq");return}const v=this._pendingReplies[f.seq];if(delete this._pendingReplies[f.seq],f.err){let p=f.err;f.err.$isError&&(p=new Error,p.name=f.err.name,p.message=f.err.message,p.stack=f.err.stack),v.reject(p);return}v.resolve(f.res)}_handleRequestMessage(f){const v=f.req;this._handler.handleMessage(f.method,f.args).then(L=>{this._send(new t(this._workerId,v,L,void 0))},L=>{L.detail instanceof Error&&(L.detail=(0,S.transformErrorForSerialization)(L.detail)),this._send(new t(this._workerId,v,void 0,(0,S.transformErrorForSerialization)(L)))})}_handleSubscribeEventMessage(f){const v=f.req,p=this._handler.handleEvent(f.eventName,f.arg)(L=>{this._send(new s(this._workerId,v,L))});this._pendingEvents.set(v,p)}_handleEventMessage(f){if(!this._pendingEmitters.has(f.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(f.req).fire(f.event)}_handleUnsubscribeEventMessage(f){if(!this._pendingEvents.has(f.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(f.req).dispose(),this._pendingEvents.delete(f.req)}_send(f){const v=[];if(f.type===0)for(let p=0;p<f.args.length;p++)f.args[p]instanceof ArrayBuffer&&v.push(f.args[p]);else f.type===1&&f.res instanceof ArrayBuffer&&v.push(f.res);this._handler.sendMessage(f,v)}}class g extends y.Disposable{constructor(f,v,p){super();let L=null;this._worker=this._register(f.create("vs/base/common/worker/simpleWorker",M=>{this._protocol.handleMessage(M)},M=>{L?.(M)})),this._protocol=new c({sendMessage:(M,N)=>{this._worker.postMessage(M,N)},handleMessage:(M,N)=>{if(typeof p[M]!="function")return Promise.reject(new Error("Missing method "+M+" on main thread host."));try{return Promise.resolve(p[M].apply(p,N))}catch(A){return Promise.reject(A)}},handleEvent:(M,N)=>{if(l(M)){const A=p[M].call(p,N);if(typeof A!="function")throw new Error(`Missing dynamic event ${M} on main thread host.`);return A}if(o(M)){const A=p[M];if(typeof A!="function")throw new Error(`Missing event ${M} on main thread host.`);return A}throw new Error(`Malformed event name ${M}`)}}),this._protocol.setWorkerId(this._worker.getId());let E=null;const I=globalThis.require;typeof I<"u"&&typeof I.getConfig=="function"?E=I.getConfig():typeof globalThis.requirejs<"u"&&(E=globalThis.requirejs.s.contexts._.config);const T=(0,D.getAllMethodNames)(p);this._onModuleLoaded=this._protocol.sendMessage(_,[this._worker.getId(),JSON.parse(JSON.stringify(E)),v,T]);const F=(M,N)=>this._request(M,N),R=(M,N)=>this._protocol.listen(M,N);this._lazyProxy=new Promise((M,N)=>{L=N,this._onModuleLoaded.then(A=>{M(a(A,F,R))},A=>{N(A),this._onError("Worker failed to load "+v,A)})})}getProxyObject(){return this._lazyProxy}_request(f,v){return new Promise((p,L)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(f,v).then(p,L)},L)})}_onError(f,v){console.error(f),console.info(v)}}e.SimpleWorkerClient=g;function o(C){return C[0]==="o"&&C[1]==="n"&&b.isUpperAsciiLetter(C.charCodeAt(2))}function l(C){return/^onDynamic/.test(C)&&b.isUpperAsciiLetter(C.charCodeAt(9))}function a(C,f,v){const p=I=>function(){const T=Array.prototype.slice.call(arguments,0);return f(I,T)},L=I=>function(T){return v(I,T)},E={};for(const I of C){if(l(I)){E[I]=L(I);continue}if(o(I)){E[I]=v(I,void 0);continue}E[I]=p(I)}return E}class d{constructor(f,v){this._requestHandlerFactory=v,this._requestHandler=null,this._protocol=new c({sendMessage:(p,L)=>{f(p,L)},handleMessage:(p,L)=>this._handleMessage(p,L),handleEvent:(p,L)=>this._handleEvent(p,L)})}onmessage(f){this._protocol.handleMessage(f)}_handleMessage(f,v){if(f===_)return this.initialize(v[0],v[1],v[2],v[3]);if(!this._requestHandler||typeof this._requestHandler[f]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+f));try{return Promise.resolve(this._requestHandler[f].apply(this._requestHandler,v))}catch(p){return Promise.reject(p)}}_handleEvent(f,v){if(!this._requestHandler)throw new Error("Missing requestHandler");if(l(f)){const p=this._requestHandler[f].call(this._requestHandler,v);if(typeof p!="function")throw new Error(`Missing dynamic event ${f} on request handler.`);return p}if(o(f)){const p=this._requestHandler[f];if(typeof p!="function")throw new Error(`Missing event ${f} on request handler.`);return p}throw new Error(`Malformed event name ${f}`)}initialize(f,v,p,L){this._protocol.setWorkerId(f);const T=a(L,(F,R)=>this._protocol.sendMessage(F,R),(F,R)=>this._protocol.listen(F,R));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(T),Promise.resolve((0,D.getAllMethodNames)(this._requestHandler))):(v&&(typeof v.baseUrl<"u"&&delete v.baseUrl,typeof v.paths<"u"&&typeof v.paths.vs<"u"&&delete v.paths.vs,typeof v.trustedTypesPolicy!==void 0&&delete v.trustedTypesPolicy,v.catchError=!0,globalThis.require.config(v)),new Promise((F,R)=>{(globalThis.require||q)([p],N=>{if(this._requestHandler=N.create(T),!this._requestHandler){R(new Error("No RequestHandler!"));return}F((0,D.getAllMethodNames)(this._requestHandler))},R)}))}}e.SimpleWorkerServer=d;function u(C){return new d(C,null)}e.create=u}),define(J[548],ee([1,0,49,292]),function(q,e,S,k){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const D=(y=window.trustedTypes)===null||y===void 0?void 0:y.createPolicy("defaultWorkerFactory",{createScriptURL:n=>n});function w(n){const t=globalThis.MonacoEnvironment;if(t){if(typeof t.getWorker=="function")return t.getWorker("workerMain.js",n);if(typeof t.getWorkerUrl=="function"){const i=t.getWorkerUrl("workerMain.js",n);return new Worker(D?D.createScriptURL(i):i,{name:n})}}if(typeof q=="function"){const i=q.toUrl("vs/base/worker/workerMain.js"),s=b(i,n);return new Worker(D?D.createScriptURL(s):s,{name:n})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function b(n,t){if(/^((http:)|(https:)|(file:))/.test(n)&&n.substring(0,globalThis.origin.length)!==globalThis.origin){const g="vs/base/worker/defaultWorkerFactory.js",o=q.toUrl(g).slice(0,-g.length),l=`/*${t}*/globalThis.MonacoEnvironment={baseUrl: \'${o}\'};const ttPolicy = globalThis.trustedTypes?.createPolicy(\'defaultWorkerFactory\', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL(\'${n}\') ?? \'${n}\');/*${t}*/`,a=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(a)}const i=n.lastIndexOf("?"),s=n.lastIndexOf("#",i),r=i>0?new URLSearchParams(n.substring(i+1,~s?s:void 0)):new URLSearchParams;return S.COI.addSearchParam(r,!0,!0),r.toString()?`${n}?${r.toString()}#${t}`:`${n}#${t}`}e.getWorkerBootstrapUrl=b;function _(n){return typeof n.then=="function"}class h{constructor(t,i,s,r,c){this.id=i;const g=w(s);_(g)?this.worker=g:this.worker=Promise.resolve(g),this.postMessage(t,[]),this.worker.then(o=>{o.onmessage=function(l){r(l.data)},o.onmessageerror=c,typeof o.addEventListener=="function"&&o.addEventListener("error",c)})}getId(){return this.id}postMessage(t,i){var s;(s=this.worker)===null||s===void 0||s.then(r=>r.postMessage(t,i))}dispose(){var t;(t=this.worker)===null||t===void 0||t.then(i=>i.terminate()),this.worker=null}}class m{constructor(t){this._label=t,this._webWorkerFailedBeforeError=!1}create(t,i,s){const r=++m.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new h(t,r,this._label||"anonymous"+r,i,c=>{(0,k.logOnceWebWorkerWarning)(c),this._webWorkerFailedBeforeError=c,s(c)})}}m.LAST_WORKER_ID=0,e.DefaultWorkerFactory=m}),define(J[549],ee([1,0,12,6,2,18]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.StorageHint=void 0;var w;(function(m){m[m.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",m[m.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(w=e.StorageHint||(e.StorageHint={}));var b;(function(m){m[m.None=0]="None",m[m.Initialized=1]="Initialized",m[m.Closed=2]="Closed"})(b=e.StorageState||(e.StorageState={}));class _ extends y.Disposable{constructor(n,t=Object.create(null)){super(),this.database=n,this.options=t,this._onDidChangeStorage=this._register(new k.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=b.None,this.cache=new Map,this.flushDelayer=new S.ThrottledDelayer(_.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(n=>this.onDidChangeItemsExternal(n)))}onDidChangeItemsExternal(n){var t,i;(t=n.changed)===null||t===void 0||t.forEach((s,r)=>this.accept(r,s)),(i=n.deleted)===null||i===void 0||i.forEach(s=>this.accept(s,void 0))}accept(n,t){if(this.state===b.Closed)return;let i=!1;(0,D.isUndefinedOrNull)(t)?i=this.cache.delete(n):this.cache.get(n)!==t&&(this.cache.set(n,t),i=!0),i&&this._onDidChangeStorage.fire(n)}get(n,t){const i=this.cache.get(n);return(0,D.isUndefinedOrNull)(i)?t:i}getBoolean(n,t){const i=this.get(n);return(0,D.isUndefinedOrNull)(i)?t:i==="true"}getNumber(n,t){const i=this.get(n);return(0,D.isUndefinedOrNull)(i)?t:parseInt(i,10)}set(n,t){return Ee(this,void 0,void 0,function*(){if(this.state===b.Closed)return;if((0,D.isUndefinedOrNull)(t))return this.delete(n);const i=String(t);if(this.cache.get(n)!==i)return this.cache.set(n,i),this.pendingInserts.set(n,i),this.pendingDeletes.delete(n),this._onDidChangeStorage.fire(n),this.doFlush()})}delete(n){return Ee(this,void 0,void 0,function*(){if(!(this.state===b.Closed||!this.cache.delete(n)))return this.pendingDeletes.has(n)||this.pendingDeletes.add(n),this.pendingInserts.delete(n),this._onDidChangeStorage.fire(n),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return Ee(this,void 0,void 0,function*(){if(!this.hasPending)return;const n={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(n).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}doFlush(n){return Ee(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),n)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}_.DEFAULT_FLUSH_DELAY=100,e.Storage=_;class h{constructor(){this.onDidChangeItemsExternal=k.Event.None,this.items=new Map}updateItems(n){var t,i;return Ee(this,void 0,void 0,function*(){(t=n.insert)===null||t===void 0||t.forEach((s,r)=>this.items.set(r,s)),(i=n.delete)===null||i===void 0||i.forEach(s=>this.items.delete(s))})}}e.InMemoryStorageDatabase=h}),define(J[293],ee([1,0,2,6]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class y extends S.Disposable{constructor(w,b){super(),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=w,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,b)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){!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))}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(w){this.measureReferenceDomElement(!0,w)}measureReferenceDomElement(w,b){let _=0,h=0;b?(_=b.width,h=b.height):this._referenceDomElement&&(_=this._referenceDomElement.clientWidth,h=this._referenceDomElement.clientHeight),_=Math.max(5,_),h=Math.max(5,h),(this._width!==_||this._height!==h)&&(this._width=_,this._height=h,w&&this._onDidChange.fire())}}e.ElementSizeObserver=y}),define(J[215],ee([1,0,6]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocus=void 0;class k{constructor(){this._tabFocusTerminal=!1,this._tabFocusEditor=!1,this._onDidChangeTabFocus=new S.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(D){return D==="terminalFocus"?this._tabFocusTerminal:this._tabFocusEditor}setTabFocusMode(D,w){w==="terminalFocus"?this._tabFocusTerminal=D:this._tabFocusEditor=D,this._onDidChangeTabFocus.fire()}}e.TabFocus=new k}),define(J[216],ee([1,0,46,7,76,44,241,12,6,2,101,9,252,23]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var s;(function(a){a.Tap="-monaco-textarea-synthetic-tap"})(s=e.TextAreaSyntethicEvents||(e.TextAreaSyntethicEvents={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class r{constructor(){this._lastState=null}set(d,u){this._lastState={lastCopiedValue:d,data:u}}get(d){return this._lastState&&this._lastState.lastCopiedValue===d?this._lastState.data:(this._lastState=null,null)}}r.INSTANCE=new r,e.InMemoryClipboardMetadataManager=r;class c{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(d){d=d||"";const u={text:d,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=d.length,u}}class g extends h.Disposable{get textAreaState(){return this._textAreaState}constructor(d,u,C,f){super(),this._host=d,this._textArea=u,this._OS=C,this._browser=f,this._onFocus=this._register(new _.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new _.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new _.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new _.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new _.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new _.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new _.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new _.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new _.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new _.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new _.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new b.RunOnceScheduler(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new b.RunOnceScheduler(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=t.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let v=null;this._register(this._textArea.onKeyDown(p=>{const L=new D.StandardKeyboardEvent(p);(L.keyCode===109||this._currentComposition&&L.keyCode===1)&&L.stopPropagation(),L.equals(9)&&L.preventDefault(),v=L,this._onKeyDown.fire(L)})),this._register(this._textArea.onKeyUp(p=>{const L=new D.StandardKeyboardEvent(p);this._onKeyUp.fire(L)})),this._register(this._textArea.onCompositionStart(p=>{t._debugComposition&&console.log("[compositionstart]",p);const L=new c;if(this._currentComposition){this._currentComposition=L;return}if(this._currentComposition=L,this._OS===2&&v&&v.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===p.data&&(v.code==="ArrowRight"||v.code==="ArrowLeft")){t._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",p),L.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:p.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:p.data});return}this._onCompositionStart.fire({data:p.data})})),this._register(this._textArea.onCompositionUpdate(p=>{t._debugComposition&&console.log("[compositionupdate]",p);const L=this._currentComposition;if(!L)return;if(this._browser.isAndroid){const I=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),T=t.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,I);this._textAreaState=I,this._onType.fire(T),this._onCompositionUpdate.fire(p);return}const E=L.handleCompositionUpdate(p.data);this._textAreaState=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(E),this._onCompositionUpdate.fire(p)})),this._register(this._textArea.onCompositionEnd(p=>{t._debugComposition&&console.log("[compositionend]",p);const L=this._currentComposition;if(!L)return;if(this._currentComposition=null,this._browser.isAndroid){const I=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),T=t.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,I);this._textAreaState=I,this._onType.fire(T),this._onCompositionEnd.fire();return}const E=L.handleCompositionUpdate(p.data);this._textAreaState=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(E),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(p=>{if(t._debugComposition&&console.log("[input]",p),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const L=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),E=t.TextAreaState.deduceInput(this._textAreaState,L,this._OS===2);E.replacePrevCharCnt===0&&E.text.length===1&&(n.isHighSurrogate(E.text.charCodeAt(0))||E.text.charCodeAt(0)===127)||(this._textAreaState=L,(E.text!==""||E.replacePrevCharCnt!==0||E.replaceNextCharCnt!==0||E.positionDelta!==0)&&this._onType.fire(E))})),this._register(this._textArea.onCut(p=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(p),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(p=>{this._ensureClipboardGetsEditorSelection(p)})),this._register(this._textArea.onPaste(p=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),p.preventDefault(),!p.clipboardData)return;let[L,E]=o.getTextData(p.clipboardData);L&&(E=E||r.INSTANCE.get(L),this._onPaste.fire({text:L,metadata:E}))})),this._register(this._textArea.onFocus(()=>{const p=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!p&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let d=0;return k.addDisposableListener(document,"selectionchange",u=>{if(w.inputLatency.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const C=Date.now(),f=C-d;if(d=C,f<5)return;const v=C-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),v<100||!this._textAreaState.selection)return;const p=this._textArea.getValue();if(this._textAreaState.value!==p)return;const L=this._textArea.getSelectionStart(),E=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===L&&this._textAreaState.selectionEnd===E)return;const I=this._textAreaState.deduceEditorPosition(L),T=this._host.deduceModelPosition(I[0],I[1],I[2]),F=this._textAreaState.deduceEditorPosition(E),R=this._host.deduceModelPosition(F[0],F[1],F[2]),M=new i.Selection(T.lineNumber,T.column,R.lineNumber,R.column);this._onSelectionChangeRequest.fire(M)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(d){this._hasFocus!==d&&(this._hasFocus=d,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(d,u){this._hasFocus||(u=u.collapseSelection()),u.writeToTextArea(d,this._textArea,this._hasFocus),this._textAreaState=u}writeScreenReaderContent(d){this._currentComposition||this._setAndWriteTextAreaState(d,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(d){const u=this._host.getDataToCopy(),C={version:1,isFromEmptySelection:u.isFromEmptySelection,multicursorText:u.multicursorText,mode:u.mode};r.INSTANCE.set(this._browser.isFirefox?u.text.replace(/\\r\\n/g,`\n`):u.text,C),d.preventDefault(),d.clipboardData&&o.setTextData(d.clipboardData,u.text,u.html,C)}}e.TextAreaInput=g;class o{static getTextData(d){const u=d.getData(m.Mimes.text);let C=null;const f=d.getData("vscode-editor-data");if(typeof f=="string")try{C=JSON.parse(f),C.version!==1&&(C=null)}catch{}return u.length===0&&C===null&&d.files.length>0?[Array.prototype.slice.call(d.files,0).map(p=>p.name).join(`\n`),null]:[u,C]}static setTextData(d,u,C,f){d.setData(m.Mimes.text,u),typeof C=="string"&&d.setData("text/html",C),d.setData("vscode-editor-data",JSON.stringify(f))}}class l extends h.Disposable{constructor(d){super(),this._actual=d,this.onKeyDown=this._register(new y.DomEmitter(this._actual,"keydown")).event,this.onKeyUp=this._register(new y.DomEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(new y.DomEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new y.DomEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new y.DomEmitter(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new y.DomEmitter(this._actual,"beforeinput")).event,this.onInput=this._register(new y.DomEmitter(this._actual,"input")).event,this.onCut=this._register(new y.DomEmitter(this._actual,"cut")).event,this.onCopy=this._register(new y.DomEmitter(this._actual,"copy")).event,this.onPaste=this._register(new y.DomEmitter(this._actual,"paste")).event,this.onFocus=this._register(new y.DomEmitter(this._actual,"focus")).event,this.onBlur=this._register(new y.DomEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new _.Emitter),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>w.inputLatency.onKeyDown())),this._register(this.onBeforeInput(()=>w.inputLatency.onBeforeInput())),this._register(this.onInput(()=>w.inputLatency.onInput())),this._register(this.onKeyUp(()=>w.inputLatency.onKeyUp())),this._register(k.addDisposableListener(this._actual,s.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const d=k.getShadowRoot(this._actual);return d?d.activeElement===this._actual:k.isInDOM(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(d){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(d,u){const C=this._actual;C.value!==u&&(this.setIgnoreSelectionChangeTime("setValue"),C.value=u)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(d,u,C){const f=this._actual;let v=null;const p=k.getShadowRoot(f);p?v=p.activeElement:v=document.activeElement;const L=v===f,E=f.selectionStart,I=f.selectionEnd;if(L&&E===u&&I===C){S.isFirefox&&window.parent!==window&&f.focus();return}if(L){this.setIgnoreSelectionChangeTime("setSelectionRange"),f.setSelectionRange(u,C),S.isFirefox&&window.parent!==window&&f.focus();return}try{const T=k.saveParentsScrollTop(f);this.setIgnoreSelectionChangeTime("setSelectionRange"),f.focus(),f.setSelectionRange(u,C),k.restoreParentsScrollTop(f,T)}catch{}}}e.TextAreaWrapper=l}),define(J[550],ee([1,0,7,35,52]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class D extends y.ViewPart{constructor(t,i){super(t),this._viewDomNode=i,this._widgets={},this.domNode=(0,k.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,k.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(t){const i=Object.keys(this._widgets);for(const s of i)this._widgets[s].onConfigurationChanged(t);return!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLineMappingChanged(t){return this._updateAnchorsViewPositions(),!0}onLinesChanged(t){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(t){return this._updateAnchorsViewPositions(),!0}onLinesInserted(t){return this._updateAnchorsViewPositions(),!0}onScrollChanged(t){return!0}onZonesChanged(t){return!0}_updateAnchorsViewPositions(){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].updateAnchorViewPosition()}addWidget(t){const i=new w(this._context,this._viewDomNode,t);this._widgets[i.id]=i,i.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(i.domNode):this.domNode.appendChild(i.domNode),this.setShouldRender()}setWidgetPosition(t,i,s,r,c){this._widgets[t.getId()].setPosition(i,s,r,c),this.setShouldRender()}removeWidget(t){const i=t.getId();if(this._widgets.hasOwnProperty(i)){const s=this._widgets[i];delete this._widgets[i];const r=s.domNode.domNode;r.parentNode.removeChild(r),r.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(t){return this._widgets.hasOwnProperty(t)?this._widgets[t].suppressMouseDown:!1}onBeforeRender(t){const i=Object.keys(this._widgets);for(const s of i)this._widgets[s].onBeforeRender(t)}prepareRender(t){const i=Object.keys(this._widgets);for(const s of i)this._widgets[s].prepareRender(t)}render(t){const i=Object.keys(this._widgets);for(const s of i)this._widgets[s].render(t)}}e.ViewContentWidgets=D;class w{constructor(t,i,s){this._primaryAnchor=new b(null,null),this._secondaryAnchor=new b(null,null),this._context=t,this._viewDomNode=i,this._actual=s,this.domNode=(0,k.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const r=this._context.configuration.options,c=r.get(139);this._fixedOverflowWidgets=r.get(40),this._contentWidth=c.contentWidth,this._contentLeft=c.contentLeft,this._lineHeight=r.get(64),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(t){const i=this._context.configuration.options;if(this._lineHeight=i.get(64),t.hasChanged(139)){const s=i.get(139);this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(t,i,s){this._affinity=t,this._primaryAnchor=r(i,this._context.viewModel,this._affinity),this._secondaryAnchor=r(s,this._context.viewModel,this._affinity);function r(c,g,o){if(!c)return new b(null,null);const l=g.model.validatePosition(c);if(g.coordinatesConverter.modelPositionIsVisible(l)){const a=g.coordinatesConverter.convertModelPositionToViewPosition(l,o??void 0);return new b(c,a)}return new b(c,null)}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(t,i,s,r){this._setPosition(r,t,i),this._preference=s,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(t,i,s,r){const c=t.top,g=c,o=t.top+t.height,l=r.viewportHeight-o,a=c-s,d=g>=s,u=o,C=l>=s;let f=t.left;return f+i>r.scrollLeft+r.viewportWidth&&(f=r.scrollLeft+r.viewportWidth-i),f<r.scrollLeft&&(f=r.scrollLeft),{fitsAbove:d,aboveTop:a,fitsBelow:C,belowTop:u,left:f}}_layoutHorizontalSegmentInPage(t,i,s,r){const o=Math.max(15,i.left-r),l=Math.min(i.left+i.width+r,t.width-15);let a=i.left+s-window.scrollX;if(a+r>l){const d=a-(l-r);a-=d,s-=d}if(a<o){const d=a-o;a-=d,s-=d}return[s,a]}_layoutBoxInPage(t,i,s,r){const c=t.top-s,g=t.top+t.height,o=S.getDomNodePagePosition(this._viewDomNode.domNode),l=o.top+c-window.scrollY,a=o.top+g-window.scrollY,d=S.getClientArea(document.body),[u,C]=this._layoutHorizontalSegmentInPage(d,o,t.left-r.scrollLeft+this._contentLeft,i),f=22,v=22,p=l>=f,L=a+s<=d.height-v;return this._fixedOverflowWidgets?{fitsAbove:p,aboveTop:Math.max(l,f),fitsBelow:L,belowTop:a,left:C}:{fitsAbove:p,aboveTop:c,fitsBelow:L,belowTop:g,left:u}}_prepareRenderWidgetAtExactPositionOverflowing(t){return new _(t.top,t.left+this._contentLeft)}_getAnchorsCoordinates(t){var i,s;const r=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),c=((i=this._secondaryAnchor.viewPosition)===null||i===void 0?void 0:i.lineNumber)===((s=this._primaryAnchor.viewPosition)===null||s===void 0?void 0:s.lineNumber)?this._secondaryAnchor.viewPosition:null,g=o(c,this._affinity,this._lineHeight);return{primary:r,secondary:g};function o(l,a,d){if(!l)return null;const u=t.visibleRangeForPosition(l);if(!u)return null;const C=l.column===1&&a===3?0:u.left,f=t.getVerticalOffsetForLineNumber(l.lineNumber)-t.scrollTop;return new h(f,C,d)}}_reduceAnchorCoordinates(t,i,s){if(!i)return t;const r=this._context.configuration.options.get(48);let c=i.left;return c<t.left?c=Math.max(c,t.left-s+r.typicalFullwidthCharacterWidth):c=Math.min(c,t.left+s-r.typicalFullwidthCharacterWidth),new h(t.top,c,t.height)}_prepareRenderWidget(t){if(!this._preference||this._preference.length===0)return null;const{primary:i,secondary:s}=this._getAnchorsCoordinates(t);if(!i)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let g=null;if(typeof this._actual.beforeRender=="function"&&(g=m(this._actual.beforeRender,this._actual)),g)this._cachedDomNodeOffsetWidth=g.width,this._cachedDomNodeOffsetHeight=g.height;else{const l=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(l.width),this._cachedDomNodeOffsetHeight=Math.round(l.height)}}const r=this._reduceAnchorCoordinates(i,s,this._cachedDomNodeOffsetWidth);let c;this.allowEditorOverflow?c=this._layoutBoxInPage(r,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,t):c=this._layoutBoxInViewport(r,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,t);for(let g=1;g<=2;g++)for(const o of this._preference)if(o===1){if(!c)return null;if(g===2||c.fitsAbove)return{coordinate:new _(c.aboveTop,c.left),position:1}}else if(o===2){if(!c)return null;if(g===2||c.fitsBelow)return{coordinate:new _(c.belowTop,c.left),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new _(r.top,r.left)),position:0}:{coordinate:new _(r.top,r.left),position:0};return null}onBeforeRender(t){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<t.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>t.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(t){this._renderData=this._prepareRenderWidget(t)}render(t){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&m(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+t.scrollTop-t.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"&&m(this._actual.afterRender,this._actual,this._renderData.position)}}class b{constructor(t,i){this.modelPosition=t,this.viewPosition=i}}class _{constructor(t,i){this.top=t,this.left=i,this._coordinateBrand=void 0}}class h{constructor(t,i,s){this.top=t,this.left=i,this.height=s,this._anchorCoordinateBrand=void 0}}function m(n,t,...i){try{return n.call(t,...i)}catch{return null}}}),define(J[551],ee([1,0,12,11,2]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorContributions=void 0;class D extends y.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new y.DisposableMap),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(b,_,h){this._editor=b,this._instantiationService=h;for(const m of _){if(this._pending.has(m.id)){(0,k.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${m.id}`));continue}this._pending.set(m.id,m)}this._instantiateSome(0),this._register((0,S.runWhenIdle)(()=>{this._instantiateSome(1)})),this._register((0,S.runWhenIdle)(()=>{this._instantiateSome(2)})),this._register((0,S.runWhenIdle)(()=>{this._instantiateSome(3)},5e3))}saveViewState(){const b={};for(const[_,h]of this._instances)typeof h.saveViewState=="function"&&(b[_]=h.saveViewState());return b}restoreViewState(b){for(const[_,h]of this._instances)typeof h.restoreViewState=="function"&&h.restoreViewState(b[_])}get(b){return this._instantiateById(b),this._instances.get(b)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register((0,S.runWhenIdle)(()=>{this._instantiateSome(1)},50))}_instantiateSome(b){if(this._finishedInstantiation[b])return;this._finishedInstantiation[b]=!0;const _=this._findPendingContributionsByInstantiation(b);for(const h of _)this._instantiateById(h.id)}_findPendingContributionsByInstantiation(b){const _=[];for(const[,h]of this._pending)h.instantiation===b&&_.push(h);return _}_instantiateById(b){const _=this._pending.get(b);if(_){if(this._pending.delete(b),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const h=this._instantiationService.createInstance(_.ctor,this._editor);this._instances.set(_.id,h),typeof h.restoreViewState=="function"&&_.instantiation!==0&&console.warn(`Editor contribution \'${_.id}\' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(h){(0,k.onUnexpectedError)(h)}}}}e.CodeEditorContributions=D}),define(J[144],ee([1,0,6]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorZoom=void 0,e.EditorZoom=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new S.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(k){k=Math.min(Math.max(-5,k),20),this._zoomLevel!==k&&(this._zoomLevel=k,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}}),define(J[95],ee([1,0,9,17,130]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringBuilder=e.decodeUTF16LE=e.getPlatformTextDecoder=void 0;let D;function w(){return D||(D=new TextDecoder("UTF-16LE")),D}let b;function _(){return b||(b=new TextDecoder("UTF-16BE")),b}let h;function m(){return h||(h=k.isLittleEndian()?w():_()),h}e.getPlatformTextDecoder=m;function n(s,r,c){const g=new Uint16Array(s.buffer,r,c);return c>0&&(g[0]===65279||g[0]===65534)?t(s,r,c):w().decode(g)}e.decodeUTF16LE=n;function t(s,r,c){const g=[];let o=0;for(let l=0;l<c;l++){const a=y.readUInt16LE(s,r);r+=2,g[o++]=String.fromCharCode(a)}return g.join("")}class i{constructor(r){this._capacity=r|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 r=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return m().decode(r)}_flushBuffer(){const r=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[r]:this._completedStrings[this._completedStrings.length]=r}appendCharCode(r){const c=this._capacity-this._bufferLength;c<=1&&(c===0||S.isHighSurrogate(r))&&this._flushBuffer(),this._buffer[this._bufferLength++]=r}appendASCIICharCode(r){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=r}appendString(r){const c=r.length;if(this._bufferLength+c>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=r;return}for(let g=0;g<c;g++)this._buffer[this._bufferLength++]=r.charCodeAt(g)}}e.StringBuilder=i}),define(J[552],ee([1,0,95,9,74,105,262]),function(q,e,S,k,y,D,w){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const _=(b=window.trustedTypes)===null||b===void 0?void 0:b.createPolicy("domLineBreaksComputer",{createHTML:r=>r});class h{static create(){return new h}constructor(){}createLineBreaksComputer(c,g,o,l,a){const d=[],u=[];return{addRequest:(C,f,v)=>{d.push(C),u.push(f)},finalize:()=>m(d,c,g,o,l,a,u)}}}e.DOMLineBreaksComputerFactory=h;function m(r,c,g,o,l,a,d){var u;function C(O){const $=d[O];if($){const Q=D.LineInjectedText.applyInjectedText(r[O],$),se=$.map(te=>te.options),le=$.map(te=>te.column-1);return new w.ModelLineProjectionData(le,se,[Q.length],[],0)}else return null}if(o===-1){const O=[];for(let $=0,Q=r.length;$<Q;$++)O[$]=C($);return O}const f=Math.round(o*c.typicalHalfwidthCharacterWidth),p=Math.round(g*(l===3?2:l===2?1:0)),L=Math.ceil(c.spaceWidth*p),E=document.createElement("div");(0,y.applyFontInfo)(E,c);const I=new S.StringBuilder(1e4),T=[],F=[],R=[],M=[],N=[];for(let O=0;O<r.length;O++){const $=D.LineInjectedText.applyInjectedText(r[O],d[O]);let Q=0,se=0,le=f;if(l!==0)if(Q=k.firstNonWhitespaceIndex($),Q===-1)Q=0;else{for(let B=0;B<Q;B++){const j=$.charCodeAt(B)===9?g-se%g:1;se+=j}const H=Math.ceil(c.spaceWidth*se);H+c.typicalFullwidthCharacterWidth>f?(Q=0,se=0):le=f-H}const te=$.substr(Q),re=n(te,se,g,le,I,L);T[O]=Q,F[O]=se,R[O]=te,M[O]=re[0],N[O]=re[1]}const A=I.build(),P=(u=_?.createHTML(A))!==null&&u!==void 0?u:A;E.innerHTML=P,E.style.position="absolute",E.style.top="10000",a==="keepAll"?(E.style.wordBreak="keep-all",E.style.overflowWrap="anywhere"):(E.style.wordBreak="inherit",E.style.overflowWrap="break-word"),document.body.appendChild(E);const x=document.createRange(),W=Array.prototype.slice.call(E.children,0),U=[];for(let O=0;O<r.length;O++){const $=W[O],Q=t(x,$,R[O],M[O]);if(Q===null){U[O]=C(O);continue}const se=T[O],le=F[O]+p,te=N[O],re=[];for(let G=0,Y=Q.length;G<Y;G++)re[G]=te[Q[G]];if(se!==0)for(let G=0,Y=Q.length;G<Y;G++)Q[G]+=se;let H,B;const j=d[O];j?(H=j.map(G=>G.options),B=j.map(G=>G.column-1)):(H=null,B=null),U[O]=new w.ModelLineProjectionData(B,H,Q,re,le)}return document.body.removeChild(E),U}function n(r,c,g,o,l,a){if(a!==0){const L=String(a);l.appendString(\'<div style="text-indent: -\'),l.appendString(L),l.appendString("px; padding-left: "),l.appendString(L),l.appendString("px; box-sizing: border-box; width:")}else l.appendString(\'<div style="width:\');l.appendString(String(o)),l.appendString(\'px;">\');const d=r.length;let u=c,C=0;const f=[],v=[];let p=0<d?r.charCodeAt(0):0;l.appendString("<span>");for(let L=0;L<d;L++){L!==0&&L%16384===0&&l.appendString("</span><span>"),f[L]=C,v[L]=u;const E=p;p=L+1<d?r.charCodeAt(L+1):0;let I=1,T=1;switch(E){case 9:I=g-u%g,T=I;for(let F=1;F<=I;F++)F<I?l.appendCharCode(160):l.appendASCIICharCode(32);break;case 32:p===32?l.appendCharCode(160):l.appendASCIICharCode(32);break;case 60:l.appendString("<");break;case 62:l.appendString(">");break;case 38:l.appendString("&");break;case 0:l.appendString("�");break;case 65279:case 8232:case 8233:case 133:l.appendCharCode(65533);break;default:k.isFullWidthCharacter(E)&&T++,E<32?l.appendCharCode(9216+E):l.appendCharCode(E)}C+=I,u+=T}return l.appendString("</span>"),f[r.length]=C,v[r.length]=u,l.appendString("</div>"),[f,v]}function t(r,c,g,o){if(g.length<=1)return null;const l=Array.prototype.slice.call(c.children,0),a=[];try{i(r,l,o,0,null,g.length-1,null,a)}catch(d){return console.log(d),null}return a.length===0?null:(a.push(g.length),a)}function i(r,c,g,o,l,a,d,u){if(o===a||(l=l||s(r,c,g[o],g[o+1]),d=d||s(r,c,g[a],g[a+1]),Math.abs(l[0].top-d[0].top)<=.1))return;if(o+1===a){u.push(a);return}const C=o+(a-o)/2|0,f=s(r,c,g[C],g[C+1]);i(r,c,g,o,l,C,f,u),i(r,c,g,C,f,a,d,u)}function s(r,c,g,o){return r.setStart(c[g/16384|0].firstChild,g%16384),r.setEnd(c[o/16384|0].firstChild,o%16384),r.getClientRects()}}),define(J[217],ee([1,0,35,95]),function(q,e,S,k){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class D{constructor(h){this._createLine=h,this._set(1,[])}flush(){this._set(1,[])}_set(h,m){this._lines=m,this._rendLineNumberStart=h}_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(h){const m=h-this._rendLineNumberStart;if(m<0||m>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[m]}onLinesDeleted(h,m){if(this.getCount()===0)return null;const n=this.getStartLineNumber(),t=this.getEndLineNumber();if(m<n){const c=m-h+1;return this._rendLineNumberStart-=c,null}if(h>t)return null;let i=0,s=0;for(let c=n;c<=t;c++){const g=c-this._rendLineNumberStart;h<=c&&c<=m&&(s===0?(i=g,s=1):s++)}if(h<n){let c=0;m<n?c=m-h+1:c=n-h,this._rendLineNumberStart-=c}return this._lines.splice(i,s)}onLinesChanged(h,m){const n=h+m-1;if(this.getCount()===0)return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let s=!1;for(let r=h;r<=n;r++)r>=t&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(h,m){if(this.getCount()===0)return null;const n=m-h+1,t=this.getStartLineNumber(),i=this.getEndLineNumber();if(h<=t)return this._rendLineNumberStart+=n,null;if(h>i)return null;if(n+h>i)return this._lines.splice(h-this._rendLineNumberStart,i-h+1);const s=[];for(let l=0;l<n;l++)s[l]=this._createLine();const r=h-this._rendLineNumberStart,c=this._lines.slice(0,r),g=this._lines.slice(r,this._lines.length-n),o=this._lines.slice(this._lines.length-n,this._lines.length);return this._lines=c.concat(s).concat(g),o}onTokensChanged(h){if(this.getCount()===0)return!1;const m=this.getStartLineNumber(),n=this.getEndLineNumber();let t=!1;for(let i=0,s=h.length;i<s;i++){const r=h[i];if(r.toLineNumber<m||r.fromLineNumber>n)continue;const c=Math.max(m,r.fromLineNumber),g=Math.min(n,r.toLineNumber);for(let o=c;o<=g;o++){const l=o-this._rendLineNumberStart;this._lines[l].onTokensChanged(),t=!0}}return t}}e.RenderedLinesCollection=D;class w{constructor(h){this._host=h,this.domNode=this._createDomNode(),this._linesCollection=new D(()=>this._host.createVisibleLine())}_createDomNode(){const h=(0,S.createFastDomNode)(document.createElement("div"));return h.setClassName("view-layer"),h.setPosition("absolute"),h.domNode.setAttribute("role","presentation"),h.domNode.setAttribute("aria-hidden","true"),h}onConfigurationChanged(h){return!!h.hasChanged(139)}onFlushed(h){return this._linesCollection.flush(),!0}onLinesChanged(h){return this._linesCollection.onLinesChanged(h.fromLineNumber,h.count)}onLinesDeleted(h){const m=this._linesCollection.onLinesDeleted(h.fromLineNumber,h.toLineNumber);if(m)for(let n=0,t=m.length;n<t;n++){const i=m[n].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onLinesInserted(h){const m=this._linesCollection.onLinesInserted(h.fromLineNumber,h.toLineNumber);if(m)for(let n=0,t=m.length;n<t;n++){const i=m[n].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onScrollChanged(h){return h.scrollTopChanged}onTokensChanged(h){return this._linesCollection.onTokensChanged(h.ranges)}onZonesChanged(h){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(h){return this._linesCollection.getLine(h)}renderLines(h){const m=this._linesCollection._get(),n=new b(this.domNode.domNode,this._host,h),t={rendLineNumberStart:m.rendLineNumberStart,lines:m.lines,linesLength:m.lines.length},i=n.render(t,h.startLineNumber,h.endLineNumber,h.relativeVerticalOffset);this._linesCollection._set(i.rendLineNumberStart,i.lines)}}e.VisibleLinesCollection=w;class b{constructor(h,m,n){this.domNode=h,this.host=m,this.viewportData=n}render(h,m,n,t){const i={rendLineNumberStart:h.rendLineNumberStart,lines:h.lines.slice(0),linesLength:h.linesLength};if(i.rendLineNumberStart+i.linesLength-1<m||n<i.rendLineNumberStart){i.rendLineNumberStart=m,i.linesLength=n-m+1,i.lines=[];for(let s=m;s<=n;s++)i.lines[s-m]=this.host.createVisibleLine();return this._finishRendering(i,!0,t),i}if(this._renderUntouchedLines(i,Math.max(m-i.rendLineNumberStart,0),Math.min(n-i.rendLineNumberStart,i.linesLength-1),t,m),i.rendLineNumberStart>m){const s=m,r=Math.min(n,i.rendLineNumberStart-1);s<=r&&(this._insertLinesBefore(i,s,r,t,m),i.linesLength+=r-s+1)}else if(i.rendLineNumberStart<m){const s=Math.min(i.linesLength,m-i.rendLineNumberStart);s>0&&(this._removeLinesBefore(i,s),i.linesLength-=s)}if(i.rendLineNumberStart=m,i.rendLineNumberStart+i.linesLength-1<n){const s=i.rendLineNumberStart+i.linesLength,r=n;s<=r&&(this._insertLinesAfter(i,s,r,t,m),i.linesLength+=r-s+1)}else if(i.rendLineNumberStart+i.linesLength-1>n){const s=Math.max(0,n-i.rendLineNumberStart+1),c=i.linesLength-1-s+1;c>0&&(this._removeLinesAfter(i,c),i.linesLength-=c)}return this._finishRendering(i,!1,t),i}_renderUntouchedLines(h,m,n,t,i){const s=h.rendLineNumberStart,r=h.lines;for(let c=m;c<=n;c++){const g=s+c;r[c].layoutLine(g,t[g-i])}}_insertLinesBefore(h,m,n,t,i){const s=[];let r=0;for(let c=m;c<=n;c++)s[r++]=this.host.createVisibleLine();h.lines=s.concat(h.lines)}_removeLinesBefore(h,m){for(let n=0;n<m;n++){const t=h.lines[n].getDomNode();t&&this.domNode.removeChild(t)}h.lines.splice(0,m)}_insertLinesAfter(h,m,n,t,i){const s=[];let r=0;for(let c=m;c<=n;c++)s[r++]=this.host.createVisibleLine();h.lines=h.lines.concat(s)}_removeLinesAfter(h,m){const n=h.linesLength-m;for(let t=0;t<m;t++){const i=h.lines[n+t].getDomNode();i&&this.domNode.removeChild(i)}h.lines.splice(n,m)}_finishRenderingNewLines(h,m,n,t){b._ttPolicy&&(n=b._ttPolicy.createHTML(n));const i=this.domNode.lastChild;m||!i?this.domNode.innerHTML=n:i.insertAdjacentHTML("afterend",n);let s=this.domNode.lastChild;for(let r=h.linesLength-1;r>=0;r--){const c=h.lines[r];t[r]&&(c.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(h,m,n){const t=document.createElement("div");b._ttPolicy&&(m=b._ttPolicy.createHTML(m)),t.innerHTML=m;for(let i=0;i<h.linesLength;i++){const s=h.lines[i];if(n[i]){const r=t.firstChild,c=s.getDomNode();c.parentNode.replaceChild(r,c),s.setDomNode(r)}}}_finishRendering(h,m,n){const t=b._sb,i=h.linesLength,s=h.lines,r=h.rendLineNumberStart,c=[];{t.reset();let g=!1;for(let o=0;o<i;o++){const l=s[o];c[o]=!1,!(l.getDomNode()||!l.renderLine(o+r,n[o],this.viewportData,t))&&(c[o]=!0,g=!0)}g&&this._finishRenderingNewLines(h,m,t.build(),c)}{t.reset();let g=!1;const o=[];for(let l=0;l<i;l++){const a=s[l];o[l]=!1,!(c[l]||!a.renderLine(l+r,n[l],this.viewportData,t))&&(o[l]=!0,g=!0)}g&&this._finishRenderingInvalidLines(h,t.build(),o)}}}b._ttPolicy=(y=window.trustedTypes)===null||y===void 0?void 0:y.createPolicy("editorViewLayer",{createHTML:_=>_}),b._sb=new k.StringBuilder(1e5)}),define(J[553],ee([1,0,35,74,217,52]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class w extends D.ViewPart{constructor(n){super(n),this._visibleLines=new y.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration.options.get(48);(0,k.applyFontInfo)(this.domNode,i),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let n=0,t=this._dynamicOverlays.length;n<t;n++)if(this._dynamicOverlays[n].shouldRender())return!0;return!1}dispose(){super.dispose();for(let n=0,t=this._dynamicOverlays.length;n<t;n++)this._dynamicOverlays[n].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new b(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(n){this._dynamicOverlays.push(n)}onConfigurationChanged(n){this._visibleLines.onConfigurationChanged(n);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let c=t;c<=i;c++)this._visibleLines.getVisibleLine(c).onConfigurationChanged(n);const r=this._context.configuration.options.get(48);return(0,k.applyFontInfo)(this.domNode,r),!0}onFlushed(n){return this._visibleLines.onFlushed(n)}onFocusChanged(n){return this._isFocused=n.isFocused,!0}onLinesChanged(n){return this._visibleLines.onLinesChanged(n)}onLinesDeleted(n){return this._visibleLines.onLinesDeleted(n)}onLinesInserted(n){return this._visibleLines.onLinesInserted(n)}onScrollChanged(n){return this._visibleLines.onScrollChanged(n)||!0}onTokensChanged(n){return this._visibleLines.onTokensChanged(n)}onZonesChanged(n){return this._visibleLines.onZonesChanged(n)}prepareRender(n){const t=this._dynamicOverlays.filter(i=>i.shouldRender());for(let i=0,s=t.length;i<s;i++){const r=t[i];r.prepareRender(n),r.onDidRender()}}render(n){this._viewOverlaysRender(n),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(n){this._visibleLines.renderLines(n.viewportData)}}e.ViewOverlays=w;class b{constructor(n,t){this._configuration=n,this._lineHeight=this._configuration.options.get(64),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(n){this._domNode=(0,S.createFastDomNode)(n)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(n){this._lineHeight=this._configuration.options.get(64)}renderLine(n,t,i,s){let r="";for(let c=0,g=this._dynamicOverlays.length;c<g;c++){const o=this._dynamicOverlays[c];r+=o.render(i.startLineNumber,n)}return this._renderedContent===r?!1:(this._renderedContent=r,s.appendString(\'<div style="position:absolute;top:\'),s.appendString(String(t)),s.appendString("px;width:100%;height:"),s.appendString(String(this._lineHeight)),s.appendString(\'px;">\'),s.appendString(r),s.appendString("</div>"),!0)}layoutLine(n,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=b;class _ extends w{constructor(n){super(n);const i=this._context.configuration.options.get(139);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(n){const i=this._context.configuration.options.get(139);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(n)||!0}onScrollChanged(n){return super.onScrollChanged(n)||n.scrollWidthChanged}_viewOverlaysRender(n){super._viewOverlaysRender(n),this.domNode.setWidth(Math.max(n.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=_;class h extends w{constructor(n){super(n);const t=this._context.configuration.options,i=t.get(139);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,k.applyFontInfo)(this.domNode,t.get(48))}onConfigurationChanged(n){const t=this._context.configuration.options;(0,k.applyFontInfo)(this.domNode,t.get(48));const i=t.get(139);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(n)||!0}onScrollChanged(n){return super.onScrollChanged(n)||n.scrollHeightChanged}_viewOverlaysRender(n){super._viewOverlaysRender(n);const t=Math.min(n.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=h}),define(J[294],ee([1,0,130,95]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function y(_){return _.replace(/\\n/g,"\\\\n").replace(/\\r/g,"\\\\r")}class D{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}constructor(h,m,n,t){this.oldPosition=h,this.oldText=m,this.newPosition=n,this.newText=t}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${y(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${y(this.oldText)}")`:`(replace@${this.oldPosition} "${y(this.oldText)}" with "${y(this.newText)}")`}static _writeStringSize(h){return 4+2*h.length}static _writeString(h,m,n){const t=m.length;S.writeUInt32BE(h,t,n),n+=4;for(let i=0;i<t;i++)S.writeUInt16LE(h,m.charCodeAt(i),n),n+=2;return n}static _readString(h,m){const n=S.readUInt32BE(h,m);return m+=4,(0,k.decodeUTF16LE)(h,m,n)}writeSize(){return 4+4+D._writeStringSize(this.oldText)+D._writeStringSize(this.newText)}write(h,m){return S.writeUInt32BE(h,this.oldPosition,m),m+=4,S.writeUInt32BE(h,this.newPosition,m),m+=4,m=D._writeString(h,this.oldText,m),m=D._writeString(h,this.newText,m),m}static read(h,m,n){const t=S.readUInt32BE(h,m);m+=4;const i=S.readUInt32BE(h,m);m+=4;const s=D._readString(h,m);m+=D._writeStringSize(s);const r=D._readString(h,m);return m+=D._writeStringSize(r),n.push(new D(t,s,i,r)),m}}e.TextChange=D;function w(_,h){return _===null||_.length===0?h:new b(_,h).compress()}e.compressConsecutiveTextChanges=w;class b{constructor(h,m){this._prevEdits=h,this._currEdits=m,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let h=0,m=0,n=this._getPrev(h),t=this._getCurr(m);for(;h<this._prevLen||m<this._currLen;){if(n===null){this._acceptCurr(t),t=this._getCurr(++m);continue}if(t===null){this._acceptPrev(n),n=this._getPrev(++h);continue}if(t.oldEnd<=n.newPosition){this._acceptCurr(t),t=this._getCurr(++m);continue}if(n.newEnd<=t.oldPosition){this._acceptPrev(n),n=this._getPrev(++h);continue}if(t.oldPosition<n.newPosition){const[g,o]=b._splitCurr(t,n.newPosition-t.oldPosition);this._acceptCurr(g),t=o;continue}if(n.newPosition<t.oldPosition){const[g,o]=b._splitPrev(n,t.oldPosition-n.newPosition);this._acceptPrev(g),n=o;continue}let r,c;if(t.oldEnd===n.newEnd)r=n,c=t,n=this._getPrev(++h),t=this._getCurr(++m);else if(t.oldEnd<n.newEnd){const[g,o]=b._splitPrev(n,t.oldLength);r=g,c=t,n=o,t=this._getCurr(++m)}else{const[g,o]=b._splitCurr(t,n.newLength);r=n,c=g,n=this._getPrev(++h),t=o}this._result[this._resultLen++]=new D(r.oldPosition,r.oldText,c.newPosition,c.newText),this._prevDeltaOffset+=r.newLength-r.oldLength,this._currDeltaOffset+=c.newLength-c.oldLength}const i=b._merge(this._result);return b._removeNoOps(i)}_acceptCurr(h){this._result[this._resultLen++]=b._rebaseCurr(this._prevDeltaOffset,h),this._currDeltaOffset+=h.newLength-h.oldLength}_getCurr(h){return h<this._currLen?this._currEdits[h]:null}_acceptPrev(h){this._result[this._resultLen++]=b._rebasePrev(this._currDeltaOffset,h),this._prevDeltaOffset+=h.newLength-h.oldLength}_getPrev(h){return h<this._prevLen?this._prevEdits[h]:null}static _rebaseCurr(h,m){return new D(m.oldPosition-h,m.oldText,m.newPosition,m.newText)}static _rebasePrev(h,m){return new D(m.oldPosition,m.oldText,m.newPosition+h,m.newText)}static _splitPrev(h,m){const n=h.newText.substr(0,m),t=h.newText.substr(m);return[new D(h.oldPosition,h.oldText,h.newPosition,n),new D(h.oldEnd,"",h.newPosition+m,t)]}static _splitCurr(h,m){const n=h.oldText.substr(0,m),t=h.oldText.substr(m);return[new D(h.oldPosition,n,h.newPosition,h.newText),new D(h.oldPosition+m,t,h.newEnd,"")]}static _merge(h){if(h.length===0)return h;const m=[];let n=0,t=h[0];for(let i=1;i<h.length;i++){const s=h[i];t.oldEnd===s.oldPosition?t=new D(t.oldPosition,t.oldText+s.oldText,t.newPosition,t.newText+s.newText):(m[n++]=t,t=s)}return m[n++]=t,m}static _removeNoOps(h){if(h.length===0)return h;const m=[];let n=0;for(let t=0;t<h.length;t++){const i=h[t];i.oldText!==i.newText&&(m[n++]=i)}return m}}}),define(J[554],ee([1,0,278,87]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function y(D,w,b,_,h,m){if(Array.isArray(D)){let n=0;for(const t of D){const i=y(t,w,b,_,h,m);if(i===10)return i;i>n&&(n=i)}return n}else{if(typeof D=="string")return _?D==="*"?5:D===b?10:0:0;if(D){const{language:n,pattern:t,scheme:i,hasAccessToAllModels:s,notebookType:r}=D;if(!_&&!s)return 0;r&&h&&(w=h);let c=0;if(i)if(i===w.scheme)c=10;else if(i==="*")c=5;else return 0;if(n)if(n===b)c=10;else if(n==="*")c=Math.max(c,5);else return 0;if(r)if(r===m)c=10;else if(r==="*"&&m!==void 0)c=Math.max(c,5);else return 0;if(t){let g;if(typeof t=="string"?g=t:g=Object.assign(Object.assign({},t),{base:(0,k.normalize)(t.base)}),g===w.fsPath||(0,S.match)(g,w.fsPath))c=10;else return 0}return c}else return 0}}e.score=y}),define(J[555],ee([1,0,6,2,48,554]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function w(h){return typeof h=="string"?!1:Array.isArray(h)?h.every(w):!!h.exclusive}class b{constructor(m,n,t,i){this.uri=m,this.languageId=n,this.notebookUri=t,this.notebookType=i}equals(m){var n,t;return this.notebookType===m.notebookType&&this.languageId===m.languageId&&this.uri.toString()===m.uri.toString()&&((n=this.notebookUri)===null||n===void 0?void 0:n.toString())===((t=m.notebookUri)===null||t===void 0?void 0:t.toString())}}class _{constructor(m){this._notebookInfoResolver=m,this._clock=0,this._entries=[],this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event}register(m,n){let t={selector:m,provider:n,_score:-1,_time:this._clock++};return this._entries.push(t),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,k.toDisposable)(()=>{if(t){const i=this._entries.indexOf(t);i>=0&&(this._entries.splice(i,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),t=void 0)}})}has(m){return this.all(m).length>0}all(m){if(!m)return[];this._updateScores(m);const n=[];for(const t of this._entries)t._score>0&&n.push(t.provider);return n}ordered(m){const n=[];return this._orderedForEach(m,t=>n.push(t.provider)),n}orderedGroups(m){const n=[];let t,i;return this._orderedForEach(m,s=>{t&&i===s._score?t.push(s.provider):(i=s._score,t=[s.provider],n.push(t))}),n}_orderedForEach(m,n){this._updateScores(m);for(const t of this._entries)t._score>0&&n(t)}_updateScores(m){var n,t;const i=(n=this._notebookInfoResolver)===null||n===void 0?void 0:n.call(this,m.uri),s=i?new b(m.uri,m.getLanguageId(),i.uri,i.type):new b(m.uri,m.getLanguageId(),void 0,void 0);if(!(!((t=this._lastCandidate)===null||t===void 0)&&t.equals(s))){this._lastCandidate=s;for(const r of this._entries)if(r._score=(0,D.score)(r.selector,s.uri,s.languageId,(0,y.shouldSynchronizeModel)(m),s.notebookUri,s.notebookType),w(r.selector)&&r._score>0){for(const c of this._entries)c._score=0;r._score=1e3;break}this._entries.sort(_._compareByScoreAndTime)}}static _compareByScoreAndTime(m,n){return m._score<n._score?1:m._score>n._score?-1:m._time<n._time?1:m._time>n._time?-1:0}}e.LanguageFeatureRegistry=_}),define(J[218],ee([1,0,9,95,5]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class D{constructor(a,d,u,C,f,v){this._richEditBracketBrand=void 0,this.languageId=a,this.index=d,this.open=u,this.close=C,this.forwardRegex=f,this.reversedRegex=v,this._openSet=D._toSet(this.open),this._closeSet=D._toSet(this.close)}isOpen(a){return this._openSet.has(a)}isClose(a){return this._closeSet.has(a)}static _toSet(a){const d=new Set;for(const u of a)d.add(u);return d}}e.RichEditBracket=D;function w(l){const a=l.length;l=l.map(v=>[v[0].toLowerCase(),v[1].toLowerCase()]);const d=[];for(let v=0;v<a;v++)d[v]=v;const u=(v,p)=>{const[L,E]=v,[I,T]=p;return L===I||L===T||E===I||E===T},C=(v,p)=>{const L=Math.min(v,p),E=Math.max(v,p);for(let I=0;I<a;I++)d[I]===E&&(d[I]=L)};for(let v=0;v<a;v++){const p=l[v];for(let L=v+1;L<a;L++){const E=l[L];u(p,E)&&C(d[v],d[L])}}const f=[];for(let v=0;v<a;v++){const p=[],L=[];for(let E=0;E<a;E++)if(d[E]===v){const[I,T]=l[E];p.push(I),L.push(T)}p.length>0&&f.push({open:p,close:L})}return f}class b{constructor(a,d){this._richEditBracketsBrand=void 0;const u=w(d);this.brackets=u.map((C,f)=>new D(a,f,C.open,C.close,n(C.open,C.close,u,f),t(C.open,C.close,u,f))),this.forwardRegex=i(this.brackets),this.reversedRegex=s(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const C of this.brackets){for(const f of C.open)this.textIsBracket[f]=C,this.textIsOpenBracket[f]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,f.length);for(const f of C.close)this.textIsBracket[f]=C,this.textIsOpenBracket[f]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,f.length)}}}e.RichEditBrackets=b;function _(l,a,d,u){for(let C=0,f=a.length;C<f;C++){if(C===d)continue;const v=a[C];for(const p of v.open)p.indexOf(l)>=0&&u.push(p);for(const p of v.close)p.indexOf(l)>=0&&u.push(p)}}function h(l,a){return l.length-a.length}function m(l){if(l.length<=1)return l;const a=[],d=new Set;for(const u of l)d.has(u)||(a.push(u),d.add(u));return a}function n(l,a,d,u){let C=[];C=C.concat(l),C=C.concat(a);for(let f=0,v=C.length;f<v;f++)_(C[f],d,u,C);return C=m(C),C.sort(h),C.reverse(),c(C)}function t(l,a,d,u){let C=[];C=C.concat(l),C=C.concat(a);for(let f=0,v=C.length;f<v;f++)_(C[f],d,u,C);return C=m(C),C.sort(h),C.reverse(),c(C.map(g))}function i(l){let a=[];for(const d of l){for(const u of d.open)a.push(u);for(const u of d.close)a.push(u)}return a=m(a),c(a)}function s(l){let a=[];for(const d of l){for(const u of d.open)a.push(u);for(const u of d.close)a.push(u)}return a=m(a),c(a.map(g))}function r(l){const a=/^[\\w ]+$/.test(l);return l=S.escapeRegExpCharacters(l),a?`\\\\b${l}\\\\b`:l}function c(l){const a=`(${l.map(r).join(")|(")})`;return S.createRegExp(a,!0)}const g=function(){function l(u){const C=new Uint16Array(u.length);let f=0;for(let v=u.length-1;v>=0;v--)C[f++]=u.charCodeAt(v);return k.getPlatformTextDecoder().decode(C)}let a=null,d=null;return function(C){return a!==C&&(a=C,d=l(a)),d}}();class o{static _findPrevBracketInText(a,d,u,C){const f=u.match(a);if(!f)return null;const v=u.length-(f.index||0),p=f[0].length,L=C+v;return new y.Range(d,L-p+1,d,L+1)}static findPrevBracketInRange(a,d,u,C,f){const p=g(u).substring(u.length-f,u.length-C);return this._findPrevBracketInText(a,d,p,C)}static findNextBracketInText(a,d,u,C){const f=u.match(a);if(!f)return null;const v=f.index||0,p=f[0].length;if(p===0)return null;const L=C+v;return new y.Range(d,L+1,d,L+1+p)}static findNextBracketInRange(a,d,u,C,f){const v=u.substring(C,f);return this.findNextBracketInText(a,d,v,C)}}e.BracketsUtils=o}),define(J[556],ee([1,0,16,120,218]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class D{constructor(b){this._richEditBrackets=b}getElectricCharacters(){const b=[];if(this._richEditBrackets)for(const _ of this._richEditBrackets.brackets)for(const h of _.close){const m=h.charAt(h.length-1);b.push(m)}return(0,S.distinct)(b)}onElectricCharacter(b,_,h){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const m=_.findTokenIndexAtOffset(h-1);if((0,k.ignoreBracketsInToken)(_.getStandardTokenType(m)))return null;const n=this._richEditBrackets.reversedRegex,t=_.getLineContent().substring(0,h-1)+b,i=y.BracketsUtils.findPrevBracketInRange(n,1,t,0,t.length);if(!i)return null;const s=t.substring(i.startColumn-1,i.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[s])return null;const c=_.getActualLineContentBefore(i.startColumn-1);return/^\\s*$/.test(c)?{matchOpenBracket:s}:null}}e.BracketElectricCharacterSupport=D}),define(J[557],ee([1,0,6,2,5,479,191,258,85,257,121,192,16,470]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class s extends k.Disposable{didLanguageChange(d){return this.brackets.didLanguageChange(d)}constructor(d,u){if(super(),this.textModel=d,this.getLanguageConfiguration=u,this.didChangeEmitter=new S.Emitter,this.denseKeyProvider=new m.DenseKeyProvider,this.brackets=new b.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],d.tokenization.hasTokens)d.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const C=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),f=new n.FastTokenizer(this.textModel.getValue(),C);this.initialAstWithoutTokens=(0,h.parseDocument)(f,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const d=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,d||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:d}){const u=d.map(C=>new w.TextEditInfo((0,_.toLength)(C.fromLineNumber-1,0),(0,_.toLength)(C.toLineNumber,0),(0,_.toLength)(C.toLineNumber-C.fromLineNumber+1,0)));this.handleEdits(u,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(d){const u=d.changes.map(C=>{const f=y.Range.lift(C.range);return new w.TextEditInfo((0,_.positionToLength)(f.getStartPosition()),(0,_.positionToLength)(f.getEndPosition()),(0,_.lengthOfString)(C.text))}).reverse();this.handleEdits(u,!1)}handleEdits(d,u){const C=(0,i.combineTextEditInfos)(this.queuedTextEdits,d);this.queuedTextEdits=C,this.initialAstWithoutTokens&&!u&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,i.combineTextEditInfos)(this.queuedTextEditsForInitialAstWithoutTokens,d))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(d,u,C){const v=u,p=new n.TextBufferTokenizer(this.textModel,this.brackets);return(0,h.parseDocument)(p,d,v,C)}getBracketsInRange(d,u){this.flushQueue();const C=(0,_.toLength)(d.startLineNumber-1,d.startColumn-1),f=(0,_.toLength)(d.endLineNumber-1,d.endColumn-1);return new t.CallbackIterable(v=>{const p=this.initialAstWithoutTokens||this.astWithTokens;g(p,_.lengthZero,p.length,C,f,v,0,0,new Map,u)})}getBracketPairsInRange(d,u){this.flushQueue();const C=(0,_.positionToLength)(d.getStartPosition()),f=(0,_.positionToLength)(d.getEndPosition());return new t.CallbackIterable(v=>{const p=this.initialAstWithoutTokens||this.astWithTokens,L=new o(v,u,this.textModel);l(p,_.lengthZero,p.length,C,f,L,0,new Map)})}getFirstBracketAfter(d){this.flushQueue();const u=this.initialAstWithoutTokens||this.astWithTokens;return c(u,_.lengthZero,u.length,(0,_.positionToLength)(d))}getFirstBracketBefore(d){this.flushQueue();const u=this.initialAstWithoutTokens||this.astWithTokens;return r(u,_.lengthZero,u.length,(0,_.positionToLength)(d))}}e.BracketPairsTree=s;function r(a,d,u,C){if(a.kind===4||a.kind===2){const f=[];for(const v of a.children)u=(0,_.lengthAdd)(d,v.length),f.push({nodeOffsetStart:d,nodeOffsetEnd:u}),d=u;for(let v=f.length-1;v>=0;v--){const{nodeOffsetStart:p,nodeOffsetEnd:L}=f[v];if((0,_.lengthLessThan)(p,C)){const E=r(a.children[v],p,L,C);if(E)return E}}return null}else{if(a.kind===3)return null;if(a.kind===1){const f=(0,_.lengthsToRange)(d,u);return{bracketInfo:a.bracketInfo,range:f}}}return null}function c(a,d,u,C){if(a.kind===4||a.kind===2){for(const f of a.children){if(u=(0,_.lengthAdd)(d,f.length),(0,_.lengthLessThan)(C,u)){const v=c(f,d,u,C);if(v)return v}d=u}return null}else{if(a.kind===3)return null;if(a.kind===1){const f=(0,_.lengthsToRange)(d,u);return{bracketInfo:a.bracketInfo,range:f}}}return null}function g(a,d,u,C,f,v,p,L,E,I,T=!1){if(p>200)return!0;e:for(;;)switch(a.kind){case 4:{const F=a.childrenLength;for(let R=0;R<F;R++){const M=a.getChild(R);if(M){if(u=(0,_.lengthAdd)(d,M.length),(0,_.lengthLessThanEqual)(d,f)&&(0,_.lengthGreaterThanEqual)(u,C)){if((0,_.lengthGreaterThanEqual)(u,f)){a=M;continue e}if(!g(M,d,u,C,f,v,p,0,E,I))return!1}d=u}}return!0}case 2:{const F=!I||!a.closingBracket||a.closingBracket.bracketInfo.closesColorized(a.openingBracket.bracketInfo);let R=0;if(E){let N=E.get(a.openingBracket.text);N===void 0&&(N=0),R=N,F&&(N++,E.set(a.openingBracket.text,N))}const M=a.childrenLength;for(let N=0;N<M;N++){const A=a.getChild(N);if(A){if(u=(0,_.lengthAdd)(d,A.length),(0,_.lengthLessThanEqual)(d,f)&&(0,_.lengthGreaterThanEqual)(u,C)){if((0,_.lengthGreaterThanEqual)(u,f)&&A.kind!==1){a=A,F?(p++,L=R+1):L=R;continue e}if((F||A.kind!==1||!a.closingBracket)&&!g(A,d,u,C,f,v,F?p+1:p,F?R+1:R,E,I,!a.closingBracket))return!1}d=u}}return E?.set(a.openingBracket.text,R),!0}case 3:{const F=(0,_.lengthsToRange)(d,u);return v(new D.BracketInfo(F,p-1,0,!0))}case 1:{const F=(0,_.lengthsToRange)(d,u);return v(new D.BracketInfo(F,p-1,L-1,T))}case 0:return!0}}class o{constructor(d,u,C){this.push=d,this.includeMinIndentation=u,this.textModel=C}}function l(a,d,u,C,f,v,p,L){var E;if(p>200)return!0;let I=!0;if(a.kind===2){let T=0;if(L){let M=L.get(a.openingBracket.text);M===void 0&&(M=0),T=M,M++,L.set(a.openingBracket.text,M)}const F=(0,_.lengthAdd)(d,a.openingBracket.length);let R=-1;if(v.includeMinIndentation&&(R=a.computeMinIndentation(d,v.textModel)),I=v.push(new D.BracketPairWithMinIndentationInfo((0,_.lengthsToRange)(d,u),(0,_.lengthsToRange)(d,F),a.closingBracket?(0,_.lengthsToRange)((0,_.lengthAdd)(F,((E=a.child)===null||E===void 0?void 0:E.length)||_.lengthZero),u):void 0,p,T,a,R)),d=F,I&&a.child){const M=a.child;if(u=(0,_.lengthAdd)(d,M.length),(0,_.lengthLessThanEqual)(d,f)&&(0,_.lengthGreaterThanEqual)(u,C)&&(I=l(M,d,u,C,f,v,p+1,L),!I))return!1}L?.set(a.openingBracket.text,T)}else{let T=d;for(const F of a.children){const R=T;if(T=(0,_.lengthAdd)(T,F.length),(0,_.lengthLessThanEqual)(R,f)&&(0,_.lengthLessThanEqual)(C,T)&&(I=l(F,R,T,C,f,v,p,L),!I))return!1}}return I}}),define(J[558],ee([1,0,16,6,2,5,120,218,557]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class h extends y.Disposable{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(r,c){super(),this.textModel=r,this.languageConfigurationService=c,this.bracketPairsTree=this._register(new y.MutableDisposable),this.onDidChangeEmitter=new k.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(g=>{var o;(!g.languageId||!((o=this.bracketPairsTree.value)===null||o===void 0)&&o.object.didLanguageChange(g.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(r){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(r){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(r){var c;(c=this.bracketPairsTree.value)===null||c===void 0||c.object.handleContentChanged(r)}handleDidChangeBackgroundTokenizationState(){var r;(r=this.bracketPairsTree.value)===null||r===void 0||r.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(r){var c;(c=this.bracketPairsTree.value)===null||c===void 0||c.object.handleDidChangeTokens(r)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const r=new y.DisposableStore;this.bracketPairsTree.value=m(r.add(new _.BracketPairsTree(this.textModel,c=>this.languageConfigurationService.getLanguageConfiguration(c))),r),r.add(this.bracketPairsTree.value.object.onDidChange(c=>this.onDidChangeEmitter.fire(c))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(r){var c;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((c=this.bracketPairsTree.value)===null||c===void 0?void 0:c.object.getBracketPairsInRange(r,!1))||S.CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(r){var c;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((c=this.bracketPairsTree.value)===null||c===void 0?void 0:c.object.getBracketPairsInRange(r,!0))||S.CallbackIterable.empty}getBracketsInRange(r,c=!1){var g;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((g=this.bracketPairsTree.value)===null||g===void 0?void 0:g.object.getBracketsInRange(r,c))||S.CallbackIterable.empty}findMatchingBracketUp(r,c,g){const o=this.textModel.validatePosition(c),l=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column);if(this.canBuildAST){const a=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew.getClosingBracketInfo(r);if(!a)return null;const d=this.getBracketPairsInRange(D.Range.fromPositions(c,c)).findLast(u=>a.closes(u.openingBracketInfo));return d?d.openingBracketRange:null}else{const a=r.toLowerCase(),d=this.languageConfigurationService.getLanguageConfiguration(l).brackets;if(!d)return null;const u=d.textIsBracket[a];return u?i(this._findMatchingBracketUp(u,o,n(g))):null}}matchBracket(r,c){if(this.canBuildAST){const g=this.getBracketPairsInRange(D.Range.fromPositions(r,r)).filter(o=>o.closingBracketRange!==void 0&&(o.openingBracketRange.containsPosition(r)||o.closingBracketRange.containsPosition(r))).findLastMaxBy((0,S.compareBy)(o=>o.openingBracketRange.containsPosition(r)?o.openingBracketRange:o.closingBracketRange,D.Range.compareRangesUsingStarts));return g?[g.openingBracketRange,g.closingBracketRange]:null}else{const g=n(c);return this._matchBracket(this.textModel.validatePosition(r),g)}}_establishBracketSearchOffsets(r,c,g,o){const l=c.getCount(),a=c.getLanguageId(o);let d=Math.max(0,r.column-1-g.maxBracketLength);for(let C=o-1;C>=0;C--){const f=c.getEndOffset(C);if(f<=d)break;if((0,w.ignoreBracketsInToken)(c.getStandardTokenType(C))||c.getLanguageId(C)!==a){d=f;break}}let u=Math.min(c.getLineContent().length,r.column-1+g.maxBracketLength);for(let C=o+1;C<l;C++){const f=c.getStartOffset(C);if(f>=u)break;if((0,w.ignoreBracketsInToken)(c.getStandardTokenType(C))||c.getLanguageId(C)!==a){u=f;break}}return{searchStartOffset:d,searchEndOffset:u}}_matchBracket(r,c){const g=r.lineNumber,o=this.textModel.tokenization.getLineTokens(g),l=this.textModel.getLineContent(g),a=o.findTokenIndexAtOffset(r.column-1);if(a<0)return null;const d=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(a)).brackets;if(d&&!(0,w.ignoreBracketsInToken)(o.getStandardTokenType(a))){let{searchStartOffset:u,searchEndOffset:C}=this._establishBracketSearchOffsets(r,o,d,a),f=null;for(;;){const v=b.BracketsUtils.findNextBracketInRange(d.forwardRegex,g,l,u,C);if(!v)break;if(v.startColumn<=r.column&&r.column<=v.endColumn){const p=l.substring(v.startColumn-1,v.endColumn-1).toLowerCase(),L=this._matchFoundBracket(v,d.textIsBracket[p],d.textIsOpenBracket[p],c);if(L){if(L instanceof t)return null;f=L}}u=v.endColumn-1}if(f)return f}if(a>0&&o.getStartOffset(a)===r.column-1){const u=a-1,C=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(u)).brackets;if(C&&!(0,w.ignoreBracketsInToken)(o.getStandardTokenType(u))){const{searchStartOffset:f,searchEndOffset:v}=this._establishBracketSearchOffsets(r,o,C,u),p=b.BracketsUtils.findPrevBracketInRange(C.reversedRegex,g,l,f,v);if(p&&p.startColumn<=r.column&&r.column<=p.endColumn){const L=l.substring(p.startColumn-1,p.endColumn-1).toLowerCase(),E=this._matchFoundBracket(p,C.textIsBracket[L],C.textIsOpenBracket[L],c);if(E)return E instanceof t?null:E}}}return null}_matchFoundBracket(r,c,g,o){if(!c)return null;const l=g?this._findMatchingBracketDown(c,r.getEndPosition(),o):this._findMatchingBracketUp(c,r.getStartPosition(),o);return l?l instanceof t?l:[r,l]:null}_findMatchingBracketUp(r,c,g){const o=r.languageId,l=r.reversedRegex;let a=-1,d=0;const u=(C,f,v,p)=>{for(;;){if(g&&++d%100===0&&!g())return t.INSTANCE;const L=b.BracketsUtils.findPrevBracketInRange(l,C,f,v,p);if(!L)break;const E=f.substring(L.startColumn-1,L.endColumn-1).toLowerCase();if(r.isOpen(E)?a++:r.isClose(E)&&a--,a===0)return L;p=L.startColumn-1}return null};for(let C=c.lineNumber;C>=1;C--){const f=this.textModel.tokenization.getLineTokens(C),v=f.getCount(),p=this.textModel.getLineContent(C);let L=v-1,E=p.length,I=p.length;C===c.lineNumber&&(L=f.findTokenIndexAtOffset(c.column-1),E=c.column-1,I=c.column-1);let T=!0;for(;L>=0;L--){const F=f.getLanguageId(L)===o&&!(0,w.ignoreBracketsInToken)(f.getStandardTokenType(L));if(F)T?E=f.getStartOffset(L):(E=f.getStartOffset(L),I=f.getEndOffset(L));else if(T&&E!==I){const R=u(C,p,E,I);if(R)return R}T=F}if(T&&E!==I){const F=u(C,p,E,I);if(F)return F}}return null}_findMatchingBracketDown(r,c,g){const o=r.languageId,l=r.forwardRegex;let a=1,d=0;const u=(f,v,p,L)=>{for(;;){if(g&&++d%100===0&&!g())return t.INSTANCE;const E=b.BracketsUtils.findNextBracketInRange(l,f,v,p,L);if(!E)break;const I=v.substring(E.startColumn-1,E.endColumn-1).toLowerCase();if(r.isOpen(I)?a++:r.isClose(I)&&a--,a===0)return E;p=E.endColumn-1}return null},C=this.textModel.getLineCount();for(let f=c.lineNumber;f<=C;f++){const v=this.textModel.tokenization.getLineTokens(f),p=v.getCount(),L=this.textModel.getLineContent(f);let E=0,I=0,T=0;f===c.lineNumber&&(E=v.findTokenIndexAtOffset(c.column-1),I=c.column-1,T=c.column-1);let F=!0;for(;E<p;E++){const R=v.getLanguageId(E)===o&&!(0,w.ignoreBracketsInToken)(v.getStandardTokenType(E));if(R)F||(I=v.getStartOffset(E)),T=v.getEndOffset(E);else if(F&&I!==T){const M=u(f,L,I,T);if(M)return M}F=R}if(F&&I!==T){const R=u(f,L,I,T);if(R)return R}}return null}findPrevBracket(r){var c;const g=this.textModel.validatePosition(r);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((c=this.bracketPairsTree.value)===null||c===void 0?void 0:c.object.getFirstBracketBefore(g))||null;let o=null,l=null,a=null;for(let d=g.lineNumber;d>=1;d--){const u=this.textModel.tokenization.getLineTokens(d),C=u.getCount(),f=this.textModel.getLineContent(d);let v=C-1,p=f.length,L=f.length;if(d===g.lineNumber){v=u.findTokenIndexAtOffset(g.column-1),p=g.column-1,L=g.column-1;const I=u.getLanguageId(v);o!==I&&(o=I,l=this.languageConfigurationService.getLanguageConfiguration(o).brackets,a=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let E=!0;for(;v>=0;v--){const I=u.getLanguageId(v);if(o!==I){if(l&&a&&E&&p!==L){const F=b.BracketsUtils.findPrevBracketInRange(l.reversedRegex,d,f,p,L);if(F)return this._toFoundBracket(a,F);E=!1}o=I,l=this.languageConfigurationService.getLanguageConfiguration(o).brackets,a=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew}const T=!!l&&!(0,w.ignoreBracketsInToken)(u.getStandardTokenType(v));if(T)E?p=u.getStartOffset(v):(p=u.getStartOffset(v),L=u.getEndOffset(v));else if(a&&l&&E&&p!==L){const F=b.BracketsUtils.findPrevBracketInRange(l.reversedRegex,d,f,p,L);if(F)return this._toFoundBracket(a,F)}E=T}if(a&&l&&E&&p!==L){const I=b.BracketsUtils.findPrevBracketInRange(l.reversedRegex,d,f,p,L);if(I)return this._toFoundBracket(a,I)}}return null}findNextBracket(r){var c;const g=this.textModel.validatePosition(r);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((c=this.bracketPairsTree.value)===null||c===void 0?void 0:c.object.getFirstBracketAfter(g))||null;const o=this.textModel.getLineCount();let l=null,a=null,d=null;for(let u=g.lineNumber;u<=o;u++){const C=this.textModel.tokenization.getLineTokens(u),f=C.getCount(),v=this.textModel.getLineContent(u);let p=0,L=0,E=0;if(u===g.lineNumber){p=C.findTokenIndexAtOffset(g.column-1),L=g.column-1,E=g.column-1;const T=C.getLanguageId(p);l!==T&&(l=T,a=this.languageConfigurationService.getLanguageConfiguration(l).brackets,d=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew)}let I=!0;for(;p<f;p++){const T=C.getLanguageId(p);if(l!==T){if(d&&a&&I&&L!==E){const R=b.BracketsUtils.findNextBracketInRange(a.forwardRegex,u,v,L,E);if(R)return this._toFoundBracket(d,R);I=!1}l=T,a=this.languageConfigurationService.getLanguageConfiguration(l).brackets,d=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew}const F=!!a&&!(0,w.ignoreBracketsInToken)(C.getStandardTokenType(p));if(F)I||(L=C.getStartOffset(p)),E=C.getEndOffset(p);else if(d&&a&&I&&L!==E){const R=b.BracketsUtils.findNextBracketInRange(a.forwardRegex,u,v,L,E);if(R)return this._toFoundBracket(d,R)}I=F}if(d&&a&&I&&L!==E){const T=b.BracketsUtils.findNextBracketInRange(a.forwardRegex,u,v,L,E);if(T)return this._toFoundBracket(d,T)}}return null}findEnclosingBrackets(r,c){const g=this.textModel.validatePosition(r);if(this.canBuildAST){const L=D.Range.fromPositions(g),E=this.getBracketPairsInRange(D.Range.fromPositions(g,g)).findLast(I=>I.closingBracketRange!==void 0&&I.range.strictContainsRange(L));return E?[E.openingBracketRange,E.closingBracketRange]:null}const o=n(c),l=this.textModel.getLineCount(),a=new Map;let d=[];const u=(L,E)=>{if(!a.has(L)){const I=[];for(let T=0,F=E?E.brackets.length:0;T<F;T++)I[T]=0;a.set(L,I)}d=a.get(L)};let C=0;const f=(L,E,I,T,F)=>{for(;;){if(o&&++C%100===0&&!o())return t.INSTANCE;const R=b.BracketsUtils.findNextBracketInRange(L.forwardRegex,E,I,T,F);if(!R)break;const M=I.substring(R.startColumn-1,R.endColumn-1).toLowerCase(),N=L.textIsBracket[M];if(N&&(N.isOpen(M)?d[N.index]++:N.isClose(M)&&d[N.index]--,d[N.index]===-1))return this._matchFoundBracket(R,N,!1,o);T=R.endColumn-1}return null};let v=null,p=null;for(let L=g.lineNumber;L<=l;L++){const E=this.textModel.tokenization.getLineTokens(L),I=E.getCount(),T=this.textModel.getLineContent(L);let F=0,R=0,M=0;if(L===g.lineNumber){F=E.findTokenIndexAtOffset(g.column-1),R=g.column-1,M=g.column-1;const A=E.getLanguageId(F);v!==A&&(v=A,p=this.languageConfigurationService.getLanguageConfiguration(v).brackets,u(v,p))}let N=!0;for(;F<I;F++){const A=E.getLanguageId(F);if(v!==A){if(p&&N&&R!==M){const x=f(p,L,T,R,M);if(x)return i(x);N=!1}v=A,p=this.languageConfigurationService.getLanguageConfiguration(v).brackets,u(v,p)}const P=!!p&&!(0,w.ignoreBracketsInToken)(E.getStandardTokenType(F));if(P)N||(R=E.getStartOffset(F)),M=E.getEndOffset(F);else if(p&&N&&R!==M){const x=f(p,L,T,R,M);if(x)return i(x)}N=P}if(p&&N&&R!==M){const A=f(p,L,T,R,M);if(A)return i(A)}}return null}_toFoundBracket(r,c){if(!c)return null;let g=this.textModel.getValueInRange(c);g=g.toLowerCase();const o=r.getBracketInfo(g);return o?{range:c,bracketInfo:o}:null}}e.BracketPairsTextModelPart=h;function m(s,r){return{object:s,dispose:()=>r?.dispose()}}function n(s){if(typeof s>"u")return()=>!0;{const r=Date.now();return()=>Date.now()-r<=s}}class t{constructor(){this._searchCanceledBrand=void 0}}t.INSTANCE=new t;function i(s){return s instanceof t?null:s}}),define(J[295],ee([1,0,6,9,5,48,261,116,294,2]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class m extends h.Disposable{constructor(t,i,s,r,c,g,o){super(),this._onDidChangeContent=this._register(new S.Emitter),this._BOM=i,this._mightContainNonBasicASCII=!g,this._mightContainRTL=r,this._mightContainUnusualLineTerminators=c,this._pieceTree=new w.PieceTreeBase(t,s,o)}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(t){return this._pieceTree.createSnapshot(t?this._BOM:"")}getOffsetAt(t,i){return this._pieceTree.getOffsetAt(t,i)}getPositionAt(t){return this._pieceTree.getPositionAt(t)}getRangeAt(t,i){const s=t+i,r=this.getPositionAt(t),c=this.getPositionAt(s);return new y.Range(r.lineNumber,r.column,c.lineNumber,c.column)}getValueInRange(t,i=0){if(t.isEmpty())return"";const s=this._getEndOfLine(i);return this._pieceTree.getValueInRange(t,s)}getValueLengthInRange(t,i=0){if(t.isEmpty())return 0;if(t.startLineNumber===t.endLineNumber)return t.endColumn-t.startColumn;const s=this.getOffsetAt(t.startLineNumber,t.startColumn),r=this.getOffsetAt(t.endLineNumber,t.endColumn);let c=0;const g=this._getEndOfLine(i),o=this.getEOL();if(g.length!==o.length){const l=g.length-o.length,a=t.endLineNumber-t.startLineNumber;c=l*a}return r-s+c}getCharacterCountInRange(t,i=0){if(this._mightContainNonBasicASCII){let s=0;const r=t.startLineNumber,c=t.endLineNumber;for(let g=r;g<=c;g++){const o=this.getLineContent(g),l=g===r?t.startColumn-1:0,a=g===c?t.endColumn-1:o.length;for(let d=l;d<a;d++)k.isHighSurrogate(o.charCodeAt(d))?(s=s+1,d=d+1):s=s+1}return s+=this._getEndOfLine(i).length*(c-r),s}return this.getValueLengthInRange(t,i)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(t){return this._pieceTree.getLineContent(t)}getLineCharCode(t,i){return this._pieceTree.getLineCharCode(t,i)}getLineLength(t){return this._pieceTree.getLineLength(t)}getLineFirstNonWhitespaceColumn(t){const i=k.firstNonWhitespaceIndex(this.getLineContent(t));return i===-1?0:i+1}getLineLastNonWhitespaceColumn(t){const i=k.lastNonWhitespaceIndex(this.getLineContent(t));return i===-1?0:i+2}_getEndOfLine(t){switch(t){case 1:return`\n`;case 2:return`\\r\n`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(t){this._pieceTree.setEOL(t)}applyEdits(t,i,s){let r=this._mightContainRTL,c=this._mightContainUnusualLineTerminators,g=this._mightContainNonBasicASCII,o=!0,l=[];for(let p=0;p<t.length;p++){const L=t[p];o&&L._isTracked&&(o=!1);const E=L.range;if(L.text){let M=!0;g||(M=!k.isBasicASCII(L.text),g=M),!r&&M&&(r=k.containsRTL(L.text)),!c&&M&&(c=k.containsUnusualLineTerminators(L.text))}let I="",T=0,F=0,R=0;if(L.text){let M;[T,F,R,M]=(0,b.countEOL)(L.text);const N=this.getEOL();M===0||M===(N===`\\r\n`?2:1)?I=L.text:I=L.text.replace(/\\r\\n|\\r|\\n/g,N)}l[p]={sortIndex:p,identifier:L.identifier||null,range:E,rangeOffset:this.getOffsetAt(E.startLineNumber,E.startColumn),rangeLength:this.getValueLengthInRange(E),text:I,eolCount:T,firstLineLength:F,lastLineLength:R,forceMoveMarkers:!!L.forceMoveMarkers,isAutoWhitespaceEdit:L.isAutoWhitespaceEdit||!1}}l.sort(m._sortOpsAscending);let a=!1;for(let p=0,L=l.length-1;p<L;p++){const E=l[p].range.getEndPosition(),I=l[p+1].range.getStartPosition();if(I.isBeforeOrEqual(E)){if(I.isBefore(E))throw new Error("Overlapping ranges are not allowed!");a=!0}}o&&(l=this._reduceOperations(l));const d=s||i?m._getInverseEditRanges(l):[],u=[];if(i)for(let p=0;p<l.length;p++){const L=l[p],E=d[p];if(L.isAutoWhitespaceEdit&&L.range.isEmpty())for(let I=E.startLineNumber;I<=E.endLineNumber;I++){let T="";I===E.startLineNumber&&(T=this.getLineContent(L.range.startLineNumber),k.firstNonWhitespaceIndex(T)!==-1)||u.push({lineNumber:I,oldContent:T})}}let C=null;if(s){let p=0;C=[];for(let L=0;L<l.length;L++){const E=l[L],I=d[L],T=this.getValueInRange(E.range),F=E.rangeOffset+p;p+=E.text.length-T.length,C[L]={sortIndex:E.sortIndex,identifier:E.identifier,range:I,text:T,textChange:new _.TextChange(E.rangeOffset,T,F,E.text)}}a||C.sort((L,E)=>L.sortIndex-E.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=c,this._mightContainNonBasicASCII=g;const f=this._doApplyEdits(l);let v=null;if(i&&u.length>0){u.sort((p,L)=>L.lineNumber-p.lineNumber),v=[];for(let p=0,L=u.length;p<L;p++){const E=u[p].lineNumber;if(p>0&&u[p-1].lineNumber===E)continue;const I=u[p].oldContent,T=this.getLineContent(E);T.length===0||T===I||k.firstNonWhitespaceIndex(T)!==-1||v.push(E)}}return this._onDidChangeContent.fire(),new D.ApplyEditsResult(C,f,v)}_reduceOperations(t){return t.length<1e3?t:[this._toSingleEditOperation(t)]}_toSingleEditOperation(t){let i=!1;const s=t[0].range,r=t[t.length-1].range,c=new y.Range(s.startLineNumber,s.startColumn,r.endLineNumber,r.endColumn);let g=s.startLineNumber,o=s.startColumn;const l=[];for(let f=0,v=t.length;f<v;f++){const p=t[f],L=p.range;i=i||p.forceMoveMarkers,l.push(this.getValueInRange(new y.Range(g,o,L.startLineNumber,L.startColumn))),p.text.length>0&&l.push(p.text),g=L.endLineNumber,o=L.endColumn}const a=l.join(""),[d,u,C]=(0,b.countEOL)(a);return{sortIndex:0,identifier:t[0].identifier,range:c,rangeOffset:this.getOffsetAt(c.startLineNumber,c.startColumn),rangeLength:this.getValueLengthInRange(c,0),text:a,eolCount:d,firstLineLength:u,lastLineLength:C,forceMoveMarkers:i,isAutoWhitespaceEdit:!1}}_doApplyEdits(t){t.sort(m._sortOpsDescending);const i=[];for(let s=0;s<t.length;s++){const r=t[s],c=r.range.startLineNumber,g=r.range.startColumn,o=r.range.endLineNumber,l=r.range.endColumn;if(c===o&&g===l&&r.text.length===0)continue;r.text?(this._pieceTree.delete(r.rangeOffset,r.rangeLength),this._pieceTree.insert(r.rangeOffset,r.text,!0)):this._pieceTree.delete(r.rangeOffset,r.rangeLength);const a=new y.Range(c,g,o,l);i.push({range:a,rangeLength:r.rangeLength,text:r.text,rangeOffset:r.rangeOffset,forceMoveMarkers:r.forceMoveMarkers})}return i}findMatchesLineByLine(t,i,s,r){return this._pieceTree.findMatchesLineByLine(t,i,s,r)}static _getInverseEditRanges(t){const i=[];let s=0,r=0,c=null;for(let g=0,o=t.length;g<o;g++){const l=t[g];let a,d;c?c.range.endLineNumber===l.range.startLineNumber?(a=s,d=r+(l.range.startColumn-c.range.endColumn)):(a=s+(l.range.startLineNumber-c.range.endLineNumber),d=l.range.startColumn):(a=l.range.startLineNumber,d=l.range.startColumn);let u;if(l.text.length>0){const C=l.eolCount+1;C===1?u=new y.Range(a,d,a,d+l.firstLineLength):u=new y.Range(a,d,a+C-1,l.lastLineLength+1)}else u=new y.Range(a,d,a,d);s=u.endLineNumber,r=u.endColumn,i.push(u),c=l}return i}static _sortOpsAscending(t,i){const s=y.Range.compareRangesUsingEnds(t.range,i.range);return s===0?t.sortIndex-i.sortIndex:s}static _sortOpsDescending(t,i){const s=y.Range.compareRangesUsingEnds(t.range,i.range);return s===0?i.sortIndex-t.sortIndex:-s}}e.PieceTreeTextBuffer=m}),define(J[559],ee([1,0,9,261,295]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=void 0;class D{constructor(_,h,m,n,t,i,s,r,c){this._chunks=_,this._bom=h,this._cr=m,this._lf=n,this._crlf=t,this._containsRTL=i,this._containsUnusualLineTerminators=s,this._isBasicASCII=r,this._normalizeEOL=c}_getEOL(_){const h=this._cr+this._lf+this._crlf,m=this._cr+this._crlf;return h===0?_===1?`\n`:`\\r\n`:m>h/2?`\\r\n`:`\n`}create(_){const h=this._getEOL(_),m=this._chunks;if(this._normalizeEOL&&(h===`\\r\n`&&(this._cr>0||this._lf>0)||h===`\n`&&(this._cr>0||this._crlf>0)))for(let t=0,i=m.length;t<i;t++){const s=m[t].buffer.replace(/\\r\\n|\\r|\\n/g,h),r=(0,k.createLineStartsFast)(s);m[t]=new k.StringBuffer(s,r)}const n=new y.PieceTreeTextBuffer(m,this._bom,h,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class w{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(_){if(_.length===0)return;this.chunks.length===0&&S.startsWithUTF8BOM(_)&&(this.BOM=S.UTF8_BOM_CHARACTER,_=_.substr(1));const h=_.charCodeAt(_.length-1);h===13||h>=55296&&h<=56319?(this._acceptChunk1(_.substr(0,_.length-1),!1),this._hasPreviousChar=!0,this._previousChar=h):(this._acceptChunk1(_,!1),this._hasPreviousChar=!1,this._previousChar=h)}_acceptChunk1(_,h){!h&&_.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+_):this._acceptChunk2(_))}_acceptChunk2(_){const h=(0,k.createLineStarts)(this._tmpLineStarts,_);this.chunks.push(new k.StringBuffer(_,h.lineStarts)),this.cr+=h.cr,this.lf+=h.lf,this.crlf+=h.crlf,h.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=S.containsRTL(_)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=S.containsUnusualLineTerminators(_)))}finish(_=!0){return this._finish(),new D(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,_)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const _=this.chunks[this.chunks.length-1];_.buffer+=String.fromCharCode(this._previousChar);const h=(0,k.createLineStartsFast)(_.buffer);_.lineStarts=h,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=w}),define(J[560],ee([1,0,130,17]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function y(_){for(let h=0,m=_.length;h<m;h+=4){const n=_[h+0],t=_[h+1],i=_[h+2],s=_[h+3];_[h+0]=s,_[h+1]=i,_[h+2]=t,_[h+3]=n}}function D(_){const h=new Uint8Array(_.buffer,_.byteOffset,_.length*4);return k.isLittleEndian()||y(h),S.VSBuffer.wrap(h)}function w(_){const h=new Uint32Array(b(_));let m=0;if(h[m++]=_.id,_.type==="full")h[m++]=1,h[m++]=_.data.length,h.set(_.data,m),m+=_.data.length;else{h[m++]=2,h[m++]=_.deltas.length;for(const n of _.deltas)h[m++]=n.start,h[m++]=n.deleteCount,n.data?(h[m++]=n.data.length,h.set(n.data,m),m+=n.data.length):h[m++]=0}return D(h)}e.encodeSemanticTokensDto=w;function b(_){let h=0;if(h+=1+1,_.type==="full")h+=1+_.data.length;else{h+=1,h+=(1+1+1)*_.deltas.length;for(const m of _.deltas)m.data&&(h+=m.data.length)}return h}}),define(J[561],ee([1,0,6,2]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=void 0;class y{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(b){this._onDidChange.fire({changedLanguages:b,changedColorMap:!1})}register(b,_){return this._tokenizationSupports.set(b,_),this.handleChange([b]),(0,k.toDisposable)(()=>{this._tokenizationSupports.get(b)===_&&(this._tokenizationSupports.delete(b),this.handleChange([b]))})}get(b){return this._tokenizationSupports.get(b)||null}registerFactory(b,_){var h;(h=this._factories.get(b))===null||h===void 0||h.dispose();const m=new D(this,b,_);return this._factories.set(b,m),(0,k.toDisposable)(()=>{const n=this._factories.get(b);!n||n!==m||(this._factories.delete(b),n.dispose())})}getOrCreate(b){return Ee(this,void 0,void 0,function*(){const _=this.get(b);if(_)return _;const h=this._factories.get(b);return!h||h.isResolved?null:(yield h.resolve(),this.get(b))})}isResolved(b){if(this.get(b))return!0;const h=this._factories.get(b);return!!(!h||h.isResolved)}setColorMap(b){this._colorMap=b,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}e.TokenizationRegistry=y;class D extends k.Disposable{get isResolved(){return this._isResolved}constructor(b,_,h){super(),this._registry=b,this._languageId=_,this._factory=h,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return Ee(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return Ee(this,void 0,void 0,function*(){const b=yield this._factory.tokenizationSupport;this._isResolved=!0,b&&!this._isDisposed&&this._register(this._registry.register(this._languageId,b))})}}}),define(J[26],ee([1,0,29,20,5,561]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=e.LazyTokenizationSupport=e.InlayHintKind=e.Command=e.FoldingRangeKind=e.SymbolKinds=e.isLocationLink=e.DocumentHighlightKind=e.SignatureHelpTriggerKind=e.InlineCompletionTriggerKind=e.CompletionItemKinds=e.EncodedTokenizationResult=e.TokenizationResult=e.Token=void 0;class w{constructor(a,d,u){this.offset=a,this.type=d,this.language=u,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=w;class b{constructor(a,d){this.tokens=a,this.endState=d,this._tokenizationResultBrand=void 0}}e.TokenizationResult=b;class _{constructor(a,d){this.tokens=a,this.endState=d,this._encodedTokenizationResultBrand=void 0}}e.EncodedTokenizationResult=_;var h;(function(l){const a=new Map;a.set(0,S.Codicon.symbolMethod),a.set(1,S.Codicon.symbolFunction),a.set(2,S.Codicon.symbolConstructor),a.set(3,S.Codicon.symbolField),a.set(4,S.Codicon.symbolVariable),a.set(5,S.Codicon.symbolClass),a.set(6,S.Codicon.symbolStruct),a.set(7,S.Codicon.symbolInterface),a.set(8,S.Codicon.symbolModule),a.set(9,S.Codicon.symbolProperty),a.set(10,S.Codicon.symbolEvent),a.set(11,S.Codicon.symbolOperator),a.set(12,S.Codicon.symbolUnit),a.set(13,S.Codicon.symbolValue),a.set(15,S.Codicon.symbolEnum),a.set(14,S.Codicon.symbolConstant),a.set(15,S.Codicon.symbolEnum),a.set(16,S.Codicon.symbolEnumMember),a.set(17,S.Codicon.symbolKeyword),a.set(27,S.Codicon.symbolSnippet),a.set(18,S.Codicon.symbolText),a.set(19,S.Codicon.symbolColor),a.set(20,S.Codicon.symbolFile),a.set(21,S.Codicon.symbolReference),a.set(22,S.Codicon.symbolCustomColor),a.set(23,S.Codicon.symbolFolder),a.set(24,S.Codicon.symbolTypeParameter),a.set(25,S.Codicon.account),a.set(26,S.Codicon.issues);function d(f){let v=a.get(f);return v||(console.info("No codicon found for CompletionItemKind "+f),v=S.Codicon.symbolProperty),v}l.toIcon=d;const u=new Map;u.set("method",0),u.set("function",1),u.set("constructor",2),u.set("field",3),u.set("variable",4),u.set("class",5),u.set("struct",6),u.set("interface",7),u.set("module",8),u.set("property",9),u.set("event",10),u.set("operator",11),u.set("unit",12),u.set("value",13),u.set("constant",14),u.set("enum",15),u.set("enum-member",16),u.set("enumMember",16),u.set("keyword",17),u.set("snippet",27),u.set("text",18),u.set("color",19),u.set("file",20),u.set("reference",21),u.set("customcolor",22),u.set("folder",23),u.set("type-parameter",24),u.set("typeParameter",24),u.set("account",25),u.set("issue",26);function C(f,v){let p=u.get(f);return typeof p>"u"&&!v&&(p=9),p}l.fromString=C})(h=e.CompletionItemKinds||(e.CompletionItemKinds={}));var m;(function(l){l[l.Automatic=0]="Automatic",l[l.Explicit=1]="Explicit"})(m=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var n;(function(l){l[l.Invoke=1]="Invoke",l[l.TriggerCharacter=2]="TriggerCharacter",l[l.ContentChange=3]="ContentChange"})(n=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var t;(function(l){l[l.Text=0]="Text",l[l.Read=1]="Read",l[l.Write=2]="Write"})(t=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));function i(l){return l&&k.URI.isUri(l.uri)&&y.Range.isIRange(l.range)&&(y.Range.isIRange(l.originSelectionRange)||y.Range.isIRange(l.targetSelectionRange))}e.isLocationLink=i;var s;(function(l){const a=new Map;a.set(0,S.Codicon.symbolFile),a.set(1,S.Codicon.symbolModule),a.set(2,S.Codicon.symbolNamespace),a.set(3,S.Codicon.symbolPackage),a.set(4,S.Codicon.symbolClass),a.set(5,S.Codicon.symbolMethod),a.set(6,S.Codicon.symbolProperty),a.set(7,S.Codicon.symbolField),a.set(8,S.Codicon.symbolConstructor),a.set(9,S.Codicon.symbolEnum),a.set(10,S.Codicon.symbolInterface),a.set(11,S.Codicon.symbolFunction),a.set(12,S.Codicon.symbolVariable),a.set(13,S.Codicon.symbolConstant),a.set(14,S.Codicon.symbolString),a.set(15,S.Codicon.symbolNumber),a.set(16,S.Codicon.symbolBoolean),a.set(17,S.Codicon.symbolArray),a.set(18,S.Codicon.symbolObject),a.set(19,S.Codicon.symbolKey),a.set(20,S.Codicon.symbolNull),a.set(21,S.Codicon.symbolEnumMember),a.set(22,S.Codicon.symbolStruct),a.set(23,S.Codicon.symbolEvent),a.set(24,S.Codicon.symbolOperator),a.set(25,S.Codicon.symbolTypeParameter);function d(u){let C=a.get(u);return C||(console.info("No codicon found for SymbolKind "+u),C=S.Codicon.symbolProperty),C}l.toIcon=d})(s=e.SymbolKinds||(e.SymbolKinds={}));class r{static fromValue(a){switch(a){case"comment":return r.Comment;case"imports":return r.Imports;case"region":return r.Region}return new r(a)}constructor(a){this.value=a}}r.Comment=new r("comment"),r.Imports=new r("imports"),r.Region=new r("region"),e.FoldingRangeKind=r;var c;(function(l){function a(d){return!d||typeof d!="object"?!1:typeof d.id=="string"&&typeof d.title=="string"}l.is=a})(c=e.Command||(e.Command={}));var g;(function(l){l[l.Type=1]="Type",l[l.Parameter=2]="Parameter"})(g=e.InlayHintKind||(e.InlayHintKind={}));class o{constructor(a){this.createSupport=a,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(a=>{a&&a.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}e.LazyTokenizationSupport=o,e.TokenizationRegistry=new D.TokenizationRegistry}),define(J[145],ee([1,0,26]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nullTokenizeEncoded=e.nullTokenize=e.NullState=void 0,e.NullState=new class{clone(){return this}equals(D){return this===D}};function k(D,w){return new S.TokenizationResult([new S.Token(0,"",D)],w)}e.nullTokenize=k;function y(D,w){const b=new Uint32Array(2);return b[0]=0,b[1]=(D<<0|0<<8|0<<11|1<<15|2<<24)>>>0,new S.EncodedTokenizationResult(b,w===null?e.NullState:w)}e.nullTokenizeEncoded=y}),define(J[296],ee([1,0,9,86,26,145]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=void 0;const w={getInitialState:()=>D.NullState,tokenizeEncoded:(m,n,t)=>(0,D.nullTokenizeEncoded)(0,t)};function b(m,n,t){return Ee(this,void 0,void 0,function*(){if(!t)return h(n,m.languageIdCodec,w);const i=yield y.TokenizationRegistry.getOrCreate(t);return h(n,m.languageIdCodec,i||w)})}e.tokenizeToString=b;function _(m,n,t,i,s,r,c){let g="<div>",o=i,l=0,a=!0;for(let d=0,u=n.getCount();d<u;d++){const C=n.getEndOffset(d);if(C<=i)continue;let f="";for(;o<C&&o<s;o++){const v=m.charCodeAt(o);switch(v){case 9:{let p=r-(o+l)%r;for(l+=p-1;p>0;)c&&a?(f+=" ",a=!1):(f+=" ",a=!0),p--;break}case 60:f+="<",a=!1;break;case 62:f+=">",a=!1;break;case 38:f+="&",a=!1;break;case 0:f+="�",a=!1;break;case 65279:case 8232:case 8233:case 133:f+="\\uFFFD",a=!1;break;case 13:f+="​",a=!1;break;case 32:c&&a?(f+=" ",a=!1):(f+=" ",a=!0);break;default:f+=String.fromCharCode(v),a=!1}}if(g+=`<span style="${n.getInlineStyle(d,t)}">${f}</span>`,C>s||o>=s)break}return g+="</div>",g}e.tokenizeLineToHTML=_;function h(m,n,t){let i=\'<div class="monaco-tokenized-source">\';const s=S.splitLines(m);let r=t.getInitialState();for(let c=0,g=s.length;c<g;c++){const o=s[c];c>0&&(i+="<br/>");const l=t.tokenizeEncoded(o,!0,r);k.LineTokens.convertToEndOffset(l.tokens,o.length);const d=new k.LineTokens(l.tokens,o,n).inflate();let u=0;for(let C=0,f=d.getCount();C<f;C++){const v=d.getClassName(C),p=d.getEndOffset(C);i+=`<span class="${v}">${S.escape(o.substring(u,p))}</span>`,u=p}r=l.endState}return i+="</div>",i}e._tokenizeToString=h}),define(J[562],ee([1,0,12,11,17,60,116,103,117,145,474,265,86]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultBackgroundTokenizer=e.RangePriorityQueueImpl=e.TokenizationStateStore=e.TrackingTokenizationStateStore=e.TokenizerWithStateStoreAndTextModel=e.TokenizerWithStateStore=void 0;class i{constructor(d,u){this.tokenizationSupport=u,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new r(d)}getStartState(d){return d===1?this.initialState:this.store.getEndState(d-1)}}e.TokenizerWithStateStore=i;class s extends i{constructor(d,u,C,f){super(d,u),this._textModel=C,this._languageIdCodec=f}updateTokensUntilLine(d,u){const C=this._textModel.getLanguageId();for(;;){const f=this.store.getFirstInvalidEndStateLineNumber();if(!f||f>u)break;const v=this._textModel.getLineContent(f),p=this.getStartState(f),L=o(this._languageIdCodec,C,this.tokenizationSupport,v,!0,p);d.add(f,L.tokens),this.store.setEndState(f,L.endState)}}getTokenTypeIfInsertingCharacter(d,u){const C=this.getStartState(d.lineNumber);if(!C)return 0;const f=this._textModel.getLanguageId(),v=this._textModel.getLineContent(d.lineNumber),p=v.substring(0,d.column-1)+u+v.substring(d.column-1),L=o(this._languageIdCodec,f,this.tokenizationSupport,p,!0,C),E=new t.LineTokens(L.tokens,p,this._languageIdCodec);if(E.getCount()===0)return 0;const I=E.findTokenIndexAtOffset(d.column-1);return E.getStandardTokenType(I)}tokenizeLineWithEdit(d,u,C){const f=d.lineNumber,v=d.column,p=this.getStartState(f);if(!p)return null;const L=this._textModel.getLineContent(f),E=L.substring(0,v-1)+C+L.substring(v-1+u),I=this._textModel.getLanguageIdAtPosition(f,0),T=o(this._languageIdCodec,I,this.tokenizationSupport,E,!0,p);return new t.LineTokens(T.tokens,E,this._languageIdCodec)}isCheapToTokenize(d){const u=this.store.getFirstInvalidEndStateLineNumberOrMax();return d<u||d===u&&this._textModel.getLineLength(d)<2048}tokenizeHeuristically(d,u,C){if(C<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(u<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(d,C),{heuristicTokens:!1};let f=this.guessStartState(u);const v=this._textModel.getLanguageId();for(let p=u;p<=C;p++){const L=this._textModel.getLineContent(p),E=o(this._languageIdCodec,v,this.tokenizationSupport,L,!0,f);d.add(p,E.tokens),f=E.endState}return{heuristicTokens:!0}}guessStartState(d){let u=this._textModel.getLineFirstNonWhitespaceColumn(d);const C=[];let f=null;for(let L=d-1;u>1&&L>=1;L--){const E=this._textModel.getLineFirstNonWhitespaceColumn(L);if(E!==0&&E<u&&(C.push(this._textModel.getLineContent(L)),u=E,f=this.getStartState(L),f))break}f||(f=this.tokenizationSupport.getInitialState()),C.reverse();const v=this._textModel.getLanguageId();let p=f;for(const L of C)p=o(this._languageIdCodec,v,this.tokenizationSupport,L,!1,p).endState;return p}}e.TokenizerWithStateStoreAndTextModel=s;class r{constructor(d){this.lineCount=d,this.tokenizationStateStore=new c,this._invalidEndStatesLineNumbers=new g,this._invalidEndStatesLineNumbers.addRange(new _.OffsetRange(1,d+1))}getEndState(d){return this.tokenizationStateStore.getEndState(d)}setEndState(d,u){for(;;){const f=this._invalidEndStatesLineNumbers.min;if(f!==null&&f<=d)this._invalidEndStatesLineNumbers.removeMin();else break}const C=this.tokenizationStateStore.setEndState(d,u);return C&&d<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new _.OffsetRange(d+1,d+2)),C}acceptChange(d,u){this.lineCount+=u-d.length,this.tokenizationStateStore.acceptChange(d,u),this._invalidEndStatesLineNumbers.addRangeAndResize(new _.OffsetRange(d.startLineNumber,d.endLineNumberExclusive),u)}acceptChanges(d){for(const u of d){const[C]=(0,w.countEOL)(u.text);this.acceptChange(new b.LineRange(u.range.startLineNumber,u.range.endLineNumber+1),C+1)}}invalidateEndStateRange(d){this._invalidEndStatesLineNumbers.addRange(new _.OffsetRange(d.startLineNumber,d.endLineNumberExclusive))}getFirstInvalidEndStateLineNumber(){return this._invalidEndStatesLineNumbers.min}getFirstInvalidEndStateLineNumberOrMax(){return this._invalidEndStatesLineNumbers.min||Number.MAX_SAFE_INTEGER}isTokenizationComplete(){return this._invalidEndStatesLineNumbers.min===null}}e.TrackingTokenizationStateStore=r;class c{constructor(){this._lineEndStates=new m.FixedArray(null)}getEndState(d){return this._lineEndStates.get(d)}setEndState(d,u){const C=this._lineEndStates.get(d);return C&&C.equals(u)?!1:(this._lineEndStates.set(d,u),!0)}acceptChange(d,u){let C=d.length;u>0&&C>0&&(C--,u--),this._lineEndStates.replace(d.startLineNumber,C,u)}}e.TokenizationStateStore=c;class g{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}removeMin(){if(this._ranges.length===0)return null;const d=this._ranges[0];return d.start+1===d.endExclusive?this._ranges.shift():this._ranges[0]=new _.OffsetRange(d.start+1,d.endExclusive),d.start}addRange(d){_.OffsetRange.addRange(d,this._ranges)}addRangeAndResize(d,u){let C=0;for(;!(C>=this._ranges.length||d.start<=this._ranges[C].endExclusive);)C++;let f=C;for(;!(f>=this._ranges.length||d.endExclusive<this._ranges[f].start);)f++;const v=u-d.length;for(let p=f;p<this._ranges.length;p++)this._ranges[p]=this._ranges[p].delta(v);if(C===f){const p=new _.OffsetRange(d.start,d.start+u);p.isEmpty||this._ranges.splice(C,0,p)}else{const p=Math.min(d.start,this._ranges[C].start),L=Math.max(d.endExclusive,this._ranges[f-1].endExclusive),E=new _.OffsetRange(p,L+v);E.isEmpty?this._ranges.splice(C,f-C):this._ranges.splice(C,f-C,E)}}toString(){return this._ranges.map(d=>d.toString()).join(" + ")}}e.RangePriorityQueueImpl=g;function o(a,d,u,C,f,v){let p=null;if(u)try{p=u.tokenizeEncoded(C,f,v.clone())}catch(L){(0,k.onUnexpectedError)(L)}return p||(p=(0,h.nullTokenizeEncoded)(a.encodeLanguageId(d),v)),t.LineTokens.convertToEndOffset(p.tokens,C.length),p}class l{constructor(d,u){this._tokenizerWithStateStore=d,this._backgroundTokenStore=u,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,(0,S.runWhenIdle)(d=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(d)}))}_backgroundTokenizeWithDeadline(d){const u=Date.now()+d.timeRemaining(),C=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<u?(0,y.setTimeout0)(C):this._beginBackgroundTokenization())};C()}_backgroundTokenizeForAtLeast1ms(){const d=this._tokenizerWithStateStore._textModel.getLineCount(),u=new n.ContiguousMultilineTokensBuilder,C=D.StopWatch.create(!1);do if(C.elapsed()>1||this._tokenizeOneInvalidLine(u)>=d)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(u.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.isTokenizationComplete():!1}_tokenizeOneInvalidLine(d){if(!this._tokenizerWithStateStore||!this._hasLinesToTokenize())return this._tokenizerWithStateStore._textModel.getLineCount()+1;const u=this._tokenizerWithStateStore.store.getFirstInvalidEndStateLineNumber();return this._tokenizerWithStateStore.updateTokensUntilLine(d,u),u}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.isTokenizationComplete()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(d,u){this._tokenizerWithStateStore.store.invalidateEndStateRange(new b.LineRange(d,u))}}e.DefaultBackgroundTokenizer=l}),define(J[563],ee([1,0,16,12,11,6,2,116,103,13,136,26,260,562,265,482,484]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationTextModelPart=void 0;class g extends t.TextModelPart{constructor(d,u,C,f,v,p){super(),this._languageService=d,this._languageConfigurationService=u,this._textModel=C,this._bracketPairsTextModelPart=f,this._languageId=v,this._attachedViews=p,this._semanticTokens=new c.SparseTokensStore(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new D.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new D.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new D.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new o(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(L=>{L.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(L=>{this._emitModelTokensChangedEvent(L)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(L=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(d){if(d.isFlush)this._semanticTokens.flush();else if(!d.isEolChange)for(const u of d.changes){const[C,f,v]=(0,b.countEOL)(u.text);this._semanticTokens.acceptEdit(u.range,C,f,v,u.text.length>0?u.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(d)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(d){this.validateLineNumber(d);const u=this.grammarTokens.getLineTokens(d);return this._semanticTokens.addSparseTokens(d,u)}_emitModelTokensChangedEvent(d){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(d),this._onDidChangeTokens.fire(d))}validateLineNumber(d){if(d<1||d>this._textModel.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(d){this.validateLineNumber(d),this.grammarTokens.forceTokenization(d)}isCheapToTokenize(d){return this.validateLineNumber(d),this.grammarTokens.isCheapToTokenize(d)}tokenizeIfCheap(d){this.validateLineNumber(d),this.grammarTokens.tokenizeIfCheap(d)}getTokenTypeIfInsertingCharacter(d,u,C){return this.grammarTokens.getTokenTypeIfInsertingCharacter(d,u,C)}tokenizeLineWithEdit(d,u,C){return this.grammarTokens.tokenizeLineWithEdit(d,u,C)}setSemanticTokens(d,u){this._semanticTokens.set(d,u),this._emitModelTokensChangedEvent({semanticTokensApplied:d!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(d,u){if(this.hasCompleteSemanticTokens())return;const C=this._textModel.validateRange(this._semanticTokens.setPartial(d,u));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:C.startLineNumber,toLineNumber:C.endLineNumber}]})}getWordAtPosition(d){this.assertNotDisposed();const u=this._textModel.validatePosition(d),C=this._textModel.getLineContent(u.lineNumber),f=this.getLineTokens(u.lineNumber),v=f.findTokenIndexAtOffset(u.column-1),[p,L]=g._findLanguageBoundaries(f,v),E=(0,m.getWordAtText)(u.column,this.getLanguageConfiguration(f.getLanguageId(v)).getWordDefinition(),C.substring(p,L),p);if(E&&E.startColumn<=d.column&&d.column<=E.endColumn)return E;if(v>0&&p===u.column-1){const[I,T]=g._findLanguageBoundaries(f,v-1),F=(0,m.getWordAtText)(u.column,this.getLanguageConfiguration(f.getLanguageId(v-1)).getWordDefinition(),C.substring(I,T),I);if(F&&F.startColumn<=d.column&&d.column<=F.endColumn)return F}return null}getLanguageConfiguration(d){return this._languageConfigurationService.getLanguageConfiguration(d)}static _findLanguageBoundaries(d,u){const C=d.getLanguageId(u);let f=0;for(let p=u;p>=0&&d.getLanguageId(p)===C;p--)f=d.getStartOffset(p);let v=d.getLineContent().length;for(let p=u,L=d.getCount();p<L&&d.getLanguageId(p)===C;p++)v=d.getEndOffset(p);return[f,v]}getWordUntilPosition(d){const u=this.getWordAtPosition(d);return u?{word:u.word.substr(0,d.column-u.startColumn),startColumn:u.startColumn,endColumn:d.column}:{word:"",startColumn:d.column,endColumn:d.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(d,u){const C=this._textModel.validatePosition(new h.Position(d,u)),f=this.getLineTokens(C.lineNumber);return f.getLanguageId(f.findTokenIndexAtOffset(C.column-1))}setLanguageId(d,u="api"){if(this._languageId===d)return;const C={oldLanguage:this._languageId,newLanguage:d,source:u};this._languageId=d,this._bracketPairsTextModelPart.handleDidChangeLanguage(C),this.grammarTokens.resetTokenization(),this._onDidChangeLanguage.fire(C),this._onDidChangeLanguageConfiguration.fire({})}}e.TokenizationTextModelPart=g;class o extends w.Disposable{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(d,u,C,f){super(),this._languageIdCodec=d,this._textModel=u,this.getLanguageId=C,this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new w.MutableDisposable),this._tokens=new r.ContiguousTokensStore(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new w.MutableDisposable),this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new D.Emitter),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new D.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._attachedViewStates=this._register(new w.DisposableMap),this._register(n.TokenizationRegistry.onDidChange(v=>{const p=this.getLanguageId();v.changedLanguages.indexOf(p)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(f.onDidChangeVisibleRanges(({view:v,state:p})=>{if(p){let L=this._attachedViewStates.get(v);L||(L=new l(()=>this.refreshRanges(L.lineRanges)),this._attachedViewStates.set(v,L)),L.handleStateChange(p)}else this._attachedViewStates.deleteAndDispose(v)}))}resetTokenization(d=!0){var u;this._tokens.flush(),(u=this._debugBackgroundTokens)===null||u===void 0||u.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new i.TrackingTokenizationStateStore(this._textModel.getLineCount())),d&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const C=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const p=n.TokenizationRegistry.get(this.getLanguageId());if(!p)return[null,null];let L;try{L=p.getInitialState()}catch(E){return(0,y.onUnexpectedError)(E),[null,null]}return[p,L]},[f,v]=C();if(f&&v?this._tokenizer=new i.TokenizerWithStateStoreAndTextModel(this._textModel.getLineCount(),f,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const p={setTokens:L=>{this.setTokens(L)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const L=2;this._backgroundTokenizationState=L,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(L,E)=>{var I,T,F;if(!E)throw new y.BugIndicatingError;const R=(T=(I=this._tokenizer)===null||I===void 0?void 0:I.store.getFirstInvalidEndStateLineNumber())!==null&&T!==void 0?T:void 0;R!==void 0&&L>=R&&((F=this._tokenizer)===null||F===void 0||F.store.setEndState(L,E))}};f&&f.createBackgroundTokenizer&&!f.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=f.createBackgroundTokenizer(this._textModel,p)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new i.DefaultBackgroundTokenizer(this._tokenizer,p),this._defaultBackgroundTokenizer.handleChanges()),f?.backgroundTokenizerShouldOnlyVerifyTokens&&f.createBackgroundTokenizer?(this._debugBackgroundTokens=new r.ContiguousTokensStore(this._languageIdCodec),this._debugBackgroundStates=new i.TrackingTokenizationStateStore(this._textModel.getLineCount()),this._debugBackgroundTokenizer.value=f.createBackgroundTokenizer(this._textModel,{setTokens:L=>{var E;(E=this._debugBackgroundTokens)===null||E===void 0||E.setMultilineTokens(L,this._textModel)},backgroundTokenizationFinished(){},setEndState:(L,E)=>{var I;(I=this._debugBackgroundStates)===null||I===void 0||I.setEndState(L,E)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var d;(d=this._defaultBackgroundTokenizer)===null||d===void 0||d.handleChanges()}handleDidChangeContent(d){var u,C,f;if(d.isFlush)this.resetTokenization(!1);else if(!d.isEolChange){for(const v of d.changes){const[p,L]=(0,b.countEOL)(v.text);this._tokens.acceptEdit(v.range,p,L),(u=this._debugBackgroundTokens)===null||u===void 0||u.acceptEdit(v.range,p,L)}(C=this._debugBackgroundStates)===null||C===void 0||C.acceptChanges(d.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(d.changes),(f=this._defaultBackgroundTokenizer)===null||f===void 0||f.handleChanges()}}setTokens(d){const{changes:u}=this._tokens.setMultilineTokens(d,this._textModel);return u.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:u}),{changes:u}}refreshAllVisibleLineTokens(){const d=_.LineRange.joinMany([...this._attachedViewStates].map(([u,C])=>C.lineRanges));this.refreshRanges(d)}refreshRanges(d){for(const u of d)this.refreshRange(u.startLineNumber,u.endLineNumberExclusive-1)}refreshRange(d,u){var C,f;if(!this._tokenizer)return;d=Math.max(1,d),u=Math.min(this._textModel.getLineCount(),u);const v=new s.ContiguousMultilineTokensBuilder,{heuristicTokens:p}=this._tokenizer.tokenizeHeuristically(v,d,u),L=this.setTokens(v.finalize());if(p)for(const E of L.changes)(C=this._backgroundTokenizer.value)===null||C===void 0||C.requestTokens(E.fromLineNumber,E.toLineNumber+1);(f=this._defaultBackgroundTokenizer)===null||f===void 0||f.checkFinished()}forceTokenization(d){var u,C;const f=new s.ContiguousMultilineTokensBuilder;(u=this._tokenizer)===null||u===void 0||u.updateTokensUntilLine(f,d),this.setTokens(f.finalize()),(C=this._defaultBackgroundTokenizer)===null||C===void 0||C.checkFinished()}isCheapToTokenize(d){return this._tokenizer?this._tokenizer.isCheapToTokenize(d):!0}tokenizeIfCheap(d){this.isCheapToTokenize(d)&&this.forceTokenization(d)}getLineTokens(d){var u;const C=this._textModel.getLineContent(d),f=this._tokens.getTokens(this._textModel.getLanguageId(),d-1,C);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>d&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>d){const v=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),d-1,C);!f.equals(v)&&(!((u=this._debugBackgroundTokenizer.value)===null||u===void 0)&&u.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(d)}return f}getTokenTypeIfInsertingCharacter(d,u,C){if(!this._tokenizer)return 0;const f=this._textModel.validatePosition(new h.Position(d,u));return this.forceTokenization(f.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(f,C)}tokenizeLineWithEdit(d,u,C){if(!this._tokenizer)return null;const f=this._textModel.validatePosition(d);return this.forceTokenization(f.lineNumber),this._tokenizer.tokenizeLineWithEdit(f,u,C)}get hasTokens(){return this._tokens.hasTokens}}class l extends w.Disposable{get lineRanges(){return this._lineRanges}constructor(d){super(),this._refreshTokens=d,this.runner=this._register(new k.RunOnceScheduler(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,S.equals)(this._computedLineRanges,this._lineRanges)||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(d){this._lineRanges=d.visibleLineRanges,d.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}}),define(J[297],ee([1,0,21,6,58,20,13,5,23,26,194]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class n{static chord(s,r){return(0,y.KeyChord)(s,r)}}n.CtrlCmd=2048,n.Shift=1024,n.Alt=512,n.WinCtrl=256,e.KeyMod=n;function t(){return{editor:void 0,languages:void 0,CancellationTokenSource:S.CancellationTokenSource,Emitter:k.Emitter,KeyCode:m.KeyCode,KeyMod:n,Position:w.Position,Range:b.Range,Selection:_.Selection,SelectionDirection:m.SelectionDirection,MarkerSeverity:m.MarkerSeverity,MarkerTag:m.MarkerTag,Uri:D.URI,Token:h.Token}}e.createMonacoBaseAPI=t}),define(J[564],ee([1,0,157,20,13,5,478,136,460,466,297,60,263,458,45]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=void 0;class r extends w.MirrorTextModel{get uri(){return this._uri}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,a){const d=(0,b.getWordAtText)(l.column,(0,b.ensureValidWordDefinition)(a),this._lines[l.lineNumber-1],0);return d?new D.Range(l.lineNumber,d.startColumn,l.lineNumber,d.endColumn):null}words(l){const a=this._lines,d=this._wordenize.bind(this);let u=0,C="",f=0,v=[];return{*[Symbol.iterator](){for(;;)if(f<v.length){const p=C.substring(v[f].start,v[f].end);f+=1,yield p}else if(u<a.length)C=a[u],v=d(C,l),f=0,u+=1;else break}}}getLineWords(l,a){const d=this._lines[l-1],u=this._wordenize(d,a),C=[];for(const f of u)C.push({word:d.substring(f.start,f.end),startColumn:f.start+1,endColumn:f.end+1});return C}_wordenize(l,a){const d=[];let u;for(a.lastIndex=0;(u=a.exec(l))&&u[0].length!==0;)d.push({start:u.index,end:u.index+u[0].length});return d}getValueInRange(l){if(l=this._validateRange(l),l.startLineNumber===l.endLineNumber)return this._lines[l.startLineNumber-1].substring(l.startColumn-1,l.endColumn-1);const a=this._eol,d=l.startLineNumber-1,u=l.endLineNumber-1,C=[];C.push(this._lines[d].substring(l.startColumn-1));for(let f=d+1;f<u;f++)C.push(this._lines[f]);return C.push(this._lines[u].substring(0,l.endColumn-1)),C.join(a)}offsetAt(l){return l=this._validatePosition(l),this._ensureLineStarts(),this._lineStarts.getPrefixSum(l.lineNumber-2)+(l.column-1)}positionAt(l){l=Math.floor(l),l=Math.max(0,l),this._ensureLineStarts();const a=this._lineStarts.getIndexOf(l),d=this._lines[a.index].length;return{lineNumber:1+a.index,column:1+Math.min(a.remainder,d)}}_validateRange(l){const a=this._validatePosition({lineNumber:l.startLineNumber,column:l.startColumn}),d=this._validatePosition({lineNumber:l.endLineNumber,column:l.endColumn});return a.lineNumber!==l.startLineNumber||a.column!==l.startColumn||d.lineNumber!==l.endLineNumber||d.column!==l.endColumn?{startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:d.lineNumber,endColumn:d.column}:l}_validatePosition(l){if(!y.Position.isIPosition(l))throw new Error("bad position");let{lineNumber:a,column:d}=l,u=!1;if(a<1)a=1,d=1,u=!0;else if(a>this._lines.length)a=this._lines.length,d=this._lines[a-1].length+1,u=!0;else{const C=this._lines[a-1].length+1;d<1?(d=1,u=!0):d>C&&(d=C,u=!0)}return u?{lineNumber:a,column:d}:l}}class c{constructor(l,a){this._host=l,this._models=Object.create(null),this._foreignModuleFactory=a,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(l){return this._models[l]}_getModels(){const l=[];return Object.keys(this._models).forEach(a=>l.push(this._models[a])),l}acceptNewModel(l){this._models[l.url]=new r(k.URI.parse(l.url),l.lines,l.EOL,l.versionId)}acceptModelChanged(l,a){if(!this._models[l])return;this._models[l].onEvents(a)}acceptRemovedModel(l){this._models[l]&&delete this._models[l]}computeUnicodeHighlights(l,a,d){return Ee(this,void 0,void 0,function*(){const u=this._getModel(l);return u?t.UnicodeTextModelHighlighter.computeUnicodeHighlights(u,a,d):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(l,a,d,u){return Ee(this,void 0,void 0,function*(){const C=this._getModel(l),f=this._getModel(a);return!C||!f?null:c.computeDiff(C,f,d,u)})}static computeDiff(l,a,d,u){const C=u==="experimental"?i.linesDiffComputers.experimental:i.linesDiffComputers.smart,f=l.getLinesContent(),v=a.getLinesContent(),p=C.computeDiff(f,v,d);return{identical:p.changes.length>0?!1:this._modelsAreIdentical(l,a),quitEarly:p.hitTimeout,changes:p.changes.map(E=>{var I;return[E.originalRange.startLineNumber,E.originalRange.endLineNumberExclusive,E.modifiedRange.startLineNumber,E.modifiedRange.endLineNumberExclusive,(I=E.innerChanges)===null||I===void 0?void 0:I.map(T=>[T.originalRange.startLineNumber,T.originalRange.startColumn,T.originalRange.endLineNumber,T.originalRange.endColumn,T.modifiedRange.startLineNumber,T.modifiedRange.startColumn,T.modifiedRange.endLineNumber,T.modifiedRange.endColumn])]})}}static _modelsAreIdentical(l,a){const d=l.getLineCount(),u=a.getLineCount();if(d!==u)return!1;for(let C=1;C<=d;C++){const f=l.getLineContent(C),v=a.getLineContent(C);if(f!==v)return!1}return!0}computeMoreMinimalEdits(l,a,d){return Ee(this,void 0,void 0,function*(){const u=this._getModel(l);if(!u)return a;const C=[];let f;a=a.slice(0).sort((v,p)=>{if(v.range&&p.range)return D.Range.compareRangesUsingStarts(v.range,p.range);const L=v.range?0:1,E=p.range?0:1;return L-E});for(let{range:v,text:p,eol:L}of a){if(typeof L=="number"&&(f=L),D.Range.isEmpty(v)&&!p)continue;const E=u.getValueInRange(v);if(p=p.replace(/\\r\\n|\\n|\\r/g,u.eol),E===p)continue;if(Math.max(p.length,E.length)>c._diffLimit){C.push({range:v,text:p});continue}const I=(0,S.stringDiff)(E,p,d),T=u.offsetAt(D.Range.lift(v).getStartPosition());for(const F of I){const R=u.positionAt(T+F.originalStart),M=u.positionAt(T+F.originalStart+F.originalLength),N={text:p.substr(F.modifiedStart,F.modifiedLength),range:{startLineNumber:R.lineNumber,startColumn:R.column,endLineNumber:M.lineNumber,endColumn:M.column}};u.getValueInRange(N.range)!==N.text&&C.push(N)}}return typeof f=="number"&&C.push({eol:f,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),C})}computeLinks(l){return Ee(this,void 0,void 0,function*(){const a=this._getModel(l);return a?(0,_.computeLinks)(a):null})}textualSuggest(l,a,d,u){return Ee(this,void 0,void 0,function*(){const C=new n.StopWatch(!0),f=new RegExp(d,u),v=new Set;e:for(const p of l){const L=this._getModel(p);if(L){for(const E of L.words(f))if(!(E===a||!isNaN(Number(E)))&&(v.add(E),v.size>c._suggestionsLimit))break e}}return{words:Array.from(v),duration:C.elapsed()}})}computeWordRanges(l,a,d,u){return Ee(this,void 0,void 0,function*(){const C=this._getModel(l);if(!C)return Object.create(null);const f=new RegExp(d,u),v=Object.create(null);for(let p=a.startLineNumber;p<a.endLineNumber;p++){const L=C.getLineWords(p,f);for(const E of L){if(!isNaN(Number(E.word)))continue;let I=v[E.word];I||(I=[],v[E.word]=I),I.push({startLineNumber:p,startColumn:E.startColumn,endLineNumber:p,endColumn:E.endColumn})}}return v})}navigateValueSet(l,a,d,u,C){return Ee(this,void 0,void 0,function*(){const f=this._getModel(l);if(!f)return null;const v=new RegExp(u,C);a.startColumn===a.endColumn&&(a={startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.endColumn+1});const p=f.getValueInRange(a),L=f.getWordAtPosition({lineNumber:a.startLineNumber,column:a.startColumn},v);if(!L)return null;const E=f.getValueInRange(L);return h.BasicInplaceReplace.INSTANCE.navigateValueSet(a,p,L,E,d)})}loadForeignModule(l,a,d){const u=(v,p)=>this._host.fhr(v,p),f={host:(0,s.createProxyObject)(d,u),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(f,a),Promise.resolve((0,s.getAllMethodNames)(this._foreignModule))):new Promise((v,p)=>{q([l],L=>{this._foreignModule=L.create(f,a),v((0,s.getAllMethodNames)(this._foreignModule))},p)})}fmr(l,a){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,a))}catch(d){return Promise.reject(d)}}}c._diffLimit=1e5,c._suggestionsLimit=1e4,e.EditorSimpleWorker=c;function g(o){return new c(o,null)}e.create=g,typeof importScripts=="function"&&(globalThis.monaco=(0,m.createMonacoBaseAPI)())}),define(J[298],ee([1,0,6,2,253,26]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class w extends k.Disposable{static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,k.markAsSingleton)(new w)),this._INSTANCE}constructor(){super(),this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(D.TokenizationRegistry.onDidChange(_=>{_.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const _=D.TokenizationRegistry.getColorMap();if(!_){this._colors=[y.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[y.RGBA8.Empty];for(let m=1;m<_.length;m++){const n=_[m].rgba;this._colors[m]=new y.RGBA8(n.r,n.g,n.b,Math.round(n.a*255))}const h=_[2].getRelativeLuminance();this._backgroundIsLight=h>=.5,this._onDidChange.fire(void 0)}getColor(_){return(_<1||_>=this._colors.length)&&(_=2),this._colors[_]}backgroundIsLight(){return this._backgroundIsLight}}w._INSTANCE=null,e.MinimapTokensColorTracker=w}),define(J[219],ee([1,0,6,2]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelTokensChangedEvent=e.ModelOptionsChangedEvent=e.ModelContentChangedEvent=e.ModelLanguageConfigurationChangedEvent=e.ModelLanguageChangedEvent=e.ModelDecorationsChangedEvent=e.ReadOnlyEditAttemptEvent=e.CursorStateChangedEvent=e.HiddenAreasChangedEvent=e.ViewZonesChangedEvent=e.ScrollChangedEvent=e.FocusChangedEvent=e.ContentSizeChangedEvent=e.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class y extends k.Disposable{constructor(){super(),this._onEvent=this._register(new S.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(a){this._addOutgoingEvent(a),this._emitOutgoingEvents()}_addOutgoingEvent(a){for(let d=0,u=this._outgoingEvents.length;d<u;d++){const C=this._outgoingEvents[d].kind===a.kind?this._outgoingEvents[d].attemptToMerge(a):null;if(C){this._outgoingEvents[d]=C;return}}this._outgoingEvents.push(a)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const a=this._outgoingEvents.shift();a.isNoOp()||this._onEvent.fire(a)}}addViewEventHandler(a){for(let d=0,u=this._eventHandlers.length;d<u;d++)this._eventHandlers[d]===a&&console.warn("Detected duplicate listener in ViewEventDispatcher",a);this._eventHandlers.push(a)}removeViewEventHandler(a){for(let d=0;d<this._eventHandlers.length;d++)if(this._eventHandlers[d]===a){this._eventHandlers.splice(d,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new D),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const a=this._collector.outgoingEvents,d=this._collector.viewEvents;this._collector=null;for(const u of a)this._addOutgoingEvent(u);d.length>0&&this._emitMany(d)}this._emitOutgoingEvents()}emitSingleViewEvent(a){try{this.beginEmitViewEvents().emitViewEvent(a)}finally{this.endEmitViewEvents()}}_emitMany(a){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(a):this._viewEventQueue=a,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const a=this._viewEventQueue;this._viewEventQueue=null;const d=this._eventHandlers.slice(0);for(const u of d)u.handleEvents(a)}}}e.ViewModelEventDispatcher=y;class D{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(a){this.viewEvents.push(a)}emitOutgoingEvent(a){this.outgoingEvents.push(a)}}e.ViewModelEventsCollector=D;class w{constructor(a,d,u,C){this.kind=0,this._oldContentWidth=a,this._oldContentHeight=d,this.contentWidth=u,this.contentHeight=C,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(a){return a.kind!==this.kind?null:new w(this._oldContentWidth,this._oldContentHeight,a.contentWidth,a.contentHeight)}}e.ContentSizeChangedEvent=w;class b{constructor(a,d){this.kind=1,this.oldHasFocus=a,this.hasFocus=d}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(a){return a.kind!==this.kind?null:new b(this.oldHasFocus,a.hasFocus)}}e.FocusChangedEvent=b;class _{constructor(a,d,u,C,f,v,p,L){this.kind=2,this._oldScrollWidth=a,this._oldScrollLeft=d,this._oldScrollHeight=u,this._oldScrollTop=C,this.scrollWidth=f,this.scrollLeft=v,this.scrollHeight=p,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}attemptToMerge(a){return a.kind!==this.kind?null:new _(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,a.scrollWidth,a.scrollLeft,a.scrollHeight,a.scrollTop)}}e.ScrollChangedEvent=_;class h{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(a){return a.kind!==this.kind?null:this}}e.ViewZonesChangedEvent=h;class m{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(a){return a.kind!==this.kind?null:this}}e.HiddenAreasChangedEvent=m;class n{constructor(a,d,u,C,f,v,p){this.kind=6,this.oldSelections=a,this.selections=d,this.oldModelVersionId=u,this.modelVersionId=C,this.source=f,this.reason=v,this.reachedMaxCursorCount=p}static _selectionsAreEqual(a,d){if(!a&&!d)return!0;if(!a||!d)return!1;const u=a.length,C=d.length;if(u!==C)return!1;for(let f=0;f<u;f++)if(!a[f].equalsSelection(d[f]))return!1;return!0}isNoOp(){return n._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(a){return a.kind!==this.kind?null:new n(this.oldSelections,a.selections,this.oldModelVersionId,a.modelVersionId,a.source,a.reason,this.reachedMaxCursorCount||a.reachedMaxCursorCount)}}e.CursorStateChangedEvent=n;class t{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(a){return a.kind!==this.kind?null:this}}e.ReadOnlyEditAttemptEvent=t;class i{constructor(a){this.event=a,this.kind=7}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelDecorationsChangedEvent=i;class s{constructor(a){this.event=a,this.kind=8}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelLanguageChangedEvent=s;class r{constructor(a){this.event=a,this.kind=9}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelLanguageConfigurationChangedEvent=r;class c{constructor(a){this.event=a,this.kind=10}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelContentChangedEvent=c;class g{constructor(a){this.event=a,this.kind=11}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelOptionsChangedEvent=g;class o{constructor(a){this.event=a,this.kind=12}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelTokensChangedEvent=o}),define(J[565],ee([1,0,6,2,172,494,81,219]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const _=125;class h{constructor(i,s,r,c){i=i|0,s=s|0,r=r|0,c=c|0,i<0&&(i=0),s<0&&(s=0),r<0&&(r=0),c<0&&(c=0),this.width=i,this.contentWidth=s,this.scrollWidth=Math.max(i,s),this.height=r,this.contentHeight=c,this.scrollHeight=Math.max(r,c)}equals(i){return this.width===i.width&&this.contentWidth===i.contentWidth&&this.height===i.height&&this.contentHeight===i.contentHeight}}class m extends k.Disposable{constructor(i,s){super(),this._onDidContentSizeChange=this._register(new S.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new h(0,0,0,0),this._scrollable=this._register(new y.Scrollable({forceIntegerValues:!0,smoothScrollDuration:i,scheduleAtNextAnimationFrame:s})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(i){this._scrollable.setSmoothScrollDuration(i)}validateScrollPosition(i){return this._scrollable.validateScrollPosition(i)}getScrollDimensions(){return this._dimensions}setScrollDimensions(i){if(this._dimensions.equals(i))return;const s=this._dimensions;this._dimensions=i,this._scrollable.setScrollDimensions({width:i.width,scrollWidth:i.scrollWidth,height:i.height,scrollHeight:i.scrollHeight},!0);const r=s.contentWidth!==i.contentWidth,c=s.contentHeight!==i.contentHeight;(r||c)&&this._onDidContentSizeChange.fire(new b.ContentSizeChangedEvent(s.contentWidth,s.contentHeight,i.contentWidth,i.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(i){this._scrollable.setScrollPositionNow(i)}setScrollPositionSmooth(i){this._scrollable.setScrollPositionSmooth(i)}}class n extends k.Disposable{constructor(i,s,r){super(),this._configuration=i;const c=this._configuration.options,g=c.get(139),o=c.get(81);this._linesLayout=new D.LinesLayout(s,c.get(64),o.top,o.bottom),this._scrollable=this._register(new m(0,r)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new h(g.contentWidth,0,g.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(109)?_:0)}onConfigurationChanged(i){const s=this._configuration.options;if(i.hasChanged(64)&&this._linesLayout.setLineHeight(s.get(64)),i.hasChanged(81)){const r=s.get(81);this._linesLayout.setPadding(r.top,r.bottom)}if(i.hasChanged(139)){const r=s.get(139),c=r.contentWidth,g=r.height,o=this._scrollable.getScrollDimensions(),l=o.contentWidth;this._scrollable.setScrollDimensions(new h(c,o.contentWidth,g,this._getContentHeight(c,g,l)))}else this._updateHeight();i.hasChanged(109)&&this._configureSmoothScrollDuration()}onFlushed(i){this._linesLayout.onFlushed(i)}onLinesDeleted(i,s){this._linesLayout.onLinesDeleted(i,s)}onLinesInserted(i,s){this._linesLayout.onLinesInserted(i,s)}_getHorizontalScrollbarHeight(i,s){const c=this._configuration.options.get(98);return c.horizontal===2||i>=s?0:c.horizontalScrollbarSize}_getContentHeight(i,s,r){const c=this._configuration.options;let g=this._linesLayout.getLinesTotalHeight();return c.get(100)?g+=Math.max(0,s-c.get(64)-c.get(81).bottom):g+=this._getHorizontalScrollbarHeight(i,r),g}_updateHeight(){const i=this._scrollable.getScrollDimensions(),s=i.width,r=i.height,c=i.contentWidth;this._scrollable.setScrollDimensions(new h(s,i.contentWidth,r,this._getContentHeight(s,r,c)))}getCurrentViewport(){const i=this._scrollable.getScrollDimensions(),s=this._scrollable.getCurrentScrollPosition();return new w.Viewport(s.scrollTop,s.scrollLeft,i.width,i.height)}getFutureViewport(){const i=this._scrollable.getScrollDimensions(),s=this._scrollable.getFutureScrollPosition();return new w.Viewport(s.scrollTop,s.scrollLeft,i.width,i.height)}_computeContentWidth(i){const s=this._configuration.options,r=s.get(140),c=s.get(48),g=s.get(139);if(r.isViewportWrapping){const o=s.get(70);return i>g.contentWidth+c.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?i+g.verticalScrollbarWidth:i}else{const o=s.get(99)*c.typicalHalfwidthCharacterWidth,l=this._linesLayout.getWhitespaceMinWidth();return Math.max(i+o+g.verticalScrollbarWidth,l)}}setMaxLineWidth(i){const s=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new h(s.width,this._computeContentWidth(i),s.height,s.contentHeight)),this._updateHeight()}saveState(){const i=this._scrollable.getFutureScrollPosition(),s=i.scrollTop,r=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(s),c=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(r);return{scrollTop:s,scrollTopWithoutViewZones:s-c,scrollLeft:i.scrollLeft}}changeWhitespace(i){const s=this._linesLayout.changeWhitespace(i);return s&&this.onHeightMaybeChanged(),s}getVerticalOffsetForLineNumber(i,s=!1){return this._linesLayout.getVerticalOffsetForLineNumber(i,s)}getVerticalOffsetAfterLineNumber(i,s=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(i,s)}isAfterLines(i){return this._linesLayout.isAfterLines(i)}isInTopPadding(i){return this._linesLayout.isInTopPadding(i)}isInBottomPadding(i){return this._linesLayout.isInBottomPadding(i)}getLineNumberAtVerticalOffset(i){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(i)}getWhitespaceAtVerticalOffset(i){return this._linesLayout.getWhitespaceAtVerticalOffset(i)}getLinesViewportData(){const i=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(i.top,i.top+i.height)}getLinesViewportDataAtScrollTop(i){const s=this._scrollable.getScrollDimensions();return i+s.height>s.scrollHeight&&(i=s.scrollHeight-s.height),i<0&&(i=0),this._linesLayout.getLinesViewportData(i,i+s.height)}getWhitespaceViewportData(){const i=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(i.top,i.top+i.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(i){return this._scrollable.validateScrollPosition(i)}setScrollPosition(i,s){s===1?this._scrollable.setScrollPositionNow(i):this._scrollable.setScrollPositionSmooth(i)}deltaScrollNow(i,s){const r=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:r.scrollLeft+i,scrollTop:r.scrollTop+s})}}e.ViewLayout=n}),define(J[566],ee([1,0,6]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class k{get color(){return this._color}set color(D){this._color.equals(D)||(this._color=D,this._onDidChangeColor.fire(D))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(D){this._colorPresentations=D,this.presentationIndex>D.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(D,w,b){this.presentationIndex=b,this._onColorFlushed=new S.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new S.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new S.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=D,this._color=D,this._colorPresentations=w}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(D,w){let b=-1;for(let _=0;_<this.colorPresentations.length;_++)if(w.toLowerCase()===this.colorPresentations[_].label){b=_;break}if(b===-1){const _=w.split("(")[0].toLowerCase();for(let h=0;h<this.colorPresentations.length;h++)if(this.colorPresentations[h].label.toLowerCase().startsWith(_)){b=h;break}}b!==-1&&b!==this.presentationIndex&&(this.presentationIndex=b,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}e.ColorPickerModel=k}),define(J[567],ee([1,0,6,171,133]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNextFoldLine=e.getPreviousFoldLine=e.getParentFoldLine=e.setCollapseStateForType=e.setCollapseStateForMatchingLines=e.setCollapseStateForRest=e.setCollapseStateAtLevel=e.setCollapseStateUp=e.setCollapseStateLevelsUp=e.setCollapseStateLevelsDown=e.toggleCollapseState=e.FoldingModel=void 0;class D{get regions(){return this._regions}get textModel(){return this._textModel}constructor(o,l){this._updateEventEmitter=new S.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=o,this._decorationProvider=l,this._regions=new k.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(o){if(!o.length)return;o=o.sort((a,d)=>a.regionIndex-d.regionIndex);const l={};this._decorationProvider.changeDecorations(a=>{let d=0,u=-1,C=-1;const f=v=>{for(;d<v;){const p=this._regions.getEndLineNumber(d),L=this._regions.isCollapsed(d);if(p<=u){const E=this.regions.getSource(d)!==0;a.changeDecorationOptions(this._editorDecorationIds[d],this._decorationProvider.getDecorationOption(L,p<=C,E))}L&&p>C&&(C=p),d++}};for(const v of o){const p=v.regionIndex,L=this._editorDecorationIds[p];if(L&&!l[L]){l[L]=!0,f(p);const E=!this._regions.isCollapsed(p);this._regions.setCollapsed(p,E),u=Math.max(u,this._regions.getEndLineNumber(p))}}f(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:o})}removeManualRanges(o){const l=new Array,a=d=>{for(const u of o)if(!(u.startLineNumber>d.endLineNumber||d.startLineNumber>u.endLineNumber))return!0;return!1};for(let d=0;d<this._regions.length;d++){const u=this._regions.toFoldRange(d);(u.source===0||!a(u))&&l.push(u)}this.updatePost(k.FoldingRegions.fromFoldRanges(l))}update(o,l=[]){const a=this._currentFoldedOrManualRanges(l),d=k.FoldingRegions.sanitizeAndMerge(o,a,this._textModel.getLineCount());this.updatePost(k.FoldingRegions.fromFoldRanges(d))}updatePost(o){const l=[];let a=-1;for(let d=0,u=o.length;d<u;d++){const C=o.getStartLineNumber(d),f=o.getEndLineNumber(d),v=o.isCollapsed(d),p=o.getSource(d)!==0,L={startLineNumber:C,startColumn:this._textModel.getLineMaxColumn(C),endLineNumber:f,endColumn:this._textModel.getLineMaxColumn(f)+1};l.push({range:L,options:this._decorationProvider.getDecorationOption(v,f<=a,p)}),v&&f>a&&(a=f)}this._decorationProvider.changeDecorations(d=>this._editorDecorationIds=d.deltaDecorations(this._editorDecorationIds,l)),this._regions=o,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(o=[]){const l=(d,u)=>{for(const C of o)if(d<C&&C<=u)return!0;return!1},a=[];for(let d=0,u=this._regions.length;d<u;d++){let C=this.regions.isCollapsed(d);const f=this.regions.getSource(d);if(C||f!==0){const v=this._regions.toFoldRange(d),p=this._textModel.getDecorationRange(this._editorDecorationIds[d]);p&&(C&&l(p.startLineNumber,p.endLineNumber)&&(C=!1),a.push({startLineNumber:p.startLineNumber,endLineNumber:p.endLineNumber,type:v.type,isCollapsed:C,source:f}))}}return a}getMemento(){const o=this._currentFoldedOrManualRanges(),l=[],a=this._textModel.getLineCount();for(let d=0,u=o.length;d<u;d++){const C=o[d];if(C.startLineNumber>=C.endLineNumber||C.startLineNumber<1||C.endLineNumber>a)continue;const f=this._getLinesChecksum(C.startLineNumber+1,C.endLineNumber);l.push({startLineNumber:C.startLineNumber,endLineNumber:C.endLineNumber,isCollapsed:C.isCollapsed,source:C.source,checksum:f})}return l.length>0?l:void 0}applyMemento(o){var l,a;if(!Array.isArray(o))return;const d=[],u=this._textModel.getLineCount();for(const f of o){if(f.startLineNumber>=f.endLineNumber||f.startLineNumber<1||f.endLineNumber>u)continue;const v=this._getLinesChecksum(f.startLineNumber+1,f.endLineNumber);(!f.checksum||v===f.checksum)&&d.push({startLineNumber:f.startLineNumber,endLineNumber:f.endLineNumber,type:void 0,isCollapsed:(l=f.isCollapsed)!==null&&l!==void 0?l:!0,source:(a=f.source)!==null&&a!==void 0?a:0})}const C=k.FoldingRegions.sanitizeAndMerge(this._regions,d,u);this.updatePost(k.FoldingRegions.fromFoldRanges(C))}_getLinesChecksum(o,l){return(0,y.hash)(this._textModel.getLineContent(o)+this._textModel.getLineContent(l))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(o,l){const a=[];if(this._regions){let d=this._regions.findRange(o),u=1;for(;d>=0;){const C=this._regions.toRegion(d);(!l||l(C,u))&&a.push(C),u++,d=C.parentIndex}}return a}getRegionAtLine(o){if(this._regions){const l=this._regions.findRange(o);if(l>=0)return this._regions.toRegion(l)}return null}getRegionsInside(o,l){const a=[],d=o?o.regionIndex+1:0,u=o?o.endLineNumber:Number.MAX_VALUE;if(l&&l.length===2){const C=[];for(let f=d,v=this._regions.length;f<v;f++){const p=this._regions.toRegion(f);if(this._regions.getStartLineNumber(f)<u){for(;C.length>0&&!p.containedBy(C[C.length-1]);)C.pop();C.push(p),l(p,C.length)&&a.push(p)}else break}}else for(let C=d,f=this._regions.length;C<f;C++){const v=this._regions.toRegion(C);if(this._regions.getStartLineNumber(C)<u)(!l||l(v))&&a.push(v);else break}return a}}e.FoldingModel=D;function w(g,o,l){const a=[];for(const d of l){const u=g.getRegionAtLine(d);if(u){const C=!u.isCollapsed;if(a.push(u),o>1){const f=g.getRegionsInside(u,(v,p)=>v.isCollapsed!==C&&p<o);a.push(...f)}}}g.toggleCollapseState(a)}e.toggleCollapseState=w;function b(g,o,l=Number.MAX_VALUE,a){const d=[];if(a&&a.length>0)for(const u of a){const C=g.getRegionAtLine(u);if(C&&(C.isCollapsed!==o&&d.push(C),l>1)){const f=g.getRegionsInside(C,(v,p)=>v.isCollapsed!==o&&p<l);d.push(...f)}}else{const u=g.getRegionsInside(null,(C,f)=>C.isCollapsed!==o&&f<l);d.push(...u)}g.toggleCollapseState(d)}e.setCollapseStateLevelsDown=b;function _(g,o,l,a){const d=[];for(const u of a){const C=g.getAllRegionsAtLine(u,(f,v)=>f.isCollapsed!==o&&v<=l);d.push(...C)}g.toggleCollapseState(d)}e.setCollapseStateLevelsUp=_;function h(g,o,l){const a=[];for(const d of l){const u=g.getAllRegionsAtLine(d,C=>C.isCollapsed!==o);u.length>0&&a.push(u[0])}g.toggleCollapseState(a)}e.setCollapseStateUp=h;function m(g,o,l,a){const d=(C,f)=>f===o&&C.isCollapsed!==l&&!a.some(v=>C.containsLine(v)),u=g.getRegionsInside(null,d);g.toggleCollapseState(u)}e.setCollapseStateAtLevel=m;function n(g,o,l){const a=[];for(const C of l){const f=g.getAllRegionsAtLine(C,void 0);f.length>0&&a.push(f[0])}const d=C=>a.every(f=>!f.containedBy(C)&&!C.containedBy(f))&&C.isCollapsed!==o,u=g.getRegionsInside(null,d);g.toggleCollapseState(u)}e.setCollapseStateForRest=n;function t(g,o,l){const a=g.textModel,d=g.regions,u=[];for(let C=d.length-1;C>=0;C--)if(l!==d.isCollapsed(C)){const f=d.getStartLineNumber(C);o.test(a.getLineContent(f))&&u.push(d.toRegion(C))}g.toggleCollapseState(u)}e.setCollapseStateForMatchingLines=t;function i(g,o,l){const a=g.regions,d=[];for(let u=a.length-1;u>=0;u--)l!==a.isCollapsed(u)&&o===a.getType(u)&&d.push(a.toRegion(u));g.toggleCollapseState(d)}e.setCollapseStateForType=i;function s(g,o){let l=null;const a=o.getRegionAtLine(g);if(a!==null&&(l=a.startLineNumber,g===l)){const d=a.parentIndex;d!==-1?l=o.regions.getStartLineNumber(d):l=null}return l}e.getParentFoldLine=s;function r(g,o){let l=o.getRegionAtLine(g);if(l!==null&&l.startLineNumber===g){if(g!==l.startLineNumber)return l.startLineNumber;{const a=l.parentIndex;let d=0;for(a!==-1&&(d=o.regions.getStartLineNumber(l.parentIndex));l!==null;)if(l.regionIndex>0){if(l=o.regions.toRegion(l.regionIndex-1),l.startLineNumber<=d)return null;if(l.parentIndex===a)return l.startLineNumber}else return null}}else if(o.regions.length>0)for(l=o.regions.toRegion(o.regions.length-1);l!==null;){if(l.startLineNumber<g)return l.startLineNumber;l.regionIndex>0?l=o.regions.toRegion(l.regionIndex-1):l=null}return null}e.getPreviousFoldLine=r;function c(g,o){let l=o.getRegionAtLine(g);if(l!==null&&l.startLineNumber===g){const a=l.parentIndex;let d=0;if(a!==-1)d=o.regions.getEndLineNumber(l.parentIndex);else{if(o.regions.length===0)return null;d=o.regions.getEndLineNumber(o.regions.length-1)}for(;l!==null;)if(l.regionIndex<o.regions.length){if(l=o.regions.toRegion(l.regionIndex+1),l.startLineNumber>=d)return null;if(l.parentIndex===a)return l.startLineNumber}else return null}else if(o.regions.length>0)for(l=o.regions.toRegion(0);l!==null;){if(l.startLineNumber>g)return l.startLineNumber;l.regionIndex<o.regions.length?l=o.regions.toRegion(l.regionIndex+1):l=null}return null}e.getNextFoldLine=c}),define(J[568],ee([1,0,16,6,5,116]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HiddenRangeModel=void 0;class w{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(m){this._updateEventEmitter=new k.Emitter,this._hasLineChanges=!1,this._foldingModel=m,this._foldingModelListener=m.onDidChange(n=>this.updateHiddenRanges()),this._hiddenRanges=[],m.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(m){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=m.changes.some(n=>n.range.endLineNumber!==n.range.startLineNumber||(0,D.countEOL)(n.text)[0]!==0))}updateHiddenRanges(){let m=!1;const n=[];let t=0,i=0,s=Number.MAX_VALUE,r=-1;const c=this._foldingModel.regions;for(;t<c.length;t++){if(!c.isCollapsed(t))continue;const g=c.getStartLineNumber(t)+1,o=c.getEndLineNumber(t);s<=g&&o<=r||(!m&&i<this._hiddenRanges.length&&this._hiddenRanges[i].startLineNumber===g&&this._hiddenRanges[i].endLineNumber===o?(n.push(this._hiddenRanges[i]),i++):(m=!0,n.push(new y.Range(g,1,o,1))),s=g,r=o)}(this._hasLineChanges||m||i<this._hiddenRanges.length)&&this.applyHiddenRanges(n)}applyHiddenRanges(m){this._hiddenRanges=m,this._hasLineChanges=!1,this._updateEventEmitter.fire(m)}hasRanges(){return this._hiddenRanges.length>0}isHidden(m){return _(this._hiddenRanges,m)!==null}adjustSelections(m){let n=!1;const t=this._foldingModel.textModel;let i=null;const s=r=>((!i||!b(r,i))&&(i=_(this._hiddenRanges,r)),i?i.startLineNumber-1:null);for(let r=0,c=m.length;r<c;r++){let g=m[r];const o=s(g.startLineNumber);o&&(g=g.setStartPosition(o,t.getLineMaxColumn(o)),n=!0);const l=s(g.endLineNumber);l&&(g=g.setEndPosition(l,t.getLineMaxColumn(l)),n=!0),m[r]=g}return n}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=w;function b(h,m){return h>=m.startLineNumber&&h<=m.endLineNumber}function _(h,m){const n=(0,S.findFirstInSorted)(h,t=>m<t.startLineNumber)-1;return n>=0&&h[n].endLineNumber>=m?h[n]:null}}),define(J[174],ee([1,0,6,2,17]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function D(n,t){return!!n[t]}class w{constructor(t,i){this.target=t.target,this.isLeftClick=t.event.leftButton,this.isMiddleClick=t.event.middleButton,this.isRightClick=t.event.rightButton,this.hasTriggerModifier=D(t.event,i.triggerModifier),this.hasSideBySideModifier=D(t.event,i.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=t.event.detail<=1}}e.ClickLinkMouseEvent=w;class b{constructor(t,i){this.keyCodeIsTriggerKey=t.keyCode===i.triggerKey,this.keyCodeIsSideBySideKey=t.keyCode===i.triggerSideBySideKey,this.hasTriggerModifier=D(t,i.triggerModifier)}}e.ClickLinkKeyboardEvent=b;class _{constructor(t,i,s,r){this.triggerKey=t,this.triggerModifier=i,this.triggerSideBySideKey=s,this.triggerSideBySideModifier=r}equals(t){return this.triggerKey===t.triggerKey&&this.triggerModifier===t.triggerModifier&&this.triggerSideBySideKey===t.triggerSideBySideKey&&this.triggerSideBySideModifier===t.triggerSideBySideModifier}}e.ClickLinkOptions=_;function h(n){return n==="altKey"?y.isMacintosh?new _(57,"metaKey",6,"altKey"):new _(5,"ctrlKey",6,"altKey"):y.isMacintosh?new _(6,"altKey",57,"metaKey"):new _(6,"altKey",5,"ctrlKey")}class m extends k.Disposable{constructor(t,i){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new S.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new S.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new S.Emitter),this.onCancel=this._onCancel.event,this._editor=t,this._alwaysFireExecuteOnMouseUp=i,this._opts=h(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(s=>{if(s.hasChanged(75)){const r=h(this._editor.getOption(75));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(s=>this._onEditorMouseMove(new w(s,this._opts)))),this._register(this._editor.onMouseDown(s=>this._onEditorMouseDown(new w(s,this._opts)))),this._register(this._editor.onMouseUp(s=>this._onEditorMouseUp(new w(s,this._opts)))),this._register(this._editor.onKeyDown(s=>this._onEditorKeyDown(new b(s,this._opts)))),this._register(this._editor.onKeyUp(s=>this._onEditorKeyUp(new b(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(t){t.selection&&t.selection.startColumn!==t.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(t){this._lastMouseMoveEvent=t,this._onMouseMoveOrRelevantKeyDown.fire([t,null])}_onEditorMouseDown(t){this._hasTriggerKeyOnMouseDown=t.hasTriggerModifier,this._lineNumberOnMouseDown=t.target.position?t.target.position.lineNumber:0}_onEditorMouseUp(t){const i=t.target.position?t.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===i||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(t)}_onEditorKeyDown(t){this._lastMouseMoveEvent&&(t.keyCodeIsTriggerKey||t.keyCodeIsSideBySideKey&&t.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,t]):t.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(t){t.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=m});var St=this&&this.__asyncValues||function(q){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=q[Symbol.asyncIterator],S;return e?e.call(q):(q=typeof __values=="function"?__values(q):q[Symbol.iterator](),S={},k("next"),k("throw"),k("return"),S[Symbol.asyncIterator]=function(){return this},S);function k(D){S[D]=q[D]&&function(w){return new Promise(function(b,_){w=q[D](w),y(b,_,w.done,w.value)})}}function y(D,w,b,_){Promise.resolve(_).then(function(h){D({value:h,done:b})},w)}};define(J[299],ee([1,0,12,11,6,2]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=void 0;class w{constructor(h,m,n){this.value=h,this.isComplete=m,this.hasLoadingMessage=n}}e.HoverResult=w;class b extends D.Disposable{constructor(h,m){super(),this._editor=h,this._computer=m,this._onResult=this._register(new y.Emitter),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new S.RunOnceScheduler(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new S.RunOnceScheduler(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new S.RunOnceScheduler(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(58).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(h,m=!0){this._state=h,m&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,S.createCancelableAsyncIterable)(h=>this._computer.computeAsync(h)),Ee(this,void 0,void 0,function*(){var h,m,n,t;try{try{for(var i=!0,s=St(this._asyncIterable),r;r=yield s.next(),h=r.done,!h;){t=r.value,i=!1;try{const c=t;c&&(this._result.push(c),this._fireResult())}finally{i=!0}}}catch(c){m={error:c}}finally{try{!i&&!h&&(n=s.return)&&(yield n.call(s))}finally{if(m)throw m.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(c){(0,k.onUnexpectedError)(c)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const h=this._state===0,m=this._state===4;this._onResult.fire(new w(this._result.slice(0),h,m))}start(h){if(h===0)this._state===0&&(this._setState(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._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}e.HoverOperation=b}),define(J[300],ee([1,0,11,2,13,5,49,20]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class _{constructor(i,s){this.range=i,this.direction=s}}e.InlayHintAnchor=_;class h{constructor(i,s,r){this.hint=i,this.anchor=s,this.provider=r,this._isResolved=!1}with(i){const s=new h(this.hint,i.anchor,this.provider);return s._isResolved=this._isResolved,s._currentResolve=this._currentResolve,s}resolve(i){return Ee(this,void 0,void 0,function*(){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return yield this._currentResolve,i.isCancellationRequested?void 0:this.resolve(i);this._isResolved||(this._currentResolve=this._doResolve(i).finally(()=>this._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(i){var s,r;return Ee(this,void 0,void 0,function*(){try{const c=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,i));this.hint.tooltip=(s=c?.tooltip)!==null&&s!==void 0?s:this.hint.tooltip,this.hint.label=(r=c?.label)!==null&&r!==void 0?r:this.hint.label,this._isResolved=!0}catch(c){(0,S.onUnexpectedExternalError)(c),this._isResolved=!1}})}}e.InlayHintItem=h;class m{static create(i,s,r,c){return Ee(this,void 0,void 0,function*(){const g=[],o=i.ordered(s).reverse().map(l=>r.map(a=>Ee(this,void 0,void 0,function*(){try{const d=yield l.provideInlayHints(s,a,c);d?.hints.length&&g.push([d,l])}catch(d){(0,S.onUnexpectedExternalError)(d)}})));if(yield Promise.all(o.flat()),c.isCancellationRequested||s.isDisposed())throw new S.CancellationError;return new m(r,g,s)})}constructor(i,s,r){this._disposables=new k.DisposableStore,this.ranges=i,this.provider=new Set;const c=[];for(const[g,o]of s){this._disposables.add(g),this.provider.add(o);for(const l of g.hints){const a=r.validatePosition(l.position);let d="before";const u=m._getRangeAtPosition(r,a);let C;u.getStartPosition().isBefore(a)?(C=D.Range.fromPositions(u.getStartPosition(),a),d="after"):(C=D.Range.fromPositions(a,u.getEndPosition()),d="before"),c.push(new h(l,new _(C,d),o))}}this.items=c.sort((g,o)=>y.Position.compare(g.hint.position,o.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(i,s){const r=s.lineNumber,c=i.getWordAtPosition(s);if(c)return new D.Range(r,c.startColumn,r,c.endColumn);i.tokenization.tokenizeIfCheap(r);const g=i.tokenization.getLineTokens(r),o=s.column-1,l=g.findTokenIndexAtOffset(o);let a=g.getStartOffset(l),d=g.getEndOffset(l);return d-a===1&&(a===o&&l>1?(a=g.getStartOffset(l-1),d=g.getEndOffset(l-1)):d===o&&l<g.getCount()-1&&(a=g.getStartOffset(l+1),d=g.getEndOffset(l+1))),new D.Range(r,a+1,r,d+1)}}e.InlayHintsFragments=m;function n(t){return b.URI.from({scheme:w.Schemas.command,path:t.id,query:t.arguments&&encodeURIComponent(JSON.stringify(t.arguments))}).toString()}e.asCommandLink=n}),define(J[175],ee([1,0,6,2,199]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseGhostTextWidgetModel=e.GhostTextReplacement=e.GhostTextPart=e.GhostText=void 0;class D{constructor(m,n,t=0){this.lineNumber=m,this.parts=n,this.additionalReservedLineCount=t}renderForScreenReader(m){if(this.parts.length===0)return"";const n=this.parts[this.parts.length-1],t=m.substr(0,n.column-1);return(0,y.applyEdits)(t,this.parts.map(s=>({range:{startLineNumber:1,endLineNumber:1,startColumn:s.column,endColumn:s.column},text:s.lines.join(`\n`)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(m=>m.lines.length===0)}}e.GhostText=D;class w{constructor(m,n,t){this.column=m,this.lines=n,this.preview=t}}e.GhostTextPart=w;class b{constructor(m,n,t,i,s=0){this.lineNumber=m,this.columnStart=n,this.length=t,this.newLines=i,this.additionalReservedLineCount=s,this.parts=[new w(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(m){return this.newLines.join(`\n`)}}e.GhostTextReplacement=b;class _ extends k.Disposable{constructor(m){super(),this.editor=m,this._expanded=void 0,this.onDidChangeEmitter=new S.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._register(m.onDidChangeConfiguration(n=>{n.hasChanged(113)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(m){this._expanded=!0,this.onDidChangeEmitter.fire()}}e.BaseGhostTextWidgetModel=_}),define(J[220],ee([1,0,157,9,5,175]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineCompletionToGhostText=e.normalizedInlineCompletionsEquals=e.minimizeInlineCompletion=void 0;function w(i,s){if(!s)return s;const r=i.getValueInRange(s.range),c=k.commonPrefixLength(r,s.insertText),g=i.getOffsetAt(s.range.getStartPosition())+c,o=i.getPositionAt(g),l=r.substr(c),a=k.commonSuffixLength(l,s.insertText),d=i.getPositionAt(Math.max(g,i.getOffsetAt(s.range.getEndPosition())-a));return{range:y.Range.fromPositions(o,d),insertText:s.insertText.substr(c,s.insertText.length-c-a),snippetInfo:s.snippetInfo,filterText:s.filterText,additionalTextEdits:s.additionalTextEdits}}e.minimizeInlineCompletion=w;function b(i,s){return i===s?!0:!i||!s?!1:i.range.equalsRange(s.range)&&i.insertText===s.insertText&&i.command===s.command}e.normalizedInlineCompletionsEquals=b;function _(i,s,r,c,g=0){if(i.range.startLineNumber!==i.range.endLineNumber)return;const o=s.getLineContent(i.range.startLineNumber),l=k.getLeadingWhitespace(o).length;if(i.range.startColumn-1<=l){const p=k.getLeadingWhitespace(i.insertText).length,L=o.substring(i.range.startColumn-1,l),E=y.Range.fromPositions(i.range.getStartPosition().delta(0,L.length),i.range.getEndPosition()),I=i.insertText.startsWith(L)?i.insertText.substring(L.length):i.insertText.substring(p);i={range:E,insertText:I,command:i.command,snippetInfo:void 0,filterText:i.filterText,additionalTextEdits:i.additionalTextEdits}}const d=s.getValueInRange(i.range),u=m(d,i.insertText);if(!u)return;const C=i.range.startLineNumber,f=new Array;if(r==="prefix"){const p=u.filter(L=>L.originalLength===0);if(p.length>1||p.length===1&&p[0].originalStart!==d.length)return}const v=i.insertText.length-g;for(const p of u){const L=i.range.startColumn+p.originalStart+p.originalLength;if(r==="subwordSmart"&&c&&c.lineNumber===i.range.startLineNumber&&L<c.column||p.originalLength>0)return;if(p.modifiedLength===0)continue;const E=p.modifiedStart+p.modifiedLength,I=Math.max(p.modifiedStart,Math.min(E,v)),T=i.insertText.substring(p.modifiedStart,I),F=i.insertText.substring(I,Math.max(p.modifiedStart,E));if(T.length>0){const R=k.splitLines(T);f.push(new D.GhostTextPart(L,R,!1))}if(F.length>0){const R=k.splitLines(F);f.push(new D.GhostTextPart(L,R,!0))}}return new D.GhostText(C,f,0)}e.inlineCompletionToGhostText=_;let h;function m(i,s){if(h?.originalValue===i&&h?.newValue===s)return h?.changes;{let r=t(i,s,!0);if(r){const c=n(r);if(c>0){const g=t(i,s,!1);g&&n(g)<c&&(r=g)}}return h={originalValue:i,newValue:s,changes:r},r}}function n(i){let s=0;for(const r of i)s+=r.originalLength;return s}function t(i,s,r){if(i.length>5e3||s.length>5e3)return;function c(u){let C=0;for(let f=0,v=u.length;f<v;f++){const p=u.charCodeAt(f);p>C&&(C=p)}return C}const g=Math.max(c(i),c(s));function o(u){if(u<0)throw new Error("unexpected");return g+u+1}function l(u){let C=0,f=0;const v=new Int32Array(u.length);for(let p=0,L=u.length;p<L;p++)if(r&&u[p]==="("){const E=f*100+C;v[p]=o(2*E),C++}else if(r&&u[p]===")"){C=Math.max(C-1,0);const E=f*100+C;v[p]=o(2*E+1),C===0&&f++}else v[p]=u.charCodeAt(p);return v}const a=l(i),d=l(s);return new S.LcsDiff({getElements:()=>a},{getElements:()=>d}).ComputeDiff(!1).changes}}),define(J[569],ee([3,4]),function(q,e){return q.create("vs/editor/browser/controller/textAreaHandler",e)}),define(J[570],ee([3,4]),function(q,e){return q.create("vs/editor/browser/coreCommands",e)}),define(J[571],ee([3,4]),function(q,e){return q.create("vs/editor/browser/editorExtensions",e)}),define(J[572],ee([3,4]),function(q,e){return q.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(J[573],ee([3,4]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(J[574],ee([3,4]),function(q,e){return q.create("vs/editor/browser/widget/diffReview",e)}),define(J[575],ee([3,4]),function(q,e){return q.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(J[576],ee([1,0,575,7,41,2,5,29,32]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class h extends D.Disposable{get visibility(){return this._visibility}set visibility(n){this._visibility!==n&&(this._visibility=n,n?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}constructor(n,t,i,s,r,c){super(),this._viewZoneId=n,this._marginDomNode=t,this.editor=i,this.diff=s,this._contextMenuService=r,this._clipboardService=c,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=_.ThemeIcon.asClassName(b.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const g=i.getOption(64),o=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${g}px`,this._diffActions.style.lineHeight=`${g}px`,this._marginDomNode.appendChild(this._diffActions);const l=[],a=s.modifiedEndLineNumber===0;l.push(new y.Action("diff.clipboard.copyDeletedContent",a?s.originalEndLineNumber>s.modifiedStartLineNumber?S.localize(0,null):S.localize(1,null):s.originalEndLineNumber>s.modifiedStartLineNumber?S.localize(2,null):S.localize(3,null),void 0,!0,()=>Ee(this,void 0,void 0,function*(){const v=new w.Range(s.originalStartLineNumber,1,s.originalEndLineNumber+1,1),p=s.originalModel.getValueInRange(v);yield this._clipboardService.writeText(p)})));let d=0,u;s.originalEndLineNumber>s.modifiedStartLineNumber&&(u=new y.Action("diff.clipboard.copyDeletedLineContent",a?S.localize(4,null,s.originalStartLineNumber):S.localize(5,null,s.originalStartLineNumber),void 0,!0,()=>Ee(this,void 0,void 0,function*(){const v=s.originalModel.getLineContent(s.originalStartLineNumber+d);if(v===""){const p=s.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(p===0?`\n`:`\\r\n`)}else yield this._clipboardService.writeText(v)})),l.push(u)),i.getOption(87)||l.push(new y.Action("diff.inline.revertChange",S.localize(6,null),void 0,!0,()=>Ee(this,void 0,void 0,function*(){const v=new w.Range(s.originalStartLineNumber,1,s.originalEndLineNumber,s.originalModel.getLineMaxColumn(s.originalEndLineNumber)),p=s.originalModel.getValueInRange(v);if(s.modifiedEndLineNumber===0){const L=i.getModel().getLineMaxColumn(s.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new w.Range(s.modifiedStartLineNumber,L,s.modifiedStartLineNumber,L),text:o+p}])}else{const L=i.getModel().getLineMaxColumn(s.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new w.Range(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,L),text:p}])}})));const f=(v,p)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:v,y:p}),getActions:()=>(u&&(u.label=a?S.localize(7,null,s.originalStartLineNumber+d):S.localize(8,null,s.originalStartLineNumber+d)),l),autoSelectFirstItem:!0})};this._register(k.addStandardDisposableListener(this._diffActions,"mousedown",v=>{const{top:p,height:L}=k.getDomNodePagePosition(this._diffActions),E=Math.floor(g/3);v.preventDefault(),f(v.posx,p+L+E)})),this._register(i.onMouseMove(v=>{v.target.type===8||v.target.type===5?v.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,d=this._updateLightBulbPosition(this._marginDomNode,v.event.browserEvent.y,g)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(v=>{v.event.rightButton&&(v.target.type===8||v.target.type===5)&&v.target.detail.viewZoneId===this._viewZoneId&&(v.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,v.event.browserEvent.y,g),f(v.event.posx,v.event.posy+g))}))}_updateLightBulbPosition(n,t,i){const{top:s}=k.getDomNodePagePosition(n),r=t-s,c=Math.floor(r/i),g=c*i;if(this._diffActions.style.top=`${g}px`,this.diff.viewLineCounts){let o=0;for(let l=0;l<this.diff.viewLineCounts.length;l++)if(o+=this.diff.viewLineCounts[l],c<o)return l}return c}}e.InlineDiffMargin=h}),define(J[577],ee([3,4]),function(q,e){return q.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(J[578],ee([3,4]),function(q,e){return q.create("vs/editor/common/config/editorOptions",e)}),define(J[40],ee([1,0,578,17,136,16,45,163]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.filterValidationDecorations=e.EditorLayoutInfoComputer=e.EditorFontVariations=e.EditorFontLigatures=e.TextEditorCursorStyle=e.stringSet=e.clampedInt=e.boolean=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=void 0,e.MINIMAP_GUTTER_WIDTH=8;class _{constructor(ae){this._values=ae}hasChanged(ae){return this._values[ae]}}e.ConfigurationChangedEvent=_;class h{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=h;class m{constructor(ae,ve,Le,Ie){this.id=ae,this.name=ve,this.defaultValue=Le,this.schema=Ie}applyUpdate(ae,ve){return t(ae,ve)}compute(ae,ve,Le){return Le}}class n{constructor(ae,ve){this.newValue=ae,this.didChange=ve}}e.ApplyUpdateResult=n;function t(pe,ae){if(typeof pe!="object"||typeof ae!="object"||!pe||!ae)return new n(ae,pe!==ae);if(Array.isArray(pe)||Array.isArray(ae)){const Le=Array.isArray(pe)&&Array.isArray(ae)&&D.equals(pe,ae);return new n(ae,!Le)}let ve=!1;for(const Le in ae)if(ae.hasOwnProperty(Le)){const Ie=t(pe[Le],ae[Le]);Ie.didChange&&(pe[Le]=Ie.newValue,ve=!0)}return new n(pe,ve)}class i{constructor(ae){this.schema=void 0,this.id=ae,this.name="_never_",this.defaultValue=void 0}applyUpdate(ae,ve){return t(ae,ve)}validate(ae){return this.defaultValue}}class s{constructor(ae,ve,Le,Ie){this.id=ae,this.name=ve,this.defaultValue=Le,this.schema=Ie}applyUpdate(ae,ve){return t(ae,ve)}validate(ae){return typeof ae>"u"?this.defaultValue:ae}compute(ae,ve,Le){return Le}}function r(pe,ae){return typeof pe>"u"?ae:pe==="false"?!1:!!pe}e.boolean=r;class c extends s{constructor(ae,ve,Le,Ie=void 0){typeof Ie<"u"&&(Ie.type="boolean",Ie.default=Le),super(ae,ve,Le,Ie)}validate(ae){return r(ae,this.defaultValue)}}function g(pe,ae,ve,Le){if(typeof pe>"u")return ae;let Ie=parseInt(pe,10);return isNaN(Ie)?ae:(Ie=Math.max(ve,Ie),Ie=Math.min(Le,Ie),Ie|0)}e.clampedInt=g;class o extends s{static clampedInt(ae,ve,Le,Ie){return g(ae,ve,Le,Ie)}constructor(ae,ve,Le,Ie,Ae,be=void 0){typeof be<"u"&&(be.type="integer",be.default=Le,be.minimum=Ie,be.maximum=Ae),super(ae,ve,Le,be),this.minimum=Ie,this.maximum=Ae}validate(ae){return o.clampedInt(ae,this.defaultValue,this.minimum,this.maximum)}}class l extends s{static clamp(ae,ve,Le){return ae<ve?ve:ae>Le?Le:ae}static float(ae,ve){if(typeof ae=="number")return ae;if(typeof ae>"u")return ve;const Le=parseFloat(ae);return isNaN(Le)?ve:Le}constructor(ae,ve,Le,Ie,Ae){typeof Ae<"u"&&(Ae.type="number",Ae.default=Le),super(ae,ve,Le,Ae),this.validationFn=Ie}validate(ae){return this.validationFn(l.float(ae,this.defaultValue))}}class a extends s{static string(ae,ve){return typeof ae!="string"?ve:ae}constructor(ae,ve,Le,Ie=void 0){typeof Ie<"u"&&(Ie.type="string",Ie.default=Le),super(ae,ve,Le,Ie)}validate(ae){return a.string(ae,this.defaultValue)}}function d(pe,ae,ve){return typeof pe!="string"||ve.indexOf(pe)===-1?ae:pe}e.stringSet=d;class u extends s{constructor(ae,ve,Le,Ie,Ae=void 0){typeof Ae<"u"&&(Ae.type="string",Ae.enum=Ie,Ae.default=Le),super(ae,ve,Le,Ae),this._allowedValues=Ie}validate(ae){return d(ae,this.defaultValue,this._allowedValues)}}class C extends m{constructor(ae,ve,Le,Ie,Ae,be,Se=void 0){typeof Se<"u"&&(Se.type="string",Se.enum=Ae,Se.default=Ie),super(ae,ve,Le,Se),this._allowedValues=Ae,this._convert=be}validate(ae){return typeof ae!="string"?this.defaultValue:this._allowedValues.indexOf(ae)===-1?this.defaultValue:this._convert(ae)}}function f(pe){switch(pe){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class v extends m{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[S.localize(0,null),S.localize(1,null),S.localize(2,null)],default:"auto",tags:["accessibility"],description:S.localize(3,null)})}validate(ae){switch(ae){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(ae,ve,Le){return Le===0?ae.accessibilitySupport:Le}}class p extends m{constructor(){const ae={insertSpace:!0,ignoreEmptyLines:!0};super(21,"comments",ae,{"editor.comments.insertSpace":{type:"boolean",default:ae.insertSpace,description:S.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:ae.ignoreEmptyLines,description:S.localize(5,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{insertSpace:r(ve.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:r(ve.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function L(pe){switch(pe){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var E;(function(pe){pe[pe.Line=1]="Line",pe[pe.Block=2]="Block",pe[pe.Underline=3]="Underline",pe[pe.LineThin=4]="LineThin",pe[pe.BlockOutline=5]="BlockOutline",pe[pe.UnderlineThin=6]="UnderlineThin"})(E=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));function I(pe){switch(pe){case"line":return E.Line;case"block":return E.Block;case"underline":return E.Underline;case"line-thin":return E.LineThin;case"block-outline":return E.BlockOutline;case"underline-thin":return E.UnderlineThin}}class T extends i{constructor(){super(136)}compute(ae,ve,Le){const Ie=["monaco-editor"];return ve.get(37)&&Ie.push(ve.get(37)),ae.extraEditorClassName&&Ie.push(ae.extraEditorClassName),ve.get(71)==="default"?Ie.push("mouse-default"):ve.get(71)==="copy"&&Ie.push("mouse-copy"),ve.get(106)&&Ie.push("showUnused"),ve.get(134)&&Ie.push("showDeprecated"),Ie.join(" ")}}class F extends c{constructor(){super(35,"emptySelectionClipboard",!0,{description:S.localize(6,null)})}compute(ae,ve,Le){return Le&&ae.emptySelectionClipboard}}class R extends m{constructor(){const ae={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(39,"find",ae,{"editor.find.cursorMoveOnType":{type:"boolean",default:ae.cursorMoveOnType,description:S.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:ae.seedSearchStringFromSelection,enumDescriptions:[S.localize(8,null),S.localize(9,null),S.localize(10,null)],description:S.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:ae.autoFindInSelection,enumDescriptions:[S.localize(12,null),S.localize(13,null),S.localize(14,null)],description:S.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:ae.globalFindClipboard,description:S.localize(16,null),included:k.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:ae.addExtraSpaceOnTop,description:S.localize(17,null)},"editor.find.loop":{type:"boolean",default:ae.loop,description:S.localize(18,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{cursorMoveOnType:r(ve.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof ae.seedSearchStringFromSelection=="boolean"?ae.seedSearchStringFromSelection?"always":"never":d(ve.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof ae.autoFindInSelection=="boolean"?ae.autoFindInSelection?"always":"never":d(ve.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:r(ve.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:r(ve.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:r(ve.loop,this.defaultValue.loop)}}}class M extends m{constructor(){super(49,"fontLigatures",M.OFF,{anyOf:[{type:"boolean",description:S.localize(19,null)},{type:"string",description:S.localize(20,null)}],description:S.localize(21,null),default:!1})}validate(ae){return typeof ae>"u"?this.defaultValue:typeof ae=="string"?ae==="false"?M.OFF:ae==="true"?M.ON:ae:ae?M.ON:M.OFF}}M.OFF=\'"liga" off, "calt" off\',M.ON=\'"liga" on, "calt" on\',e.EditorFontLigatures=M;class N extends m{constructor(){super(52,"fontVariations",N.OFF,{anyOf:[{type:"boolean",description:S.localize(22,null)},{type:"string",description:S.localize(23,null)}],description:S.localize(24,null),default:!1})}validate(ae){return typeof ae>"u"?this.defaultValue:typeof ae=="string"?ae==="false"?N.OFF:ae==="true"?N.TRANSLATE:ae:ae?N.TRANSLATE:N.OFF}compute(ae,ve,Le){return ae.fontInfo.fontVariationSettings}}N.OFF="normal",N.TRANSLATE="translate",e.EditorFontVariations=N;class A extends i{constructor(){super(48)}compute(ae,ve,Le){return ae.fontInfo}}class P extends s{constructor(){super(50,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:S.localize(25,null)})}validate(ae){const ve=l.float(ae,this.defaultValue);return ve===0?e.EDITOR_FONT_DEFAULTS.fontSize:l.clamp(ve,6,100)}compute(ae,ve,Le){return ae.fontInfo.fontSize}}class x extends m{constructor(){super(51,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:x.MINIMUM_VALUE,maximum:x.MAXIMUM_VALUE,errorMessage:S.localize(26,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:x.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:S.localize(27,null)})}validate(ae){return ae==="normal"||ae==="bold"?ae:String(o.clampedInt(ae,e.EDITOR_FONT_DEFAULTS.fontWeight,x.MINIMUM_VALUE,x.MAXIMUM_VALUE))}}x.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],x.MINIMUM_VALUE=1,x.MAXIMUM_VALUE=1e3;class W extends m{constructor(){const ae={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:""},ve={type:"string",enum:["peek","gotoAndPeek","goto"],default:ae.multiple,enumDescriptions:[S.localize(28,null),S.localize(29,null),S.localize(30,null)]},Le=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(56,"gotoLocation",ae,{"editor.gotoLocation.multiple":{deprecationMessage:S.localize(31,null)},"editor.gotoLocation.multipleDefinitions":Object.assign({description:S.localize(32,null)},ve),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:S.localize(33,null)},ve),"editor.gotoLocation.multipleDeclarations":Object.assign({description:S.localize(34,null)},ve),"editor.gotoLocation.multipleImplementations":Object.assign({description:S.localize(35,null)},ve),"editor.gotoLocation.multipleReferences":Object.assign({description:S.localize(36,null)},ve),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:ae.alternativeDefinitionCommand,enum:Le,description:S.localize(37,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:ae.alternativeTypeDefinitionCommand,enum:Le,description:S.localize(38,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:ae.alternativeDeclarationCommand,enum:Le,description:S.localize(39,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:ae.alternativeImplementationCommand,enum:Le,description:S.localize(40,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:ae.alternativeReferenceCommand,enum:Le,description:S.localize(41,null)}})}validate(ae){var ve,Le,Ie,Ae,be;if(!ae||typeof ae!="object")return this.defaultValue;const Se=ae;return{multiple:d(Se.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(ve=Se.multipleDefinitions)!==null&&ve!==void 0?ve:d(Se.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(Le=Se.multipleTypeDefinitions)!==null&&Le!==void 0?Le:d(Se.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Ie=Se.multipleDeclarations)!==null&&Ie!==void 0?Ie:d(Se.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(Ae=Se.multipleImplementations)!==null&&Ae!==void 0?Ae:d(Se.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(be=Se.multipleReferences)!==null&&be!==void 0?be:d(Se.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:a.string(Se.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:a.string(Se.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:a.string(Se.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:a.string(Se.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:a.string(Se.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class U extends m{constructor(){const ae={enabled:!0,delay:300,sticky:!0,above:!0};super(58,"hover",ae,{"editor.hover.enabled":{type:"boolean",default:ae.enabled,description:S.localize(42,null)},"editor.hover.delay":{type:"number",default:ae.delay,minimum:0,maximum:1e4,description:S.localize(43,null)},"editor.hover.sticky":{type:"boolean",default:ae.sticky,description:S.localize(44,null)},"editor.hover.above":{type:"boolean",default:ae.above,description:S.localize(45,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{enabled:r(ve.enabled,this.defaultValue.enabled),delay:o.clampedInt(ve.delay,this.defaultValue.delay,0,1e4),sticky:r(ve.sticky,this.defaultValue.sticky),above:r(ve.above,this.defaultValue.above)}}}class O extends i{constructor(){super(139)}compute(ae,ve,Le){return O.computeLayout(ve,{memory:ae.memory,outerWidth:ae.outerWidth,outerHeight:ae.outerHeight,isDominatedByLongLines:ae.isDominatedByLongLines,lineHeight:ae.fontInfo.lineHeight,viewLineCount:ae.viewLineCount,lineNumbersDigitCount:ae.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:ae.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:ae.fontInfo.maxDigitWidth,pixelRatio:ae.pixelRatio})}static computeContainedMinimapLineCount(ae){const ve=ae.height/ae.lineHeight,Le=Math.floor(ae.paddingTop/ae.lineHeight);let Ie=Math.floor(ae.paddingBottom/ae.lineHeight);ae.scrollBeyondLastLine&&(Ie=Math.max(Ie,ve-1));const Ae=(Le+ae.viewLineCount+Ie)/(ae.pixelRatio*ae.height),be=Math.floor(ae.viewLineCount/Ae);return{typicalViewportLineCount:ve,extraLinesBeforeFirstLine:Le,extraLinesBeyondLastLine:Ie,desiredRatio:Ae,minimapLineCount:be}}static _computeMinimapLayout(ae,ve){const Le=ae.outerWidth,Ie=ae.outerHeight,Ae=ae.pixelRatio;if(!ae.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(Ae*Ie),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Ie};const be=ve.stableMinimapLayoutInput,Se=be&&ae.outerHeight===be.outerHeight&&ae.lineHeight===be.lineHeight&&ae.typicalHalfwidthCharacterWidth===be.typicalHalfwidthCharacterWidth&&ae.pixelRatio===be.pixelRatio&&ae.scrollBeyondLastLine===be.scrollBeyondLastLine&&ae.paddingTop===be.paddingTop&&ae.paddingBottom===be.paddingBottom&&ae.minimap.enabled===be.minimap.enabled&&ae.minimap.side===be.minimap.side&&ae.minimap.size===be.minimap.size&&ae.minimap.showSlider===be.minimap.showSlider&&ae.minimap.renderCharacters===be.minimap.renderCharacters&&ae.minimap.maxColumn===be.minimap.maxColumn&&ae.minimap.scale===be.minimap.scale&&ae.verticalScrollbarWidth===be.verticalScrollbarWidth&&ae.isViewportWrapping===be.isViewportWrapping,Te=ae.lineHeight,Pe=ae.typicalHalfwidthCharacterWidth,Fe=ae.scrollBeyondLastLine,Oe=ae.minimap.renderCharacters;let xe=Ae>=2?Math.round(ae.minimap.scale*2):ae.minimap.scale;const Ke=ae.minimap.maxColumn,Ye=ae.minimap.size,qe=ae.minimap.side,st=ae.verticalScrollbarWidth,Ve=ae.viewLineCount,Me=ae.remainingWidth,Be=ae.isViewportWrapping,We=Oe?2:3;let $e=Math.floor(Ae*Ie);const Ue=$e/Ae;let Xe=!1,Je=!1,nt=We*xe,dt=xe/Ae,Ge=1;if(Ye==="fill"||Ye==="fit"){const{typicalViewportLineCount:He,extraLinesBeforeFirstLine:je,extraLinesBeyondLastLine:tt,desiredRatio:Qe,minimapLineCount:it}=O.computeContainedMinimapLineCount({viewLineCount:Ve,scrollBeyondLastLine:Fe,paddingTop:ae.paddingTop,paddingBottom:ae.paddingBottom,height:Ie,lineHeight:Te,pixelRatio:Ae});if(Ve/it>1)Xe=!0,Je=!0,xe=1,nt=1,dt=xe/Ae;else{let at=!1,wt=xe+1;if(Ye==="fit"){const vt=Math.ceil((je+Ve+tt)*nt);Be&&Se&&Me<=ve.stableFitRemainingWidth?(at=!0,wt=ve.stableFitMaxMinimapScale):at=vt>$e}if(Ye==="fill"||at){Xe=!0;const vt=xe;nt=Math.min(Te*Ae,Math.max(1,Math.floor(1/Qe))),Be&&Se&&Me<=ve.stableFitRemainingWidth&&(wt=ve.stableFitMaxMinimapScale),xe=Math.min(wt,Math.max(1,Math.floor(nt/We))),xe>vt&&(Ge=Math.min(2,xe/vt)),dt=xe/Ae/Ge,$e=Math.ceil(Math.max(He,je+Ve+tt)*nt),Be?(ve.stableMinimapLayoutInput=ae,ve.stableFitRemainingWidth=Me,ve.stableFitMaxMinimapScale=xe):(ve.stableMinimapLayoutInput=null,ve.stableFitRemainingWidth=0)}}}const lt=Math.floor(Ke*dt),ut=Math.min(lt,Math.max(0,Math.floor((Me-st-2)*dt/(Pe+dt)))+e.MINIMAP_GUTTER_WIDTH);let ot=Math.floor(Ae*ut);const Ze=ot/Ae;ot=Math.floor(ot*Ge);const Re=Oe?1:2,ze=qe==="left"?0:Le-ut-st;return{renderMinimap:Re,minimapLeft:ze,minimapWidth:ut,minimapHeightIsEditorHeight:Xe,minimapIsSampling:Je,minimapScale:xe,minimapLineHeight:nt,minimapCanvasInnerWidth:ot,minimapCanvasInnerHeight:$e,minimapCanvasOuterWidth:Ze,minimapCanvasOuterHeight:Ue}}static computeLayout(ae,ve){const Le=ve.outerWidth|0,Ie=ve.outerHeight|0,Ae=ve.lineHeight|0,be=ve.lineNumbersDigitCount|0,Se=ve.typicalHalfwidthCharacterWidth,Te=ve.maxDigitWidth,Pe=ve.pixelRatio,Fe=ve.viewLineCount,Oe=ae.get(131),xe=Oe==="inherit"?ae.get(130):Oe,Ke=xe==="inherit"?ae.get(126):xe,Ye=ae.get(129),qe=ve.isDominatedByLongLines,st=ae.get(55),Ve=ae.get(65).renderType!==0,Me=ae.get(66),Be=ae.get(100),We=ae.get(81),$e=ae.get(70),Ue=ae.get(98),Xe=Ue.verticalScrollbarSize,Je=Ue.verticalHasArrows,nt=Ue.arrowSize,dt=Ue.horizontalScrollbarSize,Ge=ae.get(41),lt=ae.get(105)!=="never";let ut=ae.get(63);Ge&<&&(ut+=16);let ot=0;if(Ve){const gt=Math.max(be,Me);ot=Math.round(gt*Te)}let Ze=0;st&&(Ze=Ae);let Re=0,ze=Re+Ze,He=ze+ot,je=He+ut;const tt=Le-Ze-ot-ut;let Qe=!1,it=!1,rt=-1;xe==="inherit"&&qe?(Qe=!0,it=!0):Ke==="on"||Ke==="bounded"?it=!0:Ke==="wordWrapColumn"&&(rt=Ye);const at=O._computeMinimapLayout({outerWidth:Le,outerHeight:Ie,lineHeight:Ae,typicalHalfwidthCharacterWidth:Se,pixelRatio:Pe,scrollBeyondLastLine:Be,paddingTop:We.top,paddingBottom:We.bottom,minimap:$e,verticalScrollbarWidth:Xe,viewLineCount:Fe,remainingWidth:tt,isViewportWrapping:it},ve.memory||new h);at.renderMinimap!==0&&at.minimapLeft===0&&(Re+=at.minimapWidth,ze+=at.minimapWidth,He+=at.minimapWidth,je+=at.minimapWidth);const wt=tt-at.minimapWidth,vt=Math.max(1,Math.floor((wt-Xe-2)/Se)),jt=Je?nt:0;return it&&(rt=Math.max(1,vt),Ke==="bounded"&&(rt=Math.min(rt,Ye))),{width:Le,height:Ie,glyphMarginLeft:Re,glyphMarginWidth:Ze,lineNumbersLeft:ze,lineNumbersWidth:ot,decorationsLeft:He,decorationsWidth:ut,contentLeft:je,contentWidth:wt,minimap:at,viewportColumn:vt,isWordWrapMinified:Qe,isViewportWrapping:it,wrappingColumn:rt,verticalScrollbarWidth:Xe,horizontalScrollbarHeight:dt,overviewRuler:{top:jt,width:Xe,height:Ie-2*jt,right:0}}}}e.EditorLayoutInfoComputer=O;class $ extends m{constructor(){super(133,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[S.localize(46,null),S.localize(47,null)],type:"string",enum:["simple","advanced"],default:"simple",description:S.localize(48,null)}})}validate(ae){return d(ae,"simple",["simple","advanced"])}compute(ae,ve,Le){return ve.get(2)===2?"advanced":Le}}class Q extends m{constructor(){const ae={enabled:!0};super(62,"lightbulb",ae,{"editor.lightbulb.enabled":{type:"boolean",default:ae.enabled,description:S.localize(49,null)}})}validate(ae){return!ae||typeof ae!="object"?this.defaultValue:{enabled:r(ae.enabled,this.defaultValue.enabled)}}}class se extends m{constructor(){const ae={enabled:!1,maxLineCount:5,defaultModel:"outlineModel"};super(110,"stickyScroll",ae,{"editor.stickyScroll.enabled":{type:"boolean",default:ae.enabled,description:S.localize(50,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:ae.maxLineCount,minimum:1,maximum:10,description:S.localize(51,null)},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:ae.defaultModel,description:S.localize(52,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{enabled:r(ve.enabled,this.defaultValue.enabled),maxLineCount:o.clampedInt(ve.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:d(ve.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"])}}}class le extends m{constructor(){const ae={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(135,"inlayHints",ae,{"editor.inlayHints.enabled":{type:"string",default:ae.enabled,description:S.localize(53,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[S.localize(54,null),S.localize(55,null,k.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),S.localize(56,null,k.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),S.localize(57,null)]},"editor.inlayHints.fontSize":{type:"number",default:ae.fontSize,markdownDescription:S.localize(58,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:ae.fontFamily,markdownDescription:S.localize(59,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:ae.padding,description:S.localize(60,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return typeof ve.enabled=="boolean"&&(ve.enabled=ve.enabled?"on":"off"),{enabled:d(ve.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:o.clampedInt(ve.fontSize,this.defaultValue.fontSize,0,100),fontFamily:a.string(ve.fontFamily,this.defaultValue.fontFamily),padding:r(ve.padding,this.defaultValue.padding)}}}class te extends m{constructor(){super(63,"lineDecorationsWidth",10)}validate(ae){return typeof ae=="string"&&/^\\d+(\\.\\d+)?ch$/.test(ae)?-parseFloat(ae.substring(0,ae.length-2)):o.clampedInt(ae,this.defaultValue,0,1e3)}compute(ae,ve,Le){return Le<0?o.clampedInt(-Le*ae.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):Le}}class re extends l{constructor(){super(64,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,ae=>l.clamp(ae,0,150),{markdownDescription:S.localize(61,null)})}compute(ae,ve,Le){return ae.fontInfo.lineHeight}}class H extends m{constructor(){const ae={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(70,"minimap",ae,{"editor.minimap.enabled":{type:"boolean",default:ae.enabled,description:S.localize(62,null)},"editor.minimap.autohide":{type:"boolean",default:ae.autohide,description:S.localize(63,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[S.localize(64,null),S.localize(65,null),S.localize(66,null)],default:ae.size,description:S.localize(67,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:ae.side,description:S.localize(68,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:ae.showSlider,description:S.localize(69,null)},"editor.minimap.scale":{type:"number",default:ae.scale,minimum:1,maximum:3,enum:[1,2,3],description:S.localize(70,null)},"editor.minimap.renderCharacters":{type:"boolean",default:ae.renderCharacters,description:S.localize(71,null)},"editor.minimap.maxColumn":{type:"number",default:ae.maxColumn,description:S.localize(72,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{enabled:r(ve.enabled,this.defaultValue.enabled),autohide:r(ve.autohide,this.defaultValue.autohide),size:d(ve.size,this.defaultValue.size,["proportional","fill","fit"]),side:d(ve.side,this.defaultValue.side,["right","left"]),showSlider:d(ve.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:r(ve.renderCharacters,this.defaultValue.renderCharacters),scale:o.clampedInt(ve.scale,1,1,3),maxColumn:o.clampedInt(ve.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function B(pe){return pe==="ctrlCmd"?k.isMacintosh?"metaKey":"ctrlKey":"altKey"}class j extends m{constructor(){super(81,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:S.localize(73,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:S.localize(74,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{top:o.clampedInt(ve.top,0,0,1e3),bottom:o.clampedInt(ve.bottom,0,0,1e3)}}}class G extends m{constructor(){const ae={enabled:!0,cycle:!0};super(82,"parameterHints",ae,{"editor.parameterHints.enabled":{type:"boolean",default:ae.enabled,description:S.localize(75,null)},"editor.parameterHints.cycle":{type:"boolean",default:ae.cycle,description:S.localize(76,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{enabled:r(ve.enabled,this.defaultValue.enabled),cycle:r(ve.cycle,this.defaultValue.cycle)}}}class Y extends i{constructor(){super(137)}compute(ae,ve,Le){return ae.pixelRatio}}class ne extends m{constructor(){const ae={other:"on",comments:"off",strings:"off"},ve=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[S.localize(77,null),S.localize(78,null),S.localize(79,null)]}];super(85,"quickSuggestions",ae,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:ve,default:ae.strings,description:S.localize(80,null)},comments:{anyOf:ve,default:ae.comments,description:S.localize(81,null)},other:{anyOf:ve,default:ae.other,description:S.localize(82,null)}},default:ae,markdownDescription:S.localize(83,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=ae}validate(ae){if(typeof ae=="boolean"){const Pe=ae?"on":"off";return{comments:Pe,strings:Pe,other:Pe}}if(!ae||typeof ae!="object")return this.defaultValue;const{other:ve,comments:Le,strings:Ie}=ae,Ae=["on","inline","off"];let be,Se,Te;return typeof ve=="boolean"?be=ve?"on":"off":be=d(ve,this.defaultValue.other,Ae),typeof Le=="boolean"?Se=Le?"on":"off":Se=d(Le,this.defaultValue.comments,Ae),typeof Ie=="boolean"?Te=Ie?"on":"off":Te=d(Ie,this.defaultValue.strings,Ae),{other:be,comments:Se,strings:Te}}}class de extends m{constructor(){super(65,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[S.localize(84,null),S.localize(85,null),S.localize(86,null),S.localize(87,null)],default:"on",description:S.localize(88,null)})}validate(ae){let ve=this.defaultValue.renderType,Le=this.defaultValue.renderFn;return typeof ae<"u"&&(typeof ae=="function"?(ve=4,Le=ae):ae==="interval"?ve=3:ae==="relative"?ve=2:ae==="on"?ve=1:ve=0),{renderType:ve,renderFn:Le}}}function he(pe){const ae=pe.get(93);return ae==="editable"?pe.get(87):ae!=="on"}e.filterValidationDecorations=he;class oe extends m{constructor(){const ae=[],ve={type:"number",description:S.localize(89,null)};super(97,"rulers",ae,{type:"array",items:{anyOf:[ve,{type:["object"],properties:{column:ve,color:{type:"string",description:S.localize(90,null),format:"color-hex"}}}]},default:ae,description:S.localize(91,null)})}validate(ae){if(Array.isArray(ae)){const ve=[];for(const Le of ae)if(typeof Le=="number")ve.push({column:o.clampedInt(Le,0,0,1e4),color:null});else if(Le&&typeof Le=="object"){const Ie=Le;ve.push({column:o.clampedInt(Ie.column,0,0,1e4),color:Ie.color})}return ve.sort((Le,Ie)=>Le.column-Ie.column),ve}return this.defaultValue}}function ce(pe,ae){if(typeof pe!="string")return ae;switch(pe){case"hidden":return 2;case"visible":return 3;default:return 1}}class z extends m{constructor(){const ae={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};super(98,"scrollbar",ae,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[S.localize(92,null),S.localize(93,null),S.localize(94,null)],default:"auto",description:S.localize(95,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[S.localize(96,null),S.localize(97,null),S.localize(98,null)],default:"auto",description:S.localize(99,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:ae.verticalScrollbarSize,description:S.localize(100,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:ae.horizontalScrollbarSize,description:S.localize(101,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:ae.scrollByPage,description:S.localize(102,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae,Le=o.clampedInt(ve.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Ie=o.clampedInt(ve.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:o.clampedInt(ve.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:ce(ve.vertical,this.defaultValue.vertical),horizontal:ce(ve.horizontal,this.defaultValue.horizontal),useShadows:r(ve.useShadows,this.defaultValue.useShadows),verticalHasArrows:r(ve.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:r(ve.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:r(ve.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:r(ve.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Le,horizontalSliderSize:o.clampedInt(ve.horizontalSliderSize,Le,0,1e3),verticalScrollbarSize:Ie,verticalSliderSize:o.clampedInt(ve.verticalSliderSize,Ie,0,1e3),scrollByPage:r(ve.scrollByPage,this.defaultValue.scrollByPage)}}}e.inUntrustedWorkspace="inUntrustedWorkspace",e.unicodeHighlightConfigKeys={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class V extends m{constructor(){const ae={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(120,"unicodeHighlight",ae,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:ae.nonBasicASCII,description:S.localize(103,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:ae.invisibleCharacters,description:S.localize(104,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:ae.ambiguousCharacters,description:S.localize(105,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:ae.includeComments,description:S.localize(106,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:ae.includeStrings,description:S.localize(107,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:ae.allowedCharacters,description:S.localize(108,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:ae.allowedLocales,description:S.localize(109,null)}})}applyUpdate(ae,ve){let Le=!1;ve.allowedCharacters&&ae&&(w.equals(ae.allowedCharacters,ve.allowedCharacters)||(ae=Object.assign(Object.assign({},ae),{allowedCharacters:ve.allowedCharacters}),Le=!0)),ve.allowedLocales&&ae&&(w.equals(ae.allowedLocales,ve.allowedLocales)||(ae=Object.assign(Object.assign({},ae),{allowedLocales:ve.allowedLocales}),Le=!0));const Ie=super.applyUpdate(ae,ve);return Le?new n(Ie.newValue,!0):Ie}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{nonBasicASCII:Z(ve.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:r(ve.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:r(ve.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Z(ve.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:Z(ve.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(ae.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(ae.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(ae,ve){if(typeof ae!="object"||!ae)return ve;const Le={};for(const[Ie,Ae]of Object.entries(ae))Ae===!0&&(Le[Ie]=!0);return Le}}class K extends m{constructor(){const ae={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1};super(60,"inlineSuggest",ae,{"editor.inlineSuggest.enabled":{type:"boolean",default:ae.enabled,description:S.localize(110,null)},"editor.inlineSuggest.showToolbar":{type:"string",default:ae.showToolbar,enum:["always","onHover"],enumDescriptions:[S.localize(111,null),S.localize(112,null)],description:S.localize(113,null)},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:ae.suppressSuggestions,description:S.localize(114,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{enabled:r(ve.enabled,this.defaultValue.enabled),mode:d(ve.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:d(ve.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:r(ve.suppressSuggestions,this.defaultValue.suppressSuggestions)}}}class ie extends m{constructor(){const ae={enabled:b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(13,"bracketPairColorization",ae,{"editor.bracketPairColorization.enabled":{type:"boolean",default:ae.enabled,markdownDescription:S.localize(115,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:ae.independentColorPoolPerBracketType,description:S.localize(116,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{enabled:r(ve.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:r(ve.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class X extends m{constructor(){const ae={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(14,"guides",ae,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[S.localize(117,null),S.localize(118,null),S.localize(119,null)],default:ae.bracketPairs,description:S.localize(120,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[S.localize(121,null),S.localize(122,null),S.localize(123,null)],default:ae.bracketPairsHorizontal,description:S.localize(124,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:ae.highlightActiveBracketPair,description:S.localize(125,null)},"editor.guides.indentation":{type:"boolean",default:ae.indentation,description:S.localize(126,null)},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[S.localize(127,null),S.localize(128,null),S.localize(129,null)],default:ae.highlightActiveIndentation,description:S.localize(130,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{bracketPairs:Z(ve.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Z(ve.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:r(ve.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:r(ve.indentation,this.defaultValue.indentation),highlightActiveIndentation:Z(ve.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function Z(pe,ae,ve){const Le=ve.indexOf(pe);return Le===-1?ae:ve[Le]}class ue extends m{constructor(){const ae={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!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(113,"suggest",ae,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[S.localize(131,null),S.localize(132,null)],default:ae.insertMode,description:S.localize(133,null)},"editor.suggest.filterGraceful":{type:"boolean",default:ae.filterGraceful,description:S.localize(134,null)},"editor.suggest.localityBonus":{type:"boolean",default:ae.localityBonus,description:S.localize(135,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:ae.shareSuggestSelections,markdownDescription:S.localize(136,null)},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[S.localize(137,null),S.localize(138,null),S.localize(139,null),S.localize(140,null)],default:ae.selectionMode,markdownDescription:S.localize(141,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:ae.snippetsPreventQuickSuggestions,description:S.localize(142,null)},"editor.suggest.showIcons":{type:"boolean",default:ae.showIcons,description:S.localize(143,null)},"editor.suggest.showStatusBar":{type:"boolean",default:ae.showStatusBar,description:S.localize(144,null)},"editor.suggest.preview":{type:"boolean",default:ae.preview,description:S.localize(145,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:ae.showInlineDetails,description:S.localize(146,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:S.localize(147,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:S.localize(148,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:S.localize(149,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:S.localize(150,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:S.localize(151,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:S.localize(152,null)},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:S.localize(153,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:S.localize(154,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:S.localize(155,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:S.localize(156,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:S.localize(157,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:S.localize(158,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:S.localize(159,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:S.localize(160,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:S.localize(161,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:S.localize(162,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:S.localize(163,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:S.localize(164,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:S.localize(165,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:S.localize(166,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:S.localize(167,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:S.localize(168,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:S.localize(169,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:S.localize(170,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:S.localize(171,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:S.localize(172,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:S.localize(173,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:S.localize(174,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:S.localize(175,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:S.localize(176,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:S.localize(177,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:S.localize(178,null)}})}validate(ae){if(!ae||typeof ae!="object")return this.defaultValue;const ve=ae;return{insertMode:d(ve.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:r(ve.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:r(ve.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:r(ve.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:r(ve.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:d(ve.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:r(ve.showIcons,this.defaultValue.showIcons),showStatusBar:r(ve.showStatusBar,this.defaultValue.showStatusBar),preview:r(ve.preview,this.defaultValue.preview),previewMode:d(ve.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:r(ve.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:r(ve.showMethods,this.defaultValue.showMethods),showFunctions:r(ve.showFunctions,this.defaultValue.showFunctions),showConstructors:r(ve.showConstructors,this.defaultValue.showConstructors),showDeprecated:r(ve.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:r(ve.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:r(ve.showFields,this.defaultValue.showFields),showVariables:r(ve.showVariables,this.defaultValue.showVariables),showClasses:r(ve.showClasses,this.defaultValue.showClasses),showStructs:r(ve.showStructs,this.defaultValue.showStructs),showInterfaces:r(ve.showInterfaces,this.defaultValue.showInterfaces),showModules:r(ve.showModules,this.defaultValue.showModules),showProperties:r(ve.showProperties,this.defaultValue.showProperties),showEvents:r(ve.showEvents,this.defaultValue.showEvents),showOperators:r(ve.showOperators,this.defaultValue.showOperators),showUnits:r(ve.showUnits,this.defaultValue.showUnits),showValues:r(ve.showValues,this.defaultValue.showValues),showConstants:r(ve.showConstants,this.defaultValue.showConstants),showEnums:r(ve.showEnums,this.defaultValue.showEnums),showEnumMembers:r(ve.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:r(ve.showKeywords,this.defaultValue.showKeywords),showWords:r(ve.showWords,this.defaultValue.showWords),showColors:r(ve.showColors,this.defaultValue.showColors),showFiles:r(ve.showFiles,this.defaultValue.showFiles),showReferences:r(ve.showReferences,this.defaultValue.showReferences),showFolders:r(ve.showFolders,this.defaultValue.showFolders),showTypeParameters:r(ve.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:r(ve.showSnippets,this.defaultValue.showSnippets),showUsers:r(ve.showUsers,this.defaultValue.showUsers),showIssues:r(ve.showIssues,this.defaultValue.showIssues)}}}class me extends m{constructor(){super(108,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:S.localize(179,null),default:!0,type:"boolean"}})}validate(ae){return!ae||typeof ae!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:r(ae.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class Ce extends m{constructor(){super(132,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[S.localize(180,null),S.localize(181,null),S.localize(182,null),S.localize(183,null)],description:S.localize(184,null),default:"same"}})}validate(ae){switch(ae){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(ae,ve,Le){return ve.get(2)===2?0:Le}}class _e extends i{constructor(){super(140)}compute(ae,ve,Le){const Ie=ve.get(139);return{isDominatedByLongLines:ae.isDominatedByLongLines,isWordWrapMinified:Ie.isWordWrapMinified,isViewportWrapping:Ie.isViewportWrapping,wrappingColumn:Ie.wrappingColumn}}}class we extends m{constructor(){const ae={enabled:!0};super(34,"dropIntoEditor",ae,{"editor.dropIntoEditor.enabled":{type:"boolean",default:ae.enabled,markdownDescription:S.localize(185,null)}})}validate(ae){return!ae||typeof ae!="object"?this.defaultValue:{enabled:r(ae.enabled,this.defaultValue.enabled)}}}const ye="Consolas, \'Courier New\', monospace",ke="Menlo, Monaco, \'Courier New\', monospace",De="\'Droid Sans Mono\', \'monospace\', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:k.isMacintosh?ke:k.isLinux?De:ye,fontWeight:"normal",fontSize:k.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function ge(pe){return e.editorOptionsRegistry[pe.id]=pe,pe}e.EditorOptions={acceptSuggestionOnCommitCharacter:ge(new c(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:S.localize(186,null)})),acceptSuggestionOnEnter:ge(new u(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",S.localize(187,null),""],markdownDescription:S.localize(188,null)})),accessibilitySupport:ge(new v),accessibilityPageSize:ge(new o(3,"accessibilityPageSize",10,1,1073741824,{description:S.localize(189,null),tags:["accessibility"]})),ariaLabel:ge(new a(4,"ariaLabel",S.localize(190,null))),screenReaderAnnounceInlineSuggestion:ge(new c(6,"screenReaderAnnounceInlineSuggestion",!1,{description:S.localize(191,null),tags:["accessibility"]})),autoClosingBrackets:ge(new u(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",S.localize(192,null),S.localize(193,null),""],description:S.localize(194,null)})),autoClosingDelete:ge(new u(7,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",S.localize(195,null),""],description:S.localize(196,null)})),autoClosingOvertype:ge(new u(8,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",S.localize(197,null),""],description:S.localize(198,null)})),autoClosingQuotes:ge(new u(9,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",S.localize(199,null),S.localize(200,null),""],description:S.localize(201,null)})),autoIndent:ge(new C(10,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],f,{enumDescriptions:[S.localize(202,null),S.localize(203,null),S.localize(204,null),S.localize(205,null),S.localize(206,null)],description:S.localize(207,null)})),automaticLayout:ge(new c(11,"automaticLayout",!1)),autoSurround:ge(new u(12,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[S.localize(208,null),S.localize(209,null),S.localize(210,null),""],description:S.localize(211,null)})),bracketPairColorization:ge(new ie),bracketPairGuides:ge(new X),stickyTabStops:ge(new c(111,"stickyTabStops",!1,{description:S.localize(212,null)})),codeLens:ge(new c(15,"codeLens",!0,{description:S.localize(213,null)})),codeLensFontFamily:ge(new a(16,"codeLensFontFamily","",{description:S.localize(214,null)})),codeLensFontSize:ge(new o(17,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:S.localize(215,null)})),colorDecorators:ge(new c(18,"colorDecorators",!0,{description:S.localize(216,null)})),colorDecoratorsLimit:ge(new o(19,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:S.localize(217,null)})),columnSelection:ge(new c(20,"columnSelection",!1,{description:S.localize(218,null)})),comments:ge(new p),contextmenu:ge(new c(22,"contextmenu",!0)),copyWithSyntaxHighlighting:ge(new c(23,"copyWithSyntaxHighlighting",!0,{description:S.localize(219,null)})),cursorBlinking:ge(new C(24,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],L,{description:S.localize(220,null)})),cursorSmoothCaretAnimation:ge(new u(25,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[S.localize(221,null),S.localize(222,null),S.localize(223,null)],description:S.localize(224,null)})),cursorStyle:ge(new C(26,"cursorStyle",E.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],I,{description:S.localize(225,null)})),cursorSurroundingLines:ge(new o(27,"cursorSurroundingLines",0,0,1073741824,{description:S.localize(226,null)})),cursorSurroundingLinesStyle:ge(new u(28,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[S.localize(227,null),S.localize(228,null)],description:S.localize(229,null)})),cursorWidth:ge(new o(29,"cursorWidth",0,0,1073741824,{markdownDescription:S.localize(230,null)})),disableLayerHinting:ge(new c(30,"disableLayerHinting",!1)),disableMonospaceOptimizations:ge(new c(31,"disableMonospaceOptimizations",!1)),domReadOnly:ge(new c(32,"domReadOnly",!1)),dragAndDrop:ge(new c(33,"dragAndDrop",!0,{description:S.localize(231,null)})),emptySelectionClipboard:ge(new F),dropIntoEditor:ge(new we),stickyScroll:ge(new se),experimentalWhitespaceRendering:ge(new u(36,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[S.localize(232,null),S.localize(233,null),S.localize(234,null)],description:S.localize(235,null)})),extraEditorClassName:ge(new a(37,"extraEditorClassName","")),fastScrollSensitivity:ge(new l(38,"fastScrollSensitivity",5,pe=>pe<=0?5:pe,{markdownDescription:S.localize(236,null)})),find:ge(new R),fixedOverflowWidgets:ge(new c(40,"fixedOverflowWidgets",!1)),folding:ge(new c(41,"folding",!0,{description:S.localize(237,null)})),foldingStrategy:ge(new u(42,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[S.localize(238,null),S.localize(239,null)],description:S.localize(240,null)})),foldingHighlight:ge(new c(43,"foldingHighlight",!0,{description:S.localize(241,null)})),foldingImportsByDefault:ge(new c(44,"foldingImportsByDefault",!1,{description:S.localize(242,null)})),foldingMaximumRegions:ge(new o(45,"foldingMaximumRegions",5e3,10,65e3,{description:S.localize(243,null)})),unfoldOnClickAfterEndOfLine:ge(new c(46,"unfoldOnClickAfterEndOfLine",!1,{description:S.localize(244,null)})),fontFamily:ge(new a(47,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:S.localize(245,null)})),fontInfo:ge(new A),fontLigatures2:ge(new M),fontSize:ge(new P),fontWeight:ge(new x),fontVariations:ge(new N),formatOnPaste:ge(new c(53,"formatOnPaste",!1,{description:S.localize(246,null)})),formatOnType:ge(new c(54,"formatOnType",!1,{description:S.localize(247,null)})),glyphMargin:ge(new c(55,"glyphMargin",!0,{description:S.localize(248,null)})),gotoLocation:ge(new W),hideCursorInOverviewRuler:ge(new c(57,"hideCursorInOverviewRuler",!1,{description:S.localize(249,null)})),hover:ge(new U),inDiffEditor:ge(new c(59,"inDiffEditor",!1)),letterSpacing:ge(new l(61,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,pe=>l.clamp(pe,-5,20),{description:S.localize(250,null)})),lightbulb:ge(new Q),lineDecorationsWidth:ge(new te),lineHeight:ge(new re),lineNumbers:ge(new de),lineNumbersMinChars:ge(new o(66,"lineNumbersMinChars",5,1,300)),linkedEditing:ge(new c(67,"linkedEditing",!1,{description:S.localize(251,null)})),links:ge(new c(68,"links",!0,{description:S.localize(252,null)})),matchBrackets:ge(new u(69,"matchBrackets","always",["always","near","never"],{description:S.localize(253,null)})),minimap:ge(new H),mouseStyle:ge(new u(71,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:ge(new l(72,"mouseWheelScrollSensitivity",1,pe=>pe===0?1:pe,{markdownDescription:S.localize(254,null)})),mouseWheelZoom:ge(new c(73,"mouseWheelZoom",!1,{markdownDescription:S.localize(255,null)})),multiCursorMergeOverlapping:ge(new c(74,"multiCursorMergeOverlapping",!0,{description:S.localize(256,null)})),multiCursorModifier:ge(new C(75,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],B,{markdownEnumDescriptions:[S.localize(257,null),S.localize(258,null)],markdownDescription:S.localize(259,null)})),multiCursorPaste:ge(new u(76,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[S.localize(260,null),S.localize(261,null)],markdownDescription:S.localize(262,null)})),multiCursorLimit:ge(new o(77,"multiCursorLimit",1e4,1,1e5,{markdownDescription:S.localize(263,null)})),occurrencesHighlight:ge(new c(78,"occurrencesHighlight",!0,{description:S.localize(264,null)})),overviewRulerBorder:ge(new c(79,"overviewRulerBorder",!0,{description:S.localize(265,null)})),overviewRulerLanes:ge(new o(80,"overviewRulerLanes",3,0,3)),padding:ge(new j),parameterHints:ge(new G),peekWidgetDefaultFocus:ge(new u(83,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[S.localize(266,null),S.localize(267,null)],description:S.localize(268,null)})),definitionLinkOpensInPeek:ge(new c(84,"definitionLinkOpensInPeek",!1,{description:S.localize(269,null)})),quickSuggestions:ge(new ne),quickSuggestionsDelay:ge(new o(86,"quickSuggestionsDelay",10,0,1073741824,{description:S.localize(270,null)})),readOnly:ge(new c(87,"readOnly",!1)),renameOnType:ge(new c(88,"renameOnType",!1,{description:S.localize(271,null),markdownDeprecationMessage:S.localize(272,null)})),renderControlCharacters:ge(new c(89,"renderControlCharacters",!0,{description:S.localize(273,null),restricted:!0})),renderFinalNewline:ge(new u(90,"renderFinalNewline",k.isLinux?"dimmed":"on",["off","on","dimmed"],{description:S.localize(274,null)})),renderLineHighlight:ge(new u(91,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",S.localize(275,null)],description:S.localize(276,null)})),renderLineHighlightOnlyWhenFocus:ge(new c(92,"renderLineHighlightOnlyWhenFocus",!1,{description:S.localize(277,null)})),renderValidationDecorations:ge(new u(93,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:ge(new u(94,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",S.localize(278,null),S.localize(279,null),S.localize(280,null),""],description:S.localize(281,null)})),revealHorizontalRightPadding:ge(new o(95,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:ge(new c(96,"roundedSelection",!0,{description:S.localize(282,null)})),rulers:ge(new oe),scrollbar:ge(new z),scrollBeyondLastColumn:ge(new o(99,"scrollBeyondLastColumn",4,0,1073741824,{description:S.localize(283,null)})),scrollBeyondLastLine:ge(new c(100,"scrollBeyondLastLine",!0,{description:S.localize(284,null)})),scrollPredominantAxis:ge(new c(101,"scrollPredominantAxis",!0,{description:S.localize(285,null)})),selectionClipboard:ge(new c(102,"selectionClipboard",!0,{description:S.localize(286,null),included:k.isLinux})),selectionHighlight:ge(new c(103,"selectionHighlight",!0,{description:S.localize(287,null)})),selectOnLineNumbers:ge(new c(104,"selectOnLineNumbers",!0)),showFoldingControls:ge(new u(105,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[S.localize(288,null),S.localize(289,null),S.localize(290,null)],description:S.localize(291,null)})),showUnused:ge(new c(106,"showUnused",!0,{description:S.localize(292,null)})),showDeprecated:ge(new c(134,"showDeprecated",!0,{description:S.localize(293,null)})),inlayHints:ge(new le),snippetSuggestions:ge(new u(107,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[S.localize(294,null),S.localize(295,null),S.localize(296,null),S.localize(297,null)],description:S.localize(298,null)})),smartSelect:ge(new me),smoothScrolling:ge(new c(109,"smoothScrolling",!1,{description:S.localize(299,null)})),stopRenderingLineAfter:ge(new o(112,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:ge(new ue),inlineSuggest:ge(new K),suggestFontSize:ge(new o(114,"suggestFontSize",0,0,1e3,{markdownDescription:S.localize(300,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:ge(new o(115,"suggestLineHeight",0,0,1e3,{markdownDescription:S.localize(301,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:ge(new c(116,"suggestOnTriggerCharacters",!0,{description:S.localize(302,null)})),suggestSelection:ge(new u(117,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[S.localize(303,null),S.localize(304,null),S.localize(305,null)],description:S.localize(306,null)})),tabCompletion:ge(new u(118,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[S.localize(307,null),S.localize(308,null),S.localize(309,null)],description:S.localize(310,null)})),tabIndex:ge(new o(119,"tabIndex",0,-1,1073741824)),unicodeHighlight:ge(new V),unusualLineTerminators:ge(new u(121,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[S.localize(311,null),S.localize(312,null),S.localize(313,null)],description:S.localize(314,null)})),useShadowDOM:ge(new c(122,"useShadowDOM",!0)),useTabStops:ge(new c(123,"useTabStops",!0,{description:S.localize(315,null)})),wordBreak:ge(new u(124,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[S.localize(316,null),S.localize(317,null)],description:S.localize(318,null)})),wordSeparators:ge(new a(125,"wordSeparators",y.USUAL_WORD_SEPARATORS,{description:S.localize(319,null)})),wordWrap:ge(new u(126,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[S.localize(320,null),S.localize(321,null),S.localize(322,null),S.localize(323,null)],description:S.localize(324,null)})),wordWrapBreakAfterCharacters:ge(new a(127,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;\\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:ge(new a(128,"wordWrapBreakBeforeCharacters","([{\\u2018\\u201C\\u3008\\u300A\\u300C\\u300E\\u3010\\u3014\\uFF08\\uFF3B\\uFF5B\\uFF62\\xA3\\xA5\\uFF04\\uFFE1\\uFFE5+\\uFF0B")),wordWrapColumn:ge(new o(129,"wordWrapColumn",80,1,1073741824,{markdownDescription:S.localize(325,null)})),wordWrapOverride1:ge(new u(130,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:ge(new u(131,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:ge(new T),pixelRatio:ge(new Y),tabFocusMode:ge(new c(138,"tabFocusMode",!1,{markdownDescription:S.localize(326,null)})),layoutInfo:ge(new O),wrappingInfo:ge(new _e),wrappingIndent:ge(new Ce),wrappingStrategy:ge(new $)}}),define(J[579],ee([1,0,7,35,9,74,40,13,5,161]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class m{constructor(i,s,r,c,g,o,l){this.top=i,this.left=s,this.paddingLeft=r,this.width=c,this.height=g,this.textContent=o,this.textContentClassName=l}}class n{constructor(i){this._context=i;const s=this._context.configuration.options,r=s.get(48);this._cursorStyle=s.get(26),this._lineHeight=s.get(64),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(s.get(29),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,k.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${h.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,D.applyFontInfo)(this._domNode,r),this._domNode.setDisplay("none"),this._position=new b.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(i){const s=this._context.configuration.options,r=s.get(48);return this._cursorStyle=s.get(26),this._lineHeight=s.get(64),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(s.get(29),this._typicalHalfwidthCharacterWidth),(0,D.applyFontInfo)(this._domNode,r),!0}onCursorPositionChanged(i,s){return s?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=i,!0}_getGraphemeAwarePosition(){const{lineNumber:i,column:s}=this._position,r=this._context.viewModel.getLineContent(i),[c,g]=y.getCharContainingOffset(r,s-1);return[new b.Position(i,c+1),r.substring(c,g)]}_prepareRender(i){let s="",r="";const[c,g]=this._getGraphemeAwarePosition();if(this._cursorStyle===w.TextEditorCursorStyle.Line||this._cursorStyle===w.TextEditorCursorStyle.LineThin){const f=i.visibleRangeForPosition(c);if(!f||f.outsideRenderedLine)return null;let v;this._cursorStyle===w.TextEditorCursorStyle.Line?(v=S.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),v>2&&(s=g,r=this._getTokenClassName(c))):v=S.computeScreenAwareSize(1);let p=f.left,L=0;v>=2&&p>=1&&(L=1,p-=L);const E=i.getVerticalOffsetForLineNumber(c.lineNumber)-i.bigNumbersDelta;return new m(E,p,L,v,this._lineHeight,s,r)}const o=i.linesVisibleRangesForRange(new _.Range(c.lineNumber,c.column,c.lineNumber,c.column+g.length),!1);if(!o||o.length===0)return null;const l=o[0];if(l.outsideRenderedLine||l.ranges.length===0)return null;const a=l.ranges[0],d=g==="\t"?this._typicalHalfwidthCharacterWidth:a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===w.TextEditorCursorStyle.Block&&(s=g,r=this._getTokenClassName(c));let u=i.getVerticalOffsetForLineNumber(c.lineNumber)-i.bigNumbersDelta,C=this._lineHeight;return(this._cursorStyle===w.TextEditorCursorStyle.Underline||this._cursorStyle===w.TextEditorCursorStyle.UnderlineThin)&&(u+=this._lineHeight-2,C=2),new m(u,a.left,0,d,C,s,r)}_getTokenClassName(i){const s=this._context.viewModel.getViewLineData(i.lineNumber),r=s.tokens.findTokenIndexAtOffset(i.column-1);return s.tokens.getClassName(r)}prepareRender(i){this._renderData=this._prepareRender(i)}render(i){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${h.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.setPaddingLeft(this._renderData.paddingLeft),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=n}),define(J[221],ee([1,0,17,40,144]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const D=S.isMacintosh?1.5:1.35,w=8;class b{static createFromValidatedSettings(m,n,t){const i=m.get(47),s=m.get(51),r=m.get(50),c=m.get(49),g=m.get(52),o=m.get(64),l=m.get(61);return b._create(i,s,r,c,g,o,l,n,t)}static _create(m,n,t,i,s,r,c,g,o){r===0?r=D*t:r<w&&(r=r*t),r=Math.round(r),r<w&&(r=w);const l=1+(o?0:y.EditorZoom.getZoomLevel()*.1);return t*=l,r*=l,s===k.EditorFontVariations.TRANSLATE&&(n==="normal"||n==="bold"?s=k.EditorFontVariations.OFF:(s=`\'wght\' ${parseInt(n,10)}`,n="normal")),new b({pixelRatio:g,fontFamily:m,fontWeight:n,fontSize:t,fontFeatureSettings:i,fontVariationSettings:s,lineHeight:r,letterSpacing:c})}constructor(m){this._bareFontInfoBrand=void 0,this.pixelRatio=m.pixelRatio,this.fontFamily=String(m.fontFamily),this.fontWeight=String(m.fontWeight),this.fontSize=m.fontSize,this.fontFeatureSettings=m.fontFeatureSettings,this.fontVariationSettings=m.fontVariationSettings,this.lineHeight=m.lineHeight|0,this.letterSpacing=m.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const m=k.EDITOR_FONT_DEFAULTS.fontFamily,n=b._wrapInQuotes(this.fontFamily);return m&&this.fontFamily!==m?`${n}, ${m}`:n}static _wrapInQuotes(m){return/[,"\']/.test(m)?m:/[+ ]/.test(m)?`"${m}"`:m}}e.BareFontInfo=b,e.SERIALIZED_FONT_INFO_VERSION=2;class _ extends b{constructor(m,n){super(m),this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=n,this.isMonospace=m.isMonospace,this.typicalHalfwidthCharacterWidth=m.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=m.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=m.canUseHalfwidthRightwardsArrow,this.spaceWidth=m.spaceWidth,this.middotWidth=m.middotWidth,this.wsmiddotWidth=m.wsmiddotWidth,this.maxDigitWidth=m.maxDigitWidth}equals(m){return this.fontFamily===m.fontFamily&&this.fontWeight===m.fontWeight&&this.fontSize===m.fontSize&&this.fontFeatureSettings===m.fontFeatureSettings&&this.fontVariationSettings===m.fontVariationSettings&&this.lineHeight===m.lineHeight&&this.letterSpacing===m.letterSpacing&&this.typicalHalfwidthCharacterWidth===m.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===m.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===m.canUseHalfwidthRightwardsArrow&&this.spaceWidth===m.spaceWidth&&this.middotWidth===m.middotWidth&&this.wsmiddotWidth===m.wsmiddotWidth&&this.maxDigitWidth===m.maxDigitWidth}}e.FontInfo=_}),define(J[301],ee([1,0,46,6,2,442,40,221]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMeasurements=e.FontMeasurementsImpl=void 0;class _ extends y.Disposable{constructor(){super(),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new h,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new h,this._onDidChange.fire()}_writeToCache(n,t){this._cache.put(n,t),!t.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const n=this._cache.getValues();let t=!1;for(const i of n)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(n){if(!this._cache.has(n)){let t=this._actualReadFontInfo(n);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new b.FontInfo({pixelRatio:S.PixelRatio.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(n,t)}return this._cache.get(n)}_createRequest(n,t,i,s){const r=new D.CharWidthRequest(n,t);return i.push(r),s?.push(r),r}_actualReadFontInfo(n){const t=[],i=[],s=this._createRequest("n",0,t,i),r=this._createRequest("\\uFF4D",0,t,null),c=this._createRequest(" ",0,t,i),g=this._createRequest("0",0,t,i),o=this._createRequest("1",0,t,i),l=this._createRequest("2",0,t,i),a=this._createRequest("3",0,t,i),d=this._createRequest("4",0,t,i),u=this._createRequest("5",0,t,i),C=this._createRequest("6",0,t,i),f=this._createRequest("7",0,t,i),v=this._createRequest("8",0,t,i),p=this._createRequest("9",0,t,i),L=this._createRequest("\\u2192",0,t,i),E=this._createRequest("\\uFFEB",0,t,null),I=this._createRequest("\\xB7",0,t,i),T=this._createRequest(String.fromCharCode(11825),0,t,null),F="|/-_ilm%";for(let P=0,x=F.length;P<x;P++)this._createRequest(F.charAt(P),0,t,i),this._createRequest(F.charAt(P),1,t,i),this._createRequest(F.charAt(P),2,t,i);(0,D.readCharWidths)(n,t);const R=Math.max(g.width,o.width,l.width,a.width,d.width,u.width,C.width,f.width,v.width,p.width);let M=n.fontFeatureSettings===w.EditorFontLigatures.OFF;const N=i[0].width;for(let P=1,x=i.length;M&&P<x;P++){const W=N-i[P].width;if(W<-.001||W>.001){M=!1;break}}let A=!0;return M&&E.width!==N&&(A=!1),E.width>L.width&&(A=!1),new b.FontInfo({pixelRatio:S.PixelRatio.value,fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFeatureSettings:n.fontFeatureSettings,fontVariationSettings:n.fontVariationSettings,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,isMonospace:M,typicalHalfwidthCharacterWidth:s.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:A,spaceWidth:c.width,middotWidth:I.width,wsmiddotWidth:T.width,maxDigitWidth:R},!0)}}e.FontMeasurementsImpl=_;class h{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(n){const t=n.getId();return!!this._values[t]}get(n){const t=n.getId();return this._values[t]}put(n,t){const i=n.getId();this._keys[i]=n,this._values[i]=t}remove(n){const t=n.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(n=>this._values[n])}}e.FontMeasurements=new _}),define(J[302],ee([1,0,13,5,81,40]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class w{constructor(t,i,s,r,c){this._cachedOnlyMinimapDecorations=null,this.editorId=t,this.model=i,this.configuration=s,this._linesCollection=r,this._coordinatesConverter=c,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(t){const i=t.id;let s=this._decorationsCache[i];if(!s){const r=t.range,c=t.options;let g;if(c.isWholeLine){const o=this._coordinatesConverter.convertModelPositionToViewPosition(new S.Position(r.startLineNumber,1),0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new S.Position(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);g=new k.Range(o.lineNumber,o.column,l.lineNumber,l.column)}else g=this._coordinatesConverter.convertModelRangeToViewRange(r,1);s=new y.ViewModelDecoration(g,c),this._decorationsCache[i]=s}return s}getDecorationsViewportData(t,i=!1){let s=this._cachedModelDecorationsResolver!==null;return s=s&&t.equalsRange(this._cachedModelDecorationsResolverViewRange),s=s&&this._cachedOnlyMinimapDecorations===i,s||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(t,i),this._cachedModelDecorationsResolverViewRange=t,this._cachedOnlyMinimapDecorations=i),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(t,i=!1){const s=new k.Range(t,this._linesCollection.getViewLineMinColumn(t),t,this._linesCollection.getViewLineMaxColumn(t));return this._getDecorationsInRange(s,i).inlineDecorations[0]}_getDecorationsInRange(t,i){const s=this._linesCollection.getDecorationsInRange(t,this.editorId,(0,D.filterValidationDecorations)(this.configuration.options),i),r=t.startLineNumber,c=t.endLineNumber,g=[];let o=0;const l=[];for(let a=r;a<=c;a++)l[a-r]=[];for(let a=0,d=s.length;a<d;a++){const u=s[a],C=u.options;if(!b(this.model,u))continue;const f=this._getOrCreateViewModelDecoration(u),v=f.range;if(g[o++]=f,C.inlineClassName){const p=new y.InlineDecoration(v,C.inlineClassName,C.inlineClassNameAffectsLetterSpacing?3:0),L=Math.max(r,v.startLineNumber),E=Math.min(c,v.endLineNumber);for(let I=L;I<=E;I++)l[I-r].push(p)}if(C.beforeContentClassName&&r<=v.startLineNumber&&v.startLineNumber<=c){const p=new y.InlineDecoration(new k.Range(v.startLineNumber,v.startColumn,v.startLineNumber,v.startColumn),C.beforeContentClassName,1);l[v.startLineNumber-r].push(p)}if(C.afterContentClassName&&r<=v.endLineNumber&&v.endLineNumber<=c){const p=new y.InlineDecoration(new k.Range(v.endLineNumber,v.endColumn,v.endLineNumber,v.endColumn),C.afterContentClassName,2);l[v.endLineNumber-r].push(p)}}return{decorations:g,inlineDecorations:l}}}e.ViewModelDecorations=w;function b(n,t){return!(t.options.hideInCommentTokens&&_(n,t)||t.options.hideInStringTokens&&h(n,t))}e.isModelDecorationVisible=b;function _(n,t){return m(n,t.range,i=>i===1)}e.isModelDecorationInComment=_;function h(n,t){return m(n,t.range,i=>i===2)}e.isModelDecorationInString=h;function m(n,t,i){for(let s=t.startLineNumber;s<=t.endLineNumber;s++){const r=n.tokenization.getLineTokens(s),c=s===t.startLineNumber,g=s===t.endLineNumber;let o=c?r.findTokenIndexAtOffset(t.startColumn-1):0;for(;o<r.getCount()&&!(g&&r.getStartOffset(o)>t.endColumn-1);){if(!i(r.getStandardTokenType(o)))return!1;o++}}return!0}}),define(J[580],ee([3,4]),function(q,e){return q.create("vs/editor/common/core/editorColorRegistry",e)}),define(J[581],ee([3,4]),function(q,e){return q.create("vs/editor/common/editorContextKeys",e)}),define(J[582],ee([3,4]),function(q,e){return q.create("vs/editor/common/languages/modesRegistry",e)}),define(J[583],ee([3,4]),function(q,e){return q.create("vs/editor/common/model/editStack",e)}),define(J[303],ee([1,0,583,11,23,20,294,130,42]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function h(c){return c.toString()}class m{static create(g,o){const l=g.getAlternativeVersionId(),a=i(g);return new m(l,l,a,a,o,o,[])}constructor(g,o,l,a,d,u,C){this.beforeVersionId=g,this.afterVersionId=o,this.beforeEOL=l,this.afterEOL=a,this.beforeCursorState=d,this.afterCursorState=u,this.changes=C}append(g,o,l,a,d){o.length>0&&(this.changes=(0,w.compressConsecutiveTextChanges)(this.changes,o)),this.afterEOL=l,this.afterVersionId=a,this.afterCursorState=d}static _writeSelectionsSize(g){return 4+4*4*(g?g.length:0)}static _writeSelections(g,o,l){if(b.writeUInt32BE(g,o?o.length:0,l),l+=4,o)for(const a of o)b.writeUInt32BE(g,a.selectionStartLineNumber,l),l+=4,b.writeUInt32BE(g,a.selectionStartColumn,l),l+=4,b.writeUInt32BE(g,a.positionLineNumber,l),l+=4,b.writeUInt32BE(g,a.positionColumn,l),l+=4;return l}static _readSelections(g,o,l){const a=b.readUInt32BE(g,o);o+=4;for(let d=0;d<a;d++){const u=b.readUInt32BE(g,o);o+=4;const C=b.readUInt32BE(g,o);o+=4;const f=b.readUInt32BE(g,o);o+=4;const v=b.readUInt32BE(g,o);o+=4,l.push(new y.Selection(u,C,f,v))}return o}serialize(){let g=10+m._writeSelectionsSize(this.beforeCursorState)+m._writeSelectionsSize(this.afterCursorState)+4;for(const a of this.changes)g+=a.writeSize();const o=new Uint8Array(g);let l=0;b.writeUInt32BE(o,this.beforeVersionId,l),l+=4,b.writeUInt32BE(o,this.afterVersionId,l),l+=4,b.writeUInt8(o,this.beforeEOL,l),l+=1,b.writeUInt8(o,this.afterEOL,l),l+=1,l=m._writeSelections(o,this.beforeCursorState,l),l=m._writeSelections(o,this.afterCursorState,l),b.writeUInt32BE(o,this.changes.length,l),l+=4;for(const a of this.changes)l=a.write(o,l);return o.buffer}static deserialize(g){const o=new Uint8Array(g);let l=0;const a=b.readUInt32BE(o,l);l+=4;const d=b.readUInt32BE(o,l);l+=4;const u=b.readUInt8(o,l);l+=1;const C=b.readUInt8(o,l);l+=1;const f=[];l=m._readSelections(o,l,f);const v=[];l=m._readSelections(o,l,v);const p=b.readUInt32BE(o,l);l+=4;const L=[];for(let E=0;E<p;E++)l=w.TextChange.read(o,l,L);return new m(a,d,u,C,f,v,L)}}e.SingleModelEditStackData=m;class n{get type(){return 0}get resource(){return D.URI.isUri(this.model)?this.model:this.model.uri}constructor(g,o,l,a){this.label=g,this.code=o,this.model=l,this._data=m.create(l,a)}toString(){return(this._data instanceof m?this._data:m.deserialize(this._data)).changes.map(o=>o.toString()).join(", ")}matchesResource(g){return(D.URI.isUri(this.model)?this.model:this.model.uri).toString()===g.toString()}setModel(g){this.model=g}canAppend(g){return this.model===g&&this._data instanceof m}append(g,o,l,a,d){this._data instanceof m&&this._data.append(g,o,l,a,d)}close(){this._data instanceof m&&(this._data=this._data.serialize())}open(){this._data instanceof m||(this._data=m.deserialize(this._data))}undo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof m&&(this._data=this._data.serialize());const g=m.deserialize(this._data);this.model._applyUndo(g.changes,g.beforeEOL,g.beforeVersionId,g.beforeCursorState)}redo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof m&&(this._data=this._data.serialize());const g=m.deserialize(this._data);this.model._applyRedo(g.changes,g.afterEOL,g.afterVersionId,g.afterCursorState)}heapSize(){return this._data instanceof m&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=n;class t{get resources(){return this._editStackElementsArr.map(g=>g.resource)}constructor(g,o,l){this.label=g,this.code=o,this.type=1,this._isOpen=!0,this._editStackElementsArr=l.slice(0),this._editStackElementsMap=new Map;for(const a of this._editStackElementsArr){const d=h(a.resource);this._editStackElementsMap.set(d,a)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(g){const o=h(g);return this._editStackElementsMap.has(o)}setModel(g){const o=h(D.URI.isUri(g)?g:g.uri);this._editStackElementsMap.has(o)&&this._editStackElementsMap.get(o).setModel(g)}canAppend(g){if(!this._isOpen)return!1;const o=h(g.uri);return this._editStackElementsMap.has(o)?this._editStackElementsMap.get(o).canAppend(g):!1}append(g,o,l,a,d){const u=h(g.uri);this._editStackElementsMap.get(u).append(g,o,l,a,d)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const g of this._editStackElementsArr)g.undo()}redo(){for(const g of this._editStackElementsArr)g.redo()}heapSize(g){const o=h(g);return this._editStackElementsMap.has(o)?this._editStackElementsMap.get(o).heapSize():0}split(){return this._editStackElementsArr}toString(){const g=[];for(const o of this._editStackElementsArr)g.push(`${(0,_.basename)(o.resource)}: ${o}`);return`{${g.join(", ")}}`}}e.MultiModelEditStackElement=t;function i(c){return c.getEOL()===`\n`?0:1}function s(c){return c?c instanceof n||c instanceof t:!1}e.isEditStackElement=s;class r{constructor(g,o){this._model=g,this._undoRedoService=o}pushStackElement(){const g=this._undoRedoService.getLastElement(this._model.uri);s(g)&&g.close()}popStackElement(){const g=this._undoRedoService.getLastElement(this._model.uri);s(g)&&g.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(g,o){const l=this._undoRedoService.getLastElement(this._model.uri);if(s(l)&&l.canAppend(this._model))return l;const a=new n(S.localize(0,null),"undoredo.textBufferEdit",this._model,g);return this._undoRedoService.pushElement(a,o),a}pushEOL(g){const o=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(g),o.append(this._model,[],i(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(g,o,l,a){const d=this._getOrCreateEditStackElement(g,a),u=this._model.applyEdits(o,!0),C=r._computeCursorState(l,u),f=u.map((v,p)=>({index:p,textChange:v.textChange}));return f.sort((v,p)=>v.textChange.oldPosition===p.textChange.oldPosition?v.index-p.index:v.textChange.oldPosition-p.textChange.oldPosition),d.append(this._model,f.map(v=>v.textChange),i(this._model),this._model.getAlternativeVersionId(),C),C}static _computeCursorState(g,o){try{return g?g(o):null}catch(l){return(0,k.onUnexpectedError)(l),null}}}e.EditStack=r}),define(J[584],ee([3,4]),function(q,e){return q.create("vs/editor/common/standaloneStrings",e)}),define(J[82],ee([1,0,584]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServicesNLS=e.ToggleHighContrastNLS=e.StandaloneCodeEditorNLS=e.QuickOutlineNLS=e.QuickCommandNLS=e.QuickHelpNLS=e.GoToLineNLS=e.InspectTokensNLS=e.AccessibilityHelpNLS=void 0;var k;(function(t){t.noSelection=S.localize(0,null),t.singleSelectionRange=S.localize(1,null),t.singleSelection=S.localize(2,null),t.multiSelectionRange=S.localize(3,null),t.multiSelection=S.localize(4,null),t.emergencyConfOn=S.localize(5,null),t.openingDocs=S.localize(6,null),t.readonlyDiffEditor=S.localize(7,null),t.editableDiffEditor=S.localize(8,null),t.readonlyEditor=S.localize(9,null),t.editableEditor=S.localize(10,null),t.changeConfigToOnMac=S.localize(11,null),t.changeConfigToOnWinLinux=S.localize(12,null),t.auto_on=S.localize(13,null),t.auto_off=S.localize(14,null),t.tabFocusModeOnMsg=S.localize(15,null),t.tabFocusModeOnMsgNoKb=S.localize(16,null),t.tabFocusModeOffMsg=S.localize(17,null),t.tabFocusModeOffMsgNoKb=S.localize(18,null),t.openDocMac=S.localize(19,null),t.openDocWinLinux=S.localize(20,null),t.outroMsg=S.localize(21,null),t.showAccessibilityHelpAction=S.localize(22,null)})(k=e.AccessibilityHelpNLS||(e.AccessibilityHelpNLS={}));var y;(function(t){t.inspectTokensAction=S.localize(23,null)})(y=e.InspectTokensNLS||(e.InspectTokensNLS={}));var D;(function(t){t.gotoLineActionLabel=S.localize(24,null)})(D=e.GoToLineNLS||(e.GoToLineNLS={}));var w;(function(t){t.helpQuickAccessActionLabel=S.localize(25,null)})(w=e.QuickHelpNLS||(e.QuickHelpNLS={}));var b;(function(t){t.quickCommandActionLabel=S.localize(26,null),t.quickCommandHelp=S.localize(27,null)})(b=e.QuickCommandNLS||(e.QuickCommandNLS={}));var _;(function(t){t.quickOutlineActionLabel=S.localize(28,null),t.quickOutlineByCategoryActionLabel=S.localize(29,null)})(_=e.QuickOutlineNLS||(e.QuickOutlineNLS={}));var h;(function(t){t.editorViewAccessibleLabel=S.localize(30,null),t.accessibilityHelpMessage=S.localize(31,null)})(h=e.StandaloneCodeEditorNLS||(e.StandaloneCodeEditorNLS={}));var m;(function(t){t.toggleHighContrast=S.localize(32,null)})(m=e.ToggleHighContrastNLS||(e.ToggleHighContrastNLS={}));var n;(function(t){t.bulkEditServiceSummary=S.localize(33,null)})(n=e.StandaloneServicesNLS||(e.StandaloneServicesNLS={}))}),define(J[585],ee([3,4]),function(q,e){return q.create("vs/editor/common/viewLayout/viewLineRenderer",e)}),define(J[109],ee([1,0,585,9,95,138,493]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.CharacterMapping=e.DomPosition=e.RenderLineInput=e.LineRange=void 0;class b{constructor(L,E){this.startOffset=L,this.endOffset=E}equals(L){return this.startOffset===L.startOffset&&this.endOffset===L.endOffset}}e.LineRange=b;class _{constructor(L,E,I,T,F,R,M,N,A,P,x,W,U,O,$,Q,se,le,te){this.useMonospaceOptimizations=L,this.canUseHalfwidthRightwardsArrow=E,this.lineContent=I,this.continuesWithWrappedLine=T,this.isBasicASCII=F,this.containsRTL=R,this.fauxIndentLength=M,this.lineTokens=N,this.lineDecorations=A.sort(D.LineDecoration.compare),this.tabSize=P,this.startVisibleColumn=x,this.spaceWidth=W,this.stopRenderingLineAfter=$,this.renderWhitespace=Q==="all"?4:Q==="boundary"?1:Q==="selection"?2:Q==="trailing"?3:0,this.renderControlCharacters=se,this.fontLigatures=le,this.selectionsOnLine=te&&te.sort((B,j)=>B.startOffset<j.startOffset?-1:1);const re=Math.abs(O-W),H=Math.abs(U-W);re<H?(this.renderSpaceWidth=O,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=U,this.renderSpaceCharCode=183)}sameSelection(L){if(this.selectionsOnLine===null)return L===null;if(L===null||L.length!==this.selectionsOnLine.length)return!1;for(let E=0;E<this.selectionsOnLine.length;E++)if(!this.selectionsOnLine[E].equals(L[E]))return!1;return!0}equals(L){return this.useMonospaceOptimizations===L.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===L.canUseHalfwidthRightwardsArrow&&this.lineContent===L.lineContent&&this.continuesWithWrappedLine===L.continuesWithWrappedLine&&this.isBasicASCII===L.isBasicASCII&&this.containsRTL===L.containsRTL&&this.fauxIndentLength===L.fauxIndentLength&&this.tabSize===L.tabSize&&this.startVisibleColumn===L.startVisibleColumn&&this.spaceWidth===L.spaceWidth&&this.renderSpaceWidth===L.renderSpaceWidth&&this.renderSpaceCharCode===L.renderSpaceCharCode&&this.stopRenderingLineAfter===L.stopRenderingLineAfter&&this.renderWhitespace===L.renderWhitespace&&this.renderControlCharacters===L.renderControlCharacters&&this.fontLigatures===L.fontLigatures&&D.LineDecoration.equalsArr(this.lineDecorations,L.lineDecorations)&&this.lineTokens.equals(L.lineTokens)&&this.sameSelection(L.selectionsOnLine)}}e.RenderLineInput=_;class h{constructor(L,E){this.partIndex=L,this.charIndex=E}}e.DomPosition=h;class m{static getPartIndex(L){return(L&4294901760)>>>16}static getCharIndex(L){return(L&65535)>>>0}constructor(L,E){this.length=L,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(L,E,I,T){const F=(E<<16|I<<0)>>>0;this._data[L-1]=F,this._horizontalOffset[L-1]=T}getHorizontalOffset(L){return this._horizontalOffset.length===0?0:this._horizontalOffset[L-1]}charOffsetToPartData(L){return this.length===0?0:L<0?this._data[0]:L>=this.length?this._data[this.length-1]:this._data[L]}getDomPosition(L){const E=this.charOffsetToPartData(L-1),I=m.getPartIndex(E),T=m.getCharIndex(E);return new h(I,T)}getColumn(L,E){return this.partDataToCharOffset(L.partIndex,E,L.charIndex)+1}partDataToCharOffset(L,E,I){if(this.length===0)return 0;const T=(L<<16|I<<0)>>>0;let F=0,R=this.length-1;for(;F+1<R;){const $=F+R>>>1,Q=this._data[$];if(Q===T)return $;Q>T?R=$:F=$}if(F===R)return F;const M=this._data[F],N=this._data[R];if(M===T)return F;if(N===T)return R;const A=m.getPartIndex(M),P=m.getCharIndex(M),x=m.getPartIndex(N);let W;A!==x?W=E:W=m.getCharIndex(N);const U=I-P,O=W-I;return U<=O?F:R}}e.CharacterMapping=m;class n{constructor(L,E,I){this._renderLineOutputBrand=void 0,this.characterMapping=L,this.containsRTL=E,this.containsForeignElements=I}}e.RenderLineOutput=n;function t(p,L){if(p.lineContent.length===0){if(p.lineDecorations.length>0){L.appendString("<span>");let E=0,I=0,T=0;for(const R of p.lineDecorations)(R.type===1||R.type===2)&&(L.appendString(\'<span class="\'),L.appendString(R.className),L.appendString(\'"></span>\'),R.type===1&&(T|=1,E++),R.type===2&&(T|=2,I++));L.appendString("</span>");const F=new m(1,E+I);return F.setColumnInfo(1,E,0,0),new n(F,!1,T)}return L.appendString("<span><span></span></span>"),new n(new m(0,0),!1,0)}return C(c(p),L)}e.renderViewLine=t;class i{constructor(L,E,I,T){this.characterMapping=L,this.html=E,this.containsRTL=I,this.containsForeignElements=T}}e.RenderLineOutput2=i;function s(p){const L=new y.StringBuilder(1e4),E=t(p,L);return new i(E.characterMapping,L.build(),E.containsRTL,E.containsForeignElements)}e.renderViewLine2=s;class r{constructor(L,E,I,T,F,R,M,N,A,P,x,W,U,O,$,Q){this.fontIsMonospace=L,this.canUseHalfwidthRightwardsArrow=E,this.lineContent=I,this.len=T,this.isOverflowing=F,this.overflowingCharCount=R,this.parts=M,this.containsForeignElements=N,this.fauxIndentLength=A,this.tabSize=P,this.startVisibleColumn=x,this.containsRTL=W,this.spaceWidth=U,this.renderSpaceCharCode=O,this.renderWhitespace=$,this.renderControlCharacters=Q}}function c(p){const L=p.lineContent;let E,I,T;p.stopRenderingLineAfter!==-1&&p.stopRenderingLineAfter<L.length?(E=!0,I=L.length-p.stopRenderingLineAfter,T=p.stopRenderingLineAfter):(E=!1,I=0,T=L.length);let F=g(L,p.containsRTL,p.lineTokens,p.fauxIndentLength,T);p.renderControlCharacters&&!p.isBasicASCII&&(F=a(L,F)),(p.renderWhitespace===4||p.renderWhitespace===1||p.renderWhitespace===2&&p.selectionsOnLine||p.renderWhitespace===3&&!p.continuesWithWrappedLine)&&(F=d(p,L,T,F));let R=0;if(p.lineDecorations.length>0){for(let M=0,N=p.lineDecorations.length;M<N;M++){const A=p.lineDecorations[M];A.type===3||A.type===1?R|=1:A.type===2&&(R|=2)}F=u(L,T,F,p.lineDecorations)}return p.containsRTL||(F=o(L,F,!p.isBasicASCII||p.fontLigatures)),new r(p.useMonospaceOptimizations,p.canUseHalfwidthRightwardsArrow,L,T,E,I,F,R,p.fauxIndentLength,p.tabSize,p.startVisibleColumn,p.containsRTL,p.spaceWidth,p.renderSpaceCharCode,p.renderWhitespace,p.renderControlCharacters)}function g(p,L,E,I,T){const F=[];let R=0;I>0&&(F[R++]=new w.LinePart(I,"",0,!1));let M=I;for(let N=0,A=E.getCount();N<A;N++){const P=E.getEndOffset(N);if(P<=I)continue;const x=E.getClassName(N);if(P>=T){const U=L?k.containsRTL(p.substring(M,T)):!1;F[R++]=new w.LinePart(T,x,0,U);break}const W=L?k.containsRTL(p.substring(M,P)):!1;F[R++]=new w.LinePart(P,x,0,W),M=P}return F}function o(p,L,E){let I=0;const T=[];let F=0;if(E)for(let R=0,M=L.length;R<M;R++){const N=L[R],A=N.endIndex;if(I+50<A){const P=N.type,x=N.metadata,W=N.containsRTL;let U=-1,O=I;for(let $=I;$<A;$++)p.charCodeAt($)===32&&(U=$),U!==-1&&$-O>=50&&(T[F++]=new w.LinePart(U+1,P,x,W),O=U+1,U=-1);O!==A&&(T[F++]=new w.LinePart(A,P,x,W))}else T[F++]=N;I=A}else for(let R=0,M=L.length;R<M;R++){const N=L[R],A=N.endIndex,P=A-I;if(P>50){const x=N.type,W=N.metadata,U=N.containsRTL,O=Math.ceil(P/50);for(let $=1;$<O;$++){const Q=I+$*50;T[F++]=new w.LinePart(Q,x,W,U)}T[F++]=new w.LinePart(A,x,W,U)}else T[F++]=N;I=A}return T}function l(p){return p<32?p!==9:p===127||p>=8234&&p<=8238||p>=8294&&p<=8297||p>=8206&&p<=8207||p===1564}function a(p,L){const E=[];let I=new w.LinePart(0,"",0,!1),T=0;for(const F of L){const R=F.endIndex;for(;T<R;T++){const M=p.charCodeAt(T);l(M)&&(T>I.endIndex&&(I=new w.LinePart(T,F.type,F.metadata,F.containsRTL),E.push(I)),I=new w.LinePart(T+1,"mtkcontrol",F.metadata,!1),E.push(I))}T>I.endIndex&&(I=new w.LinePart(R,F.type,F.metadata,F.containsRTL),E.push(I))}return E}function d(p,L,E,I){const T=p.continuesWithWrappedLine,F=p.fauxIndentLength,R=p.tabSize,M=p.startVisibleColumn,N=p.useMonospaceOptimizations,A=p.selectionsOnLine,P=p.renderWhitespace===1,x=p.renderWhitespace===3,W=p.renderSpaceWidth!==p.spaceWidth,U=[];let O=0,$=0,Q=I[$].type,se=I[$].containsRTL,le=I[$].endIndex;const te=I.length;let re=!1,H=k.firstNonWhitespaceIndex(L),B;H===-1?(re=!0,H=E,B=E):B=k.lastNonWhitespaceIndex(L);let j=!1,G=0,Y=A&&A[G],ne=M%R;for(let he=F;he<E;he++){const oe=L.charCodeAt(he);Y&&he>=Y.endOffset&&(G++,Y=A&&A[G]);let ce;if(he<H||he>B)ce=!0;else if(oe===9)ce=!0;else if(oe===32)if(P)if(j)ce=!0;else{const z=he+1<E?L.charCodeAt(he+1):0;ce=z===32||z===9}else ce=!0;else ce=!1;if(ce&&A&&(ce=!!Y&&Y.startOffset<=he&&Y.endOffset>he),ce&&x&&(ce=re||he>B),ce&&se&&he>=H&&he<=B&&(ce=!1),j){if(!ce||!N&&ne>=R){if(W){const z=O>0?U[O-1].endIndex:F;for(let V=z+1;V<=he;V++)U[O++]=new w.LinePart(V,"mtkw",1,!1)}else U[O++]=new w.LinePart(he,"mtkw",1,!1);ne=ne%R}}else(he===le||ce&&he>F)&&(U[O++]=new w.LinePart(he,Q,0,se),ne=ne%R);for(oe===9?ne=R:k.isFullWidthCharacter(oe)?ne+=2:ne++,j=ce;he===le&&($++,$<te);)Q=I[$].type,se=I[$].containsRTL,le=I[$].endIndex}let de=!1;if(j)if(T&&P){const he=E>0?L.charCodeAt(E-1):0,oe=E>1?L.charCodeAt(E-2):0;he===32&&oe!==32&&oe!==9||(de=!0)}else de=!0;if(de)if(W){const he=O>0?U[O-1].endIndex:F;for(let oe=he+1;oe<=E;oe++)U[O++]=new w.LinePart(oe,"mtkw",1,!1)}else U[O++]=new w.LinePart(E,"mtkw",1,!1);else U[O++]=new w.LinePart(E,Q,0,se);return U}function u(p,L,E,I){I.sort(D.LineDecoration.compare);const T=D.LineDecorationsNormalizer.normalize(p,I),F=T.length;let R=0;const M=[];let N=0,A=0;for(let x=0,W=E.length;x<W;x++){const U=E[x],O=U.endIndex,$=U.type,Q=U.metadata,se=U.containsRTL;for(;R<F&&T[R].startOffset<O;){const le=T[R];if(le.startOffset>A&&(A=le.startOffset,M[N++]=new w.LinePart(A,$,Q,se)),le.endOffset+1<=O)A=le.endOffset+1,M[N++]=new w.LinePart(A,$+" "+le.className,Q|le.metadata,se),R++;else{A=O,M[N++]=new w.LinePart(A,$+" "+le.className,Q|le.metadata,se);break}}O>A&&(A=O,M[N++]=new w.LinePart(A,$,Q,se))}const P=E[E.length-1].endIndex;if(R<F&&T[R].startOffset===P)for(;R<F&&T[R].startOffset===P;){const x=T[R];M[N++]=new w.LinePart(A,x.className,x.metadata,!1),R++}return M}function C(p,L){const E=p.fontIsMonospace,I=p.canUseHalfwidthRightwardsArrow,T=p.containsForeignElements,F=p.lineContent,R=p.len,M=p.isOverflowing,N=p.overflowingCharCount,A=p.parts,P=p.fauxIndentLength,x=p.tabSize,W=p.startVisibleColumn,U=p.containsRTL,O=p.spaceWidth,$=p.renderSpaceCharCode,Q=p.renderWhitespace,se=p.renderControlCharacters,le=new m(R+1,A.length);let te=!1,re=0,H=W,B=0,j=0,G=0;U?L.appendString(\'<span dir="ltr">\'):L.appendString("<span>");for(let Y=0,ne=A.length;Y<ne;Y++){const de=A[Y],he=de.endIndex,oe=de.type,ce=de.containsRTL,z=Q!==0&&de.isWhitespace(),V=z&&!E&&(oe==="mtkw"||!T),K=re===he&&de.isPseudoAfter();if(B=0,L.appendString("<span "),ce&&L.appendString(\'style="unicode-bidi:isolate" \'),L.appendString(\'class="\'),L.appendString(V?"mtkz":oe),L.appendASCIICharCode(34),z){let ie=0;{let X=re,Z=H;for(;X<he;X++){const me=(F.charCodeAt(X)===9?x-Z%x:1)|0;ie+=me,X>=P&&(Z+=me)}}for(V&&(L.appendString(\' style="width:\'),L.appendString(String(O*ie)),L.appendString(\'px"\')),L.appendASCIICharCode(62);re<he;re++){le.setColumnInfo(re+1,Y-G,B,j),G=0;const X=F.charCodeAt(re);let Z,ue;if(X===9){Z=x-H%x|0,ue=Z,!I||ue>1?L.appendCharCode(8594):L.appendCharCode(65515);for(let me=2;me<=ue;me++)L.appendCharCode(160)}else Z=2,ue=1,L.appendCharCode($),L.appendCharCode(8204);B+=Z,j+=ue,re>=P&&(H+=ue)}}else for(L.appendASCIICharCode(62);re<he;re++){le.setColumnInfo(re+1,Y-G,B,j),G=0;const ie=F.charCodeAt(re);let X=1,Z=1;switch(ie){case 9:X=x-H%x,Z=X;for(let ue=1;ue<=X;ue++)L.appendCharCode(160);break;case 32:L.appendCharCode(160);break;case 60:L.appendString("<");break;case 62:L.appendString(">");break;case 38:L.appendString("&");break;case 0:se?L.appendCharCode(9216):L.appendString("�");break;case 65279:case 8232:case 8233:case 133:L.appendCharCode(65533);break;default:k.isFullWidthCharacter(ie)&&Z++,se&&ie<32?L.appendCharCode(9216+ie):se&&ie===127?L.appendCharCode(9249):se&&l(ie)?(L.appendString("[U+"),L.appendString(f(ie)),L.appendString("]"),X=8,Z=X):L.appendCharCode(ie)}B+=X,j+=Z,re>=P&&(H+=Z)}K?G++:G=0,re>=R&&!te&&de.isPseudoAfter()&&(te=!0,le.setColumnInfo(re+1,Y,B,j)),L.appendString("</span>")}return te||le.setColumnInfo(R+1,A.length-1,B,j),M&&(L.appendString(\'<span class="mtkoverflow">\'),L.appendString(S.localize(0,null,v(N))),L.appendString("</span>")),L.appendString("</span>"),new n(le,U,T)}function f(p){return p.toString(16).toUpperCase().padStart(4,"0")}function v(p){return p<1024?S.localize(1,null,p):p<1024*1024?`${(p/1024).toFixed(1)} KB`:`${(p/1024/1024).toFixed(1)} MB`}}),define(J[586],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(J[587],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(J[588],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(J[589],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(J[590],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(J[591],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeAction",e)}),define(J[592],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(J[593],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeActionContributions",e)}),define(J[594],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeActionMenu",e)}),define(J[595],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeActionUi",e)}),define(J[596],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(J[597],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(J[598],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(J[599],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/comment/browser/comment",e)}),define(J[600],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(J[601],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/copyPaste/browser/copyPasteContribution",e)}),define(J[602],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/copyPaste/browser/copyPasteController",e)}),define(J[603],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(J[604],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution",e)}),define(J[605],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(J[606],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/find/browser/findController",e)}),define(J[607],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/find/browser/findWidget",e)}),define(J[608],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/folding/browser/folding",e)}),define(J[609],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(J[610],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(J[611],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/format/browser/format",e)}),define(J[612],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/format/browser/formatActions",e)}),define(J[613],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(J[614],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(J[615],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(J[616],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(J[617],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(J[618],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(J[619],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(J[620],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(J[146],ee([1,0,11,6,155,2,55,42,9,5,620]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class n{constructor(c,g,o,l){this.isProviderFirst=c,this.parent=g,this.link=o,this._rangeCallback=l,this.id=y.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){var c,g;return(g=(c=this._range)!==null&&c!==void 0?c:this.link.targetSelectionRange)!==null&&g!==void 0?g:this.link.range}set range(c){this._range=c,this._rangeCallback(this)}get ariaMessage(){var c;const g=(c=this.parent.getPreview(this))===null||c===void 0?void 0:c.preview(this.range);return g?(0,m.localize)(1,null,(0,b.basename)(this.uri),this.range.startLineNumber,this.range.startColumn,g.value):(0,m.localize)(0,null,(0,b.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=n;class t{constructor(c){this._modelReference=c}dispose(){this._modelReference.dispose()}preview(c,g=8){const o=this._modelReference.object.textEditorModel;if(!o)return;const{startLineNumber:l,startColumn:a,endLineNumber:d,endColumn:u}=c,C=o.getWordUntilPosition({lineNumber:l,column:a-g}),f=new h.Range(l,C.startColumn,l,a),v=new h.Range(d,u,d,1073741824),p=o.getValueInRange(f).replace(/^\\s+/,""),L=o.getValueInRange(c),E=o.getValueInRange(v).replace(/\\s+$/,"");return{value:p+L+E,highlight:{start:p.length,end:p.length+L.length}}}}e.FilePreview=t;class i{constructor(c,g){this.parent=c,this.uri=g,this.children=[],this._previews=new w.ResourceMap}dispose(){(0,D.dispose)(this._previews.values()),this._previews.clear()}getPreview(c){return this._previews.get(c.uri)}get ariaMessage(){const c=this.children.length;return c===1?(0,m.localize)(2,null,(0,b.basename)(this.uri),this.uri.fsPath):(0,m.localize)(3,null,c,(0,b.basename)(this.uri),this.uri.fsPath)}resolve(c){return Ee(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const g of this.children)if(!this._previews.has(g.uri))try{const o=yield c.createModelReference(g.uri);this._previews.set(g.uri,new t(o))}catch(o){(0,S.onUnexpectedError)(o)}return this})}}e.FileReferences=i;class s{constructor(c,g){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new k.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=c,this._title=g;const[o]=c;c.sort(s._compareReferences);let l;for(const a of c)if((!l||!b.extUri.isEqual(l.uri,a.uri,!0))&&(l=new i(this,a.uri),this.groups.push(l)),l.children.length===0||s._compareReferences(a,l.children[l.children.length-1])!==0){const d=new n(o===a,l,a,u=>this._onDidChangeReferenceRange.fire(u));this.references.push(d),l.children.push(d)}}dispose(){(0,D.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new s(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,m.localize)(4,null):this.references.length===1?(0,m.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,m.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,m.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(c,g){const{parent:o}=c;let l=o.children.indexOf(c);const a=o.children.length,d=o.parent.groups.length;return d===1||g&&l+1<a||!g&&l>0?(g?l=(l+1)%a:l=(l+a-1)%a,o.children[l]):(l=o.parent.groups.indexOf(o),g?(l=(l+1)%d,o.parent.groups[l].children[0]):(l=(l+d-1)%d,o.parent.groups[l].children[o.parent.groups[l].children.length-1]))}nearestReference(c,g){const o=this.references.map((l,a)=>({idx:a,prefixLen:_.commonPrefixLength(l.uri.toString(),c.toString()),offsetDist:Math.abs(l.range.startLineNumber-g.lineNumber)*100+Math.abs(l.range.startColumn-g.column)})).sort((l,a)=>l.prefixLen>a.prefixLen?-1:l.prefixLen<a.prefixLen?1:l.offsetDist<a.offsetDist?-1:l.offsetDist>a.offsetDist?1:0)[0];if(o)return this.references[o.idx]}referenceAt(c,g){for(const o of this.references)if(o.uri.toString()===c.toString()&&h.Range.containsPosition(o.range,g))return o}firstReference(){for(const c of this.references)if(c.isProviderFirst)return c;return this.references[0]}static _compareReferences(c,g){return b.extUri.compare(c.uri,g.uri)||h.Range.compareRangesUsingStarts(c.range,g.range)}}e.ReferencesModel=s}),define(J[621],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(J[622],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/hover/browser/hover",e)}),define(J[623],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(J[624],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(J[625],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(J[626],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(J[627],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(J[628],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/inlineCompletions/browser/ghostTextController",e)}),define(J[629],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/inlineCompletions/browser/ghostTextHoverParticipant",e)}),define(J[630],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/inlineCompletions/browser/inlineSuggestionHintsWidget",e)}),define(J[631],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(J[632],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(J[633],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(J[634],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/links/browser/links",e)}),define(J[635],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/message/browser/messageController",e)}),define(J[636],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(J[637],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(J[638],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(J[639],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(J[640],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(J[641],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(J[642],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/readOnlyMessage/browser/contribution",e)}),define(J[643],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/rename/browser/rename",e)}),define(J[644],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(J[645],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(J[646],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(J[647],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(J[648],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/stickyScroll/browser/stickyScrollActions",e)}),define(J[649],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(J[650],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(J[651],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(J[652],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(J[653],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(J[654],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(J[655],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(J[656],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(J[657],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(J[658],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(J[659],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(J[660],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/wordHighlighter/browser/highlightDecorations",e)}),define(J[661],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(J[662],ee([3,4]),function(q,e){return q.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(J[663],ee([3,4]),function(q,e){return q.create("vs/platform/action/common/actionCommonCategories",e)}),define(J[664],ee([3,4]),function(q,e){return q.create("vs/platform/actionWidget/browser/actionList",e)}),define(J[665],ee([3,4]),function(q,e){return q.create("vs/platform/actionWidget/browser/actionWidget",e)}),define(J[666],ee([3,4]),function(q,e){return q.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(J[667],ee([3,4]),function(q,e){return q.create("vs/platform/actions/browser/toolbar",e)}),define(J[668],ee([3,4]),function(q,e){return q.create("vs/platform/actions/common/menuService",e)}),define(J[669],ee([3,4]),function(q,e){return q.create("vs/platform/audioCues/browser/audioCueService",e)}),define(J[670],ee([3,4]),function(q,e){return q.create("vs/platform/configuration/common/configurationRegistry",e)}),define(J[671],ee([3,4]),function(q,e){return q.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(J[672],ee([3,4]),function(q,e){return q.create("vs/platform/contextkey/common/contextkey",e)}),define(J[673],ee([3,4]),function(q,e){return q.create("vs/platform/contextkey/common/contextkeys",e)}),define(J[674],ee([3,4]),function(q,e){return q.create("vs/platform/contextkey/common/scanner",e)}),define(J[675],ee([3,4]),function(q,e){return q.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(J[676],ee([3,4]),function(q,e){return q.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(J[677],ee([3,4]),function(q,e){return q.create("vs/platform/list/browser/listService",e)}),define(J[678],ee([3,4]),function(q,e){return q.create("vs/platform/markers/common/markers",e)}),define(J[679],ee([3,4]),function(q,e){return q.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(J[680],ee([3,4]),function(q,e){return q.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(J[681],ee([3,4]),function(q,e){return q.create("vs/platform/quickinput/browser/quickInput",e)}),define(J[682],ee([3,4]),function(q,e){return q.create("vs/platform/quickinput/browser/quickInputList",e)}),define(J[683],ee([3,4]),function(q,e){return q.create("vs/platform/quickinput/browser/quickInputUtils",e)}),define(J[684],ee([3,4]),function(q,e){return q.create("vs/platform/theme/common/colorRegistry",e)}),define(J[685],ee([3,4]),function(q,e){return q.create("vs/platform/theme/common/iconRegistry",e)}),define(J[686],ee([3,4]),function(q,e){return q.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(J[687],ee([3,4]),function(q,e){return q.create("vs/platform/workspace/common/workspace",e)}),define(J[688],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isICommandActionToggleInfo=void 0;function S(k){return k?k.condition!==void 0:!1}e.isICommandActionToggleInfo=S}),define(J[689],ee([1,0,663]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Categories=void 0,e.Categories=Object.freeze({View:{value:(0,S.localize)(0,null),original:"View"},Help:{value:(0,S.localize)(1,null),original:"Help"},Test:{value:(0,S.localize)(2,null),original:"Test"},File:{value:(0,S.localize)(3,null),original:"File"},Preferences:{value:(0,S.localize)(4,null),original:"Preferences"},Developer:{value:(0,S.localize)(5,null),original:"Developer"}})}),define(J[690],ee([1,0,11,674]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=void 0;function y(..._){switch(_.length){case 1:return(0,k.localize)(0,null,_[0]);case 2:return(0,k.localize)(1,null,_[0],_[1]);case 3:return(0,k.localize)(2,null,_[0],_[1],_[2]);default:return}}const D=(0,k.localize)(3,null),w=(0,k.localize)(4,null);class b{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\\-\\./\\\\:\\*\\?\\+\\[\\]\\^,#@;"%\\$\\p{L}-]+/uy}static getLexeme(h){switch(h.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return h.isTripleEq?"===":"==";case 4:return h.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return h.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return h.lexeme;case 18:return h.lexeme;case 19:return h.lexeme;case 20:return"EOF";default:throw(0,S.illegalState)(`unhandled token type: ${JSON.stringify(h)}; have you forgotten to add a case?`)}}reset(h){return this._input=h,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const m=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:m})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const m=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:m})}else this._match(126)?this._addToken(9):this._error(y("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(y("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(y("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(h){return this._isAtEnd()||this._input.charCodeAt(this._current)!==h?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(h){this._tokens.push({type:h,offset:this._start})}_error(h){const m=this._start,n=this._input.substring(this._start,this._current),t={type:19,offset:this._start,lexeme:n};this._errors.push({offset:m,lexeme:n,additionalInfo:h}),this._tokens.push(t)}_string(){this.stringRe.lastIndex=this._start;const h=this.stringRe.exec(this._input);if(h){this._current=this._start+h[0].length;const m=this._input.substring(this._start,this._current),n=b._keywords.get(m);n?this._addToken(n):this._tokens.push({type:17,lexeme:m,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(D);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let h=this._current,m=!1,n=!1;for(;;){if(h>=this._input.length){this._current=h,this._error(w);return}const i=this._input.charCodeAt(h);if(m)m=!1;else if(i===47&&!n){h++;break}else i===91?n=!0:i===92?m=!0:i===93&&(n=!1);h++}for(;h<this._input.length&&b._regexFlags.has(this._input.charCodeAt(h));)h++;this._current=h;const t=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:t,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}b._regexFlags=new Set(["i","g","s","m","y","u"].map(_=>_.charCodeAt(0))),b._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]),e.Scanner=b}),define(J[691],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpenSource=void 0;var S;(function(k){k[k.API=0]="API",k[k.USER=1]="USER"})(S=e.EditorOpenSource||(e.EditorOpenSource={}))}),define(J[692],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIdentifierSet=e.ExtensionIdentifier=void 0;class S{constructor(D){this.value=D,this._lower=D.toLowerCase()}static toKey(D){return typeof D=="string"?D.toLowerCase():D._lower}}e.ExtensionIdentifier=S;class k{constructor(D){if(this._set=new Set,D)for(const w of D)this.add(w)}add(D){this._set.add(S.toKey(D))}has(D){return this._set.has(S.toKey(D))}}e.ExtensionIdentifierSet=k}),define(J[304],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileKind=void 0;var S;(function(k){k[k.FILE=0]="FILE",k[k.FOLDER=1]="FOLDER",k[k.ROOT_FOLDER=2]="ROOT_FOLDER"})(S=e.FileKind||(e.FileKind={}))}),define(J[693],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function S(k){var y,D;return((y=k.lookupKeybinding("history.showPrevious"))===null||y===void 0?void 0:y.getElectronAccelerator())==="Up"&&((D=k.lookupKeybinding("history.showNext"))===null||D===void 0?void 0:D.getElectronAccelerator())==="Down"}e.showHistoryKeybindingHint=S}),define(J[222],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class S{constructor(y,D=[],w=!1){this.ctor=y,this.staticArguments=D,this.supportsDelayedInstantiation=w}}e.SyncDescriptor=S}),define(J[51],ee([1,0,222]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const k=[];function y(w,b,_){b instanceof S.SyncDescriptor||(b=new S.SyncDescriptor(b,[],!!_)),k.push([w,b])}e.registerSingleton=y;function D(){return k}e.getSingletonServiceDescriptors=D}),define(J[694],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class S{constructor(D,w){this.key=D,this.data=w,this.incoming=new Map,this.outgoing=new Map}}e.Node=S;class k{constructor(D){this._hashFn=D,this._nodes=new Map}roots(){const D=[];for(const w of this._nodes.values())w.outgoing.size===0&&D.push(w);return D}insertEdge(D,w){const b=this.lookupOrInsertNode(D),_=this.lookupOrInsertNode(w);b.outgoing.set(_.key,_),_.incoming.set(b.key,b)}removeNode(D){const w=this._hashFn(D);this._nodes.delete(w);for(const b of this._nodes.values())b.outgoing.delete(w),b.incoming.delete(w)}lookupOrInsertNode(D){const w=this._hashFn(D);let b=this._nodes.get(w);return b||(b=new S(w,D),this._nodes.set(w,b)),b}isEmpty(){return this._nodes.size===0}toString(){const D=[];for(const[w,b]of this._nodes)D.push(`${w}\n\t(-> incoming)[${[...b.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...b.outgoing.keys()].join(",")}]\n`);return D.join(`\n`)}findCycleSlow(){for(const[D,w]of this._nodes){const b=new Set([D]),_=this._findCycle(w,b);if(_)return _}}_findCycle(D,w){for(const[b,_]of D.outgoing){if(w.has(b))return[...w,b].join(" -> ");w.add(b);const h=this._findCycle(_,w);if(h)return h;w.delete(b)}}}e.Graph=k}),define(J[8],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.IInstantiationService=e._util=void 0;var S;(function(D){D.serviceIds=new Map,D.DI_TARGET="$di$target",D.DI_DEPENDENCIES="$di$dependencies";function w(b){return b[D.DI_DEPENDENCIES]||[]}D.getServiceDependencies=w})(S=e._util||(e._util={})),e.IInstantiationService=y("instantiationService");function k(D,w,b){w[S.DI_TARGET]===w?w[S.DI_DEPENDENCIES].push({id:D,index:b}):(w[S.DI_DEPENDENCIES]=[{id:D,index:b}],w[S.DI_TARGET]=w)}function y(D){if(S.serviceIds.has(D))return S.serviceIds.get(D);const w=function(b,_,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");k(w,b,h)};return w.toString=()=>D,S.serviceIds.set(D,w),w}e.createDecorator=y}),define(J[147],ee([1,0,8,20,18]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,S.createDecorator)("IWorkspaceEditService");class D{constructor(h){this.metadata=h}static convert(h){return h.edits.map(m=>{if(w.is(m))return w.lift(m);if(b.is(m))return b.lift(m);throw new Error("Unsupported edit")})}}e.ResourceEdit=D;class w extends D{static is(h){return h instanceof w?!0:(0,y.isObject)(h)&&k.URI.isUri(h.resource)&&(0,y.isObject)(h.textEdit)}static lift(h){return h instanceof w?h:new w(h.resource,h.textEdit,h.versionId,h.metadata)}constructor(h,m,n=void 0,t){super(t),this.resource=h,this.textEdit=m,this.versionId=n}}e.ResourceTextEdit=w;class b extends D{static is(h){return h instanceof b?!0:(0,y.isObject)(h)&&(!!h.newResource||!!h.oldResource)}static lift(h){return h instanceof b?h:new b(h.oldResource,h.newResource,h.options,h.metadata)}constructor(h,m,n={},t){super(t),this.oldResource=h,this.newResource=m,this.options=n}}e.ResourceFileEdit=b}),define(J[30],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,S.createDecorator)("codeEditorService")}),define(J[38],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,S.createDecorator)("languageService")}),define(J[110],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=void 0,e.IEditorWorkerService=(0,S.createDecorator)("editorWorkerService")});var fe=this&&this.__param||function(q,e){return function(S,k){e(S,k,q)}};define(J[695],ee([1,0,6,110]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=void 0;let y=class{constructor(w,b){this.editorWorkerService=b,this.onDidChangeEventEmitter=new S.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="smart",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(w)}dispose(){var w;(w=this.diffAlgorithmOnDidChangeSubscription)===null||w===void 0||w.dispose()}computeDiff(w,b,_){return Ee(this,void 0,void 0,function*(){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(w,b,_);const h=yield this.editorWorkerService.computeDiff(w.uri,b.uri,_,this.diffAlgorithm);if(!h)throw new Error("no diff result available");return h})}setOptions(w){var b;let _=!1;w.diffAlgorithm&&this.diffAlgorithm!==w.diffAlgorithm&&((b=this.diffAlgorithmOnDidChangeSubscription)===null||b===void 0||b.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=w.diffAlgorithm,typeof w.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=w.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),_=!0),_&&this.onDidChangeEventEmitter.fire()}};y=Ne([fe(1,k.IEditorWorkerService)],y),e.WorkerBasedDocumentDiffProvider=y}),define(J[19],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,S.createDecorator)("ILanguageFeaturesService")}),define(J[696],ee([1,0,555,19,51]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeaturesService=void 0;class D{constructor(){this.referenceProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.renameProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.codeActionProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.definitionProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.typeDefinitionProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.declarationProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.implementationProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.documentSymbolProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.inlayHintsProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.colorProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.codeLensProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.documentFormattingEditProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeFormattingEditProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.onTypeFormattingEditProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.signatureHelpProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.hoverProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.documentHighlightProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.selectionRangeProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.foldingRangeProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.linkProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.inlineCompletionsProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.completionProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.linkedEditingRangeProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.documentSemanticTokensProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.documentOnDropEditProvider=new S.LanguageFeatureRegistry(this._score.bind(this)),this.documentPasteEditProvider=new S.LanguageFeatureRegistry(this._score.bind(this))}_score(b){var _;return(_=this._notebookTypeResolver)===null||_===void 0?void 0:_.call(this,b)}}e.LanguageFeaturesService=D,(0,y.registerSingleton)(k.ILanguageFeaturesService,D,1)}),define(J[223],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,S.createDecorator)("markerDecorationsService")}),define(J[53],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,S.createDecorator)("modelService")}),define(J[61],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,S.createDecorator)("textModelService")}),define(J[224],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISemanticTokensStylingService=void 0,e.ISemanticTokensStylingService=(0,S.createDecorator)("semanticTokensStylingService")}),define(J[176],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=(0,S.createDecorator)("textResourceConfigurationService"),e.ITextResourcePropertiesService=(0,S.createDecorator)("textResourcePropertiesService")}),define(J[122],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=(0,S.createDecorator)("themeService")}),define(J[177],ee([1,0,8,669]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCue=e.Sound=e.IAudioCueService=void 0,e.IAudioCueService=(0,S.createDecorator)("audioCue");class y{static register(b){return new y(b.fileName)}constructor(b){this.fileName=b}}y.error=y.register({fileName:"error.mp3"}),y.warning=y.register({fileName:"warning.mp3"}),y.foldedArea=y.register({fileName:"foldedAreas.mp3"}),y.break=y.register({fileName:"break.mp3"}),y.quickFixes=y.register({fileName:"quickFixes.mp3"}),y.taskCompleted=y.register({fileName:"taskCompleted.mp3"}),y.taskFailed=y.register({fileName:"taskFailed.mp3"}),y.terminalBell=y.register({fileName:"terminalBell.mp3"}),y.diffLineInserted=y.register({fileName:"diffLineInserted.mp3"}),y.diffLineDeleted=y.register({fileName:"diffLineDeleted.mp3"}),y.diffLineModified=y.register({fileName:"diffLineModified.mp3"}),e.Sound=y;class D{static register(b){const _=new D(b.sound,b.name,b.settingsKey);return D._audioCues.add(_),_}constructor(b,_,h){this.sound=b,this.name=_,this.settingsKey=h}}D._audioCues=new Set,D.error=D.register({name:(0,k.localize)(0,null),sound:y.error,settingsKey:"audioCues.lineHasError"}),D.warning=D.register({name:(0,k.localize)(1,null),sound:y.warning,settingsKey:"audioCues.lineHasWarning"}),D.foldedArea=D.register({name:(0,k.localize)(2,null),sound:y.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),D.break=D.register({name:(0,k.localize)(3,null),sound:y.break,settingsKey:"audioCues.lineHasBreakpoint"}),D.inlineSuggestion=D.register({name:(0,k.localize)(4,null),sound:y.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),D.terminalQuickFix=D.register({name:(0,k.localize)(5,null),sound:y.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),D.onDebugBreak=D.register({name:(0,k.localize)(6,null),sound:y.break,settingsKey:"audioCues.onDebugBreak"}),D.noInlayHints=D.register({name:(0,k.localize)(7,null),sound:y.error,settingsKey:"audioCues.noInlayHints"}),D.taskCompleted=D.register({name:(0,k.localize)(8,null),sound:y.taskCompleted,settingsKey:"audioCues.taskCompleted"}),D.taskFailed=D.register({name:(0,k.localize)(9,null),sound:y.taskFailed,settingsKey:"audioCues.taskFailed"}),D.terminalCommandFailed=D.register({name:(0,k.localize)(10,null),sound:y.error,settingsKey:"audioCues.terminalCommandFailed"}),D.terminalBell=D.register({name:(0,k.localize)(11,null),sound:y.terminalBell,settingsKey:"audioCues.terminalBell"}),D.notebookCellCompleted=D.register({name:(0,k.localize)(12,null),sound:y.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),D.notebookCellFailed=D.register({name:(0,k.localize)(13,null),sound:y.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),D.diffLineInserted=D.register({name:(0,k.localize)(14,null),sound:y.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),D.diffLineDeleted=D.register({name:(0,k.localize)(15,null),sound:y.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),D.diffLineModified=D.register({name:(0,k.localize)(16,null),sound:y.diffLineModified,settingsKey:"audioCues.diffLineModified"}),e.AudioCue=D}),define(J[697],ee([1,0,7,2,9,74,40,86,13,5,95,48,38,138,109,175,8,50,177,417]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=void 0;const a=(l=window.trustedTypes)===null||l===void 0?void 0:l.createPolicy("editorGhostText",{createHTML:L=>L});let d=class extends k.Disposable{constructor(E,I,T,F,R){super(),this.editor=E,this.model=I,this.instantiationService=T,this.languageService=F,this.audioCueService=R,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(C,this.editor)),this.additionalLinesWidget=this._register(new f(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this.replacementDecoration=this._register(new u(this.editor)),this._register(this.editor.onDidChangeConfiguration(M=>{(M.hasChanged(31)||M.hasChanged(112)||M.hasChanged(94)||M.hasChanged(89)||M.hasChanged(49)||M.hasChanged(48)||M.hasChanged(64))&&this.update()})),this._register((0,k.toDisposable)(()=>{var M;this.disposed=!0,this.update(),(M=this.viewMoreContentWidget)===null||M===void 0||M.dispose(),this.viewMoreContentWidget=void 0})),this._register(I.onDidChange(()=>this.update(!0))),this.update(!0)}shouldShowHoverAtViewZone(E){return this.additionalLinesWidget.viewZoneId===E}update(E){var I;const T=this.model.ghostText;if(!this.editor.hasModel()||!T||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear(),this.replacementDecoration.clear();return}const F=new Array,R=new Array;function M(x,W){if(R.length>0){const U=R[R.length-1];W&&U.decorations.push(new i.LineDecoration(U.content.length+1,U.content.length+1+x[0].length,W,0)),U.content+=x[0],x=x.slice(1)}for(const U of x)R.push({content:U,decorations:W?[new i.LineDecoration(1,U.length+1,W,0)]:[]})}T instanceof r.GhostTextReplacement?this.replacementDecoration.setDecorations([{range:new h.Range(T.lineNumber,T.columnStart,T.lineNumber,T.columnStart+T.length),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}]):this.replacementDecoration.setDecorations([]);const N=this.editor.getModel().getLineContent(T.lineNumber);let A,P=0;for(const x of T.parts){let W=x.lines;A===void 0?(F.push({column:x.column,text:W[0],preview:x.preview}),W=W.slice(1)):M([N.substring(P,x.column-1)],void 0),W.length>0&&(M(W,"ghost-text"),A===void 0&&x.column<=N.length&&(A=x.column)),P=x.column-1}A!==void 0&&M([N.substring(P)],void 0),this.partsWidget.setParts(T.lineNumber,F,A!==void 0?{column:A,length:N.length+1-A}:void 0),this.additionalLinesWidget.updateLines(T.lineNumber,R,T.additionalReservedLineCount),E&&this.audioCueService.playAudioCue(o.AudioCue.inlineSuggestion).then(()=>{var x;if(this.editor.getOption(6)){const W=(x=this.editor.getModel())===null||x===void 0?void 0:x.getLineContent(T.lineNumber);W&&(0,g.alert)(T.renderForScreenReader(W))}}),0<0?this.viewMoreContentWidget=this.renderViewMoreLines(new _.Position(T.lineNumber,this.editor.getModel().getLineMaxColumn(T.lineNumber)),"",0):((I=this.viewMoreContentWidget)===null||I===void 0||I.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(E,I,T){const F=this.editor.getOption(48),R=document.createElement("div");R.className="suggest-preview-additional-widget",(0,D.applyFontInfo)(R,F);const M=document.createElement("span");M.className="content-spacer",M.append(I),R.append(M);const N=document.createElement("span");N.className="content-newline suggest-preview-text",N.append("\\u23CE "),R.append(N);const A=new k.DisposableStore,P=document.createElement("div");return P.className="button suggest-preview-text",P.append(`+${T} lines\\u2026`),A.add(S.addStandardDisposableListener(P,"mousedown",x=>{var W;(W=this.model)===null||W===void 0||W.setExpanded(!0),x.preventDefault(),this.editor.focus()})),R.append(P),new p(this.editor,E,R,A)}};d=Ne([fe(2,c.IInstantiationService),fe(3,t.ILanguageService),fe(4,o.IAudioCueService)],d),e.GhostTextWidget=d;class u{constructor(E){this.editor=E,this.decorationIds=[]}setDecorations(E){this.editor.changeDecorations(I=>{this.decorationIds=I.deltaDecorations(this.decorationIds,E)})}clear(){this.setDecorations([])}dispose(){this.clear()}}class C{constructor(E){this.editor=E,this.decorationIds=[]}dispose(){this.clear()}clear(){this.editor.changeDecorations(E=>{this.decorationIds=E.deltaDecorations(this.decorationIds,[])})}setParts(E,I,T){if(!this.editor.getModel())return;const R=new Array;T&&R.push({range:h.Range.fromPositions(new _.Position(E,T.column),new _.Position(E,T.column+T.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.editor.changeDecorations(M=>{this.decorationIds=M.deltaDecorations(this.decorationIds,I.map(N=>({range:h.Range.fromPositions(new _.Position(E,N.column)),options:{description:"ghost-text",after:{content:N.text,inlineClassName:N.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:n.InjectedTextCursorStops.Left},showIfCollapsed:!0}})).concat(R))})}}class f{get viewZoneId(){return this._viewZoneId}constructor(E,I){this.editor=E,this.languageIdCodec=I,this._viewZoneId=void 0}dispose(){this.clear()}clear(){this.editor.changeViewZones(E=>{this._viewZoneId&&(E.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(E,I,T){const F=this.editor.getModel();if(!F)return;const{tabSize:R}=F.getOptions();this.editor.changeViewZones(M=>{this._viewZoneId&&(M.removeZone(this._viewZoneId),this._viewZoneId=void 0);const N=Math.max(I.length,T);if(N>0){const A=document.createElement("div");v(A,R,I,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=M.addZone({afterLineNumber:E,heightInLines:N,domNode:A,afterColumnAffinity:1})}})}}function v(L,E,I,T,F){const R=T.get(31),M=T.get(112),N="none",A=T.get(89),P=T.get(49),x=T.get(48),W=T.get(64),U=new m.StringBuilder(1e4);U.appendString(\'<div class="suggest-preview-text">\');for(let Q=0,se=I.length;Q<se;Q++){const le=I[Q],te=le.content;U.appendString(\'<div class="view-line\'),U.appendString(\'" style="top:\'),U.appendString(String(Q*W)),U.appendString(\'px;width:1000000px;">\');const re=y.isBasicASCII(te),H=y.containsRTL(te),B=b.LineTokens.createEmpty(te,F);(0,s.renderViewLine)(new s.RenderLineInput(x.isMonospace&&!R,x.canUseHalfwidthRightwardsArrow,te,!1,re,H,0,B,le.decorations,E,0,x.spaceWidth,x.middotWidth,x.wsmiddotWidth,M,N,A,P!==w.EditorFontLigatures.OFF,null),U),U.appendString("</div>")}U.appendString("</div>"),(0,D.applyFontInfo)(L,x);const O=U.build(),$=a?a.createHTML(O):O;L.innerHTML=$}class p extends k.Disposable{constructor(E,I,T,F){super(),this.editor=E,this.position=I,this.domNode=T,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(F),this._register((0,k.toDisposable)(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}}),define(J[96],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,S.createDecorator)("clipboardService")}),define(J[25],ee([1,0,6,54,2,59,18,8]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=(0,b.createDecorator)("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new S.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(_,h){if(!_)throw new Error("invalid command");if(typeof _=="string"){if(!h)throw new Error("invalid command");return this.registerCommand({id:_,handler:h})}if(_.description){const s=[];for(const c of _.description.args)s.push(c.constraint);const r=_.handler;_.handler=function(c,...g){return(0,w.validateConstraints)(g,s),r(c,...g)}}const{id:m}=_;let n=this._commands.get(m);n||(n=new D.LinkedList,this._commands.set(m,n));const t=n.unshift(_),i=(0,y.toDisposable)(()=>{t();const s=this._commands.get(m);s?.isEmpty()&&this._commands.delete(m)});return this._onDidRegisterCommand.fire(m),i}registerCommandAlias(_,h){return e.CommandsRegistry.registerCommand(_,(m,...n)=>m.get(e.ICommandService).executeCommand(h,...n))}getCommand(_){const h=this._commands.get(_);if(!(!h||h.isEmpty()))return k.Iterable.first(h)}getCommands(){const _=new Map;for(const h of this._commands.keys()){const m=this.getCommand(h);m&&_.set(h,m)}return _}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(J[305],ee([1,0,21,11,2,18,20,53,25,19]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class m{constructor(){this.lenses=[],this._disposables=new y.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(i,s){this._disposables.add(i);for(const r of i.lenses)this.lenses.push({symbol:r,provider:s})}}e.CodeLensModel=m;function n(t,i,s){return Ee(this,void 0,void 0,function*(){const r=t.ordered(i),c=new Map,g=new m,o=r.map((l,a)=>Ee(this,void 0,void 0,function*(){c.set(l,a);try{const d=yield Promise.resolve(l.provideCodeLenses(i,s));d&&g.add(d,l)}catch(d){(0,k.onUnexpectedExternalError)(d)}}));return yield Promise.all(o),g.lenses=g.lenses.sort((l,a)=>l.symbol.range.startLineNumber<a.symbol.range.startLineNumber?-1:l.symbol.range.startLineNumber>a.symbol.range.startLineNumber?1:c.get(l.provider)<c.get(a.provider)?-1:c.get(l.provider)>c.get(a.provider)?1:l.symbol.range.startColumn<a.symbol.range.startColumn?-1:l.symbol.range.startColumn>a.symbol.range.startColumn?1:0),g})}e.getCodeLensModel=n,_.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(t,...i){let[s,r]=i;(0,D.assertType)(w.URI.isUri(s)),(0,D.assertType)(typeof r=="number"||!r);const{codeLensProvider:c}=t.get(h.ILanguageFeaturesService),g=t.get(b.IModelService).getModel(s);if(!g)throw(0,k.illegalArgument)();const o=[],l=new y.DisposableStore;return n(c,g,S.CancellationToken.None).then(a=>{l.add(a);const d=[];for(const u of a.lenses)r==null||u.symbol.command?o.push(u.symbol):r-- >0&&u.provider.resolveCodeLens&&d.push(Promise.resolve(u.provider.resolveCodeLens(g,u.symbol,S.CancellationToken.None)).then(C=>o.push(C||u.symbol)));return Promise.all(d)}).then(()=>o).finally(()=>{setTimeout(()=>l.dispose(),100)})})}),define(J[306],ee([1,0,21,11,20,5,53,25,19]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function h(n,t,i){const s=[],c=n.ordered(t).reverse().map(g=>Promise.resolve(g.provideDocumentColors(t,i)).then(o=>{if(Array.isArray(o))for(const l of o)s.push({colorInfo:l,provider:g})}));return Promise.all(c).then(()=>s)}e.getColors=h;function m(n,t,i,s){return Promise.resolve(i.provideColorPresentations(n,t,s))}e.getColorPresentations=m,b.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(n,...t){const[i]=t;if(!(i instanceof y.URI))throw(0,k.illegalArgument)();const{colorProvider:s}=n.get(_.ILanguageFeaturesService),r=n.get(w.IModelService).getModel(i);if(!r)throw(0,k.illegalArgument)();const c=[],o=s.ordered(r).reverse().map(l=>Promise.resolve(l.provideDocumentColors(r,S.CancellationToken.None)).then(a=>{if(Array.isArray(a))for(const d of a)c.push({range:d.range,color:[d.color.red,d.color.green,d.color.blue,d.color.alpha]})}));return Promise.all(o).then(()=>c)}),b.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(n,...t){const[i,s]=t,{uri:r,range:c}=s;if(!(r instanceof y.URI)||!Array.isArray(i)||i.length!==4||!D.Range.isIRange(c))throw(0,k.illegalArgument)();const[g,o,l,a]=i,{colorProvider:d}=n.get(_.ILanguageFeaturesService),u=n.get(w.IModelService).getModel(r);if(!u)throw(0,k.illegalArgument)();const C={range:c,color:{red:g,green:o,blue:l,alpha:a}},f=[],p=d.ordered(u).reverse().map(L=>Promise.resolve(L.provideColorPresentations(u,C,S.CancellationToken.None)).then(E=>{Array.isArray(E)&&f.push(...E)}));return Promise.all(p).then(()=>f)})}),define(J[698],ee([1,0,16,21,11,2,18,20,5,53,25,19]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class t{constructor(c,g){this._link=c,this._provider=g}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(c){return Ee(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,c)).then(g=>(this._link=g||this._link,this._link.url?this.resolve(c):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}e.Link=t;class i{constructor(c){this._disposables=new D.DisposableStore;let g=[];for(const[o,l]of c){const a=o.links.map(d=>new t(d,l));g=i._union(g,a),(0,D.isDisposable)(o)&&this._disposables.add(o)}this.links=g}dispose(){this._disposables.dispose(),this.links.length=0}static _union(c,g){const o=[];let l,a,d,u;for(l=0,d=0,a=c.length,u=g.length;l<a&&d<u;){const C=c[l],f=g[d];if(_.Range.areIntersectingOrTouching(C.range,f.range)){l++;continue}_.Range.compareRangesUsingStarts(C.range,f.range)<0?(o.push(C),l++):(o.push(f),d++)}for(;l<a;l++)o.push(c[l]);for(;d<u;d++)o.push(g[d]);return o}}e.LinksList=i;function s(r,c,g){const o=[],l=r.ordered(c).reverse().map((a,d)=>Promise.resolve(a.provideLinks(c,g)).then(u=>{u&&(o[d]=[u,a])},y.onUnexpectedExternalError));return Promise.all(l).then(()=>{const a=new i((0,S.coalesce)(o));return g.isCancellationRequested?(a.dispose(),new i([])):a})}e.getLinks=s,m.CommandsRegistry.registerCommand("_executeLinkProvider",(r,...c)=>Ee(void 0,void 0,void 0,function*(){let[g,o]=c;(0,w.assertType)(g instanceof b.URI),typeof o!="number"&&(o=0);const{linkProvider:l}=r.get(n.ILanguageFeaturesService),a=r.get(h.IModelService).getModel(g);if(!a)return[];const d=yield s(l,a,k.CancellationToken.None);if(!d)return[];for(let C=0;C<Math.min(o,d.links.length);C++)yield d.links[C].resolve(k.CancellationToken.None);const u=d.links.slice(0);return d.dispose(),u}))}),define(J[307],ee([1,0,21,11,20,53,25,18,560,5,19]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentRangeSemanticTokens=e.hasDocumentRangeSemanticTokensProvider=e.getDocumentSemanticTokens=e.hasDocumentSemanticTokensProvider=e.DocumentSemanticTokensResult=e.isSemanticTokensEdits=e.isSemanticTokens=void 0;function n(u){return u&&!!u.data}e.isSemanticTokens=n;function t(u){return u&&Array.isArray(u.edits)}e.isSemanticTokensEdits=t;class i{constructor(C,f,v){this.provider=C,this.tokens=f,this.error=v}}e.DocumentSemanticTokensResult=i;function s(u,C){return u.has(C)}e.hasDocumentSemanticTokensProvider=s;function r(u,C){const f=u.orderedGroups(C);return f.length>0?f[0]:[]}function c(u,C,f,v,p){return Ee(this,void 0,void 0,function*(){const L=r(u,C),E=yield Promise.all(L.map(I=>Ee(this,void 0,void 0,function*(){let T,F=null;try{T=yield I.provideDocumentSemanticTokens(C,I===f?v:null,p)}catch(R){F=R,T=null}return(!T||!n(T)&&!t(T))&&(T=null),new i(I,T,F)})));for(const I of E){if(I.error)throw I.error;if(I.tokens)return I}return E.length>0?E[0]:null})}e.getDocumentSemanticTokens=c;function g(u,C){const f=u.orderedGroups(C);return f.length>0?f[0]:null}class o{constructor(C,f){this.provider=C,this.tokens=f}}function l(u,C){return u.has(C)}e.hasDocumentRangeSemanticTokensProvider=l;function a(u,C){const f=u.orderedGroups(C);return f.length>0?f[0]:[]}function d(u,C,f,v){return Ee(this,void 0,void 0,function*(){const p=a(u,C),L=yield Promise.all(p.map(E=>Ee(this,void 0,void 0,function*(){let I;try{I=yield E.provideDocumentRangeSemanticTokens(C,f,v)}catch(T){(0,k.onUnexpectedExternalError)(T),I=null}return(!I||!n(I))&&(I=null),new o(E,I)})));for(const E of L)if(E.tokens)return E;return L.length>0?L[0]:null})}e.getDocumentRangeSemanticTokens=d,w.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",(u,...C)=>Ee(void 0,void 0,void 0,function*(){const[f]=C;(0,b.assertType)(f instanceof y.URI);const v=u.get(D.IModelService).getModel(f);if(!v)return;const{documentSemanticTokensProvider:p}=u.get(m.ILanguageFeaturesService),L=g(p,v);return L?L[0].getLegend():u.get(w.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",f)})),w.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",(u,...C)=>Ee(void 0,void 0,void 0,function*(){const[f]=C;(0,b.assertType)(f instanceof y.URI);const v=u.get(D.IModelService).getModel(f);if(!v)return;const{documentSemanticTokensProvider:p}=u.get(m.ILanguageFeaturesService);if(!s(p,v))return u.get(w.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",f,v.getFullModelRange());const L=yield c(p,v,null,null,S.CancellationToken.None);if(!L)return;const{provider:E,tokens:I}=L;if(!I||!n(I))return;const T=(0,_.encodeSemanticTokensDto)({id:0,type:"full",data:I.data});return I.resultId&&E.releaseDocumentSemanticTokens(I.resultId),T})),w.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",(u,...C)=>Ee(void 0,void 0,void 0,function*(){const[f,v]=C;(0,b.assertType)(f instanceof y.URI);const p=u.get(D.IModelService).getModel(f);if(!p)return;const{documentRangeSemanticTokensProvider:L}=u.get(m.ILanguageFeaturesService),E=a(L,p);if(E.length===0)return;if(E.length===1)return E[0].getLegend();if(!v||!h.Range.isIRange(v))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),E[0].getLegend();const I=yield d(L,p,h.Range.lift(v),S.CancellationToken.None);if(I)return I.provider.getLegend()})),w.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",(u,...C)=>Ee(void 0,void 0,void 0,function*(){const[f,v]=C;(0,b.assertType)(f instanceof y.URI),(0,b.assertType)(h.Range.isIRange(v));const p=u.get(D.IModelService).getModel(f);if(!p)return;const{documentRangeSemanticTokensProvider:L}=u.get(m.ILanguageFeaturesService),E=yield d(L,p,h.Range.lift(v),S.CancellationToken.None);if(!(!E||!E.tokens))return(0,_.encodeSemanticTokensDto)({id:0,type:"full",data:E.tokens.data})}))}),define(J[27],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.IConfigurationService=void 0,e.IConfigurationService=(0,S.createDecorator)("configurationService");function k(h,m){const n=Object.create(null);for(const t in h)y(n,t,h[t],m);return n}e.toValuesTree=k;function y(h,m,n,t){const i=m.split("."),s=i.pop();let r=h;for(let c=0;c<i.length;c++){const g=i[c];let o=r[g];switch(typeof o){case"undefined":o=r[g]=Object.create(null);break;case"object":break;default:t(`Ignoring ${m} as ${i.slice(0,c+1).join(".")} is ${JSON.stringify(o)}`);return}r=o}if(typeof r=="object"&&r!==null)try{r[s]=n}catch{t(`Ignoring ${m} as ${i.join(".")} is ${JSON.stringify(r)}`)}else t(`Ignoring ${m} as ${i.join(".")} is ${JSON.stringify(r)}`)}e.addToValueTree=y;function D(h,m){const n=m.split(".");w(h,n)}e.removeFromValueTree=D;function w(h,m){const n=m.shift();if(m.length===0){delete h[n];return}if(Object.keys(h).indexOf(n)!==-1){const t=h[n];typeof t=="object"&&!Array.isArray(t)&&(w(t,m),Object.keys(t).length===0&&delete h[n])}}function b(h,m,n){function t(r,c){let g=r;for(const o of c){if(typeof g!="object"||g===null)return;g=g[o]}return g}const i=m.split("."),s=t(h,i);return typeof s>"u"?n:s}e.getConfigurationValue=b;function _(h){return h.replace(/[\\[\\]]/g,"")}e.getLanguageTagSettingPlainKey=_}),define(J[308],ee([1,0,26,145,277,27]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonarchTokenizer=void 0;const w=5;class b{static create(g,o){return this._INSTANCE.create(g,o)}constructor(g){this._maxCacheDepth=g,this._entries=Object.create(null)}create(g,o){if(g!==null&&g.depth>=this._maxCacheDepth)return new _(g,o);let l=_.getStackElementId(g);l.length>0&&(l+="|"),l+=o;let a=this._entries[l];return a||(a=new _(g,o),this._entries[l]=a,a)}}b._INSTANCE=new b(w);class _{constructor(g,o){this.parent=g,this.state=o,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(g){let o="";for(;g!==null;)o.length>0&&(o+="|"),o+=g.state,g=g.parent;return o}static _equals(g,o){for(;g!==null&&o!==null;){if(g===o)return!0;if(g.state!==o.state)return!1;g=g.parent,o=o.parent}return g===null&&o===null}equals(g){return _._equals(this,g)}push(g){return b.create(this,g)}pop(){return this.parent}popall(){let g=this;for(;g.parent;)g=g.parent;return g}switchTo(g){return b.create(this.parent,g)}}class h{constructor(g,o){this.languageId=g,this.state=o}equals(g){return this.languageId===g.languageId&&this.state.equals(g.state)}clone(){return this.state.clone()===this.state?this:new h(this.languageId,this.state)}}class m{static create(g,o){return this._INSTANCE.create(g,o)}constructor(g){this._maxCacheDepth=g,this._entries=Object.create(null)}create(g,o){if(o!==null)return new n(g,o);if(g!==null&&g.depth>=this._maxCacheDepth)return new n(g,o);const l=_.getStackElementId(g);let a=this._entries[l];return a||(a=new n(g,null),this._entries[l]=a,a)}}m._INSTANCE=new m(w);class n{constructor(g,o){this.stack=g,this.embeddedLanguageData=o}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:m.create(this.stack,this.embeddedLanguageData)}equals(g){return!(g instanceof n)||!this.stack.equals(g.stack)?!1:this.embeddedLanguageData===null&&g.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||g.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(g.embeddedLanguageData)}}class t{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(g){this._languageId=g}emit(g,o){this._lastTokenType===o&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=o,this._lastTokenLanguage=this._languageId,this._tokens.push(new S.Token(g,o,this._languageId)))}nestedLanguageTokenize(g,o,l,a){const d=l.languageId,u=l.state,C=S.TokenizationRegistry.get(d);if(!C)return this.enterLanguage(d),this.emit(a,""),u;const f=C.tokenize(g,o,u);if(a!==0)for(const v of f.tokens)this._tokens.push(new S.Token(v.offset+a,v.type,v.language));else this._tokens=this._tokens.concat(f.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,f.endState}finalize(g){return new S.TokenizationResult(this._tokens,g)}}class i{constructor(g,o){this._languageService=g,this._theme=o,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(g){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(g)}emit(g,o){const l=this._theme.match(this._currentLanguageId,o)|1024;this._lastTokenMetadata!==l&&(this._lastTokenMetadata=l,this._tokens.push(g),this._tokens.push(l))}static _merge(g,o,l){const a=g!==null?g.length:0,d=o.length,u=l!==null?l.length:0;if(a===0&&d===0&&u===0)return new Uint32Array(0);if(a===0&&d===0)return l;if(d===0&&u===0)return g;const C=new Uint32Array(a+d+u);g!==null&&C.set(g);for(let f=0;f<d;f++)C[a+f]=o[f];return l!==null&&C.set(l,a+d),C}nestedLanguageTokenize(g,o,l,a){const d=l.languageId,u=l.state,C=S.TokenizationRegistry.get(d);if(!C)return this.enterLanguage(d),this.emit(a,""),u;const f=C.tokenizeEncoded(g,o,u);if(a!==0)for(let v=0,p=f.tokens.length;v<p;v+=2)f.tokens[v]+=a;return this._prependTokens=i._merge(this._prependTokens,this._tokens,f.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,f.endState}finalize(g){return new S.EncodedTokenizationResult(i._merge(this._prependTokens,this._tokens,null),g)}}let s=class Mi{constructor(g,o,l,a,d){this._configurationService=d,this._languageService=g,this._standaloneThemeService=o,this._languageId=l,this._lexer=a,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let u=!1;this._tokenizationRegistryListener=S.TokenizationRegistry.onDidChange(C=>{if(u)return;let f=!1;for(let v=0,p=C.changedLanguages.length;v<p;v++){const L=C.changedLanguages[v];if(this._embeddedLanguages[L]){f=!0;break}}f&&(u=!0,S.TokenizationRegistry.handleChange([this._languageId]),u=!1)}),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._configurationService.onDidChangeConfiguration(C=>{C.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const g=[];for(const o in this._embeddedLanguages){const l=S.TokenizationRegistry.get(o);if(l){if(l instanceof Mi){const a=l.getLoadStatus();a.loaded===!1&&g.push(a.promise)}continue}S.TokenizationRegistry.isResolved(o)||g.push(S.TokenizationRegistry.getOrCreate(o))}return g.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(g).then(o=>{})}}getInitialState(){const g=b.create(null,this._lexer.start);return m.create(g,null)}tokenize(g,o,l){if(g.length>=this._maxTokenizationLineLength)return(0,k.nullTokenize)(this._languageId,l);const a=new t,d=this._tokenize(g,o,l,a);return a.finalize(d)}tokenizeEncoded(g,o,l){if(g.length>=this._maxTokenizationLineLength)return(0,k.nullTokenizeEncoded)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),l);const a=new i(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),d=this._tokenize(g,o,l,a);return a.finalize(d)}_tokenize(g,o,l,a){return l.embeddedLanguageData?this._nestedTokenize(g,o,l,0,a):this._myTokenize(g,o,l,0,a)}_findLeavingNestedLanguageOffset(g,o){let l=this._lexer.tokenizer[o.stack.state];if(!l&&(l=y.findRules(this._lexer,o.stack.state),!l))throw y.createError(this._lexer,"tokenizer state is not defined: "+o.stack.state);let a=-1,d=!1;for(const u of l){if(!y.isIAction(u.action)||u.action.nextEmbedded!=="@pop")continue;d=!0;let C=u.regex;const f=u.regex.source;if(f.substr(0,4)==="^(?:"&&f.substr(f.length-1,1)===")"){const p=(C.ignoreCase?"i":"")+(C.unicode?"u":"");C=new RegExp(f.substr(4,f.length-5),p)}const v=g.search(C);v===-1||v!==0&&u.matchOnlyAtLineStart||(a===-1||v<a)&&(a=v)}if(!d)throw y.createError(this._lexer,\'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: \'+o.stack.state);return a}_nestedTokenize(g,o,l,a,d){const u=this._findLeavingNestedLanguageOffset(g,l);if(u===-1){const v=d.nestedLanguageTokenize(g,o,l.embeddedLanguageData,a);return m.create(l.stack,new h(l.embeddedLanguageData.languageId,v))}const C=g.substring(0,u);C.length>0&&d.nestedLanguageTokenize(C,!1,l.embeddedLanguageData,a);const f=g.substring(u);return this._myTokenize(f,o,l,a+u,d)}_safeRuleName(g){return g?g.name:"(unknown)"}_myTokenize(g,o,l,a,d){d.enterLanguage(this._languageId);const u=g.length,C=o&&this._lexer.includeLF?g+`\n`:g,f=C.length;let v=l.embeddedLanguageData,p=l.stack,L=0,E=null,I=!0;for(;I||L<f;){const T=L,F=p.depth,R=E?E.groups.length:0,M=p.state;let N=null,A=null,P=null,x=null,W=null;if(E){N=E.matches;const $=E.groups.shift();A=$.matched,P=$.action,x=E.rule,E.groups.length===0&&(E=null)}else{if(!I&&L>=f)break;I=!1;let $=this._lexer.tokenizer[M];if(!$&&($=y.findRules(this._lexer,M),!$))throw y.createError(this._lexer,"tokenizer state is not defined: "+M);const Q=C.substr(L);for(const se of $)if((L===0||!se.matchOnlyAtLineStart)&&(N=Q.match(se.regex),N)){A=N[0],P=se.action;break}}if(N||(N=[""],A=""),P||(L<f&&(N=[C.charAt(L)],A=N[0]),P=this._lexer.defaultToken),A===null)break;for(L+=A.length;y.isFuzzyAction(P)&&y.isIAction(P)&&P.test;)P=P.test(A,N,M,L===f);let U=null;if(typeof P=="string"||Array.isArray(P))U=P;else if(P.group)U=P.group;else if(P.token!==null&&P.token!==void 0){if(P.tokenSubst?U=y.substituteMatches(this._lexer,P.token,A,N,M):U=P.token,P.nextEmbedded)if(P.nextEmbedded==="@pop"){if(!v)throw y.createError(this._lexer,"cannot pop embedded language if not inside one");v=null}else{if(v)throw y.createError(this._lexer,"cannot enter embedded language from within an embedded language");W=y.substituteMatches(this._lexer,P.nextEmbedded,A,N,M)}if(P.goBack&&(L=Math.max(0,L-P.goBack)),P.switchTo&&typeof P.switchTo=="string"){let $=y.substituteMatches(this._lexer,P.switchTo,A,N,M);if($[0]==="@"&&($=$.substr(1)),y.findRules(this._lexer,$))p=p.switchTo($);else throw y.createError(this._lexer,"trying to switch to a state \'"+$+"\' that is undefined in rule: "+this._safeRuleName(x))}else{if(P.transform&&typeof P.transform=="function")throw y.createError(this._lexer,"action.transform not supported");if(P.next)if(P.next==="@push"){if(p.depth>=this._lexer.maxStack)throw y.createError(this._lexer,"maximum tokenizer stack size reached: ["+p.state+","+p.parent.state+",...]");p=p.push(M)}else if(P.next==="@pop"){if(p.depth<=1)throw y.createError(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(x));p=p.pop()}else if(P.next==="@popall")p=p.popall();else{let $=y.substituteMatches(this._lexer,P.next,A,N,M);if($[0]==="@"&&($=$.substr(1)),y.findRules(this._lexer,$))p=p.push($);else throw y.createError(this._lexer,"trying to set a next state \'"+$+"\' that is undefined in rule: "+this._safeRuleName(x))}}P.log&&typeof P.log=="string"&&y.log(this._lexer,this._lexer.languageId+": "+y.substituteMatches(this._lexer,P.log,A,N,M))}if(U===null)throw y.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(x));const O=$=>{const Q=this._languageService.getLanguageIdByLanguageName($)||this._languageService.getLanguageIdByMimeType($)||$,se=this._getNestedEmbeddedLanguageData(Q);if(L<f){const le=g.substr(L);return this._nestedTokenize(le,o,m.create(p,se),a+L,d)}else return m.create(p,se)};if(Array.isArray(U)){if(E&&E.groups.length>0)throw y.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(x));if(N.length!==U.length+1)throw y.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(x));let $=0;for(let Q=1;Q<N.length;Q++)$+=N[Q].length;if($!==A.length)throw y.createError(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(x));E={rule:x,matches:N,groups:[]};for(let Q=0;Q<U.length;Q++)E.groups[Q]={action:U[Q],matched:N[Q+1]};L-=A.length;continue}else{if(U==="@rematch"&&(L-=A.length,A="",N=null,U="",W!==null))return O(W);if(A.length===0){if(f===0||F!==p.depth||M!==p.state||(E?E.groups.length:0)!==R)continue;throw y.createError(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(x))}let $=null;if(y.isString(U)&&U.indexOf("@brackets")===0){const Q=U.substr(9),se=r(this._lexer,A);if(!se)throw y.createError(this._lexer,"@brackets token returned but no bracket defined as: "+A);$=y.sanitize(se.token+Q)}else{const Q=U===""?"":U+this._lexer.tokenPostfix;$=y.sanitize(Q)}T<u&&d.emit(T+a,$)}if(W!==null)return O(W)}return m.create(p,v)}_getNestedEmbeddedLanguageData(g){if(!this._languageService.isRegisteredLanguageId(g))return new h(g,k.NullState);g!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(g),S.TokenizationRegistry.getOrCreate(g),this._embeddedLanguages[g]=!0);const o=S.TokenizationRegistry.get(g);return o?new h(g,o.getInitialState()):new h(g,k.NullState)}};s=Ne([fe(4,D.IConfigurationService)],s),e.MonarchTokenizer=s;function r(c,g){if(!g)return null;g=y.fixCase(c,g);const o=c.brackets;for(const l of o){if(l.open===g)return{token:l.token,bracketType:1};if(l.close===g)return{token:l.token,bracketType:-1}}return null}}),define(J[699],ee([1,0,9,86,26,109,81,308]),function(q,e,S,k,y,D,w,b){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.Colorizer=void 0;const h=(_=window.trustedTypes)===null||_===void 0?void 0:_.createPolicy("standaloneColorizer",{createHTML:s=>s});class m{static colorizeElement(r,c,g,o){o=o||{};const l=o.theme||"vs",a=o.mimeType||g.getAttribute("lang")||g.getAttribute("data-lang");if(!a)return console.error("Mode not detected"),Promise.resolve();const d=c.getLanguageIdByMimeType(a)||a;r.setTheme(l);const u=g.firstChild?g.firstChild.nodeValue:"";g.className+=" "+l;const C=f=>{var v;const p=(v=h?.createHTML(f))!==null&&v!==void 0?v:f;g.innerHTML=p};return this.colorize(c,u||"",d,o).then(C,f=>console.error(f))}static colorize(r,c,g,o){return Ee(this,void 0,void 0,function*(){const l=r.languageIdCodec;let a=4;o&&typeof o.tabSize=="number"&&(a=o.tabSize),S.startsWithUTF8BOM(c)&&(c=c.substr(1));const d=S.splitLines(c);if(!r.isRegisteredLanguageId(g))return t(d,a,l);const u=yield y.TokenizationRegistry.getOrCreate(g);return u?n(d,a,u,l):t(d,a,l)})}static colorizeLine(r,c,g,o,l=4){const a=w.ViewLineRenderingData.isBasicASCII(r,c),d=w.ViewLineRenderingData.containsRTL(r,a,g);return(0,D.renderViewLine2)(new D.RenderLineInput(!1,!0,r,!1,a,d,0,o,[],l,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(r,c,g=4){const o=r.getLineContent(c);r.tokenization.forceTokenization(c);const a=r.tokenization.getLineTokens(c).inflate();return this.colorizeLine(o,r.mightContainNonBasicASCII(),r.mightContainRTL(),a,g)}}e.Colorizer=m;function n(s,r,c,g){return new Promise((o,l)=>{const a=()=>{const d=i(s,r,c,g);if(c instanceof b.MonarchTokenizer){const u=c.getLoadStatus();if(u.loaded===!1){u.promise.then(a,l);return}}o(d)};a()})}function t(s,r,c){let g=[];const l=new Uint32Array(2);l[0]=0,l[1]=33587200;for(let a=0,d=s.length;a<d;a++){const u=s[a];l[0]=u.length;const C=new k.LineTokens(l,u,c),f=w.ViewLineRenderingData.isBasicASCII(u,!0),v=w.ViewLineRenderingData.containsRTL(u,f,!0),p=(0,D.renderViewLine2)(new D.RenderLineInput(!1,!0,u,!1,f,v,0,C,[],r,0,0,0,0,-1,"none",!1,!1,null));g=g.concat(p.html),g.push("<br/>")}return g.join("")}function i(s,r,c,g){let o=[],l=c.getInitialState();for(let a=0,d=s.length;a<d;a++){const u=s[a],C=c.tokenizeEncoded(u,!0,l);k.LineTokens.convertToEndOffset(C.tokens,u.length);const f=new k.LineTokens(C.tokens,u,g),v=w.ViewLineRenderingData.isBasicASCII(u,!0),p=w.ViewLineRenderingData.containsRTL(u,v,!0),L=(0,D.renderViewLine2)(new D.RenderLineInput(!1,!0,u,!1,v,p,0,f.inflate(),[],r,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(L.html),o.push("<br/>"),l=C.endState}return o.join("")}}),define(J[14],ee([1,0,17,9,690,8,672]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=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.expressionsAreEqualWithConstantSubstitution=e.ContextKeyExpr=e.Parser=void 0;const b=new Map;b.set("false",!1),b.set("true",!0),b.set("isMac",S.isMacintosh),b.set("isLinux",S.isLinux),b.set("isWindows",S.isWindows),b.set("isWeb",S.isWeb),b.set("isMacNative",S.isMacintosh&&!S.isWeb),b.set("isEdge",S.isEdge),b.set("isFirefox",S.isFirefox),b.set("isChrome",S.isChrome),b.set("isSafari",S.isSafari);const _=Object.prototype.hasOwnProperty,h={regexParsingWithErrorRecovery:!0},m=(0,w.localize)(0,null),n=(0,w.localize)(1,null),t=(0,w.localize)(2,null),i=(0,w.localize)(3,null),s=(0,w.localize)(4,null),r=(0,w.localize)(5,null),c=(0,w.localize)(6,null),g=(0,w.localize)(7,null);class o{constructor(H=h){this._config=H,this._scanner=new y.Scanner,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(H){if(H===""){this._parsingErrors.push({message:m,offset:0,lexeme:"",additionalInfo:n});return}this._tokens=this._scanner.reset(H).scan(),this._current=0,this._parsingErrors=[];try{const B=this._expr();if(!this._isAtEnd()){const j=this._peek(),G=j.type===17?r:void 0;throw this._parsingErrors.push({message:s,offset:j.offset,lexeme:y.Scanner.getLexeme(j),additionalInfo:G}),o._parseError}return B}catch(B){if(B!==o._parseError)throw B;return}}_expr(){return this._or()}_or(){const H=[this._and()];for(;this._matchOne(16);){const B=this._and();H.push(B)}return H.length===1?H[0]:l.or(...H)}_and(){const H=[this._term()];for(;this._matchOne(15);){const B=this._term();H.push(B)}return H.length===1?H[0]:l.and(...H)}_term(){if(this._matchOne(2)){const H=this._peek();switch(H.type){case 11:return this._advance(),u.INSTANCE;case 12:return this._advance(),C.INSTANCE;case 0:{this._advance();const B=this._expr();return this._consume(1,i),B?.negate()}case 17:return this._advance(),I.create(H.lexeme);default:throw this._errExpectedButGot("KEY | true | false | \'(\' expression \')\'",H)}}return this._primary()}_primary(){const H=this._peek();switch(H.type){case 11:return this._advance(),l.true();case 12:return this._advance(),l.false();case 0:{this._advance();const B=this._expr();return this._consume(1,i),B}case 17:{const B=H.lexeme;if(this._advance(),this._matchOne(9)){const G=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),G.type!==10)throw this._errExpectedButGot("REGEX",G);const Y=G.lexeme,ne=Y.lastIndexOf("/"),de=ne===Y.length-1?void 0:this._removeFlagsGY(Y.substring(ne+1));let he;try{he=new RegExp(Y.substring(1,ne),de)}catch{throw this._errExpectedButGot("REGEX",G)}return A.create(B,he)}switch(G.type){case 10:case 19:{const Y=[G.lexeme];this._advance();let ne=this._peek(),de=0;for(let V=0;V<G.lexeme.length;V++)G.lexeme.charCodeAt(V)===40?de++:G.lexeme.charCodeAt(V)===41&&de--;for(;!this._isAtEnd()&&ne.type!==15&&ne.type!==16;){switch(ne.type){case 0:de++;break;case 1:de--;break;case 10:case 18:for(let V=0;V<ne.lexeme.length;V++)ne.lexeme.charCodeAt(V)===40?de++:G.lexeme.charCodeAt(V)===41&&de--}if(de<0)break;Y.push(y.Scanner.getLexeme(ne)),this._advance(),ne=this._peek()}const he=Y.join(""),oe=he.lastIndexOf("/"),ce=oe===he.length-1?void 0:this._removeFlagsGY(he.substring(oe+1));let z;try{z=new RegExp(he.substring(1,oe),ce)}catch{throw this._errExpectedButGot("REGEX",G)}return l.regex(B,z)}case 18:{const Y=G.lexeme;this._advance();let ne=null;if(!(0,k.isFalsyOrWhitespace)(Y)){const de=Y.indexOf("/"),he=Y.lastIndexOf("/");if(de!==he&&de>=0){const oe=Y.slice(de+1,he),ce=Y[he+1]==="i"?"i":"";try{ne=new RegExp(oe,ce)}catch{throw this._errExpectedButGot("REGEX",G)}}}if(ne===null)throw this._errExpectedButGot("REGEX",G);return A.create(B,ne)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,t);const G=this._value();return l.notIn(B,G)}switch(this._peek().type){case 3:{this._advance();const G=this._value();if(this._previous().type===18)return l.equals(B,G);switch(G){case"true":return l.has(B);case"false":return l.not(B);default:return l.equals(B,G)}}case 4:{this._advance();const G=this._value();if(this._previous().type===18)return l.notEquals(B,G);switch(G){case"true":return l.not(B);case"false":return l.has(B);default:return l.notEquals(B,G)}}case 5:return this._advance(),M.create(B,this._value());case 6:return this._advance(),N.create(B,this._value());case 7:return this._advance(),F.create(B,this._value());case 8:return this._advance(),R.create(B,this._value());case 13:return this._advance(),l.in(B,this._value());default:return l.has(B)}}case 20:throw this._parsingErrors.push({message:c,offset:H.offset,lexeme:"",additionalInfo:g}),o._parseError;default:throw this._errExpectedButGot(`true | false | KEY \n\t| KEY \'=~\' REGEX \n\t| KEY (\'==\' | \'!=\' | \'<\' | \'<=\' | \'>\' | \'>=\' | \'in\' | \'not\' \'in\') value`,this._peek())}}_value(){const H=this._peek();switch(H.type){case 17:case 18:return this._advance(),H.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(H){return H.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(H){return this._check(H)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(H,B){if(this._check(H))return this._advance();throw this._errExpectedButGot(B,this._peek())}_errExpectedButGot(H,B,j){const G=(0,w.localize)(8,null,H,y.Scanner.getLexeme(B)),Y=B.offset,ne=y.Scanner.getLexeme(B);return this._parsingErrors.push({message:G,offset:Y,lexeme:ne,additionalInfo:j}),o._parseError}_check(H){return this._peek().type===H}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}o._parseError=new Error,e.Parser=o;class l{static false(){return u.INSTANCE}static true(){return C.INSTANCE}static has(H){return f.create(H)}static equals(H,B){return v.create(H,B)}static notEquals(H,B){return E.create(H,B)}static regex(H,B){return A.create(H,B)}static in(H,B){return p.create(H,B)}static notIn(H,B){return L.create(H,B)}static not(H){return I.create(H)}static and(...H){return W.create(H,null,!0)}static or(...H){return U.create(H,null,!0)}static deserialize(H){return H==null?void 0:this._parser.parse(H)}}l._parser=new o({regexParsingWithErrorRecovery:!1}),e.ContextKeyExpr=l;function a(re,H){const B=re?re.substituteConstants():void 0,j=H?H.substituteConstants():void 0;return!B&&!j?!0:!B||!j?!1:B.equals(j)}e.expressionsAreEqualWithConstantSubstitution=a;function d(re,H){return re.cmp(H)}class u{constructor(){this.type=0}cmp(H){return this.type-H.type}equals(H){return H.type===this.type}substituteConstants(){return this}evaluate(H){return!1}serialize(){return"false"}keys(){return[]}negate(){return C.INSTANCE}}u.INSTANCE=new u,e.ContextKeyFalseExpr=u;class C{constructor(){this.type=1}cmp(H){return this.type-H.type}equals(H){return H.type===this.type}substituteConstants(){return this}evaluate(H){return!0}serialize(){return"true"}keys(){return[]}negate(){return u.INSTANCE}}C.INSTANCE=new C,e.ContextKeyTrueExpr=C;class f{static create(H,B=null){const j=b.get(H);return typeof j=="boolean"?j?C.INSTANCE:u.INSTANCE:new f(H,B)}constructor(H,B){this.key=H,this.negated=B,this.type=2}cmp(H){return H.type!==this.type?this.type-H.type:$(this.key,H.key)}equals(H){return H.type===this.type?this.key===H.key:!1}substituteConstants(){const H=b.get(this.key);return typeof H=="boolean"?H?C.INSTANCE:u.INSTANCE:this}evaluate(H){return!!H.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=f;class v{static create(H,B,j=null){if(typeof B=="boolean")return B?f.create(H,j):I.create(H,j);const G=b.get(H);return typeof G=="boolean"?B===(G?"true":"false")?C.INSTANCE:u.INSTANCE:new v(H,B,j)}constructor(H,B,j){this.key=H,this.value=B,this.negated=j,this.type=4}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){const H=b.get(this.key);if(typeof H=="boolean"){const B=H?"true":"false";return this.value===B?C.INSTANCE:u.INSTANCE}return this}evaluate(H){return H.getValue(this.key)==this.value}serialize(){return`${this.key} == \'${this.value}\'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=v;class p{static create(H,B){return new p(H,B)}constructor(H,B){this.key=H,this.valueKey=B,this.type=10,this.negated=null}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.valueKey,H.key,H.valueKey)}equals(H){return H.type===this.type?this.key===H.key&&this.valueKey===H.valueKey:!1}substituteConstants(){return this}evaluate(H){const B=H.getValue(this.valueKey),j=H.getValue(this.key);return Array.isArray(B)?B.includes(j):typeof j=="string"&&typeof B=="object"&&B!==null?_.call(B,j):!1}serialize(){return`${this.key} in \'${this.valueKey}\'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=L.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=p;class L{static create(H,B){return new L(H,B)}constructor(H,B){this.key=H,this.valueKey=B,this.type=11,this._negated=p.create(H,B)}cmp(H){return H.type!==this.type?this.type-H.type:this._negated.cmp(H._negated)}equals(H){return H.type===this.type?this._negated.equals(H._negated):!1}substituteConstants(){return this}evaluate(H){return!this._negated.evaluate(H)}serialize(){return`${this.key} not in \'${this.valueKey}\'`}keys(){return this._negated.keys()}negate(){return this._negated}}e.ContextKeyNotInExpr=L;class E{static create(H,B,j=null){if(typeof B=="boolean")return B?I.create(H,j):f.create(H,j);const G=b.get(H);return typeof G=="boolean"?B===(G?"true":"false")?u.INSTANCE:C.INSTANCE:new E(H,B,j)}constructor(H,B,j){this.key=H,this.value=B,this.negated=j,this.type=5}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){const H=b.get(this.key);if(typeof H=="boolean"){const B=H?"true":"false";return this.value===B?u.INSTANCE:C.INSTANCE}return this}evaluate(H){return H.getValue(this.key)!=this.value}serialize(){return`${this.key} != \'${this.value}\'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=E;class I{static create(H,B=null){const j=b.get(H);return typeof j=="boolean"?j?u.INSTANCE:C.INSTANCE:new I(H,B)}constructor(H,B){this.key=H,this.negated=B,this.type=3}cmp(H){return H.type!==this.type?this.type-H.type:$(this.key,H.key)}equals(H){return H.type===this.type?this.key===H.key:!1}substituteConstants(){const H=b.get(this.key);return typeof H=="boolean"?H?u.INSTANCE:C.INSTANCE:this}evaluate(H){return!H.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=I;function T(re,H){if(typeof re=="string"){const B=parseFloat(re);isNaN(B)||(re=B)}return typeof re=="string"||typeof re=="number"?H(re):u.INSTANCE}class F{static create(H,B,j=null){return T(B,G=>new F(H,G,j))}constructor(H,B,j){this.key=H,this.value=B,this.negated=j,this.type=12}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){return this}evaluate(H){return typeof this.value=="string"?!1:parseFloat(H.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=F;class R{static create(H,B,j=null){return T(B,G=>new R(H,G,j))}constructor(H,B,j){this.key=H,this.value=B,this.negated=j,this.type=13}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){return this}evaluate(H){return typeof this.value=="string"?!1:parseFloat(H.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=R;class M{static create(H,B,j=null){return T(B,G=>new M(H,G,j))}constructor(H,B,j){this.key=H,this.value=B,this.negated=j,this.type=14}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){return this}evaluate(H){return typeof this.value=="string"?!1:parseFloat(H.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=M;class N{static create(H,B,j=null){return T(B,G=>new N(H,G,j))}constructor(H,B,j){this.key=H,this.value=B,this.negated=j,this.type=15}cmp(H){return H.type!==this.type?this.type-H.type:Q(this.key,this.value,H.key,H.value)}equals(H){return H.type===this.type?this.key===H.key&&this.value===H.value:!1}substituteConstants(){return this}evaluate(H){return typeof this.value=="string"?!1:parseFloat(H.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=F.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=N;class A{static create(H,B){return new A(H,B)}constructor(H,B){this.key=H,this.regexp=B,this.type=7,this.negated=null}cmp(H){if(H.type!==this.type)return this.type-H.type;if(this.key<H.key)return-1;if(this.key>H.key)return 1;const B=this.regexp?this.regexp.source:"",j=H.regexp?H.regexp.source:"";return B<j?-1:B>j?1:0}equals(H){if(H.type===this.type){const B=this.regexp?this.regexp.source:"",j=H.regexp?H.regexp.source:"";return this.key===H.key&&B===j}return!1}substituteConstants(){return this}evaluate(H){const B=H.getValue(this.key);return this.regexp?this.regexp.test(B):!1}serialize(){const H=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${H}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this)),this.negated}}e.ContextKeyRegexExpr=A;class P{static create(H){return new P(H)}constructor(H){this._actual=H,this.type=8}cmp(H){return H.type!==this.type?this.type-H.type:this._actual.cmp(H._actual)}equals(H){return H.type===this.type?this._actual.equals(H._actual):!1}substituteConstants(){return this}evaluate(H){return!this._actual.evaluate(H)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=P;function x(re){let H=null;for(let B=0,j=re.length;B<j;B++){const G=re[B].substituteConstants();if(re[B]!==G&&H===null){H=[];for(let Y=0;Y<B;Y++)H[Y]=re[Y]}H!==null&&(H[B]=G)}return H===null?re:H}class W{static create(H,B,j){return W._normalizeArr(H,B,j)}constructor(H,B){this.expr=H,this.negated=B,this.type=6}cmp(H){if(H.type!==this.type)return this.type-H.type;if(this.expr.length<H.expr.length)return-1;if(this.expr.length>H.expr.length)return 1;for(let B=0,j=this.expr.length;B<j;B++){const G=d(this.expr[B],H.expr[B]);if(G!==0)return G}return 0}equals(H){if(H.type===this.type){if(this.expr.length!==H.expr.length)return!1;for(let B=0,j=this.expr.length;B<j;B++)if(!this.expr[B].equals(H.expr[B]))return!1;return!0}return!1}substituteConstants(){const H=x(this.expr);return H===this.expr?this:W.create(H,this.negated,!1)}evaluate(H){for(let B=0,j=this.expr.length;B<j;B++)if(!this.expr[B].evaluate(H))return!1;return!0}static _normalizeArr(H,B,j){const G=[];let Y=!1;for(const ne of H)if(ne){if(ne.type===1){Y=!0;continue}if(ne.type===0)return u.INSTANCE;if(ne.type===6){G.push(...ne.expr);continue}G.push(ne)}if(G.length===0&&Y)return C.INSTANCE;if(G.length!==0){if(G.length===1)return G[0];G.sort(d);for(let ne=1;ne<G.length;ne++)G[ne-1].equals(G[ne])&&(G.splice(ne,1),ne--);if(G.length===1)return G[0];for(;G.length>1;){const ne=G[G.length-1];if(ne.type!==9)break;G.pop();const de=G.pop(),he=G.length===0,oe=U.create(ne.expr.map(ce=>W.create([ce,de],null,j)),null,he);oe&&(G.push(oe),G.sort(d))}if(G.length===1)return G[0];if(j){for(let ne=0;ne<G.length;ne++)for(let de=ne+1;de<G.length;de++)if(G[ne].negate().equals(G[de]))return u.INSTANCE;if(G.length===1)return G[0]}return new W(G,B)}}serialize(){return this.expr.map(H=>H.serialize()).join(" && ")}keys(){const H=[];for(const B of this.expr)H.push(...B.keys());return H}negate(){if(!this.negated){const H=[];for(const B of this.expr)H.push(B.negate());this.negated=U.create(H,this,!0)}return this.negated}}e.ContextKeyAndExpr=W;class U{static create(H,B,j){return U._normalizeArr(H,B,j)}constructor(H,B){this.expr=H,this.negated=B,this.type=9}cmp(H){if(H.type!==this.type)return this.type-H.type;if(this.expr.length<H.expr.length)return-1;if(this.expr.length>H.expr.length)return 1;for(let B=0,j=this.expr.length;B<j;B++){const G=d(this.expr[B],H.expr[B]);if(G!==0)return G}return 0}equals(H){if(H.type===this.type){if(this.expr.length!==H.expr.length)return!1;for(let B=0,j=this.expr.length;B<j;B++)if(!this.expr[B].equals(H.expr[B]))return!1;return!0}return!1}substituteConstants(){const H=x(this.expr);return H===this.expr?this:U.create(H,this.negated,!1)}evaluate(H){for(let B=0,j=this.expr.length;B<j;B++)if(this.expr[B].evaluate(H))return!0;return!1}static _normalizeArr(H,B,j){let G=[],Y=!1;if(H){for(let ne=0,de=H.length;ne<de;ne++){const he=H[ne];if(he){if(he.type===0){Y=!0;continue}if(he.type===1)return C.INSTANCE;if(he.type===9){G=G.concat(he.expr);continue}G.push(he)}}if(G.length===0&&Y)return u.INSTANCE;G.sort(d)}if(G.length!==0){if(G.length===1)return G[0];for(let ne=1;ne<G.length;ne++)G[ne-1].equals(G[ne])&&(G.splice(ne,1),ne--);if(G.length===1)return G[0];if(j){for(let ne=0;ne<G.length;ne++)for(let de=ne+1;de<G.length;de++)if(G[ne].negate().equals(G[de]))return C.INSTANCE;if(G.length===1)return G[0]}return new U(G,B)}}serialize(){return this.expr.map(H=>H.serialize()).join(" || ")}keys(){const H=[];for(const B of this.expr)H.push(...B.keys());return H}negate(){if(!this.negated){const H=[];for(const B of this.expr)H.push(B.negate());for(;H.length>1;){const B=H.shift(),j=H.shift(),G=[];for(const Y of te(B))for(const ne of te(j))G.push(W.create([Y,ne],null,!1));H.unshift(U.create(G,null,!1))}this.negated=U.create(H,this,!0)}return this.negated}}e.ContextKeyOrExpr=U;class O extends f{static all(){return O._info.values()}constructor(H,B,j){super(H,null),this._defaultValue=B,typeof j=="object"?O._info.push(Object.assign(Object.assign({},j),{key:H})):j!==!0&&O._info.push({key:H,description:j,type:B!=null?typeof B:void 0})}bindTo(H){return H.createKey(this.key,this._defaultValue)}getValue(H){return H.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(H){return v.create(this.key,H)}}O._info=[],e.RawContextKey=O,e.IContextKeyService=(0,D.createDecorator)("contextKeyService");function $(re,H){return re<H?-1:re>H?1:0}function Q(re,H,B,j){return re<B?-1:re>B?1:H<j?-1:H>j?1:0}function se(re,H){if(re.type===0||H.type===1)return!0;if(re.type===9)return H.type===9?le(re.expr,H.expr):!1;if(H.type===9){for(const B of H.expr)if(se(re,B))return!0;return!1}if(re.type===6){if(H.type===6)return le(H.expr,re.expr);for(const B of re.expr)if(se(B,H))return!0;return!1}return re.equals(H)}e.implies=se;function le(re,H){let B=0,j=0;for(;B<re.length&&j<H.length;){const G=re[B].cmp(H[j]);if(G<0)return!1;G===0&&B++,j++}return B===re.length}function te(re){return re.type===9?re.expr:[re]}}),define(J[22],ee([1,0,581,14]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var y;(function(D){D.editorSimpleInput=new k.RawContextKey("editorSimpleInput",!1,!0),D.editorTextFocus=new k.RawContextKey("editorTextFocus",!1,S.localize(0,null)),D.focus=new k.RawContextKey("editorFocus",!1,S.localize(1,null)),D.textInputFocus=new k.RawContextKey("textInputFocus",!1,S.localize(2,null)),D.readOnly=new k.RawContextKey("editorReadonly",!1,S.localize(3,null)),D.inDiffEditor=new k.RawContextKey("inDiffEditor",!1,S.localize(4,null)),D.columnSelection=new k.RawContextKey("editorColumnSelection",!1,S.localize(5,null)),D.writable=D.readOnly.toNegated(),D.hasNonEmptySelection=new k.RawContextKey("editorHasSelection",!1,S.localize(6,null)),D.hasOnlyEmptySelection=D.hasNonEmptySelection.toNegated(),D.hasMultipleSelections=new k.RawContextKey("editorHasMultipleSelections",!1,S.localize(7,null)),D.hasSingleSelection=D.hasMultipleSelections.toNegated(),D.tabMovesFocus=new k.RawContextKey("editorTabMovesFocus",!1,S.localize(8,null)),D.tabDoesNotMoveFocus=D.tabMovesFocus.toNegated(),D.isInWalkThroughSnippet=new k.RawContextKey("isInEmbeddedEditor",!1,!0),D.canUndo=new k.RawContextKey("canUndo",!1,!0),D.canRedo=new k.RawContextKey("canRedo",!1,!0),D.hoverVisible=new k.RawContextKey("editorHoverVisible",!1,S.localize(9,null)),D.hoverFocused=new k.RawContextKey("editorHoverFocused",!1,S.localize(10,null)),D.stickyScrollFocused=new k.RawContextKey("stickyScrollFocused",!1,S.localize(11,null)),D.stickyScrollVisible=new k.RawContextKey("stickyScrollVisible",!1,S.localize(12,null)),D.inCompositeEditor=new k.RawContextKey("inCompositeEditor",void 0,S.localize(13,null)),D.notInCompositeEditor=D.inCompositeEditor.toNegated(),D.languageId=new k.RawContextKey("editorLangId","",S.localize(14,null)),D.hasCompletionItemProvider=new k.RawContextKey("editorHasCompletionItemProvider",!1,S.localize(15,null)),D.hasCodeActionsProvider=new k.RawContextKey("editorHasCodeActionsProvider",!1,S.localize(16,null)),D.hasCodeLensProvider=new k.RawContextKey("editorHasCodeLensProvider",!1,S.localize(17,null)),D.hasDefinitionProvider=new k.RawContextKey("editorHasDefinitionProvider",!1,S.localize(18,null)),D.hasDeclarationProvider=new k.RawContextKey("editorHasDeclarationProvider",!1,S.localize(19,null)),D.hasImplementationProvider=new k.RawContextKey("editorHasImplementationProvider",!1,S.localize(20,null)),D.hasTypeDefinitionProvider=new k.RawContextKey("editorHasTypeDefinitionProvider",!1,S.localize(21,null)),D.hasHoverProvider=new k.RawContextKey("editorHasHoverProvider",!1,S.localize(22,null)),D.hasDocumentHighlightProvider=new k.RawContextKey("editorHasDocumentHighlightProvider",!1,S.localize(23,null)),D.hasDocumentSymbolProvider=new k.RawContextKey("editorHasDocumentSymbolProvider",!1,S.localize(24,null)),D.hasReferenceProvider=new k.RawContextKey("editorHasReferenceProvider",!1,S.localize(25,null)),D.hasRenameProvider=new k.RawContextKey("editorHasRenameProvider",!1,S.localize(26,null)),D.hasSignatureHelpProvider=new k.RawContextKey("editorHasSignatureHelpProvider",!1,S.localize(27,null)),D.hasInlayHintsProvider=new k.RawContextKey("editorHasInlayHintsProvider",!1,S.localize(28,null)),D.hasDocumentFormattingProvider=new k.RawContextKey("editorHasDocumentFormattingProvider",!1,S.localize(29,null)),D.hasDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,S.localize(30,null)),D.hasMultipleDocumentFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,S.localize(31,null)),D.hasMultipleDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,S.localize(32,null))})(y=e.EditorContextKeys||(e.EditorContextKeys={}))}),define(J[225],ee([1,0,21,11,18,20,13,26,19,61,25,14]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new n.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new n.RawContextKey("parameterHintsMultipleSignatures",!1)};function t(i,s,r,c,g){return Ee(this,void 0,void 0,function*(){const o=i.ordered(s);for(const l of o)try{const a=yield l.provideSignatureHelp(s,r,g,c);if(a)return a}catch(a){(0,k.onUnexpectedExternalError)(a)}})}e.provideSignatureHelp=t,m.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",(i,...s)=>Ee(void 0,void 0,void 0,function*(){const[r,c,g]=s;(0,y.assertType)(D.URI.isUri(r)),(0,y.assertType)(w.Position.isIPosition(c)),(0,y.assertType)(typeof g=="string"||!g);const o=i.get(_.ILanguageFeaturesService),l=yield i.get(h.ITextModelService).createModelReference(r);try{const a=yield t(o.signatureHelpProvider,l.object.textEditorModel,w.Position.lift(c),{triggerKind:b.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:g},S.CancellationToken.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{l.dispose()}}))}),define(J[700],ee([1,0,12,11,6,2,115,26,225]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var h;(function(t){t.Default={type:0};class i{constructor(c,g){this.request=c,this.previouslyActiveHints=g,this.type=2}}t.Pending=i;class s{constructor(c){this.hints=c,this.type=1}}t.Active=s})(h||(h={}));class m extends D.Disposable{constructor(i,s,r=m.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new y.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=h.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new D.MutableDisposable),this.triggerChars=new w.CharacterSet,this.retriggerChars=new w.CharacterSet,this.triggerId=0,this.editor=i,this.providers=s,this.throttledDelayer=new S.Delayer(r),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(c=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(c=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(c=>this.onCursorChange(c))),this._register(this.editor.onDidChangeModelContent(c=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(c=>this.onDidType(c))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(i){this._state.type===2&&this._state.request.cancel(),this._state=i}cancel(i=!1){this.state=h.Default,this.throttledDelayer.cancel(),i||this._onChangedHints.fire(void 0)}trigger(i,s){const r=this.editor.getModel();if(!r||!this.providers.has(r))return;const c=++this.triggerId;this._pendingTriggers.push(i),this.throttledDelayer.trigger(()=>this.doTrigger(c),s).catch(k.onUnexpectedError)}next(){if(this.state.type!==1)return;const i=this.state.hints.signatures.length,s=this.state.hints.activeSignature,r=s%i===i-1,c=this.editor.getOption(82).cycle;if((i<2||r)&&!c){this.cancel();return}this.updateActiveSignature(r&&c?0:s+1)}previous(){if(this.state.type!==1)return;const i=this.state.hints.signatures.length,s=this.state.hints.activeSignature,r=s===0,c=this.editor.getOption(82).cycle;if((i<2||r)&&!c){this.cancel();return}this.updateActiveSignature(r&&c?i-1:s-1)}updateActiveSignature(i){this.state.type===1&&(this.state=new h.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:i})),this._onChangedHints.fire(this.state.hints))}doTrigger(i){return Ee(this,void 0,void 0,function*(){const s=this.state.type===1||this.state.type===2,r=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const c=this._pendingTriggers.reduce(n);this._pendingTriggers=[];const g={triggerKind:c.triggerKind,triggerCharacter:c.triggerCharacter,isRetrigger:s,activeSignatureHelp:r};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),l=this.editor.getPosition();this.state=new h.Pending((0,S.createCancelablePromise)(a=>(0,_.provideSignatureHelp)(this.providers,o,l,g,a)),r);try{const a=yield this.state.request;return i!==this.triggerId?(a?.dispose(),!1):!a||!a.value.signatures||a.value.signatures.length===0?(a?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new h.Active(a.value),this._lastSignatureHelpResult.value=a,this._onChangedHints.fire(this.state.hints),!0)}catch(a){return i===this.triggerId&&(this.state=h.Default),(0,k.onUnexpectedError)(a),!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.clear(),this.retriggerChars.clear();const i=this.editor.getModel();if(i)for(const s of this.providers.ordered(i)){for(const r of s.signatureHelpTriggerCharacters||[])if(r.length){const c=r.charCodeAt(0);this.triggerChars.add(c),this.retriggerChars.add(c)}for(const r of s.signatureHelpRetriggerCharacters||[])r.length&&this.retriggerChars.add(r.charCodeAt(0))}}onDidType(i){if(!this.triggerOnType)return;const s=i.length-1,r=i.charCodeAt(s);(this.triggerChars.has(r)||this.isTriggered&&this.retriggerChars.has(r))&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:i.charAt(s)})}onCursorChange(i){i.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(82).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}m.DEFAULT_DELAY=120,e.ParameterHintsModel=m;function n(t,i){switch(i.triggerKind){case b.SignatureHelpTriggerKind.Invoke:return i;case b.SignatureHelpTriggerKind.ContentChange:return t;case b.SignatureHelpTriggerKind.TriggerCharacter:default:return i}}}),define(J[701],ee([1,0,14]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let k=class qt{constructor(D,w){this._editor=D,this._index=0,this._ckOtherSuggestions=qt.OtherSuggestions.bindTo(w)}dispose(){this.reset()}reset(){var D;this._ckOtherSuggestions.reset(),(D=this._listener)===null||D===void 0||D.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:D,index:w},b){if(D.items.length===0){this.reset();return}if(qt._moveIndex(!0,D,w)===w){this.reset();return}this._acceptNext=b,this._model=D,this._index=w,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(D,w,b){let _=b;for(let h=w.items.length;h>0&&(_=(_+w.items.length+(D?1:-1))%w.items.length,!(_===b||!w.items[_].completion.additionalTextEdits));h--);return _}next(){this._move(!0)}prev(){this._move(!1)}_move(D){if(this._model)try{this._ignore=!0,this._index=qt._moveIndex(D,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};k.OtherSuggestions=new S.RawContextKey("hasOtherSuggestions",!1),k=Ne([fe(1,S.IContextKeyService)],k),e.SuggestAlternatives=k}),define(J[702],ee([1,0,14]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let k=class Ai{constructor(D,w){this._editor=D,this._enabled=!1,this._ckAtEnd=Ai.AtEnd.bindTo(w),this._configListener=this._editor.onDidChangeConfiguration(b=>b.hasChanged(118)&&this._update()),this._update()}dispose(){var D;this._configListener.dispose(),(D=this._selectionListener)===null||D===void 0||D.dispose(),this._ckAtEnd.reset()}_update(){const D=this._editor.getOption(118)==="on";if(this._enabled!==D)if(this._enabled=D,this._enabled){const w=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const b=this._editor.getModel(),_=this._editor.getSelection(),h=b.getWordAtPosition(_.getStartPosition());if(!h){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(h.endColumn===_.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(w),w()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};k.AtEnd=new S.RawContextKey("atEndOfWord",!1),k=Ne([fe(1,S.IContextKeyService)],k),e.WordContextKey=k}),define(J[88],ee([1,0,14,8]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,k.createDecorator)("accessibilityService"),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new S.RawContextKey("accessibilityModeEnabled",!1)}),define(J[703],ee([1,0,46,16,6,2,45,17,293,301,443,215,40,144,221,88]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let c=class extends D.Disposable{constructor(f,v,p,L){super(),this._accessibilityService=L,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new y.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new t.ComputeOptionsMemory,this.isSimpleWidget=f,this._containerObserver=this._register(new _.ElementSizeObserver(p,v.dimension)),this._rawOptions=u(v),this._validatedOptions=d.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(11)&&this._containerObserver.startObserving(),this._register(i.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(n.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(h.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(S.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const f=this._computeOptions(),v=d.checkEquals(this.options,f);v!==null&&(this.options=f,this._onDidChangeFast.fire(v),this._onDidChange.fire(v))}_computeOptions(){const f=this._readEnvConfiguration(),v=s.BareFontInfo.createFromValidatedSettings(this._validatedOptions,f.pixelRatio,this.isSimpleWidget),p=this._readFontInfo(v),L={memory:this._computeOptionsMemory,outerWidth:f.outerWidth,outerHeight:f.outerHeight-this._reservedHeight,fontInfo:p,extraEditorClassName:f.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:f.emptySelectionClipboard,pixelRatio:f.pixelRatio,tabFocusMode:n.TabFocus.getTabFocusMode("editorFocus"),accessibilitySupport:f.accessibilitySupport};return d.computeOptions(this._validatedOptions,L)}_readEnvConfiguration(){return{extraEditorClassName:o(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:S.isWebKit||S.isFirefox,pixelRatio:S.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(f){return h.FontMeasurements.readFontInfo(f)}getRawOptions(){return this._rawOptions}updateOptions(f){const v=u(f);d.applyUpdate(this._rawOptions,v)&&(this._validatedOptions=d.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(f){this._containerObserver.observe(f)}setIsDominatedByLongLines(f){this._isDominatedByLongLines!==f&&(this._isDominatedByLongLines=f,this._recomputeOptions())}setModelLineCount(f){const v=g(f);this._lineNumbersDigitCount!==v&&(this._lineNumbersDigitCount=v,this._recomputeOptions())}setViewLineCount(f){this._viewLineCount!==f&&(this._viewLineCount=f,this._recomputeOptions())}setReservedHeight(f){this._reservedHeight!==f&&(this._reservedHeight=f,this._recomputeOptions())}};c=Ne([fe(3,r.IAccessibilityService)],c),e.EditorConfiguration=c;function g(C){let f=0;for(;C;)C=Math.floor(C/10),f++;return f||1}function o(){let C="";return!S.isSafari&&!S.isWebkitWebView&&(C+="no-user-select "),S.isSafari&&(C+="no-minimap-shadow ",C+="enable-user-select "),b.isMacintosh&&(C+="mac "),C}class l{constructor(){this._values=[]}_read(f){return this._values[f]}get(f){return this._values[f]}_write(f,v){this._values[f]=v}}class a{constructor(){this._values=[]}_read(f){if(f>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[f]}get(f){return this._read(f)}_write(f,v){this._values[f]=v}}e.ComputedEditorOptions=a;class d{static validateOptions(f){const v=new l;for(const p of t.editorOptionsRegistry){const L=p.name==="_never_"?void 0:f[p.name];v._write(p.id,p.validate(L))}return v}static computeOptions(f,v){const p=new a;for(const L of t.editorOptionsRegistry)p._write(L.id,L.compute(v,p,f._read(L.id)));return p}static _deepEquals(f,v){if(typeof f!="object"||typeof v!="object"||!f||!v)return f===v;if(Array.isArray(f)||Array.isArray(v))return Array.isArray(f)&&Array.isArray(v)?k.equals(f,v):!1;if(Object.keys(f).length!==Object.keys(v).length)return!1;for(const p in f)if(!d._deepEquals(f[p],v[p]))return!1;return!0}static checkEquals(f,v){const p=[];let L=!1;for(const E of t.editorOptionsRegistry){const I=!d._deepEquals(f._read(E.id),v._read(E.id));p[E.id]=I,I&&(L=!0)}return L?new t.ConfigurationChangedEvent(p):null}static applyUpdate(f,v){let p=!1;for(const L of t.editorOptionsRegistry)if(v.hasOwnProperty(L.name)){const E=L.applyUpdate(f[L.name],v[L.name]);f[L.name]=E.newValue,p=p||E.didChange}return p}}function u(C){const f=w.deepClone(C);return(0,m.migrateOptions)(f),f}}),define(J[309],ee([1,0,84,6,2,45,5,177,30,88]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const m={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0,findResultLoop:!0};let n=class extends y.Disposable{constructor(i,s={},r,c,g){super(),this._audioCueService=r,this._codeEditorService=c,this._accessibilityService=g,this._onDidUpdate=this._register(new k.Emitter),this._editor=i,this._options=D.mixin(s,m,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=!!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._updateAccessibilityState(o.position.lineNumber),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(i){this.ranges=[],i&&i.forEach(s=>{!this._options.ignoreCharChanges&&s.charChanges?s.charChanges.forEach(r=>{this.ranges.push({rhs:!0,range:new w.Range(r.modifiedStartLineNumber,r.modifiedStartColumn,r.modifiedEndLineNumber,r.modifiedEndColumn)})}):s.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new w.Range(s.modifiedStartLineNumber,1,s.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new w.Range(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber+1,1)})}),this.ranges.sort((s,r)=>w.Range.compareRangesUsingStarts(s.range,r.range)),this._onDidUpdate.fire(this)}_initIdx(i){let s=!1;const r=this._editor.getPosition();if(!r){this.nextIdx=0;return}for(let c=0,g=this.ranges.length;c<g&&!s;c++){const o=this.ranges[c].range;r.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=c+(i?0:-1),s=!0)}s||(this.nextIdx=i?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(i,s){if(S.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(i):i?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const r=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const c=r.range.getStartPosition();this._editor.setPosition(c),this._editor.revealRangeInCenter(r.range,s),this._updateAccessibilityState(c.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(i,s){var r;const c=(r=this._editor.getModel())===null||r===void 0?void 0:r.modified;if(!c)return;const g=c.getLineDecorations(i).find(l=>l.options.className==="line-insert");if(g)this._audioCueService.playAudioCue(b.AudioCue.diffLineModified,!0);else if(s)this._audioCueService.playAudioCue(b.AudioCue.diffLineDeleted,!0);else return;const o=this._codeEditorService.getActiveCodeEditor();s&&o&&g&&this._accessibilityService.isScreenReaderOptimized()&&(o.setSelection({startLineNumber:i,startColumn:0,endLineNumber:i,endColumn:Number.MAX_VALUE}),o.writeScreenReaderContent("diff-navigation"))}canNavigate(){return this.ranges&&this.ranges.length>0}next(i=0){this.canNavigateNext()&&this._move(!0,i)}previous(i=0){this.canNavigatePrevious()&&this._move(!1,i)}canNavigateNext(){return this.canNavigateLoop()||this.nextIdx<this.ranges.length-1}canNavigatePrevious(){return this.canNavigateLoop()||this.nextIdx!==0}canNavigateLoop(){return!!this._options.findResultLoop}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}};n=Ne([fe(2,b.IAudioCueService),fe(3,_.ICodeEditorService),fe(4,h.IAccessibilityService)],n),e.DiffNavigator=n}),define(J[704],ee([1,0,6,54,2,45,185,20,671,25,27,14]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setContext=e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const t="data-keybinding-context";class i{constructor(E,I){this._id=E,this._parent=I,this._value=Object.create(null),this._value._contextId=E}get value(){return Object.assign({},this._value)}setValue(E,I){return this._value[E]!==I?(this._value[E]=I,!0):!1}removeValue(E){return E in this._value?(delete this._value[E],!0):!1}getValue(E){const I=this._value[E];return typeof I>"u"&&this._parent?this._parent.getValue(E):I}}e.Context=i;class s extends i{constructor(){super(-1,null)}setValue(E,I){return!1}removeValue(E){return!1}getValue(E){}}s.INSTANCE=new s;class r extends i{constructor(E,I,T){super(E,null),this._configurationService=I,this._values=w.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(F=>{if(F.source===7){const R=Array.from(this._values,([M])=>M);this._values.clear(),T.fire(new o(R))}else{const R=[];for(const M of F.affectedKeys){const N=`config.${M}`,A=this._values.findSuperstr(N);A!==void 0&&(R.push(...k.Iterable.map(A,([P])=>P)),this._values.deleteSuperstr(N)),this._values.has(N)&&(R.push(N),this._values.delete(N))}T.fire(new o(R))}})}dispose(){this._listener.dispose()}getValue(E){if(E.indexOf(r._keyPrefix)!==0)return super.getValue(E);if(this._values.has(E))return this._values.get(E);const I=E.substr(r._keyPrefix.length),T=this._configurationService.getValue(I);let F;switch(typeof T){case"number":case"boolean":case"string":F=T;break;default:Array.isArray(T)?F=JSON.stringify(T):F=T}return this._values.set(E,F),F}setValue(E,I){return super.setValue(E,I)}removeValue(E){return super.removeValue(E)}}r._keyPrefix="config.";class c{constructor(E,I,T){this._service=E,this._key=I,this._defaultValue=T,this.reset()}set(E){this._service.setContext(this._key,E)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class g{constructor(E){this.key=E}affectsSome(E){return E.has(this.key)}allKeysContainedIn(E){return this.affectsSome(E)}}class o{constructor(E){this.keys=E}affectsSome(E){for(const I of this.keys)if(E.has(I))return!0;return!1}allKeysContainedIn(E){return this.keys.every(I=>E.has(I))}}class l{constructor(E){this.events=E}affectsSome(E){for(const I of this.events)if(I.affectsSome(E))return!0;return!1}allKeysContainedIn(E){return this.events.every(I=>I.allKeysContainedIn(E))}}function a(L,E){return L.allKeysContainedIn(new Set(Object.keys(E)))}class d{constructor(E){this._onDidChangeContext=new S.PauseableEmitter({merge:I=>new l(I)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=E}createKey(E,I){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new c(this,E,I)}bufferChangeEvents(E){this._onDidChangeContext.pause();try{E()}finally{this._onDidChangeContext.resume()}}createScoped(E){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new C(this,E)}contextMatchesRules(E){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const I=this.getContextValuesContainer(this._myContextId);return E?E.evaluate(I):!0}getContextKeyValue(E){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(E)}setContext(E,I){if(this._isDisposed)return;const T=this.getContextValuesContainer(this._myContextId);T&&T.setValue(E,I)&&this._onDidChangeContext.fire(new g(E))}removeContext(E){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(E)&&this._onDidChangeContext.fire(new g(E))}getContext(E){return this._isDisposed?s.INSTANCE:this.getContextValuesContainer(f(E))}}e.AbstractContextKeyService=d;let u=class extends d{constructor(E){super(0),this._contexts=new Map,this._toDispose=new y.DisposableStore,this._lastContextId=0;const I=new r(this._myContextId,E,this._onDidChangeContext);this._contexts.set(this._myContextId,I),this._toDispose.add(I)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(E){return this._isDisposed?s.INSTANCE:this._contexts.get(E)||s.INSTANCE}createChildContext(E=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const I=++this._lastContextId;return this._contexts.set(I,new i(I,this.getContextValuesContainer(E))),I}disposeContext(E){this._isDisposed||this._contexts.delete(E)}};u=Ne([fe(0,m.IConfigurationService)],u),e.ContextKeyService=u;class C extends d{constructor(E,I){if(super(E.createChildContext()),this._parentChangeListener=new y.MutableDisposable,this._parent=E,this._updateParentChangeListener(),this._domNode=I,this._domNode.hasAttribute(t)){let T="";this._domNode.classList&&(T=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${T?": "+T:""}`)}this._domNode.setAttribute(t,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(E=>{const T=this._parent.getContextValuesContainer(this._myContextId).value;a(E,T)||this._onDidChangeContext.fire(E)})}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(t),this._isDisposed=!0)}getContextValuesContainer(E){return this._isDisposed?s.INSTANCE:this._parent.getContextValuesContainer(E)}createChildContext(E=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(E)}disposeContext(E){this._isDisposed||this._parent.disposeContext(E)}}function f(L){for(;L;){if(L.hasAttribute(t)){const E=L.getAttribute(t);return E?parseInt(E,10):NaN}L=L.parentElement}return 0}function v(L,E,I){L.get(n.IContextKeyService).createKey(String(E),p(I))}e.setContext=v;function p(L){return(0,D.cloneAndChange)(L,E=>{if(typeof E=="object"&&E.$mid===1)return b.URI.revive(E).toString();if(E instanceof b.URI)return E.toString()})}h.CommandsRegistry.registerCommand("_setContext",v),h.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...n.RawContextKey.all()].sort((L,E)=>L.key.localeCompare(E.key))},description:{description:(0,_.localize)(0,null),args:[]}}),h.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const L=[],E=new Set;for(const I of n.RawContextKey.all())E.has(I.key)||(E.add(I.key),L.push(I));L.sort((I,T)=>I.key.localeCompare(T.key)),console.log(JSON.stringify(L,void 0,2))})}),define(J[310],ee([1,0,17,673,14]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.ProductQualityContext=e.IsDevelopmentContext=e.IsMobileContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new y.RawContextKey("isMac",S.isMacintosh,(0,k.localize)(0,null)),e.IsLinuxContext=new y.RawContextKey("isLinux",S.isLinux,(0,k.localize)(1,null)),e.IsWindowsContext=new y.RawContextKey("isWindows",S.isWindows,(0,k.localize)(2,null)),e.IsWebContext=new y.RawContextKey("isWeb",S.isWeb,(0,k.localize)(3,null)),e.IsMacNativeContext=new y.RawContextKey("isMacNative",S.isMacintosh&&!S.isWeb,(0,k.localize)(4,null)),e.IsIOSContext=new y.RawContextKey("isIOS",S.isIOS,(0,k.localize)(5,null)),e.IsMobileContext=new y.RawContextKey("isMobile",S.isMobile,(0,k.localize)(6,null)),e.IsDevelopmentContext=new y.RawContextKey("isDevelopment",!1,!0),e.ProductQualityContext=new y.RawContextKey("productQualityType","",(0,k.localize)(7,null)),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new y.RawContextKey(e.InputFocusedContextKey,!1,(0,k.localize)(8,null))}),define(J[57],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,S.createDecorator)("contextViewService"),e.IContextMenuService=(0,S.createDecorator)("contextMenuService")}),define(J[148],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,S.createDecorator)("dialogService")}),define(J[178],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class S{constructor(...y){this._entries=new Map;for(const[D,w]of y)this.set(D,w)}set(y,D){const w=this._entries.get(y);return this._entries.set(y,D),w}get(y){return this._entries.get(y)}}e.ServiceCollection=S}),define(J[705],ee([1,0,12,11,2,222,694,8,178,59]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const m=!1;class n extends Error{constructor(r){var c;super("cyclic dependency between services"),this.message=(c=r.findCycleSlow())!==null&&c!==void 0?c:`UNABLE to detect cycle, dumping graph: \n${r.toString()}`}}class t{constructor(r=new _.ServiceCollection,c=!1,g,o=m){var l;this._services=r,this._strict=c,this._parent=g,this._enableTracing=o,this._activeInstantiations=new Set,this._services.set(b.IInstantiationService,this),this._globalGraph=o?(l=g?._globalGraph)!==null&&l!==void 0?l:new w.Graph(a=>a):void 0}createChild(r){return new t(r,this._strict,this,this._enableTracing)}invokeFunction(r,...c){const g=i.traceInvocation(this._enableTracing,r);let o=!1;try{return r({get:a=>{if(o)throw(0,k.illegalState)("service accessor is only valid during the invocation of its target method");const d=this._getOrCreateServiceInstance(a,g);if(!d)throw new Error(`[invokeFunction] unknown service \'${a}\'`);return d}},...c)}finally{o=!0,g.stop()}}createInstance(r,...c){let g,o;return r instanceof D.SyncDescriptor?(g=i.traceCreation(this._enableTracing,r.ctor),o=this._createInstance(r.ctor,r.staticArguments.concat(c),g)):(g=i.traceCreation(this._enableTracing,r),o=this._createInstance(r,c,g)),g.stop(),o}_createInstance(r,c=[],g){const o=b._util.getServiceDependencies(r).sort((d,u)=>d.index-u.index),l=[];for(const d of o){const u=this._getOrCreateServiceInstance(d.id,g);u||this._throwIfStrict(`[createInstance] ${r.name} depends on UNKNOWN service ${d.id}.`,!1),l.push(u)}const a=o.length>0?o[0].index:c.length;if(c.length!==a){console.trace(`[createInstance] First service dependency of ${r.name} at position ${a+1} conflicts with ${c.length} static arguments`);const d=a-c.length;d>0?c=c.concat(new Array(d)):c=c.slice(0,a)}return Reflect.construct(r,c.concat(l))}_setServiceInstance(r,c){if(this._services.get(r)instanceof D.SyncDescriptor)this._services.set(r,c);else if(this._parent)this._parent._setServiceInstance(r,c);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(r){const c=this._services.get(r);return!c&&this._parent?this._parent._getServiceInstanceOrDescriptor(r):c}_getOrCreateServiceInstance(r,c){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(r));const g=this._getServiceInstanceOrDescriptor(r);return g instanceof D.SyncDescriptor?this._safeCreateAndCacheServiceInstance(r,g,c.branch(r,!0)):(c.branch(r,!1),g)}_safeCreateAndCacheServiceInstance(r,c,g){if(this._activeInstantiations.has(r))throw new Error(`illegal state - RECURSIVELY instantiating service \'${r}\'`);this._activeInstantiations.add(r);try{return this._createAndCacheServiceInstance(r,c,g)}finally{this._activeInstantiations.delete(r)}}_createAndCacheServiceInstance(r,c,g){var o;const l=new w.Graph(u=>u.id.toString());let a=0;const d=[{id:r,desc:c,_trace:g}];for(;d.length;){const u=d.pop();if(l.lookupOrInsertNode(u),a++>1e3)throw new n(l);for(const C of b._util.getServiceDependencies(u.desc.ctor)){const f=this._getServiceInstanceOrDescriptor(C.id);if(f||this._throwIfStrict(`[createInstance] ${r} depends on ${C.id} which is NOT registered.`,!0),(o=this._globalGraph)===null||o===void 0||o.insertEdge(String(u.id),String(C.id)),f instanceof D.SyncDescriptor){const v={id:C.id,desc:f,_trace:u._trace.branch(C.id,!0)};l.insertEdge(u,v),d.push(v)}}}for(;;){const u=l.roots();if(u.length===0){if(!l.isEmpty())throw new n(l);break}for(const{data:C}of u){if(this._getServiceInstanceOrDescriptor(C.id)instanceof D.SyncDescriptor){const v=this._createServiceInstanceWithOwner(C.id,C.desc.ctor,C.desc.staticArguments,C.desc.supportsDelayedInstantiation,C._trace);this._setServiceInstance(C.id,v)}l.removeNode(C)}}return this._getServiceInstanceOrDescriptor(r)}_createServiceInstanceWithOwner(r,c,g=[],o,l){if(this._services.get(r)instanceof D.SyncDescriptor)return this._createServiceInstance(r,c,g,o,l);if(this._parent)return this._parent._createServiceInstanceWithOwner(r,c,g,o,l);throw new Error(`illegalState - creating UNKNOWN service instance ${c.name}`)}_createServiceInstance(r,c,g=[],o,l){if(o){const a=new t(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(r);const d=new Map,u=new S.IdleValue(()=>{const C=a._createInstance(c,g,l);for(const[f,v]of d){const p=C[f];if(typeof p=="function")for(const L of v)p.apply(C,L)}return d.clear(),C});return new Proxy(Object.create(null),{get(C,f){if(!u.isInitialized&&typeof f=="string"&&(f.startsWith("onDid")||f.startsWith("onWill"))){let L=d.get(f);return L||(L=new h.LinkedList,d.set(f,L)),(I,T,F)=>{const R=L.push([I,T,F]);return(0,y.toDisposable)(R)}}if(f in C)return C[f];const v=u.value;let p=v[f];return typeof p!="function"||(p=p.bind(v),C[f]=p),p},set(C,f,v){return u.value[f]=v,!0},getPrototypeOf(C){return c.prototype}})}else return this._createInstance(c,g,l)}_throwIfStrict(r,c){if(c&&console.warn(r),this._strict)throw new Error(r)}}e.InstantiationService=t;class i{static traceInvocation(r,c){return r?new i(2,c.name||new Error().stack.split(`\n`).slice(3,4).join(`\n`)):i._None}static traceCreation(r,c){return r?new i(1,c.name):i._None}constructor(r,c){this.type=r,this.name=c,this._start=Date.now(),this._dep=[]}branch(r,c){const g=new i(3,r.toString());return this._dep.push([r,c,g]),g}stop(){const r=Date.now()-this._start;i._totals+=r;let c=!1;function g(l,a){const d=[],u=new Array(l+1).join("\t");for(const[C,f,v]of a._dep)if(f&&v){c=!0,d.push(`${u}CREATES -> ${C}`);const p=g(l+1,v);p&&d.push(p)}else d.push(`${u}uses -> ${C}`);return d.join(`\n`)}const o=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${g(1,this)}`,`DONE, took ${r.toFixed(2)}ms (grand total ${i._totals.toFixed(2)}ms)`];(r>2||c)&&i.all.add(o.join(`\n`))}}i.all=new Set,i._None=new class extends i{constructor(){super(0,null)}stop(){}branch(){return this}},i._totals=0,e.Trace=i}),define(J[706],ee([1,0,12,11,6,279,2,676]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const _=/^(cursor|delete|undo|redo|tab|editor\\.action\\.clipboard)/;class h extends w.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:y.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(t,i,s,r,c){super(),this._contextKeyService=t,this._commandService=i,this._telemetryService=s,this._notificationService=r,this._logService=c,this._onDidUpdateKeybindings=this._register(new y.Emitter),this._currentChords=[],this._currentChordChecker=new S.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=m.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new S.TimeoutTimer,this._logging=!1}dispose(){super.dispose()}_log(t){this._logging&&this._logService.info(`[KeybindingService]: ${t}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(t,i){const s=this._getResolver().lookupPrimaryKeybinding(t,i||this._contextKeyService);if(s)return s.resolvedKeybinding}dispatchEvent(t,i){return this._dispatch(t,i)}softDispatch(t,i){this._log("/ Soft dispatching keyboard event");const s=this.resolveKeyboardEvent(t);if(s.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),null;const[r]=s.getDispatchChords();if(r===null)return this._log("\\\\ Keyboard event cannot be dispatched"),null;const c=this._contextKeyService.getContext(i),g=this._currentChords.map(({keypress:o})=>o);return this._getResolver().resolve(c,g,r)}_scheduleLeaveChordMode(){const t=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-t>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(t,i){switch(this._currentChords.push({keypress:t,label:i}),this._currentChords.length){case 0:throw(0,k.illegalState)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(b.localize(0,null,i));break;default:{const s=this._currentChords.map(({label:r})=>r).join(", ");this._currentChordStatusMessage=this._notificationService.status(b.localize(1,null,s))}}this._scheduleLeaveChordMode(),D.IME.enabled&&D.IME.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],D.IME.enable()}_dispatch(t,i){return this._doDispatch(this.resolveKeyboardEvent(t),i,!1)}_singleModifierDispatch(t,i){const s=this.resolveKeyboardEvent(t),[r]=s.getSingleModifierDispatchChords();if(r)return this._ignoreSingleModifiers.has(r)?(this._log(`+ Ignoring single modifier ${r} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=m.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=m.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${r}.`),this._currentSingleModifier=r,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):r===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${r} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(s,i,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${r}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[c]=s.getChords();return this._ignoreSingleModifiers=new m(c),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(t,i,s=!1){var r;let c=!1;if(t.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let g=null,o=null;if(s){const[u]=t.getSingleModifierDispatchChords();g=u,o=u?[u]:[]}else[g]=t.getDispatchChords(),o=this._currentChords.map(({keypress:u})=>u);if(g===null)return this._log("\\\\ Keyboard event cannot be dispatched in keydown phase."),c;const l=this._contextKeyService.getContext(i),a=t.getLabel(),d=this._getResolver().resolve(l,o,g);switch(d.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",a,"[ No matching keybinding ]"),this.inChordMode){const u=this._currentChords.map(({label:C})=>C).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${a}".`),this._notificationService.status(b.localize(2,null,u,a),{hideAfter:10*1e3}),this._leaveChordMode(),c=!0}return c}case 1:return this._logService.trace("KeybindingService#dispatch",a,"[ Several keybindings match - more chords needed ]"),c=!0,this._expectAnotherChord(g,a),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),c;case 2:{if(this._logService.trace("KeybindingService#dispatch",a,`[ Will dispatch command ${d.commandId} ]`),d.commandId===null){if(this.inChordMode){const u=this._currentChords.map(({label:C})=>C).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${a}".`),this._notificationService.status(b.localize(3,null,u,a),{hideAfter:10*1e3}),this._leaveChordMode()}c=!0}else this.inChordMode&&this._leaveChordMode(),d.isBubble||(c=!0),this._log(`+ Invoking command ${d.commandId}.`),typeof d.commandArgs>"u"?this._commandService.executeCommand(d.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(d.commandId,d.commandArgs).then(void 0,u=>this._notificationService.warn(u)),_.test(d.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"keybinding",detail:(r=t.getUserSettingsLabel())!==null&&r!==void 0?r:void 0});return c}}}mightProducePrintableCharacter(t){return t.ctrlKey||t.metaKey?!1:t.keyCode>=31&&t.keyCode<=56||t.keyCode>=21&&t.keyCode<=30}}e.AbstractKeybindingService=h;class m{constructor(t){this._ctrlKey=t?t.ctrlKey:!1,this._shiftKey=t?t.shiftKey:!1,this._altKey=t?t.altKey:!1,this._metaKey=t?t.metaKey:!1}has(t){switch(t){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}m.EMPTY=new m(null)}),define(J[707],ee([1,0,11,201,112]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class D extends y.ResolvedKeybinding{constructor(b,_){if(super(),_.length===0)throw(0,S.illegalArgument)("chords");this._os=b,this._chords=_}getLabel(){return k.UILabelProvider.toLabel(this._os,this._chords,b=>this._getLabel(b))}getAriaLabel(){return k.AriaLabelProvider.toLabel(this._os,this._chords,b=>this._getAriaLabel(b))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:k.ElectronAcceleratorLabelProvider.toLabel(this._os,this._chords,b=>this._getElectronAccelerator(b))}getUserSettingsLabel(){return k.UserSettingsLabelProvider.toLabel(this._os,this._chords,b=>this._getUserSettingsLabel(b))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(b=>this._getChord(b))}_getChord(b){return new y.ResolvedChord(b.ctrlKey,b.shiftKey,b.altKey,b.metaKey,this._getLabel(b),this._getAriaLabel(b))}getDispatchChords(){return this._chords.map(b=>this._getChordDispatch(b))}getSingleModifierDispatchChords(){return this._chords.map(b=>this._getSingleModifierChordDispatch(b))}}e.BaseResolvedKeybinding=D}),define(J[36],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,S.createDecorator)("keybindingService")}),define(J[708],ee([1,0,14]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=void 0;const k={kind:0},y={kind:1};function D(h,m,n){return{kind:2,commandId:h,commandArgs:m,isBubble:n}}class w{constructor(m,n,t){var i;this._log=t,this._defaultKeybindings=m,this._defaultBoundCommands=new Map;for(const s of m){const r=s.command;r&&r.charAt(0)!=="-"&&this._defaultBoundCommands.set(r,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=w.handleRemovals([].concat(m).concat(n));for(let s=0,r=this._keybindings.length;s<r;s++){const c=this._keybindings[s];if(c.chords.length===0)continue;const g=(i=c.when)===null||i===void 0?void 0:i.substituteConstants();g&&g.type===0||this._addKeyPress(c.chords[0],c)}}static _isTargetedForRemoval(m,n,t){if(n){for(let i=0;i<n.length;i++)if(n[i]!==m.chords[i])return!1}return!(t&&t.type!==1&&(!m.when||!(0,S.expressionsAreEqualWithConstantSubstitution)(t,m.when)))}static handleRemovals(m){const n=new Map;for(let i=0,s=m.length;i<s;i++){const r=m[i];if(r.command&&r.command.charAt(0)==="-"){const c=r.command.substring(1);n.has(c)?n.get(c).push(r):n.set(c,[r])}}if(n.size===0)return m;const t=[];for(let i=0,s=m.length;i<s;i++){const r=m[i];if(!r.command||r.command.length===0){t.push(r);continue}if(r.command.charAt(0)==="-")continue;const c=n.get(r.command);if(!c||!r.isDefault){t.push(r);continue}let g=!1;for(const o of c){const l=o.when;if(this._isTargetedForRemoval(r,o.chords,l)){g=!0;break}}if(!g){t.push(r);continue}}return t}_addKeyPress(m,n){const t=this._map.get(m);if(typeof t>"u"){this._map.set(m,[n]),this._addToLookupMap(n);return}for(let i=t.length-1;i>=0;i--){const s=t[i];if(s.command===n.command)continue;let r=!0;for(let c=1;c<s.chords.length&&c<n.chords.length;c++)if(s.chords[c]!==n.chords[c]){r=!1;break}r&&w.whenIsEntirelyIncluded(s.when,n.when)&&this._removeFromLookupMap(s)}t.push(n),this._addToLookupMap(n)}_addToLookupMap(m){if(!m.command)return;let n=this._lookupMap.get(m.command);typeof n>"u"?(n=[m],this._lookupMap.set(m.command,n)):n.push(m)}_removeFromLookupMap(m){if(!m.command)return;const n=this._lookupMap.get(m.command);if(!(typeof n>"u")){for(let t=0,i=n.length;t<i;t++)if(n[t]===m){n.splice(t,1);return}}}static whenIsEntirelyIncluded(m,n){return!n||n.type===1?!0:!m||m.type===1?!1:(0,S.implies)(m,n)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(m,n){const t=this._lookupMap.get(m);if(typeof t>"u"||t.length===0)return null;if(t.length===1)return t[0];for(let i=t.length-1;i>=0;i--){const s=t[i];if(n.contextMatchesRules(s.when))return s}return t[t.length-1]}resolve(m,n,t){const i=[...n,t];this._log(`| Resolving ${i}`);const s=this._map.get(i[0]);if(s===void 0)return this._log("\\\\ No keybinding entries."),k;let r=null;if(i.length<2)r=s;else{r=[];for(let g=0,o=s.length;g<o;g++){const l=s[g];if(i.length>l.chords.length)continue;let a=!0;for(let d=1;d<i.length;d++)if(l.chords[d]!==i[d]){a=!1;break}a&&r.push(l)}}const c=this._findCommand(m,r);return c?i.length<c.chords.length?(this._log(`\\\\ From ${r.length} keybinding entries, awaiting ${c.chords.length-i.length} more chord(s), when: ${b(c.when)}, source: ${_(c)}.`),y):(this._log(`\\\\ From ${r.length} keybinding entries, matched ${c.command}, when: ${b(c.when)}, source: ${_(c)}.`),D(c.command,c.commandArgs,c.bubble)):(this._log(`\\\\ From ${r.length} keybinding entries, no when clauses matched the context.`),k)}_findCommand(m,n){for(let t=n.length-1;t>=0;t--){const i=n[t];if(w._contextMatchesRules(m,i.when))return i}return null}static _contextMatchesRules(m,n){return n?n.evaluate(m):!0}}e.KeybindingResolver=w;function b(h){return h?`${h.serialize()}`:"no when condition"}function _(h){return h.extensionId?h.isBuiltinExtension?`built-in extension ${h.extensionId}`:`user extension ${h.extensionId}`:h.isDefault?"built-in":"user"}}),define(J[311],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toEmptyArrayIfContainsNull=e.ResolvedKeybindingItem=void 0;class S{constructor(D,w,b,_,h,m,n){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=D,this.chords=D?k(D.getDispatchChords()):[],D&&this.chords.length===0&&(this.chords=k(D.getSingleModifierDispatchChords())),this.bubble=w?w.charCodeAt(0)===94:!1,this.command=this.bubble?w.substr(1):w,this.commandArgs=b,this.when=_,this.isDefault=h,this.extensionId=m,this.isBuiltinExtension=n}}e.ResolvedKeybindingItem=S;function k(y){const D=[];for(let w=0,b=y.length;w<b;w++){const _=y[w];if(!_)return[];D.push(_)}return D}e.toEmptyArrayIfContainsNull=k}),define(J[709],ee([1,0,58,112,707,311]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class w extends y.BaseResolvedKeybinding{constructor(_,h){super(h,_)}_keyCodeToUILabel(_){if(this._os===2)switch(_){case 15:return"\\u2190";case 16:return"\\u2191";case 17:return"\\u2192";case 18:return"\\u2193"}return S.KeyCodeUtils.toString(_)}_getLabel(_){return _.isDuplicateModifierCase()?"":this._keyCodeToUILabel(_.keyCode)}_getAriaLabel(_){return _.isDuplicateModifierCase()?"":S.KeyCodeUtils.toString(_.keyCode)}_getElectronAccelerator(_){return S.KeyCodeUtils.toElectronAccelerator(_.keyCode)}_getUserSettingsLabel(_){if(_.isDuplicateModifierCase())return"";const h=S.KeyCodeUtils.toUserSettingsUS(_.keyCode);return h&&h.toLowerCase()}_getChordDispatch(_){return w.getDispatchStr(_)}static getDispatchStr(_){if(_.isModifierKey())return null;let h="";return _.ctrlKey&&(h+="ctrl+"),_.shiftKey&&(h+="shift+"),_.altKey&&(h+="alt+"),_.metaKey&&(h+="meta+"),h+=S.KeyCodeUtils.toString(_.keyCode),h}_getSingleModifierChordDispatch(_){return _.keyCode===5&&!_.shiftKey&&!_.altKey&&!_.metaKey?"ctrl":_.keyCode===4&&!_.ctrlKey&&!_.altKey&&!_.metaKey?"shift":_.keyCode===6&&!_.ctrlKey&&!_.shiftKey&&!_.metaKey?"alt":_.keyCode===57&&!_.ctrlKey&&!_.shiftKey&&!_.altKey?"meta":null}static _scanCodeToKeyCode(_){const h=S.IMMUTABLE_CODE_TO_KEY_CODE[_];if(h!==-1)return h;switch(_){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _toKeyCodeChord(_){if(!_)return null;if(_ instanceof k.KeyCodeChord)return _;const h=this._scanCodeToKeyCode(_.scanCode);return h===0?null:new k.KeyCodeChord(_.ctrlKey,_.shiftKey,_.altKey,_.metaKey,h)}static resolveKeybinding(_,h){const m=(0,D.toEmptyArrayIfContainsNull)(_.chords.map(n=>this._toKeyCodeChord(n)));return m.length>0?[new w(m,h)]:[]}}e.USLayoutResolvedKeybinding=w}),define(J[149],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,S.createDecorator)("labelService")}),define(J[123],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,S.createDecorator)("layoutService")}),define(J[312],ee([1,0,7,6,123,30,51]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScopedLayoutService=void 0;let b=class{get dimension(){return this._dimension||(this._dimension=S.getClientArea(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var m;(m=this._codeEditorService.getFocusedCodeEditor())===null||m===void 0||m.focus()}constructor(m){this._codeEditorService=m,this.onDidLayout=k.Event.None,this.offset={top:0,quickPickTop:0}}};b=Ne([fe(0,D.ICodeEditorService)],b);let _=class extends b{get hasContainer(){return!1}get container(){return this._container}constructor(m,n){super(n),this._container=m}};_=Ne([fe(1,D.ICodeEditorService)],_),e.EditorScopedLayoutService=_,(0,w.registerSingleton)(y.ILayoutService,b,1)}),define(J[710],ee([1,0,7,6,2,88,27,14,123]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let h=class extends y.Disposable{constructor(n,t,i){super(),this._contextKeyService=n,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new k.Emitter,this._onDidChangeReducedMotion=new k.Emitter,this._accessibilityModeEnabledContext=D.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const s=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(c=>{c.affectsConfiguration("editor.accessibilitySupport")&&(s(),this._onDidChangeScreenReaderOptimized.fire()),c.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),s(),this._register(this.onDidChangeScreenReaderOptimized(()=>s()));const r=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(r)}initReducedMotionListeners(n){if(!this._layoutService.hasContainer)return;this._register((0,S.addDisposableListener)(n,"change",()=>{this._systemMotionReduced=n.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const i=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",i),this._layoutService.container.classList.toggle("enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const n=this._configurationService.getValue("editor.accessibilitySupport");return n==="on"||n==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const n=this._configMotionReduced;return n==="on"||n==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};h=Ne([fe(0,b.IContextKeyService),fe(1,_.ILayoutService),fe(2,w.IConfigurationService)],h),e.AccessibilityService=h}),define(J[711],ee([1,0,281,2,123]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let D=class extends k.Disposable{constructor(b){super(),this.layoutService=b,this.currentViewDisposable=k.Disposable.None,this.container=b.hasContainer?b.container:null,this.contextView=this._register(new S.ContextView(this.container,1)),this.layout(),this._register(b.onDidLayout(()=>this.layout()))}setContainer(b,_){this.contextView.setContainer(b,_||1)}showContextView(b,_,h){_?(_!==this.container||this.shadowRoot!==h)&&(this.container=_,this.setContainer(_,h?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=h,this.contextView.show(b);const m=(0,k.toDisposable)(()=>{this.currentViewDisposable===m&&this.hideContextView()});return this.currentViewDisposable=m,m}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(b){this.contextView.hide(b)}};D=Ne([fe(0,y.ILayoutService)],D),e.ContextViewService=D}),define(J[62],ee([1,0,6,2,14,8]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_LOG_LEVEL=e.LogLevelToString=e.MultiplexLogger=e.ConsoleLogger=e.AbstractLogger=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILogService=void 0,e.ILogService=(0,D.createDecorator)("logService");var w;(function(n){n[n.Off=0]="Off",n[n.Trace=1]="Trace",n[n.Debug=2]="Debug",n[n.Info=3]="Info",n[n.Warning=4]="Warning",n[n.Error=5]="Error"})(w=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=w.Info;class b extends k.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new S.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(t){this.level!==t&&(this.level=t,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(t){return this.level!==w.Off&&this.level<=t}}e.AbstractLogger=b;class _ extends b{constructor(t=e.DEFAULT_LOG_LEVEL,i=!0){super(),this.useColors=i,this.setLevel(t)}trace(t,...i){this.checkLogLevel(w.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",t,...i):console.log(t,...i))}debug(t,...i){this.checkLogLevel(w.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",t,...i):console.log(t,...i))}info(t,...i){this.checkLogLevel(w.Info)&&(this.useColors?console.log("%c INFO","color: #33f",t,...i):console.log(t,...i))}error(t,...i){this.checkLogLevel(w.Error)&&(this.useColors?console.log("%c ERR","color: #f33",t,...i):console.error(t,...i))}dispose(){}}e.ConsoleLogger=_;class h extends b{constructor(t){super(),this.loggers=t,t.length&&this.setLevel(t[0].getLevel())}setLevel(t){for(const i of this.loggers)i.setLevel(t);super.setLevel(t)}trace(t,...i){for(const s of this.loggers)s.trace(t,...i)}debug(t,...i){for(const s of this.loggers)s.debug(t,...i)}info(t,...i){for(const s of this.loggers)s.info(t,...i)}error(t,...i){for(const s of this.loggers)s.error(t,...i)}dispose(){for(const t of this.loggers)t.dispose()}}e.MultiplexLogger=h;function m(n){switch(n){case w.Trace:return"trace";case w.Debug:return"debug";case w.Info:return"info";case w.Warning:return"warn";case w.Error:return"error";case w.Off:return"off"}}e.LogLevelToString=m,e.CONTEXT_LOG_LEVEL=new y.RawContextKey("logLevel",m(w.Info))}),define(J[712],ee([1,0,46,7,12,2,123,62]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let _=class extends D.Disposable{constructor(m,n){super(),this.layoutService=m,this.logService=n,this.mapTextToType=new Map,this.findText="",this.resources=[],(S.isSafari||S.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const m=()=>{const n=new y.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=n,navigator.clipboard.write([new ClipboardItem({"text/plain":n.p})]).catch(t=>Ee(this,void 0,void 0,function*(){(!(t instanceof Error)||t.name!=="NotAllowedError"||!n.isRejected)&&this.logService.error(t)}))};this.layoutService.hasContainer&&(this._register((0,k.addDisposableListener)(this.layoutService.container,"click",m)),this._register((0,k.addDisposableListener)(this.layoutService.container,"keydown",m)))}writeText(m,n){return Ee(this,void 0,void 0,function*(){if(n){this.mapTextToType.set(n,m);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(m);try{return yield navigator.clipboard.writeText(m)}catch(s){console.error(s)}const t=document.activeElement,i=document.body.appendChild((0,k.$)("textarea",{"aria-hidden":!0}));i.style.height="1px",i.style.width="1px",i.style.position="absolute",i.value=m,i.focus(),i.select(),document.execCommand("copy"),t instanceof HTMLElement&&t.focus(),document.body.removeChild(i)})}readText(m){return Ee(this,void 0,void 0,function*(){if(m)return this.mapTextToType.get(m)||"";try{return yield navigator.clipboard.readText()}catch(n){return console.error(n),""}})}readFindText(){return Ee(this,void 0,void 0,function*(){return this.findText})}writeFindText(m){return Ee(this,void 0,void 0,function*(){this.findText=m})}readResources(){return Ee(this,void 0,void 0,function*(){return this.resources})}};_=Ne([fe(0,w.ILayoutService),fe(1,b.ILogService)],_),e.BrowserClipboardService=_}),define(J[713],ee([1,0,2,62]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class y extends S.Disposable{constructor(w,b=[]){super(),this.logger=new k.MultiplexLogger([w,...b]),this._register(w.onDidChangeLogLevel(_=>this.setLevel(_)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(w){this.logger.setLevel(w)}getLevel(){return this.logger.getLevel()}trace(w,...b){this.logger.trace(w,...b)}debug(w,...b){this.logger.debug(w,...b)}info(w,...b){this.logger.info(w,...b)}error(w,...b){this.logger.error(w,...b)}}e.LogService=y}),define(J[89],ee([1,0,102,678,8]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=void 0;var D;(function(b){b[b.Hint=1]="Hint",b[b.Info=2]="Info",b[b.Warning=4]="Warning",b[b.Error=8]="Error"})(D=e.MarkerSeverity||(e.MarkerSeverity={})),function(b){function _(i,s){return s-i}b.compare=_;const h=Object.create(null);h[b.Error]=(0,k.localize)(0,null),h[b.Warning]=(0,k.localize)(1,null),h[b.Info]=(0,k.localize)(2,null);function m(i){return h[i]||""}b.toString=m;function n(i){switch(i){case S.default.Error:return b.Error;case S.default.Warning:return b.Warning;case S.default.Info:return b.Info;case S.default.Ignore:return b.Hint}}b.fromSeverity=n;function t(i){switch(i){case b.Error:return S.default.Error;case b.Warning:return S.default.Warning;case b.Info:return S.default.Info;case b.Hint:return S.default.Ignore}}b.toSeverity=t}(D=e.MarkerSeverity||(e.MarkerSeverity={}));var w;(function(b){const _="";function h(n){return m(n,!0)}b.makeKey=h;function m(n,t){const i=[_];return n.source?i.push(n.source.replace("\\xA6","\\\\\\xA6")):i.push(_),n.code?typeof n.code=="string"?i.push(n.code.replace("\\xA6","\\\\\\xA6")):i.push(n.code.value.replace("\\xA6","\\\\\\xA6")):i.push(_),n.severity!==void 0&&n.severity!==null?i.push(D.toString(n.severity)):i.push(_),n.message&&t?i.push(n.message.replace("\\xA6","\\\\\\xA6")):i.push(_),n.startLineNumber!==void 0&&n.startLineNumber!==null?i.push(n.startLineNumber.toString()):i.push(_),n.startColumn!==void 0&&n.startColumn!==null?i.push(n.startColumn.toString()):i.push(_),n.endLineNumber!==void 0&&n.endLineNumber!==null?i.push(n.endLineNumber.toString()):i.push(_),n.endColumn!==void 0&&n.endColumn!==null?i.push(n.endColumn.toString()):i.push(_),i.push(_),i.join("\\xA6")}b.makeKeyOptionalMessage=m})(w=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=(0,y.createDecorator)("markerService")}),define(J[714],ee([1,0,16,6,2,59,9,20,5,51,8,89,27]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class i{constructor(g,o,l){this.marker=g,this.index=o,this.total=l}}e.MarkerCoordinate=i;let s=class{constructor(g,o,l){this._markerService=o,this._configService=l,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new y.DisposableStore,this._markers=[],this._nextIdx=-1,b.URI.isUri(g)?this._resourceFilter=C=>C.toString()===g.toString():g&&(this._resourceFilter=g);const a=this._configService.getValue("problems.sortOrder"),d=(C,f)=>{let v=(0,w.compare)(C.resource.toString(),f.resource.toString());return v===0&&(a==="position"?v=_.Range.compareRangesUsingStarts(C,f)||n.MarkerSeverity.compare(C.severity,f.severity):v=n.MarkerSeverity.compare(C.severity,f.severity)||_.Range.compareRangesUsingStarts(C,f)),v},u=()=>{this._markers=this._markerService.read({resource:b.URI.isUri(g)?g:void 0,severities:n.MarkerSeverity.Error|n.MarkerSeverity.Warning|n.MarkerSeverity.Info}),typeof g=="function"&&(this._markers=this._markers.filter(C=>this._resourceFilter(C.resource))),this._markers.sort(d)};u(),this._dispoables.add(o.onMarkerChanged(C=>{(!this._resourceFilter||C.some(f=>this._resourceFilter(f)))&&(u(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(g){return!this._resourceFilter&&!g?!0:!this._resourceFilter||!g?!1:this._resourceFilter(g)}get selected(){const g=this._markers[this._nextIdx];return g&&new i(g,this._nextIdx+1,this._markers.length)}_initIdx(g,o,l){let a=!1,d=this._markers.findIndex(u=>u.resource.toString()===g.uri.toString());d<0&&(d=(0,S.binarySearch)(this._markers,{resource:g.uri},(u,C)=>(0,w.compare)(u.resource.toString(),C.resource.toString())),d<0&&(d=~d));for(let u=d;u<this._markers.length;u++){let C=_.Range.lift(this._markers[u]);if(C.isEmpty()){const f=g.getWordAtPosition(C.getStartPosition());f&&(C=new _.Range(C.startLineNumber,f.startColumn,C.startLineNumber,f.endColumn))}if(o&&(C.containsPosition(o)||o.isBeforeOrEqual(C.getStartPosition()))){this._nextIdx=u,a=!0;break}if(this._markers[u].resource.toString()!==g.uri.toString())break}a||(this._nextIdx=l?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(g,o,l){if(this._markers.length===0)return!1;const a=this._nextIdx;return this._nextIdx===-1?this._initIdx(o,l,g):g?this._nextIdx=(this._nextIdx+1)%this._markers.length:g||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),a!==this._nextIdx}find(g,o){let l=this._markers.findIndex(a=>a.resource.toString()===g.toString());if(!(l<0)){for(;l<this._markers.length;l++)if(_.Range.containsPosition(this._markers[l],o))return new i(this._markers[l],l+1,this._markers.length)}}};s=Ne([fe(1,n.IMarkerService),fe(2,t.IConfigurationService)],s),e.MarkerList=s,e.IMarkerNavigationService=(0,m.createDecorator)("IMarkerNavigationService");let r=class{constructor(g,o){this._markerService=g,this._configService=o,this._provider=new D.LinkedList}getMarkerList(g){for(const o of this._provider){const l=o.getMarkerList(g);if(l)return l}return new s(g,this._markerService,this._configService)}};r=Ne([fe(0,n.IMarkerService),fe(1,t.IConfigurationService)],r),(0,h.registerSingleton)(e.IMarkerNavigationService,r,1)}),define(J[715],ee([1,0,16,6,54,55,49,20,89]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=e.unsupportedSchemas=void 0,e.unsupportedSchemas=new Set([w.Schemas.inMemory,w.Schemas.vscodeSourceControl,w.Schemas.walkThrough,w.Schemas.walkThroughSnippet]);class h{constructor(){this._byResource=new D.ResourceMap,this._byOwner=new Map}set(i,s,r){let c=this._byResource.get(i);c||(c=new Map,this._byResource.set(i,c)),c.set(s,r);let g=this._byOwner.get(s);g||(g=new D.ResourceMap,this._byOwner.set(s,g)),g.set(i,r)}get(i,s){const r=this._byResource.get(i);return r?.get(s)}delete(i,s){let r=!1,c=!1;const g=this._byResource.get(i);g&&(r=g.delete(s));const o=this._byOwner.get(s);if(o&&(c=o.delete(i)),r!==c)throw new Error("illegal state");return r&&c}values(i){var s,r,c,g;return typeof i=="string"?(r=(s=this._byOwner.get(i))===null||s===void 0?void 0:s.values())!==null&&r!==void 0?r:y.Iterable.empty():b.URI.isUri(i)?(g=(c=this._byResource.get(i))===null||c===void 0?void 0:c.values())!==null&&g!==void 0?g:y.Iterable.empty():y.Iterable.map(y.Iterable.concat(...this._byOwner.values()),o=>o[1])}}class m{constructor(i){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new D.ResourceMap,this._service=i,this._subscription=i.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(i){for(const s of i){const r=this._data.get(s);r&&this._substract(r);const c=this._resourceStats(s);this._add(c),this._data.set(s,c)}}_resourceStats(i){const s={errors:0,warnings:0,infos:0,unknowns:0};if(e.unsupportedSchemas.has(i.scheme))return s;for(const{severity:r}of this._service.read({resource:i}))r===_.MarkerSeverity.Error?s.errors+=1:r===_.MarkerSeverity.Warning?s.warnings+=1:r===_.MarkerSeverity.Info?s.infos+=1:s.unknowns+=1;return s}_substract(i){this.errors-=i.errors,this.warnings-=i.warnings,this.infos-=i.infos,this.unknowns-=i.unknowns}_add(i){this.errors+=i.errors,this.warnings+=i.warnings,this.infos+=i.infos,this.unknowns+=i.unknowns}}class n{constructor(){this._onMarkerChanged=new k.DebounceEmitter({delay:0,merge:n._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new h,this._stats=new m(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(i,s){for(const r of s||[])this.changeOne(i,r,[])}changeOne(i,s,r){if((0,S.isFalsyOrEmpty)(r))this._data.delete(s,i)&&this._onMarkerChanged.fire([s]);else{const c=[];for(const g of r){const o=n._toMarker(i,s,g);o&&c.push(o)}this._data.set(s,i,c),this._onMarkerChanged.fire([s])}}static _toMarker(i,s,r){let{code:c,severity:g,message:o,source:l,startLineNumber:a,startColumn:d,endLineNumber:u,endColumn:C,relatedInformation:f,tags:v}=r;if(o)return a=a>0?a:1,d=d>0?d:1,u=u>=a?u:a,C=C>0?C:d,{resource:s,owner:i,code:c,severity:g,message:o,source:l,startLineNumber:a,startColumn:d,endLineNumber:u,endColumn:C,relatedInformation:f,tags:v}}changeAll(i,s){const r=[],c=this._data.values(i);if(c)for(const g of c){const o=y.Iterable.first(g);o&&(r.push(o.resource),this._data.delete(o.resource,i))}if((0,S.isNonEmptyArray)(s)){const g=new D.ResourceMap;for(const{resource:o,marker:l}of s){const a=n._toMarker(i,o,l);if(!a)continue;const d=g.get(o);d?d.push(a):(g.set(o,[a]),r.push(o))}for(const[o,l]of g)this._data.set(o,i,l)}r.length>0&&this._onMarkerChanged.fire(r)}read(i=Object.create(null)){let{owner:s,resource:r,severities:c,take:g}=i;if((!g||g<0)&&(g=-1),s&&r){const o=this._data.get(r,s);if(o){const l=[];for(const a of o)if(n._accept(a,c)){const d=l.push(a);if(g>0&&d===g)break}return l}else return[]}else if(!s&&!r){const o=[];for(const l of this._data.values())for(const a of l)if(n._accept(a,c)){const d=o.push(a);if(g>0&&d===g)return o}return o}else{const o=this._data.values(r??s),l=[];for(const a of o)for(const d of a)if(n._accept(d,c)){const u=l.push(d);if(g>0&&u===g)return l}return l}}static _accept(i,s){return s===void 0||(s&i.severity)===i.severity}static _merge(i){const s=new D.ResourceMap;for(const r of i)for(const c of r)s.set(c,!0);return Array.from(s.keys())}}e.MarkerService=n}),define(J[43],ee([1,0,102,8]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpNotification=e.INotificationService=e.Severity=void 0,e.Severity=S.default,e.INotificationService=(0,k.createDecorator)("notificationService");class y{}e.NoOpNotification=y}),define(J[47],ee([1,0,9,20,8]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractSelection=e.matchesSomeScheme=e.matchesScheme=e.IOpenerService=void 0,e.IOpenerService=(0,y.createDecorator)("openerService");function D(_,h){return k.URI.isUri(_)?(0,S.equalsIgnoreCase)(_.scheme,h):(0,S.startsWithIgnoreCase)(_,h+":")}e.matchesScheme=D;function w(_,...h){return h.some(m=>D(_,m))}e.matchesSomeScheme=w;function b(_){let h;const m=/^L?(\\d+)(?:,(\\d+))?(-L?(\\d+)(?:,(\\d+))?)?/.exec(_.fragment);return m&&(h={startLineNumber:parseInt(m[1]),startColumn:m[2]?parseInt(m[2]):1,endLineNumber:m[4]?parseInt(m[4]):void 0,endColumn:m[4]?m[5]?parseInt(m[5]):1:void 0},_=_.with({fragment:""})),{selection:h,uri:_}}e.extractSelection=b}),define(J[716],ee([1,0,7,21,59,55,206,49,42,20,30,25,691,47]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let s=class{constructor(o){this._commandService=o}open(o,l){return Ee(this,void 0,void 0,function*(){if(!(0,i.matchesScheme)(o,b.Schemas.command))return!1;if(!l?.allowCommands||(typeof o=="string"&&(o=h.URI.parse(o)),Array.isArray(l.allowCommands)&&!l.allowCommands.includes(o.path)))return!0;let a=[];try{a=(0,w.parse)(decodeURIComponent(o.query))}catch{try{a=(0,w.parse)(o.query)}catch{}}return Array.isArray(a)||(a=[a]),yield this._commandService.executeCommand(o.path,...a),!0})}};s=Ne([fe(0,n.ICommandService)],s);let r=class{constructor(o){this._editorService=o}open(o,l){return Ee(this,void 0,void 0,function*(){typeof o=="string"&&(o=h.URI.parse(o));const{selection:a,uri:d}=(0,i.extractSelection)(o);return o=d,o.scheme===b.Schemas.file&&(o=(0,_.normalizePath)(o)),yield this._editorService.openCodeEditor({resource:o,options:Object.assign({selection:a,source:l?.fromUserGesture?t.EditorOpenSource.USER:t.EditorOpenSource.API},l?.editorOptions)},this._editorService.getFocusedCodeEditor(),l?.openToSide),!0})}};r=Ne([fe(0,m.ICodeEditorService)],r);let c=class{constructor(o,l){this._openers=new y.LinkedList,this._validators=new y.LinkedList,this._resolvers=new y.LinkedList,this._resolvedUriTargets=new D.ResourceMap(a=>a.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new y.LinkedList,this._defaultExternalOpener={openExternal:a=>Ee(this,void 0,void 0,function*(){return(0,i.matchesSomeScheme)(a,b.Schemas.http,b.Schemas.https)?S.windowOpenNoOpener(a):window.location.href=a,!0})},this._openers.push({open:(a,d)=>Ee(this,void 0,void 0,function*(){return d?.openExternal||(0,i.matchesSomeScheme)(a,b.Schemas.mailto,b.Schemas.http,b.Schemas.https,b.Schemas.vsls)?(yield this._doOpenExternal(a,d),!0):!1})}),this._openers.push(new s(l)),this._openers.push(new r(o))}registerOpener(o){return{dispose:this._openers.unshift(o)}}open(o,l){var a;return Ee(this,void 0,void 0,function*(){const d=typeof o=="string"?h.URI.parse(o):o,u=(a=this._resolvedUriTargets.get(d))!==null&&a!==void 0?a:o;for(const C of this._validators)if(!(yield C.shouldOpen(u,l)))return!1;for(const C of this._openers)if(yield C.open(o,l))return!0;return!1})}resolveExternalUri(o,l){return Ee(this,void 0,void 0,function*(){for(const a of this._resolvers)try{const d=yield a.resolveExternalUri(o,l);if(d)return this._resolvedUriTargets.has(d.resolved)||this._resolvedUriTargets.set(d.resolved,o),d}catch{}throw new Error("Could not resolve external URI: "+o.toString())})}_doOpenExternal(o,l){return Ee(this,void 0,void 0,function*(){const a=typeof o=="string"?h.URI.parse(o):o;let d;try{d=(yield this.resolveExternalUri(a,l)).resolved}catch{d=a}let u;if(typeof o=="string"&&a.toString()===d.toString()?u=o:u=encodeURI(d.toString(!0)),l?.allowContributedOpeners){const C=typeof l?.allowContributedOpeners=="string"?l?.allowContributedOpeners:void 0;for(const f of this._externalOpeners)if(yield f.openExternal(u,{sourceUri:a,preferredOpenerId:C},k.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(u,{sourceUri:a},k.CancellationToken.None)})}dispose(){this._validators.clear()}};c=Ne([fe(0,m.ICodeEditorService),fe(1,n.ICommandService)],c),e.OpenerService=c}),define(J[70],ee([1,0,133,55,132,51,8,62,47]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,w.createDecorator)("ILanguageFeatureDebounceService");var h;(function(t){const i=new WeakMap;let s=0;function r(c){let g=i.get(c);return g===void 0&&(g=++s,i.set(c,g)),g}t.of=r})(h||(h={}));class m{constructor(i,s,r,c,g,o){this._logService=i,this._name=s,this._registry=r,this._default=c,this._min=g,this._max=o,this._cache=new k.LRUCache(50,.7)}_key(i){return i.id+this._registry.all(i).reduce((s,r)=>(0,S.doHash)(h.of(r),s),0)}get(i){const s=this._key(i),r=this._cache.get(s);return r?(0,y.clamp)(r.value,this._min,this._max):this.default()}update(i,s){const r=this._key(i);let c=this._cache.get(r);c||(c=new y.SlidingWindowAverage(6),this._cache.set(r,c));const g=(0,y.clamp)(c.update(s),this._min,this._max);return(0,_.matchesScheme)(i.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${i.uri.toString()} is ${g}ms`),g}_overall(){const i=new y.MovingAverage;for(const[,s]of this._cache)i.update(s.value);return i.value}default(){const i=this._overall()|0||this._default;return(0,y.clamp)(i,this._min,this._max)}}let n=class{constructor(i){this._logService=i,this._data=new Map}for(i,s,r){var c,g,o;const l=(c=r?.min)!==null&&c!==void 0?c:50,a=(g=r?.max)!==null&&g!==void 0?g:Math.pow(l,2),d=(o=r?.key)!==null&&o!==void 0?o:void 0,u=`${h.of(i)},${l}${d?","+d:""}`;let C=this._data.get(u);return C||(C=new m(this._logService,s,i,this._overallAverage()|0||l*1.5,l,a),this._data.set(u,C)),C}_overallAverage(){const i=new y.MovingAverage;for(const s of this._data.values())i.update(s.default());return i.value}};n=Ne([fe(0,b.ILogService)],n),e.LanguageFeatureDebounceService=n,(0,D.registerSingleton)(e.ILanguageFeatureDebounceService,n,1)}),define(J[179],ee([1,0,16,21,11,54,55,13,5,70,8,51,53,2,19]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class r{remove(){var d;(d=this.parent)===null||d===void 0||d.children.delete(this.id)}static findId(d,u){let C;typeof d=="string"?C=`${u.id}/${d}`:(C=`${u.id}/${d.name}`,u.children.get(C)!==void 0&&(C=`${u.id}/${d.name}_${d.range.startLineNumber}_${d.range.startColumn}`));let f=C;for(let v=0;u.children.get(f)!==void 0;v++)f=`${C}_${v}`;return f}static empty(d){return d.children.size===0}}e.TreeElement=r;class c extends r{constructor(d,u,C){super(),this.id=d,this.parent=u,this.symbol=C,this.children=new Map}}e.OutlineElement=c;class g extends r{constructor(d,u,C,f){super(),this.id=d,this.parent=u,this.label=C,this.order=f,this.children=new Map}}e.OutlineGroup=g;class o extends r{static create(d,u,C){const f=new k.CancellationTokenSource(C),v=new o(u.uri),p=d.ordered(u),L=p.map((I,T)=>{var F;const R=r.findId(`provider_${T}`,v),M=new g(R,v,(F=I.displayName)!==null&&F!==void 0?F:"Unknown Outline Provider",T);return Promise.resolve(I.provideDocumentSymbols(u,f.token)).then(N=>{for(const A of N||[])o._makeOutlineElement(A,M);return M},N=>((0,y.onUnexpectedExternalError)(N),M)).then(N=>{r.empty(N)?N.remove():v._groups.set(R,N)})}),E=d.onDidChange(()=>{const I=d.ordered(u);(0,S.equals)(I,p)||f.cancel()});return Promise.all(L).then(()=>f.token.isCancellationRequested&&!C.isCancellationRequested?o.create(d,u,C):v._compact()).finally(()=>{E.dispose()})}static _makeOutlineElement(d,u){const C=r.findId(d,u),f=new c(C,u,d);if(d.children)for(const v of d.children)o._makeOutlineElement(v,f);u.children.set(f.id,f)}constructor(d){super(),this.uri=d,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let d=0;for(const[u,C]of this._groups)C.children.size===0?this._groups.delete(u):d+=1;if(d!==1)this.children=this._groups;else{const u=D.Iterable.first(this._groups.values());for(const[,C]of u.children)C.parent=this,this.children.set(C.id,C)}return this}getTopLevelSymbols(){const d=[];for(const u of this.children.values())u instanceof c?d.push(u.symbol):d.push(...D.Iterable.map(u.children.values(),C=>C.symbol));return d.sort((u,C)=>_.Range.compareRangesUsingStarts(u.range,C.range))}asListOfDocumentSymbols(){const d=this.getTopLevelSymbols(),u=[];return o._flattenDocumentSymbols(u,d,""),u.sort((C,f)=>b.Position.compare(_.Range.getStartPosition(C.range),_.Range.getStartPosition(f.range))||b.Position.compare(_.Range.getEndPosition(f.range),_.Range.getEndPosition(C.range)))}static _flattenDocumentSymbols(d,u,C){for(const f of u)d.push({kind:f.kind,tags:f.tags,name:f.name,detail:f.detail,containerName:f.containerName||C,range:f.range,selectionRange:f.selectionRange,children:void 0}),f.children&&o._flattenDocumentSymbols(d,f.children,f.name)}}e.OutlineModel=o,e.IOutlineModelService=(0,m.createDecorator)("IOutlineModelService");let l=class{constructor(d,u,C){this._languageFeaturesService=d,this._disposables=new i.DisposableStore,this._cache=new w.LRUCache(10,.7),this._debounceInformation=u.for(d.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(C.onModelRemoved(f=>{this._cache.delete(f.id)}))}dispose(){this._disposables.dispose()}getOrCreate(d,u){return Ee(this,void 0,void 0,function*(){const C=this._languageFeaturesService.documentSymbolProvider,f=C.ordered(d);let v=this._cache.get(d.id);if(!v||v.versionId!==d.getVersionId()||!(0,S.equals)(v.provider,f)){const L=new k.CancellationTokenSource;v={versionId:d.getVersionId(),provider:f,promiseCnt:0,source:L,promise:o.create(C,d,L.token),model:void 0},this._cache.set(d.id,v);const E=Date.now();v.promise.then(I=>{v.model=I,this._debounceInformation.update(d,Date.now()-E)}).catch(I=>{this._cache.delete(d.id)})}if(v.model)return v.model;v.promiseCnt+=1;const p=u.onCancellationRequested(()=>{--v.promiseCnt===0&&(v.source.cancel(),this._cache.delete(d.id))});try{return yield v.promise}finally{p.dispose()}})}};l=Ne([fe(0,s.ILanguageFeaturesService),fe(1,h.ILanguageFeatureDebounceService),fe(2,t.IModelService)],l),e.OutlineModelService=l,(0,n.registerSingleton)(e.IOutlineModelService,l,1)}),define(J[717],ee([1,0,21,18,20,61,179,25]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",function(_,...h){return Ee(this,void 0,void 0,function*(){const[m]=h;(0,k.assertType)(y.URI.isUri(m));const n=_.get(w.IOutlineModelService),i=yield _.get(D.ITextModelService).createModelReference(m);try{return(yield n.getOrCreate(i.object.textEditorModel,S.CancellationToken.None)).getTopLevelSymbols()}finally{i.dispose()}})})}),define(J[718],ee([1,0,7,76,44,56,6,2,47,440]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=void 0;let h=class extends b.Disposable{get enabled(){return this._enabled}set enabled(n){n?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=n}constructor(n,t,i={},s){var r;super(),this._link=t,this._enabled=!0,this.el=(0,S.append)(n,(0,S.$)("a.monaco-link",{tabIndex:(r=t.tabIndex)!==null&&r!==void 0?r:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const c=this._register(new k.DomEmitter(this.el,"click")),g=this._register(new k.DomEmitter(this.el,"keypress")),o=w.Event.chain(g.event).map(d=>new y.StandardKeyboardEvent(d)).filter(d=>d.keyCode===3).event,l=this._register(new k.DomEmitter(this.el,D.EventType.Tap)).event;this._register(D.Gesture.addTarget(this.el));const a=w.Event.any(c.event,o,l);this._register(a(d=>{this.enabled&&(S.EventHelper.stop(d,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};h=Ne([fe(3,_.IOpenerService)],h),e.Link=h}),define(J[71],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.Progress=e.emptyProgressRunner=e.IProgressService=void 0,e.IProgressService=(0,S.createDecorator)("progressService"),e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class k{constructor(D){this.callback=D}report(D){this._value=D,this.callback(this._value)}}k.None=Object.freeze({report(){}}),e.Progress=k,e.IEditorProgressService=(0,S.createDecorator)("editorProgressService")}),define(J[719],ee([1,0,12,21,2]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var D;(function(h){h[h.NO_ACTION=0]="NO_ACTION",h[h.CLOSE_PICKER=1]="CLOSE_PICKER",h[h.REFRESH_PICKER=2]="REFRESH_PICKER",h[h.REMOVE_ITEM=3]="REMOVE_ITEM"})(D=e.TriggerAction||(e.TriggerAction={}));function w(h){const m=h;return Array.isArray(m.items)}function b(h){const m=h;return!!m.picks&&m.additionalPicks instanceof Promise}class _ extends y.Disposable{constructor(m,n){super(),this.prefix=m,this.options=n}provide(m,n,t){var i;const s=new y.DisposableStore;m.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),m.matchOnLabel=m.matchOnDescription=m.matchOnDetail=m.sortByLabel=!1;let r;const c=s.add(new y.MutableDisposable),g=()=>Ee(this,void 0,void 0,function*(){const o=c.value=new y.DisposableStore;r?.dispose(!0),m.busy=!1,r=new k.CancellationTokenSource(n);const l=r.token,a=m.value.substr(this.prefix.length).trim(),d=this._getPicks(a,o,l,t),u=(C,f)=>{var v;let p,L;if(w(C)?(p=C.items,L=C.active):p=C,p.length===0){if(f)return!1;(a.length>0||m.hideInput)&&(!((v=this.options)===null||v===void 0)&&v.noResultsPick)&&(p=[this.options.noResultsPick])}return m.items=p,L&&(m.activeItems=[L]),!0};if(d!==null)if(b(d)){let C=!1,f=!1;yield Promise.all([(()=>Ee(this,void 0,void 0,function*(){yield(0,S.timeout)(_.FAST_PICKS_RACE_DELAY),!l.isCancellationRequested&&(f||(C=u(d.picks,!0)))}))(),(()=>Ee(this,void 0,void 0,function*(){m.busy=!0;try{const v=yield d.additionalPicks;if(l.isCancellationRequested)return;let p,L;w(d.picks)?(p=d.picks.items,L=d.picks.active):p=d.picks;let E,I;if(w(v)?(E=v.items,I=v.active):E=v,E.length>0||!C){let T;if(!L&&!I){const F=m.activeItems[0];F&&p.indexOf(F)!==-1&&(T=F)}u({items:[...p,...E],active:L||I||T})}}finally{l.isCancellationRequested||(m.busy=!1),f=!0}}))()])}else if(!(d instanceof Promise))u(d);else{m.busy=!0;try{const C=yield d;if(l.isCancellationRequested)return;u(C)}finally{l.isCancellationRequested||(m.busy=!1)}}});return s.add(m.onDidChangeValue(()=>g())),g(),s.add(m.onDidAccept(o=>{const[l]=m.selectedItems;typeof l?.accept=="function"&&(o.inBackground||m.hide(),l.accept(m.keyMods,o))})),s.add(m.onDidTriggerItemButton(({button:o,item:l})=>Ee(this,void 0,void 0,function*(){var a,d;if(typeof l.trigger=="function"){const u=(d=(a=l.buttons)===null||a===void 0?void 0:a.indexOf(o))!==null&&d!==void 0?d:-1;if(u>=0){const C=l.trigger(u,m.keyMods),f=typeof C=="number"?C:yield C;if(n.isCancellationRequested)return;switch(f){case D.NO_ACTION:break;case D.CLOSE_PICKER:m.hide();break;case D.REFRESH_PICKER:g();break;case D.REMOVE_ITEM:{const v=m.items.indexOf(l);if(v!==-1){const p=m.items.slice(),L=p.splice(v,1),E=m.activeItems.filter(T=>T!==L[0]),I=m.keepScrollPosition;m.keepScrollPosition=!0,m.items=p,E&&(m.activeItems=E),m.keepScrollPosition=I}break}}}}}))),s}}_.FAST_PICKS_RACE_DELAY=200,e.PickerQuickAccessProvider=_}),define(J[720],ee([1,0,7,44,66,214,2,102,162]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const _=S.$;class h extends w.Disposable{constructor(n,t,i){super(),this.parent=n,this.onKeyDown=r=>S.addDisposableListener(this.findInput.inputBox.inputElement,S.EventType.KEY_DOWN,c=>{r(new k.StandardKeyboardEvent(c))}),this.onMouseDown=r=>S.addDisposableListener(this.findInput.inputBox.inputElement,S.EventType.MOUSE_DOWN,c=>{r(new y.StandardMouseEvent(c))}),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=S.append(this.parent,_(".quick-input-box")),this.findInput=this._register(new D.FindInput(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const s=this.findInput.inputBox.inputElement;s.role="combobox",s.ariaHasPopup="menu",s.ariaAutoComplete="list",s.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(n){this.findInput.setValue(n)}select(n=null){this.findInput.inputBox.select(n)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(n){this.findInput.inputBox.setPlaceHolder(n)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(n){this.findInput.inputBox.inputElement.type=n?"password":"text"}set enabled(n){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!n)}set toggles(n){this.findInput.setAdditionalToggles(n)}setAttribute(n,t){this.findInput.inputBox.inputElement.setAttribute(n,t)}showDecoration(n){n===b.default.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:n===b.default.Info?1:n===b.default.Warning?2:3,content:""})}stylesForType(n){return this.findInput.inputBox.stylesForType(n===b.default.Info?1:n===b.default.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}e.QuickInputBox=h}),define(J[313],ee([1,0,7,76,6,44,56,140,155,355,683,162]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderQuickInputDescription=e.getIconClass=void 0;const n={},t=new _.IdGenerator("quick-input-button-icon-");function i(r){if(!r)return;let c;const g=r.dark.toString();return n[g]?c=n[g]:(c=t.nextId(),S.createCSSRule(`.${c}, .hc-light .${c}`,`background-image: ${S.asCSSUrl(r.light||r.dark)}`),S.createCSSRule(`.vs-dark .${c}, .hc-black .${c}`,`background-image: ${S.asCSSUrl(r.dark)}`),n[g]=c),c}e.getIconClass=i;function s(r,c,g){S.reset(c);const o=(0,h.parseLinkedText)(r);let l=0;for(const a of o.nodes)if(typeof a=="string")c.append(...(0,b.renderLabelWithIcons)(a));else{let d=a.title;!d&&a.href.startsWith("command:")?d=(0,m.localize)(0,null,a.href.substring(8)):d||(d=a.href);const u=S.$("a",{href:a.href,title:d,tabIndex:l++},a.label);u.style.textDecoration="underline";const C=E=>{S.isEventLike(E)&&S.EventHelper.stop(E,!0),g.callback(a.href)},f=g.disposables.add(new k.DomEmitter(u,S.EventType.CLICK)).event,v=g.disposables.add(new k.DomEmitter(u,S.EventType.KEY_DOWN)).event,p=g.disposables.add(y.Event.chain(v)).filter(E=>{const I=new D.StandardKeyboardEvent(E);return I.equals(10)||I.equals(3)}).event;g.disposables.add(w.Gesture.addTarget(u));const L=g.disposables.add(new k.DomEmitter(u,w.EventType.Tap)).event;y.Event.any(f,L,p)(C,null,g.disposables),c.appendChild(u)}}e.renderQuickInputDescription=s}),define(J[721],ee([1,0,7,44,69,212,208,16,12,354,99,11,6,113,2,17,9,18,682,313,162]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const a=S.$;class d{get checked(){return!!this._checked}set checked(F){F!==this._checked&&(this._checked=F,this._onChecked.fire(F))}constructor(F){this.hidden=!1,this._onChecked=new t.Emitter,this.onChecked=this._onChecked.event,Object.assign(this,F)}dispose(){this._onChecked.dispose()}}class u{get templateId(){return u.ID}renderTemplate(F){const R=Object.create(null);R.toDisposeElement=[],R.toDisposeTemplate=[],R.entry=S.append(F,a(".quick-input-list-entry"));const M=S.append(R.entry,a("label.quick-input-list-label"));R.toDisposeTemplate.push(S.addStandardDisposableListener(M,S.EventType.CLICK,U=>{R.checkbox.offsetParent||U.preventDefault()})),R.checkbox=S.append(M,a("input.quick-input-list-checkbox")),R.checkbox.type="checkbox",R.toDisposeTemplate.push(S.addStandardDisposableListener(R.checkbox,S.EventType.CHANGE,U=>{R.element.checked=R.checkbox.checked}));const N=S.append(M,a(".quick-input-list-rows")),A=S.append(N,a(".quick-input-list-row")),P=S.append(N,a(".quick-input-list-row"));R.label=new D.IconLabel(A,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const x=S.append(A,a(".quick-input-list-entry-keybinding"));R.keybinding=new w.KeybindingLabel(x,r.OS);const W=S.append(P,a(".quick-input-list-label-meta"));return R.detail=new D.IconLabel(W,{supportHighlights:!0,supportIcons:!0}),R.separator=S.append(R.entry,a(".quick-input-list-separator")),R.actionBar=new y.ActionBar(R.entry),R.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),R.toDisposeTemplate.push(R.actionBar),R}renderElement(F,R,M){M.element=F,F.element=(0,g.withNullAsUndefined)(M.entry);const N=F.item?F.item:F.separator;M.checkbox.checked=F.checked,M.toDisposeElement.push(F.onChecked(O=>M.checkbox.checked=O));const{labelHighlights:A,descriptionHighlights:P,detailHighlights:x}=F,W=Object.create(null);W.matches=A||[],W.descriptionTitle=F.saneDescription,W.descriptionMatches=P||[],N.type!=="separator"?(W.extraClasses=N.iconClasses,W.italic=N.italic,W.strikethrough=N.strikethrough,M.entry.classList.remove("quick-input-list-separator-as-item")):M.entry.classList.add("quick-input-list-separator-as-item"),M.label.setLabel(F.saneLabel,F.saneDescription,W),M.keybinding.set(N.type==="separator"?void 0:N.keybinding),F.saneDetail&&M.detail.setLabel(F.saneDetail,void 0,{matches:x,title:F.saneDetail}),F.item&&F.separator&&F.separator.label?(M.separator.textContent=F.separator.label,M.separator.style.display=""):M.separator.style.display="none",M.entry.classList.toggle("quick-input-list-separator-border",!!F.separator);const U=N.buttons;U&&U.length?(M.actionBar.push(U.map((O,$)=>{let Q=O.iconClass||(O.iconPath?(0,l.getIconClass)(O.iconPath):void 0);return O.alwaysVisible&&(Q=Q?`${Q} always-visible`:"always-visible"),{id:`id-${$}`,class:Q,enabled:!0,label:"",tooltip:O.tooltip||"",run:()=>{N.type!=="separator"?F.fireButtonTriggered({button:O,item:N}):F.fireSeparatorButtonTriggered({button:O,separator:N})}}}),{icon:!0,label:!1}),M.entry.classList.add("has-actions")):M.entry.classList.remove("has-actions")}disposeElement(F,R,M){M.toDisposeElement=(0,s.dispose)(M.toDisposeElement),M.actionBar.clear()}disposeTemplate(F){F.toDisposeElement=(0,s.dispose)(F.toDisposeElement),F.toDisposeTemplate=(0,s.dispose)(F.toDisposeTemplate)}}u.ID="listelement";class C{getHeight(F){return F.item?F.saneDetail?44:22:24}getTemplateId(F){return u.ID}}var f;(function(T){T[T.First=1]="First",T[T.Second=2]="Second",T[T.Last=3]="Last",T[T.Next=4]="Next",T[T.Previous=5]="Previous",T[T.NextPage=6]="NextPage",T[T.PreviousPage=7]="PreviousPage"})(f=e.QuickInputListFocus||(e.QuickInputListFocus={}));class v{constructor(F,R,M){this.parent=F,this.options=M,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new t.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new t.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new t.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new t.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new t.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new t.Emitter,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new t.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new t.Emitter,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=R,this.container=S.append(this.parent,a(".quick-input-list"));const N=new C,A=new I;this.list=M.createList("QuickInput",this.container,N,[new u],{identityProvider:{getId:x=>x.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:A}),this.list.getHTMLElement().id=R,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(x=>{const W=new k.StandardKeyboardEvent(x);switch(W.keyCode){case 10:this.toggleCheckbox();break;case 31:(r.isMacintosh?x.metaKey:x.ctrlKey)&&this.list.setFocus((0,b.range)(this.list.length));break;case 16:{const U=this.list.getFocus();U.length===1&&U[0]===0&&this._onLeave.fire();break}case 18:{const U=this.list.getFocus();U.length===1&&U[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(W)})),this.disposables.push(this.list.onMouseDown(x=>{x.browserEvent.button!==2&&x.browserEvent.preventDefault()})),this.disposables.push(S.addDisposableListener(this.container,S.EventType.CLICK,x=>{(x.x||x.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(x=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(x=>{typeof x.index=="number"&&(x.browserEvent.preventDefault(),this.list.setSelection([x.index]))}));const P=new _.ThrottledDelayer(M.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(x=>Ee(this,void 0,void 0,function*(){var W;if(x.browserEvent.target instanceof HTMLAnchorElement){P.cancel();return}if(!(!(x.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&S.isAncestor(x.browserEvent.relatedTarget,(W=x.element)===null||W===void 0?void 0:W.element)))try{yield P.trigger(()=>Ee(this,void 0,void 0,function*(){x.element&&this.showHover(x.element)}))}catch(U){if(!(0,n.isCancellationError)(U))throw U}}))),this.disposables.push(this.list.onMouseOut(x=>{var W;S.isAncestor(x.browserEvent.relatedTarget,(W=x.element)===null||W===void 0?void 0:W.element)||P.cancel()})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown,P)}get onDidChangeFocus(){return t.Event.map(this.list.onDidChangeFocus,F=>F.elements.map(R=>R.item))}get onDidChangeSelection(){return t.Event.map(this.list.onDidChangeSelection,F=>({items:F.elements.map(R=>R.item),event:F.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(F){this.list.scrollTop=F}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(F){this.list.getHTMLElement().ariaLabel=F}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(F,R=!0){for(let M=0,N=F.length;M<N;M++){const A=F[M];if(!A.hidden)if(A.checked)R=!0;else return!1}return R}getCheckedCount(){let F=0;const R=this.elements;for(let M=0,N=R.length;M<N;M++)R[M].checked&&F++;return F}getVisibleCount(){let F=0;const R=this.elements;for(let M=0,N=R.length;M<N;M++)R[M].hidden||F++;return F}setAllVisibleChecked(F){try{this._fireCheckedEvents=!1,this.elements.forEach(R=>{R.hidden||(R.checked=F)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(F){this.elementDisposables=(0,s.dispose)(this.elementDisposables);const R=N=>this.fireButtonTriggered(N),M=N=>this.fireSeparatorButtonTriggered(N);this.inputElements=F,this.elements=F.reduce((N,A,P)=>{var x,W,U;const O=P&&F[P-1],$=A.label?A.label.replace(/\\r?\\n/g," "):"",Q=(0,i.parseLabelWithIcons)($).text.trim();let se,le,te,re,H,B,j;A.type!=="separator"&&(se=A.meta&&A.meta.replace(/\\r?\\n/g," "),le=A.description&&A.description.replace(/\\r?\\n/g," "),te=A.detail&&A.detail.replace(/\\r?\\n/g," "),re=(x=A.highlights)===null||x===void 0?void 0:x.label,H=(W=A.highlights)===null||W===void 0?void 0:W.description,B=(U=A.highlights)===null||U===void 0?void 0:U.detail,j=A.tooltip);const G=A.ariaLabel||[$,le,te].map(he=>(0,i.getCodiconAriaLabel)(he)).filter(he=>!!he).join(", "),Y=this.parent.classList.contains("show-checkboxes");let ne;if(A.type==="separator"){if(!A.buttons)return N;ne=A}else O&&O.type==="separator"&&!O.buttons&&(ne=O);const de=new d({hasCheckbox:Y,index:P,item:A.type!=="separator"?A:void 0,saneLabel:$,saneSortLabel:Q,saneMeta:se,saneAriaLabel:G,saneDescription:le,saneDetail:te,saneTooltip:j,labelHighlights:re,descriptionHighlights:H,detailHighlights:B,checked:!1,separator:ne,fireButtonTriggered:R,fireSeparatorButtonTriggered:M});return this.elementDisposables.push(de),this.elementDisposables.push(de.onChecked(()=>this.fireCheckedEvents())),N.push(de),N},[]),this.elementsToIndexes=this.elements.reduce((N,A,P)=>{var x;return N.set((x=A.item)!==null&&x!==void 0?x:A.separator,P),N},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(F=>F.item)}setFocusedElements(F){if(this.list.setFocus(F.filter(R=>this.elementsToIndexes.has(R)).map(R=>this.elementsToIndexes.get(R))),F.length>0){const R=this.list.getFocus()[0];typeof R=="number"&&this.list.reveal(R)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(F){this.list.setSelection(F.filter(R=>this.elementsToIndexes.has(R)).map(R=>this.elementsToIndexes.get(R)))}getCheckedElements(){return this.elements.filter(F=>F.checked).map(F=>F.item).filter(F=>!!F)}setCheckedElements(F){try{this._fireCheckedEvents=!1;const R=new Set;for(const M of F)R.add(M);for(const M of this.elements)M.checked=R.has(M.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(F){this.list.getHTMLElement().style.pointerEvents=F?"":"none"}focus(F){if(!this.list.length)return;switch(F===f.Second&&this.list.length<2&&(F=f.First),F){case f.First:this.list.scrollTop=0,this.list.focusFirst(void 0,M=>!!M.item);break;case f.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,M=>!!M.item);break;case f.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,M=>!!M.item);break;case f.Next:{this.list.focusNext(void 0,!0,void 0,N=>!!N.item);const M=this.list.getFocus()[0];M!==0&&!this.elements[M-1].item&&this.list.firstVisibleIndex>M-1&&this.list.reveal(M-1);break}case f.Previous:{this.list.focusPrevious(void 0,!0,void 0,N=>!!N.item);const M=this.list.getFocus()[0];M!==0&&!this.elements[M-1].item&&this.list.firstVisibleIndex>M-1&&this.list.reveal(M-1);break}case f.NextPage:this.list.focusNextPage(void 0,M=>!!M.item);break;case f.PreviousPage:this.list.focusPreviousPage(void 0,M=>!!M.item);break}const R=this.list.getFocus()[0];typeof R=="number"&&this.list.reveal(R)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(F){var R,M,N;this._lastHover&&!this._lastHover.isDisposed&&((M=(R=this.options.hoverDelegate).onDidHideHover)===null||M===void 0||M.call(R),(N=this._lastHover)===null||N===void 0||N.dispose()),!(!F.element||!F.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:F.saneTooltip,target:F.element,linkHandler:A=>{this.options.linkOpenerDelegate(A)},showPointer:!0,container:this.container,hoverPosition:1},!1))}layout(F){this.list.getHTMLElement().style.maxHeight=F?`${Math.floor(F/44)*44+6}px`:"",this.list.layout()}filter(F){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const R=F;if(F=F.trim(),!F||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(N=>{N.labelHighlights=void 0,N.descriptionHighlights=void 0,N.detailHighlights=void 0,N.hidden=!1;const A=N.index&&this.inputElements[N.index-1];N.item&&(N.separator=A&&A.type==="separator"&&!A.buttons?A:void 0)});else{let N;this.elements.forEach(A=>{let P;this.matchOnLabelMode==="fuzzy"?P=this.matchOnLabel?(0,g.withNullAsUndefined)((0,i.matchesFuzzyIconAware)(F,(0,i.parseLabelWithIcons)(A.saneLabel))):void 0:P=this.matchOnLabel?(0,g.withNullAsUndefined)(p(R,(0,i.parseLabelWithIcons)(A.saneLabel))):void 0;const x=this.matchOnDescription?(0,g.withNullAsUndefined)((0,i.matchesFuzzyIconAware)(F,(0,i.parseLabelWithIcons)(A.saneDescription||""))):void 0,W=this.matchOnDetail?(0,g.withNullAsUndefined)((0,i.matchesFuzzyIconAware)(F,(0,i.parseLabelWithIcons)(A.saneDetail||""))):void 0,U=this.matchOnMeta?(0,g.withNullAsUndefined)((0,i.matchesFuzzyIconAware)(F,(0,i.parseLabelWithIcons)(A.saneMeta||""))):void 0;if(P||x||W||U?(A.labelHighlights=P,A.descriptionHighlights=x,A.detailHighlights=W,A.hidden=!1):(A.labelHighlights=void 0,A.descriptionHighlights=void 0,A.detailHighlights=void 0,A.hidden=A.item?!A.item.alwaysShow:!0),!this.sortByLabel){const O=A.index&&this.inputElements[A.index-1];N=O&&O.type==="separator"?O:N,N&&!A.hidden&&(A.separator=N,N=void 0)}})}const M=this.elements.filter(N=>!N.hidden);if(this.sortByLabel&&F){const N=F.toLowerCase();M.sort((A,P)=>E(A,P,N))}return this.elementsToIndexes=M.reduce((N,A,P)=>{var x;return N.set((x=A.item)!==null&&x!==void 0?x:A.separator,P),N},new Map),this.list.splice(0,this.list.length,M),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(M.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const F=this.list.getFocusedElements(),R=this.allVisibleChecked(F);for(const M of F)M.checked=!R}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(F){this.container.style.display=F?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,s.dispose)(this.elementDisposables),this.disposables=(0,s.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(F){this._onButtonTriggered.fire(F)}fireSeparatorButtonTriggered(F){this._onSeparatorButtonTriggered.fire(F)}style(F){this.list.style(F)}toggleHover(){if(!this.list.getFocusedElements()[0].saneTooltip)return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const R=this.list.getFocusedElements()[0];if(!R)return;this.showHover(R);const M=new s.DisposableStore;M.add(this.list.onDidChangeFocus(N=>{N.indexes.length&&this.showHover(N.elements[0])})),this._lastHover&&M.add(this._lastHover),this._toggleHover=M,this.elementDisposables.push(this._toggleHover)}}Ne([m.memoize],v.prototype,"onDidChangeFocus",null),Ne([m.memoize],v.prototype,"onDidChangeSelection",null),e.QuickInputList=v;function p(T,F){const{text:R,iconOffsets:M}=F;if(!M||M.length===0)return L(T,R);const N=(0,c.ltrim)(R," "),A=R.length-N.length,P=L(T,N);if(P)for(const x of P){const W=M[x.start+A]+A;x.start+=W,x.end+=W}return P}function L(T,F){const R=F.toLowerCase().indexOf(T.toLowerCase());return R!==-1?[{start:R,end:R+T.length}]:null}function E(T,F,R){const M=T.labelHighlights||[],N=F.labelHighlights||[];return M.length&&!N.length?-1:!M.length&&N.length?1:M.length===0&&N.length===0?0:(0,h.compareAnything)(T.saneSortLabel,F.saneSortLabel,R)}class I{getWidgetAriaLabel(){return(0,o.localize)(0,null)}getAriaLabel(F){var R;return!((R=F.separator)===null||R===void 0)&&R.label?`${F.saneAriaLabel}, ${F.separator.label}`:F.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(F){return F.hasCheckbox?"checkbox":"option"}isChecked(F){if(F.hasCheckbox)return{value:F.checked,onDidChange:F.onChecked}}}}),define(J[78],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=e.quickPickItemScorerAccessor=e.QuickPickItemScorerAccessor=e.ItemActivation=e.QuickInputHideReason=e.NO_KEY_MODS=void 0,e.NO_KEY_MODS={ctrlCmd:!1,alt:!1};var k;(function(w){w[w.Blur=1]="Blur",w[w.Gesture=2]="Gesture",w[w.Other=3]="Other"})(k=e.QuickInputHideReason||(e.QuickInputHideReason={}));var y;(function(w){w[w.NONE=0]="NONE",w[w.FIRST=1]="FIRST",w[w.SECOND=2]="SECOND",w[w.LAST=3]="LAST"})(y=e.ItemActivation||(e.ItemActivation={}));class D{constructor(b){this.options=b}}e.QuickPickItemScorerAccessor=D,e.quickPickItemScorerAccessor=new D,e.IQuickInputService=(0,S.createDecorator)("quickInputService")}),define(J[722],ee([1,0,7,44,69,540,282,534,142,41,16,12,21,29,6,2,17,102,32,18,681,78,720,721,313,162]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const v=S.$,p={iconClass:o.ThemeIcon.asClassName(i.Codicon.quickInputBack),tooltip:(0,a.localize)(0,null),handle:-1};class L extends r.Disposable{constructor(R){super(),this.ui=R,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=L.noPromptMessage,this._severity=g.default.Ignore,this.onDidTriggerButtonEmitter=this._register(new s.Emitter),this.onDidHideEmitter=this._register(new s.Emitter),this.onDisposeEmitter=this._register(new s.Emitter),this.visibleDisposables=this._register(new r.DisposableStore),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(R){this._title=R,this.update()}get description(){return this._description}set description(R){this._description=R,this.update()}get step(){return this._steps}set step(R){this._steps=R,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(R){this._totalSteps=R,this.update()}get enabled(){return this._enabled}set enabled(R){this._enabled=R,this.update()}get contextKey(){return this._contextKey}set contextKey(R){this._contextKey=R,this.update()}get busy(){return this._busy}set busy(R){this._busy=R,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(R){const M=this._ignoreFocusOut!==R&&!c.isIOS;this._ignoreFocusOut=R&&!c.isIOS,M&&this.update()}get buttons(){return this._buttons}set buttons(R){this._buttons=R,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(R){this._toggles=R??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(R){this._validationMessage=R,this.update()}get severity(){return this._severity}set severity(R){this._severity=R,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(R=>{this.buttons.indexOf(R)!==-1&&this.onDidTriggerButtonEmitter.fire(R)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(R=d.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:R})}update(){var R,M;if(!this.visible)return;const N=this.getTitle();N&&this.ui.title.textContent!==N?this.ui.title.textContent=N:!N&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\\xA0");const A=this.getDescription();if(this.ui.description1.textContent!==A&&(this.ui.description1.textContent=A),this.ui.description2.textContent!==A&&(this.ui.description2.textContent=A),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 x=this.buttons.filter(U=>U===p);this.ui.leftActionBar.push(x.map((U,O)=>{const $=new h.Action(`id-${O}`,"",U.iconClass||(0,f.getIconClass)(U.iconPath),!0,()=>Ee(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(U)}));return $.tooltip=U.tooltip||"",$}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const W=this.buttons.filter(U=>U!==p);this.ui.rightActionBar.push(W.map((U,O)=>{const $=new h.Action(`id-${O}`,"",U.iconClass||(0,f.getIconClass)(U.iconPath),!0,()=>Ee(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(U)}));return $.tooltip=U.tooltip||"",$}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const x=(M=(R=this.toggles)===null||R===void 0?void 0:R.filter(W=>W instanceof _.Toggle))!==null&&M!==void 0?M:[];this.ui.inputBox.toggles=x}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const P=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==P&&(this._lastValidationMessage=P,S.reset(this.ui.message),(0,f.renderQuickInputDescription)(P,this.ui.message,{callback:x=>{this.ui.linkOpenerDelegate(x)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}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?(0,a.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(R){if(this.ui.inputBox.showDecoration(R),R!==g.default.Ignore){const M=this.ui.inputBox.stylesForType(R);this.ui.message.style.color=M.foreground?`${M.foreground}`:"",this.ui.message.style.backgroundColor=M.background?`${M.background}`:"",this.ui.message.style.border=M.border?`1px solid ${M.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}L.noPromptMessage=(0,a.localize)(1,null);class E extends L{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new s.Emitter),this.onWillAcceptEmitter=this._register(new s.Emitter),this.onDidAcceptEmitter=this._register(new s.Emitter),this.onDidCustomEmitter=this._register(new s.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=d.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new s.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new s.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new s.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new s.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=R=>R,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(R){this._quickNavigate=R,this.update()}get value(){return this._value}set value(R){this.doSetValue(R)}doSetValue(R,M){this._value!==R&&(this._value=R,M||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(R){this._ariaLabel=R,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(R){this._placeholder=R,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(R){this.ui.list.scrollTop=R}set items(R){this._items=R,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(R){this._canSelectMany=R,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(R){this._canAcceptInBackground=R}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(R){this._matchOnDescription=R,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(R){this._matchOnDetail=R,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(R){this._matchOnLabel=R,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(R){this._matchOnLabelMode=R,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(R){this._sortByLabel=R,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(R){this._autoFocusOnList=R,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(R){this._keepScrollPosition=R}get itemActivation(){return this._itemActivation}set itemActivation(R){this._itemActivation=R}get activeItems(){return this._activeItems}set activeItems(R){this._activeItems=R,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(R){this._selectedItems=R,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?d.NO_KEY_MODS:this.ui.keyMods}set valueSelection(R){this._valueSelection=R,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(R){this._customButton=R,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(R){this._customButtonLabel=R,this.update()}get customHover(){return this._customButtonHover}set customHover(R){this._customButtonHover=R,this.update()}get ok(){return this._ok}set ok(R){this._ok=R,this.update()}get hideInput(){return!!this._hideInput}set hideInput(R){this._hideInput=R,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(C.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(R=>{this.doSetValue(R,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(R=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(R=>{switch(R.keyCode){case 18:this.ui.list.focus(C.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),S.EventHelper.stop(R,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(C.QuickInputListFocus.Previous):this.ui.list.focus(C.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),S.EventHelper.stop(R,!0);break;case 12:this.ui.list.focus(C.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),S.EventHelper.stop(R,!0);break;case 11:this.ui.list.focus(C.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),S.EventHelper.stop(R,!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.handleAccept(!0));break;case 14:(R.ctrlKey||R.metaKey)&&!R.shiftKey&&!R.altKey&&(this.ui.list.focus(C.QuickInputListFocus.First),S.EventHelper.stop(R,!0));break;case 13:(R.ctrlKey||R.metaKey)&&!R.shiftKey&&!R.altKey&&(this.ui.list.focus(C.QuickInputListFocus.Last),S.EventHelper.stop(R,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(R=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,m.equals)(R,this._activeItems,(M,N)=>M===N)||(this._activeItems=R,this.onDidChangeActiveEmitter.fire(R))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:R,event:M})=>{if(this.canSelectMany){R.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,m.equals)(R,this._selectedItems,(N,A)=>N===A)||(this._selectedItems=R,this.onDidChangeSelectionEmitter.fire(R),R.length&&this.handleAccept(M instanceof MouseEvent&&M.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(R=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,m.equals)(R,this._selectedItems,(M,N)=>M===N)||(this._selectedItems=R,this.onDidChangeSelectionEmitter.fire(R)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(R=>this.onDidTriggerItemButtonEmitter.fire(R))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(R=>this.onDidTriggerSeparatorButtonEmitter.fire(R))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(R){let M=!1;this.onWillAcceptEmitter.fire({veto:()=>M=!0}),M||this.onDidAcceptEmitter.fire({inBackground:R})}registerQuickNavigation(){return S.addDisposableListener(this.ui.container,S.EventType.KEY_UP,R=>{if(this.canSelectMany||!this._quickNavigate)return;const M=new k.StandardKeyboardEvent(R),N=M.keyCode;this._quickNavigate.keybindings.some(x=>{const W=x.getChords();return W.length>1?!1:W[0].shiftKey&&N===4?!(M.ctrlKey||M.altKey||M.metaKey):!!(W[0].altKey&&N===6||W[0].ctrlKey&&N===5||W[0].metaKey&&N===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const R=this.keepScrollPosition?this.scrollTop:0,M=!!this.description,N={title:!!this.title||!!this.step||!!this.buttons.length,description:M,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||M,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(N),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||"");let A=this.ariaLabel;if(A||(A=this.placeholder||E.DEFAULT_ARIA_LABEL,this.title&&(A+=` - ${this.title}`)),this.ui.list.ariaLabel!==A&&(this.ui.list.ariaLabel=A),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,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 d.ItemActivation.NONE:this._itemActivation=d.ItemActivation.FIRST;break;case d.ItemActivation.SECOND:this.ui.list.focus(C.QuickInputListFocus.Second),this._itemActivation=d.ItemActivation.FIRST;break;case d.ItemActivation.LAST:this.ui.list.focus(C.QuickInputListFocus.Last),this._itemActivation=d.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)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",N.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(C.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=R)}}E.DEFAULT_ARIA_LABEL=(0,a.localize)(3,null);class I extends L{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new s.Emitter),this.onDidAcceptEmitter=this._register(new s.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(R){this._value=R||"",this.update()}get placeholder(){return this._placeholder}set placeholder(R){this._placeholder=R,this.update()}get password(){return this._password}set password(R){this._password=R,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(R=>{R!==this.value&&(this._value=R,this.onDidValueChangeEmitter.fire(R))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const R={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0};this.ui.setVisibilities(R),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||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}class T extends r.Disposable{constructor(R){super(),this.options=R,this.enabled=!0,this.onDidAcceptEmitter=this._register(new s.Emitter),this.onDidCustomEmitter=this._register(new s.Emitter),this.onDidTriggerButtonEmitter=this._register(new s.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new s.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new s.Emitter),this.onHide=this.onHideEmitter.event,this.idPrefix=R.idPrefix,this.parentElement=R.container,this.styles=R.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const R=M=>{this.keyMods.ctrlCmd=M.ctrlKey||M.metaKey,this.keyMods.alt=M.altKey};this._register(S.addDisposableListener(window,S.EventType.KEY_DOWN,R,!0)),this._register(S.addDisposableListener(window,S.EventType.KEY_UP,R,!0)),this._register(S.addDisposableListener(window,S.EventType.MOUSE_DOWN,R,!0))}getUI(){if(this.ui)return this.ui;const R=S.append(this.parentElement,v(".quick-input-widget.show-file-icons"));R.tabIndex=-1,R.style.display="none";const M=S.createStyleSheet(R),N=S.append(R,v(".quick-input-titlebar")),A=this._register(new y.ActionBar(N));A.domNode.classList.add("quick-input-left-action-bar");const P=S.append(N,v(".quick-input-title")),x=this._register(new y.ActionBar(N));x.domNode.classList.add("quick-input-right-action-bar");const W=S.append(R,v(".quick-input-description")),U=S.append(R,v(".quick-input-header")),O=S.append(U,v("input.quick-input-check-all"));O.type="checkbox",O.setAttribute("aria-label",(0,a.localize)(4,null)),this._register(S.addStandardDisposableListener(O,S.EventType.CHANGE,V=>{const K=O.checked;ce.setAllVisibleChecked(K)})),this._register(S.addDisposableListener(O,S.EventType.CLICK,V=>{(V.x||V.y)&&le.setFocus()}));const $=S.append(U,v(".quick-input-description")),Q=S.append(U,v(".quick-input-and-message")),se=S.append(Q,v(".quick-input-filter")),le=this._register(new u.QuickInputBox(se,this.styles.inputBox,this.styles.toggle));le.setAttribute("aria-describedby",`${this.idPrefix}message`);const te=S.append(se,v(".quick-input-visible-count"));te.setAttribute("aria-live","polite"),te.setAttribute("aria-atomic","true");const re=new w.CountBadge(te,{countFormat:(0,a.localize)(5,null)},this.styles.countBadge),H=S.append(se,v(".quick-input-count"));H.setAttribute("aria-live","polite");const B=new w.CountBadge(H,{countFormat:(0,a.localize)(6,null)},this.styles.countBadge),j=S.append(U,v(".quick-input-action")),G=new D.Button(j,this.styles.button);G.label=(0,a.localize)(7,null),this._register(G.onDidClick(V=>{this.onDidAcceptEmitter.fire()}));const Y=S.append(U,v(".quick-input-action")),ne=new D.Button(Y,this.styles.button);ne.label=(0,a.localize)(8,null),this._register(ne.onDidClick(V=>{this.onDidCustomEmitter.fire()}));const de=S.append(Q,v(`#${this.idPrefix}message.quick-input-message`)),he=new b.ProgressBar(R,this.styles.progressBar);he.getContainer().classList.add("quick-input-progress");const oe=this.idPrefix+"list",ce=this._register(new C.QuickInputList(R,oe,this.options));le.setAttribute("aria-controls",oe),this._register(ce.onDidChangeFocus(()=>{var V;le.setAttribute("aria-activedescendant",(V=ce.getActiveDescendant())!==null&&V!==void 0?V:"")})),this._register(ce.onChangedAllVisibleChecked(V=>{O.checked=V})),this._register(ce.onChangedVisibleCount(V=>{re.setCount(V)})),this._register(ce.onChangedCheckedCount(V=>{B.setCount(V)})),this._register(ce.onLeave(()=>{setTimeout(()=>{le.setFocus(),this.controller instanceof E&&this.controller.canSelectMany&&ce.clearFocus()},0)}));const z=S.trackFocus(R);return this._register(z),this._register(S.addDisposableListener(R,S.EventType.FOCUS,V=>{this.previousFocusElement=V.relatedTarget instanceof HTMLElement?V.relatedTarget:void 0},!0)),this._register(z.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(d.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(S.addDisposableListener(R,S.EventType.FOCUS,V=>{le.setFocus()})),this._register(S.addDisposableListener(R,S.EventType.KEY_DOWN,V=>{const K=new k.StandardKeyboardEvent(V);switch(K.keyCode){case 3:S.EventHelper.stop(V,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:S.EventHelper.stop(V,!0),this.hide(d.QuickInputHideReason.Gesture);break;case 2:if(!K.altKey&&!K.ctrlKey&&!K.metaKey){const ie=[".action-label.codicon"];R.classList.contains("show-checkboxes")?ie.push("input"):ie.push("input[type=text]"),this.getUI().list.isDisplayed()&&ie.push(".monaco-list"),this.getUI().message&&ie.push(".quick-input-message a");const X=R.querySelectorAll(ie.join(", "));K.shiftKey&&K.target===X[0]?(S.EventHelper.stop(V,!0),ce.clearFocus()):!K.shiftKey&&K.target===X[X.length-1]&&(S.EventHelper.stop(V,!0),X[0].focus())}break;case 10:K.ctrlKey&&(S.EventHelper.stop(V,!0),this.getUI().list.toggleHover());break}})),this.ui={container:R,styleSheet:M,leftActionBar:A,titleBar:N,title:P,description1:W,description2:$,rightActionBar:x,checkAll:O,filterContainer:se,inputBox:le,visibleCountContainer:te,visibleCount:re,countContainer:H,count:B,okContainer:j,ok:G,message:de,customButtonContainer:Y,customButton:ne,list:ce,progressBar:he,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:V=>this.show(V),hide:()=>this.hide(),setVisibilities:V=>this.setVisibilities(V),setEnabled:V=>this.setEnabled(V),setContextKey:V=>this.options.setContextKey(V),linkOpenerDelegate:V=>this.options.linkOpenerDelegate(V)},this.updateStyles(),this.ui}pick(R,M={},N=t.CancellationToken.None){return new Promise((A,P)=>{let x=$=>{var Q;x=A,(Q=M.onKeyMods)===null||Q===void 0||Q.call(M,W.keyMods),A($)};if(N.isCancellationRequested){x(void 0);return}const W=this.createQuickPick();let U;const O=[W,W.onDidAccept(()=>{if(W.canSelectMany)x(W.selectedItems.slice()),W.hide();else{const $=W.activeItems[0];$&&(x($),W.hide())}}),W.onDidChangeActive($=>{const Q=$[0];Q&&M.onDidFocus&&M.onDidFocus(Q)}),W.onDidChangeSelection($=>{if(!W.canSelectMany){const Q=$[0];Q&&(x(Q),W.hide())}}),W.onDidTriggerItemButton($=>M.onDidTriggerItemButton&&M.onDidTriggerItemButton(Object.assign(Object.assign({},$),{removeItem:()=>{const Q=W.items.indexOf($.item);if(Q!==-1){const se=W.items.slice(),le=se.splice(Q,1),te=W.activeItems.filter(H=>H!==le[0]),re=W.keepScrollPosition;W.keepScrollPosition=!0,W.items=se,te&&(W.activeItems=te),W.keepScrollPosition=re}}}))),W.onDidTriggerSeparatorButton($=>{var Q;return(Q=M.onDidTriggerSeparatorButton)===null||Q===void 0?void 0:Q.call(M,$)}),W.onDidChangeValue($=>{U&&!$&&(W.activeItems.length!==1||W.activeItems[0]!==U)&&(W.activeItems=[U])}),N.onCancellationRequested(()=>{W.hide()}),W.onDidHide(()=>{(0,r.dispose)(O),x(void 0)})];W.title=M.title,W.canSelectMany=!!M.canPickMany,W.placeholder=M.placeHolder,W.ignoreFocusOut=!!M.ignoreFocusLost,W.matchOnDescription=!!M.matchOnDescription,W.matchOnDetail=!!M.matchOnDetail,W.matchOnLabel=M.matchOnLabel===void 0||M.matchOnLabel,W.autoFocusOnList=M.autoFocusOnList===void 0||M.autoFocusOnList,W.quickNavigate=M.quickNavigate,W.hideInput=!!M.hideInput,W.contextKey=M.contextKey,W.busy=!0,Promise.all([R,M.activeItem]).then(([$,Q])=>{U=Q,W.busy=!1,W.items=$,W.canSelectMany&&(W.selectedItems=$.filter(se=>se.type!=="separator"&&se.picked)),U&&(W.activeItems=[U])}),W.show(),Promise.resolve(R).then(void 0,$=>{P($),W.hide()})})}createQuickPick(){const R=this.getUI();return new E(R)}createInputBox(){const R=this.getUI();return new I(R)}show(R){const M=this.getUI();this.onShowEmitter.fire();const N=this.controller;this.controller=R,N?.didHide(),this.setEnabled(!0),M.leftActionBar.clear(),M.title.textContent="",M.description1.textContent="",M.description2.textContent="",M.rightActionBar.clear(),M.checkAll.checked=!1,M.inputBox.placeholder="",M.inputBox.password=!1,M.inputBox.showDecoration(g.default.Ignore),M.visibleCount.setCount(0),M.count.setCount(0),S.reset(M.message),M.progressBar.stop(),M.list.setElements([]),M.list.matchOnDescription=!1,M.list.matchOnDetail=!1,M.list.matchOnLabel=!0,M.list.sortByLabel=!0,M.ignoreFocusOut=!1,M.inputBox.toggles=void 0;const A=this.options.backKeybindingLabel();p.tooltip=A?(0,a.localize)(9,null,A):(0,a.localize)(10,null),M.container.style.display="",this.updateLayout(),M.inputBox.setFocus()}setVisibilities(R){const M=this.getUI();M.title.style.display=R.title?"":"none",M.description1.style.display=R.description&&(R.inputBox||R.checkAll)?"":"none",M.description2.style.display=R.description&&!(R.inputBox||R.checkAll)?"":"none",M.checkAll.style.display=R.checkAll?"":"none",M.filterContainer.style.display=R.inputBox?"":"none",M.visibleCountContainer.style.display=R.visibleCount?"":"none",M.countContainer.style.display=R.count?"":"none",M.okContainer.style.display=R.ok?"":"none",M.customButtonContainer.style.display=R.customButton?"":"none",M.message.style.display=R.message?"":"none",M.progressBar.getContainer().style.display=R.progressBar?"":"none",M.list.display(!!R.list),M.container.classList.toggle("show-checkboxes",!!R.checkBox),M.container.classList.toggle("hidden-input",!R.inputBox&&!R.description),this.updateLayout()}setEnabled(R){if(R!==this.enabled){this.enabled=R;for(const M of this.getUI().leftActionBar.viewItems)M.action.enabled=R;for(const M of this.getUI().rightActionBar.viewItems)M.action.enabled=R;this.getUI().checkAll.disabled=!R,this.getUI().inputBox.enabled=R,this.getUI().ok.enabled=R,this.getUI().list.enabled=R}}hide(R){var M;const N=this.controller;if(N){const A=!(!((M=this.ui)===null||M===void 0)&&M.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!A){let P=this.previousFocusElement;for(;P&&!P.offsetParent;)P=(0,l.withNullAsUndefined)(P.parentElement);P?.offsetParent?(P.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}N.didHide(R)}}layout(R,M){this.dimension=R,this.titleBarOffset=M,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const R=this.ui.container.style,M=Math.min(this.dimension.width*.62,T.MAX_WIDTH);R.width=M+"px",R.marginLeft="-"+M/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(R){this.styles=R,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:R,quickInputBackground:M,quickInputForeground:N,widgetBorder:A,widgetShadow:P}=this.styles.widget;this.ui.titleBar.style.backgroundColor=R??"",this.ui.container.style.backgroundColor=M??"",this.ui.container.style.color=N??"",this.ui.container.style.border=A?`1px solid ${A}`:"",this.ui.container.style.boxShadow=P?`0 0 8px 2px ${P}`:"",this.ui.list.style(this.styles.list);const x=[];this.styles.pickerGroup.pickerGroupBorder&&x.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&x.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&x.push(`.quick-input-list .quick-input-list-separator-as-item { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(x.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&x.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&x.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&x.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&x.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&x.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),x.push("}"));const W=x.join(`\n`);W!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=W)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}T.MAX_WIDTH=600,e.QuickInputController=T}),define(J[34],ee([1,0,84,18]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class y{constructor(){this.data=new Map}add(w,b){S.ok(k.isString(w)),S.ok(k.isObject(b)),S.ok(!this.data.has(w),"There is already an extension with this id"),this.data.set(w,b)}as(w){return this.data.get(w)||null}}e.Registry=new y}),define(J[723],ee([1,0,131,55,206,20,47,34]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.createDraggedEditorInputFromRawResourcesData=e.extractEditorsDropData=e.CodeDataTransfers=void 0,e.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"};function _(n){var t;const i=[];if(n.dataTransfer&&n.dataTransfer.types.length>0){const c=n.dataTransfer.getData(e.CodeDataTransfers.EDITORS);if(c)try{i.push(...(0,y.parse)(c))}catch{}else try{const l=n.dataTransfer.getData(S.DataTransfers.RESOURCES);i.push(...h(l))}catch{}if(!((t=n.dataTransfer)===null||t===void 0)&&t.files)for(let l=0;l<n.dataTransfer.files.length;l++){const a=n.dataTransfer.files[l];if(a&&a.path)try{i.push({resource:D.URI.file(a.path),isExternal:!0,allowWorkspaceOpen:!0})}catch{}}const g=n.dataTransfer.getData(e.CodeDataTransfers.FILES);if(g)try{const l=JSON.parse(g);for(const a of l)i.push({resource:D.URI.file(a),isExternal:!0,allowWorkspaceOpen:!0})}catch{}const o=b.Registry.as(e.Extensions.DragAndDropContribution).getAll();for(const l of o){const a=n.dataTransfer.getData(l.dataFormatKey);if(a)try{i.push(...l.getEditorInputs(a))}catch{}}}const s=[],r=new k.ResourceMap;for(const c of i)c.resource?r.has(c.resource)||(s.push(c),r.set(c.resource,!0)):s.push(c);return s}e.extractEditorsDropData=_;function h(n){const t=[];if(n){const i=JSON.parse(n);for(const s of i)if(s.indexOf(":")>0){const{selection:r,uri:c}=(0,w.extractSelection)(D.URI.parse(s));t.push({resource:c,options:{selection:r}})}}return t}e.createDraggedEditorInputFromRawResourcesData=h;class m{constructor(){this._contributions=new Map}getAll(){return this._contributions.values()}}e.Extensions={DragAndDropContribution:"workbench.contributions.dragAndDrop"},b.Registry.add(e.Extensions.DragAndDropContribution,new m)}),define(J[314],ee([1,0,131,186,101,20,723]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addExternalEditorsDropData=e.toVSDataTransfer=void 0;function b(n){const t=new k.VSDataTransfer;for(const i of n.items){const s=i.type;if(i.kind==="string"){const r=new Promise(c=>i.getAsString(c));t.append(s,(0,k.createStringDataTransferItem)(r))}else if(i.kind==="file"){const r=i.getAsFile();r&&t.append(s,_(r))}}return t}e.toVSDataTransfer=b;function _(n){const t=n.path?D.URI.parse(n.path):void 0;return(0,k.createFileDataTransferItem)(n.name,t,()=>Ee(this,void 0,void 0,function*(){return new Uint8Array(yield n.arrayBuffer())}))}const h=Object.freeze([w.CodeDataTransfers.EDITORS,w.CodeDataTransfers.FILES,S.DataTransfers.RESOURCES]);function m(n,t,i=!1){var s;if(t.dataTransfer&&(i||!n.has(y.Mimes.uriList))){const r=(0,w.extractEditorsDropData)(t).filter(c=>c.resource).map(c=>c.resource.toString());for(const c of(s=t.dataTransfer)===null||s===void 0?void 0:s.items){const g=c.getAsFile();g&&r.push(g.path?D.URI.file(g.path).toString():g.name)}r.length&&n.replace(y.Mimes.uriList,(0,k.createStringDataTransferItem)(k.UriList.create(r)))}for(const r of h)n.delete(r)}e.addExternalEditorsDropData=m}),define(J[226],ee([1,0,6,34]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function y(b){return b.length>0&&b.charAt(b.length-1)==="#"?b.substring(0,b.length-1):b}class D{constructor(){this._onDidChangeSchema=new S.Emitter,this.schemasById={}}registerSchema(_,h){this.schemasById[y(_)]=h,this._onDidChangeSchema.fire(_)}notifySchemaChanged(_){this._onDidChangeSchema.fire(_)}}const w=new D;k.Registry.add(e.Extensions.JSONContribution,w)}),define(J[90],ee([1,0,16,6,18,670,27,226,34]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperty=e.getDefaultValue=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=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 h=_.Registry.as(b.Extensions.JSONContribution);class m{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new k.Emitter,this._onDidUpdateConfiguration=new k.Emitter,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:D.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},h.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(o,l=!0){this.registerConfigurations([o],l)}registerConfigurations(o,l=!0){const a=new Set;this.doRegisterConfigurations(o,l,a),h.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a})}registerDefaultConfigurations(o){const l=new Set;this.doRegisterDefaultConfigurations(o,l),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:l,defaultsOverrides:!0})}doRegisterDefaultConfigurations(o,l){var a;const d=[];for(const{overrides:u,source:C}of o)for(const f in u)if(l.add(f),e.OVERRIDE_PROPERTY_REGEX.test(f)){const v=this.configurationDefaultsOverrides.get(f),p=(a=v?.valuesSources)!==null&&a!==void 0?a:new Map;if(C)for(const T of Object.keys(u[f]))p.set(T,C);const L=Object.assign(Object.assign({},v?.value||{}),u[f]);this.configurationDefaultsOverrides.set(f,{source:C,value:L,valuesSources:p});const E=(0,w.getLanguageTagSettingPlainKey)(f),I={type:"object",default:L,description:D.localize(1,null,E),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:L,source:y.isString(C)?void 0:C,defaultValueSource:C};d.push(...i(f)),this.configurationProperties[f]=I,this.defaultLanguageConfigurationOverridesNode.properties[f]=I}else{this.configurationDefaultsOverrides.set(f,{value:u[f],source:C});const v=this.configurationProperties[f];v&&(this.updatePropertyDefaultValue(f,v),this.updateSchema(f,v))}this.doRegisterOverrideIdentifiers(d)}registerOverrideIdentifiers(o){this.doRegisterOverrideIdentifiers(o),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(o){for(const l of o)this.overrideIdentifiers.add(l);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(o,l,a){o.forEach(d=>{this.validateAndRegisterProperties(d,l,d.extensionInfo,d.restrictedProperties,void 0,a),this.configurationContributors.push(d),this.registerJSONConfiguration(d)})}validateAndRegisterProperties(o,l=!0,a,d,u=3,C){var f;u=y.isUndefinedOrNull(o.scope)?u:o.scope;const v=o.properties;if(v)for(const L in v){const E=v[L];if(l&&c(L,E)){delete v[L];continue}if(E.source=a,E.defaultDefaultValue=v[L].default,this.updatePropertyDefaultValue(L,E),e.OVERRIDE_PROPERTY_REGEX.test(L)?E.scope=void 0:(E.scope=y.isUndefinedOrNull(E.scope)?u:E.scope,E.restricted=y.isUndefinedOrNull(E.restricted)?!!d?.includes(L):E.restricted),v[L].hasOwnProperty("included")&&!v[L].included){this.excludedConfigurationProperties[L]=v[L],delete v[L];continue}else this.configurationProperties[L]=v[L],!((f=v[L].policy)===null||f===void 0)&&f.name&&this.policyConfigurations.set(v[L].policy.name,L);!v[L].deprecationMessage&&v[L].markdownDeprecationMessage&&(v[L].deprecationMessage=v[L].markdownDeprecationMessage),C.add(L)}const p=o.allOf;if(p)for(const L of p)this.validateAndRegisterProperties(L,l,a,d,u,C)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(o){const l=a=>{const d=a.properties;if(d)for(const C in d)this.updateSchema(C,d[C]);const u=a.allOf;u?.forEach(l)};l(o)}updateSchema(o,l){switch(e.allSettings.properties[o]=l,l.scope){case 1:e.applicationSettings.properties[o]=l;break;case 2:e.machineSettings.properties[o]=l;break;case 6:e.machineOverridableSettings.properties[o]=l;break;case 3:e.windowSettings.properties[o]=l;break;case 4:e.resourceSettings.properties[o]=l;break;case 5:e.resourceSettings.properties[o]=l,this.resourceLanguageSettingsSchema.properties[o]=l;break}}updateOverridePropertyPatternKey(){for(const o of this.overrideIdentifiers.values()){const l=`[${o}]`,a={type:"object",description:D.localize(2,null),errorMessage:D.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(l,a),e.allSettings.properties[l]=a,e.applicationSettings.properties[l]=a,e.machineSettings.properties[l]=a,e.machineOverridableSettings.properties[l]=a,e.windowSettings.properties[l]=a,e.resourceSettings.properties[l]=a}}registerOverridePropertyPatternKey(){const o={type:"object",description:D.localize(4,null),errorMessage:D.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(o,l){const a=this.configurationDefaultsOverrides.get(o);let d=a?.value,u=a?.source;y.isUndefined(d)&&(d=l.defaultDefaultValue,u=void 0),y.isUndefined(d)&&(d=s(l.type)),l.default=d,l.defaultValueSource=u}}const n="\\\\[([^\\\\]]+)\\\\]",t=new RegExp(n,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${n})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function i(g){const o=[];if(e.OVERRIDE_PROPERTY_REGEX.test(g)){let l=t.exec(g);for(;l?.length;){const a=l[1].trim();a&&o.push(a),l=t.exec(g)}}return(0,S.distinct)(o)}e.overrideIdentifiersFromKey=i;function s(g){switch(Array.isArray(g)?g[0]:g){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=s;const r=new m;_.Registry.add(e.Extensions.Configuration,r);function c(g,o){var l,a,d,u;return g.trim()?e.OVERRIDE_PROPERTY_REGEX.test(g)?D.localize(7,null,g):r.getConfigurationProperties()[g]!==void 0?D.localize(8,null,g):!((l=o.policy)===null||l===void 0)&&l.name&&r.getPolicyConfigurations().get((a=o.policy)===null||a===void 0?void 0:a.name)!==void 0?D.localize(9,null,g,(d=o.policy)===null||d===void 0?void 0:d.name,r.getPolicyConfigurations().get((u=o.policy)===null||u===void 0?void 0:u.name)):null:D.localize(6,null)}e.validateProperty=c}),define(J[227],ee([1,0,40,163,577,90,34]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=void 0,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:y.localize(0,null),scope:5});const b=Object.assign(Object.assign({},e.editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:k.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:y.localize(1,null,"`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:y.localize(2,null)},"editor.insertSpaces":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:y.localize(3,null,"`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:y.localize(4,null,"`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:y.localize(5,null)},"editor.largeFileOptimizations":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:y.localize(6,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:y.localize(7,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[y.localize(8,null),y.localize(9,null),y.localize(10,null)],description:y.localize(11,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[y.localize(12,null),y.localize(13,null),y.localize(14,null)],default:"configuredByTheme",description:y.localize(15,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:y.localize(16,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:y.localize(17,null)},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:y.localize(18,null),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:y.localize(19,null)},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:y.localize(20,null)},"editor.language.brackets":{type:["array","null"],default:null,description:y.localize(21,null),items:{type:"array",items:[{type:"string",description:y.localize(22,null)},{type:"string",description:y.localize(23,null)}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:y.localize(24,null),items:{type:"array",items:[{type:"string",description:y.localize(25,null)},{type:"string",description:y.localize(26,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:y.localize(27,null)},"diffEditor.maxFileSize":{type:"number",default:50,description:y.localize(28,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:y.localize(29,null)},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:y.localize(30,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:y.localize(31,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:y.localize(32,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:y.localize(33,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[y.localize(34,null),y.localize(35,null),y.localize(36,null,"`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["smart","experimental"],default:"smart",markdownEnumDescriptions:[y.localize(37,null),y.localize(38,null)]}}});function _(s){return typeof s.type<"u"||typeof s.anyOf<"u"}for(const s of S.editorOptionsRegistry){const r=s.schema;if(typeof r<"u")if(_(r))b.properties[`editor.${s.name}`]=r;else for(const c in r)Object.hasOwnProperty.call(r,c)&&(b.properties[c]=r[c])}let h=null;function m(){return h===null&&(h=Object.create(null),Object.keys(b.properties).forEach(s=>{h[s]=!0})),h}function n(s){return m()[`editor.${s}`]||!1}e.isEditorConfigurationKey=n;function t(s){return m()[`diffEditor.${s}`]||!1}e.isDiffEditorConfigurationKey=t,w.Registry.as(D.Extensions.Configuration).registerConfiguration(b)}),define(J[72],ee([1,0,582,6,34,101,90]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLAINTEXT_EXTENSION=e.PLAINTEXT_LANGUAGE_ID=e.ModesRegistry=e.EditorModesRegistry=e.Extensions=void 0,e.Extensions={ModesRegistry:"editor.modesRegistry"};class b{constructor(){this._onDidChangeLanguages=new k.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(h){return this._languages.push(h),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let m=0,n=this._languages.length;m<n;m++)if(this._languages[m]===h){this._languages.splice(m,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=b,e.ModesRegistry=new b,y.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_LANGUAGE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_LANGUAGE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[S.localize(0,null),"text"],mimetypes:[D.Mimes.text]}),y.Registry.as(w.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(J[33],ee([1,0,6,2,9,136,104,120,464,556,465,468,218,8,27,38,51,72,467]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedLanguageConfiguration=e.LanguageConfigurationRegistry=e.LanguageConfigurationChangeEvent=e.getScopedLineTokens=e.getIndentationAtPosition=e.LanguageConfigurationService=e.ILanguageConfigurationService=e.LanguageConfigurationServiceChangeEvent=void 0;class l{constructor(N){this.languageId=N}affects(N){return this.languageId?this.languageId===N:!0}}e.LanguageConfigurationServiceChangeEvent=l,e.ILanguageConfigurationService=(0,i.createDecorator)("languageConfigurationService");let a=class extends k.Disposable{constructor(N,A){super(),this.configurationService=N,this.languageService=A,this._registry=this._register(new F),this.onDidChangeEmitter=this._register(new S.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const P=new Set(Object.values(u));this._register(this.configurationService.onDidChangeConfiguration(x=>{const W=x.change.keys.some(O=>P.has(O)),U=x.change.overrides.filter(([O,$])=>$.some(Q=>P.has(Q))).map(([O])=>O);if(W)this.configurations.clear(),this.onDidChangeEmitter.fire(new l(void 0));else for(const O of U)this.languageService.isRegisteredLanguageId(O)&&(this.configurations.delete(O),this.onDidChangeEmitter.fire(new l(O)))})),this._register(this._registry.onDidChange(x=>{this.configurations.delete(x.languageId),this.onDidChangeEmitter.fire(new l(x.languageId))}))}register(N,A,P){return this._registry.register(N,A,P)}getLanguageConfiguration(N){let A=this.configurations.get(N);return A||(A=d(N,this._registry,this.configurationService,this.languageService),this.configurations.set(N,A)),A}};a=Ne([fe(0,s.IConfigurationService),fe(1,r.ILanguageService)],a),e.LanguageConfigurationService=a;function d(M,N,A,P){let x=N.getLanguageConfiguration(M);if(!x){if(!P.isRegisteredLanguageId(M))return new R(M,{});x=new R(M,{})}const W=C(x.languageId,A),U=E([x.underlyingConfig,W]);return new R(x.languageId,U)}const u={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function C(M,N){const A=N.getValue(u.brackets,{overrideIdentifier:M}),P=N.getValue(u.colorizedBracketPairs,{overrideIdentifier:M});return{brackets:f(A),colorizedBracketPairs:f(P)}}function f(M){if(Array.isArray(M))return M.map(N=>{if(!(!Array.isArray(N)||N.length!==2))return[N[0],N[1]]}).filter(N=>!!N)}function v(M,N,A){const P=M.getLineContent(N);let x=y.getLeadingWhitespace(P);return x.length>A-1&&(x=x.substring(0,A-1)),x}e.getIndentationAtPosition=v;function p(M,N,A){M.tokenization.forceTokenization(N);const P=M.tokenization.getLineTokens(N),x=typeof A>"u"?M.getLineMaxColumn(N)-1:A-1;return(0,b.createScopedLineTokens)(P,x)}e.getScopedLineTokens=p;class L{constructor(N){this.languageId=N,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(N,A){const P=new I(N,A,++this._order);return this._entries.push(P),this._resolved=null,(0,k.toDisposable)(()=>{for(let x=0;x<this._entries.length;x++)if(this._entries[x]===P){this._entries.splice(x,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const N=this._resolve();N&&(this._resolved=new R(this.languageId,N))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(I.cmp),E(this._entries.map(N=>N.configuration)))}}function E(M){let N={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const A of M)N={comments:A.comments||N.comments,brackets:A.brackets||N.brackets,wordPattern:A.wordPattern||N.wordPattern,indentationRules:A.indentationRules||N.indentationRules,onEnterRules:A.onEnterRules||N.onEnterRules,autoClosingPairs:A.autoClosingPairs||N.autoClosingPairs,surroundingPairs:A.surroundingPairs||N.surroundingPairs,autoCloseBefore:A.autoCloseBefore||N.autoCloseBefore,folding:A.folding||N.folding,colorizedBracketPairs:A.colorizedBracketPairs||N.colorizedBracketPairs,__electricCharacterSupport:A.__electricCharacterSupport||N.__electricCharacterSupport};return N}class I{constructor(N,A,P){this.configuration=N,this.priority=A,this.order=P}static cmp(N,A){return N.priority===A.priority?N.order-A.order:N.priority-A.priority}}class T{constructor(N){this.languageId=N}}e.LanguageConfigurationChangeEvent=T;class F extends k.Disposable{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new S.Emitter),this.onDidChange=this._onDidChange.event,this._register(this.register(g.PLAINTEXT_LANGUAGE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:\'"\',close:\'"\'},{open:"\'",close:"\'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(N,A,P=0){let x=this._entries.get(N);x||(x=new L(N),this._entries.set(N,x));const W=x.register(A,P);return this._onDidChange.fire(new T(N)),(0,k.toDisposable)(()=>{W.dispose(),this._onDidChange.fire(new T(N))})}getLanguageConfiguration(N){const A=this._entries.get(N);return A?.getResolvedConfiguration()||null}}e.LanguageConfigurationRegistry=F;class R{constructor(N,A){this.languageId=N,this.underlyingConfig=A,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new n.OnEnterSupport(this.underlyingConfig):null,this.comments=R._handleComments(this.underlyingConfig),this.characterPair=new _.CharacterPairSupport(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||D.DEFAULT_WORD_REGEXP,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new m.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new o.LanguageBracketsConfiguration(N,this.underlyingConfig)}getWordDefinition(){return(0,D.ensureValidWordDefinition)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new t.RichEditBrackets(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new h.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(N,A,P,x){return this._onEnterSupport?this._onEnterSupport.onEnter(N,A,P,x):null}getAutoClosingPairs(){return new w.AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(N){return this.characterPair.getAutoCloseBeforeSet(N)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(N){const A=N.comments;if(!A)return null;const P={};if(A.lineComment&&(P.lineCommentToken=A.lineComment),A.blockComment){const[x,W]=A.blockComment;P.blockCommentStartToken=x,P.blockCommentEndToken=W}return P}}e.ResolvedLanguageConfiguration=R,(0,c.registerSingleton)(e.ILanguageConfigurationService,a,1)}),define(J[315],ee([1,0,12,2,292,548,5,33,564,53,176,9,16,62,60,11,19,165,103]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const l=60*1e3,a=5*60*1e3;function d(I,T){const F=I.getModel(T);return!(!F||F.isTooLargeForSyncing())}let u=class extends k.Disposable{constructor(T,F,R,M,N){super(),this._modelService=T,this._workerManager=this._register(new f(this._modelService,M)),this._logService=R,this._register(N.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(A,P)=>d(this._modelService,A.uri)?this._workerManager.withWorker().then(x=>x.computeLinks(A.uri)).then(x=>x&&{links:x}):Promise.resolve({links:[]})})),this._register(N.completionProvider.register("*",new C(this._workerManager,F,this._modelService,M)))}dispose(){super.dispose()}canComputeUnicodeHighlights(T){return d(this._modelService,T)}computedUnicodeHighlights(T,F,R){return this._workerManager.withWorker().then(M=>M.computedUnicodeHighlights(T,F,R))}computeDiff(T,F,R,M){return Ee(this,void 0,void 0,function*(){const N=yield this._workerManager.withWorker().then(P=>P.computeDiff(T,F,R,M));return N?{identical:N.identical,quitEarly:N.quitEarly,changes:N.changes.map(P=>{var x;return new g.LineRangeMapping(new o.LineRange(P[0],P[1]),new o.LineRange(P[2],P[3]),(x=P[4])===null||x===void 0?void 0:x.map(W=>new g.RangeMapping(new w.Range(W[0],W[1],W[2],W[3]),new w.Range(W[4],W[5],W[6],W[7]))))})}:null})}computeMoreMinimalEdits(T,F,R=!1){if((0,t.isNonEmptyArray)(F)){if(!d(this._modelService,T))return Promise.resolve(F);const M=s.StopWatch.create(!0),N=this._workerManager.withWorker().then(A=>A.computeMoreMinimalEdits(T,F,R));return N.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",T.toString(!0),M.elapsed())),Promise.race([N,(0,S.timeout)(1e3).then(()=>F)])}else return Promise.resolve(void 0)}canNavigateValueSet(T){return d(this._modelService,T)}navigateValueSet(T,F,R){return this._workerManager.withWorker().then(M=>M.navigateValueSet(T,F,R))}canComputeWordRanges(T){return d(this._modelService,T)}computeWordRanges(T,F){return this._workerManager.withWorker().then(R=>R.computeWordRanges(T,F))}};u=Ne([fe(0,h.IModelService),fe(1,m.ITextResourceConfigurationService),fe(2,i.ILogService),fe(3,b.ILanguageConfigurationService),fe(4,c.ILanguageFeaturesService)],u),e.EditorWorkerService=u;class C{constructor(T,F,R,M){this.languageConfigurationService=M,this._debugDisplayName="wordbasedCompletions",this._workerManager=T,this._configurationService=F,this._modelService=R}provideCompletionItems(T,F){return Ee(this,void 0,void 0,function*(){const R=this._configurationService.getValue(T.uri,F,"editor");if(!R.wordBasedSuggestions)return;const M=[];if(R.wordBasedSuggestionsMode==="currentDocument")d(this._modelService,T.uri)&&M.push(T.uri);else for(const O of this._modelService.getModels())d(this._modelService,O.uri)&&(O===T?M.unshift(O.uri):(R.wordBasedSuggestionsMode==="allDocuments"||O.getLanguageId()===T.getLanguageId())&&M.push(O.uri));if(M.length===0)return;const N=this.languageConfigurationService.getLanguageConfiguration(T.getLanguageId()).getWordDefinition(),A=T.getWordAtPosition(F),P=A?new w.Range(F.lineNumber,A.startColumn,F.lineNumber,A.endColumn):w.Range.fromPositions(F),x=P.setEndPosition(F.lineNumber,F.column),U=yield(yield this._workerManager.withWorker()).textualSuggest(M,A?.word,N);if(U)return{duration:U.duration,suggestions:U.words.map(O=>({kind:18,label:O,insertText:O,range:{insert:x,replace:P}}))}})}}class f extends k.Disposable{constructor(T,F){super(),this.languageConfigurationService=F,this._modelService=T,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new S.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(a/2)),this._register(this._modelService.onModelRemoved(M=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>a&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new E(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class v extends k.Disposable{constructor(T,F,R){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=T,this._modelService=F,!R){const M=new S.IntervalTimer;M.cancelAndSet(()=>this._checkStopModelSync(),Math.round(l/2)),this._register(M)}}dispose(){for(const T in this._syncedModels)(0,k.dispose)(this._syncedModels[T]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(T,F){for(const R of T){const M=R.toString();this._syncedModels[M]||this._beginModelSync(R,F),this._syncedModels[M]&&(this._syncedModelsLastUsedTime[M]=new Date().getTime())}}_checkStopModelSync(){const T=new Date().getTime(),F=[];for(const R in this._syncedModelsLastUsedTime)T-this._syncedModelsLastUsedTime[R]>l&&F.push(R);for(const R of F)this._stopModelSync(R)}_beginModelSync(T,F){const R=this._modelService.getModel(T);if(!R||!F&&R.isTooLargeForSyncing())return;const M=T.toString();this._proxy.acceptNewModel({url:R.uri.toString(),lines:R.getLinesContent(),EOL:R.getEOL(),versionId:R.getVersionId()});const N=new k.DisposableStore;N.add(R.onDidChangeContent(A=>{this._proxy.acceptModelChanged(M.toString(),A)})),N.add(R.onWillDispose(()=>{this._stopModelSync(M)})),N.add((0,k.toDisposable)(()=>{this._proxy.acceptRemovedModel(M)})),this._syncedModels[M]=N}_stopModelSync(T){const F=this._syncedModels[T];delete this._syncedModels[T],delete this._syncedModelsLastUsedTime[T],(0,k.dispose)(F)}}class p{constructor(T){this._instance=T,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class L{constructor(T){this._workerClient=T}fhr(T,F){return this._workerClient.fhr(T,F)}}e.EditorWorkerHost=L;class E extends k.Disposable{constructor(T,F,R,M){super(),this.languageConfigurationService=M,this._disposed=!1,this._modelService=T,this._keepIdleModels=F,this._workerFactory=new D.DefaultWorkerFactory(R),this._worker=null,this._modelManager=null}fhr(T,F){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new y.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new L(this)))}catch(T){(0,y.logOnceWebWorkerWarning)(T),this._worker=new p(new _.EditorSimpleWorker(new L(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,T=>((0,y.logOnceWebWorkerWarning)(T),this._worker=new p(new _.EditorSimpleWorker(new L(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(T){return this._modelManager||(this._modelManager=this._register(new v(T,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(T,F=!1){return Ee(this,void 0,void 0,function*(){return this._disposed?Promise.reject((0,r.canceled)()):this._getProxy().then(R=>(this._getOrCreateModelManager(R).ensureSyncedResources(T,F),R))})}computedUnicodeHighlights(T,F,R){return this._withSyncedResources([T]).then(M=>M.computeUnicodeHighlights(T.toString(),F,R))}computeDiff(T,F,R,M){return this._withSyncedResources([T,F],!0).then(N=>N.computeDiff(T.toString(),F.toString(),R,M))}computeMoreMinimalEdits(T,F,R){return this._withSyncedResources([T]).then(M=>M.computeMoreMinimalEdits(T.toString(),F,R))}computeLinks(T){return this._withSyncedResources([T]).then(F=>F.computeLinks(T.toString()))}textualSuggest(T,F,R){return Ee(this,void 0,void 0,function*(){const M=yield this._withSyncedResources(T),N=R.source,A=(0,n.regExpFlags)(R);return M.textualSuggest(T.map(P=>P.toString()),F,N,A)})}computeWordRanges(T,F){return this._withSyncedResources([T]).then(R=>{const M=this._modelService.getModel(T);if(!M)return Promise.resolve(null);const N=this.languageConfigurationService.getLanguageConfiguration(M.getLanguageId()).getWordDefinition(),A=N.source,P=(0,n.regExpFlags)(N);return R.computeWordRanges(T.toString(),F,A,P)})}navigateValueSet(T,F,R){return this._withSyncedResources([T]).then(M=>{const N=this._modelService.getModel(T);if(!N)return null;const A=this.languageConfigurationService.getLanguageConfiguration(N.getLanguageId()).getWordDefinition(),P=A.source,x=(0,n.regExpFlags)(A);return M.navigateValueSet(T.toString(),F,R,P,x)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=E}),define(J[724],ee([1,0,45,315]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function y(w,b,_){return new D(w,b,_)}e.createWebWorker=y;class D extends k.EditorWorkerClient{constructor(b,_,h){super(b,h.keepIdleModels||!1,h.label,_),this._foreignModuleId=h.moduleId,this._foreignModuleCreateData=h.createData||null,this._foreignModuleHost=h.host||null,this._foreignProxy=null}fhr(b,_){if(!this._foreignModuleHost||typeof this._foreignModuleHost[b]!="function")return Promise.reject(new Error("Missing method "+b+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[b].apply(this._foreignModuleHost,_))}catch(h){return Promise.reject(h)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(b=>{const _=this._foreignModuleHost?(0,S.getAllMethodNames)(this._foreignModuleHost):[];return b.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,_).then(h=>{this._foreignModuleCreateData=null;const m=(i,s)=>b.fmr(i,s),n=(i,s)=>function(){const r=Array.prototype.slice.call(arguments,0);return s(i,r)},t={};for(const i of h)t[i]=n(i,m);return t})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(b){return this._withSyncedResources(b).then(_=>this.getProxy())}}}),define(J[228],ee([1,0,9,104,120,33]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIndentMetadata=e.getIndentActionForType=e.getIndentForEnter=e.getGoodIndentForLine=e.getInheritIndentForLine=void 0;function w(t,i,s){const r=t.tokenization.getLanguageIdAtPosition(i,0);if(i>1){let c,g=-1;for(c=i-1;c>=1;c--){if(t.tokenization.getLanguageIdAtPosition(c,0)!==r)return g;const o=t.getLineContent(c);if(s.shouldIgnore(o)||/^\\s+$/.test(o)||o===""){g=c;continue}return c}}return-1}function b(t,i,s,r=!0,c){if(t<4)return null;const g=c.getLanguageConfiguration(i.tokenization.getLanguageId()).indentRulesSupport;if(!g)return null;if(s<=1)return{indentation:"",action:null};for(let a=s-1;a>0&&i.getLineContent(a)==="";a--)if(a===1)return{indentation:"",action:null};const o=w(i,s,g);if(o<0)return null;if(o<1)return{indentation:"",action:null};const l=i.getLineContent(o);if(g.shouldIncrease(l)||g.shouldIndentNextLine(l))return{indentation:S.getLeadingWhitespace(l),action:k.IndentAction.Indent,line:o};if(g.shouldDecrease(l))return{indentation:S.getLeadingWhitespace(l),action:null,line:o};{if(o===1)return{indentation:S.getLeadingWhitespace(i.getLineContent(o)),action:null,line:o};const a=o-1,d=g.getIndentMetadata(i.getLineContent(a));if(!(d&3)&&d&4){let u=0;for(let C=a-1;C>0;C--)if(!g.shouldIndentNextLine(i.getLineContent(C))){u=C;break}return{indentation:S.getLeadingWhitespace(i.getLineContent(u+1)),action:null,line:u+1}}if(r)return{indentation:S.getLeadingWhitespace(i.getLineContent(o)),action:null,line:o};for(let u=o;u>0;u--){const C=i.getLineContent(u);if(g.shouldIncrease(C))return{indentation:S.getLeadingWhitespace(C),action:k.IndentAction.Indent,line:u};if(g.shouldIndentNextLine(C)){let f=0;for(let v=u-1;v>0;v--)if(!g.shouldIndentNextLine(i.getLineContent(u))){f=v;break}return{indentation:S.getLeadingWhitespace(i.getLineContent(f+1)),action:null,line:f+1}}else if(g.shouldDecrease(C))return{indentation:S.getLeadingWhitespace(C),action:null,line:u}}return{indentation:S.getLeadingWhitespace(i.getLineContent(1)),action:null,line:1}}}e.getInheritIndentForLine=b;function _(t,i,s,r,c,g){if(t<4)return null;const o=g.getLanguageConfiguration(s);if(!o)return null;const l=g.getLanguageConfiguration(s).indentRulesSupport;if(!l)return null;const a=b(t,i,r,void 0,g),d=i.getLineContent(r);if(a){const u=a.line;if(u!==void 0){let C=!0;for(let f=u;f<r-1;f++)if(!/^\\s*$/.test(i.getLineContent(f))){C=!1;break}if(C){const f=o.onEnter(t,"",i.getLineContent(u),"");if(f){let v=S.getLeadingWhitespace(i.getLineContent(u));return f.removeText&&(v=v.substring(0,v.length-f.removeText)),f.indentAction===k.IndentAction.Indent||f.indentAction===k.IndentAction.IndentOutdent?v=c.shiftIndent(v):f.indentAction===k.IndentAction.Outdent&&(v=c.unshiftIndent(v)),l.shouldDecrease(d)&&(v=c.unshiftIndent(v)),f.appendText&&(v+=f.appendText),S.getLeadingWhitespace(v)}}}return l.shouldDecrease(d)?a.action===k.IndentAction.Indent?a.indentation:c.unshiftIndent(a.indentation):a.action===k.IndentAction.Indent?c.shiftIndent(a.indentation):a.indentation}return null}e.getGoodIndentForLine=_;function h(t,i,s,r,c){if(t<4)return null;i.tokenization.forceTokenization(s.startLineNumber);const g=i.tokenization.getLineTokens(s.startLineNumber),o=(0,y.createScopedLineTokens)(g,s.startColumn-1),l=o.getLineContent();let a=!1,d;o.firstCharOffset>0&&g.getLanguageId(0)!==o.languageId?(a=!0,d=l.substr(0,s.startColumn-1-o.firstCharOffset)):d=g.getLineContent().substring(0,s.startColumn-1);let u;s.isEmpty()?u=l.substr(s.startColumn-1-o.firstCharOffset):u=(0,D.getScopedLineTokens)(i,s.endLineNumber,s.endColumn).getLineContent().substr(s.endColumn-1-o.firstCharOffset);const C=c.getLanguageConfiguration(o.languageId).indentRulesSupport;if(!C)return null;const f=d,v=S.getLeadingWhitespace(d),p={tokenization:{getLineTokens:T=>i.tokenization.getLineTokens(T),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(T,F)=>i.getLanguageIdAtPosition(T,F)},getLineContent:T=>T===s.startLineNumber?f:i.getLineContent(T)},L=S.getLeadingWhitespace(g.getLineContent()),E=b(t,p,s.startLineNumber+1,void 0,c);if(!E){const T=a?L:v;return{beforeEnter:T,afterEnter:T}}let I=a?L:E.indentation;return E.action===k.IndentAction.Indent&&(I=r.shiftIndent(I)),C.shouldDecrease(u)&&(I=r.unshiftIndent(I)),{beforeEnter:a?L:v,afterEnter:I}}e.getIndentForEnter=h;function m(t,i,s,r,c,g){if(t<4)return null;const o=(0,D.getScopedLineTokens)(i,s.startLineNumber,s.startColumn);if(o.firstCharOffset)return null;const l=g.getLanguageConfiguration(o.languageId).indentRulesSupport;if(!l)return null;const a=o.getLineContent(),d=a.substr(0,s.startColumn-1-o.firstCharOffset);let u;if(s.isEmpty()?u=a.substr(s.startColumn-1-o.firstCharOffset):u=(0,D.getScopedLineTokens)(i,s.endLineNumber,s.endColumn).getLineContent().substr(s.endColumn-1-o.firstCharOffset),!l.shouldDecrease(d+u)&&l.shouldDecrease(d+r+u)){const C=b(t,i,s.startLineNumber,!1,g);if(!C)return null;let f=C.indentation;return C.action!==k.IndentAction.Indent&&(f=c.unshiftIndent(f)),f}return null}e.getIndentActionForType=m;function n(t,i,s){const r=s.getLanguageConfiguration(t.getLanguageId()).indentRulesSupport;return!r||i<1||i>t.getLineCount()?null:r.getIndentMetadata(t.getLineContent(i))}e.getIndentMetadata=n}),define(J[229],ee([1,0,104,33]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnterAction=void 0;function y(D,w,b,_){const h=(0,k.getScopedLineTokens)(w,b.startLineNumber,b.startColumn),m=_.getLanguageConfiguration(h.languageId);if(!m)return null;const n=h.getLineContent(),t=n.substr(0,b.startColumn-1-h.firstCharOffset);let i;b.isEmpty()?i=n.substr(b.startColumn-1-h.firstCharOffset):i=(0,k.getScopedLineTokens)(w,b.endLineNumber,b.endColumn).getLineContent().substr(b.endColumn-1-h.firstCharOffset);let s="";if(b.startLineNumber>1&&h.firstCharOffset===0){const a=(0,k.getScopedLineTokens)(w,b.startLineNumber-1);a.languageId===h.languageId&&(s=a.getLineContent())}const r=m.onEnter(D,s,t,i);if(!r)return null;const c=r.indentAction;let g=r.appendText;const o=r.removeText||0;g?c===S.IndentAction.Indent&&(g="\t"+g):c===S.IndentAction.Indent||c===S.IndentAction.IndentOutdent?g="\t":g="";let l=(0,k.getIndentationAtPosition)(w,b.startLineNumber,b.startColumn);return o&&(l=l.substring(0,l.length-o)),{indentAction:c,appendText:g,removeText:o,indentation:l}}e.getEnterAction=y}),define(J[230],ee([1,0,9,75,5,23,229,33]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=void 0;const _=Object.create(null);function h(n,t){if(t<=0)return"";_[n]||(_[n]=["",n]);const i=_[n];for(let s=i.length;s<=t;s++)i[s]=i[s-1]+n;return i[t]}let m=class ri{static unshiftIndent(t,i,s,r,c){const g=k.CursorColumns.visibleColumnFromColumn(t,i,s);if(c){const o=h(" ",r),a=k.CursorColumns.prevIndentTabStop(g,r)/r;return h(o,a)}else{const o="\t",a=k.CursorColumns.prevRenderTabStop(g,s)/s;return h(o,a)}}static shiftIndent(t,i,s,r,c){const g=k.CursorColumns.visibleColumnFromColumn(t,i,s);if(c){const o=h(" ",r),a=k.CursorColumns.nextIndentTabStop(g,r)/r;return h(o,a)}else{const o="\t",a=k.CursorColumns.nextRenderTabStop(g,s)/s;return h(o,a)}}constructor(t,i,s){this._languageConfigurationService=s,this._opts=i,this._selection=t,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(t,i,s){this._useLastEditRangeForCursorEndPosition?t.addTrackedEditOperation(i,s):t.addEditOperation(i,s)}getEditOperations(t,i){const s=this._selection.startLineNumber;let r=this._selection.endLineNumber;this._selection.endColumn===1&&s!==r&&(r=r-1);const{tabSize:c,indentSize:g,insertSpaces:o}=this._opts,l=s===r;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\\s*$/.test(t.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0);let a=0,d=0;for(let u=s;u<=r;u++,a=d){d=0;const C=t.getLineContent(u);let f=S.firstNonWhitespaceIndex(C);if(this._opts.isUnshift&&(C.length===0||f===0)||!l&&!this._opts.isUnshift&&C.length===0)continue;if(f===-1&&(f=C.length),u>1&&k.CursorColumns.visibleColumnFromColumn(C,f+1,c)%g!==0&&t.tokenization.isCheapToTokenize(u-1)){const L=(0,w.getEnterAction)(this._opts.autoIndent,t,new y.Range(u-1,t.getLineMaxColumn(u-1),u-1,t.getLineMaxColumn(u-1)),this._languageConfigurationService);if(L){if(d=a,L.appendText)for(let E=0,I=L.appendText.length;E<I&&d<g&&L.appendText.charCodeAt(E)===32;E++)d++;L.removeText&&(d=Math.max(0,d-L.removeText));for(let E=0;E<d&&!(f===0||C.charCodeAt(f-1)!==32);E++)f--}}if(this._opts.isUnshift&&f===0)continue;let v;this._opts.isUnshift?v=ri.unshiftIndent(C,f+1,c,g,o):v=ri.shiftIndent(C,f+1,c,g,o),this._addEditOperation(i,new y.Range(u,1,u,f+1),v),u===s&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=f+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&t.getLineLength(s)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const a=o?h(" ",g):"\t";for(let d=s;d<=r;d++){const u=t.getLineContent(d);let C=S.firstNonWhitespaceIndex(u);if(!(this._opts.isUnshift&&(u.length===0||C===0))&&!(!l&&!this._opts.isUnshift&&u.length===0)&&(C===-1&&(C=u.length),!(this._opts.isUnshift&&C===0)))if(this._opts.isUnshift){C=Math.min(C,g);for(let f=0;f<C;f++)if(u.charCodeAt(f)===9){C=f+1;break}this._addEditOperation(i,new y.Range(d,1,d,C+1),"")}else this._addEditOperation(i,new y.Range(d,1,d,1),a),d===s&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=i.trackSelection(this._selection)}computeCursorState(t,i){if(this._useLastEditRangeForCursorEndPosition){const r=i.getInverseEditOperations()[0];return new D.Selection(r.range.endLineNumber,r.range.endColumn,r.range.endLineNumber,r.range.endColumn)}const s=i.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const r=this._selection.startColumn;return s.startColumn<=r?s:s.getDirection()===0?new D.Selection(s.startLineNumber,r,s.endLineNumber,s.endColumn):new D.Selection(s.endLineNumber,s.endColumn,s.startLineNumber,r)}return s}};m=Ne([fe(2,b.ILanguageConfigurationService)],m),e.ShiftCommand=m}),define(J[231],ee([1,0,11,9,118,230,450,65,135,5,13,104,33,120,228,229]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionOutcome=e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class c{static indent(f,v,p){if(v===null||p===null)return[];const L=[];for(let E=0,I=p.length;E<I;E++)L[E]=new D.ShiftCommand(p[E],{isUnshift:!1,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent},f.languageConfigurationService);return L}static outdent(f,v,p){const L=[];for(let E=0,I=p.length;E<I;E++)L[E]=new D.ShiftCommand(p[E],{isUnshift:!0,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent},f.languageConfigurationService);return L}static shiftIndent(f,v,p){return p=p||1,D.ShiftCommand.shiftIndent(v,v.length+p,f.tabSize,f.indentSize,f.insertSpaces)}static unshiftIndent(f,v,p){return p=p||1,D.ShiftCommand.unshiftIndent(v,v.length+p,f.tabSize,f.indentSize,f.insertSpaces)}static _distributedPaste(f,v,p,L){const E=[];for(let I=0,T=p.length;I<T;I++)E[I]=new y.ReplaceCommand(p[I],L[I]);return new b.EditOperationResult(0,E,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(f,v,p,L,E){const I=[];for(let T=0,F=p.length;T<F;T++){const R=p[T],M=R.getPosition();if(E&&!R.isEmpty()&&(E=!1),E&&L.indexOf(`\n`)!==L.length-1&&(E=!1),E){const N=new h.Range(M.lineNumber,1,M.lineNumber,1);I[T]=new y.ReplaceCommandThatPreservesSelection(N,L,R,!0)}else I[T]=new y.ReplaceCommand(R,L)}return new b.EditOperationResult(0,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(f,v,p,L,E){if(L||v.length===1)return null;if(E&&E.length===v.length)return E;if(f.multiCursorPaste==="spread"){p.charCodeAt(p.length-1)===10&&(p=p.substr(0,p.length-1)),p.charCodeAt(p.length-1)===13&&(p=p.substr(0,p.length-1));const I=k.splitLines(p);if(I.length===v.length)return I}return null}static paste(f,v,p,L,E,I){const T=this._distributePasteToCursors(f,p,L,E,I);return T?(p=p.sort(h.Range.compareRangesUsingStarts),this._distributedPaste(f,v,p,T)):this._simplePaste(f,v,p,L,E)}static _goodIndentForLine(f,v,p){let L=null,E="";const I=(0,s.getInheritIndentForLine)(f.autoIndent,v,p,!1,f.languageConfigurationService);if(I)L=I.action,E=I.indentation;else if(p>1){let T;for(T=p-1;T>=1;T--){const M=v.getLineContent(T);if(k.lastNonWhitespaceIndex(M)>=0)break}if(T<1)return null;const F=v.getLineMaxColumn(T),R=(0,r.getEnterAction)(f.autoIndent,v,new h.Range(T,F,T,F),f.languageConfigurationService);R&&(E=R.indentation+R.appendText)}return L&&(L===n.IndentAction.Indent&&(E=c.shiftIndent(f,E)),L===n.IndentAction.Outdent&&(E=c.unshiftIndent(f,E)),E=f.normalizeIndentation(E)),E||null}static _replaceJumpToNextIndent(f,v,p,L){let E="";const I=p.getStartPosition();if(f.insertSpaces){const T=f.visibleColumnFromColumn(v,I),F=f.indentSize,R=F-T%F;for(let M=0;M<R;M++)E+=" "}else E="\t";return new y.ReplaceCommand(p,E,L)}static tab(f,v,p){const L=[];for(let E=0,I=p.length;E<I;E++){const T=p[E];if(T.isEmpty()){const F=v.getLineContent(T.startLineNumber);if(/^\\s*$/.test(F)&&v.tokenization.isCheapToTokenize(T.startLineNumber)){let R=this._goodIndentForLine(f,v,T.startLineNumber);R=R||"\t";const M=f.normalizeIndentation(R);if(!F.startsWith(M)){L[E]=new y.ReplaceCommand(new h.Range(T.startLineNumber,1,T.startLineNumber,F.length+1),M,!0);continue}}L[E]=this._replaceJumpToNextIndent(f,v,T,!0)}else{if(T.startLineNumber===T.endLineNumber){const F=v.getLineMaxColumn(T.startLineNumber);if(T.startColumn!==1||T.endColumn!==F){L[E]=this._replaceJumpToNextIndent(f,v,T,!1);continue}}L[E]=new D.ShiftCommand(T,{isUnshift:!1,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent},f.languageConfigurationService)}}return L}static compositionType(f,v,p,L,E,I,T,F){const R=L.map(M=>this._compositionType(p,M,E,I,T,F));return new b.EditOperationResult(4,R,{shouldPushStackElementBefore:a(f,4),shouldPushStackElementAfter:!1})}static _compositionType(f,v,p,L,E,I){if(!v.isEmpty())return null;const T=v.getPosition(),F=Math.max(1,T.column-L),R=Math.min(f.getLineMaxColumn(T.lineNumber),T.column+E),M=new h.Range(T.lineNumber,F,T.lineNumber,R);return f.getValueInRange(M)===p&&I===0?null:new y.ReplaceCommandWithOffsetCursorState(M,p,0,I)}static _typeCommand(f,v,p){return p?new y.ReplaceCommandWithoutChangingPosition(f,v,!0):new y.ReplaceCommand(f,v,!0)}static _enter(f,v,p,L){if(f.autoIndent===0)return c._typeCommand(L,`\n`,p);if(!v.tokenization.isCheapToTokenize(L.getStartPosition().lineNumber)||f.autoIndent===1){const F=v.getLineContent(L.startLineNumber),R=k.getLeadingWhitespace(F).substring(0,L.startColumn-1);return c._typeCommand(L,`\n`+f.normalizeIndentation(R),p)}const E=(0,r.getEnterAction)(f.autoIndent,v,L,f.languageConfigurationService);if(E){if(E.indentAction===n.IndentAction.None)return c._typeCommand(L,`\n`+f.normalizeIndentation(E.indentation+E.appendText),p);if(E.indentAction===n.IndentAction.Indent)return c._typeCommand(L,`\n`+f.normalizeIndentation(E.indentation+E.appendText),p);if(E.indentAction===n.IndentAction.IndentOutdent){const F=f.normalizeIndentation(E.indentation),R=f.normalizeIndentation(E.indentation+E.appendText),M=`\n`+R+`\n`+F;return p?new y.ReplaceCommandWithoutChangingPosition(L,M,!0):new y.ReplaceCommandWithOffsetCursorState(L,M,-1,R.length-F.length,!0)}else if(E.indentAction===n.IndentAction.Outdent){const F=c.unshiftIndent(f,E.indentation);return c._typeCommand(L,`\n`+f.normalizeIndentation(F+E.appendText),p)}}const I=v.getLineContent(L.startLineNumber),T=k.getLeadingWhitespace(I).substring(0,L.startColumn-1);if(f.autoIndent>=4){const F=(0,s.getIndentForEnter)(f.autoIndent,v,L,{unshiftIndent:R=>c.unshiftIndent(f,R),shiftIndent:R=>c.shiftIndent(f,R),normalizeIndentation:R=>f.normalizeIndentation(R)},f.languageConfigurationService);if(F){let R=f.visibleColumnFromColumn(v,L.getEndPosition());const M=L.endColumn,N=v.getLineContent(L.endLineNumber),A=k.firstNonWhitespaceIndex(N);if(A>=0?L=L.setEndPosition(L.endLineNumber,Math.max(L.endColumn,A+1)):L=L.setEndPosition(L.endLineNumber,v.getLineMaxColumn(L.endLineNumber)),p)return new y.ReplaceCommandWithoutChangingPosition(L,`\n`+f.normalizeIndentation(F.afterEnter),!0);{let P=0;return M<=A+1&&(f.insertSpaces||(R=Math.ceil(R/f.indentSize)),P=Math.min(R+1-f.normalizeIndentation(F.afterEnter).length-1,0)),new y.ReplaceCommandWithOffsetCursorState(L,`\n`+f.normalizeIndentation(F.afterEnter),0,P,!0)}}}return c._typeCommand(L,`\n`+f.normalizeIndentation(T),p)}static _isAutoIndentType(f,v,p){if(f.autoIndent<4)return!1;for(let L=0,E=p.length;L<E;L++)if(!v.tokenization.isCheapToTokenize(p[L].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(f,v,p,L){const E=(0,t.getIndentationAtPosition)(v,p.startLineNumber,p.startColumn),I=(0,s.getIndentActionForType)(f.autoIndent,v,p,L,{shiftIndent:T=>c.shiftIndent(f,T),unshiftIndent:T=>c.unshiftIndent(f,T)},f.languageConfigurationService);if(I===null)return null;if(I!==f.normalizeIndentation(E)){const T=v.getLineFirstNonWhitespaceColumn(p.startLineNumber);return T===0?c._typeCommand(new h.Range(p.startLineNumber,1,p.endLineNumber,p.endColumn),f.normalizeIndentation(I)+L,!1):c._typeCommand(new h.Range(p.startLineNumber,1,p.endLineNumber,p.endColumn),f.normalizeIndentation(I)+v.getLineContent(p.startLineNumber).substring(T-1,p.startColumn-1)+L,!1)}return null}static _isAutoClosingOvertype(f,v,p,L,E){if(f.autoClosingOvertype==="never"||!f.autoClosingPairs.autoClosingPairsCloseSingleChar.has(E))return!1;for(let I=0,T=p.length;I<T;I++){const F=p[I];if(!F.isEmpty())return!1;const R=F.getPosition(),M=v.getLineContent(R.lineNumber);if(M.charAt(R.column-1)!==E)return!1;const A=(0,b.isQuote)(E);if((R.column>2?M.charCodeAt(R.column-2):0)===92&&A)return!1;if(f.autoClosingOvertype==="auto"){let x=!1;for(let W=0,U=L.length;W<U;W++){const O=L[W];if(R.lineNumber===O.startLineNumber&&R.column===O.startColumn){x=!0;break}}if(!x)return!1}}return!0}static _runAutoClosingOvertype(f,v,p,L,E){const I=[];for(let T=0,F=L.length;T<F;T++){const M=L[T].getPosition(),N=new h.Range(M.lineNumber,M.column,M.lineNumber,M.column+1);I[T]=new y.ReplaceCommand(N,E)}return new b.EditOperationResult(4,I,{shouldPushStackElementBefore:a(f,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(f,v){const p=v.charAt(0),L=f.autoClosingPairs.autoClosingPairsOpenByStart.get(p)||[],E=f.autoClosingPairs.autoClosingPairsCloseByStart.get(p)||[],I=L.some(F=>v.startsWith(F.open)),T=E.some(F=>v.startsWith(F.close));return!I&&T}static _findAutoClosingPairOpen(f,v,p,L){const E=f.autoClosingPairs.autoClosingPairsOpenByEnd.get(L);if(!E)return null;let I=null;for(const T of E)if(I===null||T.open.length>I.open.length){let F=!0;for(const R of p)if(v.getValueInRange(new h.Range(R.lineNumber,R.column-T.open.length+1,R.lineNumber,R.column))+L!==T.open){F=!1;break}F&&(I=T)}return I}static _findContainedAutoClosingPair(f,v){if(v.open.length<=1)return null;const p=v.close.charAt(v.close.length-1),L=f.autoClosingPairs.autoClosingPairsCloseByEnd.get(p)||[];let E=null;for(const I of L)I.open!==v.open&&v.open.includes(I.open)&&v.close.endsWith(I.close)&&(!E||I.open.length>E.open.length)&&(E=I);return E}static _getAutoClosingPairClose(f,v,p,L,E){const I=(0,b.isQuote)(L),T=I?f.autoClosingQuotes:f.autoClosingBrackets,F=I?f.shouldAutoCloseBefore.quote:f.shouldAutoCloseBefore.bracket;if(T==="never")return null;for(const x of p)if(!x.isEmpty())return null;const R=p.map(x=>{const W=x.getPosition();return E?{lineNumber:W.lineNumber,beforeColumn:W.column-L.length,afterColumn:W.column}:{lineNumber:W.lineNumber,beforeColumn:W.column,afterColumn:W.column}}),M=this._findAutoClosingPairOpen(f,v,R.map(x=>new m.Position(x.lineNumber,x.beforeColumn)),L);if(!M)return null;const N=this._findContainedAutoClosingPair(f,M),A=N?N.close:"";let P=!0;for(const x of R){const{lineNumber:W,beforeColumn:U,afterColumn:O}=x,$=v.getLineContent(W),Q=$.substring(0,U-1),se=$.substring(O-1);if(se.startsWith(A)||(P=!1),se.length>0){const H=se.charAt(0);if(!c._isBeforeClosingBrace(f,se)&&!F(H))return null}if(M.open.length===1&&(L==="\'"||L===\'"\')&&T!=="always"){const H=(0,_.getMapForWordSeparators)(f.wordSeparators);if(Q.length>0){const B=Q.charCodeAt(Q.length-1);if(H.get(B)===0)return null}}if(!v.tokenization.isCheapToTokenize(W))return null;v.tokenization.forceTokenization(W);const le=v.tokenization.getLineTokens(W),te=(0,i.createScopedLineTokens)(le,U-1);if(!M.shouldAutoClose(te,U-te.firstCharOffset))return null;const re=M.findNeutralCharacter();if(re){const H=v.tokenization.getTokenTypeIfInsertingCharacter(W,U,re);if(!M.isOK(H))return null}}return P?M.close.substring(0,M.close.length-A.length):M.close}static _runAutoClosingOpenCharType(f,v,p,L,E,I,T){const F=[];for(let R=0,M=L.length;R<M;R++){const N=L[R];F[R]=new g(N,E,!I,T)}return new b.EditOperationResult(4,F,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(f,v){return(0,b.isQuote)(v)?f.autoSurround==="quotes"||f.autoSurround==="languageDefined":f.autoSurround==="brackets"||f.autoSurround==="languageDefined"}static _isSurroundSelectionType(f,v,p,L){if(!c._shouldSurroundChar(f,L)||!f.surroundingPairs.hasOwnProperty(L))return!1;const E=(0,b.isQuote)(L);for(const I of p){if(I.isEmpty())return!1;let T=!0;for(let F=I.startLineNumber;F<=I.endLineNumber;F++){const R=v.getLineContent(F),M=F===I.startLineNumber?I.startColumn-1:0,N=F===I.endLineNumber?I.endColumn-1:R.length,A=R.substring(M,N);if(/[^ \\t]/.test(A)){T=!1;break}}if(T)return!1;if(E&&I.startLineNumber===I.endLineNumber&&I.startColumn+1===I.endColumn){const F=v.getValueInRange(I);if((0,b.isQuote)(F))return!1}}return!0}static _runSurroundSelectionType(f,v,p,L,E){const I=[];for(let T=0,F=L.length;T<F;T++){const R=L[T],M=v.surroundingPairs[E];I[T]=new w.SurroundSelectionCommand(R,E,M)}return new b.EditOperationResult(0,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(f,v,p){return!!(p.length===1&&v.tokenization.isCheapToTokenize(p[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(f,v,p,L,E){if(!v.electricChars.hasOwnProperty(E)||!L.isEmpty())return null;const I=L.getPosition();p.tokenization.forceTokenization(I.lineNumber);const T=p.tokenization.getLineTokens(I.lineNumber);let F;try{F=v.onElectricCharacter(E,T,I.column)}catch(R){return(0,S.onUnexpectedError)(R),null}if(!F)return null;if(F.matchOpenBracket){const R=(T.getLineContent()+E).lastIndexOf(F.matchOpenBracket)+1,M=p.bracketPairs.findMatchingBracketUp(F.matchOpenBracket,{lineNumber:I.lineNumber,column:R},500);if(M){if(M.startLineNumber===I.lineNumber)return null;const N=p.getLineContent(M.startLineNumber),A=k.getLeadingWhitespace(N),P=v.normalizeIndentation(A),x=p.getLineContent(I.lineNumber),W=p.getLineFirstNonWhitespaceColumn(I.lineNumber)||I.column,U=x.substring(W-1,I.column-1),O=P+U+E,$=new h.Range(I.lineNumber,1,I.lineNumber,I.column),Q=new y.ReplaceCommand($,O);return new b.EditOperationResult(l(O,f),[Q],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(f,v,p,L,E,I){if(!L)return null;let T=null;for(const N of L)if(T===null)T=N.insertedText;else if(T!==N.insertedText)return null;if(!T||T.length!==1)return null;const F=T;let R=!1;for(const N of L)if(N.deletedText.length!==0){R=!0;break}if(R){if(!c._shouldSurroundChar(v,F)||!v.surroundingPairs.hasOwnProperty(F))return null;const N=(0,b.isQuote)(F);for(const x of L)if(x.deletedSelectionStart!==0||x.deletedSelectionEnd!==x.deletedText.length||/^[ \\t]+$/.test(x.deletedText)||N&&(0,b.isQuote)(x.deletedText))return null;const A=[];for(const x of E){if(!x.isEmpty())return null;A.push(x.getPosition())}if(A.length!==L.length)return null;const P=[];for(let x=0,W=A.length;x<W;x++)P.push(new w.CompositionSurroundSelectionCommand(A[x],L[x].deletedText,v.surroundingPairs[F]));return new b.EditOperationResult(4,P,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(v,p,E,I,F)){const N=E.map(A=>new y.ReplaceCommand(new h.Range(A.positionLineNumber,A.positionColumn,A.positionLineNumber,A.positionColumn+1),"",!1));return new b.EditOperationResult(4,N,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const M=this._getAutoClosingPairClose(v,p,E,F,!0);return M!==null?this._runAutoClosingOpenCharType(f,v,p,E,F,!0,M):null}static typeWithInterceptors(f,v,p,L,E,I,T){if(!f&&T===`\n`){const M=[];for(let N=0,A=E.length;N<A;N++)M[N]=c._enter(p,L,!1,E[N]);return new b.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!f&&this._isAutoIndentType(p,L,E)){const M=[];let N=!1;for(let A=0,P=E.length;A<P;A++)if(M[A]=this._runAutoIndentType(p,L,E[A],T),!M[A]){N=!0;break}if(!N)return new b.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(p,L,E,I,T))return this._runAutoClosingOvertype(v,p,L,E,T);if(!f){const M=this._getAutoClosingPairClose(p,L,E,T,!1);if(M)return this._runAutoClosingOpenCharType(v,p,L,E,T,!1,M)}if(!f&&this._isSurroundSelectionType(p,L,E,T))return this._runSurroundSelectionType(v,p,L,E,T);if(!f&&this._isTypeInterceptorElectricChar(p,L,E)){const M=this._typeInterceptorElectricChar(v,p,L,E[0],T);if(M)return M}const F=[];for(let M=0,N=E.length;M<N;M++)F[M]=new y.ReplaceCommand(E[M],T);const R=l(T,v);return new b.EditOperationResult(R,F,{shouldPushStackElementBefore:a(v,R),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(f,v,p,L,E){const I=[];for(let F=0,R=L.length;F<R;F++)I[F]=new y.ReplaceCommand(L[F],E);const T=l(E,f);return new b.EditOperationResult(T,I,{shouldPushStackElementBefore:a(f,T),shouldPushStackElementAfter:!1})}static lineInsertBefore(f,v,p){if(v===null||p===null)return[];const L=[];for(let E=0,I=p.length;E<I;E++){let T=p[E].positionLineNumber;if(T===1)L[E]=new y.ReplaceCommandWithoutChangingPosition(new h.Range(1,1,1,1),`\n`);else{T--;const F=v.getLineMaxColumn(T);L[E]=this._enter(f,v,!1,new h.Range(T,F,T,F))}}return L}static lineInsertAfter(f,v,p){if(v===null||p===null)return[];const L=[];for(let E=0,I=p.length;E<I;E++){const T=p[E].positionLineNumber,F=v.getLineMaxColumn(T);L[E]=this._enter(f,v,!1,new h.Range(T,F,T,F))}return L}static lineBreakInsert(f,v,p){const L=[];for(let E=0,I=p.length;E<I;E++)L[E]=this._enter(f,v,!0,p[E]);return L}}e.TypeOperations=c;class g extends y.ReplaceCommandWithOffsetCursorState{constructor(f,v,p,L){super(f,(p?v:"")+L,0,-L.length),this._openCharacter=v,this._closeCharacter=L,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(f,v){const L=v.getInverseEditOperations()[0].range;return this.closeCharacterRange=new h.Range(L.startLineNumber,L.endColumn-this._closeCharacter.length,L.endLineNumber,L.endColumn),this.enclosingRange=new h.Range(L.startLineNumber,L.endColumn-this._openCharacter.length-this._closeCharacter.length,L.endLineNumber,L.endColumn),super.computeCursorState(f,v)}}e.TypeWithAutoClosingCommand=g;class o{constructor(f,v,p,L,E,I){this.deletedText=f,this.deletedSelectionStart=v,this.deletedSelectionEnd=p,this.insertedText=L,this.insertedSelectionStart=E,this.insertedSelectionEnd=I}}e.CompositionOutcome=o;function l(C,f){return C===" "?f===5||f===6?6:5:4}function a(C,f){return u(C)&&!u(f)?!0:C===5?!1:d(C)!==d(f)}function d(C){return C===6||C===5?"space":C}function u(C){return C===4||C===5||C===6}}),define(J[725],ee([1,0,11,9,463,65,451,189,231,5,23,105,197,2,219]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=void 0;class r extends i.Disposable{constructor(u,C,f,v){super(),this._model=u,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=C,this._coordinatesConverter=f,this.context=new w.CursorContext(this._model,this._viewModel,this._coordinatesConverter,v),this._cursors=new y.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,i.dispose)(this._autoClosedActions),super.dispose()}updateConfiguration(u){this.context=new w.CursorContext(this._model,this._viewModel,this._coordinatesConverter,u),this._cursors.updateContext(this.context)}onLineMappingChanged(u){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(u,"viewModel",0,this.getCursorStates())}setHasFocus(u){this._hasFocus=u}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const u=this._cursors.getSelections();for(let C=0;C<this._autoClosedActions.length;C++){const f=this._autoClosedActions[C];f.isValid(u)||(f.dispose(),this._autoClosedActions.splice(C,1),C--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(u,C,f,v){let p=!1;const L=this.context.cursorConfig.multiCursorLimit;v!==null&&v.length>L&&(v=v.slice(0,L),p=!0);const E=c.from(this._model,this);return this._cursors.setStates(v),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(u,C,f,E,p)}setCursorColumnSelectData(u){this._columnSelectData=u}revealPrimary(u,C,f,v,p,L){const E=this._cursors.getViewPositions();let I=null,T=null;E.length>1?T=this._cursors.getViewSelections():I=h.Range.fromPositions(E[0],E[0]),u.emitViewEvent(new t.ViewRevealRangeRequestEvent(C,f,I,T,v,p,L))}saveState(){const u=[],C=this._cursors.getSelections();for(let f=0,v=C.length;f<v;f++){const p=C[f];u.push({inSelectionMode:!p.isEmpty(),selectionStart:{lineNumber:p.selectionStartLineNumber,column:p.selectionStartColumn},position:{lineNumber:p.positionLineNumber,column:p.positionColumn}})}return u}restoreState(u,C){const f=[];for(let v=0,p=C.length;v<p;v++){const L=C[v];let E=1,I=1;L.position&&L.position.lineNumber&&(E=L.position.lineNumber),L.position&&L.position.column&&(I=L.position.column);let T=E,F=I;L.selectionStart&&L.selectionStart.lineNumber&&(T=L.selectionStart.lineNumber),L.selectionStart&&L.selectionStart.column&&(F=L.selectionStart.column),f.push({selectionStartLineNumber:T,selectionStartColumn:F,positionLineNumber:E,positionColumn:I})}this.setStates(u,"restoreState",0,D.CursorState.fromModelSelections(f)),this.revealPrimary(u,"restoreState",!1,0,!0,1)}onModelContentChanged(u,C){if(C instanceof n.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(u,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const f=C.rawContentChangedEvent;if(this._knownModelVersionId=f.versionId,this._isHandling)return;const v=f.containsEvent(1);if(this._prevEditOperationType=0,v)this._cursors.dispose(),this._cursors=new y.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(u,"model",1,null,!1);else if(this._hasFocus&&f.resultingSelection&&f.resultingSelection.length>0){const p=D.CursorState.fromModelSelections(f.resultingSelection);this.setStates(u,"modelChange",f.isUndoing?5:f.isRedoing?6:2,p)&&this.revealPrimary(u,"modelChange",!1,0,!0,0)}else{const p=this._cursors.readSelectionFromMarkers();this.setStates(u,"modelChange",2,D.CursorState.fromModelSelections(p))}}}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 u=this._cursors.getPrimaryCursor(),C=u.viewState.selectionStart.getStartPosition(),f=u.viewState.position;return{isReal:!1,fromViewLineNumber:C.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,C),toViewLineNumber:f.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,f)}}getSelections(){return this._cursors.getSelections()}setSelections(u,C,f,v){this.setStates(u,C,v,D.CursorState.fromModelSelections(f))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(u){this._prevEditOperationType=u}_pushAutoClosedAction(u,C){const f=[],v=[];for(let E=0,I=u.length;E<I;E++)f.push({range:u[E],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),v.push({range:C[E],options:{description:"auto-closed-enclosing",stickiness:1}});const p=this._model.deltaDecorations([],f),L=this._model.deltaDecorations([],v);this._autoClosedActions.push(new g(this._model,p,L))}_executeEditOperation(u){if(!u)return;u.shouldPushStackElementBefore&&this._model.pushStackElement();const C=o.executeCommands(this._model,this._cursors.getSelections(),u.commands);if(C){this._interpretCommandResult(C);const f=[],v=[];for(let p=0;p<u.commands.length;p++){const L=u.commands[p];L instanceof _.TypeWithAutoClosingCommand&&L.enclosingRange&&L.closeCharacterRange&&(f.push(L.closeCharacterRange),v.push(L.enclosingRange))}f.length>0&&this._pushAutoClosedAction(f,v),this._prevEditOperationType=u.type}u.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(u){(!u||u.length===0)&&(u=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(u),this._cursors.normalize()}_emitStateChangedIfNecessary(u,C,f,v,p){const L=c.from(this._model,this);if(L.equals(v))return!1;const E=this._cursors.getSelections(),I=this._cursors.getViewSelections();if(u.emitViewEvent(new t.ViewCursorStateChangedEvent(I,E,f)),!v||v.cursorState.length!==L.cursorState.length||L.cursorState.some((T,F)=>!T.modelState.equals(v.cursorState[F].modelState))){const T=v?v.cursorState.map(R=>R.modelState.selection):null,F=v?v.modelVersionId:0;u.emitOutgoingEvent(new s.CursorStateChangedEvent(T,E,F,L.modelVersionId,C||"keyboard",f,p))}return!0}_findAutoClosingPairs(u){if(!u.length)return null;const C=[];for(let f=0,v=u.length;f<v;f++){const p=u[f];if(!p.text||p.text.indexOf(`\n`)>=0)return null;const L=p.text.match(/([)\\]}>\'"`])([^)\\]}>\'"`]*)$/);if(!L)return null;const E=L[1],I=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(E);if(!I||I.length!==1)return null;const T=I[0].open,F=p.text.length-L[2].length-1,R=p.text.lastIndexOf(T,F-1);if(R===-1)return null;C.push([R,F])}return C}executeEdits(u,C,f,v){let p=null;C==="snippet"&&(p=this._findAutoClosingPairs(f)),p&&(f[0]._isTracked=!0);const L=[],E=[],I=this._model.pushEditOperations(this.getSelections(),f,T=>{if(p)for(let R=0,M=p.length;R<M;R++){const[N,A]=p[R],P=T[R],x=P.range.startLineNumber,W=P.range.startColumn-1+N,U=P.range.startColumn-1+A;L.push(new h.Range(x,U+1,x,U+2)),E.push(new h.Range(x,W+1,x,U+2))}const F=v(T);return F&&(this._isHandling=!0),F});I&&(this._isHandling=!1,this.setSelections(u,C,I,0)),L.length>0&&this._pushAutoClosedAction(L,E)}_executeEdit(u,C,f,v=0){if(this.context.cursorConfig.readOnly)return;const p=c.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),u()}catch(L){(0,S.onUnexpectedError)(L)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(C,f,v,p,!1)&&this.revealPrimary(C,f,!1,0,!0,0)}getAutoClosedCharacters(){return g.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(u){this._compositionState=new a(this._model,this.getSelections())}endComposition(u,C){const f=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{C==="keyboard"&&this._executeEditOperation(_.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,f,this.getSelections(),this.getAutoClosedCharacters()))},u,C)}type(u,C,f){this._executeEdit(()=>{if(f==="keyboard"){const v=C.length;let p=0;for(;p<v;){const L=k.nextCharLength(C,p),E=C.substr(p,L);this._executeEditOperation(_.TypeOperations.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),E)),p+=L}}else this._executeEditOperation(_.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),C))},u,f)}compositionType(u,C,f,v,p,L){if(C.length===0&&f===0&&v===0){if(p!==0){const E=this.getSelections().map(I=>{const T=I.getPosition();return new m.Selection(T.lineNumber,T.column+p,T.lineNumber,T.column+p)});this.setSelections(u,L,E,0)}return}this._executeEdit(()=>{this._executeEditOperation(_.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),C,f,v,p))},u,L)}paste(u,C,f,v,p){this._executeEdit(()=>{this._executeEditOperation(_.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),C,f,v||[]))},u,p,4)}cut(u,C){this._executeEdit(()=>{this._executeEditOperation(b.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},u,C)}executeCommand(u,C,f){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new D.EditOperationResult(0,[C],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},u,f)}executeCommands(u,C,f){this._executeEdit(()=>{this._executeEditOperation(new D.EditOperationResult(0,C,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},u,f)}}e.CursorsController=r;class c{static from(u,C){return new c(u.getVersionId(),C.getCursorStates())}constructor(u,C){this.modelVersionId=u,this.cursorState=C}equals(u){if(!u||this.modelVersionId!==u.modelVersionId||this.cursorState.length!==u.cursorState.length)return!1;for(let C=0,f=this.cursorState.length;C<f;C++)if(!this.cursorState[C].equals(u.cursorState[C]))return!1;return!0}}class g{static getAllAutoClosedCharacters(u){let C=[];for(const f of u)C=C.concat(f.getAutoClosedCharactersRanges());return C}constructor(u,C,f){this._model=u,this._autoClosedCharactersDecorations=C,this._autoClosedEnclosingDecorations=f}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const u=[];for(let C=0;C<this._autoClosedCharactersDecorations.length;C++){const f=this._model.getDecorationRange(this._autoClosedCharactersDecorations[C]);f&&u.push(f)}return u}isValid(u){const C=[];for(let f=0;f<this._autoClosedEnclosingDecorations.length;f++){const v=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[f]);if(v&&(C.push(v),v.startLineNumber!==v.endLineNumber))return!1}C.sort(h.Range.compareRangesUsingStarts),u.sort(h.Range.compareRangesUsingStarts);for(let f=0;f<u.length;f++)if(f>=C.length||!C[f].strictContainsRange(u[f]))return!1;return!0}}class o{static executeCommands(u,C,f){const v={model:u,selectionsBefore:C,trackedRanges:[],trackedRangesDirection:[]},p=this._innerExecuteCommands(v,f);for(let L=0,E=v.trackedRanges.length;L<E;L++)v.model._setTrackedRange(v.trackedRanges[L],null,0);return p}static _innerExecuteCommands(u,C){if(this._arrayIsEmpty(C))return null;const f=this._getEditOperations(u,C);if(f.operations.length===0)return null;const v=f.operations,p=this._getLoserCursorMap(v);if(p.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const L=[];for(let T=0,F=v.length;T<F;T++)p.hasOwnProperty(v[T].identifier.major.toString())||L.push(v[T]);f.hadTrackedEditOperation&&L.length>0&&(L[0]._isTracked=!0);let E=u.model.pushEditOperations(u.selectionsBefore,L,T=>{const F=[];for(let N=0;N<u.selectionsBefore.length;N++)F[N]=[];for(const N of T)N.identifier&&F[N.identifier.major].push(N);const R=(N,A)=>N.identifier.minor-A.identifier.minor,M=[];for(let N=0;N<u.selectionsBefore.length;N++)F[N].length>0?(F[N].sort(R),M[N]=C[N].computeCursorState(u.model,{getInverseEditOperations:()=>F[N],getTrackedSelection:A=>{const P=parseInt(A,10),x=u.model._getTrackedRange(u.trackedRanges[P]);return u.trackedRangesDirection[P]===0?new m.Selection(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn):new m.Selection(x.endLineNumber,x.endColumn,x.startLineNumber,x.startColumn)}})):M[N]=u.selectionsBefore[N];return M});E||(E=u.selectionsBefore);const I=[];for(const T in p)p.hasOwnProperty(T)&&I.push(parseInt(T,10));I.sort((T,F)=>F-T);for(const T of I)E.splice(T,1);return E}static _arrayIsEmpty(u){for(let C=0,f=u.length;C<f;C++)if(u[C])return!1;return!0}static _getEditOperations(u,C){let f=[],v=!1;for(let p=0,L=C.length;p<L;p++){const E=C[p];if(E){const I=this._getEditOperationsFromCommand(u,p,E);f=f.concat(I.operations),v=v||I.hadTrackedEditOperation}}return{operations:f,hadTrackedEditOperation:v}}static _getEditOperationsFromCommand(u,C,f){const v=[];let p=0;const L=(R,M,N=!1)=>{h.Range.isEmpty(R)&&M===""||v.push({identifier:{major:C,minor:p++},range:R,text:M,forceMoveMarkers:N,isAutoWhitespaceEdit:f.insertsAutoWhitespace})};let E=!1;const F={addEditOperation:L,addTrackedEditOperation:(R,M,N)=>{E=!0,L(R,M,N)},trackSelection:(R,M)=>{const N=m.Selection.liftSelection(R);let A;if(N.isEmpty())if(typeof M=="boolean")M?A=2:A=3;else{const W=u.model.getLineMaxColumn(N.startLineNumber);N.startColumn===W?A=2:A=3}else A=1;const P=u.trackedRanges.length,x=u.model._setTrackedRange(null,N,A);return u.trackedRanges[P]=x,u.trackedRangesDirection[P]=N.getDirection(),P.toString()}};try{f.getEditOperations(u.model,F)}catch(R){return(0,S.onUnexpectedError)(R),{operations:[],hadTrackedEditOperation:!1}}return{operations:v,hadTrackedEditOperation:E}}static _getLoserCursorMap(u){u=u.slice(0),u.sort((f,v)=>-h.Range.compareRangesUsingEnds(f.range,v.range));const C={};for(let f=1;f<u.length;f++){const v=u[f-1],p=u[f];if(h.Range.getStartPosition(v.range).isBefore(h.Range.getEndPosition(p.range))){let L;v.identifier.major>p.identifier.major?L=v.identifier.major:L=p.identifier.major,C[L.toString()]=!0;for(let E=0;E<u.length;E++)u[E].identifier.major===L&&(u.splice(E,1),E<f&&f--,E--);f>0&&f--}}return C}}class l{constructor(u,C,f){this.text=u,this.startSelection=C,this.endSelection=f}}class a{static _capture(u,C){const f=[];for(const v of C){if(v.startLineNumber!==v.endLineNumber)return null;f.push(new l(u.getLineContent(v.startLineNumber),v.startColumn-1,v.endColumn-1))}return f}constructor(u,C){this._original=a._capture(u,C)}deduceOutcome(u,C){if(!this._original)return null;const f=a._capture(u,C);if(!f||this._original.length!==f.length)return null;const v=[];for(let p=0,L=this._original.length;p<L;p++)v.push(a._deduceOutcome(this._original[p],f[p]));return v}static _deduceOutcome(u,C){const f=Math.min(u.startSelection,C.startSelection,k.commonPrefixLength(u.text,C.text)),v=Math.min(u.text.length-u.endSelection,C.text.length-C.endSelection,k.commonSuffixLength(u.text,C.text)),p=u.text.substring(f,u.text.length-v),L=C.text.substring(f,C.text.length-v);return new _.CompositionOutcome(p,u.startSelection-f,u.endSelection-f,L,C.startSelection-f,C.endSelection-f)}}}),define(J[726],ee([1,0,49,42,72,304]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClasses=void 0;const w=/(?:\\/|^)(?:([^\\/]+)\\/)?([^\\/]+)$/;function b(m,n,t,i){const s=i===D.FileKind.ROOT_FOLDER?["rootfolder-icon"]:i===D.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(t){let r;if(t.scheme===S.Schemas.data)r=k.DataUri.parseMetaData(t).get(k.DataUri.META_DATA_LABEL);else{const c=t.path.match(w);c?(r=h(c[2].toLowerCase()),c[1]&&s.push(`${h(c[1].toLowerCase())}-name-dir-icon`)):r=h(t.authority.toLowerCase())}if(i===D.FileKind.FOLDER)s.push(`${r}-name-folder-icon`);else{if(r){if(s.push(`${r}-name-file-icon`),s.push("name-file-icon"),r.length<=255){const g=r.split(".");for(let o=1;o<g.length;o++)s.push(`${g.slice(o).join(".")}-ext-file-icon`)}s.push("ext-file-icon")}const c=_(m,n,t);c&&s.push(`${h(c)}-lang-file-icon`)}}return s}e.getIconClasses=b;function _(m,n,t){if(!t)return null;let i=null;if(t.scheme===S.Schemas.data){const r=k.DataUri.parseMetaData(t).get(k.DataUri.META_DATA_MIME);r&&(i=n.getLanguageIdByMimeType(r))}else{const s=m.getModel(t);s&&(i=s.getLanguageId())}return i&&i!==y.PLAINTEXT_LANGUAGE_ID?i:n.guessLanguageIdByFilepathOrFirstLine(t)}function h(m){return m.replace(/[\\11\\12\\14\\15\\40]/g,"/")}}),define(J[727],ee([1,0,278,101,49,87,42,9,72]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageIds=e.clearPlatformLanguageAssociations=e.registerPlatformLanguageAssociation=void 0;let h=[],m=[],n=[];function t(a,d=!1){i(a,!1,d)}e.registerPlatformLanguageAssociation=t;function i(a,d,u){const C=s(a,d);h.push(C),C.userConfigured?n.push(C):m.push(C),u&&!C.userConfigured&&h.forEach(f=>{f.mime===C.mime||f.userConfigured||(C.extension&&f.extension===C.extension&&console.warn(`Overwriting extension <<${C.extension}>> to now point to mime <<${C.mime}>>`),C.filename&&f.filename===C.filename&&console.warn(`Overwriting filename <<${C.filename}>> to now point to mime <<${C.mime}>>`),C.filepattern&&f.filepattern===C.filepattern&&console.warn(`Overwriting filepattern <<${C.filepattern}>> to now point to mime <<${C.mime}>>`),C.firstline&&f.firstline===C.firstline&&console.warn(`Overwriting firstline <<${C.firstline}>> to now point to mime <<${C.mime}>>`))})}function s(a,d){return{id:a.id,mime:a.mime,filename:a.filename,extension:a.extension,filepattern:a.filepattern,firstline:a.firstline,userConfigured:d,filenameLowercase:a.filename?a.filename.toLowerCase():void 0,extensionLowercase:a.extension?a.extension.toLowerCase():void 0,filepatternLowercase:a.filepattern?(0,S.parse)(a.filepattern.toLowerCase()):void 0,filepatternOnPath:a.filepattern?a.filepattern.indexOf(D.posix.sep)>=0:!1}}function r(){h=h.filter(a=>a.userConfigured),m=[]}e.clearPlatformLanguageAssociations=r;function c(a,d){return g(a,d).map(u=>u.id)}e.getLanguageIds=c;function g(a,d){let u;if(a)switch(a.scheme){case y.Schemas.file:u=a.fsPath;break;case y.Schemas.data:{u=w.DataUri.parseMetaData(a).get(w.DataUri.META_DATA_LABEL);break}case y.Schemas.vscodeNotebookCell:u=void 0;break;default:u=a.path}if(!u)return[{id:"unknown",mime:k.Mimes.unknown}];u=u.toLowerCase();const C=(0,D.basename)(u),f=o(u,C,n);if(f)return[f,{id:_.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];const v=o(u,C,m);if(v)return[v,{id:_.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];if(d){const p=l(d);if(p)return[p,{id:_.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}]}return[{id:"unknown",mime:k.Mimes.unknown}]}function o(a,d,u){var C;let f,v,p;for(let L=u.length-1;L>=0;L--){const E=u[L];if(d===E.filenameLowercase){f=E;break}if(E.filepattern&&(!v||E.filepattern.length>v.filepattern.length)){const I=E.filepatternOnPath?a:d;!((C=E.filepatternLowercase)===null||C===void 0)&&C.call(E,I)&&(v=E)}E.extension&&(!p||E.extension.length>p.extension.length)&&d.endsWith(E.extensionLowercase)&&(p=E)}if(f)return f;if(v)return v;if(p)return p}function l(a){if((0,b.startsWithUTF8BOM)(a)&&(a=a.substr(1)),a.length>0)for(let d=h.length-1;d>=0;d--){const u=h[d];if(!u.firstline)continue;const C=a.match(u.firstline);if(C&&C.length>0)return u}}}),define(J[728],ee([1,0,6,2,9,727,72,90,34]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const h=Object.prototype.hasOwnProperty,m="vs.editor.nullLanguage";class n{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(m,0),this._register(w.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(s,r){this._languageIdToLanguage[r]=s,this._languageToLanguageId.set(s,r)}register(s){if(this._languageToLanguageId.has(s))return;const r=this._nextLanguageId++;this._register(s,r)}encodeLanguageId(s){return this._languageToLanguageId.get(s)||0}decodeLanguageId(s){return this._languageIdToLanguage[s]||m}}e.LanguageIdCodec=n;class t extends k.Disposable{constructor(s=!0,r=!1){super(),this._onDidChange=this._register(new S.Emitter),this.onDidChange=this._onDidChange.event,t.instanceCount++,this._warnOnOverwrite=r,this.languageIdCodec=new n,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},s&&(this._initializeFromRegistry(),this._register(w.ModesRegistry.onDidChangeLanguages(c=>{this._initializeFromRegistry()})))}dispose(){t.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,D.clearPlatformLanguageAssociations)();const s=[].concat(w.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(s)}_registerLanguages(s){for(const r of s)this._registerLanguage(r);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(r=>{const c=this._languages[r];c.name&&(this._nameMap[c.name]=c.identifier),c.aliases.forEach(g=>{this._lowercaseNameMap[g.toLowerCase()]=c.identifier}),c.mimetypes.forEach(g=>{this._mimeTypesMap[g]=c.identifier})}),_.Registry.as(b.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(s){const r=s.id;let c;h.call(this._languages,r)?c=this._languages[r]:(this.languageIdCodec.register(r),c={identifier:r,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[r]=c),this._mergeLanguage(c,s)}_mergeLanguage(s,r){const c=r.id;let g=null;if(Array.isArray(r.mimetypes)&&r.mimetypes.length>0&&(s.mimetypes.push(...r.mimetypes),g=r.mimetypes[0]),g||(g=`text/x-${c}`,s.mimetypes.push(g)),Array.isArray(r.extensions)){r.configuration?s.extensions=r.extensions.concat(s.extensions):s.extensions=s.extensions.concat(r.extensions);for(const a of r.extensions)(0,D.registerPlatformLanguageAssociation)({id:c,mime:g,extension:a},this._warnOnOverwrite)}if(Array.isArray(r.filenames))for(const a of r.filenames)(0,D.registerPlatformLanguageAssociation)({id:c,mime:g,filename:a},this._warnOnOverwrite),s.filenames.push(a);if(Array.isArray(r.filenamePatterns))for(const a of r.filenamePatterns)(0,D.registerPlatformLanguageAssociation)({id:c,mime:g,filepattern:a},this._warnOnOverwrite);if(typeof r.firstLine=="string"&&r.firstLine.length>0){let a=r.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const d=new RegExp(a);(0,y.regExpLeadsToEndlessLoop)(d)||(0,D.registerPlatformLanguageAssociation)({id:c,mime:g,firstline:d},this._warnOnOverwrite)}catch(d){console.warn(`[${r.id}]: Invalid regular expression \\`${a}\\`: `,d)}}s.aliases.push(c);let o=null;if(typeof r.aliases<"u"&&Array.isArray(r.aliases)&&(r.aliases.length===0?o=[null]:o=r.aliases),o!==null)for(const a of o)!a||a.length===0||s.aliases.push(a);const l=o!==null&&o.length>0;if(!(l&&o[0]===null)){const a=(l?o[0]:null)||c;(l||!s.name)&&(s.name=a)}r.configuration&&s.configurationFiles.push(r.configuration),r.icon&&s.icons.push(r.icon)}isRegisteredLanguageId(s){return s?h.call(this._languages,s):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(s){const r=s.toLowerCase();return h.call(this._lowercaseNameMap,r)?this._lowercaseNameMap[r]:null}getLanguageIdByMimeType(s){return s&&h.call(this._mimeTypesMap,s)?this._mimeTypesMap[s]:null}guessLanguageIdByFilepathOrFirstLine(s,r){return!s&&!r?[]:(0,D.getLanguageIds)(s,r)}}t.instanceCount=0,e.LanguagesRegistry=t}),define(J[729],ee([1,0,6,2,728,16,26,72]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class _ extends k.Disposable{constructor(n=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new S.Emitter),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new S.Emitter),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new S.Emitter({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,_.instanceCount++,this._registry=this._register(new y.LanguagesRegistry(!0,n)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){_.instanceCount--,super.dispose()}isRegisteredLanguageId(n){return this._registry.isRegisteredLanguageId(n)}getLanguageIdByLanguageName(n){return this._registry.getLanguageIdByLanguageName(n)}getLanguageIdByMimeType(n){return this._registry.getLanguageIdByMimeType(n)}guessLanguageIdByFilepathOrFirstLine(n,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(n,t);return(0,D.firstOrDefault)(i,null)}createById(n){return new h(this.onDidChange,()=>this._createAndGetLanguageIdentifier(n))}createByFilepathOrFirstLine(n,t){return new h(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(n,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(n){return(!n||!this.isRegisteredLanguageId(n))&&(n=b.PLAINTEXT_LANGUAGE_ID),n}requestBasicLanguageFeatures(n){this._requestedBasicLanguages.has(n)||(this._requestedBasicLanguages.add(n),this._onDidRequestBasicLanguageFeatures.fire(n))}requestRichLanguageFeatures(n){this._requestedRichLanguages.has(n)||(this._requestedRichLanguages.add(n),this.requestBasicLanguageFeatures(n),w.TokenizationRegistry.getOrCreate(n),this._onDidRequestRichLanguageFeatures.fire(n))}}_.instanceCount=0,e.LanguageService=_;class h{constructor(n,t){this._onDidChangeLanguages=n,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new S.Emitter({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var n;const t=this._selector();t!==this.languageId&&(this.languageId=t,(n=this._emitter)===null||n===void 0||n.fire(this.languageId))}}}),define(J[730],ee([1,0,9,230,5,23,104,33,272,228,229]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;let n=class{constructor(i,s,r,c){this._languageConfigurationService=c,this._selection=i,this._isMovingDown=s,this._autoIndent=r,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(i,s){const r=i.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){this._selectionId=s.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=s.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let c=this._selection;c.startLineNumber<c.endLineNumber&&c.endColumn===1&&(this._moveEndPositionDown=!0,c=c.setEndPosition(c.endLineNumber-1,i.getLineMaxColumn(c.endLineNumber-1)));const{tabSize:g,indentSize:o,insertSpaces:l}=i.getOptions(),a=this.buildIndentConverter(g,o,l),d={tokenization:{getLineTokens:u=>i.tokenization.getLineTokens(u),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(u,C)=>i.getLanguageIdAtPosition(u,C)},getLineContent:null};if(c.startLineNumber===c.endLineNumber&&i.getLineMaxColumn(c.startLineNumber)===1){const u=c.startLineNumber,C=this._isMovingDown?u+1:u-1;i.getLineMaxColumn(C)===1?s.addEditOperation(new y.Range(1,1,1,1),null):(s.addEditOperation(new y.Range(u,1,u,1),i.getLineContent(C)),s.addEditOperation(new y.Range(C,1,C,i.getLineMaxColumn(C)),null)),c=new D.Selection(C,1,C,1)}else{let u,C;if(this._isMovingDown){u=c.endLineNumber+1,C=i.getLineContent(u),s.addEditOperation(new y.Range(u-1,i.getLineMaxColumn(u-1),u,i.getLineMaxColumn(u)),null);let f=C;if(this.shouldAutoIndent(i,c)){const v=this.matchEnterRule(i,a,g,u,c.startLineNumber-1);if(v!==null){const L=S.getLeadingWhitespace(i.getLineContent(u)),E=v+_.getSpaceCnt(L,g);f=_.generateIndent(E,g,l)+this.trimLeft(C)}else{d.getLineContent=E=>E===c.startLineNumber?i.getLineContent(u):i.getLineContent(E);const L=(0,h.getGoodIndentForLine)(this._autoIndent,d,i.getLanguageIdAtPosition(u,1),c.startLineNumber,a,this._languageConfigurationService);if(L!==null){const E=S.getLeadingWhitespace(i.getLineContent(u)),I=_.getSpaceCnt(L,g),T=_.getSpaceCnt(E,g);I!==T&&(f=_.generateIndent(I,g,l)+this.trimLeft(C))}}s.addEditOperation(new y.Range(c.startLineNumber,1,c.startLineNumber,1),f+`\n`);const p=this.matchEnterRuleMovingDown(i,a,g,c.startLineNumber,u,f);if(p!==null)p!==0&&this.getIndentEditsOfMovingBlock(i,s,c,g,l,p);else{d.getLineContent=E=>E===c.startLineNumber?f:E>=c.startLineNumber+1&&E<=c.endLineNumber+1?i.getLineContent(E-1):i.getLineContent(E);const L=(0,h.getGoodIndentForLine)(this._autoIndent,d,i.getLanguageIdAtPosition(u,1),c.startLineNumber+1,a,this._languageConfigurationService);if(L!==null){const E=S.getLeadingWhitespace(i.getLineContent(c.startLineNumber)),I=_.getSpaceCnt(L,g),T=_.getSpaceCnt(E,g);if(I!==T){const F=I-T;this.getIndentEditsOfMovingBlock(i,s,c,g,l,F)}}}}else s.addEditOperation(new y.Range(c.startLineNumber,1,c.startLineNumber,1),f+`\n`)}else if(u=c.startLineNumber-1,C=i.getLineContent(u),s.addEditOperation(new y.Range(u,1,u+1,1),null),s.addEditOperation(new y.Range(c.endLineNumber,i.getLineMaxColumn(c.endLineNumber),c.endLineNumber,i.getLineMaxColumn(c.endLineNumber)),`\n`+C),this.shouldAutoIndent(i,c)){d.getLineContent=v=>v===u?i.getLineContent(c.startLineNumber):i.getLineContent(v);const f=this.matchEnterRule(i,a,g,c.startLineNumber,c.startLineNumber-2);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(i,s,c,g,l,f);else{const v=(0,h.getGoodIndentForLine)(this._autoIndent,d,i.getLanguageIdAtPosition(c.startLineNumber,1),u,a,this._languageConfigurationService);if(v!==null){const p=S.getLeadingWhitespace(i.getLineContent(c.startLineNumber)),L=_.getSpaceCnt(v,g),E=_.getSpaceCnt(p,g);if(L!==E){const I=L-E;this.getIndentEditsOfMovingBlock(i,s,c,g,l,I)}}}}}this._selectionId=s.trackSelection(c)}buildIndentConverter(i,s,r){return{shiftIndent:c=>k.ShiftCommand.shiftIndent(c,c.length+1,i,s,r),unshiftIndent:c=>k.ShiftCommand.unshiftIndent(c,c.length+1,i,s,r)}}parseEnterResult(i,s,r,c,g){if(g){let o=g.indentation;g.indentAction===w.IndentAction.None||g.indentAction===w.IndentAction.Indent?o=g.indentation+g.appendText:g.indentAction===w.IndentAction.IndentOutdent?o=g.indentation:g.indentAction===w.IndentAction.Outdent&&(o=s.unshiftIndent(g.indentation)+g.appendText);const l=i.getLineContent(c);if(this.trimLeft(l).indexOf(this.trimLeft(o))>=0){const a=S.getLeadingWhitespace(i.getLineContent(c));let d=S.getLeadingWhitespace(o);const u=(0,h.getIndentMetadata)(i,c,this._languageConfigurationService);u!==null&&u&2&&(d=s.unshiftIndent(d));const C=_.getSpaceCnt(d,r),f=_.getSpaceCnt(a,r);return C-f}}return null}matchEnterRuleMovingDown(i,s,r,c,g,o){if(S.lastNonWhitespaceIndex(o)>=0){const l=i.getLineMaxColumn(g),a=(0,m.getEnterAction)(this._autoIndent,i,new y.Range(g,l,g,l),this._languageConfigurationService);return this.parseEnterResult(i,s,r,c,a)}else{let l=c-1;for(;l>=1;){const u=i.getLineContent(l);if(S.lastNonWhitespaceIndex(u)>=0)break;l--}if(l<1||c>i.getLineCount())return null;const a=i.getLineMaxColumn(l),d=(0,m.getEnterAction)(this._autoIndent,i,new y.Range(l,a,l,a),this._languageConfigurationService);return this.parseEnterResult(i,s,r,c,d)}}matchEnterRule(i,s,r,c,g,o){let l=g;for(;l>=1;){let u;if(l===g&&o!==void 0?u=o:u=i.getLineContent(l),S.lastNonWhitespaceIndex(u)>=0)break;l--}if(l<1||c>i.getLineCount())return null;const a=i.getLineMaxColumn(l),d=(0,m.getEnterAction)(this._autoIndent,i,new y.Range(l,a,l,a),this._languageConfigurationService);return this.parseEnterResult(i,s,r,c,d)}trimLeft(i){return i.replace(/^\\s+/,"")}shouldAutoIndent(i,s){if(this._autoIndent<4||!i.tokenization.isCheapToTokenize(s.startLineNumber))return!1;const r=i.getLanguageIdAtPosition(s.startLineNumber,1),c=i.getLanguageIdAtPosition(s.endLineNumber,1);return!(r!==c||this._languageConfigurationService.getLanguageConfiguration(r).indentRulesSupport===null)}getIndentEditsOfMovingBlock(i,s,r,c,g,o){for(let l=r.startLineNumber;l<=r.endLineNumber;l++){const a=i.getLineContent(l),d=S.getLeadingWhitespace(a),C=_.getSpaceCnt(d,c)+o,f=_.generateIndent(C,c,g);f!==d&&(s.addEditOperation(new y.Range(l,1,l,d.length+1),f),l===r.endLineNumber&&r.endColumn<=d.length+1&&f===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(i,s){let r=s.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&r.startLineNumber<r.endLineNumber&&(r=r.setEndPosition(r.endLineNumber,2)),r}};n=Ne([fe(3,b.ILanguageConfigurationService)],n),e.MoveLinesCommand=n}),define(J[124],ee([1,0,211,11,6,2,74,38,72,296,47,421]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.openLinkFromMarkdown=e.MarkdownRenderer=void 0;let t=class Pi{constructor(c,g,o){this._options=c,this._languageService=g,this._openerService=o,this._onDidRenderAsync=new y.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(c,g,o){if(!c)return{element:document.createElement("span"),dispose:()=>{}};const l=new D.DisposableStore,a=l.add((0,S.renderMarkdown)(c,Object.assign(Object.assign({},this._getRenderOptions(c,l)),g),o));return a.element.classList.add("rendered-markdown"),{element:a.element,dispose:()=>l.dispose()}}_getRenderOptions(c,g){return{codeBlockRenderer:(o,l)=>Ee(this,void 0,void 0,function*(){var a,d,u;let C;o?C=this._languageService.getLanguageIdByLanguageName(o):this._options.editor&&(C=(a=this._options.editor.getModel())===null||a===void 0?void 0:a.getLanguageId()),C||(C=_.PLAINTEXT_LANGUAGE_ID);const f=yield(0,h.tokenizeToString)(this._languageService,l,C),v=document.createElement("span");if(v.innerHTML=(u=(d=Pi._ttpTokenizer)===null||d===void 0?void 0:d.createHTML(f))!==null&&u!==void 0?u:f,this._options.editor){const p=this._options.editor.getOption(48);(0,w.applyFontInfo)(v,p)}else this._options.codeBlockFontFamily&&(v.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(v.style.fontSize=this._options.codeBlockFontSize),v}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:o=>i(this._openerService,o,c.isTrusted),disposables:g}}}};t._ttpTokenizer=(n=window.trustedTypes)===null||n===void 0?void 0:n.createPolicy("tokenizeToString",{createHTML(r){return r}}),t=Ne([fe(1,b.ILanguageService),fe(2,m.IOpenerService)],t),e.MarkdownRenderer=t;function i(r,c,g){return Ee(this,void 0,void 0,function*(){try{return yield r.open(c,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:s(g)})}catch(o){return(0,k.onUnexpectedError)(o),!1}})}e.openLinkFromMarkdown=i;function s(r){return r===!0?!0:r&&Array.isArray(r.enabledCommands)?r.enabledCommands:!1}}),define(J[731],ee([1,0,7,16,68,2,124,299,286]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const h=S.$;class m extends D.Disposable{constructor(i,s,r){super(),this._renderDisposeables=this._register(new D.DisposableStore),this._editor=i,this._isVisible=!1,this._messages=[],this._hover=this._register(new _.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new w.MarkdownRenderer({editor:this._editor},s,r)),this._computer=new n(this._editor),this._hoverOperation=this._register(new b.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(c=>{this._withResult(c.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(48)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return m.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(s=>this._editor.applyFontInfo(s))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(i){this._computer.lineNumber!==i&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=i,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(i){this._messages=i,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(i,s){this._renderDisposeables.clear();const r=document.createDocumentFragment();for(const c of s){const g=h("div.hover-row.markdown-hover"),o=S.append(g,h("div.hover-contents")),l=this._renderDisposeables.add(this._markdownRenderer.render(c.value));o.appendChild(l.element),r.appendChild(g)}this._updateContents(r),this._showAt(i)}_updateContents(i){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(i),this._updateFont()}_showAt(i){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const s=this._editor.getLayoutInfo(),r=this._editor.getTopForLineNumber(i),c=this._editor.getScrollTop(),g=this._editor.getOption(64),o=this._hover.containerDomNode.clientHeight,l=r-c-(o-g)/2;this._hover.containerDomNode.style.left=`${s.glyphMarginLeft+s.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(l),0)}px`}}m.ID="editor.contrib.modesGlyphHoverWidget",e.MarginHoverWidget=m;class n{get lineNumber(){return this._lineNumber}set lineNumber(i){this._lineNumber=i}constructor(i){this._editor=i,this._lineNumber=-1}computeSync(){const i=c=>({value:c}),s=this._editor.getLineDecorations(this._lineNumber),r=[];if(!s)return r;for(const c of s){if(!c.options.glyphMarginClassName)continue;const g=c.options.glyphMarginHoverMessage;!g||(0,y.isEmptyMarkdownString)(g)||r.push(...(0,k.asArray)(g).map(i))}return r}}}),define(J[316],ee([1,0,7,77,29,32,6,68,2,124,284,652,8]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function i(c){return!!c&&!!(c.completion.documentation||c.completion.detail&&c.completion.detail!==c.completion.label)}e.canExpandCompletionItem=i;let s=class{constructor(g,o){this._editor=g,this._onDidClose=new w.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new w.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new _.DisposableStore,this._renderDisposeable=new _.DisposableStore,this._borderWidth=1,this._size=new S.Dimension(330,0),this.domNode=S.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=o.createInstance(h.MarkdownRenderer,{editor:g}),this._body=S.$(".body"),this._scrollbar=new k.DomScrollableElement(this._body,{alwaysConsumeMouseWheel:!0}),S.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=S.append(this._body,S.$(".header")),this._close=S.append(this._header,S.$("span"+D.ThemeIcon.asCSSSelector(y.Codicon.close))),this._close.title=n.localize(0,null),this._type=S.append(this._header,S.$("p.type")),this._docs=S.append(this._body,S.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(48)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const g=this._editor.getOptions(),o=g.get(48),l=o.getMassagedFontFamily(),a=g.get(114)||o.fontSize,d=g.get(115)||o.lineHeight,u=o.fontWeight,C=`${a}px`,f=`${d}px`;this.domNode.style.fontSize=C,this.domNode.style.lineHeight=`${d/a}`,this.domNode.style.fontWeight=u,this.domNode.style.fontFeatureSettings=o.fontFeatureSettings,this._type.style.fontFamily=l,this._close.style.height=f,this._close.style.width=f}getLayoutInfo(){const g=this._editor.getOption(115)||this._editor.getOption(48).lineHeight,o=this._borderWidth,l=o*2;return{lineHeight:g,borderWidth:o,borderHeight:l,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=n.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(g,o){var l,a;this._renderDisposeable.clear();let{detail:d,documentation:u}=g.completion;if(o){let C="";C+=`score: ${g.score[0]}\n`,C+=`prefix: ${(l=g.word)!==null&&l!==void 0?l:"(no prefix)"}\n`,C+=`word: ${g.completion.filterText?g.completion.filterText+" (filterText)":g.textLabel}\n`,C+=`distance: ${g.distance} (localityBonus-setting)\n`,C+=`index: ${g.idx}, based on ${g.completion.sortText&&`sortText: "${g.completion.sortText}"`||"label"}\n`,C+=`commit_chars: ${(a=g.completion.commitCharacters)===null||a===void 0?void 0:a.join("")}\n`,u=new b.MarkdownString().appendCodeblock("empty",C),d=`Provider: ${g.provider._debugDisplayName}`}if(!o&&!i(g)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),d){const C=d.length>1e5?`${d.substr(0,1e5)}\\u2026`:d;this._type.textContent=C,this._type.title=C,S.show(this._type),this._type.classList.toggle("auto-wrap",!/\\r?\\n^\\s+/gmi.test(C))}else S.clearNode(this._type),this._type.title="",S.hide(this._type),this.domNode.classList.add("no-type");if(S.clearNode(this._docs),typeof u=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=u;else if(u){this._docs.classList.add("markdown-docs"),S.clearNode(this._docs);const C=this._markdownRenderer.render(u);this._docs.appendChild(C.element),this._renderDisposeable.add(C),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=C=>{C.preventDefault(),C.stopPropagation()},this._close.onclick=C=>{C.preventDefault(),C.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(g,o){const l=new S.Dimension(g,o);S.Dimension.equals(l,this._size)||(this._size=l,S.size(this.domNode,g,o)),this._scrollbar.scanDomNode()}scrollDown(g=8){this._body.scrollTop+=g}scrollUp(g=8){this._body.scrollTop-=g}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(g){this._borderWidth=g}get borderWidth(){return this._borderWidth}};s=Ne([fe(1,t.IInstantiationService)],s),e.SuggestDetailsWidget=s;class r{constructor(g,o){this.widget=g,this._editor=o,this._disposables=new _.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new m.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(g.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let l,a,d=0,u=0;this._disposables.add(this._resizable.onDidWillResize(()=>{l=this._topLeft,a=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(C=>{if(l&&a){this.widget.layout(C.dimension.width,C.dimension.height);let f=!1;C.west&&(u=a.width-C.dimension.width,f=!0),C.north&&(d=a.height-C.dimension.height,f=!0),f&&this._applyTopLeft({top:l.top+d,left:l.left+u})}C.done&&(l=void 0,a=void 0,d=0,u=0,this._userSize=C.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var C;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(C=this._userSize)!==null&&C!==void 0?C:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.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(g=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),g&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(g,o){var l;const a=g.getBoundingClientRect();this._anchorBox=a,this._preferAlignAtTop=o,this._placeAtAnchor(this._anchorBox,(l=this._userSize)!==null&&l!==void 0?l:this.widget.size,o)}_placeAtAnchor(g,o,l){var a;const d=S.getClientArea(document.body),u=this.widget.getLayoutInfo(),C=new S.Dimension(220,2*u.lineHeight),f=g.top,v=function(){const A=d.width-(g.left+g.width+u.borderWidth+u.horizontalPadding),P=-u.borderWidth+g.left+g.width,x=new S.Dimension(A,d.height-g.top-u.borderHeight-u.verticalPadding),W=x.with(void 0,g.top+g.height-u.borderHeight-u.verticalPadding);return{top:f,left:P,fit:A-o.width,maxSizeTop:x,maxSizeBottom:W,minSize:C.with(Math.min(A,C.width))}}(),p=function(){const A=g.left-u.borderWidth-u.horizontalPadding,P=Math.max(u.horizontalPadding,g.left-o.width-u.borderWidth),x=new S.Dimension(A,d.height-g.top-u.borderHeight-u.verticalPadding),W=x.with(void 0,g.top+g.height-u.borderHeight-u.verticalPadding);return{top:f,left:P,fit:A-o.width,maxSizeTop:x,maxSizeBottom:W,minSize:C.with(Math.min(A,C.width))}}(),L=function(){const A=g.left,P=-u.borderWidth+g.top+g.height,x=new S.Dimension(g.width-u.borderHeight,d.height-g.top-g.height-u.verticalPadding);return{top:P,left:A,fit:x.height-o.height,maxSizeBottom:x,maxSizeTop:x,minSize:C.with(x.width)}}(),E=[v,p,L],I=(a=E.find(A=>A.fit>=0))!==null&&a!==void 0?a:E.sort((A,P)=>P.fit-A.fit)[0],T=g.top+g.height-u.borderHeight;let F,R=o.height;const M=Math.max(I.maxSizeTop.height,I.maxSizeBottom.height);R>M&&(R=M);let N;l?R<=I.maxSizeTop.height?(F=!0,N=I.maxSizeTop):(F=!1,N=I.maxSizeBottom):R<=I.maxSizeBottom.height?(F=!1,N=I.maxSizeBottom):(F=!0,N=I.maxSizeTop),this._applyTopLeft({left:I.left,top:F?I.top:T-R}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!F,I===v,F,I!==v),this._resizable.minSize=I.minSize,this._resizable.maxSize=N,this._resizable.layout(R,Math.min(N.width,o.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(g){this._topLeft=g,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=r}),define(J[317],ee([1,0,16,55,45,18,20,27,90,34]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function m(c){return Object.isFrozen(c)?c:y.deepFreeze(c)}class n{constructor(g={},o=[],l=[],a){this._contents=g,this._keys=o,this._overrides=l,this.raw=a,this.overrideConfigurations=new Map}get rawConfiguration(){var g;if(!this._rawConfiguration)if(!((g=this.raw)===null||g===void 0)&&g.length){const o=this.raw.map(l=>{if(l instanceof n)return l;const a=new t("");return a.parseRaw(l),a.configurationModel});this._rawConfiguration=o.reduce((l,a)=>a===l?a:l.merge(a),o[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(g){return g?(0,b.getConfigurationValue)(this.contents,g):this.contents}inspect(g,o){const l=this.rawConfiguration.getValue(g),a=o?this.rawConfiguration.getOverrideValue(g,o):void 0,d=o?this.rawConfiguration.override(o).getValue(g):l;return{value:l,override:a,merged:d}}getOverrideValue(g,o){const l=this.getContentsForOverrideIdentifer(o);return l?g?(0,b.getConfigurationValue)(l,g):l:void 0}override(g){let o=this.overrideConfigurations.get(g);return o||(o=this.createOverrideConfigurationModel(g),this.overrideConfigurations.set(g,o)),o}merge(...g){var o,l;const a=y.deepClone(this.contents),d=y.deepClone(this.overrides),u=[...this.keys],C=!((o=this.raw)===null||o===void 0)&&o.length?[...this.raw]:[this];for(const f of g)if(C.push(...!((l=f.raw)===null||l===void 0)&&l.length?f.raw:[f]),!f.isEmpty()){this.mergeContents(a,f.contents);for(const v of f.overrides){const[p]=d.filter(L=>S.equals(L.identifiers,v.identifiers));p?(this.mergeContents(p.contents,v.contents),p.keys.push(...v.keys),p.keys=S.distinct(p.keys)):d.push(y.deepClone(v))}for(const v of f.keys)u.indexOf(v)===-1&&u.push(v)}return new n(a,u,d,C.every(f=>f instanceof n)?void 0:C)}createOverrideConfigurationModel(g){const o=this.getContentsForOverrideIdentifer(g);if(!o||typeof o!="object"||!Object.keys(o).length)return this;const l={};for(const a of S.distinct([...Object.keys(this.contents),...Object.keys(o)])){let d=this.contents[a];const u=o[a];u&&(typeof d=="object"&&typeof u=="object"?(d=y.deepClone(d),this.mergeContents(d,u)):d=u),l[a]=d}return new n(l,this.keys,this.overrides)}mergeContents(g,o){for(const l of Object.keys(o)){if(l in g&&D.isObject(g[l])&&D.isObject(o[l])){this.mergeContents(g[l],o[l]);continue}g[l]=y.deepClone(o[l])}}getContentsForOverrideIdentifer(g){let o=null,l=null;const a=d=>{d&&(l?this.mergeContents(l,d):l=y.deepClone(d))};for(const d of this.overrides)S.equals(d.identifiers,[g])?o=d.contents:d.identifiers.includes(g)&&a(d.contents);return a(o),l}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(g,o){this.updateValue(g,o,!0)}setValue(g,o){this.updateValue(g,o,!1)}removeValue(g){const o=this.keys.indexOf(g);o!==-1&&(this.keys.splice(o,1),(0,b.removeFromValueTree)(this.contents,g),_.OVERRIDE_PROPERTY_REGEX.test(g)&&this.overrides.splice(this.overrides.findIndex(l=>S.equals(l.identifiers,(0,_.overrideIdentifiersFromKey)(g))),1))}updateValue(g,o,l){(0,b.addToValueTree)(this.contents,g,o,a=>console.error(a)),l=l||this.keys.indexOf(g)===-1,l&&this.keys.push(g),_.OVERRIDE_PROPERTY_REGEX.test(g)&&this.overrides.push({identifiers:(0,_.overrideIdentifiersFromKey)(g),keys:Object.keys(this.contents[g]),contents:(0,b.toValuesTree)(this.contents[g],a=>console.error(a))})}}e.ConfigurationModel=n;class t{constructor(g){this._name=g,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new n}parseRaw(g,o){this._raw=g;const{contents:l,keys:a,overrides:d,restricted:u,hasExcludedProperties:C}=this.doParseRaw(g,o);this._configurationModel=new n(l,a,d,C?[g]:void 0),this._restrictedConfigurations=u||[]}doParseRaw(g,o){const l=h.Registry.as(_.Extensions.Configuration).getConfigurationProperties(),a=this.filter(g,l,!0,o);g=a.raw;const d=(0,b.toValuesTree)(g,f=>console.error(`Conflict in settings file ${this._name}: ${f}`)),u=Object.keys(g),C=this.toOverrides(g,f=>console.error(`Conflict in settings file ${this._name}: ${f}`));return{contents:d,keys:u,overrides:C,restricted:a.restricted,hasExcludedProperties:a.hasExcludedProperties}}filter(g,o,l,a){let d=!1;if(!a?.scopes&&!a?.skipRestricted)return{raw:g,restricted:[],hasExcludedProperties:d};const u={},C=[];for(const f in g)if(_.OVERRIDE_PROPERTY_REGEX.test(f)&&l){const v=this.filter(g[f],o,!1,a);u[f]=v.raw,d=d||v.hasExcludedProperties,C.push(...v.restricted)}else{const v=o[f],p=v?typeof v.scope<"u"?v.scope:3:void 0;v?.restricted&&C.push(f),(p===void 0||a.scopes===void 0||a.scopes.includes(p))&&!(a.skipRestricted&&v?.restricted)?u[f]=g[f]:d=!0}return{raw:u,restricted:C,hasExcludedProperties:d}}toOverrides(g,o){const l=[];for(const a of Object.keys(g))if(_.OVERRIDE_PROPERTY_REGEX.test(a)){const d={};for(const u in g[a])d[u]=g[a][u];l.push({identifiers:(0,_.overrideIdentifiersFromKey)(a),keys:Object.keys(d),contents:(0,b.toValuesTree)(d,o)})}return l}}e.ConfigurationModelParser=t;class i{constructor(g,o,l,a,d,u,C,f,v,p,L,E,I){this.key=g,this.overrides=o,this._value=l,this.overrideIdentifiers=a,this.defaultConfiguration=d,this.policyConfiguration=u,this.applicationConfiguration=C,this.userConfiguration=f,this.localUserConfiguration=v,this.remoteUserConfiguration=p,this.workspaceConfiguration=L,this.folderConfigurationModel=E,this.memoryConfigurationModel=I}inspect(g,o,l){const a=g.inspect(o,l);return{get value(){return m(a.value)},get override(){return m(a.override)},get merged(){return m(a.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class s{constructor(g,o,l,a,d=new n,u=new n,C=new k.ResourceMap,f=new n,v=new k.ResourceMap){this._defaultConfiguration=g,this._policyConfiguration=o,this._applicationConfiguration=l,this._localUserConfiguration=a,this._remoteUserConfiguration=d,this._workspaceConfiguration=u,this._folderConfigurations=C,this._memoryConfiguration=f,this._memoryConfigurationByResource=v,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new k.ResourceMap,this._userConfiguration=null}getValue(g,o,l){return this.getConsolidatedConfigurationModel(g,o,l).getValue(g)}updateValue(g,o,l={}){let a;l.resource?(a=this._memoryConfigurationByResource.get(l.resource),a||(a=new n,this._memoryConfigurationByResource.set(l.resource,a))):a=this._memoryConfiguration,o===void 0?a.removeValue(g):a.setValue(g,o),l.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(g,o,l){const a=this.getConsolidatedConfigurationModel(g,o,l),d=this.getFolderConfigurationModelForResource(o.resource,l),u=o.resource?this._memoryConfigurationByResource.get(o.resource)||this._memoryConfiguration:this._memoryConfiguration,C=new Set;for(const f of a.overrides)for(const v of f.identifiers)a.getOverrideValue(g,v)!==void 0&&C.add(v);return new i(g,o,a.getValue(g),C.size?[...C]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,l?this._workspaceConfiguration:void 0,d||void 0,u)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(g,o,l){let a=this.getConsolidatedConfigurationModelForResource(o,l);return o.overrideIdentifier&&(a=a.override(o.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(g)!==void 0&&(a=a.merge(this._policyConfiguration)),a}getConsolidatedConfigurationModelForResource({resource:g},o){let l=this.getWorkspaceConsolidatedConfiguration();if(o&&g){const a=o.getFolder(g);a&&(l=this.getFolderConsolidatedConfiguration(a.uri)||l);const d=this._memoryConfigurationByResource.get(g);d&&(l=l.merge(d))}return l}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(g){let o=this._foldersConsolidatedConfigurations.get(g);if(!o){const l=this.getWorkspaceConsolidatedConfiguration(),a=this._folderConfigurations.get(g);a?(o=l.merge(a),this._foldersConsolidatedConfigurations.set(g,o)):o=l}return o}getFolderConfigurationModelForResource(g,o){if(o&&g){const l=o.getFolder(g);if(l)return this._folderConfigurations.get(l.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.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((g,o)=>{const{contents:l,overrides:a,keys:d}=this._folderConfigurations.get(o);return g.push([o,{contents:l,overrides:a,keys:d}]),g},[])}}static parse(g){const o=this.parseConfigurationModel(g.defaults),l=this.parseConfigurationModel(g.policy),a=this.parseConfigurationModel(g.application),d=this.parseConfigurationModel(g.user),u=this.parseConfigurationModel(g.workspace),C=g.folders.reduce((f,v)=>(f.set(w.URI.revive(v[0]),this.parseConfigurationModel(v[1])),f),new k.ResourceMap);return new s(o,l,a,d,new n,u,C,new n,new k.ResourceMap)}static parseConfigurationModel(g){return new n(g.contents,g.keys,g.overrides)}}e.Configuration=s;class r{constructor(g,o,l,a){this.change=g,this.previous=o,this.currentConfiguraiton=l,this.currentWorkspace=a,this._marker=`\n`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const d of g.keys)this.affectedKeys.add(d);for(const[,d]of g.overrides)for(const u of d)this.affectedKeys.add(u);this._affectsConfigStr=this._marker;for(const d of this.affectedKeys)this._affectsConfigStr+=d+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=s.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(g,o){var l;const a=this._marker+g,d=this._affectsConfigStr.indexOf(a);if(d<0)return!1;const u=d+a.length;if(u>=this._affectsConfigStr.length)return!1;const C=this._affectsConfigStr.charCodeAt(u);if(C!==this._markerCode1&&C!==this._markerCode2)return!1;if(o){const f=this.previousConfiguration?this.previousConfiguration.getValue(g,o,(l=this.previous)===null||l===void 0?void 0:l.workspace):void 0,v=this.currentConfiguraiton.getValue(g,o,this.currentWorkspace);return!y.equals(f,v)}return!0}}e.ConfigurationChangeEvent=r}),define(J[732],ee([1,0,2,317,90,34]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfiguration=void 0;class w extends S.Disposable{constructor(){super(...arguments),this._configurationModel=new k.ConfigurationModel}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new k.ConfigurationModel;const _=D.Registry.as(y.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(_),_)}updateConfigurationModel(_,h){const m=this.getConfigurationDefaultOverrides();for(const n of _){const t=m[n],i=h[n];t!==void 0?this._configurationModel.addValue(n,t):i?this._configurationModel.addValue(n,i.default):this._configurationModel.removeValue(n)}}}e.DefaultConfiguration=w}),define(J[111],ee([1,0,112,17,25,34,2,59]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class _{constructor(){this._coreKeybindings=new b.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(n){if(k.OS===1){if(n&&n.win)return n.win}else if(k.OS===2){if(n&&n.mac)return n.mac}else if(n&&n.linux)return n.linux;return n}registerKeybindingRule(n){const t=_.bindToCurrentPlatform(n),i=new w.DisposableStore;if(t&&t.primary){const s=(0,S.decodeKeybinding)(t.primary,k.OS);s&&i.add(this._registerDefaultKeybinding(s,n.id,n.args,n.weight,0,n.when))}if(t&&Array.isArray(t.secondary))for(let s=0,r=t.secondary.length;s<r;s++){const c=t.secondary[s],g=(0,S.decodeKeybinding)(c,k.OS);g&&i.add(this._registerDefaultKeybinding(g,n.id,n.args,n.weight,-s-1,n.when))}return i}registerCommandAndKeybindingRule(n){return(0,w.combinedDisposable)(this.registerKeybindingRule(n),y.CommandsRegistry.registerCommand(n))}_registerDefaultKeybinding(n,t,i,s,r,c){const g=this._coreKeybindings.push({keybinding:n,command:t,commandArgs:i,when:c,weight1:s,weight2:r,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,w.toDisposable)(()=>{g(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(h)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new _,e.Extensions={EditorModes:"platform.keybindingsRegistry"},D.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function h(m,n){if(m.weight1!==n.weight1)return m.weight1-n.weight1;if(m.command&&n.command){if(m.command<n.command)return-1;if(m.command>n.command)return 1}return m.weight2-n.weight2}});var Mn=this&&this.__rest||function(q,e){var S={};for(var k in q)Object.prototype.hasOwnProperty.call(q,k)&&e.indexOf(k)<0&&(S[k]=q[k]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,k=Object.getOwnPropertySymbols(q);y<k.length;y++)e.indexOf(k[y])<0&&Object.prototype.propertyIsEnumerable.call(q,k[y])&&(S[k[y]]=q[k[y]]);return S};define(J[28],ee([1,0,41,32,6,2,59,25,14,8,111]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerAction2=e.Action2=e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=e.isISubmenuItem=e.isIMenuItem=void 0;function n(l){return l.command!==void 0}e.isIMenuItem=n;function t(l){return l.submenu!==void 0}e.isISubmenuItem=t;class i{constructor(a){if(i._instances.has(a))throw new TypeError(`MenuId with identifier \'${a}\' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(a,this),this.id=a}}i._instances=new Map,i.CommandPalette=new i("CommandPalette"),i.DebugBreakpointsContext=new i("DebugBreakpointsContext"),i.DebugCallStackContext=new i("DebugCallStackContext"),i.DebugConsoleContext=new i("DebugConsoleContext"),i.DebugVariablesContext=new i("DebugVariablesContext"),i.DebugWatchContext=new i("DebugWatchContext"),i.DebugToolBar=new i("DebugToolBar"),i.DebugToolBarStop=new i("DebugToolBarStop"),i.EditorContext=new i("EditorContext"),i.SimpleEditorContext=new i("SimpleEditorContext"),i.EditorContent=new i("EditorContent"),i.EditorLineNumberContext=new i("EditorLineNumberContext"),i.EditorContextCopy=new i("EditorContextCopy"),i.EditorContextPeek=new i("EditorContextPeek"),i.EditorContextShare=new i("EditorContextShare"),i.EditorTitle=new i("EditorTitle"),i.EditorTitleRun=new i("EditorTitleRun"),i.EditorTitleContext=new i("EditorTitleContext"),i.EditorTitleContextShare=new i("EditorTitleContextShare"),i.EmptyEditorGroup=new i("EmptyEditorGroup"),i.EmptyEditorGroupContext=new i("EmptyEditorGroupContext"),i.EditorTabsBarContext=new i("EditorTabsBarContext"),i.ExplorerContext=new i("ExplorerContext"),i.ExplorerContextShare=new i("ExplorerContextShare"),i.ExtensionContext=new i("ExtensionContext"),i.GlobalActivity=new i("GlobalActivity"),i.CommandCenter=new i("CommandCenter"),i.LayoutControlMenuSubmenu=new i("LayoutControlMenuSubmenu"),i.LayoutControlMenu=new i("LayoutControlMenu"),i.MenubarMainMenu=new i("MenubarMainMenu"),i.MenubarAppearanceMenu=new i("MenubarAppearanceMenu"),i.MenubarDebugMenu=new i("MenubarDebugMenu"),i.MenubarEditMenu=new i("MenubarEditMenu"),i.MenubarCopy=new i("MenubarCopy"),i.MenubarFileMenu=new i("MenubarFileMenu"),i.MenubarGoMenu=new i("MenubarGoMenu"),i.MenubarHelpMenu=new i("MenubarHelpMenu"),i.MenubarLayoutMenu=new i("MenubarLayoutMenu"),i.MenubarNewBreakpointMenu=new i("MenubarNewBreakpointMenu"),i.PanelAlignmentMenu=new i("PanelAlignmentMenu"),i.PanelPositionMenu=new i("PanelPositionMenu"),i.MenubarPreferencesMenu=new i("MenubarPreferencesMenu"),i.MenubarRecentMenu=new i("MenubarRecentMenu"),i.MenubarSelectionMenu=new i("MenubarSelectionMenu"),i.MenubarShare=new i("MenubarShare"),i.MenubarSwitchEditorMenu=new i("MenubarSwitchEditorMenu"),i.MenubarSwitchGroupMenu=new i("MenubarSwitchGroupMenu"),i.MenubarTerminalMenu=new i("MenubarTerminalMenu"),i.MenubarViewMenu=new i("MenubarViewMenu"),i.MenubarHomeMenu=new i("MenubarHomeMenu"),i.OpenEditorsContext=new i("OpenEditorsContext"),i.ProblemsPanelContext=new i("ProblemsPanelContext"),i.SCMChangeContext=new i("SCMChangeContext"),i.SCMResourceContext=new i("SCMResourceContext"),i.SCMResourceFolderContext=new i("SCMResourceFolderContext"),i.SCMResourceGroupContext=new i("SCMResourceGroupContext"),i.SCMSourceControl=new i("SCMSourceControl"),i.SCMTitle=new i("SCMTitle"),i.SearchContext=new i("SearchContext"),i.SearchActionMenu=new i("SearchActionContext"),i.StatusBarWindowIndicatorMenu=new i("StatusBarWindowIndicatorMenu"),i.StatusBarRemoteIndicatorMenu=new i("StatusBarRemoteIndicatorMenu"),i.StickyScrollContext=new i("StickyScrollContext"),i.TestItem=new i("TestItem"),i.TestItemGutter=new i("TestItemGutter"),i.TestPeekElement=new i("TestPeekElement"),i.TestPeekTitle=new i("TestPeekTitle"),i.TouchBarContext=new i("TouchBarContext"),i.TitleBarContext=new i("TitleBarContext"),i.TitleBarTitleContext=new i("TitleBarTitleContext"),i.TunnelContext=new i("TunnelContext"),i.TunnelPrivacy=new i("TunnelPrivacy"),i.TunnelProtocol=new i("TunnelProtocol"),i.TunnelPortInline=new i("TunnelInline"),i.TunnelTitle=new i("TunnelTitle"),i.TunnelLocalAddressInline=new i("TunnelLocalAddressInline"),i.TunnelOriginInline=new i("TunnelOriginInline"),i.ViewItemContext=new i("ViewItemContext"),i.ViewContainerTitle=new i("ViewContainerTitle"),i.ViewContainerTitleContext=new i("ViewContainerTitleContext"),i.ViewTitle=new i("ViewTitle"),i.ViewTitleContext=new i("ViewTitleContext"),i.CommentEditorActions=new i("CommentEditorActions"),i.CommentThreadTitle=new i("CommentThreadTitle"),i.CommentThreadActions=new i("CommentThreadActions"),i.CommentThreadAdditionalActions=new i("CommentThreadAdditionalActions"),i.CommentThreadTitleContext=new i("CommentThreadTitleContext"),i.CommentThreadCommentContext=new i("CommentThreadCommentContext"),i.CommentTitle=new i("CommentTitle"),i.CommentActions=new i("CommentActions"),i.InteractiveToolbar=new i("InteractiveToolbar"),i.InteractiveCellTitle=new i("InteractiveCellTitle"),i.InteractiveCellDelete=new i("InteractiveCellDelete"),i.InteractiveCellExecute=new i("InteractiveCellExecute"),i.InteractiveInputExecute=new i("InteractiveInputExecute"),i.NotebookToolbar=new i("NotebookToolbar"),i.NotebookCellTitle=new i("NotebookCellTitle"),i.NotebookCellDelete=new i("NotebookCellDelete"),i.NotebookCellInsert=new i("NotebookCellInsert"),i.NotebookCellBetween=new i("NotebookCellBetween"),i.NotebookCellListTop=new i("NotebookCellTop"),i.NotebookCellExecute=new i("NotebookCellExecute"),i.NotebookCellExecutePrimary=new i("NotebookCellExecutePrimary"),i.NotebookDiffCellInputTitle=new i("NotebookDiffCellInputTitle"),i.NotebookDiffCellMetadataTitle=new i("NotebookDiffCellMetadataTitle"),i.NotebookDiffCellOutputsTitle=new i("NotebookDiffCellOutputsTitle"),i.NotebookOutputToolbar=new i("NotebookOutputToolbar"),i.NotebookEditorLayoutConfigure=new i("NotebookEditorLayoutConfigure"),i.NotebookKernelSource=new i("NotebookKernelSource"),i.BulkEditTitle=new i("BulkEditTitle"),i.BulkEditContext=new i("BulkEditContext"),i.TimelineItemContext=new i("TimelineItemContext"),i.TimelineTitle=new i("TimelineTitle"),i.TimelineTitleContext=new i("TimelineTitleContext"),i.TimelineFilterSubMenu=new i("TimelineFilterSubMenu"),i.AccountsContext=new i("AccountsContext"),i.PanelTitle=new i("PanelTitle"),i.AuxiliaryBarTitle=new i("AuxiliaryBarTitle"),i.TerminalInstanceContext=new i("TerminalInstanceContext"),i.TerminalEditorInstanceContext=new i("TerminalEditorInstanceContext"),i.TerminalNewDropdownContext=new i("TerminalNewDropdownContext"),i.TerminalTabContext=new i("TerminalTabContext"),i.TerminalTabEmptyAreaContext=new i("TerminalTabEmptyAreaContext"),i.TerminalInlineTabContext=new i("TerminalInlineTabContext"),i.WebviewContext=new i("WebviewContext"),i.InlineCompletionsActions=new i("InlineCompletionsActions"),i.NewFile=new i("NewFile"),i.MergeInput1Toolbar=new i("MergeToolbar1Toolbar"),i.MergeInput2Toolbar=new i("MergeToolbar2Toolbar"),i.MergeBaseToolbar=new i("MergeBaseToolbar"),i.MergeInputResultToolbar=new i("MergeToolbarResultToolbar"),i.InlineSuggestionToolbar=new i("InlineSuggestionToolbar"),i.InteractiveSessionContext=new i("InteractiveSessionContext"),i.InteractiveSessionCodeBlock=new i("InteractiveSessionCodeblock"),i.InteractiveSessionTitle=new i("InteractiveSessionTitle"),i.InteractiveSessionExecute=new i("InteractiveSessionExecute"),e.MenuId=i,e.IMenuService=(0,h.createDecorator)("menuService");class s{static for(a){let d=this._all.get(a);return d||(d=new s(a),this._all.set(a,d)),d}static merge(a){const d=new Set;for(const u of a)u instanceof s&&d.add(u.id);return d}constructor(a){this.id=a,this.has=d=>d===a}}s._all=new Map,e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new y.MicrotaskEmitter({merge:s.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(l){return this._commands.set(l.id,l),this._onDidChangeMenu.fire(s.for(i.CommandPalette)),(0,D.toDisposable)(()=>{this._commands.delete(l.id)&&this._onDidChangeMenu.fire(s.for(i.CommandPalette))})}getCommand(l){return this._commands.get(l)}getCommands(){const l=new Map;return this._commands.forEach((a,d)=>l.set(d,a)),l}appendMenuItem(l,a){let d=this._menuItems.get(l);d||(d=new w.LinkedList,this._menuItems.set(l,d));const u=d.push(a);return this._onDidChangeMenu.fire(s.for(l)),(0,D.toDisposable)(u)}appendMenuItems(l){const a=new D.DisposableStore;for(const{id:d,item:u}of l)a.add(this.appendMenuItem(d,u));return a}getMenuItems(l){let a;return this._menuItems.has(l)?a=[...this._menuItems.get(l)]:a=[],l===i.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(l){const a=new Set;for(const d of l)n(d)&&(a.add(d.command.id),d.alt&&a.add(d.alt.id));this._commands.forEach((d,u)=>{a.has(u)||l.push({command:d})})}};class r extends S.SubmenuAction{constructor(a,d,u){super(`submenuitem.${a.submenu.id}`,typeof a.title=="string"?a.title:a.title.value,u,"submenu"),this.item=a,this.hideActions=d}}e.SubmenuItemAction=r;let c=class ai{static label(a,d){return d?.renderShortTitle&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value}constructor(a,d,u,C,f,v){var p,L;this.hideActions=C,this._commandService=v,this.id=a.id,this.label=ai.label(a,u),this.tooltip=(L=typeof a.tooltip=="string"?a.tooltip:(p=a.tooltip)===null||p===void 0?void 0:p.value)!==null&&L!==void 0?L:"",this.enabled=!a.precondition||f.contextMatchesRules(a.precondition),this.checked=void 0;let E;if(a.toggled){const I=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=f.contextMatchesRules(I.condition),this.checked&&I.tooltip&&(this.tooltip=typeof I.tooltip=="string"?I.tooltip:I.tooltip.value),this.checked&&k.ThemeIcon.isThemeIcon(I.icon)&&(E=I.icon),I.title&&(this.label=typeof I.title=="string"?I.title:I.title.value)}E||(E=k.ThemeIcon.isThemeIcon(a.icon)?a.icon:void 0),this.item=a,this.alt=d?new ai(d,void 0,u,C,f,v):void 0,this._options=u,this.class=E&&k.ThemeIcon.asClassName(E)}run(...a){var d,u;let C=[];return!((d=this._options)===null||d===void 0)&&d.arg&&(C=[...C,this._options.arg]),!((u=this._options)===null||u===void 0)&&u.shouldForwardArgs&&(C=[...C,...a]),this._commandService.executeCommand(this.id,...C)}};c=Ne([fe(4,_.IContextKeyService),fe(5,b.ICommandService)],c),e.MenuItemAction=c;class g{constructor(a){this.desc=a}}e.Action2=g;function o(l){const a=new D.DisposableStore,d=new l,u=d.desc,{f1:C,menu:f,keybinding:v,description:p}=u,L=Mn(u,["f1","menu","keybinding","description"]);if(a.add(b.CommandsRegistry.registerCommand({id:L.id,handler:(E,...I)=>d.run(E,...I),description:p})),Array.isArray(f))for(const E of f)a.add(e.MenuRegistry.appendMenuItem(E.id,Object.assign({command:Object.assign(Object.assign({},L),{precondition:E.precondition===null?void 0:L.precondition})},E)));else f&&a.add(e.MenuRegistry.appendMenuItem(f.id,Object.assign({command:Object.assign(Object.assign({},L),{precondition:f.precondition===null?void 0:L.precondition})},f)));if(C&&(a.add(e.MenuRegistry.appendMenuItem(i.CommandPalette,{command:L,when:L.precondition})),a.add(e.MenuRegistry.addCommand(L))),Array.isArray(v))for(const E of v)a.add(m.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},E),{id:L.id,when:L.precondition?_.ContextKeyExpr.and(L.precondition,E.when):E.when})));else v&&a.add(m.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},v),{id:L.id,when:L.precondition?_.ContextKeyExpr.and(L.precondition,v.when):v.when})));return a}e.registerAction2=o}),define(J[318],ee([1,0,50,215,656,28,14]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class b extends D.Action2{constructor(){super({id:b.ID,title:{value:y.localize(0,null),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(h){const m=h.get(w.IContextKeyService).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",t=!k.TabFocus.getTabFocusMode(m);k.TabFocus.setTabFocusMode(t,m),t?(0,S.alert)(y.localize(1,null)):(0,S.alert)(y.localize(2,null))}}b.ID="editor.action.toggleTabFocusMode",e.ToggleTabFocusModeAction=b,(0,D.registerAction2)(b)}),define(J[319],ee([1,0,214,543,14,111,675,2]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.registerAndCreateHistoryNavigationContext=e.historyNavigationVisible=void 0,e.historyNavigationVisible=new y.RawContextKey("suggestWidgetVisible",!1,(0,w.localize)(0,null));const _="historyNavigationWidgetFocus",h="historyNavigationForwardsEnabled",m="historyNavigationBackwardsEnabled";let n;const t=[];function i(c,g){if(t.includes(g))throw new Error("Cannot register the same widget multiple times");t.push(g);const o=new b.DisposableStore,l=new y.RawContextKey(_,!1).bindTo(c),a=new y.RawContextKey(h,!0).bindTo(c),d=new y.RawContextKey(m,!0).bindTo(c),u=()=>{l.set(!0),n=g},C=()=>{l.set(!1),n===g&&(n=void 0)};return g.element===document.activeElement&&u(),o.add(g.onDidFocus(()=>u())),o.add(g.onDidBlur(()=>C())),o.add((0,b.toDisposable)(()=>{t.splice(t.indexOf(g),1),C()})),{historyNavigationForwardsEnablement:a,historyNavigationBackwardsEnablement:d,dispose(){o.dispose()}}}e.registerAndCreateHistoryNavigationContext=i;let s=class extends S.FindInput{constructor(g,o,l,a){super(g,o,l);const d=this._register(a.createScoped(this.inputBox.element));this._register(i(d,this.inputBox))}};s=Ne([fe(3,y.IContextKeyService)],s),e.ContextScopedFindInput=s;let r=class extends k.ReplaceInput{constructor(g,o,l,a,d=!1){super(g,o,d,l);const u=this._register(a.createScoped(this.inputBox.element));this._register(i(u,this.inputBox))}};r=Ne([fe(3,y.IContextKeyService)],r),e.ContextScopedReplaceInput=r,D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(_),y.ContextKeyExpr.equals(m,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:c=>{n?.showPreviousValue()}}),D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(_),y.ContextKeyExpr.equals(h,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:c=>{n?.showNextValue()}})}),define(J[125],ee([1,0,21,11,63,2,60,18,20,13,5,61,94,649,28,25,14,19,319]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickSuggestionsOptions=e.showSimpleSuggestions=e.getSuggestionComparator=e.provideSuggestionItems=e.CompletionItemModel=e.getSnippetSuggestSupport=e.CompletionOptions=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.Context={Visible:o.historyNavigationVisible,HasFocusedSuggestion:new c.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,(0,i.localize)(0,null)),DetailsVisible:new c.RawContextKey("suggestWidgetDetailsVisible",!1,(0,i.localize)(1,null)),MultipleSuggestions:new c.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,i.localize)(2,null)),MakesTextEdit:new c.RawContextKey("suggestionMakesTextEdit",!0,(0,i.localize)(3,null)),AcceptSuggestionsOnEnter:new c.RawContextKey("acceptSuggestionOnEnter",!0,(0,i.localize)(4,null)),HasInsertAndReplaceRange:new c.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,i.localize)(5,null)),InsertMode:new c.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,i.localize)(6,null)}),CanResolve:new c.RawContextKey("suggestionCanResolve",!1,(0,i.localize)(7,null))},e.suggestWidgetStatusbarMenu=new s.MenuId("suggestWidgetStatusBar");class l{constructor(M,N,A,P){var x;this.position=M,this.completion=N,this.container=A,this.provider=P,this.isInvalid=!1,this.score=y.FuzzyScore.Default,this.distance=0,this.textLabel=typeof N.label=="string"?N.label:(x=N.label)===null||x===void 0?void 0:x.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=N.sortText&&N.sortText.toLowerCase(),this.filterTextLow=N.filterText&&N.filterText.toLowerCase(),this.extensionId=N.extensionId,m.Range.isIRange(N.range)?(this.editStart=new h.Position(N.range.startLineNumber,N.range.startColumn),this.editInsertEnd=new h.Position(N.range.endLineNumber,N.range.endColumn),this.editReplaceEnd=new h.Position(N.range.endLineNumber,N.range.endColumn),this.isInvalid=this.isInvalid||m.Range.spansMultipleLines(N.range)||N.range.startLineNumber!==M.lineNumber):(this.editStart=new h.Position(N.range.insert.startLineNumber,N.range.insert.startColumn),this.editInsertEnd=new h.Position(N.range.insert.endLineNumber,N.range.insert.endColumn),this.editReplaceEnd=new h.Position(N.range.replace.endLineNumber,N.range.replace.endColumn),this.isInvalid=this.isInvalid||m.Range.spansMultipleLines(N.range.insert)||m.Range.spansMultipleLines(N.range.replace)||N.range.insert.startLineNumber!==M.lineNumber||N.range.replace.startLineNumber!==M.lineNumber||N.range.insert.startColumn!==N.range.replace.startColumn),typeof P.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(M){return Ee(this,void 0,void 0,function*(){if(!this._resolveCache){const N=M.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,M)).then(A=>{Object.assign(this.completion,A),this._isResolved=!0,N.dispose()},A=>{(0,k.isCancellationError)(A)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}e.CompletionItem=l;class a{constructor(M=2,N=new Set,A=new Set,P=new Map,x=!0){this.snippetSortOrder=M,this.kindFilter=N,this.providerFilter=A,this.providerItemsToReuse=P,this.showDeprecated=x}}a.default=new a,e.CompletionOptions=a;let d;function u(){return d}e.getSnippetSuggestSupport=u;class C{constructor(M,N,A,P){this.items=M,this.needsClipboard=N,this.durations=A,this.disposable=P}}e.CompletionItemModel=C;function f(R,M,N,A=a.default,P={triggerKind:0},x=S.CancellationToken.None){return Ee(this,void 0,void 0,function*(){const W=new w.StopWatch(!0);N=N.clone();const U=M.getWordAtPosition(N),O=U?new m.Range(N.lineNumber,U.startColumn,N.lineNumber,U.endColumn):m.Range.fromPositions(N),$={replace:O,insert:O.setEndPosition(N.lineNumber,N.column)},Q=[],se=new D.DisposableStore,le=[];let te=!1;const re=(B,j,G)=>{var Y,ne,de;let he=!1;if(!j)return he;for(const oe of j.suggestions)if(!A.kindFilter.has(oe.kind)){if(!A.showDeprecated&&(!((Y=oe?.tags)===null||Y===void 0)&&Y.includes(1)))continue;oe.range||(oe.range=$),oe.sortText||(oe.sortText=typeof oe.label=="string"?oe.label:oe.label.label),!te&&oe.insertTextRules&&oe.insertTextRules&4&&(te=t.SnippetParser.guessNeedsClipboard(oe.insertText)),Q.push(new l(N,oe,j,B)),he=!0}return(0,D.isDisposable)(j)&&se.add(j),le.push({providerName:(ne=B._debugDisplayName)!==null&&ne!==void 0?ne:"unknown_provider",elapsedProvider:(de=j.duration)!==null&&de!==void 0?de:-1,elapsedOverall:G.elapsed()}),he},H=(()=>Ee(this,void 0,void 0,function*(){if(!d||A.kindFilter.has(27))return;const B=A.providerItemsToReuse.get(d);if(B){B.forEach(Y=>Q.push(Y));return}if(A.providerFilter.size>0&&!A.providerFilter.has(d))return;const j=new w.StopWatch(!0),G=yield d.provideCompletionItems(M,N,P,x);re(d,G,j)}))();for(const B of R.orderedGroups(M)){let j=!1;if(yield Promise.all(B.map(G=>Ee(this,void 0,void 0,function*(){if(A.providerItemsToReuse.has(G)){const Y=A.providerItemsToReuse.get(G);Y.forEach(ne=>Q.push(ne)),j=j||Y.length>0;return}if(!(A.providerFilter.size>0&&!A.providerFilter.has(G)))try{const Y=new w.StopWatch(!0),ne=yield G.provideCompletionItems(M,N,P,x);j=re(G,ne,Y)||j}catch(Y){(0,k.onUnexpectedExternalError)(Y)}}))),j||x.isCancellationRequested)break}return yield H,x.isCancellationRequested?(se.dispose(),Promise.reject(new k.CancellationError)):new C(Q.sort(I(A.snippetSortOrder)),te,{entries:le,elapsed:W.elapsed()},se)})}e.provideSuggestionItems=f;function v(R,M){if(R.sortTextLow&&M.sortTextLow){if(R.sortTextLow<M.sortTextLow)return-1;if(R.sortTextLow>M.sortTextLow)return 1}return R.textLabel<M.textLabel?-1:R.textLabel>M.textLabel?1:R.completion.kind-M.completion.kind}function p(R,M){if(R.completion.kind!==M.completion.kind){if(R.completion.kind===27)return-1;if(M.completion.kind===27)return 1}return v(R,M)}function L(R,M){if(R.completion.kind!==M.completion.kind){if(R.completion.kind===27)return 1;if(M.completion.kind===27)return-1}return v(R,M)}const E=new Map;E.set(0,p),E.set(2,L),E.set(1,v);function I(R){return E.get(R)}e.getSuggestionComparator=I,r.CommandsRegistry.registerCommand("_executeCompletionItemProvider",(R,...M)=>Ee(void 0,void 0,void 0,function*(){const[N,A,P,x]=M;(0,b.assertType)(_.URI.isUri(N)),(0,b.assertType)(h.Position.isIPosition(A)),(0,b.assertType)(typeof P=="string"||!P),(0,b.assertType)(typeof x=="number"||!x);const{completionProvider:W}=R.get(g.ILanguageFeaturesService),U=yield R.get(n.ITextModelService).createModelReference(N);try{const O={incomplete:!1,suggestions:[]},$=[],Q=U.object.textEditorModel.validatePosition(A),se=yield f(W,U.object.textEditorModel,Q,void 0,{triggerCharacter:P??void 0,triggerKind:P?1:0});for(const le of se.items)$.length<(x??0)&&$.push(le.resolve(S.CancellationToken.None)),O.incomplete=O.incomplete||le.container.incomplete,O.suggestions.push(le.completion);try{return yield Promise.all($),O}finally{setTimeout(()=>se.disposable.dispose(),100)}}finally{U.dispose()}}));function T(R,M){var N;(N=R.getContribution("editor.contrib.suggestController"))===null||N===void 0||N.triggerSuggest(new Set().add(M),void 0,!0)}e.showSimpleSuggestions=T;class F{static isAllOff(M){return M.other==="off"&&M.comments==="off"&&M.strings==="off"}static isAllOn(M){return M.other==="on"&&M.comments==="on"&&M.strings==="on"}static valueFor(M,N){switch(N){case 1:return M.comments;case 2:return M.strings;default:return M.other}}}e.QuickSuggestionsOptions=F}),define(J[126],ee([1,0,16,2,34]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var D;(function(b){b[b.PRESERVE=0]="PRESERVE",b[b.LAST=1]="LAST"})(D=e.DefaultQuickAccessFilterValue||(e.DefaultQuickAccessFilterValue={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class w{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(_){return _.prefix.length===0?this.defaultProvider=_:this.providers.push(_),this.providers.sort((h,m)=>m.prefix.length-h.prefix.length),(0,k.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(_),1),this.defaultProvider===_&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,S.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(_){return _&&this.providers.find(m=>_.startsWith(m.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=w,y.Registry.add(e.Extensions.Quickaccess,new w)}),define(J[733],ee([1,0,680,34,2,36,126,78]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let _=class $t{constructor(m,n){this.quickInputService=m,this.keybindingService=n,this.registry=k.Registry.as(w.Extensions.Quickaccess)}provide(m){const n=new y.DisposableStore;return n.add(m.onDidAccept(()=>{const[t]=m.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),n.add(m.onDidChangeValue(t=>{const i=this.registry.getQuickAccessProvider(t.substr($t.PREFIX.length));i&&i.prefix&&i.prefix!==$t.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),m.items=this.getQuickAccessProviders().filter(t=>t.prefix!==$t.PREFIX),n}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((n,t)=>n.prefix.localeCompare(t.prefix)).flatMap(n=>this.createPicks(n))}createPicks(m){return m.helpEntries.map(n=>{const t=n.prefix||m.prefix,i=t||"\\u2026";return{prefix:t,label:i,keybinding:n.commandId?this.keybindingService.lookupKeybinding(n.commandId):void 0,ariaLabel:(0,S.localize)(0,null,i,n.description),description:n.description}})}};_.PREFIX="?",_=Ne([fe(0,b.IQuickInputService),fe(1,D.IKeybindingService)],_),e.HelpQuickAccessProvider=_}),define(J[734],ee([1,0,34,126,82,733]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),S.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:D.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:y.QuickHelpNLS.helpQuickAccessActionLabel}]})}),define(J[735],ee([1,0,12,21,92,2,8,126,78,34]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let m=class extends D.Disposable{constructor(t,i){super(),this.quickInputService=t,this.instantiationService=i,this.registry=h.Registry.as(b.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(t="",i){this.doShowOrPick(t,!1,i)}doShowOrPick(t,i,s){var r;const[c,g]=this.getOrInstantiateProvider(t),o=this.visibleQuickAccess,l=o?.descriptor;if(o&&g&&l===g){t!==g.prefix&&!s?.preserveValue&&(o.picker.value=t),this.adjustValueSelection(o.picker,g,s);return}if(g&&!s?.preserveValue){let f;if(o&&l&&l!==g){const v=o.value.substr(l.prefix.length);v&&(f=`${g.prefix}${v}`)}if(!f){const v=c?.defaultFilterValue;v===b.DefaultQuickAccessFilterValue.LAST?f=this.lastAcceptedPickerValues.get(g):typeof v=="string"&&(f=`${g.prefix}${v}`)}typeof f=="string"&&(t=f)}const a=new D.DisposableStore,d=a.add(this.quickInputService.createQuickPick());d.value=t,this.adjustValueSelection(d,g,s),d.placeholder=g?.placeholder,d.quickNavigate=s?.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!o,(typeof s?.itemActivation=="number"||s?.quickNavigateConfiguration)&&(d.itemActivation=(r=s?.itemActivation)!==null&&r!==void 0?r:_.ItemActivation.SECOND),d.contextKey=g?.contextKey,d.filterValue=f=>f.substring(g?g.prefix.length:0),g?.placeholder&&(d.ariaLabel=g?.placeholder);let u;i&&(u=new S.DeferredPromise,a.add((0,y.once)(d.onWillAccept)(f=>{f.veto(),d.hide()}))),a.add(this.registerPickerListeners(d,c,g,t,s?.providerOptions));const C=a.add(new k.CancellationTokenSource);if(c&&a.add(c.provide(d,C.token,s?.providerOptions)),(0,y.once)(d.onDidHide)(()=>{d.selectedItems.length===0&&C.cancel(),a.dispose(),u?.complete(d.selectedItems.slice(0))}),d.show(),i)return u?.p}adjustValueSelection(t,i,s){var r;let c;s?.preserveValue?c=[t.value.length,t.value.length]:c=[(r=i?.prefix.length)!==null&&r!==void 0?r:0,t.value.length],t.valueSelection=c}registerPickerListeners(t,i,s,r,c){const g=new D.DisposableStore,o=this.visibleQuickAccess={picker:t,descriptor:s,value:r};return g.add((0,D.toDisposable)(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),g.add(t.onDidChangeValue(l=>{const[a]=this.getOrInstantiateProvider(l);a!==i?this.show(l,{preserveValue:!0,providerOptions:c}):o.value=l})),s&&g.add(t.onDidAccept(()=>{this.lastAcceptedPickerValues.set(s,t.value)})),g}getOrInstantiateProvider(t){const i=this.registry.getQuickAccessProvider(t);if(!i)return[void 0,void 0];let s=this.mapProviderToDescriptor.get(i);return s||(s=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,s)),[s,i]}};m=Ne([fe(0,_.IQuickInputService),fe(1,w.IInstantiationService)],m),e.QuickAccessController=m}),define(J[736],ee([1,0,29,32,102,441]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var D;(function(w){function b(_){switch(_){case y.default.Ignore:return"severity-ignore "+k.ThemeIcon.asClassName(S.Codicon.info);case y.default.Info:return k.ThemeIcon.asClassName(S.Codicon.info);case y.default.Warning:return k.ThemeIcon.asClassName(S.Codicon.warning);case y.default.Error:return k.ThemeIcon.asClassName(S.Codicon.error);default:return""}}w.className=b})(D=e.SeverityIcon||(e.SeverityIcon={}))}),define(J[83],ee([1,0,6,2,18,549,8]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.loadKeyTargets=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=void 0,e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,w.createDecorator)("storageService");var b;(function(n){n[n.NONE=0]="NONE",n[n.SHUTDOWN=1]="SHUTDOWN"})(b=e.WillSaveStateReason||(e.WillSaveStateReason={}));function _(n){const t=n.get(e.TARGET_KEY);if(t)try{return JSON.parse(t)}catch{}return Object.create(null)}e.loadKeyTargets=_;class h extends k.Disposable{constructor(t={flushInterval:h.DEFAULT_FLUSH_INTERVAL}){super(),this.options=t,this._onDidChangeValue=this._register(new S.PauseableEmitter),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new S.PauseableEmitter),this._onWillSaveState=this._register(new S.Emitter),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}emitDidChangeValue(t,i){if(i===e.TARGET_KEY){switch(t){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:t})}else this._onDidChangeValue.fire({scope:t,key:i,target:this.getKeyTargets(t)[i]})}get(t,i,s){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.get(t,s)}getBoolean(t,i,s){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.getBoolean(t,s)}getNumber(t,i,s){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.getNumber(t,s)}store(t,i,s,r){if((0,y.isUndefinedOrNull)(i)){this.remove(t,s);return}this.withPausedEmitters(()=>{var c;this.updateKeyTarget(t,s,r),(c=this.getStorage(s))===null||c===void 0||c.set(t,i)})}remove(t,i){this.withPausedEmitters(()=>{var s;this.updateKeyTarget(t,i,void 0),(s=this.getStorage(i))===null||s===void 0||s.delete(t)})}withPausedEmitters(t){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{t()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(t,i,s){var r,c;const g=this.getKeyTargets(i);typeof s=="number"?g[t]!==s&&(g[t]=s,(r=this.getStorage(i))===null||r===void 0||r.set(e.TARGET_KEY,JSON.stringify(g))):typeof g[t]=="number"&&(delete g[t],(c=this.getStorage(i))===null||c===void 0||c.set(e.TARGET_KEY,JSON.stringify(g)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(t){switch(t){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(t){const i=this.getStorage(t);return i?_(i):Object.create(null)}}h.DEFAULT_FLUSH_INTERVAL=60*1e3,e.AbstractStorageService=h;class m extends h{constructor(){super(),this.applicationStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase,{hint:D.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase,{hint:D.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase,{hint:D.StorageHint.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(t=>this.emitDidChangeValue(1,t))),this._register(this.profileStorage.onDidChangeStorage(t=>this.emitDidChangeValue(0,t))),this._register(this.applicationStorage.onDidChangeStorage(t=>this.emitDidChangeValue(-1,t)))}getStorage(t){switch(t){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}e.InMemoryStorageService=m}),define(J[737],ee([1,0,12,92,55,5,305,51,8,83]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,_.createDecorator)("ICodeLensCache");class m{constructor(i,s){this.lineCount=i,this.data=s}}let n=class{constructor(i){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new y.LRUCache(20,.75);const s="codelens/cache";(0,S.runWhenIdle)(()=>i.remove(s,1));const r="codelens/cache2",c=i.get(r,1,"{}");this._deserialize(c),(0,k.once)(i.onWillSaveState)(g=>{g.reason===h.WillSaveStateReason.SHUTDOWN&&i.store(r,this._serialize(),1,1)})}put(i,s){const r=s.lenses.map(o=>{var l;return{range:o.symbol.range,command:o.symbol.command&&{id:"",title:(l=o.symbol.command)===null||l===void 0?void 0:l.title}}}),c=new w.CodeLensModel;c.add({lenses:r,dispose:()=>{}},this._fakeProvider);const g=new m(i.getLineCount(),c);this._cache.set(i.uri.toString(),g)}get(i){const s=this._cache.get(i.uri.toString());return s&&s.lineCount===i.getLineCount()?s.data:void 0}delete(i){this._cache.delete(i.uri.toString())}_serialize(){const i=Object.create(null);for(const[s,r]of this._cache){const c=new Set;for(const g of r.data.lenses)c.add(g.symbol.range.startLineNumber);i[s]={lineCount:r.lineCount,lines:[...c.values()]}}return JSON.stringify(i)}_deserialize(i){try{const s=JSON.parse(i);for(const r in s){const c=s[r],g=[];for(const l of c.lines)g.push({range:new D.Range(l,1,l,11)});const o=new w.CodeLensModel;o.add({lenses:g,dispose(){}},this._fakeProvider),this._cache.set(r,new m(c.lineCount,o))}}catch{}}};n=Ne([fe(0,h.IStorageService)],n),e.CodeLensCache=n,(0,b.registerSingleton)(e.ICodeLensCache,n,1)}),define(J[320],ee([1,0,12,2,55,185,26,27,51,8,83]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class n{constructor(g){this.name=g}select(g,o,l){if(l.length===0)return 0;const a=l[0].score[0];for(let d=0;d<l.length;d++){const{score:u,completion:C}=l[d];if(u[0]!==a)break;if(C.preselect)return d}return 0}}e.Memory=n;class t extends n{constructor(){super("first")}memorize(g,o,l){}toJSON(){}fromJSON(){}}e.NoMemory=t;class i extends n{constructor(){super("recentlyUsed"),this._cache=new y.LRUCache(300,.66),this._seq=0}memorize(g,o,l){const a=`${g.getLanguageId()}/${l.textLabel}`;this._cache.set(a,{touch:this._seq++,type:l.completion.kind,insertText:l.completion.insertText})}select(g,o,l){if(l.length===0)return 0;const a=g.getLineContent(o.lineNumber).substr(o.column-10,o.column-1);if(/\\s$/.test(a))return super.select(g,o,l);const d=l[0].score[0];let u=-1,C=-1,f=-1;for(let v=0;v<l.length&&l[v].score[0]===d;v++){const p=`${g.getLanguageId()}/${l[v].textLabel}`,L=this._cache.peek(p);if(L&&L.touch>f&&L.type===l[v].completion.kind&&L.insertText===l[v].completion.insertText&&(f=L.touch,C=v),l[v].completion.preselect&&u===-1)return u=v}return C!==-1?C:u!==-1?u:0}toJSON(){return this._cache.toJSON()}fromJSON(g){this._cache.clear();const o=0;for(const[l,a]of g)a.touch=o,a.type=typeof a.type=="number"?a.type:w.CompletionItemKinds.fromString(a.type),this._cache.set(l,a);this._seq=this._cache.size}}e.LRUMemory=i;class s extends n{constructor(){super("recentlyUsedByPrefix"),this._trie=D.TernarySearchTree.forStrings(),this._seq=0}memorize(g,o,l){const{word:a}=g.getWordUntilPosition(o),d=`${g.getLanguageId()}/${a}`;this._trie.set(d,{type:l.completion.kind,insertText:l.completion.insertText,touch:this._seq++})}select(g,o,l){const{word:a}=g.getWordUntilPosition(o);if(!a)return super.select(g,o,l);const d=`${g.getLanguageId()}/${a}`;let u=this._trie.get(d);if(u||(u=this._trie.findSubstr(d)),u)for(let C=0;C<l.length;C++){const{kind:f,insertText:v}=l[C].completion;if(f===u.type&&v===u.insertText)return C}return super.select(g,o,l)}toJSON(){const g=[];return this._trie.forEach((o,l)=>g.push([l,o])),g.sort((o,l)=>-(o[1].touch-l[1].touch)).forEach((o,l)=>o[1].touch=l),g.slice(0,200)}fromJSON(g){if(this._trie.clear(),g.length>0){this._seq=g[0][1].touch+1;for(const[o,l]of g)l.type=typeof l.type=="number"?l.type:w.CompletionItemKinds.fromString(l.type),this._trie.set(o,l)}}}e.PrefixMemory=s;let r=class Gt{constructor(g,o){this._storageService=g,this._configService=o,this._disposables=new k.DisposableStore,this._persistSoon=new S.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(g.onWillSaveState(l=>{l.reason===m.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(g,o,l){this._withStrategy(g,o).memorize(g,o,l),this._persistSoon.schedule()}select(g,o,l){return this._withStrategy(g,o).select(g,o,l)}_withStrategy(g,o){var l;const a=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:g.getLanguageIdAtPosition(o.lineNumber,o.column),resource:g.uri});if(((l=this._strategy)===null||l===void 0?void 0:l.name)!==a){this._saveState();const d=Gt._strategyCtors.get(a)||t;this._strategy=new d;try{const C=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,f=this._storageService.get(`${Gt._storagePrefix}/${a}`,C);f&&this._strategy.fromJSON(JSON.parse(f))}catch{}}return this._strategy}_saveState(){if(this._strategy){const o=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=JSON.stringify(this._strategy);this._storageService.store(`${Gt._storagePrefix}/${this._strategy.name}`,l,o,1)}}};r._strategyCtors=new Map([["recentlyUsedByPrefix",s],["recentlyUsed",i],["first",t]]),r._storagePrefix="suggest/memories",r=Ne([fe(0,m.IStorageService),fe(1,b.IConfigurationService)],r),e.SuggestMemoryService=r,e.ISuggestMemoryService=(0,h.createDecorator)("ISuggestMemories"),(0,_.registerSingleton)(e.ISuggestMemoryService,r,1)}),define(J[738],ee([1,0,12,6,2,28,25,14,41,83,16,668]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let t=class{constructor(o,l){this._commandService=o,this._hiddenStates=new i(l)}createMenu(o,l,a){return new r(o,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},a),this._commandService,l)}resetHiddenStates(o){this._hiddenStates.reset(o)}};t=Ne([fe(0,w.ICommandService),fe(1,h.IStorageService)],t),e.MenuService=t;let i=class xt{constructor(o){this._storageService=o,this._disposables=new y.DisposableStore,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const l=o.get(xt._key,0,"{}");this._data=JSON.parse(l)}catch{this._data=Object.create(null)}this._disposables.add(o.onDidChangeValue(l=>{if(l.key===xt._key){if(!this._ignoreChangeEvent)try{const a=o.get(xt._key,0,"{}");this._data=JSON.parse(a)}catch(a){console.log("FAILED to read storage after UPDATE",a)}this._onDidChange.fire()}}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(o,l){var a;return(a=this._hiddenByDefaultCache.get(`${o.id}/${l}`))!==null&&a!==void 0?a:!1}setDefaultState(o,l,a){this._hiddenByDefaultCache.set(`${o.id}/${l}`,a)}isHidden(o,l){var a,d;const u=this._isHiddenByDefault(o,l),C=(d=(a=this._data[o.id])===null||a===void 0?void 0:a.includes(l))!==null&&d!==void 0?d:!1;return u?!C:C}updateHidden(o,l,a){this._isHiddenByDefault(o,l)&&(a=!a);const u=this._data[o.id];if(a)u?u.indexOf(l)<0&&u.push(l):this._data[o.id]=[l];else if(u){const C=u.indexOf(l);C>=0&&(0,m.removeFastWithoutKeepingOrder)(u,C),u.length===0&&delete this._data[o.id]}this._persist()}reset(o){if(o===void 0)this._data=Object.create(null),this._persist();else{for(const{id:l}of o)this._data[l]&&delete this._data[l];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const o=JSON.stringify(this._data);this._storageService.store(xt._key,o,0,0)}finally{this._ignoreChangeEvent=!1}}};i._key="menu.hiddenCommands",i=Ne([fe(0,h.IStorageService)],i);let s=class kt{constructor(o,l,a,d,u){this._id=o,this._hiddenStates=l,this._collectContextKeysForSubmenus=a,this._commandService=d,this._contextKeyService=u,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const o=D.MenuRegistry.getMenuItems(this._id);let l;o.sort(kt._compareMenuItems);for(const a of o){const d=a.group||"";(!l||l[0]!==d)&&(l=[d,[]],this._menuGroups.push(l)),l[1].push(a),this._collectContextKeys(a)}}_collectContextKeys(o){if(kt._fillInKbExprKeys(o.when,this._structureContextKeys),(0,D.isIMenuItem)(o)){if(o.command.precondition&&kt._fillInKbExprKeys(o.command.precondition,this._preconditionContextKeys),o.command.toggled){const l=o.command.toggled.condition||o.command.toggled;kt._fillInKbExprKeys(l,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&D.MenuRegistry.getMenuItems(o.submenu).forEach(this._collectContextKeys,this)}createActionGroups(o){const l=[];for(const a of this._menuGroups){const[d,u]=a,C=[];for(const f of u)if(this._contextKeyService.contextMatchesRules(f.when)){const v=(0,D.isIMenuItem)(f);v&&this._hiddenStates.setDefaultState(this._id,f.command.id,!!f.isHiddenByDefault);const p=c(this._id,v?f.command:f,this._hiddenStates);if(v)C.push(new D.MenuItemAction(f.command,f.alt,o,p,this._contextKeyService,this._commandService));else{const L=new kt(f.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(o),E=_.Separator.join(...L.map(I=>I[1]));E.length>0&&C.push(new D.SubmenuItemAction(f,p,E))}}C.length>0&&l.push([d,C])}return l}static _fillInKbExprKeys(o,l){if(o)for(const a of o.keys())l.add(a)}static _compareMenuItems(o,l){const a=o.group,d=l.group;if(a!==d){if(a){if(!d)return-1}else return 1;if(a==="navigation")return-1;if(d==="navigation")return 1;const f=a.localeCompare(d);if(f!==0)return f}const u=o.order||0,C=l.order||0;return u<C?-1:u>C?1:kt._compareTitles((0,D.isIMenuItem)(o)?o.command.title:o.title,(0,D.isIMenuItem)(l)?l.command.title:l.title)}static _compareTitles(o,l){const a=typeof o=="string"?o:o.original,d=typeof l=="string"?l:l.original;return a.localeCompare(d)}};s=Ne([fe(3,w.ICommandService),fe(4,b.IContextKeyService)],s);let r=class{constructor(o,l,a,d,u){this._disposables=new y.DisposableStore,this._menuInfo=new s(o,l,a.emitEventsForSubmenuChanges,d,u);const C=new S.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},a.eventDebounceDelay);this._disposables.add(C),this._disposables.add(D.MenuRegistry.onDidChangeMenu(L=>{L.has(o)&&C.schedule()}));const f=this._disposables.add(new y.DisposableStore),v=L=>{let E=!1,I=!1,T=!1;for(const F of L)if(E=E||F.isStructuralChange,I=I||F.isEnablementChange,T=T||F.isToggleChange,E&&I&&T)break;return{menu:this,isStructuralChange:E,isEnablementChange:I,isToggleChange:T}},p=()=>{f.add(u.onDidChangeContext(L=>{const E=L.affectsSome(this._menuInfo.structureContextKeys),I=L.affectsSome(this._menuInfo.preconditionContextKeys),T=L.affectsSome(this._menuInfo.toggledContextKeys);(E||I||T)&&this._onDidChange.fire({menu:this,isStructuralChange:E,isEnablementChange:I,isToggleChange:T})})),f.add(l.onDidChange(L=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new k.DebounceEmitter({onWillAddFirstListener:p,onDidRemoveLastListener:f.clear.bind(f),delay:a.eventDebounceDelay,merge:v}),this.onDidChange=this._onDidChange.event}getActions(o){return this._menuInfo.createActionGroups(o)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};r=Ne([fe(3,w.ICommandService),fe(4,b.IContextKeyService)],r);function c(g,o,l){const a=(0,D.isISubmenuItem)(o)?o.submenu.id:o.id,d=typeof o.title=="string"?o.title:o.title.value,u=(0,_.toAction)({id:`hide/${g.id}/${a}`,label:(0,n.localize)(0,null,d),run(){l.updateHidden(g,a,!0)}}),C=(0,_.toAction)({id:`toggle/${g.id}/${a}`,label:d,get checked(){return!l.isHidden(g,a)},run(){l.updateHidden(g,a,!!this.checked)}});return{hide:u,toggle:C,get isHidden(){return!C.checked}}}}),define(J[79],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,S.createDecorator)("telemetryService")}),define(J[15],ee([1,0,571,20,30,13,53,61,28,25,14,8,111,34,79,18,62]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"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.registerModelAndPositionCommand=e.EditorAction2=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=void 0;class g{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){const A=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const P of A){let x=P.kbExpr;this.precondition&&(x?x=m.ContextKeyExpr.and(x,this.precondition):x=this.precondition);const W={id:this.id,weight:P.weight,args:P.args,when:x,primary:P.primary,secondary:P.secondary,win:P.win,linux:P.linux,mac:P.mac};t.KeybindingsRegistry.registerKeybindingRule(W)}}h.CommandsRegistry.registerCommand({id:this.id,handler:(A,P)=>this.runCommand(A,P),description:this._description})}_registerMenuItem(A){_.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=g;class o extends g{constructor(){super(...arguments),this._implementations=[]}addImplementation(A,P,x){return this._implementations.push({priority:A,name:P,implementation:x}),this._implementations.sort((W,U)=>U.priority-W.priority),{dispose:()=>{for(let W=0;W<this._implementations.length;W++)if(this._implementations[W].implementation===x){this._implementations.splice(W,1);return}}}}runCommand(A,P){const x=A.get(c.ILogService);x.trace(`Executing Command \'${this.id}\' which has ${this._implementations.length} bound.`);for(const W of this._implementations){const U=W.implementation(A,P);if(U)return x.trace(`Command \'${this.id}\' was handled by \'${W.name}\'.`),typeof U=="boolean"?void 0:U}x.trace(`The Command \'${this.id}\' was not handled by any implementation.`)}}e.MultiCommand=o;class l extends g{constructor(A,P){super(P),this.command=A}runCommand(A,P){return this.command.runCommand(A,P)}}e.ProxyCommand=l;class a extends g{static bindToContribution(A){return class extends a{constructor(x){super(x),this._callback=x.handler}runEditorCommand(x,W,U){const O=A(W);O&&this._callback(O,U)}}}static runEditorCommand(A,P,x,W){const U=A.get(y.ICodeEditorService),O=U.getFocusedCodeEditor()||U.getActiveCodeEditor();if(O)return O.invokeWithinContext($=>{if($.get(m.IContextKeyService).contextMatchesRules((0,r.withNullAsUndefined)(x)))return W($,O,P)})}runCommand(A,P){return a.runEditorCommand(A,P,this.precondition,(x,W,U)=>this.runEditorCommand(x,W,U))}}e.EditorCommand=a;class d extends a{static convertOptions(A){let P;Array.isArray(A.menuOpts)?P=A.menuOpts:A.menuOpts?P=[A.menuOpts]:P=[];function x(W){return W.menuId||(W.menuId=_.MenuId.EditorContext),W.title||(W.title=A.label),W.when=m.ContextKeyExpr.and(A.precondition,W.when),W}return Array.isArray(A.contextMenuOpts)?P.push(...A.contextMenuOpts.map(x)):A.contextMenuOpts&&P.push(x(A.contextMenuOpts)),A.menuOpts=P,A}constructor(A){super(d.convertOptions(A)),this.label=A.label,this.alias=A.alias}runEditorCommand(A,P,x){return this.reportTelemetry(A,P),this.run(A,P,x||{})}reportTelemetry(A,P){A.get(s.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=d;class u extends d{constructor(){super(...arguments),this._implementations=[]}addImplementation(A,P){return this._implementations.push([A,P]),this._implementations.sort((x,W)=>W[0]-x[0]),{dispose:()=>{for(let x=0;x<this._implementations.length;x++)if(this._implementations[x][1]===P){this._implementations.splice(x,1);return}}}}run(A,P,x){for(const W of this._implementations){const U=W[1](A,P,x);if(U)return typeof U=="boolean"?void 0:U}}}e.MultiEditorAction=u;class C extends _.Action2{run(A,...P){const x=A.get(y.ICodeEditorService),W=x.getFocusedCodeEditor()||x.getActiveCodeEditor();if(W)return W.invokeWithinContext(U=>{if(U.get(m.IContextKeyService).contextMatchesRules((0,r.withNullAsUndefined)(this.desc.precondition)))return this.runEditorCommand(U,W,...P)})}}e.EditorAction2=C;function f(N,A){h.CommandsRegistry.registerCommand(N,function(P,...x){const W=P.get(n.IInstantiationService),[U,O]=x;(0,r.assertType)(k.URI.isUri(U)),(0,r.assertType)(D.Position.isIPosition(O));const $=P.get(w.IModelService).getModel(U);if($){const Q=D.Position.lift(O);return W.invokeFunction(A,$,Q,...x.slice(2))}return P.get(b.ITextModelService).createModelReference(U).then(Q=>new Promise((se,le)=>{try{const te=W.invokeFunction(A,Q.object.textEditorModel,D.Position.lift(O),x.slice(2));se(te)}catch(te){le(te)}}).finally(()=>{Q.dispose()}))})}e.registerModelAndPositionCommand=f;function v(N){return R.INSTANCE.registerEditorCommand(N),N}e.registerEditorCommand=v;function p(N){const A=new N;return R.INSTANCE.registerEditorAction(A),A}e.registerEditorAction=p;function L(N){return R.INSTANCE.registerEditorAction(N),N}e.registerMultiEditorAction=L;function E(N){R.INSTANCE.registerEditorAction(N)}e.registerInstantiatedEditorAction=E;function I(N,A,P){R.INSTANCE.registerEditorContribution(N,A,P)}e.registerEditorContribution=I;var T;(function(N){function A(O){return R.INSTANCE.getEditorCommand(O)}N.getEditorCommand=A;function P(){return R.INSTANCE.getEditorActions()}N.getEditorActions=P;function x(){return R.INSTANCE.getEditorContributions()}N.getEditorContributions=x;function W(O){return R.INSTANCE.getEditorContributions().filter($=>O.indexOf($.id)>=0)}N.getSomeEditorContributions=W;function U(){return R.INSTANCE.getDiffEditorContributions()}N.getDiffEditorContributions=U})(T=e.EditorExtensionsRegistry||(e.EditorExtensionsRegistry={}));const F={EditorCommonContributions:"editor.contributions"};class R{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(A,P,x){this.editorContributions.push({id:A,ctor:P,instantiation:x})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(A){A.register(),this.editorActions.push(A)}getEditorActions(){return this.editorActions}registerEditorCommand(A){A.register(),this.editorCommands[A.id]=A}getEditorCommand(A){return this.editorCommands[A]||null}}R.INSTANCE=new R,i.Registry.add(F.EditorCommonContributions,R.INSTANCE);function M(N){return N.register(),N}e.UndoCommand=M(new o({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:S.localize(0,null),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:S.localize(1,null),order:1}]})),M(new l(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=M(new o({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:S.localize(2,null),order:2},{menuId:_.MenuId.CommandPalette,group:"",title:S.localize(3,null),order:1}]})),M(new l(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=M(new o({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:_.MenuId.MenubarSelectionMenu,group:"1_basic",title:S.localize(4,null),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:S.localize(5,null),order:1}]}))}),define(J[180],ee([1,0,570,46,18,50,15,30,461,65,189,190,231,13,5,22,14,111]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const o=0;class l extends w.EditorCommand{runEditorCommand(F,R,M){const N=R._getViewModel();N&&this.runCoreEditorCommand(N,M||{})}}e.CoreEditorCommand=l;var a;(function(T){const F=function(M){if(!y.isObject(M))return!1;const N=M;return!(!y.isString(N.to)||!y.isUndefined(N.by)&&!y.isString(N.by)||!y.isUndefined(N.value)&&!y.isNumber(N.value)||!y.isUndefined(N.revealCursor)&&!y.isBoolean(N.revealCursor))};T.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\t\t\t\t\t* \'to\': A mandatory direction value.\\n\t\t\t\t\t\t```\\n\t\t\t\t\t\t\'up\', \'down\'\\n\t\t\t\t\t\t```\\n\t\t\t\t\t* \'by\': Unit to move. Default is computed based on \'to\' value.\\n\t\t\t\t\t\t```\\n\t\t\t\t\t\t\'line\', \'wrappedLine\', \'page\', \'halfPage\', \'editor\'\\n\t\t\t\t\t\t```\\n\t\t\t\t\t* \'value\': Number of units to move. Default is \'1\'.\\n\t\t\t\t\t* \'revealCursor\': If \'true\' reveals the cursor if it is outside view port.\\n\t\t\t\t",constraint:F,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},T.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},T.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function R(M){let N;switch(M.to){case T.RawDirection.Up:N=1;break;case T.RawDirection.Right:N=2;break;case T.RawDirection.Down:N=3;break;case T.RawDirection.Left:N=4;break;default:return null}let A;switch(M.by){case T.RawUnit.Line:A=1;break;case T.RawUnit.WrappedLine:A=2;break;case T.RawUnit.Page:A=3;break;case T.RawUnit.HalfPage:A=4;break;case T.RawUnit.Editor:A=5;break;case T.RawUnit.Column:A=6;break;default:A=2}const P=Math.floor(M.value||1),x=!!M.revealCursor;return{direction:N,unit:A,value:P,revealCursor:x,select:!!M.select}}T.parse=R})(a=e.EditorScroll_||(e.EditorScroll_={}));var d;(function(T){const F=function(R){if(!y.isObject(R))return!1;const M=R;return!(!y.isNumber(M.lineNumber)&&!y.isString(M.lineNumber)||!y.isUndefined(M.at)&&!y.isString(M.at))};T.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\t\t\t\t\t* \'lineNumber\': A mandatory line number value.\\n\t\t\t\t\t* \'at\': Logical position at which line has to be revealed.\\n\t\t\t\t\t\t```\\n\t\t\t\t\t\t\'top\', \'center\', \'bottom\'\\n\t\t\t\t\t\t```\\n\t\t\t\t",constraint:F,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},T.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(d=e.RevealLine_||(e.RevealLine_={}));class u{constructor(F){F.addImplementation(1e4,"code-editor",(R,M)=>{const N=R.get(b.ICodeEditorService).getFocusedCodeEditor();return N&&N.hasTextFocus()?this._runEditorCommand(R,N,M):!1}),F.addImplementation(1e3,"generic-dom-input-textarea",(R,M)=>{const N=document.activeElement;return N&&["input","textarea"].indexOf(N.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),F.addImplementation(0,"generic-dom",(R,M)=>{const N=R.get(b.ICodeEditorService).getActiveCodeEditor();return N?(N.focus(),this._runEditorCommand(R,N,M)):!1})}_runEditorCommand(F,R,M){const N=this.runEditorCommand(F,R,M);return N||!0}}var C;(function(T){class F extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){if(!j.position)return;B.model.pushStackElement(),B.setCursorStates(j.source,3,[n.CursorMoveCommands.moveTo(B,B.getPrimaryCursorState(),this._inSelectionMode,j.position,j.viewPosition)])&&j.revealType!==2&&B.revealPrimaryCursor(j.source,!0,!0)}}T.MoveTo=(0,w.registerEditorCommand)(new F({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),T.MoveToSelect=(0,w.registerEditorCommand)(new F({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class R extends l{runCoreEditorCommand(B,j){B.model.pushStackElement();const G=this._getColumnSelectResult(B,B.getPrimaryCursorState(),B.getCursorColumnSelectData(),j);G!==null&&(B.setCursorStates(j.source,3,G.viewStates.map(Y=>h.CursorState.fromViewState(Y))),B.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:G.fromLineNumber,fromViewVisualColumn:G.fromVisualColumn,toViewLineNumber:G.toLineNumber,toViewVisualColumn:G.toVisualColumn}),G.reversed?B.revealTopMostCursor(j.source):B.revealBottomMostCursor(j.source))}}T.ColumnSelect=(0,w.registerEditorCommand)(new class extends R{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(H,B,j,G){if(typeof G.position>"u"||typeof G.viewPosition>"u"||typeof G.mouseColumn>"u")return null;const Y=H.model.validatePosition(G.position),ne=H.coordinatesConverter.validateViewPosition(new i.Position(G.viewPosition.lineNumber,G.viewPosition.column),Y),de=G.doColumnSelect?j.fromViewLineNumber:ne.lineNumber,he=G.doColumnSelect?j.fromViewVisualColumn:G.mouseColumn-1;return _.ColumnSelection.columnSelect(H.cursorConfig,H,de,he,ne.lineNumber,G.mouseColumn-1)}}),T.CursorColumnSelectLeft=(0,w.registerEditorCommand)(new class extends R{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(H,B,j,G){return _.ColumnSelection.columnSelectLeft(H.cursorConfig,H,j)}}),T.CursorColumnSelectRight=(0,w.registerEditorCommand)(new class extends R{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(H,B,j,G){return _.ColumnSelection.columnSelectRight(H.cursorConfig,H,j)}});class M extends R{constructor(B){super(B),this._isPaged=B.isPaged}_getColumnSelectResult(B,j,G,Y){return _.ColumnSelection.columnSelectUp(B.cursorConfig,B,G,this._isPaged)}}T.CursorColumnSelectUp=(0,w.registerEditorCommand)(new M({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),T.CursorColumnSelectPageUp=(0,w.registerEditorCommand)(new M({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class N extends R{constructor(B){super(B),this._isPaged=B.isPaged}_getColumnSelectResult(B,j,G,Y){return _.ColumnSelection.columnSelectDown(B.cursorConfig,B,G,this._isPaged)}}T.CursorColumnSelectDown=(0,w.registerEditorCommand)(new N({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),T.CursorColumnSelectPageDown=(0,w.registerEditorCommand)(new N({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class A extends l{constructor(){super({id:"cursorMove",precondition:void 0,description:n.CursorMove.description})}runCoreEditorCommand(B,j){const G=n.CursorMove.parse(j);G&&this._runCursorMove(B,j.source,G)}_runCursorMove(B,j,G){B.model.pushStackElement(),B.setCursorStates(j,3,A._move(B,B.getCursorStates(),G)),B.revealPrimaryCursor(j,!0)}static _move(B,j,G){const Y=G.select,ne=G.value;switch(G.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return n.CursorMoveCommands.simpleMove(B,j,G.direction,Y,ne,G.unit);case 11:case 13:case 12:case 14:return n.CursorMoveCommands.viewportMove(B,j,G.direction,Y,ne);default:return null}}}T.CursorMoveImpl=A,T.CursorMove=(0,w.registerEditorCommand)(new A);class P extends l{constructor(B){super(B),this._staticArgs=B.args}runCoreEditorCommand(B,j){let G=this._staticArgs;this._staticArgs.value===-1&&(G={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:j.pageSize||B.cursorConfig.pageSize}),B.model.pushStackElement(),B.setCursorStates(j.source,3,n.CursorMoveCommands.simpleMove(B,B.getCursorStates(),G.direction,G.select,G.value,G.unit)),B.revealPrimaryCursor(j.source,!0)}}T.CursorLeft=(0,w.registerEditorCommand)(new P({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),T.CursorLeftSelect=(0,w.registerEditorCommand)(new P({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1039}})),T.CursorRight=(0,w.registerEditorCommand)(new P({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),T.CursorRightSelect=(0,w.registerEditorCommand)(new P({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1041}})),T.CursorUp=(0,w.registerEditorCommand)(new P({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),T.CursorUpSelect=(0,w.registerEditorCommand)(new P({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),T.CursorPageUp=(0,w.registerEditorCommand)(new P({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:11}})),T.CursorPageUpSelect=(0,w.registerEditorCommand)(new P({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1035}})),T.CursorDown=(0,w.registerEditorCommand)(new P({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),T.CursorDownSelect=(0,w.registerEditorCommand)(new P({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),T.CursorPageDown=(0,w.registerEditorCommand)(new P({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:12}})),T.CursorPageDownSelect=(0,w.registerEditorCommand)(new P({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1036}})),T.CreateCursor=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(H,B){if(!B.position)return;let j;B.wholeLine?j=n.CursorMoveCommands.line(H,H.getPrimaryCursorState(),!1,B.position,B.viewPosition):j=n.CursorMoveCommands.moveTo(H,H.getPrimaryCursorState(),!1,B.position,B.viewPosition);const G=H.getCursorStates();if(G.length>1){const Y=j.modelState?j.modelState.position:null,ne=j.viewState?j.viewState.position:null;for(let de=0,he=G.length;de<he;de++){const oe=G[de];if(!(Y&&!oe.modelState.selection.containsPosition(Y))&&!(ne&&!oe.viewState.selection.containsPosition(ne))){G.splice(de,1),H.model.pushStackElement(),H.setCursorStates(B.source,3,G);return}}}G.push(j),H.model.pushStackElement(),H.setCursorStates(B.source,3,G)}}),T.LastCursorMoveToSelect=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(H,B){if(!B.position)return;const j=H.getLastAddedCursorIndex(),G=H.getCursorStates(),Y=G.slice(0);Y[j]=n.CursorMoveCommands.moveTo(H,G[j],!0,B.position,B.viewPosition),H.model.pushStackElement(),H.setCursorStates(B.source,3,Y)}});class x extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){B.model.pushStackElement(),B.setCursorStates(j.source,3,n.CursorMoveCommands.moveToBeginningOfLine(B,B.getCursorStates(),this._inSelectionMode)),B.revealPrimaryCursor(j.source,!0)}}T.CursorHome=(0,w.registerEditorCommand)(new x({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),T.CursorHomeSelect=(0,w.registerEditorCommand)(new x({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class W extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){B.model.pushStackElement(),B.setCursorStates(j.source,3,this._exec(B.getCursorStates())),B.revealPrimaryCursor(j.source,!0)}_exec(B){const j=[];for(let G=0,Y=B.length;G<Y;G++){const ne=B[G],de=ne.modelState.position.lineNumber;j[G]=h.CursorState.fromModelState(ne.modelState.move(this._inSelectionMode,de,1,0))}return j}}T.CursorLineStart=(0,w.registerEditorCommand)(new W({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:287}}})),T.CursorLineStartSelect=(0,w.registerEditorCommand)(new W({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1311}}}));class U extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){B.model.pushStackElement(),B.setCursorStates(j.source,3,n.CursorMoveCommands.moveToEndOfLine(B,B.getCursorStates(),this._inSelectionMode,j.sticky||!1)),B.revealPrimaryCursor(j.source,!0)}}T.CursorEnd=(0,w.registerEditorCommand)(new U({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:S.localize(0,null),type:"boolean",default:!1}}}}]}})),T.CursorEndSelect=(0,w.registerEditorCommand)(new U({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:S.localize(1,null),type:"boolean",default:!1}}}}]}}));class O extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){B.model.pushStackElement(),B.setCursorStates(j.source,3,this._exec(B,B.getCursorStates())),B.revealPrimaryCursor(j.source,!0)}_exec(B,j){const G=[];for(let Y=0,ne=j.length;Y<ne;Y++){const de=j[Y],he=de.modelState.position.lineNumber,oe=B.model.getLineMaxColumn(he);G[Y]=h.CursorState.fromModelState(de.modelState.move(this._inSelectionMode,he,oe,0))}return G}}T.CursorLineEnd=(0,w.registerEditorCommand)(new O({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:291}}})),T.CursorLineEndSelect=(0,w.registerEditorCommand)(new O({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1315}}}));class $ extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){B.model.pushStackElement(),B.setCursorStates(j.source,3,n.CursorMoveCommands.moveToBeginningOfBuffer(B,B.getCursorStates(),this._inSelectionMode)),B.revealPrimaryCursor(j.source,!0)}}T.CursorTop=(0,w.registerEditorCommand)(new $({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2062,mac:{primary:2064}}})),T.CursorTopSelect=(0,w.registerEditorCommand)(new $({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));class Q extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){B.model.pushStackElement(),B.setCursorStates(j.source,3,n.CursorMoveCommands.moveToEndOfBuffer(B,B.getCursorStates(),this._inSelectionMode)),B.revealPrimaryCursor(j.source,!0)}}T.CursorBottom=(0,w.registerEditorCommand)(new Q({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2061,mac:{primary:2066}}})),T.CursorBottomSelect=(0,w.registerEditorCommand)(new Q({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));class se extends l{constructor(){super({id:"editorScroll",precondition:void 0,description:a.description})}determineScrollMethod(B){const j=[6],G=[1,2,3,4,5,6],Y=[4,2],ne=[1,3];return j.includes(B.unit)&&Y.includes(B.direction)?this._runHorizontalEditorScroll.bind(this):G.includes(B.unit)&&ne.includes(B.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(B,j){const G=a.parse(j);if(!G)return;const Y=this.determineScrollMethod(G);Y&&Y(B,j.source,G)}_runVerticalEditorScroll(B,j,G){const Y=this._computeDesiredScrollTop(B,G);if(G.revealCursor){const ne=B.getCompletelyVisibleViewRangeAtScrollTop(Y);B.setCursorStates(j,3,[n.CursorMoveCommands.findPositionInViewportIfOutside(B,B.getPrimaryCursorState(),ne,G.select)])}B.viewLayout.setScrollPosition({scrollTop:Y},0)}_computeDesiredScrollTop(B,j){if(j.unit===1){const ne=B.viewLayout.getFutureViewport(),de=B.getCompletelyVisibleViewRangeAtScrollTop(ne.top),he=B.coordinatesConverter.convertViewRangeToModelRange(de);let oe;j.direction===1?oe=Math.max(1,he.startLineNumber-j.value):oe=Math.min(B.model.getLineCount(),he.startLineNumber+j.value);const ce=B.coordinatesConverter.convertModelPositionToViewPosition(new i.Position(oe,1));return B.viewLayout.getVerticalOffsetForLineNumber(ce.lineNumber)}if(j.unit===5){let ne=0;return j.direction===3&&(ne=B.model.getLineCount()-B.cursorConfig.pageSize),B.viewLayout.getVerticalOffsetForLineNumber(ne)}let G;j.unit===3?G=B.cursorConfig.pageSize*j.value:j.unit===4?G=Math.round(B.cursorConfig.pageSize/2)*j.value:G=j.value;const Y=(j.direction===1?-1:1)*G;return B.viewLayout.getCurrentScrollTop()+Y*B.cursorConfig.lineHeight}_runHorizontalEditorScroll(B,j,G){const Y=this._computeDesiredScrollLeft(B,G);B.viewLayout.setScrollPosition({scrollLeft:Y},0)}_computeDesiredScrollLeft(B,j){const G=(j.direction===4?-1:1)*j.value;return B.viewLayout.getCurrentScrollLeft()+G*B.cursorConfig.typicalHalfwidthCharacterWidth}}T.EditorScrollImpl=se,T.EditorScroll=(0,w.registerEditorCommand)(new se),T.ScrollLineUp=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(H,B){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Up,by:a.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:B.source})}}),T.ScrollPageUp=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(H,B){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Up,by:a.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:B.source})}}),T.ScrollEditorTop=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(H,B){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Up,by:a.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:B.source})}}),T.ScrollLineDown=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(H,B){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Down,by:a.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:B.source})}}),T.ScrollPageDown=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(H,B){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Down,by:a.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:B.source})}}),T.ScrollEditorBottom=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(H,B){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Down,by:a.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:B.source})}}),T.ScrollLeft=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(H,B){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Left,by:a.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:B.source})}}),T.ScrollRight=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(H,B){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Right,by:a.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:B.source})}});class le extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){j.position&&(B.model.pushStackElement(),B.setCursorStates(j.source,3,[n.CursorMoveCommands.word(B,B.getPrimaryCursorState(),this._inSelectionMode,j.position)]),j.revealType!==2&&B.revealPrimaryCursor(j.source,!0,!0))}}T.WordSelect=(0,w.registerEditorCommand)(new le({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),T.WordSelectDrag=(0,w.registerEditorCommand)(new le({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),T.LastCursorWordSelect=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(H,B){if(!B.position)return;const j=H.getLastAddedCursorIndex(),G=H.getCursorStates(),Y=G.slice(0),ne=G[j];Y[j]=n.CursorMoveCommands.word(H,ne,ne.modelState.hasSelection(),B.position),H.model.pushStackElement(),H.setCursorStates(B.source,3,Y)}});class te extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){j.position&&(B.model.pushStackElement(),B.setCursorStates(j.source,3,[n.CursorMoveCommands.line(B,B.getPrimaryCursorState(),this._inSelectionMode,j.position,j.viewPosition)]),j.revealType!==2&&B.revealPrimaryCursor(j.source,!1,!0))}}T.LineSelect=(0,w.registerEditorCommand)(new te({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),T.LineSelectDrag=(0,w.registerEditorCommand)(new te({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class re extends l{constructor(B){super(B),this._inSelectionMode=B.inSelectionMode}runCoreEditorCommand(B,j){if(!j.position)return;const G=B.getLastAddedCursorIndex(),Y=B.getCursorStates(),ne=Y.slice(0);ne[G]=n.CursorMoveCommands.line(B,Y[G],this._inSelectionMode,j.position,j.viewPosition),B.model.pushStackElement(),B.setCursorStates(j.source,3,ne)}}T.LastCursorLineSelect=(0,w.registerEditorCommand)(new re({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),T.LastCursorLineSelectDrag=(0,w.registerEditorCommand)(new re({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),T.CancelSelection=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"cancelSelection",precondition:r.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(H,B){H.model.pushStackElement(),H.setCursorStates(B.source,3,[n.CursorMoveCommands.cancelSelection(H,H.getPrimaryCursorState())]),H.revealPrimaryCursor(B.source,!0)}}),T.RemoveSecondaryCursors=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"removeSecondaryCursors",precondition:r.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:o+1,kbExpr:r.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(H,B){H.model.pushStackElement(),H.setCursorStates(B.source,3,[H.getPrimaryCursorState()]),H.revealPrimaryCursor(B.source,!0),(0,D.status)(S.localize(2,null))}}),T.RevealLine=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"revealLine",precondition:void 0,description:d.description})}runCoreEditorCommand(H,B){const j=B,G=j.lineNumber||0;let Y=typeof G=="number"?G+1:parseInt(G)+1;Y<1&&(Y=1);const ne=H.model.getLineCount();Y>ne&&(Y=ne);const de=new s.Range(Y,1,Y,H.model.getLineMaxColumn(Y));let he=0;if(j.at)switch(j.at){case d.RawAtArgument.Top:he=3;break;case d.RawAtArgument.Center:he=1;break;case d.RawAtArgument.Bottom:he=4;break;default:break}const oe=H.coordinatesConverter.convertModelRangeToViewRange(de);H.revealRange(B.source,!1,oe,he,0)}}),T.SelectAll=new class extends u{constructor(){super(w.SelectAllCommand)}runDOMCommand(){k.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(H,B,j){const G=B._getViewModel();G&&this.runCoreEditorCommand(G,j)}runCoreEditorCommand(H,B){H.model.pushStackElement(),H.setCursorStates("keyboard",3,[n.CursorMoveCommands.selectAll(H,H.getPrimaryCursorState())])}},T.SetSelection=(0,w.registerEditorCommand)(new class extends l{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(H,B){B.selection&&(H.model.pushStackElement(),H.setCursorStates(B.source,3,[h.CursorState.fromModelSelection(B.selection)]))}})})(C=e.CoreNavigationCommands||(e.CoreNavigationCommands={}));const f=c.ContextKeyExpr.and(r.EditorContextKeys.textInputFocus,r.EditorContextKeys.columnSelection);function v(T,F){g.KeybindingsRegistry.registerKeybindingRule({id:T,primary:F,when:f,weight:o+1})}v(C.CursorColumnSelectLeft.id,1039),v(C.CursorColumnSelectRight.id,1041),v(C.CursorColumnSelectUp.id,1040),v(C.CursorColumnSelectPageUp.id,1035),v(C.CursorColumnSelectDown.id,1042),v(C.CursorColumnSelectPageDown.id,1036);function p(T){return T.register(),T}var L;(function(T){class F extends w.EditorCommand{runEditorCommand(M,N,A){const P=N._getViewModel();P&&this.runCoreEditingCommand(N,P,A||{})}}T.CoreEditingCommand=F,T.LineBreakInsert=(0,w.registerEditorCommand)(new class extends F{constructor(){super({id:"lineBreakInsert",precondition:r.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(R,M,N){R.pushUndoStop(),R.executeCommands(this.id,t.TypeOperations.lineBreakInsert(M.cursorConfig,M.model,M.getCursorStates().map(A=>A.modelState.selection)))}}),T.Outdent=(0,w.registerEditorCommand)(new class extends F{constructor(){super({id:"outdent",precondition:r.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:c.ContextKeyExpr.and(r.EditorContextKeys.editorTextFocus,r.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(R,M,N){R.pushUndoStop(),R.executeCommands(this.id,t.TypeOperations.outdent(M.cursorConfig,M.model,M.getCursorStates().map(A=>A.modelState.selection))),R.pushUndoStop()}}),T.Tab=(0,w.registerEditorCommand)(new class extends F{constructor(){super({id:"tab",precondition:r.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:c.ContextKeyExpr.and(r.EditorContextKeys.editorTextFocus,r.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(R,M,N){R.pushUndoStop(),R.executeCommands(this.id,t.TypeOperations.tab(M.cursorConfig,M.model,M.getCursorStates().map(A=>A.modelState.selection))),R.pushUndoStop()}}),T.DeleteLeft=(0,w.registerEditorCommand)(new class extends F{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(R,M,N){const[A,P]=m.DeleteOperations.deleteLeft(M.getPrevEditOperationType(),M.cursorConfig,M.model,M.getCursorStates().map(x=>x.modelState.selection),M.getCursorAutoClosedCharacters());A&&R.pushUndoStop(),R.executeCommands(this.id,P),M.setPrevEditOperationType(2)}}),T.DeleteRight=(0,w.registerEditorCommand)(new class extends F{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(R,M,N){const[A,P]=m.DeleteOperations.deleteRight(M.getPrevEditOperationType(),M.cursorConfig,M.model,M.getCursorStates().map(x=>x.modelState.selection));A&&R.pushUndoStop(),R.executeCommands(this.id,P),M.setPrevEditOperationType(3)}}),T.Undo=new class extends u{constructor(){super(w.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(R,M,N){if(!(!M.hasModel()||M.getOption(87)===!0))return M.getModel().undo()}},T.Redo=new class extends u{constructor(){super(w.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(R,M,N){if(!(!M.hasModel()||M.getOption(87)===!0))return M.getModel().redo()}}})(L=e.CoreEditingCommands||(e.CoreEditingCommands={}));class E extends w.Command{constructor(F,R,M){super({id:F,precondition:void 0,description:M}),this._handlerId=R}runCommand(F,R){const M=F.get(b.ICodeEditorService).getFocusedCodeEditor();M&&M.trigger("keyboard",this._handlerId,R)}}function I(T,F){p(new E("default:"+T,T)),p(new E(T,T,F))}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(J[739],ee([1,0,223,15]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let y=class{constructor(w,b){}dispose(){}};y.ID="editor.contrib.markerDecorations",y=Ne([fe(1,S.IMarkerDecorationsService)],y),e.MarkerDecorationsContribution=y,(0,k.registerEditorContribution)(y.ID,y,0)}),define(J[740],ee([1,0,180,13,17]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class D{constructor(b,_,h,m){this.configuration=b,this.viewModel=_,this.userInputEvents=h,this.commandDelegate=m}paste(b,_,h,m){this.commandDelegate.paste(b,_,h,m)}type(b){this.commandDelegate.type(b)}compositionType(b,_,h,m){this.commandDelegate.compositionType(b,_,h,m)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(b){S.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:b})}_validateViewColumn(b){const _=this.viewModel.getLineMinColumn(b.lineNumber);return b.column<_?new k.Position(b.lineNumber,_):b}_hasMulticursorModifier(b){switch(this.configuration.options.get(75)){case"altKey":return b.altKey;case"ctrlKey":return b.ctrlKey;case"metaKey":return b.metaKey;default:return!1}}_hasNonMulticursorModifier(b){switch(this.configuration.options.get(75)){case"altKey":return b.ctrlKey||b.metaKey;case"ctrlKey":return b.altKey||b.metaKey;case"metaKey":return b.ctrlKey||b.altKey;default:return!1}}dispatchMouse(b){const _=this.configuration.options,h=y.isLinux&&_.get(102),m=_.get(20);b.middleButton&&!h?this._columnSelect(b.position,b.mouseColumn,b.inSelectionMode):b.startedOnLineNumbers?this._hasMulticursorModifier(b)?b.inSelectionMode?this._lastCursorLineSelect(b.position,b.revealType):this._createCursor(b.position,!0):b.inSelectionMode?this._lineSelectDrag(b.position,b.revealType):this._lineSelect(b.position,b.revealType):b.mouseDownCount>=4?this._selectAll():b.mouseDownCount===3?this._hasMulticursorModifier(b)?b.inSelectionMode?this._lastCursorLineSelectDrag(b.position,b.revealType):this._lastCursorLineSelect(b.position,b.revealType):b.inSelectionMode?this._lineSelectDrag(b.position,b.revealType):this._lineSelect(b.position,b.revealType):b.mouseDownCount===2?b.onInjectedText||(this._hasMulticursorModifier(b)?this._lastCursorWordSelect(b.position,b.revealType):b.inSelectionMode?this._wordSelectDrag(b.position,b.revealType):this._wordSelect(b.position,b.revealType)):this._hasMulticursorModifier(b)?this._hasNonMulticursorModifier(b)||(b.shiftKey?this._columnSelect(b.position,b.mouseColumn,!0):b.inSelectionMode?this._lastCursorMoveToSelect(b.position,b.revealType):this._createCursor(b.position,!1)):b.inSelectionMode?b.altKey?this._columnSelect(b.position,b.mouseColumn,!0):m?this._columnSelect(b.position,b.mouseColumn,!0):this._moveToSelect(b.position,b.revealType):this.moveTo(b.position,b.revealType)}_usualArgs(b,_){return b=this._validateViewColumn(b),{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b,revealType:_}}moveTo(b,_){S.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_moveToSelect(b,_){S.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_columnSelect(b,_,h){b=this._validateViewColumn(b),S.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b,mouseColumn:_,doColumnSelect:h})}_createCursor(b,_){b=this._validateViewColumn(b),S.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b,wholeLine:_})}_lastCursorMoveToSelect(b,_){S.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_wordSelect(b,_){S.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_wordSelectDrag(b,_){S.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_lastCursorWordSelect(b,_){S.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_lineSelect(b,_){S.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_lineSelectDrag(b,_){S.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_lastCursorLineSelect(b,_){S.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_lastCursorLineSelectDrag(b,_){S.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b,_))}_selectAll(){S.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(b){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(b)}emitKeyDown(b){this.userInputEvents.emitKeyDown(b)}emitKeyUp(b){this.userInputEvents.emitKeyUp(b)}emitContextMenu(b){this.userInputEvents.emitContextMenu(b)}emitMouseMove(b){this.userInputEvents.emitMouseMove(b)}emitMouseLeave(b){this.userInputEvents.emitMouseLeave(b)}emitMouseUp(b){this.userInputEvents.emitMouseUp(b)}emitMouseDown(b){this.userInputEvents.emitMouseDown(b)}emitMouseDrag(b){this.userInputEvents.emitMouseDrag(b)}emitMouseDrop(b){this.userInputEvents.emitMouseDrop(b)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(b){this.userInputEvents.emitMouseWheel(b)}}e.ViewController=D}),define(J[741],ee([1,0,50,68,58,15,23,22,586,14,403]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new h.RawContextKey("selectionAnchorSet",!1);let m=class Ri{static get(c){return c.getContribution(Ri.ID)}constructor(c,g){this.editor=c,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(g),this.modelChangeListener=c.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const c=this.editor.getPosition();this.editor.changeDecorations(g=>{this.decorationId&&g.removeDecoration(this.decorationId),this.decorationId=g.addDecoration(w.Selection.fromPositions(c,c),{description:"selection-anchor",stickiness:1,hoverMessage:new k.MarkdownString().appendText((0,_.localize)(0,null)),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,S.alert)((0,_.localize)(1,null,c.lineNumber,c.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const c=this.editor.getModel().getDecorationRange(this.decorationId);c&&this.editor.setPosition(c.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const c=this.editor.getModel().getDecorationRange(this.decorationId);if(c){const g=this.editor.getPosition();this.editor.setSelection(w.Selection.fromPositions(c.getStartPosition(),g)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const c=this.decorationId;this.editor.changeDecorations(g=>{g.removeDecoration(c),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};m.ID="editor.contrib.selectionAnchorController",m=Ne([fe(1,h.IContextKeyService)],m);class n extends D.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,_.localize)(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2089,2080),weight:100}})}run(c,g){var o;return Ee(this,void 0,void 0,function*(){(o=m.get(g))===null||o===void 0||o.setSelectionAnchor()})}}class t extends D.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,_.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}run(c,g){var o;return Ee(this,void 0,void 0,function*(){(o=m.get(g))===null||o===void 0||o.goToSelectionAnchor()})}}class i extends D.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,_.localize)(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2089,2089),weight:100}})}run(c,g){var o;return Ee(this,void 0,void 0,function*(){(o=m.get(g))===null||o===void 0||o.selectFromAnchorToCursor()})}}class s extends D.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,_.localize)(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}run(c,g){var o;return Ee(this,void 0,void 0,function*(){(o=m.get(g))===null||o===void 0||o.cancelSelectionAnchor()})}}(0,D.registerEditorContribution)(m.ID,m,4),(0,D.registerEditorAction)(n),(0,D.registerEditorAction)(t),(0,D.registerEditorAction)(i),(0,D.registerEditorAction)(s)}),define(J[742],ee([1,0,15,22,500,588]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class w extends S.EditorAction{constructor(m,n){super(n),this.left=m}run(m,n){if(!n.hasModel())return;const t=[],i=n.getSelections();for(const s of i)t.push(new y.MoveCaretCommand(s,this.left));n.pushUndoStop(),n.executeCommands(this.id,t),n.pushUndoStop()}}class b extends w{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:D.localize(0,null),alias:"Move Selected Text Left",precondition:k.EditorContextKeys.writable})}}class _ extends w{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:D.localize(1,null),alias:"Move Selected Text Right",precondition:k.EditorContextKeys.writable})}}(0,S.registerEditorAction)(b),(0,S.registerEditorAction)(_)}),define(J[743],ee([1,0,15,118,188,5,22,589]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class _ extends S.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:b.localize(0,null),alias:"Transpose Letters",precondition:w.EditorContextKeys.writable,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(m,n){if(!n.hasModel())return;const t=n.getModel(),i=[],s=n.getSelections();for(const r of s){if(!r.isEmpty())continue;const c=r.startLineNumber,g=r.startColumn,o=t.getLineMaxColumn(c);if(c===1&&(g===1||g===2&&o===2))continue;const l=g===o?r.getPosition():y.MoveOperations.rightPosition(t,r.getPosition().lineNumber,r.getPosition().column),a=y.MoveOperations.leftPosition(t,l),d=y.MoveOperations.leftPosition(t,a),u=t.getValueInRange(D.Range.fromPositions(d,a)),C=t.getValueInRange(D.Range.fromPositions(a,l)),f=D.Range.fromPositions(d,l);i.push(new k.ReplaceCommand(f,C+u))}i.length>0&&(n.pushUndoStop(),n.executeCommands(this.id,i),n.pushUndoStop())}}(0,S.registerEditorAction)(_)}),define(J[744],ee([1,0,46,17,216,15,30,22,590,28,96,14]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const t="9_cutcopypaste",i=k.isNative||document.queryCommandSupported("cut"),s=k.isNative||document.queryCommandSupported("copy"),r=typeof navigator.clipboard>"u"||S.isFirefox?document.queryCommandSupported("paste"):!0;function c(l){return l.register(),l}e.CutAction=i?c(new D.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:k.isNative?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:h.MenuId.MenubarEditMenu,group:"2_ccp",title:_.localize(0,null),order:1},{menuId:h.MenuId.EditorContext,group:t,title:_.localize(1,null),when:b.EditorContextKeys.writable,order:1},{menuId:h.MenuId.CommandPalette,group:"",title:_.localize(2,null),order:1},{menuId:h.MenuId.SimpleEditorContext,group:t,title:_.localize(3,null),when:b.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=s?c(new D.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:k.isNative?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:h.MenuId.MenubarEditMenu,group:"2_ccp",title:_.localize(4,null),order:2},{menuId:h.MenuId.EditorContext,group:t,title:_.localize(5,null),order:2},{menuId:h.MenuId.CommandPalette,group:"",title:_.localize(6,null),order:1},{menuId:h.MenuId.SimpleEditorContext,group:t,title:_.localize(7,null),order:2}]})):void 0,h.MenuRegistry.appendMenuItem(h.MenuId.MenubarEditMenu,{submenu:h.MenuId.MenubarCopy,title:{value:_.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),h.MenuRegistry.appendMenuItem(h.MenuId.EditorContext,{submenu:h.MenuId.EditorContextCopy,title:{value:_.localize(9,null),original:"Copy As"},group:t,order:3}),h.MenuRegistry.appendMenuItem(h.MenuId.EditorContext,{submenu:h.MenuId.EditorContextShare,title:{value:_.localize(10,null),original:"Share"},group:"11_share",order:-1,when:n.ContextKeyExpr.and(n.ContextKeyExpr.notEquals("resourceScheme","output"),b.EditorContextKeys.editorTextFocus)}),h.MenuRegistry.appendMenuItem(h.MenuId.EditorTitleContext,{submenu:h.MenuId.EditorTitleContextShare,title:{value:_.localize(11,null),original:"Share"},group:"11_share",order:-1}),h.MenuRegistry.appendMenuItem(h.MenuId.ExplorerContext,{submenu:h.MenuId.ExplorerContextShare,title:{value:_.localize(12,null),original:"Share"},group:"11_share",order:-1}),e.PasteAction=r?c(new D.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:k.isNative?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:h.MenuId.MenubarEditMenu,group:"2_ccp",title:_.localize(13,null),order:4},{menuId:h.MenuId.EditorContext,group:t,title:_.localize(14,null),when:b.EditorContextKeys.writable,order:4},{menuId:h.MenuId.CommandPalette,group:"",title:_.localize(15,null),order:1},{menuId:h.MenuId.SimpleEditorContext,group:t,title:_.localize(16,null),when:b.EditorContextKeys.writable,order:4}]})):void 0;class g extends D.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:_.localize(17,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(a,d){!d.hasModel()||!d.getOption(35)&&d.getSelection().isEmpty()||(y.CopyOptions.forceCopyWithSyntaxHighlighting=!0,d.focus(),document.execCommand("copy"),y.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function o(l,a){l&&(l.addImplementation(1e4,"code-editor",(d,u)=>{const C=d.get(w.ICodeEditorService).getFocusedCodeEditor();if(C&&C.hasTextFocus()){const f=C.getOption(35),v=C.getSelection();return v&&v.isEmpty()&&!f||document.execCommand(a),!0}return!1}),l.addImplementation(0,"generic-dom",(d,u)=>(document.execCommand(a),!0)))}o(e.CutAction,"cut"),o(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(l,a)=>{const d=l.get(w.ICodeEditorService),u=l.get(m.IClipboardService),C=d.getFocusedCodeEditor();return C&&C.hasTextFocus()?!document.execCommand("paste")&&k.isWeb?(()=>Ee(void 0,void 0,void 0,function*(){const v=yield u.readText();if(v!==""){const p=y.InMemoryClipboardMetadataManager.INSTANCE.get(v);let L=!1,E=null,I=null;p&&(L=C.getOption(35)&&!!p.isFromEmptySelection,E=typeof p.multicursorText<"u"?p.multicursorText:null,I=p.mode),C.trigger("keyboard","paste",{text:v,pasteOnNewLine:L,multicursorText:E,mode:I})}}))():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(l,a)=>(document.execCommand("paste"),!0))),s&&(0,D.registerEditorAction)(g)}),define(J[745],ee([1,0,58,15,5,22,33,268,501,599,28]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends k.EditorAction{constructor(g,o){super(o),this._type=g}run(g,o){const l=g.get(w.ILanguageConfigurationService);if(!o.hasModel())return;const a=o.getModel(),d=[],u=a.getOptions(),C=o.getOption(21),f=o.getSelections().map((p,L)=>({selection:p,index:L,ignoreFirstLine:!1}));f.sort((p,L)=>y.Range.compareRangesUsingStarts(p.selection,L.selection));let v=f[0];for(let p=1;p<f.length;p++){const L=f[p];v.selection.endLineNumber===L.selection.startLineNumber&&(v.index<L.index?L.ignoreFirstLine=!0:(v.ignoreFirstLine=!0,v=L))}for(const p of f)d.push(new _.LineCommentCommand(l,p.selection,u.tabSize,this._type,C.insertSpace,C.ignoreEmptyLines,p.ignoreFirstLine));o.pushUndoStop(),o.executeCommands(this.id,d),o.pushUndoStop()}}class t extends n{constructor(){super(0,{id:"editor.action.commentLine",label:h.localize(0,null),alias:"Toggle Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:m.MenuId.MenubarEditMenu,group:"5_insert",title:h.localize(1,null),order:1}})}}class i extends n{constructor(){super(1,{id:"editor.action.addCommentLine",label:h.localize(2,null),alias:"Add Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,S.KeyChord)(2089,2081),weight:100}})}}class s extends n{constructor(){super(2,{id:"editor.action.removeCommentLine",label:h.localize(3,null),alias:"Remove Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,S.KeyChord)(2089,2099),weight:100}})}}class r extends k.EditorAction{constructor(){super({id:"editor.action.blockComment",label:h.localize(4,null),alias:"Toggle Block Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:m.MenuId.MenubarEditMenu,group:"5_insert",title:h.localize(5,null),order:2}})}run(g,o){const l=g.get(w.ILanguageConfigurationService);if(!o.hasModel())return;const a=o.getOption(21),d=[],u=o.getSelections();for(const C of u)d.push(new b.BlockCommentCommand(C,a.insertSpace,l));o.pushUndoStop(),o.executeCommands(this.id,d),o.pushUndoStop()}}(0,k.registerEditorAction)(t),(0,k.registerEditorAction)(i),(0,k.registerEditorAction)(s),(0,k.registerEditorAction)(r)}),define(J[746],ee([1,0,2,15,22,603]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class w{constructor(t){this.selections=t}equals(t){const i=this.selections.length,s=t.selections.length;if(i!==s)return!1;for(let r=0;r<i;r++)if(!this.selections[r].equalsSelection(t.selections[r]))return!1;return!0}}class b{constructor(t,i,s){this.cursorState=t,this.scrollTop=i,this.scrollLeft=s}}class _ extends S.Disposable{static get(t){return t.getContribution(_.ID)}constructor(t){super(),this._editor=t,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(t.onDidChangeModel(i=>{this._undoStack=[],this._redoStack=[]})),this._register(t.onDidChangeModelContent(i=>{this._undoStack=[],this._redoStack=[]})),this._register(t.onDidChangeCursorSelection(i=>{if(this._isCursorUndoRedo||!i.oldSelections||i.oldModelVersionId!==i.modelVersionId)return;const s=new w(i.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(s)||(this._undoStack.push(new b(s,t.getScrollTop(),t.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new b(new w(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 b(new w(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(t){this._isCursorUndoRedo=!0,this._editor.setSelections(t.cursorState.selections),this._editor.setScrollPosition({scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),this._isCursorUndoRedo=!1}}_.ID="editor.contrib.cursorUndoRedoController",e.CursorUndoRedoController=_;class h extends k.EditorAction{constructor(){super({id:"cursorUndo",label:D.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(t,i,s){var r;(r=_.get(i))===null||r===void 0||r.cursorUndo()}}e.CursorUndo=h;class m extends k.EditorAction{constructor(){super({id:"cursorRedo",label:D.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(t,i,s){var r;(r=_.get(i))===null||r===void 0||r.cursorRedo()}}e.CursorRedo=m,(0,k.registerEditorContribution)(_.ID,_,0),(0,k.registerEditorAction)(h),(0,k.registerEditorAction)(m)}),define(J[747],ee([1,0,15,14,21,59,8,51,605]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const h=(0,w.createDecorator)("IEditorCancelService"),m=new k.RawContextKey("cancellableOperation",!1,(0,_.localize)(0,null));(0,b.registerSingleton)(h,class{constructor(){this._tokens=new WeakMap}add(t,i){let s=this._tokens.get(t);s||(s=t.invokeWithinContext(c=>{const g=m.bindTo(c.get(k.IContextKeyService)),o=new D.LinkedList;return{key:g,tokens:o}}),this._tokens.set(t,s));let r;return s.key.set(!0),r=s.tokens.push(i),()=>{r&&(r(),s.key.set(!s.tokens.isEmpty()),r=void 0)}}cancel(t){const i=this._tokens.get(t);if(!i)return;const s=i.tokens.pop();s&&(s.cancel(),i.key.set(!i.tokens.isEmpty()))}},1);class n extends y.CancellationTokenSource{constructor(i,s){super(s),this.editor=i,this._unregister=i.invokeWithinContext(r=>r.get(h).add(i,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=n,(0,S.registerEditorCommand)(new class extends S.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:m})}runEditorCommand(t,i){t.get(h).cancel(i)}})}),define(J[97],ee([1,0,9,5,21,2,747]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class b{constructor(n,t){if(this.flags=t,this.flags&1){const i=n.getModel();this.modelVersionId=i?S.format("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=n.getPosition():this.position=null,this.flags&2?this.selection=n.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=n.getScrollLeft(),this.scrollTop=n.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(n){if(!(n instanceof b))return!1;const t=n;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(n){return this._equals(new b(n,this.flags))}}e.EditorState=b;class _ extends w.EditorKeybindingCancellationTokenSource{constructor(n,t,i,s){super(n,s),this._listener=new D.DisposableStore,t&4&&this._listener.add(n.onDidChangeCursorPosition(r=>{(!i||!k.Range.containsPosition(i,r.position))&&this.cancel()})),t&2&&this._listener.add(n.onDidChangeCursorSelection(r=>{(!i||!k.Range.containsRange(i,r.selection))&&this.cancel()})),t&8&&this._listener.add(n.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(n.onDidChangeModel(r=>this.cancel())),this._listener.add(n.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=_;class h extends y.CancellationTokenSource{constructor(n,t){super(t),this._listener=n.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=h}),define(J[127],ee([1,0,16,21,11,2,20,147,5,23,19,53,97,591,25,43,71,79,107]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyCodeAction=e.ApplyCodeActionReason=e.getCodeActions=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.autoFixCommandId=e.quickFixCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.quickFixCommandId="editor.action.quickFix",e.autoFixCommandId="editor.action.autoFix",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class l extends D.Disposable{static codeActionsPreferredComparator(I,T){return I.isPreferred&&!T.isPreferred?-1:!I.isPreferred&&T.isPreferred?1:0}static codeActionsComparator({action:I},{action:T}){return(0,S.isNonEmptyArray)(I.diagnostics)?(0,S.isNonEmptyArray)(T.diagnostics)?l.codeActionsPreferredComparator(I,T):-1:(0,S.isNonEmptyArray)(T.diagnostics)?1:l.codeActionsPreferredComparator(I,T)}constructor(I,T,F){super(),this.documentation=T,this._register(F),this.allActions=[...I].sort(l.codeActionsComparator),this.validActions=this.allActions.filter(({action:R})=>!R.disabled)}get hasAutoFix(){return this.validActions.some(({action:I})=>!!I.kind&&o.CodeActionKind.QuickFix.contains(new o.CodeActionKind(I.kind))&&!!I.isPreferred)}}const a={actions:[],documentation:void 0};function d(E,I,T,F,R,M){var N;return Ee(this,void 0,void 0,function*(){const A=F.filter||{},P={only:(N=A.include)===null||N===void 0?void 0:N.value,trigger:F.type},x=new t.TextModelCancellationTokenSource(I,M),W=u(E,I,A),U=new D.DisposableStore,O=W.map(Q=>Ee(this,void 0,void 0,function*(){try{R.report(Q);const se=yield Q.provideCodeActions(I,T,P,x.token);if(se&&U.add(se),x.token.isCancellationRequested)return a;const le=(se?.actions||[]).filter(re=>re&&(0,o.filtersAction)(A,re)),te=f(Q,le,A.include);return{actions:le.map(re=>new o.CodeActionItem(re,Q)),documentation:te}}catch(se){if((0,y.isCancellationError)(se))throw se;return(0,y.onUnexpectedExternalError)(se),a}})),$=E.onDidChange(()=>{const Q=E.all(I);(0,S.equals)(Q,W)||x.cancel()});try{const Q=yield Promise.all(O),se=Q.map(te=>te.actions).flat(),le=[...(0,S.coalesce)(Q.map(te=>te.documentation)),...C(E,I,F,se)];return new l(se,le,U)}finally{$.dispose(),x.dispose()}})}e.getCodeActions=d;function u(E,I,T){return E.all(I).filter(F=>F.providedCodeActionKinds?F.providedCodeActionKinds.some(R=>(0,o.mayIncludeActionsOfKind)(T,new o.CodeActionKind(R))):!0)}function*C(E,I,T,F){var R,M,N;if(I&&F.length)for(const A of E.all(I))A._getAdditionalMenuItems&&(yield*(R=A._getAdditionalMenuItems)===null||R===void 0?void 0:R.call(A,{trigger:T.type,only:(N=(M=T.filter)===null||M===void 0?void 0:M.include)===null||N===void 0?void 0:N.value},F.map(P=>P.action)))}function f(E,I,T){if(!E.documentation)return;const F=E.documentation.map(R=>({kind:new o.CodeActionKind(R.kind),command:R.command}));if(T){let R;for(const M of F)M.kind.contains(T)&&(R?R.kind.contains(M.kind)&&(R=M):R=M);if(R)return R?.command}for(const R of I)if(R.kind){for(const M of F)if(M.kind.contains(new o.CodeActionKind(R.kind)))return M.command}}var v;(function(E){E.OnSave="onSave",E.FromProblemsView="fromProblemsView",E.FromCodeActions="fromCodeActions"})(v=e.ApplyCodeActionReason||(e.ApplyCodeActionReason={}));function p(E,I,T,F,R=k.CancellationToken.None){var M;return Ee(this,void 0,void 0,function*(){const N=E.get(b.IBulkEditService),A=E.get(s.ICommandService),P=E.get(g.ITelemetryService),x=E.get(r.INotificationService);if(P.publicLog2("codeAction.applyCodeAction",{codeActionTitle:I.action.title,codeActionKind:I.action.kind,codeActionIsPreferred:!!I.action.isPreferred,reason:T}),yield I.resolve(R),!R.isCancellationRequested&&!(!((M=I.action.edit)===null||M===void 0)&&M.edits.length&&!(yield N.apply(I.action.edit,{editor:F?.editor,label:I.action.title,quotableLabel:I.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:T!==v.OnSave,showPreview:F?.preview})).isApplied)&&I.action.command)try{yield A.executeCommand(I.action.command.id,...I.action.command.arguments||[])}catch(W){const U=L(W);x.error(typeof U=="string"?U:i.localize(0,null))}})}e.applyCodeAction=p;function L(E){return typeof E=="string"?E:E instanceof Error&&typeof E.message=="string"?E.message:void 0}s.CommandsRegistry.registerCommand("_executeCodeActionProvider",function(E,I,T,F,R){return Ee(this,void 0,void 0,function*(){if(!(I instanceof w.URI))throw(0,y.illegalArgument)();const{codeActionProvider:M}=E.get(m.ILanguageFeaturesService),N=E.get(n.IModelService).getModel(I);if(!N)throw(0,y.illegalArgument)();const A=h.Selection.isISelection(T)?h.Selection.liftSelection(T):_.Range.isIRange(T)?N.validateRange(T):void 0;if(!A)throw(0,y.illegalArgument)();const P=typeof F=="string"?new o.CodeActionKind(F):void 0,x=yield d(M,N,A,{type:1,triggerAction:o.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:P}},c.Progress.None,k.CancellationToken.None),W=[],U=Math.min(x.validActions.length,typeof R=="number"?R:0);for(let O=0;O<U;O++)W.push(x.validActions[O].resolve(k.CancellationToken.None));try{return yield Promise.all(W),x.validActions.map(O=>O.action)}finally{setTimeout(()=>x.dispose(),100)}})})}),define(J[748],ee([1,0,100,127,107,36]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;let w=class Oi{constructor(_){this.keybindingService=_}getResolver(){const _=new S.Lazy(()=>this.keybindingService.getKeybindings().filter(h=>Oi.codeActionCommands.indexOf(h.command)>=0).filter(h=>h.resolvedKeybinding).map(h=>{let m=h.commandArgs;return h.command===k.organizeImportsCommandId?m={kind:y.CodeActionKind.SourceOrganizeImports.value}:h.command===k.fixAllCommandId&&(m={kind:y.CodeActionKind.SourceFixAll.value}),Object.assign({resolvedKeybinding:h.resolvedKeybinding},y.CodeActionCommandArgs.fromUser(m,{kind:y.CodeActionKind.None,apply:"never"}))}));return h=>{if(h.kind){const m=this.bestKeybindingForCodeAction(h,_.value);return m?.resolvedKeybinding}}}bestKeybindingForCodeAction(_,h){if(!_.kind)return;const m=new y.CodeActionKind(_.kind);return h.filter(n=>n.kind.contains(m)).filter(n=>n.preferred?_.isPreferred:!0).reduceRight((n,t)=>n?n.kind.contains(t.kind)?t:n:t,void 0)}};w.codeActionCommands=[k.refactorCommandId,k.codeActionCommandId,k.sourceActionCommandId,k.organizeImportsCommandId,k.fixAllCommandId],w=Ne([fe(0,D.IKeybindingService)],w),e.CodeActionKeybindingResolver=w});var Ft=this&&this.__classPrivateFieldGet||function(q,e,S,k){if(S==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?q!==e||!k:!e.has(q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return S==="m"?k:S==="a"?k.call(q):k?k.value:e.get(q)},oi=this&&this.__classPrivateFieldSet||function(q,e,S,k,y){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!y)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?q!==e||!y:!e.has(q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?y.call(q,S):y?y.value=S:e.set(q,S),S};define(J[321],ee([1,0,12,11,6,2,42,14,71,107,127]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new b.RawContextKey("supportedCodeAction","");class t extends D.Disposable{constructor(g,o,l,a=250){super(),this._editor=g,this._markerService=o,this._signalChange=l,this._delay=a,this._autoTriggerTimer=this._register(new S.TimeoutTimer),this._register(this._markerService.onMarkerChanged(d=>this._onMarkerChanges(d))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(g){const o=this._getRangeOfSelectionUnlessWhitespaceEnclosed(g);this._signalChange(o?{trigger:g,selection:o}:void 0)}_onMarkerChanges(g){const o=this._editor.getModel();o&&g.some(l=>(0,w.isEqual)(l,o.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:h.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(g){if(!this._editor.hasModel())return;const o=this._editor.getModel(),l=this._editor.getSelection();if(l.isEmpty()&&g.type===2){const{lineNumber:a,column:d}=l.getPosition(),u=o.getLineContent(a);if(u.length===0)return;if(d===1){if(/\\s/.test(u[0]))return}else if(d===o.getLineMaxColumn(a)){if(/\\s/.test(u[u.length-1]))return}else if(/\\s/.test(u[d-2])&&/\\s/.test(u[d-1]))return}return l}}var i;(function(c){c.Empty={type:0};class g{constructor(l,a,d){this.trigger=l,this.position=a,this._cancellablePromise=d,this.type=1,this.actions=d.catch(u=>{if((0,k.isCancellationError)(u))return s;throw u})}cancel(){this._cancellablePromise.cancel()}}c.Triggered=g})(i=e.CodeActionsState||(e.CodeActionsState={}));const s=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class r extends D.Disposable{constructor(g,o,l,a,d){super(),this._editor=g,this._registry=o,this._markerService=l,this._progressService=d,this._codeActionOracle=this._register(new D.MutableDisposable),this._state=i.Empty,this._onDidChangeState=this._register(new y.Emitter),this.onDidChangeState=this._onDidChangeState.event,n.set(this,!1),this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(a),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){Ft(this,n,"f")||(oi(this,n,!0,"f"),super.dispose(),this.setState(i.Empty,!0))}_update(){if(Ft(this,n,"f"))return;this._codeActionOracle.value=void 0,this.setState(i.Empty);const g=this._editor.getModel();if(g&&this._registry.has(g)&&!this._editor.getOption(87)){const o=this._registry.all(g).flatMap(l=>{var a;return(a=l.providedCodeActionKinds)!==null&&a!==void 0?a:[]});this._supportedCodeActions.set(o.join(" ")),this._codeActionOracle.value=new t(this._editor,this._markerService,l=>{var a;if(!l){this.setState(i.Empty);return}const d=(0,S.createCancelablePromise)(u=>(0,m.getCodeActions)(this._registry,g,l.selection,l.trigger,_.Progress.None,u));l.trigger.type===1&&((a=this._progressService)===null||a===void 0||a.showWhile(d,250)),this.setState(new i.Triggered(l.trigger,l.selection.getStartPosition(),d))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:h.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(g){var o;(o=this._codeActionOracle.value)===null||o===void 0||o.trigger(g)}setState(g,o){g!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=g,!o&&!Ft(this,n,"f")&&this._onDidChangeState.fire(g))}}e.CodeActionModel=r,n=new WeakMap}),define(J[322],ee([1,0,7,56,29,6,2,32,18,193,127,596,36,405]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var i;(function(r){r.Hidden={type:0};class c{constructor(o,l,a,d){this.actions=o,this.trigger=l,this.editorPosition=a,this.widgetPosition=d,this.type=1}}r.Showing=c})(i||(i={}));let s=class Fi extends w.Disposable{constructor(c,g){super(),this._editor=c,this._onClick=this._register(new D.Emitter),this.onClick=this._onClick.event,this._state=i.Hidden,this._domNode=S.$("div.lightBulbWidget"),this._register(k.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(o=>{const l=this._editor.getModel();(this.state.type!==1||!l||this.state.editorPosition.lineNumber>=l.getLineCount())&&this.hide()})),this._register(S.addStandardDisposableGenericMouseDownListener(this._domNode,o=>{if(this.state.type!==1)return;this._editor.focus(),o.preventDefault();const{top:l,height:a}=S.getDomNodePagePosition(this._domNode),d=this._editor.getOption(64);let u=Math.floor(d/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(u+=d),this._onClick.fire({x:o.posx,y:l+a+u,actions:this.state.actions,trigger:this.state.trigger})})),this._register(S.addDisposableListener(this._domNode,"mouseenter",o=>{(o.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(D.Event.runAndSubscribe(g.onDidUpdateKeybindings,()=>{var o,l;this._preferredKbLabel=(0,_.withNullAsUndefined)((o=g.lookupKeybinding(m.autoFixCommandId))===null||o===void 0?void 0:o.getLabel()),this._quickFixKbLabel=(0,_.withNullAsUndefined)((l=g.lookupKeybinding(m.quickFixCommandId))===null||l===void 0?void 0:l.getLabel()),this._updateLightBulbTitleAndIcon()}))}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(c,g,o){if(c.validActions.length<=0)return this.hide();const l=this._editor.getOptions();if(!l.get(62).enabled)return this.hide();const a=this._editor.getModel();if(!a)return this.hide();const{lineNumber:d,column:u}=a.validatePosition(o),C=a.getOptions().tabSize,f=l.get(48),v=a.getLineContent(d),p=(0,h.computeIndentLevel)(v,C),L=f.spaceWidth*p>22,E=T=>T>2&&this._editor.getTopForLineNumber(T)===this._editor.getTopForLineNumber(T-1);let I=d;if(!L){if(d>1&&!E(d-1))I-=1;else if(!E(d+1))I+=1;else if(u*f.spaceWidth<22)return this.hide()}this.state=new i.Showing(c,g,o,{position:{lineNumber:I,column:1},preference:Fi._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==i.Hidden&&(this.state=i.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(c){this._state=c,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...b.ThemeIcon.asClassNameArray(y.Codicon.lightBulb)),this._domNode.classList.add(...b.ThemeIcon.asClassNameArray(y.Codicon.lightbulbAutofix)),this._preferredKbLabel)){this.title=n.localize(0,null,this._preferredKbLabel);return}this._domNode.classList.remove(...b.ThemeIcon.asClassNameArray(y.Codicon.lightbulbAutofix)),this._domNode.classList.add(...b.ThemeIcon.asClassNameArray(y.Codicon.lightBulb)),this._quickFixKbLabel?this.title=n.localize(1,null,this._quickFixKbLabel):this.title=n.localize(2,null)}set title(c){this._domNode.title=c}};s.ID="editor.contrib.lightbulbWidget",s._posPref=[0],s=Ne([fe(1,t.IKeybindingService)],s),e.LightBulbWidget=s}),define(J[749],ee([1,0,131,7,12,186,2,101,49,159,314,147,5,23,19,97,94,602,96,27,71]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyPasteController=void 0;const d="application/vnd.code.copyMetadata";let u=class extends w.Disposable{constructor(v,p,L,E,I,T){super(),this._bulkEditService=p,this._clipboardService=L,this._configurationService=E,this._languageFeaturesService=I,this._progressService=T,this._editor=v;const F=v.getContainerDomNode();this._register((0,k.addDisposableListener)(F,"copy",R=>this.handleCopy(R))),this._register((0,k.addDisposableListener)(F,"cut",R=>this.handleCopy(R))),this._register((0,k.addDisposableListener)(F,"paste",R=>this.handlePaste(R),!0))}arePasteActionsEnabled(v){return this._configurationService.getValue("editor.experimental.pasteActions.enabled",{resource:v.uri})?!0:v.uri.scheme===_.Schemas.vscodeNotebookCell}handleCopy(v){var p;if(!v.clipboardData||!this._editor.hasTextFocus())return;const L=this._editor.getModel(),E=this._editor.getSelections();if(!L||!E?.length||!this.arePasteActionsEnabled(L))return;const I=[...E],T=E[0],F=T.isEmpty();if(F){if(!this._editor.getOption(35))return;I[0]=new t.Range(T.startLineNumber,0,T.startLineNumber,L.getLineLength(T.startLineNumber))}const R=this._languageFeaturesService.documentPasteEditProvider.ordered(L).filter(P=>!!P.prepareDocumentPaste);if(!R.length){this.setCopyMetadata(v.clipboardData,{wasFromEmptySelection:F});return}const M=(0,m.toVSDataTransfer)(v.clipboardData),N=(0,h.generateUuid)();this.setCopyMetadata(v.clipboardData,{id:N,wasFromEmptySelection:F});const A=(0,y.createCancelablePromise)(P=>Ee(this,void 0,void 0,function*(){const x=yield Promise.all(R.map(W=>W.prepareDocumentPaste(L,I,M,P)));for(const W of x)W?.forEach((U,O)=>{M.replace(O,U)});return M}));(p=this._currentClipboardItem)===null||p===void 0||p.dataTransferPromise.cancel(),this._currentClipboardItem={handle:N,dataTransferPromise:A}}setCopyMetadata(v,p){v.setData(d,JSON.stringify(p))}handlePaste(v){var p,L,E,I;return Ee(this,void 0,void 0,function*(){if(!v.clipboardData||!this._editor.hasTextFocus())return;const T=this._editor.getSelections();if(!T?.length||!this._editor.hasModel())return;const F=this._editor.getModel();if(!this.arePasteActionsEnabled(F))return;let R;const M=(p=v.clipboardData)===null||p===void 0?void 0:p.getData(d);M&&typeof M=="string"&&(R=JSON.parse(M));const N=this._languageFeaturesService.documentPasteEditProvider.ordered(F);if(!N.length)return;v.preventDefault(),v.stopImmediatePropagation();const A=new r.EditorStateCancellationTokenSource(this._editor,3);try{const P=(0,m.toVSDataTransfer)(v.clipboardData);if(R?.id&&((L=this._currentClipboardItem)===null||L===void 0?void 0:L.handle)===R.id){const W=yield this._currentClipboardItem.dataTransferPromise;if(A.token.isCancellationRequested)return;W.forEach((U,O)=>{P.replace(O,U)})}if(!P.has(b.Mimes.uriList)){const W=yield this._clipboardService.readResources();if(A.token.isCancellationRequested)return;W.length&&P.append(b.Mimes.uriList,(0,D.createStringDataTransferItem)(D.UriList.create(W)))}P.delete(d);const x=yield this._progressService.withProgress({location:15,delay:750,title:(0,g.localize)(0,null),cancellable:!0},()=>this.getProviderPasteEdit(N,P,F,T,A.token),()=>A.cancel());if(A.token.isCancellationRequested)return;if(x){const W=typeof x.insertText=="string"?c.SnippetParser.escape(x.insertText):x.insertText.snippet,U={edits:[new n.ResourceTextEdit(F.uri,{range:i.Selection.liftSelection(this._editor.getSelection()),text:W,insertAsSnippet:!0}),...(I=(E=x.additionalEdit)===null||E===void 0?void 0:E.edits)!==null&&I!==void 0?I:[]]};yield this._bulkEditService.apply(U,{editor:this._editor});return}yield this.applyDefaultPasteHandler(P,R,A.token)}finally{A.dispose()}})}getProviderPasteEdit(v,p,L,E,I){return(0,y.raceCancellation)((()=>Ee(this,void 0,void 0,function*(){for(const T of v){if(I.isCancellationRequested)return;if(!C(T,p))continue;const F=yield T.provideDocumentPasteEdits(L,E,p,I);if(F)return F}}))(),I)}applyDefaultPasteHandler(v,p,L){var E;return Ee(this,void 0,void 0,function*(){const I=(E=v.get(b.Mimes.text))!==null&&E!==void 0?E:v.get("text");if(!I)return;const T=yield I.asString();L.isCancellationRequested||this._editor.trigger("keyboard","paste",{text:T,pasteOnNewLine:p?.wasFromEmptySelection,multicursorText:null})})}};u.ID="editor.contrib.copyPasteActionController",u=Ne([fe(1,n.IBulkEditService),fe(2,o.IClipboardService),fe(3,l.IConfigurationService),fe(4,s.ILanguageFeaturesService),fe(5,a.IProgressService)],u),e.CopyPasteController=u;function C(f,v){return f.pasteMimeTypes.some(p=>p.toLowerCase()===S.DataTransfers.FILES.toLowerCase()?[...v.values()].some(L=>L.asFile()):v.has(p))}}),define(J[750],ee([1,0,15,227,749,601,90,34]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,S.registerEditorContribution)(y.CopyPasteController.ID,y.CopyPasteController,0),b.Registry.as(w.Extensions.Configuration).registerConfiguration(Object.assign(Object.assign({},k.editorConfigurationBaseNode),{properties:{"editor.experimental.pasteActions.enabled":{type:"boolean",scope:5,description:D.localize(0,null),default:!1}}}))}),define(J[751],ee([1,0,15,144,610]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends S.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:y.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(h,m){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()+1)}}class w extends S.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:y.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(h,m){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()-1)}}class b extends S.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:y.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(h,m){k.EditorZoom.setZoomLevel(0)}}(0,S.registerEditorAction)(D),(0,S.registerEditorAction)(w),(0,S.registerEditorAction)(b)}),define(J[323],ee([1,0,50,16,21,11,54,59,18,20,97,167,13,5,23,110,61,271,611,25,692,8,19,62]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C){"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 f(N){if(N=N.filter(W=>W.range),!N.length)return;let{range:A}=N[0];for(let W=1;W<N.length;W++)A=i.Range.plusRange(A,N[W].range);const{startLineNumber:P,endLineNumber:x}=A;P===x?N.length===1?(0,S.alert)(o.localize(0,null,P)):(0,S.alert)(o.localize(1,null,N.length,P)):N.length===1?(0,S.alert)(o.localize(2,null,P,x)):(0,S.alert)(o.localize(3,null,N.length,P,x))}e.alertFormattingEdits=f;function v(N,A,P){const x=[],W=new a.ExtensionIdentifierSet,U=N.ordered(P);for(const $ of U)x.push($),$.extensionId&&W.add($.extensionId);const O=A.ordered(P);for(const $ of O){if($.extensionId){if(W.has($.extensionId))continue;W.add($.extensionId)}x.push({displayName:$.displayName,extensionId:$.extensionId,provideDocumentFormattingEdits(Q,se,le){return $.provideDocumentRangeFormattingEdits(Q,Q.getFullModelRange(),se,le)}})}return x}e.getRealAndSyntheticDocumentFormattersOrdered=v;class p{static setFormatterSelector(A){return{dispose:p._selectors.unshift(A)}}static select(A,P,x){return Ee(this,void 0,void 0,function*(){if(A.length===0)return;const W=w.Iterable.first(p._selectors);if(W)return yield W(A,P,x)})}}p._selectors=new b.LinkedList,e.FormattingConflicts=p;function L(N,A,P,x,W,U){return Ee(this,void 0,void 0,function*(){const O=N.get(d.IInstantiationService),{documentRangeFormattingEditProvider:$}=N.get(u.ILanguageFeaturesService),Q=(0,n.isCodeEditor)(A)?A.getModel():A,se=$.ordered(Q),le=yield p.select(se,Q,x);le&&(W.report(le),yield O.invokeFunction(E,le,A,P,U))})}e.formatDocumentRangesWithSelectedProvider=L;function E(N,A,P,x,W){var U,O;return Ee(this,void 0,void 0,function*(){const $=N.get(r.IEditorWorkerService),Q=N.get(C.ILogService);let se,le;(0,n.isCodeEditor)(P)?(se=P.getModel(),le=new m.EditorStateCancellationTokenSource(P,5,void 0,W)):(se=P,le=new m.TextModelCancellationTokenSource(P,W));const te=[];let re=0;for(const Y of(0,k.asArray)(x).sort(i.Range.compareRangesUsingStarts))re>0&&i.Range.areIntersectingOrTouching(te[re-1],Y)?te[re-1]=i.Range.fromPositions(te[re-1].getStartPosition(),Y.getEndPosition()):re=te.push(Y);const H=Y=>Ee(this,void 0,void 0,function*(){var ne,de;Q.trace("[format][provideDocumentRangeFormattingEdits] (request)",(ne=A.extensionId)===null||ne===void 0?void 0:ne.value,Y);const he=(yield A.provideDocumentRangeFormattingEdits(se,Y,se.getFormattingOptions(),le.token))||[];return Q.trace("[format][provideDocumentRangeFormattingEdits] (response)",(de=A.extensionId)===null||de===void 0?void 0:de.value,he),he}),B=(Y,ne)=>{if(!Y.length||!ne.length)return!1;const de=Y.reduce((he,oe)=>i.Range.plusRange(he,oe.range),Y[0].range);if(!ne.some(he=>i.Range.intersectRanges(de,he.range)))return!1;for(const he of Y)for(const oe of ne)if(i.Range.intersectRanges(he.range,oe.range))return!0;return!1},j=[],G=[];try{if(typeof A.provideDocumentRangesFormattingEdits=="function"){Q.trace("[format][provideDocumentRangeFormattingEdits] (request)",(U=A.extensionId)===null||U===void 0?void 0:U.value,te);const Y=(yield A.provideDocumentRangesFormattingEdits(se,te,se.getFormattingOptions(),le.token))||[];Q.trace("[format][provideDocumentRangeFormattingEdits] (response)",(O=A.extensionId)===null||O===void 0?void 0:O.value,Y),G.push(Y)}else for(const Y of te){if(le.token.isCancellationRequested)return!0;G.push(yield H(Y))}for(let Y=0;Y<te.length;++Y)for(let ne=Y+1;ne<te.length;++ne){if(le.token.isCancellationRequested)return!0;if(B(G[Y],G[ne])){const de=i.Range.plusRange(te[Y],te[ne]),he=yield H(de);te.splice(ne,1),te.splice(Y,1),te.push(de),G.splice(ne,1),G.splice(Y,1),G.push(he),Y=0,ne=0}}for(const Y of G){if(le.token.isCancellationRequested)return!0;const ne=yield $.computeMoreMinimalEdits(se.uri,Y);ne&&j.push(...ne)}}finally{le.dispose()}if(j.length===0)return!1;if((0,n.isCodeEditor)(P))g.FormattingEdit.execute(P,j,!0),f(j),P.revealPositionInCenterIfOutsideViewport(P.getPosition(),1);else{const[{range:Y}]=j,ne=new s.Selection(Y.startLineNumber,Y.startColumn,Y.endLineNumber,Y.endColumn);se.pushEditOperations([ne],j.map(de=>({text:de.text,range:i.Range.lift(de.range),forceMoveMarkers:!0})),de=>{for(const{range:he}of de)if(i.Range.areIntersectingOrTouching(he,ne))return[new s.Selection(he.startLineNumber,he.startColumn,he.endLineNumber,he.endColumn)];return null})}return!0})}e.formatDocumentRangesWithProvider=E;function I(N,A,P,x,W){return Ee(this,void 0,void 0,function*(){const U=N.get(d.IInstantiationService),O=N.get(u.ILanguageFeaturesService),$=(0,n.isCodeEditor)(A)?A.getModel():A,Q=v(O.documentFormattingEditProvider,O.documentRangeFormattingEditProvider,$),se=yield p.select(Q,$,P);se&&(x.report(se),yield U.invokeFunction(T,se,A,P,W))})}e.formatDocumentWithSelectedProvider=I;function T(N,A,P,x,W){return Ee(this,void 0,void 0,function*(){const U=N.get(r.IEditorWorkerService);let O,$;(0,n.isCodeEditor)(P)?(O=P.getModel(),$=new m.EditorStateCancellationTokenSource(P,5,void 0,W)):(O=P,$=new m.TextModelCancellationTokenSource(P,W));let Q;try{const se=yield A.provideDocumentFormattingEdits(O,O.getFormattingOptions(),$.token);if(Q=yield U.computeMoreMinimalEdits(O.uri,se),$.token.isCancellationRequested)return!0}finally{$.dispose()}if(!Q||Q.length===0)return!1;if((0,n.isCodeEditor)(P))g.FormattingEdit.execute(P,Q,x!==2),x!==2&&(f(Q),P.revealPositionInCenterIfOutsideViewport(P.getPosition(),1));else{const[{range:se}]=Q,le=new s.Selection(se.startLineNumber,se.startColumn,se.endLineNumber,se.endColumn);O.pushEditOperations([le],Q.map(te=>({text:te.text,range:i.Range.lift(te.range),forceMoveMarkers:!0})),te=>{for(const{range:re}of te)if(i.Range.areIntersectingOrTouching(re,le))return[new s.Selection(re.startLineNumber,re.startColumn,re.endLineNumber,re.endColumn)];return null})}return!0})}e.formatDocumentWithProvider=T;function F(N,A,P,x,W,U){return Ee(this,void 0,void 0,function*(){const O=A.documentRangeFormattingEditProvider.ordered(P);for(const $ of O){const Q=yield Promise.resolve($.provideDocumentRangeFormattingEdits(P,x,W,U)).catch(D.onUnexpectedExternalError);if((0,k.isNonEmptyArray)(Q))return yield N.computeMoreMinimalEdits(P.uri,Q)}})}e.getDocumentRangeFormattingEditsUntilResult=F;function R(N,A,P,x,W){return Ee(this,void 0,void 0,function*(){const U=v(A.documentFormattingEditProvider,A.documentRangeFormattingEditProvider,P);for(const O of U){const $=yield Promise.resolve(O.provideDocumentFormattingEdits(P,x,W)).catch(D.onUnexpectedExternalError);if((0,k.isNonEmptyArray)($))return yield N.computeMoreMinimalEdits(P.uri,$)}})}e.getDocumentFormattingEditsUntilResult=R;function M(N,A,P,x,W,U,O){const $=A.onTypeFormattingEditProvider.ordered(P);return $.length===0||$[0].autoFormatTriggerCharacters.indexOf(W)<0?Promise.resolve(void 0):Promise.resolve($[0].provideOnTypeFormattingEdits(P,x,W,U,O)).catch(D.onUnexpectedExternalError).then(Q=>N.computeMoreMinimalEdits(P.uri,Q))}e.getOnTypeFormattingEdits=M,l.CommandsRegistry.registerCommand("_executeFormatRangeProvider",function(N,...A){return Ee(this,void 0,void 0,function*(){const[P,x,W]=A;(0,_.assertType)(h.URI.isUri(P)),(0,_.assertType)(i.Range.isIRange(x));const U=N.get(c.ITextModelService),O=N.get(r.IEditorWorkerService),$=N.get(u.ILanguageFeaturesService),Q=yield U.createModelReference(P);try{return F(O,$,Q.object.textEditorModel,i.Range.lift(x),W,y.CancellationToken.None)}finally{Q.dispose()}})}),l.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",function(N,...A){return Ee(this,void 0,void 0,function*(){const[P,x]=A;(0,_.assertType)(h.URI.isUri(P));const W=N.get(c.ITextModelService),U=N.get(r.IEditorWorkerService),O=N.get(u.ILanguageFeaturesService),$=yield W.createModelReference(P);try{return R(U,O,$.object.textEditorModel,x,y.CancellationToken.None)}finally{$.dispose()}})}),l.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",function(N,...A){return Ee(this,void 0,void 0,function*(){const[P,x,W,U]=A;(0,_.assertType)(h.URI.isUri(P)),(0,_.assertType)(t.Position.isIPosition(x)),(0,_.assertType)(typeof W=="string");const O=N.get(c.ITextModelService),$=N.get(r.IEditorWorkerService),Q=N.get(u.ILanguageFeaturesService),se=yield O.createModelReference(P);try{return M($,Q,se.object.textEditorModel,t.Position.lift(x),W,U,y.CancellationToken.None)}finally{se.dispose()}})})}),define(J[752],ee([1,0,16,21,11,58,2,15,30,115,5,22,110,19,323,271,612,25,14,8,71]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let d=class{constructor(p,L,E){this._editor=p,this._languageFeaturesService=L,this._workerService=E,this._disposables=new w.DisposableStore,this._sessionDisposables=new w.DisposableStore,this._disposables.add(L.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(p.onDidChangeModel(()=>this._update())),this._disposables.add(p.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(p.onDidChangeConfiguration(I=>{I.hasChanged(54)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(54)||!this._editor.hasModel())return;const p=this._editor.getModel(),[L]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(p);if(!L||!L.autoFormatTriggerCharacters)return;const E=new h.CharacterSet;for(const I of L.autoFormatTriggerCharacters)E.add(I.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(I=>{const T=I.charCodeAt(I.length-1);E.has(T)&&this._trigger(String.fromCharCode(T))}))}_trigger(p){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const L=this._editor.getModel(),E=this._editor.getPosition(),I=new k.CancellationTokenSource,T=this._editor.onDidChangeModelContent(F=>{if(F.isFlush){I.cancel(),T.dispose();return}for(let R=0,M=F.changes.length;R<M;R++)if(F.changes[R].range.endLineNumber<=E.lineNumber){I.cancel(),T.dispose();return}});(0,s.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,L,E,p,L.getFormattingOptions(),I.token).then(F=>{I.token.isCancellationRequested||(0,S.isNonEmptyArray)(F)&&(r.FormattingEdit.execute(this._editor,F,!0),(0,s.alertFormattingEdits)(F))}).finally(()=>{T.dispose()})}};d.ID="editor.contrib.autoFormat",d=Ne([fe(1,i.ILanguageFeaturesService),fe(2,t.IEditorWorkerService)],d);let u=class{constructor(p,L,E){this.editor=p,this._languageFeaturesService=L,this._instantiationService=E,this._callOnDispose=new w.DisposableStore,this._callOnModel=new w.DisposableStore,this._callOnDispose.add(p.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(p.onDidChangeModel(()=>this._update())),this._callOnDispose.add(p.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(L.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(53)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:p})=>this._trigger(p)))}_trigger(p){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(s.formatDocumentRangesWithSelectedProvider,this.editor,p,2,a.Progress.None,k.CancellationToken.None).catch(y.onUnexpectedError))}};u.ID="editor.contrib.formatOnPaste",u=Ne([fe(1,i.ILanguageFeaturesService),fe(2,l.IInstantiationService)],u);class C extends b.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:c.localize(0,null),alias:"Format Document",precondition:o.ContextKeyExpr.and(n.EditorContextKeys.notInCompositeEditor,n.EditorContextKeys.writable,n.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(p,L){return Ee(this,void 0,void 0,function*(){if(L.hasModel()){const E=p.get(l.IInstantiationService);yield p.get(a.IEditorProgressService).showWhile(E.invokeFunction(s.formatDocumentWithSelectedProvider,L,1,a.Progress.None,k.CancellationToken.None),250)}})}}class f extends b.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:c.localize(1,null),alias:"Format Selection",precondition:o.ContextKeyExpr.and(n.EditorContextKeys.writable,n.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:n.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(p,L){return Ee(this,void 0,void 0,function*(){if(!L.hasModel())return;const E=p.get(l.IInstantiationService),I=L.getModel(),T=L.getSelections().map(R=>R.isEmpty()?new m.Range(R.startLineNumber,1,R.startLineNumber,I.getLineMaxColumn(R.startLineNumber)):R);yield p.get(a.IEditorProgressService).showWhile(E.invokeFunction(s.formatDocumentRangesWithSelectedProvider,L,T,1,a.Progress.None,k.CancellationToken.None),250)})}}(0,b.registerEditorContribution)(d.ID,d,2),(0,b.registerEditorContribution)(u.ID,u,2),(0,b.registerEditorAction)(C),(0,b.registerEditorAction)(f),g.CommandsRegistry.registerCommand("editor.action.format",v=>Ee(void 0,void 0,void 0,function*(){const p=v.get(_.ICodeEditorService).getFocusedCodeEditor();if(!p||!p.hasModel())return;const L=v.get(g.ICommandService);p.getSelection().isEmpty()?yield L.executeCommand("editor.action.formatDocument"):yield L.executeCommand("editor.action.formatSelection")}))}),define(J[232],ee([1,0,16,21,11,15,19,146]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;function _(r,c,g,o){return Ee(this,void 0,void 0,function*(){const a=g.ordered(r).map(u=>Promise.resolve(o(u,r,c)).then(void 0,C=>{(0,y.onUnexpectedExternalError)(C)})),d=yield Promise.all(a);return(0,S.coalesce)(d.flat())})}function h(r,c,g,o){return _(c,g,r,(l,a,d)=>l.provideDefinition(a,d,o))}e.getDefinitionsAtPosition=h;function m(r,c,g,o){return _(c,g,r,(l,a,d)=>l.provideDeclaration(a,d,o))}e.getDeclarationsAtPosition=m;function n(r,c,g,o){return _(c,g,r,(l,a,d)=>l.provideImplementation(a,d,o))}e.getImplementationsAtPosition=n;function t(r,c,g,o){return _(c,g,r,(l,a,d)=>l.provideTypeDefinition(a,d,o))}e.getTypeDefinitionsAtPosition=t;function i(r,c,g,o,l){return _(c,g,r,(a,d,u)=>Ee(this,void 0,void 0,function*(){const C=yield a.provideReferences(d,u,{includeDeclaration:!0},l);if(!o||!C||C.length!==2)return C;const f=yield a.provideReferences(d,u,{includeDeclaration:!1},l);return f&&f.length===1?f:C}))}e.getReferencesAtPosition=i;function s(r){return Ee(this,void 0,void 0,function*(){const c=yield r(),g=new b.ReferencesModel(c,""),o=g.references.map(l=>l.link);return g.dispose(),o})}(0,D.registerModelAndPositionCommand)("_executeDefinitionProvider",(r,c,g)=>{const o=r.get(w.ILanguageFeaturesService),l=h(o.definitionProvider,c,g,k.CancellationToken.None);return s(()=>l)}),(0,D.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(r,c,g)=>{const o=r.get(w.ILanguageFeaturesService),l=t(o.typeDefinitionProvider,c,g,k.CancellationToken.None);return s(()=>l)}),(0,D.registerModelAndPositionCommand)("_executeDeclarationProvider",(r,c,g)=>{const o=r.get(w.ILanguageFeaturesService),l=m(o.declarationProvider,c,g,k.CancellationToken.None);return s(()=>l)}),(0,D.registerModelAndPositionCommand)("_executeReferenceProvider",(r,c,g)=>{const o=r.get(w.ILanguageFeaturesService),l=i(o.referenceProvider,c,g,!1,k.CancellationToken.None);return s(()=>l)}),(0,D.registerModelAndPositionCommand)("_executeImplementationProvider",(r,c,g)=>{const o=r.get(w.ILanguageFeaturesService),l=n(o.implementationProvider,c,g,k.CancellationToken.None);return s(()=>l)})}),define(J[753],ee([1,0,6,2,42,15,30,5,621,14,51,8,36,111,43]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new h.RawContextKey("hasSymbols",!1,(0,_.localize)(0,null)),e.ISymbolNavigationService=(0,n.createDecorator)("ISymbolNavigationService");let r=class{constructor(o,l,a,d){this._editorService=l,this._notificationService=a,this._keybindingService=d,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(o)}reset(){var o,l;this._ctxHasSymbols.reset(),(o=this._currentState)===null||o===void 0||o.dispose(),(l=this._currentMessage)===null||l===void 0||l.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(o){const l=o.parent.parent;if(l.references.length<=1){this.reset();return}this._currentModel=l,this._currentIdx=l.references.indexOf(o),this._ctxHasSymbols.set(!0),this._showMessage();const a=new c(this._editorService),d=a.onDidChange(u=>{if(this._ignoreEditorChange)return;const C=this._editorService.getActiveCodeEditor();if(!C)return;const f=C.getModel(),v=C.getPosition();if(!f||!v)return;let p=!1,L=!1;for(const E of l.references)if((0,y.isEqual)(E.uri,f.uri))p=!0,L=L||b.Range.containsPosition(E.range,v);else if(p)break;(!p||!L)&&this.reset()});this._currentState=(0,k.combinedDisposable)(a,d)}revealNext(o){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const l=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:l.uri,options:{selection:b.Range.collapseToStart(l.range),selectionRevealType:3}},o).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var o;(o=this._currentMessage)===null||o===void 0||o.dispose();const l=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),a=l?(0,_.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,l.getLabel()):(0,_.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(a)}};r=Ne([fe(0,h.IContextKeyService),fe(1,w.ICodeEditorService),fe(2,s.INotificationService),fe(3,t.IKeybindingService)],r),(0,m.registerSingleton)(e.ISymbolNavigationService,r,1),(0,D.registerEditorCommand)(new class extends D.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(g,o){return g.get(e.ISymbolNavigationService).revealNext(o)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(g){g.get(e.ISymbolNavigationService).reset()}});let c=class{constructor(o){this._listener=new Map,this._disposables=new k.DisposableStore,this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(o.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(o.onCodeEditorAdd(this._onDidAddEditor,this)),o.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,k.dispose)(this._listener.values())}_onDidAddEditor(o){this._listener.set(o,(0,k.combinedDisposable)(o.onDidChangeCursorPosition(l=>this._onDidChange.fire({editor:o})),o.onDidChangeModelContent(l=>this._onDidChange.fire({editor:o}))))}_onDidRemoveEditor(o){var l;(l=this._listener.get(o))===null||l===void 0||l.dispose(),this._listener.delete(o)}};c=Ne([fe(0,w.ICodeEditorService)],c)}),define(J[324],ee([1,0,12,21,11,15,19]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class b{constructor(i,s,r){this.provider=i,this.hover=s,this.ordinal=r}}e.HoverProviderResult=b;function _(t,i,s,r,c){return Ee(this,void 0,void 0,function*(){try{const g=yield Promise.resolve(t.provideHover(s,r,c));if(g&&n(g))return new b(t,g,i)}catch(g){(0,y.onUnexpectedExternalError)(g)}})}function h(t,i,s,r){const g=t.ordered(i).map((o,l)=>_(o,l,i,s,r));return S.AsyncIterableObject.fromPromises(g).coalesce()}e.getHover=h;function m(t,i,s,r){return h(t,i,s,r).map(c=>c.hover).toPromise()}e.getHoverPromise=m,(0,D.registerModelAndPositionCommand)("_executeHoverProvider",(t,i,s)=>{const r=t.get(w.ILanguageFeaturesService);return m(r.hoverProvider,i,s,k.CancellationToken.None)});function n(t){const i=typeof t.range<"u",s=typeof t.contents<"u"&&t.contents&&t.contents.length>0;return i&&s}}),define(J[233],ee([1,0,7,16,12,68,2,124,13,5,38,324,623,27,47,19]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const c=S.$;class g{constructor(d,u,C,f,v){this.owner=d,this.range=u,this.contents=C,this.isBeforeContent=f,this.ordinal=v}isValidForHoverAnchor(d){return d.type===1&&this.range.startColumn<=d.range.startColumn&&this.range.endColumn>=d.range.endColumn}}e.MarkdownHover=g;let o=class{constructor(d,u,C,f,v){this._editor=d,this._languageService=u,this._openerService=C,this._configurationService=f,this._languageFeaturesService=v,this.hoverOrdinal=3}createLoadingMessage(d){return new g(this,d.range,[new D.MarkdownString().appendText(t.localize(0,null))],!1,2e3)}computeSync(d,u){if(!this._editor.hasModel()||d.type!==1)return[];const C=this._editor.getModel(),f=d.range.startLineNumber,v=C.getLineMaxColumn(f),p=[];let L=1e3;const E=C.getLineLength(f),I=C.getLanguageIdAtPosition(d.range.startLineNumber,d.range.startColumn),T=this._editor.getOption(112),F=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:I});let R=!1;T>=0&&E>T&&d.range.startColumn>=T&&(R=!0,p.push(new g(this,d.range,[{value:t.localize(1,null)}],!1,L++))),!R&&typeof F=="number"&&E>=F&&p.push(new g(this,d.range,[{value:t.localize(2,null)}],!1,L++));let M=!1;for(const N of u){const A=N.range.startLineNumber===f?N.range.startColumn:1,P=N.range.endLineNumber===f?N.range.endColumn:v,x=N.options.hoverMessage;if(!x||(0,D.isEmptyMarkdownString)(x))continue;N.options.beforeContentClassName&&(M=!0);const W=new h.Range(d.range.startLineNumber,A,d.range.startLineNumber,P);p.push(new g(this,W,(0,k.asArray)(x),M,L++))}return p}computeAsync(d,u,C){if(!this._editor.hasModel()||d.type!==1)return y.AsyncIterableObject.EMPTY;const f=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(f))return y.AsyncIterableObject.EMPTY;const v=new _.Position(d.range.startLineNumber,d.range.startColumn);return(0,n.getHover)(this._languageFeaturesService.hoverProvider,f,v,C).filter(p=>!(0,D.isEmptyMarkdownString)(p.hover.contents)).map(p=>{const L=p.hover.range?h.Range.lift(p.hover.range):d.range;return new g(this,L,p.hover.contents,!1,p.ordinal)})}renderHoverParts(d,u){return l(d,u,this._editor,this._languageService,this._openerService)}};o=Ne([fe(1,m.ILanguageService),fe(2,s.IOpenerService),fe(3,i.IConfigurationService),fe(4,r.ILanguageFeaturesService)],o),e.MarkdownHoverParticipant=o;function l(a,d,u,C,f){d.sort((p,L)=>p.ordinal-L.ordinal);const v=new w.DisposableStore;for(const p of d)for(const L of p.contents){if((0,D.isEmptyMarkdownString)(L))continue;const E=c("div.hover-row.markdown-hover"),I=S.append(E,c("div.hover-contents")),T=v.add(new b.MarkdownRenderer({editor:u},C,f));v.add(T.onDidRenderAsync(()=>{I.className="hover-contents code-hover-contents",a.onContentsChanged()}));const F=v.add(T.render(L));I.appendChild(F.element),a.fragment.appendChild(E)}return v}e.renderMarkdownHovers=l}),define(J[754],ee([1,0,2,9,15,230,64,5,23,22,33,53,272,626,78,187,228]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.ChangeTabDisplaySize=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=e.getReindentEditOperations=void 0;function g(R,M,N,A,P){if(R.getLineCount()===1&&R.getLineMaxColumn(1)===1)return[];const x=M.getLanguageConfiguration(R.getLanguageId()).indentationRules;if(!x)return[];for(A=Math.min(A,R.getLineCount());N<=A&&x.unIndentedLinePattern;){const B=R.getLineContent(N);if(!x.unIndentedLinePattern.test(B))break;N++}if(N>A-1)return[];const{tabSize:W,indentSize:U,insertSpaces:O}=R.getOptions(),$=(B,j)=>(j=j||1,D.ShiftCommand.shiftIndent(B,B.length+j,W,U,O)),Q=(B,j)=>(j=j||1,D.ShiftCommand.unshiftIndent(B,B.length+j,W,U,O)),se=[];let le;const te=R.getLineContent(N);let re=te;if(P!=null){le=P;const B=k.getLeadingWhitespace(te);re=le+te.substring(B.length),x.decreaseIndentPattern&&x.decreaseIndentPattern.test(re)&&(le=Q(le),re=le+te.substring(B.length)),te!==re&&se.push(w.EditOperation.replaceMove(new _.Selection(N,1,N,B.length+1),(0,r.normalizeIndentation)(le,U,O)))}else le=k.getLeadingWhitespace(te);let H=le;x.increaseIndentPattern&&x.increaseIndentPattern.test(re)?(H=$(H),le=$(le)):x.indentNextLinePattern&&x.indentNextLinePattern.test(re)&&(H=$(H)),N++;for(let B=N;B<=A;B++){const j=R.getLineContent(B),G=k.getLeadingWhitespace(j),Y=H+j.substring(G.length);x.decreaseIndentPattern&&x.decreaseIndentPattern.test(Y)&&(H=Q(H),le=Q(le)),G!==H&&se.push(w.EditOperation.replaceMove(new _.Selection(B,1,B,G.length+1),(0,r.normalizeIndentation)(H,U,O))),!(x.unIndentedLinePattern&&x.unIndentedLinePattern.test(j))&&(x.increaseIndentPattern&&x.increaseIndentPattern.test(Y)?(le=$(le),H=le):x.indentNextLinePattern&&x.indentNextLinePattern.test(Y)?H=$(H):H=le)}return se}e.getReindentEditOperations=g;class o extends y.EditorAction{constructor(){super({id:o.ID,label:i.localize(0,null),alias:"Convert Indentation to Spaces",precondition:h.EditorContextKeys.writable})}run(M,N){const A=N.getModel();if(!A)return;const P=A.getOptions(),x=N.getSelection();if(!x)return;const W=new T(x,P.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[W]),N.pushUndoStop(),A.updateOptions({insertSpaces:!0})}}o.ID="editor.action.indentationToSpaces",e.IndentationToSpacesAction=o;class l extends y.EditorAction{constructor(){super({id:l.ID,label:i.localize(1,null),alias:"Convert Indentation to Tabs",precondition:h.EditorContextKeys.writable})}run(M,N){const A=N.getModel();if(!A)return;const P=A.getOptions(),x=N.getSelection();if(!x)return;const W=new F(x,P.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[W]),N.pushUndoStop(),A.updateOptions({insertSpaces:!1})}}l.ID="editor.action.indentationToTabs",e.IndentationToTabsAction=l;class a extends y.EditorAction{constructor(M,N,A){super(A),this.insertSpaces=M,this.displaySizeOnly=N}run(M,N){const A=M.get(s.IQuickInputService),P=M.get(n.IModelService),x=N.getModel();if(!x)return;const W=P.getCreationOptions(x.getLanguageId(),x.uri,x.isForSimpleWidget),U=x.getOptions(),O=[1,2,3,4,5,6,7,8].map(Q=>({id:Q.toString(),label:Q.toString(),description:Q===W.tabSize&&Q===U.tabSize?i.localize(2,null):Q===W.tabSize?i.localize(3,null):Q===U.tabSize?i.localize(4,null):void 0})),$=Math.min(x.getOptions().tabSize-1,7);setTimeout(()=>{A.pick(O,{placeHolder:i.localize(5,null),activeItem:O[$]}).then(Q=>{if(Q&&x&&!x.isDisposed()){const se=parseInt(Q.label,10);this.displaySizeOnly?x.updateOptions({tabSize:se}):x.updateOptions({tabSize:se,indentSize:se,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=a;class d extends a{constructor(){super(!1,!1,{id:d.ID,label:i.localize(6,null),alias:"Indent Using Tabs",precondition:void 0})}}d.ID="editor.action.indentUsingTabs",e.IndentUsingTabs=d;class u extends a{constructor(){super(!0,!1,{id:u.ID,label:i.localize(7,null),alias:"Indent Using Spaces",precondition:void 0})}}u.ID="editor.action.indentUsingSpaces",e.IndentUsingSpaces=u;class C extends a{constructor(){super(!0,!0,{id:C.ID,label:i.localize(8,null),alias:"Change Tab Display Size",precondition:void 0})}}C.ID="editor.action.changeTabDisplaySize",e.ChangeTabDisplaySize=C;class f extends y.EditorAction{constructor(){super({id:f.ID,label:i.localize(9,null),alias:"Detect Indentation from Content",precondition:void 0})}run(M,N){const A=M.get(n.IModelService),P=N.getModel();if(!P)return;const x=A.getCreationOptions(P.getLanguageId(),P.uri,P.isForSimpleWidget);P.detectIndentation(x.insertSpaces,x.tabSize)}}f.ID="editor.action.detectIndentation",e.DetectIndentation=f;class v extends y.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:i.localize(10,null),alias:"Reindent Lines",precondition:h.EditorContextKeys.writable})}run(M,N){const A=M.get(m.ILanguageConfigurationService),P=N.getModel();if(!P)return;const x=g(P,A,1,P.getLineCount());x.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,x),N.pushUndoStop())}}e.ReindentLinesAction=v;class p extends y.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:i.localize(11,null),alias:"Reindent Selected Lines",precondition:h.EditorContextKeys.writable})}run(M,N){const A=M.get(m.ILanguageConfigurationService),P=N.getModel();if(!P)return;const x=N.getSelections();if(x===null)return;const W=[];for(const U of x){let O=U.startLineNumber,$=U.endLineNumber;if(O!==$&&U.endColumn===1&&$--,O===1){if(O===$)continue}else O--;const Q=g(P,A,O,$);W.push(...Q)}W.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,W),N.pushUndoStop())}}e.ReindentSelectedLinesAction=p;class L{constructor(M,N){this._initialSelection=N,this._edits=[],this._selectionId=null;for(const A of M)A.range&&typeof A.text=="string"&&this._edits.push(A)}getEditOperations(M,N){for(const P of this._edits)N.addEditOperation(b.Range.lift(P.range),P.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=N.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(A=!0,this._selectionId=N.trackSelection(this._initialSelection,!1))),A||(this._selectionId=N.trackSelection(this._initialSelection))}computeCursorState(M,N){return N.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=L;let E=class{constructor(M,N){this.editor=M,this._languageConfigurationService=N,this.callOnDispose=new S.DisposableStore,this.callOnModel=new S.DisposableStore,this.callOnDispose.add(M.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(M.onDidChangeModel(()=>this.update())),this.callOnDispose.add(M.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(10)<4||this.editor.getOption(53))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:M})=>{this.trigger(M)}))}trigger(M){const N=this.editor.getSelections();if(N===null||N.length>1)return;const A=this.editor.getModel();if(!A||!A.tokenization.isCheapToTokenize(M.getStartPosition().lineNumber))return;const P=this.editor.getOption(10),{tabSize:x,indentSize:W,insertSpaces:U}=A.getOptions(),O=[],$={shiftIndent:te=>D.ShiftCommand.shiftIndent(te,te.length+1,x,W,U),unshiftIndent:te=>D.ShiftCommand.unshiftIndent(te,te.length+1,x,W,U)};let Q=M.startLineNumber;for(;Q<=M.endLineNumber;){if(this.shouldIgnoreLine(A,Q)){Q++;continue}break}if(Q>M.endLineNumber)return;let se=A.getLineContent(Q);if(!/\\S/.test(se.substring(0,M.startColumn-1))){const te=(0,c.getGoodIndentForLine)(P,A,A.getLanguageId(),Q,$,this._languageConfigurationService);if(te!==null){const re=k.getLeadingWhitespace(se),H=t.getSpaceCnt(te,x),B=t.getSpaceCnt(re,x);if(H!==B){const j=t.generateIndent(H,x,U);O.push({range:new b.Range(Q,1,Q,re.length+1),text:j}),se=j+se.substr(re.length)}else{const j=(0,c.getIndentMetadata)(A,Q,this._languageConfigurationService);if(j===0||j===8)return}}}const le=Q;for(;Q<M.endLineNumber;){if(!/\\S/.test(A.getLineContent(Q+1))){Q++;continue}break}if(Q!==M.endLineNumber){const te={tokenization:{getLineTokens:H=>A.tokenization.getLineTokens(H),getLanguageId:()=>A.getLanguageId(),getLanguageIdAtPosition:(H,B)=>A.getLanguageIdAtPosition(H,B)},getLineContent:H=>H===le?se:A.getLineContent(H)},re=(0,c.getGoodIndentForLine)(P,te,A.getLanguageId(),Q+1,$,this._languageConfigurationService);if(re!==null){const H=t.getSpaceCnt(re,x),B=t.getSpaceCnt(k.getLeadingWhitespace(A.getLineContent(Q+1)),x);if(H!==B){const j=H-B;for(let G=Q+1;G<=M.endLineNumber;G++){const Y=A.getLineContent(G),ne=k.getLeadingWhitespace(Y),he=t.getSpaceCnt(ne,x)+j,oe=t.generateIndent(he,x,U);oe!==ne&&O.push({range:new b.Range(G,1,G,ne.length+1),text:oe})}}}}if(O.length>0){this.editor.pushUndoStop();const te=new L(O,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",te),this.editor.pushUndoStop()}}shouldIgnoreLine(M,N){M.tokenization.forceTokenization(N);const A=M.getLineFirstNonWhitespaceColumn(N);if(A===0)return!0;const P=M.tokenization.getLineTokens(N);if(P.getCount()>0){const x=P.findTokenIndexAtOffset(A);if(x>=0&&P.getStandardTokenType(x)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};E.ID="editor.contrib.autoIndentOnPaste",E=Ne([fe(1,m.ILanguageConfigurationService)],E),e.AutoIndentOnPaste=E;function I(R,M,N,A){if(R.getLineCount()===1&&R.getLineMaxColumn(1)===1)return;let P="";for(let W=0;W<N;W++)P+=" ";const x=new RegExp(P,"gi");for(let W=1,U=R.getLineCount();W<=U;W++){let O=R.getLineFirstNonWhitespaceColumn(W);if(O===0&&(O=R.getLineMaxColumn(W)),O===1)continue;const $=new b.Range(W,1,W,O),Q=R.getValueInRange($),se=A?Q.replace(/\\t/ig,P):Q.replace(x,"\t");M.addEditOperation($,se)}}class T{constructor(M,N){this.selection=M,this.tabSize=N,this.selectionId=null}getEditOperations(M,N){this.selectionId=N.trackSelection(this.selection),I(M,N,this.tabSize,!0)}computeCursorState(M,N){return N.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=T;class F{constructor(M,N){this.selection=M,this.tabSize=N,this.selectionId=null}getEditOperations(M,N){this.selectionId=N.trackSelection(this.selection),I(M,N,this.tabSize,!1)}computeCursorState(M,N){return N.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=F,(0,y.registerEditorContribution)(E.ID,E,2),(0,y.registerEditorAction)(o),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(d),(0,y.registerEditorAction)(u),(0,y.registerEditorAction)(C),(0,y.registerEditorAction)(f),(0,y.registerEditorAction)(v),(0,y.registerEditorAction)(p)}),define(J[755],ee([1,0,15,190,22,631]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class w extends S.EditorAction{constructor(){super({id:"expandLineSelection",label:D.localize(0,null),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:y.EditorContextKeys.textInputFocus,primary:2090}})}run(_,h,m){if(m=m||{},!h.hasModel())return;const n=h._getViewModel();n.model.pushStackElement(),n.setCursorStates(m.source,3,k.CursorMoveCommands.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(m.source,!0)}}e.ExpandLineSelectionAction=w,(0,S.registerEditorAction)(w)}),define(J[756],ee([1,0,58,180,15,118,449,231,64,13,5,23,22,506,730,507,632,28,33]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KebabCaseAction=e.CamelCaseAction=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.DeleteDuplicateLinesAction=e.SortLinesDescendingAction=e.SortLinesAscendingAction=e.AbstractSortLinesAction=e.DuplicateSelectionAction=void 0;class l extends y.EditorAction{constructor(G,Y){super(Y),this.down=G}run(G,Y){if(!Y.hasModel())return;const ne=Y.getSelections().map((oe,ce)=>({selection:oe,index:ce,ignore:!1}));ne.sort((oe,ce)=>m.Range.compareRangesUsingStarts(oe.selection,ce.selection));let de=ne[0];for(let oe=1;oe<ne.length;oe++){const ce=ne[oe];de.selection.endLineNumber===ce.selection.startLineNumber&&(de.index<ce.index?ce.ignore=!0:(de.ignore=!0,de=ce))}const he=[];for(const oe of ne)he.push(new i.CopyLinesCommand(oe.selection,this.down,oe.ignore));Y.pushUndoStop(),Y.executeCommands(this.id,he),Y.pushUndoStop()}}class a extends l{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:c.localize(0,null),alias:"Copy Line Up",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:g.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(1,null),order:1}})}}class d extends l{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:c.localize(2,null),alias:"Copy Line Down",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:g.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(3,null),order:2}})}}class u extends y.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:c.localize(4,null),alias:"Duplicate Selection",precondition:t.EditorContextKeys.writable,menuOpts:{menuId:g.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(5,null),order:5}})}run(G,Y,ne){if(!Y.hasModel())return;const de=[],he=Y.getSelections(),oe=Y.getModel();for(const ce of he)if(ce.isEmpty())de.push(new i.CopyLinesCommand(ce,!0));else{const z=new n.Selection(ce.endLineNumber,ce.endColumn,ce.endLineNumber,ce.endColumn);de.push(new D.ReplaceCommandThatSelectsText(z,oe.getValueInRange(ce)))}Y.pushUndoStop(),Y.executeCommands(this.id,de),Y.pushUndoStop()}}e.DuplicateSelectionAction=u;class C extends y.EditorAction{constructor(G,Y){super(Y),this.down=G}run(G,Y){const ne=G.get(o.ILanguageConfigurationService),de=[],he=Y.getSelections()||[],oe=Y.getOption(10);for(const ce of he)de.push(new s.MoveLinesCommand(ce,this.down,oe,ne));Y.pushUndoStop(),Y.executeCommands(this.id,de),Y.pushUndoStop()}}class f extends C{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:c.localize(6,null),alias:"Move Line Up",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:g.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(7,null),order:3}})}}class v extends C{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:c.localize(8,null),alias:"Move Line Down",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:g.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(9,null),order:4}})}}class p extends y.EditorAction{constructor(G,Y){super(Y),this.descending=G}run(G,Y){const ne=Y.getSelections()||[];for(const he of ne)if(!r.SortLinesCommand.canRun(Y.getModel(),he,this.descending))return;const de=[];for(let he=0,oe=ne.length;he<oe;he++)de[he]=new r.SortLinesCommand(ne[he],this.descending);Y.pushUndoStop(),Y.executeCommands(this.id,de),Y.pushUndoStop()}}e.AbstractSortLinesAction=p;class L extends p{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:c.localize(10,null),alias:"Sort Lines Ascending",precondition:t.EditorContextKeys.writable})}}e.SortLinesAscendingAction=L;class E extends p{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:c.localize(11,null),alias:"Sort Lines Descending",precondition:t.EditorContextKeys.writable})}}e.SortLinesDescendingAction=E;class I extends y.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:c.localize(12,null),alias:"Delete Duplicate Lines",precondition:t.EditorContextKeys.writable})}run(G,Y){if(!Y.hasModel())return;const ne=Y.getModel();if(ne.getLineCount()===1&&ne.getLineMaxColumn(1)===1)return;const de=[],he=[];let oe=0;for(const ce of Y.getSelections()){const z=new Set,V=[];for(let Z=ce.startLineNumber;Z<=ce.endLineNumber;Z++){const ue=ne.getLineContent(Z);z.has(ue)||(V.push(ue),z.add(ue))}const K=new n.Selection(ce.startLineNumber,1,ce.endLineNumber,ne.getLineMaxColumn(ce.endLineNumber)),ie=ce.startLineNumber-oe,X=new n.Selection(ie,1,ie+V.length-1,V[V.length-1].length);de.push(_.EditOperation.replace(K,V.join(`\n`))),he.push(X),oe+=ce.endLineNumber-ce.startLineNumber+1-V.length}Y.pushUndoStop(),Y.executeEdits(this.id,de,he),Y.pushUndoStop()}}e.DeleteDuplicateLinesAction=I;class T extends y.EditorAction{constructor(){super({id:T.ID,label:c.localize(13,null),alias:"Trim Trailing Whitespace",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:(0,S.KeyChord)(2089,2102),weight:100}})}run(G,Y,ne){let de=[];ne.reason==="auto-save"&&(de=(Y.getSelections()||[]).map(ce=>new h.Position(ce.positionLineNumber,ce.positionColumn)));const he=Y.getSelection();if(he===null)return;const oe=new w.TrimTrailingWhitespaceCommand(he,de);Y.pushUndoStop(),Y.executeCommands(this.id,[oe]),Y.pushUndoStop()}}T.ID="editor.action.trimTrailingWhitespace",e.TrimTrailingWhitespaceAction=T;class F extends y.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:c.localize(14,null),alias:"Delete Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:3113,weight:100}})}run(G,Y){if(!Y.hasModel())return;const ne=this._getLinesToRemove(Y),de=Y.getModel();if(de.getLineCount()===1&&de.getLineMaxColumn(1)===1)return;let he=0;const oe=[],ce=[];for(let z=0,V=ne.length;z<V;z++){const K=ne[z];let ie=K.startLineNumber,X=K.endLineNumber,Z=1,ue=de.getLineMaxColumn(X);X<de.getLineCount()?(X+=1,ue=1):ie>1&&(ie-=1,Z=de.getLineMaxColumn(ie)),oe.push(_.EditOperation.replace(new n.Selection(ie,Z,X,ue),"")),ce.push(new n.Selection(ie-he,K.positionColumn,ie-he,K.positionColumn)),he+=K.endLineNumber-K.startLineNumber+1}Y.pushUndoStop(),Y.executeEdits(this.id,oe,ce),Y.pushUndoStop()}_getLinesToRemove(G){const Y=G.getSelections().map(he=>{let oe=he.endLineNumber;return he.startLineNumber<he.endLineNumber&&he.endColumn===1&&(oe-=1),{startLineNumber:he.startLineNumber,selectionStartColumn:he.selectionStartColumn,endLineNumber:oe,positionColumn:he.positionColumn}});Y.sort((he,oe)=>he.startLineNumber===oe.startLineNumber?he.endLineNumber-oe.endLineNumber:he.startLineNumber-oe.startLineNumber);const ne=[];let de=Y[0];for(let he=1;he<Y.length;he++)de.endLineNumber+1>=Y[he].startLineNumber?de.endLineNumber=Y[he].endLineNumber:(ne.push(de),de=Y[he]);return ne.push(de),ne}}e.DeleteLinesAction=F;class R extends y.EditorAction{constructor(){super({id:"editor.action.indentLines",label:c.localize(15,null),alias:"Indent Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2137,weight:100}})}run(G,Y){const ne=Y._getViewModel();ne&&(Y.pushUndoStop(),Y.executeCommands(this.id,b.TypeOperations.indent(ne.cursorConfig,Y.getModel(),Y.getSelections())),Y.pushUndoStop())}}e.IndentLinesAction=R;class M extends y.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:c.localize(16,null),alias:"Outdent Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2135,weight:100}})}run(G,Y){k.CoreEditingCommands.Outdent.runEditorCommand(G,Y,null)}}class N extends y.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:c.localize(17,null),alias:"Insert Line Above",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:3075,weight:100}})}run(G,Y){const ne=Y._getViewModel();ne&&(Y.pushUndoStop(),Y.executeCommands(this.id,b.TypeOperations.lineInsertBefore(ne.cursorConfig,Y.getModel(),Y.getSelections())))}}e.InsertLineBeforeAction=N;class A extends y.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:c.localize(18,null),alias:"Insert Line Below",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2051,weight:100}})}run(G,Y){const ne=Y._getViewModel();ne&&(Y.pushUndoStop(),Y.executeCommands(this.id,b.TypeOperations.lineInsertAfter(ne.cursorConfig,Y.getModel(),Y.getSelections())))}}e.InsertLineAfterAction=A;class P extends y.EditorAction{run(G,Y){if(!Y.hasModel())return;const ne=Y.getSelection(),de=this._getRangesToDelete(Y),he=[];for(let z=0,V=de.length-1;z<V;z++){const K=de[z],ie=de[z+1];m.Range.intersectRanges(K,ie)===null?he.push(K):de[z+1]=m.Range.plusRange(K,ie)}he.push(de[de.length-1]);const oe=this._getEndCursorState(ne,he),ce=he.map(z=>_.EditOperation.replace(z,""));Y.pushUndoStop(),Y.executeEdits(this.id,ce,oe),Y.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=P;class x extends P{constructor(){super({id:"deleteAllLeft",label:c.localize(19,null),alias:"Delete All Left",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(G,Y){let ne=null;const de=[];let he=0;return Y.forEach(oe=>{let ce;if(oe.endColumn===1&&he>0){const z=oe.startLineNumber-he;ce=new n.Selection(z,oe.startColumn,z,oe.startColumn)}else ce=new n.Selection(oe.startLineNumber,oe.startColumn,oe.startLineNumber,oe.startColumn);he+=oe.endLineNumber-oe.startLineNumber,oe.intersectRanges(G)?ne=ce:de.push(ce)}),ne&&de.unshift(ne),de}_getRangesToDelete(G){const Y=G.getSelections();if(Y===null)return[];let ne=Y;const de=G.getModel();return de===null?[]:(ne.sort(m.Range.compareRangesUsingStarts),ne=ne.map(he=>{if(he.isEmpty())if(he.startColumn===1){const oe=Math.max(1,he.startLineNumber-1),ce=he.startLineNumber===1?1:de.getLineContent(oe).length+1;return new m.Range(oe,ce,he.startLineNumber,1)}else return new m.Range(he.startLineNumber,1,he.startLineNumber,he.startColumn);else return new m.Range(he.startLineNumber,1,he.endLineNumber,he.endColumn)}),ne)}}e.DeleteAllLeftAction=x;class W extends P{constructor(){super({id:"deleteAllRight",label:c.localize(20,null),alias:"Delete All Right",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(G,Y){let ne=null;const de=[];for(let he=0,oe=Y.length,ce=0;he<oe;he++){const z=Y[he],V=new n.Selection(z.startLineNumber-ce,z.startColumn,z.startLineNumber-ce,z.startColumn);z.intersectRanges(G)?ne=V:de.push(V)}return ne&&de.unshift(ne),de}_getRangesToDelete(G){const Y=G.getModel();if(Y===null)return[];const ne=G.getSelections();if(ne===null)return[];const de=ne.map(he=>{if(he.isEmpty()){const oe=Y.getLineMaxColumn(he.startLineNumber);return he.startColumn===oe?new m.Range(he.startLineNumber,he.startColumn,he.startLineNumber+1,1):new m.Range(he.startLineNumber,he.startColumn,he.startLineNumber,oe)}return he});return de.sort(m.Range.compareRangesUsingStarts),de}}e.DeleteAllRightAction=W;class U extends y.EditorAction{constructor(){super({id:"editor.action.joinLines",label:c.localize(21,null),alias:"Join Lines",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(G,Y){const ne=Y.getSelections();if(ne===null)return;let de=Y.getSelection();if(de===null)return;ne.sort(m.Range.compareRangesUsingStarts);const he=[],oe=ne.reduce((X,Z)=>X.isEmpty()?X.endLineNumber===Z.startLineNumber?(de.equalsSelection(X)&&(de=Z),Z):Z.startLineNumber>X.endLineNumber+1?(he.push(X),Z):new n.Selection(X.startLineNumber,X.startColumn,Z.endLineNumber,Z.endColumn):Z.startLineNumber>X.endLineNumber?(he.push(X),Z):new n.Selection(X.startLineNumber,X.startColumn,Z.endLineNumber,Z.endColumn));he.push(oe);const ce=Y.getModel();if(ce===null)return;const z=[],V=[];let K=de,ie=0;for(let X=0,Z=he.length;X<Z;X++){const ue=he[X],me=ue.startLineNumber,Ce=1;let _e=0,we,ye;const ke=ce.getLineContent(ue.endLineNumber).length-ue.endColumn;if(ue.isEmpty()||ue.startLineNumber===ue.endLineNumber){const pe=ue.getStartPosition();pe.lineNumber<ce.getLineCount()?(we=me+1,ye=ce.getLineMaxColumn(we)):(we=pe.lineNumber,ye=ce.getLineMaxColumn(pe.lineNumber))}else we=ue.endLineNumber,ye=ce.getLineMaxColumn(we);let De=ce.getLineContent(me);for(let pe=me+1;pe<=we;pe++){const ae=ce.getLineContent(pe),ve=ce.getLineFirstNonWhitespaceColumn(pe);if(ve>=1){let Le=!0;De===""&&(Le=!1),Le&&(De.charAt(De.length-1)===" "||De.charAt(De.length-1)==="\t")&&(Le=!1,De=De.replace(/[\\s\\uFEFF\\xA0]+$/g," "));const Ie=ae.substr(ve-1);De+=(Le?" ":"")+Ie,Le?_e=Ie.length+1:_e=Ie.length}else _e=0}const ge=new m.Range(me,Ce,we,ye);if(!ge.isEmpty()){let pe;ue.isEmpty()?(z.push(_.EditOperation.replace(ge,De)),pe=new n.Selection(ge.startLineNumber-ie,De.length-_e+1,me-ie,De.length-_e+1)):ue.startLineNumber===ue.endLineNumber?(z.push(_.EditOperation.replace(ge,De)),pe=new n.Selection(ue.startLineNumber-ie,ue.startColumn,ue.endLineNumber-ie,ue.endColumn)):(z.push(_.EditOperation.replace(ge,De)),pe=new n.Selection(ue.startLineNumber-ie,ue.startColumn,ue.startLineNumber-ie,De.length-ke)),m.Range.intersectRanges(ge,de)!==null?K=pe:V.push(pe)}ie+=ge.endLineNumber-ge.startLineNumber}V.unshift(K),Y.pushUndoStop(),Y.executeEdits(this.id,z,V),Y.pushUndoStop()}}e.JoinLinesAction=U;class O extends y.EditorAction{constructor(){super({id:"editor.action.transpose",label:c.localize(22,null),alias:"Transpose characters around the cursor",precondition:t.EditorContextKeys.writable})}run(G,Y){const ne=Y.getSelections();if(ne===null)return;const de=Y.getModel();if(de===null)return;const he=[];for(let oe=0,ce=ne.length;oe<ce;oe++){const z=ne[oe];if(!z.isEmpty())continue;const V=z.getStartPosition(),K=de.getLineMaxColumn(V.lineNumber);if(V.column>=K){if(V.lineNumber===de.getLineCount())continue;const ie=new m.Range(V.lineNumber,Math.max(1,V.column-1),V.lineNumber+1,1),X=de.getValueInRange(ie).split("").reverse().join("");he.push(new D.ReplaceCommand(new n.Selection(V.lineNumber,Math.max(1,V.column-1),V.lineNumber+1,1),X))}else{const ie=new m.Range(V.lineNumber,Math.max(1,V.column-1),V.lineNumber,V.column+1),X=de.getValueInRange(ie).split("").reverse().join("");he.push(new D.ReplaceCommandThatPreservesSelection(ie,X,new n.Selection(V.lineNumber,V.column+1,V.lineNumber,V.column+1)))}}Y.pushUndoStop(),Y.executeCommands(this.id,he),Y.pushUndoStop()}}e.TransposeAction=O;class $ extends y.EditorAction{run(G,Y){const ne=Y.getSelections();if(ne===null)return;const de=Y.getModel();if(de===null)return;const he=Y.getOption(125),oe=[];for(const ce of ne)if(ce.isEmpty()){const z=ce.getStartPosition(),V=Y.getConfiguredWordAtPosition(z);if(!V)continue;const K=new m.Range(z.lineNumber,V.startColumn,z.lineNumber,V.endColumn),ie=de.getValueInRange(K);oe.push(_.EditOperation.replace(K,this._modifyText(ie,he)))}else{const z=de.getValueInRange(ce);oe.push(_.EditOperation.replace(ce,this._modifyText(z,he)))}Y.pushUndoStop(),Y.executeEdits(this.id,oe),Y.pushUndoStop()}}e.AbstractCaseAction=$;class Q extends ${constructor(){super({id:"editor.action.transformToUppercase",label:c.localize(23,null),alias:"Transform to Uppercase",precondition:t.EditorContextKeys.writable})}_modifyText(G,Y){return G.toLocaleUpperCase()}}e.UpperCaseAction=Q;class se extends ${constructor(){super({id:"editor.action.transformToLowercase",label:c.localize(24,null),alias:"Transform to Lowercase",precondition:t.EditorContextKeys.writable})}_modifyText(G,Y){return G.toLocaleLowerCase()}}e.LowerCaseAction=se;class le{constructor(G,Y){this._pattern=G,this._flags=Y,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class te extends ${constructor(){super({id:"editor.action.transformToTitlecase",label:c.localize(25,null),alias:"Transform to Title Case",precondition:t.EditorContextKeys.writable})}_modifyText(G,Y){const ne=te.titleBoundary.get();return ne?G.toLocaleLowerCase().replace(ne,de=>de.toLocaleUpperCase()):G}}te.titleBoundary=new le("(^|[^\\\\p{L}\\\\p{N}\']|((^|\\\\P{L})\'))\\\\p{L}","gmu"),e.TitleCaseAction=te;class re extends ${constructor(){super({id:"editor.action.transformToSnakecase",label:c.localize(26,null),alias:"Transform to Snake Case",precondition:t.EditorContextKeys.writable})}_modifyText(G,Y){const ne=re.caseBoundary.get(),de=re.singleLetters.get();return!ne||!de?G:G.replace(ne,"$1_$2").replace(de,"$1_$2$3").toLocaleLowerCase()}}re.caseBoundary=new le("(\\\\p{Ll})(\\\\p{Lu})","gmu"),re.singleLetters=new le("(\\\\p{Lu}|\\\\p{N})(\\\\p{Lu})(\\\\p{Ll})","gmu"),e.SnakeCaseAction=re;class H extends ${constructor(){super({id:"editor.action.transformToCamelcase",label:c.localize(27,null),alias:"Transform to Camel Case",precondition:t.EditorContextKeys.writable})}_modifyText(G,Y){const ne=H.wordBoundary.get();if(!ne)return G;const de=G.split(ne);return de.shift()+de.map(oe=>oe.substring(0,1).toLocaleUpperCase()+oe.substring(1)).join("")}}H.wordBoundary=new le("[_\\\\s-]","gm"),e.CamelCaseAction=H;class B extends ${static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(Y=>Y.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:c.localize(28,null),alias:"Transform to Kebab Case",precondition:t.EditorContextKeys.writable})}_modifyText(G,Y){const ne=B.caseBoundary.get(),de=B.singleLetters.get(),he=B.underscoreBoundary.get();return!ne||!de||!he?G:G.replace(he,"$1-$3").replace(ne,"$1-$2").replace(de,"$1-$2").toLocaleLowerCase()}}B.caseBoundary=new le("(\\\\p{Ll})(\\\\p{Lu})","gmu"),B.singleLetters=new le("(\\\\p{Lu}|\\\\p{N})(\\\\p{Lu}\\\\p{Ll})","gmu"),B.underscoreBoundary=new le("(\\\\S)(_)(\\\\S)","gm"),e.KebabCaseAction=B,(0,y.registerEditorAction)(a),(0,y.registerEditorAction)(d),(0,y.registerEditorAction)(u),(0,y.registerEditorAction)(f),(0,y.registerEditorAction)(v),(0,y.registerEditorAction)(L),(0,y.registerEditorAction)(E),(0,y.registerEditorAction)(I),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(F),(0,y.registerEditorAction)(R),(0,y.registerEditorAction)(M),(0,y.registerEditorAction)(N),(0,y.registerEditorAction)(A),(0,y.registerEditorAction)(x),(0,y.registerEditorAction)(W),(0,y.registerEditorAction)(U),(0,y.registerEditorAction)(O),(0,y.registerEditorAction)(Q),(0,y.registerEditorAction)(se),re.caseBoundary.isSupported()&&re.singleLetters.isSupported()&&(0,y.registerEditorAction)(re),H.wordBoundary.isSupported()&&(0,y.registerEditorAction)(H),te.titleBoundary.isSupported()&&(0,y.registerEditorAction)(te),B.isSupported()&&(0,y.registerEditorAction)(B)}),define(J[757],ee([1,0,2,15]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class y extends S.Disposable{constructor(w){super(),this._editor=w,this._register(this._editor.onMouseDown(b=>{const _=this._editor.getOption(112);_>=0&&b.target.type===6&&b.target.position.column>=_&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}y.ID="editor.contrib.longLinesHelper",(0,k.registerEditorContribution)(y.ID,y,2)}),define(J[150],ee([1,0,50,12,2,15,5,635,14,422]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let h=class li{static get(i){return i.getContribution(li.ID)}constructor(i,s){this._messageWidget=new y.MutableDisposable,this._messageListeners=new y.DisposableStore,this._editor=i,this._visible=li.MESSAGE_VISIBLE.bindTo(s)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(i,s){(0,S.alert)(i),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new n(this._editor,s,i),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 k.TimeoutTimer(()=>this.closeMessage(),3e3));let r;this._messageListeners.add(this._editor.onMouseMove(c=>{c.target.position&&(r?r.containsPosition(c.target.position)||this.closeMessage():r=new w.Range(s.lineNumber-3,1,c.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(n.fadeOut(this._messageWidget.value))}};h.ID="editor.contrib.messageController",h.MESSAGE_VISIBLE=new _.RawContextKey("messageVisible",!1,b.localize(0,null)),h=Ne([fe(1,_.IContextKeyService)],h),e.MessageController=h;const m=D.EditorCommand.bindToContribution(h.get);(0,D.registerEditorCommand)(new m({id:"leaveEditorMessage",precondition:h.MESSAGE_VISIBLE,handler:t=>t.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class n{static fadeOut(i){const s=()=>{i.dispose(),clearTimeout(r),i.getDomNode().removeEventListener("animationend",s)},r=setTimeout(s,110);return i.getDomNode().addEventListener("animationend",s),i.getDomNode().classList.add("fadeOut"),{dispose:s}}constructor(i,{lineNumber:s,column:r},c){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=i,this._editor.revealLinesInCenterIfOutsideViewport(s,s,0),this._position={lineNumber:s,column:r},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const g=document.createElement("div");g.classList.add("anchor","top"),this._domNode.appendChild(g);const o=document.createElement("div");o.classList.add("message"),o.textContent=c,this._domNode.appendChild(o);const l=document.createElement("div");l.classList.add("anchor","below"),this._domNode.appendChild(l),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(i){this._domNode.classList.toggle("below",i===2)}}(0,D.registerEditorContribution)(h.ID,h,4)}),define(J[758],ee([1,0,2,15,150,642]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyMessageController=void 0;class w extends S.Disposable{constructor(_){super(),this.editor=_,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const _=y.MessageController.get(this.editor);_&&this.editor.hasModel()&&(this.editor.isSimpleWidget?_.showMessage(D.localize(0,null),this.editor.getPosition()):_.showMessage(D.localize(1,null),this.editor.getPosition()))}}w.ID="editor.contrib.readOnlyMessageController",e.ReadOnlyMessageController=w,(0,k.registerEditorContribution)(w.ID,w,2)}),define(J[759],ee([1,0,16,21,11,15,13,5,23,22,274,508,645,28,25,19,61,18,20]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=e.SmartSelectController=void 0;class l{constructor(p,L){this.index=p,this.ranges=L}mov(p){const L=this.index+(p?1:-1);if(L<0||L>=this.ranges.length)return this;const E=new l(L,this.ranges);return E.ranges[L].equalsRange(this.ranges[this.index])?E.mov(p):E}}let a=class xi{static get(p){return p.getContribution(xi.ID)}constructor(p,L){this._editor=p,this._languageFeaturesService=L,this._ignoreSelection=!1}dispose(){var p;(p=this._selectionListener)===null||p===void 0||p.dispose()}run(p){return Ee(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const L=this._editor.getSelections(),E=this._editor.getModel();if(this._state||(yield f(this._languageFeaturesService.selectionRangeProvider,E,L.map(T=>T.getPosition()),this._editor.getOption(108),k.CancellationToken.None).then(T=>{var F;if(!(!S.isNonEmptyArray(T)||T.length!==L.length)&&!(!this._editor.hasModel()||!S.equals(this._editor.getSelections(),L,(R,M)=>R.equalsSelection(M)))){for(let R=0;R<T.length;R++)T[R]=T[R].filter(M=>M.containsPosition(L[R].getStartPosition())&&M.containsPosition(L[R].getEndPosition())),T[R].unshift(L[R]);this._state=T.map(R=>new l(0,R)),(F=this._selectionListener)===null||F===void 0||F.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var R;this._ignoreSelection||((R=this._selectionListener)===null||R===void 0||R.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(T=>T.mov(p));const I=this._state.map(T=>_.Selection.fromPositions(T.ranges[T.index].getStartPosition(),T.ranges[T.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(I)}finally{this._ignoreSelection=!1}})}};a.ID="editor.contrib.smartSelectController",a=Ne([fe(1,r.ILanguageFeaturesService)],a),e.SmartSelectController=a;class d extends D.EditorAction{constructor(p,L){super(L),this._forward=p}run(p,L){return Ee(this,void 0,void 0,function*(){const E=a.get(L);E&&(yield E.run(this._forward))})}}class u extends d{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:t.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"1_basic",title:t.localize(1,null),order:2}})}}s.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class C extends d{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:t.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"1_basic",title:t.localize(3,null),order:3}})}}(0,D.registerEditorContribution)(a.ID,a,4),(0,D.registerEditorAction)(u),(0,D.registerEditorAction)(C);function f(v,p,L,E,I){return Ee(this,void 0,void 0,function*(){const T=v.all(p).concat(new n.WordSelectionRangeProvider);T.length===1&&T.unshift(new m.BracketSelectionRangeProvider);const F=[],R=[];for(const M of T)F.push(Promise.resolve(M.provideSelectionRanges(p,L,I)).then(N=>{if(S.isNonEmptyArray(N)&&N.length===L.length)for(let A=0;A<L.length;A++){R[A]||(R[A]=[]);for(const P of N[A])b.Range.isIRange(P.range)&&b.Range.containsPosition(P.range,L[A])&&R[A].push(b.Range.lift(P.range))}},y.onUnexpectedExternalError));return yield Promise.all(F),R.map(M=>{if(M.length===0)return[];M.sort((x,W)=>w.Position.isBefore(x.getStartPosition(),W.getStartPosition())?1:w.Position.isBefore(W.getStartPosition(),x.getStartPosition())||w.Position.isBefore(x.getEndPosition(),W.getEndPosition())?-1:w.Position.isBefore(W.getEndPosition(),x.getEndPosition())?1:0);const N=[];let A;for(const x of M)(!A||b.Range.containsRange(x,A)&&!b.Range.equalsRange(x,A))&&(N.push(x),A=x);if(!E.selectLeadingAndTrailingWhitespace)return N;const P=[N[0]];for(let x=1;x<N.length;x++){const W=N[x-1],U=N[x];if(U.startLineNumber!==W.startLineNumber||U.endLineNumber!==W.endLineNumber){const O=new b.Range(W.startLineNumber,p.getLineFirstNonWhitespaceColumn(W.startLineNumber),W.endLineNumber,p.getLineLastNonWhitespaceColumn(W.endLineNumber));O.containsRange(W)&&!O.equalsRange(W)&&U.containsRange(O)&&!U.equalsRange(O)&&P.push(O);const $=new b.Range(W.startLineNumber,1,W.endLineNumber,p.getLineMaxColumn(W.endLineNumber));$.containsRange(W)&&!$.equalsRange(O)&&U.containsRange($)&&!U.equalsRange($)&&P.push($)}P.push(U)}return P})})}e.provideSelectionRanges=f,s.CommandsRegistry.registerCommand("_executeSelectionRangeProvider",function(v,...p){return Ee(this,void 0,void 0,function*(){const[L,E]=p;(0,g.assertType)(o.URI.isUri(L));const I=v.get(r.ILanguageFeaturesService).selectionRangeProvider,T=yield v.get(c.ITextModelService).createModelReference(L);try{return f(I,T.object.textEditorModel,E,{selectLeadingAndTrailingWhitespace:!0},k.CancellationToken.None)}finally{T.dispose()}})})}),define(J[760],ee([1,0,21,63,54,2,15,30,5,19,275,125,320,276,96,8]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestInlineCompletions=void 0;class c{constructor(d,u,C,f,v,p){this.range=d,this.insertText=u,this.filterText=C,this.additionalTextEdits=f,this.command=v,this.completion=p}}let g=class extends D.RefCountedDisposable{constructor(d,u,C,f,v,p){super(v.disposable),this.model=d,this.line=u,this.word=C,this.completionModel=f,this._suggestMemoryService=p}canBeReused(d,u,C){return this.model===d&&this.line===u&&this.word.word.length>0&&this.word.startColumn===C.startColumn&&this.word.endColumn<C.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var d;const u=[],{items:C}=this.completionModel,f=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},C),v=y.Iterable.slice(C,f),p=y.Iterable.slice(C,0,f);let L=5;for(const E of y.Iterable.concat(v,p)){if(E.score===k.FuzzyScore.Default)continue;const I=new _.Range(E.editStart.lineNumber,E.editStart.column,E.editInsertEnd.lineNumber,E.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),T=E.completion.insertTextRules&&E.completion.insertTextRules&4?{snippet:E.completion.insertText}:E.completion.insertText;u.push(new c(I,T,(d=E.filterTextLow)!==null&&d!==void 0?d:E.labelLow,E.completion.additionalTextEdits,E.completion.command,E)),L--\x3e=0&&E.resolve(S.CancellationToken.None)}return u}};g=Ne([fe(5,t.ISuggestMemoryService)],g);let o=class{constructor(d,u,C,f){this._getEditorOption=d,this._languageFeatureService=u,this._clipboardService=C,this._suggestMemoryService=f}provideInlineCompletions(d,u,C,f){var v;return Ee(this,void 0,void 0,function*(){if(C.selectedSuggestionInfo)return;const p=this._getEditorOption(85,d);if(n.QuickSuggestionsOptions.isAllOff(p))return;d.tokenization.tokenizeIfCheap(u.lineNumber);const L=d.tokenization.getLineTokens(u.lineNumber),E=L.getStandardTokenType(L.findTokenIndexAtOffset(Math.max(u.column-1-1,0)));if(n.QuickSuggestionsOptions.valueFor(p,E)!=="inline")return;let I=d.getWordAtPosition(u),T;if(I?.word||(T=this._getTriggerCharacterInfo(d,u)),!I?.word&&!T||(I||(I=d.getWordUntilPosition(u)),I.endColumn!==u.column))return;let F;const R=d.getValueInRange(new _.Range(u.lineNumber,1,u.lineNumber,u.column));if(!T&&(!((v=this._lastResult)===null||v===void 0)&&v.canBeReused(d,u.lineNumber,I))){const M=new m.LineContext(R,u.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=M,this._lastResult.acquire(),F=this._lastResult}else{const M=yield(0,n.provideSuggestionItems)(this._languageFeatureService.completionProvider,d,u,new n.CompletionOptions(void 0,void 0,T?.providers),T&&{triggerKind:1,triggerCharacter:T.ch},f);let N;M.needsClipboard&&(N=yield this._clipboardService.readText());const A=new m.CompletionModel(M.items,u.column,new m.LineContext(R,0),i.WordDistance.None,this._getEditorOption(113,d),this._getEditorOption(107,d),{boostFullMatch:!1,firstMatchCanBeWeak:!1},N);F=new g(d,u.lineNumber,I,A,M,this._suggestMemoryService)}return this._lastResult=F,F})}handleItemDidShow(d,u){u.completion.resolve(S.CancellationToken.None)}freeInlineCompletions(d){d.release()}_getTriggerCharacterInfo(d,u){var C;const f=d.getValueInRange(_.Range.fromPositions({lineNumber:u.lineNumber,column:u.column-1},u)),v=new Set;for(const p of this._languageFeatureService.completionProvider.all(d))!((C=p.triggerCharacters)===null||C===void 0)&&C.includes(f)&&v.add(p);if(v.size!==0)return{providers:v,ch:f}}};o=Ne([fe(1,h.ILanguageFeaturesService),fe(2,s.IClipboardService),fe(3,t.ISuggestMemoryService)],o),e.SuggestInlineCompletions=o;let l=class At{constructor(d,u,C,f){if(++At._counter===1){const v=f.createInstance(o,(p,L)=>{var E;return((E=C.listCodeEditors().find(T=>T.getModel()===L))!==null&&E!==void 0?E:d).getOption(p)});At._disposable=u.inlineCompletionsProvider.register("*",v)}}dispose(){var d;--At._counter===0&&((d=At._disposable)===null||d===void 0||d.dispose(),At._disposable=void 0)}};l._counter=0,l=Ne([fe(1,h.ILanguageFeaturesService),fe(2,b.ICodeEditorService),fe(3,r.IInstantiationService)],l),(0,w.registerEditorContribution)("suggest.inlineCompletionsProvider",l,0)}),define(J[761],ee([1,0,12,21,11,6,2,9,23,110,276,96,27,14,62,79,275,125,19,63,18]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class d{static shouldAutoTrigger(p){if(!p.hasModel())return!1;const L=p.getModel(),E=p.getPosition();L.tokenization.tokenizeIfCheap(E.lineNumber);const I=L.getWordAtPosition(E);return!(!I||I.endColumn!==E.column||!isNaN(Number(I.word)))}constructor(p,L,E){this.leadingLineContent=p.getLineContent(L.lineNumber).substr(0,L.column-1),this.leadingWord=p.getWordUntilPosition(L),this.lineNumber=L.lineNumber,this.column=L.column,this.triggerOptions=E}}e.LineContext=d;function u(v,p,L){return p.getContextKeyValue("inlineSuggestionVisible")?!v.getOption(60).suppressSuggestions:!0}function C(v,p,L){return p.getContextKeyValue("inlineSuggestionVisible")?!v.getOption(60).suppressSuggestions:!0}let f=class Bi{constructor(p,L,E,I,T,F,R,M){this._editor=p,this._editorWorkerService=L,this._clipboardService=E,this._telemetryService=I,this._logService=T,this._contextKeyService=F,this._configurationService=R,this._languageFeaturesService=M,this._toDispose=new w.DisposableStore,this._triggerCharacterListener=new w.DisposableStore,this._triggerQuickSuggest=new S.TimeoutTimer,this._triggerState=void 0,this._completionDisposables=new w.DisposableStore,this._onDidCancel=new D.Emitter,this._onDidTrigger=new D.Emitter,this._onDidSuggest=new D.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 _.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._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let N=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{N=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{N=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(A=>{N||this._onCursorChange(A)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!N&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){(0,w.dispose)(this._triggerCharacterListener),(0,w.dispose)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(87)||!this._editor.hasModel()||!this._editor.getOption(116))return;const p=new Map;for(const E of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const I of E.triggerCharacters||[]){let T=p.get(I);T||(T=new Set,T.add((0,g.getSnippetSuggestSupport)()),p.set(I,T)),T.add(E)}const L=E=>{var I;if(!C(this._editor,this._contextKeyService,this._configurationService)||d.shouldAutoTrigger(this._editor))return;if(!E){const R=this._editor.getPosition();E=this._editor.getModel().getLineContent(R.lineNumber).substr(0,R.column-1)}let T="";(0,b.isLowSurrogate)(E.charCodeAt(E.length-1))?(0,b.isHighSurrogate)(E.charCodeAt(E.length-2))&&(T=E.substr(E.length-2)):T=E.charAt(E.length-1);const F=p.get(T);if(F){const R=new Map;if(this._completionModel)for(const[M,N]of this._completionModel.getItemsByProvider())F.has(M)||R.set(M,N);this.trigger({auto:!0,triggerKind:1,triggerCharacter:T,retrigger:!!this._completionModel,clipboardText:(I=this._completionModel)===null||I===void 0?void 0:I.clipboardText,completionOptions:{providerFilter:F,providerItemsToReuse:R}})}};this._triggerCharacterListener.add(this._editor.onDidType(L)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>L()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(p=!1){var L;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(L=this._requestToken)===null||L===void 0||L.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:p}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(p){if(!this._editor.hasModel())return;const L=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!p.selection.isEmpty()||p.reason!==0&&p.reason!==3||p.source!=="keyboard"&&p.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&p.reason===0?(L.containsRange(this._currentSelection)||L.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&p.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){g.QuickSuggestionsOptions.isAllOff(this._editor.getOption(85))||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!d.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const p=this._editor.getModel(),L=this._editor.getPosition(),E=this._editor.getOption(85);if(!g.QuickSuggestionsOptions.isAllOff(E)){if(!g.QuickSuggestionsOptions.isAllOn(E)){p.tokenization.tokenizeIfCheap(L.lineNumber);const I=p.tokenization.getLineTokens(L.lineNumber),T=I.getStandardTokenType(I.findTokenIndexAtOffset(Math.max(L.column-1-1,0)));if(g.QuickSuggestionsOptions.valueFor(E,T)!=="on")return}u(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(p)&&this.trigger({auto:!0})}},this._editor.getOption(86)))}_refilterCompletionItems(){(0,a.assertType)(this._editor.hasModel()),(0,a.assertType)(this._triggerState!==void 0);const p=this._editor.getModel(),L=this._editor.getPosition(),E=new d(p,L,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(E)}trigger(p){var L,E,I,T,F,R;if(!this._editor.hasModel())return;const M=this._editor.getModel(),N=new d(M,this._editor.getPosition(),p);this.cancel(p.retrigger),this._triggerState=p,this._onDidTrigger.fire({auto:p.auto,shy:(L=p.shy)!==null&&L!==void 0?L:!1,position:this._editor.getPosition()}),this._context=N;let A={triggerKind:(E=p.triggerKind)!==null&&E!==void 0?E:0};p.triggerCharacter&&(A={triggerKind:1,triggerCharacter:p.triggerCharacter}),this._requestToken=new k.CancellationTokenSource;const P=this._editor.getOption(107);let x=1;switch(P){case"top":x=0;break;case"bottom":x=2;break}const{itemKind:W,showDeprecated:U}=Bi._createSuggestFilter(this._editor),O=new g.CompletionOptions(x,(T=(I=p.completionOptions)===null||I===void 0?void 0:I.kindFilter)!==null&&T!==void 0?T:W,(F=p.completionOptions)===null||F===void 0?void 0:F.providerFilter,(R=p.completionOptions)===null||R===void 0?void 0:R.providerItemsToReuse,U),$=m.WordDistance.create(this._editorWorkerService,this._editor),Q=(0,g.provideSuggestionItems)(this._languageFeaturesService.completionProvider,M,this._editor.getPosition(),O,A,this._requestToken.token);Promise.all([Q,$]).then(([se,le])=>Ee(this,void 0,void 0,function*(){var te;if((te=this._requestToken)===null||te===void 0||te.dispose(),!this._editor.hasModel())return;let re=p?.clipboardText;if(!re&&se.needsClipboard&&(re=yield this._clipboardService.readText()),this._triggerState===void 0)return;const H=this._editor.getModel(),B=new d(H,this._editor.getPosition(),p),j=Object.assign(Object.assign({},l.FuzzyScoreOptions.default),{firstMatchCanBeWeak:!this._editor.getOption(113).matchOnWordStartOnly});this._completionModel=new c.CompletionModel(se.items,this._context.column,{leadingLineContent:B.leadingLineContent,characterCountDelta:B.column-this._context.column},le,this._editor.getOption(113),this._editor.getOption(107),j,re),this._completionDisposables.add(se.disposable),this._onNewContext(B),this._reportDurationsTelemetry(se.durations)})).catch(y.onUnexpectedError)}_reportDurationsTelemetry(p){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(p)}),this._logService.debug("suggest.durations.json",p)})}static _createSuggestFilter(p){const L=new Set;p.getOption(107)==="none"&&L.add(27);const I=p.getOption(113);return I.showMethods||L.add(0),I.showFunctions||L.add(1),I.showConstructors||L.add(2),I.showFields||L.add(3),I.showVariables||L.add(4),I.showClasses||L.add(5),I.showStructs||L.add(6),I.showInterfaces||L.add(7),I.showModules||L.add(8),I.showProperties||L.add(9),I.showEvents||L.add(10),I.showOperators||L.add(11),I.showUnits||L.add(12),I.showValues||L.add(13),I.showConstants||L.add(14),I.showEnums||L.add(15),I.showEnumMembers||L.add(16),I.showKeywords||L.add(17),I.showWords||L.add(18),I.showColors||L.add(19),I.showFiles||L.add(20),I.showReferences||L.add(21),I.showColors||L.add(22),I.showFolders||L.add(23),I.showTypeParameters||L.add(24),I.showSnippets||L.add(27),I.showUsers||L.add(25),I.showIssues||L.add(26),{itemKind:L,showDeprecated:I.showDeprecated}}_onNewContext(p){if(this._context){if(p.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,b.getLeadingWhitespace)(p.leadingLineContent)!==(0,b.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(p.column<this._context.column){p.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(p.leadingWord.word.length!==0&&p.leadingWord.startColumn>this._context.leadingWord.startColumn){if(d.shouldAutoTrigger(this._editor)&&this._context){const E=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:E}})}return}if(p.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&p.leadingWord.word.length!==0){const L=new Map,E=new Set;for(const[I,T]of this._completionModel.getItemsByProvider())T.length>0&&T[0].container.incomplete?E.add(I):L.set(I,T);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:E,providerItemsToReuse:L}})}else{const L=this._completionModel.lineContext;let E=!1;if(this._completionModel.lineContext={leadingLineContent:p.leadingLineContent,characterCountDelta:p.column-this._context.column},this._completionModel.items.length===0){const I=d.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(I&&this._context.leadingWord.endColumn<p.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=L,E=this._completionModel.items.length>0,E&&p.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:p.triggerOptions,isFrozen:E})}}}}};f=Ne([fe(1,h.IEditorWorkerService),fe(2,n.IClipboardService),fe(3,r.ITelemetryService),fe(4,s.ILogService),fe(5,i.IContextKeyService),fe(6,t.IConfigurationService),fe(7,o.ILanguageFeaturesService)],f),e.SuggestModel=f}),define(J[762],ee([1,0,60,15,657]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends k.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:y.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(b,_){if(!_.hasModel())return;const h=_.getModel();h.tokenization.resetTokenization();const m=new S.StopWatch(!0);h.tokenization.forceTokenization(h.getLineCount()),m.stop(),console.log(`tokenization took ${m.elapsed()}`)}}(0,k.registerEditorAction)(D)}),define(J[763],ee([1,0,2,42,15,30,659,148]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const _="ignoreUnusualLineTerminators";function h(t,i,s){t.setModelProperty(i.uri,_,s)}function m(t,i){return t.getModelProperty(i.uri,_)}let n=class extends S.Disposable{constructor(i,s,r){super(),this._editor=i,this._dialogService=s,this._codeEditorService=r,this._isPresentingDialog=!1,this._config=this._editor.getOption(121),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(121)&&(this._config=this._editor.getOption(121),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(c=>{c.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return Ee(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const i=this._editor.getModel();if(!i.mightContainUnusualLineTerminators()||m(this._codeEditorService,i)===!0||this._editor.getOption(87))return;if(this._config==="auto"){i.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let r;try{this._isPresentingDialog=!0,r=yield this._dialogService.confirm({title:w.localize(0,null),message:w.localize(1,null),detail:w.localize(2,null,(0,k.basename)(i.uri)),primaryButton:w.localize(3,null),cancelButton:w.localize(4,null)})}finally{this._isPresentingDialog=!1}if(!r.confirmed){h(this._codeEditorService,i,!0);return}i.removeUnusualLineTerminators(this._editor.getSelections())})}};n.ID="editor.contrib.unusualLineTerminatorsDetector",n=Ne([fe(1,b.IDialogService),fe(2,D.ICodeEditorService)],n),e.UnusualLineTerminatorsDetector=n,(0,y.registerEditorContribution)(n.ID,n,1)}),define(J[325],ee([1,0,15,118,40,65,168,135,13,5,23,22,33,662,88,14,310]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"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 g extends S.EditorCommand{constructor(H){super(H),this._inSelectionMode=H.inSelectionMode,this._wordNavigationType=H.wordNavigationType}runEditorCommand(H,B,j){if(!B.hasModel())return;const G=(0,b.getMapForWordSeparators)(B.getOption(125)),Y=B.getModel(),de=B.getSelections().map(he=>{const oe=new _.Position(he.positionLineNumber,he.positionColumn),ce=this._move(G,Y,oe,this._wordNavigationType);return this._moveTo(he,ce,this._inSelectionMode)});if(Y.pushStackElement(),B._getViewModel().setCursorStates("moveWordCommand",3,de.map(he=>D.CursorState.fromModelSelection(he))),de.length===1){const he=new _.Position(de[0].positionLineNumber,de[0].positionColumn);B.revealPosition(he,0)}}_moveTo(H,B,j){return j?new m.Selection(H.selectionStartLineNumber,H.selectionStartColumn,B.lineNumber,B.column):new m.Selection(B.lineNumber,B.column,B.lineNumber,B.column)}}e.MoveWordCommand=g;class o extends g{_move(H,B,j,G){return w.WordOperations.moveWordLeft(H,B,j,G)}}e.WordLeftCommand=o;class l extends g{_move(H,B,j,G){return w.WordOperations.moveWordRight(H,B,j,G)}}e.WordRightCommand=l;class a extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=a;class d extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=d;class u extends o{constructor(){var H;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(s.CONTEXT_ACCESSIBILITY_MODE_ENABLED,c.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:2063,mac:{primary:527},weight:100}})}}e.CursorWordLeft=u;class C extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=C;class f extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=f;class v extends o{constructor(){var H;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(s.CONTEXT_ACCESSIBILITY_MODE_ENABLED,c.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:3087,mac:{primary:1551},weight:100}})}}e.CursorWordLeftSelect=v;class p extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(H,B,j,G){return super._move((0,b.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),B,j,G)}}e.CursorWordAccessibilityLeft=p;class L extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(H,B,j,G){return super._move((0,b.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),B,j,G)}}e.CursorWordAccessibilityLeftSelect=L;class E extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=E;class I extends l{constructor(){var H;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(s.CONTEXT_ACCESSIBILITY_MODE_ENABLED,c.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:2065,mac:{primary:529},weight:100}})}}e.CursorWordEndRight=I;class T extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=T;class F extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=F;class R extends l{constructor(){var H;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(s.CONTEXT_ACCESSIBILITY_MODE_ENABLED,c.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:3089,mac:{primary:1553},weight:100}})}}e.CursorWordEndRightSelect=R;class M extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=M;class N extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(H,B,j,G){return super._move((0,b.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),B,j,G)}}e.CursorWordAccessibilityRight=N;class A extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(H,B,j,G){return super._move((0,b.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),B,j,G)}}e.CursorWordAccessibilityRightSelect=A;class P extends S.EditorCommand{constructor(H){super(H),this._whitespaceHeuristics=H.whitespaceHeuristics,this._wordNavigationType=H.wordNavigationType}runEditorCommand(H,B,j){const G=H.get(t.ILanguageConfigurationService);if(!B.hasModel())return;const Y=(0,b.getMapForWordSeparators)(B.getOption(125)),ne=B.getModel(),de=B.getSelections(),he=B.getOption(5),oe=B.getOption(9),ce=G.getLanguageConfiguration(ne.getLanguageId()).getAutoClosingPairs(),z=B._getViewModel(),V=de.map(K=>{const ie=this._delete({wordSeparators:Y,model:ne,selection:K,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:B.getOption(7),autoClosingBrackets:he,autoClosingQuotes:oe,autoClosingPairs:ce,autoClosedCharacters:z.getCursorAutoClosedCharacters()},this._wordNavigationType);return new k.ReplaceCommand(ie,"")});B.pushUndoStop(),B.executeCommands(this.id,V),B.pushUndoStop()}}e.DeleteWordCommand=P;class x extends P{_delete(H,B){const j=w.WordOperations.deleteWordLeft(H,B);return j||new h.Range(1,1,1,1)}}e.DeleteWordLeftCommand=x;class W extends P{_delete(H,B){const j=w.WordOperations.deleteWordRight(H,B);if(j)return j;const G=H.model.getLineCount(),Y=H.model.getLineMaxColumn(G);return new h.Range(G,Y,G,Y)}}e.DeleteWordRightCommand=W;class U extends x{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:n.EditorContextKeys.writable})}}e.DeleteWordStartLeft=U;class O extends x{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:n.EditorContextKeys.writable})}}e.DeleteWordEndLeft=O;class $ extends x{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=$;class Q extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:n.EditorContextKeys.writable})}}e.DeleteWordStartRight=Q;class se extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:n.EditorContextKeys.writable})}}e.DeleteWordEndRight=se;class le extends W{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=le;class te extends S.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:n.EditorContextKeys.writable,label:i.localize(0,null),alias:"Delete Word"})}run(H,B,j){if(!B.hasModel())return;const G=(0,b.getMapForWordSeparators)(B.getOption(125)),Y=B.getModel(),de=B.getSelections().map(he=>{const oe=w.WordOperations.deleteInsideWord(G,Y,he);return new k.ReplaceCommand(oe,"")});B.pushUndoStop(),B.executeCommands(this.id,de),B.pushUndoStop()}}e.DeleteInsideWord=te,(0,S.registerEditorCommand)(new a),(0,S.registerEditorCommand)(new d),(0,S.registerEditorCommand)(new u),(0,S.registerEditorCommand)(new C),(0,S.registerEditorCommand)(new f),(0,S.registerEditorCommand)(new v),(0,S.registerEditorCommand)(new E),(0,S.registerEditorCommand)(new I),(0,S.registerEditorCommand)(new T),(0,S.registerEditorCommand)(new F),(0,S.registerEditorCommand)(new R),(0,S.registerEditorCommand)(new M),(0,S.registerEditorCommand)(new p),(0,S.registerEditorCommand)(new L),(0,S.registerEditorCommand)(new N),(0,S.registerEditorCommand)(new A),(0,S.registerEditorCommand)(new U),(0,S.registerEditorCommand)(new O),(0,S.registerEditorCommand)(new $),(0,S.registerEditorCommand)(new Q),(0,S.registerEditorCommand)(new se),(0,S.registerEditorCommand)(new le),(0,S.registerEditorAction)(te)}),define(J[764],ee([1,0,15,168,5,22,325,25]),function(q,e,S,k,y,D,w,b){"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 _ extends w.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(g,o){const l=k.WordPartOperations.deleteWordPartLeft(g);return l||new y.Range(1,1,1,1)}}e.DeleteWordPartLeft=_;class h extends w.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(g,o){const l=k.WordPartOperations.deleteWordPartRight(g);if(l)return l;const a=g.model.getLineCount(),d=g.model.getLineMaxColumn(a);return new y.Range(a,d,a,d)}}e.DeleteWordPartRight=h;class m extends w.MoveWordCommand{_move(g,o,l,a){return k.WordPartOperations.moveWordPartLeft(g,o,l)}}e.WordPartLeftCommand=m;class n extends m{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}e.CursorWordPartLeft=n,b.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class t extends m{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}e.CursorWordPartLeftSelect=t,b.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class i extends w.MoveWordCommand{_move(g,o,l,a){return k.WordPartOperations.moveWordPartRight(g,o,l)}}e.WordPartRightCommand=i;class s extends i{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}e.CursorWordPartRight=s;class r extends i{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}e.CursorWordPartRightSelect=r,(0,S.registerEditorCommand)(new _),(0,S.registerEditorCommand)(new h),(0,S.registerEditorCommand)(new n),(0,S.registerEditorCommand)(new t),(0,S.registerEditorCommand)(new s),(0,S.registerEditorCommand)(new r)}),define(J[765],ee([1,0,7,35,207,50,67,2,17,9,20,15,22,318,14,8,36,47,82,434]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const l=new s.RawContextKey("accessibilityHelpWidgetVisible",!1);let a=class Wi extends b.Disposable{static get(p){return p.getContribution(Wi.ID)}constructor(p,L){super(),this._editor=p,this._widget=this._register(L.createInstance(u,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};a.ID="editor.contrib.accessibilityHelpController",a=Ne([fe(1,r.IInstantiationService)],a);function d(v,p){return!v||v.length===0?o.AccessibilityHelpNLS.noSelection:v.length===1?p?h.format(o.AccessibilityHelpNLS.singleSelectionRange,v[0].positionLineNumber,v[0].positionColumn,p):h.format(o.AccessibilityHelpNLS.singleSelection,v[0].positionLineNumber,v[0].positionColumn):p?h.format(o.AccessibilityHelpNLS.multiSelectionRange,v.length,p):v.length>0?h.format(o.AccessibilityHelpNLS.multiSelection,v.length):""}let u=class Zt extends w.Widget{constructor(p,L,E,I){super(),this._contextKeyService=L,this._keybindingService=E,this._openerService=I,this._editor=p,this._isVisibleKey=l.bindTo(this._contextKeyService),this._domNode=(0,k.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=(0,k.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(S.addStandardDisposableListener(this._contentDomNode.domNode,"keydown",T=>{if(this._isVisible&&(T.equals(2083)&&((0,D.alert)(o.AccessibilityHelpNLS.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),S.clearNode(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),T.preventDefault(),T.stopPropagation()),T.equals(2086))){(0,D.alert)(o.AccessibilityHelpNLS.openingDocs);let F=this._editor.getRawOptions().accessibilityHelpUrl;typeof F>"u"&&(F="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(m.URI.parse(F)),T.preventDefault(),T.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Zt.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(p,L,E){const I=this._keybindingService.lookupKeybinding(p);return I?h.format(L,I.getAriaLabel()):h.format(E,p)}_buildContent(){const p=this._editor.getOptions(),L=this._editor.getSelections();let E=0;if(L){const R=this._editor.getModel();R&&L.forEach(M=>{E+=R.getValueLengthInRange(M)})}let I=d(L,E);p.get(59)?p.get(87)?I+=o.AccessibilityHelpNLS.readonlyDiffEditor:I+=o.AccessibilityHelpNLS.editableDiffEditor:p.get(87)?I+=o.AccessibilityHelpNLS.readonlyEditor:I+=o.AccessibilityHelpNLS.editableEditor;const T=_.isMacintosh?o.AccessibilityHelpNLS.changeConfigToOnMac:o.AccessibilityHelpNLS.changeConfigToOnWinLinux;switch(p.get(2)){case 0:I+=`\n\n - `+T;break;case 2:I+=`\n\n - `+o.AccessibilityHelpNLS.auto_on;break;case 1:I+=`\n\n - `+o.AccessibilityHelpNLS.auto_off,I+=" "+T;break}p.get(138)?I+=`\n\n - `+this._descriptionForCommand(i.ToggleTabFocusModeAction.ID,o.AccessibilityHelpNLS.tabFocusModeOnMsg,o.AccessibilityHelpNLS.tabFocusModeOnMsgNoKb):I+=`\n\n - `+this._descriptionForCommand(i.ToggleTabFocusModeAction.ID,o.AccessibilityHelpNLS.tabFocusModeOffMsg,o.AccessibilityHelpNLS.tabFocusModeOffMsgNoKb);const F=_.isMacintosh?o.AccessibilityHelpNLS.openDocMac:o.AccessibilityHelpNLS.openDocWinLinux;I+=`\n\n - `+F,I+=`\n\n`+o.AccessibilityHelpNLS.outroMsg,this._contentDomNode.domNode.appendChild((0,y.renderFormattedText)(I)),this._contentDomNode.domNode.setAttribute("aria-label",I)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,S.clearNode(this._contentDomNode.domNode),this._editor.focus())}_layout(){const p=this._editor.getLayoutInfo(),L=Math.max(5,Math.min(Zt.WIDTH,p.width-40)),E=Math.max(5,Math.min(Zt.HEIGHT,p.height-40));this._domNode.setWidth(L),this._domNode.setHeight(E);const I=Math.round((p.height-E)/2);this._domNode.setTop(I);const T=Math.round((p.width-L)/2);this._domNode.setLeft(T)}};u.ID="editor.contrib.accessibilityHelpWidget",u.WIDTH=500,u.HEIGHT=300,u=Ne([fe(1,s.IContextKeyService),fe(2,c.IKeybindingService),fe(3,g.IOpenerService)],u);class C extends n.EditorAction{constructor(){super({id:"editor.action.showAccessibilityHelp",label:o.AccessibilityHelpNLS.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(p,L){const E=a.get(L);E?.show()}}(0,n.registerEditorContribution)(a.ID,a,4),(0,n.registerEditorAction)(C);const f=n.EditorCommand.bindToContribution(a.get);(0,n.registerEditorCommand)(new f({id:"closeAccessibilityHelp",precondition:l,handler:v=>v.hide(),kbOpts:{weight:100+100,kbExpr:t.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(J[766],ee([1,0,7,2,15,17,435]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class w extends k.Disposable{constructor(h){super(),this.editor=h,this.widget=null,D.isIOS&&(this._register(h.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const h=!this.editor.getOption(87);!this.widget&&h?this.widget=new b(this.editor):this.widget&&!h&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}w.ID="editor.contrib.iPadShowKeyboard",e.IPadShowKeyboard=w;class b extends k.Disposable{constructor(h){super(),this.editor=h,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(S.addDisposableListener(this._domNode,"touchstart",m=>{this.editor.focus()})),this._register(S.addDisposableListener(this._domNode,"focus",m=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return b.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}b.ID="editor.contrib.ShowKeyboardWidget",(0,y.registerEditorContribution)(w.ID,w,3)}),define(J[767],ee([1,0,7,37,2,15,26,119,145,38,122,82,436]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let t=class zi extends y.Disposable{static get(o){return o.getContribution(zi.ID)}constructor(o,l,a){super(),this._editor=o,this._languageService=a,this._widget=null,this._register(this._editor.onDidChangeModel(d=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(d=>this.stop())),this._register(w.TokenizationRegistry.onDidChange(d=>this.stop())),this._register(this._editor.onKeyUp(d=>d.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new c(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};t.ID="editor.contrib.inspectTokens",t=Ne([fe(1,m.IStandaloneThemeService),fe(2,h.ILanguageService)],t);class i extends D.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:n.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(o,l){const a=t.get(l);a?.launch()}}function s(g){let o="";for(let l=0,a=g.length;l<a;l++){const d=g.charCodeAt(l);switch(d){case 9:o+="\\u2192";break;case 32:o+="\\xB7";break;default:o+=String.fromCharCode(d)}}return o}function r(g,o){const l=w.TokenizationRegistry.get(o);if(l)return l;const a=g.encodeLanguageId(o);return{getInitialState:()=>_.NullState,tokenize:(d,u,C)=>(0,_.nullTokenize)(o,C),tokenizeEncoded:(d,u,C)=>(0,_.nullTokenizeEncoded)(a,C)}}class c extends y.Disposable{constructor(o,l){super(),this.allowEditorOverflow=!0,this._editor=o,this._languageService=l,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=r(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(a=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return c._ID}_compute(o){const l=this._getTokensAtLine(o.lineNumber);let a=0;for(let v=l.tokens1.length-1;v>=0;v--){const p=l.tokens1[v];if(o.column-1>=p.offset){a=v;break}}let d=0;for(let v=l.tokens2.length>>>1;v>=0;v--)if(o.column-1>=l.tokens2[v<<1]){d=v;break}const u=this._model.getLineContent(o.lineNumber);let C="";if(a<l.tokens1.length){const v=l.tokens1[a].offset,p=a+1<l.tokens1.length?l.tokens1[a+1].offset:u.length;C=u.substring(v,p)}(0,S.reset)(this._domNode,(0,S.$)("h2.tm-token",void 0,s(C),(0,S.$)("span.tm-token-length",void 0,`${C.length} ${C.length===1?"char":"chars"}`))),(0,S.append)(this._domNode,(0,S.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const f=(d<<1)+1<l.tokens2.length?this._decodeMetadata(l.tokens2[(d<<1)+1]):null;(0,S.append)(this._domNode,(0,S.$)("table.tm-metadata-table",void 0,(0,S.$)("tbody",void 0,(0,S.$)("tr",void 0,(0,S.$)("td.tm-metadata-key",void 0,"language"),(0,S.$)("td.tm-metadata-value",void 0,`${f?f.languageId:"-?-"}`)),(0,S.$)("tr",void 0,(0,S.$)("td.tm-metadata-key",void 0,"token type"),(0,S.$)("td.tm-metadata-value",void 0,`${f?this._tokenTypeToString(f.tokenType):"-?-"}`)),(0,S.$)("tr",void 0,(0,S.$)("td.tm-metadata-key",void 0,"font style"),(0,S.$)("td.tm-metadata-value",void 0,`${f?this._fontStyleToString(f.fontStyle):"-?-"}`)),(0,S.$)("tr",void 0,(0,S.$)("td.tm-metadata-key",void 0,"foreground"),(0,S.$)("td.tm-metadata-value",void 0,`${f?k.Color.Format.CSS.formatHex(f.foreground):"-?-"}`)),(0,S.$)("tr",void 0,(0,S.$)("td.tm-metadata-key",void 0,"background"),(0,S.$)("td.tm-metadata-value",void 0,`${f?k.Color.Format.CSS.formatHex(f.background):"-?-"}`))))),(0,S.append)(this._domNode,(0,S.$)("hr.tokens-inspect-separator")),a<l.tokens1.length&&(0,S.append)(this._domNode,(0,S.$)("span.tm-token-type",void 0,l.tokens1[a].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(o){const l=w.TokenizationRegistry.getColorMap(),a=b.TokenMetadata.getLanguageId(o),d=b.TokenMetadata.getTokenType(o),u=b.TokenMetadata.getFontStyle(o),C=b.TokenMetadata.getForeground(o),f=b.TokenMetadata.getBackground(o);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(a),tokenType:d,fontStyle:u,foreground:l[C],background:l[f]}}_tokenTypeToString(o){switch(o){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(o){let l="";return o&1&&(l+="italic "),o&2&&(l+="bold "),o&4&&(l+="underline "),o&8&&(l+="strikethrough "),l.length===0&&(l="---"),l}_getTokensAtLine(o){const l=this._getStateBeforeLine(o),a=this._tokenizationSupport.tokenize(this._model.getLineContent(o),!0,l),d=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(o),!0,l);return{startState:l,tokens1:a.tokens,tokens2:d.tokens,endState:a.endState}}_getStateBeforeLine(o){let l=this._tokenizationSupport.getInitialState();for(let a=1;a<o;a++)l=this._tokenizationSupport.tokenize(this._model.getLineContent(a),!0,l).endState;return l}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}c._ID="editor.contrib.inspectTokensWidget",(0,D.registerEditorContribution)(t.ID,t,4),(0,D.registerEditorAction)(i)}),define(J[768],ee([1,0,7,545,41,16,2,667,28,14,57,36,79]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchToolBar=void 0;let i=class extends k.ToolBar{constructor(r,c,g,o,l,a,d){super(r,l,Object.assign(Object.assign({getKeyBinding:u=>{var C;return(C=a.lookupKeybinding(u.id))!==null&&C!==void 0?C:void 0}},c),{allowContextMenu:!0})),this._options=c,this._menuService=g,this._contextKeyService=o,this._contextMenuService=l,this._sessionDisposables=this._store.add(new w.DisposableStore),c?.telemetrySource&&this._store.add(this.actionBar.onDidRun(u=>d.publicLog2("workbenchActionExecuted",{id:u.action.id,from:c.telemetrySource})))}setActions(r,c=[],g){var o,l,a;this._sessionDisposables.clear();const d=r.slice(),u=c.slice(),C=[];let f=0;const v=[];let p=!1;if(((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==-1)for(let L=0;L<d.length;L++){const E=d[L];!(E instanceof _.MenuItemAction)&&!(E instanceof _.SubmenuItemAction)||E.hideActions&&(C.push(E.hideActions.toggle),E.hideActions.toggle.checked&&f++,E.hideActions.isHidden&&(p=!0,d[L]=void 0,((l=this._options)===null||l===void 0?void 0:l.hiddenItemStrategy)!==0&&(v[L]=E)))}if(((a=this._options)===null||a===void 0?void 0:a.maxNumberOfItems)!==void 0){let L=0;for(let E=0;E<d.length;E++){const I=d[E];I&&++L>=this._options.maxNumberOfItems&&(d[E]=void 0,v[E]=I)}}(0,D.coalesceInPlace)(d),(0,D.coalesceInPlace)(v),super.setActions(d,y.Separator.join(v,u)),C.length>0&&this._sessionDisposables.add((0,S.addDisposableListener)(this.getElement(),"contextmenu",L=>{var E,I,T,F;const R=this.getItemAction(L.target);if(!R)return;L.preventDefault(),L.stopPropagation();let M=!1;if(f===1&&((E=this._options)===null||E===void 0?void 0:E.hiddenItemStrategy)===0){M=!0;for(let P=0;P<C.length;P++)if(C[P].checked){C[P]=(0,y.toAction)({id:R.id,label:R.label,checked:!0,enabled:!1,run(){}});break}}let N;if(!M&&(R instanceof _.MenuItemAction||R instanceof _.SubmenuItemAction)){if(!R.hideActions)return;N=R.hideActions.hide}else N=(0,y.toAction)({id:"label",label:(0,b.localize)(0,null),enabled:!1,run(){}});const A=y.Separator.join([N],C);!((I=this._options)===null||I===void 0)&&I.resetMenu&&!g&&(g=[this._options.resetMenu]),p&&g&&(A.push(new y.Separator),A.push((0,y.toAction)({id:"resetThisMenu",label:(0,b.localize)(1,null),run:()=>this._menuService.resetHiddenStates(g)}))),this._contextMenuService.showContextMenu({getAnchor:()=>L,getActions:()=>A,menuId:(T=this._options)===null||T===void 0?void 0:T.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(F=this._options)===null||F===void 0?void 0:F.menuOptions),contextKeyService:this._contextKeyService})}))}};i=Ne([fe(2,_.IMenuService),fe(3,h.IContextKeyService),fe(4,m.IContextMenuService),fe(5,n.IKeybindingService),fe(6,t.ITelemetryService)],i),e.WorkbenchToolBar=i}),define(J[769],ee([1,0,524,11,63,2,55,18,679,25,27,148,8,36,719,83,79]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let g=class Yt extends s.PickerQuickAccessProvider{constructor(a,d,u,C,f,v){super(Yt.PREFIX,a),this.instantiationService=d,this.keybindingService=u,this.commandService=C,this.telemetryService=f,this.dialogService=v,this.commandsHistory=this._register(this.instantiationService.createInstance(o)),this.options=a}_getPicks(a,d,u,C){var f,v;return Ee(this,void 0,void 0,function*(){const p=yield this.getCommandPicks(u);if(u.isCancellationRequested)return[];const L=[];for(const R of p){const M=(0,b.withNullAsUndefined)(Yt.WORD_FILTER(a,R.label)),N=R.commandAlias?(0,b.withNullAsUndefined)(Yt.WORD_FILTER(a,R.commandAlias)):void 0;M||N?(R.highlights={label:M,detail:this.options.showAlias?N:void 0},L.push(R)):a===R.commandId&&L.push(R)}const E=new Map;for(const R of L){const M=E.get(R.label);M?(R.description=R.commandId,M.description=M.commandId):E.set(R.label,R)}L.sort((R,M)=>{const N=this.commandsHistory.peek(R.commandId),A=this.commandsHistory.peek(M.commandId);if(N&&A)return N>A?-1:1;if(N)return-1;if(A)return 1;if(this.options.suggestedCommandIds){const P=this.options.suggestedCommandIds.has(R.commandId),x=this.options.suggestedCommandIds.has(M.commandId);if(P&&x)return 0;if(P)return-1;if(x)return 1}return R.label.localeCompare(M.label)});const I=[];let T=!1,F=!!this.options.suggestedCommandIds;for(let R=0;R<L.length;R++){const M=L[R],N=this.keybindingService.lookupKeybinding(M.commandId),A=N?(0,_.localize)(0,null,M.label,N.getAriaLabel()):M.label;R===0&&this.commandsHistory.peek(M.commandId)&&(I.push({type:"separator",label:(0,_.localize)(1,null)}),T=!0),F&&!this.commandsHistory.peek(M.commandId)&&(!((f=this.options.suggestedCommandIds)===null||f===void 0)&&f.has(M.commandId))&&(I.push({type:"separator",label:(0,_.localize)(2,null)}),T=!0,F=!1),T&&!this.commandsHistory.peek(M.commandId)&&!(!((v=this.options.suggestedCommandIds)===null||v===void 0)&&v.has(M.commandId))&&(I.push({type:"separator",label:(0,_.localize)(3,null)}),T=!1),I.push(Object.assign(Object.assign({},M),{ariaLabel:A,detail:this.options.showAlias&&M.commandAlias!==M.label?M.commandAlias:void 0,keybinding:N,accept:()=>Ee(this,void 0,void 0,function*(){var P;this.commandsHistory.push(M.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:M.commandId,from:(P=C?.from)!==null&&P!==void 0?P:"quick open"});try{yield this.commandService.executeCommand(M.commandId)}catch(x){(0,k.isCancellationError)(x)||this.dialogService.error((0,_.localize)(4,null,M.label),(0,S.toErrorMessage)(x))}})}))}return I})}};g.PREFIX=">",g.WORD_FILTER=(0,y.or)(y.matchesPrefix,y.matchesWords,y.matchesContiguousSubString),g=Ne([fe(1,t.IInstantiationService),fe(2,i.IKeybindingService),fe(3,h.ICommandService),fe(4,c.ITelemetryService),fe(5,n.IDialogService)],g),e.AbstractCommandsQuickAccessProvider=g;let o=class ct extends D.Disposable{constructor(a,d){super(),this.storageService=a,this.configurationService=d,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(a=>this.updateConfiguration(a)))}updateConfiguration(a){a&&!a.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=ct.getConfiguredCommandHistoryLength(this.configurationService),ct.cache&&ct.cache.limit!==this.configuredCommandsHistoryLength&&(ct.cache.limit=this.configuredCommandsHistoryLength,ct.saveState(this.storageService)))}load(){const a=this.storageService.get(ct.PREF_KEY_CACHE,0);let d;if(a)try{d=JSON.parse(a)}catch{}const u=ct.cache=new w.LRUCache(this.configuredCommandsHistoryLength,1);if(d){let C;d.usesLRU?C=d.entries:C=d.entries.sort((f,v)=>f.value-v.value),C.forEach(f=>u.set(f.key,f.value))}ct.counter=this.storageService.getNumber(ct.PREF_KEY_COUNTER,0,ct.counter)}push(a){ct.cache&&(ct.cache.set(a,ct.counter++),ct.saveState(this.storageService))}peek(a){var d;return(d=ct.cache)===null||d===void 0?void 0:d.peek(a)}static saveState(a){if(!ct.cache)return;const d={usesLRU:!0,entries:[]};ct.cache.forEach((u,C)=>d.entries.push({key:C,value:u})),a.store(ct.PREF_KEY_CACHE,JSON.stringify(d),0,0),a.store(ct.PREF_KEY_COUNTER,ct.counter,0,0)}static getConfiguredCommandHistoryLength(a){var d,u;const f=(u=(d=a.getValue().workbench)===null||d===void 0?void 0:d.commandPalette)===null||u===void 0?void 0:u.history;return typeof f=="number"?f:ct.DEFAULT_COMMANDS_HISTORY_LENGTH}};o.DEFAULT_COMMANDS_HISTORY_LENGTH=50,o.PREF_KEY_CACHE="commandPalette.mru.cache",o.PREF_KEY_COUNTER="commandPalette.mru.counter",o.counter=1,o=Ne([fe(0,r.IStorageService),fe(1,m.IConfigurationService)],o),e.CommandsHistory=o}),define(J[770],ee([1,0,113,769]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class y extends k.AbstractCommandsQuickAccessProvider{constructor(w,b,_,h,m,n){super(w,b,_,h,m,n)}getCodeEditorCommandPicks(){const w=this.activeTextEditorControl;if(!w)return[];const b=[];for(const _ of w.getSupportedActions())b.push({commandId:_.id,commandAlias:_.alias,label:(0,S.stripIcons)(_.label)||_.id});return b}}e.AbstractEditorCommandsQuickAccessProvider=y}),define(J[771],ee([1,0,34,126,82,30,770,18,8,36,25,79,148,15,22,78]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let c=class extends w.AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){return(0,b.withNullAsUndefined)(this.codeEditorService.getFocusedCodeEditor())}constructor(l,a,d,u,C,f){super({showAlias:!1},l,d,u,C,f),this.codeEditorService=a}getCommandPicks(){return Ee(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};c=Ne([fe(0,_.IInstantiationService),fe(1,D.ICodeEditorService),fe(2,h.IKeybindingService),fe(3,m.ICommandService),fe(4,n.ITelemetryService),fe(5,t.IDialogService)],c),e.StandaloneCommandsQuickAccessProvider=c;class g extends i.EditorAction{constructor(){super({id:g.ID,label:y.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:s.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(l){l.get(r.IQuickInputService).quickAccess.show(c.PREFIX)}}g.ID="editor.action.quickCommand",e.GotoLineAction=g,(0,i.registerEditorAction)(g),S.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:c,prefix:c.PREFIX,helpEntries:[{description:y.QuickCommandNLS.quickCommandHelp,commandId:g.ID}]})}),define(J[31],ee([1,0,12,37,6,84,684,226,34]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchColorsSchemaId=e.resolveColorValue=e.ifDefinedThenElse=e.oneOf=e.transparent=e.lighten=e.darken=e.executeTransform=e.chartsPurple=e.chartsGreen=e.chartsOrange=e.chartsYellow=e.chartsBlue=e.chartsRed=e.chartsLines=e.chartsForeground=e.problemsInfoIconForeground=e.problemsWarningIconForeground=e.problemsErrorIconForeground=e.minimapSliderActiveBackground=e.minimapSliderHoverBackground=e.minimapSliderBackground=e.minimapForegroundOpacity=e.minimapBackground=e.minimapWarning=e.minimapError=e.minimapSelection=e.minimapSelectionOccurrenceHighlight=e.minimapFindMatch=e.overviewRulerSelectionHighlightForeground=e.overviewRulerFindMatchForeground=e.overviewRulerCommonContentForeground=e.overviewRulerIncomingContentForeground=e.overviewRulerCurrentContentForeground=e.mergeBorder=e.mergeCommonContentBackground=e.mergeCommonHeaderBackground=e.mergeIncomingContentBackground=e.mergeIncomingHeaderBackground=e.mergeCurrentContentBackground=e.mergeCurrentHeaderBackground=e.breadcrumbsPickerBackground=e.breadcrumbsActiveSelectionForeground=e.breadcrumbsFocusForeground=e.breadcrumbsBackground=e.breadcrumbsForeground=e.snippetFinalTabstopHighlightBorder=e.snippetFinalTabstopHighlightBackground=e.snippetTabstopHighlightBorder=e.snippetTabstopHighlightBackground=e.toolbarActiveBackground=e.toolbarHoverOutline=e.toolbarHoverBackground=e.menuSeparatorBackground=e.menuSelectionBorder=e.menuSelectionBackground=e.menuSelectionForeground=e.menuBackground=e.menuForeground=e.menuBorder=e.quickInputListFocusBackground=e.quickInputListFocusIconForeground=e.quickInputListFocusForeground=e._deprecatedQuickInputListFocusBackground=e.checkboxSelectBorder=e.checkboxBorder=e.checkboxForeground=e.checkboxSelectBackground=e.checkboxBackground=e.listDeemphasizedForeground=e.tableOddRowsBackgroundColor=e.tableColumnsBorder=e.treeInactiveIndentGuidesStroke=e.treeIndentGuidesStroke=e.listFilterMatchHighlightBorder=e.listFilterMatchHighlight=e.listFilterWidgetShadow=e.listFilterWidgetNoMatchesOutline=e.listFilterWidgetOutline=e.listFilterWidgetBackground=e.listWarningForeground=e.listErrorForeground=e.listInvalidItemForeground=e.listFocusHighlightForeground=e.listHighlightForeground=e.listDropBackground=e.listHoverForeground=e.listHoverBackground=e.listInactiveFocusOutline=e.listInactiveFocusBackground=e.listInactiveSelectionIconForeground=e.listInactiveSelectionForeground=e.listInactiveSelectionBackground=e.listActiveSelectionIconForeground=e.listActiveSelectionForeground=e.listActiveSelectionBackground=e.listFocusAndSelectionOutline=e.listFocusOutline=e.listFocusForeground=e.listFocusBackground=e.diffDiagonalFill=e.diffBorder=e.diffRemovedOutline=e.diffInsertedOutline=e.diffOverviewRulerRemoved=e.diffOverviewRulerInserted=e.diffRemovedLineGutter=e.diffInsertedLineGutter=e.diffRemovedLine=e.diffInsertedLine=e.diffRemoved=e.diffInserted=e.defaultRemoveColor=e.defaultInsertColor=e.editorLightBulbAutoFixForeground=e.editorLightBulbForeground=e.editorInlayHintParameterBackground=e.editorInlayHintParameterForeground=e.editorInlayHintTypeBackground=e.editorInlayHintTypeForeground=e.editorInlayHintBackground=e.editorInlayHintForeground=e.editorActiveLinkForeground=e.editorHoverStatusBarBackground=e.editorHoverBorder=e.editorHoverForeground=e.editorHoverBackground=e.editorHoverHighlight=e.searchResultsInfoForeground=e.searchEditorFindMatchBorder=e.searchEditorFindMatch=e.editorFindRangeHighlightBorder=e.editorFindMatchHighlightBorder=e.editorFindMatchBorder=e.editorFindRangeHighlight=e.editorFindMatchHighlight=e.editorFindMatch=e.editorSelectionHighlightBorder=e.editorSelectionHighlight=e.editorInactiveSelection=e.editorSelectionForeground=e.editorSelectionBackground=e.keybindingLabelBottomBorder=e.keybindingLabelBorder=e.keybindingLabelForeground=e.keybindingLabelBackground=e.pickerGroupBorder=e.pickerGroupForeground=e.quickInputTitleBackground=e.quickInputForeground=e.quickInputBackground=e.editorWidgetResizeBorder=e.editorWidgetBorder=e.editorWidgetForeground=e.editorWidgetBackground=e.editorStickyScrollHoverBackground=e.editorStickyScrollBackground=e.editorForeground=e.editorBackground=e.sashHoverBorder=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.buttonSecondaryHoverBackground=e.buttonSecondaryBackground=e.buttonSecondaryForeground=e.buttonBorder=e.buttonHoverBackground=e.buttonBackground=e.buttonSeparator=e.buttonForeground=e.selectBorder=e.selectForeground=e.selectListBackground=e.selectBackground=e.inputValidationErrorBorder=e.inputValidationErrorForeground=e.inputValidationErrorBackground=e.inputValidationWarningBorder=e.inputValidationWarningForeground=e.inputValidationWarningBackground=e.inputValidationInfoBorder=e.inputValidationInfoForeground=e.inputValidationInfoBackground=e.inputPlaceholderForeground=e.inputActiveOptionForeground=e.inputActiveOptionBackground=e.inputActiveOptionHoverBackground=e.inputActiveOptionBorder=e.inputBorder=e.inputForeground=e.inputBackground=e.widgetBorder=e.widgetShadow=e.textCodeBlockBackground=e.textBlockQuoteBorder=e.textBlockQuoteBackground=e.textPreformatForeground=e.textLinkActiveForeground=e.textLinkForeground=e.textSeparatorForeground=e.selectionBackground=e.activeContrastBorder=e.contrastBorder=e.focusBorder=e.iconForeground=e.descriptionForeground=e.errorForeground=e.disabledForeground=e.foreground=e.registerColor=e.Extensions=e.asCssVariableWithDefault=e.asCssVariable=e.asCssVariableName=void 0;function h(F){return`--vscode-${F.replace(/\\./g,"-")}`}e.asCssVariableName=h;function m(F){return`var(${h(F)})`}e.asCssVariable=m;function n(F,R){return`var(${h(F)}, ${R})`}e.asCssVariableWithDefault=n,e.Extensions={ColorContribution:"base.contributions.colors"};class t{constructor(){this._onDidChangeSchema=new y.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(R,M,N,A=!1,P){const x={id:R,description:N,defaults:M,needsTransparency:A,deprecationMessage:P};this.colorsById[R]=x;const W={type:"string",description:N,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return P&&(W.deprecationMessage=P),this.colorSchema.properties[R]=W,this.colorReferenceSchema.enum.push(R),this.colorReferenceSchema.enumDescriptions.push(N),this._onDidChangeSchema.fire(),R}getColors(){return Object.keys(this.colorsById).map(R=>this.colorsById[R])}resolveDefaultColor(R,M){const N=this.colorsById[R];if(N&&N.defaults){const A=N.defaults[M.type];return E(A,M)}}getColorSchema(){return this.colorSchema}toString(){const R=(M,N)=>{const A=M.indexOf(".")===-1?0:1,P=N.indexOf(".")===-1?0:1;return A!==P?A-P:M.localeCompare(N)};return Object.keys(this.colorsById).sort(R).map(M=>`- \\`${M}\\`: ${this.colorsById[M].description}`).join(`\n`)}}const i=new t;_.Registry.add(e.Extensions.ColorContribution,i);function s(F,R,M,N,A){return i.registerColor(F,R,M,N,A)}e.registerColor=s,e.foreground=s("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},w.localize(0,null)),e.disabledForeground=s("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},w.localize(1,null)),e.errorForeground=s("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},w.localize(2,null)),e.descriptionForeground=s("descriptionForeground",{light:"#717171",dark:f(e.foreground,.7),hcDark:f(e.foreground,.7),hcLight:f(e.foreground,.7)},w.localize(3,null)),e.iconForeground=s("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},w.localize(4,null)),e.focusBorder=s("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},w.localize(5,null)),e.contrastBorder=s("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},w.localize(6,null)),e.activeContrastBorder=s("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(7,null)),e.selectionBackground=s("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},w.localize(8,null)),e.textSeparatorForeground=s("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:k.Color.black,hcLight:"#292929"},w.localize(9,null)),e.textLinkForeground=s("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},w.localize(10,null)),e.textLinkActiveForeground=s("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},w.localize(11,null)),e.textPreformatForeground=s("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},w.localize(12,null)),e.textBlockQuoteBackground=s("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},w.localize(13,null)),e.textBlockQuoteBorder=s("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:k.Color.white,hcLight:"#292929"},w.localize(14,null)),e.textCodeBlockBackground=s("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:k.Color.black,hcLight:"#F2F2F2"},w.localize(15,null)),e.widgetShadow=s("widget.shadow",{dark:f(k.Color.black,.36),light:f(k.Color.black,.16),hcDark:null,hcLight:null},w.localize(16,null)),e.widgetBorder=s("widget.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(17,null)),e.inputBackground=s("input.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(18,null)),e.inputForeground=s("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(19,null)),e.inputBorder=s("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(20,null)),e.inputActiveOptionBorder=s("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(21,null)),e.inputActiveOptionHoverBackground=s("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},w.localize(22,null)),e.inputActiveOptionBackground=s("inputOption.activeBackground",{dark:f(e.focusBorder,.4),light:f(e.focusBorder,.2),hcDark:k.Color.transparent,hcLight:k.Color.transparent},w.localize(23,null)),e.inputActiveOptionForeground=s("inputOption.activeForeground",{dark:k.Color.white,light:k.Color.black,hcDark:e.foreground,hcLight:e.foreground},w.localize(24,null)),e.inputPlaceholderForeground=s("input.placeholderForeground",{light:f(e.foreground,.5),dark:f(e.foreground,.5),hcDark:f(e.foreground,.7),hcLight:f(e.foreground,.7)},w.localize(25,null)),e.inputValidationInfoBackground=s("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(26,null)),e.inputValidationInfoForeground=s("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(27,null)),e.inputValidationInfoBorder=s("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(28,null)),e.inputValidationWarningBackground=s("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(29,null)),e.inputValidationWarningForeground=s("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(30,null)),e.inputValidationWarningBorder=s("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(31,null)),e.inputValidationErrorBackground=s("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(32,null)),e.inputValidationErrorForeground=s("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(33,null)),e.inputValidationErrorBorder=s("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(34,null)),e.selectBackground=s("dropdown.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(35,null)),e.selectListBackground=s("dropdown.listBackground",{dark:null,light:null,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(36,null)),e.selectForeground=s("dropdown.foreground",{dark:"#F0F0F0",light:e.foreground,hcDark:k.Color.white,hcLight:e.foreground},w.localize(37,null)),e.selectBorder=s("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(38,null)),e.buttonForeground=s("button.foreground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:k.Color.white},w.localize(39,null)),e.buttonSeparator=s("button.separator",{dark:f(e.buttonForeground,.4),light:f(e.buttonForeground,.4),hcDark:f(e.buttonForeground,.4),hcLight:f(e.buttonForeground,.4)},w.localize(40,null)),e.buttonBackground=s("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},w.localize(41,null)),e.buttonHoverBackground=s("button.hoverBackground",{dark:C(e.buttonBackground,.2),light:u(e.buttonBackground,.2),hcDark:e.buttonBackground,hcLight:e.buttonBackground},w.localize(42,null)),e.buttonBorder=s("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(43,null)),e.buttonSecondaryForeground=s("button.secondaryForeground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:e.foreground},w.localize(44,null)),e.buttonSecondaryBackground=s("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:k.Color.white},w.localize(45,null)),e.buttonSecondaryHoverBackground=s("button.secondaryHoverBackground",{dark:C(e.buttonSecondaryBackground,.2),light:u(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},w.localize(46,null)),e.badgeBackground=s("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:k.Color.black,hcLight:"#0F4A85"},w.localize(47,null)),e.badgeForeground=s("badge.foreground",{dark:k.Color.white,light:"#333",hcDark:k.Color.white,hcLight:k.Color.white},w.localize(48,null)),e.scrollbarShadow=s("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},w.localize(49,null)),e.scrollbarSliderBackground=s("scrollbarSlider.background",{dark:k.Color.fromHex("#797979").transparent(.4),light:k.Color.fromHex("#646464").transparent(.4),hcDark:f(e.contrastBorder,.6),hcLight:f(e.contrastBorder,.4)},w.localize(50,null)),e.scrollbarSliderHoverBackground=s("scrollbarSlider.hoverBackground",{dark:k.Color.fromHex("#646464").transparent(.7),light:k.Color.fromHex("#646464").transparent(.7),hcDark:f(e.contrastBorder,.8),hcLight:f(e.contrastBorder,.8)},w.localize(51,null)),e.scrollbarSliderActiveBackground=s("scrollbarSlider.activeBackground",{dark:k.Color.fromHex("#BFBFBF").transparent(.4),light:k.Color.fromHex("#000000").transparent(.6),hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(52,null)),e.progressBarBackground=s("progressBar.background",{dark:k.Color.fromHex("#0E70C0"),light:k.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(53,null)),e.editorErrorBackground=s("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(54,null),!0),e.editorErrorForeground=s("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},w.localize(55,null)),e.editorErrorBorder=s("editorError.border",{dark:null,light:null,hcDark:k.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},w.localize(56,null)),e.editorWarningBackground=s("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(57,null),!0),e.editorWarningForeground=s("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},w.localize(58,null)),e.editorWarningBorder=s("editorWarning.border",{dark:null,light:null,hcDark:k.Color.fromHex("#FFCC00").transparent(.8),hcLight:k.Color.fromHex("#FFCC00").transparent(.8)},w.localize(59,null)),e.editorInfoBackground=s("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(60,null),!0),e.editorInfoForeground=s("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},w.localize(61,null)),e.editorInfoBorder=s("editorInfo.border",{dark:null,light:null,hcDark:k.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},w.localize(62,null)),e.editorHintForeground=s("editorHint.foreground",{dark:k.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},w.localize(63,null)),e.editorHintBorder=s("editorHint.border",{dark:null,light:null,hcDark:k.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},w.localize(64,null)),e.sashHoverBorder=s("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(65,null)),e.editorBackground=s("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(66,null)),e.editorForeground=s("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:k.Color.white,hcLight:e.foreground},w.localize(67,null)),e.editorStickyScrollBackground=s("editorStickyScroll.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},w.localize(68,null)),e.editorStickyScrollHoverBackground=s("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(69,null)),e.editorWidgetBackground=s("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:k.Color.white},w.localize(70,null)),e.editorWidgetForeground=s("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(71,null)),e.editorWidgetBorder=s("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(72,null)),e.editorWidgetResizeBorder=s("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},w.localize(73,null)),e.quickInputBackground=s("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(74,null)),e.quickInputForeground=s("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},w.localize(75,null)),e.quickInputTitleBackground=s("quickInputTitle.background",{dark:new k.Color(new k.RGBA(255,255,255,.105)),light:new k.Color(new k.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:k.Color.white},w.localize(76,null)),e.pickerGroupForeground=s("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:k.Color.white,hcLight:"#0F4A85"},w.localize(77,null)),e.pickerGroupBorder=s("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:k.Color.white,hcLight:"#0F4A85"},w.localize(78,null)),e.keybindingLabelBackground=s("keybindingLabel.background",{dark:new k.Color(new k.RGBA(128,128,128,.17)),light:new k.Color(new k.RGBA(221,221,221,.4)),hcDark:k.Color.transparent,hcLight:k.Color.transparent},w.localize(79,null)),e.keybindingLabelForeground=s("keybindingLabel.foreground",{dark:k.Color.fromHex("#CCCCCC"),light:k.Color.fromHex("#555555"),hcDark:k.Color.white,hcLight:e.foreground},w.localize(80,null)),e.keybindingLabelBorder=s("keybindingLabel.border",{dark:new k.Color(new k.RGBA(51,51,51,.6)),light:new k.Color(new k.RGBA(204,204,204,.4)),hcDark:new k.Color(new k.RGBA(111,195,223)),hcLight:e.contrastBorder},w.localize(81,null)),e.keybindingLabelBottomBorder=s("keybindingLabel.bottomBorder",{dark:new k.Color(new k.RGBA(68,68,68,.6)),light:new k.Color(new k.RGBA(187,187,187,.4)),hcDark:new k.Color(new k.RGBA(111,195,223)),hcLight:e.foreground},w.localize(82,null)),e.editorSelectionBackground=s("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},w.localize(83,null)),e.editorSelectionForeground=s("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:k.Color.white},w.localize(84,null)),e.editorInactiveSelection=s("editor.inactiveSelectionBackground",{light:f(e.editorSelectionBackground,.5),dark:f(e.editorSelectionBackground,.5),hcDark:f(e.editorSelectionBackground,.7),hcLight:f(e.editorSelectionBackground,.5)},w.localize(85,null),!0),e.editorSelectionHighlight=s("editor.selectionHighlightBackground",{light:L(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:L(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},w.localize(86,null),!0),e.editorSelectionHighlightBorder=s("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(87,null)),e.editorFindMatch=s("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},w.localize(88,null)),e.editorFindMatchHighlight=s("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},w.localize(89,null),!0),e.editorFindRangeHighlight=s("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},w.localize(90,null),!0),e.editorFindMatchBorder=s("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(91,null)),e.editorFindMatchHighlightBorder=s("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(92,null)),e.editorFindRangeHighlightBorder=s("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:f(e.activeContrastBorder,.4),hcLight:f(e.activeContrastBorder,.4)},w.localize(93,null),!0),e.searchEditorFindMatch=s("searchEditor.findMatchBackground",{light:f(e.editorFindMatchHighlight,.66),dark:f(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},w.localize(94,null)),e.searchEditorFindMatchBorder=s("searchEditor.findMatchBorder",{light:f(e.editorFindMatchHighlightBorder,.66),dark:f(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},w.localize(95,null)),e.searchResultsInfoForeground=s("search.resultsInfoForeground",{light:e.foreground,dark:f(e.foreground,.65),hcDark:e.foreground,hcLight:e.foreground},w.localize(96,null)),e.editorHoverHighlight=s("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},w.localize(97,null),!0),e.editorHoverBackground=s("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(98,null)),e.editorHoverForeground=s("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},w.localize(99,null)),e.editorHoverBorder=s("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},w.localize(100,null)),e.editorHoverStatusBarBackground=s("editorHoverWidget.statusBarBackground",{dark:C(e.editorHoverBackground,.2),light:u(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(101,null)),e.editorActiveLinkForeground=s("editorLink.activeForeground",{dark:"#4E94CE",light:k.Color.blue,hcDark:k.Color.cyan,hcLight:"#292929"},w.localize(102,null)),e.editorInlayHintForeground=s("editorInlayHint.foreground",{dark:e.badgeForeground,light:e.badgeForeground,hcDark:k.Color.black,hcLight:e.badgeForeground},w.localize(103,null)),e.editorInlayHintBackground=s("editorInlayHint.background",{dark:f(e.badgeBackground,.8),light:f(e.badgeBackground,.6),hcDark:"#f38518",hcLight:e.badgeBackground},w.localize(104,null)),e.editorInlayHintTypeForeground=s("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},w.localize(105,null)),e.editorInlayHintTypeBackground=s("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},w.localize(106,null)),e.editorInlayHintParameterForeground=s("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},w.localize(107,null)),e.editorInlayHintParameterBackground=s("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},w.localize(108,null)),e.editorLightBulbForeground=s("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},w.localize(109,null)),e.editorLightBulbAutoFixForeground=s("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w.localize(110,null)),e.defaultInsertColor=new k.Color(new k.RGBA(155,185,85,.2)),e.defaultRemoveColor=new k.Color(new k.RGBA(255,0,0,.2)),e.diffInserted=s("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},w.localize(111,null),!0),e.diffRemoved=s("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},w.localize(112,null),!0),e.diffInsertedLine=s("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},w.localize(113,null),!0),e.diffRemovedLine=s("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},w.localize(114,null),!0),e.diffInsertedLineGutter=s("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(115,null)),e.diffRemovedLineGutter=s("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(116,null)),e.diffOverviewRulerInserted=s("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(117,null)),e.diffOverviewRulerRemoved=s("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(118,null)),e.diffInsertedOutline=s("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},w.localize(119,null)),e.diffRemovedOutline=s("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},w.localize(120,null)),e.diffBorder=s("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(121,null)),e.diffDiagonalFill=s("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},w.localize(122,null)),e.listFocusBackground=s("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(123,null)),e.listFocusForeground=s("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(124,null)),e.listFocusOutline=s("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(125,null)),e.listFocusAndSelectionOutline=s("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(126,null)),e.listActiveSelectionBackground=s("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(127,null)),e.listActiveSelectionForeground=s("list.activeSelectionForeground",{dark:k.Color.white,light:k.Color.white,hcDark:null,hcLight:null},w.localize(128,null)),e.listActiveSelectionIconForeground=s("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(129,null)),e.listInactiveSelectionBackground=s("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(130,null)),e.listInactiveSelectionForeground=s("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(131,null)),e.listInactiveSelectionIconForeground=s("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(132,null)),e.listInactiveFocusBackground=s("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(133,null)),e.listInactiveFocusOutline=s("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(134,null)),e.listHoverBackground=s("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:k.Color.white.transparent(.1),hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(135,null)),e.listHoverForeground=s("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(136,null)),e.listDropBackground=s("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},w.localize(137,null)),e.listHighlightForeground=s("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(138,null)),e.listFocusHighlightForeground=s("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:p(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},w.localize(139,null)),e.listInvalidItemForeground=s("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},w.localize(140,null)),e.listErrorForeground=s("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},w.localize(141,null)),e.listWarningForeground=s("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},w.localize(142,null)),e.listFilterWidgetBackground=s("listFilterWidget.background",{light:u(e.editorWidgetBackground,0),dark:C(e.editorWidgetBackground,0),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(143,null)),e.listFilterWidgetOutline=s("listFilterWidget.outline",{dark:k.Color.transparent,light:k.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},w.localize(144,null)),e.listFilterWidgetNoMatchesOutline=s("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(145,null)),e.listFilterWidgetShadow=s("listFilterWidget.shadow",{dark:e.widgetShadow,light:e.widgetShadow,hcDark:e.widgetShadow,hcLight:e.widgetShadow},w.localize(146,null)),e.listFilterMatchHighlight=s("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},w.localize(147,null)),e.listFilterMatchHighlightBorder=s("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.activeContrastBorder},w.localize(148,null)),e.treeIndentGuidesStroke=s("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},w.localize(149,null)),e.treeInactiveIndentGuidesStroke=s("tree.inactiveIndentGuidesStroke",{dark:f(e.treeIndentGuidesStroke,.4),light:f(e.treeIndentGuidesStroke,.4),hcDark:f(e.treeIndentGuidesStroke,.4),hcLight:f(e.treeIndentGuidesStroke,.4)},w.localize(150,null)),e.tableColumnsBorder=s("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},w.localize(151,null)),e.tableOddRowsBackgroundColor=s("tree.tableOddRowsBackground",{dark:f(e.foreground,.04),light:f(e.foreground,.04),hcDark:null,hcLight:null},w.localize(152,null)),e.listDeemphasizedForeground=s("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},w.localize(153,null)),e.checkboxBackground=s("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},w.localize(154,null)),e.checkboxSelectBackground=s("checkbox.selectBackground",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(155,null)),e.checkboxForeground=s("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},w.localize(156,null)),e.checkboxBorder=s("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},w.localize(157,null)),e.checkboxSelectBorder=s("checkbox.selectBorder",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(158,null)),e._deprecatedQuickInputListFocusBackground=s("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,w.localize(159,null)),e.quickInputListFocusForeground=s("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},w.localize(160,null)),e.quickInputListFocusIconForeground=s("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},w.localize(161,null)),e.quickInputListFocusBackground=s("quickInputList.focusBackground",{dark:v(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:v(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},w.localize(162,null)),e.menuBorder=s("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(163,null)),e.menuForeground=s("menu.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},w.localize(164,null)),e.menuBackground=s("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},w.localize(165,null)),e.menuSelectionForeground=s("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},w.localize(166,null)),e.menuSelectionBackground=s("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},w.localize(167,null)),e.menuSelectionBorder=s("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(168,null)),e.menuSeparatorBackground=s("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(169,null)),e.toolbarHoverBackground=s("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},w.localize(170,null)),e.toolbarHoverOutline=s("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(171,null)),e.toolbarActiveBackground=s("toolbar.activeBackground",{dark:C(e.toolbarHoverBackground,.1),light:u(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},w.localize(172,null)),e.snippetTabstopHighlightBackground=s("editor.snippetTabstopHighlightBackground",{dark:new k.Color(new k.RGBA(124,124,124,.3)),light:new k.Color(new k.RGBA(10,50,100,.2)),hcDark:new k.Color(new k.RGBA(124,124,124,.3)),hcLight:new k.Color(new k.RGBA(10,50,100,.2))},w.localize(173,null)),e.snippetTabstopHighlightBorder=s("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(174,null)),e.snippetFinalTabstopHighlightBackground=s("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(175,null)),e.snippetFinalTabstopHighlightBorder=s("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new k.Color(new k.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},w.localize(176,null)),e.breadcrumbsForeground=s("breadcrumb.foreground",{light:f(e.foreground,.8),dark:f(e.foreground,.8),hcDark:f(e.foreground,.8),hcLight:f(e.foreground,.8)},w.localize(177,null)),e.breadcrumbsBackground=s("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},w.localize(178,null)),e.breadcrumbsFocusForeground=s("breadcrumb.focusForeground",{light:u(e.foreground,.2),dark:C(e.foreground,.1),hcDark:C(e.foreground,.1),hcLight:C(e.foreground,.1)},w.localize(179,null)),e.breadcrumbsActiveSelectionForeground=s("breadcrumb.activeSelectionForeground",{light:u(e.foreground,.2),dark:C(e.foreground,.1),hcDark:C(e.foreground,.1),hcLight:C(e.foreground,.1)},w.localize(180,null)),e.breadcrumbsPickerBackground=s("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(181,null));const r=.5,c=k.Color.fromHex("#40C8AE").transparent(r),g=k.Color.fromHex("#40A6FF").transparent(r),o=k.Color.fromHex("#606060").transparent(.4),l=.4,a=1;e.mergeCurrentHeaderBackground=s("merge.currentHeaderBackground",{dark:c,light:c,hcDark:null,hcLight:null},w.localize(182,null),!0),e.mergeCurrentContentBackground=s("merge.currentContentBackground",{dark:f(e.mergeCurrentHeaderBackground,l),light:f(e.mergeCurrentHeaderBackground,l),hcDark:f(e.mergeCurrentHeaderBackground,l),hcLight:f(e.mergeCurrentHeaderBackground,l)},w.localize(183,null),!0),e.mergeIncomingHeaderBackground=s("merge.incomingHeaderBackground",{dark:g,light:g,hcDark:null,hcLight:null},w.localize(184,null),!0),e.mergeIncomingContentBackground=s("merge.incomingContentBackground",{dark:f(e.mergeIncomingHeaderBackground,l),light:f(e.mergeIncomingHeaderBackground,l),hcDark:f(e.mergeIncomingHeaderBackground,l),hcLight:f(e.mergeIncomingHeaderBackground,l)},w.localize(185,null),!0),e.mergeCommonHeaderBackground=s("merge.commonHeaderBackground",{dark:o,light:o,hcDark:null,hcLight:null},w.localize(186,null),!0),e.mergeCommonContentBackground=s("merge.commonContentBackground",{dark:f(e.mergeCommonHeaderBackground,l),light:f(e.mergeCommonHeaderBackground,l),hcDark:f(e.mergeCommonHeaderBackground,l),hcLight:f(e.mergeCommonHeaderBackground,l)},w.localize(187,null),!0),e.mergeBorder=s("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},w.localize(188,null)),e.overviewRulerCurrentContentForeground=s("editorOverviewRuler.currentContentForeground",{dark:f(e.mergeCurrentHeaderBackground,a),light:f(e.mergeCurrentHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(189,null)),e.overviewRulerIncomingContentForeground=s("editorOverviewRuler.incomingContentForeground",{dark:f(e.mergeIncomingHeaderBackground,a),light:f(e.mergeIncomingHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(190,null)),e.overviewRulerCommonContentForeground=s("editorOverviewRuler.commonContentForeground",{dark:f(e.mergeCommonHeaderBackground,a),light:f(e.mergeCommonHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(191,null)),e.overviewRulerFindMatchForeground=s("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},w.localize(192,null),!0),e.overviewRulerSelectionHighlightForeground=s("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},w.localize(193,null),!0),e.minimapFindMatch=s("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},w.localize(194,null),!0),e.minimapSelectionOccurrenceHighlight=s("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},w.localize(195,null),!0),e.minimapSelection=s("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},w.localize(196,null),!0),e.minimapError=s("minimap.errorHighlight",{dark:new k.Color(new k.RGBA(255,18,18,.7)),light:new k.Color(new k.RGBA(255,18,18,.7)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:"#B5200D"},w.localize(197,null)),e.minimapWarning=s("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},w.localize(198,null)),e.minimapBackground=s("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(199,null)),e.minimapForegroundOpacity=s("minimap.foregroundOpacity",{dark:k.Color.fromHex("#000f"),light:k.Color.fromHex("#000f"),hcDark:k.Color.fromHex("#000f"),hcLight:k.Color.fromHex("#000f")},w.localize(200,null)),e.minimapSliderBackground=s("minimapSlider.background",{light:f(e.scrollbarSliderBackground,.5),dark:f(e.scrollbarSliderBackground,.5),hcDark:f(e.scrollbarSliderBackground,.5),hcLight:f(e.scrollbarSliderBackground,.5)},w.localize(201,null)),e.minimapSliderHoverBackground=s("minimapSlider.hoverBackground",{light:f(e.scrollbarSliderHoverBackground,.5),dark:f(e.scrollbarSliderHoverBackground,.5),hcDark:f(e.scrollbarSliderHoverBackground,.5),hcLight:f(e.scrollbarSliderHoverBackground,.5)},w.localize(202,null)),e.minimapSliderActiveBackground=s("minimapSlider.activeBackground",{light:f(e.scrollbarSliderActiveBackground,.5),dark:f(e.scrollbarSliderActiveBackground,.5),hcDark:f(e.scrollbarSliderActiveBackground,.5),hcLight:f(e.scrollbarSliderActiveBackground,.5)},w.localize(203,null)),e.problemsErrorIconForeground=s("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},w.localize(204,null)),e.problemsWarningIconForeground=s("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},w.localize(205,null)),e.problemsInfoIconForeground=s("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},w.localize(206,null)),e.chartsForeground=s("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(207,null)),e.chartsLines=s("charts.lines",{dark:f(e.foreground,.5),light:f(e.foreground,.5),hcDark:f(e.foreground,.5),hcLight:f(e.foreground,.5)},w.localize(208,null)),e.chartsRed=s("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},w.localize(209,null)),e.chartsBlue=s("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},w.localize(210,null)),e.chartsYellow=s("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},w.localize(211,null)),e.chartsOrange=s("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},w.localize(212,null)),e.chartsGreen=s("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},w.localize(213,null)),e.chartsPurple=s("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w.localize(214,null));function d(F,R){var M,N,A,P;switch(F.op){case 0:return(M=E(F.value,R))===null||M===void 0?void 0:M.darken(F.factor);case 1:return(N=E(F.value,R))===null||N===void 0?void 0:N.lighten(F.factor);case 2:return(A=E(F.value,R))===null||A===void 0?void 0:A.transparent(F.factor);case 3:{const x=E(F.background,R);return x?(P=E(F.value,R))===null||P===void 0?void 0:P.makeOpaque(x):E(F.value,R)}case 4:for(const x of F.values){const W=E(x,R);if(W)return W}return;case 6:return E(R.defines(F.if)?F.then:F.else,R);case 5:{const x=E(F.value,R);if(!x)return;const W=E(F.background,R);return W?x.isDarkerThan(W)?k.Color.getLighterColor(x,W,F.factor).transparent(F.transparency):k.Color.getDarkerColor(x,W,F.factor).transparent(F.transparency):x.transparent(F.factor*F.transparency)}default:throw(0,D.assertNever)(F)}}e.executeTransform=d;function u(F,R){return{op:0,value:F,factor:R}}e.darken=u;function C(F,R){return{op:1,value:F,factor:R}}e.lighten=C;function f(F,R){return{op:2,value:F,factor:R}}e.transparent=f;function v(...F){return{op:4,values:F}}e.oneOf=v;function p(F,R,M){return{op:6,if:F,then:R,else:M}}e.ifDefinedThenElse=p;function L(F,R,M,N){return{op:5,value:F,background:R,factor:M,transparency:N}}function E(F,R){if(F!==null){if(typeof F=="string")return F[0]==="#"?k.Color.fromHex(F):R.getColor(F);if(F instanceof k.Color)return F;if(typeof F=="object")return d(F,R)}}e.resolveColorValue=E,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";const I=_.Registry.as(b.Extensions.JSONContribution);I.registerSchema(e.workbenchColorsSchemaId,i.getColorSchema());const T=new S.RunOnceScheduler(()=>I.notifySchemaChanged(e.workbenchColorsSchemaId),200);i.onDidChangeSchema(()=>{T.isScheduled()||T.schedule()})}),define(J[151],ee([1,0,7,139,66,12,2,31]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicCssRules=e.GlobalEditorPointerMoveMonitor=e.EditorPointerEventFactory=e.EditorMouseEventFactory=e.EditorMouseEvent=e.createCoordinatesRelativeToEditor=e.createEditorPagePosition=e.CoordinatesRelativeToEditor=e.EditorPagePosition=e.ClientCoordinates=e.PageCoordinates=void 0;class _{constructor(u,C){this.x=u,this.y=C,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new h(this.x-window.scrollX,this.y-window.scrollY)}}e.PageCoordinates=_;class h{constructor(u,C){this.clientX=u,this.clientY=C,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new _(this.clientX+window.scrollX,this.clientY+window.scrollY)}}e.ClientCoordinates=h;class m{constructor(u,C,f,v){this.x=u,this.y=C,this.width=f,this.height=v,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=m;class n{constructor(u,C){this.x=u,this.y=C,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=n;function t(d){const u=S.getDomNodePagePosition(d);return new m(u.left,u.top,u.width,u.height)}e.createEditorPagePosition=t;function i(d,u,C){const f=u.width/d.offsetWidth,v=u.height/d.offsetHeight,p=(C.x-u.x)/f,L=(C.y-u.y)/v;return new n(p,L)}e.createCoordinatesRelativeToEditor=i;class s extends y.StandardMouseEvent{constructor(u,C,f){super(u),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=C,this.pos=new _(this.posx,this.posy),this.editorPos=t(f),this.relativePos=i(f,this.editorPos,this.pos)}}e.EditorMouseEvent=s;class r{constructor(u){this._editorViewDomNode=u}_create(u){return new s(u,!1,this._editorViewDomNode)}onContextMenu(u,C){return S.addDisposableListener(u,"contextmenu",f=>{C(this._create(f))})}onMouseUp(u,C){return S.addDisposableListener(u,"mouseup",f=>{C(this._create(f))})}onMouseDown(u,C){return S.addDisposableListener(u,S.EventType.MOUSE_DOWN,f=>{C(this._create(f))})}onPointerDown(u,C){return S.addDisposableListener(u,S.EventType.POINTER_DOWN,f=>{C(this._create(f),f.pointerId)})}onMouseLeave(u,C){return S.addDisposableListener(u,S.EventType.MOUSE_LEAVE,f=>{C(this._create(f))})}onMouseMove(u,C){return S.addDisposableListener(u,"mousemove",f=>C(this._create(f)))}}e.EditorMouseEventFactory=r;class c{constructor(u){this._editorViewDomNode=u}_create(u){return new s(u,!1,this._editorViewDomNode)}onPointerUp(u,C){return S.addDisposableListener(u,"pointerup",f=>{C(this._create(f))})}onPointerDown(u,C){return S.addDisposableListener(u,S.EventType.POINTER_DOWN,f=>{C(this._create(f),f.pointerId)})}onPointerLeave(u,C){return S.addDisposableListener(u,S.EventType.POINTER_LEAVE,f=>{C(this._create(f))})}onPointerMove(u,C){return S.addDisposableListener(u,"pointermove",f=>C(this._create(f)))}}e.EditorPointerEventFactory=c;class g extends w.Disposable{constructor(u){super(),this._editorViewDomNode=u,this._globalPointerMoveMonitor=this._register(new k.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(u,C,f,v,p){this._keydownListener=S.addStandardDisposableListener(document,"keydown",L=>{L.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,L.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(u,C,f,L=>{v(new s(L,!0,this._editorViewDomNode))},L=>{this._keydownListener.dispose(),p(L)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorPointerMoveMonitor=g;class o{constructor(u){this._editor=u,this._instanceId=++o._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new D.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(u){const C=this.getOrCreateRule(u);return C.increaseRefCount(),{className:C.className,dispose:()=>{C.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(u){const C=this.computeUniqueKey(u);let f=this._rules.get(C);if(!f){const v=this._counter++;f=new l(C,`dyn-rule-${this._instanceId}-${v}`,S.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,u),this._rules.set(C,f)}return f}computeUniqueKey(u){return JSON.stringify(u)}garbageCollect(){for(const u of this._rules.values())u.hasReferences()||(this._rules.delete(u.key),u.dispose())}}o._idPool=0,e.DynamicCssRules=o;class l{constructor(u,C,f,v){this.key=u,this.className=C,this.properties=v,this._referenceCount=0,this._styleElement=S.createStyleSheet(f),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(u,C){let f=`.${u} {`;for(const v in C){const p=C[v];let L;typeof p=="object"?L=(0,b.asCssVariable)(p.id):L=p;const E=a(v);f+=`\n\t${E}: ${L};`}return f+=`\n}`,f}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function a(d){return d.replace(/(^[A-Z])/,([u])=>u.toLowerCase()).replace(/([A-Z])/g,([u])=>`-${u.toLowerCase()}`)}}),define(J[772],ee([1,0,7,35,139,2,17,9,217,52,40,5,253,298,81,31,23,56,448,48,92,393]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const d=140,u=2;class C{constructor(M,N,A){const P=M.options,x=P.get(137),W=P.get(139),U=W.minimap,O=P.get(48),$=P.get(70);this.renderMinimap=U.renderMinimap,this.size=$.size,this.minimapHeightIsEditorHeight=U.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=P.get(100),this.paddingTop=P.get(81).top,this.paddingBottom=P.get(81).bottom,this.showSlider=$.showSlider,this.autohide=$.autohide,this.pixelRatio=x,this.typicalHalfwidthCharacterWidth=O.typicalHalfwidthCharacterWidth,this.lineHeight=P.get(64),this.minimapLeft=U.minimapLeft,this.minimapWidth=U.minimapWidth,this.minimapHeight=W.height,this.canvasInnerWidth=U.minimapCanvasInnerWidth,this.canvasInnerHeight=U.minimapCanvasInnerHeight,this.canvasOuterWidth=U.minimapCanvasOuterWidth,this.canvasOuterHeight=U.minimapCanvasOuterHeight,this.isSampling=U.minimapIsSampling,this.editorHeight=W.height,this.fontScale=U.minimapScale,this.minimapLineHeight=U.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,a.once)(()=>o.MinimapCharRendererFactory.create(this.fontScale,O.fontFamily)),this.defaultBackgroundColor=A.getColor(2),this.backgroundColor=C._getMinimapBackground(N,this.defaultBackgroundColor),this.foregroundAlpha=C._getMinimapForegroundOpacity(N)}static _getMinimapBackground(M,N){const A=M.getColor(r.minimapBackground);return A?new t.RGBA8(A.rgba.r,A.rgba.g,A.rgba.b,Math.round(255*A.rgba.a)):N}static _getMinimapForegroundOpacity(M){const N=M.getColor(r.minimapForegroundOpacity);return N?t.RGBA8._clamp(Math.round(255*N.rgba.a)):255}equals(M){return this.renderMinimap===M.renderMinimap&&this.size===M.size&&this.minimapHeightIsEditorHeight===M.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===M.scrollBeyondLastLine&&this.paddingTop===M.paddingTop&&this.paddingBottom===M.paddingBottom&&this.showSlider===M.showSlider&&this.autohide===M.autohide&&this.pixelRatio===M.pixelRatio&&this.typicalHalfwidthCharacterWidth===M.typicalHalfwidthCharacterWidth&&this.lineHeight===M.lineHeight&&this.minimapLeft===M.minimapLeft&&this.minimapWidth===M.minimapWidth&&this.minimapHeight===M.minimapHeight&&this.canvasInnerWidth===M.canvasInnerWidth&&this.canvasInnerHeight===M.canvasInnerHeight&&this.canvasOuterWidth===M.canvasOuterWidth&&this.canvasOuterHeight===M.canvasOuterHeight&&this.isSampling===M.isSampling&&this.editorHeight===M.editorHeight&&this.fontScale===M.fontScale&&this.minimapLineHeight===M.minimapLineHeight&&this.minimapCharWidth===M.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(M.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(M.backgroundColor)&&this.foregroundAlpha===M.foregroundAlpha}}class f{constructor(M,N,A,P,x,W,U,O,$){this.scrollTop=M,this.scrollHeight=N,this.sliderNeeded=A,this._computedSliderRatio=P,this.sliderTop=x,this.sliderHeight=W,this.topPaddingLineCount=U,this.startLineNumber=O,this.endLineNumber=$}getDesiredScrollTopFromDelta(M){return Math.round(this.scrollTop+M/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(M){return Math.round((M-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(M){const N=Math.max(this.startLineNumber,M.startLineNumber),A=Math.min(this.endLineNumber,M.endLineNumber);return N>A?null:[N,A]}getYForLineNumber(M,N){return+(M-this.startLineNumber+this.topPaddingLineCount)*N}static create(M,N,A,P,x,W,U,O,$,Q,se){const le=M.pixelRatio,te=M.minimapLineHeight,re=Math.floor(M.canvasInnerHeight/te),H=M.lineHeight;if(M.minimapHeightIsEditorHeight){let he=O*M.lineHeight+M.paddingTop+M.paddingBottom;M.scrollBeyondLastLine&&(he+=Math.max(0,x-M.lineHeight-M.paddingBottom));const oe=Math.max(1,Math.floor(x*x/he)),ce=Math.max(0,M.minimapHeight-oe),z=ce/(Q-x),V=$*z,K=ce>0,ie=Math.floor(M.canvasInnerHeight/M.minimapLineHeight),X=Math.floor(M.paddingTop/M.lineHeight);return new f($,Q,K,z,V,oe,X,1,Math.min(U,ie))}let B;if(W&&A!==U){const he=A-N+1;B=Math.floor(he*te/le)}else{const he=x/H;B=Math.floor(he*te/le)}const j=Math.floor(M.paddingTop/H);let G=Math.floor(M.paddingBottom/H);if(M.scrollBeyondLastLine){const he=x/H;G=Math.max(G,he-1)}let Y;if(G>0){const he=x/H;Y=(j+U+G-he-1)*te/le}else Y=Math.max(0,(j+U)*te/le-B);Y=Math.min(M.minimapHeight-B,Y);const ne=Y/(Q-x),de=$*ne;if(re>=j+U+G){const he=Y>0;return new f($,Q,he,ne,de,B,j,1,U)}else{let he;N>1?he=N+j:he=Math.max(1,$/H);let oe,ce=Math.max(1,Math.floor(he-de*le/te));ce<j?(oe=j-ce+1,ce=1):(oe=0,ce=Math.max(1,ce-j)),se&&se.scrollHeight===Q&&(se.scrollTop>$&&(ce=Math.min(ce,se.startLineNumber),oe=Math.max(oe,se.topPaddingLineCount)),se.scrollTop<$&&(ce=Math.max(ce,se.startLineNumber),oe=Math.min(oe,se.topPaddingLineCount)));const z=Math.min(U,ce-oe+re-1),V=($-P)/H;let K;return $>M.paddingTop?K=(N-ce+oe+V)*te/le:K=$/M.paddingTop*(oe+V)*te/le,new f($,Q,!0,ne,K,B,oe,ce,z)}}}class v{constructor(M){this.dy=M}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}v.INVALID=new v(-1);class p{constructor(M,N,A){this.renderedLayout=M,this._imageData=N,this._renderedLines=new _.RenderedLinesCollection(()=>v.INVALID),this._renderedLines._set(M.startLineNumber,A)}linesEquals(M){if(!this.scrollEquals(M))return!1;const A=this._renderedLines._get().lines;for(let P=0,x=A.length;P<x;P++)if(A[P].dy===-1)return!1;return!0}scrollEquals(M){return this.renderedLayout.startLineNumber===M.startLineNumber&&this.renderedLayout.endLineNumber===M.endLineNumber}_get(){const M=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:M.rendLineNumberStart,lines:M.lines}}onLinesChanged(M,N){return this._renderedLines.onLinesChanged(M,N)}onLinesDeleted(M,N){this._renderedLines.onLinesDeleted(M,N)}onLinesInserted(M,N){this._renderedLines.onLinesInserted(M,N)}onTokensChanged(M){return this._renderedLines.onTokensChanged(M)}}class L{constructor(M,N,A,P){this._backgroundFillData=L._createBackgroundFillData(N,A,P),this._buffers=[M.createImageData(N,A),M.createImageData(N,A)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const M=this._buffers[this._lastUsedBuffer];return M.data.set(this._backgroundFillData),M}static _createBackgroundFillData(M,N,A){const P=A.r,x=A.g,W=A.b,U=A.a,O=new Uint8ClampedArray(M*N*4);let $=0;for(let Q=0;Q<N;Q++)for(let se=0;se<M;se++)O[$]=P,O[$+1]=x,O[$+2]=W,O[$+3]=U,$+=4;return O}}class E{static compute(M,N,A){if(M.renderMinimap===0||!M.isSampling)return[null,[]];const{minimapLineCount:P}=m.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:N,scrollBeyondLastLine:M.scrollBeyondLastLine,paddingTop:M.paddingTop,paddingBottom:M.paddingBottom,height:M.editorHeight,lineHeight:M.lineHeight,pixelRatio:M.pixelRatio}),x=N/P,W=x/2;if(!A||A.minimapLines.length===0){const B=[];if(B[0]=1,P>1){for(let j=0,G=P-1;j<G;j++)B[j]=Math.round(j*x+W);B[P-1]=N}return[new E(x,B),[]]}const U=A.minimapLines,O=U.length,$=[];let Q=0,se=0,le=1;const te=10;let re=[],H=null;for(let B=0;B<P;B++){const j=Math.max(le,Math.round(B*x)),G=Math.max(j,Math.round((B+1)*x));for(;Q<O&&U[Q]<j;){if(re.length<te){const ne=Q+1+se;H&&H.type==="deleted"&&H._oldIndex===Q-1?H.deleteToLineNumber++:(H={type:"deleted",_oldIndex:Q,deleteFromLineNumber:ne,deleteToLineNumber:ne},re.push(H)),se--}Q++}let Y;if(Q<O&&U[Q]<=G)Y=U[Q],Q++;else if(B===0?Y=1:B+1===P?Y=N:Y=Math.round(B*x+W),re.length<te){const ne=Q+1+se;H&&H.type==="inserted"&&H._i===B-1?H.insertToLineNumber++:(H={type:"inserted",_i:B,insertFromLineNumber:ne,insertToLineNumber:ne},re.push(H)),se++}$[B]=Y,le=Y}if(re.length<te)for(;Q<O;){const B=Q+1+se;H&&H.type==="deleted"&&H._oldIndex===Q-1?H.deleteToLineNumber++:(H={type:"deleted",_oldIndex:Q,deleteFromLineNumber:B,deleteToLineNumber:B},re.push(H)),se--,Q++}else re=[{type:"flush"}];return[new E(x,$),re]}constructor(M,N){this.samplingRatio=M,this.minimapLines=N}modelLineToMinimapLine(M){return Math.min(this.minimapLines.length,Math.max(1,Math.round(M/this.samplingRatio)))}modelLineRangeToMinimapLineRange(M,N){let A=this.modelLineToMinimapLine(M)-1;for(;A>0&&this.minimapLines[A-1]>=M;)A--;let P=this.modelLineToMinimapLine(N)-1;for(;P+1<this.minimapLines.length&&this.minimapLines[P+1]<=N;)P++;if(A===P){const x=this.minimapLines[A];if(x<M||x>N)return null}return[A+1,P+1]}decorationLineRangeToMinimapLineRange(M,N){let A=this.modelLineToMinimapLine(M),P=this.modelLineToMinimapLine(N);return M!==N&&P===A&&(P===this.minimapLines.length?A>1&&A--:P++),[A,P]}onLinesDeleted(M){const N=M.toLineNumber-M.fromLineNumber+1;let A=this.minimapLines.length,P=0;for(let x=this.minimapLines.length-1;x>=0&&!(this.minimapLines[x]<M.fromLineNumber);x--)this.minimapLines[x]<=M.toLineNumber?(this.minimapLines[x]=Math.max(1,M.fromLineNumber-1),A=Math.min(A,x),P=Math.max(P,x)):this.minimapLines[x]-=N;return[A,P]}onLinesInserted(M){const N=M.toLineNumber-M.fromLineNumber+1;for(let A=this.minimapLines.length-1;A>=0&&!(this.minimapLines[A]<M.fromLineNumber);A--)this.minimapLines[A]+=N}}class I extends h.ViewPart{constructor(M){super(M),this.tokensColorTracker=i.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new C(this._context.configuration,this._context.theme,this.tokensColorTracker);const[N]=E.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=N,this._shouldCheckSampling=!1,this._actual=new T(M.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const M=new C(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(M)?!1:(this.options=M,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(M){return this._onOptionsMaybeChanged()}onCursorStateChanged(M){return this._selections=M.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(M){return M.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(M){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(M){if(this._samplingState){const N=this._samplingState.modelLineRangeToMinimapLineRange(M.fromLineNumber,M.fromLineNumber+M.count-1);return N?this._actual.onLinesChanged(N[0],N[1]-N[0]+1):!1}else return this._actual.onLinesChanged(M.fromLineNumber,M.count)}onLinesDeleted(M){if(this._samplingState){const[N,A]=this._samplingState.onLinesDeleted(M);return N<=A&&this._actual.onLinesChanged(N+1,A-N+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(M.fromLineNumber,M.toLineNumber)}onLinesInserted(M){return this._samplingState?(this._samplingState.onLinesInserted(M),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(M.fromLineNumber,M.toLineNumber)}onScrollChanged(M){return this._actual.onScrollChanged()}onThemeChanged(M){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(M){if(this._samplingState){const N=[];for(const A of M.ranges){const P=this._samplingState.modelLineRangeToMinimapLineRange(A.fromLineNumber,A.toLineNumber);P&&N.push({fromLineNumber:P[0],toLineNumber:P[1]})}return N.length?this._actual.onTokensChanged(N):!1}else return this._actual.onTokensChanged(M.ranges)}onTokensColorsChanged(M){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(M){return this._actual.onZonesChanged()}prepareRender(M){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(M){let N=M.visibleRange.startLineNumber,A=M.visibleRange.endLineNumber;this._samplingState&&(N=this._samplingState.modelLineToMinimapLine(N),A=this._samplingState.modelLineToMinimapLine(A));const P={viewportContainsWhitespaceGaps:M.viewportData.whitespaceViewportData.length>0,scrollWidth:M.scrollWidth,scrollHeight:M.scrollHeight,viewportStartLineNumber:N,viewportEndLineNumber:A,viewportStartLineNumberVerticalOffset:M.getVerticalOffsetForLineNumber(N),scrollTop:M.scrollTop,scrollLeft:M.scrollLeft,viewportWidth:M.viewportWidth,viewportHeight:M.viewportHeight};this._actual.render(P)}_recreateLineSampling(){this._minimapSelections=null;const M=!!this._samplingState,[N,A]=E.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=N,M&&this._samplingState)for(const P of A)switch(P.type){case"deleted":this._actual.onLinesDeleted(P.deleteFromLineNumber,P.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(P.insertFromLineNumber,P.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(M){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[M-1]):this._context.viewModel.getLineContent(M)}getLineMaxColumn(M){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[M-1]):this._context.viewModel.getLineMaxColumn(M)}getMinimapLinesRenderingData(M,N,A){if(this._samplingState){const P=[];for(let x=0,W=N-M+1;x<W;x++)A[x]?P[x]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[M+x-1]):P[x]=null;return P}return this._context.viewModel.getMinimapLinesRenderingData(M,N,A).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const M of this._selections){const[N,A]=this._samplingState.decorationLineRangeToMinimapLineRange(M.startLineNumber,M.endLineNumber);this._minimapSelections.push(new c.Selection(N,M.startColumn,A,M.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(M,N){let A;if(this._samplingState){const x=this._samplingState.minimapLines[M-1],W=this._samplingState.minimapLines[N-1];A=new n.Range(x,1,W,this._context.viewModel.getLineMaxColumn(W))}else A=new n.Range(M,1,N,this._context.viewModel.getLineMaxColumn(N));const P=this._context.viewModel.getDecorationsInViewport(A,!0);if(this._samplingState){const x=[];for(const W of P){if(!W.options.minimap)continue;const U=W.range,O=this._samplingState.modelLineToMinimapLine(U.startLineNumber),$=this._samplingState.modelLineToMinimapLine(U.endLineNumber);x.push(new s.ViewModelDecoration(new n.Range(O,U.startColumn,$,U.endColumn),W.options))}return x}return P}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(M){this._samplingState&&(M=this._samplingState.minimapLines[M-1]),this._context.viewModel.revealRange("mouse",!1,new n.Range(M,1,M,1),1,0)}setScrollTop(M){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:M},1)}}e.Minimap=I;class T extends D.Disposable{constructor(M,N){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=M,this._model=N,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(r.minimapSelection),this._domNode=(0,k.createFastDomNode)(document.createElement("div")),h.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=(0,k.createFastDomNode)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,k.createFastDomNode)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,k.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=(0,k.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=(0,k.createFastDomNode)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=S.addStandardDisposableListener(this._domNode.domNode,S.EventType.POINTER_DOWN,A=>{if(A.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(A.button===0&&this._lastRenderData){const $=S.getDomNodePagePosition(this._slider.domNode),Q=$.top+$.height/2;this._startSliderDragging(A,Q,this._lastRenderData.renderedLayout)}return}const x=this._model.options.minimapLineHeight,W=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*A.offsetY;let O=Math.floor(W/x)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;O=Math.min(O,this._model.getLineCount()),this._model.revealLineNumber(O)}),this._sliderPointerMoveMonitor=new y.GlobalPointerMoveMonitor,this._sliderPointerDownListener=S.addStandardDisposableListener(this._slider.domNode,S.EventType.POINTER_DOWN,A=>{A.preventDefault(),A.stopPropagation(),A.button===0&&this._lastRenderData&&this._startSliderDragging(A,A.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=g.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=S.addDisposableListener(this._domNode.domNode,g.EventType.Start,A=>{A.preventDefault(),A.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(A))},{passive:!1}),this._sliderTouchMoveListener=S.addDisposableListener(this._domNode.domNode,g.EventType.Change,A=>{A.preventDefault(),A.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(A)},{passive:!1}),this._sliderTouchEndListener=S.addStandardDisposableListener(this._domNode.domNode,g.EventType.End,A=>{A.preventDefault(),A.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(M,N,A){if(!M.target||!(M.target instanceof Element))return;const P=M.pageX;this._slider.toggleClassName("active",!0);const x=(W,U)=>{const O=S.getDomNodePagePosition(this._domNode.domNode),$=Math.min(Math.abs(U-P),Math.abs(U-O.left),Math.abs(U-O.left-O.width));if(w.isWindows&&$>d){this._model.setScrollTop(A.scrollTop);return}const Q=W-N;this._model.setScrollTop(A.getDesiredScrollTopFromDelta(Q))};M.pageY!==N&&x(M.pageY,P),this._sliderPointerMoveMonitor.startMonitoring(M.target,M.pointerId,M.buttons,W=>x(W.pageY,W.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(M){const N=this._domNode.domNode.getBoundingClientRect().top,A=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(M.pageY-N);this._model.setScrollTop(A)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const M=["minimap"];return this._model.options.showSlider==="always"?M.push("slider-always"):M.push("slider-mouseover"),this._model.options.autohide&&M.push("autohide"),M.join(" ")}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 L(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(M,N){return this._lastRenderData?this._lastRenderData.onLinesChanged(M,N):!1}onLinesDeleted(M,N){var A;return(A=this._lastRenderData)===null||A===void 0||A.onLinesDeleted(M,N),!0}onLinesInserted(M,N){var A;return(A=this._lastRenderData)===null||A===void 0||A.onLinesInserted(M,N),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(r.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(M){return this._lastRenderData?this._lastRenderData.onTokensChanged(M):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(M){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}M.scrollLeft+M.viewportWidth>=M.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const A=f.create(this._model.options,M.viewportStartLineNumber,M.viewportEndLineNumber,M.viewportStartLineNumberVerticalOffset,M.viewportHeight,M.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),M.scrollTop,M.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(A.sliderNeeded?"block":"none"),this._slider.setTop(A.sliderTop),this._slider.setHeight(A.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(A.sliderHeight),this.renderDecorations(A),this._lastRenderData=this.renderLines(A)}renderDecorations(M){if(this._renderDecorations){this._renderDecorations=!1;const N=this._model.getSelections();N.sort(n.Range.compareRangesUsingStarts);const A=this._model.getMinimapDecorationsInViewport(M.startLineNumber,M.endLineNumber);A.sort((le,te)=>(le.options.zIndex||0)-(te.options.zIndex||0));const{canvasInnerWidth:P,canvasInnerHeight:x}=this._model.options,W=this._model.options.minimapLineHeight,U=this._model.options.minimapCharWidth,O=this._model.getOptions().tabSize,$=this._decorationsCanvas.domNode.getContext("2d");$.clearRect(0,0,P,x);const Q=new F(M.startLineNumber,M.endLineNumber,!1);this._renderSelectionLineHighlights($,N,Q,M,W),this._renderDecorationsLineHighlights($,A,Q,M,W);const se=new F(M.startLineNumber,M.endLineNumber,null);this._renderSelectionsHighlights($,N,se,M,W,O,U,P),this._renderDecorationsHighlights($,A,se,M,W,O,U,P)}}_renderSelectionLineHighlights(M,N,A,P,x){if(!this._selectionColor||this._selectionColor.isTransparent())return;M.fillStyle=this._selectionColor.transparent(.5).toString();let W=0,U=0;for(const O of N){const $=P.intersectWithViewport(O);if(!$)continue;const[Q,se]=$;for(let re=Q;re<=se;re++)A.set(re,!0);const le=P.getYForLineNumber(Q,x),te=P.getYForLineNumber(se,x);U>=le||(U>W&&M.fillRect(m.MINIMAP_GUTTER_WIDTH,W,M.canvas.width,U-W),W=le),U=te}U>W&&M.fillRect(m.MINIMAP_GUTTER_WIDTH,W,M.canvas.width,U-W)}_renderDecorationsLineHighlights(M,N,A,P,x){const W=new Map;for(let U=N.length-1;U>=0;U--){const O=N[U],$=O.options.minimap;if(!$||$.position!==l.MinimapPosition.Inline)continue;const Q=P.intersectWithViewport(O.range);if(!Q)continue;const[se,le]=Q,te=$.getColor(this._theme.value);if(!te||te.isTransparent())continue;let re=W.get(te.toString());re||(re=te.transparent(.5).toString(),W.set(te.toString(),re)),M.fillStyle=re;for(let H=se;H<=le;H++){if(A.has(H))continue;A.set(H,!0);const B=P.getYForLineNumber(se,x);M.fillRect(m.MINIMAP_GUTTER_WIDTH,B,M.canvas.width,x)}}}_renderSelectionsHighlights(M,N,A,P,x,W,U,O){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const $ of N){const Q=P.intersectWithViewport($);if(!Q)continue;const[se,le]=Q;for(let te=se;te<=le;te++)this.renderDecorationOnLine(M,A,$,this._selectionColor,P,te,x,x,W,U,O)}}_renderDecorationsHighlights(M,N,A,P,x,W,U,O){for(const $ of N){const Q=$.options.minimap;if(!Q)continue;const se=P.intersectWithViewport($.range);if(!se)continue;const[le,te]=se,re=Q.getColor(this._theme.value);if(!(!re||re.isTransparent()))for(let H=le;H<=te;H++)switch(Q.position){case l.MinimapPosition.Inline:this.renderDecorationOnLine(M,A,$.range,re,P,H,x,x,W,U,O);continue;case l.MinimapPosition.Gutter:{const B=P.getYForLineNumber(H,x),j=2;this.renderDecoration(M,re,j,B,u,x);continue}}}}renderDecorationOnLine(M,N,A,P,x,W,U,O,$,Q,se){const le=x.getYForLineNumber(W,O);if(le+U<0||le>this._model.options.canvasInnerHeight)return;const{startLineNumber:te,endLineNumber:re}=A,H=te===W?A.startColumn:1,B=re===W?A.endColumn:this._model.getLineMaxColumn(W),j=this.getXOffsetForPosition(N,W,H,$,Q,se),G=this.getXOffsetForPosition(N,W,B,$,Q,se);this.renderDecoration(M,P,j,le,G-j,U)}getXOffsetForPosition(M,N,A,P,x,W){if(A===1)return m.MINIMAP_GUTTER_WIDTH;if((A-1)*x>=W)return W;let O=M.get(N);if(!O){const $=this._model.getLineContent(N);O=[m.MINIMAP_GUTTER_WIDTH];let Q=m.MINIMAP_GUTTER_WIDTH;for(let se=1;se<$.length+1;se++){const le=$.charCodeAt(se-1),te=le===9?P*x:b.isFullWidthCharacter(le)?2*x:x,re=Q+te;if(re>=W){O[se]=W;break}O[se]=re,Q=re}M.set(N,O)}return A-1<O.length?O[A-1]:W}renderDecoration(M,N,A,P,x,W){M.fillStyle=N&&N.toString()||"",M.fillRect(A,P,x,W)}renderLines(M){const N=M.startLineNumber,A=M.endLineNumber,P=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(M)){const ue=this._lastRenderData._get();return new p(M,ue.imageData,ue.lines)}const x=this._getBuffer();if(!x)return null;const[W,U,O]=T._renderUntouchedLines(x,M.topPaddingLineCount,N,A,P,this._lastRenderData),$=this._model.getMinimapLinesRenderingData(N,A,O),Q=this._model.getOptions().tabSize,se=this._model.options.defaultBackgroundColor,le=this._model.options.backgroundColor,te=this._model.options.foregroundAlpha,re=this._model.tokensColorTracker,H=re.backgroundIsLight(),B=this._model.options.renderMinimap,j=this._model.options.charRenderer(),G=this._model.options.fontScale,Y=this._model.options.minimapCharWidth,de=(B===1?2:2+1)*G,he=P>de?Math.floor((P-de)/2):0,oe=le.a/255,ce=new t.RGBA8(Math.round((le.r-se.r)*oe+se.r),Math.round((le.g-se.g)*oe+se.g),Math.round((le.b-se.b)*oe+se.b),255);let z=M.topPaddingLineCount*P;const V=[];for(let ue=0,me=A-N+1;ue<me;ue++)O[ue]&&T._renderLine(x,ce,le.a,H,B,Y,re,te,j,z,he,Q,$[ue],G,P),V[ue]=new v(z),z+=P;const K=W===-1?0:W,X=(U===-1?x.height:U)-K;return this._canvas.domNode.getContext("2d").putImageData(x,0,0,0,K,x.width,X),new p(M,x,V)}static _renderUntouchedLines(M,N,A,P,x,W){const U=[];if(!W){for(let z=0,V=P-A+1;z<V;z++)U[z]=!0;return[-1,-1,U]}const O=W._get(),$=O.imageData.data,Q=O.rendLineNumberStart,se=O.lines,le=se.length,te=M.width,re=M.data,H=(P-A+1)*x*te*4;let B=-1,j=-1,G=-1,Y=-1,ne=-1,de=-1,he=N*x;for(let z=A;z<=P;z++){const V=z-A,K=z-Q,ie=K>=0&&K<le?se[K].dy:-1;if(ie===-1){U[V]=!0,he+=x;continue}const X=ie*te*4,Z=(ie+x)*te*4,ue=he*te*4,me=(he+x)*te*4;Y===X&&de===ue?(Y=Z,de=me):(G!==-1&&(re.set($.subarray(G,Y),ne),B===-1&&G===0&&G===ne&&(B=Y),j===-1&&Y===H&&G===ne&&(j=G)),G=X,Y=Z,ne=ue,de=me),U[V]=!1,he+=x}G!==-1&&(re.set($.subarray(G,Y),ne),B===-1&&G===0&&G===ne&&(B=Y),j===-1&&Y===H&&G===ne&&(j=G));const oe=B===-1?-1:B/(te*4),ce=j===-1?-1:j/(te*4);return[oe,ce,U]}static _renderLine(M,N,A,P,x,W,U,O,$,Q,se,le,te,re,H){const B=te.content,j=te.tokens,G=M.width-W,Y=H===1;let ne=m.MINIMAP_GUTTER_WIDTH,de=0,he=0;for(let oe=0,ce=j.getCount();oe<ce;oe++){const z=j.getEndOffset(oe),V=j.getForeground(oe),K=U.getColor(V);for(;de<z;de++){if(ne>G)return;const ie=B.charCodeAt(de);if(ie===9){const X=le-(de+he)%le;he+=X-1,ne+=X*W}else if(ie===32)ne+=W;else{const X=b.isFullWidthCharacter(ie)?2:1;for(let Z=0;Z<X;Z++)if(x===2?$.blockRenderChar(M,ne,Q+se,K,O,N,A,Y):$.renderChar(M,ne,Q+se,ie,K,O,N,A,re,P,Y),ne+=W,ne>G)return}}}}}class F{constructor(M,N,A){this._startLineNumber=M,this._endLineNumber=N,this._defaultValue=A,this._values=[];for(let P=0,x=this._endLineNumber-this._startLineNumber+1;P<x;P++)this._values[P]=A}has(M){return this.get(M)!==this._defaultValue}set(M,N){M<this._startLineNumber||M>this._endLineNumber||(this._values[M-this._startLineNumber]=N)}get(M){return M<this._startLineNumber||M>this._endLineNumber?this._defaultValue:this._values[M-this._startLineNumber]}}}),define(J[773],ee([1,0,46,7,139,67,37,6,2,598,31,407]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.ColorPickerBody=e.ColorPickerHeader=void 0;const n=k.$;class t extends _.Disposable{constructor(a,d,u){super(),this.model=d,this.domNode=n(".colorpicker-header"),k.append(a,this.domNode),this.pickedColorNode=k.append(this.domNode,n(".picked-color"));const C=(0,h.localize)(0,null);this.pickedColorNode.setAttribute("title",C);const f=k.append(this.domNode,n(".original-color"));f.style.backgroundColor=w.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=u.getColorTheme().getColor(m.editorHoverBackground)||w.Color.white,this._register(u.onDidColorThemeChange(v=>{this.backgroundColor=v.getColor(m.editorHoverBackground)||w.Color.white})),this._register(k.addDisposableListener(this.pickedColorNode,k.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(k.addDisposableListener(f,k.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(d.onDidChangeColor(this.onDidChangeColor,this)),this._register(d.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=w.Color.Format.CSS.format(d.color)||"",this.pickedColorNode.classList.toggle("light",d.color.rgba.a<.5?this.backgroundColor.isLighter():d.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(a){this.pickedColorNode.style.backgroundColor=w.Color.Format.CSS.format(a)||"",this.pickedColorNode.classList.toggle("light",a.rgba.a<.5?this.backgroundColor.isLighter():a.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(n(".codicon.codicon-color-mode"))}}e.ColorPickerHeader=t;class i extends _.Disposable{constructor(a,d,u){super(),this.model=d,this.pixelRatio=u,this.domNode=n(".colorpicker-body"),k.append(a,this.domNode),this.saturationBox=new s(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 c(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 g(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:a,v:d}){const u=this.model.color.hsva;this.model.color=new w.Color(new w.HSVA(u.h,a,d,u.a))}onDidOpacityChange(a){const d=this.model.color.hsva;this.model.color=new w.Color(new w.HSVA(d.h,d.s,d.v,a))}onDidHueChange(a){const d=this.model.color.hsva,u=(1-a)*360;this.model.color=new w.Color(new w.HSVA(u===360?0:u,d.s,d.v,d.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}e.ColorPickerBody=i;class s extends _.Disposable{constructor(a,d,u){super(),this.model=d,this.pixelRatio=u,this._onDidChange=new b.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new b.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=n(".saturation-wrap"),k.append(a,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",k.append(this.domNode,this.canvas),this.selection=n(".saturation-selection"),k.append(this.domNode,this.selection),this.layout(),this._register(k.addDisposableListener(this.domNode,k.EventType.POINTER_DOWN,C=>this.onPointerDown(C))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onPointerDown(a){if(!a.target||!(a.target instanceof Element))return;this.monitor=this._register(new y.GlobalPointerMoveMonitor);const d=k.getDomNodePagePosition(this.domNode);a.target!==this.selection&&this.onDidChangePosition(a.offsetX,a.offsetY),this.monitor.startMonitoring(a.target,a.pointerId,a.buttons,C=>this.onDidChangePosition(C.pageX-d.left,C.pageY-d.top),()=>null);const u=k.addDisposableListener(document,k.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),u.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(a,d){const u=Math.max(0,Math.min(1,a/this.width)),C=Math.max(0,Math.min(1,1-d/this.height));this.paintSelection(u,C),this._onDidChange.fire({s:u,v:C})}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 a=this.model.color.hsva;this.paintSelection(a.s,a.v)}paint(){const a=this.model.color.hsva,d=new w.Color(new w.HSVA(a.h,1,1,1)),u=this.canvas.getContext("2d"),C=u.createLinearGradient(0,0,this.canvas.width,0);C.addColorStop(0,"rgba(255, 255, 255, 1)"),C.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),C.addColorStop(1,"rgba(255, 255, 255, 0)");const f=u.createLinearGradient(0,0,0,this.canvas.height);f.addColorStop(0,"rgba(0, 0, 0, 0)"),f.addColorStop(1,"rgba(0, 0, 0, 1)"),u.rect(0,0,this.canvas.width,this.canvas.height),u.fillStyle=w.Color.Format.CSS.format(d),u.fill(),u.fillStyle=C,u.fill(),u.fillStyle=f,u.fill()}paintSelection(a,d){this.selection.style.left=`${a*this.width}px`,this.selection.style.top=`${this.height-d*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class r extends _.Disposable{constructor(a,d){super(),this.model=d,this._onDidChange=new b.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new b.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=k.append(a,n(".strip")),this.overlay=k.append(this.domNode,n(".overlay")),this.slider=k.append(this.domNode,n(".slider")),this.slider.style.top="0px",this._register(k.addDisposableListener(this.domNode,k.EventType.POINTER_DOWN,u=>this.onPointerDown(u))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const a=this.getValue(this.model.color);this.updateSliderPosition(a)}onPointerDown(a){if(!a.target||!(a.target instanceof Element))return;const d=this._register(new y.GlobalPointerMoveMonitor),u=k.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),a.target!==this.slider&&this.onDidChangeTop(a.offsetY),d.startMonitoring(a.target,a.pointerId,a.buttons,f=>this.onDidChangeTop(f.pageY-u.top),()=>null);const C=k.addDisposableListener(document,k.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),C.dispose(),d.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(a){const d=Math.max(0,Math.min(1,1-a/this.height));this.updateSliderPosition(d),this._onDidChange.fire(d)}updateSliderPosition(a){this.slider.style.top=`${(1-a)*this.height}px`}}class c extends r{constructor(a,d){super(a,d),this.domNode.classList.add("opacity-strip"),this._register(d.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(a){const{r:d,g:u,b:C}=a.rgba,f=new w.Color(new w.RGBA(d,u,C,1)),v=new w.Color(new w.RGBA(d,u,C,0));this.overlay.style.background=`linear-gradient(to bottom, ${f} 0%, ${v} 100%)`}getValue(a){return a.hsva.a}}class g extends r{constructor(a,d){super(a,d),this.domNode.classList.add("hue-strip")}getValue(a){return 1-a.hsva.h/360}}class o extends D.Widget{constructor(a,d,u,C){super(),this.model=d,this.pixelRatio=u,this._register(S.PixelRatio.onDidChange(()=>this.layout()));const f=n(".colorpicker-widget");a.appendChild(f);const v=new t(f,this.model,C);this.body=new i(f,this.model,this.pixelRatio),this._register(v),this._register(this.body)}layout(){this.body.layout()}}e.ColorPickerWidget=o}),define(J[234],ee([1,0,655,31,429]),function(q,e,S,k){"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=(0,k.registerColor)("symbolIcon.arrayForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=(0,k.registerColor)("symbolIcon.booleanForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,k.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,S.localize)(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=(0,k.registerColor)("symbolIcon.colorForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=(0,k.registerColor)("symbolIcon.constantForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,k.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,S.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,k.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,S.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,k.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,S.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,k.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,S.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,k.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,S.localize)(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=(0,k.registerColor)("symbolIcon.fileForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=(0,k.registerColor)("symbolIcon.folderForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,k.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,S.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,k.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,S.localize)(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=(0,k.registerColor)("symbolIcon.keyForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=(0,k.registerColor)("symbolIcon.keywordForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,k.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,S.localize)(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=(0,k.registerColor)("symbolIcon.moduleForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=(0,k.registerColor)("symbolIcon.namespaceForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=(0,k.registerColor)("symbolIcon.nullForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=(0,k.registerColor)("symbolIcon.numberForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=(0,k.registerColor)("symbolIcon.objectForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=(0,k.registerColor)("symbolIcon.operatorForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=(0,k.registerColor)("symbolIcon.packageForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=(0,k.registerColor)("symbolIcon.propertyForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=(0,k.registerColor)("symbolIcon.referenceForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=(0,k.registerColor)("symbolIcon.snippetForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=(0,k.registerColor)("symbolIcon.stringForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=(0,k.registerColor)("symbolIcon.structForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=(0,k.registerColor)("symbolIcon.textForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=(0,k.registerColor)("symbolIcon.typeParameterForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=(0,k.registerColor)("symbolIcon.unitForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,S.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,k.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,S.localize)(32,null))}),define(J[774],ee([1,0,29,107,594,160,234]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMenuItems=void 0;const D=Object.freeze({kind:k.CodeActionKind.Empty,title:(0,y.localize)(0,null)}),w=Object.freeze([{kind:k.CodeActionKind.QuickFix,title:(0,y.localize)(1,null)},{kind:k.CodeActionKind.RefactorExtract,title:(0,y.localize)(2,null),icon:S.Codicon.wrench},{kind:k.CodeActionKind.RefactorInline,title:(0,y.localize)(3,null),icon:S.Codicon.wrench},{kind:k.CodeActionKind.RefactorRewrite,title:(0,y.localize)(4,null),icon:S.Codicon.wrench},{kind:k.CodeActionKind.RefactorMove,title:(0,y.localize)(5,null),icon:S.Codicon.wrench},{kind:k.CodeActionKind.SurroundWith,title:(0,y.localize)(6,null),icon:S.Codicon.symbolSnippet},{kind:k.CodeActionKind.Source,title:(0,y.localize)(7,null),icon:S.Codicon.symbolFile},D]);function b(_,h,m){if(!h)return _.map(i=>({kind:"action",item:i,group:D,disabled:!!i.action.disabled,label:i.action.disabled||i.action.title}));const n=w.map(i=>({group:i,actions:[]}));for(const i of _){const s=i.action.kind?new k.CodeActionKind(i.action.kind):k.CodeActionKind.None;for(const r of n)if(r.group.kind.contains(s)){r.actions.push(i);break}}const t=[];for(const i of n)if(i.actions.length){t.push({kind:"header",group:i.group});for(const s of i.actions)t.push({kind:"action",item:s,group:i.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:m(s.action)})}return t}e.toMenuItems=b}),define(J[98],ee([1,0,31,37]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultMenuStyles=e.defaultSelectBoxStyles=e.getListStyles=e.defaultListStyles=e.defaultBreadcrumbsWidgetStyles=e.defaultCountBadgeStyles=e.defaultFindWidgetStyles=e.defaultInputBoxStyles=e.defaultDialogStyles=e.defaultCheckboxStyles=e.defaultToggleStyles=e.defaultProgressBarStyles=e.defaultButtonStyles=e.defaultKeybindingLabelStyles=void 0;function y(w,b){const _=Object.assign({},b);for(const h in w){const m=w[h];_[h]=m!==void 0?(0,S.asCssVariable)(m):void 0}return _}e.defaultKeybindingLabelStyles={keybindingLabelBackground:(0,S.asCssVariable)(S.keybindingLabelBackground),keybindingLabelForeground:(0,S.asCssVariable)(S.keybindingLabelForeground),keybindingLabelBorder:(0,S.asCssVariable)(S.keybindingLabelBorder),keybindingLabelBottomBorder:(0,S.asCssVariable)(S.keybindingLabelBottomBorder),keybindingLabelShadow:(0,S.asCssVariable)(S.widgetShadow)},e.defaultButtonStyles={buttonForeground:(0,S.asCssVariable)(S.buttonForeground),buttonSeparator:(0,S.asCssVariable)(S.buttonSeparator),buttonBackground:(0,S.asCssVariable)(S.buttonBackground),buttonHoverBackground:(0,S.asCssVariable)(S.buttonHoverBackground),buttonSecondaryForeground:(0,S.asCssVariable)(S.buttonSecondaryForeground),buttonSecondaryBackground:(0,S.asCssVariable)(S.buttonSecondaryBackground),buttonSecondaryHoverBackground:(0,S.asCssVariable)(S.buttonSecondaryHoverBackground),buttonBorder:(0,S.asCssVariable)(S.buttonBorder)},e.defaultProgressBarStyles={progressBarBackground:(0,S.asCssVariable)(S.progressBarBackground)},e.defaultToggleStyles={inputActiveOptionBorder:(0,S.asCssVariable)(S.inputActiveOptionBorder),inputActiveOptionForeground:(0,S.asCssVariable)(S.inputActiveOptionForeground),inputActiveOptionBackground:(0,S.asCssVariable)(S.inputActiveOptionBackground)},e.defaultCheckboxStyles={checkboxBackground:(0,S.asCssVariable)(S.checkboxBackground),checkboxBorder:(0,S.asCssVariable)(S.checkboxBorder),checkboxForeground:(0,S.asCssVariable)(S.checkboxForeground)},e.defaultDialogStyles={dialogBackground:(0,S.asCssVariable)(S.editorWidgetBackground),dialogForeground:(0,S.asCssVariable)(S.editorWidgetForeground),dialogShadow:(0,S.asCssVariable)(S.widgetShadow),dialogBorder:(0,S.asCssVariable)(S.contrastBorder),errorIconForeground:(0,S.asCssVariable)(S.problemsErrorIconForeground),warningIconForeground:(0,S.asCssVariable)(S.problemsWarningIconForeground),infoIconForeground:(0,S.asCssVariable)(S.problemsInfoIconForeground),textLinkForeground:(0,S.asCssVariable)(S.textLinkForeground)},e.defaultInputBoxStyles={inputBackground:(0,S.asCssVariable)(S.inputBackground),inputForeground:(0,S.asCssVariable)(S.inputForeground),inputBorder:(0,S.asCssVariable)(S.inputBorder),inputValidationInfoBorder:(0,S.asCssVariable)(S.inputValidationInfoBorder),inputValidationInfoBackground:(0,S.asCssVariable)(S.inputValidationInfoBackground),inputValidationInfoForeground:(0,S.asCssVariable)(S.inputValidationInfoForeground),inputValidationWarningBorder:(0,S.asCssVariable)(S.inputValidationWarningBorder),inputValidationWarningBackground:(0,S.asCssVariable)(S.inputValidationWarningBackground),inputValidationWarningForeground:(0,S.asCssVariable)(S.inputValidationWarningForeground),inputValidationErrorBorder:(0,S.asCssVariable)(S.inputValidationErrorBorder),inputValidationErrorBackground:(0,S.asCssVariable)(S.inputValidationErrorBackground),inputValidationErrorForeground:(0,S.asCssVariable)(S.inputValidationErrorForeground)},e.defaultFindWidgetStyles={listFilterWidgetBackground:(0,S.asCssVariable)(S.listFilterWidgetBackground),listFilterWidgetOutline:(0,S.asCssVariable)(S.listFilterWidgetOutline),listFilterWidgetNoMatchesOutline:(0,S.asCssVariable)(S.listFilterWidgetNoMatchesOutline),listFilterWidgetShadow:(0,S.asCssVariable)(S.listFilterWidgetShadow),inputBoxStyles:e.defaultInputBoxStyles,toggleStyles:e.defaultToggleStyles},e.defaultCountBadgeStyles={badgeBackground:(0,S.asCssVariable)(S.badgeBackground),badgeForeground:(0,S.asCssVariable)(S.badgeForeground),badgeBorder:(0,S.asCssVariable)(S.contrastBorder)},e.defaultBreadcrumbsWidgetStyles={breadcrumbsBackground:(0,S.asCssVariable)(S.breadcrumbsBackground),breadcrumbsForeground:(0,S.asCssVariable)(S.breadcrumbsForeground),breadcrumbsHoverForeground:(0,S.asCssVariable)(S.breadcrumbsFocusForeground),breadcrumbsFocusForeground:(0,S.asCssVariable)(S.breadcrumbsFocusForeground),breadcrumbsFocusAndSelectionForeground:(0,S.asCssVariable)(S.breadcrumbsActiveSelectionForeground)},e.defaultListStyles={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,S.asCssVariable)(S.listFocusBackground),listFocusForeground:(0,S.asCssVariable)(S.listFocusForeground),listFocusOutline:(0,S.asCssVariable)(S.listFocusOutline),listActiveSelectionBackground:(0,S.asCssVariable)(S.listActiveSelectionBackground),listActiveSelectionForeground:(0,S.asCssVariable)(S.listActiveSelectionForeground),listActiveSelectionIconForeground:(0,S.asCssVariable)(S.listActiveSelectionIconForeground),listFocusAndSelectionOutline:(0,S.asCssVariable)(S.listFocusAndSelectionOutline),listFocusAndSelectionBackground:(0,S.asCssVariable)(S.listActiveSelectionBackground),listFocusAndSelectionForeground:(0,S.asCssVariable)(S.listActiveSelectionForeground),listInactiveSelectionBackground:(0,S.asCssVariable)(S.listInactiveSelectionBackground),listInactiveSelectionIconForeground:(0,S.asCssVariable)(S.listInactiveSelectionIconForeground),listInactiveSelectionForeground:(0,S.asCssVariable)(S.listInactiveSelectionForeground),listInactiveFocusBackground:(0,S.asCssVariable)(S.listInactiveFocusBackground),listInactiveFocusOutline:(0,S.asCssVariable)(S.listInactiveFocusOutline),listHoverBackground:(0,S.asCssVariable)(S.listHoverBackground),listHoverForeground:(0,S.asCssVariable)(S.listHoverForeground),listDropBackground:(0,S.asCssVariable)(S.listDropBackground),listSelectionOutline:(0,S.asCssVariable)(S.activeContrastBorder),listHoverOutline:(0,S.asCssVariable)(S.activeContrastBorder),treeIndentGuidesStroke:(0,S.asCssVariable)(S.treeIndentGuidesStroke),treeInactiveIndentGuidesStroke:(0,S.asCssVariable)(S.treeInactiveIndentGuidesStroke),tableColumnsBorder:(0,S.asCssVariable)(S.tableColumnsBorder),tableOddRowsBackgroundColor:(0,S.asCssVariable)(S.tableOddRowsBackgroundColor)};function D(w){return y(w,e.defaultListStyles)}e.getListStyles=D,e.defaultSelectBoxStyles={selectBackground:(0,S.asCssVariable)(S.selectBackground),selectListBackground:(0,S.asCssVariable)(S.selectListBackground),selectForeground:(0,S.asCssVariable)(S.selectForeground),decoratorRightForeground:(0,S.asCssVariable)(S.pickerGroupForeground),selectBorder:(0,S.asCssVariable)(S.selectBorder),focusBorder:(0,S.asCssVariable)(S.focusBorder),listFocusBackground:(0,S.asCssVariable)(S.quickInputListFocusBackground),listInactiveSelectionIconForeground:(0,S.asCssVariable)(S.quickInputListFocusIconForeground),listFocusForeground:(0,S.asCssVariable)(S.quickInputListFocusForeground),listFocusOutline:(0,S.asCssVariableWithDefault)(S.activeContrastBorder,k.Color.transparent.toString()),listHoverBackground:(0,S.asCssVariable)(S.listHoverBackground),listHoverForeground:(0,S.asCssVariable)(S.listHoverForeground),listHoverOutline:(0,S.asCssVariable)(S.activeContrastBorder),selectListBorder:(0,S.asCssVariable)(S.editorWidgetBorder),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},e.defaultMenuStyles={shadowColor:(0,S.asCssVariable)(S.widgetShadow),borderColor:(0,S.asCssVariable)(S.menuBorder),foregroundColor:(0,S.asCssVariable)(S.menuForeground),backgroundColor:(0,S.asCssVariable)(S.menuBackground),selectionForegroundColor:(0,S.asCssVariable)(S.menuSelectionForeground),selectionBackgroundColor:(0,S.asCssVariable)(S.menuSelectionBackground),selectionBorderColor:(0,S.asCssVariable)(S.menuSelectionBorder),separatorColor:(0,S.asCssVariable)(S.menuSeparatorBackground),scrollbarShadow:(0,S.asCssVariable)(S.scrollbarShadow),scrollbarSliderBackground:(0,S.asCssVariable)(S.scrollbarSliderBackground),scrollbarSliderHoverBackground:(0,S.asCssVariable)(S.scrollbarSliderHoverBackground),scrollbarSliderActiveBackground:(0,S.asCssVariable)(S.scrollbarSliderActiveBackground)}}),define(J[775],ee([1,0,7,282,283,212,63,2,42,61,618,8,36,149,98,146]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"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 c=class{constructor(p){this._resolverService=p}hasChildren(p){return p instanceof r.ReferencesModel||p instanceof r.FileReferences}getChildren(p){if(p instanceof r.ReferencesModel)return p.groups;if(p instanceof r.FileReferences)return p.resolve(this._resolverService).then(L=>L.children);throw new Error("bad tree")}};c=Ne([fe(0,h.ITextModelService)],c),e.DataSource=c;class g{getHeight(){return 23}getTemplateId(p){return p instanceof r.FileReferences?d.id:C.id}}e.Delegate=g;let o=class{constructor(p){this._keybindingService=p}getKeyboardNavigationLabel(p){var L;if(p instanceof r.OneReference){const E=(L=p.parent.getPreview(p))===null||L===void 0?void 0:L.preview(p.range);if(E)return E.value}return(0,_.basename)(p.uri)}};o=Ne([fe(0,t.IKeybindingService)],o),e.StringRepresentationProvider=o;class l{getId(p){return p instanceof r.OneReference?p.id:p.uri}}e.IdentityProvider=l;let a=class extends b.Disposable{constructor(p,L){super(),this._labelService=L;const E=document.createElement("div");E.classList.add("reference-file"),this.file=this._register(new D.IconLabel(E,{supportHighlights:!0})),this.badge=new k.CountBadge(S.append(E,S.$(".count")),{},s.defaultCountBadgeStyles),p.appendChild(E)}set(p,L){const E=(0,_.dirname)(p.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(p.uri),this._labelService.getUriLabel(E,{relative:!0}),{title:this._labelService.getUriLabel(p.uri),matches:L});const I=p.children.length;this.badge.setCount(I),I>1?this.badge.setTitleFormat((0,m.localize)(0,null,I)):this.badge.setTitleFormat((0,m.localize)(1,null,I))}};a=Ne([fe(1,i.ILabelService)],a);let d=class Vi{constructor(p){this._instantiationService=p,this.templateId=Vi.id}renderTemplate(p){return this._instantiationService.createInstance(a,p)}renderElement(p,L,E){E.set(p.element,(0,w.createMatches)(p.filterData))}disposeTemplate(p){p.dispose()}};d.id="FileReferencesRenderer",d=Ne([fe(0,n.IInstantiationService)],d),e.FileReferencesRenderer=d;class u{constructor(p){this.label=new y.HighlightedLabel(p)}set(p,L){var E;const I=(E=p.parent.getPreview(p))===null||E===void 0?void 0:E.preview(p.range);if(!I||!I.value)this.label.set(`${(0,_.basename)(p.uri)}:${p.range.startLineNumber+1}:${p.range.startColumn+1}`);else{const{value:T,highlight:F}=I;L&&!w.FuzzyScore.isDefault(L)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(T,(0,w.createMatches)(L))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(T,[F]))}}}class C{constructor(){this.templateId=C.id}renderTemplate(p){return new u(p)}renderElement(p,L,E){E.set(p.element,p.filterData)}disposeTemplate(){}}C.id="OneReferenceRenderer",e.OneReferenceRenderer=C;class f{getWidgetAriaLabel(){return(0,m.localize)(2,null)}getAriaLabel(p){return p.ariaMessage}}e.AccessibilityProvider=f}),define(J[776],ee([1,0,7,208,108,29,2,17,32,664,57,36,98,31,249]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionList=e.previewSelectedActionCommand=e.acceptSelectedActionCommand=void 0,e.acceptSelectedActionCommand="acceptSelectedCodeAction",e.previewSelectedActionCommand="previewSelectedCodeAction";class s{get templateId(){return"header"}renderTemplate(d){d.classList.add("group-header");const u=document.createElement("span");return d.append(u),{container:d,text:u}}renderElement(d,u,C){var f,v;C.text.textContent=(v=(f=d.group)===null||f===void 0?void 0:f.title)!==null&&v!==void 0?v:""}disposeTemplate(d){}}let r=class{get templateId(){return"action"}constructor(d,u){this._supportsPreview=d,this._keybindingService=u}renderTemplate(d){d.classList.add(this.templateId);const u=document.createElement("div");u.className="icon",d.append(u);const C=document.createElement("span");C.className="title",d.append(C);const f=new k.KeybindingLabel(d,b.OS);return{container:d,icon:u,text:C,keybinding:f}}renderElement(d,u,C){var f,v,p;if(!((f=d.group)===null||f===void 0)&&f.icon?(C.icon.className=_.ThemeIcon.asClassName(d.group.icon),d.group.icon.color&&(C.icon.style.color=(0,i.asCssVariable)(d.group.icon.color.id))):(C.icon.className=_.ThemeIcon.asClassName(D.Codicon.lightBulb),C.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!d.item||!d.label)return;C.text.textContent=l(d.label),C.keybinding.set(d.keybinding),S.setVisibility(!!d.keybinding,C.keybinding.element);const L=(v=this._keybindingService.lookupKeybinding(e.acceptSelectedActionCommand))===null||v===void 0?void 0:v.getLabel(),E=(p=this._keybindingService.lookupKeybinding(e.previewSelectedActionCommand))===null||p===void 0?void 0:p.getLabel();C.container.classList.toggle("option-disabled",d.disabled),d.disabled?C.container.title=d.label:L&&E?this._supportsPreview?C.container.title=(0,h.localize)(0,null,L,E):C.container.title=(0,h.localize)(1,null,L):C.container.title=""}disposeTemplate(d){}};r=Ne([fe(1,n.IKeybindingService)],r);class c extends UIEvent{constructor(){super("acceptSelectedAction")}}class g extends UIEvent{constructor(){super("previewSelectedAction")}}let o=class extends w.Disposable{constructor(d,u,C,f,v,p){super(),this._delegate=f,this._contextViewService=v,this._keybindingService=p,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const L={getHeight:E=>E.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:E=>E.kind};this._list=this._register(new y.List(d,this.domNode,L,[new r(u,this._keybindingService),new s],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:E=>{if(E.kind==="action"){let I=E.label?l(E?.label):"";return E.disabled&&(I=(0,h.localize)(2,null,I,E.disabled)),I}return null},getWidgetAriaLabel:()=>(0,h.localize)(3,null),getRole:E=>E.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(t.defaultListStyles),this._register(this._list.onMouseClick(E=>this.onListClick(E))),this._register(this._list.onMouseOver(E=>this.onListHover(E))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(E=>this.onListSelection(E))),this._allMenuItems=C,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(d){return!d.disabled&&d.kind==="action"}hide(d){this._delegate.onHide(d),this._contextViewService.hideContextView()}layout(d){const u=this._allMenuItems.filter(I=>I.kind==="header").length,f=this._allMenuItems.length*this._actionLineHeight+u*this._headerLineHeight-u*this._actionLineHeight;this._list.layout(f);const v=this._allMenuItems.map((I,T)=>{const F=document.getElementById(this._list.getElementID(T));if(F){F.style.width="auto";const R=F.getBoundingClientRect().width;return F.style.width="",R}return 0}),p=Math.max(...v,d),L=.7,E=Math.min(f,document.body.clientHeight*L);return this._list.layout(E,p),this.domNode.style.height=`${E}px`,this._list.domFocus(),p}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(d){const u=this._list.getFocus();if(u.length===0)return;const C=u[0],f=this._list.element(C);if(!this.focusCondition(f))return;const v=d?new g:new c;this._list.setSelection([C],v)}onListSelection(d){if(!d.elements.length)return;const u=d.elements[0];u.item&&this.focusCondition(u)?this._delegate.onSelect(u.item,d.browserEvent instanceof g):this._list.setSelection([])}onListHover(d){this._list.setFocus(typeof d.index=="number"?[d.index]:[])}onListClick(d){d.element&&this.focusCondition(d.element)&&this._list.setFocus([])}};o=Ne([fe(4,m.IContextViewService),fe(5,n.IKeybindingService)],o),e.ActionList=o;function l(a){return a.replace(/\\r\\n|\\r|\\n/g," ")}}),define(J[777],ee([1,0,7,69,2,665,776,28,14,57,51,8,249]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IActionWidgetService=void 0;const t={Visible:new _.RawContextKey("codeActionMenuVisible",!1,(0,D.localize)(0,null))};e.IActionWidgetService=(0,n.createDecorator)("actionWidgetService");let i=class extends y.Disposable{get isVisible(){return t.Visible.getValue(this._contextKeyService)||!1}constructor(c,g,o){super(),this._contextViewService=c,this._contextKeyService=g,this._instantiationService=o,this._list=this._register(new y.MutableDisposable)}show(c,g,o,l,a,d,u){const C=t.Visible.bindTo(this._contextKeyService),f=this._instantiationService.createInstance(w.ActionList,c,g,o,l);this._contextViewService.showContextView({getAnchor:()=>a,render:v=>(C.set(!0),this._renderWidget(v,f,u??[])),onHide:v=>{C.reset(),this._onWidgetClosed(v)}},d,!1)}acceptSelected(c){var g;(g=this._list.value)===null||g===void 0||g.acceptSelected(c)}focusPrevious(){var c,g;(g=(c=this._list)===null||c===void 0?void 0:c.value)===null||g===void 0||g.focusPrevious()}focusNext(){var c,g;(g=(c=this._list)===null||c===void 0?void 0:c.value)===null||g===void 0||g.focusNext()}hide(){var c;(c=this._list.value)===null||c===void 0||c.hide(),this._list.clear()}_renderWidget(c,g,o){var l;const a=document.createElement("div");if(a.classList.add("action-widget"),c.appendChild(a),this._list.value=g,this._list.value)a.appendChild(this._list.value.domNode);else throw new Error("List has no value");const d=new y.DisposableStore,u=document.createElement("div"),C=c.appendChild(u);C.classList.add("context-view-block"),d.add(S.addDisposableListener(C,S.EventType.MOUSE_DOWN,I=>I.stopPropagation()));const f=document.createElement("div"),v=c.appendChild(f);v.classList.add("context-view-pointerBlock"),d.add(S.addDisposableListener(v,S.EventType.POINTER_MOVE,()=>v.remove())),d.add(S.addDisposableListener(v,S.EventType.MOUSE_DOWN,()=>v.remove()));let p=0;if(o.length){const I=this._createActionBar(".action-widget-action-bar",o);I&&(a.appendChild(I.getContainer().parentElement),d.add(I),p=I.getContainer().offsetWidth)}const L=(l=this._list.value)===null||l===void 0?void 0:l.layout(p);a.style.width=`${L}px`;const E=d.add(S.trackFocus(c));return d.add(E.onDidBlur(()=>this.hide())),d}_createActionBar(c,g){if(!g.length)return;const o=S.$(c),l=new k.ActionBar(o);return l.push(g,{icon:!1,label:!0}),l}_onWidgetClosed(c){var g;(g=this._list.value)===null||g===void 0||g.hide(c)}};i=Ne([fe(0,h.IContextViewService),fe(1,_.IContextKeyService),fe(2,n.IInstantiationService)],i),(0,m.registerSingleton)(e.IActionWidgetService,i,1);const s=100+1e3;(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"hideCodeActionWidget",title:{value:(0,D.localize)(1,null),original:"Hide action widget"},precondition:t.Visible,keybinding:{weight:s,primary:9,secondary:[1033]}})}run(r){r.get(e.IActionWidgetService).hide()}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"selectPrevCodeAction",title:{value:(0,D.localize)(2,null),original:"Select previous action"},precondition:t.Visible,keybinding:{weight:s,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(r){const c=r.get(e.IActionWidgetService);c instanceof i&&c.focusPrevious()}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"selectNextCodeAction",title:{value:(0,D.localize)(3,null),original:"Select next action"},precondition:t.Visible,keybinding:{weight:s,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(r){const c=r.get(e.IActionWidgetService);c instanceof i&&c.focusNext()}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:w.acceptSelectedActionCommand,title:{value:(0,D.localize)(4,null),original:"Accept selected action"},precondition:t.Visible,keybinding:{weight:s,primary:3,secondary:[2132]}})}run(r){const c=r.get(e.IActionWidgetService);c instanceof i&&c.acceptSelected()}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:w.previewSelectedActionCommand,title:{value:(0,D.localize)(5,null),original:"Preview selected action"},precondition:t.Visible,keybinding:{weight:s,primary:2051}})}run(r){const c=r.get(e.IActionWidgetService);c instanceof i&&c.acceptSelected(!0)}})});var oi=this&&this.__classPrivateFieldSet||function(q,e,S,k,y){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!y)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?q!==e||!y:!e.has(q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?y.call(q,S):y?y.value=S:e.set(q,S),S},Ft=this&&this.__classPrivateFieldGet||function(q,e,S,k){if(S==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?q!==e||!k:!e.has(q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return S==="m"?k:S==="a"?k.call(q):k?k.value:e.get(q)};define(J[778],ee([1,0,7,11,100,2,13,748,774,150,595,777,25,27,8,322]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionUi=void 0;let g=class extends D.Disposable{constructor(l,a,d,u,C,f){super(),this._editor=l,this.delegate=a,this._configurationService=u,this._actionWidgetService=C,this._commandService=f,this._activeCodeActions=this._register(new D.MutableDisposable),c.set(this,!1),this._showDisabled=!1,this._lightBulbWidget=new y.Lazy(()=>{const v=this._editor.getContribution(r.LightBulbWidget.ID);return v&&this._register(v.onClick(p=>this.showCodeActionList(p.actions,p,{includeDisabledActions:!1,fromLightbulb:!0}))),v}),this._resolver=d.createInstance(b.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){oi(this,c,!0,"f"),super.dispose()}update(l){var a,d,u,C,f,v,p;return Ee(this,void 0,void 0,function*(){if(l.type!==1){(a=this._lightBulbWidget.rawValue)===null||a===void 0||a.hide();return}let L;try{L=yield l.actions}catch(E){(0,k.onUnexpectedError)(E);return}if(!Ft(this,c,"f"))if((d=this._lightBulbWidget.value)===null||d===void 0||d.update(L,l.trigger,l.position),l.trigger.type===1){if(!((u=l.trigger.filter)===null||u===void 0)&&u.include){const I=this.tryGetValidActionToApply(l.trigger,L);if(I){try{(C=this._lightBulbWidget.value)===null||C===void 0||C.hide(),yield this.delegate.applyCodeAction(I,!1,!1)}finally{L.dispose()}return}if(l.trigger.context){const T=this.getInvalidActionThatWouldHaveBeenApplied(l.trigger,L);if(T&&T.action.disabled){(f=h.MessageController.get(this._editor))===null||f===void 0||f.showMessage(T.action.disabled,l.trigger.context.position),L.dispose();return}}}const E=!!(!((v=l.trigger.filter)===null||v===void 0)&&v.include);if(l.trigger.context&&(!L.allActions.length||!E&&!L.validActions.length)){(p=h.MessageController.get(this._editor))===null||p===void 0||p.showMessage(l.trigger.context.notAvailableMessage,l.trigger.context.position),this._activeCodeActions.value=L,L.dispose();return}this._activeCodeActions.value=L,this.showCodeActionList(L,this.toCoords(l.position),{includeDisabledActions:E,fromLightbulb:!1})}else this._actionWidgetService.isVisible?L.dispose():this._activeCodeActions.value=L})}getInvalidActionThatWouldHaveBeenApplied(l,a){if(a.allActions.length&&(l.autoApply==="first"&&a.validActions.length===0||l.autoApply==="ifSingle"&&a.allActions.length===1))return a.allActions.find(({action:d})=>d.disabled)}tryGetValidActionToApply(l,a){if(a.validActions.length&&(l.autoApply==="first"&&a.validActions.length>0||l.autoApply==="ifSingle"&&a.validActions.length===1))return a.validActions[0]}showCodeActionList(l,a,d){return Ee(this,void 0,void 0,function*(){const u=this._editor.getDomNode();if(!u)return;const C=d.includeDisabledActions&&(this._showDisabled||l.validActions.length===0)?l.allActions:l.validActions;if(!C.length)return;const f=w.Position.isIPosition(a)?this.toCoords(a):a,v={onSelect:(p,L)=>Ee(this,void 0,void 0,function*(){this.delegate.applyCodeAction(p,!0,!!L),this._actionWidgetService.hide()}),onHide:()=>{var p;(p=this._editor)===null||p===void 0||p.focus()}};this._actionWidgetService.show("codeActionWidget",!0,(0,_.toMenuItems)(C,this._shouldShowHeaders(),this._resolver.getResolver()),v,f,u,this._getActionBarActions(l,a,d))})}toCoords(l){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(l,1),this._editor.render();const a=this._editor.getScrolledVisiblePosition(l),d=(0,S.getDomNodePagePosition)(this._editor.getDomNode()),u=d.left+a.left,C=d.top+a.top+a.height;return{x:u,y:C}}_shouldShowHeaders(){var l;const a=(l=this._editor)===null||l===void 0?void 0:l.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:a?.uri})}_getActionBarActions(l,a,d){if(d.fromLightbulb)return[];const u=l.documentation.map(C=>{var f;return{id:C.id,label:C.title,tooltip:(f=C.tooltip)!==null&&f!==void 0?f:"",class:void 0,enabled:!0,run:()=>{var v;return this._commandService.executeCommand(C.id,...(v=C.arguments)!==null&&v!==void 0?v:[])}}});return d.includeDisabledActions&&l.validActions.length>0&&l.allActions.length!==l.validActions.length&&u.push(this._showDisabled?{id:"hideMoreActions",label:(0,m.localize)(0,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(l,a,d))}:{id:"showMoreActions",label:(0,m.localize)(1,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(l,a,d))}),u}};c=new WeakMap,g=Ne([fe(2,s.IInstantiationService),fe(3,i.IConfigurationService),fe(4,n.IActionWidgetService),fe(5,t.ICommandService)],g),e.CodeActionUi=g}),define(J[235],ee([1,0,100,2,19,127,778,150,14,8,89,71,107,321]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionController=void 0;let s=class Hi extends k.Disposable{static get(c){return c.getContribution(Hi.ID)}constructor(c,g,o,l,a,d){super(),this._instantiationService=a,this._editor=c,this._model=this._register(new i.CodeActionModel(this._editor,d.codeActionProvider,g,o,l)),this._register(this._model.onDidChangeState(u=>this._ui.value.update(u))),this._ui=new S.Lazy(()=>this._register(a.createInstance(w.CodeActionUi,c,{applyCodeAction:(u,C,f)=>Ee(this,void 0,void 0,function*(){try{yield this._applyCodeAction(u,f)}finally{C&&this._trigger({type:2,triggerAction:t.CodeActionTriggerSource.QuickFix,filter:{}})}})})))}showCodeActions(c,g,o){return this._ui.value.showCodeActionList(g,o,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(c,g,o,l){var a;if(!this._editor.hasModel())return;(a=b.MessageController.get(this._editor))===null||a===void 0||a.closeMessage();const d=this._editor.getPosition();this._trigger({type:1,triggerAction:g,filter:o,autoApply:l,context:{notAvailableMessage:c,position:d}})}_trigger(c){return this._model.trigger(c)}_applyCodeAction(c,g){return this._instantiationService.invokeFunction(D.applyCodeAction,c,D.ApplyCodeActionReason.FromCodeActions,{preview:g,editor:this._editor})}};s.ID="editor.contrib.codeActionController",s=Ne([fe(1,m.IMarkerService),fe(2,_.IContextKeyService),fe(3,n.IEditorProgressService),fe(4,h.IInstantiationService),fe(5,y.ILanguageFeaturesService)],s),e.CodeActionController=s}),define(J[779],ee([1,0,9,15,22,127,592,14,107,235,321]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=void 0;function n(d){return b.ContextKeyExpr.regex(m.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\\\s|^)"+(0,S.escapeRegExpCharacters)(d.value)+"\\\\b"))}const t={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:w.localize(0,null)},apply:{type:"string",description:w.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[w.localize(2,null),w.localize(3,null),w.localize(4,null)]},preferred:{type:"boolean",default:!1,description:w.localize(5,null)}}};function i(d,u,C,f,v=_.CodeActionTriggerSource.Default){if(d.hasModel()){const p=h.CodeActionController.get(d);p?.manualTriggerAtCurrentPosition(u,v,C,f)}}class s extends k.EditorAction{constructor(){super({id:D.quickFixCommandId,label:w.localize(6,null),alias:"Quick Fix...",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:2132,weight:100}})}run(u,C){return i(C,w.localize(7,null),void 0,void 0,_.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=s;class r extends k.EditorCommand{constructor(){super({id:D.codeActionCommandId,precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:t}]}})}runEditorCommand(u,C,f){const v=_.CodeActionCommandArgs.fromUser(f,{kind:_.CodeActionKind.Empty,apply:"ifSingle"});return i(C,typeof f?.kind=="string"?v.preferred?w.localize(8,null,f.kind):w.localize(9,null,f.kind):v.preferred?w.localize(10,null):w.localize(11,null),{include:v.kind,includeSourceActions:!0,onlyIncludePreferredActions:v.preferred},v.apply)}}e.CodeActionCommand=r;class c extends k.EditorAction{constructor(){super({id:D.refactorCommandId,label:w.localize(12,null),alias:"Refactor...",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(_.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:t}]}})}run(u,C,f){const v=_.CodeActionCommandArgs.fromUser(f,{kind:_.CodeActionKind.Refactor,apply:"never"});return i(C,typeof f?.kind=="string"?v.preferred?w.localize(13,null,f.kind):w.localize(14,null,f.kind):v.preferred?w.localize(15,null):w.localize(16,null),{include:_.CodeActionKind.Refactor.contains(v.kind)?v.kind:_.CodeActionKind.None,onlyIncludePreferredActions:v.preferred},v.apply,_.CodeActionTriggerSource.Refactor)}}e.RefactorAction=c;class g extends k.EditorAction{constructor(){super({id:D.sourceActionCommandId,label:w.localize(17,null),alias:"Source Action...",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(_.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:t}]}})}run(u,C,f){const v=_.CodeActionCommandArgs.fromUser(f,{kind:_.CodeActionKind.Source,apply:"never"});return i(C,typeof f?.kind=="string"?v.preferred?w.localize(18,null,f.kind):w.localize(19,null,f.kind):v.preferred?w.localize(20,null):w.localize(21,null),{include:_.CodeActionKind.Source.contains(v.kind)?v.kind:_.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:v.preferred},v.apply,_.CodeActionTriggerSource.SourceAction)}}e.SourceAction=g;class o extends k.EditorAction{constructor(){super({id:D.organizeImportsCommandId,label:w.localize(22,null),alias:"Organize Imports",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(_.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:1581,weight:100}})}run(u,C){return i(C,w.localize(23,null),{include:_.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",_.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=o;class l extends k.EditorAction{constructor(){super({id:D.fixAllCommandId,label:w.localize(24,null),alias:"Fix All",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(_.CodeActionKind.SourceFixAll))})}run(u,C){return i(C,w.localize(25,null),{include:_.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",_.CodeActionTriggerSource.FixAll)}}e.FixAllAction=l;class a extends k.EditorAction{constructor(){super({id:D.autoFixCommandId,label:w.localize(26,null),alias:"Auto Fix...",precondition:b.ContextKeyExpr.and(y.EditorContextKeys.writable,n(_.CodeActionKind.QuickFix)),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:1620,mac:{primary:2644},weight:100}})}run(u,C){return i(C,w.localize(27,null),{include:_.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",_.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=a}),define(J[780],ee([1,0,15,227,779,235,322,593,90,34]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,S.registerEditorContribution)(D.CodeActionController.ID,D.CodeActionController,3),(0,S.registerEditorContribution)(w.LightBulbWidget.ID,w.LightBulbWidget,4),(0,S.registerEditorAction)(y.QuickFixAction),(0,S.registerEditorAction)(y.RefactorAction),(0,S.registerEditorAction)(y.SourceAction),(0,S.registerEditorAction)(y.OrganizeImportsAction),(0,S.registerEditorAction)(y.AutoFixAction),(0,S.registerEditorAction)(y.FixAllAction),(0,S.registerEditorCommand)(new y.CodeActionCommand),h.Registry.as(_.Extensions.Configuration).registerConfiguration(Object.assign(Object.assign({},k.editorConfigurationBaseNode),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:b.localize(0,null),default:!0}}}))}),define(J[781],ee([1,0,7,66,544,41,11,2,98]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class h{constructor(n,t,i,s){this.contextViewService=n,this.telemetryService=t,this.notificationService=i,this.keybindingService=s,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(n){this.options=n}showContextMenu(n){const t=n.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i;const s=(0,S.isHTMLElement)(n.domForShadowRoot)?n.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>n.getAnchor(),canRelayout:!1,anchorAlignment:n.anchorAlignment,anchorAxisAlignment:n.anchorAxisAlignment,render:r=>{var c;this.lastContainer=r;const g=n.getMenuClassName?n.getMenuClassName():"";g&&(r.className+=" "+g),this.options.blockMouse&&(this.block=r.appendChild((0,S.$)(".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=this.blockDisposable)===null||c===void 0||c.dispose(),this.blockDisposable=(0,S.addDisposableListener)(this.block,S.EventType.MOUSE_DOWN,a=>a.stopPropagation()));const o=new b.DisposableStore,l=n.actionRunner||new D.ActionRunner;return l.onWillRun(a=>this.onActionRun(a,!n.skipTelemetry),this,o),l.onDidRun(this.onDidActionRun,this,o),i=new y.Menu(r,t,{actionViewItemProvider:n.getActionViewItem,context:n.getActionsContext?n.getActionsContext():null,actionRunner:l,getKeyBinding:n.getKeyBinding?n.getKeyBinding:a=>this.keybindingService.lookupKeybinding(a.id)},_.defaultMenuStyles),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,o),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,o),o.add((0,S.addDisposableListener)(window,S.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),o.add((0,S.addDisposableListener)(window,S.EventType.MOUSE_DOWN,a=>{if(a.defaultPrevented)return;const d=new k.StandardMouseEvent(a);let u=d.target;if(!d.rightButton){for(;u;){if(u===r)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),(0,b.combinedDisposable)(o,i)},focus:()=>{i?.focus(!!n.autoSelectFirstItem)},onHide:r=>{var c,g,o;(c=n.onHide)===null||c===void 0||c.call(n,!!r),this.block&&(this.block.remove(),this.block=null),(g=this.blockDisposable)===null||g===void 0||g.dispose(),this.blockDisposable=null,this.lastContainer&&((0,S.getActiveElement)()===this.lastContainer||(0,S.isAncestor)((0,S.getActiveElement)(),this.lastContainer))&&((o=this.focusToReturn)===null||o===void 0||o.focus()),this.lastContainer=null}},s,!!s)}onActionRun(n,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:n.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(n){n.error&&!(0,w.isCancellationError)(n.error)&&this.notificationService.error(n.error)}}e.ContextMenuHandler=h}),define(J[181],ee([1,0,7,538,108,539,173,547,546,291,6,2,677,27,90,14,310,57,8,36,34,98]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d){"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.WorkbenchTreeFindOpen=e.WorkbenchTreeElementHasChild=e.WorkbenchTreeElementCanExpand=e.WorkbenchTreeElementHasParent=e.WorkbenchTreeElementCanCollapse=e.WorkbenchListSupportsFind=e.WorkbenchListSelectionNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.RawWorkbenchListFocusContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,o.createDecorator)("listService");class u{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new n.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(Z){var ue,me;Z!==this._lastFocusedWidget&&((ue=this._lastFocusedWidget)===null||ue===void 0||ue.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=Z,(me=this._lastFocusedWidget)===null||me===void 0||me.getHTMLElement().classList.add("last-focused"))}register(Z,ue){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new y.DefaultStyleController((0,S.createStyleSheet)(),"").style(d.defaultListStyles)),this.lists.some(Ce=>Ce.widget===Z))throw new Error("Cannot register the same widget multiple times");const me={widget:Z,extraContextKeys:ue};return this.lists.push(me),Z.getHTMLElement()===document.activeElement&&this.setLastFocusedList(Z),(0,n.combinedDisposable)(Z.onDidFocus(()=>this.setLastFocusedList(Z)),(0,n.toDisposable)(()=>this.lists.splice(this.lists.indexOf(me),1)),Z.onDidDispose(()=>{this.lists=this.lists.filter(Ce=>Ce!==me),this._lastFocusedWidget===Z&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}e.ListService=u,e.RawWorkbenchListFocusContextKey=new r.RawContextKey("listFocus",!0),e.WorkbenchListSupportsMultiSelectContextKey=new r.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=r.ContextKeyExpr.and(e.RawWorkbenchListFocusContextKey,r.ContextKeyExpr.not(c.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new r.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new r.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new r.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new r.RawContextKey("listSelectionNavigation",!1),e.WorkbenchListSupportsFind=new r.RawContextKey("listSupportsFind",!0),e.WorkbenchTreeElementCanCollapse=new r.RawContextKey("treeElementCanCollapse",!1),e.WorkbenchTreeElementHasParent=new r.RawContextKey("treeElementHasParent",!1),e.WorkbenchTreeElementCanExpand=new r.RawContextKey("treeElementCanExpand",!1),e.WorkbenchTreeElementHasChild=new r.RawContextKey("treeElementHasChild",!1),e.WorkbenchTreeFindOpen=new r.RawContextKey("treeFindOpen",!1);const C="listTypeNavigationMode",f="listAutomaticKeyboardNavigation";function v(X,Z){const ue=X.createScoped(Z.getHTMLElement());return e.RawWorkbenchListFocusContextKey.bindTo(ue),ue}const p="workbench.list.multiSelectModifier",L="workbench.list.openMode",E="workbench.list.horizontalScrolling",I="workbench.list.defaultFindMode",T="workbench.list.typeNavigationMode",F="workbench.list.keyboardNavigation",R="workbench.list.scrollByPage",M="workbench.list.defaultFindMatchType",N="workbench.tree.indent",A="workbench.tree.renderIndentGuides",P="workbench.list.smoothScrolling",x="workbench.list.mouseWheelScrollSensitivity",W="workbench.list.fastScrollSensitivity",U="workbench.tree.expandMode";function O(X){return X.getValue(p)==="alt"}class $ extends n.Disposable{constructor(Z){super(),this.configurationService=Z,this.useAltAsMultipleSelectionModifier=O(Z),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(Z=>{Z.affectsConfiguration(p)&&(this.useAltAsMultipleSelectionModifier=O(this.configurationService))}))}isSelectionSingleChangeEvent(Z){return this.useAltAsMultipleSelectionModifier?Z.browserEvent.altKey:(0,y.isSelectionSingleChangeEvent)(Z)}isSelectionRangeChangeEvent(Z){return(0,y.isSelectionRangeChangeEvent)(Z)}}function Q(X,Z){var ue;const me=X.get(i.IConfigurationService),Ce=X.get(l.IKeybindingService),_e=new n.DisposableStore;return[Object.assign(Object.assign({},Z),{keyboardNavigationDelegate:{mightProducePrintableCharacter(ye){return Ce.mightProducePrintableCharacter(ye)}},smoothScrolling:!!me.getValue(P),mouseWheelScrollSensitivity:me.getValue(x),fastScrollSensitivity:me.getValue(W),multipleSelectionController:(ue=Z.multipleSelectionController)!==null&&ue!==void 0?ue:_e.add(new $(me)),keyboardNavigationEventFilter:G(Ce),scrollByPage:!!me.getValue(R)}),_e]}let se=class extends y.List{constructor(Z,ue,me,Ce,_e,we,ye,ke,De){const ge=typeof _e.horizontalScrolling<"u"?_e.horizontalScrolling:!!ke.getValue(E),[pe,ae]=De.invokeFunction(Q,_e);super(Z,ue,me,Ce,Object.assign(Object.assign({keyboardSupport:!1},pe),{horizontalScrolling:ge})),this.disposables.add(ae),this.contextKeyService=v(we,this),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(_e.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!_e.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=_e.horizontalScrolling,this._useAltAsMultipleSelectionModifier=O(ke),this.disposables.add(this.contextKeyService),this.disposables.add(ye.register(this)),this.updateStyles(_e.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Le=this.getSelection(),Ie=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Le.length>0||Ie.length>0),this.listMultiSelection.set(Le.length>1),this.listDoubleSelection.set(Le.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Le=this.getSelection(),Ie=this.getFocus();this.listHasSelectionOrFocus.set(Le.length>0||Ie.length>0)})),this.disposables.add(ke.onDidChangeConfiguration(Le=>{Le.affectsConfiguration(p)&&(this._useAltAsMultipleSelectionModifier=O(ke));let Ie={};if(Le.affectsConfiguration(E)&&this.horizontalScrolling===void 0){const Ae=!!ke.getValue(E);Ie=Object.assign(Object.assign({},Ie),{horizontalScrolling:Ae})}if(Le.affectsConfiguration(R)){const Ae=!!ke.getValue(R);Ie=Object.assign(Object.assign({},Ie),{scrollByPage:Ae})}if(Le.affectsConfiguration(P)){const Ae=!!ke.getValue(P);Ie=Object.assign(Object.assign({},Ie),{smoothScrolling:Ae})}if(Le.affectsConfiguration(x)){const Ae=ke.getValue(x);Ie=Object.assign(Object.assign({},Ie),{mouseWheelScrollSensitivity:Ae})}if(Le.affectsConfiguration(W)){const Ae=ke.getValue(W);Ie=Object.assign(Object.assign({},Ie),{fastScrollSensitivity:Ae})}Object.keys(Ie).length>0&&this.updateOptions(Ie)})),this.navigator=new H(this,Object.assign({configurationService:ke},_e)),this.disposables.add(this.navigator)}updateOptions(Z){super.updateOptions(Z),Z.overrideStyles!==void 0&&this.updateStyles(Z.overrideStyles),Z.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!Z.multipleSelectionSupport)}updateStyles(Z){this.style(Z?(0,d.getListStyles)(Z):d.defaultListStyles)}};se=Ne([fe(5,r.IContextKeyService),fe(6,e.IListService),fe(7,i.IConfigurationService),fe(8,o.IInstantiationService)],se),e.WorkbenchList=se;let le=class extends k.PagedList{constructor(Z,ue,me,Ce,_e,we,ye,ke,De){const ge=typeof _e.horizontalScrolling<"u"?_e.horizontalScrolling:!!ke.getValue(E),[pe,ae]=De.invokeFunction(Q,_e);super(Z,ue,me,Ce,Object.assign(Object.assign({keyboardSupport:!1},pe),{horizontalScrolling:ge})),this.disposables=new n.DisposableStore,this.disposables.add(ae),this.contextKeyService=v(we,this),this.horizontalScrolling=_e.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(_e.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!_e.selectionNavigation),this._useAltAsMultipleSelectionModifier=O(ke),this.disposables.add(this.contextKeyService),this.disposables.add(ye.register(this)),this.updateStyles(_e.overrideStyles),this.disposables.add(ke.onDidChangeConfiguration(Le=>{Le.affectsConfiguration(p)&&(this._useAltAsMultipleSelectionModifier=O(ke));let Ie={};if(Le.affectsConfiguration(E)&&this.horizontalScrolling===void 0){const Ae=!!ke.getValue(E);Ie=Object.assign(Object.assign({},Ie),{horizontalScrolling:Ae})}if(Le.affectsConfiguration(R)){const Ae=!!ke.getValue(R);Ie=Object.assign(Object.assign({},Ie),{scrollByPage:Ae})}if(Le.affectsConfiguration(P)){const Ae=!!ke.getValue(P);Ie=Object.assign(Object.assign({},Ie),{smoothScrolling:Ae})}if(Le.affectsConfiguration(x)){const Ae=ke.getValue(x);Ie=Object.assign(Object.assign({},Ie),{mouseWheelScrollSensitivity:Ae})}if(Le.affectsConfiguration(W)){const Ae=ke.getValue(W);Ie=Object.assign(Object.assign({},Ie),{fastScrollSensitivity:Ae})}Object.keys(Ie).length>0&&this.updateOptions(Ie)})),this.navigator=new H(this,Object.assign({configurationService:ke},_e)),this.disposables.add(this.navigator)}updateOptions(Z){super.updateOptions(Z),Z.overrideStyles!==void 0&&this.updateStyles(Z.overrideStyles),Z.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!Z.multipleSelectionSupport)}updateStyles(Z){this.style(Z?(0,d.getListStyles)(Z):d.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};le=Ne([fe(5,r.IContextKeyService),fe(6,e.IListService),fe(7,i.IConfigurationService),fe(8,o.IInstantiationService)],le),e.WorkbenchPagedList=le;let te=class extends D.Table{constructor(Z,ue,me,Ce,_e,we,ye,ke,De,ge){const pe=typeof we.horizontalScrolling<"u"?we.horizontalScrolling:!!De.getValue(E),[ae,ve]=ge.invokeFunction(Q,we);super(Z,ue,me,Ce,_e,Object.assign(Object.assign({keyboardSupport:!1},ae),{horizontalScrolling:pe})),this.disposables.add(ve),this.contextKeyService=v(ye,this),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(we.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!we.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=we.horizontalScrolling,this._useAltAsMultipleSelectionModifier=O(De),this.disposables.add(this.contextKeyService),this.disposables.add(ke.register(this)),this.updateStyles(we.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Ie=this.getSelection(),Ae=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Ie.length>0||Ae.length>0),this.listMultiSelection.set(Ie.length>1),this.listDoubleSelection.set(Ie.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Ie=this.getSelection(),Ae=this.getFocus();this.listHasSelectionOrFocus.set(Ie.length>0||Ae.length>0)})),this.disposables.add(De.onDidChangeConfiguration(Ie=>{Ie.affectsConfiguration(p)&&(this._useAltAsMultipleSelectionModifier=O(De));let Ae={};if(Ie.affectsConfiguration(E)&&this.horizontalScrolling===void 0){const be=!!De.getValue(E);Ae=Object.assign(Object.assign({},Ae),{horizontalScrolling:be})}if(Ie.affectsConfiguration(R)){const be=!!De.getValue(R);Ae=Object.assign(Object.assign({},Ae),{scrollByPage:be})}if(Ie.affectsConfiguration(P)){const be=!!De.getValue(P);Ae=Object.assign(Object.assign({},Ae),{smoothScrolling:be})}if(Ie.affectsConfiguration(x)){const be=De.getValue(x);Ae=Object.assign(Object.assign({},Ae),{mouseWheelScrollSensitivity:be})}if(Ie.affectsConfiguration(W)){const be=De.getValue(W);Ae=Object.assign(Object.assign({},Ae),{fastScrollSensitivity:be})}Object.keys(Ae).length>0&&this.updateOptions(Ae)})),this.navigator=new B(this,Object.assign({configurationService:De},we)),this.disposables.add(this.navigator)}updateOptions(Z){super.updateOptions(Z),Z.overrideStyles!==void 0&&this.updateStyles(Z.overrideStyles),Z.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!Z.multipleSelectionSupport)}updateStyles(Z){this.style(Z?(0,d.getListStyles)(Z):d.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};te=Ne([fe(6,r.IContextKeyService),fe(7,e.IListService),fe(8,i.IConfigurationService),fe(9,o.IInstantiationService)],te),e.WorkbenchTable=te;class re extends n.Disposable{constructor(Z,ue){var me;super(),this.widget=Z,this._onDidOpen=this._register(new m.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(m.Event.filter(this.widget.onDidChangeSelection,Ce=>Ce.browserEvent instanceof KeyboardEvent)(Ce=>this.onSelectionFromKeyboard(Ce))),this._register(this.widget.onPointer(Ce=>this.onPointer(Ce.element,Ce.browserEvent))),this._register(this.widget.onMouseDblClick(Ce=>this.onMouseDblClick(Ce.element,Ce.browserEvent))),typeof ue?.openOnSingleClick!="boolean"&&ue?.configurationService?(this.openOnSingleClick=ue?.configurationService.getValue(L)!=="doubleClick",this._register(ue?.configurationService.onDidChangeConfiguration(Ce=>{Ce.affectsConfiguration(L)&&(this.openOnSingleClick=ue?.configurationService.getValue(L)!=="doubleClick")}))):this.openOnSingleClick=(me=ue?.openOnSingleClick)!==null&&me!==void 0?me:!0}onSelectionFromKeyboard(Z){if(Z.elements.length!==1)return;const ue=Z.browserEvent,me=typeof ue.preserveFocus=="boolean"?ue.preserveFocus:!0,Ce=typeof ue.pinned=="boolean"?ue.pinned:!me,_e=!1;this._open(this.getSelectedElement(),me,Ce,_e,Z.browserEvent)}onPointer(Z,ue){if(!this.openOnSingleClick||ue.detail===2)return;const Ce=ue.button===1,_e=!0,we=Ce,ye=ue.ctrlKey||ue.metaKey||ue.altKey;this._open(Z,_e,we,ye,ue)}onMouseDblClick(Z,ue){if(!ue)return;const me=ue.target;if(me.classList.contains("monaco-tl-twistie")||me.classList.contains("monaco-icon-label")&&me.classList.contains("folder-icon")&&ue.offsetX<16)return;const _e=!1,we=!0,ye=ue.ctrlKey||ue.metaKey||ue.altKey;this._open(Z,_e,we,ye,ue)}_open(Z,ue,me,Ce,_e){Z&&this._onDidOpen.fire({editorOptions:{preserveFocus:ue,pinned:me,revealIfVisible:!0},sideBySide:Ce,element:Z,browserEvent:_e})}}class H extends re{constructor(Z,ue){super(Z,ue),this.widget=Z}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class B extends re{constructor(Z,ue){super(Z,ue)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class j extends re{constructor(Z,ue){super(Z,ue)}getSelectedElement(){var Z;return(Z=this.widget.getSelection()[0])!==null&&Z!==void 0?Z:void 0}}function G(X){let Z=!1;return ue=>{if(ue.toKeyCodeChord().isModifierKey())return!1;if(Z)return Z=!1,!1;const me=X.softDispatch(ue,ue.target);return me?.kind===1?(Z=!0,!1):(Z=!1,!me)}}let Y=class extends h.ObjectTree{constructor(Z,ue,me,Ce,_e,we,ye,ke,De){const{options:ge,getTypeNavigationMode:pe,disposable:ae}=we.invokeFunction(V,_e);super(Z,ue,me,Ce,ge),this.disposables.add(ae),this.internals=new K(this,_e,pe,_e.overrideStyles,ye,ke,De),this.disposables.add(this.internals)}updateOptions(Z){super.updateOptions(Z),this.internals.updateOptions(Z)}};Y=Ne([fe(5,o.IInstantiationService),fe(6,r.IContextKeyService),fe(7,e.IListService),fe(8,i.IConfigurationService)],Y),e.WorkbenchObjectTree=Y;let ne=class extends h.CompressibleObjectTree{constructor(Z,ue,me,Ce,_e,we,ye,ke,De){const{options:ge,getTypeNavigationMode:pe,disposable:ae}=we.invokeFunction(V,_e);super(Z,ue,me,Ce,ge),this.disposables.add(ae),this.internals=new K(this,_e,pe,_e.overrideStyles,ye,ke,De),this.disposables.add(this.internals)}updateOptions(Z={}){super.updateOptions(Z),Z.overrideStyles&&this.internals.updateStyleOverrides(Z.overrideStyles),this.internals.updateOptions(Z)}};ne=Ne([fe(5,o.IInstantiationService),fe(6,r.IContextKeyService),fe(7,e.IListService),fe(8,i.IConfigurationService)],ne),e.WorkbenchCompressibleObjectTree=ne;let de=class extends _.DataTree{constructor(Z,ue,me,Ce,_e,we,ye,ke,De,ge){const{options:pe,getTypeNavigationMode:ae,disposable:ve}=ye.invokeFunction(V,we);super(Z,ue,me,Ce,_e,pe),this.disposables.add(ve),this.internals=new K(this,we,ae,we.overrideStyles,ke,De,ge),this.disposables.add(this.internals)}updateOptions(Z={}){super.updateOptions(Z),Z.overrideStyles!==void 0&&this.internals.updateStyleOverrides(Z.overrideStyles),this.internals.updateOptions(Z)}};de=Ne([fe(6,o.IInstantiationService),fe(7,r.IContextKeyService),fe(8,e.IListService),fe(9,i.IConfigurationService)],de),e.WorkbenchDataTree=de;let he=class extends b.AsyncDataTree{get onDidOpen(){return this.internals.onDidOpen}constructor(Z,ue,me,Ce,_e,we,ye,ke,De,ge){const{options:pe,getTypeNavigationMode:ae,disposable:ve}=ye.invokeFunction(V,we);super(Z,ue,me,Ce,_e,pe),this.disposables.add(ve),this.internals=new K(this,we,ae,we.overrideStyles,ke,De,ge),this.disposables.add(this.internals)}updateOptions(Z={}){super.updateOptions(Z),Z.overrideStyles&&this.internals.updateStyleOverrides(Z.overrideStyles),this.internals.updateOptions(Z)}};he=Ne([fe(6,o.IInstantiationService),fe(7,r.IContextKeyService),fe(8,e.IListService),fe(9,i.IConfigurationService)],he),e.WorkbenchAsyncDataTree=he;let oe=class extends b.CompressibleAsyncDataTree{constructor(Z,ue,me,Ce,_e,we,ye,ke,De,ge,pe){const{options:ae,getTypeNavigationMode:ve,disposable:Le}=ke.invokeFunction(V,ye);super(Z,ue,me,Ce,_e,we,ae),this.disposables.add(Le),this.internals=new K(this,ye,ve,ye.overrideStyles,De,ge,pe),this.disposables.add(this.internals)}updateOptions(Z){super.updateOptions(Z),this.internals.updateOptions(Z)}};oe=Ne([fe(7,o.IInstantiationService),fe(8,r.IContextKeyService),fe(9,e.IListService),fe(10,i.IConfigurationService)],oe),e.WorkbenchCompressibleAsyncDataTree=oe;function ce(X){const Z=X.getValue(I);if(Z==="highlight")return w.TreeFindMode.Highlight;if(Z==="filter")return w.TreeFindMode.Filter;const ue=X.getValue(F);if(ue==="simple"||ue==="highlight")return w.TreeFindMode.Highlight;if(ue==="filter")return w.TreeFindMode.Filter}function z(X){const Z=X.getValue(M);if(Z==="fuzzy")return w.TreeFindMatchType.Fuzzy;if(Z==="contiguous")return w.TreeFindMatchType.Contiguous}function V(X,Z){var ue;const me=X.get(i.IConfigurationService),Ce=X.get(g.IContextViewService),_e=X.get(r.IContextKeyService),we=X.get(o.IInstantiationService),ye=()=>{const ve=_e.getContextKeyValue(C);if(ve==="automatic")return y.TypeNavigationMode.Automatic;if(ve==="trigger"||_e.getContextKeyValue(f)===!1)return y.TypeNavigationMode.Trigger;const Ie=me.getValue(T);if(Ie==="automatic")return y.TypeNavigationMode.Automatic;if(Ie==="trigger")return y.TypeNavigationMode.Trigger},ke=Z.horizontalScrolling!==void 0?Z.horizontalScrolling:!!me.getValue(E),[De,ge]=we.invokeFunction(Q,Z),pe=Z.additionalScrollHeight,ae=Z.renderIndentGuides!==void 0?Z.renderIndentGuides:me.getValue(A);return{getTypeNavigationMode:ye,disposable:ge,options:Object.assign(Object.assign({keyboardSupport:!1},De),{indent:typeof me.getValue(N)=="number"?me.getValue(N):void 0,renderIndentGuides:ae,smoothScrolling:!!me.getValue(P),defaultFindMode:ce(me),defaultFindMatchType:z(me),horizontalScrolling:ke,scrollByPage:!!me.getValue(R),additionalScrollHeight:pe,hideTwistiesOfChildlessElements:Z.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(ue=Z.expandOnlyOnTwistieClick)!==null&&ue!==void 0?ue:me.getValue(U)==="doubleClick",contextViewProvider:Ce,findWidgetStyles:d.defaultFindWidgetStyles})}}let K=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(Z,ue,me,Ce,_e,we,ye){var ke;this.tree=Z,this.disposables=[],this.contextKeyService=v(_e,Z),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ue.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!ue.selectionNavigation),this.listSupportFindWidget=e.WorkbenchListSupportsFind.bindTo(this.contextKeyService),this.listSupportFindWidget.set((ke=ue.findWidgetEnabled)!==null&&ke!==void 0?ke:!0),this.hasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.hasDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.hasMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.treeElementCanCollapse=e.WorkbenchTreeElementCanCollapse.bindTo(this.contextKeyService),this.treeElementHasParent=e.WorkbenchTreeElementHasParent.bindTo(this.contextKeyService),this.treeElementCanExpand=e.WorkbenchTreeElementCanExpand.bindTo(this.contextKeyService),this.treeElementHasChild=e.WorkbenchTreeElementHasChild.bindTo(this.contextKeyService),this.treeFindOpen=e.WorkbenchTreeFindOpen.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=O(ye),this.updateStyleOverrides(Ce);const ge=()=>{const ae=Z.getFocus()[0];if(!ae)return;const ve=Z.getNode(ae);this.treeElementCanCollapse.set(ve.collapsible&&!ve.collapsed),this.treeElementHasParent.set(!!Z.getParentElement(ae)),this.treeElementCanExpand.set(ve.collapsible&&ve.collapsed),this.treeElementHasChild.set(!!Z.getFirstElementChild(ae))},pe=new Set;pe.add(C),pe.add(f),this.disposables.push(this.contextKeyService,we.register(Z),Z.onDidChangeSelection(()=>{const ae=Z.getSelection(),ve=Z.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(ae.length>0||ve.length>0),this.hasMultiSelection.set(ae.length>1),this.hasDoubleSelection.set(ae.length===2)})}),Z.onDidChangeFocus(()=>{const ae=Z.getSelection(),ve=Z.getFocus();this.hasSelectionOrFocus.set(ae.length>0||ve.length>0),ge()}),Z.onDidChangeCollapseState(ge),Z.onDidChangeModel(ge),Z.onDidChangeFindOpenState(ae=>this.treeFindOpen.set(ae)),ye.onDidChangeConfiguration(ae=>{let ve={};if(ae.affectsConfiguration(p)&&(this._useAltAsMultipleSelectionModifier=O(ye)),ae.affectsConfiguration(N)){const Le=ye.getValue(N);ve=Object.assign(Object.assign({},ve),{indent:Le})}if(ae.affectsConfiguration(A)&&ue.renderIndentGuides===void 0){const Le=ye.getValue(A);ve=Object.assign(Object.assign({},ve),{renderIndentGuides:Le})}if(ae.affectsConfiguration(P)){const Le=!!ye.getValue(P);ve=Object.assign(Object.assign({},ve),{smoothScrolling:Le})}if(ae.affectsConfiguration(I)||ae.affectsConfiguration(F)){const Le=ce(ye);ve=Object.assign(Object.assign({},ve),{defaultFindMode:Le})}if(ae.affectsConfiguration(T)||ae.affectsConfiguration(F)){const Le=me();ve=Object.assign(Object.assign({},ve),{typeNavigationMode:Le})}if(ae.affectsConfiguration(M)){const Le=z(ye);ve=Object.assign(Object.assign({},ve),{defaultFindMatchType:Le})}if(ae.affectsConfiguration(E)&&ue.horizontalScrolling===void 0){const Le=!!ye.getValue(E);ve=Object.assign(Object.assign({},ve),{horizontalScrolling:Le})}if(ae.affectsConfiguration(R)){const Le=!!ye.getValue(R);ve=Object.assign(Object.assign({},ve),{scrollByPage:Le})}if(ae.affectsConfiguration(U)&&ue.expandOnlyOnTwistieClick===void 0&&(ve=Object.assign(Object.assign({},ve),{expandOnlyOnTwistieClick:ye.getValue(U)==="doubleClick"})),ae.affectsConfiguration(x)){const Le=ye.getValue(x);ve=Object.assign(Object.assign({},ve),{mouseWheelScrollSensitivity:Le})}if(ae.affectsConfiguration(W)){const Le=ye.getValue(W);ve=Object.assign(Object.assign({},ve),{fastScrollSensitivity:Le})}Object.keys(ve).length>0&&Z.updateOptions(ve)}),this.contextKeyService.onDidChangeContext(ae=>{ae.affectsSome(pe)&&Z.updateOptions({typeNavigationMode:me()})})),this.navigator=new j(Z,Object.assign({configurationService:ye},ue)),this.disposables.push(this.navigator)}updateOptions(Z){Z.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!Z.multipleSelectionSupport)}updateStyleOverrides(Z){this.tree.style(Z?(0,d.getListStyles)(Z):d.defaultListStyles)}dispose(){this.disposables=(0,n.dispose)(this.disposables)}};K=Ne([fe(4,r.IContextKeyService),fe(5,e.IListService),fe(6,i.IConfigurationService)],K),a.Registry.as(s.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,t.localize)(0,null),type:"object",properties:{[p]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,t.localize)(1,null),(0,t.localize)(2,null)],default:"ctrlCmd",description:(0,t.localize)(3,null)},[L]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,t.localize)(4,null)},[E]:{type:"boolean",default:!1,description:(0,t.localize)(5,null)},[R]:{type:"boolean",default:!1,description:(0,t.localize)(6,null)},[N]:{type:"number",default:8,minimum:4,maximum:40,description:(0,t.localize)(7,null)},[A]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,t.localize)(8,null)},[P]:{type:"boolean",default:!1,description:(0,t.localize)(9,null)},[x]:{type:"number",default:1,markdownDescription:(0,t.localize)(10,null)},[W]:{type:"number",default:5,markdownDescription:(0,t.localize)(11,null)},[I]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,t.localize)(12,null),(0,t.localize)(13,null)],default:"highlight",description:(0,t.localize)(14,null)},[F]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,t.localize)(15,null),(0,t.localize)(16,null),(0,t.localize)(17,null)],default:"highlight",description:(0,t.localize)(18,null),deprecated:!0,deprecationMessage:(0,t.localize)(19,null)},[M]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,t.localize)(20,null),(0,t.localize)(21,null)],default:"fuzzy",description:(0,t.localize)(22,null)},[U]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,t.localize)(23,null)},[T]:{type:"string",enum:["automatic","trigger"],default:"automatic",description:(0,t.localize)(24,null)}}})}),define(J[80],ee([1,0,12,29,32,6,18,20,685,226,34]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spinningLoading=e.syncing=e.gotoNextLocation=e.gotoPreviousLocation=e.widgetClose=e.iconsSchemaId=e.getIconRegistry=e.registerIcon=e.IconFontDefinition=e.IconContribution=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};var n;(function(a){function d(u,C){let f=u.defaults;for(;y.ThemeIcon.isThemeIcon(f);){const v=s.getIcon(f.id);if(!v)return;f=v.defaults}return f}a.getDefinition=d})(n=e.IconContribution||(e.IconContribution={}));var t;(function(a){function d(C){return{weight:C.weight,style:C.style,src:C.src.map(f=>({format:f.format,location:f.location.toString()}))}}a.toJSONObject=d;function u(C){const f=v=>(0,w.isString)(v)?v:void 0;if(C&&Array.isArray(C.src)&&C.src.every(v=>(0,w.isString)(v.format)&&(0,w.isString)(v.location)))return{weight:f(C.weight),style:f(C.style),src:C.src.map(v=>({format:v.format,location:b.URI.parse(v.location)}))}}a.fromJSONObject=u})(t=e.IconFontDefinition||(e.IconFontDefinition={}));class i{constructor(){this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,_.localize)(0,null)},fontCharacter:{type:"string",description:(0,_.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${y.ThemeIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(d,u,C,f){const v=this.iconsById[d];if(v){if(C&&!v.description){v.description=C,this.iconSchema.properties[d].markdownDescription=`${C} $(${d})`;const E=this.iconReferenceSchema.enum.indexOf(d);E!==-1&&(this.iconReferenceSchema.enumDescriptions[E]=C),this._onDidChange.fire()}return v}const p={id:d,description:C,defaults:u,deprecationMessage:f};this.iconsById[d]=p;const L={$ref:"#/definitions/icons"};return f&&(L.deprecationMessage=f),C&&(L.markdownDescription=`${C}: $(${d})`),this.iconSchema.properties[d]=L,this.iconReferenceSchema.enum.push(d),this.iconReferenceSchema.enumDescriptions.push(C||""),this._onDidChange.fire(),{id:d}}getIcons(){return Object.keys(this.iconsById).map(d=>this.iconsById[d])}getIcon(d){return this.iconsById[d]}getIconSchema(){return this.iconSchema}toString(){const d=(v,p)=>v.id.localeCompare(p.id),u=v=>{for(;y.ThemeIcon.isThemeIcon(v.defaults);)v=this.iconsById[v.defaults.id];return`codicon codicon-${v?v.id:""}`},C=[];C.push("| preview | identifier | default codicon ID | description"),C.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const f=Object.keys(this.iconsById).map(v=>this.iconsById[v]);for(const v of f.filter(p=>!!p.description).sort(d))C.push(`|<i class="${u(v)}"></i>|${v.id}|${y.ThemeIcon.isThemeIcon(v.defaults)?v.defaults.id:v.id}|${v.description||""}|`);C.push("| preview | identifier "),C.push("| ----------- | --------------------------------- |");for(const v of f.filter(p=>!y.ThemeIcon.isThemeIcon(p.defaults)).sort(d))C.push(`|<i class="${u(v)}"></i>|${v.id}|`);return C.join(`\n`)}}const s=new i;m.Registry.add(e.Extensions.IconContribution,s);function r(a,d,u,C){return s.registerIcon(a,d,u,C)}e.registerIcon=r;function c(){return s}e.getIconRegistry=c;function g(){const a=(0,k.getCodiconFontCharacters)();for(const d in a){const u="\\\\"+a[d].toString(16);s.registerIcon(d,{fontCharacter:u})}}g(),e.iconsSchemaId="vscode://schemas/icons";const o=m.Registry.as(h.Extensions.JSONContribution);o.registerSchema(e.iconsSchemaId,s.getIconSchema());const l=new S.RunOnceScheduler(()=>o.notifySchemaChanged(e.iconsSchemaId),200);s.onDidChange(()=>{l.isScheduled()||l.schedule()}),e.widgetClose=r("widget-close",k.Codicon.close,(0,_.localize)(2,null)),e.gotoPreviousLocation=r("goto-previous-location",k.Codicon.arrowUp,(0,_.localize)(3,null)),e.gotoNextLocation=r("goto-next-location",k.Codicon.arrowDown,(0,_.localize)(4,null)),e.syncing=y.ThemeIcon.modify(k.Codicon.sync,"spin"),e.spinningLoading=y.ThemeIcon.modify(k.Codicon.loading,"spin")}),define(J[782],ee([1,0,574,7,35,69,77,41,2,74,15,30,40,86,13,109,81,14,32,29,80,38,177,401]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const f=3;class v{constructor(A,P,x,W){this.originalLineStart=A,this.originalLineEnd=P,this.modifiedLineStart=x,this.modifiedLineEnd=W}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class p{constructor(A){this.entries=A}}const L=(0,a.registerIcon)("diff-review-insert",l.Codicon.add,S.localize(0,null)),E=(0,a.registerIcon)("diff-review-remove",l.Codicon.remove,S.localize(1,null)),I=(0,a.registerIcon)("diff-review-close",l.Codicon.close,S.localize(2,null));let T=class Tt extends _.Disposable{constructor(A,P,x){super(),this._languageService=P,this._audioCueService=x,this._width=0,this._diffEditor=A,this._isVisible=!1,this.shadow=(0,y.createFastDomNode)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,y.createFastDomNode)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new D.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new b.Action("diffreview.close",S.localize(3,null),"close-diff-review "+o.ThemeIcon.asClassName(I),!0,()=>Ee(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=(0,y.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,y.createFastDomNode)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new w.DomScrollableElement(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(A.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(A.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(k.addStandardDisposableListener(this.domNode.domNode,"click",W=>{W.preventDefault();const U=k.findParentWithClass(W.target,"diff-review-row");U&&this._goToRow(U)})),this._register(k.addStandardDisposableListener(this.domNode.domNode,"keydown",W=>{(W.equals(18)||W.equals(2066)||W.equals(530))&&(W.preventDefault(),this._goToRow(this._getNextRow(),"next")),(W.equals(16)||W.equals(2064)||W.equals(528))&&(W.preventDefault(),this._goToRow(this._getPrevRow(),"previous")),(W.equals(9)||W.equals(2057)||W.equals(521)||W.equals(1033)||W.equals(10)||W.equals(3))&&(W.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let A=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let x=-1;for(let W=0,U=this._diffs.length;W<U;W++)if(this._diffs[W]===this._currentDiff){x=W;break}A=this._diffs.length+x-1}else A=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;A=A%this._diffs.length;const P=this._diffs[A].entries;this._diffEditor.setPosition(new s.Position(P[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:P[0].modifiedLineStart,endColumn:1073741824,endLineNumber:P[P.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getPrevRow(),"previous")}next(){let A=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let x=-1;for(let W=0,U=this._diffs.length;W<U;W++)if(this._diffs[W]===this._currentDiff){x=W;break}A=x+1}else A=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;A=A%this._diffs.length;const P=this._diffs[A].entries;this._diffEditor.setPosition(new s.Position(P[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:P[0].modifiedLineStart,endColumn:1073741824,endLineNumber:P[P.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow(),"next")}accept(){let A=-1;const P=this._getCurrentFocusedRow();if(P){const x=parseInt(P.getAttribute("data-line"),10);isNaN(x)||(A=x)}this.hide(),A!==-1&&(this._diffEditor.setPosition(new s.Position(A,1)),this._diffEditor.revealPosition(new s.Position(A,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const A=this._getCurrentFocusedRow();return A?A.previousElementSibling?A.previousElementSibling:A:this._getFirstRow()}_getNextRow(){const A=this._getCurrentFocusedRow();return A?A.nextElementSibling?A.nextElementSibling:A:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const A=document.activeElement;return A&&/diff-review-row/.test(A.className)?A:null}_goToRow(A,P){const x=this._getCurrentFocusedRow();A.tabIndex=0,A.focus(),x&&x!==A&&(x.tabIndex=-1);const W=P?P==="next"?x?.nextElementSibling:x?.previousElementSibling:x;W?.classList.contains("line-insert")?this._audioCueService.playAudioCue(u.AudioCue.diffLineInserted,!0):W?.classList.contains("line-delete")&&this._audioCueService.playAudioCue(u.AudioCue.diffLineDeleted,!0),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(A,P,x){this._width=P,this.shadow.setTop(A-6),this.shadow.setWidth(P),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(A),this.domNode.setWidth(P),this.domNode.setHeight(x),this._content.setHeight(x),this._content.setWidth(P),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const A=this._diffEditor.getLineChanges();if(!A||A.length===0)return[];const P=this._diffEditor.getOriginalEditor().getModel(),x=this._diffEditor.getModifiedEditor().getModel();return!P||!x?[]:Tt._mergeAdjacent(A,P.getLineCount(),x.getLineCount())}static _mergeAdjacent(A,P,x){if(!A||A.length===0)return[];const W=[];let U=0;for(let se=0,le=A.length;se<le;se++){const te=A[se],re=te.originalStartLineNumber,H=te.originalEndLineNumber,B=te.modifiedStartLineNumber,j=te.modifiedEndLineNumber,G=[];let Y=0;{const ne=H===0?re:re-1,de=j===0?B:B-1;let he=1,oe=1;if(se>0){const V=A[se-1];V.originalEndLineNumber===0?he=V.originalStartLineNumber+1:he=V.originalEndLineNumber+1,V.modifiedEndLineNumber===0?oe=V.modifiedStartLineNumber+1:oe=V.modifiedEndLineNumber+1}let ce=ne-f+1,z=de-f+1;if(ce<he){const V=he-ce;ce=ce+V,z=z+V}if(z<oe){const V=oe-z;ce=ce+V,z=z+V}G[Y++]=new v(ce,ne,z,de)}H!==0&&(G[Y++]=new v(re,H,0,0)),j!==0&&(G[Y++]=new v(0,0,B,j));{const ne=H===0?re+1:H+1,de=j===0?B+1:j+1;let he=P,oe=x;if(se+1<le){const V=A[se+1];V.originalEndLineNumber===0?he=V.originalStartLineNumber:he=V.originalStartLineNumber-1,V.modifiedEndLineNumber===0?oe=V.modifiedStartLineNumber:oe=V.modifiedStartLineNumber-1}let ce=ne+f-1,z=de+f-1;if(ce>he){const V=he-ce;ce=ce+V,z=z+V}if(z>oe){const V=oe-z;ce=ce+V,z=z+V}G[Y++]=new v(ne,ce,de,z)}W[U++]=new p(G)}let O=W[0].entries;const $=[];let Q=0;for(let se=1,le=W.length;se<le;se++){const te=W[se].entries,re=O[O.length-1],H=te[0];if(re.getType()===0&&H.getType()===0&&H.originalLineStart<=re.originalLineEnd){O[O.length-1]=new v(re.originalLineStart,H.originalLineEnd,re.modifiedLineStart,H.modifiedLineEnd),O=O.concat(te.slice(1));continue}$[Q++]=new p(O),O=te}return $[Q++]=new p(O),$}_findDiffIndex(A){const P=A.lineNumber;for(let x=0,W=this._diffs.length;x<W;x++){const U=this._diffs[x].entries,O=U[U.length-1].modifiedLineEnd;if(P<=O)return x}return 0}_render(){const A=this._diffEditor.getOriginalEditor().getOptions(),P=this._diffEditor.getModifiedEditor().getOptions(),x=this._diffEditor.getOriginalEditor().getModel(),W=this._diffEditor.getModifiedEditor().getModel(),U=x.getOptions(),O=W.getOptions();if(!this._isVisible||!x||!W){k.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const $=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[$]===this._currentDiff)return;this._currentDiff=this._diffs[$];const Q=this._diffs[$].entries,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\'),(0,h.applyFontInfo)(se,P.get(48));let le=0,te=0,re=0,H=0;for(let z=0,V=Q.length;z<V;z++){const K=Q[z],ie=K.originalLineStart,X=K.originalLineEnd,Z=K.modifiedLineStart,ue=K.modifiedLineEnd;ie!==0&&(le===0||ie<le)&&(le=ie),X!==0&&(te===0||X>te)&&(te=X),Z!==0&&(re===0||Z<re)&&(re=Z),ue!==0&&(H===0||ue>H)&&(H=ue)}const B=document.createElement("div");B.className="diff-review-row";const j=document.createElement("div");j.className="diff-review-cell diff-review-summary";const G=te-le+1,Y=H-re+1;j.appendChild(document.createTextNode(`${$+1}/${this._diffs.length}: @@ -${le},${G} +${re},${Y} @@`)),B.setAttribute("data-line",String(re));const ne=z=>z===0?S.localize(4,null):z===1?S.localize(5,null):S.localize(6,null,z),de=ne(G),he=ne(Y);B.setAttribute("aria-label",S.localize(7,null,$+1,this._diffs.length,le,de,re,he)),B.appendChild(j),B.setAttribute("role","listitem"),se.appendChild(B);const oe=P.get(64);let ce=re;for(let z=0,V=Q.length;z<V;z++){const K=Q[z];Tt._renderSection(se,K,ce,oe,this._width,A,x,U,P,W,O,this._languageService.languageIdCodec),K.modifiedLineStart!==0&&(ce=K.modifiedLineEnd)}k.clearNode(this._content.domNode),this._content.domNode.appendChild(se),this.scrollbar.scanDomNode()}static _renderSection(A,P,x,W,U,O,$,Q,se,le,te,re){const H=P.getType();let B="diff-review-row",j="";const G="diff-review-spacer";let Y=null;switch(H){case 1:B="diff-review-row line-insert",j=" char-insert",Y=L;break;case 2:B="diff-review-row line-delete",j=" char-delete",Y=E;break}const ne=P.originalLineStart,de=P.originalLineEnd,he=P.modifiedLineStart,oe=P.modifiedLineEnd,ce=Math.max(oe-he,de-ne),z=O.get(139),V=z.glyphMarginWidth+z.lineNumbersWidth,K=se.get(139),ie=10+K.glyphMarginWidth+K.lineNumbersWidth;for(let X=0;X<=ce;X++){const Z=ne===0?0:ne+X,ue=he===0?0:he+X,me=document.createElement("div");me.style.minWidth=U+"px",me.className=B,me.setAttribute("role","listitem"),ue!==0&&(x=ue),me.setAttribute("data-line",String(x));const Ce=document.createElement("div");Ce.className="diff-review-cell",Ce.style.height=`${W}px`,me.appendChild(Ce);const _e=document.createElement("span");_e.style.width=V+"px",_e.style.minWidth=V+"px",_e.className="diff-review-line-number"+j,Z!==0?_e.appendChild(document.createTextNode(String(Z))):_e.innerText="\\xA0",Ce.appendChild(_e);const we=document.createElement("span");we.style.width=ie+"px",we.style.minWidth=ie+"px",we.style.paddingRight="10px",we.className="diff-review-line-number"+j,ue!==0?we.appendChild(document.createTextNode(String(ue))):we.innerText="\\xA0",Ce.appendChild(we);const ye=document.createElement("span");if(ye.className=G,Y){const ge=document.createElement("span");ge.className=o.ThemeIcon.asClassName(Y),ge.innerText="\\xA0\\xA0",ye.appendChild(ge)}else ye.innerText="\\xA0\\xA0";Ce.appendChild(ye);let ke;if(ue!==0){let ge=this._renderLine(le,se,te.tabSize,ue,re);Tt._ttPolicy&&(ge=Tt._ttPolicy.createHTML(ge)),Ce.insertAdjacentHTML("beforeend",ge),ke=le.getLineContent(ue)}else{let ge=this._renderLine($,O,Q.tabSize,Z,re);Tt._ttPolicy&&(ge=Tt._ttPolicy.createHTML(ge)),Ce.insertAdjacentHTML("beforeend",ge),ke=$.getLineContent(Z)}ke.length===0&&(ke=S.localize(8,null));let De="";switch(H){case 0:Z===ue?De=S.localize(9,null,ke,Z):De=S.localize(10,null,ke,Z,ue);break;case 1:De=S.localize(11,null,ke,ue);break;case 2:De=S.localize(12,null,ke,Z);break}me.setAttribute("aria-label",De),A.appendChild(me)}}static _renderLine(A,P,x,W,U){const O=A.getLineContent(W),$=P.get(48),Q=i.LineTokens.createEmpty(O,U),se=c.ViewLineRenderingData.isBasicASCII(O,A.mightContainNonBasicASCII()),le=c.ViewLineRenderingData.containsRTL(O,se,A.mightContainRTL());return(0,r.renderViewLine2)(new r.RenderLineInput($.isMonospace&&!P.get(31),$.canUseHalfwidthRightwardsArrow,O,!1,se,le,0,Q,[],x,0,$.spaceWidth,$.middotWidth,$.wsmiddotWidth,P.get(112),P.get(94),P.get(89),P.get(49)!==t.EditorFontLigatures.OFF,null)).html}};T._ttPolicy=(C=window.trustedTypes)===null||C===void 0?void 0:C.createPolicy("diffReview",{createHTML:N=>N}),T=Ne([fe(1,d.ILanguageService),fe(2,u.IAudioCueService)],T),e.DiffReview=T;class F extends m.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:S.localize(13,null),alias:"Go to Next Difference",precondition:g.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(A,P){const x=M(A);x?.diffReviewNext()}}class R extends m.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:S.localize(14,null),alias:"Go to Previous Difference",precondition:g.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(A,P){const x=M(A);x?.diffReviewPrev()}}function M(N){const A=N.get(n.ICodeEditorService),P=A.listDiffEditors(),x=A.getActiveCodeEditor();if(!x)return null;for(let W=0,U=P.length;W<U;W++){const O=P[W];if(O.getModifiedEditor().getId()===x.getId()||O.getOriginalEditor().getId()===x.getId())return O}return null}(0,m.registerEditorAction)(F),(0,m.registerEditorAction)(R)}),define(J[783],ee([1,0,7,50,77,29,6,2,9,18,38,124,225,638,14,47,31,80,32,423]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsWidget=void 0;const l=S.$,a=(0,g.registerIcon)("parameter-hints-next",D.Codicon.chevronDown,i.localize(0,null)),d=(0,g.registerIcon)("parameter-hints-previous",D.Codicon.chevronUp,i.localize(1,null));let u=class Ui extends b.Disposable{constructor(f,v,p,L,E){super(),this.editor=f,this.model=v,this.renderDisposeables=this._register(new b.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new n.MarkdownRenderer({editor:f},E,L)),this.keyVisible=t.Context.Visible.bindTo(p),this.keyMultipleSignatures=t.Context.MultipleSignatures.bindTo(p)}createParameterHintDOMNodes(){const f=l(".editor-widget.parameter-hints-widget"),v=S.append(f,l(".phwrapper"));v.tabIndex=-1;const p=S.append(v,l(".controls")),L=S.append(p,l(".button"+o.ThemeIcon.asCSSSelector(d))),E=S.append(p,l(".overloads")),I=S.append(p,l(".button"+o.ThemeIcon.asCSSSelector(a)));this._register(S.addDisposableListener(L,"click",A=>{S.EventHelper.stop(A),this.previous()})),this._register(S.addDisposableListener(I,"click",A=>{S.EventHelper.stop(A),this.next()}));const T=l(".body"),F=new y.DomScrollableElement(T,{alwaysConsumeMouseWheel:!0});this._register(F),v.appendChild(F.getDomNode());const R=S.append(T,l(".signature")),M=S.append(T,l(".docs"));f.style.userSelect="text",this.domNodes={element:f,signature:R,overloads:E,docs:M,scrollbar:F},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(A=>{this.visible&&this.editor.layoutContentWidget(this)}));const N=()=>{if(!this.domNodes)return;const A=this.editor.getOption(48);this.domNodes.element.style.fontSize=`${A.fontSize}px`,this.domNodes.element.style.lineHeight=`${A.lineHeight/A.fontSize}`};N(),this._register(w.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(A=>A.hasChanged(48)).on(N,null)),this._register(this.editor.onDidLayoutChange(A=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var f;(f=this.domNodes)===null||f===void 0||f.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var f;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(f=this.domNodes)===null||f===void 0||f.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(f){var v;if(this.renderDisposeables.clear(),!this.domNodes)return;const p=f.signatures.length>1;this.domNodes.element.classList.toggle("multiple",p),this.keyMultipleSignatures.set(p),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const L=f.signatures[f.activeSignature];if(!L)return;const E=S.append(this.domNodes.signature,l(".code")),I=this.editor.getOption(48);E.style.fontSize=`${I.fontSize}px`,E.style.fontFamily=I.fontFamily;const T=L.parameters.length>0,F=(v=L.activeParameter)!==null&&v!==void 0?v:f.activeParameter;if(T)this.renderParameters(E,L,F);else{const N=S.append(E,l("span"));N.textContent=L.label}const R=L.parameters[F];if(R?.documentation){const N=l("span.documentation");if(typeof R.documentation=="string")N.textContent=R.documentation;else{const A=this.renderMarkdownDocs(R.documentation);N.appendChild(A.element)}S.append(this.domNodes.docs,l("p",{},N))}if(L.documentation!==void 0)if(typeof L.documentation=="string")S.append(this.domNodes.docs,l("p",{},L.documentation));else{const N=this.renderMarkdownDocs(L.documentation);S.append(this.domNodes.docs,N.element)}const M=this.hasDocs(L,R);if(this.domNodes.signature.classList.toggle("has-docs",M),this.domNodes.docs.classList.toggle("empty",!M),this.domNodes.overloads.textContent=String(f.activeSignature+1).padStart(f.signatures.length.toString().length,"0")+"/"+f.signatures.length,R){let N="";const A=L.parameters[F];Array.isArray(A.label)?N=L.label.substring(A.label[0],A.label[1]):N=A.label,A.documentation&&(N+=typeof A.documentation=="string"?`, ${A.documentation}`:`, ${A.documentation.value}`),L.documentation&&(N+=typeof L.documentation=="string"?`, ${L.documentation}`:`, ${L.documentation.value}`),this.announcedLabel!==N&&(k.alert(i.localize(2,null,N)),this.announcedLabel=N)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(f){const v=this.renderDisposeables.add(this.markdownRenderer.render(f,{asyncRenderCallback:()=>{var p;(p=this.domNodes)===null||p===void 0||p.scrollbar.scanDomNode()}}));return v.element.classList.add("markdown-docs"),v}hasDocs(f,v){return!!(v&&typeof v.documentation=="string"&&(0,h.assertIsDefined)(v.documentation).length>0||v&&typeof v.documentation=="object"&&(0,h.assertIsDefined)(v.documentation).value.length>0||f.documentation&&typeof f.documentation=="string"&&(0,h.assertIsDefined)(f.documentation).length>0||f.documentation&&typeof f.documentation=="object"&&(0,h.assertIsDefined)(f.documentation.value).length>0)}renderParameters(f,v,p){const[L,E]=this.getParameterLabelOffsets(v,p),I=document.createElement("span");I.textContent=v.label.substring(0,L);const T=document.createElement("span");T.textContent=v.label.substring(L,E),T.className="parameter active";const F=document.createElement("span");F.textContent=v.label.substring(E),S.append(f,I,T,F)}getParameterLabelOffsets(f,v){const p=f.parameters[v];if(p){if(Array.isArray(p.label))return p.label;if(p.label.length){const L=new RegExp(`(\\\\W|^)${(0,_.escapeRegExpCharacters)(p.label)}(?=\\\\W|$)`,"g");L.test(f.label);const E=L.lastIndex-p.label.length;return E>=0?[E,L.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()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return Ui.ID}updateMaxHeight(){if(!this.domNodes)return;const v=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=v;const p=this.domNodes.element.getElementsByClassName("phwrapper");p.length&&(p[0].style.maxHeight=v)}};u.ID="editor.widget.parameterHintsWidget",u=Ne([fe(2,s.IContextKeyService),fe(3,r.IOpenerService),fe(4,m.ILanguageService)],u),e.ParameterHintsWidget=u,(0,c.registerColor)("editorHoverWidget.highlightForeground",{dark:c.listHighlightForeground,light:c.listHighlightForeground,hcDark:c.listHighlightForeground,hcLight:c.listHighlightForeground},i.localize(3,null))}),define(J[784],ee([1,0,100,2,15,22,26,19,700,225,637,14,8,783]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=void 0;let s=class Ki extends k.Disposable{static get(l){return l.getContribution(Ki.ID)}constructor(l,a,d){super(),this.editor=l,this.model=this._register(new _.ParameterHintsModel(l,d.signatureHelpProvider)),this._register(this.model.onChangedHints(u=>{var C;u?(this.widget.value.show(),this.widget.value.render(u)):(C=this.widget.rawValue)===null||C===void 0||C.hide()})),this.widget=new S.Lazy(()=>this._register(a.createInstance(i.ParameterHintsWidget,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var l;(l=this.widget.rawValue)===null||l===void 0||l.previous()}next(){var l;(l=this.widget.rawValue)===null||l===void 0||l.next()}trigger(l){this.model.trigger(l,0)}};s.ID="editor.controller.parameterHints",s=Ne([fe(1,t.IInstantiationService),fe(2,b.ILanguageFeaturesService)],s);class r extends y.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:m.localize(0,null),alias:"Trigger Parameter Hints",precondition:D.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})}run(l,a){const d=s.get(a);d?.trigger({triggerKind:w.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=r,(0,y.registerEditorContribution)(s.ID,s,2),(0,y.registerEditorAction)(r);const c=100+75,g=y.EditorCommand.bindToContribution(s.get);(0,y.registerEditorCommand)(new g({id:"closeParameterHints",precondition:h.Context.Visible,handler:o=>o.cancel(),kbOpts:{weight:c,kbExpr:D.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,y.registerEditorCommand)(new g({id:"showPrevParameterHint",precondition:n.ContextKeyExpr.and(h.Context.Visible,h.Context.MultipleSignatures),handler:o=>o.previous(),kbOpts:{weight:c,kbExpr:D.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,y.registerEditorCommand)(new g({id:"showNextParameterHint",precondition:n.ContextKeyExpr.and(h.Context.Visible,h.Context.MultipleSignatures),handler:o=>o.next(),kbOpts:{weight:c,kbExpr:D.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(J[785],ee([1,0,7,69,41,2,124,8,718,80,32,430]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const n=26;let t=class extends D.Disposable{constructor(r,c){super(),this._editor=r,this.instantiationService=c,this.banner=this._register(this.instantiationService.createInstance(i))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(r){this.banner.show(Object.assign(Object.assign({},r),{onClose:()=>{var c;this.hide(),(c=r.onClose)===null||c===void 0||c.call(r)}})),this._editor.setBanner(this.banner.element,n)}};t=Ne([fe(1,b.IInstantiationService)],t),e.BannerController=t;let i=class extends D.Disposable{constructor(r){super(),this.instantiationService=r,this.markdownRenderer=this.instantiationService.createInstance(w.MarkdownRenderer,{}),this.element=(0,S.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(r){if(r.ariaLabel)return r.ariaLabel;if(typeof r.message=="string")return r.message}getBannerMessage(r){if(typeof r=="string"){const c=(0,S.$)("span");return c.innerText=r,c}return this.markdownRenderer.render(r).element}clear(){(0,S.clearNode)(this.element)}show(r){(0,S.clearNode)(this.element);const c=this.getAriaLabel(r);c&&this.element.setAttribute("aria-label",c);const g=(0,S.append)(this.element,(0,S.$)("div.icon-container"));g.setAttribute("aria-hidden","true"),r.icon&&g.appendChild((0,S.$)(`div${m.ThemeIcon.asCSSSelector(r.icon)}`));const o=(0,S.append)(this.element,(0,S.$)("div.message-container"));if(o.setAttribute("aria-hidden","true"),o.appendChild(this.getBannerMessage(r.message)),this.messageActionsContainer=(0,S.append)(this.element,(0,S.$)("div.message-actions-container")),r.actions)for(const a of r.actions)this._register(this.instantiationService.createInstance(_.Link,this.messageActionsContainer,Object.assign(Object.assign({},a),{tabIndex:-1}),{}));const l=(0,S.append)(this.element,(0,S.$)("div.action-container"));this.actionBar=this._register(new k.ActionBar(l)),this.actionBar.push(this._register(new y.Action("banner.close","Close Banner",m.ThemeIcon.asClassName(h.widgetClose),!0,()=>{typeof r.onClose=="function"&&r.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};i=Ne([fe(0,b.IInstantiationService)],i)}),define(J[786],ee([1,0,7,6,32,80]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function w(_){const h=new k.Emitter,m=(0,D.getIconRegistry)();return m.onDidChange(()=>h.fire()),_?.onDidProductIconThemeChange(()=>h.fire()),{onDidChange:h.event,getCSS(){const n=_?_.getProductIconTheme():new b,t={},i=r=>{const c=n.getIcon(r);if(!c)return;const g=c.font;return g?(t[g.id]=g.definition,`.codicon-${r.id}:before { content: \'${c.fontCharacter}\'; font-family: ${(0,S.asCSSPropertyValue)(g.id)}; }`):`.codicon-${r.id}:before { content: \'${c.fontCharacter}\'; }`},s=[];for(const r of m.getIcons()){const c=i(r);c&&s.push(c)}for(const r in t){const c=t[r],g=c.weight?`font-weight: ${c.weight};`:"",o=c.style?`font-style: ${c.style};`:"",l=c.src.map(a=>`${(0,S.asCSSUrl)(a.location)} format(\'${a.format}\')`).join(", ");s.push(`@font-face { src: ${l}; font-family: ${(0,S.asCSSPropertyValue)(r)};${g}${o} font-display: block; }`)}return s.join(`\n`)}}}e.getIconsStyleSheet=w;class b{getIcon(h){const m=(0,D.getIconRegistry)();let n=h.defaults;for(;y.ThemeIcon.isThemeIcon(n);){const t=m.getIcon(n.id);if(!t)return;n=t.defaults}return n}}e.UnthemedProductIconTheme=b}),define(J[91],ee([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var S;(function(D){D.DARK="dark",D.LIGHT="light",D.HIGH_CONTRAST_DARK="hcDark",D.HIGH_CONTRAST_LIGHT="hcLight"})(S=e.ColorScheme||(e.ColorScheme={}));function k(D){return D===S.HIGH_CONTRAST_DARK||D===S.HIGH_CONTRAST_LIGHT}e.isHighContrast=k;function y(D){return D===S.DARK||D===S.HIGH_CONTRAST_DARK}e.isDark=y}),define(J[326],ee([1,0,46,35,17,445,134,138,109,91,40]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLine=e.ViewLineOptions=void 0;const n=function(){return y.isNative?!0:!(y.isLinux||S.isFirefox||S.isSafari)}();let t=!0;class i{constructor(u,C){this.themeType=C;const f=u.options,v=f.get(48);f.get(36)==="off"?this.renderWhitespace=f.get(94):this.renderWhitespace="none",this.renderControlCharacters=f.get(89),this.spaceWidth=v.spaceWidth,this.middotWidth=v.middotWidth,this.wsmiddotWidth=v.wsmiddotWidth,this.useMonospaceOptimizations=v.isMonospace&&!f.get(31),this.canUseHalfwidthRightwardsArrow=v.canUseHalfwidthRightwardsArrow,this.lineHeight=f.get(64),this.stopRenderingLineAfter=f.get(112),this.fontLigatures=f.get(49)}equals(u){return this.themeType===u.themeType&&this.renderWhitespace===u.renderWhitespace&&this.renderControlCharacters===u.renderControlCharacters&&this.spaceWidth===u.spaceWidth&&this.middotWidth===u.middotWidth&&this.wsmiddotWidth===u.wsmiddotWidth&&this.useMonospaceOptimizations===u.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===u.canUseHalfwidthRightwardsArrow&&this.lineHeight===u.lineHeight&&this.stopRenderingLineAfter===u.stopRenderingLineAfter&&this.fontLigatures===u.fontLigatures}}e.ViewLineOptions=i;class s{constructor(u){this._options=u,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(u){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,k.createFastDomNode)(u);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(u){this._isMaybeInvalid=!0,this._options=u}onSelectionChanged(){return(0,h.isHighContrast)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(u,C,f,v){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const p=f.getViewLineRenderingData(u),L=this._options,E=b.LineDecoration.filter(p.inlineDecorations,u,p.minColumn,p.maxColumn);let I=null;if((0,h.isHighContrast)(L.themeType)||this._options.renderWhitespace==="selection"){const M=f.selections;for(const N of M){if(N.endLineNumber<u||N.startLineNumber>u)continue;const A=N.startLineNumber===u?N.startColumn:p.minColumn,P=N.endLineNumber===u?N.endColumn:p.maxColumn;A<P&&((0,h.isHighContrast)(L.themeType)&&E.push(new b.LineDecoration(A,P,"inline-selected-text",0)),this._options.renderWhitespace==="selection"&&(I||(I=[]),I.push(new _.LineRange(A-1,P-1))))}}const T=new _.RenderLineInput(L.useMonospaceOptimizations,L.canUseHalfwidthRightwardsArrow,p.content,p.continuesWithWrappedLine,p.isBasicASCII,p.containsRTL,p.minColumn-1,p.tokens,E,p.tabSize,p.startVisibleColumn,L.spaceWidth,L.middotWidth,L.wsmiddotWidth,L.stopRenderingLineAfter,L.renderWhitespace,L.renderControlCharacters,L.fontLigatures!==m.EditorFontLigatures.OFF,I);if(this._renderedViewLine&&this._renderedViewLine.input.equals(T))return!1;v.appendString(\'<div style="top:\'),v.appendString(String(C)),v.appendString("px;height:"),v.appendString(String(this._options.lineHeight)),v.appendString(\'px;" class="\'),v.appendString(s.CLASS_NAME),v.appendString(\'">\');const F=(0,_.renderViewLine)(T,v);v.appendString("</div>");let R=null;return t&&n&&p.isBasicASCII&&L.useMonospaceOptimizations&&F.containsForeignElements===0&&(R=new r(this._renderedViewLine?this._renderedViewLine.domNode:null,T,F.characterMapping)),R||(R=o(this._renderedViewLine?this._renderedViewLine.domNode:null,T,F.characterMapping,F.containsRTL,F.containsForeignElements)),this._renderedViewLine=R,!0}layoutLine(u,C){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(C),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(u){return this._renderedViewLine?this._renderedViewLine.getWidth(u):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():t}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof r&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(u,C,f,v){if(!this._renderedViewLine)return null;C=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,C)),f=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,f));const p=this._renderedViewLine.input.stopRenderingLineAfter;if(p!==-1&&C>p+1&&f>p+1)return new w.VisibleRanges(!0,[new w.FloatHorizontalRange(this.getWidth(v),0)]);p!==-1&&C>p+1&&(C=p+1),p!==-1&&f>p+1&&(f=p+1);const L=this._renderedViewLine.getVisibleRangesForRange(u,C,f,v);return L&&L.length>0?new w.VisibleRanges(!1,L):null}getColumnOfNodeOffset(u,C,f){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(u,C,f):1}}s.CLASS_NAME="view-line",e.ViewLine=s;class r{constructor(u,C,f){this._cachedWidth=-1,this.domNode=u,this.input=C;const v=Math.floor(C.lineContent.length/300);if(v>0){this._keyColumnPixelOffsetCache=new Float32Array(v);for(let p=0;p<v;p++)this._keyColumnPixelOffsetCache[p]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=f,this._charWidth=C.spaceWidth}getWidth(u){if(!this.domNode||this.input.lineContent.length<300){const C=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*C)}return this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,u?.markDidDomLayout()),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||this._cachedWidth!==-1}monospaceAssumptionsAreValid(){if(!this.domNode)return t;if(this.input.lineContent.length<300){const u=this.getWidth(null),C=this.domNode.domNode.firstChild.offsetWidth;Math.abs(u-C)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),t=!1)}return t}toSlowRenderedLine(){return o(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(u,C,f,v){const p=this._getColumnPixelOffset(u,C,v),L=this._getColumnPixelOffset(u,f,v);return[new w.FloatHorizontalRange(p,L-p)]}_getColumnPixelOffset(u,C,f){if(C<=300){const T=this._characterMapping.getHorizontalOffset(C);return this._charWidth*T}const v=Math.floor((C-1)/300)-1,p=(v+1)*300+1;let L=-1;if(this._keyColumnPixelOffsetCache&&(L=this._keyColumnPixelOffsetCache[v],L===-1&&(L=this._actualReadPixelOffset(u,p,f),this._keyColumnPixelOffsetCache[v]=L)),L===-1){const T=this._characterMapping.getHorizontalOffset(C);return this._charWidth*T}const E=this._characterMapping.getHorizontalOffset(p),I=this._characterMapping.getHorizontalOffset(C);return L+this._charWidth*(I-E)}_getReadingTarget(u){return u.domNode.firstChild}_actualReadPixelOffset(u,C,f){if(!this.domNode)return-1;const v=this._characterMapping.getDomPosition(C),p=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(this.domNode),v.partIndex,v.charIndex,v.partIndex,v.charIndex,f);return!p||p.length===0?-1:p[0].left}getColumnOfNodeOffset(u,C,f){const v=C.textContent.length;let p=-1;for(;C;)C=C.previousSibling,p++;return this._characterMapping.getColumn(new _.DomPosition(p,f),v)}}class c{constructor(u,C,f,v,p){if(this.domNode=u,this.input=C,this._characterMapping=f,this._isWhitespaceOnly=/^\\s*$/.test(C.lineContent),this._containsForeignElements=p,this._cachedWidth=-1,this._pixelOffsetCache=null,!v||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let L=0,E=this._characterMapping.length;L<=E;L++)this._pixelOffsetCache[L]=-1}}_getReadingTarget(u){return u.domNode.firstChild}getWidth(u){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,u?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(u,C,f,v){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const p=this._readPixelOffset(this.domNode,u,C,v);if(p===-1)return null;const L=this._readPixelOffset(this.domNode,u,f,v);return L===-1?null:[new w.FloatHorizontalRange(p,L-p)]}return this._readVisibleRangesForRange(this.domNode,u,C,f,v)}_readVisibleRangesForRange(u,C,f,v,p){if(f===v){const L=this._readPixelOffset(u,C,f,p);return L===-1?null:[new w.FloatHorizontalRange(L,0)]}else return this._readRawVisibleRangesForRange(u,f,v,p)}_readPixelOffset(u,C,f,v){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(v);const p=this._getReadingTarget(u);return p.firstChild?(v.markDidDomLayout(),p.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const p=this._pixelOffsetCache[f];if(p!==-1)return p;const L=this._actualReadPixelOffset(u,C,f,v);return this._pixelOffsetCache[f]=L,L}return this._actualReadPixelOffset(u,C,f,v)}_actualReadPixelOffset(u,C,f,v){if(this._characterMapping.length===0){const I=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),0,0,0,0,v);return!I||I.length===0?-1:I[0].left}if(f===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(v);const p=this._characterMapping.getDomPosition(f),L=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),p.partIndex,p.charIndex,p.partIndex,p.charIndex,v);if(!L||L.length===0)return-1;const E=L[0].left;if(this.input.isBasicASCII){const I=this._characterMapping.getHorizontalOffset(f),T=Math.round(this.input.spaceWidth*I);if(Math.abs(T-E)<=1)return T}return E}_readRawVisibleRangesForRange(u,C,f,v){if(C===1&&f===this._characterMapping.length)return[new w.FloatHorizontalRange(0,this.getWidth(v))];const p=this._characterMapping.getDomPosition(C),L=this._characterMapping.getDomPosition(f);return D.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),p.partIndex,p.charIndex,L.partIndex,L.charIndex,v)}getColumnOfNodeOffset(u,C,f){const v=C.textContent.length;let p=-1;for(;C;)C=C.previousSibling,p++;return this._characterMapping.getColumn(new _.DomPosition(p,f),v)}}class g extends c{_readVisibleRangesForRange(u,C,f,v,p){const L=super._readVisibleRangesForRange(u,C,f,v,p);if(!L||L.length===0||f===v||f===1&&v===this._characterMapping.length)return L;if(!this.input.containsRTL){const E=this._readPixelOffset(u,C,v,p);if(E!==-1){const I=L[L.length-1];I.left<E&&(I.width=E-I.left)}}return L}}const o=function(){return S.isWebKit?l:a}();function l(d,u,C,f,v){return new g(d,u,C,f,v)}function a(d,u,C,f,v){return new c(d,u,C,f,v)}}),define(J[327],ee([1,0,151,52,326,13,5,75,7,254]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;class m{constructor(v=null){this.hitTarget=v,this.type=0}}class n{constructor(v,p,L){this.position=v,this.spanNode=p,this.injectedText=L,this.type=1}}var t;(function(f){function v(p,L,E){const I=p.getPositionFromDOMInfo(L,E);return I?new n(I,L,null):new m(L)}f.createFromDOMInfo=v})(t||(t={}));class i{constructor(v,p){this.lastViewCursorsRenderData=v,this.lastTextareaPosition=p}}e.PointerHandlerLastRenderData=i;class s{static _deduceRage(v,p=null){return!p&&v?new w.Range(v.lineNumber,v.column,v.lineNumber,v.column):p??null}static createUnknown(v,p,L){return{type:0,element:v,mouseColumn:p,position:L,range:this._deduceRage(L)}}static createTextarea(v,p){return{type:1,element:v,mouseColumn:p,position:null,range:null}}static createMargin(v,p,L,E,I,T){return{type:v,element:p,mouseColumn:L,position:E,range:I,detail:T}}static createViewZone(v,p,L,E,I){return{type:v,element:p,mouseColumn:L,position:E,range:this._deduceRage(E),detail:I}}static createContentText(v,p,L,E,I){return{type:6,element:v,mouseColumn:p,position:L,range:this._deduceRage(L,E),detail:I}}static createContentEmpty(v,p,L,E){return{type:7,element:v,mouseColumn:p,position:L,range:this._deduceRage(L),detail:E}}static createContentWidget(v,p,L){return{type:9,element:v,mouseColumn:p,position:null,range:null,detail:L}}static createScrollbar(v,p,L){return{type:11,element:v,mouseColumn:p,position:L,range:this._deduceRage(L)}}static createOverlayWidget(v,p,L){return{type:12,element:v,mouseColumn:p,position:null,range:null,detail:L}}static createOutsideEditor(v,p,L,E){return{type:13,element:null,mouseColumn:v,position:p,range:this._deduceRage(p),outsidePosition:L,outsideDistance:E}}static _typeToString(v){return v===1?"TEXTAREA":v===2?"GUTTER_GLYPH_MARGIN":v===3?"GUTTER_LINE_NUMBERS":v===4?"GUTTER_LINE_DECORATIONS":v===5?"GUTTER_VIEW_ZONE":v===6?"CONTENT_TEXT":v===7?"CONTENT_EMPTY":v===8?"CONTENT_VIEW_ZONE":v===9?"CONTENT_WIDGET":v===10?"OVERVIEW_RULER":v===11?"SCROLLBAR":v===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(v){return this._typeToString(v.type)+": "+v.position+" - "+v.range+" - "+JSON.stringify(v.detail)}}e.MouseTarget=s;class r{static isTextArea(v){return v.length===2&&v[0]===3&&v[1]===6}static isChildOfViewLines(v){return v.length>=4&&v[0]===3&&v[3]===7}static isStrictChildOfViewLines(v){return v.length>4&&v[0]===3&&v[3]===7}static isChildOfScrollableElement(v){return v.length>=2&&v[0]===3&&v[1]===5}static isChildOfMinimap(v){return v.length>=2&&v[0]===3&&v[1]===8}static isChildOfContentWidgets(v){return v.length>=4&&v[0]===3&&v[3]===1}static isChildOfOverflowingContentWidgets(v){return v.length>=1&&v[0]===2}static isChildOfOverlayWidgets(v){return v.length>=2&&v[0]===3&&v[1]===4}}class c{constructor(v,p,L){this.viewModel=v.viewModel;const E=v.configuration.options;this.layoutInfo=E.get(139),this.viewDomNode=p.viewDomNode,this.lineHeight=E.get(64),this.stickyTabStops=E.get(111),this.typicalHalfwidthCharacterWidth=E.get(48).typicalHalfwidthCharacterWidth,this.lastRenderData=L,this._context=v,this._viewHelper=p}getZoneAtCoord(v){return c.getZoneAtCoord(this._context,v)}static getZoneAtCoord(v,p){const L=v.viewLayout.getWhitespaceAtVerticalOffset(p);if(L){const E=L.verticalOffset+L.height/2,I=v.viewModel.getLineCount();let T=null,F,R=null;return L.afterLineNumber!==I&&(R=new D.Position(L.afterLineNumber+1,1)),L.afterLineNumber>0&&(T=new D.Position(L.afterLineNumber,v.viewModel.getLineMaxColumn(L.afterLineNumber))),R===null?F=T:T===null?F=R:p<E?F=T:F=R,{viewZoneId:L.id,afterLineNumber:L.afterLineNumber,positionBefore:T,positionAfter:R,position:F}}return null}getFullLineRangeAtCoord(v){if(this._context.viewLayout.isAfterLines(v)){const E=this._context.viewModel.getLineCount(),I=this._context.viewModel.getLineMaxColumn(E);return{range:new w.Range(E,I,E,I),isAfterLines:!0}}const p=this._context.viewLayout.getLineNumberAtVerticalOffset(v),L=this._context.viewModel.getLineMaxColumn(p);return{range:new w.Range(p,1,p,L),isAfterLines:!1}}getLineNumberAtVerticalOffset(v){return this._context.viewLayout.getLineNumberAtVerticalOffset(v)}isAfterLines(v){return this._context.viewLayout.isAfterLines(v)}isInTopPadding(v){return this._context.viewLayout.isInTopPadding(v)}isInBottomPadding(v){return this._context.viewLayout.isInBottomPadding(v)}getVerticalOffsetForLineNumber(v){return this._context.viewLayout.getVerticalOffsetForLineNumber(v)}findAttribute(v,p){return c._findAttribute(v,p,this._viewHelper.viewDomNode)}static _findAttribute(v,p,L){for(;v&&v!==document.body;){if(v.hasAttribute&&v.hasAttribute(p))return v.getAttribute(p);if(v===L)return null;v=v.parentNode}return null}getLineWidth(v){return this._viewHelper.getLineWidth(v)}visibleRangeForPosition(v,p){return this._viewHelper.visibleRangeForPosition(v,p)}getPositionFromDOMInfo(v,p){return this._viewHelper.getPositionFromDOMInfo(v,p)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=c;class g{constructor(v,p,L,E){this.editorPos=p,this.pos=L,this.relativePos=E,this.mouseVerticalOffset=Math.max(0,v.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=v.getCurrentScrollLeft()+this.relativePos.x-v.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<v.layoutInfo.contentLeft&&this.relativePos.x>=v.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,d._getMouseColumn(this.mouseContentHorizontalOffset,v.typicalHalfwidthCharacterWidth))}}class o extends g{constructor(v,p,L,E,I){super(v,p,L,E),this._ctx=v,I?(this.target=I,this.targetPath=k.PartFingerprints.collect(I,v.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}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(v=null){return v&&v.column<this._ctx.viewModel.getLineMaxColumn(v.lineNumber)?b.CursorColumns.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(v.lineNumber),v.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(v=null){return s.createUnknown(this.target,this._getMouseColumn(v),v)}fulfillTextarea(){return s.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(v,p,L,E){return s.createMargin(v,this.target,this._getMouseColumn(p),p,L,E)}fulfillViewZone(v,p,L){return s.createViewZone(v,this.target,this._getMouseColumn(p),p,L)}fulfillContentText(v,p,L){return s.createContentText(this.target,this._getMouseColumn(v),v,p,L)}fulfillContentEmpty(v,p){return s.createContentEmpty(this.target,this._getMouseColumn(v),v,p)}fulfillContentWidget(v){return s.createContentWidget(this.target,this._getMouseColumn(),v)}fulfillScrollbar(v){return s.createScrollbar(this.target,this._getMouseColumn(v),v)}fulfillOverlayWidget(v){return s.createOverlayWidget(this.target,this._getMouseColumn(),v)}withTarget(v){return new o(this._ctx,this.editorPos,this.pos,this.relativePos,v)}}const l={isAfterLines:!0};function a(f){return{isAfterLines:!1,horizontalDistanceToText:f}}class d{constructor(v,p){this._context=v,this._viewHelper=p}mouseTargetIsWidget(v){const p=v.target,L=k.PartFingerprints.collect(p,this._viewHelper.viewDomNode);return!!(r.isChildOfContentWidgets(L)||r.isChildOfOverflowingContentWidgets(L)||r.isChildOfOverlayWidgets(L))}createMouseTarget(v,p,L,E,I){const T=new c(this._context,this._viewHelper,v),F=new o(T,p,L,E,I);try{const R=d._createMouseTarget(T,F,!1);if(R.type===6&&T.stickyTabStops&&R.position!==null){const M=d._snapToSoftTabBoundary(R.position,T.viewModel),N=w.Range.fromPositions(M,M).plusRange(R.range);return F.fulfillContentText(M,N,R.detail)}return R}catch{return F.fulfillUnknown()}}static _createMouseTarget(v,p,L){if(p.target===null){if(L)return p.fulfillUnknown();const T=d._doHitTest(v,p);return T.type===1?d.createMouseTargetFromHitTestPosition(v,p,T.spanNode,T.position,T.injectedText):this._createMouseTarget(v,p.withTarget(T.hitTarget),!0)}const E=p;let I=null;return I=I||d._hitTestContentWidget(v,E),I=I||d._hitTestOverlayWidget(v,E),I=I||d._hitTestMinimap(v,E),I=I||d._hitTestScrollbarSlider(v,E),I=I||d._hitTestViewZone(v,E),I=I||d._hitTestMargin(v,E),I=I||d._hitTestViewCursor(v,E),I=I||d._hitTestTextArea(v,E),I=I||d._hitTestViewLines(v,E,L),I=I||d._hitTestScrollbar(v,E),I||p.fulfillUnknown()}static _hitTestContentWidget(v,p){if(r.isChildOfContentWidgets(p.targetPath)||r.isChildOfOverflowingContentWidgets(p.targetPath)){const L=v.findAttribute(p.target,"widgetId");return L?p.fulfillContentWidget(L):p.fulfillUnknown()}return null}static _hitTestOverlayWidget(v,p){if(r.isChildOfOverlayWidgets(p.targetPath)){const L=v.findAttribute(p.target,"widgetId");return L?p.fulfillOverlayWidget(L):p.fulfillUnknown()}return null}static _hitTestViewCursor(v,p){if(p.target){const L=v.lastRenderData.lastViewCursorsRenderData;for(const E of L)if(p.target===E.domNode)return p.fulfillContentText(E.position,null,{mightBeForeignElement:!1,injectedText:null})}if(p.isInContentArea){const L=v.lastRenderData.lastViewCursorsRenderData,E=p.mouseContentHorizontalOffset,I=p.mouseVerticalOffset;for(const T of L){if(E<T.contentLeft||E>T.contentLeft+T.width)continue;const F=v.getVerticalOffsetForLineNumber(T.position.lineNumber);if(F<=I&&I<=F+T.height)return p.fulfillContentText(T.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(v,p){const L=v.getZoneAtCoord(p.mouseVerticalOffset);if(L){const E=p.isInContentArea?8:5;return p.fulfillViewZone(E,L.position,L)}return null}static _hitTestTextArea(v,p){return r.isTextArea(p.targetPath)?v.lastRenderData.lastTextareaPosition?p.fulfillContentText(v.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):p.fulfillTextarea():null}static _hitTestMargin(v,p){if(p.isInMarginArea){const L=v.getFullLineRangeAtCoord(p.mouseVerticalOffset),E=L.range.getStartPosition();let I=Math.abs(p.relativePos.x);const T={isAfterLines:L.isAfterLines,glyphMarginLeft:v.layoutInfo.glyphMarginLeft,glyphMarginWidth:v.layoutInfo.glyphMarginWidth,lineNumbersWidth:v.layoutInfo.lineNumbersWidth,offsetX:I};return I-=v.layoutInfo.glyphMarginLeft,I<=v.layoutInfo.glyphMarginWidth?p.fulfillMargin(2,E,L.range,T):(I-=v.layoutInfo.glyphMarginWidth,I<=v.layoutInfo.lineNumbersWidth?p.fulfillMargin(3,E,L.range,T):(I-=v.layoutInfo.lineNumbersWidth,p.fulfillMargin(4,E,L.range,T)))}return null}static _hitTestViewLines(v,p,L){if(!r.isChildOfViewLines(p.targetPath))return null;if(v.isInTopPadding(p.mouseVerticalOffset))return p.fulfillContentEmpty(new D.Position(1,1),l);if(v.isAfterLines(p.mouseVerticalOffset)||v.isInBottomPadding(p.mouseVerticalOffset)){const I=v.viewModel.getLineCount(),T=v.viewModel.getLineMaxColumn(I);return p.fulfillContentEmpty(new D.Position(I,T),l)}if(L){if(r.isStrictChildOfViewLines(p.targetPath)){const I=v.getLineNumberAtVerticalOffset(p.mouseVerticalOffset);if(v.viewModel.getLineLength(I)===0){const F=v.getLineWidth(I),R=a(p.mouseContentHorizontalOffset-F);return p.fulfillContentEmpty(new D.Position(I,1),R)}const T=v.getLineWidth(I);if(p.mouseContentHorizontalOffset>=T){const F=a(p.mouseContentHorizontalOffset-T),R=new D.Position(I,v.viewModel.getLineMaxColumn(I));return p.fulfillContentEmpty(R,F)}}return p.fulfillUnknown()}const E=d._doHitTest(v,p);return E.type===1?d.createMouseTargetFromHitTestPosition(v,p,E.spanNode,E.position,E.injectedText):this._createMouseTarget(v,p.withTarget(E.hitTarget),!0)}static _hitTestMinimap(v,p){if(r.isChildOfMinimap(p.targetPath)){const L=v.getLineNumberAtVerticalOffset(p.mouseVerticalOffset),E=v.viewModel.getLineMaxColumn(L);return p.fulfillScrollbar(new D.Position(L,E))}return null}static _hitTestScrollbarSlider(v,p){if(r.isChildOfScrollableElement(p.targetPath)&&p.target&&p.target.nodeType===1){const L=p.target.className;if(L&&/\\b(slider|scrollbar)\\b/.test(L)){const E=v.getLineNumberAtVerticalOffset(p.mouseVerticalOffset),I=v.viewModel.getLineMaxColumn(E);return p.fulfillScrollbar(new D.Position(E,I))}}return null}static _hitTestScrollbar(v,p){if(r.isChildOfScrollableElement(p.targetPath)){const L=v.getLineNumberAtVerticalOffset(p.mouseVerticalOffset),E=v.viewModel.getLineMaxColumn(L);return p.fulfillScrollbar(new D.Position(L,E))}return null}getMouseColumn(v){const p=this._context.configuration.options,L=p.get(139),E=this._context.viewLayout.getCurrentScrollLeft()+v.x-L.contentLeft;return d._getMouseColumn(E,p.get(48).typicalHalfwidthCharacterWidth)}static _getMouseColumn(v,p){return v<0?1:Math.round(v/p)+1}static createMouseTargetFromHitTestPosition(v,p,L,E,I){const T=E.lineNumber,F=E.column,R=v.getLineWidth(T);if(p.mouseContentHorizontalOffset>R){const $=a(p.mouseContentHorizontalOffset-R);return p.fulfillContentEmpty(E,$)}const M=v.visibleRangeForPosition(T,F);if(!M)return p.fulfillUnknown(E);const N=M.left;if(Math.abs(p.mouseContentHorizontalOffset-N)<1)return p.fulfillContentText(E,null,{mightBeForeignElement:!!I,injectedText:I});const A=[];if(A.push({offset:M.left,column:F}),F>1){const $=v.visibleRangeForPosition(T,F-1);$&&A.push({offset:$.left,column:F-1})}const P=v.viewModel.getLineMaxColumn(T);if(F<P){const $=v.visibleRangeForPosition(T,F+1);$&&A.push({offset:$.left,column:F+1})}A.sort(($,Q)=>$.offset-Q.offset);const x=p.pos.toClientCoordinates(),W=L.getBoundingClientRect(),U=W.left<=x.clientX&&x.clientX<=W.right;let O=null;for(let $=1;$<A.length;$++){const Q=A[$-1],se=A[$];if(Q.offset<=p.mouseContentHorizontalOffset&&p.mouseContentHorizontalOffset<=se.offset){O=new w.Range(T,Q.column,T,se.column);const le=Math.abs(Q.offset-p.mouseContentHorizontalOffset),te=Math.abs(se.offset-p.mouseContentHorizontalOffset);E=le<te?new D.Position(T,Q.column):new D.Position(T,se.column);break}}return p.fulfillContentText(E,O,{mightBeForeignElement:!U||!!I,injectedText:I})}static _doHitTestWithCaretRangeFromPoint(v,p){const L=v.getLineNumberAtVerticalOffset(p.mouseVerticalOffset),E=v.getVerticalOffsetForLineNumber(L),I=E+v.lineHeight;if(!(L===v.viewModel.getLineCount()&&p.mouseVerticalOffset>I)){const F=Math.floor((E+I)/2);let R=p.pos.y+(F-p.mouseVerticalOffset);R<=p.editorPos.y&&(R=p.editorPos.y+1),R>=p.editorPos.y+p.editorPos.height&&(R=p.editorPos.y+p.editorPos.height-1);const M=new S.PageCoordinates(p.pos.x,R),N=this._actualDoHitTestWithCaretRangeFromPoint(v,M.toClientCoordinates());if(N.type===1)return N}return this._actualDoHitTestWithCaretRangeFromPoint(v,p.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(v,p){const L=_.getShadowRoot(v.viewDomNode);let E;if(L?typeof L.caretRangeFromPoint>"u"?E=u(L,p.clientX,p.clientY):E=L.caretRangeFromPoint(p.clientX,p.clientY):E=document.caretRangeFromPoint(p.clientX,p.clientY),!E||!E.startContainer)return new m;const I=E.startContainer;if(I.nodeType===I.TEXT_NODE){const T=I.parentNode,F=T?T.parentNode:null,R=F?F.parentNode:null;return(R&&R.nodeType===R.ELEMENT_NODE?R.className:null)===y.ViewLine.CLASS_NAME?t.createFromDOMInfo(v,T,E.startOffset):new m(I.parentNode)}else if(I.nodeType===I.ELEMENT_NODE){const T=I.parentNode,F=T?T.parentNode:null;return(F&&F.nodeType===F.ELEMENT_NODE?F.className:null)===y.ViewLine.CLASS_NAME?t.createFromDOMInfo(v,I,I.textContent.length):new m(I)}return new m}static _doHitTestWithCaretPositionFromPoint(v,p){const L=document.caretPositionFromPoint(p.clientX,p.clientY);if(L.offsetNode.nodeType===L.offsetNode.TEXT_NODE){const E=L.offsetNode.parentNode,I=E?E.parentNode:null,T=I?I.parentNode:null;return(T&&T.nodeType===T.ELEMENT_NODE?T.className:null)===y.ViewLine.CLASS_NAME?t.createFromDOMInfo(v,L.offsetNode.parentNode,L.offset):new m(L.offsetNode.parentNode)}if(L.offsetNode.nodeType===L.offsetNode.ELEMENT_NODE){const E=L.offsetNode.parentNode,I=E&&E.nodeType===E.ELEMENT_NODE?E.className:null,T=E?E.parentNode:null,F=T&&T.nodeType===T.ELEMENT_NODE?T.className:null;if(I===y.ViewLine.CLASS_NAME){const R=L.offsetNode.childNodes[Math.min(L.offset,L.offsetNode.childNodes.length-1)];if(R)return t.createFromDOMInfo(v,R,0)}else if(F===y.ViewLine.CLASS_NAME)return t.createFromDOMInfo(v,L.offsetNode,0)}return new m(L.offsetNode)}static _snapToSoftTabBoundary(v,p){const L=p.getLineContent(v.lineNumber),{tabSize:E}=p.model.getOptions(),I=h.AtomicTabMoveOperations.atomicPosition(L,v.column-1,E,2);return I!==-1?new D.Position(v.lineNumber,I+1):v}static _doHitTest(v,p){let L=new m;if(typeof document.caretRangeFromPoint=="function"?L=this._doHitTestWithCaretRangeFromPoint(v,p):document.caretPositionFromPoint&&(L=this._doHitTestWithCaretPositionFromPoint(v,p.pos.toClientCoordinates())),L.type===1){const E=v.viewModel.getInjectedTextAt(L.position),I=v.viewModel.normalizePosition(L.position,2);(E||!I.equals(L.position))&&(L=new n(I,L.spanNode,E))}return L}}e.MouseTargetFactory=d;function u(f,v,p){const L=document.createRange();let E=f.elementFromPoint(v,p);if(E!==null){for(;E&&E.firstChild&&E.firstChild.nodeType!==E.firstChild.TEXT_NODE&&E.lastChild&&E.lastChild.firstChild;)E=E.lastChild;const I=E.getBoundingClientRect(),T=window.getComputedStyle(E,null).getPropertyValue("font-style"),F=window.getComputedStyle(E,null).getPropertyValue("font-variant"),R=window.getComputedStyle(E,null).getPropertyValue("font-weight"),M=window.getComputedStyle(E,null).getPropertyValue("font-size"),N=window.getComputedStyle(E,null).getPropertyValue("line-height"),A=window.getComputedStyle(E,null).getPropertyValue("font-family"),P=`${T} ${F} ${R} ${M}/${N} ${A}`,x=E.innerText;let W=I.left,U=0,O;if(v>I.left+I.width)U=x.length;else{const $=C.getInstance();for(let Q=0;Q<x.length+1;Q++){if(O=$.getCharWidth(x.charAt(Q),P)/2,W+=O,v<W){U=Q;break}W+=O}}L.setStart(E.firstChild,U),L.setEnd(E.firstChild,U)}return L}class C{static getInstance(){return C._INSTANCE||(C._INSTANCE=new C),C._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(v,p){const L=v+p;if(this._cache[L])return this._cache[L];const E=this._canvas.getContext("2d");E.font=p;const T=E.measureText(v).width;return this._cache[L]=T,T}}C._INSTANCE=null}),define(J[787],ee([1,0,7,66,2,17,327,151,144,13,23,137,77]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=void 0;class i extends n.ViewEventHandler{constructor(l,a,d){super(),this._mouseLeaveMonitor=null,this._context=l,this.viewController=a,this.viewHelper=d,this.mouseTargetFactory=new w.MouseTargetFactory(this._context,d),this._mouseDownOperation=this._register(new s(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(f,v)=>this._createMouseTarget(f,v),f=>this._getMouseColumn(f))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(139).height;const u=new b.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(u.onContextMenu(this.viewHelper.viewDomNode,f=>this._onContextMenu(f,!0))),this._register(u.onMouseMove(this.viewHelper.viewDomNode,f=>{this._onMouseMove(f),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=S.addDisposableListener(document,"mousemove",v=>{this.viewHelper.viewDomNode.contains(v.target)||this._onMouseLeave(new b.EditorMouseEvent(v,!1,this.viewHelper.viewDomNode))}))})),this._register(u.onMouseUp(this.viewHelper.viewDomNode,f=>this._onMouseUp(f))),this._register(u.onMouseLeave(this.viewHelper.viewDomNode,f=>this._onMouseLeave(f)));let C=0;this._register(u.onPointerDown(this.viewHelper.viewDomNode,(f,v)=>{C=v})),this._register(S.addDisposableListener(this.viewHelper.viewDomNode,S.EventType.POINTER_UP,f=>{this._mouseDownOperation.onPointerUp()})),this._register(u.onMouseDown(this.viewHelper.viewDomNode,f=>this._onMouseDown(f,C))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const l=t.MouseWheelClassifier.INSTANCE;let a=0,d=_.EditorZoom.getZoomLevel(),u=!1,C=0;const f=p=>{if(this.viewController.emitMouseWheel(p),!this._context.configuration.options.get(73))return;const L=new k.StandardWheelEvent(p);if(l.acceptStandardWheelEvent(L),l.isPhysicalMouseWheel()){if(v(p)){const E=_.EditorZoom.getZoomLevel(),I=L.deltaY>0?1:-1;_.EditorZoom.setZoomLevel(E+I),L.preventDefault(),L.stopPropagation()}}else Date.now()-a>50&&(d=_.EditorZoom.getZoomLevel(),u=v(p),C=0),a=Date.now(),C+=L.deltaY,u&&(_.EditorZoom.setZoomLevel(d+C/5),L.preventDefault(),L.stopPropagation())};this._register(S.addDisposableListener(this.viewHelper.viewDomNode,S.EventType.MOUSE_WHEEL,f,{capture:!0,passive:!1}));function v(p){return D.isMacintosh?(p.metaKey||p.ctrlKey)&&!p.shiftKey&&!p.altKey:p.ctrlKey&&!p.metaKey&&!p.shiftKey&&!p.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(l){if(l.hasChanged(139)){const a=this._context.configuration.options.get(139).height;this._height!==a&&(this._height=a,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(l){return this._mouseDownOperation.onCursorStateChanged(l),!1}onFocusChanged(l){return!1}getTargetAtClientPoint(l,a){const u=new b.ClientCoordinates(l,a).toPageCoordinates(),C=(0,b.createEditorPagePosition)(this.viewHelper.viewDomNode);if(u.y<C.y||u.y>C.y+C.height||u.x<C.x||u.x>C.x+C.width)return null;const f=(0,b.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,C,u);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),C,u,f,null)}_createMouseTarget(l,a){let d=l.target;if(!this.viewHelper.viewDomNode.contains(d)){const u=S.getShadowRoot(this.viewHelper.viewDomNode);u&&(d=u.elementsFromPoint(l.posx,l.posy).find(C=>this.viewHelper.viewDomNode.contains(C)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),l.editorPos,l.pos,l.relativePos,a?d:null)}_getMouseColumn(l){return this.mouseTargetFactory.getMouseColumn(l.relativePos)}_onContextMenu(l,a){this.viewController.emitContextMenu({event:l,target:this._createMouseTarget(l,a)})}_onMouseMove(l){this.mouseTargetFactory.mouseTargetIsWidget(l)||l.preventDefault(),!(this._mouseDownOperation.isActive()||l.timestamp<this.lastMouseLeaveTime)&&this.viewController.emitMouseMove({event:l,target:this._createMouseTarget(l,!0)})}_onMouseLeave(l){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:l,target:null})}_onMouseUp(l){this.viewController.emitMouseUp({event:l,target:this._createMouseTarget(l,!0)})}_onMouseDown(l,a){const d=this._createMouseTarget(l,!0),u=d.type===6||d.type===7,C=d.type===2||d.type===3||d.type===4,f=d.type===3,v=this._context.configuration.options.get(104),p=d.type===8||d.type===5,L=d.type===9;let E=l.leftButton||l.middleButton;D.isMacintosh&&l.leftButton&&l.ctrlKey&&(E=!1);const I=()=>{l.preventDefault(),this.viewHelper.focusTextArea()};if(E&&(u||f&&v))I(),this._mouseDownOperation.start(d.type,l,a);else if(C)l.preventDefault();else if(p){const T=d.detail;E&&this.viewHelper.shouldSuppressMouseDownOnViewZone(T.viewZoneId)&&(I(),this._mouseDownOperation.start(d.type,l,a),l.preventDefault())}else L&&this.viewHelper.shouldSuppressMouseDownOnWidget(d.detail)&&(I(),l.preventDefault());this.viewController.emitMouseDown({event:l,target:d})}}e.MouseHandler=i;class s extends y.Disposable{constructor(l,a,d,u,C,f){super(),this._context=l,this._viewController=a,this._viewHelper=d,this._mouseTargetFactory=u,this._createMouseTarget=C,this._getMouseColumn=f,this._mouseMoveMonitor=this._register(new b.GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new r(this._context,this._viewHelper,this._mouseTargetFactory,(v,p,L)=>this._dispatchMouse(v,p,L))),this._mouseState=new g,this._currentSelection=new m.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(l){this._lastMouseEvent=l,this._mouseState.setModifiers(l);const a=this._findMousePosition(l,!1);a&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:l,target:a}):a.type===13&&(a.outsidePosition==="above"||a.outsidePosition==="below")?this._topBottomDragScrolling.start(a,l):(this._topBottomDragScrolling.stop(),this._dispatchMouse(a,!0,1)))}start(l,a,d){this._lastMouseEvent=a,this._mouseState.setStartedOnLineNumbers(l===3),this._mouseState.setStartButtons(a),this._mouseState.setModifiers(a);const u=this._findMousePosition(a,!0);if(!u||!u.position)return;this._mouseState.trySetCount(a.detail,u.position),a.detail=this._mouseState.count;const C=this._context.configuration.options;if(!C.get(87)&&C.get(33)&&!C.get(20)&&!this._mouseState.altKey&&a.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&u.type===6&&u.position&&this._currentSelection.containsPosition(u.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,d,a.buttons,f=>this._onMouseDownThenMove(f),f=>{const v=this._findMousePosition(this._lastMouseEvent,!1);f&&f instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:v?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(u,a.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,d,a.buttons,f=>this._onMouseDownThenMove(f),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(l){this._currentSelection=l.selections[0]}_getPositionOutsideEditor(l){const a=l.editorPos,d=this._context.viewModel,u=this._context.viewLayout,C=this._getMouseColumn(l);if(l.posy<a.y){const v=a.y-l.posy,p=Math.max(u.getCurrentScrollTop()-v,0),L=w.HitTestContext.getZoneAtCoord(this._context,p);if(L){const I=this._helpPositionJumpOverViewZone(L);if(I)return w.MouseTarget.createOutsideEditor(C,I,"above",v)}const E=u.getLineNumberAtVerticalOffset(p);return w.MouseTarget.createOutsideEditor(C,new h.Position(E,1),"above",v)}if(l.posy>a.y+a.height){const v=l.posy-a.y-a.height,p=u.getCurrentScrollTop()+l.relativePos.y,L=w.HitTestContext.getZoneAtCoord(this._context,p);if(L){const I=this._helpPositionJumpOverViewZone(L);if(I)return w.MouseTarget.createOutsideEditor(C,I,"below",v)}const E=u.getLineNumberAtVerticalOffset(p);return w.MouseTarget.createOutsideEditor(C,new h.Position(E,d.getLineMaxColumn(E)),"below",v)}const f=u.getLineNumberAtVerticalOffset(u.getCurrentScrollTop()+l.relativePos.y);if(l.posx<a.x){const v=a.x-l.posx;return w.MouseTarget.createOutsideEditor(C,new h.Position(f,1),"left",v)}if(l.posx>a.x+a.width){const v=l.posx-a.x-a.width;return w.MouseTarget.createOutsideEditor(C,new h.Position(f,d.getLineMaxColumn(f)),"right",v)}return null}_findMousePosition(l,a){const d=this._getPositionOutsideEditor(l);if(d)return d;const u=this._createMouseTarget(l,a);if(!u.position)return null;if(u.type===8||u.type===5){const f=this._helpPositionJumpOverViewZone(u.detail);if(f)return w.MouseTarget.createViewZone(u.type,u.element,u.mouseColumn,f,u.detail)}return u}_helpPositionJumpOverViewZone(l){const a=new h.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),d=l.positionBefore,u=l.positionAfter;return d&&u?d.isBefore(a)?d:u:null}_dispatchMouse(l,a,d){l.position&&this._viewController.dispatchMouse({position:l.position,mouseColumn:l.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:d,inSelectionMode:a,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,onInjectedText:l.type===6&&l.detail.injectedText!==null})}}class r extends y.Disposable{constructor(l,a,d,u){super(),this._context=l,this._viewHelper=a,this._mouseTargetFactory=d,this._dispatchMouse=u,this._operation=null}dispose(){super.dispose(),this.stop()}start(l,a){this._operation?this._operation.setPosition(l,a):this._operation=new c(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,l,a)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class c extends y.Disposable{constructor(l,a,d,u,C,f){super(),this._context=l,this._viewHelper=a,this._mouseTargetFactory=d,this._dispatchMouse=u,this._position=C,this._mouseEvent=f,this._lastTime=Date.now(),this._animationFrameDisposable=S.scheduleAtNextAnimationFrame(()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(l,a){this._position=l,this._mouseEvent=a}_tick(){const l=Date.now(),a=l-this._lastTime;return this._lastTime=l,a}_getScrollSpeed(){const l=this._context.configuration.options.get(64),a=this._context.configuration.options.get(139).height/l,d=this._position.outsideDistance/l;return d<=1.5?Math.max(30,a*(1+d)):d<=3?Math.max(60,a*(2+d)):Math.max(200,a*(7+d))}_execute(){const l=this._context.configuration.options.get(64),a=this._getScrollSpeed(),d=this._tick(),u=a*(d/1e3)*l,C=this._position.outsidePosition==="above"?-u:u;this._context.viewModel.viewLayout.deltaScrollNow(0,C),this._viewHelper.renderNow();const f=this._context.viewLayout.getLinesViewportData(),v=this._position.outsidePosition==="above"?f.startLineNumber:f.endLineNumber;let p;{const L=(0,b.createEditorPagePosition)(this._viewHelper.viewDomNode),E=this._context.configuration.options.get(139).horizontalScrollbarHeight,I=new b.PageCoordinates(this._mouseEvent.pos.x,L.y+L.height-E-.1),T=(0,b.createCoordinatesRelativeToEditor)(this._viewHelper.viewDomNode,L,I);p=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),L,I,T,null)}(!p.position||p.position.lineNumber!==v)&&(this._position.outsidePosition==="above"?p=w.MouseTarget.createOutsideEditor(this._position.mouseColumn,new h.Position(v,1),"above",this._position.outsideDistance):p=w.MouseTarget.createOutsideEditor(this._position.mouseColumn,new h.Position(v,this._context.viewModel.getLineMaxColumn(v)),"below",this._position.outsideDistance)),this._dispatchMouse(p,!0,2),this._animationFrameDisposable=S.scheduleAtNextAnimationFrame(()=>this._execute())}}class g{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}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 count(){return this._lastMouseDownCount}setModifiers(l){this._altKey=l.altKey,this._ctrlKey=l.ctrlKey,this._metaKey=l.metaKey,this._shiftKey=l.shiftKey}setStartButtons(l){this._leftButton=l.leftButton,this._middleButton=l.middleButton}setStartedOnLineNumbers(l){this._startedOnLineNumbers=l}trySetCount(l,a){const d=new Date().getTime();d-this._lastSetMouseDownCountTime>g.CLEAR_MOUSE_DOWN_COUNT_TIME&&(l=1),this._lastSetMouseDownCountTime=d,l>this._lastMouseDownCount+1&&(l=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(a)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=a,this._lastMouseDownCount=Math.min(l,this._lastMouseDownPositionEqualCount)}}g.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(J[788],ee([1,0,7,17,56,2,787,151,203,216]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class m extends w.MouseHandler{constructor(s,r,c){super(s,r,c),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(S.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,o=>this.onTap(o))),this._register(S.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,o=>this.onChange(o))),this._register(S.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,o=>this._onContextMenu(new b.EditorMouseEvent(o,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(S.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",o=>{const l=o.pointerType;if(l==="mouse"){this._lastPointerType="mouse";return}else l==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const g=new b.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(g.onPointerMove(this.viewHelper.viewDomNode,o=>this._onMouseMove(o))),this._register(g.onPointerUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(g.onPointerLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(g.onPointerDown(this.viewHelper.viewDomNode,(o,l)=>this._onMouseDown(o,l)))}onTap(s){if(!s.initialTarget||!this.viewHelper.linesContentDomNode.contains(s.initialTarget))return;s.preventDefault(),this.viewHelper.focusTextArea();const r=this._createMouseTarget(new b.EditorMouseEvent(s,!1,this.viewHelper.viewDomNode),!1);r.position&&this.viewController.dispatchMouse({position:r.position,mouseColumn:r.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:s.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:r.type===6&&r.detail.injectedText!==null})}onChange(s){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-s.translationX,-s.translationY)}_onMouseDown(s,r){s.browserEvent.pointerType!=="touch"&&super._onMouseDown(s,r)}}e.PointerEventHandler=m;class n extends w.MouseHandler{constructor(s,r,c){super(s,r,c),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(S.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,g=>this.onTap(g))),this._register(S.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,g=>this.onChange(g))),this._register(S.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,g=>this._onContextMenu(new b.EditorMouseEvent(g,!1,this.viewHelper.viewDomNode),!1)))}onTap(s){s.preventDefault(),this.viewHelper.focusTextArea();const r=this._createMouseTarget(new b.EditorMouseEvent(s,!1,this.viewHelper.viewDomNode),!1);if(r.position){const c=document.createEvent("CustomEvent");c.initEvent(h.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(c),this.viewController.moveTo(r.position,1)}}onChange(s){this._context.viewModel.viewLayout.deltaScrollNow(-s.translationX,-s.translationY)}}class t extends D.Disposable{constructor(s,r,c){super(),k.isIOS&&_.BrowserFeatures.pointerEvents?this.handler=this._register(new m(s,r,c)):window.TouchEvent?this.handler=this._register(new n(s,r,c)):this.handler=this._register(new w.MouseHandler(s,r,c))}getTargetAtClientPoint(s,r){return this.handler.getTargetAtClientPoint(s,r)}}e.PointerHandler=t}),define(J[789],ee([1,0,17,12,74,217,52,326,13,5,134,161,444,389]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class i{constructor(){this._currentVisibleRange=new h.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(o){this._currentVisibleRange=o}}class s{constructor(o,l,a,d,u,C,f){this.minimalReveal=o,this.lineNumber=l,this.startColumn=a,this.endColumn=d,this.startScrollTop=u,this.stopScrollTop=C,this.scrollType=f,this.type="range",this.minLineNumber=l,this.maxLineNumber=l}}class r{constructor(o,l,a,d,u){this.minimalReveal=o,this.selections=l,this.startScrollTop=a,this.stopScrollTop=d,this.scrollType=u,this.type="selections";let C=l[0].startLineNumber,f=l[0].endLineNumber;for(let v=1,p=l.length;v<p;v++){const L=l[v];C=Math.min(C,L.startLineNumber),f=Math.max(f,L.endLineNumber)}this.minLineNumber=C,this.maxLineNumber=f}}class c extends w.ViewPart{constructor(o,l){super(o),this._linesContent=l,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new D.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const a=this._context.configuration,d=this._context.configuration.options,u=d.get(48),C=d.get(140);this._lineHeight=d.get(64),this._typicalHalfwidthCharacterWidth=u.typicalHalfwidthCharacterWidth,this._isViewportWrapping=C.isViewportWrapping,this._revealHorizontalRightPadding=d.get(95),this._cursorSurroundingLines=d.get(27),this._cursorSurroundingLinesStyle=d.get(28),this._canUseLayerHinting=!d.get(30),this._viewLineOptions=new b.ViewLineOptions(a,this._context.theme.type),w.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${n.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),(0,y.applyFontInfo)(this.domNode,u),this._maxLineWidth=0,this._asyncUpdateLineWidths=new k.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new k.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new i,this._horizontalRevealRequest=null,this._stickyScrollEnabled=d.get(110).enabled,this._maxNumberStickyLines=d.get(110).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new b.ViewLine(this._viewLineOptions)}onConfigurationChanged(o){this._visibleLines.onConfigurationChanged(o),o.hasChanged(140)&&(this._maxLineWidth=0);const l=this._context.configuration.options,a=l.get(48),d=l.get(140);return this._lineHeight=l.get(64),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._isViewportWrapping=d.isViewportWrapping,this._revealHorizontalRightPadding=l.get(95),this._cursorSurroundingLines=l.get(27),this._cursorSurroundingLinesStyle=l.get(28),this._canUseLayerHinting=!l.get(30),this._stickyScrollEnabled=l.get(110).enabled,this._maxNumberStickyLines=l.get(110).maxLineCount,(0,y.applyFontInfo)(this.domNode,a),this._onOptionsMaybeChanged(),o.hasChanged(139)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const o=this._context.configuration,l=new b.ViewLineOptions(o,this._context.theme.type);if(!this._viewLineOptions.equals(l)){this._viewLineOptions=l;const a=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=a;u<=d;u++)this._visibleLines.getVisibleLine(u).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(o){const l=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let d=!1;for(let u=l;u<=a;u++)d=this._visibleLines.getVisibleLine(u).onSelectionChanged()||d;return d}onDecorationsChanged(o){{const l=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let d=l;d<=a;d++)this._visibleLines.getVisibleLine(d).onDecorationsChanged()}return!0}onFlushed(o){const l=this._visibleLines.onFlushed(o);return this._maxLineWidth=0,l}onLinesChanged(o){return this._visibleLines.onLinesChanged(o)}onLinesDeleted(o){return this._visibleLines.onLinesDeleted(o)}onLinesInserted(o){return this._visibleLines.onLinesInserted(o)}onRevealRangeRequest(o){const l=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),o.source,o.minimalReveal,o.range,o.selections,o.verticalType);if(l===-1)return!1;let a=this._context.viewLayout.validateScrollPosition({scrollTop:l});o.revealHorizontal?o.range&&o.range.startLineNumber!==o.range.endLineNumber?a={scrollTop:a.scrollTop,scrollLeft:0}:o.range?this._horizontalRevealRequest=new s(o.minimalReveal,o.range.startLineNumber,o.range.startColumn,o.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),a.scrollTop,o.scrollType):o.selections&&o.selections.length>0&&(this._horizontalRevealRequest=new r(o.minimalReveal,o.selections,this._context.viewLayout.getCurrentScrollTop(),a.scrollTop,o.scrollType)):this._horizontalRevealRequest=null;const u=Math.abs(this._context.viewLayout.getCurrentScrollTop()-a.scrollTop)<=this._lineHeight?1:o.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(a,u),!0}onScrollChanged(o){if(this._horizontalRevealRequest&&o.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&o.scrollTopChanged){const l=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),a=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(o.scrollTop<l||o.scrollTop>a)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(o.scrollWidth),this._visibleLines.onScrollChanged(o)||!0}onTokensChanged(o){return this._visibleLines.onTokensChanged(o)}onZonesChanged(o){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(o)}onThemeChanged(o){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(o,l){const a=this._getViewLineDomNode(o);if(a===null)return null;const d=this._getLineNumberFor(a);if(d===-1||d<1||d>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(d)===1)return new _.Position(d,1);const u=this._visibleLines.getStartLineNumber(),C=this._visibleLines.getEndLineNumber();if(d<u||d>C)return null;let f=this._visibleLines.getVisibleLine(d).getColumnOfNodeOffset(d,o,l);const v=this._context.viewModel.getLineMinColumn(d);return f<v&&(f=v),new _.Position(d,f)}_getViewLineDomNode(o){for(;o&&o.nodeType===1;){if(o.className===b.ViewLine.CLASS_NAME)return o;o=o.parentElement}return null}_getLineNumberFor(o){const l=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let d=l;d<=a;d++){const u=this._visibleLines.getVisibleLine(d);if(o===u.getDomNode())return d}return-1}getLineWidth(o){const l=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();if(o<l||o>a)return-1;const d=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),u=this._visibleLines.getVisibleLine(o).getWidth(d);return this._updateLineWidthsSlowIfDomDidLayout(d),u}linesVisibleRangesForRange(o,l){if(this.shouldRender())return null;const a=o.endLineNumber,d=h.Range.intersectRanges(o,this._lastRenderedData.getCurrentVisibleRange());if(!d)return null;const u=[];let C=0;const f=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let v=0;l&&(v=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new _.Position(d.startLineNumber,1)).lineNumber);const p=this._visibleLines.getStartLineNumber(),L=this._visibleLines.getEndLineNumber();for(let E=d.startLineNumber;E<=d.endLineNumber;E++){if(E<p||E>L)continue;const I=E===d.startLineNumber?d.startColumn:1,T=E===d.endLineNumber?d.endColumn:this._context.viewModel.getLineMaxColumn(E),F=this._visibleLines.getVisibleLine(E).getVisibleRangesForRange(E,I,T,f);if(F){if(l&&E<a){const R=v;v=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new _.Position(E+1,1)).lineNumber,R!==v&&(F.ranges[F.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}u[C++]=new m.LineVisibleRanges(F.outsideRenderedLine,E,m.HorizontalRange.from(F.ranges))}}return this._updateLineWidthsSlowIfDomDidLayout(f),C===0?null:u}_visibleRangesForLineRange(o,l,a){if(this.shouldRender()||o<this._visibleLines.getStartLineNumber()||o>this._visibleLines.getEndLineNumber())return null;const d=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),u=this._visibleLines.getVisibleLine(o).getVisibleRangesForRange(o,l,a,d);return this._updateLineWidthsSlowIfDomDidLayout(d),u}visibleRangeForPosition(o){const l=this._visibleRangesForLineRange(o.lineNumber,o.column,o.column);return l?new m.HorizontalPosition(l.outsideRenderedLine,l.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(o){o.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(o){const l=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let d=1,u=!0;for(let C=l;C<=a;C++){const f=this._visibleLines.getVisibleLine(C);if(o&&!f.getWidthIsFast()){u=!1;continue}d=Math.max(d,f.getWidth(null))}return u&&l===1&&a===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(d),u}_checkMonospaceFontAssumptions(){let o=-1,l=-1;const a=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=a;u<=d;u++){const C=this._visibleLines.getVisibleLine(u);if(C.needsMonospaceFontCheck()){const f=C.getWidth(null);f>l&&(l=f,o=u)}}if(o!==-1&&!this._visibleLines.getVisibleLine(o).monospaceAssumptionsAreValid())for(let u=a;u<=d;u++)this._visibleLines.getVisibleLine(u).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(o){if(this._visibleLines.renderLines(o),this._lastRenderedData.setCurrentVisibleRange(o.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const a=this._horizontalRevealRequest;if(o.startLineNumber<=a.minLineNumber&&a.maxLineNumber<=o.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const d=this._computeScrollLeftToReveal(a);d&&(this._isViewportWrapping||this._ensureMaxLineWidth(d.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:d.scrollLeft},a.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),S.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const a=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=a;u<=d;u++)if(this._visibleLines.getVisibleLine(u).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const l=this._context.viewLayout.getCurrentScrollTop()-o.bigNumbersDelta;this._linesContent.setTop(-l),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(o){const l=Math.ceil(o);this._maxLineWidth<l&&(this._maxLineWidth=l,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(o,l,a,d,u,C){const f=o.top,v=o.height,p=f+v;let L,E,I;if(u&&u.length>0){let N=u[0].startLineNumber,A=u[0].endLineNumber;for(let P=1,x=u.length;P<x;P++){const W=u[P];N=Math.min(N,W.startLineNumber),A=Math.max(A,W.endLineNumber)}L=!1,E=this._context.viewLayout.getVerticalOffsetForLineNumber(N),I=this._context.viewLayout.getVerticalOffsetForLineNumber(A)+this._lineHeight}else if(d)L=!0,E=this._context.viewLayout.getVerticalOffsetForLineNumber(d.startLineNumber),I=this._context.viewLayout.getVerticalOffsetForLineNumber(d.endLineNumber)+this._lineHeight;else return-1;const T=(l==="mouse"||a)&&this._cursorSurroundingLinesStyle==="default";let F=0,R=0;if(T)a||(F=this._lineHeight);else{const N=Math.min(v/this._lineHeight/2,this._cursorSurroundingLines);this._stickyScrollEnabled?F=Math.max(N,this._maxNumberStickyLines)*this._lineHeight:F=N*this._lineHeight,R=Math.max(0,N-1)*this._lineHeight}a||(C===0||C===4)&&(R+=this._lineHeight),E-=F,I+=R;let M;if(I-E>v){if(!L)return-1;M=E}else if(C===5||C===6)if(C===6&&f<=E&&I<=p)M=f;else{const N=Math.max(5*this._lineHeight,v*.2),A=E-N,P=I-v;M=Math.max(P,A)}else if(C===1||C===2)if(C===2&&f<=E&&I<=p)M=f;else{const N=(E+I)/2;M=Math.max(0,N-v/2)}else M=this._computeMinimumScrolling(f,p,E,I,C===3,C===4);return M}_computeScrollLeftToReveal(o){const l=this._context.viewLayout.getCurrentViewport(),a=this._context.configuration.options.get(139),d=l.left,u=d+l.width-a.verticalScrollbarWidth;let C=1073741824,f=0;if(o.type==="range"){const p=this._visibleRangesForLineRange(o.lineNumber,o.startColumn,o.endColumn);if(!p)return null;for(const L of p.ranges)C=Math.min(C,Math.round(L.left)),f=Math.max(f,Math.round(L.left+L.width))}else for(const p of o.selections){if(p.startLineNumber!==p.endLineNumber)return null;const L=this._visibleRangesForLineRange(p.startLineNumber,p.startColumn,p.endColumn);if(!L)return null;for(const E of L.ranges)C=Math.min(C,Math.round(E.left)),f=Math.max(f,Math.round(E.left+E.width))}return o.minimalReveal||(C=Math.max(0,C-c.HORIZONTAL_EXTRA_PX),f+=this._revealHorizontalRightPadding),o.type==="selections"&&f-C>l.width?null:{scrollLeft:this._computeMinimumScrolling(d,u,C,f),maxHorizontalOffset:f}}_computeMinimumScrolling(o,l,a,d,u,C){o=o|0,l=l|0,a=a|0,d=d|0,u=!!u,C=!!C;const f=l-o;if(d-a<f){if(u)return a;if(C)return Math.max(0,d-f);if(a<o)return a;if(d>l)return Math.max(0,d-f)}else return a;return o}}c.HORIZONTAL_EXTRA_PX=30,e.ViewLines=c}),define(J[24],ee([1,0,6,2,8,34,91]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.themeColorFromId=e.IThemeService=void 0,e.IThemeService=(0,y.createDecorator)("themeService");function b(i){return{id:i}}e.themeColorFromId=b;function _(i){switch(i){case w.ColorScheme.DARK:return"vs-dark";case w.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case w.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=_,e.Extensions={ThemingContribution:"base.contributions.theming"};class h{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new S.Emitter}onColorThemeChange(s){return this.themingParticipants.push(s),this.onThemingParticipantAddedEmitter.fire(s),(0,k.toDisposable)(()=>{const r=this.themingParticipants.indexOf(s);this.themingParticipants.splice(r,1)})}getThemingParticipants(){return this.themingParticipants}}const m=new h;D.Registry.add(e.Extensions.ThemingContribution,m);function n(i){return m.onColorThemeChange(i)}e.registerThemingParticipant=n;class t extends k.Disposable{constructor(s){super(),this.themeService=s,this.theme=s.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(r=>this.onThemeChange(r)))}onThemeChange(s){this.theme=s,this.updateStyles()}updateStyles(){}}e.Themable=t}),define(J[790],ee([1,0,6,2,59,24]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStyleSheet=e.AbstractCodeEditorService=void 0;let w=class extends k.Disposable{constructor(h){super(),this._themeService=h,this._onWillCreateCodeEditor=this._register(new S.Emitter),this._onCodeEditorAdd=this._register(new S.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new S.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new S.Emitter),this._onDiffEditorAdd=this._register(new S.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new S.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new y.LinkedList,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(h){this._codeEditors[h.getId()]=h,this._onCodeEditorAdd.fire(h)}removeCodeEditor(h){delete this._codeEditors[h.getId()]&&this._onCodeEditorRemove.fire(h)}listCodeEditors(){return Object.keys(this._codeEditors).map(h=>this._codeEditors[h])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(h){this._diffEditors[h.getId()]=h,this._onDiffEditorAdd.fire(h)}removeDiffEditor(h){delete this._diffEditors[h.getId()]&&this._onDiffEditorRemove.fire(h)}listDiffEditors(){return Object.keys(this._diffEditors).map(h=>this._diffEditors[h])}getFocusedCodeEditor(){let h=null;const m=this.listCodeEditors();for(const n of m){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(h=n)}return h}removeDecorationType(h){const m=this._decorationOptionProviders.get(h);m&&(m.refCount--,m.refCount<=0&&(this._decorationOptionProviders.delete(h),m.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(h))))}setModelProperty(h,m,n){const t=h.toString();let i;this._modelProperties.has(t)?i=this._modelProperties.get(t):(i=new Map,this._modelProperties.set(t,i)),i.set(m,n)}getModelProperty(h,m){const n=h.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(m)}openCodeEditor(h,m,n){return Ee(this,void 0,void 0,function*(){for(const t of this._codeEditorOpenHandlers){const i=yield t(h,m,n);if(i!==null)return i}return null})}registerCodeEditorOpenHandler(h){const m=this._codeEditorOpenHandlers.unshift(h);return(0,k.toDisposable)(m)}};w=Ne([fe(0,D.IThemeService)],w),e.AbstractCodeEditorService=w;class b{constructor(h){this._styleSheet=h}}e.GlobalStyleSheet=b}),define(J[791],ee([1,0,7,35,77,52,24]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class b extends D.ViewPart{constructor(h,m,n,t){super(h);const i=this._context.configuration.options,s=i.get(98),r=i.get(72),c=i.get(38),g=i.get(101),o={listenOnDomNode:n.domNode,className:"editor-scrollable "+(0,w.getThemeTypeSelector)(h.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:c,scrollPredominantAxis:g,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new y.SmoothScrollableElement(m.domNode,o,this._context.viewLayout.getScrollable())),D.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,k.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const l=(a,d,u)=>{const C={};if(d){const f=a.scrollTop;f&&(C.scrollTop=this._context.viewLayout.getCurrentScrollTop()+f,a.scrollTop=0)}if(u){const f=a.scrollLeft;f&&(C.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+f,a.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(C,1)};this._register(S.addDisposableListener(n.domNode,"scroll",a=>l(n.domNode,!0,!0))),this._register(S.addDisposableListener(m.domNode,"scroll",a=>l(m.domNode,!0,!1))),this._register(S.addDisposableListener(t.domNode,"scroll",a=>l(t.domNode,!0,!1))),this._register(S.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",a=>l(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const h=this._context.configuration.options,m=h.get(139);this.scrollbarDomNode.setLeft(m.contentLeft),h.get(70).side==="right"?this.scrollbarDomNode.setWidth(m.contentWidth+m.minimap.minimapWidth):this.scrollbarDomNode.setWidth(m.contentWidth),this.scrollbarDomNode.setHeight(m.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(h){this.scrollbar.delegateVerticalScrollbarPointerDown(h)}delegateScrollFromMouseWheelEvent(h){this.scrollbar.delegateScrollFromMouseWheelEvent(h)}onConfigurationChanged(h){if(h.hasChanged(98)||h.hasChanged(72)||h.hasChanged(38)){const m=this._context.configuration.options,n=m.get(98),t=m.get(72),i=m.get(38),s=m.get(101),r={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:t,fastScrollSensitivity:i,scrollPredominantAxis:s};this.scrollbar.updateOptions(r)}return h.hasChanged(139)&&this._setLayout(),!0}onScrollChanged(h){return!0}onThemeChanged(h){return this.scrollbar.updateClassName("editor-scrollable "+(0,w.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(h){}render(h){this.scrollbar.renderNow()}}e.EditorScrollbar=b}),define(J[792],ee([1,0,106,31,24,397]),function(q,e,S,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;class D{constructor(t){this.left=t.left,this.width=t.width,this.startStyle=null,this.endStyle=null}}class w{constructor(t,i){this.lineNumber=t,this.ranges=i}}function b(n){return new D(n)}function _(n){return new w(n.lineNumber,n.ranges.map(b))}class h extends S.DynamicViewOverlay{constructor(t){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=t;const i=this._context.configuration.options;this._lineHeight=i.get(64),this._roundedSelection=i.get(96),this._typicalHalfwidthCharacterWidth=i.get(48).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(t){const i=this._context.configuration.options;return this._lineHeight=i.get(64),this._roundedSelection=i.get(96),this._typicalHalfwidthCharacterWidth=i.get(48).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(t){return this._selections=t.selections.slice(0),!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollTopChanged}onZonesChanged(t){return!0}_visibleRangesHaveGaps(t){for(let i=0,s=t.length;i<s;i++)if(t[i].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(t,i,s){const r=this._typicalHalfwidthCharacterWidth/4;let c=null,g=null;if(s&&s.length>0&&i.length>0){const o=i[0].lineNumber;if(o===t.startLineNumber)for(let a=0;!c&&a<s.length;a++)s[a].lineNumber===o&&(c=s[a].ranges[0]);const l=i[i.length-1].lineNumber;if(l===t.endLineNumber)for(let a=s.length-1;!g&&a>=0;a--)s[a].lineNumber===l&&(g=s[a].ranges[0]);c&&!c.startStyle&&(c=null),g&&!g.startStyle&&(g=null)}for(let o=0,l=i.length;o<l;o++){const a=i[o].ranges[0],d=a.left,u=a.left+a.width,C={top:0,bottom:0},f={top:0,bottom:0};if(o>0){const v=i[o-1].ranges[0].left,p=i[o-1].ranges[0].left+i[o-1].ranges[0].width;m(d-v)<r?C.top=2:d>v&&(C.top=1),m(u-p)<r?f.top=2:v<u&&u<p&&(f.top=1)}else c&&(C.top=c.startStyle.top,f.top=c.endStyle.top);if(o+1<l){const v=i[o+1].ranges[0].left,p=i[o+1].ranges[0].left+i[o+1].ranges[0].width;m(d-v)<r?C.bottom=2:v<d&&d<p&&(C.bottom=1),m(u-p)<r?f.bottom=2:u<p&&(f.bottom=1)}else g&&(C.bottom=g.startStyle.bottom,f.bottom=g.endStyle.bottom);a.startStyle=C,a.endStyle=f}}_getVisibleRangesWithStyle(t,i,s){const c=(i.linesVisibleRangesForRange(t,!0)||[]).map(_);return!this._visibleRangesHaveGaps(c)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(i.visibleRange,c,s),c}_createSelectionPiece(t,i,s,r,c){return\'<div class="cslr \'+s+\'" style="top:\'+t.toString()+"px;left:"+r.toString()+"px;width:"+c.toString()+"px;height:"+i+\'px;"></div>\'}_actualRenderOneSelection(t,i,s,r){if(r.length===0)return;const c=!!r[0].ranges[0].startStyle,g=this._lineHeight.toString(),o=(this._lineHeight-1).toString(),l=r[0].lineNumber,a=r[r.length-1].lineNumber;for(let d=0,u=r.length;d<u;d++){const C=r[d],f=C.lineNumber,v=f-i,p=s&&(f===a||f===l)?o:g,L=s&&f===l?1:0;let E="",I="";for(let T=0,F=C.ranges.length;T<F;T++){const R=C.ranges[T];if(c){const N=R.startStyle,A=R.endStyle;if(N.top===1||N.bottom===1){E+=this._createSelectionPiece(L,p,h.SELECTION_CLASS_NAME,R.left-h.ROUNDED_PIECE_WIDTH,h.ROUNDED_PIECE_WIDTH);let P=h.EDITOR_BACKGROUND_CLASS_NAME;N.top===1&&(P+=" "+h.SELECTION_TOP_RIGHT),N.bottom===1&&(P+=" "+h.SELECTION_BOTTOM_RIGHT),E+=this._createSelectionPiece(L,p,P,R.left-h.ROUNDED_PIECE_WIDTH,h.ROUNDED_PIECE_WIDTH)}if(A.top===1||A.bottom===1){E+=this._createSelectionPiece(L,p,h.SELECTION_CLASS_NAME,R.left+R.width,h.ROUNDED_PIECE_WIDTH);let P=h.EDITOR_BACKGROUND_CLASS_NAME;A.top===1&&(P+=" "+h.SELECTION_TOP_LEFT),A.bottom===1&&(P+=" "+h.SELECTION_BOTTOM_LEFT),E+=this._createSelectionPiece(L,p,P,R.left+R.width,h.ROUNDED_PIECE_WIDTH)}}let M=h.SELECTION_CLASS_NAME;if(c){const N=R.startStyle,A=R.endStyle;N.top===0&&(M+=" "+h.SELECTION_TOP_LEFT),N.bottom===0&&(M+=" "+h.SELECTION_BOTTOM_LEFT),A.top===0&&(M+=" "+h.SELECTION_TOP_RIGHT),A.bottom===0&&(M+=" "+h.SELECTION_BOTTOM_RIGHT)}I+=this._createSelectionPiece(L,p,M,R.left,R.width)}t[v][0]+=E,t[v][1]+=I}}prepareRender(t){const i=[],s=t.visibleRange.startLineNumber,r=t.visibleRange.endLineNumber;for(let g=s;g<=r;g++){const o=g-s;i[o]=["",""]}const c=[];for(let g=0,o=this._selections.length;g<o;g++){const l=this._selections[g];if(l.isEmpty()){c[g]=null;continue}const a=this._getVisibleRangesWithStyle(l,t,this._previousFrameVisibleRangesWithStyle[g]);c[g]=a,this._actualRenderOneSelection(i,s,this._selections.length>1,a)}this._previousFrameVisibleRangesWithStyle=c,this._renderResult=i.map(([g,o])=>g+o)}render(t,i){if(!this._renderResult)return"";const s=i-t;return s<0||s>=this._renderResult.length?"":this._renderResult[s]}}h.SELECTION_CLASS_NAME="selected-text",h.SELECTION_TOP_LEFT="top-left-radius",h.SELECTION_BOTTOM_LEFT="bottom-left-radius",h.SELECTION_TOP_RIGHT="top-right-radius",h.SELECTION_BOTTOM_RIGHT="bottom-right-radius",h.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",h.ROUNDED_PIECE_WIDTH=10,e.SelectionsOverlay=h,(0,y.registerThemingParticipant)((n,t)=>{const i=n.getColor(k.editorSelectionForeground);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)});function m(n){return n<0?-n:n}}),define(J[73],ee([1,0,580,37,31,24]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorUnicodeHighlightBackground=e.editorUnicodeHighlightBorder=e.editorBracketPairGuideActiveBackground6=e.editorBracketPairGuideActiveBackground5=e.editorBracketPairGuideActiveBackground4=e.editorBracketPairGuideActiveBackground3=e.editorBracketPairGuideActiveBackground2=e.editorBracketPairGuideActiveBackground1=e.editorBracketPairGuideBackground6=e.editorBracketPairGuideBackground5=e.editorBracketPairGuideBackground4=e.editorBracketPairGuideBackground3=e.editorBracketPairGuideBackground2=e.editorBracketPairGuideBackground1=e.editorBracketHighlightingUnexpectedBracketForeground=e.editorBracketHighlightingForeground6=e.editorBracketHighlightingForeground5=e.editorBracketHighlightingForeground4=e.editorBracketHighlightingForeground3=e.editorBracketHighlightingForeground2=e.editorBracketHighlightingForeground1=e.overviewRulerInfo=e.overviewRulerWarning=e.overviewRulerError=e.overviewRulerRangeHighlight=e.ghostTextBackground=e.ghostTextForeground=e.ghostTextBorder=e.editorUnnecessaryCodeOpacity=e.editorUnnecessaryCodeBorder=e.editorGutter=e.editorOverviewRulerBackground=e.editorOverviewRulerBorder=e.editorBracketMatchBorder=e.editorBracketMatchBackground=e.editorCodeLensForeground=e.editorRuler=e.editorDimmedLineNumber=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=(0,y.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(0,null)),e.editorLineHighlightBorder=(0,y.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:y.contrastBorder},S.localize(1,null)),e.editorRangeHighlight=(0,y.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},S.localize(2,null),!0),e.editorRangeHighlightBorder=(0,y.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},S.localize(3,null),!0),e.editorSymbolHighlight=(0,y.registerColor)("editor.symbolHighlightBackground",{dark:y.editorFindMatchHighlight,light:y.editorFindMatchHighlight,hcDark:null,hcLight:null},S.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,y.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},S.localize(5,null),!0),e.editorCursorForeground=(0,y.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:k.Color.black,hcDark:k.Color.white,hcLight:"#0F4A85"},S.localize(6,null)),e.editorCursorBackground=(0,y.registerColor)("editorCursor.background",null,S.localize(7,null)),e.editorWhitespaces=(0,y.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},S.localize(8,null)),e.editorIndentGuides=(0,y.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},S.localize(9,null)),e.editorActiveIndentGuides=(0,y.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},S.localize(10,null)),e.editorLineNumbers=(0,y.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:k.Color.white,hcLight:"#292929"},S.localize(11,null));const w=(0,y.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},S.localize(12,null),!1,S.localize(13,null));e.editorActiveLineNumber=(0,y.registerColor)("editorLineNumber.activeForeground",{dark:w,light:w,hcDark:w,hcLight:w},S.localize(14,null)),e.editorDimmedLineNumber=(0,y.registerColor)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(15,null)),e.editorRuler=(0,y.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:k.Color.lightgrey,hcDark:k.Color.white,hcLight:"#292929"},S.localize(16,null)),e.editorCodeLensForeground=(0,y.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},S.localize(17,null)),e.editorBracketMatchBackground=(0,y.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},S.localize(18,null)),e.editorBracketMatchBorder=(0,y.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:y.contrastBorder,hcLight:y.contrastBorder},S.localize(19,null)),e.editorOverviewRulerBorder=(0,y.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},S.localize(20,null)),e.editorOverviewRulerBackground=(0,y.registerColor)("editorOverviewRuler.background",null,S.localize(21,null)),e.editorGutter=(0,y.registerColor)("editorGutter.background",{dark:y.editorBackground,light:y.editorBackground,hcDark:y.editorBackground,hcLight:y.editorBackground},S.localize(22,null)),e.editorUnnecessaryCodeBorder=(0,y.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:k.Color.fromHex("#fff").transparent(.8),hcLight:y.contrastBorder},S.localize(23,null)),e.editorUnnecessaryCodeOpacity=(0,y.registerColor)("editorUnnecessaryCode.opacity",{dark:k.Color.fromHex("#000a"),light:k.Color.fromHex("#0007"),hcDark:null,hcLight:null},S.localize(24,null)),e.ghostTextBorder=(0,y.registerColor)("editorGhostText.border",{dark:null,light:null,hcDark:k.Color.fromHex("#fff").transparent(.8),hcLight:k.Color.fromHex("#292929").transparent(.8)},S.localize(25,null)),e.ghostTextForeground=(0,y.registerColor)("editorGhostText.foreground",{dark:k.Color.fromHex("#ffffff56"),light:k.Color.fromHex("#0007"),hcDark:null,hcLight:null},S.localize(26,null)),e.ghostTextBackground=(0,y.registerColor)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(27,null));const b=new k.Color(new k.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,y.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:b,light:b,hcDark:b,hcLight:b},S.localize(28,null),!0),e.overviewRulerError=(0,y.registerColor)("editorOverviewRuler.errorForeground",{dark:new k.Color(new k.RGBA(255,18,18,.7)),light:new k.Color(new k.RGBA(255,18,18,.7)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:"#B5200D"},S.localize(29,null)),e.overviewRulerWarning=(0,y.registerColor)("editorOverviewRuler.warningForeground",{dark:y.editorWarningForeground,light:y.editorWarningForeground,hcDark:y.editorWarningBorder,hcLight:y.editorWarningBorder},S.localize(30,null)),e.overviewRulerInfo=(0,y.registerColor)("editorOverviewRuler.infoForeground",{dark:y.editorInfoForeground,light:y.editorInfoForeground,hcDark:y.editorInfoBorder,hcLight:y.editorInfoBorder},S.localize(31,null)),e.editorBracketHighlightingForeground1=(0,y.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},S.localize(32,null)),e.editorBracketHighlightingForeground2=(0,y.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},S.localize(33,null)),e.editorBracketHighlightingForeground3=(0,y.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},S.localize(34,null)),e.editorBracketHighlightingForeground4=(0,y.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(35,null)),e.editorBracketHighlightingForeground5=(0,y.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(36,null)),e.editorBracketHighlightingForeground6=(0,y.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(37,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,y.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new k.Color(new k.RGBA(255,18,18,.8)),light:new k.Color(new k.RGBA(255,18,18,.8)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:""},S.localize(38,null)),e.editorBracketPairGuideBackground1=(0,y.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(39,null)),e.editorBracketPairGuideBackground2=(0,y.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(40,null)),e.editorBracketPairGuideBackground3=(0,y.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(41,null)),e.editorBracketPairGuideBackground4=(0,y.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(42,null)),e.editorBracketPairGuideBackground5=(0,y.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(43,null)),e.editorBracketPairGuideBackground6=(0,y.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(44,null)),e.editorBracketPairGuideActiveBackground1=(0,y.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(45,null)),e.editorBracketPairGuideActiveBackground2=(0,y.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(46,null)),e.editorBracketPairGuideActiveBackground3=(0,y.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(47,null)),e.editorBracketPairGuideActiveBackground4=(0,y.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(48,null)),e.editorBracketPairGuideActiveBackground5=(0,y.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(49,null)),e.editorBracketPairGuideActiveBackground6=(0,y.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},S.localize(50,null)),e.editorUnicodeHighlightBorder=(0,y.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},S.localize(51,null)),e.editorUnicodeHighlightBackground=(0,y.registerColor)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},S.localize(52,null)),(0,D.registerThemingParticipant)((_,h)=>{const m=_.getColor(y.editorBackground),n=_.getColor(e.editorLineHighlight),t=n&&!n.isTransparent()?n:m;t&&h.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${t}; }`)})}),define(J[793],ee([1,0,106,73,16,24,23,91,384]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class _ extends S.DynamicViewOverlay{constructor(t){super(),this._context=t;const i=this._context.configuration.options,s=i.get(139);this._lineHeight=i.get(64),this._renderLineHighlight=i.get(91),this._renderLineHighlightOnlyWhenFocus=i.get(92),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new w.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let t=!1;const i=this._selections.map(r=>r.positionLineNumber);i.sort((r,c)=>r-c),y.equals(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,t=!0);const s=this._selections.every(r=>r.isEmpty());return this._selectionIsEmpty!==s&&(this._selectionIsEmpty=s,t=!0),t}onThemeChanged(t){return this._readFromSelections()}onConfigurationChanged(t){const i=this._context.configuration.options,s=i.get(139);return this._lineHeight=i.get(64),this._renderLineHighlight=i.get(91),this._renderLineHighlightOnlyWhenFocus=i.get(92),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,!0}onCursorStateChanged(t){return this._selections=t.selections,this._readFromSelections()}onFlushed(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollWidthChanged||t.scrollTopChanged}onZonesChanged(t){return!0}onFocusChanged(t){return this._renderLineHighlightOnlyWhenFocus?(this._focused=t.isFocused,!0):!1}prepareRender(t){if(!this._shouldRenderThis()){this._renderData=null;return}const i=this._renderOne(t),s=t.visibleRange.startLineNumber,r=t.visibleRange.endLineNumber,c=this._cursorLineNumbers.length;let g=0;const o=[];for(let l=s;l<=r;l++){const a=l-s;for(;g<c&&this._cursorLineNumbers[g]<l;)g++;g<c&&this._cursorLineNumbers[g]===l?o[a]=i:o[a]=""}this._renderData=o}render(t,i){if(!this._renderData)return"";const s=i-t;return s>=this._renderData.length?"":this._renderData[s]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.AbstractLineHighlightOverlay=_;class h extends _{_renderOne(t){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(t.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}e.CurrentLineHighlightOverlay=h;class m extends _{_renderOne(t){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}e.CurrentLineMarginHighlightOverlay=m,(0,D.registerThemingParticipant)((n,t)=>{const i=n.getColor(k.editorLineHighlight);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||n.defines(k.editorLineHighlightBorder)){const s=n.getColor(k.editorLineHighlightBorder);s&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${s}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${s}; }`),(0,b.isHighContrast)(n.type)&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(J[794],ee([1,0,106,73,24,13,16,18,264,195,387]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class m extends S.DynamicViewOverlay{constructor(i){super(),this._context=i,this._primaryPosition=null;const s=this._context.configuration.options,r=s.get(140),c=s.get(48);this._lineHeight=s.get(64),this._spaceWidth=c.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.wrappingColumn*c.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=s.get(14),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(i){const s=this._context.configuration.options,r=s.get(140),c=s.get(48);return this._lineHeight=s.get(64),this._spaceWidth=c.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.wrappingColumn*c.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=s.get(14),!0}onCursorStateChanged(i){var s;const c=i.selections[0].getPosition();return!((s=this._primaryPosition)===null||s===void 0)&&s.equals(c)?!1:(this._primaryPosition=c,!0)}onDecorationsChanged(i){return!0}onFlushed(i){return!0}onLinesChanged(i){return!0}onLinesDeleted(i){return!0}onLinesInserted(i){return!0}onScrollChanged(i){return i.scrollTopChanged}onZonesChanged(i){return!0}onLanguageConfigurationChanged(i){return!0}prepareRender(i){var s,r,c,g;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const o=i.visibleRange.startLineNumber,l=i.visibleRange.endLineNumber,a=i.scrollWidth,d=this._lineHeight,u=this._primaryPosition,C=this.getGuidesByLine(o,Math.min(l+1,this._context.viewModel.getLineCount()),u),f=[];for(let v=o;v<=l;v++){const p=v-o,L=C[p];let E="";const I=(r=(s=i.visibleRangeForPosition(new D.Position(v,1)))===null||s===void 0?void 0:s.left)!==null&&r!==void 0?r:0;for(const T of L){const F=T.column===-1?I+(T.visibleColumn-1)*this._spaceWidth:i.visibleRangeForPosition(new D.Position(v,T.column)).left;if(F>a||this._maxIndentLeft>0&&F>this._maxIndentLeft)break;const R=T.horizontalLine?T.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",M=T.horizontalLine?((g=(c=i.visibleRangeForPosition(new D.Position(v,T.horizontalLine.endColumn)))===null||c===void 0?void 0:c.left)!==null&&g!==void 0?g:F+this._spaceWidth)-F:this._spaceWidth;E+=`<div class="core-guide ${T.className} ${R}" style="left:${F}px;height:${d}px;width:${M}px"></div>`}f[p]=E}this._renderResult=f}getGuidesByLine(i,s,r){const c=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(i,s,r,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?h.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?h.HorizontalGuidesState.EnabledForActive:h.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,g=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(i,s):null;let o=0,l=0,a=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&r){const C=this._context.viewModel.getActiveIndentGuide(r.lineNumber,i,s);o=C.startLineNumber,l=C.endLineNumber,a=C.indent}const{indentSize:d}=this._context.viewModel.model.getOptions(),u=[];for(let C=i;C<=s;C++){const f=new Array;u.push(f);const v=c?c[C-i]:[],p=new w.ArrayQueue(v),L=g?g[C-i]:0;for(let E=1;E<=L;E++){const I=(E-1)*d+1,T=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||v.length===0)&&o<=C&&C<=l&&E===a;f.push(...p.takeWhile(R=>R.visibleColumn<I)||[]);const F=p.peek();(!F||F.visibleColumn!==I||F.horizontalLine)&&f.push(new h.IndentGuide(I,-1,T?"core-guide-indent-active":"core-guide-indent",null,-1,-1))}f.push(...p.takeWhile(E=>!0)||[])}return u}render(i,s){if(!this._renderResult)return"";const r=s-i;return r<0||r>=this._renderResult.length?"":this._renderResult[r]}}e.IndentGuidesOverlay=m;function n(t){if(!(t&&t.isTransparent()))return t}(0,y.registerThemingParticipant)((t,i)=>{const s=[{bracketColor:k.editorBracketHighlightingForeground1,guideColor:k.editorBracketPairGuideBackground1,guideColorActive:k.editorBracketPairGuideActiveBackground1},{bracketColor:k.editorBracketHighlightingForeground2,guideColor:k.editorBracketPairGuideBackground2,guideColorActive:k.editorBracketPairGuideActiveBackground2},{bracketColor:k.editorBracketHighlightingForeground3,guideColor:k.editorBracketPairGuideBackground3,guideColorActive:k.editorBracketPairGuideActiveBackground3},{bracketColor:k.editorBracketHighlightingForeground4,guideColor:k.editorBracketPairGuideBackground4,guideColorActive:k.editorBracketPairGuideActiveBackground4},{bracketColor:k.editorBracketHighlightingForeground5,guideColor:k.editorBracketPairGuideBackground5,guideColorActive:k.editorBracketPairGuideActiveBackground5},{bracketColor:k.editorBracketHighlightingForeground6,guideColor:k.editorBracketPairGuideBackground6,guideColorActive:k.editorBracketPairGuideActiveBackground6}],r=new _.BracketPairGuidesClassNames,c=s.map(g=>{var o,l;const a=t.getColor(g.bracketColor),d=t.getColor(g.guideColor),u=t.getColor(g.guideColorActive),C=n((o=n(d))!==null&&o!==void 0?o:a?.transparent(.3)),f=n((l=n(u))!==null&&l!==void 0?l:a);if(!(!C||!f))return{guideColor:C,guideColorActive:f}}).filter(b.isDefined);if(c.length>0){for(let g=0;g<30;g++){const o=c[g%c.length];i.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(g).replace(/ /g,".")} { --guide-color: ${o.guideColor}; --guide-color-active: ${o.guideColorActive}; }`)}i.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),i.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),i.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),i.addRule(`.monaco-editor .vertical.${r.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),i.addRule(`.monaco-editor .horizontal-top.${r.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),i.addRule(`.monaco-editor .horizontal-bottom.${r.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}})}),define(J[328],ee([1,0,17,106,13,24,73,388]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class b extends k.DynamicViewOverlay{constructor(h){super(),this._context=h,this._readConfig(),this._lastCursorModelPosition=new y.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const h=this._context.configuration.options;this._lineHeight=h.get(64);const m=h.get(65);this._renderLineNumbers=m.renderType,this._renderCustomLineNumbers=m.renderFn,this._renderFinalNewline=h.get(90);const n=h.get(139);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(h){return this._readConfig(),!0}onCursorStateChanged(h){const m=h.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(m);let n=!1;return this._activeLineNumber!==m.lineNumber&&(this._activeLineNumber=m.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(h){return!0}onLinesChanged(h){return!0}onLinesDeleted(h){return!0}onLinesInserted(h){return!0}onScrollChanged(h){return h.scrollTopChanged}onZonesChanged(h){return!0}_getLineRenderLineNumber(h){const m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new y.Position(h,1));if(m.column!==1)return"";const n=m.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const t=Math.abs(this._lastCursorModelPosition.lineNumber-n);return t===0?\'<span class="relative-current-line-number">\'+n+"</span>":String(t)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}prepareRender(h){if(this._renderLineNumbers===0){this._renderResult=null;return}const m=S.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=h.visibleRange.startLineNumber,t=h.visibleRange.endLineNumber,i=this._context.viewModel.getLineCount(),s=[];for(let r=n;r<=t;r++){const c=r-n,g=this._getLineRenderLineNumber(r);if(!g){s[c]="";continue}let o="";if(r===i&&this._context.viewModel.getLineLength(r)===0){if(this._renderFinalNewline==="off"){s[c]="";continue}this._renderFinalNewline==="dimmed"&&(o=" dimmed-line-number")}r===this._activeLineNumber&&(o=" active-line-number"),s[c]=`<div class="${b.CLASS_NAME}${m}${o}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${g}</div>`}this._renderResult=s}render(h,m){if(!this._renderResult)return"";const n=m-h;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}b.CLASS_NAME="line-numbers",e.LineNumbersOverlay=b,(0,D.registerThemingParticipant)((_,h)=>{const m=_.getColor(w.editorLineNumbers),n=_.getColor(w.editorDimmedLineNumber);n?h.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):m&&h.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${m.transparent(.4)}; }`)})}),define(J[795],ee([1,0,569,46,35,17,9,74,216,252,52,328,266,40,135,13,5,23,161,26,37,279,382]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class u{constructor(L,E,I,T,F){this._context=L,this.modelLineNumber=E,this.distanceToModelLineStart=I,this.widthOfHiddenLineTextBefore=T,this.distanceToModelLineEnd=F,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(L){const E=new r.Position(this.modelLineNumber,this.distanceToModelLineStart+1),I=new r.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(E),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(I),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=L.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=L.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(L){return this._previousPresentation||(L?this._previousPresentation=L:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const C=k.isFirefox;class f extends m.ViewPart{constructor(L,E,I){super(L),this._primaryCursorPosition=new r.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=E,this._visibleRangeProvider=I,this._scrollLeft=0,this._scrollTop=0;const T=this._context.configuration.options,F=T.get(139);this._setAccessibilityOptions(T),this._contentLeft=F.contentLeft,this._contentWidth=F.contentWidth,this._contentHeight=F.height,this._fontInfo=T.get(48),this._lineHeight=T.get(64),this._emptySelectionClipboard=T.get(35),this._copyWithSyntaxHighlighting=T.get(23),this._visibleTextArea=null,this._selections=[new g.Selection(1,1,1,1)],this._modelSelections=[new g.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,y.createFastDomNode)(document.createElement("textarea")),m.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:R}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${R*this._fontInfo.spaceWidth}px`,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(T)),this.textArea.setAttribute("tabindex",String(T.get(119))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",S.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,y.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const M={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:P=>this._context.viewModel.getLineMaxColumn(P),getValueInRange:(P,x)=>this._context.viewModel.getValueInRange(P,x),getValueLengthInRange:(P,x)=>this._context.viewModel.getValueLengthInRange(P,x),modifyPosition:(P,x)=>this._context.viewModel.modifyPosition(P,x)},N={getDataToCopy:()=>{const P=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,D.isWindows),x=this._context.viewModel.model.getEOL(),W=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),U=Array.isArray(P)?P:null,O=Array.isArray(P)?P.join(x):P;let $,Q=null;if(_.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&O.length<65536){const se=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);se&&($=se.html,Q=se.mode)}return{isFromEmptySelection:W,multicursorText:U,text:O,html:$,mode:Q}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const P=this._selections[0];if(D.isMacintosh&&P.isEmpty()){const W=P.getStartPosition();let U=this._getWordBeforePosition(W);if(U.length===0&&(U=this._getCharacterBeforePosition(W)),U.length>0)return new h.TextAreaState(U,U.length,U.length,c.Range.fromPositions(W),0)}const x=500;if(D.isMacintosh&&!P.isEmpty()&&M.getValueLengthInRange(P,0)<x){const W=M.getValueInRange(P,0);return new h.TextAreaState(W,0,W.length,P,0)}if(k.isSafari&&!P.isEmpty()){const W="vscode-placeholder";return new h.TextAreaState(W,0,W.length,null,void 0)}return h.TextAreaState.EMPTY}if(k.isAndroid){const P=this._selections[0];if(P.isEmpty()){const x=P.getStartPosition(),[W,U]=this._getAndroidWordAtPosition(x);if(W.length>0)return new h.TextAreaState(W,U,U,c.Range.fromPositions(x),0)}return h.TextAreaState.EMPTY}return h.PagedScreenReaderStrategy.fromEditorSelection(M,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(P,x,W)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(P,x,W)},A=this._register(new _.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(new _.TextAreaInput(N,A,D.OS,k)),this._register(this._textAreaInput.onKeyDown(P=>{this._viewController.emitKeyDown(P)})),this._register(this._textAreaInput.onKeyUp(P=>{this._viewController.emitKeyUp(P)})),this._register(this._textAreaInput.onPaste(P=>{let x=!1,W=null,U=null;P.metadata&&(x=this._emptySelectionClipboard&&!!P.metadata.isFromEmptySelection,W=typeof P.metadata.multicursorText<"u"?P.metadata.multicursorText:null,U=P.metadata.mode),this._viewController.paste(P.text,x,W,U)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(P=>{P.replacePrevCharCnt||P.replaceNextCharCnt||P.positionDelta?(h._debugComposition&&console.log(` => compositionType: <<${P.text}>>, ${P.replacePrevCharCnt}, ${P.replaceNextCharCnt}, ${P.positionDelta}`),this._viewController.compositionType(P.text,P.replacePrevCharCnt,P.replaceNextCharCnt,P.positionDelta)):(h._debugComposition&&console.log(` => type: <<${P.text}>>`),this._viewController.type(P.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(P=>{this._viewController.setSelection(P)})),this._register(this._textAreaInput.onCompositionStart(P=>{const x=this.textArea.domNode,W=this._modelSelections[0],{distanceToModelLineStart:U,widthOfHiddenTextBefore:O}=(()=>{const Q=x.value.substring(0,Math.min(x.selectionStart,x.selectionEnd)),se=Q.lastIndexOf(`\n`),le=Q.substring(se+1),te=le.lastIndexOf("\t"),re=le.length-te-1,H=W.getStartPosition(),B=Math.min(H.column-1,re),j=H.column-1-B,G=le.substring(0,le.length-B),{tabSize:Y}=this._context.viewModel.model.getOptions(),ne=v(G,this._fontInfo,Y);return{distanceToModelLineStart:j,widthOfHiddenTextBefore:ne}})(),{distanceToModelLineEnd:$}=(()=>{const Q=x.value.substring(Math.max(x.selectionStart,x.selectionEnd)),se=Q.indexOf(`\n`),le=se===-1?Q:Q.substring(0,se),te=le.indexOf("\t"),re=te===-1?le.length:le.length-te-1,H=W.getEndPosition(),B=Math.min(this._context.viewModel.model.getLineMaxColumn(H.lineNumber)-H.column,re);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(H.lineNumber)-H.column-B}})();this._context.viewModel.revealRange("keyboard",!0,c.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new u(this._context,W.startLineNumber,U,O,$),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(P=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(d.IME.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(L){this._textAreaInput.writeScreenReaderContent(L)}dispose(){super.dispose()}_getAndroidWordAtPosition(L){const E=\'`~!@#$%^&*()-=+[{]}\\\\|;:",.<>/?\',I=this._context.viewModel.getLineContent(L.lineNumber),T=(0,s.getMapForWordSeparators)(E);let F=!0,R=L.column,M=!0,N=L.column,A=0;for(;A<50&&(F||M);){if(F&&R<=1&&(F=!1),F){const P=I.charCodeAt(R-2);T.get(P)!==0?F=!1:R--}if(M&&N>I.length&&(M=!1),M){const P=I.charCodeAt(N-1);T.get(P)!==0?M=!1:N++}A++}return[I.substring(R-1,N-1),L.column-R]}_getWordBeforePosition(L){const E=this._context.viewModel.getLineContent(L.lineNumber),I=(0,s.getMapForWordSeparators)(this._context.configuration.options.get(125));let T=L.column,F=0;for(;T>1;){const R=E.charCodeAt(T-2);if(I.get(R)!==0||F>50)return E.substring(T-1,L.column-1);F++,T--}return E.substring(0,L.column-1)}_getCharacterBeforePosition(L){if(L.column>1){const I=this._context.viewModel.getLineContent(L.lineNumber).charAt(L.column-2);if(!w.isHighSurrogate(I.charCodeAt(0)))return I}return""}_getAriaLabel(L){return L.get(2)===1?S.localize(1,null,D.isLinux?"Shift+Alt+F1":"Alt+F1"):L.get(4)}_setAccessibilityOptions(L){this._accessibilitySupport=L.get(2);const E=L.get(3);this._accessibilitySupport===2&&E===i.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=E;const T=L.get(139).wrappingColumn;if(T!==-1&&this._accessibilitySupport!==1){const F=L.get(48);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(T*F.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=C?0:1}onConfigurationChanged(L){const E=this._context.configuration.options,I=E.get(139);this._setAccessibilityOptions(E),this._contentLeft=I.contentLeft,this._contentWidth=I.contentWidth,this._contentHeight=I.height,this._fontInfo=E.get(48),this._lineHeight=E.get(64),this._emptySelectionClipboard=E.get(35),this._copyWithSyntaxHighlighting=E.get(23),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:T}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${T*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(E)),this.textArea.setAttribute("tabindex",String(E.get(119))),(L.hasChanged(32)||L.hasChanged(87))&&this._ensureReadOnlyAttribute(),L.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(L){return this._selections=L.selections.slice(0),this._modelSelections=L.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(L){return!0}onFlushed(L){return!0}onLinesChanged(L){return!0}onLinesDeleted(L){return!0}onLinesInserted(L){return!0}onScrollChanged(L){return this._scrollLeft=L.scrollLeft,this._scrollTop=L.scrollTop,!0}onZonesChanged(L){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(L){L.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",L.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),L.role&&this.textArea.setAttribute("role",L.role)}_ensureReadOnlyAttribute(){const L=this._context.configuration.options;!d.IME.enabled||L.get(32)&&L.get(87)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(L){var E;this._primaryCursorPosition=new r.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=L.visibleRangeForPosition(this._primaryCursorPosition),(E=this._visibleTextArea)===null||E===void 0||E.prepareRender(L)}render(L){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var L;if(this._visibleTextArea){const T=this._visibleTextArea.visibleTextareaStart,F=this._visibleTextArea.visibleTextareaEnd,R=this._visibleTextArea.startPosition,M=this._visibleTextArea.endPosition;if(R&&M&&T&&F&&F.left>=this._scrollLeft&&T.left<=this._scrollLeft+this._contentWidth){const N=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,A=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let P=this._visibleTextArea.widthOfHiddenLineTextBefore,x=this._contentLeft+T.left-this._scrollLeft,W=F.left-T.left+1;if(x<this._contentLeft){const le=this._contentLeft-x;x+=le,P+=le,W-=le}W>this._contentWidth&&(W=this._contentWidth);const U=this._context.viewModel.getViewLineData(R.lineNumber),O=U.tokens.findTokenIndexAtOffset(R.column-1),$=U.tokens.findTokenIndexAtOffset(M.column-1),Q=O===$,se=this._visibleTextArea.definePresentation(Q?U.tokens.getPresentation(O):null);this.textArea.domNode.scrollTop=A*this._lineHeight,this.textArea.domNode.scrollLeft=P,this._doRender({lastRenderPosition:null,top:N,left:x,width:W,height:this._lineHeight,useCover:!1,color:(l.TokenizationRegistry.getColorMap()||[])[se.foreground],italic:se.italic,bold:se.bold,underline:se.underline,strikethrough:se.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const E=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(E<this._contentLeft||E>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const I=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(I<0||I>this._contentHeight){this._renderAtTopLeft();return}if(D.isMacintosh){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:I,left:this._textAreaWrapping?this._contentLeft:E,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const T=(L=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&L!==void 0?L:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=T*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:I,left:this._textAreaWrapping?this._contentLeft:E,width:this._textAreaWidth,height:C?0:1,useCover:!1})}_newlinecount(L){let E=0,I=-1;do{if(I=L.indexOf(`\n`,I+1),I===-1)break;E++}while(!0);return E}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:C?0:1,useCover:!0})}_doRender(L){this._lastRenderPosition=L.lastRenderPosition;const E=this.textArea,I=this.textAreaCover;(0,b.applyFontInfo)(E,this._fontInfo),E.setTop(L.top),E.setLeft(L.left),E.setWidth(L.width),E.setHeight(L.height),E.setColor(L.color?a.Color.Format.CSS.formatHex(L.color):""),E.setFontStyle(L.italic?"italic":""),L.bold&&E.setFontWeight("bold"),E.setTextDecoration(`${L.underline?" underline":""}${L.strikethrough?" line-through":""}`),I.setTop(L.useCover?L.top:0),I.setLeft(L.useCover?L.left:0),I.setWidth(L.useCover?L.width:0),I.setHeight(L.useCover?L.height:0);const T=this._context.configuration.options;T.get(55)?I.setClassName("monaco-editor-background textAreaCover "+t.Margin.OUTER_CLASS_NAME):T.get(65).renderType!==0?I.setClassName("monaco-editor-background textAreaCover "+n.LineNumbersOverlay.CLASS_NAME):I.setClassName("monaco-editor-background textAreaCover")}}e.TextAreaHandler=f;function v(p,L,E){if(p.length===0)return 0;const I=document.createElement("div");I.style.position="absolute",I.style.top="-50000px",I.style.width="50000px";const T=document.createElement("span");(0,b.applyFontInfo)(T,L),T.style.whiteSpace="pre",T.style.tabSize=`${E*L.spaceWidth}px`,T.append(p),I.appendChild(T),document.body.appendChild(I);const F=T.offsetWidth;return document.body.removeChild(I),F}}),define(J[796],ee([1,0,35,37,52,13,26,73,81]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class h{constructor(t,i){const s=t.options;this.lineHeight=s.get(64),this.pixelRatio=s.get(137),this.overviewRulerLanes=s.get(80),this.renderBorder=s.get(79);const r=i.getColor(b.editorOverviewRulerBorder);this.borderColor=r?r.toString():null,this.hideCursor=s.get(57);const c=i.getColor(b.editorCursorForeground);this.cursorColor=c?c.transparent(.7).toString():null,this.themeType=i.type;const g=s.get(70),o=g.enabled,l=g.side,a=i.getColor(b.editorOverviewRulerBackground),d=w.TokenizationRegistry.getDefaultBackground();a?this.backgroundColor=a:o&&l==="right"?this.backgroundColor=d:this.backgroundColor=null;const C=s.get(139).overviewRuler;this.top=C.top,this.right=C.right,this.domWidth=C.width,this.domHeight=C.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[f,v]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=f,this.w=v}_initLanes(t,i,s){const r=i-t;if(s>=3){const c=Math.floor(r/3),g=Math.floor(r/3),o=r-c-g,l=t,a=l+c,d=l+c+o;return[[0,l,a,l,d,l,a,l],[0,c,o,c+o,g,c+o+g,o+g,c+o+g]]}else if(s===2){const c=Math.floor(r/2),g=r-c,o=t,l=o+c;return[[0,o,o,o,l,o,o,o],[0,c,c,c,g,c+g,c+g,c+g]]}else{const c=t,g=r;return[[0,c,c,c,c,c,c,c],[0,g,g,g,g,g,g,g]]}}equals(t){return this.lineHeight===t.lineHeight&&this.pixelRatio===t.pixelRatio&&this.overviewRulerLanes===t.overviewRulerLanes&&this.renderBorder===t.renderBorder&&this.borderColor===t.borderColor&&this.hideCursor===t.hideCursor&&this.cursorColor===t.cursorColor&&this.themeType===t.themeType&&k.Color.equals(this.backgroundColor,t.backgroundColor)&&this.top===t.top&&this.right===t.right&&this.domWidth===t.domWidth&&this.domHeight===t.domHeight&&this.canvasWidth===t.canvasWidth&&this.canvasHeight===t.canvasHeight}}class m extends y.ViewPart{constructor(t){super(t),this._domNode=(0,S.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=w.TokenizationRegistry.onDidChange(i=>{i.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(t){const i=new h(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(i)?!1:(this._settings=i,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,t&&this._render(),!0)}onConfigurationChanged(t){return this._updateSettings(!1)}onCursorStateChanged(t){this._cursorPositions=[];for(let i=0,s=t.selections.length;i<s;i++)this._cursorPositions[i]=t.selections[i].getPosition();return this._cursorPositions.sort(D.Position.compare),!0}onDecorationsChanged(t){return!!t.affectsOverviewRuler}onFlushed(t){return!0}onScrollChanged(t){return t.scrollHeightChanged}onZonesChanged(t){return!0}onThemeChanged(t){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(t){}render(t){this._render()}_render(){const t=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(t?k.Color.Format.CSS.formatHexA(t):""),this._domNode.setDisplay("none");return}this._domNode.setDisplay("block");const i=this._settings.canvasWidth,s=this._settings.canvasHeight,r=this._settings.lineHeight,c=this._context.viewLayout,g=this._context.viewLayout.getScrollHeight(),o=s/g,l=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,d=a/2|0,u=this._domNode.domNode.getContext("2d");t?t.isOpaque()?(u.fillStyle=k.Color.Format.CSS.formatHexA(t),u.fillRect(0,0,i,s)):(u.clearRect(0,0,i,s),u.fillStyle=k.Color.Format.CSS.formatHexA(t),u.fillRect(0,0,i,s)):u.clearRect(0,0,i,s);const C=this._settings.x,f=this._settings.w;l.sort(_.OverviewRulerDecorationsGroup.cmp);for(const v of l){const p=v.color,L=v.data;u.fillStyle=p;let E=0,I=0,T=0;for(let F=0,R=L.length/3;F<R;F++){const M=L[3*F],N=L[3*F+1],A=L[3*F+2];let P=c.getVerticalOffsetForLineNumber(N)*o|0,x=(c.getVerticalOffsetForLineNumber(A)+r)*o|0;if(x-P<a){let U=(P+x)/2|0;U<d?U=d:U+d>s&&(U=s-d),P=U-d,x=U+d}P>T+1||M!==E?(F!==0&&u.fillRect(C[E],I,f[E],T-I),E=M,I=P,T=x):x>T&&(T=x)}u.fillRect(C[E],I,f[E],T-I)}if(!this._settings.hideCursor&&this._settings.cursorColor){const v=2*this._settings.pixelRatio|0,p=v/2|0,L=this._settings.x[7],E=this._settings.w[7];u.fillStyle=this._settings.cursorColor;let I=-100,T=-100;for(let F=0,R=this._cursorPositions.length;F<R;F++){const M=this._cursorPositions[F];let N=c.getVerticalOffsetForLineNumber(M.lineNumber)*o|0;N<p?N=p:N+p>s&&(N=s-p);const A=N-p,P=A+v;A>T+1?(F!==0&&u.fillRect(L,I,E,T-I),I=A,T=P):P>T&&(T=P)}u.fillRect(L,I,E,T-I)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,s),u.stroke(),u.moveTo(0,0),u.lineTo(i,0),u.stroke())}}e.DecorationsOverviewRuler=m}),define(J[797],ee([1,0,35,12,52,579,40,73,24,91,398]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class m extends y.ViewPart{constructor(t){super(t);const i=this._context.configuration.options;this._readOnly=i.get(87),this._cursorBlinking=i.get(24),this._cursorStyle=i.get(26),this._cursorSmoothCaretAnimation=i.get(25),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new D.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,S.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 k.TimeoutTimer,this._cursorFlatBlinkInterval=new k.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(t){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(t){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(t){const i=this._context.configuration.options;this._readOnly=i.get(87),this._cursorBlinking=i.get(24),this._cursorStyle=i.get(26),this._cursorSmoothCaretAnimation=i.get(25),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(t);for(let s=0,r=this._secondaryCursors.length;s<r;s++)this._secondaryCursors[s].onConfigurationChanged(t);return!0}_onCursorPositionChanged(t,i,s){const r=this._secondaryCursors.length!==i.length||this._cursorSmoothCaretAnimation==="explicit"&&s!==3;if(this._primaryCursor.onCursorPositionChanged(t,r),this._updateBlinking(),this._secondaryCursors.length<i.length){const c=i.length-this._secondaryCursors.length;for(let g=0;g<c;g++){const o=new D.ViewCursor(this._context);this._domNode.domNode.insertBefore(o.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(o)}}else if(this._secondaryCursors.length>i.length){const c=this._secondaryCursors.length-i.length;for(let g=0;g<c;g++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let c=0;c<i.length;c++)this._secondaryCursors[c].onCursorPositionChanged(i[c],r)}onCursorStateChanged(t){const i=[];for(let r=0,c=t.selections.length;r<c;r++)i[r]=t.selections[r].getPosition();this._onCursorPositionChanged(i[0],i.slice(1),t.reason);const s=t.selections[0].isEmpty();return this._selectionIsEmpty!==s&&(this._selectionIsEmpty=s,this._updateDomClassName()),!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onFocusChanged(t){return this._editorHasFocus=t.isFocused,this._updateBlinking(),!1}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return!0}onTokensChanged(t){const i=s=>{for(let r=0,c=t.ranges.length;r<c;r++)if(t.ranges[r].fromLineNumber<=s.lineNumber&&s.lineNumber<=t.ranges[r].toLineNumber)return!0;return!1};if(i(this._primaryCursor.getPosition()))return!0;for(const s of this._secondaryCursors)if(i(s.getPosition()))return!0;return!1}onZonesChanged(t){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const t=this._getCursorBlinking(),i=t===0,s=t===5;i?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!i&&!s&&(t===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},m.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},m.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let t="cursors-layer";switch(this._selectionIsEmpty||(t+=" has-selection"),this._cursorStyle){case w.TextEditorCursorStyle.Line:t+=" cursor-line-style";break;case w.TextEditorCursorStyle.Block:t+=" cursor-block-style";break;case w.TextEditorCursorStyle.Underline:t+=" cursor-underline-style";break;case w.TextEditorCursorStyle.LineThin:t+=" cursor-line-thin-style";break;case w.TextEditorCursorStyle.BlockOutline:t+=" cursor-block-outline-style";break;case w.TextEditorCursorStyle.UnderlineThin:t+=" cursor-underline-thin-style";break;default:t+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:t+=" cursor-blink";break;case 2:t+=" cursor-smooth";break;case 3:t+=" cursor-phase";break;case 4:t+=" cursor-expand";break;case 5:t+=" cursor-solid";break;default:t+=" cursor-solid"}else t+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(t+=" cursor-smooth-caret-animation"),t}_show(){this._primaryCursor.show();for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].hide();this._isVisible=!1}prepareRender(t){this._primaryCursor.prepareRender(t);for(let i=0,s=this._secondaryCursors.length;i<s;i++)this._secondaryCursors[i].prepareRender(t)}render(t){const i=[];let s=0;const r=this._primaryCursor.render(t);r&&(i[s++]=r);for(let c=0,g=this._secondaryCursors.length;c<g;c++){const o=this._secondaryCursors[c].render(t);o&&(i[s++]=o)}this._renderData=i}getLastRenderData(){return this._renderData}}m.BLINK_INTERVAL=500,e.ViewCursors=m,(0,_.registerThemingParticipant)((n,t)=>{const i=n.getColor(b.editorCursorForeground);if(i){let s=n.getColor(b.editorCursorBackground);s||(s=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${s}; }`),(0,h.isHighContrast)(n.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}})}),define(J[798],ee([1,0,106,9,109,13,73,399]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WhitespaceOverlay=void 0;class b extends S.DynamicViewOverlay{constructor(m){super(),this._context=m,this._options=new _(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(m){const n=new _(this._context.configuration);return this._options.equals(n)?m.hasChanged(139):(this._options=n,!0)}onCursorStateChanged(m){return this._selection=m.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(m){return!0}onFlushed(m){return!0}onLinesChanged(m){return!0}onLinesDeleted(m){return!0}onLinesInserted(m){return!0}onScrollChanged(m){return m.scrollTopChanged}onZonesChanged(m){return!0}prepareRender(m){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}const n=m.visibleRange.startLineNumber,i=m.visibleRange.endLineNumber-n+1,s=new Array(i);for(let c=0;c<i;c++)s[c]=!0;const r=this._context.viewModel.getMinimapLinesRenderingData(m.viewportData.startLineNumber,m.viewportData.endLineNumber,s);this._renderResult=[];for(let c=m.viewportData.startLineNumber;c<=m.viewportData.endLineNumber;c++){const g=c-m.viewportData.startLineNumber,o=r.data[g];let l=null;if(this._options.renderWhitespace==="selection"){const a=this._selection;for(const d of a){if(d.endLineNumber<c||d.startLineNumber>c)continue;const u=d.startLineNumber===c?d.startColumn:o.minColumn,C=d.endLineNumber===c?d.endColumn:o.maxColumn;u<C&&(l||(l=[]),l.push(new y.LineRange(u-1,C-1)))}}this._renderResult[g]=this._applyRenderWhitespace(m,c,l,o)}}_applyRenderWhitespace(m,n,t,i){if(this._options.renderWhitespace==="selection"&&!t||this._options.renderWhitespace==="trailing"&&i.continuesWithWrappedLine)return"";const s=this._context.theme.getColor(w.editorWhitespaces),r=this._options.renderWithSVG,c=i.content,g=this._options.stopRenderingLineAfter===-1?c.length:Math.min(this._options.stopRenderingLineAfter,c.length),o=i.continuesWithWrappedLine,l=i.minColumn-1,a=this._options.renderWhitespace==="boundary",d=this._options.renderWhitespace==="trailing",u=this._options.lineHeight,C=this._options.middotWidth,f=this._options.wsmiddotWidth,v=this._options.spaceWidth,p=Math.abs(f-v),L=Math.abs(C-v),E=p<L?11825:183,I=this._options.canUseHalfwidthRightwardsArrow;let T="",F=!1,R=k.firstNonWhitespaceIndex(c),M;R===-1?(F=!0,R=g,M=g):M=k.lastNonWhitespaceIndex(c);let N=0,A=t&&t[N],P=0;for(let x=l;x<g;x++){const W=c.charCodeAt(x);if(A&&x>=A.endOffset&&(N++,A=t&&t[N]),W!==9&&W!==32||d&&!F&&x<=M)continue;if(a&&x>=R&&x<=M&&W===32){const O=x-1>=0?c.charCodeAt(x-1):0,$=x+1<g?c.charCodeAt(x+1):0;if(O!==32&&$!==32)continue}if(a&&o&&x===g-1){const O=x-1>=0?c.charCodeAt(x-1):0;if(W===32&&O!==32&&O!==9)continue}if(t&&(!A||A.startOffset>x||A.endOffset<=x))continue;const U=m.visibleRangeForPosition(new D.Position(n,x+1));U&&(r?(P=Math.max(P,U.left),W===9?T+=this._renderArrow(u,v,U.left):T+=`<circle cx="${(U.left+v/2).toFixed(2)}" cy="${(u/2).toFixed(2)}" r="${(v/7).toFixed(2)}" />`):W===9?T+=`<div class="mwh" style="left:${U.left}px;height:${u}px;">${I?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:T+=`<div class="mwh" style="left:${U.left}px;height:${u}px;">${String.fromCharCode(E)}</div>`)}return r?(P=Math.round(P+v),`<svg style="position:absolute;width:${P}px;height:${u}px" viewBox="0 0 ${P} ${u}" xmlns="http://www.w3.org/2000/svg" fill="${s}">`+T+"</svg>"):T}_renderArrow(m,n,t){const i=n/7,s=n,r=m/2,c=t,g={x:0,y:i/2},o={x:100/125*s,y:g.y},l={x:o.x-.2*o.x,y:o.y+.2*o.x},a={x:l.x+.1*o.x,y:l.y+.1*o.x},d={x:a.x+.35*o.x,y:a.y-.35*o.x},u={x:d.x,y:-d.y},C={x:a.x,y:-a.y},f={x:l.x,y:-l.y},v={x:o.x,y:-o.y},p={x:g.x,y:-g.y};return`<path d="M ${[g,o,l,a,d,u,C,f,v,p].map(I=>`${(c+I.x).toFixed(2)} ${(r+I.y).toFixed(2)}`).join(" L ")}" />`}render(m,n){if(!this._renderResult)return"";const t=n-m;return t<0||t>=this._renderResult.length?"":this._renderResult[t]}}e.WhitespaceOverlay=b;class _{constructor(m){const n=m.options,t=n.get(48),i=n.get(36);i==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):i==="svg"?(this.renderWhitespace=n.get(94),this.renderWithSVG=!0):(this.renderWhitespace=n.get(94),this.renderWithSVG=!1),this.spaceWidth=t.spaceWidth,this.middotWidth=t.middotWidth,this.wsmiddotWidth=t.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=t.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(64),this.stopRenderingLineAfter=n.get(112)}equals(m){return this.renderWhitespace===m.renderWhitespace&&this.renderWithSVG===m.renderWithSVG&&this.spaceWidth===m.spaceWidth&&this.middotWidth===m.middotWidth&&this.wsmiddotWidth===m.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===m.canUseHalfwidthRightwardsArrow&&this.lineHeight===m.lineHeight&&this.stopRenderingLineAfter===m.stopRenderingLineAfter}}}),define(J[799],ee([1,0,7,23,35,11,788,795,740,250,553,52,550,793,486,791,196,794,328,789,487,266,488,772,489,796,498,490,491,792,797,492,13,134,499,495,137,24,327,485,241,798]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T,F,R,M,N,A,P,x,W,U,O,$){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;class Q extends P.ViewEventHandler{constructor(te,re,H,B,j,G){super(),this._selections=[new k.Selection(1,1,1,1)],this._renderAnimationFrame=null;const Y=new _.ViewController(re,B,j,te);this._context=new N.ViewContext(re,H,B),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new b.TextAreaHandler(this._context,Y,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,y.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,y.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,y.createFastDomNode)(document.createElement("div")),n.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 F.ViewZones(this._context),this._viewParts.push(this._viewZones);const ne=new v.DecorationsOverviewRuler(this._context);this._viewParts.push(ne);const de=new E.ScrollDecorationViewPart(this._context);this._viewParts.push(de);const he=new m.ContentViewOverlays(this._context);this._viewParts.push(he),he.addDynamicOverlay(new i.CurrentLineHighlightOverlay(this._context)),he.addDynamicOverlay(new I.SelectionsOverlay(this._context)),he.addDynamicOverlay(new g.IndentGuidesOverlay(this._context)),he.addDynamicOverlay(new s.DecorationsOverlay(this._context)),he.addDynamicOverlay(new $.WhitespaceOverlay(this._context));const oe=new m.MarginViewOverlays(this._context);this._viewParts.push(oe),oe.addDynamicOverlay(new i.CurrentLineMarginHighlightOverlay(this._context)),oe.addDynamicOverlay(new c.GlyphMarginOverlay(this._context)),oe.addDynamicOverlay(new u.MarginViewLineDecorationsOverlay(this._context)),oe.addDynamicOverlay(new a.LinesDecorationsOverlay(this._context)),oe.addDynamicOverlay(new o.LineNumbersOverlay(this._context));const ce=new d.Margin(this._context);ce.getDomNode().appendChild(this._viewZones.marginDomNode),ce.getDomNode().appendChild(oe.getDomNode()),this._viewParts.push(ce),this._contentWidgets=new t.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 f.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const z=new L.Rulers(this._context);this._viewParts.push(z);const V=new U.BlockDecorations(this._context);this._viewParts.push(V);const K=new C.Minimap(this._context);if(this._viewParts.push(K),ne){const ie=this._scrollbar.getOverviewRulerLayoutInfo();ie.parent.insertBefore(ne.getDomNode(),ie.insertBefore)}this._linesContent.appendChild(he.getDomNode()),this._linesContent.appendChild(z.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(ce.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(de.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(K.getDomNode()),this._overflowGuardContainer.appendChild(V.domNode),this.domNode.appendChild(this._overflowGuardContainer),G?G.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new w.PointerHandler(this._context,Y,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){O.inputLatency.onRenderStart(),this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:te=>{this._textAreaHandler.textArea.domNode.dispatchEvent(te)},getLastRenderData:()=>{const te=this._viewCursors.getLastRenderData()||[],re=this._textAreaHandler.getLastRenderData();return new W.PointerHandlerLastRenderData(te,re)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:te=>this._viewZones.shouldSuppressMouseDownOnViewZone(te),shouldSuppressMouseDownOnWidget:te=>this._contentWidgets.shouldSuppressMouseDownOnWidget(te),getPositionFromDOMInfo:(te,re)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(te,re)),visibleRangeForPosition:(te,re)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new R.Position(te,re))),getLineWidth:te=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(te))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:te=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(te))}}_applyLayout(){const re=this._context.configuration.options.get(139);this.domNode.setWidth(re.width),this.domNode.setHeight(re.height),this._overflowGuardContainer.setWidth(re.width),this._overflowGuardContainer.setHeight(re.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const te=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(136)+" "+(0,x.getThemeTypeSelector)(this._context.theme.type)+te}handleEvents(te){super.handleEvents(te),this._scheduleRender()}onConfigurationChanged(te){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(te){return this._selections=te.selections,!1}onFocusChanged(te){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(te){return this._context.theme.update(te.theme),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 te of this._viewParts)te.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=S.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){se(()=>this._actualRender())}_getViewPartsToRender(){const te=[];let re=0;for(const H of this._viewParts)H.shouldRender()&&(te[re++]=H);return te}_actualRender(){if(!S.isInDOM(this.domNode.domNode))return;let te=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&te.length===0)return;const re=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(re.startLineNumber,re.endLineNumber,re.centeredLineNumber);const H=new A.ViewportData(this._selections,re,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(H),this._viewLines.shouldRender()&&(this._viewLines.renderText(H),this._viewLines.onDidRender(),te=this._getViewPartsToRender());const B=new M.RenderingContext(this._context.viewLayout,H,this._viewLines);for(const j of te)j.prepareRender(B);for(const j of te)j.render(B),j.onDidRender()}delegateVerticalScrollbarPointerDown(te){this._scrollbar.delegateVerticalScrollbarPointerDown(te)}delegateScrollFromMouseWheelEvent(te){this._scrollbar.delegateScrollFromMouseWheelEvent(te)}restoreState(te){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:te.scrollTop,scrollLeft:te.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(te,re){const H=this._context.viewModel.model.validatePosition({lineNumber:te,column:re}),B=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(H);this._flushAccumulatedAndRenderNow();const j=this._viewLines.visibleRangeForPosition(new R.Position(B.lineNumber,B.column));return j?j.left:-1}getTargetAtClientPoint(te,re){const H=this._pointerHandler.getTargetAtClientPoint(te,re);return H?h.ViewUserInputEvents.convertViewToModelMouseTarget(H,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(te){return new p.OverviewRuler(this._context,te)}change(te){this._viewZones.changeViewZones(te),this._scheduleRender()}render(te,re){if(re){this._viewLines.forceShouldRender();for(const H of this._viewParts)H.forceShouldRender()}te?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(te){this._textAreaHandler.writeScreenReaderContent(te)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(te){this._textAreaHandler.setAriaOptions(te)}addContentWidget(te){this._contentWidgets.addWidget(te.widget),this.layoutContentWidget(te),this._scheduleRender()}layoutContentWidget(te){var re,H,B,j,G,Y,ne,de;this._contentWidgets.setWidgetPosition(te.widget,(H=(re=te.position)===null||re===void 0?void 0:re.position)!==null&&H!==void 0?H:null,(j=(B=te.position)===null||B===void 0?void 0:B.secondaryPosition)!==null&&j!==void 0?j:null,(Y=(G=te.position)===null||G===void 0?void 0:G.preference)!==null&&Y!==void 0?Y:null,(de=(ne=te.position)===null||ne===void 0?void 0:ne.positionAffinity)!==null&&de!==void 0?de:null),this._scheduleRender()}removeContentWidget(te){this._contentWidgets.removeWidget(te.widget),this._scheduleRender()}addOverlayWidget(te){this._overlayWidgets.addWidget(te.widget),this.layoutOverlayWidget(te),this._scheduleRender()}layoutOverlayWidget(te){const re=te.position?te.position.preference:null;this._overlayWidgets.setWidgetPosition(te.widget,re)&&this._scheduleRender()}removeOverlayWidget(te){this._overlayWidgets.removeWidget(te.widget),this._scheduleRender()}}e.View=Q;function se(le){try{return le()}catch(te){(0,D.onUnexpectedError)(te)}}}),define(J[800],ee([1,0,6,2,5,73,24]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class b extends k.Disposable{constructor(m){super(),this.textModel=m,this.colorProvider=new _,this.onDidChangeEmitter=new S.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=m.getOptions().bracketPairColorizationOptions,this._register(m.bracketPairs.onDidChange(n=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(m){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(m,n,t,i){return i?[]:n===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(m,!0).map(r=>({id:`bracket${r.range.toString()}-${r.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:r.range})).toArray():[]}getAllDecorations(m,n){return m===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new y.Range(1,1,this.textModel.getLineCount(),1),m,n):[]}}e.ColorizedBracketPairsDecorationProvider=b;class _{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(m,n){return m.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(n?m.nestingLevelOfEqualBracketType:m.nestingLevel)}getInlineClassNameOfLevel(m){return`bracket-highlighting-${m%30}`}}(0,w.registerThemingParticipant)((h,m)=>{const n=[D.editorBracketHighlightingForeground1,D.editorBracketHighlightingForeground2,D.editorBracketHighlightingForeground3,D.editorBracketHighlightingForeground4,D.editorBracketHighlightingForeground5,D.editorBracketHighlightingForeground6],t=new _;m.addRule(`.monaco-editor .${t.unexpectedClosingBracketClassName} { color: ${h.getColor(D.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const i=n.map(s=>h.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const r=i[s%i.length];m.addRule(`.monaco-editor .${t.getInlineClassNameOfLevel(s)} { color: ${r}; }`)}})}),define(J[801],ee([1,0,89,2,48,24,73,53,5,49,6,31,55]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;class i extends k.Disposable{constructor(c){super(),this.model=c,this._markersData=new Map,this._register((0,k.toDisposable)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(c,g){const o=[...this._markersData.keys()];this._markersData.clear();const l=this.model.deltaDecorations(o,g);for(let a=0;a<l.length;a++)this._markersData.set(l[a],c[a]);return o.length!==0||l.length!==0}getMarker(c){return this._markersData.get(c.id)}}let s=class extends k.Disposable{constructor(c,g){super(),this._markerService=g,this._onDidChangeMarker=this._register(new m.Emitter),this._markerDecorations=new t.ResourceMap,c.getModels().forEach(o=>this._onModelAdded(o)),this._register(c.onModelAdded(this._onModelAdded,this)),this._register(c.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(c=>c.dispose()),this._markerDecorations.clear()}getMarker(c,g){const o=this._markerDecorations.get(c);return o&&o.getMarker(g)||null}_handleMarkerChange(c){c.forEach(g=>{const o=this._markerDecorations.get(g);o&&this._updateDecorations(o)})}_onModelAdded(c){const g=new i(c);this._markerDecorations.set(c.uri,g),this._updateDecorations(g)}_onModelRemoved(c){var g;const o=this._markerDecorations.get(c.uri);o&&(o.dispose(),this._markerDecorations.delete(c.uri)),(c.uri.scheme===h.Schemas.inMemory||c.uri.scheme===h.Schemas.internal||c.uri.scheme===h.Schemas.vscode)&&((g=this._markerService)===null||g===void 0||g.read({resource:c.uri}).map(l=>l.owner).forEach(l=>this._markerService.remove(l,[c.uri])))}_updateDecorations(c){const g=this._markerService.read({resource:c.model.uri,take:500}),o=g.map(l=>({range:this._createDecorationRange(c.model,l),options:this._createDecorationOption(l)}));c.update(g,o)&&this._onDidChangeMarker.fire(c.model)}_createDecorationRange(c,g){let o=_.Range.lift(g);if(g.severity===S.MarkerSeverity.Hint&&!this._hasMarkerTag(g,1)&&!this._hasMarkerTag(g,2)&&(o=o.setEndPosition(o.startLineNumber,o.startColumn+2)),o=c.validateRange(o),o.isEmpty()){const l=c.getLineLastNonWhitespaceColumn(o.startLineNumber)||c.getLineMaxColumn(o.startLineNumber);if(l===1||o.endColumn>=l)return o;const a=c.getWordAtPosition(o.getStartPosition());a&&(o=new _.Range(o.startLineNumber,a.startColumn,o.endLineNumber,a.endColumn))}else if(g.endColumn===Number.MAX_VALUE&&g.startColumn===1&&o.startLineNumber===o.endLineNumber){const l=c.getLineFirstNonWhitespaceColumn(g.startLineNumber);l<o.endColumn&&(o=new _.Range(o.startLineNumber,l,o.endLineNumber,o.endColumn),g.startColumn=l)}return o}_createDecorationOption(c){let g,o,l,a,d;switch(c.severity){case S.MarkerSeverity.Hint:this._hasMarkerTag(c,2)?g=void 0:this._hasMarkerTag(c,1)?g="squiggly-unnecessary":g="squiggly-hint",l=0;break;case S.MarkerSeverity.Warning:g="squiggly-warning",o=(0,D.themeColorFromId)(w.overviewRulerWarning),l=20,d={color:(0,D.themeColorFromId)(n.minimapWarning),position:y.MinimapPosition.Inline};break;case S.MarkerSeverity.Info:g="squiggly-info",o=(0,D.themeColorFromId)(w.overviewRulerInfo),l=10;break;case S.MarkerSeverity.Error:default:g="squiggly-error",o=(0,D.themeColorFromId)(w.overviewRulerError),l=30,d={color:(0,D.themeColorFromId)(n.minimapError),position:y.MinimapPosition.Inline};break}return c.tags&&(c.tags.indexOf(1)!==-1&&(a="squiggly-inline-unnecessary"),c.tags.indexOf(2)!==-1&&(a="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:g,showIfCollapsed:!0,overviewRuler:{color:o,position:y.OverviewRulerLane.Right},minimap:d,zIndex:l,inlineClassName:a}}_hasMarkerTag(c,g){return c.tags?c.tags.indexOf(g)>=0:!1}};s=Ne([fe(0,b.IModelService),fe(1,S.IMarkerService)],s),e.MarkerDecorationsService=s}),define(J[236],ee([1,0,119,24,62,483,38]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;let b=class{constructor(t,i,s,r){this._legend=t,this._themeService=i,this._languageService=s,this._logService=r,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new m}getMetadata(t,i,s){const r=this._languageService.languageIdCodec.encodeLanguageId(s),c=this._hashTable.get(t,i,r);let g;if(c)g=c.metadata,this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${t} / ${i}: foreground ${S.TokenMetadata.getForeground(g)}, fontStyle ${S.TokenMetadata.getFontStyle(g).toString(2)}`);else{let o=this._legend.tokenTypes[t];const l=[];if(o){let a=i;for(let u=0;a>0&&u<this._legend.tokenModifiers.length;u++)a&1&&l.push(this._legend.tokenModifiers[u]),a=a>>1;a>0&&this._logService.getLevel()===y.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${i.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const d=this._themeService.getColorTheme().getTokenStyleMetadata(o,l,s);if(typeof d>"u")g=2147483647;else{if(g=0,typeof d.italic<"u"){const u=(d.italic?1:0)<<11;g|=u|1}if(typeof d.bold<"u"){const u=(d.bold?2:0)<<11;g|=u|2}if(typeof d.underline<"u"){const u=(d.underline?4:0)<<11;g|=u|4}if(typeof d.strikethrough<"u"){const u=(d.strikethrough?8:0)<<11;g|=u|8}if(d.foreground){const u=d.foreground<<15;g|=u|16}g===0&&(g=2147483647)}}else this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${t} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),g=2147483647,o="not-in-legend";this._hashTable.add(t,i,r,g),this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${t} (${o}) / ${i} (${l.join(" ")}): foreground ${S.TokenMetadata.getForeground(g)}, fontStyle ${S.TokenMetadata.getFontStyle(g).toString(2)}`)}return g}warnOverlappingSemanticTokens(t,i){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${t}, column ${i}`))}warnInvalidLengthSemanticTokens(t,i){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${t}, column ${i}`))}warnInvalidEditStart(t,i,s,r,c){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${t}, resultId: ${i}) at edit #${s}: The provided start offset ${r} is outside the previous data (length ${c}).`))}};b=Ne([fe(1,k.IThemeService),fe(2,w.ILanguageService),fe(3,y.ILogService)],b),e.SemanticTokensProviderStyling=b;function _(n,t,i){const s=n.data,r=n.data.length/5|0,c=Math.max(Math.ceil(r/1024),400),g=[];let o=0,l=1,a=0;for(;o<r;){const d=o;let u=Math.min(d+c,r);if(u<r){let I=u;for(;I-1>d&&s[5*I]===0;)I--;if(I-1===d){let T=u;for(;T+1<r&&s[5*T]===0;)T++;u=T}else u=I}let C=new Uint32Array((u-d)*4),f=0,v=0,p=0,L=0;for(;o<u;){const I=5*o,T=s[I],F=s[I+1],R=l+T|0,M=T===0?a+F|0:F,N=s[I+2],A=M+N|0,P=s[I+3],x=s[I+4];if(A<=M)t.warnInvalidLengthSemanticTokens(R,M+1);else if(p===R&&L>M)t.warnOverlappingSemanticTokens(R,M+1);else{const W=t.getMetadata(P,x,i);W!==2147483647&&(v===0&&(v=R),C[f]=R-v,C[f+1]=M,C[f+2]=A,C[f+3]=W,f+=4,p=R,L=A)}l=R,a=M,o++}f!==C.length&&(C=C.subarray(0,f));const E=D.SparseMultilineTokens.create(v,C);g.push(E)}return g}e.toMultilineTokens2=_;class h{constructor(t,i,s,r){this.tokenTypeIndex=t,this.tokenModifierSet=i,this.languageId=s,this.metadata=r,this.next=null}}class m{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=m._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<m._SIZES.length?2/3*this._currentLength:0),this._elements=[],m._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(t,i){for(let s=0;s<i;s++)t[s]=null}_hash2(t,i){return(t<<5)-t+i|0}_hashFunc(t,i,s){return this._hash2(this._hash2(t,i),s)%this._currentLength}get(t,i,s){const r=this._hashFunc(t,i,s);let c=this._elements[r];for(;c;){if(c.tokenTypeIndex===t&&c.tokenModifierSet===i&&c.languageId===s)return c;c=c.next}return null}add(t,i,s,r){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const c=this._elements;this._currentLengthIndex++,this._currentLength=m._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<m._SIZES.length?2/3*this._currentLength:0),this._elements=[],m._nullOutEntries(this._elements,this._currentLength);for(const g of c){let o=g;for(;o;){const l=o.next;o.next=null,this._add(o),o=l}}}this._add(new h(t,i,s,r))}_add(t){const i=this._hashFunc(t.tokenTypeIndex,t.tokenModifierSet,t.languageId);t.next=this._elements[i],this._elements[i]=t}}m._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}),define(J[802],ee([1,0,2,38,24,62,236,224,51]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensStylingService=void 0;let h=class extends S.Disposable{constructor(n,t,i){super(),this._themeService=n,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(n){return this._caches.has(n)||this._caches.set(n,new w.SemanticTokensProviderStyling(n.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(n)}};h=Ne([fe(0,y.IThemeService),fe(1,D.ILogService),fe(2,k.ILanguageService)],h),e.SemanticTokensStylingService=h,(0,_.registerSingleton)(b.ISemanticTokensStylingService,h,1)}),define(J[329],ee([1,0,92,2,18,167,48,73,24]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class h{constructor(n){this.options=n,this.rangeHighlightDecorationId=void 0}provide(n,t){var i;const s=new k.DisposableStore;n.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),n.matchOnLabel=n.matchOnDescription=n.matchOnDetail=n.sortByLabel=!1;const r=s.add(new k.MutableDisposable);return r.value=this.doProvide(n,t),s.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(n,t)})),s}doProvide(n,t){const i=new k.DisposableStore,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const r={editor:s},c=(0,D.getCodeEditor)(s);if(c){let g=(0,y.withNullAsUndefined)(s.saveViewState());i.add(c.onDidChangeCursorPosition(()=>{g=(0,y.withNullAsUndefined)(s.saveViewState())})),r.restoreViewState=()=>{g&&s===this.activeTextEditorControl&&s.restoreViewState(g)},i.add((0,S.once)(t.onCancellationRequested)(()=>{var o;return(o=r.restoreViewState)===null||o===void 0?void 0:o.call(r)}))}i.add((0,k.toDisposable)(()=>this.clearDecorations(s))),i.add(this.provideWithTextEditor(r,n,t))}else i.add(this.provideWithoutTextEditor(n,t));return i}canProvideWithTextEditor(n){return!0}gotoLocation({editor:n},t){n.setSelection(t.range),n.revealRangeInCenter(t.range,0),t.preserveFocus||n.focus()}getModel(n){var t;return(0,D.isDiffEditor)(n)?(t=n.getModel())===null||t===void 0?void 0:t.modified:n.getModel()}addDecorations(n,t){n.changeDecorations(i=>{const s=[];this.rangeHighlightDecorationId&&(s.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),s.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,_.themeColorFromId)(b.overviewRulerRangeHighlight),position:w.OverviewRulerLane.Full}}}],[c,g]=i.deltaDecorations(s,r);this.rangeHighlightDecorationId={rangeHighlightId:c,overviewRulerDecorationId:g}})}clearDecorations(n){const t=this.rangeHighlightDecorationId;t&&(n.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=h}),define(J[803],ee([1,0,2,167,329,640]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class w extends y.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(_){const h=(0,D.localize)(0,null);return _.items=[{label:h}],_.ariaLabel=h,S.Disposable.None}provideWithTextEditor(_,h,m){const n=_.editor,t=new S.DisposableStore;t.add(h.onDidAccept(r=>{const[c]=h.selectedItems;if(c){if(!this.isValidLineNumber(n,c.lineNumber))return;this.gotoLocation(_,{range:this.toRange(c.lineNumber,c.column),keyMods:h.keyMods,preserveFocus:r.inBackground}),r.inBackground||h.hide()}}));const i=()=>{const r=this.parsePosition(n,h.value.trim().substr(w.PREFIX.length)),c=this.getPickLabel(n,r.lineNumber,r.column);if(h.items=[{lineNumber:r.lineNumber,column:r.column,label:c}],h.ariaLabel=c,!this.isValidLineNumber(n,r.lineNumber)){this.clearDecorations(n);return}const g=this.toRange(r.lineNumber,r.column);n.revealRangeInCenter(g,0),this.addDecorations(n,g)};i(),t.add(h.onDidChangeValue(()=>i()));const s=(0,k.getCodeEditor)(n);return s&&s.getOptions().get(65).renderType===2&&(s.updateOptions({lineNumbers:"on"}),t.add((0,S.toDisposable)(()=>s.updateOptions({lineNumbers:"relative"})))),t}toRange(_=1,h=1){return{startLineNumber:_,startColumn:h,endLineNumber:_,endColumn:h}}parsePosition(_,h){const m=h.split(/,|:|#/).map(t=>parseInt(t,10)).filter(t=>!isNaN(t)),n=this.lineCount(_)+1;return{lineNumber:m[0]>0?m[0]:n+m[0],column:m[1]}}getPickLabel(_,h,m){if(this.isValidLineNumber(_,h))return this.isValidColumn(_,h,m)?(0,D.localize)(1,null,h,m):(0,D.localize)(2,null,h);const n=_.getPosition()||{lineNumber:1,column:1},t=this.lineCount(_);return t>1?(0,D.localize)(3,null,n.lineNumber,n.column,t):(0,D.localize)(4,null,n.lineNumber,n.column)}isValidLineNumber(_,h){return!h||typeof h!="number"?!1:h>0&&h<=this.lineCount(_)}isValidColumn(_,h,m){if(!m||typeof m!="number")return!1;const n=this.getModel(_);if(!n)return!1;const t={lineNumber:h,column:m};return n.validatePosition(t).equals(t)}lineCount(_){var h,m;return(m=(h=this.getModel(_))===null||h===void 0?void 0:h.getLineCount())!==null&&m!==void 0?m:0}}w.PREFIX=":",e.AbstractGotoLineQuickAccessProvider=w}),define(J[804],ee([1,0,12,21,29,32,528,2,9,5,26,179,329,641,19,16]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let c=class di extends t.AbstractEditorNavigationQuickAccessProvider{constructor(a,d,u=Object.create(null)){super(u),this._languageFeaturesService=a,this._outlineModelService=d,this.options=u,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(a){return this.provideLabelPick(a,(0,i.localize)(0,null)),b.Disposable.None}provideWithTextEditor(a,d,u){const C=a.editor,f=this.getModel(C);return f?this._languageFeaturesService.documentSymbolProvider.has(f)?this.doProvideWithEditorSymbols(a,f,d,u):this.doProvideWithoutEditorSymbols(a,f,d,u):b.Disposable.None}doProvideWithoutEditorSymbols(a,d,u,C){const f=new b.DisposableStore;return this.provideLabelPick(u,(0,i.localize)(1,null)),Ee(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(d,f))||C.isCancellationRequested||f.add(this.doProvideWithEditorSymbols(a,d,u,C))}),f}provideLabelPick(a,d){a.items=[{label:d,index:0,kind:14}],a.ariaLabel=d}waitForLanguageSymbolRegistry(a,d){return Ee(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(a))return!0;const u=new S.DeferredPromise,C=d.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(a)&&(C.dispose(),u.complete(!0))}));return d.add((0,b.toDisposable)(()=>u.complete(!1))),u.p})}doProvideWithEditorSymbols(a,d,u,C){var f;const v=a.editor,p=new b.DisposableStore;p.add(u.onDidAccept(T=>{const[F]=u.selectedItems;F&&F.range&&(this.gotoLocation(a,{range:F.range.selection,keyMods:u.keyMods,preserveFocus:T.inBackground}),T.inBackground||u.hide())})),p.add(u.onDidTriggerItemButton(({item:T})=>{T&&T.range&&(this.gotoLocation(a,{range:T.range.selection,keyMods:u.keyMods,forceSideBySide:!0}),u.hide())}));const L=this.getDocumentSymbols(d,C);let E;const I=T=>Ee(this,void 0,void 0,function*(){E?.dispose(!0),u.busy=!1,E=new k.CancellationTokenSource(C),u.busy=!0;try{const F=(0,w.prepareQuery)(u.value.substr(di.PREFIX.length).trim()),R=yield this.doGetSymbolPicks(L,F,void 0,E.token);if(C.isCancellationRequested)return;if(R.length>0){if(u.items=R,T&&F.original.length===0){const M=(0,r.findLast)(R,N=>!!(N.type!=="separator"&&N.range&&h.Range.containsPosition(N.range.decoration,T)));M&&(u.activeItems=[M])}}else F.original.length>0?this.provideLabelPick(u,(0,i.localize)(2,null)):this.provideLabelPick(u,(0,i.localize)(3,null))}finally{C.isCancellationRequested||(u.busy=!1)}});return p.add(u.onDidChangeValue(()=>I(void 0))),I((f=v.getSelection())===null||f===void 0?void 0:f.getPosition()),p.add(u.onDidChangeActive(()=>{const[T]=u.activeItems;T&&T.range&&(v.revealRangeInCenter(T.range.selection,0),this.addDecorations(v,T.range.decoration))})),p}doGetSymbolPicks(a,d,u,C){var f,v;return Ee(this,void 0,void 0,function*(){const p=yield a;if(C.isCancellationRequested)return[];const L=d.original.indexOf(di.SCOPE_PREFIX)===0,E=L?1:0;let I,T;d.values&&d.values.length>1?(I=(0,w.pieceToQuery)(d.values[0]),T=(0,w.pieceToQuery)(d.values.slice(1))):I=d;let F;const R=(v=(f=this.options)===null||f===void 0?void 0:f.openSideBySideDirection)===null||v===void 0?void 0:v.call(f);R&&(F=[{iconClass:R==="right"?D.ThemeIcon.asClassName(y.Codicon.splitHorizontal):D.ThemeIcon.asClassName(y.Codicon.splitVertical),tooltip:R==="right"?(0,i.localize)(4,null):(0,i.localize)(5,null)}]);const M=[];for(let P=0;P<p.length;P++){const x=p[P],W=(0,_.trim)(x.name),U=`$(${m.SymbolKinds.toIcon(x.kind).id}) ${W}`,O=U.length-W.length;let $=x.containerName;u?.extraContainerLabel&&($?$=`${u.extraContainerLabel} \\u2022 ${$}`:$=u.extraContainerLabel);let Q,se,le,te;if(d.original.length>E){let H=!1;if(I!==d&&([Q,se]=(0,w.scoreFuzzy2)(U,Object.assign(Object.assign({},d),{values:void 0}),E,O),typeof Q=="number"&&(H=!0)),typeof Q!="number"&&([Q,se]=(0,w.scoreFuzzy2)(U,I,E,O),typeof Q!="number"))continue;if(!H&&T){if($&&T.original.length>0&&([le,te]=(0,w.scoreFuzzy2)($,T)),typeof le!="number")continue;typeof Q=="number"&&(Q+=le)}}const re=x.tags&&x.tags.indexOf(1)>=0;M.push({index:P,kind:x.kind,score:Q,label:U,ariaLabel:W,description:$,highlights:re?void 0:{label:se,description:te},range:{selection:h.Range.collapseToStart(x.selectionRange),decoration:x.range},strikethrough:re,buttons:F})}const N=M.sort((P,x)=>L?this.compareByKindAndScore(P,x):this.compareByScore(P,x));let A=[];if(L){let U=function(){x&&typeof P=="number"&&W>0&&(x.label=(0,_.format)(o[P]||g,W))},P,x,W=0;for(const O of N)P!==O.kind?(U(),P=O.kind,W=1,x={type:"separator"},A.push(x)):W++,A.push(O);U()}else N.length>0&&(A=[{label:(0,i.localize)(6,null,M.length),type:"separator"},...N]);return A})}compareByScore(a,d){if(typeof a.score!="number"&&typeof d.score=="number")return 1;if(typeof a.score=="number"&&typeof d.score!="number")return-1;if(typeof a.score=="number"&&typeof d.score=="number"){if(a.score>d.score)return-1;if(a.score<d.score)return 1}return a.index<d.index?-1:a.index>d.index?1:0}compareByKindAndScore(a,d){const u=o[a.kind]||g,C=o[d.kind]||g,f=u.localeCompare(C);return f===0?this.compareByScore(a,d):f}getDocumentSymbols(a,d){return Ee(this,void 0,void 0,function*(){const u=yield this._outlineModelService.getOrCreate(a,d);return d.isCancellationRequested?[]:u.asListOfDocumentSymbols()})}};c.PREFIX="@",c.SCOPE_PREFIX=":",c.PREFIX_BY_CATEGORY=`${c.PREFIX}${c.SCOPE_PREFIX}`,c=Ne([fe(0,s.ILanguageFeaturesService),fe(1,n.IOutlineModelService)],c),e.AbstractGotoSymbolQuickAccessProvider=c;const g=(0,i.localize)(7,null),o={[5]:(0,i.localize)(8,null),[11]:(0,i.localize)(9,null),[8]:(0,i.localize)(10,null),[12]:(0,i.localize)(11,null),[4]:(0,i.localize)(12,null),[22]:(0,i.localize)(13,null),[23]:(0,i.localize)(14,null),[24]:(0,i.localize)(15,null),[10]:(0,i.localize)(16,null),[2]:(0,i.localize)(17,null),[3]:(0,i.localize)(18,null),[25]:(0,i.localize)(19,null),[1]:(0,i.localize)(20,null),[6]:(0,i.localize)(21,null),[9]:(0,i.localize)(22,null),[21]:(0,i.localize)(23,null),[14]:(0,i.localize)(24,null),[0]:(0,i.localize)(25,null),[17]:(0,i.localize)(26,null),[15]:(0,i.localize)(27,null),[16]:(0,i.localize)(28,null),[18]:(0,i.localize)(29,null),[19]:(0,i.localize)(30,null),[7]:(0,i.localize)(31,null),[13]:(0,i.localize)(32,null)}}),define(J[805],ee([1,0,2,13,644,14,36,31,24,425]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameInputField=e.CONTEXT_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_RENAME_INPUT_VISIBLE=new D.RawContextKey("renameInputVisible",!1,(0,y.localize)(0,null));let h=class{constructor(n,t,i,s,r){this._editor=n,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=s,this._disposables=new S.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(r),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(48)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return 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",(0,y.localize)(1,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(n){var t,i,s,r;if(!this._input||!this._domNode)return;const c=n.getColor(b.widgetShadow),g=n.getColor(b.widgetBorder);this._domNode.style.backgroundColor=String((t=n.getColor(b.editorWidgetBackground))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=c?` 0 0 8px 2px ${c}`:"",this._domNode.style.border=g?`1px solid ${g}`:"",this._domNode.style.color=String((i=n.getColor(b.inputForeground))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((s=n.getColor(b.inputBackground))!==null&&s!==void 0?s:"");const o=n.getColor(b.inputBorder);this._input.style.borderWidth=o?"1px":"0px",this._input.style.borderStyle=o?"solid":"none",this._input.style.borderColor=(r=o?.toString())!==null&&r!==void 0?r:"none"}_updateFont(){if(!this._input||!this._label)return;const n=this._editor.getOption(48);this._input.style.fontFamily=n.fontFamily,this._input.style.fontWeight=n.fontWeight,this._input.style.fontSize=`${n.fontSize}px`,this._label.style.fontSize=`${n.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var n,t;const[i,s]=this._acceptKeybindings;return this._label.innerText=(0,y.localize)(2,null,(n=this._keybindingService.lookupKeybinding(i))===null||n===void 0?void 0:n.getLabel(),(t=this._keybindingService.lookupKeybinding(s))===null||t===void 0?void 0:t.getLabel()),null}afterRender(n){n||this.cancelInput(!0)}acceptInput(n){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,n)}cancelInput(n){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,n)}getInput(n,t,i,s,r,c){this._domNode.classList.toggle("preview",r),this._position=new k.Position(n.startLineNumber,n.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",s.toString()),this._input.size=Math.max((n.endColumn-n.startColumn)*1.1,20);const g=new S.DisposableStore;return new Promise(o=>{this._currentCancelInput=l=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,o(l),!0),this._currentAcceptInput=l=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,o({newName:this._input.value,wantsPreview:r&&l})},g.add(c.onCancellationRequested(()=>this.cancelInput(!0))),g.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!document.hasFocus()))),this._show()}).finally(()=>{g.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)}};h=Ne([fe(2,_.IThemeService),fe(3,w.IKeybindingService),fe(4,D.IContextKeyService)],h),e.RenameInputField=h}),define(J[806],ee([1,0,50,12,21,11,2,18,20,97,15,147,30,13,5,22,176,150,643,90,14,8,62,43,71,34,805,19]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class E{constructor(N,A,P){this.model=N,this.position=A,this._providerRenameIdx=0,this._providers=P.ordered(N)}hasProvider(){return this._providers.length>0}resolveRenameLocation(N){return Ee(this,void 0,void 0,function*(){const A=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const x=this._providers[this._providerRenameIdx];if(!x.resolveRenameLocation)break;const W=yield x.resolveRenameLocation(this.model,this.position,N);if(W){if(W.rejectReason){A.push(W.rejectReason);continue}return W}}const P=this.model.getWordAtPosition(this.position);return P?{range:new s.Range(this.position.lineNumber,P.startColumn,this.position.lineNumber,P.endColumn),text:P.word,rejectReason:A.length>0?A.join(`\n`):void 0}:{range:s.Range.fromPositions(this.position),text:"",rejectReason:A.length>0?A.join(`\n`):void 0}})}provideRenameEdits(N,A){return Ee(this,void 0,void 0,function*(){return this._provideRenameEdits(N,this._providerRenameIdx,[],A)})}_provideRenameEdits(N,A,P,x){return Ee(this,void 0,void 0,function*(){const W=this._providers[A];if(!W)return{edits:[],rejectReason:P.join(`\n`)};const U=yield W.provideRenameEdits(this.model,this.position,N,x);if(U){if(U.rejectReason)return this._provideRenameEdits(N,A+1,P.concat(U.rejectReason),x)}else return this._provideRenameEdits(N,A+1,P.concat(o.localize(0,null)),x);return U})}}function I(M,N,A,P){return Ee(this,void 0,void 0,function*(){const x=new E(N,A,M),W=yield x.resolveRenameLocation(y.CancellationToken.None);return W?.rejectReason?{edits:[],rejectReason:W.rejectReason}:x.provideRenameEdits(P,y.CancellationToken.None)})}e.rename=I;let T=class ji{static get(N){return N.getContribution(ji.ID)}constructor(N,A,P,x,W,U,O,$){this.editor=N,this._instaService=A,this._notificationService=P,this._bulkEditService=x,this._progressService=W,this._logService=U,this._configService=O,this._languageFeaturesService=$,this._disposableStore=new w.DisposableStore,this._cts=new y.CancellationTokenSource,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(p.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var N,A;return Ee(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const P=this.editor.getPosition(),x=new E(this.editor.getModel(),P,this._languageFeaturesService.renameProvider);if(!x.hasProvider())return;this._cts=new h.EditorStateCancellationTokenSource(this.editor,5);let W;try{const te=x.resolveRenameLocation(this._cts.token);this._progressService.showWhile(te,250),W=yield te}catch(te){(N=g.MessageController.get(this.editor))===null||N===void 0||N.showMessage(te||o.localize(1,null),P);return}if(!W)return;if(W.rejectReason){(A=g.MessageController.get(this.editor))===null||A===void 0||A.showMessage(W.rejectReason,P);return}if(this._cts.token.isCancellationRequested){this._cts.dispose();return}this._cts.dispose(),this._cts=new h.EditorStateCancellationTokenSource(this.editor,5,W.range);const U=this.editor.getSelection();let O=0,$=W.text.length;!s.Range.isEmpty(U)&&!s.Range.spansMultipleLines(U)&&s.Range.containsRange(W.range,U)&&(O=Math.max(0,U.startColumn-W.range.startColumn),$=Math.min(W.range.endColumn,U.endColumn)-W.range.startColumn);const Q=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),se=yield this._renameInputField.getInput(W.range,W.text,O,$,Q,this._cts.token);if(typeof se=="boolean"){se&&this.editor.focus();return}this.editor.focus();const le=(0,k.raceCancellation)(x.provideRenameEdits(se.newName,this._cts.token),this._cts.token).then(te=>Ee(this,void 0,void 0,function*(){if(!(!te||!this.editor.hasModel())){if(te.rejectReason){this._notificationService.info(te.rejectReason);return}this.editor.setSelection(s.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(te,{editor:this.editor,showPreview:se.wantsPreview,label:o.localize(2,null,W?.text,se.newName),code:"undoredo.rename",quotableLabel:o.localize(3,null,W?.text,se.newName),respectAutoSaveConfig:!0}).then(re=>{re.ariaSummary&&(0,S.alert)(o.localize(4,null,W.text,se.newName,re.ariaSummary))}).catch(re=>{this._notificationService.error(o.localize(5,null)),this._logService.error(re)})}}),te=>{this._notificationService.error(o.localize(6,null)),this._logService.error(te)});return this._progressService.showWhile(le,250),le})}acceptRenameInput(N){this._renameInputField.acceptInput(N)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};T.ID="editor.contrib.renameController",T=Ne([fe(1,d.IInstantiationService),fe(2,C.INotificationService),fe(3,n.IBulkEditService),fe(4,f.IEditorProgressService),fe(5,u.ILogService),fe(6,c.ITextResourceConfigurationService),fe(7,L.ILanguageFeaturesService)],T);class F extends m.EditorAction{constructor(){super({id:"editor.action.rename",label:o.localize(7,null),alias:"Rename Symbol",precondition:a.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(N,A){const P=N.get(t.ICodeEditorService),[x,W]=Array.isArray(A)&&A||[void 0,void 0];return _.URI.isUri(x)&&i.Position.isIPosition(W)?P.openCodeEditor({resource:x},P.getActiveCodeEditor()).then(U=>{U&&(U.setPosition(W),U.invokeWithinContext(O=>(this.reportTelemetry(O,U),this.run(O,U))))},D.onUnexpectedError):super.runCommand(N,A)}run(N,A){const P=T.get(A);return P?P.run():Promise.resolve()}}e.RenameAction=F,(0,m.registerEditorContribution)(T.ID,T,4),(0,m.registerEditorAction)(F);const R=m.EditorCommand.bindToContribution(T.get);(0,m.registerEditorCommand)(new R({id:"acceptRenameInput",precondition:p.CONTEXT_RENAME_INPUT_VISIBLE,handler:M=>M.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:a.ContextKeyExpr.and(r.EditorContextKeys.focus,a.ContextKeyExpr.not("isComposing")),primary:3}})),(0,m.registerEditorCommand)(new R({id:"acceptRenameInputWithPreview",precondition:a.ContextKeyExpr.and(p.CONTEXT_RENAME_INPUT_VISIBLE,a.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:M=>M.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:a.ContextKeyExpr.and(r.EditorContextKeys.focus,a.ContextKeyExpr.not("isComposing")),primary:1024+3}})),(0,m.registerEditorCommand)(new R({id:"cancelRenameInput",precondition:p.CONTEXT_RENAME_INPUT_VISIBLE,handler:M=>M.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:r.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,m.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(M,N,A,...P){const[x]=P;(0,b.assertType)(typeof x=="string");const{renameProvider:W}=M.get(L.ILanguageFeaturesService);return I(W,N,A,x)}),(0,m.registerModelAndPositionCommand)("_executePrepareRename",function(M,N,A){return Ee(this,void 0,void 0,function*(){const{renameProvider:P}=M.get(L.ILanguageFeaturesService),W=yield new E(N,A,P).resolveRenameLocation(y.CancellationToken.None);if(W?.rejectReason)throw new Error(W.rejectReason);return W})}),v.Registry.as(l.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:o.localize(8,null),default:!0,type:"boolean"}}})}),define(J[807],ee([1,0,2,11,53,27,12,21,24,236,307,70,60,19,224,256,273]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSemanticTokensFeature=void 0;let g=class extends S.Disposable{constructor(d,u,C,f,v,p){super(),this._watchers=Object.create(null);const L=T=>{this._watchers[T.uri.toString()]=new o(T,d,C,v,p)},E=(T,F)=>{F.dispose(),delete this._watchers[T.uri.toString()]},I=()=>{for(const T of u.getModels()){const F=this._watchers[T.uri.toString()];(0,c.isSemanticColoringEnabled)(T,C,f)?F||L(T):F&&E(T,F)}};this._register(u.onModelAdded(T=>{(0,c.isSemanticColoringEnabled)(T,C,f)&&L(T)})),this._register(u.onModelRemoved(T=>{const F=this._watchers[T.uri.toString()];F&&E(T,F)})),this._register(f.onDidChangeConfiguration(T=>{T.affectsConfiguration(c.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&I()})),this._register(C.onDidColorThemeChange(I))}dispose(){for(const d of Object.values(this._watchers))d.dispose();super.dispose()}};g=Ne([fe(0,s.ISemanticTokensStylingService),fe(1,y.IModelService),fe(2,_.IThemeService),fe(3,D.IConfigurationService),fe(4,n.ILanguageFeatureDebounceService),fe(5,i.ILanguageFeaturesService)],g),e.DocumentSemanticTokensFeature=g;let o=class Nt extends S.Disposable{constructor(d,u,C,f,v){super(),this._semanticTokensStylingService=u,this._isDisposed=!1,this._model=d,this._provider=v.documentSemanticTokensProvider,this._debounceInformation=f.for(this._provider,"DocumentSemanticTokens",{min:Nt.REQUEST_MIN_DELAY,max:Nt.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new w.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),Nt.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const p=()=>{(0,S.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const L of this._provider.all(d))typeof L.onDidChange=="function"&&this._documentProvidersChangeListeners.push(L.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};p(),this._register(this._provider.onDidChange(()=>{p(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(C.onDidColorThemeChange(L=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),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)return;if(!(0,m.hasDocumentSemanticTokensProvider)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}const d=new b.CancellationTokenSource,u=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,C=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,f=(0,m.getDocumentSemanticTokens)(this._provider,this._model,u,C,d.token);this._currentDocumentRequestCancellationTokenSource=d,this._providersChangedDuringRequest=!1;const v=[],p=this._model.onDidChangeContent(E=>{v.push(E)}),L=new t.StopWatch(!1);f.then(E=>{if(this._debounceInformation.update(this._model,L.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,p.dispose(),!E)this._setDocumentSemanticTokens(null,null,null,v);else{const{provider:I,tokens:T}=E,F=this._semanticTokensStylingService.getStyling(I);this._setDocumentSemanticTokens(I,T||null,F,v)}},E=>{E&&(k.isCancellationError(E)||typeof E.message=="string"&&E.message.indexOf("busy")!==-1)||k.onUnexpectedError(E),this._currentDocumentRequestCancellationTokenSource=null,p.dispose(),(v.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(d,u,C,f,v){v=Math.min(v,C.length-f,d.length-u);for(let p=0;p<v;p++)C[f+p]=d[u+p]}_setDocumentSemanticTokens(d,u,C,f){const v=this._currentDocumentResponse,p=()=>{(f.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){d&&u&&d.releaseDocumentSemanticTokens(u.resultId);return}if(!d||!C){this._model.tokenization.setSemanticTokens(null,!1);return}if(!u){this._model.tokenization.setSemanticTokens(null,!0),p();return}if((0,m.isSemanticTokensEdits)(u)){if(!v){this._model.tokenization.setSemanticTokens(null,!0);return}if(u.edits.length===0)u={resultId:u.resultId,data:v.data};else{let L=0;for(const R of u.edits)L+=(R.data?R.data.length:0)-R.deleteCount;const E=v.data,I=new Uint32Array(E.length+L);let T=E.length,F=I.length;for(let R=u.edits.length-1;R>=0;R--){const M=u.edits[R];if(M.start>E.length){C.warnInvalidEditStart(v.resultId,u.resultId,R,M.start,E.length),this._model.tokenization.setSemanticTokens(null,!0);return}const N=T-(M.start+M.deleteCount);N>0&&(Nt._copy(E,T-N,I,F-N,N),F-=N),M.data&&(Nt._copy(M.data,0,I,F-M.data.length,M.data.length),F-=M.data.length),T=M.start}T>0&&Nt._copy(E,0,I,0,T),u={resultId:u.resultId,data:I}}}if((0,m.isSemanticTokens)(u)){this._currentDocumentResponse=new l(d,u.resultId,u.data);const L=(0,h.toMultilineTokens2)(u,C,this._model.getLanguageId());if(f.length>0)for(const E of f)for(const I of L)for(const T of E.changes)I.applyEdit(T.range,T.text);this._model.tokenization.setSemanticTokens(L,!0)}else this._model.tokenization.setSemanticTokens(null,!0);p()}};o.REQUEST_MIN_DELAY=300,o.REQUEST_MAX_DELAY=2e3,o=Ne([fe(1,s.ISemanticTokensStylingService),fe(2,_.IThemeService),fe(3,n.ILanguageFeatureDebounceService),fe(4,i.ILanguageFeaturesService)],o);class l{constructor(d,u,C){this.provider=d,this.resultId=u,this.data=C}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,r.registerEditorFeature)(g)}),define(J[808],ee([1,0,12,2,15,307,273,236,27,24,70,60,19,224]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportSemanticTokensContribution=void 0;let s=class extends k.Disposable{constructor(c,g,o,l,a,d){super(),this._semanticTokensStylingService=g,this._themeService=o,this._configurationService=l,this._editor=c,this._provider=d.documentRangeSemanticTokensProvider,this._debounceInformation=a.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new S.RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const u=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{u()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),u()})),this._register(this._editor.onDidChangeModelContent(C=>{this._cancelAll(),u()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),u()})),this._register(this._configurationService.onDidChangeConfiguration(C=>{C.affectsConfiguration(w.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),u())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),u()})),u()}_cancelAll(){for(const c of this._outstandingRequests)c.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(c){for(let g=0,o=this._outstandingRequests.length;g<o;g++)if(this._outstandingRequests[g]===c){this._outstandingRequests.splice(g,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const c=this._editor.getModel();if(c.tokenization.hasCompleteSemanticTokens())return;if(!(0,w.isSemanticColoringEnabled)(c,this._themeService,this._configurationService)){c.tokenization.hasSomeSemanticTokens()&&c.tokenization.setSemanticTokens(null,!1);return}if(!(0,D.hasDocumentRangeSemanticTokensProvider)(this._provider,c)){c.tokenization.hasSomeSemanticTokens()&&c.tokenization.setSemanticTokens(null,!1);return}const g=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(g.map(o=>this._requestRange(c,o)))}_requestRange(c,g){const o=c.getVersionId(),l=(0,S.createCancelablePromise)(d=>Promise.resolve((0,D.getDocumentRangeSemanticTokens)(this._provider,c,g,d))),a=new n.StopWatch(!1);return l.then(d=>{if(this._debounceInformation.update(c,a.elapsed()),!d||!d.tokens||c.isDisposed()||c.getVersionId()!==o)return;const{provider:u,tokens:C}=d,f=this._semanticTokensStylingService.getStyling(u);c.tokenization.setPartialSemanticTokens(g,(0,b.toMultilineTokens2)(C,f,c.getLanguageId()))}).then(()=>this._removeOutstandingRequest(l),()=>this._removeOutstandingRequest(l)),l}};s.ID="editor.contrib.viewportSemanticTokens",s=Ne([fe(1,i.ISemanticTokensStylingService),fe(2,h.IThemeService),fe(3,_.IConfigurationService),fe(4,m.ILanguageFeatureDebounceService),fe(5,t.ILanguageFeaturesService)],s),e.ViewportSemanticTokensContribution=s,(0,y.registerEditorContribution)(s.ID,s,1)}),define(J[809],ee([1,0,7,212,29,32,6,63,2,20,26,726,53,38,653,304,80,24,316]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.getAriaId=void 0;function a(v){return`suggest-aria-id:${v}`}e.getAriaId=a;const d=(0,c.registerIcon)("suggest-more-info",y.Codicon.chevronRight,s.localize(0,null)),u=new(l=class Qt{extract(p,L){if(p.textLabel.match(Qt._regexStrict))return L[0]=p.textLabel,!0;if(p.completion.detail&&p.completion.detail.match(Qt._regexStrict))return L[0]=p.completion.detail,!0;if(typeof p.completion.documentation=="string"){const E=Qt._regexRelaxed.exec(p.completion.documentation);if(E&&(E.index===0||E.index+E[0].length===p.completion.documentation.length))return L[0]=E[0],!0}return!1}},l._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*\\))/,l._regexStrict=new RegExp(`^${l._regexRelaxed.source}$`,"i"),l);let C=class{constructor(p,L,E,I){this._editor=p,this._modelService=L,this._languageService=E,this._themeService=I,this._onDidToggleDetails=new w.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(p){const L=new _.DisposableStore,E=p;E.classList.add("show-file-icons");const I=(0,S.append)(p,(0,S.$)(".icon")),T=(0,S.append)(I,(0,S.$)("span.colorspan")),F=(0,S.append)(p,(0,S.$)(".contents")),R=(0,S.append)(F,(0,S.$)(".main")),M=(0,S.append)(R,(0,S.$)(".icon-label.codicon")),N=(0,S.append)(R,(0,S.$)("span.left")),A=(0,S.append)(R,(0,S.$)("span.right")),P=new k.IconLabel(N,{supportHighlights:!0,supportIcons:!0});L.add(P);const x=(0,S.append)(N,(0,S.$)("span.signature-label")),W=(0,S.append)(N,(0,S.$)("span.qualifier-label")),U=(0,S.append)(A,(0,S.$)("span.details-label")),O=(0,S.append)(A,(0,S.$)("span.readMore"+D.ThemeIcon.asCSSSelector(d)));O.title=s.localize(1,null);const $=()=>{const Q=this._editor.getOptions(),se=Q.get(48),le=se.getMassagedFontFamily(),te=se.fontFeatureSettings,re=Q.get(114)||se.fontSize,H=Q.get(115)||se.lineHeight,B=se.fontWeight,j=se.letterSpacing,G=`${re}px`,Y=`${H}px`,ne=`${j}px`;E.style.fontSize=G,E.style.fontWeight=B,E.style.letterSpacing=ne,R.style.fontFamily=le,R.style.fontFeatureSettings=te,R.style.lineHeight=Y,I.style.height=Y,I.style.width=Y,O.style.height=Y,O.style.width=Y};return $(),L.add(this._editor.onDidChangeConfiguration(Q=>{(Q.hasChanged(48)||Q.hasChanged(114)||Q.hasChanged(115))&&$()})),{root:E,left:N,right:A,icon:I,colorspan:T,iconLabel:P,iconContainer:M,parametersLabel:x,qualifierLabel:W,detailsLabel:U,readMore:O,disposables:L}}renderElement(p,L,E){const{completion:I}=p;E.root.id=a(L),E.colorspan.style.backgroundColor="";const T={labelEscapeNewLines:!0,matches:(0,b.createMatches)(p.score)},F=[];if(I.kind===19&&u.extract(p,F))E.icon.className="icon customcolor",E.iconContainer.className="icon hide",E.colorspan.style.backgroundColor=F[0];else if(I.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){E.icon.className="icon hide",E.iconContainer.className="icon hide";const R=(0,n.getIconClasses)(this._modelService,this._languageService,h.URI.from({scheme:"fake",path:p.textLabel}),r.FileKind.FILE),M=(0,n.getIconClasses)(this._modelService,this._languageService,h.URI.from({scheme:"fake",path:I.detail}),r.FileKind.FILE);T.extraClasses=R.length>M.length?R:M}else I.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(E.icon.className="icon hide",E.iconContainer.className="icon hide",T.extraClasses=[(0,n.getIconClasses)(this._modelService,this._languageService,h.URI.from({scheme:"fake",path:p.textLabel}),r.FileKind.FOLDER),(0,n.getIconClasses)(this._modelService,this._languageService,h.URI.from({scheme:"fake",path:I.detail}),r.FileKind.FOLDER)].flat()):(E.icon.className="icon hide",E.iconContainer.className="",E.iconContainer.classList.add("suggest-icon",...D.ThemeIcon.asClassNameArray(m.CompletionItemKinds.toIcon(I.kind))));I.tags&&I.tags.indexOf(1)>=0&&(T.extraClasses=(T.extraClasses||[]).concat(["deprecated"]),T.matches=[]),E.iconLabel.setLabel(p.textLabel,void 0,T),typeof I.label=="string"?(E.parametersLabel.textContent="",E.detailsLabel.textContent=f(I.detail||""),E.root.classList.add("string-label")):(E.parametersLabel.textContent=f(I.label.detail||""),E.detailsLabel.textContent=f(I.label.description||""),E.root.classList.remove("string-label")),this._editor.getOption(113).showInlineDetails?(0,S.show)(E.detailsLabel):(0,S.hide)(E.detailsLabel),(0,o.canExpandCompletionItem)(p)?(E.right.classList.add("can-expand-details"),(0,S.show)(E.readMore),E.readMore.onmousedown=R=>{R.stopPropagation(),R.preventDefault()},E.readMore.onclick=R=>{R.stopPropagation(),R.preventDefault(),this._onDidToggleDetails.fire()}):(E.right.classList.remove("can-expand-details"),(0,S.hide)(E.readMore),E.readMore.onmousedown=null,E.readMore.onclick=null)}disposeTemplate(p){p.disposables.dispose()}};C=Ne([fe(1,t.IModelService),fe(2,i.ILanguageService),fe(3,g.IThemeService)],C),e.ItemRenderer=C;function f(v){return v.replace(/\\r\\n|\\r|\\n/g,"")}}),define(J[810],ee([1,0,803,34,126,30,18,82,6,15,22,78]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoLineQuickAccessProvider=void 0;let t=class extends S.AbstractGotoLineQuickAccessProvider{constructor(r){super(),this.editorService=r,this.onDidActiveTextEditorControlChange=_.Event.None}get activeTextEditorControl(){return(0,w.withNullAsUndefined)(this.editorService.getFocusedCodeEditor())}};t=Ne([fe(0,D.ICodeEditorService)],t),e.StandaloneGotoLineQuickAccessProvider=t;class i extends h.EditorAction{constructor(){super({id:i.ID,label:b.GoToLineNLS.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.focus,primary:2085,mac:{primary:293},weight:100}})}run(r){r.get(n.IQuickInputService).quickAccess.show(t.PREFIX)}}i.ID="editor.action.gotoLine",e.GotoLineAction=i,(0,h.registerEditorAction)(i),k.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:t,prefix:t.PREFIX,helpEntries:[{description:b.GoToLineNLS.gotoLineActionLabel,commandId:i.ID}]})}),define(J[811],ee([1,0,804,34,126,30,18,82,6,15,22,78,179,19,160,234]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoSymbolAction=e.StandaloneGotoSymbolQuickAccessProvider=void 0;let s=class extends S.AbstractGotoSymbolQuickAccessProvider{constructor(g,o,l){super(o,l),this.editorService=g,this.onDidActiveTextEditorControlChange=_.Event.None}get activeTextEditorControl(){return(0,w.withNullAsUndefined)(this.editorService.getFocusedCodeEditor())}};s=Ne([fe(0,D.ICodeEditorService),fe(1,i.ILanguageFeaturesService),fe(2,t.IOutlineModelService)],s),e.StandaloneGotoSymbolQuickAccessProvider=s;class r extends h.EditorAction{constructor(){super({id:r.ID,label:b.QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:m.EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:m.EditorContextKeys.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(g){g.get(n.IQuickInputService).quickAccess.show(S.AbstractGotoSymbolQuickAccessProvider.PREFIX,{itemActivation:n.ItemActivation.NONE})}}r.ID="editor.action.quickOutline",e.GotoSymbolAction=r,(0,h.registerEditorAction)(r),k.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:s,prefix:S.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:b.QuickOutlineNLS.quickOutlineActionLabel,prefix:S.AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:r.ID},{description:b.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:S.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]})}),define(J[330],ee([1,0,7,49,790,30,14,51,24]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorService=void 0;let h=class extends y.AbstractCodeEditorService{constructor(n,t){super(t),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=n.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler((i,s,r)=>Ee(this,void 0,void 0,function*(){return s?this.doOpenEditor(s,i):null}))}_checkContextKey(){let n=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){n=!0;break}this._editorIsOpen.set(n)}setActiveCodeEditor(n){this._activeCodeEditor=n}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(n,t){if(!this.findModel(n,t.resource)){if(t.resource){const r=t.resource.scheme;if(r===k.Schemas.http||r===k.Schemas.https)return(0,S.windowOpenNoOpener)(t.resource.toString()),n}return null}const s=t.options?t.options.selection:null;if(s)if(typeof s.endLineNumber=="number"&&typeof s.endColumn=="number")n.setSelection(s),n.revealRangeInCenter(s,1);else{const r={lineNumber:s.startLineNumber,column:s.startColumn};n.setPosition(r),n.revealPositionInCenter(r,1)}return n}findModel(n,t){const i=n.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};h=Ne([fe(0,w.IContextKeyService),fe(1,_.IThemeService)],h),e.StandaloneCodeEditorService=h,(0,b.registerSingleton)(D.ICodeEditorService,h,0)}),define(J[812],ee([1,0,73,31]),function(q,e,S,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hc_light=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:{[k.editorBackground]:"#FFFFFE",[k.editorForeground]:"#000000",[k.editorInactiveSelection]:"#E5EBF1",[S.editorIndentGuides]:"#D3D3D3",[S.editorActiveIndentGuides]:"#939393",[k.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:{[k.editorBackground]:"#1E1E1E",[k.editorForeground]:"#D4D4D4",[k.editorInactiveSelection]:"#3A3D41",[S.editorIndentGuides]:"#404040",[S.editorActiveIndentGuides]:"#707070",[k.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:{[k.editorBackground]:"#000000",[k.editorForeground]:"#FFFFFF",[S.editorIndentGuides]:"#FFFFFF",[S.editorActiveIndentGuides]:"#FFFFFF"}},e.hc_light={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{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:"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:"B5200D"},{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:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[k.editorBackground]:"#FFFFFF",[k.editorForeground]:"#292929",[S.editorIndentGuides]:"#292929",[S.editorActiveIndentGuides]:"#292929"}}}),define(J[331],ee([1,0,7,46,37,6,26,119,469,812,34,31,24,2,91,786]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneThemeService=e.HC_LIGHT_THEME_NAME=e.HC_BLACK_THEME_NAME=e.VS_DARK_THEME_NAME=e.VS_LIGHT_THEME_NAME=void 0,e.VS_LIGHT_THEME_NAME="vs",e.VS_DARK_THEME_NAME="vs-dark",e.HC_BLACK_THEME_NAME="hc-black",e.HC_LIGHT_THEME_NAME="hc-light";const c=m.Registry.as(n.Extensions.ColorContribution),g=m.Registry.as(t.Extensions.ThemingContribution);class o{constructor(f,v){this.semanticHighlighting=!1,this.themeData=v;const p=v.base;f.length>0?(l(f)?this.id=f:this.id=p+" "+f,this.themeName=f):(this.id=p,this.themeName=p),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 f=new Map;for(const v in this.themeData.colors)f.set(v,y.Color.fromHex(this.themeData.colors[v]));if(this.themeData.inherit){const v=a(this.themeData.base);for(const p in v.colors)f.has(p)||f.set(p,y.Color.fromHex(v.colors[p]))}this.colors=f}return this.colors}getColor(f,v){const p=this.getColors().get(f);if(p)return p;if(v!==!1)return this.getDefault(f)}getDefault(f){let v=this.defaultColors[f];return v||(v=c.resolveDefaultColor(f,this),this.defaultColors[f]=v,v)}defines(f){return this.getColors().has(f)}get type(){switch(this.base){case e.VS_LIGHT_THEME_NAME:return s.ColorScheme.LIGHT;case e.HC_BLACK_THEME_NAME:return s.ColorScheme.HIGH_CONTRAST_DARK;case e.HC_LIGHT_THEME_NAME:return s.ColorScheme.HIGH_CONTRAST_LIGHT;default:return s.ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let f=[],v=[];if(this.themeData.inherit){const E=a(this.themeData.base);f=E.rules,E.encodedTokensColors&&(v=E.encodedTokensColors)}const p=this.themeData.colors["editor.foreground"],L=this.themeData.colors["editor.background"];if(p||L){const E={token:""};p&&(E.foreground=p),L&&(E.background=L),f.push(E)}f=f.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(v=this.themeData.encodedTokensColors),this._tokenTheme=_.TokenTheme.createFromRawTokenTheme(f,v)}return this._tokenTheme}getTokenStyleMetadata(f,v,p){const E=this.tokenTheme._match([f].concat(v).join(".")).metadata,I=b.TokenMetadata.getForeground(E),T=b.TokenMetadata.getFontStyle(E);return{foreground:I,italic:!!(T&1),bold:!!(T&2),underline:!!(T&4),strikethrough:!!(T&8)}}}function l(C){return C===e.VS_LIGHT_THEME_NAME||C===e.VS_DARK_THEME_NAME||C===e.HC_BLACK_THEME_NAME||C===e.HC_LIGHT_THEME_NAME}function a(C){switch(C){case e.VS_LIGHT_THEME_NAME:return h.vs;case e.VS_DARK_THEME_NAME:return h.vs_dark;case e.HC_BLACK_THEME_NAME:return h.hc_black;case e.HC_LIGHT_THEME_NAME:return h.hc_light}}function d(C){const f=a(C);return new o(C,f)}class u extends i.Disposable{constructor(){super(),this._onColorThemeChange=this._register(new D.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new D.Emitter),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new r.UnthemedProductIconTheme,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(e.VS_LIGHT_THEME_NAME,d(e.VS_LIGHT_THEME_NAME)),this._knownThemes.set(e.VS_DARK_THEME_NAME,d(e.VS_DARK_THEME_NAME)),this._knownThemes.set(e.HC_BLACK_THEME_NAME,d(e.HC_BLACK_THEME_NAME)),this._knownThemes.set(e.HC_LIGHT_THEME_NAME,d(e.HC_LIGHT_THEME_NAME));const f=(0,r.getIconsStyleSheet)(this);this._codiconCSS=f.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(e.VS_LIGHT_THEME_NAME),this._onOSSchemeChanged(),f.onDidChange(()=>{this._codiconCSS=f.getCSS(),this._updateCSS()}),(0,k.addMatchMediaChangeListener)("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(f){return S.isInShadowDOM(f)?this._registerShadowDomContainer(f):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=S.createStyleSheet(void 0,f=>{f.className="monaco-colors",f.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),i.Disposable.None}_registerShadowDomContainer(f){const v=S.createStyleSheet(f,p=>{p.className="monaco-colors",p.textContent=this._allCSS});return this._styleElements.push(v),{dispose:()=>{for(let p=0;p<this._styleElements.length;p++)if(this._styleElements[p]===v){this._styleElements.splice(p,1);return}}}}defineTheme(f,v){if(!/^[a-z0-9\\-]+$/i.test(f))throw new Error("Illegal theme name!");if(!l(v.base)&&!l(f))throw new Error("Illegal theme base!");this._knownThemes.set(f,new o(f,v)),l(f)&&this._knownThemes.forEach(p=>{p.base===f&&p.notifyBaseUpdated()}),this._theme.themeName===f&&this.setTheme(f)}getColorTheme(){return this._theme}setColorMapOverride(f){this._colorMapOverride=f,this._updateThemeOrColorMap()}setTheme(f){let v;this._knownThemes.has(f)?v=this._knownThemes.get(f):v=this._knownThemes.get(e.VS_LIGHT_THEME_NAME),this._updateActualTheme(v)}_updateActualTheme(f){!f||this._theme===f||(this._theme=f,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const f=window.matchMedia("(forced-colors: active)").matches;if(f!==(0,s.isHighContrast)(this._theme.type)){let v;(0,s.isDark)(this._theme.type)?v=f?e.HC_BLACK_THEME_NAME:e.VS_DARK_THEME_NAME:v=f?e.HC_LIGHT_THEME_NAME:e.VS_LIGHT_THEME_NAME,this._updateActualTheme(this._knownThemes.get(v))}}}setAutoDetectHighContrast(f){this._autoDetectHighContrast=f,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const f=[],v={},p={addRule:I=>{v[I]||(f.push(I),v[I]=!0)}};g.getThemingParticipants().forEach(I=>I(this._theme,p,this._environment));const L=[];for(const I of c.getColors()){const T=this._theme.getColor(I.id,!0);T&&L.push(`${(0,n.asCssVariableName)(I.id)}: ${T.toString()};`)}p.addRule(`.monaco-editor { ${L.join(`\n`)} }`);const E=this._colorMapOverride||this._theme.tokenTheme.getColorMap();p.addRule((0,_.generateTokensCSSForColorMap)(E)),this._themeCSS=f.join(`\n`),this._updateCSS(),w.TokenizationRegistry.setColorMap(E),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach(f=>f.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}e.StandaloneThemeService=u}),define(J[813],ee([1,0,15,122,82,91,331]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class b extends S.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:y.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(h,m){const n=h.get(k.IStandaloneThemeService),t=n.getColorTheme();(0,D.isHighContrast)(t.type)?(n.setTheme(this._originalThemeName||((0,D.isDark)(t.type)?w.VS_DARK_THEME_NAME:w.VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(n.setTheme((0,D.isDark)(t.type)?w.HC_BLACK_THEME_NAME:w.HC_LIGHT_THEME_NAME),this._originalThemeName=t.themeName)}}(0,S.registerEditorAction)(b)}),define(J[152],ee([1,0,7,44,143,290,41,201,2,17,666,28,688,14,57,8,36,43,83,24,32,91,18,31,98,439]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.DropdownWithDefaultActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=e.createAndFillInContextMenuActions=void 0;function v(M,N,A,P){const x=M.getActions(N),W=S.ModifierKeyEmitter.getInstance(),U=W.keyStatus.altKey||(h.isWindows||h.isLinux)&&W.keyStatus.shiftKey;L(x,A,U,P?O=>O===P:O=>O==="navigation")}e.createAndFillInContextMenuActions=v;function p(M,N,A,P,x,W){const U=M.getActions(N);L(U,A,!1,typeof P=="string"?$=>$===P:P,x,W)}e.createAndFillInActionBarActions=p;function L(M,N,A,P=U=>U==="navigation",x=()=>!1,W=!1){let U,O;Array.isArray(N)?(U=N,O=N):(U=N.primary,O=N.secondary);const $=new Set;for(const[Q,se]of M){let le;P(Q)?(le=U,le.length>0&&W&&le.push(new w.Separator)):(le=O,le.length>0&&le.push(new w.Separator));for(let te of se){A&&(te=te instanceof n.MenuItemAction&&te.alt?te.alt:te);const re=le.push(te);te instanceof w.SubmenuAction&&$.add({group:Q,action:te,index:re-1})}}for(const{group:Q,action:se,index:le}of $){const te=P(Q)?U:O,re=se.actions;re.length<=1&&x(se,Q,te.length)&&te.splice(le,1,...re)}}let E=class extends y.ActionViewItem{constructor(N,A,P,x,W,U,O){super(void 0,N,{icon:!!(N.class||N.item.icon),label:!N.class&&!N.item.icon,draggable:A?.draggable,keybinding:A?.keybinding,hoverDelegate:A?.hoverDelegate}),this._keybindingService=P,this._notificationService=x,this._contextKeyService=W,this._themeService=U,this._contextMenuService=O,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new _.MutableDisposable),this._altKey=S.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(N){return Ee(this,void 0,void 0,function*(){N.preventDefault(),N.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(A){this._notificationService.error(A)}})}render(N){super.render(N),N.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let A=!1,P=this._altKey.keyStatus.altKey||(h.isWindows||h.isLinux)&&this._altKey.keyStatus.shiftKey;const x=()=>{var W;const U=A&&P&&!!(!((W=this._commandAction.alt)===null||W===void 0)&&W.enabled);U!==this._wantsAltCommand&&(this._wantsAltCommand=U,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(W=>{P=W.altKey||(h.isWindows||h.isLinux)&&W.shiftKey,x()})),this._register((0,S.addDisposableListener)(N,"mouseleave",W=>{A=!1,x()})),this._register((0,S.addDisposableListener)(N,"mouseenter",W=>{A=!0,x()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var N;const A=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),P=A&&A.getLabel(),x=this._commandAction.tooltip||this._commandAction.label;let W=P?(0,m.localize)(0,null,x,P):x;if(!this._wantsAltCommand&&(!((N=this._menuItemAction.alt)===null||N===void 0)&&N.enabled)){const U=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,O=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),$=O&&O.getLabel(),Q=$?(0,m.localize)(1,null,U,$):U;W=(0,m.localize)(2,null,W,b.UILabelProvider.modifierLabels[h.OS].altKey,Q)}return W}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(N){this._itemClassDispose.value=void 0;const{element:A,label:P}=this;if(!A||!P)return;const x=this._commandAction.checked&&(0,t.isICommandActionToggleInfo)(N.toggled)&&N.toggled.icon?N.toggled.icon:N.icon;if(x)if(a.ThemeIcon.isThemeIcon(x)){const W=a.ThemeIcon.asClassNameArray(x);P.classList.add(...W),this._itemClassDispose.value=(0,_.toDisposable)(()=>{P.classList.remove(...W)})}else P.style.backgroundImage=(0,d.isDark)(this._themeService.getColorTheme().type)?(0,S.asCSSUrl)(x.dark):(0,S.asCSSUrl)(x.light),P.classList.add("icon"),this._itemClassDispose.value=(0,_.combinedDisposable)((0,_.toDisposable)(()=>{P.style.backgroundImage="",P.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};E=Ne([fe(2,c.IKeybindingService),fe(3,g.INotificationService),fe(4,i.IContextKeyService),fe(5,l.IThemeService),fe(6,s.IContextMenuService)],E),e.MenuEntryActionViewItem=E;let I=class extends D.DropdownMenuActionViewItem{constructor(N,A,P,x,W){var U,O,$;const Q=Object.assign(Object.assign({},A),{menuAsChild:(U=A?.menuAsChild)!==null&&U!==void 0?U:!1,classNames:(O=A?.classNames)!==null&&O!==void 0?O:a.ThemeIcon.isThemeIcon(N.item.icon)?a.ThemeIcon.asClassName(N.item.icon):void 0,keybindingProvider:($=A?.keybindingProvider)!==null&&$!==void 0?$:se=>P.lookupKeybinding(se.id)});super(N,{getActions:()=>N.actions},x,Q),this._keybindingService=P,this._contextMenuService=x,this._themeService=W}render(N){super.render(N),(0,u.assertType)(this.element),N.classList.add("menu-entry");const A=this._action,{icon:P}=A.item;if(P&&!a.ThemeIcon.isThemeIcon(P)){this.element.classList.add("icon");const x=()=>{this.element&&(this.element.style.backgroundImage=(0,d.isDark)(this._themeService.getColorTheme().type)?(0,S.asCSSUrl)(P.dark):(0,S.asCSSUrl)(P.light))};x(),this._register(this._themeService.onDidColorThemeChange(()=>{x()}))}}};I=Ne([fe(2,c.IKeybindingService),fe(3,s.IContextMenuService),fe(4,l.IThemeService)],I),e.SubmenuEntryActionViewItem=I;let T=class extends y.BaseActionViewItem{constructor(N,A,P,x,W,U,O,$){var Q,se,le;super(null,N),this._keybindingService=P,this._notificationService=x,this._contextMenuService=W,this._menuService=U,this._instaService=O,this._storageService=$,this._container=null,this._options=A,this._storageKey=`${N.item.submenu.id}_lastActionId`;let te;const re=$.get(this._storageKey,1);re&&(te=N.actions.find(B=>re===B.id)),te||(te=N.actions[0]),this._defaultAction=this._instaService.createInstance(E,te,{keybinding:this._getDefaultActionKeybindingLabel(te)});const H=Object.assign({},A??Object.create(null),{menuAsChild:(Q=A?.menuAsChild)!==null&&Q!==void 0?Q:!0,classNames:(se=A?.classNames)!==null&&se!==void 0?se:["codicon","codicon-chevron-down"],actionRunner:(le=A?.actionRunner)!==null&&le!==void 0?le:new w.ActionRunner});this._dropdown=new D.DropdownMenuActionViewItem(N,N.actions,this._contextMenuService,H),this._dropdown.actionRunner.onDidRun(B=>{B.action instanceof n.MenuItemAction&&this.update(B.action)})}update(N){this._storageService.store(this._storageKey,N.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(E,N,{keybinding:this._getDefaultActionKeybindingLabel(N)}),this._defaultAction.actionRunner=new class extends w.ActionRunner{runAction(A,P){return Ee(this,void 0,void 0,function*(){yield A.run(void 0)})}},this._container&&this._defaultAction.render((0,S.prepend)(this._container,(0,S.$)(".action-container")))}_getDefaultActionKeybindingLabel(N){var A;let P;if(!((A=this._options)===null||A===void 0)&&A.renderKeybindingWithDefaultActionLabel){const x=this._keybindingService.lookupKeybinding(N.id);x&&(P=`(${x.getLabel()})`)}return P}setActionContext(N){super.setActionContext(N),this._defaultAction.setActionContext(N),this._dropdown.setActionContext(N)}render(N){this._container=N,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const A=(0,S.$)(".action-container");this._defaultAction.render((0,S.append)(this._container,A)),this._register((0,S.addDisposableListener)(A,S.EventType.KEY_DOWN,x=>{const W=new k.StandardKeyboardEvent(x);W.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),W.stopPropagation())}));const P=(0,S.$)(".dropdown-action-container");this._dropdown.render((0,S.append)(this._container,P)),this._register((0,S.addDisposableListener)(P,S.EventType.KEY_DOWN,x=>{var W;const U=new k.StandardKeyboardEvent(x);U.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(W=this._defaultAction.element)===null||W===void 0||W.focus(),U.stopPropagation())}))}focus(N){N?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(N){N?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};T=Ne([fe(2,c.IKeybindingService),fe(3,g.INotificationService),fe(4,s.IContextMenuService),fe(5,n.IMenuService),fe(6,r.IInstantiationService),fe(7,o.IStorageService)],T),e.DropdownWithDefaultActionViewItem=T;let F=class extends y.SelectActionViewItem{constructor(N,A){super(null,N,N.actions.map(P=>({text:P.id===w.Separator.ID?"\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500":P.label,isDisabled:!P.enabled})),0,A,f.defaultSelectBoxStyles,{ariaLabel:N.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,N.actions.findIndex(P=>P.checked)))}render(N){super.render(N),N.style.borderColor=(0,C.asCssVariable)(C.selectBorder)}runAction(N,A){const P=this.action.actions[A];P&&this.actionRunner.run(P)}};F=Ne([fe(1,s.IContextViewService)],F);function R(M,N,A){return N instanceof n.MenuItemAction?M.createInstance(E,N,A):N instanceof n.SubmenuItemAction?N.item.isSelection?M.createInstance(F,N):N.item.rememberDefaultAction?M.createInstance(T,N,A):M.createInstance(I,N,A):void 0}e.createActionViewItem=R}),define(J[237],ee([1,0,7,69,208,41,16,12,29,2,17,32,198,630,152,768,28,25,14,57,8,36,79,80,418]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomizedMenuWorkbenchToolBar=e.InlineSuggestionHintsContentWidget=void 0;const f=(0,C.registerIcon)("inline-suggestion-hints-next",_.Codicon.chevronRight,(0,i.localize)(0,null)),v=(0,C.registerIcon)("inline-suggestion-hints-previous",_.Codicon.chevronLeft,(0,i.localize)(1,null));let p=class ci extends h.Disposable{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(T,F,R){const M=new D.Action(T,F,R,!0,()=>this._commandService.executeCommand(T)),N=this.keybindingService.lookupKeybinding(T,this._contextKeyService);let A=F;return N&&(A=(0,i.localize)(2,null,F,N.getLabel())),M.tooltip=A,M}constructor(T,F,R,M,N,A,P){super(),this.editor=T,this.withBorder=F,this._commandService=R,this.keybindingService=N,this._contextKeyService=A,this._menuService=P,this.id=`InlineSuggestionHintsContentWidget${ci.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,S.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,S.h)("div",{style:{display:"flex"}},[(0,S.h)("div@actionBar",{className:"custom-actions"}),(0,S.h)("div@toolBar")])]),this.position=null,this.previousAction=this.createCommandAction(t.showPreviousInlineSuggestionActionId,(0,i.localize)(3,null),n.ThemeIcon.asClassName(v)),this.availableSuggestionCountAction=new D.Action("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(t.showNextInlineSuggestionActionId,(0,i.localize)(4,null),n.ThemeIcon.asClassName(f)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(c.MenuId.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new b.RunOnceScheduler(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new b.RunOnceScheduler(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCurrentSuggestionIdx=-1,this.lastSuggestionCount=-1,this.lastCommands=[];const x=this._register(new k.ActionBar(this.nodes.actionBar));x.push(this.previousAction,{icon:!0,label:!1}),x.push(this.availableSuggestionCountAction),x.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(M.createInstance(E,this.nodes.toolBar,c.MenuId.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:W=>W.startsWith("primary")},actionViewItemProvider:(W,U)=>W instanceof c.MenuItemAction?M.createInstance(L,W,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(W=>{ci._dropDownVisible=W}))}update(T,F,R,M){if(this.position===T&&this.lastCurrentSuggestionIdx===F&&this.lastSuggestionCount===R&&(0,w.equals)(this.lastCommands,M))return;this.position=T,this.lastCurrentSuggestionIdx=F,this.lastSuggestionCount=R??-1,this.lastCommands=M,R!==void 0&&R>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule(),R!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${F+1}/${R}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),this.editor.layoutContentWidget(this);const N=M.map(A=>({class:void 0,id:A.id,enabled:!0,tooltip:A.tooltip||"",label:A.title,run:P=>this._commandService.executeCommand(A.id)}));for(const[A,P]of this.inlineCompletionsActionsMenus.getActions())for(const x of P)x instanceof c.MenuItemAction&&N.push(x);N.length>0&&N.unshift(new D.Separator),this.toolBar.setAdditionalSecondaryActions(N)}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this.position,preference:[1,2],positionAffinity:3}}};p._dropDownVisible=!1,p.id=0,p=Ne([fe(2,g.ICommandService),fe(3,a.IInstantiationService),fe(4,d.IKeybindingService),fe(5,o.IContextKeyService),fe(6,c.IMenuService)],p),e.InlineSuggestionHintsContentWidget=p;class L extends s.MenuEntryActionViewItem{updateLabel(){const T=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!T)return super.updateLabel();if(this.label){const F=(0,S.h)("div.keybinding").root;new y.KeybindingLabel(F,m.OS,Object.assign({disableTitle:!0},y.unthemedKeybindingLabelOptions)).set(T),this.label.textContent=this._action.label,this.label.appendChild(F),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let E=class extends r.WorkbenchToolBar{constructor(T,F,R,M,N,A,P,x){super(T,Object.assign({resetMenu:F},R),M,N,A,P,x),this.menuId=F,this.options2=R,this.menuService=M,this.contextKeyService=N,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var T,F,R,M,N,A,P;const x=[],W=[];(0,s.createAndFillInActionBarActions)(this.menu,(T=this.options2)===null||T===void 0?void 0:T.menuOptions,{primary:x,secondary:W},(R=(F=this.options2)===null||F===void 0?void 0:F.toolbarOptions)===null||R===void 0?void 0:R.primaryGroup,(N=(M=this.options2)===null||M===void 0?void 0:M.toolbarOptions)===null||N===void 0?void 0:N.shouldInlineSubmenu,(P=(A=this.options2)===null||A===void 0?void 0:A.toolbarOptions)===null||P===void 0?void 0:P.useSeparatorsInPrimaryActions),W.push(...this.additionalActions),this.setActions(x,W)}setAdditionalSecondaryActions(T){(0,w.equals)(this.additionalActions,T,(F,R)=>F===R)||(this.additionalActions=T,this.updateToolbar())}};E=Ne([fe(3,c.IMenuService),fe(4,o.IContextKeyService),fe(5,l.IContextMenuService),fe(6,d.IKeybindingService),fe(7,u.ITelemetryService)],E),e.CustomizedMenuWorkbenchToolBar=E}),define(J[814],ee([1,0,7,69,2,654,152,28,14,8]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class m extends w.MenuEntryActionViewItem{updateLabel(){const i=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!i)return super.updateLabel();this.label&&(this.label.textContent=(0,D.localize)(0,null,this._action.label,m.symbolPrintEnter(i)))}static symbolPrintEnter(i){var s;return(s=i.getLabel())===null||s===void 0?void 0:s.replace(/\\benter\\b/gi,"\\u23CE")}}let n=class{constructor(i,s,r,c,g){this._menuId=s,this._menuService=c,this._contextKeyService=g,this._menuDisposables=new y.DisposableStore,this.element=S.append(i,S.$(".suggest-status-bar"));const o=l=>l instanceof b.MenuItemAction?r.createInstance(m,l,void 0):void 0;this._leftActions=new k.ActionBar(this.element,{actionViewItemProvider:o}),this._rightActions=new k.ActionBar(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const i=this._menuService.createMenu(this._menuId,this._contextKeyService),s=()=>{const r=[],c=[];for(const[g,o]of i.getActions())g==="left"?r.push(...o):c.push(...o);this._leftActions.clear(),this._leftActions.push(r),this._rightActions.clear(),this._rightActions.push(c)};this._menuDisposables.add(i.onDidChange(()=>s())),this._menuDisposables.add(i)}hide(){this._menuDisposables.clear()}};n=Ne([fe(2,h.IInstantiationService),fe(3,b.IMenuService),fe(4,_.IContextKeyService)],n),e.SuggestWidgetStatus=n}),define(J[815],ee([1,0,7,41,6,2,152,28,14,36,43,79,781,57]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuMenuDelegate=e.ContextMenuService=void 0;let s=class extends D.Disposable{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new t.ContextMenuHandler(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(g,o,l,a,d,u){super(),this.telemetryService=g,this.notificationService=o,this.contextViewService=l,this.keybindingService=a,this.menuService=d,this.contextKeyService=u,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new y.Emitter),this._onDidHideContextMenu=this._store.add(new y.Emitter)}configure(g){this.contextMenuHandler.configure(g)}showContextMenu(g){g=r.transform(g,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},g),{onHide:o=>{var l;(l=g.onHide)===null||l===void 0||l.call(g,o),this._onDidHideContextMenu.fire()}})),S.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};s=Ne([fe(0,n.ITelemetryService),fe(1,m.INotificationService),fe(2,i.IContextViewService),fe(3,h.IKeybindingService),fe(4,b.IMenuService),fe(5,_.IContextKeyService)],s),e.ContextMenuService=s;var r;(function(c){function g(l){return l&&l.menuId instanceof b.MenuId}function o(l,a,d){if(!g(l))return l;const{menuId:u,menuActionOptions:C,contextKeyService:f}=l;return Object.assign(Object.assign({},l),{getActions:()=>{const v=[];if(u){const p=a.createMenu(u,f??d);(0,w.createAndFillInContextMenuActions)(p,C,v),p.dispose()}return l.getActions?k.Separator.join(l.getActions(),v):v}})}c.transform=o})(r=e.ContextMenuMenuDelegate||(e.ContextMenuMenuDelegate={}))}),define(J[816],ee([1,0,21,6,14,8,123,181,47,735,98,31,24,722]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let s=class extends t.Themable{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(h.QuickAccessController))),this._quickAccess}constructor(c,g,o,l){super(o),this.instantiationService=c,this.contextKeyService=g,this.layoutService=l,this._onShow=this._register(new k.Emitter),this._onHide=this._register(new k.Emitter),this.contexts=new Map}createController(c=this.layoutService,g){const o={idPrefix:"quickInput_",container:c.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:a=>this.setContextKey(a),linkOpenerDelegate:a=>{this.instantiationService.invokeFunction(d=>{d.get(_.IOpenerService).open(a,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>c.focus(),createList:(a,d,u,C,f)=>this.instantiationService.createInstance(b.WorkbenchList,a,d,u,C,f),hoverDelegate:{showHover(a,d){},delay:200},styles:this.computeStyles()},l=this._register(new i.QuickInputController(Object.assign(Object.assign({},o),g)));return l.layout(c.dimension,c.offset.quickPickTop),this._register(c.onDidLayout(a=>l.layout(a,c.offset.quickPickTop))),this._register(l.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(l.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),l}setContextKey(c){let g;c&&(g=this.contexts.get(c),g||(g=new y.RawContextKey(c,!1).bindTo(this.contextKeyService),this.contexts.set(c,g))),!(g&&g.get())&&(this.resetContextKeys(),g?.set(!0))}resetContextKeys(){this.contexts.forEach(c=>{c.get()&&c.reset()})}pick(c,g={},o=S.CancellationToken.None){return this.controller.pick(c,g,o)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,n.asCssVariable)(n.quickInputBackground),quickInputForeground:(0,n.asCssVariable)(n.quickInputForeground),quickInputTitleBackground:(0,n.asCssVariable)(n.quickInputTitleBackground),widgetBorder:(0,n.asCssVariable)(n.widgetBorder),widgetShadow:(0,n.asCssVariable)(n.widgetShadow)},inputBox:m.defaultInputBoxStyles,toggle:m.defaultToggleStyles,countBadge:m.defaultCountBadgeStyles,button:m.defaultButtonStyles,progressBar:m.defaultProgressBarStyles,keybindingLabel:m.defaultKeybindingLabelStyles,list:(0,m.getListStyles)({listBackground:n.quickInputBackground,listFocusBackground:n.quickInputListFocusBackground,listFocusForeground:n.quickInputListFocusForeground,listInactiveFocusForeground:n.quickInputListFocusForeground,listInactiveSelectionIconForeground:n.quickInputListFocusIconForeground,listInactiveFocusBackground:n.quickInputListFocusBackground,listFocusOutline:n.activeContrastBorder,listInactiveFocusOutline:n.activeContrastBorder}),pickerGroup:{pickerGroupBorder:(0,n.asCssVariable)(n.pickerGroupBorder),pickerGroupForeground:(0,n.asCssVariable)(n.pickerGroupForeground)}}}};s=Ne([fe(0,D.IInstantiationService),fe(1,y.IContextKeyService),fe(2,t.IThemeService),fe(3,w.ILayoutService)],s),e.QuickInputService=s}),define(J[817],ee([1,0,15,24,21,8,14,312,30,816,92,437]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputService=void 0;let n=class extends h.QuickInputService{constructor(c,g,o,l,a){super(g,o,l,new b.EditorScopedLayoutService(c.getContainerDomNode(),a)),this.host=void 0;const d=i.get(c);if(d){const u=d.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return u.getDomNode()},get dimension(){return c.getLayoutInfo()},get onDidLayout(){return c.onDidLayoutChange},focus:()=>c.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};n=Ne([fe(1,D.IInstantiationService),fe(2,w.IContextKeyService),fe(3,k.IThemeService),fe(4,_.ICodeEditorService)],n);let t=class{get activeService(){const c=this.codeEditorService.getFocusedCodeEditor();if(!c)throw new Error("Quick input service needs a focused editor to work.");let g=this.mapEditorToService.get(c);if(!g){const o=g=this.instantiationService.createInstance(n,c);this.mapEditorToService.set(c,g),(0,m.once)(c.onDidDispose)(()=>{o.dispose(),this.mapEditorToService.delete(c)})}return g}get quickAccess(){return this.activeService.quickAccess}constructor(c,g){this.instantiationService=c,this.codeEditorService=g,this.mapEditorToService=new Map}pick(c,g={},o=y.CancellationToken.None){return this.activeService.pick(c,g,o)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};t=Ne([fe(0,D.IInstantiationService),fe(1,_.ICodeEditorService)],t),e.StandaloneQuickInputService=t;class i{static get(c){return c.getContribution(i.ID)}constructor(c){this.editor=c,this.widget=new s(this.editor)}dispose(){this.widget.dispose()}}i.ID="editor.controller.quickInput",e.QuickInputEditorContribution=i;class s{constructor(c){this.codeEditor=c,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return s.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}s.ID="editor.contrib.quickInputWidget",e.QuickInputEditorWidget=s,(0,S.registerEditorContribution)(i.ID,i,4)}),define(J[182],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.IUndoRedoService=void 0,e.IUndoRedoService=(0,S.createDecorator)("undoRedoService");class k{constructor(b,_){this.resource=b,this.elements=_}}e.ResourceEditStackSnapshot=k;class y{constructor(){this.id=y._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}y._ID=0,y.None=new y,e.UndoRedoGroup=y;class D{constructor(){this.id=D._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}D._ID=0,D.None=new D,e.UndoRedoSource=D}),define(J[39],ee([1,0,16,37,11,6,2,9,20,116,187,13,5,23,163,38,33,48,558,800,303,264,475,476,295,559,170,563,105,182,103]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AttachedViews=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.createTextBuffer=e.createTextBufferFactoryFromSnapshot=e.createTextBufferFactory=void 0;function F(ce){const z=new v.PieceTreeTextBufferBuilder;return z.acceptChunk(ce),z.finish()}e.createTextBufferFactory=F;function R(ce){const z=new v.PieceTreeTextBufferBuilder;let V;for(;typeof(V=ce.read())=="string";)z.acceptChunk(V);return z.finish()}e.createTextBufferFactoryFromSnapshot=R;function M(ce,z){let V;return typeof ce=="string"?V=F(ce):g.isITextSnapshot(ce)?V=R(ce):V=ce,V.create(z)}e.createTextBuffer=M;let N=0;const A=999,P=1e4;class x{constructor(z){this._source=z,this._eos=!1}read(){if(this._eos)return null;const z=[];let V=0,K=0;do{const ie=this._source.read();if(ie===null)return this._eos=!0,V===0?null:z.join("");if(ie.length>0&&(z[V++]=ie,K+=ie.length),K>=64*1024)return z.join("")}while(!0)}}const W=()=>{throw new Error("Invalid change accessor")};let U=class Bt extends w.Disposable{static resolveOptions(z,V){if(V.detectIndentation){const K=(0,u.guessIndentation)(z,V.tabSize,V.insertSpaces);return new g.TextModelResolvedOptions({tabSize:K.tabSize,indentSize:"tabSize",insertSpaces:K.insertSpaces,trimAutoWhitespace:V.trimAutoWhitespace,defaultEOL:V.defaultEOL,bracketPairColorizationOptions:V.bracketPairColorizationOptions})}return new g.TextModelResolvedOptions(V)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(z){return this._eventEmitter.slowEvent(V=>z(V.contentChangedEvent))}onDidChangeContentOrInjectedText(z){return(0,w.combinedDisposable)(this._eventEmitter.fastEvent(V=>z(V)),this._onDidChangeInjectedText.event(V=>z(V)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(z,V,K,ie=null,X,Z,ue){super(),this._undoRedoService=X,this._languageService=Z,this._languageConfigurationService=ue,this._onWillDispose=this._register(new D.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new ne(ke=>this.handleBeforeFireDecorationsChangedEvent(ke))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new D.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new D.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new D.Emitter),this._eventEmitter=this._register(new de),this._languageSelectionListener=this._register(new w.MutableDisposable),this._deltaDecorationCallCnt=0,this._attachedViews=new he,N++,this.id="$model"+N,this.isForSimpleWidget=K.isForSimpleWidget,typeof ie>"u"||ie===null?this._associatedResource=_.URI.parse("inmemory://model/"+N):this._associatedResource=ie,this._attachedEditorCount=0;const{textBuffer:me,disposable:Ce}=M(z,K.defaultEOL);this._buffer=me,this._bufferDisposable=Ce,this._options=Bt.resolveOptions(this._buffer,K);const _e=typeof V=="string"?V:V.languageId;typeof V!="string"&&(this._languageSelectionListener.value=V.onDidChange(()=>this._setLanguage(V.languageId))),this._bracketPairs=this._register(new o.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new d.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new l.ColorizedBracketPairsDecorationProvider(this)),this._tokenizationTextModelPart=new L.TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,_e,this._attachedViews);const we=this._buffer.getLineCount(),ye=this._buffer.getValueLengthInRange(new t.Range(1,1,we,this._buffer.getLineLength(we)+1),0);K.largeFileOptimizations?this._isTooLargeForTokenization=ye>Bt.LARGE_FILE_SIZE_THRESHOLD||we>Bt.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=ye>Bt._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=b.singleLetterHash(N),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new se,this._commandManager=new a.EditStack(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(_e)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const z=new f.PieceTreeTextBuffer([],"",`\n`,!1,!1,!0,!0);z.dispose(),this._buffer=z,this._bufferDisposable=w.Disposable.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(z,V){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(V),this._bracketPairs.handleDidChangeContent(V),this._eventEmitter.fire(new E.InternalModelContentChangeEvent(z,V)))}setValue(z){if(this._assertNotDisposed(),z==null)throw(0,y.illegalArgument)();const{textBuffer:V,disposable:K}=M(z,this._options.defaultEOL);this._setValueFromTextBuffer(V,K)}_createContentChanged2(z,V,K,ie,X,Z,ue,me){return{changes:[{range:z,rangeOffset:V,rangeLength:K,text:ie}],eol:this._buffer.getEOL(),isEolChange:me,versionId:this.getVersionId(),isUndoing:X,isRedoing:Z,isFlush:ue}}_setValueFromTextBuffer(z,V){this._assertNotDisposed();const K=this.getFullModelRange(),ie=this.getValueLengthInRange(K),X=this.getLineCount(),Z=this.getLineMaxColumn(X);this._buffer=z,this._bufferDisposable.dispose(),this._bufferDisposable=V,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new se,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new E.ModelRawContentChangedEvent([new E.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new t.Range(1,1,X,Z),0,ie,this.getValue(),!1,!1,!0,!1))}setEOL(z){this._assertNotDisposed();const V=z===1?`\\r\n`:`\n`;if(this._buffer.getEOL()===V)return;const K=this.getFullModelRange(),ie=this.getValueLengthInRange(K),X=this.getLineCount(),Z=this.getLineMaxColumn(X);this._onBeforeEOLChange(),this._buffer.setEOL(V),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new E.ModelRawContentChangedEvent([new E.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new t.Range(1,1,X,Z),0,ie,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const z=this.getVersionId(),V=this._decorationsTree.collectNodesPostOrder();for(let K=0,ie=V.length;K<ie;K++){const X=V[K],Z=X.range,ue=X.cachedAbsoluteStart-X.start,me=this._buffer.getOffsetAt(Z.startLineNumber,Z.startColumn),Ce=this._buffer.getOffsetAt(Z.endLineNumber,Z.endColumn);X.cachedAbsoluteStart=me,X.cachedAbsoluteEnd=Ce,X.cachedVersionId=z,X.start=me-ue,X.end=Ce-ue,(0,C.recomputeMaxEnd)(X)}}onBeforeAttached(){return this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(z){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(z)}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 z=0,V=0;const K=this._buffer.getLineCount();for(let ie=1;ie<=K;ie++){const X=this._buffer.getLineLength(ie);X>=P?V+=X:z+=X}return V>z}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(z){this._assertNotDisposed();const V=typeof z.tabSize<"u"?z.tabSize:this._options.tabSize,K=typeof z.indentSize<"u"?z.indentSize:this._options.originalIndentSize,ie=typeof z.insertSpaces<"u"?z.insertSpaces:this._options.insertSpaces,X=typeof z.trimAutoWhitespace<"u"?z.trimAutoWhitespace:this._options.trimAutoWhitespace,Z=typeof z.bracketColorizationOptions<"u"?z.bracketColorizationOptions:this._options.bracketPairColorizationOptions,ue=new g.TextModelResolvedOptions({tabSize:V,indentSize:K,insertSpaces:ie,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:X,bracketPairColorizationOptions:Z});if(this._options.equals(ue))return;const me=this._options.createChangeEvent(ue);this._options=ue,this._bracketPairs.handleDidChangeOptions(me),this._decorationProvider.handleDidChangeOptions(me),this._onDidChangeOptions.fire(me)}detectIndentation(z,V){this._assertNotDisposed();const K=(0,u.guessIndentation)(this._buffer,V,z);this.updateOptions({insertSpaces:K.insertSpaces,tabSize:K.tabSize,indentSize:K.tabSize})}normalizeIndentation(z){return this._assertNotDisposed(),(0,m.normalizeIndentation)(z,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(z=null){const V=this.findMatches(b.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(z,V.map(K=>({range:K.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(z){this._assertNotDisposed();const V=this._validatePosition(z.lineNumber,z.column,0);return this._buffer.getOffsetAt(V.lineNumber,V.column)}getPositionAt(z){this._assertNotDisposed();const V=Math.min(this._buffer.getLength(),Math.max(0,z));return this._buffer.getPositionAt(V)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(z){this._versionId=z}_overwriteAlternativeVersionId(z){this._alternativeVersionId=z}_overwriteInitialUndoRedoSnapshot(z){this._initialUndoRedoSnapshot=z}getValue(z,V=!1){this._assertNotDisposed();const K=this.getFullModelRange(),ie=this.getValueInRange(K,z);return V?this._buffer.getBOM()+ie:ie}createSnapshot(z=!1){return new x(this._buffer.createSnapshot(z))}getValueLength(z,V=!1){this._assertNotDisposed();const K=this.getFullModelRange(),ie=this.getValueLengthInRange(K,z);return V?this._buffer.getBOM().length+ie:ie}getValueInRange(z,V=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(z),V)}getValueLengthInRange(z,V=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(z),V)}getCharacterCountInRange(z,V=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(z),V)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(z)}getLineLength(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(z)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`\n`?0:1}getLineMinColumn(z){return this._assertNotDisposed(),1}getLineMaxColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(z)+1}getLineFirstNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(z)}getLineLastNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(z)}_validateRangeRelaxedNoAllocations(z){const V=this._buffer.getLineCount(),K=z.startLineNumber,ie=z.startColumn;let X=Math.floor(typeof K=="number"&&!isNaN(K)?K:1),Z=Math.floor(typeof ie=="number"&&!isNaN(ie)?ie:1);if(X<1)X=1,Z=1;else if(X>V)X=V,Z=this.getLineMaxColumn(X);else if(Z<=1)Z=1;else{const we=this.getLineMaxColumn(X);Z>=we&&(Z=we)}const ue=z.endLineNumber,me=z.endColumn;let Ce=Math.floor(typeof ue=="number"&&!isNaN(ue)?ue:1),_e=Math.floor(typeof me=="number"&&!isNaN(me)?me:1);if(Ce<1)Ce=1,_e=1;else if(Ce>V)Ce=V,_e=this.getLineMaxColumn(Ce);else if(_e<=1)_e=1;else{const we=this.getLineMaxColumn(Ce);_e>=we&&(_e=we)}return K===X&&ie===Z&&ue===Ce&&me===_e&&z instanceof t.Range&&!(z instanceof i.Selection)?z:new t.Range(X,Z,Ce,_e)}_isValidPosition(z,V,K){if(typeof z!="number"||typeof V!="number"||isNaN(z)||isNaN(V)||z<1||V<1||(z|0)!==z||(V|0)!==V)return!1;const ie=this._buffer.getLineCount();if(z>ie)return!1;if(V===1)return!0;const X=this.getLineMaxColumn(z);if(V>X)return!1;if(K===1){const Z=this._buffer.getLineCharCode(z,V-2);if(b.isHighSurrogate(Z))return!1}return!0}_validatePosition(z,V,K){const ie=Math.floor(typeof z=="number"&&!isNaN(z)?z:1),X=Math.floor(typeof V=="number"&&!isNaN(V)?V:1),Z=this._buffer.getLineCount();if(ie<1)return new n.Position(1,1);if(ie>Z)return new n.Position(Z,this.getLineMaxColumn(Z));if(X<=1)return new n.Position(ie,1);const ue=this.getLineMaxColumn(ie);if(X>=ue)return new n.Position(ie,ue);if(K===1){const me=this._buffer.getLineCharCode(ie,X-2);if(b.isHighSurrogate(me))return new n.Position(ie,X-1)}return new n.Position(ie,X)}validatePosition(z){return this._assertNotDisposed(),z instanceof n.Position&&this._isValidPosition(z.lineNumber,z.column,1)?z:this._validatePosition(z.lineNumber,z.column,1)}_isValidRange(z,V){const K=z.startLineNumber,ie=z.startColumn,X=z.endLineNumber,Z=z.endColumn;if(!this._isValidPosition(K,ie,0)||!this._isValidPosition(X,Z,0))return!1;if(V===1){const ue=ie>1?this._buffer.getLineCharCode(K,ie-2):0,me=Z>1&&Z<=this._buffer.getLineLength(X)?this._buffer.getLineCharCode(X,Z-2):0,Ce=b.isHighSurrogate(ue),_e=b.isHighSurrogate(me);return!Ce&&!_e}return!0}validateRange(z){if(this._assertNotDisposed(),z instanceof t.Range&&!(z instanceof i.Selection)&&this._isValidRange(z,1))return z;const K=this._validatePosition(z.startLineNumber,z.startColumn,0),ie=this._validatePosition(z.endLineNumber,z.endColumn,0),X=K.lineNumber,Z=K.column,ue=ie.lineNumber,me=ie.column;{const Ce=Z>1?this._buffer.getLineCharCode(X,Z-2):0,_e=me>1&&me<=this._buffer.getLineLength(ue)?this._buffer.getLineCharCode(ue,me-2):0,we=b.isHighSurrogate(Ce),ye=b.isHighSurrogate(_e);return!we&&!ye?new t.Range(X,Z,ue,me):X===ue&&Z===me?new t.Range(X,Z-1,ue,me-1):we&&ye?new t.Range(X,Z-1,ue,me+1):we?new t.Range(X,Z-1,ue,me):new t.Range(X,Z,ue,me+1)}return new t.Range(X,Z,ue,me)}modifyPosition(z,V){this._assertNotDisposed();const K=this.getOffsetAt(z)+V;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,K)))}getFullModelRange(){this._assertNotDisposed();const z=this.getLineCount();return new t.Range(1,1,z,this.getLineMaxColumn(z))}findMatchesLineByLine(z,V,K,ie){return this._buffer.findMatchesLineByLine(z,V,K,ie)}findMatches(z,V,K,ie,X,Z,ue=A){this._assertNotDisposed();let me=null;V!==null&&(Array.isArray(V)||(V=[V]),V.every(we=>t.Range.isIRange(we))&&(me=V.map(we=>this.validateRange(we)))),me===null&&(me=[this.getFullModelRange()]),me=me.sort((we,ye)=>we.startLineNumber-ye.startLineNumber||we.startColumn-ye.startColumn);const Ce=[];Ce.push(me.reduce((we,ye)=>t.Range.areIntersecting(we,ye)?we.plusRange(ye):(Ce.push(we),ye)));let _e;if(!K&&z.indexOf(`\n`)<0){const ye=new p.SearchParams(z,K,ie,X).parseSearchRequest();if(!ye)return[];_e=ke=>this.findMatchesLineByLine(ke,ye,Z,ue)}else _e=we=>p.TextModelSearch.findMatches(this,new p.SearchParams(z,K,ie,X),we,Z,ue);return Ce.map(_e).reduce((we,ye)=>we.concat(ye),[])}findNextMatch(z,V,K,ie,X,Z){this._assertNotDisposed();const ue=this.validatePosition(V);if(!K&&z.indexOf(`\n`)<0){const Ce=new p.SearchParams(z,K,ie,X).parseSearchRequest();if(!Ce)return null;const _e=this.getLineCount();let we=new t.Range(ue.lineNumber,ue.column,_e,this.getLineMaxColumn(_e)),ye=this.findMatchesLineByLine(we,Ce,Z,1);return p.TextModelSearch.findNextMatch(this,new p.SearchParams(z,K,ie,X),ue,Z),ye.length>0||(we=new t.Range(1,1,ue.lineNumber,this.getLineMaxColumn(ue.lineNumber)),ye=this.findMatchesLineByLine(we,Ce,Z,1),ye.length>0)?ye[0]:null}return p.TextModelSearch.findNextMatch(this,new p.SearchParams(z,K,ie,X),ue,Z)}findPreviousMatch(z,V,K,ie,X,Z){this._assertNotDisposed();const ue=this.validatePosition(V);return p.TextModelSearch.findPreviousMatch(this,new p.SearchParams(z,K,ie,X),ue,Z)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(z){if((this.getEOL()===`\n`?0:1)!==z)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(z)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(z){return z instanceof g.ValidAnnotatedEditOperation?z:new g.ValidAnnotatedEditOperation(z.identifier||null,this.validateRange(z.range),z.text,z.forceMoveMarkers||!1,z.isAutoWhitespaceEdit||!1,z._isTracked||!1)}_validateEditOperations(z){const V=[];for(let K=0,ie=z.length;K<ie;K++)V[K]=this._validateEditOperation(z[K]);return V}pushEditOperations(z,V,K,ie){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(z,this._validateEditOperations(V),K,ie)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(z,V,K,ie){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const X=V.map(ue=>({range:this.validateRange(ue.range),text:ue.text}));let Z=!0;if(z)for(let ue=0,me=z.length;ue<me;ue++){const Ce=z[ue];let _e=!1;for(let we=0,ye=X.length;we<ye;we++){const ke=X[we].range,De=ke.startLineNumber>Ce.endLineNumber,ge=Ce.startLineNumber>ke.endLineNumber;if(!De&&!ge){_e=!0;break}}if(!_e){Z=!1;break}}if(Z)for(let ue=0,me=this._trimAutoWhitespaceLines.length;ue<me;ue++){const Ce=this._trimAutoWhitespaceLines[ue],_e=this.getLineMaxColumn(Ce);let we=!0;for(let ye=0,ke=X.length;ye<ke;ye++){const De=X[ye].range,ge=X[ye].text;if(!(Ce<De.startLineNumber||Ce>De.endLineNumber)&&!(Ce===De.startLineNumber&&De.startColumn===_e&&De.isEmpty()&&ge&&ge.length>0&&ge.charAt(0)===`\n`)&&!(Ce===De.startLineNumber&&De.startColumn===1&&De.isEmpty()&&ge&&ge.length>0&&ge.charAt(ge.length-1)===`\n`)){we=!1;break}}if(we){const ye=new t.Range(Ce,1,Ce,_e);V.push(new g.ValidAnnotatedEditOperation(null,ye,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(z,V,K,ie)}_applyUndo(z,V,K,ie){const X=z.map(Z=>{const ue=this.getPositionAt(Z.newPosition),me=this.getPositionAt(Z.newEnd);return{range:new t.Range(ue.lineNumber,ue.column,me.lineNumber,me.column),text:Z.oldText}});this._applyUndoRedoEdits(X,V,!0,!1,K,ie)}_applyRedo(z,V,K,ie){const X=z.map(Z=>{const ue=this.getPositionAt(Z.oldPosition),me=this.getPositionAt(Z.oldEnd);return{range:new t.Range(ue.lineNumber,ue.column,me.lineNumber,me.column),text:Z.newText}});this._applyUndoRedoEdits(X,V,!1,!0,K,ie)}_applyUndoRedoEdits(z,V,K,ie,X,Z){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=K,this._isRedoing=ie,this.applyEdits(z,!1),this.setEOL(V),this._overwriteAlternativeVersionId(X)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(Z),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(z,V=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const K=this._validateEditOperations(z);return this._doApplyEdits(K,V)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(z,V){const K=this._buffer.getLineCount(),ie=this._buffer.applyEdits(z,this._options.trimAutoWhitespace,V),X=this._buffer.getLineCount(),Z=ie.changes;if(this._trimAutoWhitespaceLines=ie.trimAutoWhitespaceLineNumbers,Z.length!==0){for(let Ce=0,_e=Z.length;Ce<_e;Ce++){const we=Z[Ce];this._decorationsTree.acceptReplace(we.rangeOffset,we.rangeLength,we.text.length,we.forceMoveMarkers)}const ue=[];this._increaseVersionId();let me=K;for(let Ce=0,_e=Z.length;Ce<_e;Ce++){const we=Z[Ce],[ye]=(0,h.countEOL)(we.text);this._onDidChangeDecorations.fire();const ke=we.range.startLineNumber,De=we.range.endLineNumber,ge=De-ke,pe=ye,ae=Math.min(ge,pe),ve=pe-ge,Le=X-me-ve+ke,Ie=Le,Ae=Le+pe,be=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new n.Position(Ie,1)),this.getOffsetAt(new n.Position(Ae,this.getLineMaxColumn(Ae))),0),Se=E.LineInjectedText.fromDecorations(be),Te=new S.ArrayQueue(Se);for(let Pe=ae;Pe>=0;Pe--){const Fe=ke+Pe,Oe=Le+Pe;Te.takeFromEndWhile(Ke=>Ke.lineNumber>Oe);const xe=Te.takeFromEndWhile(Ke=>Ke.lineNumber===Oe);ue.push(new E.ModelRawLineChanged(Fe,this.getLineContent(Oe),xe))}if(ae<ge){const Pe=ke+ae;ue.push(new E.ModelRawLinesDeleted(Pe+1,De))}if(ae<pe){const Pe=new S.ArrayQueue(Se),Fe=ke+ae,Oe=pe-ae,xe=X-me-Oe+Fe+1,Ke=[],Ye=[];for(let qe=0;qe<Oe;qe++){const st=xe+qe;Ye[qe]=this.getLineContent(st),Pe.takeWhile(Ve=>Ve.lineNumber<st),Ke[qe]=Pe.takeWhile(Ve=>Ve.lineNumber===st)}ue.push(new E.ModelRawLinesInserted(Fe+1,ke+pe,Ye,Ke))}me+=ve}this._emitContentChangedEvent(new E.ModelRawContentChangedEvent(ue,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:Z,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return ie.reverseEdits===null?void 0:ie.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)}handleBeforeFireDecorationsChangedEvent(z){if(z===null||z.size===0)return;const K=Array.from(z).map(ie=>new E.ModelRawLineChanged(ie,this.getLineContent(ie),this._getInjectedTextInLine(ie)));this._onDidChangeInjectedText.fire(new E.ModelInjectedTextChangedEvent(K))}changeDecorations(z,V=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(V,z)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(z,V){const K={addDecoration:(X,Z)=>this._deltaDecorationsImpl(z,[],[{range:X,options:Z}])[0],changeDecoration:(X,Z)=>{this._changeDecorationImpl(X,Z)},changeDecorationOptions:(X,Z)=>{this._changeDecorationOptionsImpl(X,Y(Z))},removeDecoration:X=>{this._deltaDecorationsImpl(z,[X],[])},deltaDecorations:(X,Z)=>X.length===0&&Z.length===0?[]:this._deltaDecorationsImpl(z,X,Z)};let ie=null;try{ie=V(K)}catch(X){(0,y.onUnexpectedError)(X)}return K.addDecoration=W,K.changeDecoration=W,K.changeDecorationOptions=W,K.removeDecoration=W,K.deltaDecorations=W,ie}deltaDecorations(z,V,K=0){if(this._assertNotDisposed(),z||(z=[]),z.length===0&&V.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,y.onUnexpectedError)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(K,z,V)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(z){return this.getDecorationRange(z)}_setTrackedRange(z,V,K){const ie=z?this._decorations[z]:null;if(!ie)return V?this._deltaDecorationsImpl(0,[],[{range:V,options:G[K]}])[0]:null;if(!V)return this._decorationsTree.delete(ie),delete this._decorations[ie.id],null;const X=this._validateRangeRelaxedNoAllocations(V),Z=this._buffer.getOffsetAt(X.startLineNumber,X.startColumn),ue=this._buffer.getOffsetAt(X.endLineNumber,X.endColumn);return this._decorationsTree.delete(ie),ie.reset(this.getVersionId(),Z,ue,X),ie.setOptions(G[K]),this._decorationsTree.insert(ie),ie.id}removeAllDecorationsWithOwnerId(z){if(this._isDisposed)return;const V=this._decorationsTree.collectNodesFromOwner(z);for(let K=0,ie=V.length;K<ie;K++){const X=V[K];this._decorationsTree.delete(X),delete this._decorations[X.id]}}getDecorationOptions(z){const V=this._decorations[z];return V?V.options:null}getDecorationRange(z){const V=this._decorations[z];return V?this._decorationsTree.getNodeRange(this,V):null}getLineDecorations(z,V=0,K=!1){return z<1||z>this.getLineCount()?[]:this.getLinesDecorations(z,z,V,K)}getLinesDecorations(z,V,K=0,ie=!1){const X=this.getLineCount(),Z=Math.min(X,Math.max(1,z)),ue=Math.min(X,Math.max(1,V)),me=this.getLineMaxColumn(ue),Ce=new t.Range(Z,1,ue,me),_e=this._getDecorationsInRange(Ce,K,ie);return(0,S.pushMany)(_e,this._decorationProvider.getDecorationsInRange(Ce,K,ie)),_e}getDecorationsInRange(z,V=0,K=!1,ie=!1){const X=this.validateRange(z),Z=this._getDecorationsInRange(X,V,K);return(0,S.pushMany)(Z,this._decorationProvider.getDecorationsInRange(X,V,K,ie)),Z}getOverviewRulerDecorations(z=0,V=!1){return this._decorationsTree.getAll(this,z,V,!0)}getInjectedTextDecorations(z=0){return this._decorationsTree.getAllInjectedText(this,z)}_getInjectedTextInLine(z){const V=this._buffer.getOffsetAt(z,1),K=V+this._buffer.getLineLength(z),ie=this._decorationsTree.getInjectedTextInInterval(this,V,K,0);return E.LineInjectedText.fromDecorations(ie).filter(X=>X.lineNumber===z)}getAllDecorations(z=0,V=!1){let K=this._decorationsTree.getAll(this,z,V,!1);return K=K.concat(this._decorationProvider.getAllDecorations(z,V)),K}_getDecorationsInRange(z,V,K){const ie=this._buffer.getOffsetAt(z.startLineNumber,z.startColumn),X=this._buffer.getOffsetAt(z.endLineNumber,z.endColumn);return this._decorationsTree.getAllInInterval(this,ie,X,V,K)}getRangeAt(z,V){return this._buffer.getRangeAt(z,V-z)}_changeDecorationImpl(z,V){const K=this._decorations[z];if(!K)return;if(K.options.after){const ue=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ue.endLineNumber)}if(K.options.before){const ue=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ue.startLineNumber)}const ie=this._validateRangeRelaxedNoAllocations(V),X=this._buffer.getOffsetAt(ie.startLineNumber,ie.startColumn),Z=this._buffer.getOffsetAt(ie.endLineNumber,ie.endColumn);this._decorationsTree.delete(K),K.reset(this.getVersionId(),X,Z,ie),this._decorationsTree.insert(K),this._onDidChangeDecorations.checkAffectedAndFire(K.options),K.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ie.endLineNumber),K.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ie.startLineNumber)}_changeDecorationOptionsImpl(z,V){const K=this._decorations[z];if(!K)return;const ie=!!(K.options.overviewRuler&&K.options.overviewRuler.color),X=!!(V.overviewRuler&&V.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(K.options),this._onDidChangeDecorations.checkAffectedAndFire(V),K.options.after||V.after){const Z=this._decorationsTree.getNodeRange(this,K);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Z.endLineNumber)}if(K.options.before||V.before){const Z=this._decorationsTree.getNodeRange(this,K);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Z.startLineNumber)}ie!==X?(this._decorationsTree.delete(K),K.setOptions(V),this._decorationsTree.insert(K)):K.setOptions(V)}_deltaDecorationsImpl(z,V,K){const ie=this.getVersionId(),X=V.length;let Z=0;const ue=K.length;let me=0;this._onDidChangeDecorations.beginDeferredEmit();try{const Ce=new Array(ue);for(;Z<X||me<ue;){let _e=null;if(Z<X){do _e=this._decorations[V[Z++]];while(!_e&&Z<X);if(_e){if(_e.options.after){const we=this._decorationsTree.getNodeRange(this,_e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(we.endLineNumber)}if(_e.options.before){const we=this._decorationsTree.getNodeRange(this,_e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(we.startLineNumber)}this._decorationsTree.delete(_e),this._onDidChangeDecorations.checkAffectedAndFire(_e.options)}}if(me<ue){if(!_e){const pe=++this._lastDecorationId,ae=`${this._instanceId};${pe}`;_e=new C.IntervalNode(ae,0,0),this._decorations[ae]=_e}const we=K[me],ye=this._validateRangeRelaxedNoAllocations(we.range),ke=Y(we.options),De=this._buffer.getOffsetAt(ye.startLineNumber,ye.startColumn),ge=this._buffer.getOffsetAt(ye.endLineNumber,ye.endColumn);_e.ownerId=z,_e.reset(ie,De,ge,ye),_e.setOptions(ke),_e.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ye.endLineNumber),_e.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ye.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(ke),this._decorationsTree.insert(_e),Ce[me]=_e.id,me++}else _e&&delete this._decorations[_e.id]}return Ce}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setLanguage(z,V){typeof z=="string"?(this._languageSelectionListener.clear(),this._setLanguage(z,V)):(this._languageSelectionListener.value=z.onDidChange(()=>this._setLanguage(z.languageId,V)),this._setLanguage(z.languageId,V))}_setLanguage(z,V){this.tokenization.setLanguageId(z,V),this._languageService.requestRichLanguageFeatures(z)}getLanguageIdAtPosition(z,V){return this.tokenization.getLanguageIdAtPosition(z,V)}getWordAtPosition(z){return this._tokenizationTextModelPart.getWordAtPosition(z)}getWordUntilPosition(z){return this._tokenizationTextModelPart.getWordUntilPosition(z)}normalizePosition(z,V){return z}getLineIndentColumn(z){return O(this.getLineContent(z))+1}};U._MODEL_SYNC_LIMIT=50*1024*1024,U.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,U.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,U.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:s.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:s.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:s.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:s.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:s.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:s.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},U=Ne([fe(4,I.IUndoRedoService),fe(5,r.ILanguageService),fe(6,c.ILanguageConfigurationService)],U),e.TextModel=U;function O(ce){let z=0;for(const V of ce)if(V===" "||V==="\t")z++;else break;return z}function $(ce){return!!(ce.options.overviewRuler&&ce.options.overviewRuler.color)}function Q(ce){return!!ce.options.after||!!ce.options.before}class se{constructor(){this._decorationsTree0=new C.IntervalTree,this._decorationsTree1=new C.IntervalTree,this._injectedTextDecorationsTree=new C.IntervalTree}ensureAllNodesHaveRanges(z){this.getAll(z,0,!1,!1)}_ensureNodesHaveRanges(z,V){for(const K of V)K.range===null&&(K.range=z.getRangeAt(K.cachedAbsoluteStart,K.cachedAbsoluteEnd));return V}getAllInInterval(z,V,K,ie,X){const Z=z.getVersionId(),ue=this._intervalSearch(V,K,ie,X,Z);return this._ensureNodesHaveRanges(z,ue)}_intervalSearch(z,V,K,ie,X){const Z=this._decorationsTree0.intervalSearch(z,V,K,ie,X),ue=this._decorationsTree1.intervalSearch(z,V,K,ie,X),me=this._injectedTextDecorationsTree.intervalSearch(z,V,K,ie,X);return Z.concat(ue).concat(me)}getInjectedTextInInterval(z,V,K,ie){const X=z.getVersionId(),Z=this._injectedTextDecorationsTree.intervalSearch(V,K,ie,!1,X);return this._ensureNodesHaveRanges(z,Z).filter(ue=>ue.options.showIfCollapsed||!ue.range.isEmpty())}getAllInjectedText(z,V){const K=z.getVersionId(),ie=this._injectedTextDecorationsTree.search(V,!1,K);return this._ensureNodesHaveRanges(z,ie).filter(X=>X.options.showIfCollapsed||!X.range.isEmpty())}getAll(z,V,K,ie){const X=z.getVersionId(),Z=this._search(V,K,ie,X);return this._ensureNodesHaveRanges(z,Z)}_search(z,V,K,ie){if(K)return this._decorationsTree1.search(z,V,ie);{const X=this._decorationsTree0.search(z,V,ie),Z=this._decorationsTree1.search(z,V,ie),ue=this._injectedTextDecorationsTree.search(z,V,ie);return X.concat(Z).concat(ue)}}collectNodesFromOwner(z){const V=this._decorationsTree0.collectNodesFromOwner(z),K=this._decorationsTree1.collectNodesFromOwner(z),ie=this._injectedTextDecorationsTree.collectNodesFromOwner(z);return V.concat(K).concat(ie)}collectNodesPostOrder(){const z=this._decorationsTree0.collectNodesPostOrder(),V=this._decorationsTree1.collectNodesPostOrder(),K=this._injectedTextDecorationsTree.collectNodesPostOrder();return z.concat(V).concat(K)}insert(z){Q(z)?this._injectedTextDecorationsTree.insert(z):$(z)?this._decorationsTree1.insert(z):this._decorationsTree0.insert(z)}delete(z){Q(z)?this._injectedTextDecorationsTree.delete(z):$(z)?this._decorationsTree1.delete(z):this._decorationsTree0.delete(z)}getNodeRange(z,V){const K=z.getVersionId();return V.cachedVersionId!==K&&this._resolveNode(V,K),V.range===null&&(V.range=z.getRangeAt(V.cachedAbsoluteStart,V.cachedAbsoluteEnd)),V.range}_resolveNode(z,V){Q(z)?this._injectedTextDecorationsTree.resolveNode(z,V):$(z)?this._decorationsTree1.resolveNode(z,V):this._decorationsTree0.resolveNode(z,V)}acceptReplace(z,V,K,ie){this._decorationsTree0.acceptReplace(z,V,K,ie),this._decorationsTree1.acceptReplace(z,V,K,ie),this._injectedTextDecorationsTree.acceptReplace(z,V,K,ie)}}function le(ce){return ce.replace(/[^a-z0-9\\-_]/gi," ")}class te{constructor(z){this.color=z.color||"",this.darkColor=z.darkColor||""}}class re extends te{constructor(z){super(z),this._resolvedColor=null,this.position=typeof z.position=="number"?z.position:g.OverviewRulerLane.Center}getColor(z){return this._resolvedColor||(z.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,z):this._resolvedColor=this._resolveColor(this.color,z)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(z,V){if(typeof z=="string")return z;const K=z?V.getColor(z.id):null;return K?K.toString():""}}e.ModelDecorationOverviewRulerOptions=re;class H extends te{constructor(z){super(z),this.position=z.position}getColor(z){return this._resolvedColor||(z.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,z):this._resolvedColor=this._resolveColor(this.color,z)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(z,V){return typeof z=="string"?k.Color.fromHex(z):V.getColor(z.id)}}e.ModelDecorationMinimapOptions=H;class B{static from(z){return z instanceof B?z:new B(z)}constructor(z){this.content=z.content||"",this.inlineClassName=z.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=z.attachedData||null,this.cursorStops=z.cursorStops||null}}e.ModelDecorationInjectedTextOptions=B;class j{static register(z){return new j(z)}static createDynamic(z){return new j(z)}constructor(z){var V,K,ie,X,Z;this.description=z.description,this.blockClassName=z.blockClassName?le(z.blockClassName):null,this.blockDoesNotCollapse=(V=z.blockDoesNotCollapse)!==null&&V!==void 0?V:null,this.blockIsAfterEnd=(K=z.blockIsAfterEnd)!==null&&K!==void 0?K:null,this.blockPadding=(ie=z.blockPadding)!==null&&ie!==void 0?ie:null,this.stickiness=z.stickiness||0,this.zIndex=z.zIndex||0,this.className=z.className?le(z.className):null,this.hoverMessage=z.hoverMessage||null,this.glyphMarginHoverMessage=z.glyphMarginHoverMessage||null,this.isWholeLine=z.isWholeLine||!1,this.showIfCollapsed=z.showIfCollapsed||!1,this.collapseOnReplaceEdit=z.collapseOnReplaceEdit||!1,this.overviewRuler=z.overviewRuler?new re(z.overviewRuler):null,this.minimap=z.minimap?new H(z.minimap):null,this.glyphMarginClassName=z.glyphMarginClassName?le(z.glyphMarginClassName):null,this.linesDecorationsClassName=z.linesDecorationsClassName?le(z.linesDecorationsClassName):null,this.firstLineDecorationClassName=z.firstLineDecorationClassName?le(z.firstLineDecorationClassName):null,this.marginClassName=z.marginClassName?le(z.marginClassName):null,this.inlineClassName=z.inlineClassName?le(z.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=z.beforeContentClassName?le(z.beforeContentClassName):null,this.afterContentClassName=z.afterContentClassName?le(z.afterContentClassName):null,this.after=z.after?B.from(z.after):null,this.before=z.before?B.from(z.before):null,this.hideInCommentTokens=(X=z.hideInCommentTokens)!==null&&X!==void 0?X:!1,this.hideInStringTokens=(Z=z.hideInStringTokens)!==null&&Z!==void 0?Z:!1}}e.ModelDecorationOptions=j,j.EMPTY=j.register({description:"empty"});const G=[j.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),j.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),j.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),j.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Y(ce){return ce instanceof j?ce:j.createDynamic(ce)}class ne extends w.Disposable{constructor(z){super(),this.handleBeforeFire=z,this._actual=this._register(new D.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var z;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(z=this._affectedInjectedTextLines)===null||z===void 0||z.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(z){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(z)}checkAffectedAndFire(z){this._affectsMinimap||(this._affectsMinimap=!!(z.minimap&&z.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(z.overviewRuler&&z.overviewRuler.color)),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const z={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(z)}}class de extends w.Disposable{constructor(){super(),this._fastEmitter=this._register(new D.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new D.Emitter),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(z=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=z;const V=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(V),this._slowEmitter.fire(V)}}fire(z){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(z):this._deferredEvent=z;return}this._fastEmitter.fire(z),this._slowEmitter.fire(z)}}class he{constructor(){this._onDidChangeVisibleRanges=new D.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const z=new oe(V=>{this._onDidChangeVisibleRanges.fire({view:z,state:V})});return this._views.add(z),z}detachView(z){this._views.delete(z),this._onDidChangeVisibleRanges.fire({view:z,state:void 0})}}e.AttachedViews=he;class oe{constructor(z){this.handleStateChange=z}setVisibleLines(z,V){const K=z.map(ie=>new T.LineRange(ie.startLineNumber,ie.endLineNumber+1));this.handleStateChange({visibleLineRanges:K,stabilized:V})}}}),define(J[818],ee([1,0,6,2,17,39,163,72,38,176,27,182,133,303,49,45,33]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelService=void 0;function g(C){return C.toString()}function o(C){const f=new t.StringSHA1,v=C.createSnapshot();let p;for(;p=v.read();)f.update(p);return f.digest()}class l{constructor(f,v,p){this.model=f,this._modelEventListeners=new k.DisposableStore,this.model=f,this._modelEventListeners.add(f.onWillDispose(()=>v(f))),this._modelEventListeners.add(f.onDidChangeLanguage(L=>p(f,L)))}dispose(){this._modelEventListeners.dispose()}}const a=y.isLinux||y.isMacintosh?1:2;class d{constructor(f,v,p,L,E,I,T,F){this.uri=f,this.initialUndoRedoSnapshot=v,this.time=p,this.sharesUndoRedoStack=L,this.heapSize=E,this.sha1=I,this.versionId=T,this.alternativeVersionId=F}}let u=class Wt extends k.Disposable{constructor(f,v,p,L,E){super(),this._configurationService=f,this._resourcePropertiesService=v,this._undoRedoService=p,this._languageService=L,this._languageConfigurationService=E,this._onModelAdded=this._register(new S.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new S.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new S.Emitter),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(I=>this._updateModelOptions(I))),this._updateModelOptions(void 0)}static _readModelOptions(f,v){var p;let L=w.EDITOR_MODEL_DEFAULTS.tabSize;if(f.editor&&typeof f.editor.tabSize<"u"){const P=parseInt(f.editor.tabSize,10);isNaN(P)||(L=P),L<1&&(L=1)}let E="tabSize";if(f.editor&&typeof f.editor.indentSize<"u"&&f.editor.indentSize!=="tabSize"){const P=parseInt(f.editor.indentSize,10);isNaN(P)||(E=Math.max(P,1))}let I=w.EDITOR_MODEL_DEFAULTS.insertSpaces;f.editor&&typeof f.editor.insertSpaces<"u"&&(I=f.editor.insertSpaces==="false"?!1:!!f.editor.insertSpaces);let T=a;const F=f.eol;F===`\\r\n`?T=2:F===`\n`&&(T=1);let R=w.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;f.editor&&typeof f.editor.trimAutoWhitespace<"u"&&(R=f.editor.trimAutoWhitespace==="false"?!1:!!f.editor.trimAutoWhitespace);let M=w.EDITOR_MODEL_DEFAULTS.detectIndentation;f.editor&&typeof f.editor.detectIndentation<"u"&&(M=f.editor.detectIndentation==="false"?!1:!!f.editor.detectIndentation);let N=w.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;f.editor&&typeof f.editor.largeFileOptimizations<"u"&&(N=f.editor.largeFileOptimizations==="false"?!1:!!f.editor.largeFileOptimizations);let A=w.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return!((p=f.editor)===null||p===void 0)&&p.bracketPairColorization&&typeof f.editor.bracketPairColorization=="object"&&(A={enabled:!!f.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!f.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:v,tabSize:L,indentSize:E,insertSpaces:I,detectIndentation:M,defaultEOL:T,trimAutoWhitespace:R,largeFileOptimizations:N,bracketPairColorizationOptions:A}}_getEOL(f,v){if(f)return this._resourcePropertiesService.getEOL(f,v);const p=this._configurationService.getValue("files.eol",{overrideIdentifier:v});return p&&typeof p=="string"&&p!=="auto"?p:y.OS===3||y.OS===2?`\n`:`\\r\n`}_shouldRestoreUndoStack(){const f=this._configurationService.getValue("files.restoreUndoStack");return typeof f=="boolean"?f:!0}getCreationOptions(f,v,p){const L=typeof f=="string"?f:f.languageId;let E=this._modelCreationOptionsByLanguageAndResource[L+v];if(!E){const I=this._configurationService.getValue("editor",{overrideIdentifier:L,resource:v}),T=this._getEOL(v,L);E=Wt._readModelOptions({editor:I,eol:T},p),this._modelCreationOptionsByLanguageAndResource[L+v]=E}return E}_updateModelOptions(f){const v=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const p=Object.keys(this._models);for(let L=0,E=p.length;L<E;L++){const I=p[L],T=this._models[I],F=T.model.getLanguageId(),R=T.model.uri;if(f&&!f.affectsConfiguration("editor",{overrideIdentifier:F,resource:R})&&!f.affectsConfiguration("files.eol",{overrideIdentifier:F,resource:R}))continue;const M=v[F+R],N=this.getCreationOptions(F,R,T.model.isForSimpleWidget);Wt._setModelOptionsForModel(T.model,N,M)}}static _setModelOptionsForModel(f,v,p){p&&p.defaultEOL!==v.defaultEOL&&f.getLineCount()===1&&f.setEOL(v.defaultEOL===1?0:1),!(p&&p.detectIndentation===v.detectIndentation&&p.insertSpaces===v.insertSpaces&&p.tabSize===v.tabSize&&p.indentSize===v.indentSize&&p.trimAutoWhitespace===v.trimAutoWhitespace&&(0,r.equals)(p.bracketPairColorizationOptions,v.bracketPairColorizationOptions))&&(v.detectIndentation?(f.detectIndentation(v.insertSpaces,v.tabSize),f.updateOptions({trimAutoWhitespace:v.trimAutoWhitespace,bracketColorizationOptions:v.bracketPairColorizationOptions})):f.updateOptions({insertSpaces:v.insertSpaces,tabSize:v.tabSize,indentSize:v.indentSize,trimAutoWhitespace:v.trimAutoWhitespace,bracketColorizationOptions:v.bracketPairColorizationOptions}))}_insertDisposedModel(f){this._disposedModels.set(g(f.uri),f),this._disposedModelsHeapSize+=f.heapSize}_removeDisposedModel(f){const v=this._disposedModels.get(g(f));return v&&(this._disposedModelsHeapSize-=v.heapSize),this._disposedModels.delete(g(f)),v}_ensureDisposedModelsHeapSize(f){if(this._disposedModelsHeapSize>f){const v=[];for(this._disposedModels.forEach(p=>{p.sharesUndoRedoStack||v.push(p)}),v.sort((p,L)=>p.time-L.time);v.length>0&&this._disposedModelsHeapSize>f;){const p=v.shift();this._removeDisposedModel(p.uri),p.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(p.initialUndoRedoSnapshot)}}}_createModelData(f,v,p,L){const E=this.getCreationOptions(v,p,L),I=new D.TextModel(f,v,E,p,this._undoRedoService,this._languageService,this._languageConfigurationService);if(p&&this._disposedModels.has(g(p))){const R=this._removeDisposedModel(p),M=this._undoRedoService.getElements(p),N=o(I)===R.sha1;if(N||R.sharesUndoRedoStack){for(const A of M.past)(0,i.isEditStackElement)(A)&&A.matchesResource(p)&&A.setModel(I);for(const A of M.future)(0,i.isEditStackElement)(A)&&A.matchesResource(p)&&A.setModel(I);this._undoRedoService.setElementsValidFlag(p,!0,A=>(0,i.isEditStackElement)(A)&&A.matchesResource(p)),N&&(I._overwriteVersionId(R.versionId),I._overwriteAlternativeVersionId(R.alternativeVersionId),I._overwriteInitialUndoRedoSnapshot(R.initialUndoRedoSnapshot))}else R.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(R.initialUndoRedoSnapshot)}const T=g(I.uri);if(this._models[T])throw new Error("ModelService: Cannot add model because it already exists!");const F=new l(I,R=>this._onWillDispose(R),(R,M)=>this._onDidChangeLanguage(R,M));return this._models[T]=F,F}createModel(f,v,p,L=!1){let E;return v?E=this._createModelData(f,v,p,L):E=this._createModelData(f,b.PLAINTEXT_LANGUAGE_ID,p,L),this._onModelAdded.fire(E.model),E.model}getModels(){const f=[],v=Object.keys(this._models);for(let p=0,L=v.length;p<L;p++){const E=v[p];f.push(this._models[E].model)}return f}getModel(f){const v=g(f),p=this._models[v];return p?p.model:null}_schemaShouldMaintainUndoRedoElements(f){return f.scheme===s.Schemas.file||f.scheme===s.Schemas.vscodeRemote||f.scheme===s.Schemas.vscodeUserData||f.scheme===s.Schemas.vscodeNotebookCell||f.scheme==="fake-fs"}_onWillDispose(f){const v=g(f.uri),p=this._models[v],L=this._undoRedoService.getUriComparisonKey(f.uri)!==f.uri.toString();let E=!1,I=0;if(L||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(f.uri)){const F=this._undoRedoService.getElements(f.uri);if(F.past.length>0||F.future.length>0){for(const R of F.past)(0,i.isEditStackElement)(R)&&R.matchesResource(f.uri)&&(E=!0,I+=R.heapSize(f.uri),R.setModel(f.uri));for(const R of F.future)(0,i.isEditStackElement)(R)&&R.matchesResource(f.uri)&&(E=!0,I+=R.heapSize(f.uri),R.setModel(f.uri))}}const T=Wt.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(E)if(!L&&I>T){const F=p.model.getInitialUndoRedoSnapshot();F!==null&&this._undoRedoService.restoreSnapshot(F)}else this._ensureDisposedModelsHeapSize(T-I),this._undoRedoService.setElementsValidFlag(f.uri,!1,F=>(0,i.isEditStackElement)(F)&&F.matchesResource(f.uri)),this._insertDisposedModel(new d(f.uri,p.model.getInitialUndoRedoSnapshot(),Date.now(),L,I,o(f),f.getVersionId(),f.getAlternativeVersionId()));else if(!L){const F=p.model.getInitialUndoRedoSnapshot();F!==null&&this._undoRedoService.restoreSnapshot(F)}delete this._models[v],p.dispose(),delete this._modelCreationOptionsByLanguageAndResource[f.getLanguageId()+f.uri],this._onModelRemoved.fire(f)}_onDidChangeLanguage(f,v){const p=v.oldLanguage,L=f.getLanguageId(),E=this.getCreationOptions(p,f.uri,f.isForSimpleWidget),I=this.getCreationOptions(L,f.uri,f.isForSimpleWidget);Wt._setModelOptionsForModel(f,I,E),this._onModelModeChanged.fire({model:f,oldLanguageId:p})}};u.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,u=Ne([fe(0,m.IConfigurationService),fe(1,h.ITextResourcePropertiesService),fe(2,n.IUndoRedoService),fe(3,_.ILanguageService),fe(4,c.ILanguageConfigurationService)],u),e.ModelService=u}),define(J[819],ee([1,0,16,13,5,195,39,105,197,496,259,81]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class t{constructor(a,d,u,C,f,v,p,L,E,I){this._editorId=a,this.model=d,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=u,this._monospaceLineBreaksComputerFactory=C,this.fontInfo=f,this.tabSize=v,this.wrappingStrategy=p,this.wrappingColumn=L,this.wrappingIndent=E,this.wordBreak=I,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new c(this)}_constructLines(a,d){this.modelLineProjections=[],a&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const u=this.model.getLinesContent(),C=this.model.getInjectedTextDecorations(this._editorId),f=u.length,v=this.createLineBreaksComputer(),p=new S.ArrayQueue(b.LineInjectedText.fromDecorations(C));for(let N=0;N<f;N++){const A=p.takeWhile(P=>P.lineNumber===N+1);v.addRequest(u[N],A,d?d[N]:null)}const L=v.finalize(),E=[],I=this.hiddenAreasDecorationIds.map(N=>this.model.getDecorationRange(N)).sort(y.Range.compareRangesUsingStarts);let T=1,F=0,R=-1,M=R+1<I.length?F+1:f+2;for(let N=0;N<f;N++){const A=N+1;A===M&&(R++,T=I[R].startLineNumber,F=I[R].endLineNumber,M=R+1<I.length?F+1:f+2);const P=A>=T&&A<=F,x=(0,h.createModelLineProjection)(L[N],!P);E[N]=x.getViewLineCount(),this.modelLineProjections[N]=x}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new m.ConstantTimePrefixSumComputer(E)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(a=>this.model.getDecorationRange(a))}setHiddenAreas(a){const d=a.map(F=>this.model.validateRange(F)),u=i(d),C=this.hiddenAreasDecorationIds.map(F=>this.model.getDecorationRange(F)).sort(y.Range.compareRangesUsingStarts);if(u.length===C.length){let F=!1;for(let R=0;R<u.length;R++)if(!u[R].equalsRange(C[R])){F=!0;break}if(!F)return!1}const f=u.map(F=>({range:F,options:w.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,f);const v=u;let p=1,L=0,E=-1,I=E+1<v.length?L+1:this.modelLineProjections.length+2,T=!1;for(let F=0;F<this.modelLineProjections.length;F++){const R=F+1;R===I&&(E++,p=v[E].startLineNumber,L=v[E].endLineNumber,I=E+1<v.length?L+1:this.modelLineProjections.length+2);let M=!1;if(R>=p&&R<=L?this.modelLineProjections[F].isVisible()&&(this.modelLineProjections[F]=this.modelLineProjections[F].setVisible(!1),M=!0):(T=!0,this.modelLineProjections[F].isVisible()||(this.modelLineProjections[F]=this.modelLineProjections[F].setVisible(!0),M=!0)),M){const N=this.modelLineProjections[F].getViewLineCount();this.projectedModelLineLineCounts.setValue(F,N)}}return T||this.setHiddenAreas([]),!0}modelPositionIsVisible(a,d){return a<1||a>this.modelLineProjections.length?!1:this.modelLineProjections[a-1].isVisible()}getModelLineViewLineCount(a){return a<1||a>this.modelLineProjections.length?1:this.modelLineProjections[a-1].getViewLineCount()}setTabSize(a){return this.tabSize===a?!1:(this.tabSize=a,this._constructLines(!1,null),!0)}setWrappingSettings(a,d,u,C,f){const v=this.fontInfo.equals(a),p=this.wrappingStrategy===d,L=this.wrappingColumn===u,E=this.wrappingIndent===C,I=this.wordBreak===f;if(v&&p&&L&&E&&I)return!1;const T=v&&p&&!L&&E&&I;this.fontInfo=a,this.wrappingStrategy=d,this.wrappingColumn=u,this.wrappingIndent=C,this.wordBreak=f;let F=null;if(T){F=[];for(let R=0,M=this.modelLineProjections.length;R<M;R++)F[R]=this.modelLineProjections[R].getProjectionData()}return this._constructLines(!1,F),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(a,d,u){if(!a||a<=this._validModelVersionId)return null;const C=d===1?1:this.projectedModelLineLineCounts.getPrefixSum(d-1)+1,f=this.projectedModelLineLineCounts.getPrefixSum(u);return this.modelLineProjections.splice(d-1,u-d+1),this.projectedModelLineLineCounts.removeValues(d-1,u-d+1),new _.ViewLinesDeletedEvent(C,f)}onModelLinesInserted(a,d,u,C){if(!a||a<=this._validModelVersionId)return null;const f=d>2&&!this.modelLineProjections[d-2].isVisible(),v=d===1?1:this.projectedModelLineLineCounts.getPrefixSum(d-1)+1;let p=0;const L=[],E=[];for(let I=0,T=C.length;I<T;I++){const F=(0,h.createModelLineProjection)(C[I],!f);L.push(F);const R=F.getViewLineCount();p+=R,E[I]=R}return this.modelLineProjections=this.modelLineProjections.slice(0,d-1).concat(L).concat(this.modelLineProjections.slice(d-1)),this.projectedModelLineLineCounts.insertValues(d-1,E),new _.ViewLinesInsertedEvent(v,v+p-1)}onModelLineChanged(a,d,u){if(a!==null&&a<=this._validModelVersionId)return[!1,null,null,null];const C=d-1,f=this.modelLineProjections[C].getViewLineCount(),v=this.modelLineProjections[C].isVisible(),p=(0,h.createModelLineProjection)(u,v);this.modelLineProjections[C]=p;const L=this.modelLineProjections[C].getViewLineCount();let E=!1,I=0,T=-1,F=0,R=-1,M=0,N=-1;f>L?(I=this.projectedModelLineLineCounts.getPrefixSum(d-1)+1,T=I+L-1,M=T+1,N=M+(f-L)-1,E=!0):f<L?(I=this.projectedModelLineLineCounts.getPrefixSum(d-1)+1,T=I+f-1,F=T+1,R=F+(L-f)-1,E=!0):(I=this.projectedModelLineLineCounts.getPrefixSum(d-1)+1,T=I+L-1),this.projectedModelLineLineCounts.setValue(C,L);const A=I<=T?new _.ViewLinesChangedEvent(I,T-I+1):null,P=F<=R?new _.ViewLinesInsertedEvent(F,R):null,x=M<=N?new _.ViewLinesDeletedEvent(M,N):null;return[E,A,P,x]}acceptVersionId(a){this._validModelVersionId=a,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(a){if(a<1)return 1;const d=this.getViewLineCount();return a>d?d:a|0}getActiveIndentGuide(a,d,u){a=this._toValidViewLineNumber(a),d=this._toValidViewLineNumber(d),u=this._toValidViewLineNumber(u);const C=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),f=this.convertViewPositionToModelPosition(d,this.getViewLineMinColumn(d)),v=this.convertViewPositionToModelPosition(u,this.getViewLineMinColumn(u)),p=this.model.guides.getActiveIndentGuide(C.lineNumber,f.lineNumber,v.lineNumber),L=this.convertModelPositionToViewPosition(p.startLineNumber,1),E=this.convertModelPositionToViewPosition(p.endLineNumber,this.model.getLineMaxColumn(p.endLineNumber));return{startLineNumber:L.lineNumber,endLineNumber:E.lineNumber,indent:p.indent}}getViewLineInfo(a){a=this._toValidViewLineNumber(a);const d=this.projectedModelLineLineCounts.getIndexOf(a-1),u=d.index,C=d.remainder;return new s(u+1,C)}getMinColumnOfViewLine(a){return this.modelLineProjections[a.modelLineNumber-1].getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(a){return this.modelLineProjections[a.modelLineNumber-1].getViewLineMaxColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(a){const d=this.modelLineProjections[a.modelLineNumber-1],u=d.getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx),C=d.getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,u);return new k.Position(a.modelLineNumber,C)}getModelEndPositionOfViewLine(a){const d=this.modelLineProjections[a.modelLineNumber-1],u=d.getViewLineMaxColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx),C=d.getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,u);return new k.Position(a.modelLineNumber,C)}getViewLineInfosGroupedByModelRanges(a,d){const u=this.getViewLineInfo(a),C=this.getViewLineInfo(d),f=new Array;let v=this.getModelStartPositionOfViewLine(u),p=new Array;for(let L=u.modelLineNumber;L<=C.modelLineNumber;L++){const E=this.modelLineProjections[L-1];if(E.isVisible()){const I=L===u.modelLineNumber?u.modelLineWrappedLineIdx:0,T=L===C.modelLineNumber?C.modelLineWrappedLineIdx+1:E.getViewLineCount();for(let F=I;F<T;F++)p.push(new s(L,F))}if(!E.isVisible()&&v){const I=new k.Position(L-1,this.model.getLineMaxColumn(L-1)+1),T=y.Range.fromPositions(v,I);f.push(new r(T,p)),p=[],v=null}else E.isVisible()&&!v&&(v=new k.Position(L,1))}if(v){const L=y.Range.fromPositions(v,this.getModelEndPositionOfViewLine(C));f.push(new r(L,p))}return f}getViewLinesBracketGuides(a,d,u,C){const f=u?this.convertViewPositionToModelPosition(u.lineNumber,u.column):null,v=[];for(const p of this.getViewLineInfosGroupedByModelRanges(a,d)){const L=p.modelRange.startLineNumber,E=this.model.guides.getLinesBracketGuides(L,p.modelRange.endLineNumber,f,C);for(const I of p.viewLines){const F=E[I.modelLineNumber-L].map(R=>{if(R.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.forWrappedLinesAfterColumn).lineNumber>=I.modelLineWrappedLineIdx||R.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.forWrappedLinesBeforeOrAtColumn).lineNumber<I.modelLineWrappedLineIdx)return;if(!R.horizontalLine)return R;let M=-1;if(R.column!==-1){const P=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.column);if(P.lineNumber===I.modelLineWrappedLineIdx)M=P.column;else if(P.lineNumber<I.modelLineWrappedLineIdx)M=this.getMinColumnOfViewLine(I);else if(P.lineNumber>I.modelLineWrappedLineIdx)return}const N=this.convertModelPositionToViewPosition(I.modelLineNumber,R.horizontalLine.endColumn),A=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.horizontalLine.endColumn);return A.lineNumber===I.modelLineWrappedLineIdx?new D.IndentGuide(R.visibleColumn,M,R.className,new D.IndentGuideHorizontalLine(R.horizontalLine.top,N.column),-1,-1):A.lineNumber<I.modelLineWrappedLineIdx||R.visibleColumn!==-1?void 0:new D.IndentGuide(R.visibleColumn,M,R.className,new D.IndentGuideHorizontalLine(R.horizontalLine.top,this.getMaxColumnOfViewLine(I)),-1,-1)});v.push(F.filter(R=>!!R))}}return v}getViewLinesIndentGuides(a,d){a=this._toValidViewLineNumber(a),d=this._toValidViewLineNumber(d);const u=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),C=this.convertViewPositionToModelPosition(d,this.getViewLineMaxColumn(d));let f=[];const v=[],p=[],L=u.lineNumber-1,E=C.lineNumber-1;let I=null;for(let M=L;M<=E;M++){const N=this.modelLineProjections[M];if(N.isVisible()){const A=N.getViewLineNumberOfModelPosition(0,M===L?u.column:1),P=N.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(M+1)),x=P-A+1;let W=0;x>1&&N.getViewLineMinColumn(this.model,M+1,P)===1&&(W=A===0?1:2),v.push(x),p.push(W),I===null&&(I=new k.Position(M+1,0))}else I!==null&&(f=f.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,M)),I=null)}I!==null&&(f=f.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,C.lineNumber)),I=null);const T=d-a+1,F=new Array(T);let R=0;for(let M=0,N=f.length;M<N;M++){let A=f[M];const P=Math.min(T-R,v[M]),x=p[M];let W;x===2?W=0:x===1?W=1:W=P;for(let U=0;U<P;U++)U===W&&(A=0),F[R++]=A}return F}getViewLineContent(a){const d=this.getViewLineInfo(a);return this.modelLineProjections[d.modelLineNumber-1].getViewLineContent(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLineLength(a){const d=this.getViewLineInfo(a);return this.modelLineProjections[d.modelLineNumber-1].getViewLineLength(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLineMinColumn(a){const d=this.getViewLineInfo(a);return this.modelLineProjections[d.modelLineNumber-1].getViewLineMinColumn(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLineMaxColumn(a){const d=this.getViewLineInfo(a);return this.modelLineProjections[d.modelLineNumber-1].getViewLineMaxColumn(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLineData(a){const d=this.getViewLineInfo(a);return this.modelLineProjections[d.modelLineNumber-1].getViewLineData(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLinesData(a,d,u){a=this._toValidViewLineNumber(a),d=this._toValidViewLineNumber(d);const C=this.projectedModelLineLineCounts.getIndexOf(a-1);let f=a;const v=C.index,p=C.remainder,L=[];for(let E=v,I=this.model.getLineCount();E<I;E++){const T=this.modelLineProjections[E];if(!T.isVisible())continue;const F=E===v?p:0;let R=T.getViewLineCount()-F,M=!1;if(f+R>d&&(M=!0,R=d-f+1),T.getViewLinesData(this.model,E+1,F,R,f-a,u,L),f+=R,M)break}return L}validateViewPosition(a,d,u){a=this._toValidViewLineNumber(a);const C=this.projectedModelLineLineCounts.getIndexOf(a-1),f=C.index,v=C.remainder,p=this.modelLineProjections[f],L=p.getViewLineMinColumn(this.model,f+1,v),E=p.getViewLineMaxColumn(this.model,f+1,v);d<L&&(d=L),d>E&&(d=E);const I=p.getModelColumnOfViewPosition(v,d);return this.model.validatePosition(new k.Position(f+1,I)).equals(u)?new k.Position(a,d):this.convertModelPositionToViewPosition(u.lineNumber,u.column)}validateViewRange(a,d){const u=this.validateViewPosition(a.startLineNumber,a.startColumn,d.getStartPosition()),C=this.validateViewPosition(a.endLineNumber,a.endColumn,d.getEndPosition());return new y.Range(u.lineNumber,u.column,C.lineNumber,C.column)}convertViewPositionToModelPosition(a,d){const u=this.getViewLineInfo(a),C=this.modelLineProjections[u.modelLineNumber-1].getModelColumnOfViewPosition(u.modelLineWrappedLineIdx,d);return this.model.validatePosition(new k.Position(u.modelLineNumber,C))}convertViewRangeToModelRange(a){const d=this.convertViewPositionToModelPosition(a.startLineNumber,a.startColumn),u=this.convertViewPositionToModelPosition(a.endLineNumber,a.endColumn);return new y.Range(d.lineNumber,d.column,u.lineNumber,u.column)}convertModelPositionToViewPosition(a,d,u=2){const C=this.model.validatePosition(new k.Position(a,d)),f=C.lineNumber,v=C.column;let p=f-1,L=!1;for(;p>0&&!this.modelLineProjections[p].isVisible();)p--,L=!0;if(p===0&&!this.modelLineProjections[p].isVisible())return new k.Position(1,1);const E=1+this.projectedModelLineLineCounts.getPrefixSum(p);let I;return L?I=this.modelLineProjections[p].getViewPositionOfModelPosition(E,this.model.getLineMaxColumn(p+1),u):I=this.modelLineProjections[f-1].getViewPositionOfModelPosition(E,v,u),I}convertModelRangeToViewRange(a,d=0){if(a.isEmpty()){const u=this.convertModelPositionToViewPosition(a.startLineNumber,a.startColumn,d);return y.Range.fromPositions(u)}else{const u=this.convertModelPositionToViewPosition(a.startLineNumber,a.startColumn,1),C=this.convertModelPositionToViewPosition(a.endLineNumber,a.endColumn,0);return new y.Range(u.lineNumber,u.column,C.lineNumber,C.column)}}getViewLineNumberOfModelPosition(a,d){let u=a-1;if(this.modelLineProjections[u].isVisible()){const f=1+this.projectedModelLineLineCounts.getPrefixSum(u);return this.modelLineProjections[u].getViewLineNumberOfModelPosition(f,d)}for(;u>0&&!this.modelLineProjections[u].isVisible();)u--;if(u===0&&!this.modelLineProjections[u].isVisible())return 1;const C=1+this.projectedModelLineLineCounts.getPrefixSum(u);return this.modelLineProjections[u].getViewLineNumberOfModelPosition(C,this.model.getLineMaxColumn(u+1))}getDecorationsInRange(a,d,u,C){const f=this.convertViewPositionToModelPosition(a.startLineNumber,a.startColumn),v=this.convertViewPositionToModelPosition(a.endLineNumber,a.endColumn);if(v.lineNumber-f.lineNumber<=a.endLineNumber-a.startLineNumber)return this.model.getDecorationsInRange(new y.Range(f.lineNumber,1,v.lineNumber,v.column),d,u,C);let p=[];const L=f.lineNumber-1,E=v.lineNumber-1;let I=null;for(let M=L;M<=E;M++)if(this.modelLineProjections[M].isVisible())I===null&&(I=new k.Position(M+1,M===L?f.column:1));else if(I!==null){const A=this.model.getLineMaxColumn(M);p=p.concat(this.model.getDecorationsInRange(new y.Range(I.lineNumber,I.column,M,A),d,u,C)),I=null}I!==null&&(p=p.concat(this.model.getDecorationsInRange(new y.Range(I.lineNumber,I.column,v.lineNumber,v.column),d,u,C)),I=null),p.sort((M,N)=>{const A=y.Range.compareRangesUsingStarts(M.range,N.range);return A===0?M.id<N.id?-1:M.id>N.id?1:0:A});const T=[];let F=0,R=null;for(const M of p){const N=M.id;R!==N&&(R=N,T[F++]=M)}return T}getInjectedTextAt(a){const d=this.getViewLineInfo(a.lineNumber);return this.modelLineProjections[d.modelLineNumber-1].getInjectedTextAt(d.modelLineWrappedLineIdx,a.column)}normalizePosition(a,d){const u=this.getViewLineInfo(a.lineNumber);return this.modelLineProjections[u.modelLineNumber-1].normalizePosition(u.modelLineWrappedLineIdx,a,d)}getLineIndentColumn(a){const d=this.getViewLineInfo(a);return d.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(d.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=t;function i(l){if(l.length===0)return[];const a=l.slice();a.sort(y.Range.compareRangesUsingStarts);const d=[];let u=a[0].startLineNumber,C=a[0].endLineNumber;for(let f=1,v=a.length;f<v;f++){const p=a[f];p.startLineNumber>C+1?(d.push(new y.Range(u,1,C,1)),u=p.startLineNumber,C=p.endLineNumber):p.endLineNumber>C&&(C=p.endLineNumber)}return d.push(new y.Range(u,1,C,1)),d}class s{constructor(a,d){this.modelLineNumber=a,this.modelLineWrappedLineIdx=d}}class r{constructor(a,d){this.modelRange=a,this.viewLines=d}}class c{constructor(a){this._lines=a}convertViewPositionToModelPosition(a){return this._lines.convertViewPositionToModelPosition(a.lineNumber,a.column)}convertViewRangeToModelRange(a){return this._lines.convertViewRangeToModelRange(a)}validateViewPosition(a,d){return this._lines.validateViewPosition(a.lineNumber,a.column,d)}validateViewRange(a,d){return this._lines.validateViewRange(a,d)}convertModelPositionToViewPosition(a,d){return this._lines.convertModelPositionToViewPosition(a.lineNumber,a.column,d)}convertModelRangeToViewRange(a,d){return this._lines.convertModelRangeToViewRange(a,d)}modelPositionIsVisible(a){return this._lines.modelPositionIsVisible(a.lineNumber,a.column)}getModelLineViewLineCount(a){return this._lines.getModelLineViewLineCount(a)}getViewLineNumberOfModelPosition(a,d){return this._lines.getViewLineNumberOfModelPosition(a,d)}}class g{constructor(a){this.model=a}dispose(){}createCoordinatesConverter(){return new o(this)}getHiddenAreas(){return[]}setHiddenAreas(a){return!1}setTabSize(a){return!1}setWrappingSettings(a,d,u,C){return!1}createLineBreaksComputer(){const a=[];return{addRequest:(d,u,C)=>{a.push(null)},finalize:()=>a}}onModelFlushed(){}onModelLinesDeleted(a,d,u){return new _.ViewLinesDeletedEvent(d,u)}onModelLinesInserted(a,d,u,C){return new _.ViewLinesInsertedEvent(d,u)}onModelLineChanged(a,d,u){return[!1,new _.ViewLinesChangedEvent(d,1),null,null]}acceptVersionId(a){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(a,d,u){return{startLineNumber:a,endLineNumber:a,indent:0}}getViewLinesBracketGuides(a,d,u){return new Array(d-a+1).fill([])}getViewLinesIndentGuides(a,d){const u=d-a+1,C=new Array(u);for(let f=0;f<u;f++)C[f]=0;return C}getViewLineContent(a){return this.model.getLineContent(a)}getViewLineLength(a){return this.model.getLineLength(a)}getViewLineMinColumn(a){return this.model.getLineMinColumn(a)}getViewLineMaxColumn(a){return this.model.getLineMaxColumn(a)}getViewLineData(a){const d=this.model.tokenization.getLineTokens(a),u=d.getLineContent();return new n.ViewLineData(u,!1,1,u.length+1,0,d.inflate(),null)}getViewLinesData(a,d,u){const C=this.model.getLineCount();a=Math.min(Math.max(1,a),C),d=Math.min(Math.max(1,d),C);const f=[];for(let v=a;v<=d;v++){const p=v-a;f[p]=u[p]?this.getViewLineData(v):null}return f}getDecorationsInRange(a,d,u,C){return this.model.getDecorationsInRange(a,d,u,C)}normalizePosition(a,d){return this.model.normalizePosition(a,d)}getLineIndentColumn(a){return this.model.getLineIndentColumn(a)}getInjectedTextAt(a){return null}}e.ViewModelLinesFromModelAsIs=g;class o{constructor(a){this._lines=a}_validPosition(a){return this._lines.model.validatePosition(a)}_validRange(a){return this._lines.model.validateRange(a)}convertViewPositionToModelPosition(a){return this._validPosition(a)}convertViewRangeToModelRange(a){return this._validRange(a)}validateViewPosition(a,d){return this._validPosition(d)}validateViewRange(a,d){return this._validRange(d)}convertModelPositionToViewPosition(a){return this._validPosition(a)}convertModelRangeToViewRange(a){return this._validRange(a)}modelPositionIsVisible(a){const d=this._lines.model.getLineCount();return!(a.lineNumber<1||a.lineNumber>d)}getModelLineViewLineCount(a){return 1}getViewLineNumberOfModelPosition(a,d){return a}}}),define(J[820],ee([1,0,16,12,37,2,17,9,40,725,65,13,5,105,26,72,296,197,565,298,81,302,219,819]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const f=!0;class v extends D.Disposable{constructor(M,N,A,P,x,W,U,O,$){if(super(),this.languageConfigurationService=U,this._themeService=O,this._attachedView=$,this.hiddenAreasModel=new E,this.previousHiddenAreas=[],this._editorId=M,this._configuration=N,this.model=A,this._eventDispatcher=new u.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new m.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new k.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=p.create(this.model),f&&this.model.isTooLargeForTokenization())this._lines=new C.ViewModelLinesFromModelAsIs(this.model);else{const Q=this._configuration.options,se=Q.get(48),le=Q.get(133),te=Q.get(140),re=Q.get(132),H=Q.get(124);this._lines=new C.ViewModelLinesFromProjectedModel(this._editorId,this.model,P,x,se,this.model.getOptions().tabSize,le,te.wrappingColumn,re,H)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new h.CursorsController(A,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new o.ViewLayout(this._configuration,this.getLineCount(),W)),this._register(this.viewLayout.onDidScroll(Q=>{Q.scrollTopChanged&&this._handleVisibleLinesChanged(),Q.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new g.ViewScrollChangedEvent(Q)),this._eventDispatcher.emitOutgoingEvent(new u.ScrollChangedEvent(Q.oldScrollWidth,Q.oldScrollLeft,Q.oldScrollHeight,Q.oldScrollTop,Q.scrollWidth,Q.scrollLeft,Q.scrollHeight,Q.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(Q=>{this._eventDispatcher.emitOutgoingEvent(Q)})),this._decorations=new d.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(Q=>{try{const se=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(se,Q)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(l.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new g.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(Q=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new g.ViewThemeChangedEvent(Q))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(M){this._eventDispatcher.addViewEventHandler(M)}removeViewEventHandler(M){this._eventDispatcher.removeViewEventHandler(M)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const M=this.viewLayout.getLinesViewportData(),N=new t.Range(M.startLineNumber,this.getLineMinColumn(M.startLineNumber),M.endLineNumber,this.getLineMaxColumn(M.endLineNumber));return this._toModelVisibleRanges(N)}visibleLinesStabilized(){const M=this.getModelVisibleRanges();this._attachedView.setVisibleLines(M,!0)}_handleVisibleLinesChanged(){const M=this.getModelVisibleRanges();this._attachedView.setVisibleLines(M,!1)}setHasFocus(M){this._hasFocus=M,this._cursor.setHasFocus(M),this._eventDispatcher.emitSingleViewEvent(new g.ViewFocusChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new u.FocusChangedEvent(!M,M))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new g.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new g.ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const M=new n.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),N=this.coordinatesConverter.convertViewPositionToModelPosition(M);return new F(N,this._viewportStart.startLineDelta)}return new F(null,0)}_onConfigurationChanged(M,N){const A=this._captureStableViewport(),P=this._configuration.options,x=P.get(48),W=P.get(133),U=P.get(140),O=P.get(132),$=P.get(124);this._lines.setWrappingSettings(x,W,U.wrappingColumn,O,$)&&(M.emitViewEvent(new g.ViewFlushedEvent),M.emitViewEvent(new g.ViewLineMappingChangedEvent),M.emitViewEvent(new g.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(M),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),N.hasChanged(87)&&(this._decorations.reset(),M.emitViewEvent(new g.ViewDecorationsChangedEvent(null))),M.emitViewEvent(new g.ViewConfigurationChangedEvent(N)),this.viewLayout.onConfigurationChanged(N),A.recoverViewportStart(this.coordinatesConverter,this.viewLayout),m.CursorConfiguration.shouldRecreate(N)&&(this.cursorConfig=new m.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(M=>{try{const A=this._eventDispatcher.beginEmitViewEvents();let P=!1,x=!1;const W=M instanceof i.InternalModelContentChangeEvent?M.rawContentChangedEvent.changes:M.changes,U=M instanceof i.InternalModelContentChangeEvent?M.rawContentChangedEvent.versionId:null,O=this._lines.createLineBreaksComputer();for(const se of W)switch(se.changeType){case 4:{for(let le=0;le<se.detail.length;le++){const te=se.detail[le];let re=se.injectedTexts[le];re&&(re=re.filter(H=>!H.ownerId||H.ownerId===this._editorId)),O.addRequest(te,re,null)}break}case 2:{let le=null;se.injectedText&&(le=se.injectedText.filter(te=>!te.ownerId||te.ownerId===this._editorId)),O.addRequest(se.detail,le,null);break}}const $=O.finalize(),Q=new S.ArrayQueue($);for(const se of W)switch(se.changeType){case 1:{this._lines.onModelFlushed(),A.emitViewEvent(new g.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),P=!0;break}case 3:{const le=this._lines.onModelLinesDeleted(U,se.fromLineNumber,se.toLineNumber);le!==null&&(A.emitViewEvent(le),this.viewLayout.onLinesDeleted(le.fromLineNumber,le.toLineNumber)),P=!0;break}case 4:{const le=Q.takeCount(se.detail.length),te=this._lines.onModelLinesInserted(U,se.fromLineNumber,se.toLineNumber,le);te!==null&&(A.emitViewEvent(te),this.viewLayout.onLinesInserted(te.fromLineNumber,te.toLineNumber)),P=!0;break}case 2:{const le=Q.dequeue(),[te,re,H,B]=this._lines.onModelLineChanged(U,se.lineNumber,le);x=te,re&&A.emitViewEvent(re),H&&(A.emitViewEvent(H),this.viewLayout.onLinesInserted(H.fromLineNumber,H.toLineNumber)),B&&(A.emitViewEvent(B),this.viewLayout.onLinesDeleted(B.fromLineNumber,B.toLineNumber));break}case 5:break}U!==null&&this._lines.acceptVersionId(U),this.viewLayout.onHeightMaybeChanged(),!P&&x&&(A.emitViewEvent(new g.ViewLineMappingChangedEvent),A.emitViewEvent(new g.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(A),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const N=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&N){const A=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(A){const P=this.coordinatesConverter.convertModelPositionToViewPosition(A.getStartPosition()),x=this.viewLayout.getVerticalOffsetForLineNumber(P.lineNumber);this.viewLayout.setScrollPosition({scrollTop:x+this._viewportStart.startLineDelta},1)}}try{const A=this._eventDispatcher.beginEmitViewEvents();M instanceof i.InternalModelContentChangeEvent&&A.emitOutgoingEvent(new u.ModelContentChangedEvent(M.contentChangedEvent)),this._cursor.onModelContentChanged(A,M)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(M=>{const N=[];for(let A=0,P=M.ranges.length;A<P;A++){const x=M.ranges[A],W=this.coordinatesConverter.convertModelPositionToViewPosition(new n.Position(x.fromLineNumber,1)).lineNumber,U=this.coordinatesConverter.convertModelPositionToViewPosition(new n.Position(x.toLineNumber,this.model.getLineMaxColumn(x.toLineNumber))).lineNumber;N[A]={fromLineNumber:W,toLineNumber:U}}this._eventDispatcher.emitSingleViewEvent(new g.ViewTokensChangedEvent(N)),this._eventDispatcher.emitOutgoingEvent(new u.ModelTokensChangedEvent(M))})),this._register(this.model.onDidChangeLanguageConfiguration(M=>{this._eventDispatcher.emitSingleViewEvent(new g.ViewLanguageConfigurationEvent),this.cursorConfig=new m.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new u.ModelLanguageConfigurationChangedEvent(M))})),this._register(this.model.onDidChangeLanguage(M=>{this.cursorConfig=new m.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new u.ModelLanguageChangedEvent(M))})),this._register(this.model.onDidChangeOptions(M=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const N=this._eventDispatcher.beginEmitViewEvents();N.emitViewEvent(new g.ViewFlushedEvent),N.emitViewEvent(new g.ViewLineMappingChangedEvent),N.emitViewEvent(new g.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new m.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new u.ModelOptionsChangedEvent(M))})),this._register(this.model.onDidChangeDecorations(M=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new g.ViewDecorationsChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new u.ModelDecorationsChangedEvent(M))}))}setHiddenAreas(M,N){this.hiddenAreasModel.setHiddenAreas(N,M);const A=this.hiddenAreasModel.getMergedRanges();if(A===this.previousHiddenAreas)return;this.previousHiddenAreas=A;const P=this._captureStableViewport();let x=!1;try{const W=this._eventDispatcher.beginEmitViewEvents();x=this._lines.setHiddenAreas(A),x&&(W.emitViewEvent(new g.ViewFlushedEvent),W.emitViewEvent(new g.ViewLineMappingChangedEvent),W.emitViewEvent(new g.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(W),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),P.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),x&&this._eventDispatcher.emitOutgoingEvent(new u.HiddenAreasChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const M=this._configuration.options.get(139),N=this._configuration.options.get(64),A=Math.max(20,Math.round(M.height/N)),P=this.viewLayout.getLinesViewportData(),x=Math.max(1,P.completelyVisibleStartLineNumber-A),W=Math.min(this.getLineCount(),P.completelyVisibleEndLineNumber+A);return this._toModelVisibleRanges(new t.Range(x,this.getLineMinColumn(x),W,this.getLineMaxColumn(W)))}getVisibleRanges(){const M=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(M)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(M){const N=this.coordinatesConverter.convertViewRangeToModelRange(M),A=this._lines.getHiddenAreas();if(A.length===0)return[N];const P=[];let x=0,W=N.startLineNumber,U=N.startColumn;const O=N.endLineNumber,$=N.endColumn;for(let Q=0,se=A.length;Q<se;Q++){const le=A[Q].startLineNumber,te=A[Q].endLineNumber;te<W||le>O||(W<le&&(P[x++]=new t.Range(W,U,le-1,this.model.getLineMaxColumn(le-1))),W=te+1,U=1)}return(W<O||W===O&&U<$)&&(P[x++]=new t.Range(W,U,O,$)),P}getCompletelyVisibleViewRange(){const M=this.viewLayout.getLinesViewportData(),N=M.completelyVisibleStartLineNumber,A=M.completelyVisibleEndLineNumber;return new t.Range(N,this.getLineMinColumn(N),A,this.getLineMaxColumn(A))}getCompletelyVisibleViewRangeAtScrollTop(M){const N=this.viewLayout.getLinesViewportDataAtScrollTop(M),A=N.completelyVisibleStartLineNumber,P=N.completelyVisibleEndLineNumber;return new t.Range(A,this.getLineMinColumn(A),P,this.getLineMaxColumn(P))}saveState(){const M=this.viewLayout.saveState(),N=M.scrollTop,A=this.viewLayout.getLineNumberAtVerticalOffset(N),P=this.coordinatesConverter.convertViewPositionToModelPosition(new n.Position(A,this.getLineMinColumn(A))),x=this.viewLayout.getVerticalOffsetForLineNumber(A)-N;return{scrollLeft:M.scrollLeft,firstPosition:P,firstPositionDeltaTop:x}}reduceRestoreState(M){if(typeof M.firstPosition>"u")return this._reduceRestoreStateCompatibility(M);const N=this.model.validatePosition(M.firstPosition),A=this.coordinatesConverter.convertModelPositionToViewPosition(N),P=this.viewLayout.getVerticalOffsetForLineNumber(A.lineNumber)-M.firstPositionDeltaTop;return{scrollLeft:M.scrollLeft,scrollTop:P}}_reduceRestoreStateCompatibility(M){return{scrollLeft:M.scrollLeft,scrollTop:M.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(M,N,A){this._viewportStart.update(this,M)}getActiveIndentGuide(M,N,A){return this._lines.getActiveIndentGuide(M,N,A)}getLinesIndentGuides(M,N){return this._lines.getViewLinesIndentGuides(M,N)}getBracketGuidesInRangeByLine(M,N,A,P){return this._lines.getViewLinesBracketGuides(M,N,A,P)}getLineContent(M){return this._lines.getViewLineContent(M)}getLineLength(M){return this._lines.getViewLineLength(M)}getLineMinColumn(M){return this._lines.getViewLineMinColumn(M)}getLineMaxColumn(M){return this._lines.getViewLineMaxColumn(M)}getLineFirstNonWhitespaceColumn(M){const N=b.firstNonWhitespaceIndex(this.getLineContent(M));return N===-1?0:N+1}getLineLastNonWhitespaceColumn(M){const N=b.lastNonWhitespaceIndex(this.getLineContent(M));return N===-1?0:N+2}getDecorationsInViewport(M,N=!1){return this._decorations.getDecorationsViewportData(M,N).decorations}getInjectedTextAt(M){return this._lines.getInjectedTextAt(M)}getViewportViewLineRenderingData(M,N){const P=this._decorations.getDecorationsViewportData(M).inlineDecorations[N-M.startLineNumber];return this._getViewLineRenderingData(N,P)}getViewLineRenderingData(M){const N=this._decorations.getInlineDecorationsOnLine(M);return this._getViewLineRenderingData(M,N)}_getViewLineRenderingData(M,N){const A=this.model.mightContainRTL(),P=this.model.mightContainNonBasicASCII(),x=this.getTabSize(),W=this._lines.getViewLineData(M);return W.inlineDecorations&&(N=[...N,...W.inlineDecorations.map(U=>U.toInlineDecoration(M))]),new a.ViewLineRenderingData(W.minColumn,W.maxColumn,W.content,W.continuesWithWrappedLine,A,P,W.tokens,N,x,W.startVisibleColumn)}getViewLineData(M){return this._lines.getViewLineData(M)}getMinimapLinesRenderingData(M,N,A){const P=this._lines.getViewLinesData(M,N,A);return new a.MinimapLinesRenderingData(this.getTabSize(),P)}getAllOverviewRulerDecorations(M){const N=this.model.getOverviewRulerDecorations(this._editorId,(0,_.filterValidationDecorations)(this._configuration.options)),A=new L;for(const P of N){const x=P.options,W=x.overviewRuler;if(!W)continue;const U=W.position;if(U===0)continue;const O=W.getColor(M.value),$=this.coordinatesConverter.getViewLineNumberOfModelPosition(P.range.startLineNumber,P.range.startColumn),Q=this.coordinatesConverter.getViewLineNumberOfModelPosition(P.range.endLineNumber,P.range.endColumn);A.accept(O,x.zIndex,$,Q,U)}return A.asArray}_invalidateDecorationsColorCache(){const M=this.model.getOverviewRulerDecorations();for(const N of M){const A=N.options.overviewRuler;A?.invalidateCachedColor();const P=N.options.minimap;P?.invalidateCachedColor()}}getValueInRange(M,N){const A=this.coordinatesConverter.convertViewRangeToModelRange(M);return this.model.getValueInRange(A,N)}getValueLengthInRange(M,N){const A=this.coordinatesConverter.convertViewRangeToModelRange(M);return this.model.getValueLengthInRange(A,N)}modifyPosition(M,N){const A=this.coordinatesConverter.convertViewPositionToModelPosition(M);return this.model.modifyPosition(A,N)}deduceModelPositionRelativeToViewPosition(M,N,A){const P=this.coordinatesConverter.convertViewPositionToModelPosition(M);this.model.getEOL().length===2&&(N<0?N-=A:N+=A);const W=this.model.getOffsetAt(P)+N;return this.model.getPositionAt(W)}getPlainTextToCopy(M,N,A){const P=A?`\\r\n`:this.model.getEOL();M=M.slice(0),M.sort(t.Range.compareRangesUsingStarts);let x=!1,W=!1;for(const O of M)O.isEmpty()?x=!0:W=!0;if(!W){if(!N)return"";const O=M.map(Q=>Q.startLineNumber);let $="";for(let Q=0;Q<O.length;Q++)Q>0&&O[Q-1]===O[Q]||($+=this.model.getLineContent(O[Q])+P);return $}if(x&&N){const O=[];let $=0;for(const Q of M){const se=Q.startLineNumber;Q.isEmpty()?se!==$&&O.push(this.model.getLineContent(se)):O.push(this.model.getValueInRange(Q,A?2:0)),$=se}return O.length===1?O[0]:O}const U=[];for(const O of M)O.isEmpty()||U.push(this.model.getValueInRange(O,A?2:0));return U.length===1?U[0]:U}getRichTextToCopy(M,N){const A=this.model.getLanguageId();if(A===r.PLAINTEXT_LANGUAGE_ID||M.length!==1)return null;let P=M[0];if(P.isEmpty()){if(!N)return null;const Q=P.startLineNumber;P=new t.Range(Q,this.model.getLineMinColumn(Q),Q,this.model.getLineMaxColumn(Q))}const x=this._configuration.options.get(48),W=this._getColorMap(),O=/[:;\\\\\\/<>]/.test(x.fontFamily)||x.fontFamily===_.EDITOR_FONT_DEFAULTS.fontFamily;let $;return O?$=_.EDITOR_FONT_DEFAULTS.fontFamily:($=x.fontFamily,$=$.replace(/"/g,"\'"),/[,\']/.test($)||/[+ ]/.test($)&&($=`\'${$}\'`),$=`${$}, ${_.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:A,html:`<div style="color: ${W[1]};background-color: ${W[2]};font-family: ${$};font-weight: ${x.fontWeight};font-size: ${x.fontSize}px;line-height: ${x.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(P,W)+"</div>"}}_getHTMLToCopy(M,N){const A=M.startLineNumber,P=M.startColumn,x=M.endLineNumber,W=M.endColumn,U=this.getTabSize();let O="";for(let $=A;$<=x;$++){const Q=this.model.tokenization.getLineTokens($),se=Q.getLineContent(),le=$===A?P-1:0,te=$===x?W-1:se.length;se===""?O+="<br>":O+=(0,c.tokenizeLineToHTML)(se,Q.inflate(),N,le,te,U,w.isWindows)}return O}_getColorMap(){const M=s.TokenizationRegistry.getColorMap(),N=["#000000"];if(M)for(let A=1,P=M.length;A<P;A++)N[A]=y.Color.Format.CSS.formatHex(M[A]);return N}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(M,N,A){return this._withViewEventsCollector(P=>this._cursor.setStates(P,M,N,A))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(M){this._cursor.setCursorColumnSelectData(M)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(M){this._cursor.setPrevEditOperationType(M)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(M,N,A=0){this._withViewEventsCollector(P=>this._cursor.setSelections(P,M,N,A))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(M){this._withViewEventsCollector(N=>this._cursor.restoreState(N,M))}_executeCursorEdit(M){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new u.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(M)}executeEdits(M,N,A){this._executeCursorEdit(P=>this._cursor.executeEdits(P,M,N,A))}startComposition(){this._executeCursorEdit(M=>this._cursor.startComposition(M))}endComposition(M){this._executeCursorEdit(N=>this._cursor.endComposition(N,M))}type(M,N){this._executeCursorEdit(A=>this._cursor.type(A,M,N))}compositionType(M,N,A,P,x){this._executeCursorEdit(W=>this._cursor.compositionType(W,M,N,A,P,x))}paste(M,N,A,P){this._executeCursorEdit(x=>this._cursor.paste(x,M,N,A,P))}cut(M){this._executeCursorEdit(N=>this._cursor.cut(N,M))}executeCommand(M,N){this._executeCursorEdit(A=>this._cursor.executeCommand(A,M,N))}executeCommands(M,N){this._executeCursorEdit(A=>this._cursor.executeCommands(A,M,N))}revealPrimaryCursor(M,N,A=!1){this._withViewEventsCollector(P=>this._cursor.revealPrimary(P,M,A,0,N,0))}revealTopMostCursor(M){const N=this._cursor.getTopMostViewPosition(),A=new t.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(P=>P.emitViewEvent(new g.ViewRevealRangeRequestEvent(M,!1,A,null,0,!0,0)))}revealBottomMostCursor(M){const N=this._cursor.getBottomMostViewPosition(),A=new t.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(P=>P.emitViewEvent(new g.ViewRevealRangeRequestEvent(M,!1,A,null,0,!0,0)))}revealRange(M,N,A,P,x){this._withViewEventsCollector(W=>W.emitViewEvent(new g.ViewRevealRangeRequestEvent(M,!1,A,null,P,N,x)))}changeWhitespace(M){this.viewLayout.changeWhitespace(M)&&(this._eventDispatcher.emitSingleViewEvent(new g.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new u.ViewZonesChangedEvent))}_withViewEventsCollector(M){try{const N=this._eventDispatcher.beginEmitViewEvents();return M(N)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(M,N){return this._lines.normalizePosition(M,N)}getLineIndentColumn(M){return this._lines.getLineIndentColumn(M)}}e.ViewModel=v;class p{static create(M){const N=M._setTrackedRange(null,new t.Range(1,1,1,1),1);return new p(M,1,!1,N,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(M,N,A,P,x){this._model=M,this._viewLineNumber=N,this._isValid=A,this._modelTrackedRange=P,this._startLineDelta=x}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(M,N){const A=M.coordinatesConverter.convertViewPositionToModelPosition(new n.Position(N,M.getLineMinColumn(N))),P=M.model._setTrackedRange(this._modelTrackedRange,new t.Range(A.lineNumber,A.column,A.lineNumber,A.column),1),x=M.viewLayout.getVerticalOffsetForLineNumber(N),W=M.viewLayout.getCurrentScrollTop();this._viewLineNumber=N,this._isValid=!0,this._modelTrackedRange=P,this._startLineDelta=W-x}invalidate(){this._isValid=!1}}class L{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(M,N,A,P,x){const W=this._asMap[M];if(W){const U=W.data,O=U[U.length-3],$=U[U.length-1];if(O===x&&$+1>=A){P>$&&(U[U.length-1]=P);return}U.push(x,A,P)}else{const U=new a.OverviewRulerDecorationsGroup(M,N,[x,A,P]);this._asMap[M]=U,this.asArray.push(U)}}}class E{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(M,N){const A=this.hiddenAreas.get(M);A&&T(A,N)||(this.hiddenAreas.set(M,N),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const M=Array.from(this.hiddenAreas.values()).reduce((N,A)=>I(N,A),[]);return T(this.ranges,M)?this.ranges:(this.ranges=M,this.ranges)}}function I(R,M){const N=[];let A=0,P=0;for(;A<R.length&&P<M.length;){const x=R[A],W=M[P];if(x.endLineNumber<W.startLineNumber-1)N.push(R[A++]);else if(W.endLineNumber<x.startLineNumber-1)N.push(M[P++]);else{const U=Math.min(x.startLineNumber,W.startLineNumber),O=Math.max(x.endLineNumber,W.endLineNumber);N.push(new t.Range(U,1,O,1)),A++,P++}}for(;A<R.length;)N.push(R[A++]);for(;P<M.length;)N.push(M[P++]);return N}function T(R,M){if(R.length!==M.length)return!1;for(let N=0;N<R.length;N++)if(!R[N].equalsRange(M[N]))return!1;return!0}class F{constructor(M,N){this.viewportStartModelPosition=M,this.startLineDelta=N}recoverViewportStart(M,N){if(!this.viewportStartModelPosition)return;const A=M.convertModelPositionToViewPosition(this.viewportStartModelPosition),P=N.getVerticalOffsetForLineNumber(A.lineNumber);N.setScrollPosition({scrollTop:P+this.startLineDelta},1)}}}),define(J[183],ee([1,0,572,7,11,6,2,49,703,15,30,799,250,40,75,13,5,23,255,166,22,39,73,31,820,25,14,8,178,43,24,88,18,497,552,168,33,74,19,551,215,739,402]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T,F,R,M,N,A,P,x,W,U,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let $=0;class Q{constructor(z,V,K,ie,X,Z){this.model=z,this.viewModel=V,this.view=K,this.hasRealView=ie,this.listenersToRemove=X,this.attachedView=Z}dispose(){(0,w.dispose)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let se=class Pt extends w.Disposable{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(z,V,K,ie,X,Z,ue,me,Ce,_e,we,ye){super(),this.languageConfigurationService=we,this._deliveryQueue=new D.EventDeliveryQueue,this._contributions=this._register(new U.CodeEditorContributions),this._onDidDispose=this._register(new D.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new te(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new le({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new le({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new te(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new te(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new te(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new te(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new te(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new te(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new te(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new te(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new te(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new te(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new te(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new te(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new te(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new te(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new te(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new te(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new te(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),X.willCreateCodeEditor();const ke=Object.assign({},V);this._domElement=z,this._overflowWidgetsDomNode=ke.overflowWidgetsDomNode,delete ke.overflowWidgetsDomNode,this._id=++$,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=K.telemetryData,this._configuration=this._register(this._createConfiguration(K.isSimpleWidget||!1,ke,_e)),this._register(this._configuration.onDidChange(pe=>{this._onDidChangeConfiguration.fire(pe);const ae=this._configuration.options;if(pe.hasChanged(139)){const ve=ae.get(139);this._onDidLayoutChange.fire(ve)}})),this._contextKeyService=this._register(ue.createScoped(this._domElement)),this._notificationService=Ce,this._codeEditorService=X,this._commandService=Z,this._themeService=me,this._register(new re(this,this._contextKeyService)),this._register(new H(this,this._contextKeyService,ye)),this._instantiationService=ie.createChild(new E.ServiceCollection([p.IContextKeyService,this._contextKeyService])),this._modelData=null,this._focusTracker=new B(z),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let De;Array.isArray(K.contributions)?De=K.contributions:De=h.EditorExtensionsRegistry.getEditorContributions(),this._contributions.initialize(this,De,this._instantiationService);for(const pe of h.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(pe.id)){(0,y.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${pe.id}`));continue}const ae=new o.InternalEditorAction(pe.id,pe.label,pe.alias,(0,R.withNullAsUndefined)(pe.precondition),()=>this._instantiationService.invokeFunction(ve=>Promise.resolve(pe.runEditorCommand(ve,this,null))),this._contextKeyService);this._actions.set(ae.id,ae)}const ge=()=>!this._configuration.options.get(87)&&this._configuration.options.get(34).enabled;this._register(new k.DragAndDropObserver(this._domElement,{onDragEnter:()=>{},onDragOver:pe=>{if(!ge())return;const ae=this.getTargetAtClientPoint(pe.clientX,pe.clientY);ae?.position&&this.showDropIndicatorAt(ae.position)},onDrop:pe=>Ee(this,void 0,void 0,function*(){if(!ge()||(this.removeDropIndicator(),!pe.dataTransfer))return;const ae=this.getTargetAtClientPoint(pe.clientX,pe.clientY);ae?.position&&this._onDropIntoEditor.fire({position:ae.position,event:pe})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(z){var V;(V=this._modelData)===null||V===void 0||V.view.writeScreenReaderContent(z)}_createConfiguration(z,V,K){return new _.EditorConfiguration(z,V,this._domElement,K)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return l.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(z){return this._instantiationService.invokeFunction(z)}updateOptions(z){this._configuration.updateOptions(z||{})}getOptions(){return this._configuration.options}getOption(z){return this._configuration.options.get(z)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(z){return this._modelData?A.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(125),z):null}getValue(z=null){if(!this._modelData)return"";const V=!!(z&&z.preserveBOM);let K=0;return z&&z.lineEnding&&z.lineEnding===`\n`?K=1:z&&z.lineEnding&&z.lineEnding===`\\r\n`&&(K=2),this._modelData.model.getValue(K,V)}setValue(z){this._modelData&&this._modelData.model.setValue(z)}getModel(){return this._modelData?this._modelData.model:null}setModel(z=null){const V=z;if(this._modelData===null&&V===null||this._modelData&&this._modelData.model===V)return;const K=this.hasTextFocus(),ie=this._detachModel();this._attachModel(V),K&&this.hasModel()&&this.focus();const X={oldModelUrl:ie?ie.uri:null,newModelUrl:V?V.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(X),this._postDetachModelCleanup(ie),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const z in this._decorationTypeSubtypes){const V=this._decorationTypeSubtypes[z];for(const K in V)this._removeDecorationType(z+"-"+K)}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 _getVerticalOffsetAfterPosition(z,V,K,ie){const X=z.model.validatePosition({lineNumber:V,column:K}),Z=z.viewModel.coordinatesConverter.convertModelPositionToViewPosition(X);return z.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(Z.lineNumber,ie)}getTopForLineNumber(z,V=!1){return this._modelData?Pt._getVerticalOffsetForPosition(this._modelData,z,1,V):-1}getTopForPosition(z,V){return this._modelData?Pt._getVerticalOffsetForPosition(this._modelData,z,V,!1):-1}static _getVerticalOffsetForPosition(z,V,K,ie=!1){const X=z.model.validatePosition({lineNumber:V,column:K}),Z=z.viewModel.coordinatesConverter.convertModelPositionToViewPosition(X);return z.viewModel.viewLayout.getVerticalOffsetForLineNumber(Z.lineNumber,ie)}getBottomForLineNumber(z,V=!1){return this._modelData?Pt._getVerticalOffsetAfterPosition(this._modelData,z,1,V):-1}setHiddenAreas(z,V){var K;(K=this._modelData)===null||K===void 0||K.viewModel.setHiddenAreas(z.map(ie=>c.Range.lift(ie)),V)}getVisibleColumnFromPosition(z){if(!this._modelData)return z.column;const V=this._modelData.model.validatePosition(z),K=this._modelData.model.getOptions().tabSize;return s.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(V.lineNumber),V.column,K)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(z,V="api"){if(this._modelData){if(!r.Position.isIPosition(z))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(V,[{selectionStartLineNumber:z.lineNumber,selectionStartColumn:z.column,positionLineNumber:z.lineNumber,positionColumn:z.column}])}}_sendRevealRange(z,V,K,ie){if(!this._modelData)return;if(!c.Range.isIRange(z))throw new Error("Invalid arguments");const X=this._modelData.model.validateRange(z),Z=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(X);this._modelData.viewModel.revealRange("api",K,Z,V,ie)}revealLine(z,V=0){this._revealLine(z,0,V)}revealLineInCenter(z,V=0){this._revealLine(z,1,V)}revealLineInCenterIfOutsideViewport(z,V=0){this._revealLine(z,2,V)}revealLineNearTop(z,V=0){this._revealLine(z,5,V)}_revealLine(z,V,K){if(typeof z!="number")throw new Error("Invalid arguments");this._sendRevealRange(new c.Range(z,1,z,1),V,!1,K)}revealPosition(z,V=0){this._revealPosition(z,0,!0,V)}revealPositionInCenter(z,V=0){this._revealPosition(z,1,!0,V)}revealPositionInCenterIfOutsideViewport(z,V=0){this._revealPosition(z,2,!0,V)}revealPositionNearTop(z,V=0){this._revealPosition(z,5,!0,V)}_revealPosition(z,V,K,ie){if(!r.Position.isIPosition(z))throw new Error("Invalid arguments");this._sendRevealRange(new c.Range(z.lineNumber,z.column,z.lineNumber,z.column),V,K,ie)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(z,V="api"){const K=g.Selection.isISelection(z),ie=c.Range.isIRange(z);if(!K&&!ie)throw new Error("Invalid arguments");if(K)this._setSelectionImpl(z,V);else if(ie){const X={selectionStartLineNumber:z.startLineNumber,selectionStartColumn:z.startColumn,positionLineNumber:z.endLineNumber,positionColumn:z.endColumn};this._setSelectionImpl(X,V)}}_setSelectionImpl(z,V){if(!this._modelData)return;const K=new g.Selection(z.selectionStartLineNumber,z.selectionStartColumn,z.positionLineNumber,z.positionColumn);this._modelData.viewModel.setSelections(V,[K])}revealLines(z,V,K=0){this._revealLines(z,V,0,K)}revealLinesInCenter(z,V,K=0){this._revealLines(z,V,1,K)}revealLinesInCenterIfOutsideViewport(z,V,K=0){this._revealLines(z,V,2,K)}revealLinesNearTop(z,V,K=0){this._revealLines(z,V,5,K)}_revealLines(z,V,K,ie){if(typeof z!="number"||typeof V!="number")throw new Error("Invalid arguments");this._sendRevealRange(new c.Range(z,1,V,1),K,!1,ie)}revealRange(z,V=0,K=!1,ie=!0){this._revealRange(z,K?1:0,ie,V)}revealRangeInCenter(z,V=0){this._revealRange(z,1,!0,V)}revealRangeInCenterIfOutsideViewport(z,V=0){this._revealRange(z,2,!0,V)}revealRangeNearTop(z,V=0){this._revealRange(z,5,!0,V)}revealRangeNearTopIfOutsideViewport(z,V=0){this._revealRange(z,6,!0,V)}revealRangeAtTop(z,V=0){this._revealRange(z,3,!0,V)}_revealRange(z,V,K,ie){if(!c.Range.isIRange(z))throw new Error("Invalid arguments");this._sendRevealRange(c.Range.lift(z),V,K,ie)}setSelections(z,V="api",K=0){if(this._modelData){if(!z||z.length===0)throw new Error("Invalid arguments");for(let ie=0,X=z.length;ie<X;ie++)if(!g.Selection.isISelection(z[ie]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(V,z,K)}}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(z,V=1){if(this._modelData){if(typeof z!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:z},V)}}setScrollTop(z,V=1){if(this._modelData){if(typeof z!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:z},V)}}setScrollPosition(z,V=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(z,V)}saveViewState(){if(!this._modelData)return null;const z=this._contributions.saveViewState(),V=this._modelData.viewModel.saveCursorState(),K=this._modelData.viewModel.saveState();return{cursorState:V,viewState:K,contributionsState:z}}restoreViewState(z){if(!this._modelData||!this._modelData.hasRealView)return;const V=z;if(V&&V.cursorState&&V.viewState){const K=V.cursorState;Array.isArray(K)?K.length>0&&this._modelData.viewModel.restoreCursorState(K):this._modelData.viewModel.restoreCursorState([K]),this._contributions.restoreViewState(V.contributionsState||{});const ie=this._modelData.viewModel.reduceRestoreState(V.viewState);this._modelData.view.restoreState(ie)}}getContribution(z){return this._contributions.get(z)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let z=this.getActions();return z=z.filter(V=>V.isSupported()),z}getAction(z){return this._actions.get(z)||null}trigger(z,V,K){switch(K=K||{},V){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(z);return;case"type":{const X=K;this._type(z,X.text||"");return}case"replacePreviousChar":{const X=K;this._compositionType(z,X.text||"",X.replaceCharCnt||0,0,0);return}case"compositionType":{const X=K;this._compositionType(z,X.text||"",X.replacePrevCharCnt||0,X.replaceNextCharCnt||0,X.positionDelta||0);return}case"paste":{const X=K;this._paste(z,X.text||"",X.pasteOnNewLine||!1,X.multicursorText||null,X.mode||null);return}case"cut":this._cut(z);return}const ie=this.getAction(V);if(ie){Promise.resolve(ie.run(K)).then(void 0,y.onUnexpectedError);return}this._modelData&&(this._triggerEditorCommand(z,V,K)||this._triggerCommand(V,K))}_triggerCommand(z,V){this._commandService.executeCommand(z,V)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(z){this._modelData&&(this._modelData.viewModel.endComposition(z),this._onDidCompositionEnd.fire())}_type(z,V){!this._modelData||V.length===0||(z==="keyboard"&&this._onWillType.fire(V),this._modelData.viewModel.type(V,z),z==="keyboard"&&this._onDidType.fire(V))}_compositionType(z,V,K,ie,X){this._modelData&&this._modelData.viewModel.compositionType(V,K,ie,X,z)}_paste(z,V,K,ie,X){if(!this._modelData||V.length===0)return;const Z=this._modelData.viewModel,ue=Z.getSelection().getStartPosition();Z.paste(V,K,ie,z);const me=Z.getSelection().getStartPosition();z==="keyboard"&&this._onDidPaste.fire({range:new c.Range(ue.lineNumber,ue.column,me.lineNumber,me.column),languageId:X})}_cut(z){this._modelData&&this._modelData.viewModel.cut(z)}_triggerEditorCommand(z,V,K){const ie=h.EditorExtensionsRegistry.getEditorCommand(V);return ie?(K=K||{},K.source=z,this._instantiationService.invokeFunction(X=>{Promise.resolve(ie.runEditorCommand(X,this,K)).then(void 0,y.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(87)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(87)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(z,V,K){if(!this._modelData||this._configuration.options.get(87))return!1;let ie;return K?Array.isArray(K)?ie=()=>K:ie=K:ie=()=>null,this._modelData.viewModel.executeEdits(z,V,ie),!0}executeCommand(z,V){this._modelData&&this._modelData.viewModel.executeCommand(V,z)}executeCommands(z,V){this._modelData&&this._modelData.viewModel.executeCommands(V,z)}createDecorationsCollection(z){return new j(this,z)}changeDecorations(z){return this._modelData?this._modelData.model.changeDecorations(z,this._id):null}getLineDecorations(z){return this._modelData?this._modelData.model.getLineDecorations(z,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(z){return this._modelData?this._modelData.model.getDecorationsInRange(z,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(z,V){return this._modelData?z.length===0&&V.length===0?z:this._modelData.model.deltaDecorations(z,V,this._id):[]}removeDecorations(z){!this._modelData||z.length===0||this._modelData.model.changeDecorations(V=>{V.deltaDecorations(z,[])})}removeDecorationsByType(z){const V=this._decorationTypeKeysToIds[z];V&&this.deltaDecorations(V,[]),this._decorationTypeKeysToIds.hasOwnProperty(z)&&delete this._decorationTypeKeysToIds[z],this._decorationTypeSubtypes.hasOwnProperty(z)&&delete this._decorationTypeSubtypes[z]}getLayoutInfo(){return this._configuration.options.get(139)}createOverviewRuler(z){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(z)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(z){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(z)}delegateScrollFromMouseWheelEvent(z){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(z)}layout(z){this._configuration.observeContainer(z),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(z){const V={widget:z,position:z.getPosition()};this._contentWidgets.hasOwnProperty(z.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[z.getId()]=V,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(V)}layoutContentWidget(z){const V=z.getId();if(this._contentWidgets.hasOwnProperty(V)){const K=this._contentWidgets[V];K.position=z.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(K)}}removeContentWidget(z){const V=z.getId();if(this._contentWidgets.hasOwnProperty(V)){const K=this._contentWidgets[V];delete this._contentWidgets[V],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(K)}}addOverlayWidget(z){const V={widget:z,position:z.getPosition()};this._overlayWidgets.hasOwnProperty(z.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[z.getId()]=V,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(V)}layoutOverlayWidget(z){const V=z.getId();if(this._overlayWidgets.hasOwnProperty(V)){const K=this._overlayWidgets[V];K.position=z.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(K)}}removeOverlayWidget(z){const V=z.getId();if(this._overlayWidgets.hasOwnProperty(V)){const K=this._overlayWidgets[V];delete this._overlayWidgets[V],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(K)}}changeViewZones(z){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(z)}getTargetAtClientPoint(z,V){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(z,V)}getScrolledVisiblePosition(z){if(!this._modelData||!this._modelData.hasRealView)return null;const V=this._modelData.model.validatePosition(z),K=this._configuration.options,ie=K.get(139),X=Pt._getVerticalOffsetForPosition(this._modelData,V.lineNumber,V.column)-this.getScrollTop(),Z=this._modelData.view.getOffsetForColumn(V.lineNumber,V.column)+ie.glyphMarginWidth+ie.lineNumbersWidth+ie.decorationsWidth-this.getScrollLeft();return{top:X,left:Z,height:K.get(64)}}getOffsetForColumn(z,V){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(z,V)}render(z=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,z)}setAriaOptions(z){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(z)}applyFontInfo(z){(0,x.applyFontInfo)(z,this._configuration.options.get(48))}setBanner(z,V){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=z,this._configuration.setReservedHeight(z?V:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(z){if(!z){this._modelData=null;return}const V=[];this._domElement.setAttribute("data-mode-id",z.getLanguageId()),this._configuration.setIsDominatedByLongLines(z.isDominatedByLongLines()),this._configuration.setModelLineCount(z.getLineCount());const K=z.onBeforeAttached(),ie=new f.ViewModel(this._id,this._configuration,z,N.DOMLineBreaksComputerFactory.create(),M.MonospaceLineBreaksComputerFactory.create(this._configuration.options),ue=>k.scheduleAtNextAnimationFrame(ue),this.languageConfigurationService,this._themeService,K);V.push(z.onWillDispose(()=>this.setModel(null))),V.push(ie.onEvent(ue=>{switch(ue.kind){case 0:this._onDidContentSizeChange.fire(ue);break;case 1:this._editorTextFocus.setValue(ue.hasFocus);break;case 2:this._onDidScrollChange.fire(ue);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(ue.reachedMaxCursorCount){const we=this.getOption(77),ye=S.localize(0,null,we);this._notificationService.prompt(I.Severity.Warning,ye,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:S.localize(1,null),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const me=[];for(let we=0,ye=ue.selections.length;we<ye;we++)me[we]=ue.selections[we].getPosition();const Ce={position:me[0],secondaryPositions:me.slice(1),reason:ue.reason,source:ue.source};this._onDidChangeCursorPosition.fire(Ce);const _e={selection:ue.selections[0],secondarySelections:ue.selections.slice(1),modelVersionId:ue.modelVersionId,oldSelections:ue.oldSelections,oldModelVersionId:ue.oldModelVersionId,source:ue.source,reason:ue.reason};this._onDidChangeCursorSelection.fire(_e);break}case 7:this._onDidChangeModelDecorations.fire(ue.event);break;case 8:this._domElement.setAttribute("data-mode-id",z.getLanguageId()),this._onDidChangeModelLanguage.fire(ue.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(ue.event);break;case 10:this._onDidChangeModelContent.fire(ue.event);break;case 11:this._onDidChangeModelOptions.fire(ue.event);break;case 12:this._onDidChangeModelTokens.fire(ue.event);break}}));const[X,Z]=this._createView(ie);if(Z){this._domElement.appendChild(X.domNode.domNode);let ue=Object.keys(this._contentWidgets);for(let me=0,Ce=ue.length;me<Ce;me++){const _e=ue[me];X.addContentWidget(this._contentWidgets[_e])}ue=Object.keys(this._overlayWidgets);for(let me=0,Ce=ue.length;me<Ce;me++){const _e=ue[me];X.addOverlayWidget(this._overlayWidgets[_e])}X.render(!1,!0),X.domNode.domNode.setAttribute("data-uri",z.uri.toString())}this._modelData=new Q(z,ie,X,Z,V,K)}_createView(z){let V;this.isSimpleWidget?V={paste:(X,Z,ue,me)=>{this._paste("keyboard",X,Z,ue,me)},type:X=>{this._type("keyboard",X)},compositionType:(X,Z,ue,me)=>{this._compositionType("keyboard",X,Z,ue,me)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:V={paste:(X,Z,ue,me)=>{const Ce={text:X,pasteOnNewLine:Z,multicursorText:ue,mode:me};this._commandService.executeCommand("paste",Ce)},type:X=>{const Z={text:X};this._commandService.executeCommand("type",Z)},compositionType:(X,Z,ue,me)=>{if(ue||me){const Ce={text:X,replacePrevCharCnt:Z,replaceNextCharCnt:ue,positionDelta:me};this._commandService.executeCommand("compositionType",Ce)}else{const Ce={text:X,replaceCharCnt:Z};this._commandService.executeCommand("replacePreviousChar",Ce)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const K=new t.ViewUserInputEvents(z.coordinatesConverter);return K.onKeyDown=X=>this._onKeyDown.fire(X),K.onKeyUp=X=>this._onKeyUp.fire(X),K.onContextMenu=X=>this._onContextMenu.fire(X),K.onMouseMove=X=>this._onMouseMove.fire(X),K.onMouseLeave=X=>this._onMouseLeave.fire(X),K.onMouseDown=X=>this._onMouseDown.fire(X),K.onMouseUp=X=>this._onMouseUp.fire(X),K.onMouseDrag=X=>this._onMouseDrag.fire(X),K.onMouseDrop=X=>this._onMouseDrop.fire(X),K.onMouseDropCanceled=X=>this._onMouseDropCanceled.fire(X),K.onMouseWheel=X=>this._onMouseWheel.fire(X),[new n.View(V,this._configuration,this._themeService.getColorTheme(),z,K,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(z){z?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const z=this._modelData.model,V=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),V&&this._domElement.contains(V)&&this._domElement.removeChild(V),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),z}_removeDecorationType(z){this._codeEditorService.removeDecorationType(z)}hasModel(){return this._modelData!==null}showDropIndicatorAt(z){const V=[{range:new c.Range(z.lineNumber,z.column,z.lineNumber,z.column),options:Pt.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(V),this.revealPosition(z,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}};se.dropIntoEditorDecorationOptions=d.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"}),se=Ne([fe(3,L.IInstantiationService),fe(4,m.ICodeEditorService),fe(5,v.ICommandService),fe(6,p.IContextKeyService),fe(7,T.IThemeService),fe(8,I.INotificationService),fe(9,F.IAccessibilityService),fe(10,P.ILanguageConfigurationService),fe(11,W.ILanguageFeaturesService)],se),e.CodeEditorWidget=se;class le extends w.Disposable{constructor(z){super(),this._emitterOptions=z,this._onDidChangeToTrue=this._register(new D.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new D.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(z){const V=z?2:1;this._value!==V&&(this._value=V,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=le;class te extends D.Emitter{constructor(z,V){super({deliveryQueue:V}),this._contributions=z}fire(z){this._contributions.onBeforeInteractionEvent(),super.fire(z)}}class re extends w.Disposable{constructor(z,V){super(),this._editor=z,V.createKey("editorId",z.getId()),this._editorSimpleInput=a.EditorContextKeys.editorSimpleInput.bindTo(V),this._editorFocus=a.EditorContextKeys.focus.bindTo(V),this._textInputFocus=a.EditorContextKeys.textInputFocus.bindTo(V),this._editorTextFocus=a.EditorContextKeys.editorTextFocus.bindTo(V),this._editorTabMovesFocus=a.EditorContextKeys.tabMovesFocus.bindTo(V),this._editorReadonly=a.EditorContextKeys.readOnly.bindTo(V),this._inDiffEditor=a.EditorContextKeys.inDiffEditor.bindTo(V),this._editorColumnSelection=a.EditorContextKeys.columnSelection.bindTo(V),this._hasMultipleSelections=a.EditorContextKeys.hasMultipleSelections.bindTo(V),this._hasNonEmptySelection=a.EditorContextKeys.hasNonEmptySelection.bindTo(V),this._canUndo=a.EditorContextKeys.canUndo.bindTo(V),this._canRedo=a.EditorContextKeys.canRedo.bindTo(V),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._register(O.TabFocus.onDidChangeTabFocus(()=>this._editorTabMovesFocus.set(O.TabFocus.getTabFocusMode("editorFocus")))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const z=this._editor.getOptions();this._editorTabMovesFocus.set(O.TabFocus.getTabFocusMode("editorFocus")),this._editorReadonly.set(z.get(87)),this._inDiffEditor.set(z.get(59)),this._editorColumnSelection.set(z.get(20))}_updateFromSelection(){const z=this._editor.getSelections();z?(this._hasMultipleSelections.set(z.length>1),this._hasNonEmptySelection.set(z.some(V=>!V.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 z=this._editor.getModel();this._canUndo.set(!!(z&&z.canUndo())),this._canRedo.set(!!(z&&z.canRedo()))}}class H extends w.Disposable{constructor(z,V,K){super(),this._editor=z,this._contextKeyService=V,this._languageFeaturesService=K,this._langId=a.EditorContextKeys.languageId.bindTo(V),this._hasCompletionItemProvider=a.EditorContextKeys.hasCompletionItemProvider.bindTo(V),this._hasCodeActionsProvider=a.EditorContextKeys.hasCodeActionsProvider.bindTo(V),this._hasCodeLensProvider=a.EditorContextKeys.hasCodeLensProvider.bindTo(V),this._hasDefinitionProvider=a.EditorContextKeys.hasDefinitionProvider.bindTo(V),this._hasDeclarationProvider=a.EditorContextKeys.hasDeclarationProvider.bindTo(V),this._hasImplementationProvider=a.EditorContextKeys.hasImplementationProvider.bindTo(V),this._hasTypeDefinitionProvider=a.EditorContextKeys.hasTypeDefinitionProvider.bindTo(V),this._hasHoverProvider=a.EditorContextKeys.hasHoverProvider.bindTo(V),this._hasDocumentHighlightProvider=a.EditorContextKeys.hasDocumentHighlightProvider.bindTo(V),this._hasDocumentSymbolProvider=a.EditorContextKeys.hasDocumentSymbolProvider.bindTo(V),this._hasReferenceProvider=a.EditorContextKeys.hasReferenceProvider.bindTo(V),this._hasRenameProvider=a.EditorContextKeys.hasRenameProvider.bindTo(V),this._hasSignatureHelpProvider=a.EditorContextKeys.hasSignatureHelpProvider.bindTo(V),this._hasInlayHintsProvider=a.EditorContextKeys.hasInlayHintsProvider.bindTo(V),this._hasDocumentFormattingProvider=a.EditorContextKeys.hasDocumentFormattingProvider.bindTo(V),this._hasDocumentSelectionFormattingProvider=a.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(V),this._hasMultipleDocumentFormattingProvider=a.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(V),this._hasMultipleDocumentSelectionFormattingProvider=a.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(V),this._isInWalkThrough=a.EditorContextKeys.isInWalkThroughSnippet.bindTo(V);const ie=()=>this._update();this._register(z.onDidChangeModel(ie)),this._register(z.onDidChangeModelLanguage(ie)),this._register(K.completionProvider.onDidChange(ie)),this._register(K.codeActionProvider.onDidChange(ie)),this._register(K.codeLensProvider.onDidChange(ie)),this._register(K.definitionProvider.onDidChange(ie)),this._register(K.declarationProvider.onDidChange(ie)),this._register(K.implementationProvider.onDidChange(ie)),this._register(K.typeDefinitionProvider.onDidChange(ie)),this._register(K.hoverProvider.onDidChange(ie)),this._register(K.documentHighlightProvider.onDidChange(ie)),this._register(K.documentSymbolProvider.onDidChange(ie)),this._register(K.referenceProvider.onDidChange(ie)),this._register(K.renameProvider.onDidChange(ie)),this._register(K.documentFormattingEditProvider.onDidChange(ie)),this._register(K.documentRangeFormattingEditProvider.onDidChange(ie)),this._register(K.signatureHelpProvider.onDidChange(ie)),this._register(K.inlayHintsProvider.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 z=this._editor.getModel();if(!z){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(z.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(z)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(z)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(z)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(z)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(z)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(z)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(z)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(z)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(z)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(z)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(z)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(z)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(z)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(z)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(z)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(z)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(z)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(z).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(z).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(z).length>1),this._isInWalkThrough.set(z.uri.scheme===b.Schemas.walkThroughSnippet)})}}e.EditorModeContext=H;class B extends w.Disposable{constructor(z){super(),this._onChange=this._register(new D.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(k.trackFocus(z)),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}}class j{get length(){return this._decorationIds.length}constructor(z,V){this._editor=z,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(V)&&V.length>0&&this.set(V)}onDidChange(z,V,K){return this._editor.onDidChangeModelDecorations(ie=>{this._isChangingDecorations||z.call(V,ie)},K)}getRange(z){return!this._editor.hasModel()||z>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[z])}getRanges(){if(!this._editor.hasModel())return[];const z=this._editor.getModel(),V=[];for(const K of this._decorationIds){const ie=z.getDecorationRange(K);ie&&V.push(ie)}return V}has(z){return this._decorationIds.includes(z.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(z){try{this._isChangingDecorations=!0,this._editor.changeDecorations(V=>{this._decorationIds=V.deltaDecorations(this._decorationIds,z)})}finally{this._isChangingDecorations=!1}}}const G=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=\'"),Y=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 ne(ce){return G+encodeURIComponent(ce.toString())+Y}const de=encodeURIComponent(\'<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="\'),he=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 oe(ce){return de+encodeURIComponent(ce.toString())+he}(0,T.registerThemingParticipant)((ce,z)=>{const V=ce.getColor(C.editorErrorForeground);V&&z.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${ne(V)}") repeat-x bottom left; }`);const K=ce.getColor(C.editorWarningForeground);K&&z.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${ne(K)}") repeat-x bottom left; }`);const ie=ce.getColor(C.editorInfoForeground);ie&&z.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${ne(ie)}") repeat-x bottom left; }`);const X=ce.getColor(C.editorHintForeground);X&&z.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${oe(X)}") no-repeat bottom left; }`);const Z=ce.getColor(u.editorUnnecessaryCodeOpacity);Z&&z.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${Z.rgba.a}; }`)})}),define(J[332],ee([1,0,7,35,161,141,84,12,29,11,6,2,74,293,15,30,114,183,782,576,695,40,13,5,95,166,39,138,109,81,267,573,96,14,57,8,178,43,71,31,80,24,32,400]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T,F,R,M,N,A,P,x,W,U,O,$,Q){"use strict";var se;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;class le{constructor(ge,pe){this._contextMenuService=ge,this._clipboardService=pe,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(ge){return ge.filter(pe=>!this._zonesMap[String(pe.id)])}clean(ge){this._zones.length>0&&ge.changeViewZones(pe=>{for(const ae of this._zones)pe.removeZone(ae)}),this._zones=[],this._zonesMap={},ge.changeDecorations(pe=>{this._decorations=pe.deltaDecorations(this._decorations,[])})}apply(ge,pe,ae,ve){const Le=ve?c.StableEditorScrollState.capture(ge):null;ge.changeViewZones(Ie=>{var Ae;for(const be of this._zones)Ie.removeZone(be);for(const be of this._inlineDiffMargins)be.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let be=0,Se=ae.zones.length;be<Se;be++){const Te=ae.zones[be];Te.suppressMouseDown=!0;const Pe=Ie.addZone(Te);this._zones.push(Pe),this._zonesMap[String(Pe)]=!0,ae.zones[be].diff&&Te.marginDomNode&&(Te.suppressMouseDown=!1,((Ae=ae.zones[be].diff)===null||Ae===void 0?void 0:Ae.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new l.InlineDiffMargin(Pe,Te.marginDomNode,ge,ae.zones[be].diff,this._contextMenuService,this._clipboardService)))}}),Le?.restore(ge),ge.changeDecorations(Ie=>{this._decorations=Ie.deltaDecorations(this._decorations,ae.decorations)}),pe?.setZones(ae.overviewZones)}}let te=0;const re=(0,O.registerIcon)("diff-insert",_.Codicon.add,F.localize(0,null)),H=(0,O.registerIcon)("diff-remove",_.Codicon.remove,F.localize(1,null)),B=(se=window.trustedTypes)===null||se===void 0?void 0:se.createPolicy("diffEditorWidget",{createHTML:De=>De}),j=F.localize(2,null);let G=class ht extends n.Disposable{constructor(ge,pe,ae,ve,Le,Ie,Ae,be,Se,Te,Pe){super(),this._editorProgressService=Pe,this._onDidDispose=this._register(new m.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModel=this._register(new m.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidUpdateDiff=this._register(new m.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new m.Emitter),this._lastOriginalWarning=null,this._lastModifiedWarning=null,Ae.willCreateDiffEditor(),this._documentDiffProvider=this._register(Ie.createInstance(a.WorkerBasedDocumentDiffProvider,pe)),this._register(this._documentDiffProvider.onDidChange(Oe=>this._beginUpdateDecorationsSoon())),this._codeEditorService=Ae,this._contextKeyService=this._register(Le.createScoped(ge)),this._instantiationService=Ie.createChild(new P.ServiceCollection([M.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=be,this._notificationService=Se,this._id=++te,this._state=0,this._updatingDiffProgress=null,this._domElement=ge,pe=pe||{},this._options=ye(pe,{enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"smart"}),typeof pe.isInEmbeddedEditor<"u"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",pe.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new b.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,k.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(S.addStandardDisposableListener(this._overviewDomElement,S.EventType.POINTER_DOWN,Oe=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(Oe)})),this._register(S.addDisposableListener(this._overviewDomElement,S.EventType.MOUSE_WHEEL,Oe=>{this._modifiedEditor.delegateScrollFromMouseWheelEvent(Oe)},{passive:!1})),this._options.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 le(Te,ve),this._modifiedEditorState=new le(Te,ve),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new i.ElementSizeObserver(this._containerDomElement,pe.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),pe.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(pe,ae.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(pe,ae.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=Ie.createInstance(o.DiffReview,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new ce(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new V(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(be.onDidColorThemeChange(Oe=>{this._strategy&&this._strategy.applyColors(Oe)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const Fe=s.EditorExtensionsRegistry.getDiffEditorContributions();for(const Oe of Fe)try{this._register(Ie.createInstance(Oe.ctor,this))}catch(xe){(0,h.onUnexpectedError)(xe)}this._codeEditorService.addDiffEditor(this)}_setState(ge){this._state!==ge&&(this._state=ge,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(ge,pe){let ae="monaco-diff-editor monaco-editor-background ";return pe&&(ae+="side-by-side "),ae+=(0,$.getThemeTypeSelector)(ge.type),ae}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){this._options.renderOverviewRuler&&(w.ok(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(ge,pe){const ae=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(ge),pe);this._register(ae.onDidScrollChange(Le=>{this._isHandlingScrollEvent||!Le.scrollTopChanged&&!Le.scrollLeftChanged&&!Le.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:Le.scrollLeft,scrollTop:Le.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(ae.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(ae.onDidChangeConfiguration(Le=>{ae.getModel()&&(Le.hasChanged(48)&&this._updateDecorationsRunner.schedule(),Le.hasChanged(140)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(ae.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(ae.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const ve=this._contextKeyService.createKey("isInDiffLeftEditor",ae.hasWidgetFocus());return this._register(ae.onDidFocusEditorWidget(()=>ve.set(!0))),this._register(ae.onDidBlurEditorWidget(()=>ve.set(!1))),this._register(ae.onDidContentSizeChange(Le=>{const Ie=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ht.ONE_OVERVIEW_WIDTH,Ae=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:Ae,contentWidth:Ie,contentHeightChanged:Le.contentHeightChanged,contentWidthChanged:Le.contentWidthChanged})})),ae}_createRightHandSideEditor(ge,pe){const ae=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(ge),pe);this._register(ae.onDidScrollChange(Le=>{this._isHandlingScrollEvent||!Le.scrollTopChanged&&!Le.scrollLeftChanged&&!Le.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:Le.scrollLeft,scrollTop:Le.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(ae.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(ae.onDidChangeConfiguration(Le=>{ae.getModel()&&(Le.hasChanged(48)&&this._updateDecorationsRunner.schedule(),Le.hasChanged(140)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(ae.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(ae.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(ae.onDidChangeModelOptions(Le=>{Le.tabSize&&this._updateDecorationsRunner.schedule()}));const ve=this._contextKeyService.createKey("isInDiffRightEditor",ae.hasWidgetFocus());return this._register(ae.onDidFocusEditorWidget(()=>ve.set(!0))),this._register(ae.onDidBlurEditorWidget(()=>ve.set(!1))),this._register(ae.onDidContentSizeChange(Le=>{const Ie=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ht.ONE_OVERVIEW_WIDTH,Ae=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:Ae,contentWidth:Ie,contentHeightChanged:Le.contentHeightChanged,contentWidthChanged:Le.contentWidthChanged})})),this._register(ae.onMouseDown(Le=>{var Ie,Ae;if(!Le.event.rightButton&&Le.target.position&&(!((Ie=Le.target.element)===null||Ie===void 0)&&Ie.className.includes("arrow-revert-change"))){const be=Le.target.position.lineNumber,Se=Le.target,Te=(Ae=this._diffComputationResult)===null||Ae===void 0?void 0:Ae.changes.find(Pe=>Se?.detail.afterLineNumber===Pe.modifiedStartLineNumber||Pe.modifiedEndLineNumber>0&&Pe.modifiedStartLineNumber===be);Te&&this.revertChange(Te),Le.event.stopPropagation(),this._updateDecorations();return}})),ae}revertChange(ge){const pe=this._modifiedEditor,ae=this._originalEditor.getModel(),ve=this._modifiedEditor.getModel();if(!ae||!ve||!pe)return;const Le=ge.originalEndLineNumber>0?new C.Range(ge.originalStartLineNumber,1,ge.originalEndLineNumber,ae.getLineMaxColumn(ge.originalEndLineNumber)):null,Ie=Le?ae.getValueInRange(Le):null,Ae=ge.modifiedEndLineNumber>0?new C.Range(ge.modifiedStartLineNumber,1,ge.modifiedEndLineNumber,ve.getLineMaxColumn(ge.modifiedEndLineNumber)):null,be=ve.getEOL();if(ge.originalEndLineNumber===0&&Ae){let Se=Ae;ge.modifiedStartLineNumber>1?Se=Ae.setStartPosition(ge.modifiedStartLineNumber-1,ve.getLineMaxColumn(ge.modifiedStartLineNumber-1)):ge.modifiedEndLineNumber<ve.getLineCount()&&(Se=Ae.setEndPosition(ge.modifiedEndLineNumber+1,1)),pe.executeEdits("diffEditor",[{range:Se,text:""}])}else if(ge.modifiedEndLineNumber===0&&Ie!==null){const Se=ge.modifiedStartLineNumber<ve.getLineCount()?new u.Position(ge.modifiedStartLineNumber+1,1):new u.Position(ge.modifiedStartLineNumber,ve.getLineMaxColumn(ge.modifiedStartLineNumber));pe.executeEdits("diffEditor",[{range:C.Range.fromPositions(Se,Se),text:ge.modifiedStartLineNumber<ve.getLineCount()?Ie+be:be+Ie}])}else Ae&&Ie!==null&&pe.executeEdits("diffEditor",[{range:Ae,text:Ie}])}_createInnerEditor(ge,pe,ae,ve){return ge.createInstance(g.CodeEditorWidget,pe,ae,ve)}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._options.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 v.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(ge){const pe=ye(ge,this._options),ae=ke(this._options,pe);this._options=pe;const ve=ae.ignoreTrimWhitespace||ae.renderIndicators||ae.renderMarginRevertIcon,Le=this._isVisible&&(ae.maxComputationTime||ae.maxFileSize);this._documentDiffProvider.setOptions(pe),ve?this._beginUpdateDecorations():Le&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(ge)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(ge)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),ae.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new ce(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new V(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),ae.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(ge){if(ge&&(!ge.original||!ge.modified))throw new Error(ge.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._disposeOverviewRulers(),this._originalEditor.setModel(ge?ge.original:null),this._modifiedEditor.setModel(ge?ge.modified:null),this._updateDecorationsRunner.cancel(),ge&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),ge&&(this._createOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport(),this._onDidChangeModel.fire()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(ge){return this._modifiedEditor.getVisibleColumnFromPosition(ge)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(ge,pe="api"){this._modifiedEditor.setPosition(ge,pe)}revealLine(ge,pe=0){this._modifiedEditor.revealLine(ge,pe)}revealLineInCenter(ge,pe=0){this._modifiedEditor.revealLineInCenter(ge,pe)}revealLineInCenterIfOutsideViewport(ge,pe=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(ge,pe)}revealLineNearTop(ge,pe=0){this._modifiedEditor.revealLineNearTop(ge,pe)}revealPosition(ge,pe=0){this._modifiedEditor.revealPosition(ge,pe)}revealPositionInCenter(ge,pe=0){this._modifiedEditor.revealPositionInCenter(ge,pe)}revealPositionInCenterIfOutsideViewport(ge,pe=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(ge,pe)}revealPositionNearTop(ge,pe=0){this._modifiedEditor.revealPositionNearTop(ge,pe)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(ge,pe="api"){this._modifiedEditor.setSelection(ge,pe)}setSelections(ge,pe="api"){this._modifiedEditor.setSelections(ge,pe)}revealLines(ge,pe,ae=0){this._modifiedEditor.revealLines(ge,pe,ae)}revealLinesInCenter(ge,pe,ae=0){this._modifiedEditor.revealLinesInCenter(ge,pe,ae)}revealLinesInCenterIfOutsideViewport(ge,pe,ae=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(ge,pe,ae)}revealLinesNearTop(ge,pe,ae=0){this._modifiedEditor.revealLinesNearTop(ge,pe,ae)}revealRange(ge,pe=0,ae=!1,ve=!0){this._modifiedEditor.revealRange(ge,pe,ae,ve)}revealRangeInCenter(ge,pe=0){this._modifiedEditor.revealRangeInCenter(ge,pe)}revealRangeInCenterIfOutsideViewport(ge,pe=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(ge,pe)}revealRangeNearTop(ge,pe=0){this._modifiedEditor.revealRangeNearTop(ge,pe)}revealRangeNearTopIfOutsideViewport(ge,pe=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(ge,pe)}revealRangeAtTop(ge,pe=0){this._modifiedEditor.revealRangeAtTop(ge,pe)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const ge=this._originalEditor.saveViewState(),pe=this._modifiedEditor.saveViewState();return{original:ge,modified:pe}}restoreViewState(ge){if(ge&&ge.original&&ge.modified){const pe=ge;this._originalEditor.restoreViewState(pe.original),this._modifiedEditor.restoreViewState(pe.modified)}}layout(ge){this._elementSizeObserver.observe(ge)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(ge,pe,ae){this._modifiedEditor.trigger(ge,pe,ae)}createDecorationsCollection(ge){return this._modifiedEditor.createDecorationsCollection(ge)}changeDecorations(ge){return this._modifiedEditor.changeDecorations(ge)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const ge=this._elementSizeObserver.getHeight(),pe=this._getReviewHeight(),ae=ht.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ht.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:ht.ONE_OVERVIEW_WIDTH,right:ae+ht.ONE_OVERVIEW_WIDTH,height:ge-pe}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:ht.ONE_OVERVIEW_WIDTH,height:ge-pe}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),ht.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(ge,pe){return!ge&&!pe?!0:!ge||!pe?!1:ge.toString()===pe.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1);const ge=this._originalEditor.getModel(),pe=this._modifiedEditor.getModel();if(!ge||!pe)return;this._diffComputationToken++;const ae=this._diffComputationToken,ve=this._options.maxFileSize*1024*1024,Le=Ie=>{const Ae=Ie.getValueLength();return ve===0||Ae<=ve};if(!Le(ge)||!Le(pe)){(!ht._equals(ge.uri,this._lastOriginalWarning)||!ht._equals(pe.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=ge.uri,this._lastModifiedWarning=pe.uri,this._notificationService.warn(F.localize(3,null)));return}this._setState(1),this._documentDiffProvider.computeDiff(ge,pe,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace,maxComputationTimeMs:this._options.maxComputationTime}).then(Ie=>{ae===this._diffComputationToken&&ge===this._originalEditor.getModel()&&pe===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult={identical:Ie.identical,quitEarly:Ie.quitEarly,changes:Ie.changes.map(Ae=>{let be,Se,Te,Pe,Fe=Ae.innerChanges;return Ae.originalRange.isEmpty?(be=Ae.originalRange.startLineNumber-1,Se=0,Fe=void 0):(be=Ae.originalRange.startLineNumber,Se=Ae.originalRange.endLineNumberExclusive-1),Ae.modifiedRange.isEmpty?(Te=Ae.modifiedRange.startLineNumber-1,Pe=0,Fe=void 0):(Te=Ae.modifiedRange.startLineNumber,Pe=Ae.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:be,originalEndLineNumber:Se,modifiedStartLineNumber:Te,modifiedEndLineNumber:Pe,charChanges:Fe?.map(Oe=>({originalStartLineNumber:Oe.originalRange.startLineNumber,originalStartColumn:Oe.originalRange.startColumn,originalEndLineNumber:Oe.originalRange.endLineNumber,originalEndColumn:Oe.originalRange.endColumn,modifiedStartLineNumber:Oe.modifiedRange.startLineNumber,modifiedStartColumn:Oe.modifiedRange.startColumn,modifiedEndLineNumber:Oe.modifiedRange.endLineNumber,modifiedEndColumn:Oe.modifiedRange.endColumn}))}})},this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},Ie=>{ae===this._diffComputationToken&&ge===this._originalEditor.getModel()&&pe===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())return;const ge=this._diffComputationResult?this._diffComputationResult.changes:[],pe=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),ae=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),ve=this._options.renderMarginRevertIcon&&!this._modifiedEditor.getOption(87),Le=this._strategy.getEditorsDiffDecorations(ge,this._options.ignoreTrimWhitespace,this._options.renderIndicators,ve,pe,ae);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,Le.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,Le.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(ge){const pe=Object.assign({},ge);return pe.inDiffEditor=!0,pe.automaticLayout=!1,pe.scrollbar=Object.assign({},pe.scrollbar||{}),pe.scrollbar.vertical="visible",pe.folding=!1,pe.codeLens=this._options.diffCodeLens,pe.fixedOverflowWidgets=!0,pe.minimap=Object.assign({},pe.minimap||{}),pe.minimap.enabled=!1,pe}_adjustOptionsForLeftHandSide(ge){const pe=this._adjustOptionsForSubEditor(ge);return this._options.renderSideBySide?pe.wordWrapOverride1=this._options.diffWordWrap:(pe.wordWrapOverride1="off",pe.wordWrapOverride2="off"),ge.originalAriaLabel&&(pe.ariaLabel=ge.originalAriaLabel),pe.ariaLabel+=j,pe.readOnly=!this._options.originalEditable,pe.dropIntoEditor={enabled:!pe.readOnly},pe.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},pe),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(ge){const pe=this._adjustOptionsForSubEditor(ge);return ge.modifiedAriaLabel&&(pe.ariaLabel=ge.modifiedAriaLabel),pe.ariaLabel+=j,pe.wordWrapOverride1=this._options.diffWordWrap,pe.revealHorizontalRightPadding=d.EditorOptions.revealHorizontalRightPadding.defaultValue+ht.ENTIRE_DIFF_OVERVIEW_WIDTH,pe.scrollbar.verticalHasArrows=!1,pe.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},pe),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const ge=this._elementSizeObserver.getWidth(),pe=this._elementSizeObserver.getHeight(),ae=this._getReviewHeight(),ve=this._strategy.layout();this._originalDomNode.style.width=ve+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=ge-ve+"px",this._modifiedDomNode.style.left=ve+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=pe-ae+"px",this._overviewDomElement.style.width=ht.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=ge-ht.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(ht.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:ve,height:pe-ae}),this._modifiedEditor.layout({width:ge-ve-(this._options.renderOverviewRuler?ht.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:pe-ae}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(pe-ae,ge,ae),this._layoutOverviewViewport()}_layoutOverviewViewport(){const ge=this._computeOverviewViewport();ge?(this._overviewViewportDomElement.setTop(ge.top),this._overviewViewportDomElement.setHeight(ge.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const ge=this._modifiedEditor.getLayoutInfo();if(!ge)return null;const pe=this._modifiedEditor.getScrollTop(),ae=this._modifiedEditor.getScrollHeight(),ve=Math.max(0,ge.height),Le=Math.max(0,ve-2*0),Ie=ae>0?Le/ae:0,Ae=Math.max(0,Math.floor(ge.height*Ie)),be=Math.floor(pe*Ie);return{height:Ae,top:be}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(ge){var pe;(pe=this._strategy)===null||pe===void 0||pe.dispose(),this._strategy=ge,this._boundarySashes&&ge.setBoundarySashes(this._boundarySashes),ge.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(ge,pe){const ae=this._diffComputationResult?this._diffComputationResult.changes:[];if(ae.length===0||ge<pe(ae[0]))return null;let ve=0,Le=ae.length-1;for(;ve<Le;){const Ie=Math.floor((ve+Le)/2),Ae=pe(ae[Ie]),be=Ie+1<=Le?pe(ae[Ie+1]):1073741824;ge<Ae?Le=Ie-1:ge>=be?ve=Ie+1:(ve=Ie,Le=Ie)}return ae[ve]}_getEquivalentLineForOriginalLineNumber(ge){const pe=this._getLineChangeAtOrBeforeLineNumber(ge,be=>be.originalStartLineNumber);if(!pe)return ge;const ae=pe.originalStartLineNumber+(pe.originalEndLineNumber>0?-1:0),ve=pe.modifiedStartLineNumber+(pe.modifiedEndLineNumber>0?-1:0),Le=pe.originalEndLineNumber>0?pe.originalEndLineNumber-pe.originalStartLineNumber+1:0,Ie=pe.modifiedEndLineNumber>0?pe.modifiedEndLineNumber-pe.modifiedStartLineNumber+1:0,Ae=ge-ae;return Ae<=Le?ve+Math.min(Ae,Ie):ve+Ie-Le+Ae}_getEquivalentLineForModifiedLineNumber(ge){const pe=this._getLineChangeAtOrBeforeLineNumber(ge,be=>be.modifiedStartLineNumber);if(!pe)return ge;const ae=pe.originalStartLineNumber+(pe.originalEndLineNumber>0?-1:0),ve=pe.modifiedStartLineNumber+(pe.modifiedEndLineNumber>0?-1:0),Le=pe.originalEndLineNumber>0?pe.originalEndLineNumber-pe.originalStartLineNumber+1:0,Ie=pe.modifiedEndLineNumber>0?pe.modifiedEndLineNumber-pe.modifiedStartLineNumber+1:0,Ae=ge-ve;return Ae<=Ie?ae+Math.min(Ae,Le):ae+Le-Ie+Ae}getDiffLineInformationForOriginal(ge){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(ge)}:null}getDiffLineInformationForModified(ge){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(ge)}:null}};G.ONE_OVERVIEW_WIDTH=15,G.ENTIRE_DIFF_OVERVIEW_WIDTH=30,G.UPDATE_DIFF_DECORATIONS_DELAY=200,G=Ne([fe(3,R.IClipboardService),fe(4,M.IContextKeyService),fe(5,A.IInstantiationService),fe(6,r.ICodeEditorService),fe(7,$.IThemeService),fe(8,x.INotificationService),fe(9,N.IContextMenuService),fe(10,W.IEditorProgressService)],G),e.DiffEditorWidget=G;class Y extends n.Disposable{constructor(ge){super(),this._dataSource=ge,this._insertColor=null,this._removeColor=null}applyColors(ge){const pe=ge.getColor(U.diffOverviewRulerInserted)||(ge.getColor(U.diffInserted)||U.defaultInsertColor).transparent(2),ae=ge.getColor(U.diffOverviewRulerRemoved)||(ge.getColor(U.diffRemoved)||U.defaultRemoveColor).transparent(2),ve=!pe.equals(this._insertColor)||!ae.equals(this._removeColor);return this._insertColor=pe,this._removeColor=ae,ve}getEditorsDiffDecorations(ge,pe,ae,ve,Le,Ie){Ie=Ie.sort((Te,Pe)=>Te.afterLineNumber-Pe.afterLineNumber),Le=Le.sort((Te,Pe)=>Te.afterLineNumber-Pe.afterLineNumber);const Ae=this._getViewZones(ge,Le,Ie,ae),be=this._getOriginalEditorDecorations(Ae,ge,pe,ae),Se=this._getModifiedEditorDecorations(Ae,ge,pe,ae,ve);return{original:{decorations:be.decorations,overviewZones:be.overviewZones,zones:Ae.original},modified:{decorations:Se.decorations,overviewZones:Se.overviewZones,zones:Ae.modified}}}setBoundarySashes(ge){}}class ne{constructor(ge){this._source=ge,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 de{constructor(ge,pe,ae,ve,Le){this._lineChanges=ge,this._originalForeignVZ=pe,this._modifiedForeignVZ=ae,this._originalEditor=ve,this._modifiedEditor=Le}static _getViewLineCount(ge,pe,ae){const ve=ge.getModel(),Le=ge._getViewModel();if(ve&&Le){const Ie=we(ve,Le,pe,ae);return Ie.endLineNumber-Ie.startLineNumber+1}return ae-pe+1}getViewZones(){const ge=this._originalEditor.getOption(64),pe=this._modifiedEditor.getOption(64),ae=this._originalEditor.getOption(140).wrappingColumn!==-1,ve=this._modifiedEditor.getOption(140).wrappingColumn!==-1,Le=ae||ve,Ie=this._originalEditor.getModel(),Ae=this._originalEditor._getViewModel().coordinatesConverter,be=this._modifiedEditor._getViewModel().coordinatesConverter,Se={original:[],modified:[]};let Te=0,Pe=0,Fe=0,Oe=0,xe=0,Ke=0;const Ye=(We,$e)=>We.afterLineNumber-$e.afterLineNumber,qe=(We,$e)=>{if($e.domNode===null&&We.length>0){const Ue=We[We.length-1];if(Ue.afterLineNumber===$e.afterLineNumber&&Ue.domNode===null){Ue.heightInLines+=$e.heightInLines;return}}We.push($e)},st=new ne(this._modifiedForeignVZ),Ve=new ne(this._originalForeignVZ);let Me=1,Be=1;for(let We=0,$e=this._lineChanges.length;We<=$e;We++){const Ue=We<$e?this._lineChanges[We]:null;Ue!==null?(Fe=Ue.originalStartLineNumber+(Ue.originalEndLineNumber>0?-1:0),Oe=Ue.modifiedStartLineNumber+(Ue.modifiedEndLineNumber>0?-1:0),Pe=Ue.originalEndLineNumber>0?de._getViewLineCount(this._originalEditor,Ue.originalStartLineNumber,Ue.originalEndLineNumber):0,Te=Ue.modifiedEndLineNumber>0?de._getViewLineCount(this._modifiedEditor,Ue.modifiedStartLineNumber,Ue.modifiedEndLineNumber):0,xe=Math.max(Ue.originalStartLineNumber,Ue.originalEndLineNumber),Ke=Math.max(Ue.modifiedStartLineNumber,Ue.modifiedEndLineNumber)):(Fe+=1e7+Pe,Oe+=1e7+Te,xe=Fe,Ke=Oe);let Xe=[],Je=[];if(Le){let Ge;Ue?Ue.originalEndLineNumber>0?Ge=Ue.originalStartLineNumber-Me:Ge=Ue.modifiedStartLineNumber-Be:Ge=Ie.getLineCount()-Me+1;for(let lt=0;lt<Ge;lt++){const ut=Me+lt,ot=Be+lt,Ze=Ae.getModelLineViewLineCount(ut),Re=be.getModelLineViewLineCount(ot);Ze<Re?Xe.push({afterLineNumber:ut,heightInLines:Re-Ze,domNode:null,marginDomNode:null}):Ze>Re&&Je.push({afterLineNumber:ot,heightInLines:Ze-Re,domNode:null,marginDomNode:null})}Ue&&(Me=(Ue.originalEndLineNumber>0?Ue.originalEndLineNumber:Ue.originalStartLineNumber)+1,Be=(Ue.modifiedEndLineNumber>0?Ue.modifiedEndLineNumber:Ue.modifiedStartLineNumber)+1)}for(;st.current&&st.current.afterLineNumber<=Ke;){let Ge;st.current.afterLineNumber<=Oe?Ge=Fe-Oe+st.current.afterLineNumber:Ge=xe;let lt=null;Ue&&Ue.modifiedStartLineNumber<=st.current.afterLineNumber&&st.current.afterLineNumber<=Ue.modifiedEndLineNumber&&(lt=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),Xe.push({afterLineNumber:Ge,heightInLines:st.current.height/pe,domNode:null,marginDomNode:lt}),st.advance()}for(;Ve.current&&Ve.current.afterLineNumber<=xe;){let Ge;Ve.current.afterLineNumber<=Fe?Ge=Oe-Fe+Ve.current.afterLineNumber:Ge=Ke,Je.push({afterLineNumber:Ge,heightInLines:Ve.current.height/ge,domNode:null}),Ve.advance()}if(Ue!==null&&X(Ue)){const Ge=this._produceOriginalFromDiff(Ue,Pe,Te);Ge&&Xe.push(Ge)}if(Ue!==null&&Z(Ue)){const Ge=this._produceModifiedFromDiff(Ue,Pe,Te);Ge&&Je.push(Ge)}let nt=0,dt=0;for(Xe=Xe.sort(Ye),Je=Je.sort(Ye);nt<Xe.length&&dt<Je.length;){const Ge=Xe[nt],lt=Je[dt],ut=Ge.afterLineNumber-Fe,ot=lt.afterLineNumber-Oe;ut<ot?(qe(Se.original,Ge),nt++):ot<ut?(qe(Se.modified,lt),dt++):Ge.shouldNotShrink?(qe(Se.original,Ge),nt++):lt.shouldNotShrink?(qe(Se.modified,lt),dt++):Ge.heightInLines>=lt.heightInLines?(Ge.heightInLines-=lt.heightInLines,dt++):(lt.heightInLines-=Ge.heightInLines,nt++)}for(;nt<Xe.length;)qe(Se.original,Xe[nt]),nt++;for(;dt<Je.length;)qe(Se.modified,Je[dt]),dt++}return{original:de._ensureDomNodes(Se.original),modified:de._ensureDomNodes(Se.modified)}}static _ensureDomNodes(ge){return ge.map(pe=>(pe.domNode||(pe.domNode=Ce()),pe))}}function he(De,ge,pe,ae,ve){return{range:new C.Range(De,ge,pe,ae),options:ve}}const oe={arrowRevertChange:p.ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginClassName:"arrow-revert-change "+Q.ThemeIcon.asClassName(_.Codicon.arrowRight)}),charDelete:p.ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:p.ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:p.ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:p.ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:p.ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:p.ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Q.ThemeIcon.asClassName(re),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:p.ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:p.ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Q.ThemeIcon.asClassName(H),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:p.ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class ce extends Y{constructor(ge,pe){super(ge),this._disableSash=pe===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new D.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(ae=>this._onSashDrag(ae)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(ge){const pe=ge===!1;this._disableSash!==pe&&(this._disableSash=pe,this._sash.state=this._disableSash?0:3)}layout(ge=this._sashRatio){const ae=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?G.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let ve=Math.floor((ge||.5)*ae);const Le=Math.floor(.5*ae);return ve=this._disableSash?Le:ve||Le,ae>ce.MINIMUM_EDITOR_WIDTH*2?(ve<ce.MINIMUM_EDITOR_WIDTH&&(ve=ce.MINIMUM_EDITOR_WIDTH),ve>ae-ce.MINIMUM_EDITOR_WIDTH&&(ve=ae-ce.MINIMUM_EDITOR_WIDTH)):ve=Le,this._sashPosition!==ve&&(this._sashPosition=ve),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(ge){const ae=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?G.ENTIRE_DIFF_OVERVIEW_WIDTH:0),ve=this.layout((this._startSashPosition+(ge.currentX-ge.startX))/ae);this._sashRatio=ve/ae,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(ge){return 0}getVerticalSashLeft(ge){return this._sashPosition}getVerticalSashHeight(ge){return this._dataSource.getHeight()}setBoundarySashes(ge){this._sash.orthogonalEndSash=ge.bottom}_getViewZones(ge,pe,ae){const ve=this._dataSource.getOriginalEditor(),Le=this._dataSource.getModifiedEditor();return new z(ge,pe,ae,ve,Le).getViewZones()}_getOriginalEditorDecorations(ge,pe,ae,ve){const Le=this._dataSource.getOriginalEditor(),Ie=String(this._removeColor),Ae={decorations:[],overviewZones:[]},be=Le.getModel(),Se=Le._getViewModel();for(const Te of pe)if(Z(Te)){Ae.decorations.push({range:new C.Range(Te.originalStartLineNumber,1,Te.originalEndLineNumber,1073741824),options:ve?oe.lineDeleteWithSign:oe.lineDelete}),(!X(Te)||!Te.charChanges)&&Ae.decorations.push(he(Te.originalStartLineNumber,1,Te.originalEndLineNumber,1073741824,oe.charDeleteWholeLine));const Pe=we(be,Se,Te.originalStartLineNumber,Te.originalEndLineNumber);if(Ae.overviewZones.push(new T.OverviewRulerZone(Pe.startLineNumber,Pe.endLineNumber,0,Ie)),Te.charChanges){for(const Fe of Te.charChanges)if(me(Fe))if(ae)for(let Oe=Fe.originalStartLineNumber;Oe<=Fe.originalEndLineNumber;Oe++){let xe,Ke;Oe===Fe.originalStartLineNumber?xe=Fe.originalStartColumn:xe=be.getLineFirstNonWhitespaceColumn(Oe),Oe===Fe.originalEndLineNumber?Ke=Fe.originalEndColumn:Ke=be.getLineLastNonWhitespaceColumn(Oe),Ae.decorations.push(he(Oe,xe,Oe,Ke,oe.charDelete))}else Ae.decorations.push(he(Fe.originalStartLineNumber,Fe.originalStartColumn,Fe.originalEndLineNumber,Fe.originalEndColumn,oe.charDelete))}}return Ae}_getModifiedEditorDecorations(ge,pe,ae,ve,Le){const Ie=this._dataSource.getModifiedEditor(),Ae=String(this._insertColor),be={decorations:[],overviewZones:[]},Se=Ie.getModel(),Te=Ie._getViewModel();for(const Pe of pe){if(Le)if(Pe.modifiedEndLineNumber>0)be.decorations.push({range:new C.Range(Pe.modifiedStartLineNumber,1,Pe.modifiedStartLineNumber,1),options:oe.arrowRevertChange});else{const Fe=ge.modified.find(Oe=>Oe.afterLineNumber===Pe.modifiedStartLineNumber);Fe&&(Fe.marginDomNode=_e())}if(X(Pe)){be.decorations.push({range:new C.Range(Pe.modifiedStartLineNumber,1,Pe.modifiedEndLineNumber,1073741824),options:ve?oe.lineInsertWithSign:oe.lineInsert}),(!Z(Pe)||!Pe.charChanges)&&be.decorations.push(he(Pe.modifiedStartLineNumber,1,Pe.modifiedEndLineNumber,1073741824,oe.charInsertWholeLine));const Fe=we(Se,Te,Pe.modifiedStartLineNumber,Pe.modifiedEndLineNumber);if(be.overviewZones.push(new T.OverviewRulerZone(Fe.startLineNumber,Fe.endLineNumber,0,Ae)),Pe.charChanges){for(const Oe of Pe.charChanges)if(ue(Oe))if(ae)for(let xe=Oe.modifiedStartLineNumber;xe<=Oe.modifiedEndLineNumber;xe++){let Ke,Ye;xe===Oe.modifiedStartLineNumber?Ke=Oe.modifiedStartColumn:Ke=Se.getLineFirstNonWhitespaceColumn(xe),xe===Oe.modifiedEndLineNumber?Ye=Oe.modifiedEndColumn:Ye=Se.getLineLastNonWhitespaceColumn(xe),be.decorations.push(he(xe,Ke,xe,Ye,oe.charInsert))}else be.decorations.push(he(Oe.modifiedStartLineNumber,Oe.modifiedStartColumn,Oe.modifiedEndLineNumber,Oe.modifiedEndColumn,oe.charInsert))}}}return be}}ce.MINIMUM_EDITOR_WIDTH=100;class z extends de{constructor(ge,pe,ae,ve,Le){super(ge,pe,ae,ve,Le)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(ge,pe,ae){return ae>pe?{afterLineNumber:Math.max(ge.originalStartLineNumber,ge.originalEndLineNumber),heightInLines:ae-pe,domNode:null}:null}_produceModifiedFromDiff(ge,pe,ae){return pe>ae?{afterLineNumber:Math.max(ge.modifiedStartLineNumber,ge.modifiedEndLineNumber),heightInLines:pe-ae,domNode:null}:null}}class V extends Y{constructor(ge,pe){super(ge),this._decorationsLeft=ge.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(ge.getOriginalEditor().onDidLayoutChange(ae=>{this._decorationsLeft!==ae.decorationsLeft&&(this._decorationsLeft=ae.decorationsLeft,ge.relayoutEditors())}))}setEnableSplitViewResizing(ge){}_getViewZones(ge,pe,ae,ve){const Le=this._dataSource.getOriginalEditor(),Ie=this._dataSource.getModifiedEditor();return new K(ge,pe,ae,Le,Ie,ve).getViewZones()}_getOriginalEditorDecorations(ge,pe,ae,ve){const Le=String(this._removeColor),Ie={decorations:[],overviewZones:[]},Ae=this._dataSource.getOriginalEditor(),be=Ae.getModel(),Se=Ae._getViewModel();let Te=0;for(const Pe of pe)if(Z(Pe)){for(Ie.decorations.push({range:new C.Range(Pe.originalStartLineNumber,1,Pe.originalEndLineNumber,1073741824),options:oe.lineDeleteMargin});Te<ge.modified.length;){const xe=ge.modified[Te];if(xe.diff&&xe.diff.originalStartLineNumber>=Pe.originalStartLineNumber)break;Te++}let Fe=0;if(Te<ge.modified.length){const xe=ge.modified[Te];xe.diff&&xe.diff.originalStartLineNumber===Pe.originalStartLineNumber&&xe.diff.originalEndLineNumber===Pe.originalEndLineNumber&&xe.diff.modifiedStartLineNumber===Pe.modifiedStartLineNumber&&xe.diff.modifiedEndLineNumber===Pe.modifiedEndLineNumber&&(Fe=xe.heightInLines)}const Oe=we(be,Se,Pe.originalStartLineNumber,Pe.originalEndLineNumber);Ie.overviewZones.push(new T.OverviewRulerZone(Oe.startLineNumber,Oe.endLineNumber,Fe,Le))}return Ie}_getModifiedEditorDecorations(ge,pe,ae,ve,Le){const Ie=this._dataSource.getModifiedEditor(),Ae=String(this._insertColor),be={decorations:[],overviewZones:[]},Se=Ie.getModel(),Te=Ie._getViewModel();for(const Pe of pe)if(X(Pe)){be.decorations.push({range:new C.Range(Pe.modifiedStartLineNumber,1,Pe.modifiedEndLineNumber,1073741824),options:ve?oe.lineInsertWithSign:oe.lineInsert});const Fe=we(Se,Te,Pe.modifiedStartLineNumber,Pe.modifiedEndLineNumber);if(be.overviewZones.push(new T.OverviewRulerZone(Fe.startLineNumber,Fe.endLineNumber,0,Ae)),Pe.charChanges){for(const Oe of Pe.charChanges)if(ue(Oe))if(ae)for(let xe=Oe.modifiedStartLineNumber;xe<=Oe.modifiedEndLineNumber;xe++){let Ke,Ye;xe===Oe.modifiedStartLineNumber?Ke=Oe.modifiedStartColumn:Ke=Se.getLineFirstNonWhitespaceColumn(xe),xe===Oe.modifiedEndLineNumber?Ye=Oe.modifiedEndColumn:Ye=Se.getLineLastNonWhitespaceColumn(xe),be.decorations.push(he(xe,Ke,xe,Ye,oe.charInsert))}else be.decorations.push(he(Oe.modifiedStartLineNumber,Oe.modifiedStartColumn,Oe.modifiedEndLineNumber,Oe.modifiedEndColumn,oe.charInsert))}else be.decorations.push(he(Pe.modifiedStartLineNumber,1,Pe.modifiedEndLineNumber,1073741824,oe.charInsertWholeLine))}return be}layout(){return Math.max(5,this._decorationsLeft)}}class K extends de{constructor(ge,pe,ae,ve,Le,Ie){super(ge,pe,ae,ve,Le),this._originalModel=ve.getModel(),this._renderIndicators=Ie,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const ge=super.getViewZones();return this._finalize(ge),ge}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const ge=document.createElement("div");return ge.className="inline-added-margin-view-zone",ge}_produceOriginalFromDiff(ge,pe,ae){const ve=document.createElement("div");return ve.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(ge.originalStartLineNumber,ge.originalEndLineNumber),heightInLines:ae,domNode:document.createElement("div"),marginDomNode:ve}}_produceModifiedFromDiff(ge,pe,ae){const ve=document.createElement("div");ve.className=`view-lines line-delete ${y.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const Le=document.createElement("div");Le.className="inline-deleted-margin-view-zone";const Ie={shouldNotShrink:!0,afterLineNumber:ge.modifiedEndLineNumber===0?ge.modifiedStartLineNumber:ge.modifiedStartLineNumber-1,heightInLines:pe,minWidthInPx:0,domNode:ve,marginDomNode:Le,diff:{originalStartLineNumber:ge.originalStartLineNumber,originalEndLineNumber:ge.originalEndLineNumber,modifiedStartLineNumber:ge.modifiedStartLineNumber,modifiedEndLineNumber:ge.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let Ae=ge.originalStartLineNumber;Ae<=ge.originalEndLineNumber;Ae++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(Ae),null,null);return this._pendingLineChange.push(ge),this._pendingViewZones.push(Ie),Ie}_finalize(ge){const pe=this._modifiedEditor.getOptions(),ae=this._modifiedEditor.getModel().getOptions().tabSize,ve=pe.get(48),Le=pe.get(31),Ie=ve.typicalHalfwidthCharacterWidth,Ae=pe.get(99),be=this._originalModel.mightContainNonBasicASCII(),Se=this._originalModel.mightContainRTL(),Te=pe.get(64),Fe=pe.get(139).decorationsWidth,Oe=pe.get(112),xe=pe.get(94),Ke=pe.get(89),Ye=pe.get(49),qe=this._lineBreaksComputer.finalize();let st=0;for(let Ve=0;Ve<this._pendingLineChange.length;Ve++){const Me=this._pendingLineChange[Ve],Be=this._pendingViewZones[Ve],We=Be.domNode;(0,t.applyFontInfo)(We,ve);const $e=Be.marginDomNode;(0,t.applyFontInfo)($e,ve);const Ue=[];if(Me.charChanges)for(const ot of Me.charChanges)me(ot)&&Ue.push(new I.InlineDecoration(new C.Range(ot.originalStartLineNumber,ot.originalStartColumn,ot.originalEndLineNumber,ot.originalEndColumn),"char-delete",0));const Xe=Ue.length>0,Je=new f.StringBuilder(1e4);let nt=0,dt=0,Ge=null;for(let ot=Me.originalStartLineNumber;ot<=Me.originalEndLineNumber;ot++){const Ze=ot-Me.originalStartLineNumber,Re=this._originalModel.tokenization.getLineTokens(ot),ze=Re.getLineContent(),He=qe[st++],je=L.LineDecoration.filter(Ue,ot,1,ze.length+1);if(He){let tt=0;for(const it of He.breakOffsets){const rt=Re.sliceAndInflate(tt,it,0),at=ze.substring(tt,it);nt=Math.max(nt,this._renderOriginalLine(dt++,at,rt,L.LineDecoration.extractWrapped(je,tt,it),Xe,be,Se,ve,Le,Te,Fe,Oe,xe,Ke,Ye,ae,Je,$e)),tt=it}for(Ge||(Ge=[]);Ge.length<Ze;)Ge[Ge.length]=1;Ge[Ze]=He.breakOffsets.length,Be.heightInLines+=He.breakOffsets.length-1;const Qe=document.createElement("div");Qe.className="gutter-delete",ge.original.push({afterLineNumber:ot,afterColumn:0,heightInLines:He.breakOffsets.length-1,domNode:Ce(),marginDomNode:Qe})}else nt=Math.max(nt,this._renderOriginalLine(dt++,ze,Re,je,Xe,be,Se,ve,Le,Te,Fe,Oe,xe,Ke,Ye,ae,Je,$e))}nt+=Ae;const lt=Je.build(),ut=B?B.createHTML(lt):lt;if(We.innerHTML=ut,Be.minWidthInPx=nt*Ie,Ge){const ot=Me.originalEndLineNumber-Me.originalStartLineNumber;for(;Ge.length<=ot;)Ge[Ge.length]=1}Be.diff.viewLineCounts=Ge}ge.original.sort((Ve,Me)=>Ve.afterLineNumber-Me.afterLineNumber)}_renderOriginalLine(ge,pe,ae,ve,Le,Ie,Ae,be,Se,Te,Pe,Fe,Oe,xe,Ke,Ye,qe,st){qe.appendString(\'<div class="view-line\'),Le||qe.appendString(" char-delete"),qe.appendString(\'" style="top:\'),qe.appendString(String(ge*Te)),qe.appendString(\'px;width:1000000px;">\');const Ve=I.ViewLineRenderingData.isBasicASCII(pe,Ie),Me=I.ViewLineRenderingData.containsRTL(pe,Ve,Ae),Be=(0,E.renderViewLine)(new E.RenderLineInput(be.isMonospace&&!Se,be.canUseHalfwidthRightwardsArrow,pe,!1,Ve,Me,0,ae,ve,Ye,0,be.spaceWidth,be.middotWidth,be.wsmiddotWidth,Fe,Oe,xe,Ke!==d.EditorFontLigatures.OFF,null),qe);if(qe.appendString("</div>"),this._renderIndicators){const We=document.createElement("div");We.className=`delete-sign ${Q.ThemeIcon.asClassName(H)}`,We.setAttribute("style",`position:absolute;top:${ge*Te}px;width:${Pe}px;height:${Te}px;right:0;`),st.appendChild(We)}return Be.characterMapping.getHorizontalOffset(Be.characterMapping.length)}}function ie(De,ge){return(0,d.stringSet)(De,ge,["off","on","inherit"])}function X(De){return De.modifiedEndLineNumber>0}function Z(De){return De.originalEndLineNumber>0}function ue(De){return De.modifiedStartLineNumber===De.modifiedEndLineNumber?De.modifiedEndColumn-De.modifiedStartColumn>0:De.modifiedEndLineNumber-De.modifiedStartLineNumber>0}function me(De){return De.originalStartLineNumber===De.originalEndLineNumber?De.originalEndColumn-De.originalStartColumn>0:De.originalEndLineNumber-De.originalStartLineNumber>0}function Ce(){const De=document.createElement("div");return De.className="diagonal-fill",De}function _e(){const De=document.createElement("div");return De.className="arrow-revert-change "+Q.ThemeIcon.asClassName(_.Codicon.arrowRight),S.$("div",{},De)}function we(De,ge,pe,ae){const ve=De.getLineCount();return pe=Math.min(ve,Math.max(1,pe)),ae=Math.min(ve,Math.max(1,ae)),ge.coordinatesConverter.convertModelRangeToViewRange(new C.Range(pe,De.getLineMinColumn(pe),ae,De.getLineMaxColumn(ae)))}function ye(De,ge){return{enableSplitViewResizing:(0,d.boolean)(De.enableSplitViewResizing,ge.enableSplitViewResizing),renderSideBySide:(0,d.boolean)(De.renderSideBySide,ge.renderSideBySide),renderMarginRevertIcon:(0,d.boolean)(De.renderMarginRevertIcon,ge.renderMarginRevertIcon),maxComputationTime:(0,d.clampedInt)(De.maxComputationTime,ge.maxComputationTime,0,1073741824),maxFileSize:(0,d.clampedInt)(De.maxFileSize,ge.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,d.boolean)(De.ignoreTrimWhitespace,ge.ignoreTrimWhitespace),renderIndicators:(0,d.boolean)(De.renderIndicators,ge.renderIndicators),originalEditable:(0,d.boolean)(De.originalEditable,ge.originalEditable),diffCodeLens:(0,d.boolean)(De.diffCodeLens,ge.diffCodeLens),renderOverviewRuler:(0,d.boolean)(De.renderOverviewRuler,ge.renderOverviewRuler),diffWordWrap:ie(De.diffWordWrap,ge.diffWordWrap),diffAlgorithm:(0,d.stringSet)(De.diffAlgorithm,ge.diffAlgorithm,["smart","experimental"])}}function ke(De,ge){return{enableSplitViewResizing:De.enableSplitViewResizing!==ge.enableSplitViewResizing,renderSideBySide:De.renderSideBySide!==ge.renderSideBySide,renderMarginRevertIcon:De.renderMarginRevertIcon!==ge.renderMarginRevertIcon,maxComputationTime:De.maxComputationTime!==ge.maxComputationTime,maxFileSize:De.maxFileSize!==ge.maxFileSize,ignoreTrimWhitespace:De.ignoreTrimWhitespace!==ge.ignoreTrimWhitespace,renderIndicators:De.renderIndicators!==ge.renderIndicators,originalEditable:De.originalEditable!==ge.originalEditable,diffCodeLens:De.diffCodeLens!==ge.diffCodeLens,renderOverviewRuler:De.renderOverviewRuler!==ge.renderOverviewRuler,diffWordWrap:De.diffWordWrap!==ge.diffWordWrap,diffAlgorithm:De.diffAlgorithm!==ge.diffAlgorithm}}(0,$.registerThemingParticipant)((De,ge)=>{const pe=De.getColor(U.diffDiagonalFill);ge.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${pe} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${pe} 50%, ${pe} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)})}),define(J[153],ee([1,0,45,30,183,25,14,8,43,24,88,33,19]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let i=class extends y.CodeEditorWidget{constructor(r,c,g,o,l,a,d,u,C,f,v,p,L){super(r,Object.assign(Object.assign({},o.getRawOptions()),{overflowWidgetsDomNode:o.getOverflowWidgetsDomNode()}),g,l,a,d,u,C,f,v,p,L),this._parentEditor=o,this._overwriteOptions=c,super.updateOptions(this._overwriteOptions),this._register(o.onDidChangeConfiguration(E=>this._onParentConfigurationChanged(E)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(r){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(r){S.mixin(this._overwriteOptions,r,!0),super.updateOptions(this._overwriteOptions)}};i=Ne([fe(4,b.IInstantiationService),fe(5,k.ICodeEditorService),fe(6,D.ICommandService),fe(7,w.IContextKeyService),fe(8,h.IThemeService),fe(9,_.INotificationService),fe(10,m.IAccessibilityService),fe(11,n.ILanguageConfigurationService),fe(12,t.ILanguageFeaturesService)],i),e.EmbeddedCodeEditorWidget=i}),define(J[821],ee([1,0,12,2,15,13,5,23,22,48,39,587,28,31,24,404]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const r=(0,i.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},n.localize(0,null));class c extends y.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:n.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3160,weight:100}})}run(u,C){var f;(f=a.get(C))===null||f===void 0||f.jumpToBracket()}}class g extends y.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:n.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(u,C,f){var v;let p=!0;f&&f.selectBrackets===!1&&(p=!1),(v=a.get(C))===null||v===void 0||v.selectToBracket(p)}}class o extends y.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:n.localize(3,null),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(u,C){var f;(f=a.get(C))===null||f===void 0||f.removeBrackets(this.id)}}class l{constructor(u,C,f){this.position=u,this.brackets=C,this.options=f}}class a extends k.Disposable{static get(u){return u.getContribution(a.ID)}constructor(u){super(),this._editor=u,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new S.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(u.onDidChangeCursorPosition(C=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(u.onDidChangeModelContent(C=>{this._updateBracketsSoon.schedule()})),this._register(u.onDidChangeModel(C=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(u.onDidChangeModelLanguageConfiguration(C=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(u.onDidChangeConfiguration(C=>{C.hasChanged(69)&&(this._matchBrackets=this._editor.getOption(69),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(u.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(u.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const u=this._editor.getModel(),C=this._editor.getSelections().map(f=>{const v=f.getStartPosition(),p=u.bracketPairs.matchBracket(v);let L=null;if(p)p[0].containsPosition(v)&&!p[1].containsPosition(v)?L=p[1].getStartPosition():p[1].containsPosition(v)&&(L=p[0].getStartPosition());else{const E=u.bracketPairs.findEnclosingBrackets(v);if(E)L=E[1].getStartPosition();else{const I=u.bracketPairs.findNextBracket(v);I&&I.range&&(L=I.range.getStartPosition())}}return L?new b.Selection(L.lineNumber,L.column,L.lineNumber,L.column):new b.Selection(v.lineNumber,v.column,v.lineNumber,v.column)});this._editor.setSelections(C),this._editor.revealRange(C[0])}selectToBracket(u){if(!this._editor.hasModel())return;const C=this._editor.getModel(),f=[];this._editor.getSelections().forEach(v=>{const p=v.getStartPosition();let L=C.bracketPairs.matchBracket(p);if(!L&&(L=C.bracketPairs.findEnclosingBrackets(p),!L)){const T=C.bracketPairs.findNextBracket(p);T&&T.range&&(L=C.bracketPairs.matchBracket(T.range.getStartPosition()))}let E=null,I=null;if(L){L.sort(w.Range.compareRangesUsingStarts);const[T,F]=L;if(E=u?T.getStartPosition():T.getEndPosition(),I=u?F.getEndPosition():F.getStartPosition(),F.containsPosition(p)){const R=E;E=I,I=R}}E&&I&&f.push(new b.Selection(E.lineNumber,E.column,I.lineNumber,I.column))}),f.length>0&&(this._editor.setSelections(f),this._editor.revealRange(f[0]))}removeBrackets(u){if(!this._editor.hasModel())return;const C=this._editor.getModel();this._editor.getSelections().forEach(f=>{const v=f.getPosition();let p=C.bracketPairs.matchBracket(v);p||(p=C.bracketPairs.findEnclosingBrackets(v)),p&&(this._editor.pushUndoStop(),this._editor.executeEdits(u,[{range:p[0],text:""},{range:p[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const u=[];let C=0;for(const f of this._lastBracketsData){const v=f.brackets;v&&(u[C++]={range:v[0],options:f.options},u[C++]={range:v[1],options:f.options})}this._decorations.set(u)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const u=this._editor.getSelections();if(u.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const C=this._editor.getModel(),f=C.getVersionId();let v=[];this._lastVersionId===f&&(v=this._lastBracketsData);const p=[];let L=0;for(let R=0,M=u.length;R<M;R++){const N=u[R];N.isEmpty()&&(p[L++]=N.getStartPosition())}p.length>1&&p.sort(D.Position.compare);const E=[];let I=0,T=0;const F=v.length;for(let R=0,M=p.length;R<M;R++){const N=p[R];for(;T<F&&v[T].position.isBefore(N);)T++;if(T<F&&v[T].position.equals(N))E[I++]=v[T];else{let A=C.bracketPairs.matchBracket(N,20),P=a._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!A&&this._matchBrackets==="always"&&(A=C.bracketPairs.findEnclosingBrackets(N,20),P=a._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),E[I++]=new l(N,A,P)}}this._lastBracketsData=E,this._lastVersionId=f}}a.ID="editor.contrib.bracketMatchingController",a._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=m.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,s.themeColorFromId)(r),position:h.OverviewRulerLane.Center}}),a._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=m.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),e.BracketMatchingController=a,(0,y.registerEditorContribution)(a.ID,a,1),(0,y.registerEditorAction)(g),(0,y.registerEditorAction)(c),(0,y.registerEditorAction)(o),t.MenuRegistry.appendMenuItem(t.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:n.localize(4,null)},order:2})}),define(J[822],ee([1,0,7,140,5,39,406]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class w{constructor(t,i,s){this.afterColumn=1073741824,this.afterLineNumber=t,this.heightInPx=i,this._onHeight=s,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(t){this._lastHeight===void 0?this._lastHeight=t:this._lastHeight!==t&&(this._lastHeight=t,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class b{constructor(t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=t,this._id=`codelens.widget-${b._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(t,i){this._commands.clear();const s=[];let r=!1;for(let c=0;c<t.length;c++){const g=t[c];if(g&&(r=!0,g.command)){const o=(0,k.renderLabelWithIcons)(g.command.title.trim());g.command.id?(s.push(S.$("a",{id:String(c),title:g.command.tooltip,role:"button"},...o)),this._commands.set(String(c),g.command)):s.push(S.$("span",{title:g.command.tooltip},...o)),c+1<t.length&&s.push(S.$("span",void 0,"\\xA0|\\xA0"))}}r?(S.reset(this._domNode,...s),this._isEmpty&&i&&this._domNode.classList.add("fadein"),this._isEmpty=!1):S.reset(this._domNode,S.$("span",void 0,"no commands"))}getCommand(t){return t.parentElement===this._domNode?this._commands.get(t.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(t){const i=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:i},preference:[1]}}getPosition(){return this._widgetPosition||null}}b._idPool=0;class _{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(t,i){this._addDecorations.push(t),this._addDecorationsCallbacks.push(i)}removeDecoration(t){this._removeDecorations.push(t)}commit(t){const i=t.deltaDecorations(this._removeDecorations,this._addDecorations);for(let s=0,r=i.length;s<r;s++)this._addDecorationsCallbacks[s](i[s])}}e.CodeLensHelper=_;const h=D.ModelDecorationOptions.register({collapseOnReplaceEdit:!0,description:"codelens"});class m{constructor(t,i,s,r,c,g){this._isDisposed=!1,this._editor=i,this._data=t,this._decorationIds=[];let o;const l=[];this._data.forEach((a,d)=>{a.symbol.command&&l.push(a.symbol),s.addDecoration({range:a.symbol.range,options:h},u=>this._decorationIds[d]=u),o?o=y.Range.plusRange(o,a.symbol.range):o=y.Range.lift(a.symbol.range)}),this._viewZone=new w(o.startLineNumber-1,c,g),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new b(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(t,i){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],i?.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((t,i)=>{const s=this._editor.getModel().getDecorationRange(t),r=this._data[i].symbol;return!!(s&&y.Range.isEmpty(r.range)===s.isEmpty())})}updateCodeLensSymbols(t,i){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],this._data=t,this._data.forEach((s,r)=>{i.addDecoration({range:s.symbol.range,options:h},c=>this._decorationIds[r]=c)})}updateHeight(t,i){this._viewZone.heightInPx=t,i.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(t){if(!this._viewZone.isVisible())return null;for(let i=0;i<this._decorationIds.length;i++){const s=t.getDecorationRange(this._decorationIds[i]);s&&(this._data[i].symbol.range=s)}return this._data}updateCommands(t){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(t,!0);for(let i=0;i<this._data.length;i++){const s=t[i];if(s){const{symbol:r}=this._data[i];r.command=s.command||r.command}}}getCommand(t){var i;return(i=this._contentWidget)===null||i===void 0?void 0:i.getCommand(t)}getLineNumber(){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return t?t.startLineNumber:-1}update(t){if(this.isValid()){const i=this._editor.getModel().getDecorationRange(this._decorationIds[0]);i&&(this._viewZone.afterLineNumber=i.startLineNumber-1,t.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(i.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}e.CodeLensWidget=m}),define(J[823],ee([1,0,12,11,2,114,15,40,22,305,737,822,597,25,43,78,70,19]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let o=class{constructor(a,d,u,C,f,v){this._editor=a,this._languageFeaturesService=d,this._commandService=C,this._notificationService=f,this._codeLensCache=v,this._disposables=new y.DisposableStore,this._localToDispose=new y.DisposableStore,this._lenses=[],this._oldCodeLensModels=new y.DisposableStore,this._provideCodeLensDebounce=u.for(d.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=u.for(d.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new S.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(p=>{(p.hasChanged(48)||p.hasChanged(17)||p.hasChanged(16))&&this._updateLensStyle(),p.hasChanged(15)&&this._onModelChange()})),this._disposables.add(d.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var a;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(a=this._currentCodeLensModel)===null||a===void 0||a.dispose()}_getLayoutInfo(){const a=Math.max(1.3,this._editor.getOption(64)/this._editor.getOption(50));let d=this._editor.getOption(17);return(!d||d<5)&&(d=this._editor.getOption(50)*.9|0),{fontSize:d,codeLensHeight:d*a|0}}_updateLensStyle(){const{codeLensHeight:a,fontSize:d}=this._getLayoutInfo(),u=this._editor.getOption(16),C=this._editor.getOption(48),{style:f}=this._editor.getContainerDomNode();f.setProperty("--vscode-editorCodeLens-lineHeight",`${a}px`),f.setProperty("--vscode-editorCodeLens-fontSize",`${d}px`),f.setProperty("--vscode-editorCodeLens-fontFeatureSettings",C.fontFeatureSettings),u&&(f.setProperty("--vscode-editorCodeLens-fontFamily",u),f.setProperty("--vscode-editorCodeLens-fontFamilyDefault",b.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(v=>{for(const p of this._lenses)p.updateHeight(a,v)})}_localDispose(){var a,d,u;(a=this._getCodeLensModelPromise)===null||a===void 0||a.cancel(),this._getCodeLensModelPromise=void 0,(d=this._resolveCodeLensesPromise)===null||d===void 0||d.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(u=this._currentCodeLensModel)===null||u===void 0||u.dispose()}_onModelChange(){this._localDispose();const a=this._editor.getModel();if(!a||!this._editor.getOption(15))return;const d=this._codeLensCache.get(a);if(d&&this._renderCodeLensSymbols(d),!this._languageFeaturesService.codeLensProvider.has(a)){d&&this._localToDispose.add((0,S.disposableTimeout)(()=>{const C=this._codeLensCache.get(a);d===C&&(this._codeLensCache.delete(a),this._onModelChange())},30*1e3));return}for(const C of this._languageFeaturesService.codeLensProvider.all(a))if(typeof C.onDidChange=="function"){const f=C.onDidChange(()=>u.schedule());this._localToDispose.add(f)}const u=new S.RunOnceScheduler(()=>{var C;const f=Date.now();(C=this._getCodeLensModelPromise)===null||C===void 0||C.cancel(),this._getCodeLensModelPromise=(0,S.createCancelablePromise)(v=>(0,h.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,a,v)),this._getCodeLensModelPromise.then(v=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=v,this._codeLensCache.put(a,v);const p=this._provideCodeLensDebounce.update(a,Date.now()-f);u.delay=p,this._renderCodeLensSymbols(v),this._resolveCodeLensesInViewportSoon()},k.onUnexpectedError)},this._provideCodeLensDebounce.get(a));this._localToDispose.add(u),this._localToDispose.add((0,y.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(C=>{this._editor.changeViewZones(f=>{const v=[];let p=-1;this._lenses.forEach(E=>{!E.isValid()||p===E.getLineNumber()?v.push(E):(E.update(f),p=E.getLineNumber())});const L=new n.CodeLensHelper;v.forEach(E=>{E.dispose(L,f),this._lenses.splice(this._lenses.indexOf(E),1)}),L.commit(C)})}),u.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{u.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(C=>{C.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,y.toDisposable)(()=>{if(this._editor.getModel()){const C=D.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(f=>{this._editor.changeViewZones(v=>{this._disposeAllLenses(f,v)})}),C.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(C=>{if(C.target.type!==9)return;let f=C.target.element;if(f?.tagName==="SPAN"&&(f=f.parentElement),f?.tagName==="A")for(const v of this._lenses){const p=v.getCommand(f);if(p){this._commandService.executeCommand(p.id,...p.arguments||[]).catch(L=>this._notificationService.error(L));break}}})),u.schedule()}_disposeAllLenses(a,d){const u=new n.CodeLensHelper;for(const C of this._lenses)C.dispose(u,d);a&&u.commit(a),this._lenses.length=0}_renderCodeLensSymbols(a){if(!this._editor.hasModel())return;const d=this._editor.getModel().getLineCount(),u=[];let C;for(const p of a.lenses){const L=p.symbol.range.startLineNumber;L<1||L>d||(C&&C[C.length-1].symbol.range.startLineNumber===L?C.push(p):(C=[p],u.push(C)))}if(!u.length&&!this._lenses.length)return;const f=D.StableEditorScrollState.capture(this._editor),v=this._getLayoutInfo();this._editor.changeDecorations(p=>{this._editor.changeViewZones(L=>{const E=new n.CodeLensHelper;let I=0,T=0;for(;T<u.length&&I<this._lenses.length;){const F=u[T][0].symbol.range.startLineNumber,R=this._lenses[I].getLineNumber();R<F?(this._lenses[I].dispose(E,L),this._lenses.splice(I,1)):R===F?(this._lenses[I].updateCodeLensSymbols(u[T],E),T++,I++):(this._lenses.splice(I,0,new n.CodeLensWidget(u[T],this._editor,E,L,v.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),I++,T++)}for(;I<this._lenses.length;)this._lenses[I].dispose(E,L),this._lenses.splice(I,1);for(;T<u.length;)this._lenses.push(new n.CodeLensWidget(u[T],this._editor,E,L,v.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),T++;E.commit(p)})}),f.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var a;(a=this._resolveCodeLensesPromise)===null||a===void 0||a.cancel(),this._resolveCodeLensesPromise=void 0;const d=this._editor.getModel();if(!d)return;const u=[],C=[];if(this._lenses.forEach(p=>{const L=p.computeIfNecessary(d);L&&(u.push(L),C.push(p))}),u.length===0)return;const f=Date.now(),v=(0,S.createCancelablePromise)(p=>{const L=u.map((E,I)=>{const T=new Array(E.length),F=E.map((R,M)=>!R.symbol.command&&typeof R.provider.resolveCodeLens=="function"?Promise.resolve(R.provider.resolveCodeLens(d,R.symbol,p)).then(N=>{T[M]=N},k.onUnexpectedExternalError):(T[M]=R.symbol,Promise.resolve(void 0)));return Promise.all(F).then(()=>{!p.isCancellationRequested&&!C[I].isDisposed()&&C[I].updateCommands(T)})});return Promise.all(L)});this._resolveCodeLensesPromise=v,this._resolveCodeLensesPromise.then(()=>{const p=this._resolveCodeLensesDebounce.update(d,Date.now()-f);this._resolveCodeLensesScheduler.delay=p,this._currentCodeLensModel&&this._codeLensCache.put(d,this._currentCodeLensModel),this._oldCodeLensModels.clear(),v===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},p=>{(0,k.onUnexpectedError)(p),v===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};o.ID="css.editor.codeLens",o=Ne([fe(1,g.ILanguageFeaturesService),fe(2,c.ILanguageFeatureDebounceService),fe(3,i.ICommandService),fe(4,s.INotificationService),fe(5,m.ICodeLensCache)],o),e.CodeLensContribution=o,(0,w.registerEditorContribution)(o.ID,o,1),(0,w.registerEditorAction)(class extends w.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:_.EditorContextKeys.hasCodeLensProvider,label:(0,t.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}run(a,d){return Ee(this,void 0,void 0,function*(){if(!d.hasModel())return;const u=a.get(r.IQuickInputService),C=a.get(i.ICommandService),f=a.get(s.INotificationService),v=d.getSelection().positionLineNumber,p=d.getContribution(o.ID);if(!p)return;const L=p.getModel();if(!L)return;const E=[];for(const T of L.lenses)T.symbol.command&&T.symbol.range.startLineNumber===v&&E.push({label:T.symbol.command.title,command:T.symbol.command});if(E.length===0)return;const I=yield u.pick(E,{canPickMany:!1});if(I){if(L.isDisposed)return yield C.executeCommand(this.id);try{yield C.executeCommand(I.command.id,...I.command.arguments||[])}catch(T){f.error(T)}}})}})}),define(J[333],ee([1,0,12,37,11,6,2,60,9,151,15,5,39,70,19,306,27]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecoratorLimitReporter=e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});let g=class qi extends w.Disposable{constructor(a,d,u,C){super(),this._editor=a,this._configurationService=d,this._languageFeaturesService=u,this._localToDispose=this._register(new w.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new h.DynamicCssRules(this._editor),this._decoratorLimitReporter=new o,this._colorDecorationClassRefs=this._register(new w.DisposableStore),this._debounceInformation=C.for(u.colorProvider,"Document Colors",{min:qi.RECOMPUTE_TIME}),this._register(a.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(a.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(u.colorProvider.onDidChange(()=>this.onModelChanged())),this._register(a.onDidChangeConfiguration(f=>{const v=this._isEnabled;this._isEnabled=this.isEnabled(),(v!==this._isEnabled||f.hasChanged(19))&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const a=this._editor.getModel();if(!a)return!1;const d=a.getLanguageId(),u=this._configurationService.getValue(d);if(u&&typeof u=="object"){const C=u.colorDecorators;if(C&&C.enable!==void 0&&!C.enable)return C.enable}return this._editor.getOption(18)}static get(a){return a.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const a=this._editor.getModel();!a||!this._languageFeaturesService.colorProvider.has(a)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new S.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(a)))})),this.beginCompute())}beginCompute(){this._computePromise=(0,S.createCancelablePromise)(a=>Ee(this,void 0,void 0,function*(){const d=this._editor.getModel();if(!d)return Promise.resolve([]);const u=new b.StopWatch(!1),C=yield(0,r.getColors)(this._languageFeaturesService.colorProvider,d,a);return this._debounceInformation.update(d,u.elapsed()),C})),this._computePromise.then(a=>{this.updateDecorations(a),this.updateColorDecorators(a),this._computePromise=null},y.onUnexpectedError)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(a){const d=a.map(u=>({range:{startLineNumber:u.colorInfo.range.startLineNumber,startColumn:u.colorInfo.range.startColumn,endLineNumber:u.colorInfo.range.endLineNumber,endColumn:u.colorInfo.range.endColumn},options:t.ModelDecorationOptions.EMPTY}));this._editor.changeDecorations(u=>{this._decorationsIds=u.deltaDecorations(this._decorationsIds,d),this._colorDatas=new Map,this._decorationsIds.forEach((C,f)=>this._colorDatas.set(C,a[f]))})}updateColorDecorators(a){this._colorDecorationClassRefs.clear();const d=[],u=this._editor.getOption(19);for(let f=0;f<a.length&&d.length<u;f++){const{red:v,green:p,blue:L,alpha:E}=a[f].colorInfo.color,I=new k.RGBA(Math.round(v*255),Math.round(p*255),Math.round(L*255),E),T=`rgba(${I.r}, ${I.g}, ${I.b}, ${I.a})`,F=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:T}));d.push({range:{startLineNumber:a[f].colorInfo.range.startLineNumber,startColumn:a[f].colorInfo.range.startColumn,endLineNumber:a[f].colorInfo.range.endLineNumber,endColumn:a[f].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:_.noBreakWhitespace,inlineClassName:`${F.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}const C=u<a.length?u:!1;this._decoratorLimitReporter.update(a.length,C),this._colorDecoratorIds.set(d)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(a){const d=this._editor.getModel();if(!d)return null;const u=d.getDecorationsInRange(n.Range.fromPositions(a,a)).filter(C=>this._colorDatas.has(C.id));return u.length===0?null:this._colorDatas.get(u[0].id)}isColorDecoration(a){return this._colorDecoratorIds.has(a)}};g.ID="editor.contrib.colorDetector",g.RECOMPUTE_TIME=1e3,g=Ne([fe(1,c.IConfigurationService),fe(2,s.ILanguageFeaturesService),fe(3,i.ILanguageFeatureDebounceService)],g),e.ColorDetector=g;class o{constructor(){this._onDidChange=new D.Emitter,this._computed=0,this._limited=!1}update(a,d){(a!==this._computed||d!==this._limited)&&(this._computed=a,this._limited=d,this._onDidChange.fire())}}e.DecoratorLimitReporter=o,(0,m.registerEditorContribution)(g.ID,g,1)}),define(J[824],ee([1,0,12,21,37,2,5,306,333,566,773,24]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorHoverParticipant=e.ColorHover=void 0;class t{constructor(r,c,g,o){this.owner=r,this.range=c,this.model=g,this.provider=o,this.forceShowAtRange=!0}isValidForHoverAnchor(r){return r.type===1&&this.range.startColumn<=r.range.startColumn&&this.range.endColumn>=r.range.endColumn}}e.ColorHover=t;let i=class{constructor(r,c){this._editor=r,this._themeService=c,this.hoverOrdinal=2}computeSync(r,c){return[]}computeAsync(r,c,g){return S.AsyncIterableObject.fromPromise(this._computeAsync(r,c,g))}_computeAsync(r,c,g){return Ee(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const o=_.ColorDetector.get(this._editor);if(!o)return[];for(const l of c){if(!o.isColorDecoration(l))continue;const a=o.getColorData(l.range.getStartPosition());if(a)return[yield this._createColorHover(this._editor.getModel(),a.colorInfo,a.provider)]}return[]})}_createColorHover(r,c,g){return Ee(this,void 0,void 0,function*(){const o=r.getValueInRange(c.range),{red:l,green:a,blue:d,alpha:u}=c.color,C=new y.RGBA(Math.round(l*255),Math.round(a*255),Math.round(d*255),u),f=new y.Color(C),v=yield(0,b.getColorPresentations)(r,c,g,k.CancellationToken.None),p=new h.ColorPickerModel(f,[],0);return p.colorPresentations=v||[],p.guessColorPresentation(f,o),new t(this,w.Range.lift(c.range),p,g)})}renderHoverParts(r,c){if(c.length===0||!this._editor.hasModel())return D.Disposable.None;const g=new D.DisposableStore,o=c[0],l=this._editor.getModel(),a=o.model,d=g.add(new m.ColorPickerWidget(r.fragment,a,this._editor.getOption(137),this._themeService));r.setColorPicker(d);let u=new w.Range(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);const C=()=>{let v,p;if(a.presentation.textEdit){v=[a.presentation.textEdit],p=new w.Range(a.presentation.textEdit.range.startLineNumber,a.presentation.textEdit.range.startColumn,a.presentation.textEdit.range.endLineNumber,a.presentation.textEdit.range.endColumn);const L=this._editor.getModel()._setTrackedRange(null,p,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",v),p=this._editor.getModel()._getTrackedRange(L)||p}else v=[{range:u,text:a.presentation.label,forceMoveMarkers:!1}],p=u.setEndPosition(u.endLineNumber,u.startColumn+a.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",v);a.presentation.additionalTextEdits&&(v=[...a.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",v),r.hide()),this._editor.pushUndoStop(),u=p},f=v=>(0,b.getColorPresentations)(l,{range:u,color:{red:v.rgba.r/255,green:v.rgba.g/255,blue:v.rgba.b/255,alpha:v.rgba.a}},o.provider,k.CancellationToken.None).then(p=>{a.colorPresentations=p||[]});return g.add(a.onColorFlushed(v=>{f(v).then(C)})),g.add(a.onDidChangeColor(f)),g}};i=Ne([fe(1,n.IThemeService)],i),e.ColorHoverParticipant=i}),define(J[825],ee([1,0,2,17,15,13,5,23,39,502,408]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function m(t){return k.isMacintosh?t.altKey:t.ctrlKey}class n extends S.Disposable{constructor(i){super(),this._editor=i,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(s=>this._onEditorMouseDown(s))),this._register(this._editor.onMouseUp(s=>this._onEditorMouseUp(s))),this._register(this._editor.onMouseDrag(s=>this._onEditorMouseDrag(s))),this._register(this._editor.onMouseDrop(s=>this._onEditorMouseDrop(s))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(s=>this.onEditorKeyDown(s))),this._register(this._editor.onKeyUp(s=>this.onEditorKeyUp(s))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(i){!this._editor.getOption(33)||this._editor.getOption(20)||(m(i)&&(this._modifierPressed=!0),this._mouseDown&&m(i)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(i){!this._editor.getOption(33)||this._editor.getOption(20)||(m(i)&&(this._modifierPressed=!1),this._mouseDown&&i.keyCode===n.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(i){this._mouseDown=!0}_onEditorMouseUp(i){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(i){const s=i.target;if(this._dragSelection===null){const c=(this._editor.getSelections()||[]).filter(g=>s.position&&g.containsPosition(s.position));if(c.length===1)this._dragSelection=c[0];else return}m(i.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),s.position&&(this._dragSelection.containsPosition(s.position)?this._removeDecoration():this.showAt(s.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(i){if(i.target&&(this._hitContent(i.target)||this._hitMargin(i.target))&&i.target.position){const s=new D.Position(i.target.position.lineNumber,i.target.position.column);if(this._dragSelection===null){let r=null;if(i.event.shiftKey){const c=this._editor.getSelection();if(c){const{selectionStartLineNumber:g,selectionStartColumn:o}=c;r=[new b.Selection(g,o,s.lineNumber,s.column)]}}else r=(this._editor.getSelections()||[]).map(c=>c.containsPosition(s)?new b.Selection(s.lineNumber,s.column,s.lineNumber,s.column):c);this._editor.setSelections(r||[],"mouse",3)}else(!this._dragSelection.containsPosition(s)||(m(i.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(s)||this._dragSelection.getStartPosition().equals(s)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(n.ID,new h.DragAndDropCommand(this._dragSelection,s,m(i.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(i){this._dndDecorationIds.set([{range:new w.Range(i.lineNumber,i.column,i.lineNumber,i.column),options:n._DECORATION_OPTIONS}]),this._editor.revealPosition(i,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(i){return i.type===6||i.type===7}_hitMargin(i){return i.type===2||i.type===3||i.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}n.ID="editor.contrib.dragAndDrop",n.TRIGGER_KEY_VALUE=k.isMacintosh?6:5,n._DECORATION_OPTIONS=_.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),e.DragAndDropController=n,(0,y.registerEditorContribution)(n.ID,n,2)}),define(J[826],ee([1,0,5,48,39,31,24]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class b{constructor(h){this._editor=h,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(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 h=this._findScopeDecorationIds.map(m=>this._editor.getModel().getDecorationRange(m)).filter(m=>!!m);if(h.length)return h}return null}getStartPosition(){return this._startPosition}setStartPosition(h){this._startPosition=h,this.setCurrentFindMatch(null)}_getDecorationIndex(h){const m=this._decorations.indexOf(h);return m>=0?m+1:1}getDecorationRangeAt(h){const m=h<this._decorations.length?this._decorations[h]:null;return m?this._editor.getModel().getDecorationRange(m):null}getCurrentMatchesPosition(h){const m=this._editor.getModel().getDecorationsInRange(h);for(const n of m){const t=n.options;if(t===b._FIND_MATCH_DECORATION||t===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(h){let m=null,n=0;if(h)for(let t=0,i=this._decorations.length;t<i;t++){const s=this._editor.getModel().getDecorationRange(this._decorations[t]);if(h.equalsRange(s)){m=this._decorations[t],n=t+1;break}}return(this._highlightedDecorationId!==null||m!==null)&&this._editor.changeDecorations(t=>{if(this._highlightedDecorationId!==null&&(t.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),m!==null&&(this._highlightedDecorationId=m,t.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(t.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),m!==null){let i=this._editor.getModel().getDecorationRange(m);if(i.startLineNumber!==i.endLineNumber&&i.endColumn===1){const s=i.endLineNumber-1,r=this._editor.getModel().getLineMaxColumn(s);i=new S.Range(i.startLineNumber,i.startColumn,s,r)}this._rangeHighlightDecorationId=t.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}}),n}set(h,m){this._editor.changeDecorations(n=>{let t=b._FIND_MATCH_DECORATION;const i=[];if(h.length>1e3){t=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const r=this._editor.getModel().getLineCount(),g=this._editor.getLayoutInfo().height/r,o=Math.max(2,Math.ceil(3/g));let l=h[0].range.startLineNumber,a=h[0].range.endLineNumber;for(let d=1,u=h.length;d<u;d++){const C=h[d].range;a+o>=C.startLineNumber?C.endLineNumber>a&&(a=C.endLineNumber):(i.push({range:new S.Range(l,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),l=C.startLineNumber,a=C.endLineNumber)}i.push({range:new S.Range(l,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(h.length);for(let r=0,c=h.length;r<c;r++)s[r]={range:h[r].range,options:t};this._decorations=n.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,i),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(r=>n.removeDecoration(r)),this._findScopeDecorationIds=[]),m?.length&&(this._findScopeDecorationIds=m.map(r=>n.addDecoration(r,b._FIND_SCOPE_DECORATION)))})}matchBeforePosition(h){if(this._decorations.length===0)return null;for(let m=this._decorations.length-1;m>=0;m--){const n=this._decorations[m],t=this._editor.getModel().getDecorationRange(n);if(!(!t||t.endLineNumber>h.lineNumber)){if(t.endLineNumber<h.lineNumber)return t;if(!(t.endColumn>h.column))return t}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(h){if(this._decorations.length===0)return null;for(let m=0,n=this._decorations.length;m<n;m++){const t=this._decorations[m],i=this._editor.getModel().getDecorationRange(t);if(!(!i||i.startLineNumber<h.lineNumber)){if(i.startLineNumber>h.lineNumber)return i;if(!(i.startColumn<h.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let h=[];return h=h.concat(this._decorations),h=h.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&h.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&h.push(this._rangeHighlightDecorationId),h}}b._CURRENT_FIND_MATCH_DECORATION=y.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,w.themeColorFromId)(D.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,w.themeColorFromId)(D.minimapFindMatch),position:k.MinimapPosition.Inline}}),b._FIND_MATCH_DECORATION=y.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,w.themeColorFromId)(D.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,w.themeColorFromId)(D.minimapFindMatch),position:k.MinimapPosition.Inline}}),b._FIND_MATCH_NO_OVERVIEW_DECORATION=y.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),b._FIND_MATCH_ONLY_OVERVIEW_DECORATION=y.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,w.themeColorFromId)(D.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center}}),b._RANGE_HIGHLIGHT_DECORATION=y.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),b._FIND_SCOPE_DECORATION=y.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0}),e.FindDecorations=b}),define(J[184],ee([1,0,16,12,2,118,13,5,23,170,826,503,504,14]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"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_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new i.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new i.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new i.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},e.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},e.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},e.ToggleSearchScopeKeybinding={primary:554,mac:{primary:2602}},e.TogglePreserveCaseKeybinding={primary:558,mac:{primary:2606}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",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 s=240;class r{constructor(g,o){this._toDispose=new y.DisposableStore,this._editor=g,this._state=o,this._isDisposed=!1,this._startSearchingTimer=new k.TimeoutTimer,this._decorations=new m.FindDecorations(g),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new k.RunOnceScheduler(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(l=>{(l.reason===3||l.reason===5||l.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(l=>{this._ignoreModelContentChanged||(l.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(l=>this._onStateChanged(l))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,y.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(g){this._isDisposed||this._editor.hasModel()&&(g.searchString||g.isReplaceRevealed||g.isRegex||g.wholeWord||g.matchCase||g.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{g.searchScope?this.research(g.moveCursor,this._state.searchScope):this.research(g.moveCursor)},s)):g.searchScope?this.research(g.moveCursor,this._state.searchScope):this.research(g.moveCursor))}static _getSearchRange(g,o){return o||g.getFullModelRange()}research(g,o){let l=null;typeof o<"u"?o!==null&&(Array.isArray(o)?l=o:l=[o]):l=this._decorations.getFindScopes(),l!==null&&(l=l.map(C=>{if(C.startLineNumber!==C.endLineNumber){let f=C.endLineNumber;return C.endColumn===1&&(f=f-1),new b.Range(C.startLineNumber,1,f,this._editor.getModel().getLineMaxColumn(f))}return C}));const a=this._findMatches(l,!1,e.MATCHES_LIMIT);this._decorations.set(a,l);const d=this._editor.getSelection();let u=this._decorations.getCurrentMatchesPosition(d);if(u===0&&a.length>0){const C=(0,S.findFirstInSorted)(a.map(f=>f.range),f=>b.Range.compareRangesUsingStarts(f,d)>=0);u=C>0?C-1+1:u}this._state.changeMatchInfo(u,this._decorations.getCount(),void 0),g&&this._editor.getOption(39).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const g=this._decorations.getFindScope();return g&&this._editor.revealRangeInCenterIfOutsideViewport(g,0),!0}return!1}_setCurrentFindMatch(g){const o=this._decorations.setCurrentFindMatch(g);this._state.changeMatchInfo(o,this._decorations.getCount(),g),this._editor.setSelection(g),this._editor.revealRangeInCenterIfOutsideViewport(g,0)}_prevSearchPosition(g){const o=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:l,column:a}=g;const d=this._editor.getModel();return o||a===1?(l===1?l=d.getLineCount():l--,a=d.getLineMaxColumn(l)):a--,new w.Position(l,a)}_moveToPrevMatch(g,o=!1){if(!this._state.canNavigateBack()){const p=this._decorations.matchAfterPosition(g);p&&this._setCurrentFindMatch(p);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let p=this._decorations.matchBeforePosition(g);p&&p.isEmpty()&&p.getStartPosition().equals(g)&&(g=this._prevSearchPosition(g),p=this._decorations.matchBeforePosition(g)),p&&this._setCurrentFindMatch(p);return}if(this._cannotFind())return;const l=this._decorations.getFindScope(),a=r._getSearchRange(this._editor.getModel(),l);a.getEndPosition().isBefore(g)&&(g=a.getEndPosition()),g.isBefore(a.getStartPosition())&&(g=a.getEndPosition());const{lineNumber:d,column:u}=g,C=this._editor.getModel();let f=new w.Position(d,u),v=C.findPreviousMatch(this._state.searchString,f,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,!1);if(v&&v.range.isEmpty()&&v.range.getStartPosition().equals(f)&&(f=this._prevSearchPosition(f),v=C.findPreviousMatch(this._state.searchString,f,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,!1)),!!v){if(!o&&!a.containsRange(v.range))return this._moveToPrevMatch(v.range.getStartPosition(),!0);this._setCurrentFindMatch(v.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(g){const o=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:l,column:a}=g;const d=this._editor.getModel();return o||a===d.getLineMaxColumn(l)?(l===d.getLineCount()?l=1:l++,a=1):a++,new w.Position(l,a)}_moveToNextMatch(g){if(!this._state.canNavigateForward()){const l=this._decorations.matchBeforePosition(g);l&&this._setCurrentFindMatch(l);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let l=this._decorations.matchAfterPosition(g);l&&l.isEmpty()&&l.getStartPosition().equals(g)&&(g=this._nextSearchPosition(g),l=this._decorations.matchAfterPosition(g)),l&&this._setCurrentFindMatch(l);return}const o=this._getNextMatch(g,!1,!0);o&&this._setCurrentFindMatch(o.range)}_getNextMatch(g,o,l,a=!1){if(this._cannotFind())return null;const d=this._decorations.getFindScope(),u=r._getSearchRange(this._editor.getModel(),d);u.getEndPosition().isBefore(g)&&(g=u.getStartPosition()),g.isBefore(u.getStartPosition())&&(g=u.getStartPosition());const{lineNumber:C,column:f}=g,v=this._editor.getModel();let p=new w.Position(C,f),L=v.findNextMatch(this._state.searchString,p,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,o);return l&&L&&L.range.isEmpty()&&L.range.getStartPosition().equals(p)&&(p=this._nextSearchPosition(p),L=v.findNextMatch(this._state.searchString,p,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,o)),L?!a&&!u.containsRange(L.range)?this._getNextMatch(L.range.getEndPosition(),o,l,!0):L:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(g){const o=this._decorations.getDecorationRangeAt(g);o&&this._setCurrentFindMatch(o)}moveToMatch(g){this._moveToMatch(g)}_getReplacePattern(){return this._state.isRegex?(0,t.parseReplaceString)(this._state.replaceString):t.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const g=this._getReplacePattern(),o=this._editor.getSelection(),l=this._getNextMatch(o.getStartPosition(),!0,!1);if(l)if(o.equalsRange(l.range)){const a=g.buildReplaceString(l.matches,this._state.preserveCase),d=new D.ReplaceCommand(o,a);this._executeEditorCommand("replace",d),this._decorations.setStartPosition(new w.Position(o.startLineNumber,o.startColumn+a.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(l.range)}_findMatches(g,o,l){const a=(g||[null]).map(d=>r._getSearchRange(this._editor.getModel(),d));return this._editor.getModel().findMatches(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null,o,l)}replaceAll(){if(!this._hasMatches())return;const g=this._decorations.getFindScopes();g===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(g),this.research(!1)}_largeReplaceAll(){const o=new h.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(125):null).parseSearchRequest();if(!o)return;let l=o.regex;if(!l.multiline){let L="mu";l.ignoreCase&&(L+="i"),l.global&&(L+="g"),l=new RegExp(l.source,L)}const a=this._editor.getModel(),d=a.getValue(1),u=a.getFullModelRange(),C=this._getReplacePattern();let f;const v=this._state.preserveCase;C.hasReplacementPatterns||v?f=d.replace(l,function(){return C.buildReplaceString(arguments,v)}):f=d.replace(l,C.buildReplaceString(null,v));const p=new D.ReplaceCommandThatPreservesSelection(u,f,this._editor.getSelection());this._executeEditorCommand("replaceAll",p)}_regularReplaceAll(g){const o=this._getReplacePattern(),l=this._findMatches(g,o.hasReplacementPatterns||this._state.preserveCase,1073741824),a=[];for(let u=0,C=l.length;u<C;u++)a[u]=o.buildReplaceString(l[u].matches,this._state.preserveCase);const d=new n.ReplaceAllCommand(this._editor.getSelection(),l.map(u=>u.range),a);this._executeEditorCommand("replaceAll",d)}selectAllMatches(){if(!this._hasMatches())return;const g=this._decorations.getFindScopes();let l=this._findMatches(g,!1,1073741824).map(d=>new _.Selection(d.range.startLineNumber,d.range.startColumn,d.range.endLineNumber,d.range.endColumn));const a=this._editor.getSelection();for(let d=0,u=l.length;d<u;d++)if(l[d].equalsRange(a)){l=[a].concat(l.slice(0,d)).concat(l.slice(d+1));break}this._editor.setSelections(l)}_executeEditorCommand(g,o){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(g,o),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=r}),define(J[827],ee([1,0,7,288,67,12,184,31,409]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class _ extends y.Widget{constructor(m,n,t){super(),this._hideSoon=this._register(new D.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=m,this._state=n,this._keybindingService=t,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const i={inputActiveOptionBorder:(0,b.asCssVariable)(b.inputActiveOptionBorder),inputActiveOptionForeground:(0,b.asCssVariable)(b.inputActiveOptionForeground),inputActiveOptionBackground:(0,b.asCssVariable)(b.inputActiveOptionBackground)};this.caseSensitive=this._register(new k.CaseSensitiveToggle(Object.assign({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},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 k.WholeWordsToggle(Object.assign({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord},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 k.RegexToggle(Object.assign({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex},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(s=>{let r=!1;s.isRegex&&(this.regex.checked=this._state.isRegex,r=!0),s.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,r=!0),s.matchCase&&(this.caseSensitive.checked=this._state.matchCase,r=!0),!this._state.isRevealed&&r&&this._revealTemporarily()})),this._register(S.addDisposableListener(this._domNode,S.EventType.MOUSE_LEAVE,s=>this._onMouseLeave())),this._register(S.addDisposableListener(this._domNode,"mouseover",s=>this._onMouseOver()))}_keybindingLabelFor(m){const n=this._keybindingService.lookupKeybinding(m);return n?` (${n.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return _.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){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")}}_.ID="editor.contrib.findOptionsWidget",e.FindOptionsWidget=_}),define(J[828],ee([1,0,6,2,5,184]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function w(_,h){return _===1?!0:_===2?!1:h}class b extends k.Disposable{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return w(this._isRegexOverride,this._isRegex)}get wholeWord(){return w(this._wholeWordOverride,this._wholeWord)}get matchCase(){return w(this._matchCaseOverride,this._matchCase)}get preserveCase(){return w(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}constructor(){super(),this._onFindReplaceStateChange=this._register(new S.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,this._isSearching=!1,this._filters=null}changeMatchInfo(h,m,n){const t={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,isSearching:!1,filters:!1};let i=!1;m===0&&(h=0),h>m&&(h=m),this._matchesPosition!==h&&(this._matchesPosition=h,t.matchesPosition=!0,i=!0),this._matchesCount!==m&&(this._matchesCount=m,t.matchesCount=!0,i=!0),typeof n<"u"&&(y.Range.equalsRange(this._currentMatch,n)||(this._currentMatch=n,t.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(t)}change(h,m,n=!0){var t;const i={moveCursor:m,updateHistory:n,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,isSearching:!1,filters:!1};let s=!1;const r=this.isRegex,c=this.wholeWord,g=this.matchCase,o=this.preserveCase;typeof h.searchString<"u"&&this._searchString!==h.searchString&&(this._searchString=h.searchString,i.searchString=!0,s=!0),typeof h.replaceString<"u"&&this._replaceString!==h.replaceString&&(this._replaceString=h.replaceString,i.replaceString=!0,s=!0),typeof h.isRevealed<"u"&&this._isRevealed!==h.isRevealed&&(this._isRevealed=h.isRevealed,i.isRevealed=!0,s=!0),typeof h.isReplaceRevealed<"u"&&this._isReplaceRevealed!==h.isReplaceRevealed&&(this._isReplaceRevealed=h.isReplaceRevealed,i.isReplaceRevealed=!0,s=!0),typeof h.isRegex<"u"&&(this._isRegex=h.isRegex),typeof h.wholeWord<"u"&&(this._wholeWord=h.wholeWord),typeof h.matchCase<"u"&&(this._matchCase=h.matchCase),typeof h.preserveCase<"u"&&(this._preserveCase=h.preserveCase),typeof h.searchScope<"u"&&(!((t=h.searchScope)===null||t===void 0)&&t.every(l=>{var a;return(a=this._searchScope)===null||a===void 0?void 0:a.some(d=>!y.Range.equalsRange(d,l))})||(this._searchScope=h.searchScope,i.searchScope=!0,s=!0)),typeof h.loop<"u"&&this._loop!==h.loop&&(this._loop=h.loop,i.loop=!0,s=!0),typeof h.isSearching<"u"&&this._isSearching!==h.isSearching&&(this._isSearching=h.isSearching,i.isSearching=!0,s=!0),typeof h.filters<"u"&&(this._filters?this._filters.update(h.filters):this._filters=h.filters,i.filters=!0,s=!0),this._isRegexOverride=typeof h.isRegexOverride<"u"?h.isRegexOverride:0,this._wholeWordOverride=typeof h.wholeWordOverride<"u"?h.wholeWordOverride:0,this._matchCaseOverride=typeof h.matchCaseOverride<"u"?h.matchCaseOverride:0,this._preserveCaseOverride=typeof h.preserveCaseOverride<"u"?h.preserveCaseOverride:0,r!==this.isRegex&&(s=!0,i.isRegex=!0),c!==this.wholeWord&&(s=!0,i.wholeWord=!0),g!==this.matchCase&&(s=!0,i.matchCase=!0),o!==this.preserveCase&&(s=!0,i.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(i)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=D.MATCHES_LIMIT}}e.FindReplaceState=b}),define(J[829],ee([1,0,7,50,142,141,67,12,29,11,2,17,9,5,184,607,319,693,31,80,24,32,91,18,98,410]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleButton=e.FindWidget=e.FindWidgetViewZone=e.NLS_NO_RESULTS=e.NLS_MATCHES_LOCATION=e.findNextMatchIcon=e.findPreviousMatchIcon=e.findReplaceAllIcon=e.findReplaceIcon=void 0;const v=(0,l.registerIcon)("find-selection",_.Codicon.selection,r.localize(0,null)),p=(0,l.registerIcon)("find-collapsed",_.Codicon.chevronRight,r.localize(1,null)),L=(0,l.registerIcon)("find-expanded",_.Codicon.chevronDown,r.localize(2,null));e.findReplaceIcon=(0,l.registerIcon)("find-replace",_.Codicon.replace,r.localize(3,null)),e.findReplaceAllIcon=(0,l.registerIcon)("find-replace-all",_.Codicon.replaceAll,r.localize(4,null)),e.findPreviousMatchIcon=(0,l.registerIcon)("find-previous-match",_.Codicon.arrowUp,r.localize(5,null)),e.findNextMatchIcon=(0,l.registerIcon)("find-next-match",_.Codicon.arrowDown,r.localize(6,null));const E=r.localize(7,null),I=r.localize(8,null),T=r.localize(9,null),F=r.localize(10,null),R=r.localize(11,null),M=r.localize(12,null),N=r.localize(13,null),A=r.localize(14,null),P=r.localize(15,null),x=r.localize(16,null),W=r.localize(17,null),U=r.localize(18,null,s.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=r.localize(19,null),e.NLS_NO_RESULTS=r.localize(20,null);const O=419,Q=275-54;let se=69;const le=33,te="ctrlEnterReplaceAll.windows.donotask",re=n.isMacintosh?256:2048;class H{constructor(de){this.afterLineNumber=de,this.heightInPx=le,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=H;function B(ne,de,he){const oe=!!de.match(/\\n/);if(he&&oe&&he.selectionStart>0){ne.stopPropagation();return}}function j(ne,de,he){const oe=!!de.match(/\\n/);if(he&&oe&&he.selectionEnd<he.value.length){ne.stopPropagation();return}}class G extends w.Widget{constructor(de,he,oe,ce,z,V,K,ie,X){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=de,this._controller=he,this._state=oe,this._contextViewProvider=ce,this._keybindingService=z,this._contextKeyService=V,this._storageService=ie,this._notificationService=X,this._ctrlEnterReplaceAllWarningPrompted=!!ie.getBoolean(te,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new b.Delayer(500),this._register((0,m.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(87)&&(this._codeEditor.getOption(87)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),Z.hasChanged(139)&&this._tryUpdateWidgetWidth(),Z.hasChanged(2)&&this.updateAccessibilitySupport(),Z.hasChanged(39)){const ue=this._codeEditor.getOption(39).loop;this._state.change({loop:ue},!1);const me=this._codeEditor.getOption(39).addExtraSpaceOnTop;me&&!this._viewZone&&(this._viewZone=new H(0),this._showViewZone()),!me&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Ee(this,void 0,void 0,function*(){if(this._isVisible){const Z=yield this._controller.getGlobalBufferTerm();Z&&Z!==this._state.searchString&&(this._state.change({searchString:Z},!1),this._findInput.select())}}))),this._findInputFocused=s.CONTEXT_FIND_INPUT_FOCUSED.bindTo(V),this._findFocusTracker=this._register(S.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=s.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(V),this._replaceFocusTracker=this._register(S.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(39).addExtraSpaceOnTop&&(this._viewZone=new H(0)),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 G.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(de){if(de.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(de.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),de.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),de.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(87)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=S.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(de.isRevealed||de.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),de.isRegex&&this._findInput.setRegex(this._state.isRegex),de.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),de.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),de.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),de.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),de.searchString||de.matchesCount||de.matchesPosition){const he=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",he),this._updateMatchesCount(),this._updateButtons()}(de.searchString||de.currentMatch)&&this._layoutViewZone(),de.updateHistory&&this._delayedUpdateHistory(),de.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,h.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=se+"px",this._state.matchesCount>=s.MATCHES_LIMIT?this._matchesCount.title=U:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let de;if(this._state.matchesCount>0){let he=String(this._state.matchesCount);this._state.matchesCount>=s.MATCHES_LIMIT&&(he+="+");let oe=String(this._state.matchesPosition);oe==="0"&&(oe="?"),de=t.format(e.NLS_MATCHES_LOCATION,oe,he)}else de=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(de)),(0,k.alert)(this._getAriaLabel(de,this._state.currentMatch,this._state.searchString)),se=Math.max(se,this._matchesCount.clientWidth)}_getAriaLabel(de,he,oe){if(de===e.NLS_NO_RESULTS)return oe===""?r.localize(21,null,de):r.localize(22,null,de,oe);if(he){const ce=r.localize(23,null,de,oe,he.startLineNumber+":"+he.startColumn),z=this._codeEditor.getModel();return z&&he.startLineNumber<=z.getLineCount()&&he.startLineNumber>=1?`${z.getLineContent(he.startLineNumber)}, ${ce}`:ce}return r.localize(24,null,de,oe)}_updateToggleSelectionFindButton(){const de=this._codeEditor.getSelection(),he=de?de.startLineNumber!==de.endLineNumber||de.startColumn!==de.endColumn:!1,oe=this._toggleSelectionFind.checked;this._isVisible&&(oe||he)?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);const de=this._state.searchString.length>0,he=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&de&&he&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&de&&he&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&de),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&de),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const oe=!this._codeEditor.getOption(87);this._toggleReplaceBtn.setEnabled(this._isVisible&&oe)}_reveal(){if(this._revealTimeouts.forEach(de=>{clearTimeout(de)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const de=this._codeEditor.getSelection();switch(this._codeEditor.getOption(39).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const oe=!!de&&de.startLineNumber!==de.endLineNumber;this._toggleSelectionFind.checked=oe;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 he=!0;if(this._codeEditor.getOption(39).seedSearchStringFromSelection&&de){const oe=this._codeEditor.getDomNode();if(oe){const ce=S.getDomNodePagePosition(oe),z=this._codeEditor.getScrolledVisiblePosition(de.getStartPosition()),V=ce.left+(z?z.left:0),K=z?z.top:0;if(this._viewZone&&K<this._viewZone.heightInPx){de.endLineNumber>de.startLineNumber&&(he=!1);const ie=S.getTopLeftOffset(this._domNode).left;V>ie&&(he=!1);const X=this._codeEditor.getScrolledVisiblePosition(de.getEndPosition());ce.left+(X?X.left:0)>ie&&(he=!1)}}}this._showViewZone(he)}}_hide(de){this._revealTimeouts.forEach(he=>{clearTimeout(he)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),de&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(de){if(!this._codeEditor.getOption(39).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const oe=this._viewZone;this._viewZoneId!==void 0||!oe||this._codeEditor.changeViewZones(ce=>{oe.heightInPx=this._getHeight(),this._viewZoneId=ce.addZone(oe),this._codeEditor.setScrollTop(de||this._codeEditor.getScrollTop()+oe.heightInPx)})}_showViewZone(de=!0){if(!this._isVisible||!this._codeEditor.getOption(39).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new H(0));const oe=this._viewZone;this._codeEditor.changeViewZones(ce=>{if(this._viewZoneId!==void 0){const z=this._getHeight();if(z===oe.heightInPx)return;const V=z-oe.heightInPx;oe.heightInPx=z,ce.layoutZone(this._viewZoneId),de&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+V);return}else{let z=this._getHeight();if(z-=this._codeEditor.getOption(81).top,z<=0)return;oe.heightInPx=z,this._viewZoneId=ce.addZone(oe),de&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+z)}})}_removeViewZone(){this._codeEditor.changeViewZones(de=>{this._viewZoneId!==void 0&&(de.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!S.isInDOM(this._domNode))return;const de=this._codeEditor.getLayoutInfo();if(de.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const oe=de.width,ce=de.minimap.minimapWidth;let z=!1,V=!1,K=!1;if(this._resized&&S.getTotalWidth(this._domNode)>O){this._domNode.style.maxWidth=`${oe-28-ce-15}px`,this._replaceInput.width=S.getTotalWidth(this._findInput.domNode);return}if(O+28+ce>=oe&&(V=!0),O+28+ce-se>=oe&&(K=!0),O+28+ce-se>=oe+50&&(z=!0),this._domNode.classList.toggle("collapsed-find-widget",z),this._domNode.classList.toggle("narrow-find-widget",K),this._domNode.classList.toggle("reduced-find-widget",V),!K&&!z&&(this._domNode.style.maxWidth=`${oe-28-ce-15}px`),this._findInput.layout({collapsedFindWidget:z,narrowFindWidget:K,reducedFindWidget:V}),this._resized){const ie=this._findInput.inputBox.element.clientWidth;ie>0&&(this._replaceInput.width=ie)}else this._isReplaceVisible&&(this._replaceInput.width=S.getTotalWidth(this._findInput.domNode))}_getHeight(){let de=0;return de+=4,de+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(de+=4,de+=this._replaceInput.inputBox.height+2),de+=4,de}_tryUpdateHeight(){const de=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===de?!1:(this._cachedHeight=de,this._domNode.style.height=`${de}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){const de=this._codeEditor.getSelections();de.map(he=>{he.endColumn===1&&he.endLineNumber>he.startLineNumber&&(he=he.setEndPosition(he.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(he.endLineNumber-1)));const oe=this._state.currentMatch;return he.startLineNumber!==he.endLineNumber&&!i.Range.equalsRange(he,oe)?he:null}).filter(he=>!!he),de.length&&this._state.change({searchScope:de},!0)}}_onFindInputMouseDown(de){de.middleButton&&de.stopPropagation()}_onFindInputKeyDown(de){if(de.equals(re|3))if(this._keybindingService.dispatchEvent(de,de.target)){de.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`\n`),de.preventDefault();return}if(de.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),de.preventDefault();return}if(de.equals(2066)){this._codeEditor.focus(),de.preventDefault();return}if(de.equals(16))return B(de,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(de.equals(18))return j(de,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(de){if(de.equals(re|3))if(this._keybindingService.dispatchEvent(de,de.target)){de.preventDefault();return}else{n.isWindows&&n.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(r.localize(25,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(te,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`\n`),de.preventDefault();return}if(de.equals(2)){this._findInput.focusOnCaseSensitive(),de.preventDefault();return}if(de.equals(1026)){this._findInput.focus(),de.preventDefault();return}if(de.equals(2066)){this._codeEditor.focus(),de.preventDefault();return}if(de.equals(16))return B(de,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(de.equals(18))return j(de,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(de){return 0}_keybindingLabelFor(de){const he=this._keybindingService.lookupKeybinding(de);return he?` (${he.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new c.ContextScopedFindInput(null,this._contextViewProvider,{width:Q,label:E,placeholder:I,appendCaseSensitiveLabel:this._keybindingLabelFor(s.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(s.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(s.FIND_IDS.ToggleRegexCommand),validation:ie=>{if(ie.length===0||!this._findInput.getRegex())return null;try{return new RegExp(ie,"gu"),null}catch(X){return{content:X.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>(0,g.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:f.defaultInputBoxStyles,toggleStyles:f.defaultToggleStyles},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(ie=>this._onFindInputKeyDown(ie))),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(ie=>{ie.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),ie.preventDefault())})),this._register(this._findInput.onRegexKeyDown(ie=>{ie.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),ie.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(ie=>{this._tryUpdateHeight()&&this._showViewZone()})),n.isLinux&&this._register(this._findInput.onMouseDown(ie=>this._onFindInputMouseDown(ie))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Y({label:T+this._keybindingLabelFor(s.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{(0,C.assertIsDefined)(this._codeEditor.getAction(s.FIND_IDS.PreviousMatchFindAction)).run().then(void 0,h.onUnexpectedError)}})),this._nextBtn=this._register(new Y({label:F+this._keybindingLabelFor(s.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{(0,C.assertIsDefined)(this._codeEditor.getAction(s.FIND_IDS.NextMatchFindAction)).run().then(void 0,h.onUnexpectedError)}}));const oe=document.createElement("div");oe.className="find-part",oe.appendChild(this._findInput.domNode);const ce=document.createElement("div");ce.className="find-actions",oe.appendChild(ce),ce.appendChild(this._matchesCount),ce.appendChild(this._prevBtn.domNode),ce.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new y.Toggle({icon:v,title:R+this._keybindingLabelFor(s.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:(0,o.asCssVariable)(o.inputActiveOptionBackground),inputActiveOptionBorder:(0,o.asCssVariable)(o.inputActiveOptionBorder),inputActiveOptionForeground:(0,o.asCssVariable)(o.inputActiveOptionForeground)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const ie=this._codeEditor.getSelections();ie.map(X=>(X.endColumn===1&&X.endLineNumber>X.startLineNumber&&(X=X.setEndPosition(X.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(X.endLineNumber-1))),X.isEmpty()?null:X)).filter(X=>!!X),ie.length&&this._state.change({searchScope:ie},!0)}}else this._state.change({searchScope:null},!0)})),ce.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Y({label:M+this._keybindingLabelFor(s.FIND_IDS.CloseFindWidgetCommand),icon:l.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:ie=>{ie.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),ie.preventDefault())}})),ce.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new c.ContextScopedReplaceInput(null,void 0,{label:N,placeholder:A,appendPreserveCaseLabel:this._keybindingLabelFor(s.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>(0,g.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:f.defaultInputBoxStyles,toggleStyles:f.defaultToggleStyles},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(ie=>this._onReplaceInputKeyDown(ie))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(ie=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(ie=>{ie.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(),ie.preventDefault())})),this._replaceBtn=this._register(new Y({label:P+this._keybindingLabelFor(s.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:ie=>{ie.equals(1026)&&(this._closeBtn.focus(),ie.preventDefault())}})),this._replaceAllBtn=this._register(new Y({label:x+this._keybindingLabelFor(s.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));const z=document.createElement("div");z.className="replace-part",z.appendChild(this._replaceInput.domNode);const V=document.createElement("div");V.className="replace-actions",z.appendChild(V),V.appendChild(this._replaceBtn.domNode),V.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Y({label:W,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=S.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=`${O}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(oe),this._domNode.appendChild(z),this._resizeSash=new D.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let K=O;this._register(this._resizeSash.onDidStart(()=>{K=S.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(ie=>{this._resized=!0;const X=K+ie.startX-ie.currentX;if(X<O)return;const Z=parseFloat(S.getComputedStyle(this._domNode).maxWidth)||0;X>Z||(this._domNode.style.width=`${X}px`,this._isReplaceVisible&&(this._replaceInput.width=S.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const ie=S.getTotalWidth(this._domNode);if(ie<O)return;let X=O;if(!this._resized||ie===O){const Z=this._codeEditor.getLayoutInfo();X=Z.width-28-Z.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${X}px`,this._isReplaceVisible&&(this._replaceInput.width=S.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const de=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(de!==2)}}G.ID="editor.contrib.findWidget",e.FindWidget=G;class Y extends w.Widget{constructor(de){super(),this._opts=de;let he="button";this._opts.className&&(he=he+" "+this._opts.className),this._opts.icon&&(he=he+" "+d.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=he,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,oe=>{this._opts.onTrigger(),oe.preventDefault()}),this.onkeydown(this._domNode,oe=>{var ce,z;if(oe.equals(10)||oe.equals(3)){this._opts.onTrigger(),oe.preventDefault();return}(z=(ce=this._opts).onKeyDown)===null||z===void 0||z.call(ce,oe)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(de){this._domNode.classList.toggle("disabled",!de),this._domNode.setAttribute("aria-disabled",String(!de)),this._domNode.tabIndex=de?0:-1}setExpanded(de){this._domNode.setAttribute("aria-expanded",String(!!de)),de?(this._domNode.classList.remove(...d.ThemeIcon.asClassNameArray(p)),this._domNode.classList.add(...d.ThemeIcon.asClassNameArray(L))):(this._domNode.classList.remove(...d.ThemeIcon.asClassNameArray(L)),this._domNode.classList.add(...d.ThemeIcon.asClassNameArray(p)))}}e.SimpleButton=Y,(0,a.registerThemingParticipant)((ne,de)=>{const he=(we,ye)=>{ye&&de.addRule(`.monaco-editor ${we} { background-color: ${ye}; }`)};he(".findMatch",ne.getColor(o.editorFindMatchHighlight)),he(".currentFindMatch",ne.getColor(o.editorFindMatch)),he(".findScope",ne.getColor(o.editorFindRangeHighlight));const oe=ne.getColor(o.editorWidgetBackground);he(".find-widget",oe);const ce=ne.getColor(o.widgetShadow);ce&&de.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${ce}; }`);const z=ne.getColor(o.widgetBorder);z&&de.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${z}; border-right: 1px solid ${z}; border-bottom: 1px solid ${z}; }`);const V=ne.getColor(o.editorFindMatchHighlightBorder);V&&de.addRule(`.monaco-editor .findMatch { border: 1px ${(0,u.isHighContrast)(ne.type)?"dotted":"solid"} ${V}; box-sizing: border-box; }`);const K=ne.getColor(o.editorFindMatchBorder);K&&de.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${K}; padding: 1px; box-sizing: border-box; }`);const ie=ne.getColor(o.editorFindRangeHighlightBorder);ie&&de.addRule(`.monaco-editor .findScope { border: 1px ${(0,u.isHighContrast)(ne.type)?"dashed":"solid"} ${ie}; }`);const X=ne.getColor(o.contrastBorder);X&&de.addRule(`.monaco-editor .find-widget { border: 1px solid ${X}; }`);const Z=ne.getColor(o.editorWidgetForeground);Z&&de.addRule(`.monaco-editor .find-widget { color: ${Z}; }`);const ue=ne.getColor(o.errorForeground);ue&&de.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${ue}; }`);const me=ne.getColor(o.editorWidgetResizeBorder);if(me)de.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${me}; }`);else{const we=ne.getColor(o.editorWidgetBorder);we&&de.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${we}; }`)}const Ce=ne.getColor(o.toolbarHoverBackground);Ce&&de.addRule(`\n\t\t.monaco-editor .find-widget .button:not(.disabled):hover,\n\t\t.monaco-editor .find-widget .codicon-find-selection:hover {\n\t\t\tbackground-color: ${Ce} !important;\n\t\t}\n\t`);const _e=ne.getColor(o.focusBorder);_e&&de.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${_e}; }`)})}),define(J[334],ee([1,0,12,2,9,15,73,22,48,184,827,828,829,606,28,96,14,57,36,43,78,83,24]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.MoveToMatchFindAction=e.PreviousMatchFindAction=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindWithArgsAction=e.StartFindAction=e.FindController=e.CommonFindController=e.getSelectionSearchString=void 0;const C=524288;function f(W,U="single",O=!1){if(!W.hasModel())return null;const $=W.getSelection();if(U==="single"&&$.startLineNumber===$.endLineNumber||U==="multiple"){if($.isEmpty()){const Q=W.getConfiguredWordAtPosition($.getStartPosition());if(Q&&O===!1)return Q.word}else if(W.getModel().getValueLengthInRange($)<C)return W.getModel().getValueInRange($)}return null}e.getSelectionSearchString=f;let v=class $i extends k.Disposable{get editor(){return this._editor}static get(U){return U.getContribution($i.ID)}constructor(U,O,$,Q){super(),this._editor=U,this._findWidgetVisible=h.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(O),this._contextKeyService=O,this._storageService=$,this._clipboardService=Q,this._updateHistoryDelayer=new S.Delayer(500),this._state=this._register(new n.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(se=>this._onStateChanged(se))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const se=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),se&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(39).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(U){this.saveQueryState(U),U.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),U.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(U){U.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),U.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),U.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),U.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!!h.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()){const U=this._editor.getSelections();U.map(O=>(O.endColumn===1&&O.endLineNumber>O.startLineNumber&&(O=O.setEndPosition(O.endLineNumber-1,this._editor.getModel().getLineMaxColumn(O.endLineNumber-1))),O.isEmpty()?null:O)).filter(O=>!!O),U.length&&this._state.change({searchScope:U},!0)}}setSearchString(U){this._state.isRegex&&(U=y.escapeRegExpCharacters(U)),this._state.change({searchString:U},!1)}highlightFindOptions(U=!1){}_start(U,O){return Ee(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const $=Object.assign(Object.assign({},O),{isRevealed:!0});if(U.seedSearchStringFromSelection==="single"){const Q=f(this._editor,U.seedSearchStringFromSelection,U.seedSearchStringFromNonEmptySelection);Q&&(this._state.isRegex?$.searchString=y.escapeRegExpCharacters(Q):$.searchString=Q)}else if(U.seedSearchStringFromSelection==="multiple"&&!U.updateSearchScope){const Q=f(this._editor,U.seedSearchStringFromSelection);Q&&($.searchString=Q)}if(!$.searchString&&U.seedSearchStringFromGlobalClipboard){const Q=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;Q&&($.searchString=Q)}if(U.forceRevealReplace||$.isReplaceRevealed?$.isReplaceRevealed=!0:this._findWidgetVisible.get()||($.isReplaceRevealed=!1),U.updateSearchScope){const Q=this._editor.getSelections();Q.some(se=>!se.isEmpty())&&($.searchScope=Q)}$.loop=U.loop,this._state.change($,!1),this._model||(this._model=new h.FindModelBoundToEditorModel(this._editor,this._state))})}start(U,O){return this._start(U,O)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(U){return this._model?(this._model.moveToMatch(U),!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 Ee(this,void 0,void 0,function*(){return this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(U){this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(U)}};v.ID="editor.contrib.findController",v=Ne([fe(1,c.IContextKeyService),fe(2,d.IStorageService),fe(3,r.IClipboardService)],v),e.CommonFindController=v;let p=class extends v{constructor(U,O,$,Q,se,le,te,re){super(U,$,te,re),this._contextViewService=O,this._keybindingService=Q,this._themeService=se,this._notificationService=le,this._widget=null,this._findOptionsWidget=null}_start(U,O){const $=Object.create(null,{_start:{get:()=>super._start}});return Ee(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const Q=this._editor.getSelection();let se=!1;switch(this._editor.getOption(39).autoFindInSelection){case"always":se=!0;break;case"never":se=!1;break;case"multiline":{se=!!Q&&Q.startLineNumber!==Q.endLineNumber;break}default:break}U.updateSearchScope=U.updateSearchScope||se,yield $._start.call(this,U,O),this._widget&&(U.shouldFocus===2?this._widget.focusReplaceInput():U.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(U=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!U?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new t.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new m.FindOptionsWidget(this._editor,this._state,this._keybindingService))}};p=Ne([fe(1,g.IContextViewService),fe(2,c.IContextKeyService),fe(3,o.IKeybindingService),fe(4,u.IThemeService),fe(5,l.INotificationService),fe(6,d.IStorageService),fe(7,r.IClipboardService)],p),e.FindController=p,e.StartFindAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:h.FIND_IDS.StartFindAction,label:i.localize(0,null),alias:"Find",precondition:c.ContextKeyExpr.or(b.EditorContextKeys.focus,c.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:s.MenuId.MenubarEditMenu,group:"3_find",title:i.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(W,U,O)=>{const $=v.get(U);return $?$.start({forceRevealReplace:!1,seedSearchStringFromSelection:U.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:U.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:U.getOption(39).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:U.getOption(39).loop}):!1});const L={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:i.localize(2,null)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:i.localize(3,null)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:i.localize(4,null)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:i.localize(5,null)},findInSelection:{type:"boolean"}}}}]};class E extends D.EditorAction{constructor(){super({id:h.FIND_IDS.StartFindWithArgs,label:i.localize(6,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:L})}run(U,O,$){return Ee(this,void 0,void 0,function*(){const Q=v.get(O);if(Q){const se=$?{searchString:$.searchString,replaceString:$.replaceString,isReplaceRevealed:$.replaceString!==void 0,isRegex:$.isRegex,wholeWord:$.matchWholeWord,matchCase:$.isCaseSensitive,preserveCase:$.preserveCase}:{};yield Q.start({forceRevealReplace:!1,seedSearchStringFromSelection:Q.getState().searchString.length===0&&O.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:O.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:$?.findInSelection||!1,loop:O.getOption(39).loop},se),Q.setGlobalBufferTerm(Q.getState().searchString)}})}}e.StartFindWithArgsAction=E;class I extends D.EditorAction{constructor(){super({id:h.FIND_IDS.StartFindWithSelection,label:i.localize(7,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(U,O){return Ee(this,void 0,void 0,function*(){const $=v.get(O);$&&(yield $.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:O.getOption(39).loop}),$.setGlobalBufferTerm($.getState().searchString))})}}e.StartFindWithSelectionAction=I;class T extends D.EditorAction{run(U,O){return Ee(this,void 0,void 0,function*(){const $=v.get(O);$&&!this._run($)&&(yield $.start({forceRevealReplace:!1,seedSearchStringFromSelection:$.getState().searchString.length===0&&O.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:O.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:O.getOption(39).loop}),this._run($))})}}e.MatchFindAction=T;class F extends T{constructor(){super({id:h.FIND_IDS.NextMatchFindAction,label:i.localize(8,null),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:b.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:c.ContextKeyExpr.and(b.EditorContextKeys.focus,h.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(U){return U.moveToNextMatch()?(U.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=F;class R extends T{constructor(){super({id:h.FIND_IDS.PreviousMatchFindAction,label:i.localize(9,null),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:b.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:c.ContextKeyExpr.and(b.EditorContextKeys.focus,h.CONTEXT_FIND_INPUT_FOCUSED),primary:1027,weight:100}]})}_run(U){return U.moveToPrevMatch()}}e.PreviousMatchFindAction=R;class M extends D.EditorAction{constructor(){super({id:h.FIND_IDS.GoToMatchFindAction,label:i.localize(10,null),alias:"Go to Match...",precondition:h.CONTEXT_FIND_WIDGET_VISIBLE}),this._highlightDecorations=[]}run(U,O,$){const Q=v.get(O);if(!Q)return;const le=U.get(a.IQuickInputService).createInputBox();le.placeholder=i.localize(11,null,Q.getState().matchesCount);const te=re=>{const H=parseInt(re);if(!isNaN(H)&&H>0&&H<=Q.getState().matchesCount){le.validationMessage=void 0,Q.goToMatch(H-1);const B=Q.getState().currentMatch;B&&this.addDecorations(O,B)}else le.validationMessage=i.localize(12,null,Q.getState().matchesCount),this.clearDecorations(O)};le.onDidChangeValue(re=>{te(re)}),le.onDidAccept(()=>{const re=parseInt(le.value);!isNaN(re)&&re>0&&re<=Q.getState().matchesCount?(Q.goToMatch(re-1),le.hide()):le.validationMessage=i.localize(13,null,Q.getState().matchesCount)}),le.onDidHide(()=>{this.clearDecorations(O),le.dispose()}),le.show()}clearDecorations(U){U.changeDecorations(O=>{this._highlightDecorations=O.deltaDecorations(this._highlightDecorations,[])})}addDecorations(U,O){U.changeDecorations($=>{this._highlightDecorations=$.deltaDecorations(this._highlightDecorations,[{range:O,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:O,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,u.themeColorFromId)(w.overviewRulerRangeHighlight),position:_.OverviewRulerLane.Full}}}])})}}e.MoveToMatchFindAction=M;class N extends D.EditorAction{run(U,O){return Ee(this,void 0,void 0,function*(){const $=v.get(O);if(!$)return;const Q=f(O,"single",!1);Q&&$.setSearchString(Q),this._run($)||(yield $.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:O.getOption(39).loop}),this._run($))})}}e.SelectionMatchFindAction=N;class A extends N{constructor(){super({id:h.FIND_IDS.NextSelectionMatchFindAction,label:i.localize(14,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:2109,weight:100}})}_run(U){return U.moveToNextMatch()}}e.NextSelectionMatchFindAction=A;class P extends N{constructor(){super({id:h.FIND_IDS.PreviousSelectionMatchFindAction,label:i.localize(15,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:3133,weight:100}})}_run(U){return U.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=P,e.StartFindReplaceAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:h.FIND_IDS.StartFindReplaceAction,label:i.localize(16,null),alias:"Replace",precondition:c.ContextKeyExpr.or(b.EditorContextKeys.focus,c.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:s.MenuId.MenubarEditMenu,group:"3_find",title:i.localize(17,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(W,U,O)=>{if(!U.hasModel()||U.getOption(87))return!1;const $=v.get(U);if(!$)return!1;const Q=U.getSelection(),se=$.isFindInputFocused(),le=!Q.isEmpty()&&Q.startLineNumber===Q.endLineNumber&&U.getOption(39).seedSearchStringFromSelection!=="never"&&!se,te=se||le?2:1;return $.start({forceRevealReplace:!0,seedSearchStringFromSelection:le?"single":"none",seedSearchStringFromNonEmptySelection:U.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:U.getOption(39).seedSearchStringFromSelection!=="never",shouldFocus:te,shouldAnimate:!0,updateSearchScope:!1,loop:U.getOption(39).loop})}),(0,D.registerEditorContribution)(v.ID,p,0),(0,D.registerEditorAction)(E),(0,D.registerEditorAction)(I),(0,D.registerEditorAction)(F),(0,D.registerEditorAction)(R),(0,D.registerEditorAction)(M),(0,D.registerEditorAction)(A),(0,D.registerEditorAction)(P);const x=D.EditorCommand.bindToContribution(v.get);(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.CloseFindWidgetCommand,precondition:h.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:c.ContextKeyExpr.and(b.EditorContextKeys.focus,c.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1033]}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:W=>W.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:h.ToggleCaseSensitiveKeybinding.primary,mac:h.ToggleCaseSensitiveKeybinding.mac,win:h.ToggleCaseSensitiveKeybinding.win,linux:h.ToggleCaseSensitiveKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:W=>W.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:h.ToggleWholeWordKeybinding.primary,mac:h.ToggleWholeWordKeybinding.mac,win:h.ToggleWholeWordKeybinding.win,linux:h.ToggleWholeWordKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:W=>W.toggleRegex(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:h.ToggleRegexKeybinding.primary,mac:h.ToggleRegexKeybinding.mac,win:h.ToggleRegexKeybinding.win,linux:h.ToggleRegexKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:W=>W.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:h.ToggleSearchScopeKeybinding.primary,mac:h.ToggleSearchScopeKeybinding.mac,win:h.ToggleSearchScopeKeybinding.win,linux:h.ToggleSearchScopeKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:W=>W.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:h.TogglePreserveCaseKeybinding.primary,mac:h.TogglePreserveCaseKeybinding.mac,win:h.TogglePreserveCaseKeybinding.win,linux:h.TogglePreserveCaseKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.ReplaceOneAction,precondition:h.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replace(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:3094}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.ReplaceOneAction,precondition:h.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replace(),kbOpts:{weight:100+5,kbExpr:c.ContextKeyExpr.and(b.EditorContextKeys.focus,h.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.ReplaceAllAction,precondition:h.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replaceAll(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:2563}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.ReplaceAllAction,precondition:h.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replaceAll(),kbOpts:{weight:100+5,kbExpr:c.ContextKeyExpr.and(b.EditorContextKeys.focus,h.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2051}}})),(0,D.registerEditorCommand)(new x({id:h.FIND_IDS.SelectAllMatchesAction,precondition:h.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:515}}))}),define(J[830],ee([1,0,29,48,39,609,31,80,24,32]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingManualExpandedIcon=e.foldingManualCollapsedIcon=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0;const m=(0,w.registerColor)("editor.foldBackground",{light:(0,w.transparent)(w.editorSelectionBackground,.3),dark:(0,w.transparent)(w.editorSelectionBackground,.3),hcDark:null,hcLight:null},(0,D.localize)(0,null),!0);(0,w.registerColor)("editorGutter.foldingControlForeground",{dark:w.iconForeground,light:w.iconForeground,hcDark:w.iconForeground,hcLight:w.iconForeground},(0,D.localize)(1,null)),e.foldingExpandedIcon=(0,b.registerIcon)("folding-expanded",S.Codicon.chevronDown,(0,D.localize)(2,null)),e.foldingCollapsedIcon=(0,b.registerIcon)("folding-collapsed",S.Codicon.chevronRight,(0,D.localize)(3,null)),e.foldingManualCollapsedIcon=(0,b.registerIcon)("folding-manual-collapsed",e.foldingCollapsedIcon,(0,D.localize)(4,null)),e.foldingManualExpandedIcon=(0,b.registerIcon)("folding-manual-expanded",e.foldingExpandedIcon,(0,D.localize)(5,null));const n={color:(0,_.themeColorFromId)(m),position:k.MinimapPosition.Inline};class t{constructor(s){this.editor=s,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(s,r,c){return r?t.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?s?this.showFoldingHighlights?t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:t.NO_CONTROLS_EXPANDED_RANGE_DECORATION:s?c?this.showFoldingHighlights?t.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:t.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?t.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:t.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?c?t.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:t.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:c?t.MANUALLY_EXPANDED_VISUAL_DECORATION:t.EXPANDED_VISUAL_DECORATION}changeDecorations(s){return this.editor.changeDecorations(s)}removeDecorations(s){this.editor.removeDecorations(s)}}t.COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:h.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),t.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:n,isWholeLine:!0,firstLineDecorationClassName:h.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),t.MANUALLY_COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:h.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),t.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:n,isWholeLine:!0,firstLineDecorationClassName:h.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:n,isWholeLine:!0}),t.EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+h.ThemeIcon.asClassName(e.foldingExpandedIcon)}),t.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:h.ThemeIcon.asClassName(e.foldingExpandedIcon)}),t.MANUALLY_EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+h.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),t.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:h.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),t.NO_CONTROLS_EXPANDED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),t.HIDDEN_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1}),e.FoldingDecorationProvider=t}),define(J[335],ee([1,0,12,21,11,58,2,9,18,114,15,22,26,33,567,568,269,608,14,830,171,270,43,70,60,19,6,25,20,53,27,411]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangesLimitReporter=e.FoldingController=void 0;const F=new o.RawContextKey("foldingEnabled",!1);let R=class zt extends w.Disposable{static get(oe){return oe.getContribution(zt.ID)}static getFoldingRangeProviders(oe,ce){var z,V;const K=oe.foldingRangeProvider.ordered(ce);return(V=(z=zt._foldingRangeSelector)===null||z===void 0?void 0:z.call(zt,K,ce))!==null&&V!==void 0?V:K}constructor(oe,ce,z,V,K,ie){super(),this.contextKeyService=ce,this.languageConfigurationService=z,this.languageFeaturesService=ie,this.localToDispose=this._register(new w.DisposableStore),this.editor=oe,this._foldingLimitReporter=new M(oe);const X=this.editor.getOptions();this._isEnabled=X.get(41),this._useFoldingProviders=X.get(42)!=="indentation",this._unfoldOnClickAfterEndOfLine=X.get(46),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=X.get(44),this.updateDebounceInfo=K.for(ie.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new l.FoldingDecorationProvider(oe),this.foldingDecorationProvider.showFoldingControls=X.get(105),this.foldingDecorationProvider.showFoldingHighlights=X.get(43),this.foldingEnabled=F.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(Z=>{if(Z.hasChanged(41)&&(this._isEnabled=this.editor.getOptions().get(41),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),Z.hasChanged(45)&&this.onModelChanged(),Z.hasChanged(105)||Z.hasChanged(43)){const ue=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=ue.get(105),this.foldingDecorationProvider.showFoldingHighlights=ue.get(43),this.triggerFoldingModelChanged()}Z.hasChanged(42)&&(this._useFoldingProviders=this.editor.getOptions().get(42)!=="indentation",this.onFoldingStrategyChanged()),Z.hasChanged(46)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(46)),Z.hasChanged(44)&&(this._foldingImportsByDefault=this.editor.getOptions().get(44))})),this.onModelChanged()}saveViewState(){const oe=this.editor.getModel();if(!oe||!this._isEnabled||oe.isTooLargeForTokenization())return{};if(this.foldingModel){const ce=this.foldingModel.getMemento(),z=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:ce,lineCount:oe.getLineCount(),provider:z,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(oe){const ce=this.editor.getModel();if(!(!ce||!this._isEnabled||ce.isTooLargeForTokenization()||!this.hiddenRangeModel)&&oe&&(this._currentModelHasFoldedImports=!!oe.foldedImports,oe.collapsedRegions&&oe.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(oe.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const oe=this.editor.getModel();!this._isEnabled||!oe||oe.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new s.FoldingModel(oe,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new r.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(ce=>this.onHiddenRangesChanges(ce))),this.updateScheduler=new S.Delayer(this.updateDebounceInfo.get(oe)),this.cursorChangedScheduler=new S.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(ce=>this.onDidChangeModelContent(ce))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(ce=>this.onEditorMouseDown(ce))),this.localToDispose.add(this.editor.onMouseUp(ce=>this.onEditorMouseUp(ce))),this.localToDispose.add({dispose:()=>{var ce,z;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(ce=this.updateScheduler)===null||ce===void 0||ce.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(z=this.rangeProvider)===null||z===void 0||z.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var oe;(oe=this.rangeProvider)===null||oe===void 0||oe.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(oe){if(this.rangeProvider)return this.rangeProvider;const ce=new c.IndentRangeProvider(oe,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=ce,this._useFoldingProviders&&this.foldingModel){const z=zt.getFoldingRangeProviders(this.languageFeaturesService,oe);z.length>0&&(this.rangeProvider=new d.SyntaxRangeProvider(oe,z,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,ce))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(oe){var ce;(ce=this.hiddenRangeModel)===null||ce===void 0||ce.notifyChangeModelContent(oe),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const oe=this.foldingModel;if(!oe)return null;const ce=new f.StopWatch(!0),z=this.getRangeProvider(oe.textModel),V=this.foldingRegionPromise=(0,S.createCancelablePromise)(K=>z.compute(K));return V.then(K=>{if(K&&V===this.foldingRegionPromise){let ie;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const me=K.setCollapsedAllOfType(t.FoldingRangeKind.Imports.value,!0);me&&(ie=h.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=me)}const X=this.editor.getSelections(),Z=X?X.map(me=>me.startLineNumber):[];oe.update(K,Z),ie?.restore(this.editor);const ue=this.updateDebounceInfo.update(oe.textModel,ce.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=ue)}return oe})}).then(void 0,oe=>((0,y.onUnexpectedError)(oe),null)))}onHiddenRangesChanges(oe){if(this.hiddenRangeModel&&oe.length&&!this._restoringViewState){const ce=this.editor.getSelections();ce&&this.hiddenRangeModel.adjustSelections(ce)&&this.editor.setSelections(ce)}this.editor.setHiddenAreas(oe,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const oe=this.getFoldingModel();oe&&oe.then(ce=>{if(ce){const z=this.editor.getSelections();if(z&&z.length>0){const V=[];for(const K of z){const ie=K.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(ie)&&V.push(...ce.getAllRegionsAtLine(ie,X=>X.isCollapsed&&ie>X.startLineNumber))}V.length&&(ce.toggleCollapseState(V),this.reveal(z[0].getPosition()))}}}).then(void 0,y.onUnexpectedError)}onEditorMouseDown(oe){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!oe.target||!oe.target.range||!oe.event.leftButton&&!oe.event.middleButton)return;const ce=oe.target.range;let z=!1;switch(oe.target.type){case 4:{const V=oe.target.detail,K=oe.target.element.offsetLeft;if(V.offsetX-K<5)return;z=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!oe.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const V=this.editor.getModel();if(V&&ce.startColumn===V.getLineMaxColumn(ce.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:ce.startLineNumber,iconClicked:z}}onEditorMouseUp(oe){const ce=this.foldingModel;if(!ce||!this.mouseDownInfo||!oe.target)return;const z=this.mouseDownInfo.lineNumber,V=this.mouseDownInfo.iconClicked,K=oe.target.range;if(!K||K.startLineNumber!==z)return;if(V){if(oe.target.type!==4)return}else{const X=this.editor.getModel();if(!X||K.startColumn!==X.getLineMaxColumn(z))return}const ie=ce.getRegionAtLine(z);if(ie&&ie.startLineNumber===z){const X=ie.isCollapsed;if(V||X){const Z=oe.event.altKey;let ue=[];if(Z){const me=_e=>!_e.containedBy(ie)&&!ie.containedBy(_e),Ce=ce.getRegionsInside(null,me);for(const _e of Ce)_e.isCollapsed&&ue.push(_e);ue.length===0&&(ue=Ce)}else{const me=oe.event.middleButton||oe.event.shiftKey;if(me)for(const Ce of ce.getRegionsInside(ie))Ce.isCollapsed===X&&ue.push(Ce);(X||!me||ue.length===0)&&ue.push(ie)}ce.toggleCollapseState(ue),this.reveal({lineNumber:z,column:1})}}}reveal(oe){this.editor.revealPositionInCenterIfOutsideViewport(oe,0)}};R.ID="editor.contrib.folding",R=Ne([fe(1,o.IContextKeyService),fe(2,i.ILanguageConfigurationService),fe(3,u.INotificationService),fe(4,C.ILanguageFeatureDebounceService),fe(5,v.ILanguageFeaturesService)],R),e.FoldingController=R;class M{constructor(oe){this.editor=oe,this._onDidChange=new p.Emitter,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(45)}update(oe,ce){(oe!==this._computed||ce!==this._limited)&&(this._computed=oe,this._limited=ce,this._onDidChange.fire())}}e.RangesLimitReporter=M;class N extends m.EditorAction{runEditorCommand(oe,ce,z){const V=oe.get(i.ILanguageConfigurationService),K=R.get(ce);if(!K)return;const ie=K.getFoldingModel();if(ie)return this.reportTelemetry(oe,ce),ie.then(X=>{if(X){this.invoke(K,X,ce,z,V);const Z=ce.getSelection();Z&&K.reveal(Z.getStartPosition())}})}getSelectedLines(oe){const ce=oe.getSelections();return ce?ce.map(z=>z.startLineNumber):[]}getLineNumbers(oe,ce){return oe&&oe.selectionLines?oe.selectionLines.map(z=>z+1):this.getSelectedLines(ce)}run(oe,ce){}}function A(he){if(!_.isUndefined(he)){if(!_.isObject(he))return!1;const oe=he;if(!_.isUndefined(oe.levels)&&!_.isNumber(oe.levels)||!_.isUndefined(oe.direction)&&!_.isString(oe.direction)||!_.isUndefined(oe.selectionLines)&&(!Array.isArray(oe.selectionLines)||!oe.selectionLines.every(_.isNumber)))return!1}return!0}class P extends N{constructor(){super({id:"editor.unfold",label:g.localize(0,null),alias:"Unfold",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:3161,mac:{primary:2649},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:\n\t\t\t\t\t\t* \'levels\': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* \'direction\': If \'up\', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* \'selectionLines\': Array of 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.\n\t\t\t\t\t\t`,constraint:A,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(oe,ce,z,V){const K=V&&V.levels||1,ie=this.getLineNumbers(V,z);V&&V.direction==="up"?(0,s.setCollapseStateLevelsUp)(ce,!1,K,ie):(0,s.setCollapseStateLevelsDown)(ce,!1,K,ie)}}class x extends N{constructor(){super({id:"editor.unfoldRecursively",label:g.localize(1,null),alias:"Unfold Recursively",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2137),weight:100}})}invoke(oe,ce,z,V){(0,s.setCollapseStateLevelsDown)(ce,!1,Number.MAX_VALUE,this.getSelectedLines(z))}}class W extends N{constructor(){super({id:"editor.fold",label:g.localize(2,null),alias:"Fold",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:3159,mac:{primary:2647},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:\n\t\t\t\t\t\t\t* \'levels\': Number of levels to fold.\n\t\t\t\t\t\t\t* \'direction\': If \'up\', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* \'selectionLines\': Array of 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.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t`,constraint:A,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(oe,ce,z,V){const K=this.getLineNumbers(V,z),ie=V&&V.levels,X=V&&V.direction;typeof ie!="number"&&typeof X!="string"?(0,s.setCollapseStateUp)(ce,!0,K):X==="up"?(0,s.setCollapseStateLevelsUp)(ce,!0,ie||1,K):(0,s.setCollapseStateLevelsDown)(ce,!0,ie||1,K)}}class U extends N{constructor(){super({id:"editor.toggleFold",label:g.localize(3,null),alias:"Toggle Fold",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2090),weight:100}})}invoke(oe,ce,z){const V=this.getSelectedLines(z);(0,s.toggleCollapseState)(ce,1,V)}}class O extends N{constructor(){super({id:"editor.foldRecursively",label:g.localize(4,null),alias:"Fold Recursively",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2135),weight:100}})}invoke(oe,ce,z){const V=this.getSelectedLines(z);(0,s.setCollapseStateLevelsDown)(ce,!0,Number.MAX_VALUE,V)}}class $ extends N{constructor(){super({id:"editor.foldAllBlockComments",label:g.localize(5,null),alias:"Fold All Block Comments",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2133),weight:100}})}invoke(oe,ce,z,V,K){if(ce.regions.hasTypes())(0,s.setCollapseStateForType)(ce,t.FoldingRangeKind.Comment.value,!0);else{const ie=z.getModel();if(!ie)return;const X=K.getLanguageConfiguration(ie.getLanguageId()).comments;if(X&&X.blockCommentStartToken){const Z=new RegExp("^\\\\s*"+(0,b.escapeRegExpCharacters)(X.blockCommentStartToken));(0,s.setCollapseStateForMatchingLines)(ce,Z,!0)}}}}class Q extends N{constructor(){super({id:"editor.foldAllMarkerRegions",label:g.localize(6,null),alias:"Fold All Regions",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2077),weight:100}})}invoke(oe,ce,z,V,K){if(ce.regions.hasTypes())(0,s.setCollapseStateForType)(ce,t.FoldingRangeKind.Region.value,!0);else{const ie=z.getModel();if(!ie)return;const X=K.getLanguageConfiguration(ie.getLanguageId()).foldingRules;if(X&&X.markers&&X.markers.start){const Z=new RegExp(X.markers.start);(0,s.setCollapseStateForMatchingLines)(ce,Z,!0)}}}}class se extends N{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:g.localize(7,null),alias:"Unfold All Regions",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2078),weight:100}})}invoke(oe,ce,z,V,K){if(ce.regions.hasTypes())(0,s.setCollapseStateForType)(ce,t.FoldingRangeKind.Region.value,!1);else{const ie=z.getModel();if(!ie)return;const X=K.getLanguageConfiguration(ie.getLanguageId()).foldingRules;if(X&&X.markers&&X.markers.start){const Z=new RegExp(X.markers.start);(0,s.setCollapseStateForMatchingLines)(ce,Z,!1)}}}}class le extends N{constructor(){super({id:"editor.foldAllExcept",label:g.localize(8,null),alias:"Fold All Regions Except Selected",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2131),weight:100}})}invoke(oe,ce,z){const V=this.getSelectedLines(z);(0,s.setCollapseStateForRest)(ce,!0,V)}}class te extends N{constructor(){super({id:"editor.unfoldAllExcept",label:g.localize(9,null),alias:"Unfold All Regions Except Selected",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2129),weight:100}})}invoke(oe,ce,z){const V=this.getSelectedLines(z);(0,s.setCollapseStateForRest)(ce,!1,V)}}class re extends N{constructor(){super({id:"editor.foldAll",label:g.localize(10,null),alias:"Fold All",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2069),weight:100}})}invoke(oe,ce,z){(0,s.setCollapseStateLevelsDown)(ce,!0)}}class H extends N{constructor(){super({id:"editor.unfoldAll",label:g.localize(11,null),alias:"Unfold All",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2088),weight:100}})}invoke(oe,ce,z){(0,s.setCollapseStateLevelsDown)(ce,!1)}}class B extends N{getFoldingLevel(){return parseInt(this.id.substr(B.ID_PREFIX.length))}invoke(oe,ce,z){(0,s.setCollapseStateAtLevel)(ce,this.getFoldingLevel(),!0,this.getSelectedLines(z))}}B.ID_PREFIX="editor.foldLevel",B.ID=he=>B.ID_PREFIX+he;class j extends N{constructor(){super({id:"editor.gotoParentFold",label:g.localize(12,null),alias:"Go to Parent Fold",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,weight:100}})}invoke(oe,ce,z){const V=this.getSelectedLines(z);if(V.length>0){const K=(0,s.getParentFoldLine)(V[0],ce);K!==null&&z.setSelection({startLineNumber:K,startColumn:1,endLineNumber:K,endColumn:1})}}}class G extends N{constructor(){super({id:"editor.gotoPreviousFold",label:g.localize(13,null),alias:"Go to Previous Folding Range",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,weight:100}})}invoke(oe,ce,z){const V=this.getSelectedLines(z);if(V.length>0){const K=(0,s.getPreviousFoldLine)(V[0],ce);K!==null&&z.setSelection({startLineNumber:K,startColumn:1,endLineNumber:K,endColumn:1})}}}class Y extends N{constructor(){super({id:"editor.gotoNextFold",label:g.localize(14,null),alias:"Go to Next Folding Range",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,weight:100}})}invoke(oe,ce,z){const V=this.getSelectedLines(z);if(V.length>0){const K=(0,s.getNextFoldLine)(V[0],ce);K!==null&&z.setSelection({startLineNumber:K,startColumn:1,endLineNumber:K,endColumn:1})}}}class ne extends N{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:g.localize(15,null),alias:"Create Folding Range from Selection",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2130),weight:100}})}invoke(oe,ce,z){var V;const K=[],ie=z.getSelections();if(ie){for(const X of ie){let Z=X.endLineNumber;X.endColumn===1&&--Z,Z>X.startLineNumber&&(K.push({startLineNumber:X.startLineNumber,endLineNumber:Z,type:void 0,isCollapsed:!0,source:1}),z.setSelection({startLineNumber:X.startLineNumber,startColumn:1,endLineNumber:X.startLineNumber,endColumn:1}))}if(K.length>0){K.sort((Z,ue)=>Z.startLineNumber-ue.startLineNumber);const X=a.FoldingRegions.sanitizeAndMerge(ce.regions,K,(V=z.getModel())===null||V===void 0?void 0:V.getLineCount());ce.updatePost(a.FoldingRegions.fromFoldRanges(X))}}}}class de extends N{constructor(){super({id:"editor.removeManualFoldingRanges",label:g.localize(16,null),alias:"Remove Manual Folding Ranges",precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2132),weight:100}})}invoke(oe,ce,z){const V=z.getSelections();if(V){const K=[];for(const ie of V){const{startLineNumber:X,endLineNumber:Z}=ie;K.push(Z>=X?{startLineNumber:X,endLineNumber:Z}:{endLineNumber:Z,startLineNumber:X})}ce.removeManualRanges(K),oe.triggerFoldingModelChanged()}}}(0,m.registerEditorContribution)(R.ID,R,0),(0,m.registerEditorAction)(P),(0,m.registerEditorAction)(x),(0,m.registerEditorAction)(W),(0,m.registerEditorAction)(O),(0,m.registerEditorAction)(re),(0,m.registerEditorAction)(H),(0,m.registerEditorAction)($),(0,m.registerEditorAction)(Q),(0,m.registerEditorAction)(se),(0,m.registerEditorAction)(le),(0,m.registerEditorAction)(te),(0,m.registerEditorAction)(U),(0,m.registerEditorAction)(j),(0,m.registerEditorAction)(G),(0,m.registerEditorAction)(Y),(0,m.registerEditorAction)(ne),(0,m.registerEditorAction)(de);for(let he=1;he<=7;he++)(0,m.registerInstantiatedEditorAction)(new B({id:B.ID(he),label:g.localize(17,null,he),alias:`Fold Level ${he}`,precondition:F,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2048|21+he),weight:100}}));L.CommandsRegistry.registerCommand("_executeFoldingRangeProvider",function(he,...oe){return Ee(this,void 0,void 0,function*(){const[ce]=oe;if(!(ce instanceof E.URI))throw(0,y.illegalArgument)();const z=he.get(v.ILanguageFeaturesService),V=he.get(I.IModelService).getModel(ce);if(!V)throw(0,y.illegalArgument)();const K=he.get(T.IConfigurationService);if(!K.getValue("editor.folding",{resource:ce}))return[];const ie=he.get(i.ILanguageConfigurationService),X=K.getValue("editor.foldingStrategy",{resource:ce}),Z={get limit(){return K.getValue("editor.foldingMaximumRegions",{resource:ce})},update:(we,ye)=>{}},ue=new c.IndentRangeProvider(V,ie,Z);let me=ue;if(X!=="indentation"){const we=R.getFoldingRangeProviders(z,V);we.length&&(me=new d.SyntaxRangeProvider(V,we,()=>{},Z,ue))}const Ce=yield me.compute(k.CancellationToken.None),_e=[];try{if(Ce)for(let we=0;we<Ce.length;we++){const ye=Ce.getType(we);_e.push({start:Ce.getStartLineNumber(we),end:Ce.getEndLineNumber(we),kind:ye?t.FoldingRangeKind.fromValue(ye):void 0})}return _e}finally{me.dispose()}})})}),define(J[831],ee([1,0,7,286,16,2,13,5,39,26,299,93,14,8,36,125,12,22]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentHoverWidget=e.ContentHoverController=void 0;const o=S.$;let l=class ui extends D.Disposable{constructor(E,I,T){super(),this._editor=E,this._instantiationService=I,this._keybindingService=T,this._widget=this._register(this._instantiationService.createInstance(C,this._editor)),this._currentResult=null,this._participants=[];for(const F of n.HoverParticipantRegistry.getAll())this._participants.push(this._instantiationService.createInstance(F,this._editor));this._participants.sort((F,R)=>F.hoverOrdinal-R.hoverOrdinal),this._computer=new v(this._editor,this._participants),this._hoverOperation=this._register(new m.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(F=>{if(!this._computer.anchor)return;const R=F.hasLoadingMessage?this._addLoadingMessage(F.value):F.value;this._withResult(new a(this._computer.anchor,R,F.isComplete))})),this._register(S.addStandardDisposableListener(this._widget.getDomNode(),"keydown",F=>{F.equals(9)&&this.hide()})),this._register(h.TokenizationRegistry.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(E){const I=[];for(const F of this._participants)if(F.suggestHoverAnchor){const R=F.suggestHoverAnchor(E);R&&I.push(R)}const T=E.target;if(T.type===6&&I.push(new n.HoverRangeAnchor(0,T.range,E.event.posx,E.event.posy)),T.type===7){const F=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!T.detail.isAfterLines&&typeof T.detail.horizontalDistanceToText=="number"&&T.detail.horizontalDistanceToText<F&&I.push(new n.HoverRangeAnchor(0,T.range,E.event.posx,E.event.posy))}return I.length===0?this._startShowingOrUpdateHover(null,0,0,!1,E):(I.sort((F,R)=>R.priority-F.priority),this._startShowingOrUpdateHover(I[0],0,0,!1,E))}startShowingAtRange(E,I,T,F){this._startShowingOrUpdateHover(new n.HoverRangeAnchor(0,E,void 0,void 0),I,T,F,null)}_startShowingOrUpdateHover(E,I,T,F,R){return!this._widget.position||!this._currentResult?E?(this._startHoverOperationIfNecessary(E,I,T,F,!1),!0):!1:this._editor.getOption(58).sticky&&R&&this._widget.isMouseGettingCloser(R.event.posx,R.event.posy)?(E&&this._startHoverOperationIfNecessary(E,I,T,F,!0),!0):E?E&&this._currentResult.anchor.equals(E)?!0:E.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(E)),this._startHoverOperationIfNecessary(E,I,T,F,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(E,I,T,F,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(E,I,T,F,R){this._computer.anchor&&this._computer.anchor.equals(E)||(this._hoverOperation.cancel(),this._computer.anchor=E,this._computer.shouldFocus=F,this._computer.source=T,this._computer.insistOnKeepingHoverVisible=R,this._hoverOperation.start(I))}_setCurrentResult(E){this._currentResult!==E&&(E&&E.messages.length===0&&(E=null),this._currentResult=E,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}isColorPickerVisible(){return this._widget.isColorPickerVisible}isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}isVisible(){return this._widget.isVisible}containsNode(E){return this._widget.getDomNode().contains(E)}_addLoadingMessage(E){if(this._computer.anchor){for(const I of this._participants)if(I.createLoadingMessage){const T=I.createLoadingMessage(this._computer.anchor);if(T)return E.slice(0).concat([T])}}return E}_withResult(E){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!E.isComplete||this._computer.insistOnKeepingHoverVisible&&E.messages.length===0)||this._setCurrentResult(E)}_renderMessages(E,I){const{showAtPosition:T,showAtSecondaryPosition:F,highlightRange:R}=ui.computeHoverRanges(this._editor,E.range,I),M=new D.DisposableStore,N=M.add(new f(this._keybindingService)),A=document.createDocumentFragment();let P=null;const x={fragment:A,statusBar:N,setColorPicker:U=>P=U,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const U of this._participants){const O=I.filter($=>$.owner===U);O.length>0&&M.add(U.renderHoverParts(x,O))}const W=I.some(U=>U.isBeforeContent);if(N.hasContent&&A.appendChild(N.hoverElement),A.hasChildNodes()){if(R){const U=this._editor.createDecorationsCollection();U.set([{range:R,options:ui._DECORATION_OPTIONS}]),M.add((0,D.toDisposable)(()=>{U.clear()}))}this._widget.showAt(A,new u(P,T,F,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,W,E.initialMousePosX,E.initialMousePosY,M))}else M.dispose()}static computeHoverRanges(E,I,T){let F=1;if(E.hasModel()){const P=E._getViewModel(),x=P.coordinatesConverter,W=x.convertModelRangeToViewRange(I),U=new w.Position(W.startLineNumber,P.getLineMinColumn(W.startLineNumber));F=x.convertViewPositionToModelPosition(U).column}const R=I.startLineNumber;let M=I.startColumn,N=T[0].range,A=null;for(const P of T)N=b.Range.plusRange(N,P.range),P.range.startLineNumber===R&&P.range.endLineNumber===R&&(M=Math.max(Math.min(M,P.range.startColumn),F)),P.forceShowAtRange&&(A=P.range);return{showAtPosition:A?A.getStartPosition():new w.Position(R,I.startColumn),showAtSecondaryPosition:A?A.getStartPosition():new w.Position(R,M),highlightRange:N}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}escape(){this._widget.escape()}};l._DECORATION_OPTIONS=_.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),l=Ne([fe(1,i.IInstantiationService),fe(2,s.IKeybindingService)],l),e.ContentHoverController=l;class a{constructor(E,I,T){this.anchor=E,this.messages=I,this.isComplete=T}filter(E){const I=this.messages.filter(T=>T.isValidForHoverAnchor(E));return I.length===this.messages.length?this:new d(this,this.anchor,I,this.isComplete)}}class d extends a{constructor(E,I,T,F){super(I,T,F),this.original=E}filter(E){return this.original.filter(E)}}class u{constructor(E,I,T,F,R,M,N,A,P,x){this.colorPicker=E,this.showAtPosition=I,this.showAtSecondaryPosition=T,this.preferAbove=F,this.stoleFocus=R,this.source=M,this.isBeforeContent=N,this.initialMousePosX=A,this.initialMousePosY=P,this.disposables=x,this.closestMouseDistance=void 0}}let C=class Gi extends D.Disposable{get position(){var E,I;return(I=(E=this._visibleData)===null||E===void 0?void 0:E.showAtPosition)!==null&&I!==void 0?I:null}get isColorPickerVisible(){var E;return!!(!((E=this._visibleData)===null||E===void 0)&&E.colorPicker)}get isVisibleFromKeyboard(){var E;return((E=this._visibleData)===null||E===void 0?void 0:E.source)===1}get isVisible(){var E;return(E=this._hoverVisibleKey.get())!==null&&E!==void 0?E:!1}constructor(E,I){super(),this._editor=E,this._contextKeyService=I,this.allowEditorOverflow=!0,this._hoverVisibleKey=g.EditorContextKeys.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=g.EditorContextKeys.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new k.HoverWidget),this._focusTracker=this._register(S.trackFocus(this.getDomNode())),this._horizontalScrollingBy=30,this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(T=>{T.hasChanged(48)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this),this._register(this._focusTracker.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(this._focusTracker.onDidBlur(()=>{this._hoverFocusedKey.set(!1)}))}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return Gi.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let E=this._visibleData.preferAbove;!E&&this._contextKeyService.getContextKeyValue(r.Context.Visible.key)&&(E=!0);const I=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:E?[1,2]:[2,1],positionAffinity:I}}isMouseGettingCloser(E,I){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=E,this._visibleData.initialMousePosY=I,!1;const T=S.getDomNodePagePosition(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=p(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,T.left,T.top,T.width,T.height));const F=p(E,I,T.left,T.top,T.width,T.height);return F>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,F),!0)}_setVisibleData(E){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=E,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const E=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:I,lineHeight:T}=this._editor.getOption(48);this._hover.contentsDomNode.style.fontSize=`${I}px`,this._hover.contentsDomNode.style.lineHeight=`${T/I}`,this._hover.contentsDomNode.style.maxHeight=`${E}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(I=>this._editor.applyFontInfo(I))}showAt(E,I){var T;this._setVisibleData(I),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(E),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),I.stoleFocus&&this._hover.containerDomNode.focus(),(T=I.colorPicker)===null||T===void 0||T.layout()}hide(){if(this._visibleData){const E=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),E&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const E=this._hover.scrollbar.getScrollDimensions();if(E.scrollWidth>E.width){const T=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==T&&(this._hover.contentsDomNode.style.paddingBottom=T,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}focus(){this._hover.containerDomNode.focus()}scrollUp(){const E=this._hover.scrollbar.getScrollPosition().scrollTop,I=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:E-I.lineHeight})}scrollDown(){const E=this._hover.scrollbar.getScrollPosition().scrollTop,I=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:E+I.lineHeight})}scrollLeft(){const E=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:E-this._horizontalScrollingBy})}scrollRight(){const E=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:E+this._horizontalScrollingBy})}pageUp(){const E=this._hover.scrollbar.getScrollPosition().scrollTop,I=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:E-I})}pageDown(){const E=this._hover.scrollbar.getScrollPosition().scrollTop,I=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:E+I})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}escape(){this._editor.focus()}};C.ID="editor.contrib.contentHoverWidget",C=Ne([fe(1,t.IContextKeyService)],C),e.ContentHoverWidget=C;let f=class extends D.Disposable{get hasContent(){return this._hasContent}constructor(E){super(),this._keybindingService=E,this._hasContent=!1,this.hoverElement=o("div.hover-row.status-bar"),this.actionsElement=S.append(this.hoverElement,o("div.actions"))}addAction(E){const I=this._keybindingService.lookupKeybinding(E.commandId),T=I?I.getLabel():null;return this._hasContent=!0,this._register(k.HoverAction.render(this.actionsElement,E,T))}append(E){const I=S.append(this.actionsElement,E);return this._hasContent=!0,I}};f=Ne([fe(0,s.IKeybindingService)],f);class v{get anchor(){return this._anchor}set anchor(E){this._anchor=E}get shouldFocus(){return this._shouldFocus}set shouldFocus(E){this._shouldFocus=E}get source(){return this._source}set source(E){this._source=E}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(E){this._insistOnKeepingHoverVisible=E}constructor(E,I){this._editor=E,this._participants=I,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(E,I){if(I.type!==1&&!I.supportsMarkerHover)return[];const T=E.getModel(),F=I.range.startLineNumber;if(F>T.getLineCount())return[];const R=T.getLineMaxColumn(F);return E.getLineDecorations(F).filter(M=>{if(M.options.isWholeLine)return!0;const N=M.range.startLineNumber===F?M.range.startColumn:1,A=M.range.endLineNumber===F?M.range.endColumn:R;if(M.options.showIfCollapsed){if(N>I.range.startColumn+1||I.range.endColumn-1>A)return!1}else if(N>I.range.startColumn||I.range.endColumn>A)return!1;return!0})}computeAsync(E){const I=this._anchor;if(!this._editor.hasModel()||!I)return c.AsyncIterableObject.EMPTY;const T=v._getLineDecorations(this._editor,I);return c.AsyncIterableObject.merge(this._participants.map(F=>F.computeAsync?F.computeAsync(I,T,E):c.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const E=v._getLineDecorations(this._editor,this._anchor);let I=[];for(const T of this._participants)I=I.concat(T.computeSync(this._anchor,E));return(0,y.coalesce)(I)}}function p(L,E,I,T,F,R){const M=I+F/2,N=T+R/2,A=Math.max(Math.abs(L-M)-F/2,0),P=Math.max(Math.abs(E-N)-R/2,0);return Math.sqrt(A*A+P*P)}}),define(J[832],ee([1,0,12,11,97,15,5,23,22,39,110,625,505,416]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let i=class hi{static get(g){return g.getContribution(hi.ID)}constructor(g,o){this.editor=g,this.editorWorkerService=o,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(g,o){var l;(l=this.currentRequest)===null||l===void 0||l.cancel();const a=this.editor.getSelection(),d=this.editor.getModel();if(!d||!a)return;let u=a;if(u.startLineNumber!==u.endLineNumber)return;const C=new y.EditorState(this.editor,5),f=d.uri;return this.editorWorkerService.canNavigateValueSet(f)?(this.currentRequest=(0,S.createCancelablePromise)(v=>this.editorWorkerService.navigateValueSet(f,u,o)),this.currentRequest.then(v=>{var p;if(!v||!v.range||!v.value||!C.validate(this.editor))return;const L=w.Range.lift(v.range);let E=v.range;const I=v.value.length-(u.endColumn-u.startColumn);E={startLineNumber:E.startLineNumber,startColumn:E.startColumn,endLineNumber:E.endLineNumber,endColumn:E.startColumn+v.value.length},I>1&&(u=new b.Selection(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn+I-1));const T=new t.InPlaceReplaceCommand(L,u,v.value);this.editor.pushUndoStop(),this.editor.executeCommand(g,T),this.editor.pushUndoStop(),this.decorations.set([{range:E,options:hi.DECORATION}]),(p=this.decorationRemover)===null||p===void 0||p.cancel(),this.decorationRemover=(0,S.timeout)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(k.onUnexpectedError)}).catch(k.onUnexpectedError)):Promise.resolve(void 0)}};i.ID="editor.contrib.inPlaceReplaceController",i.DECORATION=h.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),i=Ne([fe(1,m.IEditorWorkerService)],i);class s extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:n.localize(0,null),alias:"Replace with Previous Value",precondition:_.EditorContextKeys.writable,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3154,weight:100}})}run(g,o){const l=i.get(o);return l?l.run(this.id,!1):Promise.resolve(void 0)}}class r extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:n.localize(1,null),alias:"Replace with Next Value",precondition:_.EditorContextKeys.writable,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3156,weight:100}})}run(g,o){const l=i.get(o);return l?l.run(this.id,!0):Promise.resolve(void 0)}}(0,D.registerEditorContribution)(i.ID,i,4),(0,D.registerEditorAction)(s),(0,D.registerEditorAction)(r)}),define(J[833],ee([1,0,16,12,21,37,11,6,2,9,20,15,30,13,5,22,39,33,633,14,19,31,70,60,419]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C){"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 l.RawContextKey("LinkedEditingInputVisible",!1);const f="linked-editing-decoration";let v=class gi extends _.Disposable{static get(T){return T.getContribution(gi.ID)}constructor(T,F,R,M,N){super(),this.languageConfigurationService=M,this._syncRangesToken=0,this._localToDispose=this._register(new _.DisposableStore),this._editor=T,this._providers=R.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(F),this._debounceInformation=N.for(this._providers,"Linked Editing",{min:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new _.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(A=>{(A.hasChanged(67)||A.hasChanged(88))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(T){const F=this._editor.getModel(),R=F!==null&&(this._editor.getOption(67)||this._editor.getOption(88))&&this._providers.has(F);if(R===this._enabled&&!T||(this._enabled=R,this.clearRanges(),this._localToDispose.clear(),!R||F===null))return;this._localToDispose.add(b.Event.runAndSubscribe(F.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(F.getLanguageId()).getWordDefinition()}));const M=new k.Delayer(this._debounceInformation.get(F)),N=()=>{var x;this._rangeUpdateTriggerPromise=M.trigger(()=>this.updateRanges(),(x=this._debounceDuration)!==null&&x!==void 0?x:this._debounceInformation.get(F))},A=new k.Delayer(0),P=x=>{this._rangeSyncTriggerPromise=A.trigger(()=>this._syncRanges(x))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{N()})),this._localToDispose.add(this._editor.onDidChangeModelContent(x=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const W=this._currentDecorations.getRange(0);if(W&&x.changes.every(U=>W.intersectRanges(U.range))){P(this._syncRangesToken);return}}N()})),this._localToDispose.add({dispose:()=>{M.dispose(),A.dispose()}}),this.updateRanges()}_syncRanges(T){if(!this._editor.hasModel()||T!==this._syncRangesToken||this._currentDecorations.length===0)return;const F=this._editor.getModel(),R=this._currentDecorations.getRange(0);if(!R||R.startLineNumber!==R.endLineNumber)return this.clearRanges();const M=F.getValueInRange(R);if(this._currentWordPattern){const A=M.match(this._currentWordPattern);if((A?A[0].length:0)!==M.length)return this.clearRanges()}const N=[];for(let A=1,P=this._currentDecorations.length;A<P;A++){const x=this._currentDecorations.getRange(A);if(x)if(x.startLineNumber!==x.endLineNumber)N.push({range:x,text:M});else{let W=F.getValueInRange(x),U=M,O=x.startColumn,$=x.endColumn;const Q=h.commonPrefixLength(W,U);O+=Q,W=W.substr(Q),U=U.substr(Q);const se=h.commonSuffixLength(W,U);$-=se,W=W.substr(0,W.length-se),U=U.substr(0,U.length-se),(O!==$||U.length!==0)&&N.push({range:new s.Range(x.startLineNumber,O,x.endLineNumber,$),text:U})}}if(N.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const A=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",N),this._editor._getViewModel().setPrevEditOperationType(A)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(T=!1){return Ee(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const F=this._editor.getPosition();if(!this._enabled&&!T||this._editor.getSelections().length>1){this.clearRanges();return}const R=this._editor.getModel(),M=R.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===M){if(F.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const A=this._currentDecorations.getRange(0);if(A&&A.containsPosition(F))return}}this._currentRequestPosition=F,this._currentRequestModelVersion=M;const N=(0,k.createCancelablePromise)(A=>Ee(this,void 0,void 0,function*(){try{const P=new C.StopWatch(!1),x=yield E(this._providers,R,F,A);if(this._debounceInformation.update(R,P.elapsed()),N!==this._currentRequest||(this._currentRequest=null,M!==R.getVersionId()))return;let W=[];x?.ranges&&(W=x.ranges),this._currentWordPattern=x?.wordPattern||this._languageWordPattern;let U=!1;for(let $=0,Q=W.length;$<Q;$++)if(s.Range.containsPosition(W[$],F)){if(U=!0,$!==0){const se=W[$];W.splice($,1),W.unshift(se)}break}if(!U){this.clearRanges();return}const O=W.map($=>({range:$,options:gi.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(O),this._syncRangesToken++}catch(P){(0,w.isCancellationError)(P)||(0,w.onUnexpectedError)(P),(this._currentRequest===N||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=N,N})}};v.ID="editor.contrib.linkedEditing",v.DECORATION=c.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:f}),v=Ne([fe(1,l.IContextKeyService),fe(2,a.ILanguageFeaturesService),fe(3,g.ILanguageConfigurationService),fe(4,u.ILanguageFeatureDebounceService)],v),e.LinkedEditingContribution=v;class p extends n.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:o.localize(0,null),alias:"Start Linked Editing",precondition:l.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(T,F){const R=T.get(t.ICodeEditorService),[M,N]=Array.isArray(F)&&F||[void 0,void 0];return m.URI.isUri(M)&&i.Position.isIPosition(N)?R.openCodeEditor({resource:M},R.getActiveCodeEditor()).then(A=>{A&&(A.setPosition(N),A.invokeWithinContext(P=>(this.reportTelemetry(P,A),this.run(P,A))))},w.onUnexpectedError):super.runCommand(T,F)}run(T,F){const R=v.get(F);return R?Promise.resolve(R.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=p;const L=n.EditorCommand.bindToContribution(v.get);(0,n.registerEditorCommand)(new L({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:I=>I.clearRanges(),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function E(I,T,F,R){const M=I.ordered(T);return(0,k.first)(M.map(N=>()=>Ee(this,void 0,void 0,function*(){try{return yield N.provideLinkedEditingRanges(T,F,R)}catch(A){(0,w.onUnexpectedExternalError)(A);return}})),N=>!!N&&S.isNonEmptyArray(N?.ranges))}e.editorLinkedEditingBackground=(0,d.registerColor)("editor.linkedEditingBackground",{dark:D.Color.fromHex("#f00").transparent(.3),light:D.Color.fromHex("#f00").transparent(.3),hcDark:D.Color.fromHex("#f00").transparent(.3),hcLight:D.Color.white},o.localize(1,null)),(0,n.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(I,T,F)=>{const{linkedEditingRangeProvider:R}=I.get(a.ILanguageFeaturesService);return E(R,T,F,y.CancellationToken.None)}),(0,n.registerEditorContribution)(v.ID,v,1),(0,n.registerEditorAction)(p)}),define(J[834],ee([1,0,12,21,11,68,2,49,17,42,60,20,15,39,70,19,174,698,634,43,47,420]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let d=class Zi extends w.Disposable{static get(L){return L.getContribution(Zi.ID)}constructor(L,E,I,T,F){super(),this.editor=L,this.openerService=E,this.notificationService=I,this.languageFeaturesService=T,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=F.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new S.RunOnceScheduler(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const R=this._register(new c.ClickLinkGesture(L));this._register(R.onMouseMoveOrRelevantKeyDown(([M,N])=>{this._onEditorMouseMove(M,N)})),this._register(R.onExecute(M=>{this.onEditorMouseUp(M)})),this._register(R.onCancel(M=>{this.cleanUpActiveLinkDecoration()})),this._register(L.onDidChangeConfiguration(M=>{M.hasChanged(68)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(L.onDidChangeModelContent(M=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(L.onDidChangeModel(M=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(L.onDidChangeModelLanguage(M=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(M=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}computeLinksNow(){return Ee(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(68))return;const L=this.editor.getModel();if(this.providers.has(L)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,S.createCancelablePromise)(E=>(0,g.getLinks)(this.providers,L,E));try{const E=new m.StopWatch(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(L,E.elapsed()),L.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(E){(0,y.onUnexpectedError)(E)}finally{this.computePromise=null}}})}updateDecorations(L){const E=this.editor.getOption(75)==="altKey",I=[],T=Object.keys(this.currentOccurrences);for(const R of T){const M=this.currentOccurrences[R];I.push(M.decorationId)}const F=[];if(L)for(const R of L)F.push(C.decoration(R,E));this.editor.changeDecorations(R=>{const M=R.deltaDecorations(I,F);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let N=0,A=M.length;N<A;N++){const P=new C(L[N],M[N]);this.currentOccurrences[P.decorationId]=P}})}_onEditorMouseMove(L,E){const I=this.editor.getOption(75)==="altKey";if(this.isEnabled(L,E)){this.cleanUpActiveLinkDecoration();const T=this.getLinkOccurrence(L.target.position);T&&this.editor.changeDecorations(F=>{T.activate(F,I),this.activeLinkDecorationId=T.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const L=this.editor.getOption(75)==="altKey";if(this.activeLinkDecorationId){const E=this.currentOccurrences[this.activeLinkDecorationId];E&&this.editor.changeDecorations(I=>{E.deactivate(I,L)}),this.activeLinkDecorationId=null}}onEditorMouseUp(L){if(!this.isEnabled(L))return;const E=this.getLinkOccurrence(L.target.position);E&&this.openLinkOccurrence(E,L.hasSideBySideModifier,!0)}openLinkOccurrence(L,E,I=!1){if(!this.openerService)return;const{link:T}=L;T.resolve(k.CancellationToken.None).then(F=>{if(typeof F=="string"&&this.editor.hasModel()){const R=this.editor.getModel().uri;if(R.scheme===b.Schemas.file&&F.startsWith(`${b.Schemas.file}:`)){const M=n.URI.parse(F);if(M.scheme===b.Schemas.file){const N=h.originalFSPath(M);let A=null;N.startsWith("/./")?A=`.${N.substr(1)}`:N.startsWith("//./")&&(A=`.${N.substr(2)}`),A&&(F=h.joinPath(R,A))}}}return this.openerService.open(F,{openToSide:E,fromUserGesture:I,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},F=>{const R=F instanceof Error?F.message:F;R==="invalid"?this.notificationService.warn(o.localize(0,null,T.url.toString())):R==="missing"?this.notificationService.warn(o.localize(1,null)):(0,y.onUnexpectedError)(F)})}getLinkOccurrence(L){if(!this.editor.hasModel()||!L)return null;const E=this.editor.getModel().getDecorationsInRange({startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:L.lineNumber,endColumn:L.column},0,!0);for(const I of E){const T=this.currentOccurrences[I.id];if(T)return T}return null}isEnabled(L,E){return!!(L.target.type===6&&(L.hasTriggerModifier||E&&E.keyCodeIsTriggerKey))}stop(){var L;this.computeLinks.cancel(),this.activeLinksList&&((L=this.activeLinksList)===null||L===void 0||L.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};d.ID="editor.linkDetector",d=Ne([fe(1,a.IOpenerService),fe(2,l.INotificationService),fe(3,r.ILanguageFeaturesService),fe(4,s.ILanguageFeatureDebounceService)],d),e.LinkDetector=d;const u={general:i.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:i.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class C{static decoration(L,E){return{range:L.range,options:C._getOptions(L,E,!1)}}static _getOptions(L,E,I){const T=Object.assign({},I?u.active:u.general);return T.hoverMessage=f(L,E),T}constructor(L,E){this.link=L,this.decorationId=E}activate(L,E){L.changeDecorationOptions(this.decorationId,C._getOptions(this.link,E,!0))}deactivate(L,E){L.changeDecorationOptions(this.decorationId,C._getOptions(this.link,E,!1))}}function f(p,L){const E=p.url&&/^command:/i.test(p.url.toString()),I=p.tooltip?p.tooltip:E?o.localize(2,null):o.localize(3,null),T=L?_.isMacintosh?o.localize(4,null):o.localize(5,null):_.isMacintosh?o.localize(6,null):o.localize(7,null);if(p.url){let F="";if(/^command:/i.test(p.url.toString())){const M=p.url.toString().match(/^command:([^?#]+)/);if(M){const N=M[1];F=o.localize(8,null,N)}}return new D.MarkdownString("",!0).appendLink(p.url.toString(!0).replace(/ /g,"%20"),I,F).appendMarkdown(` (${T})`)}else return new D.MarkdownString().appendText(`${I} (${T})`)}class v extends t.EditorAction{constructor(){super({id:"editor.action.openLink",label:o.localize(9,null),alias:"Open Link",precondition:void 0})}run(L,E){const I=d.get(E);if(!I||!E.hasModel())return;const T=E.getSelections();for(const F of T){const R=I.getLinkOccurrence(F.getEndPosition());R&&I.openLinkOccurrence(R,!1)}}}(0,t.registerEditorContribution)(d.ID,d,1),(0,t.registerEditorAction)(v)}),define(J[835],ee([1,0,2,19,179,12,335,270,269,33,11,200,54]),function(q,e,S,k,y,D,w,b,_,h,m,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModelProvider=void 0;var i;(function(d){d.OUTLINE_MODEL="outlineModel",d.FOLDING_PROVIDER_MODEL="foldingProviderModel",d.INDENTATION_MODEL="indentationModel"})(i||(i={}));var s;(function(d){d[d.VALID=0]="VALID",d[d.INVALID=1]="INVALID",d[d.CANCELED=2]="CANCELED"})(s||(s={}));let r=class{constructor(u,C,f,v){this._editor=u,this._languageConfigurationService=C,this._languageFeaturesService=f,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=new D.Delayer(300);const p=new g(f),L=new a(this._editor,f),E=new l(this._editor,C);switch(v){case i.OUTLINE_MODEL:this._modelProviders.push(p),this._modelProviders.push(L),this._modelProviders.push(E);break;case i.FOLDING_PROVIDER_MODEL:this._modelProviders.push(L),this._modelProviders.push(E);break;case i.INDENTATION_MODEL:this._modelProviders.push(E);break}this._store=new S.DisposableStore}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(u,C,f){return Ee(this,void 0,void 0,function*(){return this._store.clear(),this._store.add({dispose:()=>{var v;this._cancelModelPromise(),(v=this._updateScheduler)===null||v===void 0||v.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>Ee(this,void 0,void 0,function*(){for(const v of this._modelProviders){const{statusPromise:p,modelPromise:L}=v.computeStickyModel(u,C,f);this._modelPromise=L;const E=yield p;if(this._modelPromise!==L)return null;switch(E){case s.CANCELED:return this._store.clear(),null;case s.VALID:return v.stickyModel}}return null}))})}};r=Ne([fe(1,h.ILanguageConfigurationService),fe(2,k.ILanguageFeaturesService)],r),e.StickyModelProvider=r;class c{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,s.INVALID}computeStickyModel(u,C,f){if(!this.isProviderValid(u))return{statusPromise:this._invalid(),modelPromise:null};const v=(0,D.createCancelablePromise)(p=>this.createModelFromProvider(u,C,p));return{statusPromise:v.then(p=>this.isModelValid(p)?f.isCancellationRequested?s.CANCELED:(this._stickyModel=this.createStickyModel(u,C,f,p),s.VALID):this._invalid()).then(void 0,p=>((0,m.onUnexpectedError)(p),s.CANCELED)),modelPromise:v}}isModelValid(u){return!0}isProviderValid(u){return!0}}let g=class extends c{constructor(u){super(),this._languageFeaturesService=u}createModelFromProvider(u,C,f){return y.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,u,f)}createStickyModel(u,C,f,v){var p;const{stickyOutlineElement:L,providerID:E}=this._stickyModelFromOutlineModel(v,(p=this._stickyModel)===null||p===void 0?void 0:p.outlineProviderId);return new n.StickyModel(u.uri,C,L,E)}isModelValid(u){return u&&u.children.size>0}_stickyModelFromOutlineModel(u,C){let f;if(t.Iterable.first(u.children.values())instanceof y.OutlineGroup){const E=t.Iterable.find(u.children.values(),I=>I.id===C);if(E)f=E.children;else{let I="",T=-1,F;for(const[R,M]of u.children.entries()){const N=this._findSumOfRangesOfGroup(M);N>T&&(F=M,T=N,I=M.id)}C=I,f=F.children}}else f=u.children;const v=[],p=Array.from(f.values()).sort((E,I)=>{const T=new n.StickyRange(E.symbol.range.startLineNumber,E.symbol.range.endLineNumber),F=new n.StickyRange(I.symbol.range.startLineNumber,I.symbol.range.endLineNumber);return this._comparator(T,F)});for(const E of p)v.push(this._stickyModelFromOutlineElement(E,E.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new n.StickyElement(void 0,v,void 0),providerID:C}}_stickyModelFromOutlineElement(u,C){const f=[];for(const p of u.children.values())if(p.symbol.selectionRange.startLineNumber!==p.symbol.range.endLineNumber)if(p.symbol.selectionRange.startLineNumber!==C)f.push(this._stickyModelFromOutlineElement(p,p.symbol.selectionRange.startLineNumber));else for(const L of p.children.values())f.push(this._stickyModelFromOutlineElement(L,p.symbol.selectionRange.startLineNumber));f.sort((p,L)=>this._comparator(p.range,L.range));const v=new n.StickyRange(u.symbol.selectionRange.startLineNumber,u.symbol.range.endLineNumber);return new n.StickyElement(v,f,void 0)}_comparator(u,C){return u.startLineNumber!==C.startLineNumber?u.startLineNumber-C.startLineNumber:C.endLineNumber-u.endLineNumber}_findSumOfRangesOfGroup(u){let C=0;for(const f of u.children.values())C+=this._findSumOfRangesOfGroup(f);return u instanceof y.OutlineElement?C+u.symbol.range.endLineNumber-u.symbol.selectionRange.startLineNumber:C}};g=Ne([fe(0,k.ILanguageFeaturesService)],g);class o extends c{constructor(u){super(),this._foldingLimitReporter=new w.RangesLimitReporter(u)}createStickyModel(u,C,f,v){const p=this._fromFoldingRegions(v);return new n.StickyModel(u.uri,C,p,void 0)}isModelValid(u){return u!==null}_fromFoldingRegions(u){const C=u.length,f=[],v=new n.StickyElement(void 0,[],void 0);for(let p=0;p<C;p++){const L=u.getParentIndex(p);let E;L!==-1?E=f[L]:E=v;const I=new n.StickyElement(new n.StickyRange(u.getStartLineNumber(p),u.getEndLineNumber(p)+1),[],E);E.children.push(I),f.push(I)}return v}}let l=class extends o{constructor(u,C){super(u),this._languageConfigurationService=C}createModelFromProvider(u,C,f){return new _.IndentRangeProvider(u,this._languageConfigurationService,this._foldingLimitReporter).compute(f)}};l=Ne([fe(1,h.ILanguageConfigurationService)],l);let a=class extends o{constructor(u,C){super(u),this._languageFeaturesService=C}isProviderValid(u){return w.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,u).length>0}createModelFromProvider(u,C,f){const v=w.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,u);return new b.SyntaxRangeProvider(u,v,()=>this.createModelFromProvider(u,C,f),this._foldingLimitReporter,void 0).compute(f)}};a=Ne([fe(1,k.ILanguageFeaturesService)],a)}),define(J[836],ee([1,0,2,19,21,12,16,42,6,33,835,200]),function(q,e,S,k,y,D,w,b,_,h,m,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyLineCandidateProvider=e.StickyLineCandidate=void 0;class t{constructor(r,c,g){this.startLineNumber=r,this.endLineNumber=c,this.nestingDepth=g}}e.StickyLineCandidate=t;let i=class extends S.Disposable{constructor(r,c,g){super(),this._languageFeaturesService=c,this._languageConfigurationService=g,this._onDidChangeStickyScroll=this._store.add(new _.Emitter),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=r,this._sessionStore=new S.DisposableStore,this._updateSoon=this._register(new D.RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(110)&&this.readConfiguration()})),this.readConfiguration()}dispose(){super.dispose(),this._sessionStore.dispose()}readConfiguration(){if(this._options=this._editor.getOption(110),!this._options.enabled){this._sessionStore.clear();return}this._stickyModelProvider=new m.StickyModelProvider(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel),this._sessionStore.add(this._editor.onDidChangeModel(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update()}getVersionId(){var r;return(r=this._model)===null||r===void 0?void 0:r.version}update(){var r;return Ee(this,void 0,void 0,function*(){(r=this._cts)===null||r===void 0||r.dispose(!0),this._cts=new y.CancellationTokenSource,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(r){return Ee(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider)return;const c=this._editor.getModel(),g=c.getVersionId(),l=(this._model?!(0,b.isEqual)(this._model.uri,c.uri):!1)?setTimeout(()=>{r.isCancellationRequested||(this._model=new n.StickyModel(c.uri,c.getVersionId(),void 0,void 0),this._onDidChangeStickyScroll.fire())},75):void 0;this._model=yield this._stickyModelProvider.update(c,g,r),clearTimeout(l)})}updateIndex(r){return r===-1?r=0:r<0&&(r=-r-2),r}getCandidateStickyLinesIntersectingFromStickyModel(r,c,g,o,l){if(c.children.length===0)return;let a=l;const d=[];for(let f=0;f<c.children.length;f++){const v=c.children[f];v.range&&d.push(v.range.startLineNumber)}const u=this.updateIndex((0,w.binarySearch)(d,r.startLineNumber,(f,v)=>f-v)),C=this.updateIndex((0,w.binarySearch)(d,r.startLineNumber+o,(f,v)=>f-v));for(let f=u;f<=C;f++){const v=c.children[f];if(!v)return;if(v.range){const p=v.range.startLineNumber,L=v.range.endLineNumber;r.startLineNumber<=L+1&&p-1<=r.endLineNumber&&p!==a&&(a=p,g.push(new t(p,L-1,o+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(r,v,g,o+1,p))}else this.getCandidateStickyLinesIntersectingFromStickyModel(r,v,g,o,l)}}getCandidateStickyLinesIntersecting(r){var c,g;if(!(!((c=this._model)===null||c===void 0)&&c.element))return[];let o=[];this.getCandidateStickyLinesIntersectingFromStickyModel(r,this._model.element,o,0,-1);const l=(g=this._editor._getViewModel())===null||g===void 0?void 0:g.getHiddenAreas();if(l)for(const a of l)o=o.filter(d=>!(d.startLineNumber>=a.startLineNumber&&d.endLineNumber<=a.endLineNumber+1));return o}};i=Ne([fe(1,k.ILanguageFeaturesService),fe(2,h.ILanguageConfigurationService)],i),e.StickyLineCandidateProvider=i}),define(J[837],ee([1,0,2,95,109,138,13,66,153,7,427]),function(q,e,S,k,y,D,w,b,_,h){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollWidget=e.StickyScrollWidgetState=void 0;class n{constructor(r,c){this.lineNumbers=r,this.lastLineRelativePosition=c}}e.StickyScrollWidgetState=n;const t=(m=window.trustedTypes)===null||m===void 0?void 0:m.createPolicy("stickyScrollViewLayer",{createHTML:s=>s});class i extends S.Disposable{constructor(r){super(),this._editor=r,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new S.DisposableStore),this._lineNumbers=[],this._lastLineRelativePosition=0,this._hoverOnLine=-1,this._hoverOnColumn=-1,this._layoutInfo=this._editor.getLayoutInfo(),this._rootDomNode=document.createElement("div"),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",r instanceof _.EmbeddedCodeEditorWidget),this._rootDomNode.style.width=`${this._layoutInfo.width-this._layoutInfo.minimap.minimapCanvasOuterWidth-this._layoutInfo.verticalScrollbarWidth}px`}get hoverOnLine(){return this._hoverOnLine}get hoverOnColumn(){return this._hoverOnColumn}get lineNumbers(){return this._lineNumbers}getCurrentLines(){return this._lineNumbers}setState(r){h.clearNode(this._rootDomNode),this._disposableStore.clear(),this._lineNumbers.length=0;const c=this._editor.getOption(64);r.lineNumbers.length*c+r.lastLineRelativePosition>0?(this._lastLineRelativePosition=r.lastLineRelativePosition,this._lineNumbers=r.lineNumbers):(this._lastLineRelativePosition=0,this._lineNumbers=[]),this._renderRootNode()}_renderRootNode(){if(!this._editor._getViewModel())return;for(const[o,l]of this._lineNumbers.entries()){const a=this._renderChildNode(o,l);this._rootDomNode.appendChild(a)}const r=this._editor.getOption(64),c=this._lineNumbers.length*r+this._lastLineRelativePosition;this._rootDomNode.style.display=c>0?"block":"none",this._rootDomNode.style.height=c.toString()+"px",this._rootDomNode.setAttribute("role","list"),this._editor.getOption(70).side==="left"&&(this._rootDomNode.style.marginLeft=this._editor.getLayoutInfo().minimap.minimapCanvasOuterWidth+"px")}_renderChildNode(r,c){const g=document.createElement("div"),o=this._editor._getViewModel(),l=o.coordinatesConverter.convertModelPositionToViewPosition(new w.Position(c,1)).lineNumber,a=o.getViewLineRenderingData(l),d=this._editor.getLayoutInfo(),u=d.width-d.minimap.minimapCanvasOuterWidth-d.verticalScrollbarWidth,C=this._editor.getOption(70).side,f=this._editor.getOption(64),v=this._editor.getOption(65);let p;try{p=D.LineDecoration.filter(a.inlineDecorations,l,a.minColumn,a.maxColumn)}catch{p=[]}const L=new y.RenderLineInput(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,p,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),E=new k.StringBuilder(2e3);(0,y.renderViewLine)(L,E);let I;t?I=t.createHTML(E.build()):I=E.build();const T=document.createElement("span");T.className="sticky-line",T.classList.add(`stickyLine${c}`),T.style.lineHeight=`${f}px`,T.innerHTML=I;const F=document.createElement("span");F.className="sticky-line",F.style.lineHeight=`${f}px`,C==="left"?F.style.width=`${d.contentLeft-d.minimap.minimapCanvasOuterWidth}px`:C==="right"&&(F.style.width=`${d.contentLeft}px`);const R=document.createElement("span");return v.renderType===1||v.renderType===3&&c%10===0?R.innerText=c.toString():v.renderType===2&&(R.innerText=Math.abs(c-this._editor.getPosition().lineNumber).toString()),R.className="sticky-line-number",R.style.lineHeight=`${f}px`,R.style.width=`${d.lineNumbersWidth}px`,C==="left"?R.style.paddingLeft=`${d.lineNumbersLeft-d.minimap.minimapCanvasOuterWidth}px`:C==="right"&&(R.style.paddingLeft=`${d.lineNumbersLeft}px`),F.appendChild(R),this._editor.applyFontInfo(T),this._editor.applyFontInfo(R),g.appendChild(F),g.appendChild(T),g.className="sticky-line-root",g.setAttribute("role","listitem"),g.tabIndex=0,g.style.lineHeight=`${f}px`,g.style.width=`${u}px`,g.style.height=`${f}px`,g.style.zIndex="0",r===this._lineNumbers.length-1&&(g.style.position="relative",g.style.zIndex="-1",g.style.top=this._lastLineRelativePosition+"px"),this._disposableStore.add(h.addDisposableListener(g,"mouseover",M=>{if(this._editor.hasModel()){const A=new b.StandardMouseEvent(M).target.innerText;this._hoverOnLine=c,this._hoverOnColumn=this._editor.getModel().getLineContent(c).indexOf(A)+1||-1}})),g}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}}e.StickyScrollWidget=i}),define(J[838],ee([1,0,7,108,12,11,6,2,132,9,153,814,651,14,8,83,31,91,24,284,125,316,809,98,160,428,234]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetSelectedBackground=void 0,(0,c.registerColor)("editorSuggestWidget.background",{dark:c.editorWidgetBackground,light:c.editorWidgetBackground,hcDark:c.editorWidgetBackground,hcLight:c.editorWidgetBackground},t.localize(0,null)),(0,c.registerColor)("editorSuggestWidget.border",{dark:c.editorWidgetBorder,light:c.editorWidgetBorder,hcDark:c.editorWidgetBorder,hcLight:c.editorWidgetBorder},t.localize(1,null));const f=(0,c.registerColor)("editorSuggestWidget.foreground",{dark:c.editorForeground,light:c.editorForeground,hcDark:c.editorForeground,hcLight:c.editorForeground},t.localize(2,null));(0,c.registerColor)("editorSuggestWidget.selectedForeground",{dark:c.quickInputListFocusForeground,light:c.quickInputListFocusForeground,hcDark:c.quickInputListFocusForeground,hcLight:c.quickInputListFocusForeground},t.localize(3,null)),(0,c.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:c.quickInputListFocusIconForeground,light:c.quickInputListFocusIconForeground,hcDark:c.quickInputListFocusIconForeground,hcLight:c.quickInputListFocusIconForeground},t.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,c.registerColor)("editorSuggestWidget.selectedBackground",{dark:c.quickInputListFocusBackground,light:c.quickInputListFocusBackground,hcDark:c.quickInputListFocusBackground,hcLight:c.quickInputListFocusBackground},t.localize(5,null)),(0,c.registerColor)("editorSuggestWidget.highlightForeground",{dark:c.listHighlightForeground,light:c.listHighlightForeground,hcDark:c.listHighlightForeground,hcLight:c.listHighlightForeground},t.localize(6,null)),(0,c.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:c.listFocusHighlightForeground,light:c.listFocusHighlightForeground,hcDark:c.listFocusHighlightForeground,hcLight:c.listFocusHighlightForeground},t.localize(7,null)),(0,c.registerColor)("editorSuggestWidgetStatus.foreground",{dark:(0,c.transparent)(f,.5),light:(0,c.transparent)(f,.5),hcDark:(0,c.transparent)(f,.5),hcLight:(0,c.transparent)(f,.5)},t.localize(8,null));class v{constructor(I,T){this._service=I,this._key=`suggestWidget.size/${T.getEditorType()}/${T instanceof m.EmbeddedCodeEditorWidget}`}restore(){var I;const T=(I=this._service.get(this._key,0))!==null&&I!==void 0?I:"";try{const F=JSON.parse(T);if(S.Dimension.is(F))return S.Dimension.lift(F)}catch{}}store(I){this._service.store(this._key,JSON.stringify(I),0,1)}reset(){this._service.remove(this._key,0)}}let p=class fi{constructor(I,T,F,R,M){this.editor=I,this._storageService=T,this._state=0,this._isAuto=!1,this._pendingLayout=new b.MutableDisposable,this._pendingShowDetails=new b.MutableDisposable,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new y.TimeoutTimer,this._disposables=new b.DisposableStore,this._onDidSelect=new w.PauseableEmitter,this._onDidFocus=new w.PauseableEmitter,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 L(this,I),this._persistedSize=new v(T,I);class N{constructor($,Q,se=!1,le=!1){this.persistedSize=$,this.currentSize=Q,this.persistHeight=se,this.persistWidth=le}}let A;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),A=new N(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(O=>{var $,Q,se,le;if(this._resize(O.dimension.width,O.dimension.height),A&&(A.persistHeight=A.persistHeight||!!O.north||!!O.south,A.persistWidth=A.persistWidth||!!O.east||!!O.west),!!O.done){if(A){const{itemHeight:te,defaultSize:re}=this.getLayoutInfo(),H=Math.round(te/2);let{width:B,height:j}=this.element.size;(!A.persistHeight||Math.abs(A.currentSize.height-j)<=H)&&(j=(Q=($=A.persistedSize)===null||$===void 0?void 0:$.height)!==null&&Q!==void 0?Q:re.height),(!A.persistWidth||Math.abs(A.currentSize.width-B)<=H)&&(B=(le=(se=A.persistedSize)===null||se===void 0?void 0:se.width)!==null&&le!==void 0?le:re.width),this._persistedSize.store(new S.Dimension(B,j))}this._contentWidget.unlockPreference(),A=void 0}})),this._messageElement=S.append(this.element.domNode,S.$(".message")),this._listElement=S.append(this.element.domNode,S.$(".tree"));const P=M.createInstance(d.SuggestDetailsWidget,this.editor);P.onDidClose(this.toggleDetails,this,this._disposables),this._details=new d.SuggestDetailsOverlay(P,this.editor);const x=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(113).showIcons);x();const W=M.createInstance(u.ItemRenderer,this.editor);this._disposables.add(W),this._disposables.add(W.onDidToggleDetails(()=>this.toggleDetails())),this._list=new k.List("SuggestWidget",this._listElement,{getHeight:O=>this.getLayoutInfo().itemHeight,getTemplateId:O=>"suggestion"},[W],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>t.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:O=>{let $=O.textLabel;if(typeof O.completion.label!="string"){const{detail:te,description:re}=O.completion.label;te&&re?$=t.localize(12,null,$,te,re):te?$=t.localize(13,null,$,te):re&&($=t.localize(14,null,$,re))}if(!O.isResolved||!this._isDetailsVisible())return $;const{documentation:Q,detail:se}=O.completion,le=h.format("{0}{1}",se||"",Q?typeof Q=="string"?Q:Q.value:"");return t.localize(15,null,$,le)}}}),this._list.style((0,C.getListStyles)({listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:c.activeContrastBorder})),this._status=M.createInstance(n.SuggestWidgetStatus,this.element.domNode,a.suggestWidgetStatusbarMenu);const U=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(113).showStatusBar);U(),this._disposables.add(R.onDidColorThemeChange(O=>this._onThemeChange(O))),this._onThemeChange(R.getColorTheme()),this._disposables.add(this._list.onMouseDown(O=>this._onListMouseDownOrTap(O))),this._disposables.add(this._list.onTap(O=>this._onListMouseDownOrTap(O))),this._disposables.add(this._list.onDidChangeSelection(O=>this._onListSelection(O))),this._disposables.add(this._list.onDidChangeFocus(O=>this._onListFocus(O))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(O=>{O.hasChanged(113)&&(U(),x())})),this._ctxSuggestWidgetVisible=a.Context.Visible.bindTo(F),this._ctxSuggestWidgetDetailsVisible=a.Context.DetailsVisible.bindTo(F),this._ctxSuggestWidgetMultipleSuggestions=a.Context.MultipleSuggestions.bindTo(F),this._ctxSuggestWidgetHasFocusedSuggestion=a.Context.HasFocusedSuggestion.bindTo(F),this._disposables.add(S.addStandardDisposableListener(this._details.widget.domNode,"keydown",O=>{this._onDetailsKeydown.fire(O)})),this._disposables.add(this.editor.onMouseDown(O=>this._onEditorMouseDown(O)))}dispose(){var I;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(I=this._loadingTimeout)===null||I===void 0||I.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(I){this._details.widget.domNode.contains(I.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(I.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(I){typeof I.element>"u"||typeof I.index>"u"||(I.browserEvent.preventDefault(),I.browserEvent.stopPropagation(),this._select(I.element,I.index))}_onListSelection(I){I.elements.length&&this._select(I.elements[0],I.indexes[0])}_select(I,T){const F=this._completionModel;F&&(this._onDidSelect.fire({item:I,index:T,model:F}),this.editor.focus())}_onThemeChange(I){this._details.widget.borderWidth=(0,g.isHighContrast)(I.type)?2:1}_onListFocus(I){var T;if(this._ignoreFocusEvents)return;if(!I.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const F=I.elements[0],R=I.indexes[0];F!==this._focusedItem&&((T=this._currentSuggestionDetails)===null||T===void 0||T.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=F,this._list.reveal(R),this._currentSuggestionDetails=(0,y.createCancelablePromise)(M=>Ee(this,void 0,void 0,function*(){const N=(0,y.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),A=M.onCancellationRequested(()=>N.dispose()),P=yield F.resolve(M);return N.dispose(),A.dispose(),P})),this._currentSuggestionDetails.then(()=>{R>=this._list.length||F!==this._list.element(R)||(this._ignoreFocusEvents=!0,this._list.splice(R,1,[F]),this._list.setFocus([R]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,u.getAriaId)(R)}))}).catch(D.onUnexpectedError)),this._onDidFocus.fire({item:F,index:R,model:this._completionModel})}_setState(I){if(this._state!==I)switch(this._state=I,this.element.domNode.classList.toggle("frozen",I===4),this.element.domNode.classList.remove("message"),I){case 0:S.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._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),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=fi.LOADING_MESSAGE,S.hide(this._listElement,this._status.element),S.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=fi.NO_SUGGESTIONS_MESSAGE,S.hide(this._listElement,this._status.element),S.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:S.hide(this._messageElement),S.show(this._listElement,this._status.element),this._show();break;case 4:S.hide(this._messageElement),S.show(this._listElement,this._status.element),this._show();break;case 5:S.hide(this._messageElement),S.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(I,T){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!I,this._isAuto||(this._loadingTimeout=(0,y.disposableTimeout)(()=>this._setState(1),T)))}showSuggestions(I,T,F,R,M){var N,A;if(this._contentWidget.setPosition(this.editor.getPosition()),(N=this._loadingTimeout)===null||N===void 0||N.dispose(),(A=this._currentSuggestionDetails)===null||A===void 0||A.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==I&&(this._completionModel=I),F&&this._state!==2&&this._state!==0){this._setState(4);return}const P=this._completionModel.items.length,x=P===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(P>1),x){this._setState(R?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(F?4:3),this._list.reveal(T,0),this._list.setFocus(M?[]:[T])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=S.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}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&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):((0,d.canExpandCompletionItem)(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(I){this._pendingShowDetails.value=S.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingShowDetails.clear(),this._details.show(),I?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._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var I;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(I=this._loadingTimeout)===null||I===void 0||I.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const T=this._persistedSize.restore(),F=Math.ceil(this.getLayoutInfo().itemHeight*4.3);T&&T.height<F&&this._persistedSize.store(T.with(void 0,F))}isFrozen(){return this._state===4}_afterRender(I){if(I===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(I){var T,F,R;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const M=S.getClientArea(document.body),N=this.getLayoutInfo();I||(I=N.defaultSize);let A=I.height,P=I.width;if(this._status.element.style.height=`${N.itemHeight}px`,this._state===2||this._state===1)A=N.itemHeight+N.borderHeight,P=N.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new S.Dimension(P,A),this._contentWidget.setPreference(2);else{const x=M.width-N.borderHeight-2*N.horizontalPadding;P>x&&(P=x);const W=this._completionModel?this._completionModel.stats.pLabelLen*N.typicalHalfwidthCharacterWidth:P,U=N.statusBarHeight+this._list.contentHeight+N.borderHeight,O=N.itemHeight+N.statusBarHeight,$=S.getDomNodePagePosition(this.editor.getDomNode()),Q=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),se=$.top+Q.top+Q.height,le=Math.min(M.height-se-N.verticalPadding,U),te=$.top+Q.top-N.verticalPadding,re=Math.min(te,U);let H=Math.min(Math.max(re,le)+N.borderHeight,U);A===((T=this._cappedHeight)===null||T===void 0?void 0:T.capped)&&(A=this._cappedHeight.wanted),A<O&&(A=O),A>H&&(A=H);const B=150;A>le||this._forceRenderingAbove&&te>B?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),H=re):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),H=le),this.element.preferredSize=new S.Dimension(W,N.defaultSize.height),this.element.maxSize=new S.Dimension(x,H),this.element.minSize=new S.Dimension(220,O),this._cappedHeight=A===U?{wanted:(R=(F=this._cappedHeight)===null||F===void 0?void 0:F.wanted)!==null&&R!==void 0?R:I.height,capped:A}:void 0}this._resize(P,A)}_resize(I,T){const{width:F,height:R}=this.element.maxSize;I=Math.min(F,I),T=Math.min(R,T);const{statusBarHeight:M}=this.getLayoutInfo();this._list.layout(T-M,I),this._listElement.style.height=`${T-M}px`,this.element.layout(T,I),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var I;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((I=this._contentWidget.getPosition())===null||I===void 0?void 0:I.preference[0])===2)}getLayoutInfo(){const I=this.editor.getOption(48),T=(0,_.clamp)(this.editor.getOption(115)||I.lineHeight,8,1e3),F=!this.editor.getOption(113).showStatusBar||this._state===2||this._state===1?0:T,R=this._details.widget.borderWidth,M=2*R;return{itemHeight:T,statusBarHeight:F,borderWidth:R,borderHeight:M,typicalHalfwidthCharacterWidth:I.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new S.Dimension(430,F+12*T+M)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(I){this._storageService.store("expandSuggestionDocs",I,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};p.LOADING_MESSAGE=t.localize(9,null),p.NO_SUGGESTIONS_MESSAGE=t.localize(10,null),p=Ne([fe(1,r.IStorageService),fe(2,i.IContextKeyService),fe(3,o.IThemeService),fe(4,s.IInstantiationService)],p),e.SuggestWidget=p;class L{constructor(I,T){this._widget=I,this._editor=T,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:I,width:T}=this._widget.element.size,{borderWidth:F,horizontalPadding:R}=this._widget.getLayoutInfo();return new S.Dimension(T+2*F+R,I+2*F)}afterRender(I){this._widget._afterRender(I)}setPreference(I){this._preferenceLocked||(this._preference=I)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(I){this._position=I}}e.SuggestContentWidget=L}),define(J[336],ee([1,0,48,39,26,660,31,24,432]),function(q,e,S,k,y,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSelectionHighlightDecorationOptions=e.getHighlightDecorationOptions=void 0;const _=(0,w.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},D.localize(0,null),!0);(0,w.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},D.localize(1,null),!0),(0,w.registerColor)("editor.wordHighlightTextBackground",{light:_,dark:_,hcDark:_,hcLight:_},D.localize(2,null),!0);const h=(0,w.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:w.activeContrastBorder,hcLight:w.activeContrastBorder},D.localize(3,null));(0,w.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:w.activeContrastBorder,hcLight:w.activeContrastBorder},D.localize(4,null)),(0,w.registerColor)("editor.wordHighlightTextBorder",{light:h,dark:h,hcDark:h,hcLight:h},D.localize(5,null));const m=(0,w.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},D.localize(6,null),!0),n=(0,w.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},D.localize(7,null),!0),t=(0,w.registerColor)("editorOverviewRuler.wordHighlightTextForeground",{dark:w.overviewRulerSelectionHighlightForeground,light:w.overviewRulerSelectionHighlightForeground,hcDark:w.overviewRulerSelectionHighlightForeground,hcLight:w.overviewRulerSelectionHighlightForeground},D.localize(8,null),!0),i=k.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,b.themeColorFromId)(n),position:S.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:S.MinimapPosition.Inline}}),s=k.ModelDecorationOptions.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,b.themeColorFromId)(t),position:S.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:S.MinimapPosition.Inline}}),r=k.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,b.themeColorFromId)(w.overviewRulerSelectionHighlightForeground),position:S.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:S.MinimapPosition.Inline}}),c=k.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),g=k.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,b.themeColorFromId)(m),position:S.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:S.MinimapPosition.Inline}});function o(a){return a===y.DocumentHighlightKind.Write?i:a===y.DocumentHighlightKind.Text?s:g}e.getHighlightDecorationOptions=o;function l(a){return a?c:r}e.getSelectionHighlightDecorationOptions=l,(0,b.registerThemingParticipant)((a,d)=>{const u=a.getColor(w.editorSelectionHighlight);u&&d.addRule(`.monaco-editor .selectionHighlight { background-color: ${u.transparent(.5)}; }`)})}),define(J[839],ee([1,0,50,12,58,2,15,190,5,23,22,334,636,28,14,19,336,8]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusPreviousCursor=e.FocusNextCursor=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;function o(O,$){const Q=$.filter(se=>!O.find(le=>le.equals(se)));if(Q.length>=1){const se=Q.map(te=>`line ${te.viewState.position.lineNumber} column ${te.viewState.position.column}`).join(", "),le=Q.length===1?t.localize(0,null,se):t.localize(1,null,se);(0,S.status)(le)}}class l extends w.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:t.localize(2,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(3,null),order:2}})}run($,Q,se){if(!Q.hasModel())return;let le=!0;se&&se.logicalLine===!1&&(le=!1);const te=Q._getViewModel();if(te.cursorConfig.readOnly)return;te.model.pushStackElement();const re=te.getCursorStates();te.setCursorStates(se.source,3,b.CursorMoveCommands.addCursorUp(te,re,le)),te.revealTopMostCursor(se.source),o(re,te.getCursorStates())}}e.InsertCursorAbove=l;class a extends w.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:t.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(5,null),order:3}})}run($,Q,se){if(!Q.hasModel())return;let le=!0;se&&se.logicalLine===!1&&(le=!1);const te=Q._getViewModel();if(te.cursorConfig.readOnly)return;te.model.pushStackElement();const re=te.getCursorStates();te.setCursorStates(se.source,3,b.CursorMoveCommands.addCursorDown(te,re,le)),te.revealBottomMostCursor(se.source),o(re,te.getCursorStates())}}e.InsertCursorBelow=a;class d extends w.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:t.localize(6,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(7,null),order:4}})}getCursorsForSelection($,Q,se){if(!$.isEmpty()){for(let le=$.startLineNumber;le<$.endLineNumber;le++){const te=Q.getLineMaxColumn(le);se.push(new h.Selection(le,te,le,te))}$.endColumn>1&&se.push(new h.Selection($.endLineNumber,$.endColumn,$.endLineNumber,$.endColumn))}}run($,Q){if(!Q.hasModel())return;const se=Q.getModel(),le=Q.getSelections(),te=Q._getViewModel(),re=te.getCursorStates(),H=[];le.forEach(B=>this.getCursorsForSelection(B,se,H)),H.length>0&&Q.setSelections(H),o(re,te.getCursorStates())}}class u extends w.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:t.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run($,Q){if(!Q.hasModel())return;const se=Q.getSelections(),le=Q.getModel().getLineCount(),te=[];for(let B=se[0].startLineNumber;B<=le;B++)te.push(new h.Selection(B,se[0].startColumn,B,se[0].endColumn));const re=Q._getViewModel(),H=re.getCursorStates();te.length>0&&Q.setSelections(te),o(H,re.getCursorStates())}}class C extends w.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:t.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run($,Q){if(!Q.hasModel())return;const se=Q.getSelections(),le=[];for(let H=se[0].startLineNumber;H>=1;H--)le.push(new h.Selection(H,se[0].startColumn,H,se[0].endColumn));const te=Q._getViewModel(),re=te.getCursorStates();le.length>0&&Q.setSelections(le),o(re,te.getCursorStates())}}class f{constructor($,Q,se){this.selections=$,this.revealRange=Q,this.revealScrollType=se}}e.MultiCursorSessionResult=f;class v{static create($,Q){if(!$.hasModel())return null;const se=Q.getState();if(!$.hasTextFocus()&&se.isRevealed&&se.searchString.length>0)return new v($,Q,!1,se.searchString,se.wholeWord,se.matchCase,null);let le=!1,te,re;const H=$.getSelections();H.length===1&&H[0].isEmpty()?(le=!0,te=!0,re=!0):(te=se.wholeWord,re=se.matchCase);const B=$.getSelection();let j,G=null;if(B.isEmpty()){const Y=$.getConfiguredWordAtPosition(B.getStartPosition());if(!Y)return null;j=Y.word,G=new h.Selection(B.startLineNumber,Y.startColumn,B.startLineNumber,Y.endColumn)}else j=$.getModel().getValueInRange(B).replace(/\\r\\n/g,`\n`);return new v($,Q,le,j,te,re,G)}constructor($,Q,se,le,te,re,H){this._editor=$,this.findController=Q,this.isDisconnectedFromFindController=se,this.searchText=le,this.wholeWord=te,this.matchCase=re,this.currentMatch=H}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const $=this._getNextMatch();if(!$)return null;const Q=this._editor.getSelections();return new f(Q.concat($),$,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const $=this._getNextMatch();if(!$)return null;const Q=this._editor.getSelections();return new f(Q.slice(0,Q.length-1).concat($),$,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const le=this.currentMatch;return this.currentMatch=null,le}this.findController.highlightFindOptions();const $=this._editor.getSelections(),Q=$[$.length-1],se=this._editor.getModel().findNextMatch(this.searchText,Q.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(125):null,!1);return se?new h.Selection(se.range.startLineNumber,se.range.startColumn,se.range.endLineNumber,se.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const $=this._getPreviousMatch();if(!$)return null;const Q=this._editor.getSelections();return new f(Q.concat($),$,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const $=this._getPreviousMatch();if(!$)return null;const Q=this._editor.getSelections();return new f(Q.slice(0,Q.length-1).concat($),$,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const le=this.currentMatch;return this.currentMatch=null,le}this.findController.highlightFindOptions();const $=this._editor.getSelections(),Q=$[$.length-1],se=this._editor.getModel().findPreviousMatch(this.searchText,Q.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(125):null,!1);return se?new h.Selection(se.range.startLineNumber,se.range.startColumn,se.range.endLineNumber,se.range.endColumn):null}selectAll($){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const Q=this._editor.getModel();return $?Q.findMatches(this.searchText,$,!1,this.matchCase,this.wholeWord?this._editor.getOption(125):null,!1,1073741824):Q.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(125):null,!1,1073741824)}}e.MultiCursorSession=v;class p extends D.Disposable{static get($){return $.getContribution(p.ID)}constructor($){super(),this._sessionDispose=this._register(new D.DisposableStore),this._editor=$,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded($){if(!this._session){const Q=v.create(this._editor,$);if(!Q)return;this._session=Q;const se={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(se.wholeWordOverride=1,se.matchCaseOverride=1,se.isRegexOverride=2),$.getState().change(se,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(le=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add($.getState().onFindReplaceStateChange(le=>{(le.matchCase||le.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const $={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change($,!1)}this._session=null}_setSelections($){this._ignoreSelectionChange=!0,this._editor.setSelections($),this._ignoreSelectionChange=!1}_expandEmptyToWord($,Q){if(!Q.isEmpty())return Q;const se=this._editor.getConfiguredWordAtPosition(Q.getStartPosition());return se?new h.Selection(Q.startLineNumber,se.startColumn,Q.startLineNumber,se.endColumn):Q}_applySessionResult($){$&&(this._setSelections($.selections),$.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport($.revealRange,$.revealScrollType))}getSession($){return this._session}addSelectionToNextFindMatch($){if(this._editor.hasModel()){if(!this._session){const Q=this._editor.getSelections();if(Q.length>1){const le=$.getState().matchCase;if(!P(this._editor.getModel(),Q,le)){const re=this._editor.getModel(),H=[];for(let B=0,j=Q.length;B<j;B++)H[B]=this._expandEmptyToWord(re,Q[B]);this._editor.setSelections(H);return}}}this._beginSessionIfNeeded($),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch($){this._beginSessionIfNeeded($),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch($){this._beginSessionIfNeeded($),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch($){this._beginSessionIfNeeded($),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll($){if(!this._editor.hasModel())return;let Q=null;const se=$.getState();if(se.isRevealed&&se.searchString.length>0&&se.isRegex){const le=this._editor.getModel();se.searchScope?Q=le.findMatches(se.searchString,se.searchScope,se.isRegex,se.matchCase,se.wholeWord?this._editor.getOption(125):null,!1,1073741824):Q=le.findMatches(se.searchString,!0,se.isRegex,se.matchCase,se.wholeWord?this._editor.getOption(125):null,!1,1073741824)}else{if(this._beginSessionIfNeeded($),!this._session)return;Q=this._session.selectAll(se.searchScope)}if(Q.length>0){const le=this._editor.getSelection();for(let te=0,re=Q.length;te<re;te++){const H=Q[te];if(H.range.intersectRanges(le)){Q[te]=Q[0],Q[0]=H;break}}this._setSelections(Q.map(te=>new h.Selection(te.range.startLineNumber,te.range.startColumn,te.range.endLineNumber,te.range.endColumn)))}}}p.ID="editor.contrib.multiCursorController",e.MultiCursorSelectionController=p;class L extends w.EditorAction{run($,Q){const se=p.get(Q);if(!se)return;const le=Q._getViewModel();if(le){const te=le.getCursorStates(),re=n.CommonFindController.get(Q);if(re)this._run(se,re);else{const H=$.get(g.IInstantiationService).createInstance(n.CommonFindController,Q);this._run(se,H),H.dispose()}o(te,le.getCursorStates())}}}e.MultiCursorSelectionControllerAction=L;class E extends L{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:t.localize(10,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.focus,primary:2082,weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(11,null),order:5}})}_run($,Q){$.addSelectionToNextFindMatch(Q)}}e.AddSelectionToNextFindMatchAction=E;class I extends L{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:t.localize(12,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(13,null),order:6}})}_run($,Q){$.addSelectionToPreviousFindMatch(Q)}}e.AddSelectionToPreviousFindMatchAction=I;class T extends L{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:t.localize(14,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.focus,primary:(0,y.KeyChord)(2089,2082),weight:100}})}_run($,Q){$.moveSelectionToNextFindMatch(Q)}}e.MoveSelectionToNextFindMatchAction=T;class F extends L{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:t.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run($,Q){$.moveSelectionToPreviousFindMatch(Q)}}e.MoveSelectionToPreviousFindMatchAction=F;class R extends L{constructor(){super({id:"editor.action.selectHighlights",label:t.localize(16,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.focus,primary:3114,weight:100},menuOpts:{menuId:i.MenuId.MenubarSelectionMenu,group:"3_multi",title:t.localize(17,null),order:7}})}_run($,Q){$.selectAll(Q)}}e.SelectHighlightsAction=R;class M extends L{constructor(){super({id:"editor.action.changeAll",label:t.localize(18,null),alias:"Change All Occurrences",precondition:s.ContextKeyExpr.and(m.EditorContextKeys.writable,m.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run($,Q){$.selectAll(Q)}}e.CompatChangeAll=M;class N{constructor($,Q,se,le,te){this._model=$,this._searchText=Q,this._matchCase=se,this._wordSeparators=le,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,te&&this._model===te._model&&this._searchText===te._searchText&&this._matchCase===te._matchCase&&this._wordSeparators===te._wordSeparators&&this._modelVersionId===te._modelVersionId&&(this._cachedFindMatches=te._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map($=>$.range),this._cachedFindMatches.sort(_.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let A=class Yi extends D.Disposable{constructor($,Q){super(),this._languageFeaturesService=Q,this.editor=$,this._isEnabled=$.getOption(103),this._decorations=$.createDecorationsCollection(),this.updateSoon=this._register(new k.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register($.onDidChangeConfiguration(le=>{this._isEnabled=$.getOption(103)})),this._register($.onDidChangeCursorSelection(le=>{this._isEnabled&&(le.selection.isEmpty()?le.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register($.onDidChangeModel(le=>{this._setState(null)})),this._register($.onDidChangeModelContent(le=>{this._isEnabled&&this.updateSoon.schedule()}));const se=n.CommonFindController.get($);se&&this._register(se.getState().onFindReplaceStateChange(le=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(Yi._createState(this.state,this._isEnabled,this.editor))}static _createState($,Q,se){if(!Q||!se.hasModel())return null;const le=se.getSelection();if(le.startLineNumber!==le.endLineNumber)return null;const te=p.get(se);if(!te)return null;const re=n.CommonFindController.get(se);if(!re)return null;let H=te.getSession(re);if(!H){const G=se.getSelections();if(G.length>1){const ne=re.getState().matchCase;if(!P(se.getModel(),G,ne))return null}H=v.create(se,re)}if(!H||H.currentMatch||/^[ \\t]+$/.test(H.searchText)||H.searchText.length>200)return null;const B=re.getState(),j=B.matchCase;if(B.isRevealed){let G=B.searchString;j||(G=G.toLowerCase());let Y=H.searchText;if(j||(Y=Y.toLowerCase()),G===Y&&H.matchCase===B.matchCase&&H.wholeWord===B.wholeWord&&!B.isRegex)return null}return new N(se.getModel(),H.searchText,H.matchCase,H.wholeWord?se.getOption(125):null,$)}_setState($){if(this.state=$,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const Q=this.editor.getModel();if(Q.isTooLargeForTokenization())return;const se=this.state.findMatches(),le=this.editor.getSelections();le.sort(_.Range.compareRangesUsingStarts);const te=[];for(let B=0,j=0,G=se.length,Y=le.length;B<G;){const ne=se[B];if(j>=Y)te.push(ne),B++;else{const de=_.Range.compareRangesUsingStarts(ne,le[j]);de<0?((le[j].isEmpty()||!_.Range.areIntersecting(ne,le[j]))&&te.push(ne),B++):(de>0||B++,j++)}}const re=this._languageFeaturesService.documentHighlightProvider.has(Q)&&this.editor.getOption(78),H=te.map(B=>({range:B,options:(0,c.getSelectionHighlightDecorationOptions)(re)}));this._decorations.set(H)}dispose(){this._setState(null),super.dispose()}};A.ID="editor.contrib.selectionHighlighter",A=Ne([fe(1,r.ILanguageFeaturesService)],A),e.SelectionHighlighter=A;function P(O,$,Q){const se=x(O,$[0],!Q);for(let le=1,te=$.length;le<te;le++){const re=$[le];if(re.isEmpty())return!1;const H=x(O,re,!Q);if(se!==H)return!1}return!0}function x(O,$,Q){const se=O.getValueInRange($);return Q?se.toLowerCase():se}class W extends w.EditorAction{constructor(){super({id:"editor.action.focusNextCursor",label:t.localize(19,null),description:{description:t.localize(20,null),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run($,Q,se){if(!Q.hasModel())return;const le=Q._getViewModel();if(le.cursorConfig.readOnly)return;le.model.pushStackElement();const te=Array.from(le.getCursorStates()),re=te.shift();re&&(te.push(re),le.setCursorStates(se.source,3,te),le.revealPrimaryCursor(se.source,!0),o(te,le.getCursorStates()))}}e.FocusNextCursor=W;class U extends w.EditorAction{constructor(){super({id:"editor.action.focusPreviousCursor",label:t.localize(21,null),description:{description:t.localize(22,null),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run($,Q,se){if(!Q.hasModel())return;const le=Q._getViewModel();if(le.cursorConfig.readOnly)return;le.model.pushStackElement();const te=Array.from(le.getCursorStates()),re=te.pop();re&&(te.unshift(re),le.setCursorStates(se.source,3,te),le.revealPrimaryCursor(se.source,!0),o(te,le.getCursorStates()))}}e.FocusPreviousCursor=U,(0,w.registerEditorContribution)(p.ID,p,4),(0,w.registerEditorContribution)(A.ID,A,1),(0,w.registerEditorAction)(l),(0,w.registerEditorAction)(a),(0,w.registerEditorAction)(d),(0,w.registerEditorAction)(E),(0,w.registerEditorAction)(I),(0,w.registerEditorAction)(T),(0,w.registerEditorAction)(F),(0,w.registerEditorAction)(R),(0,w.registerEditorAction)(M),(0,w.registerEditorAction)(u),(0,w.registerEditorAction)(C),(0,w.registerEditorAction)(W),(0,w.registerEditorAction)(U)}),define(J[840],ee([1,0,50,16,12,21,11,2,15,5,22,26,661,14,19,336]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordHighlighterContribution=e.getOccurrencesAtPosition=void 0;const c=new i.RawContextKey("hasWordHighlights",!1);function g(E,I,T,F){const R=E.ordered(I);return(0,y.first)(R.map(M=>()=>Promise.resolve(M.provideDocumentHighlights(I,T,F)).then(void 0,w.onUnexpectedExternalError)),k.isNonEmptyArray)}e.getOccurrencesAtPosition=g;class o{constructor(I,T,F){this._model=I,this._selection=T,this._wordSeparators=F,this._wordRange=this._getCurrentWordRange(I,T),this._result=null}get result(){return this._result||(this._result=(0,y.createCancelablePromise)(I=>this._compute(this._model,this._selection,this._wordSeparators,I))),this._result}_getCurrentWordRange(I,T){const F=I.getWordAtPosition(T.getPosition());return F?new h.Range(T.startLineNumber,F.startColumn,T.startLineNumber,F.endColumn):null}isValid(I,T,F){const R=T.startLineNumber,M=T.startColumn,N=T.endColumn,A=this._getCurrentWordRange(I,T);let P=!!(this._wordRange&&this._wordRange.equalsRange(A));for(let x=0,W=F.length;!P&&x<W;x++){const U=F.getRange(x);U&&U.startLineNumber===R&&U.startColumn<=M&&U.endColumn>=N&&(P=!0)}return P}cancel(){this.result.cancel()}}class l extends o{constructor(I,T,F,R){super(I,T,F),this._providers=R}_compute(I,T,F,R){return g(this._providers,I,T.getPosition(),R).then(M=>M||[])}}class a extends o{constructor(I,T,F){super(I,T,F),this._selectionIsEmpty=T.isEmpty()}_compute(I,T,F,R){return(0,y.timeout)(250,R).then(()=>{if(!T.isEmpty())return[];const M=I.getWordAtPosition(T.getPosition());return!M||M.word.length>1e3?[]:I.findMatches(M.word,!0,!1,!0,F,!1).map(A=>({range:A.range,kind:n.DocumentHighlightKind.Text}))})}isValid(I,T,F){const R=T.isEmpty();return this._selectionIsEmpty!==R?!1:super.isValid(I,T,F)}}function d(E,I,T,F){return E.has(I)?new l(I,T,F,E):new a(I,T,F)}(0,_.registerModelAndPositionCommand)("_executeDocumentHighlights",(E,I,T)=>{const F=E.get(s.ILanguageFeaturesService);return g(F.documentHighlightProvider,I,T,D.CancellationToken.None)});class u{constructor(I,T,F){this.toUnhook=new b.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=I,this.providers=T,this._hasWordHighlights=c.bindTo(F),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(78),this.model=this.editor.getModel(),this.toUnhook.add(I.onDidChangeCursorPosition(R=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(R)})),this.toUnhook.add(I.onDidChangeModelContent(R=>{this._stopAll()})),this.toUnhook.add(I.onDidChangeConfiguration(R=>{const M=this.editor.getOption(78);this.occurrencesHighlight!==M&&(this.occurrencesHighlight=M,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(h.Range.compareRangesUsingStarts)}moveNext(){const I=this._getSortedHighlights(),F=(I.findIndex(M=>M.containsPosition(this.editor.getPosition()))+1)%I.length,R=I[F];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(R.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(R);const M=this._getWord();if(M){const N=this.editor.getModel().getLineContent(R.startLineNumber);(0,S.alert)(`${N}, ${F+1} of ${I.length} for \'${M.word}\'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const I=this._getSortedHighlights(),F=(I.findIndex(M=>M.containsPosition(this.editor.getPosition()))-1+I.length)%I.length,R=I[F];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(R.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(R);const M=this._getWord();if(M){const N=this.editor.getModel().getLineContent(R.startLineNumber);(0,S.alert)(`${N}, ${F+1} of ${I.length} for \'${M.word}\'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),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(I){if(!this.occurrencesHighlight){this._stopAll();return}if(I.reason!==3){this._stopAll();return}this._run()}_getWord(){const I=this.editor.getSelection(),T=I.startLineNumber,F=I.startColumn;return this.model.getWordAtPosition({lineNumber:T,column:F})}_run(){const I=this.editor.getSelection();if(I.startLineNumber!==I.endLineNumber){this._stopAll();return}const T=I.startColumn,F=I.endColumn,R=this._getWord();if(!R||R.startColumn>T||R.endColumn<F){this._stopAll();return}const M=this.workerRequest&&this.workerRequest.isValid(this.model,I,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),M)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const N=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=d(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(125)),this.workerRequest.result.then(A=>{N===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=A||[],this._beginRenderDecorations())},w.onUnexpectedError)}}_beginRenderDecorations(){const I=new Date().getTime(),T=this.lastCursorPositionChangeTime+250;I>=T?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},T-I)}renderDecorations(){this.renderDecorationsTimer=-1;const I=[];for(const T of this.workerRequestValue)T.range&&I.push({range:T.range,options:(0,r.getHighlightDecorationOptions)(T.kind)});this.decorations.set(I),this._hasWordHighlights.set(this.hasDecorations())}dispose(){this._stopAll(),this.toUnhook.dispose()}}let C=class Qi extends b.Disposable{static get(I){return I.getContribution(Qi.ID)}constructor(I,T,F){super(),this.wordHighlighter=null;const R=()=>{I.hasModel()&&(this.wordHighlighter=new u(I,F.documentHighlightProvider,T))};this._register(I.onDidChangeModel(M=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),R()})),R()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var I;(I=this.wordHighlighter)===null||I===void 0||I.moveNext()}moveBack(){var I;(I=this.wordHighlighter)===null||I===void 0||I.moveBack()}restoreViewState(I){this.wordHighlighter&&I&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};C.ID="editor.contrib.wordHighlighter",C=Ne([fe(1,i.IContextKeyService),fe(2,s.ILanguageFeaturesService)],C),e.WordHighlighterContribution=C;class f extends _.EditorAction{constructor(I,T){super(T),this._isNext=I}run(I,T){const F=C.get(T);F&&(this._isNext?F.moveNext():F.moveBack())}}class v extends f{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:t.localize(0,null),alias:"Go to Next Symbol Highlight",precondition:c,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class p extends f{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:t.localize(1,null),alias:"Go to Previous Symbol Highlight",precondition:c,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class L extends _.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:t.localize(2,null),alias:"Trigger Symbol Highlight",precondition:c.toNegated(),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(I,T,F){const R=C.get(T);R&&R.restoreViewState(!0)}}(0,_.registerEditorContribution)(C.ID,C,0),(0,_.registerEditorAction)(v),(0,_.registerEditorAction)(p),(0,_.registerEditorAction)(L)}),define(J[841],ee([1,0,7,141,37,155,2,45,5,39,433]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=e.ViewZoneDelegate=void 0;const m=new y.Color(new y.RGBA(0,122,204)),n={showArrow:!0,showFrame:!0,className:"",frameColor:m,arrowColor:m,keepEditorSelection:!1},t="vs.editor.contrib.zoneWidget";class i{constructor(o,l,a,d,u,C){this.id="",this.domNode=o,this.afterLineNumber=l,this.afterColumn=a,this.heightInLines=d,this._onDomNodeTop=u,this._onComputedHeight=C}onDomNodeTop(o){this._onDomNodeTop(o)}onComputedHeight(o){this._onComputedHeight(o)}}e.ViewZoneDelegate=i;class s{constructor(o,l){this._id=o,this._domNode=l}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=s;class r{constructor(o){this._editor=o,this._ruleName=r._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),S.removeCSSRulesContainingSelector(this._ruleName)}set color(o){this._color!==o&&(this._color=o,this._updateStyle())}set height(o){this._height!==o&&(this._height=o,this._updateStyle())}_updateStyle(){S.removeCSSRulesContainingSelector(this._ruleName),S.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(o){o.column===1&&(o={lineNumber:o.lineNumber,column:2}),this._decorations.set([{range:_.Range.fromPositions(o),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}r._IdGenerator=new D.IdGenerator(".arrow-decoration-");class c{constructor(o,l={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new w.DisposableStore,this.container=null,this._isShowing=!1,this.editor=o,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=b.deepClone(l),b.mixin(this.options,n,!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(a=>{const d=this._getWidth(a);this.domNode.style.width=d+"px",this.domNode.style.left=this._getLeft(a)+"px",this._onWidth(d)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(o=>{this._viewZone&&o.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),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 r(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(o){o.frameColor&&(this.options.frameColor=o.frameColor),o.arrowColor&&(this.options.arrowColor=o.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const o=this.options.frameColor.toString();this.container.style.borderTopColor=o,this.container.style.borderBottomColor=o}if(this._arrow&&this.options.arrowColor){const o=this.options.arrowColor.toString();this._arrow.color=o}}_getWidth(o){return o.width-o.minimap.minimapWidth-o.verticalScrollbarWidth}_getLeft(o){return o.minimap.minimapWidth>0&&o.minimap.minimapLeft===0?o.minimap.minimapWidth:0}_onViewZoneTop(o){this.domNode.style.top=o+"px"}_onViewZoneHeight(o){var l;if(this.domNode.style.height=`${o}px`,this.container){const a=o-this._decoratingElementsHeight();this.container.style.height=`${a}px`;const d=this.editor.getLayoutInfo();this._doLayout(a,this._getWidth(d))}(l=this._resizeSash)===null||l===void 0||l.layout()}get position(){const o=this._positionMarkerId.getRange(0);if(o)return o.getStartPosition()}show(o,l){const a=_.Range.isIRange(o)?_.Range.lift(o):_.Range.fromPositions(o);this._isShowing=!0,this._showImpl(a,l),this._isShowing=!1,this._positionMarkerId.set([{range:a,options:h.ModelDecorationOptions.EMPTY}])}hide(){var o;this._viewZone&&(this.editor.changeViewZones(l=>{this._viewZone&&l.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(o=this._arrow)===null||o===void 0||o.hide()}_decoratingElementsHeight(){const o=this.editor.getOption(64);let l=0;if(this.options.showArrow){const a=Math.round(o/3);l+=2*a}if(this.options.showFrame){const a=Math.round(o/9);l+=2*a}return l}_showImpl(o,l){const a=o.getStartPosition(),d=this.editor.getLayoutInfo(),u=this._getWidth(d);this.domNode.style.width=`${u}px`,this.domNode.style.left=this._getLeft(d)+"px";const C=document.createElement("div");C.style.overflow="hidden";const f=this.editor.getOption(64),v=Math.max(12,this.editor.getLayoutInfo().height/f*.8);l=Math.min(l,v);let p=0,L=0;if(this._arrow&&this.options.showArrow&&(p=Math.round(f/3),this._arrow.height=p,this._arrow.show(a)),this.options.showFrame&&(L=Math.round(f/9)),this.editor.changeViewZones(T=>{this._viewZone&&T.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new i(C,a.lineNumber,a.column,l,F=>this._onViewZoneTop(F),F=>this._onViewZoneHeight(F)),this._viewZone.id=T.addZone(this._viewZone),this._overlayWidget=new s(t+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const T=this.options.frameWidth?this.options.frameWidth:L;this.container.style.borderTopWidth=T+"px",this.container.style.borderBottomWidth=T+"px"}const E=l*f-this._decoratingElementsHeight();this.container&&(this.container.style.top=p+"px",this.container.style.height=E+"px",this.container.style.overflow="hidden"),this._doLayout(E,u),this.options.keepEditorSelection||this.editor.setSelection(o);const I=this.editor.getModel();if(I){const T=I.validateRange(new _.Range(o.startLineNumber,1,o.endLineNumber+1,1));this.revealRange(T,T.endLineNumber===I.getLineCount())}}revealRange(o,l){l?this.editor.revealLineNearTop(o.endLineNumber,0):this.editor.revealRange(o,0)}setCssClass(o,l){this.container&&(l&&this.container.classList.remove(l),this.container.classList.add(o))}_onWidth(o){}_doLayout(o,l){}_relayout(o){this._viewZone&&this._viewZone.heightInLines!==o&&this.editor.changeViewZones(l=>{this._viewZone&&(this._viewZone.heightInLines=o,l.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new k.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let o;this._disposables.add(this._resizeSash.onDidStart(l=>{this._viewZone&&(o={startY:l.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{o=void 0})),this._disposables.add(this._resizeSash.onDidChange(l=>{if(o){const a=(l.currentY-o.startY)/this.editor.getOption(64),d=a<0?Math.ceil(a):Math.floor(a),u=o.heightInLines+d;u>5&&u<35&&this._relayout(u)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const o=this.editor.getLayoutInfo();return o.width-o.minimap.minimapWidth}}e.ZoneWidget=c}),define(J[128],ee([1,0,7,69,41,29,32,37,6,45,15,30,153,841,639,152,14,51,8,31,424]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.peekViewEditorMatchHighlightBorder=e.peekViewEditorMatchHighlight=e.peekViewResultsMatchHighlight=e.peekViewEditorStickyScrollBackground=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=(0,o.createDecorator)("IPeekViewService"),(0,g.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(v,p){const L=this._widgets.get(v);L&&(L.listener.dispose(),L.widget.dispose());const E=()=>{const I=this._widgets.get(v);I&&I.widget===p&&(I.listener.dispose(),this._widgets.delete(v))};this._widgets.set(v,{widget:p,listener:p.onDidClose(E)})}},1);var a;(function(v){v.inPeekEditor=new c.RawContextKey("inReferenceSearchEditor",!0,s.localize(0,null)),v.notInPeekEditor=v.inPeekEditor.toNegated()})(a=e.PeekContext||(e.PeekContext={}));let d=class{constructor(p,L){p instanceof t.EmbeddedCodeEditorWidget&&a.inPeekEditor.bindTo(L)}dispose(){}};d.ID="editor.contrib.referenceController",d=Ne([fe(1,c.IContextKeyService)],d),(0,m.registerEditorContribution)(d.ID,d,0);function u(v){const p=v.get(n.ICodeEditorService).getFocusedCodeEditor();return p instanceof t.EmbeddedCodeEditorWidget?p.getParentEditor():p}e.getOuterEditor=u;const C={headerBackgroundColor:b.Color.white,primaryHeadingColor:b.Color.fromHex("#333333"),secondaryHeadingColor:b.Color.fromHex("#6c6c6cb3")};let f=class extends i.ZoneWidget{constructor(p,L,E){super(p,L),this.instantiationService=E,this._onDidClose=new _.Emitter,this.onDidClose=this._onDidClose.event,h.mixin(this.options,C,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(p){const L=this.options;p.headerBackgroundColor&&(L.headerBackgroundColor=p.headerBackgroundColor),p.primaryHeadingColor&&(L.primaryHeadingColor=p.primaryHeadingColor),p.secondaryHeadingColor&&(L.secondaryHeadingColor=p.secondaryHeadingColor),super.style(p)}_applyStyles(){super._applyStyles();const p=this.options;this._headElement&&p.headerBackgroundColor&&(this._headElement.style.backgroundColor=p.headerBackgroundColor.toString()),this._primaryHeading&&p.primaryHeadingColor&&(this._primaryHeading.style.color=p.primaryHeadingColor.toString()),this._secondaryHeading&&p.secondaryHeadingColor&&(this._secondaryHeading.style.color=p.secondaryHeadingColor.toString()),this._bodyElement&&p.frameColor&&(this._bodyElement.style.borderColor=p.frameColor.toString())}_fillContainer(p){this.setCssClass("peekview-widget"),this._headElement=S.$(".head"),this._bodyElement=S.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),p.appendChild(this._headElement),p.appendChild(this._bodyElement)}_fillHead(p,L){this._titleElement=S.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),S.addStandardDisposableListener(this._titleElement,"click",T=>this._onTitleClick(T))),S.append(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=S.$("span.filename"),this._secondaryHeading=S.$("span.dirname"),this._metaHeading=S.$("span.meta"),S.append(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const E=S.$(".peekview-actions");S.append(this._headElement,E);const I=this._getActionBarOptions();this._actionbarWidget=new k.ActionBar(E,I),this._disposables.add(this._actionbarWidget),L||this._actionbarWidget.push(new y.Action("peekview.close",s.localize(1,null),w.ThemeIcon.asClassName(D.Codicon.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(p){}_getActionBarOptions(){return{actionViewItemProvider:r.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(p){}setTitle(p,L){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=p,this._primaryHeading.setAttribute("title",p),L?this._secondaryHeading.innerText=L:S.clearNode(this._secondaryHeading))}setMetaTitle(p){this._metaHeading&&(p?(this._metaHeading.innerText=p,S.show(this._metaHeading)):S.hide(this._metaHeading))}_doLayout(p,L){if(!this._isShowing&&p<0){this.dispose();return}const E=Math.ceil(this.editor.getOption(64)*1.2),I=Math.round(p-(E+2));this._doLayoutHead(E,L),this._doLayoutBody(I,L)}_doLayoutHead(p,L){this._headElement&&(this._headElement.style.height=`${p}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(p,L){this._bodyElement&&(this._bodyElement.style.height=`${p}px`)}};f=Ne([fe(2,o.IInstantiationService)],f),e.PeekViewWidget=f,e.peekViewTitleBackground=(0,l.registerColor)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:b.Color.black,hcLight:b.Color.white},s.localize(2,null)),e.peekViewTitleForeground=(0,l.registerColor)("peekViewTitleLabel.foreground",{dark:b.Color.white,light:b.Color.black,hcDark:b.Color.white,hcLight:l.editorForeground},s.localize(3,null)),e.peekViewTitleInfoForeground=(0,l.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},s.localize(4,null)),e.peekViewBorder=(0,l.registerColor)("peekView.border",{dark:l.editorInfoForeground,light:l.editorInfoForeground,hcDark:l.contrastBorder,hcLight:l.contrastBorder},s.localize(5,null)),e.peekViewResultsBackground=(0,l.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:b.Color.black,hcLight:b.Color.white},s.localize(6,null)),e.peekViewResultsMatchForeground=(0,l.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:b.Color.white,hcLight:l.editorForeground},s.localize(7,null)),e.peekViewResultsFileForeground=(0,l.registerColor)("peekViewResult.fileForeground",{dark:b.Color.white,light:"#1E1E1E",hcDark:b.Color.white,hcLight:l.editorForeground},s.localize(8,null)),e.peekViewResultsSelectionBackground=(0,l.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},s.localize(9,null)),e.peekViewResultsSelectionForeground=(0,l.registerColor)("peekViewResult.selectionForeground",{dark:b.Color.white,light:"#6C6C6C",hcDark:b.Color.white,hcLight:l.editorForeground},s.localize(10,null)),e.peekViewEditorBackground=(0,l.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:b.Color.black,hcLight:b.Color.white},s.localize(11,null)),e.peekViewEditorGutterBackground=(0,l.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},s.localize(12,null)),e.peekViewEditorStickyScrollBackground=(0,l.registerColor)("peekViewEditorStickyScroll.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},s.localize(13,null)),e.peekViewResultsMatchHighlight=(0,l.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},s.localize(14,null)),e.peekViewEditorMatchHighlight=(0,l.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},s.localize(15,null)),e.peekViewEditorMatchHighlightBorder=(0,l.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:l.activeContrastBorder,hcLight:l.activeContrastBorder},s.localize(16,null))}),define(J[842],ee([1,0,7,77,16,37,6,2,42,9,5,128,614,152,28,14,8,149,89,47,736,31,24,412]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNavigationWidget=void 0;class C{constructor(P,x,W,U,O){this._openerService=U,this._labelService=O,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new b.DisposableStore,this._editor=x;const $=document.createElement("div");$.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),$.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),$.appendChild(this._relatedBlock),this._disposables.add(S.addStandardDisposableListener(this._relatedBlock,"click",Q=>{Q.preventDefault();const se=this._relatedDiagnostics.get(Q.target);se&&W(se)})),this._scrollable=new k.ScrollableElement($,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),P.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(Q=>{$.style.left=`-${Q.scrollLeft}px`,$.style.top=`-${Q.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,b.dispose)(this._disposables)}update(P){const{source:x,message:W,relatedInformation:U,code:O}=P;let $=(x?.length||0)+2;O&&(typeof O=="string"?$+=O.length:$+=O.value.length);const Q=(0,h.splitLines)(W);this._lines=Q.length,this._longestLineLength=0;for(const H of Q)this._longestLineLength=Math.max(H.length+$,this._longestLineLength);S.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(P)),this._editor.applyFontInfo(this._messageBlock);let se=this._messageBlock;for(const H of Q)se=document.createElement("div"),se.innerText=H,H===""&&(se.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(se);if(x||O){const H=document.createElement("span");if(H.classList.add("details"),se.appendChild(H),x){const B=document.createElement("span");B.innerText=x,B.classList.add("source"),H.appendChild(B)}if(O)if(typeof O=="string"){const B=document.createElement("span");B.innerText=`(${O})`,B.classList.add("code"),H.appendChild(B)}else{this._codeLink=S.$("a.code-link"),this._codeLink.setAttribute("href",`${O.target.toString()}`),this._codeLink.onclick=j=>{this._openerService.open(O.target,{allowCommands:!0}),j.preventDefault(),j.stopPropagation()};const B=S.append(this._codeLink,S.$("span"));B.innerText=O.value,H.appendChild(this._codeLink)}}if(S.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,y.isNonEmptyArray)(U)){const H=this._relatedBlock.appendChild(document.createElement("div"));H.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(const B of U){const j=document.createElement("div"),G=document.createElement("a");G.classList.add("filename"),G.innerText=`${this._labelService.getUriBasenameLabel(B.resource)}(${B.startLineNumber}, ${B.startColumn}): `,G.title=this._labelService.getUriLabel(B.resource),this._relatedDiagnostics.set(G,B);const Y=document.createElement("span");Y.innerText=B.message,j.appendChild(G),j.appendChild(Y),this._lines+=1,H.appendChild(j)}}const le=this._editor.getOption(48),te=Math.ceil(le.typicalFullwidthCharacterWidth*this._longestLineLength*.75),re=le.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:te,scrollHeight:re})}layout(P,x){this._scrollable.getDomNode().style.height=`${P}px`,this._scrollable.getDomNode().style.width=`${x}px`,this._scrollable.setScrollDimensions({width:x,height:P})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(P){let x="";switch(P.severity){case o.MarkerSeverity.Error:x=t.localize(0,null);break;case o.MarkerSeverity.Warning:x=t.localize(1,null);break;case o.MarkerSeverity.Info:x=t.localize(2,null);break;case o.MarkerSeverity.Hint:x=t.localize(3,null);break}let W=t.localize(4,null,x,P.startLineNumber+":"+P.startColumn);const U=this._editor.getModel();return U&&P.startLineNumber<=U.getLineCount()&&P.startLineNumber>=1&&(W=`${U.getLineContent(P.startLineNumber)}, ${W}`),W}}let f=class Xi extends n.PeekViewWidget{constructor(P,x,W,U,O,$,Q){super(P,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},O),this._themeService=x,this._openerService=W,this._menuService=U,this._contextKeyService=$,this._labelService=Q,this._callOnDispose=new b.DisposableStore,this._onDidSelectRelatedInformation=new w.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=o.MarkerSeverity.Warning,this._backgroundColor=D.Color.white,this._applyTheme(x.getColorTheme()),this._callOnDispose.add(x.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(P){this._backgroundColor=P.getColor(N);let x=E,W=I;this._severity===o.MarkerSeverity.Warning?(x=T,W=F):this._severity===o.MarkerSeverity.Info&&(x=R,W=M);const U=P.getColor(x),O=P.getColor(W);this.style({arrowColor:U,frameColor:U,headerBackgroundColor:O,primaryHeadingColor:P.getColor(n.peekViewTitleForeground),secondaryHeadingColor:P.getColor(n.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(P){super._fillHead(P),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(U=>this.editor.focus()));const x=[],W=this._menuService.createMenu(Xi.TitleMenu,this._contextKeyService);(0,i.createAndFillInActionBarActions)(W,void 0,x),this._actionbarWidget.push(x,{label:!1,icon:!0,index:0}),W.dispose()}_fillTitleIcon(P){this._icon=S.append(P,S.$(""))}_fillBody(P){this._parentContainer=P,P.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),P.appendChild(this._container),this._message=new C(this._container,this.editor,x=>this._onDidSelectRelatedInformation.fire(x),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(P,x,W){this._container.classList.remove("stale"),this._message.update(P),this._severity=P.severity,this._applyTheme(this._themeService.getColorTheme());const U=m.Range.lift(P),O=this.editor.getPosition(),$=O&&U.containsPosition(O)?O:U.getStartPosition();super.show($,this.computeRequiredHeight());const Q=this.editor.getModel();if(Q){const se=W>1?t.localize(5,null,x,W):t.localize(6,null,x,W);this.setTitle((0,_.basename)(Q.uri),se)}this._icon.className=`codicon ${a.SeverityIcon.className(o.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop($,0),this.editor.focus()}updateMarker(P){this._container.classList.remove("stale"),this._message.update(P)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(P,x){super._doLayoutBody(P,x),this._heightInPixel=P,this._message.layout(P,x),this._container.style.height=`${P}px`}_onWidth(P){this._message.layout(this._heightInPixel,P)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};f.TitleMenu=new s.MenuId("gotoErrorTitleMenu"),f=Ne([fe(1,u.IThemeService),fe(2,l.IOpenerService),fe(3,s.IMenuService),fe(4,c.IInstantiationService),fe(5,r.IContextKeyService),fe(6,g.ILabelService)],f),e.MarkerNavigationWidget=f;const v=(0,d.oneOf)(d.editorErrorForeground,d.editorErrorBorder),p=(0,d.oneOf)(d.editorWarningForeground,d.editorWarningBorder),L=(0,d.oneOf)(d.editorInfoForeground,d.editorInfoBorder),E=(0,d.registerColor)("editorMarkerNavigationError.background",{dark:v,light:v,hcDark:d.contrastBorder,hcLight:d.contrastBorder},t.localize(7,null)),I=(0,d.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,d.transparent)(E,.1),light:(0,d.transparent)(E,.1),hcDark:null,hcLight:null},t.localize(8,null)),T=(0,d.registerColor)("editorMarkerNavigationWarning.background",{dark:p,light:p,hcDark:d.contrastBorder,hcLight:d.contrastBorder},t.localize(9,null)),F=(0,d.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,d.transparent)(T,.1),light:(0,d.transparent)(T,.1),hcDark:"#0C141F",hcLight:(0,d.transparent)(T,.2)},t.localize(10,null)),R=(0,d.registerColor)("editorMarkerNavigationInfo.background",{dark:L,light:L,hcDark:d.contrastBorder,hcLight:d.contrastBorder},t.localize(11,null)),M=(0,d.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,d.transparent)(R,.1),light:(0,d.transparent)(R,.1),hcDark:null,hcLight:null},t.localize(12,null)),N=(0,d.registerColor)("editorMarkerNavigation.background",{dark:d.editorBackground,light:d.editorBackground,hcDark:d.editorBackground,hcLight:d.editorBackground},t.localize(13,null))}),define(J[337],ee([1,0,29,2,15,30,13,5,22,714,613,28,14,8,80,842]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let c=class Xt{static get(v){return v.getContribution(Xt.ID)}constructor(v,p,L,E,I){this._markerNavigationService=p,this._contextKeyService=L,this._editorService=E,this._instantiationService=I,this._sessionDispoables=new k.DisposableStore,this._editor=v,this._widgetVisible=u.bindTo(this._contextKeyService)}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 p=!1;return this._model&&(p=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(v),p&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(r.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 E,I,T;(!(!((E=this._model)===null||E===void 0)&&E.selected)||!b.Range.containsPosition((I=this._model)===null||I===void 0?void 0:I.selected.marker,L.position))&&((T=this._model)===null||T===void 0||T.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;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:b.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 p=this._getOrCreateModel(this._editor.getModel().uri);p.resetIndex(),p.move(!0,this._editor.getModel(),new w.Position(v.startLineNumber,v.startColumn)),p.selected&&this._widget.showAtMarker(p.selected.marker,p.selected.index,p.selected.total)}}nagivate(v,p){var L,E;return Ee(this,void 0,void 0,function*(){if(this._editor.hasModel()){const I=this._getOrCreateModel(p?void 0:this._editor.getModel().uri);if(I.move(v,this._editor.getModel(),this._editor.getPosition()),!I.selected)return;if(I.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const T=yield this._editorService.openCodeEditor({resource:I.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:I.selected.marker}},this._editor);T&&((L=Xt.get(T))===null||L===void 0||L.close(),(E=Xt.get(T))===null||E===void 0||E.nagivate(v,p))}else this._widget.showAtMarker(I.selected.marker,I.selected.index,I.selected.total)}})}};c.ID="editor.contrib.markerController",c=Ne([fe(1,h.IMarkerNavigationService),fe(2,t.IContextKeyService),fe(3,D.ICodeEditorService),fe(4,i.IInstantiationService)],c),e.MarkerController=c;class g extends y.EditorAction{constructor(v,p,L){super(L),this._next=v,this._multiFile=p}run(v,p){var L;return Ee(this,void 0,void 0,function*(){p.hasModel()&&((L=c.get(p))===null||L===void 0||L.nagivate(this._next,this._multiFile))})}}class o extends g{constructor(){super(!0,!1,{id:o.ID,label:o.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{menuId:r.MarkerNavigationWidget.TitleMenu,title:o.LABEL,icon:(0,s.registerIcon)("marker-navigation-next",S.Codicon.arrowDown,m.localize(1,null)),group:"navigation",order:1}})}}o.ID="editor.action.marker.next",o.LABEL=m.localize(0,null),e.NextMarkerAction=o;class l extends g{constructor(){super(!1,!1,{id:l.ID,label:l.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:r.MarkerNavigationWidget.TitleMenu,title:l.LABEL,icon:(0,s.registerIcon)("marker-navigation-previous",S.Codicon.arrowUp,m.localize(3,null)),group:"navigation",order:2}})}}l.ID="editor.action.marker.prev",l.LABEL=m.localize(2,null);class a extends g{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:m.localize(4,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:n.MenuId.MenubarGoMenu,title:m.localize(5,null),group:"6_problem_nav",order:1}})}}class d extends g{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:m.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:n.MenuId.MenubarGoMenu,title:m.localize(7,null),group:"6_problem_nav",order:2}})}}(0,y.registerEditorContribution)(c.ID,c,4),(0,y.registerEditorAction)(o),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(a),(0,y.registerEditorAction)(d);const u=new t.RawContextKey("markersNavigationVisible",!1),C=y.EditorCommand.bindToContribution(c.get);(0,y.registerEditorCommand)(new C({id:"closeMarkersNavigation",precondition:u,handler:f=>f.close(),kbOpts:{weight:100+50,kbExpr:_.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(J[843],ee([1,0,7,287,37,6,2,49,42,153,5,39,33,72,38,61,775,128,619,8,36,149,181,24,182,146,414]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class p{constructor(F,R){this._editor=F,this._model=R,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 F=this._editor.getModel();if(F){for(const R of this._model.references)if(R.uri.toString()===F.uri.toString()){this._addDecorations(R.parent);return}}}_addDecorations(F){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const R=[],M=[];for(let N=0,A=F.children.length;N<A;N++){const P=F.children[N];this._decorationIgnoreSet.has(P.id)||P.uri.toString()===this._editor.getModel().uri.toString()&&(R.push({range:P.range,options:p.DecorationOptions}),M.push(N))}this._editor.changeDecorations(N=>{const A=N.deltaDecorations([],R);for(let P=0;P<A.length;P++)this._decorations.set(A[P],F.children[M[P]])})}_onDecorationChanged(){const F=[],R=this._editor.getModel();if(R){for(const[M,N]of this._decorations){const A=R.getDecorationRange(M);if(!A)continue;let P=!1;if(!m.Range.equalsRange(A,N.range)){if(m.Range.spansMultipleLines(A))P=!0;else{const x=N.range.endColumn-N.range.startColumn,W=A.endColumn-A.startColumn;x!==W&&(P=!0)}P?(this._decorationIgnoreSet.add(N.id),F.push(M)):N.range=A}}for(let M=0,N=F.length;M<N;M++)this._decorations.delete(F[M]);this._editor.removeDecorations(F)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}p.DecorationOptions=n.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class L{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(F){let R,M;try{const N=JSON.parse(F);R=N.ratio,M=N.heightInLines}catch{}return{ratio:R||.7,heightInLines:M||18}}}e.LayoutData=L;class E extends u.WorkbenchAsyncDataTree{}let I=class extends g.PeekViewWidget{constructor(F,R,M,N,A,P,x,W,U,O,$,Q){super(F,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},P),this._defaultTreeKeyboardSupport=R,this.layoutData=M,this._textModelResolverService=A,this._instantiationService=P,this._peekViewService=x,this._uriLabel=W,this._undoRedoService=U,this._keybindingService=O,this._languageService=$,this._languageConfigurationService=Q,this._disposeOnNewModel=new w.DisposableStore,this._callOnDispose=new w.DisposableStore,this._onDidSelectReference=new D.Emitter,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new S.Dimension(0,0),this._applyTheme(N.getColorTheme()),this._callOnDispose.add(N.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(F,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,w.dispose)(this._preview),(0,w.dispose)(this._previewNotAvailableMessage),(0,w.dispose)(this._tree),(0,w.dispose)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(F){const R=F.getColor(g.peekViewBorder)||y.Color.transparent;this.style({arrowColor:R,frameColor:R,headerBackgroundColor:F.getColor(g.peekViewTitleBackground)||y.Color.transparent,primaryHeadingColor:F.getColor(g.peekViewTitleForeground),secondaryHeadingColor:F.getColor(g.peekViewTitleInfoForeground)})}show(F){super.show(F,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(F){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:F.ctrlKey||F.metaKey||F.altKey?"side":"open",source:"title"})}_fillBody(F){this.setCssClass("reference-zone-widget"),this._messageContainer=S.append(F,S.$("div.messages")),S.hide(this._messageContainer),this._splitView=new k.SplitView(F,{orientation:1}),this._previewContainer=S.append(F,S.$("div.preview.inline"));const R={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(h.EmbeddedCodeEditorWidget,this._previewContainer,R,{},this.editor),S.hide(this._previewContainer),this._previewNotAvailableMessage=new n.TextModel(o.localize(0,null),i.PLAINTEXT_LANGUAGE_ID,n.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=S.append(F,S.$("div.ref-tree.inline"));const M={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new c.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(c.StringRepresentationProvider),identityProvider:new c.IdentityProvider,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:g.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(S.addStandardDisposableListener(this._treeContainer,"keydown",A=>{A.equals(9)&&(this._keybindingService.dispatchEvent(A,A.target),A.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(E,"ReferencesWidget",this._treeContainer,new c.Delegate,[this._instantiationService.createInstance(c.FileReferencesRenderer),this._instantiationService.createInstance(c.OneReferenceRenderer)],this._instantiationService.createInstance(c.DataSource),M),this._splitView.addView({onDidChange:D.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:A=>{this._preview.layout({height:this._dim.height,width:A})}},k.Sizing.Distribute),this._splitView.addView({onDidChange:D.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)}},k.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const N=(A,P)=>{A instanceof v.OneReference&&(P==="show"&&this._revealReference(A,!1),this._onDidSelectReference.fire({element:A,kind:P,source:"tree"}))};this._tree.onDidOpen(A=>{A.sideBySide?N(A.element,"side"):A.editorOptions.pinned?N(A.element,"goto"):N(A.element,"show")}),S.hide(this._treeContainer)}_onWidth(F){this._dim&&this._doLayoutBody(this._dim.height,F)}_doLayoutBody(F,R){super._doLayoutBody(F,R),this._dim=new S.Dimension(R,F),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(R),this._splitView.resizeView(0,R*this.layoutData.ratio)}setSelection(F){return this._revealReference(F,!0).then(()=>{this._model&&(this._tree.setSelection([F]),this._tree.setFocus([F]))})}setModel(F){return this._disposeOnNewModel.clear(),this._model=F,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=o.localize(1,null),S.show(this._messageContainer),Promise.resolve(void 0)):(S.hide(this._messageContainer),this._decorationsManager=new p(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(F=>this._tree.rerender(F))),this._disposeOnNewModel.add(this._preview.onMouseDown(F=>{const{event:R,target:M}=F;if(R.detail!==2)return;const N=this._getFocusedReference();N&&this._onDidSelectReference.fire({element:{uri:N.uri,range:M.range},kind:R.ctrlKey||R.metaKey||R.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),S.show(this._treeContainer),S.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[F]=this._tree.getFocus();if(F instanceof v.OneReference)return F;if(F instanceof v.FileReferences&&F.children.length>0)return F.children[0]}revealReference(F){return Ee(this,void 0,void 0,function*(){yield this._revealReference(F,!1),this._onDidSelectReference.fire({element:F,kind:"goto",source:"tree"})})}_revealReference(F,R){return Ee(this,void 0,void 0,function*(){if(this._revealedReference===F)return;this._revealedReference=F,F.uri.scheme!==b.Schemas.inMemory?this.setTitle((0,_.basenameOrAuthority)(F.uri),this._uriLabel.getUriLabel((0,_.dirname)(F.uri))):this.setTitle(o.localize(2,null));const M=this._textModelResolverService.createModelReference(F.uri);this._tree.getInput()===F.parent?this._tree.reveal(F):(R&&this._tree.reveal(F.parent),yield this._tree.expand(F.parent),this._tree.reveal(F));const N=yield M;if(!this._model){N.dispose();return}(0,w.dispose)(this._previewModelReference);const A=N.object;if(A){const P=this._preview.getModel()===A.textEditorModel?0:1,x=m.Range.lift(F.range).collapseToStart();this._previewModelReference=N,this._preview.setModel(A.textEditorModel),this._preview.setSelection(x),this._preview.revealRangeInCenter(x,P)}else this._preview.setModel(this._previewNotAvailableMessage),N.dispose()})}};I=Ne([fe(3,C.IThemeService),fe(4,r.ITextModelService),fe(5,l.IInstantiationService),fe(6,g.IPeekViewService),fe(7,d.ILabelService),fe(8,f.IUndoRedoService),fe(9,a.IKeybindingService),fe(10,s.ILanguageService),fe(11,t.ILanguageConfigurationService)],I),e.ReferenceWidget=I}),define(J[338],ee([1,0,12,11,58,2,30,13,5,128,617,25,27,14,8,111,181,43,83,146,843]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new i.RawContextKey("referenceSearchVisible",!1,m.localize(0,null));let d=class mi{static get(f){return f.getContribution(mi.ID)}constructor(f,v,p,L,E,I,T,F){this._defaultTreeKeyboardSupport=f,this._editor=v,this._editorService=L,this._notificationService=E,this._instantiationService=I,this._storageService=T,this._configurationService=F,this._disposables=new D.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(p)}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,p){let L;if(this._widget&&(L=this._widget.position),this.closeWidget(),L&&f.containsPosition(L))return;this._peekMode=p,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const E="peekViewLayout",I=a.LayoutData.fromJSON(this._storageService.get(E,0,"{}"));this._widget=this._instantiationService.createInstance(a.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,I),this._widget.setTitle(m.localize(1,null)),this._widget.show(f),this._disposables.add(this._widget.onDidClose(()=>{v.cancel(),this._widget&&(this._storageService.store(E,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(F=>{const{element:R,kind:M}=F;if(R)switch(M){case"open":(F.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(R,!1,!1);break;case"side":this.openReference(R,!0,!1);break;case"goto":p?this._gotoReference(R,!0):this.openReference(R,!1,!0);break}}));const T=++this._requestIdPool;v.then(F=>{var R;if(T!==this._requestIdPool||!this._widget){F.dispose();return}return(R=this._model)===null||R===void 0||R.dispose(),this._model=F,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(m.localize(2,null,this._model.title,this._model.references.length));const M=this._editor.getModel().uri,N=new b.Position(f.startLineNumber,f.startColumn),A=this._model.nearestReference(M,N);if(A)return this._widget.setSelection(A).then(()=>{this._widget&&this._editor.getOption(83)==="editor"&&this._widget.focusOnPreviewEditor()})}})},F=>{this._notificationService.error(F)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(f){return Ee(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const v=this._widget.position;if(!v)return;const p=this._model.nearestReference(this._editor.getModel().uri,v);if(!p)return;const L=this._model.nextOrPreviousReference(p,f),E=this._editor.hasTextFocus(),I=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(L),yield this._gotoReference(L,!1),E?this._editor.focus():this._widget&&I&&this._widget.focusOnPreviewEditor()})}revealReference(f){return Ee(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(f))})}closeWidget(f=!0){var v,p;(v=this._widget)===null||v===void 0||v.dispose(),(p=this._model)===null||p===void 0||p.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,f&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(f,v){var p;(p=this._widget)===null||p===void 0||p.hide(),this._ignoreModelChangeEvent=!0;const L=_.Range.lift(f.range).collapseToStart();return this._editorService.openCodeEditor({resource:f.uri,options:{selection:L,selectionSource:"code.jump",pinned:v}},this._editor).then(E=>{var I;if(this._ignoreModelChangeEvent=!1,!E||!this._widget){this.closeWidget();return}if(this._editor===E)this._widget.show(L),this._widget.focusOnReferenceTree();else{const T=mi.get(E),F=this._model.clone();this.closeWidget(),E.focus(),T?.toggleWidget(L,(0,S.createCancelablePromise)(R=>Promise.resolve(F)),(I=this._peekMode)!==null&&I!==void 0?I:!1)}},E=>{this._ignoreModelChangeEvent=!1,(0,k.onUnexpectedError)(E)})}openReference(f,v,p){v||this.closeWidget();const{uri:L,range:E}=f;this._editorService.openCodeEditor({resource:L,options:{selection:E,selectionSource:"code.jump",pinned:p}},this._editor,v)}};d.ID="editor.contrib.referencesController",d=Ne([fe(2,i.IContextKeyService),fe(3,w.ICodeEditorService),fe(4,g.INotificationService),fe(5,s.IInstantiationService),fe(6,o.IStorageService),fe(7,t.IConfigurationService)],d),e.ReferencesController=d;function u(C,f){const v=(0,h.getOuterEditor)(C);if(!v)return;const p=d.get(v);p&&f(p)}r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,y.KeyChord)(2089,60),when:i.ContextKeyExpr.or(e.ctxReferenceSearchVisible,h.PeekContext.inPeekEditor),handler(C){u(C,f=>{f.changeFocusBetweenPreviewAndReferences()})}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:i.ContextKeyExpr.or(e.ctxReferenceSearchVisible,h.PeekContext.inPeekEditor),handler(C){u(C,f=>{f.goToNextOrPreviousReference(!0)})}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:i.ContextKeyExpr.or(e.ctxReferenceSearchVisible,h.PeekContext.inPeekEditor),handler(C){u(C,f=>{f.goToNextOrPreviousReference(!1)})}}),n.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),n.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),n.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),n.CommandsRegistry.registerCommand("closeReferenceSearch",C=>u(C,f=>f.closeWidget())),r.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:i.ContextKeyExpr.and(h.PeekContext.inPeekEditor,i.ContextKeyExpr.not("config.editor.stablePeek"))}),r.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:i.ContextKeyExpr.and(e.ctxReferenceSearchVisible,i.ContextKeyExpr.not("config.editor.stablePeek"))}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:i.ContextKeyExpr.and(e.ctxReferenceSearchVisible,c.WorkbenchListFocusContextKey,c.WorkbenchTreeElementCanCollapse.negate(),c.WorkbenchTreeElementCanExpand.negate()),handler(C){var f;const p=(f=C.get(c.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(p)&&p[0]instanceof l.OneReference&&u(C,L=>L.revealReference(p[0]))}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:i.ContextKeyExpr.and(e.ctxReferenceSearchVisible,c.WorkbenchListFocusContextKey,c.WorkbenchTreeElementCanCollapse.negate(),c.WorkbenchTreeElementCanExpand.negate()),handler(C){var f;const p=(f=C.get(c.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(p)&&p[0]instanceof l.OneReference&&u(C,L=>L.openReference(p[0],!0,!0))}}),n.CommandsRegistry.registerCommand("openReference",C=>{var f;const p=(f=C.get(c.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(p)&&p[0]instanceof l.OneReference&&u(C,L=>L.openReference(p[0],!1,!0))})}),define(J[238],ee([1,0,46,50,12,58,17,18,20,97,167,15,30,153,13,5,22,26,338,146,753,150,128,615,28,25,14,8,43,71,232,19,54]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T,F,R){"use strict";var M,N,A,P,x,W,U,O;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=e.SymbolNavigationAction=e.SymbolNavigationAnchor=void 0,f.MenuRegistry.appendMenuItem(f.MenuId.EditorContext,{submenu:f.MenuId.EditorContextPeek,title:C.localize(0,null),group:"navigation",order:100});class ${static is(Y){return!Y||typeof Y!="object"?!1:!!(Y instanceof $||s.Position.isIPosition(Y.position)&&Y.model)}constructor(Y,ne){this.model=Y,this.position=ne}}e.SymbolNavigationAnchor=$;class Q extends n.EditorAction2{static all(){return Q._allSymbolNavigationCommands.values()}static _patchConfig(Y){const ne=Object.assign(Object.assign({},Y),{f1:!0});if(ne.menu)for(const de of R.Iterable.wrap(ne.menu))(de.id===f.MenuId.EditorContext||de.id===f.MenuId.EditorContextPeek)&&(de.when=p.ContextKeyExpr.and(Y.precondition,de.when));return ne}constructor(Y,ne){super(Q._patchConfig(ne)),this.configuration=Y,Q._allSymbolNavigationCommands.set(ne.id,this)}runEditorCommand(Y,ne,de,he){if(!ne.hasModel())return Promise.resolve(void 0);const oe=Y.get(E.INotificationService),ce=Y.get(t.ICodeEditorService),z=Y.get(I.IEditorProgressService),V=Y.get(a.ISymbolNavigationService),K=Y.get(F.ILanguageFeaturesService),ie=Y.get(L.IInstantiationService),X=ne.getModel(),Z=ne.getPosition(),ue=$.is(de)?de:new $(X,Z),me=new h.EditorStateCancellationTokenSource(ne,5),Ce=(0,y.raceCancellation)(this._getLocationModel(K,ue.model,ue.position,me.token),me.token).then(_e=>Ee(this,void 0,void 0,function*(){var we;if(!_e||me.token.isCancellationRequested)return;(0,k.alert)(_e.ariaMessage);let ye;if(_e.referenceAt(X.uri,Z)){const De=this._getAlternativeCommand(ne);!Q._activeAlternativeCommands.has(De)&&Q._allSymbolNavigationCommands.has(De)&&(ye=Q._allSymbolNavigationCommands.get(De))}const ke=_e.references.length;if(ke===0){if(!this.configuration.muteMessage){const De=X.getWordAtPosition(Z);(we=d.MessageController.get(ne))===null||we===void 0||we.showMessage(this._getNoResultFoundMessage(De),Z)}}else if(ke===1&&ye)Q._activeAlternativeCommands.add(this.desc.id),ie.invokeFunction(De=>ye.runEditorCommand(De,ne,de,he).finally(()=>{Q._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(ce,V,ne,_e,he)}),_e=>{oe.error(_e)}).finally(()=>{me.dispose()});return z.showWhile(Ce,250),Ce}_onResult(Y,ne,de,he,oe){return Ee(this,void 0,void 0,function*(){const ce=this._getGoToPreference(de);if(!(de instanceof i.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||ce==="peek"&&he.references.length>1))this._openInPeek(de,he,oe);else{const z=he.firstReference(),V=he.references.length>1&&ce==="gotoAndPeek",K=yield this._openReference(de,Y,z,this.configuration.openToSide,!V);V&&K?this._openInPeek(K,he,oe):he.dispose(),ce==="goto"&&ne.put(z)}})}_openReference(Y,ne,de,he,oe){return Ee(this,void 0,void 0,function*(){let ce;if((0,g.isLocationLink)(de)&&(ce=de.targetSelectionRange),ce||(ce=de.range),!ce)return;const z=yield ne.openCodeEditor({resource:de.uri,options:{selection:r.Range.collapseToStart(ce),selectionRevealType:3,selectionSource:"code.jump"}},Y,he);if(z){if(oe){const V=z.getModel(),K=z.createDecorationsCollection([{range:ce,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{z.getModel()===V&&K.clear()},350)}return z}})}_openInPeek(Y,ne,de){const he=o.ReferencesController.get(Y);he&&Y.hasModel()?he.toggleWidget(de??Y.getSelection(),(0,y.createCancelablePromise)(oe=>Promise.resolve(ne)),this.configuration.openInPeek):ne.dispose()}}Q._allSymbolNavigationCommands=new Map,Q._activeAlternativeCommands=new Set,e.SymbolNavigationAction=Q;class se extends Q{_getLocationModel(Y,ne,de,he){return Ee(this,void 0,void 0,function*(){return new l.ReferencesModel(yield(0,T.getDefinitionsAtPosition)(Y.definitionProvider,ne,de,he),C.localize(1,null))})}_getNoResultFoundMessage(Y){return Y&&Y.word?C.localize(2,null,Y.word):C.localize(3,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeDefinitionCommand}_getGoToPreference(Y){return Y.getOption(56).multipleDefinitions}}e.DefinitionAction=se;const le=w.isWeb&&!(0,S.isStandalone)()?2118:70;(0,f.registerAction2)((M=class pi extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:pi.id,title:{value:C.localize(4,null),original:"Go to Definition",mnemonicTitle:C.localize(5,null)},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:le,weight:100},menu:[{id:f.MenuId.EditorContext,group:"navigation",order:1.1},{id:f.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),v.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",pi.id)}},M.id="editor.action.revealDefinition",M)),(0,f.registerAction2)((N=class vi extends se{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:vi.id,title:{value:C.localize(6,null),original:"Open Definition to the Side"},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,le),weight:100}}),v.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",vi.id)}},N.id="editor.action.revealDefinitionAside",N)),(0,f.registerAction2)((A=class Ci extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Ci.id,title:{value:C.localize(7,null),original:"Peek Definition"},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,u.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:2}}),v.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",Ci.id)}},A.id="editor.action.peekDefinition",A));class te extends Q{_getLocationModel(Y,ne,de,he){return Ee(this,void 0,void 0,function*(){return new l.ReferencesModel(yield(0,T.getDeclarationsAtPosition)(Y.declarationProvider,ne,de,he),C.localize(8,null))})}_getNoResultFoundMessage(Y){return Y&&Y.word?C.localize(9,null,Y.word):C.localize(10,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeDeclarationCommand}_getGoToPreference(Y){return Y.getOption(56).multipleDeclarations}}(0,f.registerAction2)((P=class Ji extends te{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Ji.id,title:{value:C.localize(11,null),original:"Go to Declaration",mnemonicTitle:C.localize(12,null)},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasDeclarationProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:[{id:f.MenuId.EditorContext,group:"navigation",order:1.3},{id:f.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(Y){return Y&&Y.word?C.localize(13,null,Y.word):C.localize(14,null)}},P.id="editor.action.revealDeclaration",P)),(0,f.registerAction2)(class extends te{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:C.localize(15,null),original:"Peek Declaration"},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasDeclarationProvider,u.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:3}})}});class re extends Q{_getLocationModel(Y,ne,de,he){return Ee(this,void 0,void 0,function*(){return new l.ReferencesModel(yield(0,T.getTypeDefinitionsAtPosition)(Y.typeDefinitionProvider,ne,de,he),C.localize(16,null))})}_getNoResultFoundMessage(Y){return Y&&Y.word?C.localize(17,null,Y.word):C.localize(18,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(Y){return Y.getOption(56).multipleTypeDefinitions}}(0,f.registerAction2)((x=class en extends re{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:en.ID,title:{value:C.localize(19,null),original:"Go to Type Definition",mnemonicTitle:C.localize(20,null)},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasTypeDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:0,weight:100},menu:[{id:f.MenuId.EditorContext,group:"navigation",order:1.4},{id:f.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},x.ID="editor.action.goToTypeDefinition",x)),(0,f.registerAction2)((W=class tn extends re{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:tn.ID,title:{value:C.localize(21,null),original:"Peek Type Definition"},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasTypeDefinitionProvider,u.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:4}})}},W.ID="editor.action.peekTypeDefinition",W));class H extends Q{_getLocationModel(Y,ne,de,he){return Ee(this,void 0,void 0,function*(){return new l.ReferencesModel(yield(0,T.getImplementationsAtPosition)(Y.implementationProvider,ne,de,he),C.localize(22,null))})}_getNoResultFoundMessage(Y){return Y&&Y.word?C.localize(23,null,Y.word):C.localize(24,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeImplementationCommand}_getGoToPreference(Y){return Y.getOption(56).multipleImplementations}}(0,f.registerAction2)((U=class nn extends H{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:nn.ID,title:{value:C.localize(25,null),original:"Go to Implementations",mnemonicTitle:C.localize(26,null)},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasImplementationProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:2118,weight:100},menu:[{id:f.MenuId.EditorContext,group:"navigation",order:1.45},{id:f.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},U.ID="editor.action.goToImplementation",U)),(0,f.registerAction2)((O=class sn extends H{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:sn.ID,title:{value:C.localize(27,null),original:"Peek Implementations"},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasImplementationProvider,u.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:3142,weight:100},menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:5}})}},O.ID="editor.action.peekImplementation",O));class B extends Q{_getNoResultFoundMessage(Y){return Y?C.localize(28,null,Y.word):C.localize(29,null)}_getAlternativeCommand(Y){return Y.getOption(56).alternativeReferenceCommand}_getGoToPreference(Y){return Y.getOption(56).multipleReferences}}(0,f.registerAction2)(class extends B{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:C.localize(30,null),original:"Go to References",mnemonicTitle:C.localize(31,null)},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasReferenceProvider,u.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:1094,weight:100},menu:[{id:f.MenuId.EditorContext,group:"navigation",order:1.45},{id:f.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(Y,ne,de,he){return Ee(this,void 0,void 0,function*(){return new l.ReferencesModel(yield(0,T.getReferencesAtPosition)(Y.referenceProvider,ne,de,!0,he),C.localize(32,null))})}}),(0,f.registerAction2)(class extends B{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:C.localize(33,null),original:"Peek References"},precondition:p.ContextKeyExpr.and(c.EditorContextKeys.hasReferenceProvider,u.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(Y,ne,de,he){return Ee(this,void 0,void 0,function*(){return new l.ReferencesModel(yield(0,T.getReferencesAtPosition)(Y.referenceProvider,ne,de,!1,he),C.localize(34,null))})}});class j extends Q{constructor(Y,ne,de){super(Y,{id:"editor.action.goToLocation",title:{value:C.localize(35,null),original:"Go to Any Symbol"},precondition:p.ContextKeyExpr.and(u.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated())}),this._references=ne,this._gotoMultipleBehaviour=de}_getLocationModel(Y,ne,de,he){return Ee(this,void 0,void 0,function*(){return new l.ReferencesModel(this._references,C.localize(36,null))})}_getNoResultFoundMessage(Y){return Y&&C.localize(37,null,Y.word)||""}_getGoToPreference(Y){var ne;return(ne=this._gotoMultipleBehaviour)!==null&&ne!==void 0?ne:Y.getOption(56).multipleReferences}_getAlternativeCommand(){return""}}v.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:_.URI},{name:"position",description:"The position at which to start",constraint:s.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:(G,Y,ne,de,he,oe,ce)=>Ee(void 0,void 0,void 0,function*(){(0,b.assertType)(_.URI.isUri(Y)),(0,b.assertType)(s.Position.isIPosition(ne)),(0,b.assertType)(Array.isArray(de)),(0,b.assertType)(typeof he>"u"||typeof he=="string"),(0,b.assertType)(typeof ce>"u"||typeof ce=="boolean");const z=G.get(t.ICodeEditorService),V=yield z.openCodeEditor({resource:Y},z.getFocusedCodeEditor());if((0,m.isCodeEditor)(V))return V.setPosition(ne),V.revealPositionInCenterIfOutsideViewport(ne,0),V.invokeWithinContext(K=>{const ie=new class extends j{_getNoResultFoundMessage(X){return oe||super._getNoResultFoundMessage(X)}}({muteMessage:!oe,openInPeek:!!ce,openToSide:!1},de,he);K.get(L.IInstantiationService).invokeFunction(ie.run.bind(ie),V)})})}),v.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:_.URI},{name:"position",description:"The position at which to start",constraint:s.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:(G,Y,ne,de,he)=>Ee(void 0,void 0,void 0,function*(){G.get(v.ICommandService).executeCommand("editor.action.goToLocations",Y,ne,de,he,void 0,!0)})}),v.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(G,Y,ne)=>{(0,b.assertType)(_.URI.isUri(Y)),(0,b.assertType)(s.Position.isIPosition(ne));const de=G.get(F.ILanguageFeaturesService),he=G.get(t.ICodeEditorService);return he.openCodeEditor({resource:Y},he.getFocusedCodeEditor()).then(oe=>{if(!(0,m.isCodeEditor)(oe)||!oe.hasModel())return;const ce=o.ReferencesController.get(oe);if(!ce)return;const z=(0,y.createCancelablePromise)(K=>(0,T.getReferencesAtPosition)(de.referenceProvider,oe.getModel(),s.Position.lift(ne),!1,K).then(ie=>new l.ReferencesModel(ie,C.localize(38,null)))),V=new r.Range(ne.lineNumber,ne.column,ne.lineNumber,ne.column);return Promise.resolve(ce.toggleWidget(V,z,!1))})}}),v.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(J[339],ee([1,0,12,11,68,2,18,97,15,5,38,61,174,128,616,14,238,232,19,39,413]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let a=class Jt{constructor(u,C,f,v){this.textModelResolverService=C,this.languageService=f,this.languageFeaturesService=v,this.toUnhook=new D.DisposableStore,this.toUnhookForKeyboard=new D.DisposableStore,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=u,this.linkDecorations=this.editor.createDecorationsCollection();const p=new t.ClickLinkGesture(u);this.toUnhook.add(p),this.toUnhook.add(p.onMouseMoveOrRelevantKeyDown(([L,E])=>{this.startFindDefinitionFromMouse(L,(0,w.withNullAsUndefined)(E))})),this.toUnhook.add(p.onExecute(L=>{this.isEnabled(L)&&this.gotoDefinition(L.target.position,L.hasSideBySideModifier).catch(E=>{(0,k.onUnexpectedError)(E)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(p.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(u){return u.getContribution(Jt.ID)}startFindDefinitionFromCursor(u){return Ee(this,void 0,void 0,function*(){yield this.startFindDefinition(u),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(C=>{C&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(u,C){if(u.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(u,C)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const f=u.target.position;this.startFindDefinition(f)}startFindDefinition(u){var C;return Ee(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const f=u?(C=this.editor.getModel())===null||C===void 0?void 0:C.getWordAtPosition(u):null;if(!f){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===f.startColumn&&this.currentWordAtPosition.endColumn===f.endColumn&&this.currentWordAtPosition.word===f.word)return;this.currentWordAtPosition=f;const v=new b.EditorState(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,S.createCancelablePromise)(E=>this.findDefinition(u,E));let p;try{p=yield this.previousPromise}catch(E){(0,k.onUnexpectedError)(E);return}if(!p||!p.length||!v.validate(this.editor)){this.removeLinkDecorations();return}const L=p[0].originSelectionRange?h.Range.lift(p[0].originSelectionRange):new h.Range(u.lineNumber,f.startColumn,u.lineNumber,f.endColumn);if(p.length>1){let E=L;for(const{originSelectionRange:I}of p)I&&(E=h.Range.plusRange(E,I));this.addDecoration(E,new y.MarkdownString().appendText(s.localize(0,null,p.length)))}else{const E=p[0];if(!E.uri)return;this.textModelResolverService.createModelReference(E.uri).then(I=>{if(!I.object||!I.object.textEditorModel){I.dispose();return}const{object:{textEditorModel:T}}=I,{startLineNumber:F}=E.range;if(F<1||F>T.getLineCount()){I.dispose();return}const R=this.getPreviewValue(T,F,E),M=this.languageService.guessLanguageIdByFilepathOrFirstLine(T.uri);this.addDecoration(L,R?new y.MarkdownString().appendCodeblock(M||"",R):void 0),I.dispose()})}})}getPreviewValue(u,C,f){let v=f.range;return v.endLineNumber-v.startLineNumber>=Jt.MAX_SOURCE_PREVIEW_LINES&&(v=this.getPreviewRangeBasedOnIndentation(u,C)),this.stripIndentationFromPreviewRange(u,C,v)}stripIndentationFromPreviewRange(u,C,f){let p=u.getLineFirstNonWhitespaceColumn(C);for(let E=C+1;E<f.endLineNumber;E++){const I=u.getLineFirstNonWhitespaceColumn(E);p=Math.min(p,I)}return u.getValueInRange(f).replace(new RegExp(`^\\\\s{${p-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(u,C){const f=u.getLineFirstNonWhitespaceColumn(C),v=Math.min(u.getLineCount(),C+Jt.MAX_SOURCE_PREVIEW_LINES);let p=C+1;for(;p<v;p++){const L=u.getLineFirstNonWhitespaceColumn(p);if(f===L)break}return new h.Range(C,1,p+1,1)}addDecoration(u,C){const f={range:u,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:C}};this.linkDecorations.set([f])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(u,C){var f;return this.editor.hasModel()&&u.isLeftClick&&u.isNoneOrSingleMouseDown&&u.target.type===6&&!(((f=u.target.detail.injectedText)===null||f===void 0?void 0:f.options)instanceof l.ModelDecorationInjectedTextOptions)&&(u.hasTriggerModifier||(C?C.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(u,C){const f=this.editor.getModel();return f?(0,g.getDefinitionsAtPosition)(this.languageFeaturesService.definitionProvider,f,u,C):Promise.resolve(null)}gotoDefinition(u,C){return this.editor.setPosition(u),this.editor.invokeWithinContext(f=>{const v=!C&&this.editor.getOption(84)&&!this.isInPeekEditor(f);return new c.DefinitionAction({openToSide:C,openInPeek:v,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(f)})}isInPeekEditor(u){const C=u.get(r.IContextKeyService);return i.PeekContext.inPeekEditor.getValue(C)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};a.ID="editor.contrib.gotodefinitionatposition",a.MAX_SOURCE_PREVIEW_LINES=8,a=Ne([fe(1,n.ITextModelService),fe(2,m.ILanguageService),fe(3,o.ILanguageFeaturesService)],a),e.GotoDefinitionAtPositionEditorContribution=a,(0,_.registerEditorContribution)(a.ID,a,2)}),define(J[844],ee([1,0,7,16,12,11,2,42,5,19,223,127,235,107,337,624,89,47,71]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const l=S.$;class a{constructor(f,v,p){this.owner=f,this.range=v,this.marker=p}isValidForHoverAnchor(f){return f.type===1&&this.range.startColumn<=f.range.startColumn&&this.range.endColumn>=f.range.endColumn}}e.MarkerHover=a;const d={type:1,filter:{include:i.CodeActionKind.QuickFix},triggerAction:i.CodeActionTriggerSource.QuickFixHover};let u=class{constructor(f,v,p,L){this._editor=f,this._markerDecorationsService=v,this._openerService=p,this._languageFeaturesService=L,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(f,v){if(!this._editor.hasModel()||f.type!==1&&!f.supportsMarkerHover)return[];const p=this._editor.getModel(),L=f.range.startLineNumber,E=p.getLineMaxColumn(L),I=[];for(const T of v){const F=T.range.startLineNumber===L?T.range.startColumn:1,R=T.range.endLineNumber===L?T.range.endColumn:E,M=this._markerDecorationsService.getMarker(p.uri,T);if(!M)continue;const N=new _.Range(f.range.startLineNumber,F,f.range.startLineNumber,R);I.push(new a(this,N,M))}return I}renderHoverParts(f,v){if(!v.length)return w.Disposable.None;const p=new w.DisposableStore;v.forEach(E=>f.fragment.appendChild(this.renderMarkerHover(E,p)));const L=v.length===1?v[0]:v.sort((E,I)=>c.MarkerSeverity.compare(E.marker.severity,I.marker.severity))[0];return this.renderMarkerStatusbar(f,L,p),p}renderMarkerHover(f,v){const p=l("div.hover-row"),L=S.append(p,l("div.marker.hover-contents")),{source:E,message:I,code:T,relatedInformation:F}=f.marker;this._editor.applyFontInfo(L);const R=S.append(L,l("span"));if(R.style.whiteSpace="pre-wrap",R.innerText=I,E||T)if(T&&typeof T!="string"){const M=l("span");if(E){const x=S.append(M,l("span"));x.innerText=E}const N=S.append(M,l("a.code-link"));N.setAttribute("href",T.target.toString()),v.add(S.addDisposableListener(N,"click",x=>{this._openerService.open(T.target,{allowCommands:!0}),x.preventDefault(),x.stopPropagation()}));const A=S.append(N,l("span"));A.innerText=T.value;const P=S.append(L,M);P.style.opacity="0.6",P.style.paddingLeft="6px"}else{const M=S.append(L,l("span"));M.style.opacity="0.6",M.style.paddingLeft="6px",M.innerText=E&&T?`${E}(${T})`:E||`(${T})`}if((0,k.isNonEmptyArray)(F))for(const{message:M,resource:N,startLineNumber:A,startColumn:P}of F){const x=S.append(L,l("div"));x.style.marginTop="8px";const W=S.append(x,l("a"));W.innerText=`${(0,b.basename)(N)}(${A}, ${P}): `,W.style.cursor="pointer",v.add(S.addDisposableListener(W,"click",O=>{O.stopPropagation(),O.preventDefault(),this._openerService&&this._openerService.open(N,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:A,startColumn:P}}}).catch(D.onUnexpectedError)}));const U=S.append(x,l("span"));U.innerText=M,this._editor.applyFontInfo(U)}return p}renderMarkerStatusbar(f,v,p){if((v.marker.severity===c.MarkerSeverity.Error||v.marker.severity===c.MarkerSeverity.Warning||v.marker.severity===c.MarkerSeverity.Info)&&f.statusBar.addAction({label:r.localize(0,null),commandId:s.NextMarkerAction.ID,run:()=>{var L;f.hide(),(L=s.MarkerController.get(this._editor))===null||L===void 0||L.showAtMarker(v.marker),this._editor.focus()}}),!this._editor.getOption(87)){const L=f.statusBar.append(l("div"));this.recentMarkerCodeActionsInfo&&(c.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===c.IMarkerData.makeKey(v.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(L.textContent=r.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const E=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?w.Disposable.None:p.add((0,y.disposableTimeout)(()=>L.textContent=r.localize(2,null),200));L.textContent||(L.textContent=String.fromCharCode(160));const I=this.getCodeActions(v.marker);p.add((0,w.toDisposable)(()=>I.cancel())),I.then(T=>{if(E.dispose(),this.recentMarkerCodeActionsInfo={marker:v.marker,hasCodeActions:T.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){T.dispose(),L.textContent=r.localize(3,null);return}L.style.display="none";let F=!1;p.add((0,w.toDisposable)(()=>{F||T.dispose()})),f.statusBar.addAction({label:r.localize(4,null),commandId:n.quickFixCommandId,run:R=>{F=!0;const M=t.CodeActionController.get(this._editor),N=S.getDomNodePagePosition(R);f.hide(),M?.showCodeActions(d,T,{x:N.left+6,y:N.top+N.height+6,width:N.width,height:N.height})}})},D.onUnexpectedError)}}getCodeActions(f){return(0,y.createCancelablePromise)(v=>(0,n.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new _.Range(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn),d,o.Progress.None,v))}};u=Ne([fe(1,m.IMarkerDecorationsService),fe(2,g.IOpenerService),fe(3,h.ILanguageFeaturesService)],u),e.MarkerHoverParticipant=u}),define(J[340],ee([1,0,58,2,15,5,22,38,339,831,731,622,8,47,31,24,93,233,844,237,36,415]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;let d=class on{static get(N){return N.getContribution(on.ID)}constructor(N,A,P,x,W){this._editor=N,this._instantiationService=A,this._openerService=P,this._languageService=x,this._keybindingService=W,this._toUnhook=new k.DisposableStore,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(U=>{U.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const N=()=>this._hideWidgets(),A=this._editor.getOption(58);this._isHoverEnabled=A.enabled,this._isHoverSticky=A.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(P=>this._onEditorMouseDown(P))),this._toUnhook.add(this._editor.onMouseUp(P=>this._onEditorMouseUp(P))),this._toUnhook.add(this._editor.onMouseMove(P=>this._onEditorMouseMove(P))),this._toUnhook.add(this._editor.onKeyDown(P=>this._onKeyDown(P)))):(this._toUnhook.add(this._editor.onMouseMove(P=>this._onEditorMouseMove(P))),this._toUnhook.add(this._editor.onKeyDown(P=>this._onKeyDown(P)))),this._toUnhook.add(this._editor.onMouseLeave(P=>this._onEditorMouseLeave(P))),this._toUnhook.add(this._editor.onDidChangeModel(N)),this._toUnhook.add(this._editor.onDidScrollChange(P=>this._onEditorScrollChanged(P)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(N){(N.scrollTopChanged||N.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(N){this._isMouseDown=!0;const A=N.target;if(A.type===9&&A.detail===h.ContentHoverWidget.ID){this._hoverClicked=!0;return}A.type===12&&A.detail===m.MarginHoverWidget.ID||(A.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(N){this._isMouseDown=!1}_onEditorMouseLeave(N){var A;const P=N.event.browserEvent.relatedTarget;!((A=this._contentWidget)===null||A===void 0)&&A.containsNode(P)||this._hideWidgets()}_onEditorMouseMove(N){var A,P,x,W,U,O;const $=N.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&$.type===9&&$.detail===h.ContentHoverWidget.ID||this._isHoverSticky&&!(!((P=(A=N.event.browserEvent.view)===null||A===void 0?void 0:A.getSelection())===null||P===void 0)&&P.isCollapsed)||!this._isHoverSticky&&$.type===9&&$.detail===h.ContentHoverWidget.ID&&(!((x=this._contentWidget)===null||x===void 0)&&x.isColorPickerVisible())||this._isHoverSticky&&$.type===12&&$.detail===m.MarginHoverWidget.ID||this._isHoverSticky&&(!((W=this._contentWidget)===null||W===void 0)&&W.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(N)){(U=this._glyphWidget)===null||U===void 0||U.hide();return}if($.type===2&&$.position){(O=this._contentWidget)===null||O===void 0||O.hide(),this._glyphWidget||(this._glyphWidget=new m.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt($.position.lineNumber);return}this._hideWidgets()}_onKeyDown(N){var A;if(!this._editor.hasModel())return;const P=this._keybindingService.softDispatch(N,this._editor.getDomNode()),x=P?.kind===1||P&&P.kind===2&&P.commandId==="editor.action.showHover"&&((A=this._contentWidget)===null||A===void 0?void 0:A.isVisible());N.keyCode!==5&&N.keyCode!==6&&N.keyCode!==57&&N.keyCode!==4&&!x&&this._hideWidgets()}_hideWidgets(){var N,A,P;this._isMouseDown&&this._hoverClicked&&(!((N=this._contentWidget)===null||N===void 0)&&N.isColorPickerVisible())||l.InlineSuggestionHintsContentWidget.dropDownVisible||(this._hoverClicked=!1,(A=this._glyphWidget)===null||A===void 0||A.hide(),(P=this._contentWidget)===null||P===void 0||P.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(h.ContentHoverController,this._editor)),this._contentWidget}isColorPickerVisible(){var N;return((N=this._contentWidget)===null||N===void 0?void 0:N.isColorPickerVisible())||!1}showContentHover(N,A,P,x){this._getOrCreateContentWidget().startShowingAtRange(N,A,P,x)}focus(){var N;(N=this._contentWidget)===null||N===void 0||N.focus()}scrollUp(){var N;(N=this._contentWidget)===null||N===void 0||N.scrollUp()}scrollDown(){var N;(N=this._contentWidget)===null||N===void 0||N.scrollDown()}scrollLeft(){var N;(N=this._contentWidget)===null||N===void 0||N.scrollLeft()}scrollRight(){var N;(N=this._contentWidget)===null||N===void 0||N.scrollRight()}pageUp(){var N;(N=this._contentWidget)===null||N===void 0||N.pageUp()}pageDown(){var N;(N=this._contentWidget)===null||N===void 0||N.pageDown()}goToTop(){var N;(N=this._contentWidget)===null||N===void 0||N.goToTop()}goToBottom(){var N;(N=this._contentWidget)===null||N===void 0||N.goToBottom()}escape(){var N;(N=this._contentWidget)===null||N===void 0||N.escape()}isHoverVisible(){var N;return(N=this._contentWidget)===null||N===void 0?void 0:N.isVisible()}dispose(){var N,A;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(N=this._glyphWidget)===null||N===void 0||N.dispose(),(A=this._contentWidget)===null||A===void 0||A.dispose()}};d.ID="editor.contrib.hover",d=Ne([fe(1,t.IInstantiationService),fe(2,i.IOpenerService),fe(3,b.ILanguageService),fe(4,a.IKeybindingService)],d),e.ModesHoverController=d;class u extends y.EditorAction{constructor(){super({id:"editor.action.showHover",label:n.localize(0,null),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.editorTextFocus,primary:(0,S.KeyChord)(2089,2087),weight:100}})}run(N,A,P){if(!A.hasModel())return;const x=d.get(A);if(!x)return;const W=A.getPosition(),U=new D.Range(W.lineNumber,W.column,W.lineNumber,W.column),O=A.getOption(2)===2||!!P?.focus;x.isHoverVisible()?x.focus():x.showContentHover(U,1,1,O)}}class C extends y.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:n.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(N,A){const P=d.get(A);if(!P)return;const x=A.getPosition();if(!x)return;const W=new D.Range(x.lineNumber,x.column,x.lineNumber,x.column),U=_.GotoDefinitionAtPositionEditorContribution.get(A);if(!U)return;U.startFindDefinitionFromCursor(x).then(()=>{P.showContentHover(W,1,1,!0)})}}class f extends y.EditorAction{constructor(){super({id:"editor.action.scrollUpHover",label:n.localize(2,null),alias:"Scroll Up Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:16,weight:100}})}run(N,A){const P=d.get(A);P&&P.scrollUp()}}class v extends y.EditorAction{constructor(){super({id:"editor.action.scrollDownHover",label:n.localize(3,null),alias:"Scroll Down Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:18,weight:100}})}run(N,A){const P=d.get(A);P&&P.scrollDown()}}class p extends y.EditorAction{constructor(){super({id:"editor.action.scrollLeftHover",label:n.localize(4,null),alias:"Scroll Left Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:15,weight:100}})}run(N,A){const P=d.get(A);P&&P.scrollLeft()}}class L extends y.EditorAction{constructor(){super({id:"editor.action.scrollRightHover",label:n.localize(5,null),alias:"Scroll Right Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:17,weight:100}})}run(N,A){const P=d.get(A);P&&P.scrollRight()}}class E extends y.EditorAction{constructor(){super({id:"editor.action.pageUpHover",label:n.localize(6,null),alias:"Page Up Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:11,secondary:[528],weight:100}})}run(N,A){const P=d.get(A);P&&P.pageUp()}}class I extends y.EditorAction{constructor(){super({id:"editor.action.pageDownHover",label:n.localize(7,null),alias:"Page Down Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:12,secondary:[530],weight:100}})}run(N,A){const P=d.get(A);P&&P.pageDown()}}class T extends y.EditorAction{constructor(){super({id:"editor.action.goToTopHover",label:n.localize(8,null),alias:"Go To Bottom Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(N,A){const P=d.get(A);P&&P.goToTop()}}class F extends y.EditorAction{constructor(){super({id:"editor.action.goToBottomHover",label:n.localize(9,null),alias:"Go To Bottom Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(N,A){const P=d.get(A);P&&P.goToBottom()}}class R extends y.EditorAction{constructor(){super({id:"editor.action.escapeFocusHover",label:n.localize(10,null),alias:"Escape Focus Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:9,weight:100}})}run(N,A){const P=d.get(A);P&&P.escape()}}(0,y.registerEditorContribution)(d.ID,d,2),(0,y.registerEditorAction)(u),(0,y.registerEditorAction)(C),(0,y.registerEditorAction)(f),(0,y.registerEditorAction)(v),(0,y.registerEditorAction)(p),(0,y.registerEditorAction)(L),(0,y.registerEditorAction)(E),(0,y.registerEditorAction)(I),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(F),(0,y.registerEditorAction)(R),c.HoverParticipantRegistry.register(g.MarkdownHoverParticipant),c.HoverParticipantRegistry.register(o.MarkerHoverParticipant),(0,r.registerThemingParticipant)((M,N)=>{const A=M.getColor(s.editorHoverBorder);A&&(N.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${A.transparent(.5)}; }`),N.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${A.transparent(.5)}; }`),N.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${A.transparent(.5)}; }`))})}),define(J[845],ee([1,0,2,15,5,333,824,340,93]),function(q,e,S,k,y,D,w,b,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class h extends S.Disposable{constructor(n){super(),this._editor=n,this._register(n.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(n){const t=n.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==D.ColorDecorationInjectedTextMarker||!t.range)return;const i=this._editor.getContribution(b.ModesHoverController.ID);if(i&&!i.isColorPickerVisible()){const s=new y.Range(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(s,1,0,!1)}}}h.ID="editor.contrib.colorContribution",e.ColorContribution=h,(0,k.registerEditorContribution)(h.ID,h,2),_.HoverParticipantRegistry.register(w.ColorHoverParticipant)}),define(J[341],ee([1,0,7,41,21,159,5,61,238,128,28,25,14,57,8,43]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;function c(o,l,a,d){var u;return Ee(this,void 0,void 0,function*(){const C=o.get(b.ITextModelService),f=o.get(i.IContextMenuService),v=o.get(n.ICommandService),p=o.get(s.IInstantiationService),L=o.get(r.INotificationService);if(yield d.item.resolve(y.CancellationToken.None),!d.part.location)return;const E=d.part.location,I=[],T=new Set(m.MenuRegistry.getMenuItems(m.MenuId.EditorContext).map(R=>(0,m.isIMenuItem)(R)?R.command.id:(0,D.generateUuid)()));for(const R of _.SymbolNavigationAction.all())T.has(R.desc.id)&&I.push(new k.Action(R.desc.id,m.MenuItemAction.label(R.desc,{renderShortTitle:!0}),void 0,!0,()=>Ee(this,void 0,void 0,function*(){const M=yield C.createModelReference(E.uri);try{const N=new _.SymbolNavigationAnchor(M.object.textEditorModel,w.Range.getStartPosition(E.range)),A=d.item.anchor.range;yield p.invokeFunction(R.runEditorCommand.bind(R),l,N,A)}finally{M.dispose()}})));if(d.part.command){const{command:R}=d.part;I.push(new k.Separator),I.push(new k.Action(R.id,R.title,void 0,!0,()=>Ee(this,void 0,void 0,function*(){var M;try{yield v.executeCommand(R.id,...(M=R.arguments)!==null&&M!==void 0?M:[])}catch(N){L.notify({severity:r.Severity.Error,source:d.item.provider.displayName,message:N})}})))}const F=l.getOption(122);f.showContextMenu({domForShadowRoot:F&&(u=l.getDomNode())!==null&&u!==void 0?u:void 0,getAnchor:()=>{const R=S.getDomNodePagePosition(a);return{x:R.left,y:R.top+R.height+8}},getActions:()=>I,onHide:()=>{l.focus()},autoSelectFirstItem:!0})})}e.showGoToContextMenu=c;function g(o,l,a,d){return Ee(this,void 0,void 0,function*(){const C=yield o.get(b.ITextModelService).createModelReference(d.uri);yield a.invokeWithinContext(f=>Ee(this,void 0,void 0,function*(){const v=l.hasSideBySideModifier,p=f.get(t.IContextKeyService),L=h.PeekContext.inPeekEditor.getValue(p),E=!v&&a.getOption(84)&&!L;return new _.DefinitionAction({openToSide:v,openInPeek:E,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(f,new _.SymbolNavigationAnchor(C.object.textEditorModel,w.Range.getStartPosition(d.range)),w.Range.lift(d.range))})),C.dispose()})}e.goToDefinitionWithLocation=g}),define(J[342],ee([1,0,7,16,12,21,11,2,55,18,20,151,114,40,64,5,26,48,39,70,19,61,174,300,341,25,51,8,43,31,24]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class F{constructor(){this._entries=new _.LRUCache(50)}get(W){const U=F._key(W);return this._entries.get(U)}set(W,U){const O=F._key(W);this._entries.set(O,U)}static _key(W){return`${W.uri.toString()}/${W.getVersionId()}`}}const R=(0,L.createDecorator)("IInlayHintsCache");(0,p.registerSingleton)(R,F,1);class M{constructor(W,U){this.item=W,this.index=U}get part(){const W=this.item.hint.label;return typeof W=="string"?{label:W}:W[this.index]}}e.RenderedInlayHintLabelPart=M;class N{constructor(W,U){this.part=W,this.hasTriggerModifier=U}}let A=class bi{static get(W){var U;return(U=W.getContribution(bi.ID))!==null&&U!==void 0?U:void 0}constructor(W,U,O,$,Q,se,le){this._editor=W,this._languageFeaturesService=U,this._inlayHintsCache=$,this._commandService=Q,this._notificationService=se,this._instaService=le,this._disposables=new b.DisposableStore,this._sessionDisposables=new b.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new n.DynamicCssRules(this._editor),this._activeRenderMode=0,this._debounceInfo=O.for(U.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(U.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(W.onDidChangeModel(()=>this._update())),this._disposables.add(W.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(W.onDidChangeConfiguration(te=>{te.hasChanged(135)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const W=this._editor.getOption(135);if(W.enabled==="off")return;const U=this._editor.getModel();if(!U||!this._languageFeaturesService.inlayHintsProvider.has(U))return;const O=this._inlayHintsCache.get(U);O&&this._updateHintsDecorators([U.getFullModelRange()],O),this._sessionDisposables.add((0,b.toDisposable)(()=>{U.isDisposed()||this._cacheHintsForFastRestore(U)}));let $;const Q=new Set,se=new y.RunOnceScheduler(()=>Ee(this,void 0,void 0,function*(){const le=Date.now();$?.dispose(!0),$=new D.CancellationTokenSource;const te=U.onWillDispose(()=>$?.cancel());try{const re=$.token,H=yield C.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,U,this._getHintsRanges(),re);if(se.delay=this._debounceInfo.update(U,Date.now()-le),re.isCancellationRequested){H.dispose();return}for(const B of H.provider)typeof B.onDidChangeInlayHints=="function"&&!Q.has(B)&&(Q.add(B),this._sessionDisposables.add(B.onDidChangeInlayHints(()=>{se.isScheduled()||se.schedule()})));this._sessionDisposables.add(H),this._updateHintsDecorators(H.ranges,H.items),this._cacheHintsForFastRestore(U)}catch(re){(0,w.onUnexpectedError)(re)}finally{$.dispose(),te.dispose()}}),this._debounceInfo.get(U));if(this._sessionDisposables.add(se),this._sessionDisposables.add((0,b.toDisposable)(()=>$?.dispose(!0))),se.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(le=>{(le.scrollTopChanged||!se.isScheduled())&&se.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(le=>{const te=Math.max(se.delay,1250);se.schedule(te)})),W.enabled==="on")this._activeRenderMode=0;else{let le,te;W.enabled==="onUnlessPressed"?(le=0,te=1):(le=1,te=0),this._activeRenderMode=le,this._sessionDisposables.add(S.ModifierKeyEmitter.getInstance().event(re=>{if(!this._editor.hasModel())return;const H=re.altKey&&re.ctrlKey&&!(re.shiftKey||re.metaKey)?te:le;if(H!==this._activeRenderMode){this._activeRenderMode=H;const B=this._editor.getModel(),j=this._copyInlayHintsWithCurrentAnchor(B);this._updateHintsDecorators([B.getFullModelRange()],j),se.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>se.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const W=new b.DisposableStore,U=W.add(new u.ClickLinkGesture(this._editor)),O=new b.DisposableStore;return W.add(O),W.add(U.onMouseMoveOrRelevantKeyDown($=>{const[Q]=$,se=this._getInlayHintLabelPart(Q),le=this._editor.getModel();if(!se||!le){O.clear();return}const te=new D.CancellationTokenSource;O.add((0,b.toDisposable)(()=>te.dispose(!0))),se.item.resolve(te.token),this._activeInlayHintPart=se.part.command||se.part.location?new N(se,Q.hasTriggerModifier):void 0;const re=le.validatePosition(se.item.hint.position).lineNumber,H=new r.Range(re,1,re,le.getLineMaxColumn(re)),B=this._getInlineHintsForRange(H);this._updateHintsDecorators([H],B),O.add((0,b.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([H],B)}))})),W.add(U.onCancel(()=>O.clear())),W.add(U.onExecute($=>Ee(this,void 0,void 0,function*(){const Q=this._getInlayHintLabelPart($);if(Q){const se=Q.part;se.location?this._instaService.invokeFunction(f.goToDefinitionWithLocation,$,this._editor,se.location):c.Command.is(se.command)&&(yield this._invokeCommand(se.command,Q.item))}}))),W}_getInlineHintsForRange(W){const U=new Set;for(const O of this._decorationsMetadata.values())W.containsRange(O.item.anchor.range)&&U.add(O.item);return Array.from(U)}_installDblClickGesture(W){return this._editor.onMouseUp(U=>Ee(this,void 0,void 0,function*(){if(U.event.detail!==2)return;const O=this._getInlayHintLabelPart(U);if(O&&(U.event.preventDefault(),yield O.item.resolve(D.CancellationToken.None),(0,k.isNonEmptyArray)(O.item.hint.textEdits))){const $=O.item.hint.textEdits.map(Q=>s.EditOperation.replace(r.Range.lift(Q.range),Q.text));this._editor.executeEdits("inlayHint.default",$),W()}}))}_installContextMenu(){return this._editor.onContextMenu(W=>Ee(this,void 0,void 0,function*(){if(!(W.event.target instanceof HTMLElement))return;const U=this._getInlayHintLabelPart(W);U&&(yield this._instaService.invokeFunction(f.showGoToContextMenu,this._editor,W.event.target,U))}))}_getInlayHintLabelPart(W){var U;if(W.target.type!==6)return;const O=(U=W.target.detail.injectedText)===null||U===void 0?void 0:U.options;if(O instanceof o.ModelDecorationInjectedTextOptions&&O?.attachedData instanceof M)return O.attachedData}_invokeCommand(W,U){var O;return Ee(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(W.id,...(O=W.arguments)!==null&&O!==void 0?O:[])}catch($){this._notificationService.notify({severity:E.Severity.Error,source:U.provider.displayName,message:$})}})}_cacheHintsForFastRestore(W){const U=this._copyInlayHintsWithCurrentAnchor(W);this._inlayHintsCache.set(W,U)}_copyInlayHintsWithCurrentAnchor(W){const U=new Map;for(const[O,$]of this._decorationsMetadata){if(U.has($.item))continue;const Q=W.getDecorationRange(O);if(Q){const se=new C.InlayHintAnchor(Q,$.item.anchor.direction),le=$.item.with({anchor:se});U.set($.item,le)}}return Array.from(U.values())}_getHintsRanges(){const U=this._editor.getModel(),O=this._editor.getVisibleRangesPlusViewportAboveBelow(),$=[];for(const Q of O.sort(r.Range.compareRangesUsingStarts)){const se=U.validateRange(new r.Range(Q.startLineNumber-30,Q.startColumn,Q.endLineNumber+30,Q.endColumn));$.length===0||!r.Range.areIntersectingOrTouching($[$.length-1],se)?$.push(se):$[$.length-1]=r.Range.plusRange($[$.length-1],se)}return $}_updateHintsDecorators(W,U){var O,$;const Q=[],se=(ne,de,he,oe,ce)=>{const z={content:he,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:de.className,cursorStops:oe,attachedData:ce};Q.push({item:ne,classNameRef:de,decoration:{range:ne.anchor.range,options:{description:"InlayHint",showIfCollapsed:ne.anchor.range.isEmpty(),collapseOnReplaceEdit:!ne.anchor.range.isEmpty(),stickiness:0,[ne.anchor.direction]:this._activeRenderMode===0?z:void 0}}})},le=(ne,de)=>{const he=this._ruleFactory.createClassNameRef({width:`${te/3|0}px`,display:"inline-block"});se(ne,he,"\\u200A",de?g.InjectedTextCursorStops.Right:g.InjectedTextCursorStops.None)},{fontSize:te,fontFamily:re,padding:H,isUniform:B}=this._getLayoutInfo(),j="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(j,re);for(const ne of U){ne.hint.paddingLeft&&le(ne,!1);const de=typeof ne.hint.label=="string"?[{label:ne.hint.label}]:ne.hint.label;for(let he=0;he<de.length;he++){const oe=de[he],ce=he===0,z=he===de.length-1,V={fontSize:`${te}px`,fontFamily:`var(${j}), ${i.EDITOR_FONT_DEFAULTS.fontFamily}`,verticalAlign:B?"baseline":"middle"};(0,k.isNonEmptyArray)(ne.hint.textEdits)&&(V.cursor="default"),this._fillInColors(V,ne.hint),(oe.command||oe.location)&&((O=this._activeInlayHintPart)===null||O===void 0?void 0:O.part.item)===ne&&this._activeInlayHintPart.part.index===he&&(V.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(V.color=(0,T.themeColorFromId)(I.editorActiveLinkForeground),V.cursor="pointer")),H&&(ce&&z?(V.padding=`1px ${Math.max(1,te/4)|0}px`,V.borderRadius=`${te/4|0}px`):ce?(V.padding=`1px 0 1px ${Math.max(1,te/4)|0}px`,V.borderRadius=`${te/4|0}px 0 0 ${te/4|0}px`):z?(V.padding=`1px ${Math.max(1,te/4)|0}px 1px 0`,V.borderRadius=`0 ${te/4|0}px ${te/4|0}px 0`):V.padding="1px 0 1px 0"),se(ne,this._ruleFactory.createClassNameRef(V),P(oe.label),z&&!ne.hint.paddingRight?g.InjectedTextCursorStops.Right:g.InjectedTextCursorStops.None,new M(ne,he))}if(ne.hint.paddingRight&&le(ne,!0),Q.length>bi._MAX_DECORATORS)break}const G=[];for(const ne of W)for(const{id:de}of($=this._editor.getDecorationsInRange(ne))!==null&&$!==void 0?$:[]){const he=this._decorationsMetadata.get(de);he&&(G.push(de),he.classNameRef.dispose(),this._decorationsMetadata.delete(de))}const Y=t.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(ne=>{const de=ne.deltaDecorations(G,Q.map(he=>he.decoration));for(let he=0;he<de.length;he++){const oe=Q[he];this._decorationsMetadata.set(de[he],oe)}}),Y.restore(this._editor)}_fillInColors(W,U){U.kind===c.InlayHintKind.Parameter?(W.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintParameterBackground),W.color=(0,T.themeColorFromId)(I.editorInlayHintParameterForeground)):U.kind===c.InlayHintKind.Type?(W.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintTypeBackground),W.color=(0,T.themeColorFromId)(I.editorInlayHintTypeForeground)):(W.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintBackground),W.color=(0,T.themeColorFromId)(I.editorInlayHintForeground))}_getLayoutInfo(){const W=this._editor.getOption(135),U=W.padding,O=this._editor.getOption(50),$=this._editor.getOption(47);let Q=W.fontSize;(!Q||Q<5||Q>O)&&(Q=O);const se=W.fontFamily||$;return{fontSize:Q,fontFamily:se,padding:U,isUniform:!U&&se===$&&Q===O}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const W of this._decorationsMetadata.values())W.classNameRef.dispose();this._decorationsMetadata.clear()}};A.ID="editor.contrib.InlayHints",A._MAX_DECORATORS=1500,A=Ne([fe(1,a.ILanguageFeaturesService),fe(2,l.ILanguageFeatureDebounceService),fe(3,R),fe(4,v.ICommandService),fe(5,E.INotificationService),fe(6,L.IInstantiationService)],A),e.InlayHintsController=A;function P(x){const W="\\xA0";return x.replace(/[ \\t]/g,W)}v.CommandsRegistry.registerCommand("_executeInlayHintProvider",(x,...W)=>Ee(void 0,void 0,void 0,function*(){const[U,O]=W;(0,h.assertType)(m.URI.isUri(U)),(0,h.assertType)(r.Range.isIRange(O));const{inlayHintsProvider:$}=x.get(a.ILanguageFeaturesService),Q=yield x.get(d.ITextModelService).createModelReference(U);try{const se=yield C.InlayHintsFragments.create($,Q.object.textEditorModel,[r.Range.lift(O)],D.CancellationToken.None),le=se.items.map(te=>te.hint);return setTimeout(()=>se.dispose(),0),le}finally{Q.dispose()}}))});var St=this&&this.__asyncValues||function(q){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=q[Symbol.asyncIterator],S;return e?e.call(q):(q=typeof __values=="function"?__values(q):q[Symbol.iterator](),S={},k("next"),k("throw"),k("return"),S[Symbol.asyncIterator]=function(){return this},S);function k(D){S[D]=q[D]&&function(w){return new Promise(function(b,_){w=q[D](w),y(b,_,w.done,w.value)})}}function y(D,w,b,_){Promise.resolve(_).then(function(h){D({value:h,done:b})},w)}};define(J[846],ee([1,0,12,68,13,39,93,38,61,324,233,342,27,47,19,627,17,300,16]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class l extends w.HoverForeignElementAnchor{constructor(u,C,f,v){super(10,C,u.item.anchor.range,f,v,!0),this.part=u}}let a=class extends m.MarkdownHoverParticipant{constructor(u,C,f,v,p,L){super(u,C,f,v,L),this._resolverService=p,this.hoverOrdinal=6}suggestHoverAnchor(u){var C;if(!n.InlayHintsController.get(this._editor)||u.target.type!==6)return null;const v=(C=u.target.detail.injectedText)===null||C===void 0?void 0:C.options;return v instanceof D.ModelDecorationInjectedTextOptions&&v.attachedData instanceof n.RenderedInlayHintLabelPart?new l(v.attachedData,this,u.event.posx,u.event.posy):null}computeSync(){return[]}computeAsync(u,C,f){return u instanceof l?new S.AsyncIterableObject(v=>Ee(this,void 0,void 0,function*(){var p,L,E,I;const{part:T}=u;if(yield T.item.resolve(f),f.isCancellationRequested)return;let F;typeof T.item.hint.tooltip=="string"?F=new k.MarkdownString().appendText(T.item.hint.tooltip):T.item.hint.tooltip&&(F=T.item.hint.tooltip),F&&v.emitOne(new m.MarkdownHover(this,u.range,[F],!1,0)),(0,o.isNonEmptyArray)(T.item.hint.textEdits)&&v.emitOne(new m.MarkdownHover(this,u.range,[new k.MarkdownString().appendText((0,r.localize)(0,null))],!1,10001));let R;if(typeof T.part.tooltip=="string"?R=new k.MarkdownString().appendText(T.part.tooltip):T.part.tooltip&&(R=T.part.tooltip),R&&v.emitOne(new m.MarkdownHover(this,u.range,[R],!1,1)),T.part.location||T.part.command){let x;const U=this._editor.getOption(75)==="altKey"?c.isMacintosh?(0,r.localize)(1,null):(0,r.localize)(2,null):c.isMacintosh?(0,r.localize)(3,null):(0,r.localize)(4,null);T.part.location&&T.part.command?x=new k.MarkdownString().appendText((0,r.localize)(5,null,U)):T.part.location?x=new k.MarkdownString().appendText((0,r.localize)(6,null,U)):T.part.command&&(x=new k.MarkdownString(`[${(0,r.localize)(7,null)}](${(0,g.asCommandLink)(T.part.command)} "${T.part.command.title}") (${U})`,{isTrusted:!0})),x&&v.emitOne(new m.MarkdownHover(this,u.range,[x],!1,1e4))}const M=yield this._resolveInlayHintLabelPartHover(T,f);try{for(var N=!0,A=St(M),P;P=yield A.next(),p=P.done,!p;){I=P.value,N=!1;try{const x=I;v.emitOne(x)}finally{N=!0}}}catch(x){L={error:x}}finally{try{!N&&!p&&(E=A.return)&&(yield E.call(A))}finally{if(L)throw L.error}}})):S.AsyncIterableObject.EMPTY}_resolveInlayHintLabelPartHover(u,C){return Ee(this,void 0,void 0,function*(){if(!u.part.location)return S.AsyncIterableObject.EMPTY;const{uri:f,range:v}=u.part.location,p=yield this._resolverService.createModelReference(f);try{const L=p.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(L)?(0,h.getHover)(this._languageFeaturesService.hoverProvider,L,new y.Position(v.startLineNumber,v.startColumn),C).filter(E=>!(0,k.isEmptyMarkdownString)(E.hover.contents)).map(E=>new m.MarkdownHover(this,u.item.anchor.range,E.hover.contents,!1,2+E.ordinal)):S.AsyncIterableObject.EMPTY}finally{p.dispose()}})}};a=Ne([fe(1,b.ILanguageService),fe(2,i.IOpenerService),fe(3,t.IConfigurationService),fe(4,_.ITextModelService),fe(5,s.ILanguageFeaturesService)],a),e.InlayHintsHover=a}),define(J[847],ee([1,0,15,93,342,846]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,S.registerEditorContribution)(y.InlayHintsController.ID,y.InlayHintsController,1),k.HoverParticipantRegistry.register(D.InlayHintsHover)}),define(J[343],ee([1,0,2,19,837,836,8,57,28,14,22,174,5,232,341,13,21,33,70,7,200]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollController=void 0;let d=class rn extends S.Disposable{constructor(C,f,v,p,L,E,I){super(),this._editor=C,this._contextMenuService=f,this._languageFeaturesService=v,this._instaService=p,this._contextKeyService=I,this._sessionStore=new S.DisposableStore,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._stickyScrollWidget=new y.StickyScrollWidget(this._editor),this._stickyLineCandidateProvider=new D.StickyLineCandidateProvider(this._editor,v,L),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new y.StickyScrollWidgetState([],0),this._readConfiguration(),this._register(this._editor.onDidChangeConfiguration(F=>{F.hasChanged(110)&&this._readConfiguration()})),this._register(l.addDisposableListener(this._stickyScrollWidget.getDomNode(),l.EventType.CONTEXT_MENU,F=>Ee(this,void 0,void 0,function*(){this._onContextMenu(F)}))),this._stickyScrollFocusedContextKey=m.EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=m.EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);const T=this._register(l.trackFocus(this._stickyScrollWidget.getDomNode()));this._register(T.onDidBlur(F=>{const R=this._stickyScrollWidget.getDomNode().clientHeight;this._positionRevealed===!1&&R===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(T.onDidFocus(F=>{this.focus()})),this._register(this._createClickLinkGesture()),this._register(l.addDisposableListener(this._stickyScrollWidget.getDomNode(),l.EventType.MOUSE_DOWN,F=>{this._onMouseDown=!0}))}static get(C){return C.getContribution(rn.ID)}_disposeFocusStickyScrollStore(){var C;this._stickyScrollFocusedContextKey.set(!1),(C=this._focusDisposableStore)===null||C===void 0||C.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}if(this._stickyScrollFocusedContextKey.get()===!0)return;this._focused=!0,this._focusDisposableStore=new S.DisposableStore,this._stickyScrollFocusedContextKey.set(!0);const f=this._stickyScrollWidget.getDomNode();f.lastElementChild.focus(),this._stickyElements=f.children,this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1}focusNext(){this._focusedStickyElementIndex<this._stickyElements.length-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(C){this._focusedStickyElementIndex=C?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyElements.item(this._focusedStickyElementIndex).focus()}goToFocused(){const C=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:C[this._focusedStickyElementIndex],column:1})}_revealPosition(C){this._positionRevealed=!0,this._editor.revealPosition(C),this._editor.setSelection(t.Range.fromPositions(C)),this._editor.focus()}_createClickLinkGesture(){const C=new S.DisposableStore,f=new S.DisposableStore;C.add(f);const v=new n.ClickLinkGesture(this._editor,!0);return C.add(v),C.add(v.onMouseMoveOrRelevantKeyDown(([p,L])=>{if(!this._editor.hasModel()||!p.hasTriggerModifier){f.clear();return}const E=p.target;if(E.detail===this._stickyScrollWidget.getId()&&E.element.innerText===E.element.innerHTML){const I=E.element.innerText;if(this._stickyScrollWidget.hoverOnColumn===-1)return;const T=this._stickyScrollWidget.hoverOnLine,F=this._stickyScrollWidget.hoverOnColumn,R=new t.Range(T,F,T,F+I.length);if(!R.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=R,f.clear();else if(E.element.style.textDecoration==="underline")return;const M=new c.CancellationTokenSource;f.add((0,S.toDisposable)(()=>M.dispose(!0)));let N;(0,i.getDefinitionsAtPosition)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new r.Position(T,F+1),M.token).then(A=>{if(!M.token.isCancellationRequested)if(A.length!==0){this._candidateDefinitionsLength=A.length;const P=E.element;N!==P?(f.clear(),N=P,N.style.textDecoration="underline",f.add((0,S.toDisposable)(()=>{N.style.textDecoration="none"}))):N||(N=P,N.style.textDecoration="underline",f.add((0,S.toDisposable)(()=>{N.style.textDecoration="none"})))}else f.clear()})}else f.clear()})),C.add(v.onCancel(()=>{f.clear()})),C.add(v.onExecute(p=>Ee(this,void 0,void 0,function*(){p.target.detail===this._stickyScrollWidget.getId()&&(p.hasTriggerModifier?(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:1})),this._instaService.invokeFunction(s.goToDefinitionWithLocation,p,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})):p.isRightClick||(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:this._stickyScrollWidget.hoverOnColumn})))}))),C}_onContextMenu(C){this._contextMenuService.showContextMenu({menuId:_.MenuId.StickyScrollContext,getAnchor:()=>C})}_readConfiguration(){const C=this._editor.getOption(110);if(C.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else C.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(()=>this._renderStickyScroll())),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(v=>this._onTokensChange(v))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>this._renderStickyScroll())),this._enabled=!0);this._editor.getOption(65).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>this._renderStickyScroll()))}_needsUpdate(C){const f=this._stickyScrollWidget.getCurrentLines();for(const v of f)for(const p of C.ranges)if(v>=p.fromLineNumber&&v<=p.toLineNumber)return!0;return!1}_onTokensChange(C){this._needsUpdate(C)&&this._renderStickyScroll()}_onDidResize(){const C=this._editor.getLayoutInfo(),f=C.width-C.minimap.minimapCanvasOuterWidth-C.verticalScrollbarWidth;this._stickyScrollWidget.getDomNode().style.width=`${f}px`;const v=C.height/this._editor.getOption(64);this._maxStickyLines=Math.round(v*.25)}_renderStickyScroll(){if(!this._editor.hasModel())return;const C=this._editor.getModel(),f=this._stickyLineCandidateProvider.getVersionId();if(f===void 0||f===C.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.lineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState);else if(this._stickyElements=this._stickyScrollWidget.getDomNode().children,this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyElements.length-1,this._focusedStickyElementIndex!==-1&&this._stickyElements.item(this._focusedStickyElementIndex).focus();else{const v=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyElements.length===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(v)||(this._focusedStickyElementIndex=this._stickyElements.length-1),this._stickyElements.item(this._focusedStickyElementIndex).focus())}}findScrollWidgetState(){const C=this._editor.getOption(64),f=Math.min(this._maxStickyLines,this._editor.getOption(110).maxLineCount),v=this._editor.getScrollTop();let p=0;const L=[],E=this._editor.getVisibleRanges();if(E.length!==0){const I=new a.StickyRange(E[0].startLineNumber,E[E.length-1].endLineNumber),T=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(I);for(const F of T){const R=F.startLineNumber,M=F.endLineNumber,N=F.nestingDepth;if(M-R>0){const A=(N-1)*C,P=N*C,x=this._editor.getBottomForLineNumber(R)-v,W=this._editor.getTopForLineNumber(M)-v,U=this._editor.getBottomForLineNumber(M)-v;if(A>W&&A<=U){L.push(R),p=U-P;break}else P>x&&P<=U&&L.push(R);if(L.length===f)break}}}return new y.StickyScrollWidgetState(L,p)}dispose(){super.dispose(),this._sessionStore.dispose()}};d.ID="store.contrib.stickyScrollController",d=Ne([fe(1,b.IContextMenuService),fe(2,k.ILanguageFeaturesService),fe(3,w.IInstantiationService),fe(4,g.ILanguageConfigurationService),fe(5,o.ILanguageFeatureDebounceService),fe(6,h.IContextKeyService)],d),e.StickyScrollController=d}),define(J[848],ee([1,0,15,648,689,28,27,14,22,343]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectEditor=e.GoToStickyScrollLine=e.SelectPreviousStickyScrollLine=e.SelectNextStickyScrollLine=e.FocusStickyScroll=e.ToggleStickyScroll=void 0;class m extends D.Action2{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:(0,k.localize)(0,null),mnemonicTitle:(0,k.localize)(1,null),original:"Toggle Sticky Scroll"},category:y.Categories.View,toggled:{condition:b.ContextKeyExpr.equals("config.editor.stickyScroll.enabled",!0),title:(0,k.localize)(2,null),mnemonicTitle:(0,k.localize)(3,null)},menu:[{id:D.MenuId.CommandPalette},{id:D.MenuId.MenubarViewMenu,group:"5_editor",order:2},{id:D.MenuId.StickyScrollContext}]})}run(o){return Ee(this,void 0,void 0,function*(){const l=o.get(w.IConfigurationService),a=!l.getValue("editor.stickyScroll.enabled");return l.updateValue("editor.stickyScroll.enabled",a)})}}e.ToggleStickyScroll=m;const n=100;class t extends S.EditorAction2{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:(0,k.localize)(4,null),mnemonicTitle:(0,k.localize)(5,null),original:"Focus Sticky Scroll"},precondition:b.ContextKeyExpr.and(b.ContextKeyExpr.has("config.editor.stickyScroll.enabled"),_.EditorContextKeys.stickyScrollVisible),menu:[{id:D.MenuId.CommandPalette}]})}runEditorCommand(o,l){var a;(a=h.StickyScrollController.get(l))===null||a===void 0||a.focus()}}e.FocusStickyScroll=t;class i extends S.EditorAction2{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:(0,k.localize)(6,null),original:"Select next sticky scroll line"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:n,primary:18}})}runEditorCommand(o,l){var a;(a=h.StickyScrollController.get(l))===null||a===void 0||a.focusNext()}}e.SelectNextStickyScrollLine=i;class s extends S.EditorAction2{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:(0,k.localize)(7,null),original:"Select previous sticky scroll line"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:n,primary:16}})}runEditorCommand(o,l){var a;(a=h.StickyScrollController.get(l))===null||a===void 0||a.focusPrevious()}}e.SelectPreviousStickyScrollLine=s;class r extends S.EditorAction2{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:(0,k.localize)(8,null),original:"Go to focused sticky scroll line"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:n,primary:3}})}runEditorCommand(o,l){var a;(a=h.StickyScrollController.get(l))===null||a===void 0||a.goToFocused()}}e.GoToStickyScrollLine=r;class c extends S.EditorAction2{constructor(){super({id:"editor.action.selectEditor",title:{value:(0,k.localize)(9,null),original:"Select Editor"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:n,primary:9}})}runEditorCommand(o,l){var a;(a=h.StickyScrollController.get(l))===null||a===void 0||a.selectEditor()}}e.SelectEditor=c}),define(J[849],ee([1,0,15,848,343,28]),function(q,e,S,k,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,S.registerEditorContribution)(y.StickyScrollController.ID,y.StickyScrollController,1),(0,D.registerAction2)(k.ToggleStickyScroll),(0,D.registerAction2)(k.FocusStickyScroll),(0,D.registerAction2)(k.SelectPreviousStickyScrollLine),(0,D.registerAction2)(k.SelectNextStickyScrollLine),(0,D.registerAction2)(k.GoToStickyScrollLine),(0,D.registerAction2)(k.SelectEditor)}),define(J[850],ee([1,0,15,30,338,27,14,8,43,83]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let m=class extends y.ReferencesController{constructor(t,i,s,r,c,g,o){super(!0,t,i,s,r,c,g,o)}};m=Ne([fe(1,w.IContextKeyService),fe(2,k.ICodeEditorService),fe(3,_.INotificationService),fe(4,b.IInstantiationService),fe(5,h.IStorageService),fe(6,D.IConfigurationService)],m),e.StandaloneReferencesController=m,(0,S.registerEditorContribution)(y.ReferencesController.ID,m,4)}),define(J[851],ee([1,0,11,2,49,102,686,148,51,43,182]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const n=!1;function t(C){return C.scheme===y.Schemas.file?C.fsPath:C.path}let i=0;class s{constructor(f,v,p,L,E,I,T){this.id=++i,this.type=0,this.actual=f,this.label=f.label,this.confirmBeforeUndo=f.confirmBeforeUndo||!1,this.resourceLabel=v,this.strResource=p,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=L,this.groupOrder=E,this.sourceId=I,this.sourceOrder=T,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 r{constructor(f,v){this.resourceLabel=f,this.reason=v}}class c{constructor(){this.elements=new Map}createMessage(){const f=[],v=[];for(const[,L]of this.elements)(L.reason===0?f:v).push(L.resourceLabel);const p=[];return f.length>0&&p.push(w.localize(0,null,f.join(", "))),v.length>0&&p.push(w.localize(1,null,v.join(", "))),p.join(`\n`)}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 g{constructor(f,v,p,L,E,I,T){this.id=++i,this.type=1,this.actual=f,this.label=f.label,this.confirmBeforeUndo=f.confirmBeforeUndo||!1,this.resourceLabels=v,this.strResources=p,this.groupId=L,this.groupOrder=E,this.sourceId=I,this.sourceOrder=T,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(f,v,p){this.removedResources||(this.removedResources=new c),this.removedResources.has(v)||this.removedResources.set(v,new r(f,p))}setValid(f,v,p){p?this.invalidatedResources&&(this.invalidatedResources.delete(v),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new c),this.invalidatedResources.has(v)||this.invalidatedResources.set(v,new r(f,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class o{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(){const 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(`\n`)}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 p of this._past)v(p.actual)&&this._setElementValidFlag(p,f);for(const p of this._future)v(p.actual)&&this._setElementValidFlag(p,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 p=0,L=this._past.length;p<L;p++)v.push(this._past[p].id);for(let p=this._future.length-1;p>=0;p--)v.push(this._future[p].id);return new m.ResourceEditStackSnapshot(f,v)}restoreSnapshot(f){const v=f.elements.length;let p=!0,L=0,E=-1;for(let T=0,F=this._past.length;T<F;T++,L++){const R=this._past[T];p&&(L>=v||R.id!==f.elements[L])&&(p=!1,E=0),!p&&R.type===1&&R.removeResource(this.resourceLabel,this.strResource,0)}let I=-1;for(let T=this._future.length-1;T>=0;T--,L++){const F=this._future[T];p&&(L>=v||F.id!==f.elements[L])&&(p=!1,I=T),!p&&F.type===1&&F.removeResource(this.resourceLabel,this.strResource,0)}E!==-1&&(this._past=this._past.slice(0,E)),I!==-1&&(this._future=this._future.slice(I+1)),this.versionId++}getElements(){const f=[],v=[];for(const p of this._past)f.push(p.actual);for(const p of this._future)v.push(p.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 p=this._past.length-1;p>=0;p--)if(this._past[p]===f){v.has(this.strResource)?this._past[p]=v.get(this.strResource):this._past.splice(p,1);break}this.versionId++}splitFutureWorkspaceElement(f,v){for(let p=this._future.length-1;p>=0;p--)if(this._future[p]===f){v.has(this.strResource)?this._future[p]=v.get(this.strResource):this._future.splice(p,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 l{constructor(f){this.editStacks=f,this._versionIds=[];for(let v=0,p=this.editStacks.length;v<p;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 a=new o("","");a.locked=!0;let d=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}: `);const v=[];for(const p of this._editStacks)v.push(p[1].toString());console.log(v.join(`\n`))}pushElement(f,v=m.UndoRedoGroup.None,p=m.UndoRedoSource.None){if(f.type===0){const L=t(f.resource),E=this.getUriComparisonKey(f.resource);this._pushElement(new s(f,L,E,v.id,v.nextOrder(),p.id,p.nextOrder()))}else{const L=new Set,E=[],I=[];for(const T of f.resources){const F=t(T),R=this.getUriComparisonKey(T);L.has(R)||(L.add(R),E.push(F),I.push(R))}E.length===1?this._pushElement(new s(f,E[0],I[0],v.id,v.nextOrder(),p.id,p.nextOrder())):this._pushElement(new g(f,E,I,v.id,v.nextOrder(),p.id,p.nextOrder()))}n&&this._print("pushElement")}_pushElement(f){for(let v=0,p=f.strResources.length;v<p;v++){const L=f.resourceLabels[v],E=f.strResources[v];let I;this._editStacks.has(E)?I=this._editStacks.get(E):(I=new o(L,E),this._editStacks.set(E,I)),I.pushElement(f)}}getLastElement(f){const v=this.getUriComparisonKey(f);if(this._editStacks.has(v)){const p=this._editStacks.get(v);if(p.hasFutureElements())return null;const L=p.getClosestPastElement();return L?L.actual:null}return null}_splitPastWorkspaceElement(f,v){const p=f.actual.split(),L=new Map;for(const E of p){const I=t(E.resource),T=this.getUriComparisonKey(E.resource),F=new s(E,I,T,0,0,0,0);L.set(F.strResource,F)}for(const E of f.strResources){if(v&&v.has(E))continue;this._editStacks.get(E).splitPastWorkspaceElement(f,L)}}_splitFutureWorkspaceElement(f,v){const p=f.actual.split(),L=new Map;for(const E of p){const I=t(E.resource),T=this.getUriComparisonKey(E.resource),F=new s(E,I,T,0,0,0,0);L.set(F.strResource,F)}for(const E of f.strResources){if(v&&v.has(E))continue;this._editStacks.get(E).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)),n&&this._print("removeElements")}setElementsValidFlag(f,v,p){const L=this.getUriComparisonKey(f);this._editStacks.has(L)&&this._editStacks.get(L).setElementsValidFlag(v,p),n&&this._print("setElementsValidFlag")}createSnapshot(f){const v=this.getUriComparisonKey(f);return this._editStacks.has(v)?this._editStacks.get(v).createSnapshot(f):new m.ResourceEditStackSnapshot(f,[])}restoreSnapshot(f){const v=this.getUriComparisonKey(f.resource);if(this._editStacks.has(v)){const p=this._editStacks.get(v);p.restoreSnapshot(f),!p.hasPastElements()&&!p.hasFutureElements()&&(p.dispose(),this._editStacks.delete(v))}n&&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,p=null;for(const[L,E]of this._editStacks){const I=E.getClosestPastElement();I&&I.sourceId===f&&(!v||I.sourceOrder>v.sourceOrder)&&(v=I,p=L)}return[v,p]}canUndo(f){if(f instanceof m.UndoRedoSource){const[,p]=this._findClosestUndoElementWithSource(f.id);return!!p}const v=this.getUriComparisonKey(f);return this._editStacks.has(v)?this._editStacks.get(v).hasPastElements():!1}_onError(f,v){(0,S.onUnexpectedError)(f);for(const p of v.strResources)this.removeElements(p);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,p,L,E){const I=this._acquireLocks(p);let T;try{T=v()}catch(F){return I(),L.dispose(),this._onError(F,f)}return T?T.then(()=>(I(),L.dispose(),E()),F=>(I(),L.dispose(),this._onError(F,f))):(I(),L.dispose(),E())}_invokeWorkspacePrepare(f){return Ee(this,void 0,void 0,function*(){if(typeof f.actual.prepareUndoRedo>"u")return k.Disposable.None;const v=f.actual.prepareUndoRedo();return typeof v>"u"?k.Disposable.None:v})}_invokeResourcePrepare(f,v){if(f.actual.type!==1||typeof f.actual.prepareUndoRedo>"u")return v(k.Disposable.None);const p=f.actual.prepareUndoRedo();return p?(0,k.isDisposable)(p)?v(p):p.then(L=>v(L)):v(k.Disposable.None)}_getAffectedEditStacks(f){const v=[];for(const p of f.strResources)v.push(this._editStacks.get(p)||a);return new l(v)}_tryToSplitAndUndo(f,v,p,L){if(v.canSplit())return this._splitPastWorkspaceElement(v,p),this._notificationService.warn(L),new u(this._undo(f,0,!0));for(const E of v.strResources)this.removeElements(E);return this._notificationService.warn(L),new u}_checkWorkspaceUndo(f,v,p,L){if(v.removedResources)return this._tryToSplitAndUndo(f,v,v.removedResources,w.localize(2,null,v.label,v.removedResources.createMessage()));if(L&&v.invalidatedResources)return this._tryToSplitAndUndo(f,v,v.invalidatedResources,w.localize(3,null,v.label,v.invalidatedResources.createMessage()));const E=[];for(const T of p.editStacks)T.getClosestPastElement()!==v&&E.push(T.resourceLabel);if(E.length>0)return this._tryToSplitAndUndo(f,v,null,w.localize(4,null,v.label,E.join(", ")));const I=[];for(const T of p.editStacks)T.locked&&I.push(T.resourceLabel);return I.length>0?this._tryToSplitAndUndo(f,v,null,w.localize(5,null,v.label,I.join(", "))):p.isValid()?null:this._tryToSplitAndUndo(f,v,null,w.localize(6,null,v.label))}_workspaceUndo(f,v,p){const L=this._getAffectedEditStacks(v),E=this._checkWorkspaceUndo(f,v,L,!1);return E?E.returnValue:this._confirmAndExecuteWorkspaceUndo(f,v,L,p)}_isPartOfUndoGroup(f){if(!f.groupId)return!1;for(const[,v]of this._editStacks){const p=v.getClosestPastElement();if(p){if(p===f){const L=v.getSecondClosestPastElement();if(L&&L.groupId===f.groupId)return!0}if(p.groupId===f.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(f,v,p,L){return Ee(this,void 0,void 0,function*(){if(v.canSplit()&&!this._isPartOfUndoGroup(v)){let T;(function(M){M[M.All=0]="All",M[M.This=1]="This",M[M.Cancel=2]="Cancel"})(T||(T={}));const{result:F}=yield this._dialogService.prompt({type:D.default.Info,message:w.localize(7,null,v.label),buttons:[{label:w.localize(8,null,p.editStacks.length),run:()=>T.All},{label:w.localize(9,null),run:()=>T.This}],cancelButton:{run:()=>T.Cancel}});if(F===T.Cancel)return;if(F===T.This)return this._splitPastWorkspaceElement(v,null),this._undo(f,0,!0);const R=this._checkWorkspaceUndo(f,v,p,!1);if(R)return R.returnValue;L=!0}let E;try{E=yield this._invokeWorkspacePrepare(v)}catch(T){return this._onError(T,v)}const I=this._checkWorkspaceUndo(f,v,p,!0);if(I)return E.dispose(),I.returnValue;for(const T of p.editStacks)T.moveBackward(v);return this._safeInvokeWithLocks(v,()=>v.actual.undo(),p,E,()=>this._continueUndoInGroup(v.groupId,L))})}_resourceUndo(f,v,p){if(!v.isValid){f.flushAllElements();return}if(f.locked){const L=w.localize(10,null,v.label);this._notificationService.warn(L);return}return this._invokeResourcePrepare(v,L=>(f.moveBackward(v),this._safeInvokeWithLocks(v,()=>v.actual.undo(),new l([f]),L,()=>this._continueUndoInGroup(v.groupId,p))))}_findClosestUndoElementInGroup(f){if(!f)return[null,null];let v=null,p=null;for(const[L,E]of this._editStacks){const I=E.getClosestPastElement();I&&I.groupId===f&&(!v||I.groupOrder>v.groupOrder)&&(v=I,p=L)}return[v,p]}_continueUndoInGroup(f,v){if(!f)return;const[,p]=this._findClosestUndoElementInGroup(f);if(p)return this._undo(p,0,v)}undo(f){if(f instanceof m.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,p){if(!this._editStacks.has(f))return;const L=this._editStacks.get(f),E=L.getClosestPastElement();if(!E)return;if(E.groupId){const[T,F]=this._findClosestUndoElementInGroup(E.groupId);if(E!==T&&F)return this._undo(F,v,p)}if((E.sourceId!==v||E.confirmBeforeUndo)&&!p)return this._confirmAndContinueUndo(f,v,E);try{return E.type===1?this._workspaceUndo(f,E,p):this._resourceUndo(L,E,p)}finally{n&&this._print("undo")}}_confirmAndContinueUndo(f,v,p){return Ee(this,void 0,void 0,function*(){if((yield this._dialogService.confirm({message:w.localize(11,null,p.label),primaryButton:w.localize(12,null),cancelButton:w.localize(13,null)})).confirmed)return this._undo(f,v,!0)})}_findClosestRedoElementWithSource(f){if(!f)return[null,null];let v=null,p=null;for(const[L,E]of this._editStacks){const I=E.getClosestFutureElement();I&&I.sourceId===f&&(!v||I.sourceOrder<v.sourceOrder)&&(v=I,p=L)}return[v,p]}canRedo(f){if(f instanceof m.UndoRedoSource){const[,p]=this._findClosestRedoElementWithSource(f.id);return!!p}const v=this.getUriComparisonKey(f);return this._editStacks.has(v)?this._editStacks.get(v).hasFutureElements():!1}_tryToSplitAndRedo(f,v,p,L){if(v.canSplit())return this._splitFutureWorkspaceElement(v,p),this._notificationService.warn(L),new u(this._redo(f));for(const E of v.strResources)this.removeElements(E);return this._notificationService.warn(L),new u}_checkWorkspaceRedo(f,v,p,L){if(v.removedResources)return this._tryToSplitAndRedo(f,v,v.removedResources,w.localize(14,null,v.label,v.removedResources.createMessage()));if(L&&v.invalidatedResources)return this._tryToSplitAndRedo(f,v,v.invalidatedResources,w.localize(15,null,v.label,v.invalidatedResources.createMessage()));const E=[];for(const T of p.editStacks)T.getClosestFutureElement()!==v&&E.push(T.resourceLabel);if(E.length>0)return this._tryToSplitAndRedo(f,v,null,w.localize(16,null,v.label,E.join(", ")));const I=[];for(const T of p.editStacks)T.locked&&I.push(T.resourceLabel);return I.length>0?this._tryToSplitAndRedo(f,v,null,w.localize(17,null,v.label,I.join(", "))):p.isValid()?null:this._tryToSplitAndRedo(f,v,null,w.localize(18,null,v.label))}_workspaceRedo(f,v){const p=this._getAffectedEditStacks(v),L=this._checkWorkspaceRedo(f,v,p,!1);return L?L.returnValue:this._executeWorkspaceRedo(f,v,p)}_executeWorkspaceRedo(f,v,p){return Ee(this,void 0,void 0,function*(){let L;try{L=yield this._invokeWorkspacePrepare(v)}catch(I){return this._onError(I,v)}const E=this._checkWorkspaceRedo(f,v,p,!0);if(E)return L.dispose(),E.returnValue;for(const I of p.editStacks)I.moveForward(v);return this._safeInvokeWithLocks(v,()=>v.actual.redo(),p,L,()=>this._continueRedoInGroup(v.groupId))})}_resourceRedo(f,v){if(!v.isValid){f.flushAllElements();return}if(f.locked){const p=w.localize(19,null,v.label);this._notificationService.warn(p);return}return this._invokeResourcePrepare(v,p=>(f.moveForward(v),this._safeInvokeWithLocks(v,()=>v.actual.redo(),new l([f]),p,()=>this._continueRedoInGroup(v.groupId))))}_findClosestRedoElementInGroup(f){if(!f)return[null,null];let v=null,p=null;for(const[L,E]of this._editStacks){const I=E.getClosestFutureElement();I&&I.groupId===f&&(!v||I.groupOrder<v.groupOrder)&&(v=I,p=L)}return[v,p]}_continueRedoInGroup(f){if(!f)return;const[,v]=this._findClosestRedoElementInGroup(f);if(v)return this._redo(v)}redo(f){if(f instanceof m.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))return;const v=this._editStacks.get(f),p=v.getClosestFutureElement();if(p){if(p.groupId){const[L,E]=this._findClosestRedoElementInGroup(p.groupId);if(p!==L&&E)return this._redo(E)}try{return p.type===1?this._workspaceRedo(f,p):this._resourceRedo(v,p)}finally{n&&this._print("redo")}}}};d=Ne([fe(0,b.IDialogService),fe(1,h.INotificationService)],d),e.UndoRedoService=d;class u{constructor(f){this.returnValue=f}}(0,_.registerSingleton)(m.IUndoRedoService,d,1)}),define(J[154],ee([1,0,687,87,185,20,8]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandaloneEditorWorkspace=e.STANDALONE_EDITOR_WORKSPACE_ID=e.WORKSPACE_FILTER=e.WORKSPACE_EXTENSION=e.WorkspaceFolder=e.Workspace=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.UNKNOWN_EMPTY_WINDOW_WORKSPACE=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isEmptyWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,w.createDecorator)("contextService");function b(s){const r=s;return typeof r?.id=="string"&&D.URI.isUri(r.uri)}e.isSingleFolderWorkspaceIdentifier=b;function _(s){const r=s;return typeof r?.id=="string"&&!b(s)&&!m(s)}e.isEmptyWorkspaceIdentifier=_,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"},e.UNKNOWN_EMPTY_WINDOW_WORKSPACE={id:"empty-window"};function h(s,r){if(typeof s=="string"||typeof s>"u")return typeof s=="string"?{id:(0,k.basename)(s)}:r?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:e.UNKNOWN_EMPTY_WINDOW_WORKSPACE;const c=s;return c.configuration?{id:c.id,configPath:c.configuration}:c.folders.length===1?{id:c.id,uri:c.folders[0].uri}:{id:c.id}}e.toWorkspaceIdentifier=h;function m(s){const r=s;return typeof r?.id=="string"&&D.URI.isUri(r.configPath)}e.isWorkspaceIdentifier=m;class n{constructor(r,c,g,o,l){this._id=r,this._transient=g,this._configuration=o,this._ignorePathCasing=l,this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=c}get folders(){return this._folders}set folders(r){this._folders=r,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(r){this._configuration=r}getFolder(r){return r&&this._foldersMap.findSubstr(r)||null}updateFoldersMap(){this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const r of this.folders)this._foldersMap.set(r.uri,r)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=n;class t{constructor(r,c){this.raw=c,this.uri=r.uri,this.index=r.index,this.name=r.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=t,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_FILTER=[{name:(0,S.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.STANDALONE_EDITOR_WORKSPACE_ID="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function i(s){return s.id===e.STANDALONE_EDITOR_WORKSPACE_ID}e.isStandaloneEditorWorkspace=i}),define(J[852],ee([1,0,7,143,41,2,17,15,22,600,28,14,57,36,27,154]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let c=class an{static get(l){return l.getContribution(an.ID)}constructor(l,a,d,u,C,f,v,p){this._contextMenuService=a,this._contextViewService=d,this._contextKeyService=u,this._keybindingService=C,this._menuService=f,this._configurationService=v,this._workspaceContextService=p,this._toDispose=new D.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=l,this._toDispose.add(this._editor.onContextMenu(L=>this._onContextMenu(L))),this._toDispose.add(this._editor.onMouseWheel(L=>{if(this._contextMenuIsBeingShownCount>0){const E=this._contextViewService.getContextViewElement(),I=L.srcElement;I.shadowRoot&&S.getShadowRoot(E)===I.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(L=>{this._editor.getOption(22)&&L.keyCode===58&&(L.preventDefault(),L.stopPropagation(),this.showContextMenu())}))}_onContextMenu(l){if(!this._editor.hasModel())return;if(!this._editor.getOption(22)){this._editor.focus(),l.target.position&&!this._editor.getSelection().containsPosition(l.target.position)&&this._editor.setPosition(l.target.position);return}if(l.target.type===12||l.target.type===6&&l.target.detail.injectedText)return;if(l.event.preventDefault(),l.event.stopPropagation(),l.target.type===11)return this._showScrollbarContextMenu({x:l.event.posx-1,width:2,y:l.event.posy-1,height:2});if(l.target.type!==6&&l.target.type!==7&&l.target.type!==1)return;if(this._editor.focus(),l.target.position){let d=!1;for(const u of this._editor.getSelections())if(u.containsPosition(l.target.position)){d=!0;break}d||this._editor.setPosition(l.target.position)}let a=null;l.target.type!==1&&(a={x:l.event.posx-1,width:2,y:l.event.posy-1,height:2}),this.showContextMenu(a)}showContextMenu(l){if(!this._editor.getOption(22)||!this._editor.hasModel())return;const a=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?m.MenuId.SimpleEditorContext:m.MenuId.EditorContext);a.length>0&&this._doShowContextMenu(a,l)}_getMenuActions(l,a){const d=[],u=this._menuService.createMenu(a,this._contextKeyService),C=u.getActions({arg:l.uri});u.dispose();for(const f of C){const[,v]=f;let p=0;for(const L of v)if(L instanceof m.SubmenuItemAction){const E=this._getMenuActions(l,L.item.submenu);E.length>0&&(d.push(new y.SubmenuAction(L.id,L.label,E)),p++)}else d.push(L),p++;p&&d.push(new y.Separator)}return d.length&&d.pop(),d}_doShowContextMenu(l,a=null){if(!this._editor.hasModel())return;const d=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!a){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const C=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),f=S.getDomNodePagePosition(this._editor.getDomNode()),v=f.left+C.left,p=f.top+C.top+C.height;a={x:v,y:p}}const u=this._editor.getOption(122)&&!w.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:u?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>l,getActionViewItem:C=>{const f=this._keybindingFor(C);if(f)return new k.ActionViewItem(C,C,{label:!0,keybinding:f.getLabel(),isMenu:!0});const v=C;return typeof v.getActionViewItem=="function"?v.getActionViewItem():new k.ActionViewItem(C,C,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:C=>this._keybindingFor(C),onHide:C=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:d})}})}_showScrollbarContextMenu(l){if(!this._editor.hasModel()||(0,r.isStandaloneEditorWorkspace)(this._workspaceContextService.getWorkspace()))return;const a=this._editor.getOption(70);let d=0;const u=L=>({id:`menu-action-${++d}`,label:L.label,tooltip:"",class:void 0,enabled:typeof L.enabled>"u"?!0:L.enabled,checked:L.checked,run:L.run}),C=(L,E)=>new y.SubmenuAction(`menu-action-${++d}`,L,E,void 0),f=(L,E,I,T,F)=>{if(!E)return u({label:L,enabled:E,run:()=>{}});const R=N=>()=>{this._configurationService.updateValue(I,N)},M=[];for(const N of F)M.push(u({label:N.label,checked:T===N.value,run:R(N.value)}));return C(L,M)},v=[];v.push(u({label:h.localize(0,null),checked:a.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!a.enabled)}})),v.push(new y.Separator),v.push(u({label:h.localize(1,null),enabled:a.enabled,checked:a.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!a.renderCharacters)}})),v.push(f(h.localize(2,null),a.enabled,"editor.minimap.size",a.size,[{label:h.localize(3,null),value:"proportional"},{label:h.localize(4,null),value:"fill"},{label:h.localize(5,null),value:"fit"}])),v.push(f(h.localize(6,null),a.enabled,"editor.minimap.showSlider",a.showSlider,[{label:h.localize(7,null),value:"mouseover"},{label:h.localize(8,null),value:"always"}]));const p=this._editor.getOption(122)&&!w.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:p?this._editor.getDomNode():void 0,getAnchor:()=>l,getActions:()=>v,onHide:L=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(l){return this._keybindingService.lookupKeybinding(l.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};c.ID="editor.contrib.contextmenu",c=Ne([fe(1,t.IContextMenuService),fe(2,t.IContextViewService),fe(3,n.IContextKeyService),fe(4,i.IKeybindingService),fe(5,m.IMenuService),fe(6,s.IConfigurationService),fe(7,r.IWorkspaceContextService)],c),e.ContextMenuController=c;class g extends b.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:h.localize(9,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(l,a){var d;(d=c.get(a))===null||d===void 0||d.showContextMenu()}}(0,b.registerEditorContribution)(c.ID,c,2),(0,b.registerEditorAction)(g)}),define(J[853],ee([1,0,12,186,2,101,42,20,314,15,147,5,19,97,94,604,71,154]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropIntoEditorController=void 0;let o=class extends y.Disposable{constructor(d,u,C,f,v){super(),this._bulkEditService=u,this._languageFeaturesService=C,this._progressService=f,this._register(d.onDropIntoEditor(p=>this.onDropIntoEditor(d,p.position,p.event))),this._languageFeaturesService.documentOnDropEditProvider.register("*",new l(v))}onDropIntoEditor(d,u,C){var f,v;return Ee(this,void 0,void 0,function*(){if(!C.dataTransfer||!d.hasModel())return;const p=d.getModel(),L=p.getVersionId(),E=yield this.extractDataTransferData(C);if(E.size===0||d.getModel().getVersionId()!==L)return;const I=new i.EditorStateCancellationTokenSource(d,1);try{const T=this._languageFeaturesService.documentOnDropEditProvider.ordered(p),F=yield this._progressService.withProgress({location:15,delay:750,title:(0,r.localize)(0,null),cancellable:!0},()=>(0,S.raceCancellation)((()=>Ee(this,void 0,void 0,function*(){for(const R of T){const M=yield R.provideDocumentOnDropEdits(p,u,E,I.token);if(I.token.isCancellationRequested)return;if(M)return M}}))(),I.token),()=>{I.cancel()});if(I.token.isCancellationRequested||d.getModel().getVersionId()!==L)return;if(F){const R=typeof F.insertText=="string"?s.SnippetParser.escape(F.insertText):F.insertText.snippet,M={edits:[new m.ResourceTextEdit(p.uri,{range:new n.Range(u.lineNumber,u.column,u.lineNumber,u.column),text:R,insertAsSnippet:!0}),...(v=(f=F.additionalEdit)===null||f===void 0?void 0:f.edits)!==null&&v!==void 0?v:[]]};d.focus(),yield this._bulkEditService.apply(M,{editor:d});return}}finally{I.dispose()}})}extractDataTransferData(d){return Ee(this,void 0,void 0,function*(){if(!d.dataTransfer)return new k.VSDataTransfer;const u=(0,_.toVSDataTransfer)(d.dataTransfer);return(0,_.addExternalEditorsDropData)(u,d),u})}};o.ID="editor.contrib.dropIntoEditorController",o=Ne([fe(1,m.IBulkEditService),fe(2,t.ILanguageFeaturesService),fe(3,c.IProgressService),fe(4,g.IWorkspaceContextService)],o),e.DropIntoEditorController=o;let l=class{constructor(d){this._workspaceContextService=d}provideDocumentOnDropEdits(d,u,C,f){var v;return Ee(this,void 0,void 0,function*(){const p=C.get(D.Mimes.uriList);if(p){const E=yield p.asString(),I=this.getUriListInsertText(E);if(I)return{insertText:I}}const L=(v=C.get("text"))!==null&&v!==void 0?v:C.get(D.Mimes.text);if(L)return{insertText:yield L.asString()}})}getUriListInsertText(d){const u=[];for(const C of k.UriList.parse(d))try{u.push(b.URI.parse(C))}catch{}if(u.length)return u.map(C=>{const f=this._workspaceContextService.getWorkspaceFolder(C);if(f){const v=(0,w.relativePath)(f.uri,C);if(v)return v}return C.fsPath}).join(" ")}};l=Ne([fe(0,g.IWorkspaceContextService)],l),(0,h.registerEditorContribution)(o.ID,o,2)}),define(J[854],ee([1,0,529,87,42,9,159,33,94,647,154]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomBasedVariableResolver=e.WorkspaceBasedVariableResolver=e.TimeBasedVariableResolver=e.CommentBasedVariableResolver=e.ClipboardBasedVariableResolver=e.ModelBasedVariableResolver=e.SelectionBasedVariableResolver=e.CompositeSnippetVariableResolver=e.KnownSnippetVariableNames=void 0,e.KnownSnippetVariableNames=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class n{constructor(a){this._delegates=a}resolve(a){for(const d of this._delegates){const u=d.resolve(a);if(u!==void 0)return u}}}e.CompositeSnippetVariableResolver=n;class t{constructor(a,d,u,C){this._model=a,this._selection=d,this._selectionIdx=u,this._overtypingCapturer=C}resolve(a){const{name:d}=a;if(d==="SELECTION"||d==="TM_SELECTED_TEXT"){let u=this._model.getValueInRange(this._selection)||void 0,C=this._selection.startLineNumber!==this._selection.endLineNumber;if(!u&&this._overtypingCapturer){const f=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);f&&(u=f.value,C=f.multiline)}if(u&&C&&a.snippet){const f=this._model.getLineContent(this._selection.startLineNumber),v=(0,D.getLeadingWhitespace)(f,0,this._selection.startColumn-1);let p=v;a.snippet.walk(E=>E===a?!1:(E instanceof _.Text&&(p=(0,D.getLeadingWhitespace)((0,D.splitLines)(E.value).pop())),!0));const L=(0,D.commonPrefixLength)(p,v);u=u.replace(/(\\r\\n|\\r|\\n)(.*)/g,(E,I,T)=>`${I}${p.substr(L)}${T}`)}return u}else{if(d==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(d==="TM_CURRENT_WORD"){const u=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return u&&u.word||void 0}else{if(d==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(d==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(d==="CURSOR_INDEX")return String(this._selectionIdx);if(d==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}e.SelectionBasedVariableResolver=t;class i{constructor(a,d){this._labelService=a,this._model=d}resolve(a){const{name:d}=a;if(d==="TM_FILENAME")return k.basename(this._model.uri.fsPath);if(d==="TM_FILENAME_BASE"){const u=k.basename(this._model.uri.fsPath),C=u.lastIndexOf(".");return C<=0?u:u.slice(0,C)}else{if(d==="TM_DIRECTORY")return k.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,y.dirname)(this._model.uri));if(d==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(d==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=i;class s{constructor(a,d,u,C){this._readClipboardText=a,this._selectionIdx=d,this._selectionCount=u,this._spread=C}resolve(a){if(a.name!=="CLIPBOARD")return;const d=this._readClipboardText();if(d){if(this._spread){const u=d.split(/\\r\\n|\\n|\\r/).filter(C=>!(0,D.isFalsyOrWhitespace)(C));if(u.length===this._selectionCount)return u[this._selectionIdx]}return d}}}e.ClipboardBasedVariableResolver=s;let r=class{constructor(a,d,u){this._model=a,this._selection=d,this._languageConfigurationService=u}resolve(a){const{name:d}=a,u=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),C=this._languageConfigurationService.getLanguageConfiguration(u).comments;if(C){if(d==="LINE_COMMENT")return C.lineCommentToken||void 0;if(d==="BLOCK_COMMENT_START")return C.blockCommentStartToken||void 0;if(d==="BLOCK_COMMENT_END")return C.blockCommentEndToken||void 0}}};r=Ne([fe(2,b.ILanguageConfigurationService)],r),e.CommentBasedVariableResolver=r;class c{constructor(){this._date=new Date}resolve(a){const{name:d}=a;if(d==="CURRENT_YEAR")return String(this._date.getFullYear());if(d==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(d==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(d==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(d==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(d==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(d==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(d==="CURRENT_DAY_NAME")return c.dayNames[this._date.getDay()];if(d==="CURRENT_DAY_NAME_SHORT")return c.dayNamesShort[this._date.getDay()];if(d==="CURRENT_MONTH_NAME")return c.monthNames[this._date.getMonth()];if(d==="CURRENT_MONTH_NAME_SHORT")return c.monthNamesShort[this._date.getMonth()];if(d==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}c.dayNames=[h.localize(0,null),h.localize(1,null),h.localize(2,null),h.localize(3,null),h.localize(4,null),h.localize(5,null),h.localize(6,null)],c.dayNamesShort=[h.localize(7,null),h.localize(8,null),h.localize(9,null),h.localize(10,null),h.localize(11,null),h.localize(12,null),h.localize(13,null)],c.monthNames=[h.localize(14,null),h.localize(15,null),h.localize(16,null),h.localize(17,null),h.localize(18,null),h.localize(19,null),h.localize(20,null),h.localize(21,null),h.localize(22,null),h.localize(23,null),h.localize(24,null),h.localize(25,null)],c.monthNamesShort=[h.localize(26,null),h.localize(27,null),h.localize(28,null),h.localize(29,null),h.localize(30,null),h.localize(31,null),h.localize(32,null),h.localize(33,null),h.localize(34,null),h.localize(35,null),h.localize(36,null),h.localize(37,null)],e.TimeBasedVariableResolver=c;class g{constructor(a){this._workspaceService=a}resolve(a){if(!this._workspaceService)return;const d=(0,m.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!(0,m.isEmptyWorkspaceIdentifier)(d)){if(a.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(d);if(a.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(d)}}_resolveWorkspaceName(a){if((0,m.isSingleFolderWorkspaceIdentifier)(a))return k.basename(a.uri.path);let d=k.basename(a.configPath.path);return d.endsWith(m.WORKSPACE_EXTENSION)&&(d=d.substr(0,d.length-m.WORKSPACE_EXTENSION.length-1)),d}_resoveWorkspacePath(a){if((0,m.isSingleFolderWorkspaceIdentifier)(a))return(0,S.normalizeDriveLetter)(a.uri.fsPath);const d=k.basename(a.configPath.path);let u=a.configPath.fsPath;return u.endsWith(d)&&(u=u.substr(0,u.length-d.length-1)),u?(0,S.normalizeDriveLetter)(u):"/"}}e.WorkspaceBasedVariableResolver=g;class o{resolve(a){const{name:d}=a;if(d==="RANDOM")return Math.random().toString().slice(-6);if(d==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(d==="UUID")return(0,w.generateUuid)()}}e.RandomBasedVariableResolver=o}),define(J[344],ee([1,0,16,2,9,64,5,23,33,39,149,154,94,854,426]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class s{constructor(o,l,a){this._editor=o,this._snippet=l,this._snippetLineLeadingWhitespace=a,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,S.groupBy)(l.placeholders,t.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}initialize(o){this._offset=o.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const o=this._editor.getModel();this._editor.changeDecorations(l=>{for(const a of this._snippet.placeholders){const d=this._snippet.offset(a),u=this._snippet.fullLen(a),C=w.Range.fromPositions(o.getPositionAt(this._offset+d),o.getPositionAt(this._offset+d+u)),f=a.isFinalTabstop?s._decor.inactiveFinal:s._decor.inactive,v=l.addDecoration(C,f);this._placeholderDecorations.set(a,v)}})}move(o){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const d=[];for(const u of this._placeholderGroups[this._placeholderGroupsIdx])if(u.transform){const C=this._placeholderDecorations.get(u),f=this._editor.getModel().getDecorationRange(C),v=this._editor.getModel().getValueInRange(f),p=u.transform.resolve(v).split(/\\r\\n|\\r|\\n/);for(let L=1;L<p.length;L++)p[L]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+p[L]);d.push(D.EditOperation.replace(f,p.join(this._editor.getModel().getEOL())))}d.length>0&&this._editor.executeEdits("snippet.placeholderTransform",d)}let l=!1;o===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,l=!0):o===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,l=!0);const a=this._editor.getModel().changeDecorations(d=>{const u=new Set,C=[];for(const f of this._placeholderGroups[this._placeholderGroupsIdx]){const v=this._placeholderDecorations.get(f),p=this._editor.getModel().getDecorationRange(v);C.push(new b.Selection(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn)),l=l&&this._hasPlaceholderBeenCollapsed(f),d.changeDecorationOptions(v,f.isFinalTabstop?s._decor.activeFinal:s._decor.active),u.add(f);for(const L of this._snippet.enclosingPlaceholders(f)){const E=this._placeholderDecorations.get(L);d.changeDecorationOptions(E,L.isFinalTabstop?s._decor.activeFinal:s._decor.active),u.add(L)}}for(const[f,v]of this._placeholderDecorations)u.has(f)||d.changeDecorationOptions(v,f.isFinalTabstop?s._decor.inactiveFinal:s._decor.inactive);return C});return l?this.move(o):a??[]}_hasPlaceholderBeenCollapsed(o){let l=o;for(;l;){if(l instanceof t.Placeholder){const a=this._placeholderDecorations.get(l);if(this._editor.getModel().getDecorationRange(a).isEmpty()&&l.toString().length>0)return!0}l=l.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}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[o]=this._snippet.placeholders;if(o.isFinalTabstop&&this._snippet.rightMostDescendant===o)return!0}return!1}computePossibleSelections(){const o=new Map;for(const l of this._placeholderGroups){let a;for(const d of l){if(d.isFinalTabstop)break;a||(a=[],o.set(d.index,a));const u=this._placeholderDecorations.get(d),C=this._editor.getModel().getDecorationRange(u);if(!C){o.delete(d.index);break}a.push(C)}}return o}get activeChoice(){if(!this._placeholderDecorations)return;const o=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!o?.choice)return;const l=this._placeholderDecorations.get(o);if(!l)return;const a=this._editor.getModel().getDecorationRange(l);if(a)return{range:a,choice:o.choice}}get hasChoice(){let o=!1;return this._snippet.walk(l=>(o=l instanceof t.Choice,!o)),o}merge(o){const l=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(a=>{for(const d of this._placeholderGroups[this._placeholderGroupsIdx]){const u=o.shift();console.assert(u._offset!==-1),console.assert(!u._placeholderDecorations);const C=u._snippet.placeholderInfo.last.index;for(const v of u._snippet.placeholderInfo.all)v.isFinalTabstop?v.index=d.index+(C+1)/this._nestingLevel:v.index=d.index+v.index/this._nestingLevel;this._snippet.replace(d,u._snippet.children);const f=this._placeholderDecorations.get(d);a.removeDecoration(f),this._placeholderDecorations.delete(d);for(const v of u._snippet.placeholders){const p=u._snippet.offset(v),L=u._snippet.fullLen(v),E=w.Range.fromPositions(l.getPositionAt(u._offset+p),l.getPositionAt(u._offset+p+L)),I=a.addDecoration(E,s._decor.inactive);this._placeholderDecorations.set(v,I)}}this._placeholderGroups=(0,S.groupBy)(this._snippet.placeholders,t.Placeholder.compareByIndex)})}}s._decor={active:h.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:h.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:h.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:h.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})},e.OneSnippet=s;const r={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let c=class Ct{static adjustWhitespace(o,l,a,d,u){const C=o.getLineContent(l.lineNumber),f=(0,y.getLeadingWhitespace)(C,0,l.column-1);let v;return d.walk(p=>{if(!(p instanceof t.Text)||p.parent instanceof t.Choice||u&&!u.has(p))return!0;const L=p.value.split(/\\r\\n|\\r|\\n/);if(a){const I=d.offset(p);if(I===0)L[0]=o.normalizeIndentation(L[0]);else{v=v??d.toString();const T=v.charCodeAt(I-1);(T===10||T===13)&&(L[0]=o.normalizeIndentation(f+L[0]))}for(let T=1;T<L.length;T++)L[T]=o.normalizeIndentation(f+L[T])}const E=L.join(o.getEOL());return E!==p.value&&(p.parent.replace(p,[new t.Text(E)]),v=void 0),!0}),f}static adjustSelection(o,l,a,d){if(a!==0||d!==0){const{positionLineNumber:u,positionColumn:C}=l,f=C-a,v=C+d,p=o.validateRange({startLineNumber:u,startColumn:f,endLineNumber:u,endColumn:v});l=b.Selection.createWithDirection(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn,l.getDirection())}return l}static createEditsAndSnippetsFromSelections(o,l,a,d,u,C,f,v,p){const L=[],E=[];if(!o.hasModel())return{edits:L,snippets:E};const I=o.getModel(),T=o.invokeWithinContext(x=>x.get(n.IWorkspaceContextService)),F=o.invokeWithinContext(x=>new i.ModelBasedVariableResolver(x.get(m.ILabelService),I)),R=()=>f,M=I.getValueInRange(Ct.adjustSelection(I,o.getSelection(),a,0)),N=I.getValueInRange(Ct.adjustSelection(I,o.getSelection(),0,d)),A=I.getLineFirstNonWhitespaceColumn(o.getSelection().positionLineNumber),P=o.getSelections().map((x,W)=>({selection:x,idx:W})).sort((x,W)=>w.Range.compareRangesUsingStarts(x.selection,W.selection));for(const{selection:x,idx:W}of P){let U=Ct.adjustSelection(I,x,a,0),O=Ct.adjustSelection(I,x,0,d);M!==I.getValueInRange(U)&&(U=x),N!==I.getValueInRange(O)&&(O=x);const $=x.setStartPosition(U.startLineNumber,U.startColumn).setEndPosition(O.endLineNumber,O.endColumn),Q=new t.SnippetParser().parse(l,!0,u),se=$.getStartPosition(),le=Ct.adjustWhitespace(I,se,C||W>0&&A!==I.getLineFirstNonWhitespaceColumn(x.positionLineNumber),Q);Q.resolveVariables(new i.CompositeSnippetVariableResolver([F,new i.ClipboardBasedVariableResolver(R,W,P.length,o.getOption(76)==="spread"),new i.SelectionBasedVariableResolver(I,x,W,v),new i.CommentBasedVariableResolver(I,x,p),new i.TimeBasedVariableResolver,new i.WorkspaceBasedVariableResolver(T),new i.RandomBasedVariableResolver])),L[W]=D.EditOperation.replace($,Q.toString()),L[W].identifier={major:W,minor:0},L[W]._isTracked=!0,E[W]=new s(o,Q,le)}return{edits:L,snippets:E}}static createEditsAndSnippetsFromEdits(o,l,a,d,u,C,f){if(!o.hasModel()||l.length===0)return{edits:[],snippets:[]};const v=[],p=o.getModel(),L=new t.SnippetParser,E=new t.TextmateSnippet,I=new i.CompositeSnippetVariableResolver([o.invokeWithinContext(F=>new i.ModelBasedVariableResolver(F.get(m.ILabelService),p)),new i.ClipboardBasedVariableResolver(()=>u,0,o.getSelections().length,o.getOption(76)==="spread"),new i.SelectionBasedVariableResolver(p,o.getSelection(),0,C),new i.CommentBasedVariableResolver(p,o.getSelection(),f),new i.TimeBasedVariableResolver,new i.WorkspaceBasedVariableResolver(o.invokeWithinContext(F=>F.get(n.IWorkspaceContextService))),new i.RandomBasedVariableResolver]);l=l.sort((F,R)=>w.Range.compareRangesUsingStarts(F.range,R.range));let T=0;for(let F=0;F<l.length;F++){const{range:R,template:M}=l[F];if(F>0){const W=l[F-1].range,U=w.Range.fromPositions(W.getEndPosition(),R.getStartPosition()),O=new t.Text(p.getValueInRange(U));E.appendChild(O),T+=O.value.length}const N=L.parseFragment(M,E);Ct.adjustWhitespace(p,R.getStartPosition(),!0,E,new Set(N)),E.resolveVariables(I);const A=E.toString(),P=A.slice(T);T=A.length;const x=D.EditOperation.replace(R,P);x.identifier={major:F,minor:0},x._isTracked=!0,v.push(x)}return L.ensureFinalTabstop(E,a,!0),{edits:v,snippets:[new s(o,E,"")]}}constructor(o,l,a=r,d){this._editor=o,this._template=l,this._options=a,this._languageConfigurationService=d,this._templateMerges=[],this._snippets=[]}dispose(){(0,k.dispose)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:o,snippets:l}=typeof this._template=="string"?Ct.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Ct.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=l,this._editor.executeEdits("snippet",o,a=>{const d=a.filter(u=>!!u.identifier);for(let u=0;u<l.length;u++)l[u].initialize(d[u].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):d.map(u=>b.Selection.fromPositions(u.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(o,l=r){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,o]);const{edits:a,snippets:d}=Ct.createEditsAndSnippetsFromSelections(this._editor,o,l.overwriteBefore,l.overwriteAfter,!0,l.adjustWhitespace,l.clipboardText,l.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",a,u=>{const C=u.filter(v=>!!v.identifier);for(let v=0;v<d.length;v++)d[v].initialize(C[v].textChange);const f=d[0].isTrivialSnippet;if(!f){for(const v of this._snippets)v.merge(d);console.assert(d.length===0)}return this._snippets[0].hasPlaceholder&&!f?this._move(void 0):C.map(v=>b.Selection.fromPositions(v.range.getEndPosition()))})}next(){const o=this._move(!0);this._editor.setSelections(o),this._editor.revealPositionInCenterIfOutsideViewport(o[0].getPosition())}prev(){const o=this._move(!1);this._editor.setSelections(o),this._editor.revealPositionInCenterIfOutsideViewport(o[0].getPosition())}_move(o){const l=[];for(const a of this._snippets){const d=a.move(o);l.push(...d)}return l}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const o=this._editor.getSelections();if(o.length<this._snippets.length)return!1;const l=new Map;for(const a of this._snippets){const d=a.computePossibleSelections();if(l.size===0)for(const[u,C]of d){C.sort(w.Range.compareRangesUsingStarts);for(const f of o)if(C[0].containsRange(f)){l.set(u,[]);break}}if(l.size===0)return!1;l.forEach((u,C)=>{u.push(...d.get(C))})}o.sort(w.Range.compareRangesUsingStarts);for(const[a,d]of l){if(d.length!==o.length){l.delete(a);continue}d.sort(w.Range.compareRangesUsingStarts);for(let u=0;u<d.length;u++)if(!d[u].containsRange(o[u])){l.delete(a);continue}}return l.size>0}};c=Ne([fe(3,_.ILanguageConfigurationService)],c),e.SnippetSession=c}),define(J[239],ee([1,0,2,18,15,13,22,33,19,125,646,14,62,344]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const s={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let r=class Vt{static get(o){return o.getContribution(Vt.ID)}constructor(o,l,a,d,u){this._editor=o,this._logService=l,this._languageFeaturesService=a,this._languageConfigurationService=u,this._snippetListener=new S.DisposableStore,this._modelVersionId=-1,this._inSnippet=Vt.InSnippetMode.bindTo(d),this._hasNextTabstop=Vt.HasNextTabstop.bindTo(d),this._hasPrevTabstop=Vt.HasPrevTabstop.bindTo(d)}dispose(){var o;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(o=this._session)===null||o===void 0||o.dispose(),this._snippetListener.dispose()}insert(o,l){try{this._doInsert(o,typeof l>"u"?s:Object.assign(Object.assign({},s),l))}catch(a){this.cancel(),this._logService.error(a),this._logService.error("snippet_error"),this._logService.error("insert_template=",o),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(o,l){var a;if(this._editor.hasModel()){if(this._snippetListener.clear(),l.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof o!="string"&&this.cancel(),this._session?((0,k.assertType)(typeof o=="string"),this._session.merge(o,l)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new i.SnippetSession(this._editor,o,l,this._languageConfigurationService),this._session.insert()),l.undoStopAfter&&this._editor.getModel().pushStackElement(),!((a=this._session)===null||a===void 0)&&a.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(u,C)=>{if(!this._session||u!==this._editor.getModel()||!D.Position.equals(this._editor.getPosition(),C))return;const{activeChoice:f}=this._session;if(!f||f.choice.options.length===0)return;const v=u.getValueInRange(f.range),p=!!f.choice.options.find(E=>E.value===v),L=[];for(let E=0;E<f.choice.options.length;E++){const I=f.choice.options[E];L.push({kind:13,label:I.value,insertText:I.value,sortText:"a".repeat(E+1),range:f.range,filterText:p?`${v}_${I.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,m.localize)(3,null)}})}return{suggestions:L}}};const d=this._languageFeaturesService.completionProvider.register({language:this._editor.getModel().getLanguageId(),pattern:this._editor.getModel().uri.fsPath,scheme:this._editor.getModel().uri.scheme,exclusive:!0},this._choiceCompletionItemProvider);this._snippetListener.add(d)}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(d=>d.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._editor.getModel().pushStackElement(),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{activeChoice:o}=this._session;if(!o||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==o.choice&&(this._currentChoice=o.choice,queueMicrotask(()=>{(0,h.showSimpleSuggestions)(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(o=!1){var l;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(l=this._session)===null||l===void 0||l.dispose(),this._session=void 0,this._modelVersionId=-1,o&&this._editor.setSelections([this._editor.getSelection()])}prev(){var o;(o=this._session)===null||o===void 0||o.prev(),this._updateState()}next(){var o;(o=this._session)===null||o===void 0||o.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};r.ID="snippetController2",r.InSnippetMode=new n.RawContextKey("inSnippetMode",!1,(0,m.localize)(0,null)),r.HasNextTabstop=new n.RawContextKey("hasNextTabstop",!1,(0,m.localize)(1,null)),r.HasPrevTabstop=new n.RawContextKey("hasPrevTabstop",!1,(0,m.localize)(2,null)),r=Ne([fe(1,t.ILogService),fe(2,_.ILanguageFeaturesService),fe(3,n.IContextKeyService),fe(4,b.ILanguageConfigurationService)],r),e.SnippetController2=r,(0,y.registerEditorContribution)(r.ID,r,4);const c=y.EditorCommand.bindToContribution(r.get);(0,y.registerEditorCommand)(new c({id:"jumpToNextSnippetPlaceholder",precondition:n.ContextKeyExpr.and(r.InSnippetMode,r.HasNextTabstop),handler:g=>g.next(),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:2}})),(0,y.registerEditorCommand)(new c({id:"jumpToPrevSnippetPlaceholder",precondition:n.ContextKeyExpr.and(r.InSnippetMode,r.HasPrevTabstop),handler:g=>g.prev(),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:1026}})),(0,y.registerEditorCommand)(new c({id:"leaveSnippet",precondition:r.InSnippetMode,handler:g=>g.cancel(!0),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),(0,y.registerEditorCommand)(new c({id:"acceptSnippet",precondition:r.InSnippetMode,handler:g=>g.finish()}))}),define(J[345],ee([1,0,84,12,21,11,6,63,2,180,64,13,5,26,33,473,70,19,198,175,220,237,199,239,94,25,27]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideInlineCompletions=e.SynchronizedInlineCompletionsCache=e.UpdateOperation=e.InlineCompletionsSession=e.InlineCompletionsModel=void 0;let L=class extends _.Disposable{constructor(P,x,W,U,O,$,Q){super(),this.editor=P,this.cache=x,this.commandService=W,this.languageConfigurationService=U,this.languageFeaturesService=O,this.debounceService=$,this.onDidChangeEmitter=new w.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new _.MutableDisposable),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(W.onDidExecuteCommand(se=>{new Set([h.CoreEditingCommands.Tab.id,h.CoreEditingCommands.DeleteLeft.id,h.CoreEditingCommands.DeleteRight.id,o.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(se.commandId)&&P.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(se=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(se=>{(se.reason===3||this.session&&!this.session.isValid)&&this.hide()})),this._register((0,_.toDisposable)(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{Q.getValue("editor.inlineSuggest.hideOnBlur")||d.InlineSuggestionHintsContentWidget.dropDownVisible||this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var P;return(P=this.session)===null||P===void 0?void 0:P.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(P){var x;(x=this.session)===null||x===void 0||x.setExpanded(P)}setActive(P){var x;this.active=P,P&&((x=this.session)===null||x===void 0||x.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(60).enabled&&(this.session&&this.session.isValid||this.trigger(i.InlineCompletionTriggerKind.Automatic))}trigger(P){if(this.completionSession.value){P===i.InlineCompletionTriggerKind.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new E(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,P,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.value&&(this.completionSession.clear(),this.onDidChangeEmitter.fire())}commitCurrentSuggestion(){var P;(P=this.session)===null||P===void 0||P.commitCurrentCompletion()}commitCurrentSuggestionPartially(){var P;(P=this.session)===null||P===void 0||P.commitCurrentCompletionNextWord()}showNext(){var P;(P=this.session)===null||P===void 0||P.showNextInlineCompletion()}showPrevious(){var P;(P=this.session)===null||P===void 0||P.showPreviousInlineCompletion()}};L=Ne([fe(2,v.ICommandService),fe(3,s.ILanguageConfigurationService),fe(4,g.ILanguageFeaturesService),fe(5,c.ILanguageFeatureDebounceService),fe(6,p.IConfigurationService)],L),e.InlineCompletionsModel=L;class E extends l.BaseGhostTextWidgetModel{constructor(P,x,W,U,O,$,Q,se,le){super(P),this.triggerPosition=x,this.shouldUpdate=W,this.commandService=U,this.cache=O,this.initialTriggerKind=$,this.languageConfigurationService=Q,this.registry=se,this.debounce=le,this.minReservedLineCount=0,this.updateOperation=this._register(new _.MutableDisposable),this.updateSoon=this._register(new k.RunOnceScheduler(()=>{const re=this.initialTriggerKind;return this.initialTriggerKind=i.InlineCompletionTriggerKind.Automatic,this.update(re)},50)),this.filteredCompletions=[],this.currentlySelectedCompletionId=void 0;let te;this._register(this.onDidChange(()=>{var re;const H=this.currentCompletion;if(H&&H.sourceInlineCompletion!==te){te=H.sourceInlineCompletion;const B=H.sourceProvider;(re=B.handleItemDidShow)===null||re===void 0||re.call(B,H.sourceInlineCompletions,te)}})),this._register((0,_.toDisposable)(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(re=>{var H;re.reason!==3&&((H=this.cache.value)===null||H===void 0||H.updateRanges(),this.cache.value&&(this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire()))})),this._register(this.editor.onDidChangeModelContent(re=>{var H;(H=this.cache.value)===null||H===void 0||H.updateRanges(),this.updateFilteredInlineCompletions(),this.scheduleAutomaticUpdate()})),this._register(this.registry.onDidChange(()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))})),this.scheduleAutomaticUpdate()}updateFilteredInlineCompletions(){if(!this.cache.value){this.filteredCompletions=[];return}const P=this.editor.getModel(),x=P.validatePosition(this.editor.getPosition());this.filteredCompletions=this.cache.value.completions.filter(W=>{const U=P.getValueInRange(W.synchronizedRange).toLowerCase(),O=W.inlineCompletion.filterText.toLowerCase(),$=P.getLineIndentColumn(W.synchronizedRange.startLineNumber),Q=Math.max(0,x.column-W.synchronizedRange.startColumn);let se=O.substring(0,Q),le=O.substring(Q),te=U.substring(0,Q),re=U.substring(Q);return W.synchronizedRange.startColumn<=$&&(te=te.trimStart(),te.length===0&&(re=re.trimStart()),se=se.trimStart(),se.length===0&&(le=le.trimStart())),se.startsWith(te)&&(0,b.matchesSubString)(re,le)})}get currentlySelectedIndex(){return this.fixAndGetIndexOfCurrentSelection()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const P=this.filteredCompletions.findIndex(x=>x.semanticId===this.currentlySelectedCompletionId);return P===-1?(this.currentlySelectedCompletionId=void 0,0):P}get currentCachedCompletion(){if(this.cache.value)return this.filteredCompletions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){return Ee(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const P=this.filteredCompletions||[];if(P.length>0){const x=(this.fixAndGetIndexOfCurrentSelection()+1)%P.length;this.currentlySelectedCompletionId=P[x].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){return Ee(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const P=this.filteredCompletions||[];if(P.length>0){const x=(this.fixAndGetIndexOfCurrentSelection()+P.length-1)%P.length;this.currentlySelectedCompletionId=P[x].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}get hasBeenTriggeredExplicitly(){var P;return((P=this.cache.value)===null||P===void 0?void 0:P.triggerKind)===i.InlineCompletionTriggerKind.Explicit}ensureUpdateWithExplicitContext(){var P;return Ee(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===i.InlineCompletionTriggerKind.Explicit?yield this.updateOperation.value.promise:yield this.update(i.InlineCompletionTriggerKind.Explicit):((P=this.cache.value)===null||P===void 0?void 0:P.triggerKind)!==i.InlineCompletionTriggerKind.Explicit&&(yield this.update(i.InlineCompletionTriggerKind.Explicit))})}getInlineCompletionsCountSync(){return this.filteredCompletions.length||0}get ghostText(){const P=this.currentCompletion;if(!P)return;const x=this.editor.getPosition();if(P.range.getEndPosition().isBefore(x))return;const W=this.editor.getOptions().get(60).mode,U=(0,a.inlineCompletionToGhostText)(P,this.editor.getModel(),W,x);return U?U.isEmpty()?void 0:U:new l.GhostTextReplacement(P.range.startLineNumber,P.range.startColumn,P.range.endColumn-P.range.startColumn,P.insertText.split(`\n`),0)}get currentCompletion(){const P=this.currentCachedCompletion;if(P)return P.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(P){return Ee(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const x=this.editor.getPosition(),W=new Date,U=(0,k.createCancelablePromise)($=>Ee(this,void 0,void 0,function*(){let Q;try{Q=yield R(this.registry,x,this.editor.getModel(),{triggerKind:P,selectedSuggestionInfo:void 0},$,this.languageConfigurationService);const se=new Date;this.editor.hasModel()&&this.debounce.update(this.editor.getModel(),se.getTime()-W.getTime())}catch(se){(0,D.onUnexpectedError)(se);return}$.isCancellationRequested||(this.cache.setValue(this.editor,Q,P),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})),O=new I(U,P);this.updateOperation.value=O,yield U,this.updateOperation.value===O&&this.updateOperation.clear()})}takeOwnership(P){this._register(P)}commitCurrentCompletionNextWord(){const P=this.ghostText;if(!P)return;const x=this.currentCompletion;if(!x)return;if(x.snippetInfo||x.filterText!==x.insertText){this.commit(x);return}if(P.parts.length===0)return;const W=P.parts[0],U=new n.Position(P.lineNumber,W.column),O=W.lines[0],$=this.editor.getModel().getLanguageIdAtPosition(P.lineNumber,1),Q=this.languageConfigurationService.getLanguageConfiguration($),se=new RegExp(Q.wordDefinition.source,Q.wordDefinition.flags.replace("g","")),le=O.match(se);let te=0;le&&le.index!==void 0?le.index===0?te=le[0].length:te=le.index:te=O.length;const re=/\\s/g;let H=re.exec(O);H&&H.index===0&&(H=re.exec(O)),H&&H.index!==void 0&&H.index<te&&(te=H.index);const B=O.substring(0,te);if(this.editor.pushUndoStop(),this.editor.executeEdits("inlineSuggestion.accept",[m.EditOperation.replace(t.Range.fromPositions(U),B)]),this.editor.setPosition(U.delta(0,B.length)),x.sourceProvider.handlePartialAccept){const j=t.Range.fromPositions(x.range.getStartPosition(),U.delta(0,te)),G=this.editor.getModel().getValueInRange(j);x.sourceProvider.handlePartialAccept(x.sourceInlineCompletions,x.sourceInlineCompletion,G.length)}}commitCurrentCompletion(){if(!this.ghostText)return;const x=this.currentCompletion;x&&this.commit(x)}commit(P){var x;const W=this.cache.clearAndLeak();this.editor.pushUndoStop(),P.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[m.EditOperation.replaceMove(P.range,""),...P.additionalTextEdits]),this.editor.setPosition(P.snippetInfo.range.getStartPosition()),(x=C.SnippetController2.get(this.editor))===null||x===void 0||x.insert(P.snippetInfo.snippet,{undoStopBefore:!1})):this.editor.executeEdits("inlineSuggestion.accept",[m.EditOperation.replaceMove(P.range,P.insertText),...P.additionalTextEdits]),P.command?this.commandService.executeCommand(P.command.id,...P.command.arguments||[]).finally(()=>{W?.dispose()}).then(void 0,D.onUnexpectedExternalError):W?.dispose(),this.onDidChangeEmitter.fire()}get commands(){var P;return[...new Set(((P=this.cache.value)===null||P===void 0?void 0:P.completions.map(W=>W.inlineCompletion.sourceInlineCompletions))||[])].flatMap(W=>W.commands||[])}}e.InlineCompletionsSession=E;class I{constructor(P,x){this.promise=P,this.triggerKind=x}dispose(){this.promise.cancel()}}e.UpdateOperation=I;class T extends _.Disposable{constructor(P,x,W,U){super(),this.editor=x,this.onChange=W,this.triggerKind=U,this.isDisposing=!1;const O=x.changeDecorations($=>$.deltaDecorations([],P.items.map(Q=>({range:Q.range,options:{description:"inline-completion-tracking-range"}}))));this._register((0,_.toDisposable)(()=>{this.isDisposing=!0,x.removeDecorations(O)})),this.completions=P.items.map(($,Q)=>new F($,O[Q])),this._register(x.onDidChangeModelContent(()=>{this.updateRanges()})),this._register(P)}updateRanges(){if(this.isDisposing)return;let P=!1;const x=this.editor.getModel();for(const W of this.completions){const U=x.getDecorationRange(W.decorationId);U&&(W.synchronizedRange.equalsRange(U)||(P=!0,W.synchronizedRange=U))}P&&this.onChange()}}e.SynchronizedInlineCompletionsCache=T;class F{constructor(P,x){this.inlineCompletion=P,this.decorationId=x,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertText,abbreviation:this.inlineCompletion.filterText,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=P.range}toLiveInlineCompletion(){return{insertText:this.inlineCompletion.insertText,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion,snippetInfo:this.inlineCompletion.snippetInfo,filterText:this.inlineCompletion.filterText,additionalTextEdits:this.inlineCompletion.additionalTextEdits}}}function R(A,P,x,W,U=y.CancellationToken.None,O){return Ee(this,void 0,void 0,function*(){const $=M(P,x),Q=A.all(x),se=yield Promise.all(Q.map(te=>Ee(this,void 0,void 0,function*(){const re=yield Promise.resolve(te.provideInlineCompletions(x,P,W,U)).catch(D.onUnexpectedExternalError);return{completions:re,provider:te,dispose:()=>{re&&te.freeInlineCompletions(re)}}}))),le=new Map;for(const te of se){const re=te.completions;if(re)for(const H of re.items){let B=H.range?t.Range.lift(H.range):$;if(B.startLineNumber!==B.endLineNumber)continue;let j,G;if(typeof H.insertText=="string"){if(j=H.insertText,O&&H.completeBracketPairs){j=N(j,B.getStartPosition(),x,O);const ne=j.length-H.insertText.length;ne!==0&&(B=new t.Range(B.startLineNumber,B.startColumn,B.endLineNumber,B.endColumn+ne))}G=void 0}else if("snippet"in H.insertText){const ne=H.insertText.snippet.length;if(O&&H.completeBracketPairs){H.insertText.snippet=N(H.insertText.snippet,B.getStartPosition(),x,O);const he=H.insertText.snippet.length-ne;he!==0&&(B=new t.Range(B.startLineNumber,B.startColumn,B.endLineNumber,B.endColumn+he))}const de=new f.SnippetParser().parse(H.insertText.snippet);de.children.length===1&&de.children[0]instanceof f.Text?(j=de.children[0].value,G=void 0):(j=de.toString(),G={snippet:H.insertText.snippet,range:B})}else(0,S.assertNever)(H.insertText);const Y={insertText:j,snippetInfo:G,range:B,command:H.command,sourceProvider:te.provider,sourceInlineCompletions:re,sourceInlineCompletion:H,filterText:H.filterText||j,additionalTextEdits:H.additionalTextEdits||(0,u.getReadonlyEmptyArray)()};le.set(JSON.stringify({insertText:j,range:H.range}),Y)}}return{items:[...le.values()],dispose:()=>{for(const te of se)te.dispose()}}})}e.provideInlineCompletions=R;function M(A,P){const x=P.getWordAtPosition(A),W=P.getLineMaxColumn(A.lineNumber);return x?new t.Range(A.lineNumber,x.startColumn,A.lineNumber,W):t.Range.fromPositions(A,A.with(void 0,W))}function N(A,P,x,W){const O=x.getLineContent(P.lineNumber).substring(0,P.column-1)+A,$=x.tokenization.tokenizeLineWithEdit(P,O.length-(P.column-1),A),Q=$?.sliceAndInflate(P.column-1,O.length,0);return Q?(0,r.fixBracketsInLine)(Q,W):A}}),define(J[346],ee([1,0,50,16,12,21,11,6,112,2,17,60,18,114,15,64,13,5,22,239,94,320,702,650,25,14,8,62,125,701,509,761,510,838,79,42,133]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T,F,R,M,N,A,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;const x=!1;class W{constructor(te,re){if(this._model=te,this._position=re,te.getLineMaxColumn(re.lineNumber)!==re.column){const B=te.getOffsetAt(re),j=te.getPositionAt(B+1);this._marker=te.deltaDecorations([],[{range:g.Range.fromPositions(re,j),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(te){if(this._model.isDisposed()||this._position.lineNumber!==te.lineNumber)return 0;if(this._marker){const re=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(re.getStartPosition())-this._model.getOffsetAt(te)}else return this._model.getLineMaxColumn(te.lineNumber)-te.column}}let U=class ln{static get(te){return te.getContribution(ln.ID)}constructor(te,re,H,B,j,G,Y){this._memoryService=re,this._commandService=H,this._contextKeyService=B,this._instantiationService=j,this._logService=G,this._telemetryService=Y,this._lineSuffix=new h.MutableDisposable,this._toDispose=new h.DisposableStore,this._selectors=new O(oe=>oe.priority),this._telemetryGate=0,this.editor=te,this.model=j.createInstance(F.SuggestModel,this.editor),this._selectors.register({priority:0,select:(oe,ce,z)=>this._memoryService.select(oe,ce,z)});const ne=E.Context.InsertMode.bindTo(B);ne.set(te.getOption(113).insertMode),this.model.onDidTrigger(()=>ne.set(te.getOption(113).insertMode)),this.widget=this._toDispose.add(new y.IdleValue(()=>{const oe=this._instantiationService.createInstance(M.SuggestWidget,this.editor);this._toDispose.add(oe),this._toDispose.add(oe.onDidSelect(ie=>this._insertSuggestion(ie,0),this));const ce=new T.CommitCharacterController(this.editor,oe,this.model,ie=>this._insertSuggestion(ie,2));this._toDispose.add(ce);const z=E.Context.MakesTextEdit.bindTo(this._contextKeyService),V=E.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),K=E.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,h.toDisposable)(()=>{z.reset(),V.reset(),K.reset()})),this._toDispose.add(oe.onDidFocus(({item:ie})=>{const X=this.editor.getPosition(),Z=ie.editStart.column,ue=X.column;let me=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!ie.completion.additionalTextEdits&&!(ie.completion.insertTextRules&4)&&ue-Z===ie.completion.insertText.length&&(me=this.editor.getModel().getValueInRange({startLineNumber:X.lineNumber,startColumn:Z,endLineNumber:X.lineNumber,endColumn:ue})!==ie.completion.insertText),z.set(me),V.set(!c.Position.equals(ie.editInsertEnd,ie.editReplaceEnd)),K.set(!!ie.provider.resolveCompletionItem||!!ie.completion.documentation||ie.completion.detail!==ie.completion.label)})),this._toDispose.add(oe.onDetailsKeyDown(ie=>{if(ie.toKeyCodeChord().equals(new _.KeyCodeChord(!0,!1,!1,!1,33))||m.isMacintosh&&ie.toKeyCodeChord().equals(new _.KeyCodeChord(!1,!1,!1,!0,33))){ie.stopPropagation();return}ie.toKeyCodeChord().isModifierKey()||this.editor.focus()})),oe})),this._overtypingCapturer=this._toDispose.add(new y.IdleValue(()=>this._toDispose.add(new R.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new y.IdleValue(()=>this._toDispose.add(new I.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(j.createInstance(u.WordContextKey,te)),this._toDispose.add(this.model.onDidTrigger(oe=>{this.widget.value.showTriggered(oe.auto,oe.shy?250:50),this._lineSuffix.value=new W(this.editor.getModel(),oe.position)})),this._toDispose.add(this.model.onDidSuggest(oe=>{var ce;if(oe.triggerOptions.shy)return;let z=-1;for(const K of this._selectors.itemsOrderedByPriorityDesc)if(z=K.select(this.editor.getModel(),this.editor.getPosition(),oe.completionModel.items),z!==-1)break;z===-1&&(z=0);let V=!1;if(oe.triggerOptions.auto){const K=this.editor.getOption(113);K.snippetsPreventQuickSuggestions&&(!((ce=l.SnippetController2.get(this.editor))===null||ce===void 0)&&ce.isInSnippet())?V=!0:K.selectionMode==="never"||K.selectionMode==="always"?V=K.selectionMode==="never":K.selectionMode==="whenTriggerCharacter"?V=oe.triggerOptions.triggerKind!==1:K.selectionMode==="whenQuickSuggestion"&&(V=oe.triggerOptions.triggerKind===1&&!oe.triggerOptions.refilter)}this.widget.value.showSuggestions(oe.completionModel,z,oe.isFrozen,oe.triggerOptions.auto,V)})),this._toDispose.add(this.model.onDidCancel(oe=>{oe.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{x||(this.model.cancel(),this.model.clear())}));const de=E.Context.AcceptSuggestionsOnEnter.bindTo(B),he=()=>{const oe=this.editor.getOption(1);de.set(oe==="on"||oe==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>he())),he()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(te,re){if(!te||!te.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const H=l.SnippetController2.get(this.editor);if(!H)return;const B=this.editor.getModel(),j=B.getAlternativeVersionId(),{item:G}=te,Y=[],ne=new D.CancellationTokenSource;re&1||this.editor.pushUndoStop();const de=this.getOverwriteInfo(G,!!(re&8));if(this._memoryService.memorize(B,this.editor.getPosition(),G),Array.isArray(G.completion.additionalTextEdits)){this.model.cancel();const oe=i.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",G.completion.additionalTextEdits.map(ce=>r.EditOperation.replaceMove(g.Range.lift(ce.range),ce.text))),oe.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!G.isResolved){const oe=new n.StopWatch(!0);let ce;const z=B.onDidChangeContent(X=>{if(X.isFlush){ne.cancel(),z.dispose();return}for(const Z of X.changes){const ue=g.Range.getEndPosition(Z.range);(!ce||c.Position.isBefore(ue,ce))&&(ce=ue)}}),V=re;re|=2;let K=!1;const ie=this.editor.onWillType(()=>{ie.dispose(),K=!0,V&2||this.editor.pushUndoStop()});Y.push(G.resolve(ne.token).then(()=>{if(!G.completion.additionalTextEdits||ne.token.isCancellationRequested||ce&&G.completion.additionalTextEdits.some(Z=>c.Position.isBefore(ce,g.Range.getStartPosition(Z.range))))return!1;K&&this.editor.pushUndoStop();const X=i.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",G.completion.additionalTextEdits.map(Z=>r.EditOperation.replaceMove(g.Range.lift(Z.range),Z.text))),X.restoreRelativeVerticalPositionOfCursor(this.editor),(K||!(V&2))&&this.editor.pushUndoStop(),!0}).then(X=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",oe.elapsed(),X),z.dispose(),ie.dispose()}))}let{insertText:he}=G.completion;G.completion.insertTextRules&4||(he=a.SnippetParser.escape(he)),this.model.cancel(),H.insert(he,{overwriteBefore:de.overwriteBefore,overwriteAfter:de.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(G.completion.insertTextRules&1),clipboardText:te.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),re&2||this.editor.pushUndoStop(),G.completion.command&&(G.completion.command.id===$.id?this.model.trigger({auto:!0,retrigger:!0}):Y.push(this._commandService.executeCommand(G.completion.command.id,...G.completion.command.arguments?[...G.completion.command.arguments]:[]).catch(w.onUnexpectedError))),re&4&&this._alternatives.value.set(te,oe=>{for(ne.cancel();B.canUndo();){j!==B.getAlternativeVersionId()&&B.undo(),this._insertSuggestion(oe,3|(re&8?8:0));break}}),this._alertCompletionItem(G),Promise.all(Y).finally(()=>{this._reportSuggestionAcceptedTelemetry(G,B,te),this.model.clear(),ne.dispose()})}_reportSuggestionAcceptedTelemetry(te,re,H){var B;if(this._telemetryGate++%100!==0)return;const j=te.extensionId?te.extensionId.value:((B=H.item.provider._debugDisplayName)!==null&&B!==void 0?B:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:j,kind:te.completion.kind,basenameHash:(0,P.hash)((0,A.basename)(re.uri)).toString(16),languageId:re.getLanguageId(),fileExtension:(0,A.extname)(re.uri)})}getOverwriteInfo(te,re){(0,t.assertType)(this.editor.hasModel());let H=this.editor.getOption(113).insertMode==="replace";re&&(H=!H);const B=te.position.column-te.editStart.column,j=(H?te.editReplaceEnd.column:te.editInsertEnd.column)-te.position.column,G=this.editor.getPosition().column-te.position.column,Y=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:B+G,overwriteAfter:j+Y}}_alertCompletionItem(te){if((0,k.isNonEmptyArray)(te.completion.additionalTextEdits)){const re=C.localize(0,null,te.textLabel,te.completion.additionalTextEdits.length);(0,S.alert)(re)}}triggerSuggest(te,re,H){this.editor.hasModel()&&(this.model.trigger({auto:re??!1,completionOptions:{providerFilter:te,kindFilter:H?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(te){if(!this.editor.hasModel())return;const re=this.editor.getPosition(),H=()=>{re.equals(this.editor.getPosition())&&this._commandService.executeCommand(te.fallback)},B=j=>{if(j.completion.insertTextRules&4||j.completion.additionalTextEdits)return!0;const G=this.editor.getPosition(),Y=j.editStart.column,ne=G.column;return ne-Y!==j.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:G.lineNumber,startColumn:Y,endLineNumber:G.lineNumber,endColumn:ne})!==j.completion.insertText};b.Event.once(this.model.onDidTrigger)(j=>{const G=[];b.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,h.dispose)(G),H()},void 0,G),this.model.onDidSuggest(({completionModel:Y})=>{if((0,h.dispose)(G),Y.items.length===0){H();return}const ne=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),Y.items),de=Y.items[ne];if(!B(de)){H();return}this.editor.pushUndoStop(),this._insertSuggestion({index:ne,item:de,model:Y},7)},void 0,G)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(re,0),this.editor.focus()}acceptSelectedSuggestion(te,re){const H=this.widget.value.getFocusedItem();let B=0;te&&(B|=4),re&&(B|=8),this._insertSuggestion(H,B)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}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()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(te){return this._selectors.register(te)}};U.ID="editor.contrib.suggestController",U=Ne([fe(1,d.ISuggestMemoryService),fe(2,f.ICommandService),fe(3,v.IContextKeyService),fe(4,p.IInstantiationService),fe(5,L.ILogService),fe(6,N.ITelemetryService)],U),e.SuggestController=U;class O{constructor(te){this.prioritySelector=te,this._items=new Array}register(te){if(this._items.indexOf(te)!==-1)throw new Error("Value is already registered");return this._items.push(te),this._items.sort((re,H)=>this.prioritySelector(H)-this.prioritySelector(re)),{dispose:()=>{const re=this._items.indexOf(te);re>=0&&this._items.splice(re,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class $ extends s.EditorAction{constructor(){super({id:$.id,label:C.localize(1,null),alias:"Trigger Suggest",precondition:v.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCompletionItemProvider,E.Context.Visible.toNegated()),kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(te,re,H){const B=U.get(re);if(!B)return;let j;H&&typeof H=="object"&&H.auto===!0&&(j=!0),B.triggerSuggest(void 0,j,void 0)}}$.id="editor.action.triggerSuggest",e.TriggerSuggestAction=$,(0,s.registerEditorContribution)(U.ID,U,2),(0,s.registerEditorAction)($);const Q=100+90,se=s.EditorCommand.bindToContribution(U.get);(0,s.registerEditorCommand)(new se({id:"acceptSelectedSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion),handler(le){le.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:v.ContextKeyExpr.and(E.Context.Visible,o.EditorContextKeys.textInputFocus),weight:Q},{primary:3,kbExpr:v.ContextKeyExpr.and(E.Context.Visible,o.EditorContextKeys.textInputFocus,E.Context.AcceptSuggestionsOnEnter,E.Context.MakesTextEdit),weight:Q}],menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,title:C.localize(2,null),group:"left",order:1,when:E.Context.HasInsertAndReplaceRange.toNegated()},{menuId:E.suggestWidgetStatusbarMenu,title:C.localize(3,null),group:"left",order:1,when:v.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("insert"))},{menuId:E.suggestWidgetStatusbarMenu,title:C.localize(4,null),group:"left",order:1,when:v.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("replace"))}]})),(0,s.registerEditorCommand)(new se({id:"acceptAlternativeSelectedSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,o.EditorContextKeys.textInputFocus,E.Context.HasFocusedSuggestion),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(le){le.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,group:"left",order:2,when:v.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("insert")),title:C.localize(5,null)},{menuId:E.suggestWidgetStatusbarMenu,group:"left",order:2,when:v.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("replace")),title:C.localize(6,null)}]})),f.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,s.registerEditorCommand)(new se({id:"hideSuggestWidget",precondition:E.Context.Visible,handler:le=>le.cancelSuggestWidget(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),(0,s.registerEditorCommand)(new se({id:"selectNextSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,v.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectNextSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,s.registerEditorCommand)(new se({id:"selectNextPageSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,v.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectNextPageSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),(0,s.registerEditorCommand)(new se({id:"selectLastSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,v.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectLastSuggestion()})),(0,s.registerEditorCommand)(new se({id:"selectPrevSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,v.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectPrevSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,s.registerEditorCommand)(new se({id:"selectPrevPageSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,v.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectPrevPageSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),(0,s.registerEditorCommand)(new se({id:"selectFirstSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,v.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectFirstSuggestion()})),(0,s.registerEditorCommand)(new se({id:"focusSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion.negate()),handler:le=>le.focusSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,s.registerEditorCommand)(new se({id:"focusAndAcceptSuggestion",precondition:v.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion.negate()),handler:le=>{le.focusSuggestion(),le.acceptSelectedSuggestion(!0,!1)}})),(0,s.registerEditorCommand)(new se({id:"toggleSuggestionDetails",precondition:v.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion),handler:le=>le.toggleSuggestionDetails(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,group:"right",order:1,when:v.ContextKeyExpr.and(E.Context.DetailsVisible,E.Context.CanResolve),title:C.localize(7,null)},{menuId:E.suggestWidgetStatusbarMenu,group:"right",order:1,when:v.ContextKeyExpr.and(E.Context.DetailsVisible.toNegated(),E.Context.CanResolve),title:C.localize(8,null)}]})),(0,s.registerEditorCommand)(new se({id:"toggleExplainMode",precondition:E.Context.Visible,handler:le=>le.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),(0,s.registerEditorCommand)(new se({id:"toggleSuggestionFocus",precondition:E.Context.Visible,handler:le=>le.toggleSuggestionFocus(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),(0,s.registerEditorCommand)(new se({id:"insertBestCompletion",precondition:v.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),u.WordContextKey.AtEnd,E.Context.Visible.toNegated(),I.SuggestAlternatives.OtherSuggestions.toNegated(),l.SnippetController2.InSnippetMode.toNegated()),handler:(le,te)=>{le.triggerSuggestAndAcceptBest((0,t.isObject)(te)?Object.assign({fallback:"tab"},te):{fallback:"tab"})},kbOpts:{weight:Q,primary:2}})),(0,s.registerEditorCommand)(new se({id:"insertNextSuggestion",precondition:v.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),I.SuggestAlternatives.OtherSuggestions,E.Context.Visible.toNegated(),l.SnippetController2.InSnippetMode.toNegated()),handler:le=>le.acceptNextSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:2}})),(0,s.registerEditorCommand)(new se({id:"insertPrevSuggestion",precondition:v.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),I.SuggestAlternatives.OtherSuggestions,E.Context.Visible.toNegated(),l.SnippetController2.InSnippetMode.toNegated()),handler:le=>le.acceptPrevSuggestion(),kbOpts:{weight:Q,kbExpr:o.EditorContextKeys.textInputFocus,primary:1026}})),(0,s.registerEditorAction)(class extends s.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:C.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(le,te){var re;(re=U.get(te))===null||re===void 0||re.resetWidgetSize()}})}),define(J[855],ee([1,0,16,6,2,13,5,94,344,346,220]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rangeStartsWith=e.SuggestWidgetInlineCompletionProvider=void 0;class n extends y.Disposable{get state(){if(this._isActive)return{selectedItem:this._currentSuggestItemInfo}}constructor(c,g){super(),this.editor=c,this.suggestControllerPreselector=g,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new k.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._register(c.onKeyDown(l=>{l.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(c.onKeyUp(l=>{l.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const o=h.SuggestController.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(d,u,C)=>{const f=this.editor.getModel(),v=(0,m.minimizeInlineCompletion)(f,this.suggestControllerPreselector());if(!v)return-1;const p=D.Position.lift(u),L=C.map((I,T)=>{const F=s(o,p,I,this.isShiftKeyPressed),R=(0,m.minimizeInlineCompletion)(f,F?.normalizedInlineCompletion);if(!R)return;const M=t(v.range,R.range)&&v.insertText.startsWith(R.insertText);return{index:T,valid:M,prefixLength:R.insertText.length,suggestItem:I}}).filter(I=>I&&I.valid),E=(0,S.findMaxBy)(L,(0,S.compareBy)(I=>I.prefixLength,S.numberComparator));return E?E.index:-1}}));let l=!1;const a=()=>{l||(l=!0,this._register(o.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(o.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(o.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(k.Event.once(o.model.onDidTrigger)(d=>{a()}))}this.update(this._isActive)}update(c){const g=this.getSuggestItemInfo();let o=!1;i(this._currentSuggestItemInfo,g)||(this._currentSuggestItemInfo=g,o=!0),this._isActive!==c&&(this._isActive=c,o=!0),o&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const c=h.SuggestController.get(this.editor);if(!c||!this.isSuggestWidgetVisible)return;const g=c.widget.value.getFocusedItem();if(g)return s(c,this.editor.getPosition(),g.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const c=h.SuggestController.get(this.editor);c?.stopForceRenderingAbove()}forceRenderingAbove(){const c=h.SuggestController.get(this.editor);c?.forceRenderingAbove()}}e.SuggestWidgetInlineCompletionProvider=n;function t(r,c){return c.startLineNumber===r.startLineNumber&&c.startColumn===r.startColumn&&(c.endLineNumber<r.endLineNumber||c.endLineNumber===r.endLineNumber&&c.endColumn<=r.endColumn)}e.rangeStartsWith=t;function i(r,c){return r===c?!0:!r||!c?!1:r.completionItemKind===c.completionItemKind&&r.isSnippetText===c.isSnippetText&&(0,m.normalizedInlineCompletionsEquals)(r.normalizedInlineCompletion,c.normalizedInlineCompletion)}function s(r,c,g,o){if(Array.isArray(g.completion.additionalTextEdits)&&g.completion.additionalTextEdits.length>0)return{completionItemKind:g.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:w.Range.fromPositions(c,c),insertText:"",filterText:"",snippetInfo:void 0,additionalTextEdits:[]}};let{insertText:l}=g.completion,a=!1;if(g.completion.insertTextRules&4){const u=new b.SnippetParser().parse(l),C=r.editor.getModel();if(u.children.length>100)return;_.SnippetSession.adjustWhitespace(C,c,!0,u),l=u.toString(),a=!0}const d=r.getOverwriteInfo(g,o);return{isSnippetText:a,completionItemKind:g.completion.kind,normalizedInlineCompletion:{insertText:l,filterText:l,range:w.Range.fromPositions(c.delta(0,-d.overwriteBefore),c.delta(0,Math.max(d.overwriteAfter,0))),snippetInfo:void 0,additionalTextEdits:[]}}}}),define(J[856],ee([1,0,12,11,2,26,19,175,345,220,855]),function(q,e,S,k,y,D,w,b,_,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetPreviewModel=void 0;let n=class extends b.BaseGhostTextWidgetModel{get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}constructor(r,c,g){super(r),this.cache=c,this.languageFeaturesService=g,this.suggestionInlineCompletionSource=this._register(new m.SuggestWidgetInlineCompletionProvider(this.editor,()=>{var o,l,a;return(o=this.cache.value)===null||o===void 0||o.updateRanges(),(a=(l=this.cache.value)===null||l===void 0?void 0:l.completions[0])===null||a===void 0?void 0:a.toLiveInlineCompletion()})),this.updateOperation=this._register(new y.MutableDisposable),this.updateCacheSoon=this._register(new S.RunOnceScheduler(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{if(!this.editor.hasModel())return;this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const l=this.ghostText;l&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,t(l.parts.map(a=>a.lines.length-1)))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(o=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()})),this._register((0,y.toDisposable)(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}isSuggestionPreviewEnabled(){return this.editor.getOption(113).preview}updateCache(){return Ee(this,void 0,void 0,function*(){const r=this.suggestionInlineCompletionSource.state;if(!r||!r.selectedItem)return;const c={text:r.selectedItem.normalizedInlineCompletion.insertText,range:r.selectedItem.normalizedInlineCompletion.range,isSnippetText:r.selectedItem.isSnippetText,completionKind:r.selectedItem.completionItemKind},g=this.editor.getPosition();if(r.selectedItem.isSnippetText||r.selectedItem.completionItemKind===27||r.selectedItem.completionItemKind===20||r.selectedItem.completionItemKind===23){this.cache.clear();return}const o=(0,S.createCancelablePromise)(a=>Ee(this,void 0,void 0,function*(){let d;try{d=yield(0,_.provideInlineCompletions)(this.languageFeaturesService.inlineCompletionsProvider,g,this.editor.getModel(),{triggerKind:D.InlineCompletionTriggerKind.Automatic,selectedSuggestionInfo:c},a)}catch(u){(0,k.onUnexpectedError)(u);return}if(a.isCancellationRequested){d.dispose();return}this.cache.setValue(this.editor,d,D.InlineCompletionTriggerKind.Automatic),this.onDidChangeEmitter.fire()})),l=new _.UpdateOperation(o,D.InlineCompletionTriggerKind.Automatic);this.updateOperation.value=l,yield o,this.updateOperation.value===l&&this.updateOperation.clear()})}get ghostText(){var r,c,g;const o=this.isSuggestionPreviewEnabled(),l=this.editor.getModel(),a=(0,h.minimizeInlineCompletion)(l,(c=(r=this.cache.value)===null||r===void 0?void 0:r.completions[0])===null||c===void 0?void 0:c.toLiveInlineCompletion()),d=this.suggestionInlineCompletionSource.state,u=(0,h.minimizeInlineCompletion)(l,(g=d?.selectedItem)===null||g===void 0?void 0:g.normalizedInlineCompletion),C=a&&u&&a.insertText.startsWith(u.insertText)&&i(a.range,u.range);if(!o&&!C)return;const f=C?a:u||a,v=C?f.insertText.length-u.insertText.length:0;return this.toGhostText(f,v)}toGhostText(r,c){const g=this.editor.getOptions().get(113).previewMode;return r?(0,h.inlineCompletionToGhostText)(r,this.editor.getModel(),g,this.editor.getPosition(),c)||new b.GhostText(r.range.endLineNumber,[],this.minReservedLineCount):void 0}};n=Ne([fe(2,w.ILanguageFeaturesService)],n),e.SuggestWidgetPreviewModel=n;function t(s){return s.reduce((r,c)=>r+c,0)}function i(s,r){return s.startLineNumber===r.startLineNumber&&s.startColumn===r.startColumn&&(s.endLineNumber===r.endLineNumber&&s.endColumn>=r.endColumn||s.endLineNumber>r.endLineNumber)}}),define(J[857],ee([1,0,6,2,13,26,345,856,199,8]),function(q,e,S,k,y,D,w,b,_,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedInlineCompletionCache=e.GhostTextModel=e.DelegatingModel=void 0;class m extends k.Disposable{constructor(){super(...arguments),this.onDidChangeEmitter=new S.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new k.MutableDisposable)}get targetModel(){var s;return(s=this.currentModelRef.value)===null||s===void 0?void 0:s.object}setTargetModel(s){var r;((r=this.currentModelRef.value)===null||r===void 0?void 0:r.object)!==s&&(this.currentModelRef.clear(),this.currentModelRef.value=s?(0,_.createDisposableRef)(s,s.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var s,r;return this.hasCachedGhostText||(this.cachedGhostText=(r=(s=this.currentModelRef.value)===null||s===void 0?void 0:s.object)===null||r===void 0?void 0:r.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(s){var r;(r=this.targetModel)===null||r===void 0||r.setExpanded(s)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}e.DelegatingModel=m;let n=class extends m{get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}constructor(s,r){super(),this.editor=s,this.instantiationService=r,this.sharedCache=this._register(new t),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(b.SuggestWidgetPreviewModel,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(w.InlineCompletionsModel,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(s){var r;const c=(r=this.activeInlineCompletionsModel)===null||r===void 0?void 0:r.ghostText;return c?c.parts.some(g=>s.containsPosition(new y.Position(c.lineNumber,g.column))):!1}triggerInlineCompletion(){var s;(s=this.activeInlineCompletionsModel)===null||s===void 0||s.trigger(D.InlineCompletionTriggerKind.Explicit)}commitInlineCompletion(){var s;(s=this.activeInlineCompletionsModel)===null||s===void 0||s.commitCurrentSuggestion()}commitInlineCompletionPartially(){var s;(s=this.activeInlineCompletionsModel)===null||s===void 0||s.commitCurrentSuggestionPartially()}hideInlineCompletion(){var s;(s=this.activeInlineCompletionsModel)===null||s===void 0||s.hide()}showNextInlineCompletion(){var s;(s=this.activeInlineCompletionsModel)===null||s===void 0||s.showNext()}showPreviousInlineCompletion(){var s;(s=this.activeInlineCompletionsModel)===null||s===void 0||s.showPrevious()}};n=Ne([fe(1,h.IInstantiationService)],n),e.GhostTextModel=n;class t extends k.Disposable{constructor(){super(...arguments),this.onDidChangeEmitter=new S.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new k.MutableDisposable)}get value(){return this.cache.value}setValue(s,r,c){this.cache.value=new w.SynchronizedInlineCompletionsCache(r,s,()=>this.onDidChangeEmitter.fire(),c)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}e.SharedInlineCompletionCache=t}),define(J[347],ee([1,0,6,2,9,15,75,22,198,857,697,628,28,27,14,8]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoAcceptPart=e.ToggleAlwaysShowInlineSuggestionToolbar=e.HideInlineCompletion=e.AcceptInlineCompletion=e.AcceptNextWordOfInlineCompletion=e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=e.ActiveGhostTextController=e.GhostTextController=void 0;let c=class _i extends k.Disposable{static get(E){return E.getContribution(_i.ID)}get activeModel(){var E;return(E=this.activeController.value)===null||E===void 0?void 0:E.model}constructor(E,I,T){super(),this.editor=E,this.instantiationService=I,this.contextKeyService=T,this.triggeredExplicitly=!1,this.activeController=this._register(new k.MutableDisposable),this.activeModelDidChangeEmitter=this._register(new S.Emitter),this.firstUndoableVersionId=void 0,this.alwaysShowInlineSuggestionToolbar=_i.alwaysShowInlineSuggestionToolbar.bindTo(this.contextKeyService),this._register(this.editor.onDidChangeModelContent(F=>{var R;(!F.isUndoing||this.firstUndoableVersionId&&this.editor.getModel().getAlternativeVersionId()<this.firstUndoableVersionId)&&((R=this.activeController.value)===null||R===void 0||R.contextKeys.canUndoInlineSuggestion.reset(),this.firstUndoableVersionId=void 0)})),this._register(this.editor.onDidChangeCursorPosition(F=>{var R;F.reason===3&&((R=this.activeController.value)===null||R===void 0||R.contextKeys.canUndoInlineSuggestion.reset(),this.firstUndoableVersionId=void 0)})),this._register(this.editor.onDidChangeModel(()=>{this.update()})),this._register(this.editor.onDidChangeConfiguration(F=>{(F.hasChanged(113)||F.hasChanged(60))&&this.update()})),this.update()}update(){const E=this.editor.getOption(113),I=this.editor.getOption(60);this.alwaysShowInlineSuggestionToolbar.set(I.showToolbar==="always");const T=this.editor.hasModel()&&(E.preview||I.enabled||this.triggeredExplicitly);T!==!!this.activeController.value&&(this.activeController.value=void 0,this.activeController.value=T?this.instantiationService.createInstance(o,this.editor):void 0,this.activeModelDidChangeEmitter.fire())}shouldShowHoverAt(E){var I;return((I=this.activeModel)===null||I===void 0?void 0:I.shouldShowHoverAt(E))||!1}shouldShowHoverAtViewZone(E){var I,T;return((T=(I=this.activeController.value)===null||I===void 0?void 0:I.widget)===null||T===void 0?void 0:T.shouldShowHoverAtViewZone(E))||!1}trigger(){var E;this.triggeredExplicitly=!0,this.activeController.value||this.update(),(E=this.activeModel)===null||E===void 0||E.triggerInlineCompletion()}commitPartially(){var E,I,T;const F=this.firstUndoableVersionId;(E=this.activeModel)===null||E===void 0||E.commitInlineCompletionPartially(),(T=(I=this.activeController)===null||I===void 0?void 0:I.value)===null||T===void 0||T.contextKeys.canUndoInlineSuggestion.set(!0),this.firstUndoableVersionId=F??this.editor.getModel().getAlternativeVersionId()}commit(){var E;(E=this.activeModel)===null||E===void 0||E.commitInlineCompletion()}hide(){var E;(E=this.activeModel)===null||E===void 0||E.hideInlineCompletion()}showNextInlineCompletion(){var E;(E=this.activeModel)===null||E===void 0||E.showNextInlineCompletion()}showPreviousInlineCompletion(){var E;(E=this.activeModel)===null||E===void 0||E.showPreviousInlineCompletion()}};c.inlineSuggestionVisible=new s.RawContextKey("inlineSuggestionVisible",!1,n.localize(0,null)),c.inlineSuggestionHasIndentation=new s.RawContextKey("inlineSuggestionHasIndentation",!1,n.localize(1,null)),c.inlineSuggestionHasIndentationLessThanTabSize=new s.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,n.localize(2,null)),c.canUndoInlineSuggestion=new s.RawContextKey("canUndoInlineSuggestion",!1,n.localize(3,null)),c.alwaysShowInlineSuggestionToolbar=new s.RawContextKey("alwaysShowInlineSuggestionToolbar",!1,n.localize(4,null)),c.ID="editor.contrib.ghostTextController",c=Ne([fe(1,r.IInstantiationService),fe(2,s.IContextKeyService)],c),e.GhostTextController=c;class g{constructor(E){this.contextKeyService=E,this.inlineCompletionVisible=c.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=c.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=c.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.canUndoInlineSuggestion=c.canUndoInlineSuggestion.bindTo(this.contextKeyService)}}let o=class extends k.Disposable{constructor(E,I,T){super(),this.editor=E,this.instantiationService=I,this.contextKeyService=T,this.contextKeys=new g(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(h.GhostTextModel,this.editor)),this.widget=this._register(this.instantiationService.createInstance(m.GhostTextWidget,this.editor,this.model)),this._register((0,k.toDisposable)(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var E;this.contextKeys.inlineCompletionVisible.set(((E=this.model.activeInlineCompletionsModel)===null||E===void 0?void 0:E.ghostText)!==void 0);let I=!1,T=!0;const F=this.model.inlineCompletionsModel.ghostText;if(this.model.activeInlineCompletionsModel&&F&&F.parts.length>0){const{column:R,lines:M}=F.parts[0],N=M[0],A=this.editor.getModel().getLineIndentColumn(F.lineNumber);if(R<=A){let x=(0,y.firstNonWhitespaceIndex)(N);x===-1&&(x=N.length-1),I=x>0;const W=this.editor.getModel().getOptions().tabSize;T=w.CursorColumns.visibleColumnFromColumn(N,x+1,W)<W}}this.contextKeys.inlineCompletionSuggestsIndentation.set(I),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(T)}};o=Ne([fe(1,r.IInstantiationService),fe(2,s.IContextKeyService)],o),e.ActiveGhostTextController=o;class l extends D.EditorAction{constructor(){super({id:l.ID,label:n.localize(5,null),alias:"Show Next Inline Suggestion",precondition:s.ContextKeyExpr.and(b.EditorContextKeys.writable,c.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(E,I){return Ee(this,void 0,void 0,function*(){const T=c.get(I);T&&T.showNextInlineCompletion()})}}l.ID=_.showNextInlineSuggestionActionId,e.ShowNextInlineSuggestionAction=l;class a extends D.EditorAction{constructor(){super({id:a.ID,label:n.localize(6,null),alias:"Show Previous Inline Suggestion",precondition:s.ContextKeyExpr.and(b.EditorContextKeys.writable,c.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(E,I){return Ee(this,void 0,void 0,function*(){const T=c.get(I);T&&T.showPreviousInlineCompletion()})}}a.ID=_.showPreviousInlineSuggestionActionId,e.ShowPreviousInlineSuggestionAction=a;class d extends D.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:n.localize(7,null),alias:"Trigger Inline Suggestion",precondition:b.EditorContextKeys.writable})}run(E,I){return Ee(this,void 0,void 0,function*(){const T=c.get(I);T?.trigger()})}}e.TriggerInlineSuggestionAction=d;class u extends D.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:n.localize(8,null),alias:"Accept Next Word Of Inline Suggestion",precondition:s.ContextKeyExpr.and(b.EditorContextKeys.writable,c.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065},menuOpts:[{menuId:t.MenuId.InlineSuggestionToolbar,title:n.localize(9,null),group:"primary",order:2}]})}run(E,I){return Ee(this,void 0,void 0,function*(){const T=c.get(I);T&&T.commitPartially()})}}e.AcceptNextWordOfInlineCompletion=u;class C extends D.EditorAction{constructor(){super({id:_.inlineSuggestCommitId,label:n.localize(10,null),alias:"Accept Inline Suggestion",precondition:c.inlineSuggestionVisible,menuOpts:[{menuId:t.MenuId.InlineSuggestionToolbar,title:n.localize(11,null),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:s.ContextKeyExpr.and(c.inlineSuggestionVisible,b.EditorContextKeys.tabMovesFocus.toNegated(),c.inlineSuggestionHasIndentationLessThanTabSize)}})}run(E,I){return Ee(this,void 0,void 0,function*(){const T=c.get(I);T&&(T.commit(),T.editor.focus())})}}e.AcceptInlineCompletion=C;class f extends D.EditorAction{constructor(){super({id:f.ID,label:n.localize(12,null),alias:"Hide Inline Suggestion",precondition:c.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(E,I){return Ee(this,void 0,void 0,function*(){const T=c.get(I);T&&T.hide()})}}f.ID="editor.action.inlineSuggest.hide",e.HideInlineCompletion=f;class v extends t.Action2{constructor(){super({id:v.ID,title:n.localize(13,null),f1:!1,precondition:void 0,menu:[{id:t.MenuId.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:c.alwaysShowInlineSuggestionToolbar})}run(E,I){return Ee(this,void 0,void 0,function*(){const T=E.get(i.IConfigurationService),R=T.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";T.updateValue("editor.inlineSuggest.showToolbar",R)})}}v.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar",e.ToggleAlwaysShowInlineSuggestionToolbar=v;class p extends D.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.undo",label:n.localize(14,null),alias:"Undo Accept Word",precondition:s.ContextKeyExpr.and(b.EditorContextKeys.writable,c.canUndoInlineSuggestion),kbOpts:{weight:100+1,primary:2063,kbExpr:s.ContextKeyExpr.and(b.EditorContextKeys.writable,c.canUndoInlineSuggestion)},menuOpts:[{menuId:t.MenuId.InlineSuggestionToolbar,title:n.localize(15,null),group:"secondary",order:3}]})}run(E,I){var T;return Ee(this,void 0,void 0,function*(){(T=I.getModel())===null||T===void 0||T.undo()})}}e.UndoAcceptPart=p}),define(J[858],ee([1,0,7,6,68,2,5,38,93,347,237,124,629,88,8,47,79]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class g{constructor(a,d,u){this.owner=a,this.range=d,this.controller=u}isValidForHoverAnchor(a){return a.type===1&&this.range.startColumn<=a.range.startColumn&&this.range.endColumn>=a.range.endColumn}requestExplicitContext(){var a,d,u;(u=(d=(a=this.controller.activeModel)===null||a===void 0?void 0:a.activeInlineCompletionsModel)===null||d===void 0?void 0:d.completionSession.value)===null||u===void 0||u.ensureUpdateWithExplicitContext()}getInlineCompletionsCount(){var a,d;const u=(d=(a=this.controller.activeModel)===null||a===void 0?void 0:a.activeInlineCompletionsModel)===null||d===void 0?void 0:d.completionSession.value;if(u?.hasBeenTriggeredExplicitly)return u?.getInlineCompletionsCountSync()}getInlineCompletionIndex(){var a,d,u;return(u=(d=(a=this.controller.activeModel)===null||a===void 0?void 0:a.activeInlineCompletionsModel)===null||d===void 0?void 0:d.completionSession.value)===null||u===void 0?void 0:u.currentlySelectedIndex}onDidChange(a){var d,u;return((u=(d=this.controller.activeModel)===null||d===void 0?void 0:d.activeInlineCompletionsModel)===null||u===void 0?void 0:u.onDidChange(a))||D.Disposable.None}get commands(){var a,d,u;return((u=(d=(a=this.controller.activeModel)===null||a===void 0?void 0:a.activeInlineCompletionsModel)===null||d===void 0?void 0:d.completionSession.value)===null||u===void 0?void 0:u.commands)||[]}}e.InlineCompletionsHover=g;let o=class{constructor(a,d,u,C,f,v){this._editor=a,this._languageService=d,this._openerService=u,this.accessibilityService=C,this._instantiationService=f,this._telemetryService=v,this.hoverOrdinal=4}suggestHoverAnchor(a){const d=h.GhostTextController.get(this._editor);if(!d)return null;const u=a.target;if(u.type===8){const C=u.detail;if(d.shouldShowHoverAtViewZone(C.viewZoneId))return new _.HoverForeignElementAnchor(1e3,this,w.Range.fromPositions(this._editor.getModel().validatePosition(C.positionBefore||C.position)),a.event.posx,a.event.posy,!1)}return u.type===7&&d.shouldShowHoverAt(u.range)?new _.HoverForeignElementAnchor(1e3,this,u.range,a.event.posx,a.event.posy,!1):u.type===6&&u.detail.mightBeForeignElement&&d.shouldShowHoverAt(u.range)?new _.HoverForeignElementAnchor(1e3,this,u.range,a.event.posx,a.event.posy,!1):null}computeSync(a,d){if(this._editor.getOption(60).showToolbar==="always")return[];const u=h.GhostTextController.get(this._editor);return u&&u.shouldShowHoverAt(a.range)?[new g(this,a.range,u)]:[]}renderHoverParts(a,d){const u=new D.DisposableStore,C=d[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(a,C,u);const f=this._instantiationService.createInstance(m.InlineSuggestionHintsContentWidget,this._editor,!1);return a.fragment.appendChild(f.getDomNode()),f.update(null,C.getInlineCompletionIndex()||0,C.getInlineCompletionsCount(),C.commands),C.requestExplicitContext(),u.add(C.onDidChange(()=>{f.update(null,C.getInlineCompletionIndex()||0,C.getInlineCompletionsCount(),C.commands)})),u}renderScreenReaderText(a,d,u){const C=S.$,f=C("div.hover-row.markdown-hover"),v=S.append(f,C("div.hover-contents",{["aria-live"]:"assertive"})),p=u.add(new n.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),L=E=>{u.add(p.onDidRenderAsync(()=>{v.className="hover-contents code-hover-contents",a.onContentsChanged()}));const I=t.localize(0,null),T=u.add(p.render(new y.MarkdownString().appendText(I).appendCodeblock("text",E)));v.replaceChildren(T.element)};u.add(k.Event.runAndSubscribe(E=>d.onDidChange(E),()=>{var E,I;const T=(I=(E=d.controller.activeModel)===null||E===void 0?void 0:E.inlineCompletionsModel)===null||I===void 0?void 0:I.ghostText;if(T){const F=this._editor.getModel().getLineContent(T.lineNumber);L(T.renderForScreenReader(F))}else S.reset(v)})),a.fragment.appendChild(f)}};o=Ne([fe(1,b.ILanguageService),fe(2,r.IOpenerService),fe(3,i.IAccessibilityService),fe(4,s.IInstantiationService),fe(5,c.ITelemetryService)],o),e.InlineCompletionsHoverParticipant=o}),define(J[859],ee([1,0,15,93,347,858,28]),function(q,e,S,k,y,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,S.registerEditorContribution)(y.GhostTextController.ID,y.GhostTextController,3),(0,S.registerEditorAction)(y.TriggerInlineSuggestionAction),(0,S.registerEditorAction)(y.ShowNextInlineSuggestionAction),(0,S.registerEditorAction)(y.ShowPreviousInlineSuggestionAction),(0,S.registerEditorAction)(y.AcceptNextWordOfInlineCompletion),(0,S.registerEditorAction)(y.AcceptInlineCompletion),(0,S.registerEditorAction)(y.HideInlineCompletion),(0,S.registerEditorAction)(y.UndoAcceptPart),(0,w.registerAction2)(y.ToggleAlwaysShowInlineSuggestionToolbar),k.HoverParticipantRegistry.register(D.InlineCompletionsHoverParticipant)}),define(J[348],ee([1,0,8]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustManagementService=void 0,e.IWorkspaceTrustManagementService=(0,S.createDecorator)("workspaceTrustManagementService")}),define(J[860],ee([1,0,12,29,68,2,17,9,15,40,39,263,110,38,302,93,233,785,658,27,8,47,78,80,348,431]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowExcludeOptions=e.DisableHighlightingOfNonBasicAsciiCharactersAction=e.DisableHighlightingOfInvisibleCharactersAction=e.DisableHighlightingOfAmbiguousCharactersAction=e.DisableHighlightingInStringsAction=e.DisableHighlightingInCommentsAction=e.UnicodeHighlighterHoverParticipant=e.UnicodeHighlighter=e.warningIcon=void 0,e.warningIcon=(0,C.registerIcon)("extensions-warning-message",k.Codicon.warning,o.localize(0,null));let v=class extends D.Disposable{constructor(te,re,H,B){super(),this._editor=te,this._editorWorkerService=re,this._workspaceTrustService=H,this._highlighter=null,this._bannerClosed=!1,this._updateState=j=>{if(j&&j.hasMore){if(this._bannerClosed)return;const G=Math.max(j.ambiguousCharacterCount,j.nonBasicAsciiCharacterCount,j.invisibleCharacterCount);let Y;if(j.nonBasicAsciiCharacterCount>=G)Y={message:o.localize(1,null),command:new U};else if(j.ambiguousCharacterCount>=G)Y={message:o.localize(2,null),command:new x};else if(j.invisibleCharacterCount>=G)Y={message:o.localize(3,null),command:new W};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:Y.message,icon:e.warningIcon,actions:[{label:Y.command.shortLabel,href:`command:${Y.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(B.createInstance(g.BannerController,te)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=te.getOption(120),this._register(H.onDidChangeTrust(j=>{this._updateHighlighter()})),this._register(te.onDidChangeConfiguration(j=>{j.hasChanged(120)&&(this._options=te.getOption(120),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const te=p(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([te.nonBasicASCII,te.ambiguousCharacters,te.invisibleCharacters].every(H=>H===!1))return;const re={nonBasicASCII:te.nonBasicASCII,ambiguousCharacters:te.ambiguousCharacters,invisibleCharacters:te.invisibleCharacters,includeComments:te.includeComments,includeStrings:te.includeStrings,allowedCodePoints:Object.keys(te.allowedCharacters).map(H=>H.codePointAt(0)),allowedLocales:Object.keys(te.allowedLocales).map(H=>H==="_os"?new Intl.NumberFormat().resolvedOptions().locale:H==="_vscode"?w.language:H)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new L(this._editor,re,this._updateState,this._editorWorkerService):this._highlighter=new E(this._editor,re,this._updateState)}getDecorationInfo(te){return this._highlighter?this._highlighter.getDecorationInfo(te):null}};v.ID="editor.contrib.unicodeHighlighter",v=Ne([fe(1,t.IEditorWorkerService),fe(2,f.IWorkspaceTrustManagementService),fe(3,a.IInstantiationService)],v),e.UnicodeHighlighter=v;function p(le,te){return{nonBasicASCII:te.nonBasicASCII===h.inUntrustedWorkspace?!le:te.nonBasicASCII,ambiguousCharacters:te.ambiguousCharacters,invisibleCharacters:te.invisibleCharacters,includeComments:te.includeComments===h.inUntrustedWorkspace?!le:te.includeComments,includeStrings:te.includeStrings===h.inUntrustedWorkspace?!le:te.includeStrings,allowedCharacters:te.allowedCharacters,allowedLocales:te.allowedLocales}}let L=class extends D.Disposable{constructor(te,re,H,B){super(),this._editor=te,this._options=re,this._updateState=H,this._editorWorkerService=B,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new S.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const te=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(re=>{if(this._model.isDisposed()||this._model.getVersionId()!==te)return;this._updateState(re);const H=[];if(!re.hasMore)for(const B of re.ranges)H.push({range:B,options:N.instance.getDecorationFromOptions(this._options)});this._decorations.set(H)})}getDecorationInfo(te){if(!this._decorations.has(te))return null;const re=this._editor.getModel();if(!(0,s.isModelDecorationVisible)(re,te))return null;const H=re.getValueInRange(te.range);return{reason:M(H,this._options),inComment:(0,s.isModelDecorationInComment)(re,te),inString:(0,s.isModelDecorationInString)(re,te)}}};L=Ne([fe(3,t.IEditorWorkerService)],L);class E extends D.Disposable{constructor(te,re,H){super(),this._editor=te,this._options=re,this._updateState=H,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new S.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const te=this._editor.getVisibleRanges(),re=[],H={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const B of te){const j=n.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,B);for(const G of j.ranges)H.ranges.push(G);H.ambiguousCharacterCount+=H.ambiguousCharacterCount,H.invisibleCharacterCount+=H.invisibleCharacterCount,H.nonBasicAsciiCharacterCount+=H.nonBasicAsciiCharacterCount,H.hasMore=H.hasMore||j.hasMore}if(!H.hasMore)for(const B of H.ranges)re.push({range:B,options:N.instance.getDecorationFromOptions(this._options)});this._updateState(H),this._decorations.set(re)}getDecorationInfo(te){if(!this._decorations.has(te))return null;const re=this._editor.getModel(),H=re.getValueInRange(te.range);return(0,s.isModelDecorationVisible)(re,te)?{reason:M(H,this._options),inComment:(0,s.isModelDecorationInComment)(re,te),inString:(0,s.isModelDecorationInString)(re,te)}:null}}let I=class{constructor(te,re,H){this._editor=te,this._languageService=re,this._openerService=H,this.hoverOrdinal=5}computeSync(te,re){if(!this._editor.hasModel()||te.type!==1)return[];const H=this._editor.getModel(),B=this._editor.getContribution(v.ID);if(!B)return[];const j=[];let G=300;for(const Y of re){const ne=B.getDecorationInfo(Y);if(!ne)continue;const he=H.getValueInRange(Y.range).codePointAt(0),oe=F(he);let ce;switch(ne.reason.kind){case 0:{(0,b.isBasicASCII)(ne.reason.confusableWith)?ce=o.localize(4,null,oe,F(ne.reason.confusableWith.codePointAt(0))):ce=o.localize(5,null,oe,F(ne.reason.confusableWith.codePointAt(0)));break}case 1:ce=o.localize(6,null,oe);break;case 2:ce=o.localize(7,null,oe);break}const z={codePoint:he,reason:ne.reason,inComment:ne.inComment,inString:ne.inString},V=o.localize(8,null),K=`command:${O.ID}?${encodeURIComponent(JSON.stringify(z))}`,ie=new y.MarkdownString("",!0).appendMarkdown(ce).appendText(" ").appendLink(K,V);j.push(new c.MarkdownHover(this,Y.range,[ie],!1,G++))}return j}renderHoverParts(te,re){return(0,c.renderMarkdownHovers)(te,re,this._editor,this._languageService,this._openerService)}};I=Ne([fe(1,i.ILanguageService),fe(2,d.IOpenerService)],I),e.UnicodeHighlighterHoverParticipant=I;function T(le){return`U+${le.toString(16).padStart(4,"0")}`}function F(le){let te=`\\`${T(le)}\\``;return b.InvisibleCharacters.isInvisibleCharacter(le)||(te+=` "${`${R(le)}`}"`),te}function R(le){return le===96?"`` ` ``":"`"+String.fromCodePoint(le)+"`"}function M(le,te){return n.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(le,te)}class N{constructor(){this.map=new Map}getDecorationFromOptions(te){return this.getDecoration(!te.includeComments,!te.includeStrings)}getDecoration(te,re){const H=`${te}${re}`;let B=this.map.get(H);return B||(B=m.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:te,hideInStringTokens:re}),this.map.set(H,B)),B}}N.instance=new N;class A extends _.EditorAction{constructor(){super({id:x.ID,label:o.localize(10,null),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=o.localize(9,null)}run(te,re,H){return Ee(this,void 0,void 0,function*(){const B=te?.get(l.IConfigurationService);B&&this.runAction(B)})}runAction(te){return Ee(this,void 0,void 0,function*(){yield te.updateValue(h.unicodeHighlightConfigKeys.includeComments,!1,2)})}}e.DisableHighlightingInCommentsAction=A;class P extends _.EditorAction{constructor(){super({id:x.ID,label:o.localize(12,null),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=o.localize(11,null)}run(te,re,H){return Ee(this,void 0,void 0,function*(){const B=te?.get(l.IConfigurationService);B&&this.runAction(B)})}runAction(te){return Ee(this,void 0,void 0,function*(){yield te.updateValue(h.unicodeHighlightConfigKeys.includeStrings,!1,2)})}}e.DisableHighlightingInStringsAction=P;class x extends _.EditorAction{constructor(){super({id:x.ID,label:o.localize(14,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=o.localize(13,null)}run(te,re,H){return Ee(this,void 0,void 0,function*(){const B=te?.get(l.IConfigurationService);B&&this.runAction(B)})}runAction(te){return Ee(this,void 0,void 0,function*(){yield te.updateValue(h.unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)})}}x.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters",e.DisableHighlightingOfAmbiguousCharactersAction=x;class W extends _.EditorAction{constructor(){super({id:W.ID,label:o.localize(16,null),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=o.localize(15,null)}run(te,re,H){return Ee(this,void 0,void 0,function*(){const B=te?.get(l.IConfigurationService);B&&this.runAction(B)})}runAction(te){return Ee(this,void 0,void 0,function*(){yield te.updateValue(h.unicodeHighlightConfigKeys.invisibleCharacters,!1,2)})}}W.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters",e.DisableHighlightingOfInvisibleCharactersAction=W;class U extends _.EditorAction{constructor(){super({id:U.ID,label:o.localize(18,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=o.localize(17,null)}run(te,re,H){return Ee(this,void 0,void 0,function*(){const B=te?.get(l.IConfigurationService);B&&this.runAction(B)})}runAction(te){return Ee(this,void 0,void 0,function*(){yield te.updateValue(h.unicodeHighlightConfigKeys.nonBasicASCII,!1,2)})}}U.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters",e.DisableHighlightingOfNonBasicAsciiCharactersAction=U;class O extends _.EditorAction{constructor(){super({id:O.ID,label:o.localize(19,null),alias:"Show Exclude Options",precondition:void 0})}run(te,re,H){return Ee(this,void 0,void 0,function*(){const{codePoint:B,reason:j,inString:G,inComment:Y}=H,ne=String.fromCodePoint(B),de=te.get(u.IQuickInputService),he=te.get(l.IConfigurationService);function oe(V){return b.InvisibleCharacters.isInvisibleCharacter(V)?o.localize(20,null,T(V)):o.localize(21,null,`${T(V)} "${ne}"`)}const ce=[];if(j.kind===0)for(const V of j.notAmbiguousInLocales)ce.push({label:o.localize(22,null,V),run:()=>Ee(this,void 0,void 0,function*(){Q(he,[V])})});if(ce.push({label:oe(B),run:()=>$(he,[B])}),Y){const V=new A;ce.push({label:V.label,run:()=>Ee(this,void 0,void 0,function*(){return V.runAction(he)})})}else if(G){const V=new P;ce.push({label:V.label,run:()=>Ee(this,void 0,void 0,function*(){return V.runAction(he)})})}if(j.kind===0){const V=new x;ce.push({label:V.label,run:()=>Ee(this,void 0,void 0,function*(){return V.runAction(he)})})}else if(j.kind===1){const V=new W;ce.push({label:V.label,run:()=>Ee(this,void 0,void 0,function*(){return V.runAction(he)})})}else if(j.kind===2){const V=new U;ce.push({label:V.label,run:()=>Ee(this,void 0,void 0,function*(){return V.runAction(he)})})}else se(j);const z=yield de.pick(ce,{title:o.localize(23,null)});z&&(yield z.run())})}}O.ID="editor.action.unicodeHighlight.showExcludeOptions",e.ShowExcludeOptions=O;function $(le,te){return Ee(this,void 0,void 0,function*(){const re=le.getValue(h.unicodeHighlightConfigKeys.allowedCharacters);let H;typeof re=="object"&&re?H=re:H={};for(const B of te)H[String.fromCodePoint(B)]=!0;yield le.updateValue(h.unicodeHighlightConfigKeys.allowedCharacters,H,2)})}function Q(le,te){var re;return Ee(this,void 0,void 0,function*(){const H=(re=le.inspect(h.unicodeHighlightConfigKeys.allowedLocales).user)===null||re===void 0?void 0:re.value;let B;typeof H=="object"&&H?B=Object.assign({},H):B={};for(const j of te)B[j]=!0;yield le.updateValue(h.unicodeHighlightConfigKeys.allowedLocales,B,2)})}function se(le){throw new Error(`Unexpected value: ${le}`)}(0,_.registerEditorAction)(x),(0,_.registerEditorAction)(W),(0,_.registerEditorAction)(U),(0,_.registerEditorAction)(O),(0,_.registerEditorContribution)(v.ID,v,1),r.HoverParticipantRegistry.register(I)}),define(J[861],ee([1,0,180,183,332,309,741,821,742,743,744,780,823,845,750,745,852,746,825,853,334,335,751,752,717,859,238,339,337,340,754,847,832,755,756,833,834,757,839,784,806,807,808,759,239,849,346,760,762,318,860,763,840,325,764,758,82,160]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(J[240],ee([1,0,9,7,44,6,112,2,17,102,20,147,227,64,13,5,53,61,176,25,27,317,14,148,8,706,36,708,111,311,709,149,43,71,79,154,123,82,42,30,62,348,57,711,729,815,51,716,110,315,38,801,223,818,817,331,122,710,88,28,738,712,96,704,222,705,178,181,89,715,47,78,83,732,177,713,256,11,33,330,312,851,70,802,696]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T,F,R,M,N,A,P,x,W,U,O,$,Q,se,le,te,re,H,B,j,G,Y,ne,de,he,oe,ce,z,V,K,ie,X,Z,ue,me,Ce,_e,we,ye,ke,De,ge,pe,ae,ve,Le,Ie,Ae){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.updateConfigurationService=e.StandaloneConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.StandaloneNotificationService=void 0;class be{constructor(Re){this.disposed=!1,this.model=Re,this._onWillDispose=new D.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let Se=class{constructor(Re){this.modelService=Re}createModelReference(Re){const ze=this.modelService.getModel(Re);return ze?Promise.resolve(new b.ImmortalReference(new be(ze))):Promise.reject(new Error("Model not found"))}};Se=Ne([fe(0,c.IModelService)],Se);class Te{show(){return Te.NULL_PROGRESS_RUNNER}showWhile(Re,ze){return Ee(this,void 0,void 0,function*(){yield Re})}}Te.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Pe{withProgress(Re,ze,He){return ze({report:()=>{}})}}class Fe{confirm(Re){return Ee(this,void 0,void 0,function*(){return{confirmed:this.doConfirm(Re.message,Re.detail),checkboxChecked:!1}})}doConfirm(Re,ze){let He=Re;return ze&&(He=He+`\n\n`+ze),window.confirm(He)}prompt(Re){var ze,He;return Ee(this,void 0,void 0,function*(){let je;if(this.doConfirm(Re.message,Re.detail)){const Qe=[...(ze=Re.buttons)!==null&&ze!==void 0?ze:[]];Re.cancelButton&&typeof Re.cancelButton!="string"&&typeof Re.cancelButton!="boolean"&&Qe.push(Re.cancelButton),je=yield(He=Qe[0])===null||He===void 0?void 0:He.run({checkboxChecked:!1})}return{result:je}})}error(Re,ze){return Ee(this,void 0,void 0,function*(){yield this.prompt({type:h.default.Error,message:Re,detail:ze})})}}class Oe{info(Re){return this.notify({severity:h.default.Info,message:Re})}warn(Re){return this.notify({severity:h.default.Warning,message:Re})}error(Re){return this.notify({severity:h.default.Error,message:Re})}notify(Re){switch(Re.severity){case h.default.Error:console.error(Re.message);break;case h.default.Warning:console.warn(Re.message);break;default:console.log(Re.message);break}return Oe.NO_OP}prompt(Re,ze,He,je){return Oe.NO_OP}status(Re,ze){return b.Disposable.None}}Oe.NO_OP=new R.NoOpNotification,e.StandaloneNotificationService=Oe;let xe=class{constructor(Re){this._onWillExecuteCommand=new D.Emitter,this._onDidExecuteCommand=new D.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=Re}executeCommand(Re,...ze){const He=l.CommandsRegistry.getCommand(Re);if(!He)return Promise.reject(new Error(`command \'${Re}\' not found`));try{this._onWillExecuteCommand.fire({commandId:Re,args:ze});const je=this._instantiationService.invokeFunction.apply(this._instantiationService,[He.handler,...ze]);return this._onDidExecuteCommand.fire({commandId:Re,args:ze}),Promise.resolve(je)}catch(je){return Promise.reject(je)}}};xe=Ne([fe(0,f.IInstantiationService)],xe),e.StandaloneCommandService=xe;let Ke=class extends v.AbstractKeybindingService{constructor(Re,ze,He,je,tt,Qe){super(Re,ze,He,je,tt),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const it=gt=>{const yt=new b.DisposableStore;yt.add(k.addDisposableListener(gt,k.EventType.KEY_DOWN,Mt=>{const Et=new y.StandardKeyboardEvent(Mt);this._dispatch(Et,Et.target)&&(Et.preventDefault(),Et.stopPropagation())})),yt.add(k.addDisposableListener(gt,k.EventType.KEY_UP,Mt=>{const Et=new y.StandardKeyboardEvent(Mt);this._singleModifierDispatch(Et,Et.target)&&Et.preventDefault()})),this._domNodeListeners.push(new Ye(gt,yt))},rt=gt=>{for(let yt=0;yt<this._domNodeListeners.length;yt++){const Mt=this._domNodeListeners[yt];Mt.domNode===gt&&(this._domNodeListeners.splice(yt,1),Mt.dispose())}},at=gt=>{gt.getOption(59)||it(gt.getContainerDomNode())},wt=gt=>{gt.getOption(59)||rt(gt.getContainerDomNode())};this._register(Qe.onCodeEditorAdd(at)),this._register(Qe.onCodeEditorRemove(wt)),Qe.listCodeEditors().forEach(at);const vt=gt=>{it(gt.getContainerDomNode())},jt=gt=>{rt(gt.getContainerDomNode())};this._register(Qe.onDiffEditorAdd(vt)),this._register(Qe.onDiffEditorRemove(jt)),Qe.listDiffEditors().forEach(vt)}addDynamicKeybinding(Re,ze,He,je){return(0,b.combinedDisposable)(l.CommandsRegistry.registerCommand(Re,He),this.addDynamicKeybindings([{keybinding:ze,command:Re,when:je}]))}addDynamicKeybindings(Re){const ze=Re.map(He=>{var je;return{keybinding:(0,w.decodeKeybinding)(He.keybinding,_.OS),command:(je=He.command)!==null&&je!==void 0?je:null,commandArgs:He.commandArgs,when:He.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(ze),this.updateResolver(),(0,b.toDisposable)(()=>{for(let He=0;He<this._dynamicKeybindings.length;He++)if(this._dynamicKeybindings[He]===ze[0]){this._dynamicKeybindings.splice(He,ze.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const Re=this._toNormalizedKeybindingItems(E.KeybindingsRegistry.getDefaultKeybindings(),!0),ze=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new L.KeybindingResolver(Re,ze,He=>this._log(He))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(Re,ze){const He=[];let je=0;for(const tt of Re){const Qe=tt.when||void 0,it=tt.keybinding;if(!it)He[je++]=new I.ResolvedKeybindingItem(void 0,tt.command,tt.commandArgs,Qe,ze,null,!1);else{const rt=T.USLayoutResolvedKeybinding.resolveKeybinding(it,_.OS);for(const at of rt)He[je++]=new I.ResolvedKeybindingItem(at,tt.command,tt.commandArgs,Qe,ze,null,!1)}}return He}resolveKeyboardEvent(Re){const ze=new w.KeyCodeChord(Re.ctrlKey,Re.shiftKey,Re.altKey,Re.metaKey,Re.keyCode);return new T.USLayoutResolvedKeybinding([ze],_.OS)}};Ke=Ne([fe(0,u.IContextKeyService),fe(1,l.ICommandService),fe(2,N.ITelemetryService),fe(3,R.INotificationService),fe(4,O.ILogService),fe(5,U.ICodeEditorService)],Ke),e.StandaloneKeybindingService=Ke;class Ye extends b.Disposable{constructor(Re,ze){super(),this.domNode=Re,this._register(ze)}}function qe(Ze){return Ze&&typeof Ze=="object"&&(!Ze.overrideIdentifier||typeof Ze.overrideIdentifier=="string")&&(!Ze.resource||Ze.resource instanceof m.URI)}class st{constructor(){this._onDidChangeConfiguration=new D.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const Re=new ae.DefaultConfiguration;this._configuration=new d.Configuration(Re.reload(),new d.ConfigurationModel,new d.ConfigurationModel,new d.ConfigurationModel),Re.dispose()}getValue(Re,ze){const He=typeof Re=="string"?Re:void 0,je=qe(Re)?Re:qe(ze)?ze:{};return this._configuration.getValue(He,je,void 0)}updateValues(Re){const ze={data:this._configuration.toData()},He=[];for(const je of Re){const[tt,Qe]=je;this.getValue(tt)!==Qe&&(this._configuration.updateValue(tt,Qe),He.push(tt))}if(He.length>0){const je=new d.ConfigurationChangeEvent({keys:He,overrides:[]},ze,this._configuration);je.source=8,je.sourceConfig=null,this._onDidChangeConfiguration.fire(je)}return Promise.resolve()}updateValue(Re,ze,He,je){return this.updateValues([[Re,ze]])}inspect(Re,ze={}){return this._configuration.inspect(Re,ze,void 0)}}e.StandaloneConfigurationService=st;let Ve=class{constructor(Re,ze,He){this.configurationService=Re,this.modelService=ze,this.languageService=He,this._onDidChangeConfiguration=new D.Emitter,this.configurationService.onDidChangeConfiguration(je=>{this._onDidChangeConfiguration.fire({affectedKeys:je.affectedKeys,affectsConfiguration:(tt,Qe)=>je.affectsConfiguration(Qe)})})}getValue(Re,ze,He){const je=s.Position.isIPosition(ze)?ze:null,tt=je?typeof He=="string"?He:void 0:typeof ze=="string"?ze:void 0,Qe=Re?this.getLanguage(Re,je):void 0;return typeof tt>"u"?this.configurationService.getValue({resource:Re,overrideIdentifier:Qe}):this.configurationService.getValue(tt,{resource:Re,overrideIdentifier:Qe})}getLanguage(Re,ze){const He=this.modelService.getModel(Re);return He?ze?He.getLanguageIdAtPosition(ze.lineNumber,ze.column):He.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(Re)}};Ve=Ne([fe(0,a.IConfigurationService),fe(1,c.IModelService),fe(2,G.ILanguageService)],Ve);let Me=class{constructor(Re){this.configurationService=Re}getEOL(Re,ze){const He=this.configurationService.getValue("files.eol",{overrideIdentifier:ze,resource:Re});return He&&typeof He=="string"&&He!=="auto"?He:_.isLinux||_.isMacintosh?`\n`:`\\r\n`}};Me=Ne([fe(0,a.IConfigurationService)],Me);class Be{publicLog2(){}}class We{constructor(){const Re=m.URI.from({scheme:We.SCHEME,authority:"model",path:"/"});this.workspace={id:A.STANDALONE_EDITOR_WORKSPACE_ID,folders:[new A.WorkspaceFolder({uri:Re,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(Re){return Re&&Re.scheme===We.SCHEME?this.workspace.folders[0]:null}}We.SCHEME="inmemory";function $e(Ze,Re,ze){if(!Re||!(Ze instanceof st))return;const He=[];Object.keys(Re).forEach(je=>{(0,t.isEditorConfigurationKey)(je)&&He.push([`editor.${je}`,Re[je]]),ze&&(0,t.isDiffEditorConfigurationKey)(je)&&He.push([`diffEditor.${je}`,Re[je]])}),He.length>0&&Ze.updateValues(He)}e.updateConfigurationService=$e;let Ue=class{constructor(Re){this._modelService=Re}hasPreviewHandler(){return!1}apply(Re,ze){return Ee(this,void 0,void 0,function*(){const He=Array.isArray(Re)?Re:n.ResourceEdit.convert(Re),je=new Map;for(const it of He){if(!(it instanceof n.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const rt=this._modelService.getModel(it.resource);if(!rt)throw new Error("bad edit - model not found");if(typeof it.versionId=="number"&&rt.getVersionId()!==it.versionId)throw new Error("bad state - model changed in the meantime");let at=je.get(rt);at||(at=[],je.set(rt,at)),at.push(i.EditOperation.replaceMove(r.Range.lift(it.textEdit.range),it.textEdit.text))}let tt=0,Qe=0;for(const[it,rt]of je)it.pushStackElement(),it.pushEditOperations([],rt,()=>[]),it.pushStackElement(),Qe+=1,tt+=rt.length;return{ariaSummary:S.format(x.StandaloneServicesNLS.bulkEditServiceSummary,tt,Qe),isApplied:tt>0}})}};Ue=Ne([fe(0,c.IModelService)],Ue);class Xe{getUriLabel(Re,ze){return Re.scheme==="file"?Re.fsPath:Re.path}getUriBasenameLabel(Re){return(0,W.basename)(Re)}}let Je=class extends se.ContextViewService{constructor(Re,ze){super(Re),this._codeEditorService=ze}showContextView(Re,ze,He){if(!ze){const je=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();je&&(ze=je.getContainerDomNode())}return super.showContextView(Re,ze,He)}};Je=Ne([fe(0,P.ILayoutService),fe(1,U.ICodeEditorService)],Je);class nt{constructor(){this._neverEmitter=new D.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class dt extends le.LanguageService{constructor(){super()}}class Ge extends Le.LogService{constructor(){super(new O.ConsoleLogger)}}let lt=class extends te.ContextMenuService{constructor(Re,ze,He,je,tt,Qe){super(Re,ze,He,je,tt,Qe),this.configure({blockMouse:!1})}};lt=Ne([fe(0,N.ITelemetryService),fe(1,R.INotificationService),fe(2,Q.IContextViewService),fe(3,p.IKeybindingService),fe(4,K.IMenuService),fe(5,u.IContextKeyService)],lt);class ut{playAudioCue(Re,ze){return Ee(this,void 0,void 0,function*(){})}}(0,re.registerSingleton)(a.IConfigurationService,st,0),(0,re.registerSingleton)(o.ITextResourceConfigurationService,Ve,0),(0,re.registerSingleton)(o.ITextResourcePropertiesService,Me,0),(0,re.registerSingleton)(A.IWorkspaceContextService,We,0),(0,re.registerSingleton)(F.ILabelService,Xe,0),(0,re.registerSingleton)(N.ITelemetryService,Be,0),(0,re.registerSingleton)(C.IDialogService,Fe,0),(0,re.registerSingleton)(R.INotificationService,Oe,0),(0,re.registerSingleton)(ye.IMarkerService,ke.MarkerService,0),(0,re.registerSingleton)(G.ILanguageService,dt,0),(0,re.registerSingleton)(ce.IStandaloneThemeService,oe.StandaloneThemeService,0),(0,re.registerSingleton)(O.ILogService,Ge,0),(0,re.registerSingleton)(c.IModelService,de.ModelService,0),(0,re.registerSingleton)(ne.IMarkerDecorationsService,Y.MarkerDecorationsService,0),(0,re.registerSingleton)(u.IContextKeyService,ue.ContextKeyService,0),(0,re.registerSingleton)(M.IProgressService,Pe,0),(0,re.registerSingleton)(M.IEditorProgressService,Te,0),(0,re.registerSingleton)(pe.IStorageService,pe.InMemoryStorageService,0),(0,re.registerSingleton)(B.IEditorWorkerService,j.EditorWorkerService,0),(0,re.registerSingleton)(n.IBulkEditService,Ue,0),(0,re.registerSingleton)($.IWorkspaceTrustManagementService,nt,0),(0,re.registerSingleton)(g.ITextModelService,Se,0),(0,re.registerSingleton)(V.IAccessibilityService,z.AccessibilityService,0),(0,re.registerSingleton)(we.IListService,we.ListService,0),(0,re.registerSingleton)(l.ICommandService,xe,0),(0,re.registerSingleton)(p.IKeybindingService,Ke,0),(0,re.registerSingleton)(ge.IQuickInputService,he.StandaloneQuickInputService,0),(0,re.registerSingleton)(Q.IContextViewService,Je,0),(0,re.registerSingleton)(De.IOpenerService,H.OpenerService,0),(0,re.registerSingleton)(Z.IClipboardService,X.BrowserClipboardService,0),(0,re.registerSingleton)(Q.IContextMenuService,lt,0),(0,re.registerSingleton)(K.IMenuService,ie.MenuService,0),(0,re.registerSingleton)(ve.IAudioCueService,ut,0);var ot;(function(Ze){const Re=new _e.ServiceCollection;for(const[Qe,it]of(0,re.getSingletonServiceDescriptors)())Re.set(Qe,it);const ze=new Ce.InstantiationService(Re,!0);Re.set(f.IInstantiationService,ze);function He(Qe){const it=Re.get(Qe);if(!it)throw new Error("Missing service "+Qe);return it instanceof me.SyncDescriptor?ze.invokeFunction(rt=>rt.get(Qe)):it}Ze.get=He;let je=!1;function tt(Qe){if(je)return ze;je=!0;for(const[rt,at]of(0,re.getSingletonServiceDescriptors)())Re.get(rt)||Re.set(rt,at);for(const rt in Qe)if(Qe.hasOwnProperty(rt)){const at=(0,f.createDecorator)(rt);Re.get(at)instanceof me.SyncDescriptor&&Re.set(at,Qe[rt])}const it=(0,Ie.getEditorFeatures)();for(const rt of it)try{ze.createInstance(rt)}catch(at){(0,Ae.onUnexpectedError)(at)}return ze}Ze.initialize=tt})(ot=e.StandaloneServices||(e.StandaloneServices={}))}),define(J[862],ee([1,0,50,2,30,183,332,255,240,122,28,25,27,14,57,8,36,43,24,88,82,96,71,53,38,330,72,33,19]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTextModel=e.StandaloneDiffEditor=e.StandaloneEditor=e.StandaloneCodeEditor=void 0;let I=0,T=!1;function F(x){if(!x){if(T)return;T=!0}S.setARIAContainer(x||document.body)}let R=class extends D.CodeEditorWidget{constructor(W,U,O,$,Q,se,le,te,re,H,B,j){const G=Object.assign({},U);G.ariaLabel=G.ariaLabel||a.StandaloneCodeEditorNLS.editorViewAccessibleLabel,G.ariaLabel=G.ariaLabel+";"+a.StandaloneCodeEditorNLS.accessibilityHelpMessage,super(W,G,{},O,$,Q,se,te,re,H,B,j),le instanceof _.StandaloneKeybindingService?this._standaloneKeybindingService=le:this._standaloneKeybindingService=null,F(G.ariaContainerElement)}addCommand(W,U,O){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const $="DYNAMIC_"+ ++I,Q=i.ContextKeyExpr.deserialize(O);return this._standaloneKeybindingService.addDynamicKeybinding($,W,U,Q),$}createContextKey(W,U){return this._contextKeyService.createKey(W,U)}addAction(W){if(typeof W.id!="string"||typeof W.label!="string"||typeof W.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"),k.Disposable.None;const U=W.id,O=W.label,$=i.ContextKeyExpr.and(i.ContextKeyExpr.equals("editorId",this.getId()),i.ContextKeyExpr.deserialize(W.precondition)),Q=W.keybindings,se=i.ContextKeyExpr.and($,i.ContextKeyExpr.deserialize(W.keybindingContext)),le=W.contextMenuGroupId||null,te=W.contextMenuOrder||0,re=(G,...Y)=>Promise.resolve(W.run(this,...Y)),H=new k.DisposableStore,B=this.getId()+":"+U;if(H.add(n.CommandsRegistry.registerCommand(B,re)),le){const G={command:{id:B,title:O},when:$,group:le,order:te};H.add(m.MenuRegistry.appendMenuItem(m.MenuId.EditorContext,G))}if(Array.isArray(Q))for(const G of Q)H.add(this._standaloneKeybindingService.addDynamicKeybinding(B,G,re,se));const j=new b.InternalEditorAction(B,O,O,$,(...G)=>Promise.resolve(W.run(this,...G)),this._contextKeyService);return this._actions.set(U,j),H.add((0,k.toDisposable)(()=>{this._actions.delete(U)})),H}_triggerCommand(W,U){if(this._codeEditorService instanceof v.StandaloneCodeEditorService)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(W,U)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(W,U)}};R=Ne([fe(2,r.IInstantiationService),fe(3,y.ICodeEditorService),fe(4,n.ICommandService),fe(5,i.IContextKeyService),fe(6,c.IKeybindingService),fe(7,o.IThemeService),fe(8,g.INotificationService),fe(9,l.IAccessibilityService),fe(10,L.ILanguageConfigurationService),fe(11,E.ILanguageFeaturesService)],R),e.StandaloneCodeEditor=R;let M=class extends R{constructor(W,U,O,$,Q,se,le,te,re,H,B,j,G,Y,ne){const de=Object.assign({},U);(0,_.updateConfigurationService)(H,de,!1);const he=te.registerEditorContainer(W);typeof de.theme=="string"&&te.setTheme(de.theme),typeof de.autoDetectHighContrast<"u"&&te.setAutoDetectHighContrast(!!de.autoDetectHighContrast);const oe=de.model;delete de.model,super(W,de,O,$,Q,se,le,te,re,B,Y,ne),this._configurationService=H,this._standaloneThemeService=te,this._register(he);let ce;if(typeof oe>"u"){const z=G.getLanguageIdByMimeType(de.language)||de.language||p.PLAINTEXT_LANGUAGE_ID;ce=A(j,G,de.value||"",z,void 0),this._ownsModel=!0}else ce=oe,this._ownsModel=!1;if(this._attachModel(ce),ce){const z={oldModelUrl:null,newModelUrl:ce.uri};this._onDidChangeModel.fire(z)}}dispose(){super.dispose()}updateOptions(W){(0,_.updateConfigurationService)(this._configurationService,W,!1),typeof W.theme=="string"&&this._standaloneThemeService.setTheme(W.theme),typeof W.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!W.autoDetectHighContrast),super.updateOptions(W)}_postDetachModelCleanup(W){super._postDetachModelCleanup(W),W&&this._ownsModel&&(W.dispose(),this._ownsModel=!1)}};M=Ne([fe(2,r.IInstantiationService),fe(3,y.ICodeEditorService),fe(4,n.ICommandService),fe(5,i.IContextKeyService),fe(6,c.IKeybindingService),fe(7,h.IStandaloneThemeService),fe(8,g.INotificationService),fe(9,t.IConfigurationService),fe(10,l.IAccessibilityService),fe(11,C.IModelService),fe(12,f.ILanguageService),fe(13,L.ILanguageConfigurationService),fe(14,E.ILanguageFeaturesService)],M),e.StandaloneEditor=M;let N=class extends w.DiffEditorWidget{constructor(W,U,O,$,Q,se,le,te,re,H,B){const j=Object.assign({},U);(0,_.updateConfigurationService)(te,j,!0);const G=se.registerEditorContainer(W);typeof j.theme=="string"&&se.setTheme(j.theme),typeof j.autoDetectHighContrast<"u"&&se.setAutoDetectHighContrast(!!j.autoDetectHighContrast),super(W,j,{},B,$,O,Q,se,le,re,H),this._configurationService=te,this._standaloneThemeService=se,this._register(G)}dispose(){super.dispose()}updateOptions(W){(0,_.updateConfigurationService)(this._configurationService,W,!0),typeof W.theme=="string"&&this._standaloneThemeService.setTheme(W.theme),typeof W.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!W.autoDetectHighContrast),super.updateOptions(W)}_createInnerEditor(W,U,O){return W.createInstance(R,U,O)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(W,U,O){return this.getModifiedEditor().addCommand(W,U,O)}createContextKey(W,U){return this.getModifiedEditor().createContextKey(W,U)}addAction(W){return this.getModifiedEditor().addAction(W)}};N=Ne([fe(2,r.IInstantiationService),fe(3,i.IContextKeyService),fe(4,y.ICodeEditorService),fe(5,h.IStandaloneThemeService),fe(6,g.INotificationService),fe(7,t.IConfigurationService),fe(8,s.IContextMenuService),fe(9,u.IEditorProgressService),fe(10,d.IClipboardService)],N),e.StandaloneDiffEditor=N;function A(x,W,U,O,$){if(U=U||"",!O){const Q=U.indexOf(`\n`);let se=U;return Q!==-1&&(se=U.substring(0,Q)),P(x,U,W.createByFilepathOrFirstLine($||null,se),$)}return P(x,U,W.createById(O),$)}e.createTextModel=A;function P(x,W,U,O){return x.createModel(W,U,O)}}),define(J[863],ee([1,0,2,9,20,301,30,309,40,221,166,48,26,33,145,38,53,724,194,699,862,240,122,25,89,36,15,28,14,72,165,103,144,47,438]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r,c,g,o,l,a,d,u,C,f,v,p,L,E,I,T,F,R,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoEditorAPI=e.registerLinkOpener=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.removeAllMarkers=e.setModelMarkers=e.setModelLanguage=e.createModel=e.addKeybindingRules=e.addKeybindingRule=e.addEditorAction=e.addCommand=e.createDiffNavigator=e.createDiffEditor=e.getDiffEditors=e.getEditors=e.onDidCreateDiffEditor=e.onDidCreateEditor=e.create=void 0;function N(ye,ke,De){return d.StandaloneServices.initialize(De||{}).createInstance(a.StandaloneEditor,ye,ke)}e.create=N;function A(ye){return d.StandaloneServices.get(w.ICodeEditorService).onCodeEditorAdd(De=>{ye(De)})}e.onDidCreateEditor=A;function P(ye){return d.StandaloneServices.get(w.ICodeEditorService).onDiffEditorAdd(De=>{ye(De)})}e.onDidCreateDiffEditor=P;function x(){return d.StandaloneServices.get(w.ICodeEditorService).listCodeEditors()}e.getEditors=x;function W(){return d.StandaloneServices.get(w.ICodeEditorService).listDiffEditors()}e.getDiffEditors=W;function U(ye,ke,De){return d.StandaloneServices.initialize(De||{}).createInstance(a.StandaloneDiffEditor,ye,ke)}e.createDiffEditor=U;function O(ye,ke){return d.StandaloneServices.initialize({}).createInstance(b.DiffNavigator,ye,ke)}e.createDiffNavigator=O;function $(ye){if(typeof ye.id!="string"||typeof ye.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return C.CommandsRegistry.registerCommand(ye.id,ye.run)}e.addCommand=$;function Q(ye){if(typeof ye.id!="string"||typeof ye.label!="string"||typeof ye.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const ke=E.ContextKeyExpr.deserialize(ye.precondition),De=(pe,...ae)=>p.EditorCommand.runEditorCommand(pe,ae,ke,(ve,Le,Ie)=>Promise.resolve(ye.run(Le,...Ie))),ge=new S.DisposableStore;if(ge.add(C.CommandsRegistry.registerCommand(ye.id,De)),ye.contextMenuGroupId){const pe={command:{id:ye.id,title:ye.label},when:ke,group:ye.contextMenuGroupId,order:ye.contextMenuOrder||0};ge.add(L.MenuRegistry.appendMenuItem(L.MenuId.EditorContext,pe))}if(Array.isArray(ye.keybindings)){const pe=d.StandaloneServices.get(v.IKeybindingService);if(!(pe instanceof d.StandaloneKeybindingService))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const ae=E.ContextKeyExpr.and(ke,E.ContextKeyExpr.deserialize(ye.keybindingContext));ge.add(pe.addDynamicKeybindings(ye.keybindings.map(ve=>({keybinding:ve,command:ye.id,when:ae}))))}}return ge}e.addEditorAction=Q;function se(ye){return le([ye])}e.addKeybindingRule=se;function le(ye){const ke=d.StandaloneServices.get(v.IKeybindingService);return ke instanceof d.StandaloneKeybindingService?ke.addDynamicKeybindings(ye.map(De=>({keybinding:De.keybinding,command:De.command,commandArgs:De.commandArgs,when:E.ContextKeyExpr.deserialize(De.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),S.Disposable.None)}e.addKeybindingRules=le;function te(ye,ke,De){const ge=d.StandaloneServices.get(r.ILanguageService),pe=ge.getLanguageIdByMimeType(ke)||ke;return(0,a.createTextModel)(d.StandaloneServices.get(c.IModelService),ge,ye,pe,De)}e.createModel=te;function re(ye,ke){const De=d.StandaloneServices.get(r.ILanguageService),ge=De.getLanguageIdByMimeType(ke)||ke||I.PLAINTEXT_LANGUAGE_ID;ye.setLanguage(De.createById(ge))}e.setModelLanguage=re;function H(ye,ke,De){ye&&d.StandaloneServices.get(f.IMarkerService).changeOne(ke,ye.uri,De)}e.setModelMarkers=H;function B(ye){d.StandaloneServices.get(f.IMarkerService).changeAll(ye,[])}e.removeAllMarkers=B;function j(ye){return d.StandaloneServices.get(f.IMarkerService).read(ye)}e.getModelMarkers=j;function G(ye){return d.StandaloneServices.get(f.IMarkerService).onMarkerChanged(ye)}e.onDidChangeMarkers=G;function Y(ye){return d.StandaloneServices.get(c.IModelService).getModel(ye)}e.getModel=Y;function ne(){return d.StandaloneServices.get(c.IModelService).getModels()}e.getModels=ne;function de(ye){return d.StandaloneServices.get(c.IModelService).onModelAdded(ye)}e.onDidCreateModel=de;function he(ye){return d.StandaloneServices.get(c.IModelService).onModelRemoved(ye)}e.onWillDisposeModel=he;function oe(ye){return d.StandaloneServices.get(c.IModelService).onModelLanguageChanged(De=>{ye({model:De.model,oldLanguage:De.oldLanguageId})})}e.onDidChangeModelLanguage=oe;function ce(ye){return(0,g.createWebWorker)(d.StandaloneServices.get(c.IModelService),d.StandaloneServices.get(i.ILanguageConfigurationService),ye)}e.createWebWorker=ce;function z(ye,ke){const De=d.StandaloneServices.get(r.ILanguageService),ge=d.StandaloneServices.get(u.IStandaloneThemeService);return ge.registerEditorContainer(ye),l.Colorizer.colorizeElement(ge,De,ye,ke)}e.colorizeElement=z;function V(ye,ke,De){const ge=d.StandaloneServices.get(r.ILanguageService);return d.StandaloneServices.get(u.IStandaloneThemeService).registerEditorContainer(document.body),l.Colorizer.colorize(ge,ye,ke,De)}e.colorize=V;function K(ye,ke,De=4){return d.StandaloneServices.get(u.IStandaloneThemeService).registerEditorContainer(document.body),l.Colorizer.colorizeModelLine(ye,ke,De)}e.colorizeModelLine=K;function ie(ye){const ke=t.TokenizationRegistry.get(ye);return ke||{getInitialState:()=>s.NullState,tokenize:(De,ge,pe)=>(0,s.nullTokenize)(ye,pe)}}function X(ye,ke){t.TokenizationRegistry.getOrCreate(ke);const De=ie(ke),ge=(0,k.splitLines)(ye),pe=[];let ae=De.getInitialState();for(let ve=0,Le=ge.length;ve<Le;ve++){const Ie=ge[ve],Ae=De.tokenize(Ie,!0,ae);pe[ve]=Ae.tokens,ae=Ae.endState}return pe}e.tokenize=X;function Z(ye,ke){d.StandaloneServices.get(u.IStandaloneThemeService).defineTheme(ye,ke)}e.defineTheme=Z;function ue(ye){d.StandaloneServices.get(u.IStandaloneThemeService).setTheme(ye)}e.setTheme=ue;function me(){D.FontMeasurements.clearAllFontInfos()}e.remeasureFonts=me;function Ce(ye,ke){return C.CommandsRegistry.registerCommand({id:ye,handler:ke})}e.registerCommand=Ce;function _e(ye){return d.StandaloneServices.get(M.IOpenerService).registerOpener({open(De){return Ee(this,void 0,void 0,function*(){return typeof De=="string"&&(De=y.URI.parse(De)),ye.open(De)})}})}e.registerLinkOpener=_e;function we(){return{create:N,getEditors:x,getDiffEditors:W,onDidCreateEditor:A,onDidCreateDiffEditor:P,createDiffEditor:U,createDiffNavigator:O,addCommand:$,addEditorAction:Q,addKeybindingRule:se,addKeybindingRules:le,createModel:te,setModelLanguage:re,setModelMarkers:H,getModelMarkers:j,removeAllMarkers:B,onDidChangeMarkers:G,getModels:ne,getModel:Y,onDidCreateModel:de,onWillDisposeModel:he,onDidChangeModelLanguage:oe,createWebWorker:ce,colorizeElement:z,colorize:V,colorizeModelLine:K,tokenize:X,defineTheme:Z,setTheme:ue,remeasureFonts:me,registerCommand:Ce,registerLinkOpener:_e,AccessibilitySupport:o.AccessibilitySupport,ContentWidgetPositionPreference:o.ContentWidgetPositionPreference,CursorChangeReason:o.CursorChangeReason,DefaultEndOfLine:o.DefaultEndOfLine,EditorAutoIndentStrategy:o.EditorAutoIndentStrategy,EditorOption:o.EditorOption,EndOfLinePreference:o.EndOfLinePreference,EndOfLineSequence:o.EndOfLineSequence,MinimapPosition:o.MinimapPosition,MouseTargetType:o.MouseTargetType,OverlayWidgetPositionPreference:o.OverlayWidgetPositionPreference,OverviewRulerLane:o.OverviewRulerLane,RenderLineNumbersType:o.RenderLineNumbersType,RenderMinimap:o.RenderMinimap,ScrollbarVisibility:o.ScrollbarVisibility,ScrollType:o.ScrollType,TextEditorCursorBlinkingStyle:o.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:o.TextEditorCursorStyle,TrackedRangeStickiness:o.TrackedRangeStickiness,WrappingIndent:o.WrappingIndent,InjectedTextCursorStops:o.InjectedTextCursorStops,PositionAffinity:o.PositionAffinity,ConfigurationChangedEvent:_.ConfigurationChangedEvent,BareFontInfo:h.BareFontInfo,FontInfo:h.FontInfo,TextModelResolvedOptions:n.TextModelResolvedOptions,FindMatch:n.FindMatch,ApplyUpdateResult:_.ApplyUpdateResult,LineRange:F.LineRange,LineRangeMapping:T.LineRangeMapping,RangeMapping:T.RangeMapping,EditorZoom:R.EditorZoom,EditorType:m.EditorType,EditorOptions:_.EditorOptions}}e.createMonacoEditorAPI=we}),define(J[864],ee([1,0,37,5,26,33,72,38,194,240,511,308,122,89,19,27]),function(q,e,S,k,y,D,w,b,_,h,m,n,t,i,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoLanguagesAPI=e.registerInlayHintsProvider=e.registerInlineCompletionsProvider=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.registerTokensProviderFactory=e.setColorMap=e.TokenizationSupportAdapter=e.EncodedTokenizationSupportAdapter=e.setLanguageConfiguration=e.onLanguageEncountered=e.onLanguage=e.getEncodedLanguageId=e.getLanguages=e.register=void 0;function c(V){w.ModesRegistry.registerLanguage(V)}e.register=c;function g(){let V=[];return V=V.concat(w.ModesRegistry.getLanguages()),V}e.getLanguages=g;function o(V){return h.StandaloneServices.get(b.ILanguageService).languageIdCodec.encodeLanguageId(V)}e.getEncodedLanguageId=o;function l(V,K){const X=h.StandaloneServices.get(b.ILanguageService).onDidRequestRichLanguageFeatures(Z=>{Z===V&&(X.dispose(),K())});return X}e.onLanguage=l;function a(V,K){const X=h.StandaloneServices.get(b.ILanguageService).onDidRequestBasicLanguageFeatures(Z=>{Z===V&&(X.dispose(),K())});return X}e.onLanguageEncountered=a;function d(V,K){if(!h.StandaloneServices.get(b.ILanguageService).isRegisteredLanguageId(V))throw new Error(`Cannot set configuration for unknown language ${V}`);return h.StandaloneServices.get(D.ILanguageConfigurationService).register(V,K,100)}e.setLanguageConfiguration=d;class u{constructor(K,ie){this._languageId=K,this._actual=ie}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(K,ie,X){if(typeof this._actual.tokenize=="function")return C.adaptTokenize(this._languageId,this._actual,K,X);throw new Error("Not supported!")}tokenizeEncoded(K,ie,X){const Z=this._actual.tokenizeEncoded(K,X);return new y.EncodedTokenizationResult(Z.tokens,Z.endState)}}e.EncodedTokenizationSupportAdapter=u;class C{constructor(K,ie,X,Z){this._languageId=K,this._actual=ie,this._languageService=X,this._standaloneThemeService=Z}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(K,ie){const X=[];let Z=0;for(let ue=0,me=K.length;ue<me;ue++){const Ce=K[ue];let _e=Ce.startIndex;ue===0?_e=0:_e<Z&&(_e=Z),X[ue]=new y.Token(_e,Ce.scopes,ie),Z=_e}return X}static adaptTokenize(K,ie,X,Z){const ue=ie.tokenize(X,Z),me=C._toClassicTokens(ue.tokens,K);let Ce;return ue.endState.equals(Z)?Ce=Z:Ce=ue.endState,new y.TokenizationResult(me,Ce)}tokenize(K,ie,X){return C.adaptTokenize(this._languageId,this._actual,K,X)}_toBinaryTokens(K,ie){const X=K.encodeLanguageId(this._languageId),Z=this._standaloneThemeService.getColorTheme().tokenTheme,ue=[];let me=0,Ce=0;for(let we=0,ye=ie.length;we<ye;we++){const ke=ie[we],De=Z.match(X,ke.scopes)|1024;if(me>0&&ue[me-1]===De)continue;let ge=ke.startIndex;we===0?ge=0:ge<Ce&&(ge=Ce),ue[me++]=ge,ue[me++]=De,Ce=ge}const _e=new Uint32Array(me);for(let we=0;we<me;we++)_e[we]=ue[we];return _e}tokenizeEncoded(K,ie,X){const Z=this._actual.tokenize(K,X),ue=this._toBinaryTokens(this._languageService.languageIdCodec,Z.tokens);let me;return Z.endState.equals(X)?me=X:me=Z.endState,new y.EncodedTokenizationResult(ue,me)}}e.TokenizationSupportAdapter=C;function f(V){return typeof V.getInitialState=="function"}function v(V){return"tokenizeEncoded"in V}function p(V){return V&&typeof V.then=="function"}function L(V){const K=h.StandaloneServices.get(t.IStandaloneThemeService);if(V){const ie=[null];for(let X=1,Z=V.length;X<Z;X++)ie[X]=S.Color.fromHex(V[X]);K.setColorMapOverride(ie)}else K.setColorMapOverride(null)}e.setColorMap=L;function E(V,K){return v(K)?new u(V,K):new C(V,K,h.StandaloneServices.get(b.ILanguageService),h.StandaloneServices.get(t.IStandaloneThemeService))}function I(V,K){const ie=new y.LazyTokenizationSupport(()=>Ee(this,void 0,void 0,function*(){const X=yield Promise.resolve(K.create());return X?f(X)?E(V,X):new n.MonarchTokenizer(h.StandaloneServices.get(b.ILanguageService),h.StandaloneServices.get(t.IStandaloneThemeService),V,(0,m.compile)(V,X),h.StandaloneServices.get(r.IConfigurationService)):null}));return y.TokenizationRegistry.registerFactory(V,ie)}e.registerTokensProviderFactory=I;function T(V,K){if(!h.StandaloneServices.get(b.ILanguageService).isRegisteredLanguageId(V))throw new Error(`Cannot set tokens provider for unknown language ${V}`);return p(K)?I(V,{create:()=>K}):y.TokenizationRegistry.register(V,E(V,K))}e.setTokensProvider=T;function F(V,K){const ie=X=>new n.MonarchTokenizer(h.StandaloneServices.get(b.ILanguageService),h.StandaloneServices.get(t.IStandaloneThemeService),V,(0,m.compile)(V,X),h.StandaloneServices.get(r.IConfigurationService));return p(K)?I(V,{create:()=>K}):y.TokenizationRegistry.register(V,ie(K))}e.setMonarchTokensProvider=F;function R(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).referenceProvider.register(V,K)}e.registerReferenceProvider=R;function M(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).renameProvider.register(V,K)}e.registerRenameProvider=M;function N(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).signatureHelpProvider.register(V,K)}e.registerSignatureHelpProvider=N;function A(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).hoverProvider.register(V,{provideHover:(X,Z,ue)=>{const me=X.getWordAtPosition(Z);return Promise.resolve(K.provideHover(X,Z,ue)).then(Ce=>{if(Ce)return!Ce.range&&me&&(Ce.range=new k.Range(Z.lineNumber,me.startColumn,Z.lineNumber,me.endColumn)),Ce.range||(Ce.range=new k.Range(Z.lineNumber,Z.column,Z.lineNumber,Z.column)),Ce})}})}e.registerHoverProvider=A;function P(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).documentSymbolProvider.register(V,K)}e.registerDocumentSymbolProvider=P;function x(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).documentHighlightProvider.register(V,K)}e.registerDocumentHighlightProvider=x;function W(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).linkedEditingRangeProvider.register(V,K)}e.registerLinkedEditingRangeProvider=W;function U(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).definitionProvider.register(V,K)}e.registerDefinitionProvider=U;function O(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).implementationProvider.register(V,K)}e.registerImplementationProvider=O;function $(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).typeDefinitionProvider.register(V,K)}e.registerTypeDefinitionProvider=$;function Q(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).codeLensProvider.register(V,K)}e.registerCodeLensProvider=Q;function se(V,K,ie){return h.StandaloneServices.get(s.ILanguageFeaturesService).codeActionProvider.register(V,{providedCodeActionKinds:ie?.providedCodeActionKinds,documentation:ie?.documentation,provideCodeActions:(Z,ue,me,Ce)=>{const we=h.StandaloneServices.get(i.IMarkerService).read({resource:Z.uri}).filter(ye=>k.Range.areIntersectingOrTouching(ye,ue));return K.provideCodeActions(Z,ue,{markers:we,only:me.only,trigger:me.trigger},Ce)},resolveCodeAction:K.resolveCodeAction})}e.registerCodeActionProvider=se;function le(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).documentFormattingEditProvider.register(V,K)}e.registerDocumentFormattingEditProvider=le;function te(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).documentRangeFormattingEditProvider.register(V,K)}e.registerDocumentRangeFormattingEditProvider=te;function re(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).onTypeFormattingEditProvider.register(V,K)}e.registerOnTypeFormattingEditProvider=re;function H(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).linkProvider.register(V,K)}e.registerLinkProvider=H;function B(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).completionProvider.register(V,K)}e.registerCompletionItemProvider=B;function j(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).colorProvider.register(V,K)}e.registerColorProvider=j;function G(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).foldingRangeProvider.register(V,K)}e.registerFoldingRangeProvider=G;function Y(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).declarationProvider.register(V,K)}e.registerDeclarationProvider=Y;function ne(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).selectionRangeProvider.register(V,K)}e.registerSelectionRangeProvider=ne;function de(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).documentSemanticTokensProvider.register(V,K)}e.registerDocumentSemanticTokensProvider=de;function he(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).documentRangeSemanticTokensProvider.register(V,K)}e.registerDocumentRangeSemanticTokensProvider=he;function oe(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).inlineCompletionsProvider.register(V,K)}e.registerInlineCompletionsProvider=oe;function ce(V,K){return h.StandaloneServices.get(s.ILanguageFeaturesService).inlayHintsProvider.register(V,K)}e.registerInlayHintsProvider=ce;function z(){return{register:c,getLanguages:g,onLanguage:l,onLanguageEncountered:a,getEncodedLanguageId:o,setLanguageConfiguration:d,setColorMap:L,registerTokensProviderFactory:I,setTokensProvider:T,setMonarchTokensProvider:F,registerReferenceProvider:R,registerRenameProvider:M,registerCompletionItemProvider:B,registerSignatureHelpProvider:N,registerHoverProvider:A,registerDocumentSymbolProvider:P,registerDocumentHighlightProvider:x,registerLinkedEditingRangeProvider:W,registerDefinitionProvider:U,registerImplementationProvider:O,registerTypeDefinitionProvider:$,registerCodeLensProvider:Q,registerCodeActionProvider:se,registerDocumentFormattingEditProvider:le,registerDocumentRangeFormattingEditProvider:te,registerOnTypeFormattingEditProvider:re,registerLinkProvider:H,registerColorProvider:j,registerFoldingRangeProvider:G,registerDeclarationProvider:Y,registerSelectionRangeProvider:ne,registerDocumentSemanticTokensProvider:de,registerDocumentRangeSemanticTokensProvider:he,registerInlineCompletionsProvider:oe,registerInlayHintsProvider:ce,DocumentHighlightKind:_.DocumentHighlightKind,CompletionItemKind:_.CompletionItemKind,CompletionItemTag:_.CompletionItemTag,CompletionItemInsertTextRule:_.CompletionItemInsertTextRule,SymbolKind:_.SymbolKind,SymbolTag:_.SymbolTag,IndentAction:_.IndentAction,CompletionTriggerKind:_.CompletionTriggerKind,SignatureHelpTriggerKind:_.SignatureHelpTriggerKind,InlayHintKind:_.InlayHintKind,InlineCompletionTriggerKind:_.InlineCompletionTriggerKind,CodeActionTriggerType:_.CodeActionTriggerType,FoldingRangeKind:y.FoldingRangeKind}}e.createMonacoLanguagesAPI=z}),define(J[865],ee([1,0,40,297,863,864,323]),function(q,e,S,k,y,D,w){"use strict";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,S.EditorOptions.wrappingIndent.defaultValue=0,S.EditorOptions.glyphMargin.defaultValue=!1,S.EditorOptions.autoIndent.defaultValue=3,S.EditorOptions.overviewRulerLanes.defaultValue=2,w.FormattingConflicts.setFormatterSelector((h,m,n)=>Promise.resolve(h[0]));const b=(0,k.createMonacoBaseAPI)();b.editor=(0,y.createMonacoEditorAPI)(),b.languages=(0,D.createMonacoLanguagesAPI)(),e.CancellationTokenSource=b.CancellationTokenSource,e.Emitter=b.Emitter,e.KeyCode=b.KeyCode,e.KeyMod=b.KeyMod,e.Position=b.Position,e.Range=b.Range,e.Selection=b.Selection,e.SelectionDirection=b.SelectionDirection,e.MarkerSeverity=b.MarkerSeverity,e.MarkerTag=b.MarkerTag,e.Uri=b.Uri,e.Token=b.Token,e.editor=b.editor,e.languages=b.languages;const _=globalThis.MonacoEnvironment;(_?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=b),typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.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"]})});var An=this&&this.__createBinding||(Object.create?function(q,e,S,k){k===void 0&&(k=S);var y=Object.getOwnPropertyDescriptor(e,S);(!y||("get"in y?!e.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return e[S]}}),Object.defineProperty(q,k,y)}:function(q,e,S,k){k===void 0&&(k=S),q[k]=e[S]}),Pn=this&&this.__exportStar||function(q,e){for(var S in q)S!=="default"&&!Object.prototype.hasOwnProperty.call(e,S)&&An(e,q,S)};define(J[867],ee([1,0,865,861,765,766,767,734,810,811,771,850,813]),function(q,e,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Pn(S,e)})}).call(this);\n\n\n"use strict";/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\ndefine("vs/basic-languages/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{\nvar moduleExports=(()=>{var y=Object.create;var g=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var a=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(r,s)=>(typeof require!="undefined"?require:r)[s]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error(\'Dynamic require of "\'+e+\'" is not supported\')});var D=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var m=(e,r,s,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of q(r))!M.call(e,o)&&o!==s&&g(e,o,{get:()=>r[o],enumerable:!(n=x(r,o))||n.enumerable});return e},p=(e,r,s)=>(m(e,r,"default"),s&&m(s,r,"default")),c=(e,r,s)=>(s=e!=null?y(A(e)):{},m(r||!e||!e.__esModule?g(s,"default",{value:e,enumerable:!0}):s,e));var f=D((w,d)=>{var b=c(a("vs/editor/editor.api"));d.exports=b});var t={};p(t,c(f()));var v={},u={},l=class{static getOrCreate(r){return u[r]||(u[r]=new l(r)),u[r]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(r){this._languageId=r,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((s,n)=>{this._lazyLoadPromiseResolve=s,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,v[this._languageId].loader().then(r=>this._lazyLoadPromiseResolve(r),r=>this._lazyLoadPromiseReject(r))),this._lazyLoadPromise}};function i(e){let r=e.id;v[r]=e,t.languages.register(e);let s=l.getOrCreate(r);t.languages.registerTokensProviderFactory(r,{create:async()=>(await s.load()).language}),t.languages.onLanguageEncountered(r,async()=>{let n=await s.load();t.languages.setLanguageConfiguration(r,n.conf)})}i({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/abap/abap"],e,r)})});i({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/apex/apex"],e,r)})});i({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/azcli/azcli"],e,r)})});i({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/bat/bat"],e,r)})});i({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/bicep/bicep"],e,r)})});i({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cameligo/cameligo"],e,r)})});i({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/clojure/clojure"],e,r)})});i({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/coffee/coffee"],e,r)})});i({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cpp/cpp"],e,r)})});i({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cpp/cpp"],e,r)})});i({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/csharp/csharp"],e,r)})});i({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/csp/csp"],e,r)})});i({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/css/css"],e,r)})});i({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cypher/cypher"],e,r)})});i({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/dart/dart"],e,r)})});i({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/dockerfile/dockerfile"],e,r)})});i({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ecl/ecl"],e,r)})});i({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/elixir/elixir"],e,r)})});i({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/flow9/flow9"],e,r)})});i({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/fsharp/fsharp"],e,r)})});i({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationDollar)});i({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationDollar)});i({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagBracketInterpolationDollar)});i({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationBracket)});i({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagBracketInterpolationBracket)});i({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAutoInterpolationDollar)});i({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAutoInterpolationBracket)});i({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/go/go"],e,r)})});i({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/graphql/graphql"],e,r)})});i({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/handlebars/handlebars"],e,r)})});i({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/hcl/hcl"],e,r)})});i({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:()=>new Promise((e,r)=>{a(["vs/basic-languages/html/html"],e,r)})});i({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ini/ini"],e,r)})});i({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/java/java"],e,r)})});i({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/javascript/javascript"],e,r)})});i({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/julia/julia"],e,r)})});i({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/kotlin/kotlin"],e,r)})});i({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/less/less"],e,r)})});i({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/lexon/lexon"],e,r)})});i({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/lua/lua"],e,r)})});i({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/liquid/liquid"],e,r)})});i({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/m3/m3"],e,r)})});i({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/markdown/markdown"],e,r)})});i({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mips/mips"],e,r)})});i({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/msdax/msdax"],e,r)})});i({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mysql/mysql"],e,r)})});i({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/objective-c/objective-c"],e,r)})});i({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pascal/pascal"],e,r)})});i({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pascaligo/pascaligo"],e,r)})});i({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/perl/perl"],e,r)})});i({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pgsql/pgsql"],e,r)})});i({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/php/php"],e,r)})});i({id:"pla",extensions:[".pla"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pla/pla"],e,r)})});i({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/postiats/postiats"],e,r)})});i({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/powerquery/powerquery"],e,r)})});i({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/powershell/powershell"],e,r)})});i({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/protobuf/protobuf"],e,r)})});i({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pug/pug"],e,r)})});i({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\\\bpython[0-9.-]*\\\\b",loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/python/python"],e,r)})});i({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/qsharp/qsharp"],e,r)})});i({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/r/r"],e,r)})});i({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/razor/razor"],e,r)})});i({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/redis/redis"],e,r)})});i({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/redshift/redshift"],e,r)})});i({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/restructuredtext/restructuredtext"],e,r)})});i({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ruby/ruby"],e,r)})});i({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/rust/rust"],e,r)})});i({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sb/sb"],e,r)})});i({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:()=>new Promise((e,r)=>{a(["vs/basic-languages/scala/scala"],e,r)})});i({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scheme/scheme"],e,r)})});i({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scss/scss"],e,r)})});i({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/shell/shell"],e,r)})});i({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/solidity/solidity"],e,r)})});i({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sophia/sophia"],e,r)})});i({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sparql/sparql"],e,r)})});i({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sql/sql"],e,r)})});i({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/st/st"],e,r)})});i({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/swift/swift"],e,r)})});i({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/systemverilog/systemverilog"],e,r)})});i({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/systemverilog/systemverilog"],e,r)})});i({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/tcl/tcl"],e,r)})});i({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/twig/twig"],e,r)})});i({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/typescript/typescript"],e,r)})});i({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/vb/vb"],e,r)})});i({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/wgsl/wgsl"],e,r)})});i({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\\\<\\\\?xml.*)|(\\\\<svg)|(\\\\<\\\\!doctype\\\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/xml/xml"],e,r)})});i({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/yaml/yaml"],e,r)})});})();\nreturn moduleExports;\n});\n\n"use strict";/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\ndefine("vs/language/css/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{\nvar moduleExports=(()=>{var C=Object.create;var g=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var l=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,r)=>(typeof require!="undefined"?require:n)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error(\'Dynamic require of "\'+e+\'" is not supported\')});var I=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),M=(e,n)=>{for(var r in n)g(e,r,{get:n[r],enumerable:!0})},s=(e,n,r,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of b(n))!h.call(e,t)&&t!==r&&g(e,t,{get:()=>n[t],enumerable:!(a=S(n,t))||a.enumerable});return e},y=(e,n,r)=>(s(e,n,"default"),r&&s(r,n,"default")),w=(e,n,r)=>(r=e!=null?C(x(e)):{},s(n||!e||!e.__esModule?g(r,"default",{value:e,enumerable:!0}):r,e)),P=e=>s(g({},"__esModule",{value:!0}),e);var v=I((k,D)=>{var O=w(l("vs/editor/editor.api"));D.exports=O});var R={};M(R,{cssDefaults:()=>p,lessDefaults:()=>f,scssDefaults:()=>c});var o={};y(o,w(v()));var i=class{_onDidChange=new o.Emitter;_options;_modeConfiguration;_languageId;constructor(n,r,a){this._languageId=n,this.setOptions(r),this.setModeConfiguration(a)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(n){this.setOptions(n)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},d={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"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},u={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},p=new i("css",d,u),c=new i("scss",d,u),f=new i("less",d,u);o.languages.css={cssDefaults:p,lessDefaults:f,scssDefaults:c};function m(){return new Promise((e,n)=>{l(["vs/language/css/cssMode"],e,n)})}o.languages.onLanguage("less",()=>{m().then(e=>e.setupMode(f))});o.languages.onLanguage("scss",()=>{m().then(e=>e.setupMode(c))});o.languages.onLanguage("css",()=>{m().then(e=>e.setupMode(p))});return P(R);})();\nreturn moduleExports;\n});\n\n"use strict";/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\ndefine("vs/language/html/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{\nvar moduleExports=(()=>{var w=Object.create;var l=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var f=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,t)=>(typeof require!="undefined"?require:n)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error(\'Dynamic require of "\'+e+\'" is not supported\')});var k=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),T=(e,n)=>{for(var t in n)l(e,t,{get:n[t],enumerable:!0})},d=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of H(n))!_.call(e,o)&&o!==t&&l(e,o,{get:()=>n[o],enumerable:!(r=R(n,o))||r.enumerable});return e},b=(e,n,t)=>(d(e,n,"default"),t&&d(t,n,"default")),v=(e,n,t)=>(t=e!=null?w(O(e)):{},d(n||!e||!e.__esModule?l(t,"default",{value:e,enumerable:!0}):t,e)),A=e=>d(l({},"__esModule",{value:!0}),e);var C=k((z,h)=>{var E=v(f("vs/editor/editor.api"));h.exports=E});var V={};T(V,{handlebarDefaults:()=>M,handlebarLanguageService:()=>m,htmlDefaults:()=>x,htmlLanguageService:()=>c,razorDefaults:()=>I,razorLanguageService:()=>y,registerHTMLLanguageService:()=>s});var a={};b(a,v(C()));var p=class{_onDidChange=new a.Emitter;_options;_modeConfiguration;_languageId;constructor(n,t,r){this._languageId=n,this.setOptions(t),this.setModeConfiguration(r)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},F={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:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},u={format:F,suggest:{},data:{useDefaultDataProvider:!0}};function g(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===i,documentFormattingEdits:e===i,documentRangeFormattingEdits:e===i}}var i="html",D="handlebars",L="razor",c=s(i,u,g(i)),x=c.defaults,m=s(D,u,g(D)),M=m.defaults,y=s(L,u,g(L)),I=y.defaults;a.languages.html={htmlDefaults:x,razorDefaults:I,handlebarDefaults:M,htmlLanguageService:c,handlebarLanguageService:m,razorLanguageService:y,registerHTMLLanguageService:s};function P(){return new Promise((e,n)=>{f(["vs/language/html/htmlMode"],e,n)})}function s(e,n=u,t=g(e)){let r=new p(e,n,t),o,S=a.languages.onLanguage(e,async()=>{o=(await P()).setupMode(r)});return{defaults:r,dispose(){S.dispose(),o?.dispose(),o=void 0}}}return A(V);})();\nreturn moduleExports;\n});\n\n"use strict";/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\ndefine("vs/language/json/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{\nvar moduleExports=(()=>{var p=Object.create;var r=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var g=(o=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(o,{get:(e,n)=>(typeof require!="undefined"?require:e)[n]}):o)(function(o){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error(\'Dynamic require of "\'+o+\'" is not supported\')});var D=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),b=(o,e)=>{for(var n in e)r(o,n,{get:e[n],enumerable:!0})},s=(o,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of h(e))!C.call(o,i)&&i!==n&&r(o,i,{get:()=>e[i],enumerable:!(a=y(e,i))||a.enumerable});return o},u=(o,e,n)=>(s(o,e,"default"),n&&s(n,e,"default")),c=(o,e,n)=>(n=o!=null?p(v(o)):{},s(e||!o||!o.__esModule?r(n,"default",{value:o,enumerable:!0}):n,o)),O=o=>s(r({},"__esModule",{value:!0}),o);var f=D((w,m)=>{var M=c(g("vs/editor/editor.api"));m.exports=M});var R={};b(R,{jsonDefaults:()=>d});var t={};u(t,c(f()));var l=class{_onDidChange=new t.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(e,n,a){this._languageId=e,this.setDiagnosticsOptions(n),this.setModeConfiguration(a)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},j={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},S={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},d=new l("json",j,S);t.languages.json={jsonDefaults:d};function _(){return new Promise((o,e)=>{g(["vs/language/json/jsonMode"],o,e)})}t.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});t.languages.onLanguage("json",()=>{_().then(o=>o.setupMode(d))});return O(R);})();\nreturn moduleExports;\n});\n\n"use strict";/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\ndefine("vs/language/typescript/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{\nvar moduleExports=(()=>{var N=Object.create;var d=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var c=(n=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(n,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):n)(function(n){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error(\'Dynamic require of "\'+n+\'" is not supported\')});var w=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),A=(n,e)=>{for(var t in e)d(n,t,{get:e[t],enumerable:!0})},g=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of M(e))!F.call(n,r)&&r!==t&&d(n,r,{get:()=>e[r],enumerable:!(i=H(e,r))||i.enumerable});return n},D=(n,e,t)=>(g(n,e,"default"),t&&g(t,e,"default")),C=(n,e,t)=>(t=n!=null?N(R(n)):{},g(e||!n||!n.__esModule?d(t,"default",{value:n,enumerable:!0}):t,n)),W=n=>g(d({},"__esModule",{value:!0}),n);var _=w((B,E)=>{var V=C(c("vs/editor/editor.api"));E.exports=V});var T={};A(T,{JsxEmit:()=>f,ModuleKind:()=>b,ModuleResolutionKind:()=>O,NewLineKind:()=>y,ScriptTarget:()=>h,getJavaScriptWorker:()=>k,getTypeScriptWorker:()=>P,javascriptDefaults:()=>v,typescriptDefaults:()=>x,typescriptVersion:()=>I});var L="5.0.2";var l={};D(l,C(_()));var b=(s=>(s[s.None=0]="None",s[s.CommonJS=1]="CommonJS",s[s.AMD=2]="AMD",s[s.UMD=3]="UMD",s[s.System=4]="System",s[s.ES2015=5]="ES2015",s[s.ESNext=99]="ESNext",s))(b||{}),f=(a=>(a[a.None=0]="None",a[a.Preserve=1]="Preserve",a[a.React=2]="React",a[a.ReactNative=3]="ReactNative",a[a.ReactJSX=4]="ReactJSX",a[a.ReactJSXDev=5]="ReactJSXDev",a))(f||{}),y=(t=>(t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed",t))(y||{}),h=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(h||{}),O=(t=>(t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs",t))(O||{}),m=class{_onDidChange=new l.Emitter;_onDidExtraLibsChange=new l.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;_modeConfiguration;constructor(e,t,i,r,p){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(r),this.setModeConfiguration(p),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let r=1;return this._removedExtraLibs[i]&&(r=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(r=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let p=this._extraLibs[i];!p||p.version===r&&(delete this._extraLibs[i],this._removedExtraLibs[i]=r,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let t of e){let i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,r=t.content,p=1;this._removedExtraLibs[i]&&(p=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:r,version:p}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},I=L,S={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},x=new m({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},S),v=new m({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},S),P=()=>u().then(n=>n.getTypeScriptWorker()),k=()=>u().then(n=>n.getJavaScriptWorker());l.languages.typescript={ModuleKind:b,JsxEmit:f,NewLineKind:y,ScriptTarget:h,ModuleResolutionKind:O,typescriptVersion:I,typescriptDefaults:x,javascriptDefaults:v,getTypeScriptWorker:P,getJavaScriptWorker:k};function u(){return new Promise((n,e)=>{c(["vs/language/typescript/tsMode"],n,e)})}l.languages.onLanguage("typescript",()=>u().then(n=>n.setupTypeScript(x)));l.languages.onLanguage("javascript",()=>u().then(n=>n.setupJavaScript(v)));return W(T);})();\nreturn moduleExports;\n});\n\ndefine("vs/editor/editor.main", ["vs/editor/edcore.main","vs/basic-languages/monaco.contribution","vs/language/css/monaco.contribution","vs/language/html/monaco.contribution","vs/language/json/monaco.contribution","vs/language/typescript/monaco.contribution"], function(api) { return api; });\n//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map'},5802:e=>{e.exports='/*!-----------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773)\n * Released under the MIT license\n * https://github.com/microsoft/vscode/blob/main/LICENSE.txt\n *-----------------------------------------------------------*/define("vs/editor/editor.main.nls",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["input"],"vs/base/browser/ui/findinput/findInputToggles":["Match Case","Match Whole Word","Use Regular Expression"],"vs/base/browser/ui/findinput/replaceInput":["input","Preserve Case"],"vs/base/browser/ui/iconLabel/iconLabelHover":["Loading..."],"vs/base/browser/ui/inputbox/inputBox":["Error: {0}","Warning: {0}","Info: {0}","for history"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["Unbound"],"vs/base/browser/ui/selectBox/selectBoxCustom":["Select Box"],"vs/base/browser/ui/toolbar/toolbar":["More Actions..."],"vs/base/browser/ui/tree/abstractTree":["Filter","Fuzzy Match","Type to filter","Type to search","Type to search","Close","No elements found."],"vs/base/common/actions":["(empty)"],"vs/base/common/errorMessage":["{0}: {1}","A system error occurred ({0})","An unknown error occurred. Please consult the log for more details.","An unknown error occurred. Please consult the log for more details.","{0} ({1} errors in total)","An unknown error occurred. Please consult the log for more details."],"vs/base/common/keybindingLabels":["Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","Super","Control","Shift","Option","Command","Control","Shift","Alt","Windows","Control","Shift","Alt","Super"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["editor","The editor is not accessible at this time. Press {0} for options."],"vs/editor/browser/coreCommands":["Stick to the end even when going to longer lines","Stick to the end even when going to longer lines","Removed secondary cursors"],"vs/editor/browser/editorExtensions":["&&Undo","Undo","&&Redo","Redo","&&Select All","Select All"],"vs/editor/browser/widget/codeEditorWidget":["The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.","Increase Multi Cursor Limit"],"vs/editor/browser/widget/diffEditorWidget":["Line decoration for inserts in the diff editor.","Line decoration for removals in the diff editor."," use Shift + F7 to navigate changes","Cannot compare files because one file is too large."],"vs/editor/browser/widget/diffReview":["Icon for \'Insert\' in diff review.","Icon for \'Remove\' in diff review.","Icon for \'Close\' in diff review.","Close","no lines changed","1 line changed","{0} lines changed","Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}","blank","{0} unchanged line {1}","{0} original line {1} modified line {2}","+ {0} modified line {1}","- {0} original line {1}","Go to Next Difference","Go to Previous Difference"],"vs/editor/browser/widget/inlineDiffMargin":["Copy deleted lines","Copy deleted line","Copy changed lines","Copy changed line","Copy deleted line ({0})","Copy changed line ({0})","Revert this change","Copy deleted line ({0})","Copy changed line ({0})"],"vs/editor/common/config/editorConfigurationSchema":["Editor","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.",\'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.\',"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","Remove trailing auto inserted whitespace.","Special handling for large files to disable certain memory intensive features.","Controls whether completions should be computed based on words in the document.","Only suggest words from the active document.","Suggest words from all open documents of the same language.","Suggest words from all open documents.","Controls from which documents word based completions are computed.","Semantic highlighting enabled for all color themes.","Semantic highlighting disabled for all color themes.","Semantic highlighting is configured by the current color theme\'s `semanticHighlighting` setting.","Controls whether the semanticHighlighting is shown for the languages that support it.","Keep peek editors open even when double-clicking their content or when hitting `Escape`.","Lines above this length will not be tokenized for performance reasons","Controls whether the tokenization should happen asynchronously on a web worker.","Controls whether async tokenization should be logged. For debugging only.","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only.","Defines the bracket symbols that increase or decrease the indentation.","The opening bracket character or string sequence.","The closing bracket character or string sequence.","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled.","The opening bracket character or string sequence.","The closing bracket character or string sequence.","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.","Maximum file size in MB for which to compute diffs. Use 0 for no limit.","Controls whether the diff editor shows the diff side by side or inline.","When enabled, the diff editor shows arrows in its glyph margin to revert changes.","When enabled, the diff editor ignores changes in leading or trailing whitespace.","Controls whether the diff editor shows +/- indicators for added/removed changes.","Controls whether the editor shows CodeLens.","Lines will never wrap.","Lines will wrap at the viewport width.","Lines will wrap according to the {0} setting.","Uses the default diffing algorithm.","Uses an experimental diffing algorithm."],"vs/editor/common/config/editorOptions":["Use platform APIs to detect when a Screen Reader is attached","Optimize for usage with a Screen Reader","Assume a screen reader is not attached","Controls if the UI should run in a mode where it is optimized for screen readers.","Controls whether a space character is inserted when commenting.","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.","Controls whether copying without a selection copies the current line.","Controls whether the cursor should jump to find matches while typing.","Never seed search string from the editor selection.","Always seed search string from the editor selection, including word at cursor position.","Only seed search string from the editor selection.","Controls whether the search string in the Find Widget is seeded from the editor selection.","Never turn on Find in Selection automatically (default).","Always turn on Find in Selection automatically.","Turn on Find in Selection automatically when multiple lines of content are selected.","Controls the condition for turning on Find in Selection automatically.","Controls whether the Find Widget should read or modify the shared find clipboard on macOS.","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.","Enables/Disables font ligatures (\'calt\' and \'liga\' font features). Change this to a string for fine-grained control of the \'font-feature-settings\' CSS property.","Explicit \'font-feature-settings\' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS \'font-feature-settings\' property.","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the \'font-variation-settings\' CSS property.","Explicit \'font-variation-settings\' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS \'font-variation-settings\' property.","Controls the font size in pixels.",\'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.\',\'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.\',"Show Peek view of the results (default)","Go to the primary result and show a Peek view","Go to the primary result and enable Peek-less navigation to others","This setting is deprecated, please use separate settings like \'editor.editor.gotoLocation.multipleDefinitions\' or \'editor.editor.gotoLocation.multipleImplementations\' instead.","Controls the behavior the \'Go to Definition\'-command when multiple target locations exist.","Controls the behavior the \'Go to Type Definition\'-command when multiple target locations exist.","Controls the behavior the \'Go to Declaration\'-command when multiple target locations exist.","Controls the behavior the \'Go to Implementations\'-command when multiple target locations exist.","Controls the behavior the \'Go to References\'-command when multiple target locations exist.","Alternative command id that is being executed when the result of \'Go to Definition\' is the current location.","Alternative command id that is being executed when the result of \'Go to Type Definition\' is the current location.","Alternative command id that is being executed when the result of \'Go to Declaration\' is the current location.","Alternative command id that is being executed when the result of \'Go to Implementation\' is the current location.","Alternative command id that is being executed when the result of \'Go to Reference\' is the current location.","Controls whether the hover is shown.","Controls the delay in milliseconds after which the hover is shown.","Controls whether the hover should remain visible when mouse is moved over it.","Prefer showing hovers above the line, if there\'s space.","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width.","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.","Enables the Code Action lightbulb in the editor.","Shows the nested current scopes during the scroll at the top of the editor.","Defines the maximum number of sticky lines to show.","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.","Enables the inlay hints in the editor.","Inlay hints are enabled","Inlay hints are showing by default and hide when holding {0}","Inlay hints are hidden by default and show when holding {0}","Inlay hints are disabled","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","Enables the padding around the inlay hints in the editor.",`Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.`,"Controls whether the minimap is shown.","Controls whether the minimap is hidden automatically.","The minimap has the same size as the editor contents (and might scroll).","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling).","The minimap will shrink as necessary to never be larger than the editor (no scrolling).","Controls the size of the minimap.","Controls the side where to render the minimap.","Controls when the minimap slider is shown.","Scale of content drawn in the minimap: 1, 2 or 3.","Render the actual characters on a line as opposed to color blocks.","Limit the width of the minimap to render at most a certain number of columns.","Controls the amount of space between the top edge of the editor and the first line.","Controls the amount of space between the bottom edge of the editor and the last line.","Enables a pop-up that shows parameter documentation and type information as you type.","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.","Quick suggestions show inside the suggest widget","Quick suggestions show as ghost text","Quick suggestions are disabled","Enable quick suggestions inside strings.","Enable quick suggestions inside comments.","Enable quick suggestions outside of strings and comments.","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the \'{0}\'-setting which controls if suggestions are triggered by special characters.","Line numbers are not rendered.","Line numbers are rendered as absolute number.","Line numbers are rendered as distance in lines to cursor position.","Line numbers are rendered every 10 lines.","Controls the display of line numbers.","Number of monospace characters at which this editor ruler will render.","Color of this editor ruler.","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.","The vertical scrollbar will be visible only when necessary.","The vertical scrollbar will always be visible.","The vertical scrollbar will always be hidden.","Controls the visibility of the vertical scrollbar.","The horizontal scrollbar will be visible only when necessary.","The horizontal scrollbar will always be visible.","The horizontal scrollbar will always be hidden.","Controls the visibility of the horizontal scrollbar.","The width of the vertical scrollbar.","The height of the horizontal scrollbar.","Controls whether clicks scroll by page or jump to click position.","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.","Controls whether characters that just reserve space or have no width at all are highlighted.","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.","Controls whether characters in comments should also be subject to Unicode highlighting.","Controls whether characters in strings should also be subject to Unicode highlighting.","Defines allowed characters that are not being highlighted.","Unicode characters that are common in allowed locales are not being highlighted.","Controls whether to automatically show inline suggestions in the editor.","Show the inline suggestion toolbar whenever an inline suggestion is shown.","Show the inline suggestion toolbar when hovering over an inline suggestion.","Controls when to show the inline suggestion toolbar.","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","Controls whether each bracket type has its own independent color pool.","Enables bracket pair guides.","Enables bracket pair guides only for the active bracket pair.","Disables bracket pair guides.","Controls whether bracket pair guides are enabled or not.","Enables horizontal guides as addition to vertical bracket pair guides.","Enables horizontal guides only for the active bracket pair.","Disables horizontal bracket pair guides.","Controls whether horizontal bracket pair guides are enabled or not.","Controls whether the editor should highlight the active bracket pair.","Controls whether the editor should render indent guides.","Highlights the active indent guide.","Highlights the active indent guide even if bracket guides are highlighted.","Do not highlight the active indent guide.","Controls whether the editor should highlight the active indent guide.","Insert suggestion without overwriting text right of the cursor.","Insert suggestion and overwrite text right of the cursor.","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.","Controls whether filtering and sorting suggestions accounts for small typos.","Controls whether sorting favors words that appear close to the cursor.","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).","Always select a suggestion when automatically triggering IntelliSense.","Never select a suggestion when automatically triggering IntelliSense.","Select a suggestion only when triggering IntelliSense from a trigger character.","Select a suggestion only when triggering IntelliSense as you type.","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","Controls whether an active snippet prevents quick suggestions.","Controls whether to show or hide icons in suggestions.","Controls the visibility of the status bar at the bottom of the suggest widget.","Controls whether to preview the suggestion outcome in the editor.","Controls whether suggest details show inline with the label or only in the details widget.","This setting is deprecated. The suggest widget can now be resized.","This setting is deprecated, please use separate settings like \'editor.suggest.showKeywords\' or \'editor.suggest.showSnippets\' instead.","When enabled IntelliSense shows `method`-suggestions.","When enabled IntelliSense shows `function`-suggestions.","When enabled IntelliSense shows `constructor`-suggestions.","When enabled IntelliSense shows `deprecated`-suggestions.","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.","When enabled IntelliSense shows `field`-suggestions.","When enabled IntelliSense shows `variable`-suggestions.","When enabled IntelliSense shows `class`-suggestions.","When enabled IntelliSense shows `struct`-suggestions.","When enabled IntelliSense shows `interface`-suggestions.","When enabled IntelliSense shows `module`-suggestions.","When enabled IntelliSense shows `property`-suggestions.","When enabled IntelliSense shows `event`-suggestions.","When enabled IntelliSense shows `operator`-suggestions.","When enabled IntelliSense shows `unit`-suggestions.","When enabled IntelliSense shows `value`-suggestions.","When enabled IntelliSense shows `constant`-suggestions.","When enabled IntelliSense shows `enum`-suggestions.","When enabled IntelliSense shows `enumMember`-suggestions.","When enabled IntelliSense shows `keyword`-suggestions.","When enabled IntelliSense shows `text`-suggestions.","When enabled IntelliSense shows `color`-suggestions.","When enabled IntelliSense shows `file`-suggestions.","When enabled IntelliSense shows `reference`-suggestions.","When enabled IntelliSense shows `customcolor`-suggestions.","When enabled IntelliSense shows `folder`-suggestions.","When enabled IntelliSense shows `typeParameter`-suggestions.","When enabled IntelliSense shows `snippet`-suggestions.","When enabled IntelliSense shows `user`-suggestions.","When enabled IntelliSense shows `issues`-suggestions.","Whether leading and trailing whitespace should always be selected.","No indentation. Wrapped lines begin at column 1.","Wrapped lines get the same indentation as the parent.","Wrapped lines get +1 indentation toward the parent.","Wrapped lines get +2 indentation toward the parent.","Controls the indentation of wrapped lines.","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.","Only accept a suggestion with `Enter` when it makes a textual change.","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.","Editor content","Control whether inline suggestions are announced by a screen reader. Note that this does not work on macOS with VoiceOver.","Use language configurations to determine when to autoclose brackets.","Autoclose brackets only when the cursor is to the left of whitespace.","Controls whether the editor should automatically close brackets after the user adds an opening bracket.","Remove adjacent closing quotes or brackets only if they were automatically inserted.","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.","Type over closing quotes or brackets only if they were automatically inserted.","Controls whether the editor should type over closing quotes or brackets.","Use language configurations to determine when to autoclose quotes.","Autoclose quotes only when the cursor is to the left of whitespace.","Controls whether the editor should automatically close quotes after the user adds an opening quote.","The editor will not insert indentation automatically.","The editor will keep the current line\'s indentation.","The editor will keep the current line\'s indentation and honor language defined brackets.","The editor will keep the current line\'s indentation, honor language defined brackets and invoke special onEnterRules defined by languages.","The editor will keep the current line\'s indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.","Use language configurations to determine when to automatically surround selections.","Surround with quotes but not brackets.","Surround with brackets but not quotes.","Controls whether the editor should automatically surround selections when typing quotes or brackets.","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.","Controls whether the editor shows CodeLens.","Controls the font family for CodeLens.","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.","Controls whether the editor should render the inline color decorators and color picker.","Controls the max number of color decorators that can be rendered in an editor at once.","Enable that the selection with the mouse and keys is doing column selection.","Controls whether syntax highlighting should be copied into the clipboard.","Control the cursor animation style.","Smooth caret animation is disabled.","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture.","Smooth caret animation is always enabled.","Controls whether the smooth caret animation should be enabled.","Controls the cursor style.","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as \'scrollOff\' or \'scrollOffset\' in some other editors.","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API.","`cursorSurroundingLines` is enforced always.","Controls when `cursorSurroundingLines` should be enforced.","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.","Controls whether the editor should allow moving selections via drag and drop.","Use a new rendering method with svgs.","Use a new rendering method with font characters.","Use the stable rendering method.","Controls whether whitespace is rendered with a new, experimental method.","Scrolling speed multiplier when pressing `Alt`.","Controls whether the editor has code folding enabled.","Use a language-specific folding strategy if available, else the indentation-based one.","Use the indentation-based folding strategy.","Controls the strategy for computing folding ranges.","Controls whether the editor should highlight folded ranges.","Controls whether the editor automatically collapses import ranges.","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.","Controls whether clicking on the empty content after a folded line will unfold the line.","Controls the font family.","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.","Controls whether the editor should automatically format the line after typing.","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.","Controls whether the cursor should be hidden in the overview ruler.","Controls the letter spacing in pixels.","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.","Controls whether the editor should detect links and make them clickable.","Highlight matching brackets.","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.","Merge multiple cursors when they are overlapping.","Maps to `Control` on Windows and Linux and to `Command` on macOS.","Maps to `Alt` on Windows and Linux and to `Option` on macOS.","The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).","Each cursor pastes a single line of the text.","Each cursor pastes the full text.","Controls pasting when the line count of the pasted text matches the cursor count.","Controls the max number of cursors that can be in an active editor at once.","Controls whether the editor should highlight semantic symbol occurrences.","Controls whether a border should be drawn around the overview ruler.","Focus the tree when opening peek","Focus the editor when opening peek","Controls whether to focus the inline editor or the tree in the peek widget.","Controls whether the Go to Definition mouse gesture always opens the peek widget.","Controls the delay in milliseconds after which quick suggestions will show up.","Controls whether the editor auto renames on type.","Deprecated, use `editor.linkedEditing` instead.","Controls whether the editor should render control characters.","Render last line number when the file ends with a newline.","Highlights both the gutter and the current line.","Controls how the editor should render the current line highlight.","Controls if the editor should render the current line highlight only when the editor is focused.","Render whitespace characters except for single spaces between words.","Render whitespace characters only on selected text.","Render only trailing whitespace characters.","Controls how the editor should render whitespace characters.","Controls whether selections should have rounded corners.","Controls the number of extra characters beyond which the editor will scroll horizontally.","Controls whether the editor will scroll beyond the last line.","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.","Controls whether the Linux primary clipboard should be supported.","Controls whether the editor should highlight matches similar to the selection.","Always show the folding controls.","Never show the folding controls and reduce the gutter size.","Only show the folding controls when the mouse is over the gutter.","Controls when the folding controls on the gutter are shown.","Controls fading out of unused code.","Controls strikethrough deprecated variables.","Show snippet suggestions on top of other suggestions.","Show snippet suggestions below other suggestions.","Show snippets suggestions with other suggestions.","Do not show snippet suggestions.","Controls whether snippets are shown with other suggestions and how they are sorted.","Controls whether the editor will scroll using an animation.","Font size for the suggest widget. When set to {0}, the value of {1} is used.","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","Controls whether suggestions should automatically show up when typing trigger characters.","Always select the first suggestion.","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.","Controls how suggestions are pre-selected when showing the suggest list.","Tab complete will insert the best matching suggestion when pressing tab.","Disable tab completions.","Tab complete snippets when their prefix match. Works best when \'quickSuggestions\' aren\'t enabled.","Enables tab completions.","Unusual line terminators are automatically removed.","Unusual line terminators are ignored.","Unusual line terminators prompt to be removed.","Remove unusual line terminators that might cause problems.","Inserting and deleting whitespace follows tab stops.","Use the default line break rule.","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.","Characters that will be used as word separators when doing word related navigations or operations.","Lines will never wrap.","Lines will wrap at the viewport width.","Lines will wrap at `#editor.wordWrapColumn#`.","Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.","Controls how lines should wrap.","Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.","Controls whether the editor receives tabs or defers them to the workbench for navigation."],"vs/editor/common/core/editorColorRegistry":["Background color for the highlight of line at the cursor position.","Background color for the border around the line at the cursor position.","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations.","Background color of the border around highlighted ranges.","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations.","Background color of the border around highlighted symbols.","Color of the editor cursor.","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.","Color of whitespace characters in the editor.","Color of the editor indentation guides.","Color of the active editor indentation guides.","Color of editor line numbers.","Color of editor active line number","Id is deprecated. Use \'editorLineNumber.activeForeground\' instead.","Color of editor active line number","Color of the final editor line when editor.renderFinalNewline is set to dimmed.","Color of the editor rulers.","Foreground color of editor CodeLens","Background color behind matching brackets","Color for matching brackets boxes","Color of the overview ruler border.","Background color of the editor overview ruler.","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.","Border color of unnecessary (unused) source code in the editor.",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the \'editorUnnecessaryCode.border\' theme color to underline unnecessary code instead of fading it out.`,"Border color of ghost text in the editor.","Foreground color of the ghost text in the editor.","Background color of the ghost text in the editor.","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.","Overview ruler marker color for errors.","Overview ruler marker color for warnings.","Overview ruler marker color for infos.","Foreground color of brackets (1). Requires enabling bracket pair colorization.","Foreground color of brackets (2). Requires enabling bracket pair colorization.","Foreground color of brackets (3). Requires enabling bracket pair colorization.","Foreground color of brackets (4). Requires enabling bracket pair colorization.","Foreground color of brackets (5). Requires enabling bracket pair colorization.","Foreground color of brackets (6). Requires enabling bracket pair colorization.","Foreground color of unexpected brackets.","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.","Border color used to highlight unicode characters.","Background color used to highlight unicode characters."],"vs/editor/common/editorContextKeys":["Whether the editor text has focus (cursor is blinking)","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)","Whether an editor or a rich text input has focus (cursor is blinking)","Whether the editor is read only","Whether the context is a diff editor","Whether `editor.columnSelection` is enabled","Whether the editor has text selected","Whether the editor has multiple selections","Whether `Tab` will move focus out of the editor","Whether the editor hover is visible","Whether the editor hover is focused","Whether the sticky scroll is focused","Whether the sticky scroll is visible","Whether the editor is part of a larger editor (e.g. notebooks)","The language identifier of the editor","Whether the editor has a completion item provider","Whether the editor has a code actions provider","Whether the editor has a code lens provider","Whether the editor has a definition provider","Whether the editor has a declaration provider","Whether the editor has an implementation provider","Whether the editor has a type definition provider","Whether the editor has a hover provider","Whether the editor has a document highlight provider","Whether the editor has a document symbol provider","Whether the editor has a reference provider","Whether the editor has a rename provider","Whether the editor has a signature help provider","Whether the editor has an inline hints provider","Whether the editor has a document formatting provider","Whether the editor has a document selection formatting provider","Whether the editor has multiple document formatting providers","Whether the editor has multiple document selection formatting providers"],"vs/editor/common/languages/modesRegistry":["Plain Text"],"vs/editor/common/model/editStack":["Typing"],"vs/editor/common/standaloneStrings":["No selection","Line {0}, Column {1} ({2} selected)","Line {0}, Column {1}","{0} selections ({1} characters selected)","{0} selections","Now changing the setting `accessibilitySupport` to \'on\'.","Now opening the Editor Accessibility documentation page."," in a read-only pane of a diff editor."," in a pane of a diff editor."," in a read-only code editor"," in a code editor","To configure the editor to be optimized for usage with a Screen Reader press Command+E now.","To configure the editor to be optimized for usage with a Screen Reader press Control+E now.","The editor is configured to be optimized for usage with a Screen Reader.","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time.","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}.","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding.","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}.","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.","Press Command+H now to open a browser window with more information related to editor accessibility.","Press Control+H now to open a browser window with more information related to editor accessibility.","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.","Show Accessibility Help","Developer: Inspect Tokens","Go to Line/Column...","Show all Quick Access Providers","Command Palette","Show And Run Commands","Go to Symbol...","Go to Symbol by Category...","Editor content","Press Alt+F1 for Accessibility Options.","Toggle High Contrast Theme","Made {0} edits in {1} files"],"vs/editor/common/viewLayout/viewLineRenderer":["Show more ({0})","{0} chars"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["Selection Anchor","Anchor set at {0}:{1}","Set Selection Anchor","Go to Selection Anchor","Select from Anchor to Cursor","Cancel Selection Anchor"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["Overview ruler marker color for matching brackets.","Go to Bracket","Select to Bracket","Remove Brackets","Go to &&Bracket"],"vs/editor/contrib/caretOperations/browser/caretOperations":["Move Selected Text Left","Move Selected Text Right"],"vs/editor/contrib/caretOperations/browser/transpose":["Transpose Letters"],"vs/editor/contrib/clipboard/browser/clipboard":["Cu&&t","Cut","Cut","Cut","&&Copy","Copy","Copy","Copy","Copy As","Copy As","Share","Share","Share","&&Paste","Paste","Paste","Paste","Copy With Syntax Highlighting"],"vs/editor/contrib/codeAction/browser/codeAction":["An unknown error occurred while applying the code action"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["Kind of the code action to run.","Controls when the returned actions are applied.","Always apply the first returned code action.","Apply the first returned code action if it is the only one.","Do not apply the returned code actions.","Controls if only preferred code actions should be returned.","Quick Fix...","No code actions available","No preferred code actions for \'{0}\' available","No code actions for \'{0}\' available","No preferred code actions available","No code actions available","Refactor...","No preferred refactorings for \'{0}\' available","No refactorings for \'{0}\' available","No preferred refactorings available","No refactorings available","Source Action...","No preferred source actions for \'{0}\' available","No source actions for \'{0}\' available","No preferred source actions available","No source actions available","Organize Imports","No organize imports action available","Fix All","No fix all action available","Auto Fix...","No auto fixes available"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["Enable/disable showing group headers in the Code Action menu."],"vs/editor/contrib/codeAction/browser/codeActionMenu":["More Actions...","Quick Fix...","Extract...","Inline...","Rewrite...","Move...","Surround With...","Source Action..."],"vs/editor/contrib/codeAction/browser/codeActionUi":["Hide Disabled","Show Disabled"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["Show Code Actions. Preferred Quick Fix Available ({0})","Show Code Actions ({0})","Show Code Actions"],"vs/editor/contrib/codelens/browser/codelensController":["Show CodeLens Commands For Current Line"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["Click to toggle color options (rgb/hsl/hex)"],"vs/editor/contrib/comment/browser/comment":["Toggle Line Comment","&&Toggle Line Comment","Add Line Comment","Remove Line Comment","Toggle Block Comment","Toggle &&Block Comment"],"vs/editor/contrib/contextmenu/browser/contextmenu":["Minimap","Render Characters","Vertical size","Proportional","Fill","Fit","Slider","Mouse Over","Always","Show Editor Context Menu"],"vs/editor/contrib/copyPaste/browser/copyPasteContribution":["Enable/disable running edits from extensions on paste."],"vs/editor/contrib/copyPaste/browser/copyPasteController":["Running paste handlers..."],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["Cursor Undo","Cursor Redo"],"vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution":["Running drop handlers..."],"vs/editor/contrib/editorState/browser/keybindingCancellation":["Whether the editor runs a cancellable operation, e.g. like \'Peek References\'"],"vs/editor/contrib/find/browser/findController":["Find","&&Find",`Overrides "Use Regular Expression" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False`,`Overrides "Match Whole Word" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False`,`Overrides "Math Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False`,`Overrides "Preserve Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False`,"Find With Arguments","Find With Selection","Find Next","Find Previous","Go to Match...","Type a number to go to a specific match (between 1 and {0})","Please type a number between 1 and {0}","Please type a number between 1 and {0}","Find Next Selection","Find Previous Selection","Replace","&&Replace"],"vs/editor/contrib/find/browser/findWidget":["Icon for \'Find in Selection\' in the editor find widget.","Icon to indicate that the editor find widget is collapsed.","Icon to indicate that the editor find widget is expanded.","Icon for \'Replace\' in the editor find widget.","Icon for \'Replace All\' in the editor find widget.","Icon for \'Find Previous\' in the editor find widget.","Icon for \'Find Next\' in the editor find widget.","Find","Find","Previous Match","Next Match","Find in Selection","Close","Replace","Replace","Replace","Replace All","Toggle Replace","Only the first {0} results are highlighted, but all find operations work on the entire text.","{0} of {1}","No results","{0} found","{0} found for \'{1}\'","{0} found for \'{1}\', at {2}","{0} found for \'{1}\'","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior."],"vs/editor/contrib/folding/browser/folding":["Unfold","Unfold Recursively","Fold","Toggle Fold","Fold Recursively","Fold All Block Comments","Fold All Regions","Unfold All Regions","Fold All Regions Except Selected","Unfold All Regions Except Selected","Fold All","Unfold All","Go to Parent Fold","Go to Previous Folding Range","Go to Next Folding Range","Create Folding Range from Selection","Remove Manual Folding Ranges","Fold Level {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations.","Color of the folding control in the editor gutter.","Icon for expanded ranges in the editor glyph margin.","Icon for collapsed ranges in the editor glyph margin.","Icon for manually collapsed ranges in the editor glyph margin.","Icon for manually expanded ranges in the editor glyph margin."],"vs/editor/contrib/fontZoom/browser/fontZoom":["Editor Font Zoom In","Editor Font Zoom Out","Editor Font Zoom Reset"],"vs/editor/contrib/format/browser/format":["Made 1 formatting edit on line {0}","Made {0} formatting edits on line {1}","Made 1 formatting edit between lines {0} and {1}","Made {0} formatting edits between lines {1} and {2}"],"vs/editor/contrib/format/browser/formatActions":["Format Document","Format Selection"],"vs/editor/contrib/gotoError/browser/gotoError":["Go to Next Problem (Error, Warning, Info)","Icon for goto next marker.","Go to Previous Problem (Error, Warning, Info)","Icon for goto previous marker.","Go to Next Problem in Files (Error, Warning, Info)","Next &&Problem","Go to Previous Problem in Files (Error, Warning, Info)","Previous &&Problem"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["Error","Warning","Info","Hint","{0} at {1}. ","{0} of {1} problems","{0} of {1} problem","Editor marker navigation widget error color.","Editor marker navigation widget error heading background.","Editor marker navigation widget warning color.","Editor marker navigation widget warning heading background.","Editor marker navigation widget info color.","Editor marker navigation widget info heading background.","Editor marker navigation widget background."],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["Peek","Definitions","No definition found for \'{0}\'","No definition found","Go to Definition","Go to &&Definition","Open Definition to the Side","Peek Definition","Declarations","No declaration found for \'{0}\'","No declaration found","Go to Declaration","Go to &&Declaration","No declaration found for \'{0}\'","No declaration found","Peek Declaration","Type Definitions","No type definition found for \'{0}\'","No type definition found","Go to Type Definition","Go to &&Type Definition","Peek Type Definition","Implementations","No implementation found for \'{0}\'","No implementation found","Go to Implementations","Go to &&Implementations","Peek Implementations","No references found for \'{0}\'","No references found","Go to References","Go to &&References","References","Peek References","References","Go to Any Symbol","Locations","No results for \'{0}\'","References"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["Click to show {0} definitions."],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":["Whether reference peek is visible, like \'Peek References\' or \'Peek Definition\'","Loading...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} references","{0} reference","References"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["no preview available","No results","References"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["symbol in {0} on line {1} at column {2}","symbol in {0} on line {1} at column {2}, {3}","1 symbol in {0}, full path {1}","{0} symbols in {1}, full path {2}","No results found","Found 1 symbol in {0}","Found {0} symbols in {1}","Found {0} symbols in {1} files"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["Whether there are symbol locations that can be navigated via keyboard-only.","Symbol {0} of {1}, {2} for next","Symbol {0} of {1}"],"vs/editor/contrib/hover/browser/hover":["Show or Focus Hover","Show Definition Preview Hover","Scroll Up Hover","Scroll Down Hover","Scroll Left Hover","Scroll Right Hover","Page Up Hover","Page Down Hover","Go To Top Hover","Go To Bottom Hover","Escape Focus Hover"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["Loading...","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`."],"vs/editor/contrib/hover/browser/markerHoverParticipant":["View Problem","No quick fixes available","Checking for quick fixes...","No quick fixes available","Quick Fix..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["Replace with Previous Value","Replace with Next Value"],"vs/editor/contrib/indentation/browser/indentation":["Convert Indentation to Spaces","Convert Indentation to Tabs","Configured Tab Size","Default Tab Size","Current Tab Size","Select Tab Size for Current File","Indent Using Tabs","Indent Using Spaces","Change Tab Display Size","Detect Indentation from Content","Reindent Lines","Reindent Selected Lines"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["Double-click to insert","cmd + click","ctrl + click","option + click","alt + click","Go to Definition ({0}), right click for more","Go to Definition ({0})","Execute Command"],"vs/editor/contrib/inlineCompletions/browser/ghostTextController":["Whether an inline suggestion is visible","Whether the inline suggestion starts with whitespace","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab","Whether undo would undo an inline suggestion","Whether the inline suggestion toolbar should always be visible","Show Next Inline Suggestion","Show Previous Inline Suggestion","Trigger Inline Suggestion","Accept Next Word Of Inline Suggestion","Accept Word","Accept Inline Suggestion","Accept","Hide Inline Suggestion","Always Show Toolbar","Undo Accept Word","Undo Accept Word"],"vs/editor/contrib/inlineCompletions/browser/ghostTextHoverParticipant":["Suggestion:"],"vs/editor/contrib/inlineCompletions/browser/inlineSuggestionHintsWidget":["Icon for show next parameter hint.","Icon for show previous parameter hint.","{0} ({1})","Previous","Next"],"vs/editor/contrib/lineSelection/browser/lineSelection":["Expand Line Selection"],"vs/editor/contrib/linesOperations/browser/linesOperations":["Copy Line Up","&&Copy Line Up","Copy Line Down","Co&&py Line Down","Duplicate Selection","&&Duplicate Selection","Move Line Up","Mo&&ve Line Up","Move Line Down","Move &&Line Down","Sort Lines Ascending","Sort Lines Descending","Delete Duplicate Lines","Trim Trailing Whitespace","Delete Line","Indent Line","Outdent Line","Insert Line Above","Insert Line Below","Delete All Left","Delete All Right","Join Lines","Transpose characters around the cursor","Transform to Uppercase","Transform to Lowercase","Transform to Title Case","Transform to Snake Case","Transform to Camel Case","Transform to Kebab Case"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["Start Linked Editing","Background color when the editor auto renames on type."],"vs/editor/contrib/links/browser/links":["Failed to open this link because it is not well-formed: {0}","Failed to open this link because its target is missing.","Execute command","Follow link","cmd + click","ctrl + click","option + click","alt + click","Execute command {0}","Open Link"],"vs/editor/contrib/message/browser/messageController":["Whether the editor is currently showing an inline message"],"vs/editor/contrib/multicursor/browser/multicursor":["Cursor added: {0}","Cursors added: {0}","Add Cursor Above","&&Add Cursor Above","Add Cursor Below","A&&dd Cursor Below","Add Cursors to Line Ends","Add C&&ursors to Line Ends","Add Cursors To Bottom","Add Cursors To Top","Add Selection To Next Find Match","Add &&Next Occurrence","Add Selection To Previous Find Match","Add P&&revious Occurrence","Move Last Selection To Next Find Match","Move Last Selection To Previous Find Match","Select All Occurrences of Find Match","Select All &&Occurrences","Change All Occurrences","Focus Next Cursor","Focuses the next cursor","Focus Previous Cursor","Focuses the previous cursor"],"vs/editor/contrib/parameterHints/browser/parameterHints":["Trigger Parameter Hints"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["Icon for show next parameter hint.","Icon for show previous parameter hint.","{0}, hint","Foreground color of the active item in the parameter hint."],"vs/editor/contrib/peekView/browser/peekView":["Whether the current code editor is embedded inside peek","Close","Background color of the peek view title area.","Color of the peek view title.","Color of the peek view title info.","Color of the peek view borders and arrow.","Background color of the peek view result list.","Foreground color for line nodes in the peek view result list.","Foreground color for file nodes in the peek view result list.","Background color of the selected entry in the peek view result list.","Foreground color of the selected entry in the peek view result list.","Background color of the peek view editor.","Background color of the gutter in the peek view editor.","Background color of sticky scroll in the peek view editor.","Match highlight color in the peek view result list.","Match highlight color in the peek view editor.","Match highlight border in the peek view editor."],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["Open a text editor first to go to a line.","Go to line {0} and character {1}.","Go to line {0}.","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.","Current Line: {0}, Character: {1}. Type a line number to navigate to."],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["To go to a symbol, first open a text editor with symbol information.","The active text editor does not provide symbol information.","No matching editor symbols","No editor symbols","Open to the Side","Open to the Bottom","symbols ({0})","properties ({0})","methods ({0})","functions ({0})","constructors ({0})","variables ({0})","classes ({0})","structs ({0})","events ({0})","operators ({0})","interfaces ({0})","namespaces ({0})","packages ({0})","type parameters ({0})","modules ({0})","properties ({0})","enumerations ({0})","enumeration members ({0})","strings ({0})","files ({0})","arrays ({0})","numbers ({0})","booleans ({0})","objects ({0})","keys ({0})","fields ({0})","constants ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["Cannot edit in read-only input","Cannot edit in read-only editor"],"vs/editor/contrib/rename/browser/rename":["No result.","An unknown error occurred while resolving rename location","Renaming \'{0}\' to \'{1}\'","Renaming {0} to {1}","Successfully renamed \'{0}\' to \'{1}\'. Summary: {2}","Rename failed to apply edits","Rename failed to compute edits","Rename Symbol","Enable/disable the ability to preview changes before renaming"],"vs/editor/contrib/rename/browser/renameInputField":["Whether the rename input widget is visible","Rename input. Type new name and press Enter to commit.","{0} to Rename, {1} to Preview"],"vs/editor/contrib/smartSelect/browser/smartSelect":["Expand Selection","&&Expand Selection","Shrink Selection","&&Shrink Selection"],"vs/editor/contrib/snippet/browser/snippetController2":["Whether the editor in current in snippet mode","Whether there is a next tab stop when in snippet mode","Whether there is a previous tab stop when in snippet mode","Go to next placeholder..."],"vs/editor/contrib/snippet/browser/snippetVariables":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat","January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["Toggle Sticky Scroll","&&Toggle Sticky Scroll","Sticky Scroll","&&Sticky Scroll","Focus Sticky Scroll","&&Focus Sticky Scroll","Select next sticky scroll line","Select previous sticky scroll line","Go to focused sticky scroll line","Select Editor"],"vs/editor/contrib/suggest/browser/suggest":["Whether any suggestion is focused","Whether suggestion details are visible","Whether there are multiple suggestions to pick from","Whether inserting the current suggestion yields in a change or has everything already been typed","Whether suggestions are inserted when pressing Enter","Whether the current suggestion has insert and replace behaviour","Whether the default behaviour is to insert or replace","Whether the current suggestion supports to resolve further details"],"vs/editor/contrib/suggest/browser/suggestController":["Accepting \'{0}\' made {1} additional edits","Trigger Suggest","Insert","Insert","Replace","Replace","Insert","show less","show more","Reset Suggest Widget Size"],"vs/editor/contrib/suggest/browser/suggestWidget":["Background color of the suggest widget.","Border color of the suggest widget.","Foreground color of the suggest widget.","Foreground color of the selected entry in the suggest widget.","Icon foreground color of the selected entry in the suggest widget.","Background color of the selected entry in the suggest widget.","Color of the match highlights in the suggest widget.","Color of the match highlights in the suggest widget when an item is focused.","Foreground color of the suggest widget status.","Loading...","No suggestions.","Suggest","{0}{1}, {2}","{0}{1}","{0}, {1}","{0}, docs: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["Close","Loading..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["Icon for more information in the suggest widget.","Read More"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["Toggle Tab Key Moves Focus","Pressing Tab will now move focus to the next focusable element","Pressing Tab will now insert the tab character"],"vs/editor/contrib/tokenization/browser/tokenization":["Developer: Force Retokenize"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["Icon shown with a warning message in the extensions editor.","This document contains many non-basic ASCII unicode characters","This document contains many ambiguous unicode characters","This document contains many invisible unicode characters","The character {0} could be confused with the ASCII character {1}, which is more common in source code.","The character {0} could be confused with the character {1}, which is more common in source code.","The character {0} is invisible.","The character {0} is not a basic ASCII character.","Adjust settings","Disable Highlight In Comments","Disable highlighting of characters in comments","Disable Highlight In Strings","Disable highlighting of characters in strings","Disable Ambiguous Highlight","Disable highlighting of ambiguous characters","Disable Invisible Highlight","Disable highlighting of invisible characters","Disable Non ASCII Highlight","Disable highlighting of non basic ASCII characters","Show Exclude Options","Exclude {0} (invisible character) from being highlighted","Exclude {0} from being highlighted",\'Allow unicode characters that are more common in the language "{0}".\',"Configure Unicode Highlight Options"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["Unusual Line Terminators","Detected unusual line terminators","The file \'{0}\' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\\n\\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.","&&Remove Unusual Line Terminators","Ignore"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations.","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations.","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations.","Border color of a symbol during read-access, like reading a variable.","Border color of a symbol during write-access, like writing to a variable.","Border color of a textual occurrence for a symbol.","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["Go to Next Symbol Highlight","Go to Previous Symbol Highlight","Trigger Symbol Highlight"],"vs/editor/contrib/wordOperations/browser/wordOperations":["Delete Word"],"vs/platform/action/common/actionCommonCategories":["View","Help","Test","File","Preferences","Developer"],"vs/platform/actionWidget/browser/actionList":["{0} to apply, {1} to preview","{0} to apply","{0}, Disabled Reason: {1}","Action Widget"],"vs/platform/actionWidget/browser/actionWidget":["Whether the action widget list is visible","Hide action widget","Select previous action","Select next action","Accept selected action","Preview selected action"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\n[{1}] {2}`],"vs/platform/actions/browser/toolbar":["Hide","Reset Menu"],"vs/platform/actions/common/menuService":["Hide \'{0}\'"],"vs/platform/audioCues/browser/audioCueService":["Error on Line","Warning on Line","Folded Area on Line","Breakpoint on Line","Inline Suggestion on Line","Terminal Quick Fix","Debugger Stopped on Breakpoint","No Inlay Hints on Line","Task Completed","Task Failed","Terminal Command Failed","Terminal Bell","Notebook Cell Completed","Notebook Cell Failed","Diff Line Inserted","Diff Line Deleted","Diff Line Modified"],"vs/platform/configuration/common/configurationRegistry":["Default Language Configuration Overrides","Configure settings to be overridden for the {0} language.","Configure editor settings to be overridden for a language.","This setting does not support per-language configuration.","Configure editor settings to be overridden for a language.","This setting does not support per-language configuration.","Cannot register an empty property","Cannot register \'{0}\'. This matches property pattern \'\\\\\\\\[.*\\\\\\\\]$\' for describing language specific editor settings. Use \'configurationDefaults\' contribution.","Cannot register \'{0}\'. This property is already registered.","Cannot register \'{0}\'. The associated policy {1} is already registered with {2}."],"vs/platform/contextkey/browser/contextKeyService":["A command that returns information about context keys"],"vs/platform/contextkey/common/contextkey":["Empty context key expression","Did you forget to write an expression? You can also put \'false\' or \'true\' to always evaluate to false or true, respectively.","\'in\' after \'not\'.","closing parenthesis \')\'","Unexpected token","Did you forget to put && or || before the token?","Unexpected end of expression","Did you forget to put a context key?",`Expected: {0}\nReceived: \'{1}\'.`],"vs/platform/contextkey/common/contextkeys":["Whether the operating system is macOS","Whether the operating system is Linux","Whether the operating system is Windows","Whether the platform is a web browser","Whether the operating system is macOS on a non-browser platform","Whether the operating system is iOS","Whether the platform is a mobile web browser","Quality type of VS Code","Whether keyboard focus is inside an input box"],"vs/platform/contextkey/common/scanner":["Did you mean {0}?","Did you mean {0} or {1}?","Did you mean {0}, {1} or {2}?","Did you forget to open or close the quote?","Did you forget to escape the \'/\' (slash) character? Put two backslashes before it to escape, e.g., \'\\\\\\\\/\'."],"vs/platform/history/browser/contextScopedHistoryWidget":["Whether suggestion are visible"],"vs/platform/keybinding/common/abstractKeybindingService":["({0}) was pressed. Waiting for second key of chord...","({0}) was pressed. Waiting for next key of chord...","The key combination ({0}, {1}) is not a command.","The key combination ({0}, {1}) is not a command."],"vs/platform/list/browser/listService":["Workbench","Maps to `Control` on Windows and Linux and to `Command` on macOS.","Maps to `Alt` on Windows and Linux and to `Option` on macOS.","The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The \'Open to Side\' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.","Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.","Controls whether clicks in the scrollbar scroll page by page.","Controls tree indentation in pixels.","Controls whether the tree should render indent guides.","Controls whether lists and trees have smooth scrolling.","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.","Scrolling speed multiplier when pressing `Alt`.","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements.","Filter elements when searching.","Controls the default find mode for lists and trees in the workbench.","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes.","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements.","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.","Please use \'workbench.list.defaultFindMode\' and\t\'workbench.list.typeNavigationMode\' instead.","Use fuzzy matching when searching.","Use contiguous matching when searching.","Controls the type of matching used when searching lists and trees in the workbench.","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.","Controls the how type navigation works in lists and trees in the workbench. When set to \'trigger\', type navigation begins once the \'list.triggerTypeNavigation\' command is run."],"vs/platform/markers/common/markers":["Error","Warning","Info"],"vs/platform/quickinput/browser/commandsQuickAccess":["{0}, {1}","recently used","commonly used","other commands","Command \'{0}\' resulted in an error"],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["Back","Press \'Enter\' to confirm your input or \'Escape\' to cancel","{0}/{1}","Type to narrow down results.","Toggle all checkboxes","{0} Results","{0} Selected","OK","Custom","Back ({0})","Back"],"vs/platform/quickinput/browser/quickInputList":["Quick Input"],"vs/platform/quickinput/browser/quickInputUtils":["Click to execute command \'{0}\'"],"vs/platform/theme/common/colorRegistry":["Overall foreground color. This color is only used if not overridden by a component.","Overall foreground for disabled elements. This color is only used if not overridden by a component.","Overall foreground color for error messages. This color is only used if not overridden by a component.","Foreground color for description text providing additional information, for example for a label.","The default color for icons in the workbench.","Overall border color for focused elements. This color is only used if not overridden by a component.","An extra border around elements to separate them from others for greater contrast.","An extra border around active elements to separate them from others for greater contrast.","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.","Color for text separators.","Foreground color for links in text.","Foreground color for links in text when clicked on and on mouse hover.","Foreground color for preformatted text segments.","Background color for block quotes in text.","Border color for block quotes in text.","Background color for code blocks in text.","Shadow color of widgets such as find/replace inside the editor.","Border color of widgets such as find/replace inside the editor.","Input box background.","Input box foreground.","Input box border.","Border color of activated options in input fields.","Background color of activated options in input fields.","Background hover color of options in input fields.","Foreground color of activated options in input fields.","Input box foreground color for placeholder text.","Input validation background color for information severity.","Input validation foreground color for information severity.","Input validation border color for information severity.","Input validation background color for warning severity.","Input validation foreground color for warning severity.","Input validation border color for warning severity.","Input validation background color for error severity.","Input validation foreground color for error severity.","Input validation border color for error severity.","Dropdown background.","Dropdown list background.","Dropdown foreground.","Dropdown border.","Button foreground color.","Button separator color.","Button background color.","Button background color when hovering.","Button border color.","Secondary button foreground color.","Secondary button background color.","Secondary button background color when hovering.","Badge background color. Badges are small information labels, e.g. for search results count.","Badge foreground color. Badges are small information labels, e.g. for search results count.","Scrollbar shadow to indicate that the view is scrolled.","Scrollbar slider background color.","Scrollbar slider background color when hovering.","Scrollbar slider background color when clicked on.","Background color of the progress bar that can show for long running operations.","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations.","Foreground color of error squigglies in the editor.","Border color of error boxes in the editor.","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations.","Foreground color of warning squigglies in the editor.","Border color of warning boxes in the editor.","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations.","Foreground color of info squigglies in the editor.","Border color of info boxes in the editor.","Foreground color of hint squigglies in the editor.","Border color of hint boxes in the editor.","Border color of active sashes.","Editor background color.","Editor default foreground color.","Sticky scroll background color for the editor","Sticky scroll on hover background color for the editor","Background color of editor widgets, such as find/replace.","Foreground color of editor widgets, such as find/replace.","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.","Quick picker background color. The quick picker widget is the container for pickers like the command palette.","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.","Quick picker color for grouping labels.","Quick picker color for grouping borders.","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.","Color of the editor selection.","Color of the selected text for high contrast.","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations.","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations.","Border color for regions with the same content as the selection.","Color of the current search match.","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations.","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.","Border color of the current search match.","Border color of the other search matches.","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.","Color of the Search Editor query matches.","Border color of the Search Editor query matches.","Color of the text in the search viewlet\'s completion message.","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations.","Background color of the editor hover.","Foreground color of the editor hover.","Border color of the editor hover.","Background color of the editor hover status bar.","Color of active links.","Foreground color of inline hints","Background color of inline hints","Foreground color of inline hints for types","Background color of inline hints for types","Foreground color of inline hints for parameters","Background color of inline hints for parameters","The color used for the lightbulb actions icon.","The color used for the lightbulb auto fix actions icon.","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations.","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations.","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations.","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations.","Background color for the margin where lines got inserted.","Background color for the margin where lines got removed.","Diff overview ruler foreground for inserted content.","Diff overview ruler foreground for removed content.","Outline color for the text that got inserted.","Outline color for text that got removed.","Border color between the two text editors.","Color of the diff editor\'s diagonal fill. The diagonal fill is used in side-by-side diff views.","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree background when hovering over items using the mouse.","List/Tree foreground when hovering over items using the mouse.","List/Tree drag and drop background when moving items around using the mouse.","List/Tree foreground color of the match highlights when searching inside the list/tree.","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.","List/Tree foreground color for invalid items, for example an unresolved root in explorer.","Foreground color of list items containing errors.","Foreground color of list items containing warnings.","Background color of the type filter widget in lists and trees.","Outline color of the type filter widget in lists and trees.","Outline color of the type filter widget in lists and trees, when there are no matches.","Shadown color of the type filter widget in lists and trees.","Background color of the filtered match.","Border color of the filtered match.","Tree stroke color for the indentation guides.","Tree stroke color for the indentation guides that are not active.","Table border color between columns.","Background color for odd table rows.","List/Tree foreground color for items that are deemphasized. ","Background color of checkbox widget.","Background color of checkbox widget when the element it\'s in is selected.","Foreground color of checkbox widget.","Border color of checkbox widget.","Border color of checkbox widget when the element it\'s in is selected.","Please use quickInputList.focusBackground instead","Quick picker foreground color for the focused item.","Quick picker icon foreground color for the focused item.","Quick picker background color for the focused item.","Border color of menus.","Foreground color of menu items.","Background color of menu items.","Foreground color of the selected menu item in menus.","Background color of the selected menu item in menus.","Border color of the selected menu item in menus.","Color of a separator menu item in menus.","Toolbar background when hovering over actions using the mouse","Toolbar outline when hovering over actions using the mouse","Toolbar background when holding the mouse over actions","Highlight background color of a snippet tabstop.","Highlight border color of a snippet tabstop.","Highlight background color of the final tabstop of a snippet.","Highlight border color of the final tabstop of a snippet.","Color of focused breadcrumb items.","Background color of breadcrumb items.","Color of focused breadcrumb items.","Color of selected breadcrumb items.","Background color of breadcrumb item picker.","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Border color on headers and the splitter in inline merge-conflicts.","Current overview ruler foreground for inline merge-conflicts.","Incoming overview ruler foreground for inline merge-conflicts.","Common ancestor overview ruler foreground for inline merge-conflicts.","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations.","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations.","Minimap marker color for find matches.","Minimap marker color for repeating editor selections.","Minimap marker color for the editor selection.","Minimap marker color for errors.","Minimap marker color for warnings.","Minimap background color.",\'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.\',"Minimap slider background color.","Minimap slider background color when hovering.","Minimap slider background color when clicked on.","The color used for the problems error icon.","The color used for the problems warning icon.","The color used for the problems info icon.","The foreground color used in charts.","The color used for horizontal lines in charts.","The red color used in chart visualizations.","The blue color used in chart visualizations.","The yellow color used in chart visualizations.","The orange color used in chart visualizations.","The green color used in chart visualizations.","The purple color used in chart visualizations."],"vs/platform/theme/common/iconRegistry":["The id of the font to use. If not set, the font that is defined first is used.","The font character associated with the icon definition.","Icon for the close action in widgets.","Icon for goto previous editor location.","Icon for goto next editor location."],"vs/platform/undoRedo/common/undoRedoService":["The following files have been closed and modified on disk: {0}.","The following files have been modified in an incompatible way: {0}.","Could not undo \'{0}\' across all files. {1}","Could not undo \'{0}\' across all files. {1}","Could not undo \'{0}\' across all files because changes were made to {1}","Could not undo \'{0}\' across all files because there is already an undo or redo operation running on {1}","Could not undo \'{0}\' across all files because an undo or redo operation occurred in the meantime","Would you like to undo \'{0}\' across all files?","&&Undo in {0} Files","Undo this &&File","Could not undo \'{0}\' because there is already an undo or redo operation running.","Would you like to undo \'{0}\'?","&&Yes","No","Could not redo \'{0}\' across all files. {1}","Could not redo \'{0}\' across all files. {1}","Could not redo \'{0}\' across all files because changes were made to {1}","Could not redo \'{0}\' across all files because there is already an undo or redo operation running on {1}","Could not redo \'{0}\' across all files because an undo or redo operation occurred in the meantime","Could not redo \'{0}\' because there is already an undo or redo operation running."],"vs/platform/workspace/common/workspace":["Code Workspace"]});\n\n//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.js.map'},4372:e=>{e.exports='"use strict";/*!-----------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773)\n * Released under the MIT license\n * https://github.com/microsoft/vscode/blob/main/LICENSE.txt\n *-----------------------------------------------------------*/const _amdLoaderGlobal=this,_commonjsGlobal=typeof global=="object"?global:{};var AMDLoader;(function(u){u.global=_amdLoaderGlobal;class y{get isWindows(){return this._detect(),this._isWindows}get isNode(){return this._detect(),this._isNode}get isElectronRenderer(){return this._detect(),this._isElectronRenderer}get isWebWorker(){return this._detect(),this._isWebWorker}get isElectronNodeIntegrationWebWorker(){return this._detect(),this._isElectronNodeIntegrationWebWorker}constructor(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}_detect(){this._detected||(this._detected=!0,this._isWindows=y._isWindows(),this._isNode=typeof module<"u"&&!!module.exports,this._isElectronRenderer=typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="renderer",this._isWebWorker=typeof u.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="worker")}static _isWindows(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process<"u"?process.platform==="win32":!1}}u.Environment=y})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){class y{constructor(r,c,a){this.type=r,this.detail=c,this.timestamp=a}}u.LoaderEvent=y;class m{constructor(r){this._events=[new y(1,"",r)]}record(r,c){this._events.push(new y(r,c,u.Utilities.getHighPerformanceTimestamp()))}getEvents(){return this._events}}u.LoaderEventRecorder=m;class p{record(r,c){}getEvents(){return[]}}p.INSTANCE=new p,u.NullLoaderEventRecorder=p})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){class y{static fileUriToFilePath(p,h){if(h=decodeURI(h).replace(/%23/g,"#"),p){if(/^file:\\/\\/\\//.test(h))return h.substr(8);if(/^file:\\/\\//.test(h))return h.substr(5)}else if(/^file:\\/\\//.test(h))return h.substr(7);return h}static startsWith(p,h){return p.length>=h.length&&p.substr(0,h.length)===h}static endsWith(p,h){return p.length>=h.length&&p.substr(p.length-h.length)===h}static containsQueryString(p){return/^[^\\#]*\\?/gi.test(p)}static isAbsolutePath(p){return/^((http:\\/\\/)|(https:\\/\\/)|(file:\\/\\/)|(\\/))/.test(p)}static forEachProperty(p,h){if(p){let r;for(r in p)p.hasOwnProperty(r)&&h(r,p[r])}}static isEmpty(p){let h=!0;return y.forEachProperty(p,()=>{h=!1}),h}static recursiveClone(p){if(!p||typeof p!="object"||p instanceof RegExp||!Array.isArray(p)&&Object.getPrototypeOf(p)!==Object.prototype)return p;let h=Array.isArray(p)?[]:{};return y.forEachProperty(p,(r,c)=>{c&&typeof c=="object"?h[r]=y.recursiveClone(c):h[r]=c}),h}static generateAnonymousModule(){return"===anonymous"+y.NEXT_ANONYMOUS_ID+++"==="}static isAnonymousModule(p){return y.startsWith(p,"===anonymous")}static getHighPerformanceTimestamp(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=u.global.performance&&typeof u.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?u.global.performance.now():Date.now()}}y.NEXT_ANONYMOUS_ID=1,y.PERFORMANCE_NOW_PROBED=!1,y.HAS_PERFORMANCE_NOW=!1,u.Utilities=y})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){function y(h){if(h instanceof Error)return h;const r=new Error(h.message||String(h)||"Unknown Error");return h.stack&&(r.stack=h.stack),r}u.ensureError=y;class m{static validateConfigurationOptions(r){function c(a){if(a.phase==="loading"){console.error(\'Loading "\'+a.moduleId+\'" failed\'),console.error(a),console.error("Here are the modules that depend on it:"),console.error(a.neededBy);return}if(a.phase==="factory"){console.error(\'The factory function of "\'+a.moduleId+\'" has thrown an exception\'),console.error(a),console.error("Here are the modules that depend on it:"),console.error(a.neededBy);return}}if(r=r||{},typeof r.baseUrl!="string"&&(r.baseUrl=""),typeof r.isBuild!="boolean"&&(r.isBuild=!1),typeof r.paths!="object"&&(r.paths={}),typeof r.config!="object"&&(r.config={}),typeof r.catchError>"u"&&(r.catchError=!1),typeof r.recordStats>"u"&&(r.recordStats=!1),typeof r.urlArgs!="string"&&(r.urlArgs=""),typeof r.onError!="function"&&(r.onError=c),Array.isArray(r.ignoreDuplicateModules)||(r.ignoreDuplicateModules=[]),r.baseUrl.length>0&&(u.Utilities.endsWith(r.baseUrl,"/")||(r.baseUrl+="/")),typeof r.cspNonce!="string"&&(r.cspNonce=""),typeof r.preferScriptTags>"u"&&(r.preferScriptTags=!1),r.nodeCachedData&&typeof r.nodeCachedData=="object"&&(typeof r.nodeCachedData.seed!="string"&&(r.nodeCachedData.seed="seed"),(typeof r.nodeCachedData.writeDelay!="number"||r.nodeCachedData.writeDelay<0)&&(r.nodeCachedData.writeDelay=1e3*7),!r.nodeCachedData.path||typeof r.nodeCachedData.path!="string")){const a=y(new Error("INVALID cached data configuration, \'path\' MUST be set"));a.phase="configuration",r.onError(a),r.nodeCachedData=void 0}return r}static mergeConfigurationOptions(r=null,c=null){let a=u.Utilities.recursiveClone(c||{});return u.Utilities.forEachProperty(r,(t,e)=>{t==="ignoreDuplicateModules"&&typeof a.ignoreDuplicateModules<"u"?a.ignoreDuplicateModules=a.ignoreDuplicateModules.concat(e):t==="paths"&&typeof a.paths<"u"?u.Utilities.forEachProperty(e,(i,s)=>a.paths[i]=s):t==="config"&&typeof a.config<"u"?u.Utilities.forEachProperty(e,(i,s)=>a.config[i]=s):a[t]=u.Utilities.recursiveClone(e)}),m.validateConfigurationOptions(a)}}u.ConfigurationOptionsUtil=m;class p{constructor(r,c){if(this._env=r,this.options=m.mergeConfigurationOptions(c),this._createIgnoreDuplicateModulesMap(),this._createSortedPathsRules(),this.options.baseUrl===""&&this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){let a=this.options.nodeRequire.main.filename,t=Math.max(a.lastIndexOf("/"),a.lastIndexOf("\\\\"));this.options.baseUrl=a.substring(0,t+1)}}_createIgnoreDuplicateModulesMap(){this.ignoreDuplicateModulesMap={};for(let r=0;r<this.options.ignoreDuplicateModules.length;r++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[r]]=!0}_createSortedPathsRules(){this.sortedPathsRules=[],u.Utilities.forEachProperty(this.options.paths,(r,c)=>{Array.isArray(c)?this.sortedPathsRules.push({from:r,to:c}):this.sortedPathsRules.push({from:r,to:[c]})}),this.sortedPathsRules.sort((r,c)=>c.from.length-r.from.length)}cloneAndMerge(r){return new p(this._env,m.mergeConfigurationOptions(r,this.options))}getOptionsLiteral(){return this.options}_applyPaths(r){let c;for(let a=0,t=this.sortedPathsRules.length;a<t;a++)if(c=this.sortedPathsRules[a],u.Utilities.startsWith(r,c.from)){let e=[];for(let i=0,s=c.to.length;i<s;i++)e.push(c.to[i]+r.substr(c.from.length));return e}return[r]}_addUrlArgsToUrl(r){return u.Utilities.containsQueryString(r)?r+"&"+this.options.urlArgs:r+"?"+this.options.urlArgs}_addUrlArgsIfNecessaryToUrl(r){return this.options.urlArgs?this._addUrlArgsToUrl(r):r}_addUrlArgsIfNecessaryToUrls(r){if(this.options.urlArgs)for(let c=0,a=r.length;c<a;c++)r[c]=this._addUrlArgsToUrl(r[c]);return r}moduleIdToPaths(r){if(this._env.isNode&&this.options.amdModulesPattern instanceof RegExp&&!this.options.amdModulesPattern.test(r))return this.isBuild()?["empty:"]:["node|"+r];let c=r,a;if(!u.Utilities.endsWith(c,".js")&&!u.Utilities.isAbsolutePath(c)){a=this._applyPaths(c);for(let t=0,e=a.length;t<e;t++)this.isBuild()&&a[t]==="empty:"||(u.Utilities.isAbsolutePath(a[t])||(a[t]=this.options.baseUrl+a[t]),!u.Utilities.endsWith(a[t],".js")&&!u.Utilities.containsQueryString(a[t])&&(a[t]=a[t]+".js"))}else!u.Utilities.endsWith(c,".js")&&!u.Utilities.containsQueryString(c)&&(c=c+".js"),a=[c];return this._addUrlArgsIfNecessaryToUrls(a)}requireToUrl(r){let c=r;return u.Utilities.isAbsolutePath(c)||(c=this._applyPaths(c)[0],u.Utilities.isAbsolutePath(c)||(c=this.options.baseUrl+c)),this._addUrlArgsIfNecessaryToUrl(c)}isBuild(){return this.options.isBuild}shouldInvokeFactory(r){return!!(!this.options.isBuild||u.Utilities.isAnonymousModule(r)||this.options.buildForceInvokeFactory&&this.options.buildForceInvokeFactory[r])}isDuplicateMessageIgnoredFor(r){return this.ignoreDuplicateModulesMap.hasOwnProperty(r)}getConfigForModule(r){if(this.options.config)return this.options.config[r]}shouldCatchError(){return this.options.catchError}shouldRecordStats(){return this.options.recordStats}onError(r){this.options.onError(r)}}u.Configuration=p})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){class y{constructor(e){this._env=e,this._scriptLoader=null,this._callbackMap={}}load(e,i,s,n){if(!this._scriptLoader)if(this._env.isWebWorker)this._scriptLoader=new h;else if(this._env.isElectronRenderer){const{preferScriptTags:d}=e.getConfig().getOptionsLiteral();d?this._scriptLoader=new m:this._scriptLoader=new r(this._env)}else this._env.isNode?this._scriptLoader=new r(this._env):this._scriptLoader=new m;let l={callback:s,errorback:n};if(this._callbackMap.hasOwnProperty(i)){this._callbackMap[i].push(l);return}this._callbackMap[i]=[l],this._scriptLoader.load(e,i,()=>this.triggerCallback(i),d=>this.triggerErrorback(i,d))}triggerCallback(e){let i=this._callbackMap[e];delete this._callbackMap[e];for(let s=0;s<i.length;s++)i[s].callback()}triggerErrorback(e,i){let s=this._callbackMap[e];delete this._callbackMap[e];for(let n=0;n<s.length;n++)s[n].errorback(i)}}class m{attachListeners(e,i,s){let n=()=>{e.removeEventListener("load",l),e.removeEventListener("error",d)},l=o=>{n(),i()},d=o=>{n(),s(o)};e.addEventListener("load",l),e.addEventListener("error",d)}load(e,i,s,n){if(/^node\\|/.test(i)){let l=e.getConfig().getOptionsLiteral(),d=c(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),o=i.split("|"),_=null;try{_=d(o[1])}catch(f){n(f);return}e.enqueueDefineAnonymousModule([],()=>_),s()}else{let l=document.createElement("script");l.setAttribute("async","async"),l.setAttribute("type","text/javascript"),this.attachListeners(l,s,n);const{trustedTypesPolicy:d}=e.getConfig().getOptionsLiteral();d&&(i=d.createScriptURL(i)),l.setAttribute("src",i);const{cspNonce:o}=e.getConfig().getOptionsLiteral();o&&l.setAttribute("nonce",o),document.getElementsByTagName("head")[0].appendChild(l)}}}function p(t){const{trustedTypesPolicy:e}=t.getConfig().getOptionsLiteral();try{return(e?self.eval(e.createScript("","true")):new Function("true")).call(self),!0}catch{return!1}}class h{constructor(){this._cachedCanUseEval=null}_canUseEval(e){return this._cachedCanUseEval===null&&(this._cachedCanUseEval=p(e)),this._cachedCanUseEval}load(e,i,s,n){if(/^node\\|/.test(i)){const l=e.getConfig().getOptionsLiteral(),d=c(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),o=i.split("|");let _=null;try{_=d(o[1])}catch(f){n(f);return}e.enqueueDefineAnonymousModule([],function(){return _}),s()}else{const{trustedTypesPolicy:l}=e.getConfig().getOptionsLiteral();if(!(/^((http:)|(https:)|(file:))/.test(i)&&i.substring(0,self.origin.length)!==self.origin)&&this._canUseEval(e)){fetch(i).then(o=>{if(o.status!==200)throw new Error(o.statusText);return o.text()}).then(o=>{o=`${o}\n//# sourceURL=${i}`,(l?self.eval(l.createScript("",o)):new Function(o)).call(self),s()}).then(void 0,n);return}try{l&&(i=l.createScriptURL(i)),importScripts(i),s()}catch(o){n(o)}}}}class r{constructor(e){this._env=e,this._didInitialize=!1,this._didPatchNodeRequire=!1}_init(e){this._didInitialize||(this._didInitialize=!0,this._fs=e("fs"),this._vm=e("vm"),this._path=e("path"),this._crypto=e("crypto"))}_initNodeRequire(e,i){const{nodeCachedData:s}=i.getConfig().getOptionsLiteral();if(!s||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;const n=this,l=e("module");function d(o){const _=o.constructor;let f=function(v){try{return o.require(v)}finally{}};return f.resolve=function(v,E){return _._resolveFilename(v,o,!1,E)},f.resolve.paths=function(v){return _._resolveLookupPaths(v,o)},f.main=process.mainModule,f.extensions=_._extensions,f.cache=_._cache,f}l.prototype._compile=function(o,_){const f=l.wrap(o.replace(/^#!.*/,"")),g=i.getRecorder(),v=n._getCachedDataPath(s,_),E={filename:_};let I;try{const D=n._fs.readFileSync(v);I=D.slice(0,16),E.cachedData=D.slice(16),g.record(60,v)}catch{g.record(61,v)}const C=new n._vm.Script(f,E),P=C.runInThisContext(E),w=n._path.dirname(_),R=d(this),U=[this.exports,R,this,_,w,process,_commonjsGlobal,Buffer],b=P.apply(this.exports,U);return n._handleCachedData(C,f,v,!E.cachedData,i),n._verifyCachedData(C,f,v,I,i),b}}load(e,i,s,n){const l=e.getConfig().getOptionsLiteral(),d=c(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),o=l.nodeInstrumenter||function(f){return f};this._init(d),this._initNodeRequire(d,e);let _=e.getRecorder();if(/^node\\|/.test(i)){let f=i.split("|"),g=null;try{g=d(f[1])}catch(v){n(v);return}e.enqueueDefineAnonymousModule([],()=>g),s()}else{i=u.Utilities.fileUriToFilePath(this._env.isWindows,i);const f=this._path.normalize(i),g=this._getElectronRendererScriptPathOrUri(f),v=!!l.nodeCachedData,E=v?this._getCachedDataPath(l.nodeCachedData,i):void 0;this._readSourceAndCachedData(f,E,_,(I,C,P,w)=>{if(I){n(I);return}let R;C.charCodeAt(0)===r._BOM?R=r._PREFIX+C.substring(1)+r._SUFFIX:R=r._PREFIX+C+r._SUFFIX,R=o(R,f);const U={filename:g,cachedData:P},b=this._createAndEvalScript(e,R,U,s,n);this._handleCachedData(b,R,E,v&&!P,e),this._verifyCachedData(b,R,E,w,e)})}}_createAndEvalScript(e,i,s,n,l){const d=e.getRecorder();d.record(31,s.filename);const o=new this._vm.Script(i,s),_=o.runInThisContext(s),f=e.getGlobalAMDDefineFunc();let g=!1;const v=function(){return g=!0,f.apply(null,arguments)};return v.amd=f.amd,_.call(u.global,e.getGlobalAMDRequireFunc(),v,s.filename,this._path.dirname(s.filename)),d.record(32,s.filename),g?n():l(new Error(`Didn\'t receive define call in ${s.filename}!`)),o}_getElectronRendererScriptPathOrUri(e){if(!this._env.isElectronRenderer)return e;let i=e.match(/^([a-z])\\:(.*)/i);return i?`file:///${(i[1].toUpperCase()+":"+i[2]).replace(/\\\\/g,"/")}`:`file://${e}`}_getCachedDataPath(e,i){const s=this._crypto.createHash("md5").update(i,"utf8").update(e.seed,"utf8").update(process.arch,"").digest("hex"),n=this._path.basename(i).replace(/\\.js$/,"");return this._path.join(e.path,`${n}-${s}.code`)}_handleCachedData(e,i,s,n,l){e.cachedDataRejected?this._fs.unlink(s,d=>{l.getRecorder().record(62,s),this._createAndWriteCachedData(e,i,s,l),d&&l.getConfig().onError(d)}):n&&this._createAndWriteCachedData(e,i,s,l)}_createAndWriteCachedData(e,i,s,n){let l=Math.ceil(n.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),d=-1,o=0,_;const f=()=>{setTimeout(()=>{_||(_=this._crypto.createHash("md5").update(i,"utf8").digest());const g=e.createCachedData();if(!(g.length===0||g.length===d||o>=5)){if(g.length<d){f();return}d=g.length,this._fs.writeFile(s,Buffer.concat([_,g]),v=>{v&&n.getConfig().onError(v),n.getRecorder().record(63,s),f()})}},l*Math.pow(4,o++))};f()}_readSourceAndCachedData(e,i,s,n){if(!i)this._fs.readFile(e,{encoding:"utf8"},n);else{let l,d,o,_=2;const f=g=>{g?n(g):--_===0&&n(void 0,l,d,o)};this._fs.readFile(e,{encoding:"utf8"},(g,v)=>{l=v,f(g)}),this._fs.readFile(i,(g,v)=>{!g&&v&&v.length>0?(o=v.slice(0,16),d=v.slice(16),s.record(60,i)):s.record(61,i),f()})}}_verifyCachedData(e,i,s,n,l){n&&(e.cachedDataRejected||setTimeout(()=>{const d=this._crypto.createHash("md5").update(i,"utf8").digest();n.equals(d)||(l.getConfig().onError(new Error(`FAILED TO VERIFY CACHED DATA, deleting stale \'${s}\' now, but a RESTART IS REQUIRED`)),this._fs.unlink(s,o=>{o&&l.getConfig().onError(o)}))},Math.ceil(5e3*(1+Math.random()))))}}r._BOM=65279,r._PREFIX="(function (require, define, __filename, __dirname) { ",r._SUFFIX=`\n});`;function c(t,e){if(e.__$__isRecorded)return e;const i=function(n){t.record(33,n);try{return e(n)}finally{t.record(34,n)}};return i.__$__isRecorded=!0,i}u.ensureRecordedNodeRequire=c;function a(t){return new y(t)}u.createScriptLoader=a})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){class y{constructor(t){let e=t.lastIndexOf("/");e!==-1?this.fromModulePath=t.substr(0,e+1):this.fromModulePath=""}static _normalizeModuleId(t){let e=t,i;for(i=/\\/\\.\\//;i.test(e);)e=e.replace(i,"/");for(e=e.replace(/^\\.\\//g,""),i=/\\/(([^\\/])|([^\\/][^\\/\\.])|([^\\/\\.][^\\/])|([^\\/][^\\/][^\\/]+))\\/\\.\\.\\//;i.test(e);)e=e.replace(i,"/");return e=e.replace(/^(([^\\/])|([^\\/][^\\/\\.])|([^\\/\\.][^\\/])|([^\\/][^\\/][^\\/]+))\\/\\.\\.\\//,""),e}resolveModule(t){let e=t;return u.Utilities.isAbsolutePath(e)||(u.Utilities.startsWith(e,"./")||u.Utilities.startsWith(e,"../"))&&(e=y._normalizeModuleId(this.fromModulePath+e)),e}}y.ROOT=new y(""),u.ModuleIdResolver=y;class m{constructor(t,e,i,s,n,l){this.id=t,this.strId=e,this.dependencies=i,this._callback=s,this._errorback=n,this.moduleIdResolver=l,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}static _safeInvokeFunction(t,e){try{return{returnedValue:t.apply(u.global,e),producedError:null}}catch(i){return{returnedValue:null,producedError:i}}}static _invokeFactory(t,e,i,s){return t.shouldInvokeFactory(e)?t.shouldCatchError()?this._safeInvokeFunction(i,s):{returnedValue:i.apply(u.global,s),producedError:null}:{returnedValue:null,producedError:null}}complete(t,e,i,s){this._isComplete=!0;let n=null;if(this._callback)if(typeof this._callback=="function"){t.record(21,this.strId);let l=m._invokeFactory(e,this.strId,this._callback,i);n=l.producedError,t.record(22,this.strId),!n&&typeof l.returnedValue<"u"&&(!this.exportsPassedIn||u.Utilities.isEmpty(this.exports))&&(this.exports=l.returnedValue)}else this.exports=this._callback;if(n){let l=u.ensureError(n);l.phase="factory",l.moduleId=this.strId,l.neededBy=s(this.id),this.error=l,e.onError(l)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null}onDependencyError(t){return this._isComplete=!0,this.error=t,this._errorback?(this._errorback(t),!0):!1}isComplete(){return this._isComplete}}u.Module=m;class p{constructor(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}getMaxModuleId(){return this._nextId}getModuleId(t){let e=this._strModuleIdToIntModuleId.get(t);return typeof e>"u"&&(e=this._nextId++,this._strModuleIdToIntModuleId.set(t,e),this._intModuleIdToStrModuleId[e]=t),e}getStrModuleId(t){return this._intModuleIdToStrModuleId[t]}}class h{constructor(t){this.id=t}}h.EXPORTS=new h(0),h.MODULE=new h(1),h.REQUIRE=new h(2),u.RegularDependency=h;class r{constructor(t,e,i){this.id=t,this.pluginId=e,this.pluginParam=i}}u.PluginDependency=r;class c{constructor(t,e,i,s,n=0){this._env=t,this._scriptLoader=e,this._loaderAvailableTimestamp=n,this._defineFunc=i,this._requireFunc=s,this._moduleIdProvider=new p,this._config=new u.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[]}reset(){return new c(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)}getGlobalAMDDefineFunc(){return this._defineFunc}getGlobalAMDRequireFunc(){return this._requireFunc}static _findRelevantLocationInStack(t,e){let i=l=>l.replace(/\\\\/g,"/"),s=i(t),n=e.split(/\\n/);for(let l=0;l<n.length;l++){let d=n[l].match(/(.*):(\\d+):(\\d+)\\)?$/);if(d){let o=d[1],_=d[2],f=d[3],g=Math.max(o.lastIndexOf(" ")+1,o.lastIndexOf("(")+1);if(o=o.substr(g),o=i(o),o===s){let v={line:parseInt(_,10),col:parseInt(f,10)};return v.line===1&&(v.col-=53),v}}}throw new Error("Could not correlate define call site for needle "+t)}getBuildInfo(){if(!this._config.isBuild())return null;let t=[],e=0;for(let i=0,s=this._modules2.length;i<s;i++){let n=this._modules2[i];if(!n)continue;let l=this._buildInfoPath[n.id]||null,d=this._buildInfoDefineStack[n.id]||null,o=this._buildInfoDependencies[n.id];t[e++]={id:n.strId,path:l,defineLocation:l&&d?c._findRelevantLocationInStack(l,d):null,dependencies:o,shim:null,exports:n.exports}}return t}getRecorder(){return this._recorder||(this._config.shouldRecordStats()?this._recorder=new u.LoaderEventRecorder(this._loaderAvailableTimestamp):this._recorder=u.NullLoaderEventRecorder.INSTANCE),this._recorder}getLoaderEvents(){return this.getRecorder().getEvents()}enqueueDefineAnonymousModule(t,e){if(this._currentAnonymousDefineCall!==null)throw new Error("Can only have one anonymous define call per script file");let i=null;this._config.isBuild()&&(i=new Error("StackLocation").stack||null),this._currentAnonymousDefineCall={stack:i,dependencies:t,callback:e}}defineModule(t,e,i,s,n,l=new y(t)){let d=this._moduleIdProvider.getModuleId(t);if(this._modules2[d]){this._config.isDuplicateMessageIgnoredFor(t)||console.warn("Duplicate definition of module \'"+t+"\'");return}let o=new m(d,t,this._normalizeDependencies(e,l),i,s,l);this._modules2[d]=o,this._config.isBuild()&&(this._buildInfoDefineStack[d]=n,this._buildInfoDependencies[d]=(o.dependencies||[]).map(_=>this._moduleIdProvider.getStrModuleId(_.id))),this._resolve(o)}_normalizeDependency(t,e){if(t==="exports")return h.EXPORTS;if(t==="module")return h.MODULE;if(t==="require")return h.REQUIRE;let i=t.indexOf("!");if(i>=0){let s=e.resolveModule(t.substr(0,i)),n=e.resolveModule(t.substr(i+1)),l=this._moduleIdProvider.getModuleId(s+"!"+n),d=this._moduleIdProvider.getModuleId(s);return new r(l,d,n)}return new h(this._moduleIdProvider.getModuleId(e.resolveModule(t)))}_normalizeDependencies(t,e){let i=[],s=0;for(let n=0,l=t.length;n<l;n++)i[s++]=this._normalizeDependency(t[n],e);return i}_relativeRequire(t,e,i,s){if(typeof e=="string")return this.synchronousRequire(e,t);this.defineModule(u.Utilities.generateAnonymousModule(),e,i,s,null,t)}synchronousRequire(t,e=new y(t)){let i=this._normalizeDependency(t,e),s=this._modules2[i.id];if(!s)throw new Error("Check dependency list! Synchronous require cannot resolve module \'"+t+"\'. This is the first mention of this module!");if(!s.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module \'"+t+"\'. This module has not been resolved completely yet.");if(s.error)throw s.error;return s.exports}configure(t,e){let i=this._config.shouldRecordStats();e?this._config=new u.Configuration(this._env,t):this._config=this._config.cloneAndMerge(t),this._config.shouldRecordStats()&&!i&&(this._recorder=null)}getConfig(){return this._config}_onLoad(t){if(this._currentAnonymousDefineCall!==null){let e=this._currentAnonymousDefineCall;this._currentAnonymousDefineCall=null,this.defineModule(this._moduleIdProvider.getStrModuleId(t),e.dependencies,e.callback,null,e.stack)}}_createLoadError(t,e){let i=this._moduleIdProvider.getStrModuleId(t),s=(this._inverseDependencies2[t]||[]).map(l=>this._moduleIdProvider.getStrModuleId(l));const n=u.ensureError(e);return n.phase="loading",n.moduleId=i,n.neededBy=s,n}_onLoadError(t,e){const i=this._createLoadError(t,e);this._modules2[t]||(this._modules2[t]=new m(t,this._moduleIdProvider.getStrModuleId(t),[],()=>{},null,null));let s=[];for(let d=0,o=this._moduleIdProvider.getMaxModuleId();d<o;d++)s[d]=!1;let n=!1,l=[];for(l.push(t),s[t]=!0;l.length>0;){let d=l.shift(),o=this._modules2[d];o&&(n=o.onDependencyError(i)||n);let _=this._inverseDependencies2[d];if(_)for(let f=0,g=_.length;f<g;f++){let v=_[f];s[v]||(l.push(v),s[v]=!0)}}n||this._config.onError(i)}_hasDependencyPath(t,e){let i=this._modules2[t];if(!i)return!1;let s=[];for(let l=0,d=this._moduleIdProvider.getMaxModuleId();l<d;l++)s[l]=!1;let n=[];for(n.push(i),s[t]=!0;n.length>0;){let d=n.shift().dependencies;if(d)for(let o=0,_=d.length;o<_;o++){let f=d[o];if(f.id===e)return!0;let g=this._modules2[f.id];g&&!s[f.id]&&(s[f.id]=!0,n.push(g))}}return!1}_findCyclePath(t,e,i){if(t===e||i===50)return[t];let s=this._modules2[t];if(!s)return null;let n=s.dependencies;if(n)for(let l=0,d=n.length;l<d;l++){let o=this._findCyclePath(n[l].id,e,i+1);if(o!==null)return o.push(t),o}return null}_createRequire(t){let e=(i,s,n)=>this._relativeRequire(t,i,s,n);return e.toUrl=i=>this._config.requireToUrl(t.resolveModule(i)),e.getStats=()=>this.getLoaderEvents(),e.hasDependencyCycle=()=>this._hasDependencyCycle,e.config=(i,s=!1)=>{this.configure(i,s)},e.__$__nodeRequire=u.global.nodeRequire,e}_loadModule(t){if(this._modules2[t]||this._knownModules2[t])return;this._knownModules2[t]=!0;let e=this._moduleIdProvider.getStrModuleId(t),i=this._config.moduleIdToPaths(e),s=/^@[^\\/]+\\/[^\\/]+$/;this._env.isNode&&(e.indexOf("/")===-1||s.test(e))&&i.push("node|"+e);let n=-1,l=d=>{if(n++,n>=i.length)this._onLoadError(t,d);else{let o=i[n],_=this.getRecorder();if(this._config.isBuild()&&o==="empty:"){this._buildInfoPath[t]=o,this.defineModule(this._moduleIdProvider.getStrModuleId(t),[],null,null,null),this._onLoad(t);return}_.record(10,o),this._scriptLoader.load(this,o,()=>{this._config.isBuild()&&(this._buildInfoPath[t]=o),_.record(11,o),this._onLoad(t)},f=>{_.record(12,o),l(f)})}};l(null)}_loadPluginDependency(t,e){if(this._modules2[e.id]||this._knownModules2[e.id])return;this._knownModules2[e.id]=!0;let i=s=>{this.defineModule(this._moduleIdProvider.getStrModuleId(e.id),[],s,null,null)};i.error=s=>{this._config.onError(this._createLoadError(e.id,s))},t.load(e.pluginParam,this._createRequire(y.ROOT),i,this._config.getOptionsLiteral())}_resolve(t){let e=t.dependencies;if(e)for(let i=0,s=e.length;i<s;i++){let n=e[i];if(n===h.EXPORTS){t.exportsPassedIn=!0,t.unresolvedDependenciesCount--;continue}if(n===h.MODULE){t.unresolvedDependenciesCount--;continue}if(n===h.REQUIRE){t.unresolvedDependenciesCount--;continue}let l=this._modules2[n.id];if(l&&l.isComplete()){if(l.error){t.onDependencyError(l.error);return}t.unresolvedDependenciesCount--;continue}if(this._hasDependencyPath(n.id,t.id)){this._hasDependencyCycle=!0,console.warn("There is a dependency cycle between \'"+this._moduleIdProvider.getStrModuleId(n.id)+"\' and \'"+this._moduleIdProvider.getStrModuleId(t.id)+"\'. The cyclic path follows:");let d=this._findCyclePath(n.id,t.id,0)||[];d.reverse(),d.push(n.id),console.warn(d.map(o=>this._moduleIdProvider.getStrModuleId(o)).join(` => \n`)),t.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[n.id]=this._inverseDependencies2[n.id]||[],this._inverseDependencies2[n.id].push(t.id),n instanceof r){let d=this._modules2[n.pluginId];if(d&&d.isComplete()){this._loadPluginDependency(d.exports,n);continue}let o=this._inversePluginDependencies2.get(n.pluginId);o||(o=[],this._inversePluginDependencies2.set(n.pluginId,o)),o.push(n),this._loadModule(n.pluginId);continue}this._loadModule(n.id)}t.unresolvedDependenciesCount===0&&this._onModuleComplete(t)}_onModuleComplete(t){let e=this.getRecorder();if(t.isComplete())return;let i=t.dependencies,s=[];if(i)for(let o=0,_=i.length;o<_;o++){let f=i[o];if(f===h.EXPORTS){s[o]=t.exports;continue}if(f===h.MODULE){s[o]={id:t.strId,config:()=>this._config.getConfigForModule(t.strId)};continue}if(f===h.REQUIRE){s[o]=this._createRequire(t.moduleIdResolver);continue}let g=this._modules2[f.id];if(g){s[o]=g.exports;continue}s[o]=null}const n=o=>(this._inverseDependencies2[o]||[]).map(_=>this._moduleIdProvider.getStrModuleId(_));t.complete(e,this._config,s,n);let l=this._inverseDependencies2[t.id];if(this._inverseDependencies2[t.id]=null,l)for(let o=0,_=l.length;o<_;o++){let f=l[o],g=this._modules2[f];g.unresolvedDependenciesCount--,g.unresolvedDependenciesCount===0&&this._onModuleComplete(g)}let d=this._inversePluginDependencies2.get(t.id);if(d){this._inversePluginDependencies2.delete(t.id);for(let o=0,_=d.length;o<_;o++)this._loadPluginDependency(t.exports,d[o])}}}u.ModuleManager=c})(AMDLoader||(AMDLoader={}));var define,AMDLoader;(function(u){const y=new u.Environment;let m=null;const p=function(a,t,e){typeof a!="string"&&(e=t,t=a,a=null),(typeof t!="object"||!Array.isArray(t))&&(e=t,t=null),t||(t=["require","exports","module"]),a?m.defineModule(a,t,e,null,null):m.enqueueDefineAnonymousModule(t,e)};p.amd={jQuery:!0};const h=function(a,t=!1){m.configure(a,t)},r=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){h(arguments[0]);return}if(typeof arguments[0]=="string")return m.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){m.defineModule(u.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};r.config=h,r.getConfig=function(){return m.getConfig().getOptionsLiteral()},r.reset=function(){m=m.reset()},r.getBuildInfo=function(){return m.getBuildInfo()},r.getStats=function(){return m.getLoaderEvents()},r.define=p;function c(){if(typeof u.global.require<"u"||typeof require<"u"){const a=u.global.require||require;if(typeof a=="function"&&typeof a.resolve=="function"){const t=u.ensureRecordedNodeRequire(m.getRecorder(),a);u.global.nodeRequire=t,r.nodeRequire=t,r.__$__nodeRequire=t}}y.isNode&&!y.isElectronRenderer&&!y.isElectronNodeIntegrationWebWorker?module.exports=r:(y.isElectronRenderer||(u.global.define=p),u.global.require=r)}u.init=c,(typeof u.global.define!="function"||!u.global.define.amd)&&(m=new u.ModuleManager(y,u.createScriptLoader(y),p,r,u.Utilities.getHighPerformanceTimestamp()),typeof u.global.require<"u"&&typeof u.global.require!="function"&&r.config(u.global.require),define=function(){return p.apply(null,arguments)},define.amd=p.amd,typeof doNotInitLoader>"u"&&c())})(AMDLoader||(AMDLoader={}));\n\n//# sourceMappingURL=../../min-maps/vs/loader.js.map'},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMonacoSetup=t.prodMonacoSetup=t.loadMonaco=t.waitForLoadedMonaco=t.getMonaco=t.getLoadedMonaco=void 0,t.getLoadedMonaco=function(){if(!monaco)throw new Error("monaco is not loaded yet");return monaco},t.getMonaco=function(){return window.monaco};let i,n,o=!1,s=new Promise(((e,t)=>{i=e,n=t}));function r(e){return{loaderUrl:`${e}/loader.js`,loaderConfigPaths:{vs:`${e}`},codiconUrl:`${e}/base/browser/ui/codicons/codicon/codicon.ttf`,monacoTypesUrl:void 0}}t.waitForLoadedMonaco=async function(){return s},t.loadMonaco=async function(e=t.prodMonacoSetup){return o||(o=!0,async function(e){const t=self;var i;t.require||await(i=e.loaderUrl,new Promise((e=>{const t=document.createElement("script");t.onload=()=>e(),t.async=!0,t.type="text/javascript",t.src=i,document.head.appendChild(t)}))),t.AMD=!0,t.getCodiconPath=()=>e.codiconUrl;const n=t.require;return n.config({paths:e.loaderConfigPaths}),new Promise((e=>{n(["vs/editor/editor.main"],(()=>{n(["vs/basic-languages/monaco.contribution","vs/language/css/monaco.contribution","vs/language/html/monaco.contribution","vs/language/json/monaco.contribution","vs/language/typescript/monaco.contribution"],(()=>{e(monaco)}))}))}))}(e).then(i,n)),s},t.prodMonacoSetup=r("node_modules/monaco-editor/min/vs"),t.getMonacoSetup=r},8616:(e,t,i)=>{"use strict";i.g.require={paths:{vs:"node_modules/monaco-editor/min/vs"}},i(3564),i(2775),i(1248),(0,i(2534).loadMonaco)()}},e=>{e(e.s=8616)}]);
|
||
//# sourceMappingURL=monacoLoader.js.map |