mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
2 lines
No EOL
3.3 MiB
2 lines
No EOL
3.3 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.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)\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/editor/common/core/position","vs/platform/contextkey/common/contextkey","vs/base/common/async","vs/editor/browser/editorExtensions","vs/base/common/arrays","vs/base/common/platform","vs/base/common/types","vs/editor/common/services/languageFeatures","vs/base/common/cancellation","vs/base/common/uri","vs/editor/common/editorContextKeys","vs/platform/theme/common/themeService","vs/editor/common/core/selection","vs/platform/commands/common/commands","vs/base/common/codicons","vs/editor/common/languages","vs/platform/configuration/common/configuration","vs/editor/common/languages/languageConfigurationRegistry","vs/platform/actions/common/actions","vs/base/common/themables","vs/editor/browser/services/codeEditorService","vs/platform/theme/common/colorRegistry","vs/platform/keybinding/common/keybinding","vs/base/browser/fastDomNode","vs/base/common/color","vs/platform/registry/common/platform","vs/editor/common/model/textModel","vs/editor/common/languages/language","vs/base/common/actions","vs/editor/common/config/editorOptions","vs/base/common/resources","vs/platform/notification/common/notification","vs/base/browser/keyboardEvent","vs/base/common/objects","vs/editor/common/model","vs/base/browser/browser","vs/base/browser/ui/aria/aria","vs/platform/instantiation/common/extensions","vs/editor/common/services/model","vs/base/common/network","vs/platform/opener/common/opener","vs/base/common/iterator","vs/editor/browser/view/viewPart","vs/platform/contextview/browser/contextView","vs/base/common/stopwatch","vs/base/browser/touch","vs/base/common/keyCodes","vs/base/common/linkedList","vs/base/common/map","vs/base/common/htmlContent","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/browser/ui/actionbar/actionbar","vs/editor/common/services/languageFeatureDebounce","vs/platform/quickinput/common/quickInput","vs/editor/common/languages/modesRegistry","vs/platform/telemetry/common/telemetry","vs/platform/theme/common/iconRegistry","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/progress/common/progress","vs/base/common/assert","vs/base/common/observable","vs/editor/common/viewModel","vs/editor/common/standaloneStrings","vs/platform/storage/common/storage","vs/base/browser/trustedTypes","vs/editor/common/core/lineRange","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/theme/common/theme","vs/base/common/functional","vs/editor/contrib/hover/browser/hoverTypes","vs/editor/common/core/stringBuilder","vs/platform/clipboard/common/clipboardService","vs/platform/configuration/common/configurationRegistry","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/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/observableImpl/base","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/contrib/snippet/browser/snippetParser","vs/editor/browser/services/bulkEditService","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/common/numbers","vs/base/common/observableImpl/logging","vs/base/common/hash","vs/editor/browser/view/renderingContext","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/core/wordHelper","vs/editor/common/diff/linesDiffComputer","vs/editor/common/editorFeatures","vs/editor/common/viewEventHandler","vs/editor/common/viewLayout/lineDecorations","vs/editor/contrib/inlineCompletions/browser/utils","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/platform/dialogs/common/dialogs","vs/platform/label/common/label","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/common/dataTransfer","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/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/common/services/textResourceConfiguration","vs/platform/audioCues/browser/audioCueService","vs/platform/instantiation/common/serviceCollection","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/editor/browser/coreCommands","vs/editor/contrib/message/browser/messageController","vs/platform/list/browser/listService","vs/platform/undoRedo/common/undoRedo","vs/editor/browser/widget/codeEditorWidget","vs/editor/contrib/find/browser/findModel","vs/editor/contrib/snippet/browser/snippetController2","vs/base/browser/dnd","vs/base/common/ternarySearchTree","vs/css!vs/editor/contrib/colorPicker/browser/colorPicker","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/commandIds","vs/editor/contrib/inlineCompletions/browser/ghostText","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/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/common/config/fontInfo","vs/platform/instantiation/common/descriptors","vs/editor/common/services/markerDecorations","vs/editor/common/services/semanticTokensStyling","vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/editor/browser/widget/diffNavigator","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/editor/browser/services/editorWorkerService","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/inlineCompletionsHintsWidget","vs/editor/contrib/inlineProgress/browser/inlineProgress","vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController","vs/editor/standalone/browser/standaloneServices","vs/base/browser/performance","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/cache","vs/base/common/observableImpl/autorun","vs/base/common/observableImpl/derived","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/viewParts/minimap/minimapCharSheet","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/controller/textAreaState","vs/editor/common/core/rgba","vs/editor/common/cursor/cursorAtomicMoveOperations","vs/editor/common/editorAction","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/treeViewsDnd","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/inlineCompletions/browser/singleTextEdit","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/formattedTextRenderer","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/button/button","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/semanticTokens/common/getSemanticTokens","vs/editor/standalone/common/monarch/monarchLexer","vs/platform/contextkey/common/contextkeys","vs/editor/contrib/dropOrPasteInto/browser/postEditWidget","vs/platform/keybinding/common/keybindingResolver","vs/platform/keybinding/common/resolvedKeybindingItem","vs/editor/standalone/browser/standaloneLayoutService","vs/platform/quickinput/browser/quickInputUtils","vs/platform/dnd/browser/dnd","vs/editor/browser/dnd","vs/editor/common/config/editorConfigurationSchema","vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider","vs/editor/contrib/colorPicker/browser/color","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/colorPicker/browser/colorHoverParticipant","vs/editor/contrib/find/browser/findController","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/hover/browser/contentHover","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/dropOrPasteInto/browser/defaultProviders","vs/editor/contrib/snippet/browser/snippetSession","vs/editor/contrib/suggest/browser/suggestController","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/common/observableImpl/utils","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/dnd/browser/dnd","vs/css!vs/editor/contrib/dropOrPasteInto/browser/postEditWidget","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/inlineCompletionsHintsWidget","vs/css!vs/editor/contrib/inlineProgress/browser/inlineProgressWidget","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/defaultDocumentColorsComputer","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/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/editor/contrib/inlineCompletions/browser/provideInlineCompletions","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/codeActionController","vs/nls!vs/editor/contrib/codeAction/browser/codeActionMenu","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/colorPicker/browser/standaloneColorPickerActions","vs/nls!vs/editor/contrib/comment/browser/comment","vs/nls!vs/editor/contrib/contextmenu/browser/contextmenu","vs/nls!vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/copyPasteController","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/defaultProviders","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController","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/commands","vs/nls!vs/editor/contrib/inlineCompletions/browser/hoverParticipant","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","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/common/services/languageFeaturesService","vs/editor/common/services/treeViewsDndService","vs/editor/contrib/dropOrPasteInto/browser/edit","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/baseResolvedKeybinding","vs/platform/keybinding/common/abstractKeybindingService","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/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/inlineCompletions/browser/inlineCompletionsSource","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/browser/widget/workerBasedDocumentDiffProvider","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/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/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/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/codeActionCommands","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/widget/diffReview","vs/editor/contrib/colorPicker/browser/colorPickerWidget","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/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/colorPicker/browser/standaloneColorPickerWidget","vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/editor/contrib/dropOrPasteInto/browser/copyPasteController","vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController","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/dropOrPasteInto/browser/copyPasteContribution","vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","vs/editor/contrib/suggest/browser/suggestModel","vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider","vs/editor/contrib/inlineCompletions/browser/commands","vs/editor/contrib/inlineCompletions/browser/hoverParticipant","vs/editor/contrib/inlineCompletions/browser/inlineCompletions.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(j){for(var e=[],_=0,k=j.length;_<k;_++)e[_]=J[j[_]];return e};define(J[890],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=void 0;function _(b,S,g,m){if(m=m||{},(m["vs/css"]||{}).disabled){g({});return}const t=S.toUrl(b+".css");k(b,t,()=>{g({})},i=>{typeof g.error=="function"&&g.error("Could not find "+t+".")})}e.load=_;function k(b,S,g,m){if(L(b,S)){g();return}D(b,S,g,m)}function L(b,S){const g=document.getElementsByTagName("link");for(let m=0,s=g.length;m<s;m++){const t=g[m].getAttribute("data-name"),i=g[m].getAttribute("href");if(t===b||i===S)return!0}return!1}function D(b,S,g,m){const s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("data-name",b),w(b,s,g,m),s.setAttribute("href",S),(document.head||document.getElementsByTagName("head")[0]).appendChild(s)}function w(b,S,g,m){const s=()=>{S.removeEventListener("load",t),S.removeEventListener("error",i)},t=n=>{s(),g()},i=n=>{s(),m(n)};S.addEventListener("load",t),S.addEventListener("error",i)}});var we=this&&this.__awaiter||function(j,e,_,k){function L(D){return D instanceof _?D:new _(function(w){w(D)})}return new(_||(_=Promise))(function(D,w){function b(m){try{g(k.next(m))}catch(s){w(s)}}function S(m){try{g(k.throw(m))}catch(s){w(s)}}function g(m){m.done?D(m.value):L(m.value).then(b,S)}g((k=k.apply(j,e||[])).next())})};define(J[3],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=e.create=e.setPseudoTranslation=e.getConfiguredDefaultLocale=e.localize=void 0;let _=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;const k="i-default";function L(n,r){let d;return r.length===0?d=n:d=n.replace(/\\{(\\d+)\\}/g,(h,o)=>{const c=o[0],a=r[c];let l=h;return typeof a=="string"?l=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(l=String(a)),l}),_&&(d="\\uFF3B"+d.replace(/[aouei]/g,"$&$&")+"\\uFF3D"),d}function D(n,r){let d=n[r];return d||(d=n["*"],d)?d:null}function w(n){return n.charAt(n.length-1)==="/"?n:n+"/"}function b(n,r,d){return we(this,void 0,void 0,function*(){const h=w(n)+w(r)+"vscode/"+w(d),o=yield fetch(h);if(o.ok)return yield o.json();throw new Error(`${o.status} - ${o.statusText}`)})}function S(n){return function(r,d){const h=Array.prototype.slice.call(arguments,2);return L(n[r],h)}}function g(n,r,...d){return L(r,d)}e.localize=g;function m(n){}e.getConfiguredDefaultLocale=m;function s(n){_=n}e.setPseudoTranslation=s;function t(n,r){var d;return{localize:S(r[n]),getConfiguredDefaultLocale:(d=r.getConfiguredDefaultLocale)!==null&&d!==void 0?d:h=>{}}}e.create=t;function i(n,r,d,h){var o;const c=(o=h["vs/nls"])!==null&&o!==void 0?o:{};if(!n||n.length===0)return d({localize:g,getConfiguredDefaultLocale:()=>{var f;return(f=c.availableLanguages)===null||f===void 0?void 0:f["*"]}});const a=c.availableLanguages?D(c.availableLanguages,n):null,l=a===null||a===k;let u=".nls";l||(u=u+"."+a);const v=f=>{Array.isArray(f)?f.localize=S(f):f.localize=S(f[n]),f.getConfiguredDefaultLocale=()=>{var p;return(p=c.availableLanguages)===null||p===void 0?void 0:p["*"]},d(f)};typeof c.loadBundle=="function"?c.loadBundle(n,a,(f,p)=>{f?r([n+".nls"],v):v(p)}):c.translationServiceUrl&&!l?we(this,void 0,void 0,function*(){var f;try{const p=yield b(c.translationServiceUrl,a,n);return v(p)}catch(p){if(!a.includes("-"))return console.error(p),r([n+".nls"],v);try{const C=a.split("-")[0],y=yield b(c.translationServiceUrl,C,n);return(f=c.availableLanguages)!==null&&f!==void 0||(c.availableLanguages={}),c.availableLanguages["*"]=C,v(y)}catch(C){return console.error(C),r([n+".nls"],v)}}}):r([n+u],v,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([n+".nls"],v)})}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 pn(j){if(Array.isArray(j)){for(var e=0,_=Array(j.length);e<j.length;e++)_[e]=j[e];return _}else return Array.from(j)}var vn=Object.hasOwnProperty,wi=Object.setPrototypeOf,Cn=Object.isFrozen,bn=Object.getPrototypeOf,_n=Object.getOwnPropertyDescriptor,mt=Object.freeze,wt=Object.seal,Sn=Object.create,yi=typeof Reflect<"u"&&Reflect,Ut=yi.apply,ei=yi.construct;Ut||(Ut=function(e,_,k){return e.apply(_,k)}),mt||(mt=function(e){return e}),wt||(wt=function(e){return e}),ei||(ei=function(e,_){return new(Function.prototype.bind.apply(e,[null].concat(pn(_))))});var wn=vt(Array.prototype.forEach),Li=vt(Array.prototype.pop),Ot=vt(Array.prototype.push),kt=vt(String.prototype.toLowerCase),Ei=vt(String.prototype.match),Et=vt(String.prototype.replace),yn=vt(String.prototype.indexOf),Ln=vt(String.prototype.trim),yt=vt(RegExp.prototype.test),Di=En(TypeError);function vt(j){return function(e){for(var _=arguments.length,k=Array(_>1?_-1:0),L=1;L<_;L++)k[L-1]=arguments[L];return Ut(j,e,k)}}function En(j){return function(){for(var e=arguments.length,_=Array(e),k=0;k<e;k++)_[k]=arguments[k];return ei(j,_)}}function it(j,e){wi&&wi(j,null);for(var _=e.length;_--;){var k=e[_];if(typeof k=="string"){var L=kt(k);L!==k&&(Cn(e)||(e[_]=L),k=L)}j[k]=!0}return j}function Tt(j){var e=Sn(null),_=void 0;for(_ in j)Ut(vn,j,[_])&&(e[_]=j[_]);return e}function Kt(j,e){for(;j!==null;){var _=_n(j,e);if(_){if(_.get)return vt(_.get);if(typeof _.value=="function")return vt(_.value)}j=bn(j)}function k(L){return console.warn("fallback value for",L),null}return k}var Ii=mt(["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=mt(["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=mt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Dn=mt(["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=mt(["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"]),In=mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ki=mt(["#text"]),Ti=mt(["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=mt(["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"]),Ni=mt(["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"]),jt=mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),kn=wt(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm),Tn=wt(/<%[\\s\\S]*|[\\s\\S]*%>/gm),Nn=wt(/^data-[\\-\\w.\\u00B7-\\uFFFF]/),Mn=wt(/^aria-[\\-\\w]+$/),An=wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),Pn=wt(/^(?:\\w+script|data):/i),Rn=wt(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j};function bt(j){if(Array.isArray(j)){for(var e=0,_=Array(j.length);e<j.length;e++)_[e]=j[e];return _}else return Array.from(j)}var On=function(){return typeof window>"u"?null:window},Fn=function(e,_){if((typeof e>"u"?"undefined":Ft(e))!=="object"||typeof e.createPolicy!="function")return null;var k=null,L="data-tt-policy-suffix";_.currentScript&&_.currentScript.hasAttribute(L)&&(k=_.currentScript.getAttribute(L));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 Mi(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:On(),e=function(Ne){return Mi(Ne)};if(e.version="2.3.1",e.removed=[],!j||!j.document||j.document.nodeType!==9)return e.isSupported=!1,e;var _=j.document,k=j.document,L=j.DocumentFragment,D=j.HTMLTemplateElement,w=j.Node,b=j.Element,S=j.NodeFilter,g=j.NamedNodeMap,m=g===void 0?j.NamedNodeMap||j.MozNamedAttrMap:g,s=j.Text,t=j.Comment,i=j.DOMParser,n=j.trustedTypes,r=b.prototype,d=Kt(r,"cloneNode"),h=Kt(r,"nextSibling"),o=Kt(r,"childNodes"),c=Kt(r,"parentNode");if(typeof D=="function"){var a=k.createElement("template");a.content&&a.content.ownerDocument&&(k=a.content.ownerDocument)}var l=Fn(n,_),u=l&&he?l.createHTML(""):"",v=k,f=v.implementation,p=v.createNodeIterator,C=v.createDocumentFragment,y=v.getElementsByTagName,E=_.importNode,I={};try{I=Tt(k).documentMode?k.documentMode:{}}catch{}var T={};e.isSupported=typeof c=="function"&&f&&typeof f.createHTMLDocument<"u"&&I!==9;var O=kn,R=Tn,M=Nn,N=Mn,P=Pn,x=Rn,F=An,B=null,V=it({},[].concat(bt(Ii),bt(ti),bt(ii),bt(ni),bt(ki))),K=null,A=it({},[].concat(bt(Ti),bt(si),bt(Ni),bt(jt))),Y=null,ie=null,le=!0,ne=!0,se=!1,H=!1,W=!1,$=!1,Z=!1,Q=!1,re=!1,ce=!0,he=!1,de=!0,ue=!0,q=!1,z={},U=null,X=it({},["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"]),te=null,G=it({},["audio","video","img","source","image","track"]),ae=null,fe=it({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ce="http://www.w3.org/1998/Math/MathML",Se="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml",Ie=ye,Ee=!1,ke=null,Ae=k.createElement("form"),Pe=function(Ne){ke&&ke===Ne||((!Ne||(typeof Ne>"u"?"undefined":Ft(Ne))!=="object")&&(Ne={}),Ne=Tt(Ne),B="ALLOWED_TAGS"in Ne?it({},Ne.ALLOWED_TAGS):V,K="ALLOWED_ATTR"in Ne?it({},Ne.ALLOWED_ATTR):A,ae="ADD_URI_SAFE_ATTR"in Ne?it(Tt(fe),Ne.ADD_URI_SAFE_ATTR):fe,te="ADD_DATA_URI_TAGS"in Ne?it(Tt(G),Ne.ADD_DATA_URI_TAGS):G,U="FORBID_CONTENTS"in Ne?it({},Ne.FORBID_CONTENTS):X,Y="FORBID_TAGS"in Ne?it({},Ne.FORBID_TAGS):{},ie="FORBID_ATTR"in Ne?it({},Ne.FORBID_ATTR):{},z="USE_PROFILES"in Ne?Ne.USE_PROFILES:!1,le=Ne.ALLOW_ARIA_ATTR!==!1,ne=Ne.ALLOW_DATA_ATTR!==!1,se=Ne.ALLOW_UNKNOWN_PROTOCOLS||!1,H=Ne.SAFE_FOR_TEMPLATES||!1,W=Ne.WHOLE_DOCUMENT||!1,Q=Ne.RETURN_DOM||!1,re=Ne.RETURN_DOM_FRAGMENT||!1,ce=Ne.RETURN_DOM_IMPORT!==!1,he=Ne.RETURN_TRUSTED_TYPE||!1,Z=Ne.FORCE_BODY||!1,de=Ne.SANITIZE_DOM!==!1,ue=Ne.KEEP_CONTENT!==!1,q=Ne.IN_PLACE||!1,F=Ne.ALLOWED_URI_REGEXP||F,Ie=Ne.NAMESPACE||ye,H&&(ne=!1),re&&(Q=!0),z&&(B=it({},[].concat(bt(ki))),K=[],z.html===!0&&(it(B,Ii),it(K,Ti)),z.svg===!0&&(it(B,ti),it(K,si),it(K,jt)),z.svgFilters===!0&&(it(B,ii),it(K,si),it(K,jt)),z.mathMl===!0&&(it(B,ni),it(K,Ni),it(K,jt))),Ne.ADD_TAGS&&(B===V&&(B=Tt(B)),it(B,Ne.ADD_TAGS)),Ne.ADD_ATTR&&(K===A&&(K=Tt(K)),it(K,Ne.ADD_ATTR)),Ne.ADD_URI_SAFE_ATTR&&it(ae,Ne.ADD_URI_SAFE_ATTR),Ne.FORBID_CONTENTS&&(U===X&&(U=Tt(U)),it(U,Ne.FORBID_CONTENTS)),ue&&(B["#text"]=!0),W&&it(B,["html","head","body"]),B.table&&(it(B,["tbody"]),delete Y.tbody),mt&&mt(Ne),ke=Ne)},_e=it({},["mi","mo","mn","ms","mtext"]),me=it({},["foreignobject","desc","title","annotation-xml"]),oe=it({},ti);it(oe,ii),it(oe,Dn);var pe=it({},ni);it(pe,In);var Le=function(Ne){var ze=c(Ne);(!ze||!ze.tagName)&&(ze={namespaceURI:ye,tagName:"template"});var Ve=kt(Ne.tagName),Ze=kt(ze.tagName);if(Ne.namespaceURI===Se)return ze.namespaceURI===ye?Ve==="svg":ze.namespaceURI===Ce?Ve==="svg"&&(Ze==="annotation-xml"||_e[Ze]):!!oe[Ve];if(Ne.namespaceURI===Ce)return ze.namespaceURI===ye?Ve==="math":ze.namespaceURI===Se?Ve==="math"&&me[Ze]:!!pe[Ve];if(Ne.namespaceURI===ye){if(ze.namespaceURI===Se&&!me[Ze]||ze.namespaceURI===Ce&&!_e[Ze])return!1;var tt=it({},["title","style","font","a","script"]);return!pe[Ve]&&(tt[Ve]||!oe[Ve])}return!1},ve=function(Ne){Ot(e.removed,{element:Ne});try{Ne.parentNode.removeChild(Ne)}catch{try{Ne.outerHTML=u}catch{Ne.remove()}}},be=function(Ne,ze){try{Ot(e.removed,{attribute:ze.getAttributeNode(Ne),from:ze})}catch{Ot(e.removed,{attribute:null,from:ze})}if(ze.removeAttribute(Ne),Ne==="is"&&!K[Ne])if(Q||re)try{ve(ze)}catch{}else try{ze.setAttribute(Ne,"")}catch{}},De=function(Ne){var ze=void 0,Ve=void 0;if(Z)Ne="<remove></remove>"+Ne;else{var Ze=Ei(Ne,/^[\\r\\n\\t ]+/);Ve=Ze&&Ze[0]}var tt=l?l.createHTML(Ne):Ne;if(Ie===ye)try{ze=new i().parseFromString(tt,"text/html")}catch{}if(!ze||!ze.documentElement){ze=f.createDocument(Ie,"template",null);try{ze.documentElement.innerHTML=Ee?"":tt}catch{}}var Je=ze.body||ze.documentElement;return Ne&&Ve&&Je.insertBefore(k.createTextNode(Ve),Je.childNodes[0]||null),Ie===ye?y.call(ze,W?"html":"body")[0]:W?ze.documentElement:Je},Me=function(Ne){return p.call(Ne.ownerDocument||Ne,Ne,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT,null,!1)},Oe=function(Ne){return Ne instanceof s||Ne instanceof t?!1:typeof Ne.nodeName!="string"||typeof Ne.textContent!="string"||typeof Ne.removeChild!="function"||!(Ne.attributes instanceof m)||typeof Ne.removeAttribute!="function"||typeof Ne.setAttribute!="function"||typeof Ne.namespaceURI!="string"||typeof Ne.insertBefore!="function"},xe=function(Ne){return(typeof w>"u"?"undefined":Ft(w))==="object"?Ne instanceof w:Ne&&(typeof Ne>"u"?"undefined":Ft(Ne))==="object"&&typeof Ne.nodeType=="number"&&typeof Ne.nodeName=="string"},Fe=function(Ne,ze,Ve){T[Ne]&&wn(T[Ne],function(Ze){Ze.call(e,ze,Ve,ke)})},Ue=function(Ne){var ze=void 0;if(Fe("beforeSanitizeElements",Ne,null),Oe(Ne)||Ei(Ne.nodeName,/[\\u0080-\\uFFFF]/))return ve(Ne),!0;var Ve=kt(Ne.nodeName);if(Fe("uponSanitizeElement",Ne,{tagName:Ve,allowedTags:B}),!xe(Ne.firstElementChild)&&(!xe(Ne.content)||!xe(Ne.content.firstElementChild))&&yt(/<[/\\w]/g,Ne.innerHTML)&&yt(/<[/\\w]/g,Ne.textContent)||Ve==="select"&&yt(/<template/i,Ne.innerHTML))return ve(Ne),!0;if(!B[Ve]||Y[Ve]){if(ue&&!U[Ve]){var Ze=c(Ne)||Ne.parentNode,tt=o(Ne)||Ne.childNodes;if(tt&&Ze)for(var Je=tt.length,et=Je-1;et>=0;--et)Ze.insertBefore(d(tt[et],!0),h(Ne))}return ve(Ne),!0}return Ne instanceof b&&!Le(Ne)||(Ve==="noscript"||Ve==="noembed")&&yt(/<\\/no(script|embed)/i,Ne.innerHTML)?(ve(Ne),!0):(H&&Ne.nodeType===3&&(ze=Ne.textContent,ze=Et(ze,O," "),ze=Et(ze,R," "),Ne.textContent!==ze&&(Ot(e.removed,{element:Ne.cloneNode()}),Ne.textContent=ze)),Fe("afterSanitizeElements",Ne,null),!1)},Be=function(Ne,ze,Ve){if(de&&(ze==="id"||ze==="name")&&(Ve in k||Ve in Ae))return!1;if(!(ne&&!ie[ze]&&yt(M,ze))){if(!(le&&yt(N,ze))){if(!K[ze]||ie[ze])return!1;if(!ae[ze]){if(!yt(F,Et(Ve,x,""))){if(!((ze==="src"||ze==="xlink:href"||ze==="href")&&Ne!=="script"&&yn(Ve,"data:")===0&&te[Ne])){if(!(se&&!yt(P,Et(Ve,x,"")))){if(Ve)return!1}}}}}}return!0},Ke=function(Ne){var ze=void 0,Ve=void 0,Ze=void 0,tt=void 0;Fe("beforeSanitizeAttributes",Ne,null);var Je=Ne.attributes;if(Je){var et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K};for(tt=Je.length;tt--;){ze=Je[tt];var $e=ze,dt=$e.name,at=$e.namespaceURI;if(Ve=Ln(ze.value),Ze=kt(dt),et.attrName=Ze,et.attrValue=Ve,et.keepAttr=!0,et.forceKeepAttr=void 0,Fe("uponSanitizeAttribute",Ne,et),Ve=et.attrValue,!et.forceKeepAttr&&(be(dt,Ne),!!et.keepAttr)){if(yt(/\\/>/i,Ve)){be(dt,Ne);continue}H&&(Ve=Et(Ve,O," "),Ve=Et(Ve,R," "));var rt=Ne.nodeName.toLowerCase();if(Be(rt,Ze,Ve))try{at?Ne.setAttributeNS(at,dt,Ve):Ne.setAttribute(dt,Ve),Li(e.removed)}catch{}}}Fe("afterSanitizeAttributes",Ne,null)}},Ye=function He(Ne){var ze=void 0,Ve=Me(Ne);for(Fe("beforeSanitizeShadowDOM",Ne,null);ze=Ve.nextNode();)Fe("uponSanitizeShadowNode",ze,null),!Ue(ze)&&(ze.content instanceof L&&He(ze.content),Ke(ze));Fe("afterSanitizeShadowDOM",Ne,null)};return e.sanitize=function(He,Ne){var ze=void 0,Ve=void 0,Ze=void 0,tt=void 0,Je=void 0;if(Ee=!He,Ee&&(He="\x3c!--\x3e"),typeof He!="string"&&!xe(He)){if(typeof He.toString!="function")throw Di("toString is not a function");if(He=He.toString(),typeof He!="string")throw Di("dirty is not a string, aborting")}if(!e.isSupported){if(Ft(j.toStaticHTML)==="object"||typeof j.toStaticHTML=="function"){if(typeof He=="string")return j.toStaticHTML(He);if(xe(He))return j.toStaticHTML(He.outerHTML)}return He}if($||Pe(Ne),e.removed=[],typeof He=="string"&&(q=!1),!q)if(He instanceof w)ze=De("\x3c!----\x3e"),Ve=ze.ownerDocument.importNode(He,!0),Ve.nodeType===1&&Ve.nodeName==="BODY"||Ve.nodeName==="HTML"?ze=Ve:ze.appendChild(Ve);else{if(!Q&&!H&&!W&&He.indexOf("<")===-1)return l&&he?l.createHTML(He):He;if(ze=De(He),!ze)return Q?null:u}ze&&Z&&ve(ze.firstChild);for(var et=Me(q?He:ze);Ze=et.nextNode();)Ze.nodeType===3&&Ze===tt||Ue(Ze)||(Ze.content instanceof L&&Ye(Ze.content),Ke(Ze),tt=Ze);if(tt=null,q)return He;if(Q){if(re)for(Je=C.call(ze.ownerDocument);ze.firstChild;)Je.appendChild(ze.firstChild);else Je=ze;return ce&&(Je=E.call(_,Je,!0)),Je}var $e=W?ze.outerHTML:ze.innerHTML;return H&&($e=Et($e,O," "),$e=Et($e,R," ")),l&&he?l.createHTML($e):$e},e.setConfig=function(He){Pe(He),$=!0},e.clearConfig=function(){ke=null,$=!1},e.isValidAttribute=function(He,Ne,ze){ke||Pe({});var Ve=kt(He),Ze=kt(Ne);return Be(Ve,Ze,ze)},e.addHook=function(He,Ne){typeof Ne=="function"&&(T[He]=T[He]||[],Ot(T[He],Ne))},e.removeHook=function(He){T[He]&&Li(T[He])},e.removeHooks=function(He){T[He]&&(T[He]=[])},e.removeAllHooks=function(){T={}},e}var xn=Mi();define("vs/base/browser/dompurify/dompurify",function(){return xn}),define(J[35],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class _{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=_;function k(D){return typeof D=="number"?`${D}px`:D}function L(D){return new _(D)}e.createFastDomNode=L}),define(J[366],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let _=!1,k=null;function L(w){if(!w.parent||w.parent===w)return null;try{const b=w.location,S=w.parent.location;if(b.origin!=="null"&&S.origin!=="null"&&b.origin!==S.origin)return _=!0,null}catch{return _=!0,null}return w.parent}class D{static getSameOriginWindowChain(){if(!k){k=[];let b=window,S;do S=L(b),S?k.push({window:b,iframeElement:b.frameElement||null}):k.push({window:b,iframeElement:null}),b=S;while(b)}return k.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(b,S){if(!S||b===S)return{top:0,left:0};let g=0,m=0;const s=this.getSameOriginWindowChain();for(const t of s){if(g+=t.window.scrollY,m+=t.window.scrollX,t.window===S||!t.iframeElement)break;const i=t.iframeElement.getBoundingClientRect();g+=i.top,m+=i.left}return{top:g,left:m}}}e.IframeUtils=D}),define(J[249],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputLatency=void 0;var _;(function(k){const L={total:0,min:Number.MAX_VALUE,max:0},D=Object.assign({},L),w=Object.assign({},L),b=Object.assign({},L);let S=0;const g={keydown:0,input:0,render:0};function m(){a(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),g.keydown=1,queueMicrotask(s)}k.onKeyDown=m;function s(){g.keydown===1&&(performance.mark("keydown/end"),g.keydown=2)}function t(){performance.mark("input/start"),g.input=1,c()}k.onBeforeInput=t;function i(){g.input===0&&t(),queueMicrotask(n)}k.onInput=i;function n(){g.input===1&&(performance.mark("input/end"),g.input=2)}function r(){a()}k.onKeyUp=r;function d(){a()}k.onSelectionChange=d;function h(){g.keydown===2&&g.input===2&&g.render===0&&(performance.mark("render/start"),g.render=1,queueMicrotask(o),c())}k.onRenderStart=h;function o(){g.render===1&&(performance.mark("render/end"),g.render=2)}function c(){setTimeout(a)}function a(){g.keydown===2&&g.input===2&&g.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"),l("keydown",L),l("input",D),l("render",w),l("inputlatency",b),S++,u())}function l(C,y){const E=performance.getEntriesByName(C)[0].duration;y.total+=E,y.min=Math.min(y.min,E),y.max=Math.max(y.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"),g.keydown=0,g.input=0,g.render=0}function v(){if(S===0)return;const C={keydown:f(L),input:f(D),render:f(w),total:f(b),sampleCount:S};return p(L),p(D),p(w),p(b),S=0,C}k.getAndClearMeasurements=v;function f(C){return{average:C.total/S,max:C.max,min:C.min}}function p(C){C.total=0,C.min=Number.MAX_VALUE,C.max=0}})(_||(e.inputLatency=_={}))}),define(J[367],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListError=void 0;class _ extends Error{constructor(L,D){super(`ListError [${L}] ${D}`)}}e.ListError=_}),define(J[368],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class _{constructor(L){this.spliceables=L}splice(L,D,w){this.spliceables.forEach(b=>b.splice(L,D,w))}}e.CombinedSpliceable=_}),define(J[250],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const _=20;class k{constructor(D,w,b,S,g,m){this._scrollbarSize=Math.round(w),this._oppositeScrollbarSize=Math.round(b),this._arrowSize=Math.round(D),this._visibleSize=S,this._scrollSize=g,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,S,g){const m=Math.max(0,b-D),s=Math.max(0,m-2*w),t=S>0&&S>b;if(!t)return{computedAvailableSize:Math.round(m),computedIsNeeded:t,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const i=Math.round(Math.max(_,Math.floor(b*s/S))),n=(s-i)/(S-b),r=g*n;return{computedAvailableSize:Math.round(m),computedIsNeeded:t,computedSliderSize:Math.round(i),computedSliderRatio:n,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[133],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WeakMapper=e.TreeError=e.TreeMouseEventTarget=e.ObjectTreeElementCollapseState=void 0;var _;(function(w){w[w.Expanded=0]="Expanded",w[w.Collapsed=1]="Collapsed",w[w.PreserveOrExpanded=2]="PreserveOrExpanded",w[w.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(_||(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=k={}));class L extends Error{constructor(b,S){super(`TreeError [${b}] ${S}`)}}e.TreeError=L;class D{constructor(b){this.fn=b,this._map=new WeakMap}map(b){let S=this._map.get(b);return S||(S=this.fn(b),this._map.set(b,S)),S}}e.WeakMapper=D}),define(J[16],ee([1,0]),function(j,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.mapFind=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 _(F,B=0){return F[F.length-(1+B)]}e.tail=_;function k(F){if(F.length===0)throw new Error("Invalid tail call");return[F.slice(0,F.length-1),F[F.length-1]]}e.tail2=k;function L(F,B,V=(K,A)=>K===A){if(F===B)return!0;if(!F||!B||F.length!==B.length)return!1;for(let K=0,A=F.length;K<A;K++)if(!V(F[K],B[K]))return!1;return!0}e.equals=L;function D(F,B){const V=F.length-1;B<V&&(F[B]=F[V]),F.pop()}e.removeFastWithoutKeepingOrder=D;function w(F,B,V){return b(F.length,K=>V(F[K],B))}e.binarySearch=w;function b(F,B){let V=0,K=F-1;for(;V<=K;){const A=(V+K)/2|0,Y=B(A);if(Y<0)V=A+1;else if(Y>0)K=A-1;else return A}return-(V+1)}e.binarySearch2=b;function S(F,B){let V=0,K=F.length;if(K===0)return 0;for(;V<K;){const A=Math.floor((V+K)/2);B(F[A])?K=A:V=A+1}return V}e.findFirstInSorted=S;function g(F,B,V){if(F=F|0,F>=B.length)throw new TypeError("invalid index");const K=B[Math.floor(B.length*Math.random())],A=[],Y=[],ie=[];for(const le of B){const ne=V(le,K);ne<0?A.push(le):ne>0?Y.push(le):ie.push(le)}return F<A.length?g(F,A,V):F<A.length+ie.length?ie[0]:g(F-(A.length+ie.length),Y,V)}e.quickSelect=g;function m(F,B){const V=[];let K;for(const A of F.slice(0).sort(B))!K||B(K[0],A)!==0?(K=[A],V.push(K)):K.push(A);return V}e.groupBy=m;function s(F){return F.filter(B=>!!B)}e.coalesce=s;function t(F){let B=0;for(let V=0;V<F.length;V++)F[V]&&(F[B]=F[V],B+=1);F.length=B}e.coalesceInPlace=t;function i(F){return!Array.isArray(F)||F.length===0}e.isFalsyOrEmpty=i;function n(F){return Array.isArray(F)&&F.length>0}e.isNonEmptyArray=n;function r(F,B=V=>V){const V=new Set;return F.filter(K=>{const A=B(K);return V.has(A)?!1:(V.add(A),!0)})}e.distinct=r;function d(F,B){const V=h(F,B);if(V!==-1)return F[V]}e.findLast=d;function h(F,B){for(let V=F.length-1;V>=0;V--){const K=F[V];if(B(K))return V}return-1}e.lastIndex=h;function o(F,B){return F.length>0?F[0]:B}e.firstOrDefault=o;function c(F,B){let V=typeof B=="number"?F:0;typeof B=="number"?V=F:(V=0,B=F);const K=[];if(V<=B)for(let A=V;A<B;A++)K.push(A);else for(let A=V;A>B;A--)K.push(A);return K}e.range=c;function a(F,B,V){const K=F.slice(0,B),A=F.slice(B);return K.concat(V,A)}e.arrayInsert=a;function l(F,B){const V=F.indexOf(B);V>-1&&(F.splice(V,1),F.unshift(B))}e.pushToStart=l;function u(F,B){const V=F.indexOf(B);V>-1&&(F.splice(V,1),F.push(B))}e.pushToEnd=u;function v(F,B){for(const V of B)F.push(V)}e.pushMany=v;function f(F){return Array.isArray(F)?F:[F]}e.asArray=f;function p(F,B){for(const V of F){const K=B(V);if(K!==void 0)return K}}e.mapFind=p;function C(F,B,V){const K=E(F,B),A=F.length,Y=V.length;F.length=A+Y;for(let ie=A-1;ie>=K;ie--)F[ie+Y]=F[ie];for(let ie=0;ie<Y;ie++)F[ie+K]=V[ie]}e.insertInto=C;function y(F,B,V,K){const A=E(F,B),Y=F.splice(A,V);return C(F,A,K),Y}e.splice=y;function E(F,B){return B<0?Math.max(B+F.length,0):Math.min(B,F.length)}var I;(function(F){function B(A){return A<0}F.isLessThan=B;function V(A){return A>0}F.isGreaterThan=V;function K(A){return A===0}F.isNeitherLessOrGreaterThan=K,F.greaterThan=1,F.lessThan=-1,F.neitherLessOrGreaterThan=0})(I||(e.CompareResult=I={}));function T(F,B){return(V,K)=>B(F(V),F(K))}e.compareBy=T;const O=(F,B)=>F-B;e.numberComparator=O;function R(F,B){if(F.length===0)return;let V=F[0];for(let K=1;K<F.length;K++){const A=F[K];B(A,V)>0&&(V=A)}return V}e.findMaxBy=R;function M(F,B){if(F.length===0)return;let V=F[0];for(let K=1;K<F.length;K++){const A=F[K];B(A,V)>=0&&(V=A)}return V}e.findLastMaxBy=M;function N(F,B){return R(F,(V,K)=>-B(V,K))}e.findMinBy=N;class P{constructor(B){this.items=B,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(B){let V=this.firstIdx;for(;V<this.items.length&&B(this.items[V]);)V++;const K=V===this.firstIdx?null:this.items.slice(this.firstIdx,V);return this.firstIdx=V,K}takeFromEndWhile(B){let V=this.lastIdx;for(;V>=0&&B(this.items[V]);)V--;const K=V===this.lastIdx?null:this.items.slice(V+1,this.lastIdx+1);return this.lastIdx=V,K}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const B=this.items[this.firstIdx];return this.firstIdx++,B}takeCount(B){const V=this.items.slice(this.firstIdx,this.firstIdx+B);return this.firstIdx+=B,V}}e.ArrayQueue=P;class x{constructor(B){this.iterate=B}toArray(){const B=[];return this.iterate(V=>(B.push(V),!0)),B}filter(B){return new x(V=>this.iterate(K=>B(K)?V(K):!0))}map(B){return new x(V=>this.iterate(K=>V(B(K))))}findLast(B){let V;return this.iterate(K=>(B(K)&&(V=K),!0)),V}findLastMaxBy(B){let V,K=!0;return this.iterate(A=>((K||I.isGreaterThan(B(A,V)))&&(K=!1,V=A),!0)),V}}e.CallbackIterable=x,x.empty=new x(F=>{})}),define(J[251],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=void 0;class _{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=_;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[369],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=void 0;class _{constructor(){this.map=new Map}add(L,D){let w=this.map.get(L);w||(w=new Set,this.map.set(L,w)),w.add(D)}delete(L,D){const w=this.map.get(L);w&&(w.delete(D),w.size===0&&this.map.delete(L))}forEach(L,D){const w=this.map.get(L);w&&w.forEach(D)}}e.SetMap=_}),define(J[36],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function _(b,S){const g=Math.pow(10,S);return Math.round(b*g)/g}class k{constructor(S,g,m,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,S))|0,this.g=Math.min(255,Math.max(0,g))|0,this.b=Math.min(255,Math.max(0,m))|0,this.a=_(Math.max(Math.min(1,s),0),3)}static equals(S,g){return S.r===g.r&&S.g===g.g&&S.b===g.b&&S.a===g.a}}e.RGBA=k;class L{constructor(S,g,m,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,S),0)|0,this.s=_(Math.max(Math.min(1,g),0),3),this.l=_(Math.max(Math.min(1,m),0),3),this.a=_(Math.max(Math.min(1,s),0),3)}static equals(S,g){return S.h===g.h&&S.s===g.s&&S.l===g.l&&S.a===g.a}static fromRGBA(S){const g=S.r/255,m=S.g/255,s=S.b/255,t=S.a,i=Math.max(g,m,s),n=Math.min(g,m,s);let r=0,d=0;const h=(n+i)/2,o=i-n;if(o>0){switch(d=Math.min(h<=.5?o/(2*h):o/(2-2*h),1),i){case g:r=(m-s)/o+(m<s?6:0);break;case m:r=(s-g)/o+2;break;case s:r=(g-m)/o+4;break}r*=60,r=Math.round(r)}return new L(r,d,h,t)}static _hue2rgb(S,g,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?S+(g-S)*6*m:m<1/2?g:m<2/3?S+(g-S)*(2/3-m)*6:S}static toRGBA(S){const g=S.h/360,{s:m,l:s,a:t}=S;let i,n,r;if(m===0)i=n=r=s;else{const d=s<.5?s*(1+m):s+m-s*m,h=2*s-d;i=L._hue2rgb(h,d,g+1/3),n=L._hue2rgb(h,d,g),r=L._hue2rgb(h,d,g-1/3)}return new k(Math.round(i*255),Math.round(n*255),Math.round(r*255),t)}}e.HSLA=L;class D{constructor(S,g,m,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,S),0)|0,this.s=_(Math.max(Math.min(1,g),0),3),this.v=_(Math.max(Math.min(1,m),0),3),this.a=_(Math.max(Math.min(1,s),0),3)}static equals(S,g){return S.h===g.h&&S.s===g.s&&S.v===g.v&&S.a===g.a}static fromRGBA(S){const g=S.r/255,m=S.g/255,s=S.b/255,t=Math.max(g,m,s),i=Math.min(g,m,s),n=t-i,r=t===0?0:n/t;let d;return n===0?d=0:t===g?d=((m-s)/n%6+6)%6:t===m?d=(s-g)/n+2:d=(g-m)/n+4,new D(Math.round(d*60),r,t,S.a)}static toRGBA(S){const{h:g,s:m,v:s,a:t}=S,i=s*m,n=i*(1-Math.abs(g/60%2-1)),r=s-i;let[d,h,o]=[0,0,0];return g<60?(d=i,h=n):g<120?(d=n,h=i):g<180?(h=i,o=n):g<240?(h=n,o=i):g<300?(d=n,o=i):g<=360&&(d=i,o=n),d=Math.round((d+r)*255),h=Math.round((h+r)*255),o=Math.round((o+r)*255),new k(d,h,o,t)}}e.HSVA=D;class w{static fromHex(S){return w.Format.CSS.parseHex(S)||w.red}static equals(S,g){return!S&&!g?!0:!S||!g?!1:S.equals(g)}get hsla(){return this._hsla?this._hsla:L.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:D.fromRGBA(this.rgba)}constructor(S){if(S)if(S instanceof k)this.rgba=S;else if(S instanceof L)this._hsla=S,this.rgba=L.toRGBA(S);else if(S instanceof D)this._hsva=S,this.rgba=D.toRGBA(S);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(S){return!!S&&k.equals(this.rgba,S.rgba)&&L.equals(this.hsla,S.hsla)&&D.equals(this.hsva,S.hsva)}getRelativeLuminance(){const S=w._relativeLuminanceForComponent(this.rgba.r),g=w._relativeLuminanceForComponent(this.rgba.g),m=w._relativeLuminanceForComponent(this.rgba.b),s=.2126*S+.7152*g+.0722*m;return _(s,4)}static _relativeLuminanceForComponent(S){const g=S/255;return g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(S){const g=this.getRelativeLuminance(),m=S.getRelativeLuminance();return g>m}isDarkerThan(S){const g=this.getRelativeLuminance(),m=S.getRelativeLuminance();return g<m}lighten(S){return new w(new L(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*S,this.hsla.a))}darken(S){return new w(new L(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*S,this.hsla.a))}transparent(S){const{r:g,g:m,b:s,a:t}=this.rgba;return new w(new k(g,m,s,t*S))}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(S){if(this.isOpaque()||S.rgba.a!==1)return this;const{r:g,g:m,b:s,a:t}=this.rgba;return new w(new k(S.rgba.r-t*(S.rgba.r-g),S.rgba.g-t*(S.rgba.g-m),S.rgba.b-t*(S.rgba.b-s),1))}toString(){return this._toString||(this._toString=w.Format.CSS.format(this)),this._toString}static getLighterColor(S,g,m){if(S.isLighterThan(g))return S;m=m||.5;const s=S.getRelativeLuminance(),t=g.getRelativeLuminance();return m=m*(t-s)/t,S.lighten(m)}static getDarkerColor(S,g,m){if(S.isDarkerThan(g))return S;m=m||.5;const s=S.getRelativeLuminance(),t=g.getRelativeLuminance();return m=m*(s-t)/s,S.darken(m)}}e.Color=w,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)),function(b){let S;(function(g){let m;(function(s){function t(u){return u.rgba.a===1?`rgb(${u.rgba.r}, ${u.rgba.g}, ${u.rgba.b})`:b.Format.CSS.formatRGBA(u)}s.formatRGB=t;function i(u){return`rgba(${u.rgba.r}, ${u.rgba.g}, ${u.rgba.b}, ${+u.rgba.a.toFixed(2)})`}s.formatRGBA=i;function n(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)}s.formatHSL=n;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)})`}s.formatHSLA=r;function d(u){const v=u.toString(16);return v.length!==2?"0"+v:v}function h(u){return`#${d(u.rgba.r)}${d(u.rgba.g)}${d(u.rgba.b)}`}s.formatHex=h;function o(u,v=!1){return v&&u.rgba.a===1?b.Format.CSS.formatHex(u):`#${d(u.rgba.r)}${d(u.rgba.g)}${d(u.rgba.b)}${d(Math.round(u.rgba.a*255))}`}s.formatHexA=o;function c(u){return u.isOpaque()?b.Format.CSS.formatHex(u):b.Format.CSS.formatRGBA(u)}s.format=c;function a(u){const v=u.length;if(v===0||u.charCodeAt(0)!==35)return null;if(v===7){const f=16*l(u.charCodeAt(1))+l(u.charCodeAt(2)),p=16*l(u.charCodeAt(3))+l(u.charCodeAt(4)),C=16*l(u.charCodeAt(5))+l(u.charCodeAt(6));return new b(new k(f,p,C,1))}if(v===9){const f=16*l(u.charCodeAt(1))+l(u.charCodeAt(2)),p=16*l(u.charCodeAt(3))+l(u.charCodeAt(4)),C=16*l(u.charCodeAt(5))+l(u.charCodeAt(6)),y=16*l(u.charCodeAt(7))+l(u.charCodeAt(8));return new b(new k(f,p,C,y/255))}if(v===4){const f=l(u.charCodeAt(1)),p=l(u.charCodeAt(2)),C=l(u.charCodeAt(3));return new b(new k(16*f+f,16*p+p,16*C+C))}if(v===5){const f=l(u.charCodeAt(1)),p=l(u.charCodeAt(2)),C=l(u.charCodeAt(3)),y=l(u.charCodeAt(4));return new b(new k(16*f+f,16*p+p,16*C+C,(16*y+y)/255))}return null}s.parseHex=a;function l(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=g.CSS||(g.CSS={}))})(S=b.Format||(b.Format={}))}(w||(e.Color=w={}))}),define(J[101],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.memoize=void 0;function _(k,L,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 S=`$memoize$${L}`;D[w]=function(...g){return this.hasOwnProperty(S)||Object.defineProperty(this,S,{configurable:!1,enumerable:!1,writable:!1,value:b.apply(this,g)}),this[S]}}e.memoize=_}),define(J[370],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class _{constructor(L,D,w,b){this.originalStart=L,this.originalLength=D,this.modifiedStart=w,this.modifiedLength=b}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=_}),define(J[11],ee([1,0]),function(j,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 _{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(d){setTimeout(()=>{throw d.stack?i.isErrorNoTelemetry(d)?new i(d.message+`\n\n`+d.stack):new Error(d.message+`\n\n`+d.stack):d},0)}}emit(d){this.listeners.forEach(h=>{h(d)})}onUnexpectedError(d){this.unexpectedErrorHandler(d),this.emit(d)}onUnexpectedExternalError(d){this.unexpectedErrorHandler(d)}}e.ErrorHandler=_,e.errorHandler=new _;function k(r){b(r)||e.errorHandler.onUnexpectedError(r)}e.onUnexpectedError=k;function L(r){b(r)||e.errorHandler.onUnexpectedExternalError(r)}e.onUnexpectedExternalError=L;function D(r){if(r instanceof Error){const{name:d,message:h}=r,o=r.stacktrace||r.stack;return{$isError:!0,name:d,message:h,stack:o,noTelemetry:i.isErrorNoTelemetry(r)}}return r}e.transformErrorForSerialization=D;const w="Canceled";function b(r){return r instanceof S?!0:r instanceof Error&&r.name===w&&r.message===w}e.isCancellationError=b;class S extends Error{constructor(){super(w),this.name=this.message}}e.CancellationError=S;function g(){const r=new Error(w);return r.name=r.message,r}e.canceled=g;function m(r){return r?new Error(`Illegal argument: ${r}`):new Error("Illegal argument")}e.illegalArgument=m;function s(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}e.illegalState=s;class t extends Error{constructor(d){super("NotSupported"),d&&(this.message=d)}}e.NotSupportedError=t;class i extends Error{constructor(d){super(d),this.name="CodeExpectedError"}static fromError(d){if(d instanceof i)return d;const h=new i;return h.message=d.message,h.stack=d.stack,h}static isErrorNoTelemetry(d){return d.name==="CodeExpectedError"}}e.ErrorNoTelemetry=i;class n extends Error{constructor(d){super(d||"An unexpected bug occurred."),Object.setPrototypeOf(this,n.prototype)}}e.BugIndicatingError=n}),define(J[86],ee([1,0,11]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTrustedTypesPolicy=void 0;function k(L,D){var w;const b=globalThis.MonacoEnvironment;if(b?.createTrustedTypesPolicy)try{return b.createTrustedTypesPolicy(L,D)}catch(S){(0,_.onUnexpectedError)(S);return}try{return(w=window.trustedTypes)===null||w===void 0?void 0:w.createPolicy(L,D)}catch(S){(0,_.onUnexpectedError)(S);return}}e.createTrustedTypesPolicy=k}),define(J[81],ee([1,0,11]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assertNever=e.ok=void 0;function k(b,S){if(!b)throw new Error(S?`Assertion failed (${S})`:"Assertion Failed")}e.ok=k;function L(b,S="Unreachable"){throw new Error(S)}e.assertNever=L;function D(b){if(!b()){debugger;b(),(0,_.onUnexpectedError)(new _.BugIndicatingError("Assertion Failed"))}}e.assertFn=D;function w(b,S){let g=0;for(;g<b.length-1;){const m=b[g],s=b[g+1];if(!S(m,s))return!1;g++}return!0}e.checkAdjacentItems=w}),define(J[94],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function _(k){const L=this;let D=!1,w;return function(){return D||(D=!0,w=k.apply(L,arguments)),w}}e.once=_}),define(J[160],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class _{constructor(L){this._prefix=L,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=_,e.defaultGenerator=new _("id#")}),define(J[53],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var _;(function(k){function L(a){return a&&typeof a=="object"&&typeof a[Symbol.iterator]=="function"}k.is=L;const D=Object.freeze([]);function w(){return D}k.empty=w;function*b(a){yield a}k.single=b;function S(a){return L(a)?a:b(a)}k.wrap=S;function g(a){return a||D}k.from=g;function m(a){return!a||a[Symbol.iterator]().next().done===!0}k.isEmpty=m;function s(a){return a[Symbol.iterator]().next().value}k.first=s;function t(a,l){for(const u of a)if(l(u))return!0;return!1}k.some=t;function i(a,l){for(const u of a)if(l(u))return u}k.find=i;function*n(a,l){for(const u of a)l(u)&&(yield u)}k.filter=n;function*r(a,l){let u=0;for(const v of a)yield l(v,u++)}k.map=r;function*d(...a){for(const l of a)for(const u of l)yield u}k.concat=d;function h(a,l,u){let v=u;for(const f of a)v=l(v,f);return v}k.reduce=h;function*o(a,l,u=a.length){for(l<0&&(l+=a.length),u<0?u+=a.length:u>a.length&&(u=a.length);l<u;l++)yield a[l]}k.slice=o;function c(a,l=Number.POSITIVE_INFINITY){const u=[];if(l===0)return[u,a];const v=a[Symbol.iterator]();for(let f=0;f<l;f++){const p=v.next();if(p.done)return[u,k.empty()];u.push(p.value)}return[u,{[Symbol.iterator](){return v}}]}k.consume=c})(_||(e.Iterable=_={}))}),define(J[58],ee([1,0]),function(j,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 _{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 _,L=new _,D=new _;e.EVENT_KEY_CODE_MAP=new Array(230),e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const w=[],b=Object.create(null),S=Object.create(null);e.IMMUTABLE_CODE_TO_KEY_CODE=[],e.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let s=0;s<=193;s++)e.IMMUTABLE_CODE_TO_KEY_CODE[s]=-1;for(let s=0;s<=132;s++)e.IMMUTABLE_KEY_CODE_TO_CODE[s]=-1;(function(){const s="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",s,s],[1,1,"Hyper",0,s,0,s,s,s],[1,2,"Super",0,s,0,s,s,s],[1,3,"Fn",0,s,0,s,s,s],[1,4,"FnLock",0,s,0,s,s,s],[1,5,"Suspend",0,s,0,s,s,s],[1,6,"Resume",0,s,0,s,s,s],[1,7,"Turbo",0,s,0,s,s,s],[1,8,"Sleep",0,s,0,"VK_SLEEP",s,s],[1,9,"WakeUp",0,s,0,s,s,s],[0,10,"KeyA",31,"A",65,"VK_A",s,s],[0,11,"KeyB",32,"B",66,"VK_B",s,s],[0,12,"KeyC",33,"C",67,"VK_C",s,s],[0,13,"KeyD",34,"D",68,"VK_D",s,s],[0,14,"KeyE",35,"E",69,"VK_E",s,s],[0,15,"KeyF",36,"F",70,"VK_F",s,s],[0,16,"KeyG",37,"G",71,"VK_G",s,s],[0,17,"KeyH",38,"H",72,"VK_H",s,s],[0,18,"KeyI",39,"I",73,"VK_I",s,s],[0,19,"KeyJ",40,"J",74,"VK_J",s,s],[0,20,"KeyK",41,"K",75,"VK_K",s,s],[0,21,"KeyL",42,"L",76,"VK_L",s,s],[0,22,"KeyM",43,"M",77,"VK_M",s,s],[0,23,"KeyN",44,"N",78,"VK_N",s,s],[0,24,"KeyO",45,"O",79,"VK_O",s,s],[0,25,"KeyP",46,"P",80,"VK_P",s,s],[0,26,"KeyQ",47,"Q",81,"VK_Q",s,s],[0,27,"KeyR",48,"R",82,"VK_R",s,s],[0,28,"KeyS",49,"S",83,"VK_S",s,s],[0,29,"KeyT",50,"T",84,"VK_T",s,s],[0,30,"KeyU",51,"U",85,"VK_U",s,s],[0,31,"KeyV",52,"V",86,"VK_V",s,s],[0,32,"KeyW",53,"W",87,"VK_W",s,s],[0,33,"KeyX",54,"X",88,"VK_X",s,s],[0,34,"KeyY",55,"Y",89,"VK_Y",s,s],[0,35,"KeyZ",56,"Z",90,"VK_Z",s,s],[0,36,"Digit1",22,"1",49,"VK_1",s,s],[0,37,"Digit2",23,"2",50,"VK_2",s,s],[0,38,"Digit3",24,"3",51,"VK_3",s,s],[0,39,"Digit4",25,"4",52,"VK_4",s,s],[0,40,"Digit5",26,"5",53,"VK_5",s,s],[0,41,"Digit6",27,"6",54,"VK_6",s,s],[0,42,"Digit7",28,"7",55,"VK_7",s,s],[0,43,"Digit8",29,"8",56,"VK_8",s,s],[0,44,"Digit9",30,"9",57,"VK_9",s,s],[0,45,"Digit0",21,"0",48,"VK_0",s,s],[1,46,"Enter",3,"Enter",13,"VK_RETURN",s,s],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",s,s],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",s,s],[1,49,"Tab",2,"Tab",9,"VK_TAB",s,s],[1,50,"Space",10,"Space",32,"VK_SPACE",s,s],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\\\",220,"VK_OEM_5","\\\\","OEM_5"],[0,56,"IntlHash",0,s,0,s,s,s],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"\'",222,"VK_OEM_7","\'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",s,s],[1,64,"F1",59,"F1",112,"VK_F1",s,s],[1,65,"F2",60,"F2",113,"VK_F2",s,s],[1,66,"F3",61,"F3",114,"VK_F3",s,s],[1,67,"F4",62,"F4",115,"VK_F4",s,s],[1,68,"F5",63,"F5",116,"VK_F5",s,s],[1,69,"F6",64,"F6",117,"VK_F6",s,s],[1,70,"F7",65,"F7",118,"VK_F7",s,s],[1,71,"F8",66,"F8",119,"VK_F8",s,s],[1,72,"F9",67,"F9",120,"VK_F9",s,s],[1,73,"F10",68,"F10",121,"VK_F10",s,s],[1,74,"F11",69,"F11",122,"VK_F11",s,s],[1,75,"F12",70,"F12",123,"VK_F12",s,s],[1,76,"PrintScreen",0,s,0,s,s,s],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",s,s],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",s,s],[1,79,"Insert",19,"Insert",45,"VK_INSERT",s,s],[1,80,"Home",14,"Home",36,"VK_HOME",s,s],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",s,s],[1,82,"Delete",20,"Delete",46,"VK_DELETE",s,s],[1,83,"End",13,"End",35,"VK_END",s,s],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",s,s],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",s],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",s],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",s],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",s],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",s,s],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",s,s],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",s,s],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",s,s],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",s,s],[1,94,"NumpadEnter",3,s,0,s,s,s],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",s,s],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",s,s],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",s,s],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",s,s],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",s,s],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",s,s],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",s,s],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",s,s],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",s,s],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",s,s],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",s,s],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",s,s],[1,107,"ContextMenu",58,"ContextMenu",93,s,s,s],[1,108,"Power",0,s,0,s,s,s],[1,109,"NumpadEqual",0,s,0,s,s,s],[1,110,"F13",71,"F13",124,"VK_F13",s,s],[1,111,"F14",72,"F14",125,"VK_F14",s,s],[1,112,"F15",73,"F15",126,"VK_F15",s,s],[1,113,"F16",74,"F16",127,"VK_F16",s,s],[1,114,"F17",75,"F17",128,"VK_F17",s,s],[1,115,"F18",76,"F18",129,"VK_F18",s,s],[1,116,"F19",77,"F19",130,"VK_F19",s,s],[1,117,"F20",78,"F20",131,"VK_F20",s,s],[1,118,"F21",79,"F21",132,"VK_F21",s,s],[1,119,"F22",80,"F22",133,"VK_F22",s,s],[1,120,"F23",81,"F23",134,"VK_F23",s,s],[1,121,"F24",82,"F24",135,"VK_F24",s,s],[1,122,"Open",0,s,0,s,s,s],[1,123,"Help",0,s,0,s,s,s],[1,124,"Select",0,s,0,s,s,s],[1,125,"Again",0,s,0,s,s,s],[1,126,"Undo",0,s,0,s,s,s],[1,127,"Cut",0,s,0,s,s,s],[1,128,"Copy",0,s,0,s,s,s],[1,129,"Paste",0,s,0,s,s,s],[1,130,"Find",0,s,0,s,s,s],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",s,s],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",s,s],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",s,s],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",s,s],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",s,s],[1,136,"KanaMode",0,s,0,s,s,s],[0,137,"IntlYen",0,s,0,s,s,s],[1,138,"Convert",0,s,0,s,s,s],[1,139,"NonConvert",0,s,0,s,s,s],[1,140,"Lang1",0,s,0,s,s,s],[1,141,"Lang2",0,s,0,s,s,s],[1,142,"Lang3",0,s,0,s,s,s],[1,143,"Lang4",0,s,0,s,s,s],[1,144,"Lang5",0,s,0,s,s,s],[1,145,"Abort",0,s,0,s,s,s],[1,146,"Props",0,s,0,s,s,s],[1,147,"NumpadParenLeft",0,s,0,s,s,s],[1,148,"NumpadParenRight",0,s,0,s,s,s],[1,149,"NumpadBackspace",0,s,0,s,s,s],[1,150,"NumpadMemoryStore",0,s,0,s,s,s],[1,151,"NumpadMemoryRecall",0,s,0,s,s,s],[1,152,"NumpadMemoryClear",0,s,0,s,s,s],[1,153,"NumpadMemoryAdd",0,s,0,s,s,s],[1,154,"NumpadMemorySubtract",0,s,0,s,s,s],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",s,s],[1,156,"NumpadClearEntry",0,s,0,s,s,s],[1,0,s,5,"Ctrl",17,"VK_CONTROL",s,s],[1,0,s,4,"Shift",16,"VK_SHIFT",s,s],[1,0,s,6,"Alt",18,"VK_MENU",s,s],[1,0,s,57,"Meta",91,"VK_COMMAND",s,s],[1,157,"ControlLeft",5,s,0,"VK_LCONTROL",s,s],[1,158,"ShiftLeft",4,s,0,"VK_LSHIFT",s,s],[1,159,"AltLeft",6,s,0,"VK_LMENU",s,s],[1,160,"MetaLeft",57,s,0,"VK_LWIN",s,s],[1,161,"ControlRight",5,s,0,"VK_RCONTROL",s,s],[1,162,"ShiftRight",4,s,0,"VK_RSHIFT",s,s],[1,163,"AltRight",6,s,0,"VK_RMENU",s,s],[1,164,"MetaRight",57,s,0,"VK_RWIN",s,s],[1,165,"BrightnessUp",0,s,0,s,s,s],[1,166,"BrightnessDown",0,s,0,s,s,s],[1,167,"MediaPlay",0,s,0,s,s,s],[1,168,"MediaRecord",0,s,0,s,s,s],[1,169,"MediaFastForward",0,s,0,s,s,s],[1,170,"MediaRewind",0,s,0,s,s,s],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",s,s],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",s,s],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",s,s],[1,174,"Eject",0,s,0,s,s,s],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",s,s],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",s,s],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",s,s],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",s,s],[1,179,"LaunchApp1",0,s,0,"VK_MEDIA_LAUNCH_APP1",s,s],[1,180,"SelectTask",0,s,0,s,s,s],[1,181,"LaunchScreenSaver",0,s,0,s,s,s],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",s,s],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",s,s],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",s,s],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",s,s],[1,186,"BrowserStop",0,s,0,"VK_BROWSER_STOP",s,s],[1,187,"BrowserRefresh",0,s,0,"VK_BROWSER_REFRESH",s,s],[1,188,"BrowserFavorites",0,s,0,"VK_BROWSER_FAVORITES",s,s],[1,189,"ZoomToggle",0,s,0,s,s,s],[1,190,"MailReply",0,s,0,s,s,s],[1,191,"MailForward",0,s,0,s,s,s],[1,192,"MailSend",0,s,0,s,s,s],[1,0,s,114,"KeyInComposition",229,s,s,s],[1,0,s,116,"ABNT_C2",194,"VK_ABNT_C2",s,s],[1,0,s,96,"OEM_8",223,"VK_OEM_8",s,s],[1,0,s,0,s,0,"VK_KANA",s,s],[1,0,s,0,s,0,"VK_HANGUL",s,s],[1,0,s,0,s,0,"VK_JUNJA",s,s],[1,0,s,0,s,0,"VK_FINAL",s,s],[1,0,s,0,s,0,"VK_HANJA",s,s],[1,0,s,0,s,0,"VK_KANJI",s,s],[1,0,s,0,s,0,"VK_CONVERT",s,s],[1,0,s,0,s,0,"VK_NONCONVERT",s,s],[1,0,s,0,s,0,"VK_ACCEPT",s,s],[1,0,s,0,s,0,"VK_MODECHANGE",s,s],[1,0,s,0,s,0,"VK_SELECT",s,s],[1,0,s,0,s,0,"VK_PRINT",s,s],[1,0,s,0,s,0,"VK_EXECUTE",s,s],[1,0,s,0,s,0,"VK_SNAPSHOT",s,s],[1,0,s,0,s,0,"VK_HELP",s,s],[1,0,s,0,s,0,"VK_APPS",s,s],[1,0,s,0,s,0,"VK_PROCESSKEY",s,s],[1,0,s,0,s,0,"VK_PACKET",s,s],[1,0,s,0,s,0,"VK_DBE_SBCSCHAR",s,s],[1,0,s,0,s,0,"VK_DBE_DBCSCHAR",s,s],[1,0,s,0,s,0,"VK_ATTN",s,s],[1,0,s,0,s,0,"VK_CRSEL",s,s],[1,0,s,0,s,0,"VK_EXSEL",s,s],[1,0,s,0,s,0,"VK_EREOF",s,s],[1,0,s,0,s,0,"VK_PLAY",s,s],[1,0,s,0,s,0,"VK_ZOOM",s,s],[1,0,s,0,s,0,"VK_NONAME",s,s],[1,0,s,0,s,0,"VK_PA1",s,s],[1,0,s,0,s,0,"VK_OEM_CLEAR",s,s]],i=[],n=[];for(const r of t){const[d,h,o,c,a,l,u,v,f]=r;if(n[h]||(n[h]=!0,w[h]=o,b[o]=h,S[o.toLowerCase()]=h,d&&(e.IMMUTABLE_CODE_TO_KEY_CODE[h]=c,c!==0&&c!==3&&c!==5&&c!==4&&c!==6&&c!==57&&(e.IMMUTABLE_KEY_CODE_TO_CODE[c]=h))),!i[c]){if(i[c]=!0,!a)throw new Error(`String representation missing for key code ${c} around scan code ${o}`);k.define(c,a),L.define(c,v||a),D.define(c,f||v||a)}l&&(e.EVENT_KEY_CODE_MAP[l]=c),u&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[u]=c)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var g;(function(s){function t(o){return k.keyCodeToStr(o)}s.toString=t;function i(o){return k.strToKeyCode(o)}s.fromString=i;function n(o){return L.keyCodeToStr(o)}s.toUserSettingsUS=n;function r(o){return D.keyCodeToStr(o)}s.toUserSettingsGeneral=r;function d(o){return L.strToKeyCode(o)||D.strToKeyCode(o)}s.fromUserSettings=d;function h(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return k.keyCodeToStr(o)}s.toElectronAccelerator=h})(g||(e.KeyCodeUtils=g={}));function m(s,t){const i=(t&65535)<<16>>>0;return(s|i)>>>0}e.KeyChord=m}),define(J[113],ee([1,0,11]),function(j,e,_){"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,s){if(typeof m=="number"){if(m===0)return null;const t=(m&65535)>>>0,i=(m&4294901760)>>>16;return i!==0?new b([L(t,s),L(i,s)]):new b([L(t,s)])}else{const t=[];for(let i=0;i<m.length;i++)t.push(L(m[i],s));return new b(t)}}e.decodeKeybinding=k;function L(m,s){const t=!!(m&2048),i=!!(m&256),n=s===2?i:t,r=!!(m&1024),d=!!(m&512),h=s===2?t:i,o=m&255;return new D(n,r,d,h,o)}e.createSimpleKeybinding=L;class D{constructor(s,t,i,n,r){this.ctrlKey=s,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=r}equals(s){return s instanceof D&&this.ctrlKey===s.ctrlKey&&this.shiftKey===s.shiftKey&&this.altKey===s.altKey&&this.metaKey===s.metaKey&&this.keyCode===s.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(s,t,i,n,r){this.ctrlKey=s,this.shiftKey=t,this.altKey=i,this.metaKey=n,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(s){if(s.length===0)throw(0,_.illegalArgument)("chords");this.chords=s}}e.Keybinding=b;class S{constructor(s,t,i,n,r,d){this.ctrlKey=s,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=r,this.keyAriaLabel=d}}e.ResolvedChord=S;class g{}e.ResolvedKeybinding=g}),define(J[102],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class _{constructor(L){this.executor=L,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(L){this._error=L}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=_}),define(J[134],ee([1,0,102]),function(j,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 k=typeof Buffer<"u",L=new _.Lazy(()=>new Uint8Array(256));let D;class w{static wrap(n){return k&&!Buffer.isBuffer(n)&&(n=Buffer.from(n.buffer,n.byteOffset,n.byteLength)),new w(n)}constructor(n){this.buffer=n,this.byteLength=this.buffer.byteLength}toString(){return k?this.buffer.toString():(D||(D=new TextDecoder),D.decode(this.buffer))}}e.VSBuffer=w;function b(i,n){return i[n+0]<<0>>>0|i[n+1]<<8>>>0}e.readUInt16LE=b;function S(i,n,r){i[r+0]=n&255,n=n>>>8,i[r+1]=n&255}e.writeUInt16LE=S;function g(i,n){return i[n]*Math.pow(2,24)+i[n+1]*Math.pow(2,16)+i[n+2]*Math.pow(2,8)+i[n+3]}e.readUInt32BE=g;function m(i,n,r){i[r+3]=n,n=n>>>8,i[r+2]=n,n=n>>>8,i[r+1]=n,n=n>>>8,i[r]=n}e.writeUInt32BE=m;function s(i,n){return i[n]}e.readUInt8=s;function t(i,n,r){i[r]=n}e.writeUInt8=t}),define(J[371],ee([1,0,102]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.compareFileNames=void 0;const k=new _.Lazy(()=>{const g=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:g,collatorIsNumeric:g.resolvedOptions().numeric}}),L=new _.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),D=new _.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function w(g,m,s=!1){const t=g||"",i=m||"",n=k.value.collator.compare(t,i);return k.value.collatorIsNumeric&&n===0&&t!==i?t<i?-1:1:n}e.compareFileNames=w;function b(g,m,s){const t=g.toLowerCase(),i=m.toLowerCase(),n=S(g,m,s);if(n)return n;const r=t.endsWith(s),d=i.endsWith(s);if(r!==d)return r?-1:1;const h=w(t,i);return h!==0?h:t.localeCompare(i)}e.compareAnything=b;function S(g,m,s){const t=g.toLowerCase(),i=m.toLowerCase(),n=t.startsWith(s),r=i.startsWith(s);if(n!==r)return n?-1:1;if(n&&r){if(t.length<i.length)return-1;if(t.length>i.length)return 1}return 0}e.compareByPrefix=S}),define(J[2],ee([1,0,94,53]),function(j,e,_,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 L=!1;let D=null;function w(v){D=v}if(e.setDisposableTracker=w,L){const v="__is_disposable_tracked__";w(new class{trackDisposable(f){const p=new Error("Potentially leaked disposable").stack;setTimeout(()=>{f[v]||console.log(p)},3e3)}setParent(f,p){if(f&&f!==h.None)try{f[v]=!0}catch{}}markAsDisposed(f){if(f&&f!==h.None)try{f[v]=!0}catch{}}markAsSingleton(f){}})}function b(v){return D?.trackDisposable(v),v}function S(v){D?.markAsDisposed(v)}function g(v,f){D?.setParent(v,f)}function m(v,f){if(D)for(const p of v)D.setParent(p,f)}function s(v){return D?.markAsSingleton(v),v}e.markAsSingleton=s;function t(v){return typeof v.dispose=="function"&&v.dispose.length===0}e.isDisposable=t;function i(v){if(k.Iterable.is(v)){const f=[];for(const p of v)if(p)try{p.dispose()}catch(C){f.push(C)}if(f.length===1)throw f[0];if(f.length>1)throw new AggregateError(f,"Encountered errors while disposing of store");return Array.isArray(v)?[]:v}else if(v)return v.dispose(),v}e.dispose=i;function n(...v){const f=r(()=>i(v));return m(v,f),f}e.combinedDisposable=n;function r(v){const f=b({dispose:(0,_.once)(()=>{S(f),v()})});return f}e.toDisposable=r;class d{constructor(){this._toDispose=new Set,this._isDisposed=!1,b(this)}dispose(){this._isDisposed||(S(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 g(f,this),this._isDisposed?d.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}}e.DisposableStore=d,d.DISABLE_DISPOSED_WARNING=!1;class h{constructor(){this._store=new d,b(this),g(this._store,this)}dispose(){S(this),this._store.dispose()}_register(f){if(f===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(f)}}e.Disposable=h,h.None=Object.freeze({dispose(){}});class o{constructor(){this._isDisposed=!1,b(this)}get value(){return this._isDisposed?void 0:this._value}set value(f){var p;this._isDisposed||f===this._value||((p=this._value)===null||p===void 0||p.dispose(),f&&g(f,this),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,S(this),(f=this._value)===null||f===void 0||f.dispose(),this._value=void 0}}e.MutableDisposable=o;class c{constructor(f){this._disposable=f,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=c;class a{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,b(this)}set(f){let p=f;return this.unset=()=>p=void 0,this.isset=()=>p!==void 0,this.dispose=()=>{p&&(p(),p=void 0,S(this))},this}}e.SafeDisposable=a;class l{constructor(f){this.object=f}dispose(){}}e.ImmortalReference=l;class u{constructor(){this._store=new Map,this._isDisposed=!1,b(this)}dispose(){S(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,p,C=!1){var y;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),C||(y=this._store.get(f))===null||y===void 0||y.dispose(),this._store.set(f,p)}deleteAndDispose(f){var p;(p=this._store.get(f))===null||p===void 0||p.dispose(),this._store.delete(f)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=u}),define(J[59],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class _{constructor(D){this.element=D,this.next=_.Undefined,this.prev=_.Undefined}}_.Undefined=new _(void 0);class k{constructor(){this._first=_.Undefined,this._last=_.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===_.Undefined}clear(){let D=this._first;for(;D!==_.Undefined;){const w=D.next;D.prev=_.Undefined,D.next=_.Undefined,D=w}this._first=_.Undefined,this._last=_.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,w){const b=new _(D);if(this._first===_.Undefined)this._first=b,this._last=b;else if(w){const g=this._last;this._last=b,b.prev=g,g.next=b}else{const g=this._first;this._first=b,b.next=g,g.prev=b}this._size+=1;let S=!1;return()=>{S||(S=!0,this._remove(b))}}shift(){if(this._first!==_.Undefined){const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last!==_.Undefined){const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==_.Undefined&&D.next!==_.Undefined){const w=D.prev;w.next=D.next,D.next.prev=w}else D.prev===_.Undefined&&D.next===_.Undefined?(this._first=_.Undefined,this._last=_.Undefined):D.next===_.Undefined?(this._last=this._last.prev,this._last.next=_.Undefined):D.prev===_.Undefined&&(this._first=this._first.next,this._first.prev=_.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==_.Undefined;)yield D.element,D=D.next}}e.LinkedList=k});var Te=this&&this.__decorate||function(j,e,_,k){var L=arguments.length,D=L<3?e:k===null?k=Object.getOwnPropertyDescriptor(e,_):k,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(j,e,_,k);else for(var b=j.length-1;b>=0;b--)(w=j[b])&&(D=(L<3?w(D):L>3?w(e,_,D):w(e,_))||D);return L>3&&D&&Object.defineProperty(e,_,D),D};define(J[372],ee([1,0,101]),function(j,e,_){"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("")}}e.LinkedText=k,Te([_.memoize],k.prototype,"toString",null);const L=/\\[([^\\]]+)\\]\\(((?:https?:\\/\\/|command:|file:)[^\\)\\s]+)(?: (["\'])(.+?)(\\3))?\\)/gi;function D(w){const b=[];let S=0,g;for(;g=L.exec(w);){g.index-S>0&&b.push(w.substring(S,g.index));const[,m,s,,t]=g;t?b.push({label:m,href:s,title:t}):b.push({label:m,href:s}),S=g.index+g[0].length}return S<w.length&&b.push(w.substring(S)),new k(b)}e.parseLinkedText=D}),define(J[60],ee([1,0]),function(j,e){"use strict";var _,k;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.ResourceMap=void 0;class L{constructor(g,m){this.uri=g,this.value=m}}class D{constructor(g,m){this[_]="ResourceMap",g instanceof D?(this.map=new Map(g.map),this.toKey=m??D.defaultToKey):(this.map=new Map,this.toKey=g??D.defaultToKey)}set(g,m){return this.map.set(this.toKey(g),new L(g,m)),this}get(g){var m;return(m=this.map.get(this.toKey(g)))===null||m===void 0?void 0:m.value}has(g){return this.map.has(this.toKey(g))}get size(){return this.map.size}clear(){this.map.clear()}delete(g){return this.map.delete(this.toKey(g))}forEach(g,m){typeof m<"u"&&(g=g.bind(m));for(const[s,t]of this.map)g(t.value,t.uri,this)}*values(){for(const g of this.map.values())yield g.value}*keys(){for(const g of this.map.values())yield g.uri}*entries(){for(const g of this.map.values())yield[g.uri,g.value]}*[(_=Symbol.toStringTag,Symbol.iterator)](){for(const[,g]of this.map)yield[g.uri,g.value]}}e.ResourceMap=D,D.defaultToKey=S=>S.toString();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 g;return(g=this._head)===null||g===void 0?void 0:g.value}get last(){var g;return(g=this._tail)===null||g===void 0?void 0:g.value}has(g){return this._map.has(g)}get(g,m=0){const s=this._map.get(g);if(s)return m!==0&&this.touch(s,m),s.value}set(g,m,s=0){let t=this._map.get(g);if(t)t.value=m,s!==0&&this.touch(t,s);else{switch(t={key:g,value:m,next:void 0,previous:void 0},s){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(g,t),this._size++}return this}delete(g){return!!this.remove(g)}remove(g){const m=this._map.get(g);if(m)return this._map.delete(g),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 g=this._head;return this._map.delete(g.key),this.removeItem(g),this._size--,g.value}forEach(g,m){const s=this._state;let t=this._head;for(;t;){if(m?g.bind(m)(t.value,t.key,this):g(t.value,t.key,this),this._state!==s)throw new Error("LinkedMap got modified during iteration.");t=t.next}}keys(){const g=this,m=this._state;let s=this._head;const t={[Symbol.iterator](){return t},next(){if(g._state!==m)throw new Error("LinkedMap got modified during iteration.");if(s){const i={value:s.key,done:!1};return s=s.next,i}else return{value:void 0,done:!0}}};return t}values(){const g=this,m=this._state;let s=this._head;const t={[Symbol.iterator](){return t},next(){if(g._state!==m)throw new Error("LinkedMap got modified during iteration.");if(s){const i={value:s.value,done:!1};return s=s.next,i}else return{value:void 0,done:!0}}};return t}entries(){const g=this,m=this._state;let s=this._head;const t={[Symbol.iterator](){return t},next(){if(g._state!==m)throw new Error("LinkedMap got modified during iteration.");if(s){const i={value:[s.key,s.value],done:!1};return s=s.next,i}else return{value:void 0,done:!0}}};return t}[(k=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(g){if(g>=this.size)return;if(g===0){this.clear();return}let m=this._head,s=this.size;for(;m&&s>g;)this._map.delete(m.key),m=m.next,s--;this._head=m,this._size=s,m&&(m.previous=void 0),this._state++}addItemFirst(g){if(!this._head&&!this._tail)this._tail=g;else if(this._head)g.next=this._head,this._head.previous=g;else throw new Error("Invalid list");this._head=g,this._state++}addItemLast(g){if(!this._head&&!this._tail)this._head=g;else if(this._tail)g.previous=this._tail,this._tail.next=g;else throw new Error("Invalid list");this._tail=g,this._state++}removeItem(g){if(g===this._head&&g===this._tail)this._head=void 0,this._tail=void 0;else if(g===this._head){if(!g.next)throw new Error("Invalid list");g.next.previous=void 0,this._head=g.next}else if(g===this._tail){if(!g.previous)throw new Error("Invalid list");g.previous.next=void 0,this._tail=g.previous}else{const m=g.next,s=g.previous;if(!m||!s)throw new Error("Invalid list");m.previous=s,s.next=m}g.next=void 0,g.previous=void 0,this._state++}touch(g,m){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(m!==1&&m!==2)){if(m===1){if(g===this._head)return;const s=g.next,t=g.previous;g===this._tail?(t.next=void 0,this._tail=t):(s.previous=t,t.next=s),g.previous=void 0,g.next=this._head,this._head.previous=g,this._head=g,this._state++}else if(m===2){if(g===this._tail)return;const s=g.next,t=g.previous;g===this._head?(s.previous=void 0,this._head=s):(s.previous=t,t.next=s),g.next=void 0,g.previous=this._tail,this._tail.next=g,this._tail=g,this._state++}}}toJSON(){const g=[];return this.forEach((m,s)=>{g.push([s,m])}),g}fromJSON(g){this.clear();for(const[m,s]of g)this.set(m,s)}}e.LinkedMap=w;class b extends w{constructor(g,m=1){super(),this._limit=g,this._ratio=Math.min(Math.max(0,m),1)}get limit(){return this._limit}set limit(g){this._limit=g,this.checkTrim()}get(g,m=2){return super.get(g,m)}peek(g){return super.get(g,0)}set(g,m){return super.set(g,m,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=b}),function(j,e){typeof define=="function"&&define.amd?define(J[373],ee([0]),e):typeof exports=="object"&&typeof module<"u"?e(exports):(j=typeof globalThis<"u"?globalThis:j||self,e(j.marked={}))}(this,function(j){"use strict";function e(de,ue){for(var q=0;q<ue.length;q++){var z=ue[q];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(de,z.key,z)}}function _(de,ue,q){return ue&&e(de.prototype,ue),q&&e(de,q),Object.defineProperty(de,"prototype",{writable:!1}),de}function k(de,ue){if(de){if(typeof de=="string")return L(de,ue);var q=Object.prototype.toString.call(de).slice(8,-1);if(q==="Object"&&de.constructor&&(q=de.constructor.name),q==="Map"||q==="Set")return Array.from(de);if(q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(q))return L(de,ue)}}function L(de,ue){(ue==null||ue>de.length)&&(ue=de.length);for(var q=0,z=new Array(ue);q<ue;q++)z[q]=de[q];return z}function D(de,ue){var q=typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(q)return(q=q.call(de)).next.bind(q);if(Array.isArray(de)||(q=k(de))||ue&&de&&typeof de.length=="number"){q&&(de=q);var z=0;return function(){return z>=de.length?{done:!0}:{done:!1,value:de[z++]}}}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}}j.defaults=w();function b(de){j.defaults=de}var S=/[&<>"\']/,g=/[&<>"\']/g,m=/[<>"\']|&(?!#?\\w+;)/,s=/[<>"\']|&(?!#?\\w+;)/g,t={"&":"&","<":"<",">":">",\'"\':""","\'":"'"},i=function(ue){return t[ue]};function n(de,ue){if(ue){if(S.test(de))return de.replace(g,i)}else if(m.test(de))return de.replace(s,i);return de}var r=/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;function d(de){return de.replace(r,function(ue,q){return q=q.toLowerCase(),q==="colon"?":":q.charAt(0)==="#"?q.charAt(1)==="x"?String.fromCharCode(parseInt(q.substring(2),16)):String.fromCharCode(+q.substring(1)):""})}var h=/(^|[^\\[])\\^/g;function o(de,ue){de=typeof de=="string"?de:de.source,ue=ue||"";var q={replace:function(U,X){return X=X.source||X,X=X.replace(h,"$1"),de=de.replace(U,X),q},getRegex:function(){return new RegExp(de,ue)}};return q}var c=/[^\\w:]/g,a=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(de,ue,q){if(de){var z;try{z=decodeURIComponent(d(q)).replace(c,"").toLowerCase()}catch{return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}ue&&!a.test(q)&&(q=C(ue,q));try{q=encodeURI(q).replace(/%25/g,"%")}catch{return null}return q}var u={},v=/^[^:]+:\\/*[^/]*$/,f=/^([^:]+:)[\\s\\S]*$/,p=/^([^:]+:\\/*[^/]*)[\\s\\S]*$/;function C(de,ue){u[" "+de]||(v.test(de)?u[" "+de]=de+"/":u[" "+de]=T(de,"/",!0)),de=u[" "+de];var q=de.indexOf(":")===-1;return ue.substring(0,2)==="//"?q?ue:de.replace(f,"$1")+ue:ue.charAt(0)==="/"?q?ue:de.replace(p,"$1")+ue:de+ue}var y={exec:function(){}};function E(de){for(var ue=1,q,z;ue<arguments.length;ue++){q=arguments[ue];for(z in q)Object.prototype.hasOwnProperty.call(q,z)&&(de[z]=q[z])}return de}function I(de,ue){var q=de.replace(/\\|/g,function(X,te,G){for(var ae=!1,fe=te;--fe>=0&&G[fe]==="\\\\";)ae=!ae;return ae?"|":" |"}),z=q.split(/ \\|/),U=0;if(z[0].trim()||z.shift(),z.length>0&&!z[z.length-1].trim()&&z.pop(),z.length>ue)z.splice(ue);else for(;z.length<ue;)z.push("");for(;U<z.length;U++)z[U]=z[U].trim().replace(/\\\\\\|/g,"|");return z}function T(de,ue,q){var z=de.length;if(z===0)return"";for(var U=0;U<z;){var X=de.charAt(z-U-1);if(X===ue&&!q)U++;else if(X!==ue&&q)U++;else break}return de.slice(0,z-U)}function O(de,ue){if(de.indexOf(ue[1])===-1)return-1;for(var q=de.length,z=0,U=0;U<q;U++)if(de[U]==="\\\\")U++;else if(de[U]===ue[0])z++;else if(de[U]===ue[1]&&(z--,z<0))return U;return-1}function R(de){de&&de.sanitize&&!de.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(de,ue){if(ue<1)return"";for(var q="";ue>1;)ue&1&&(q+=de),ue>>=1,de+=de;return q+de}function N(de,ue,q,z){var U=ue.href,X=ue.title?n(ue.title):null,te=de[1].replace(/\\\\([\\[\\]])/g,"$1");if(de[0].charAt(0)!=="!"){z.state.inLink=!0;var G={type:"link",raw:q,href:U,title:X,text:te,tokens:z.inlineTokens(te)};return z.state.inLink=!1,G}return{type:"image",raw:q,href:U,title:X,text:n(te)}}function P(de,ue){var q=de.match(/^(\\s+)(?:```)/);if(q===null)return ue;var z=q[1];return ue.split(`\n`).map(function(U){var X=U.match(/^\\s+/);if(X===null)return U;var te=X[0];return te.length>=z.length?U.slice(z.length):U}).join(`\n`)}var x=function(){function de(q){this.options=q||j.defaults}var ue=de.prototype;return ue.space=function(z){var U=this.rules.block.newline.exec(z);if(U&&U[0].length>0)return{type:"space",raw:U[0]}},ue.code=function(z){var U=this.rules.block.code.exec(z);if(U){var X=U[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:U[0],codeBlockStyle:"indented",text:this.options.pedantic?X:T(X,`\n`)}}},ue.fences=function(z){var U=this.rules.block.fences.exec(z);if(U){var X=U[0],te=P(X,U[3]||"");return{type:"code",raw:X,lang:U[2]?U[2].trim():U[2],text:te}}},ue.heading=function(z){var U=this.rules.block.heading.exec(z);if(U){var X=U[2].trim();if(/#$/.test(X)){var te=T(X,"#");(this.options.pedantic||!te||/ $/.test(te))&&(X=te.trim())}return{type:"heading",raw:U[0],depth:U[1].length,text:X,tokens:this.lexer.inline(X)}}},ue.hr=function(z){var U=this.rules.block.hr.exec(z);if(U)return{type:"hr",raw:U[0]}},ue.blockquote=function(z){var U=this.rules.block.blockquote.exec(z);if(U){var X=U[0].replace(/^ *>[ \\t]?/gm,"");return{type:"blockquote",raw:U[0],tokens:this.lexer.blockTokens(X,[]),text:X}}},ue.list=function(z){var U=this.rules.block.list.exec(z);if(U){var X,te,G,ae,fe,Ce,Se,ye,Ie,Ee,ke,Ae,Pe=U[1].trim(),_e=Pe.length>1,me={type:"list",raw:"",ordered:_e,start:_e?+Pe.slice(0,-1):"",loose:!1,items:[]};Pe=_e?"\\\\d{1,9}\\\\"+Pe.slice(-1):"\\\\"+Pe,this.options.pedantic&&(Pe=_e?Pe:"[*+-]");for(var oe=new RegExp("^( {0,3}"+Pe+")((?:[\t ][^\\\\n]*)?(?:\\\\n|$))");z&&(Ae=!1,!(!(U=oe.exec(z))||this.rules.block.hr.test(z)));){if(X=U[0],z=z.substring(X.length),ye=U[2].split(`\n`,1)[0],Ie=z.split(`\n`,1)[0],this.options.pedantic?(ae=2,ke=ye.trimLeft()):(ae=U[2].search(/[^ ]/),ae=ae>4?1:ae,ke=ye.slice(ae),ae+=U[1].length),Ce=!1,!ye&&/^ *$/.test(Ie)&&(X+=Ie+`\n`,z=z.substring(Ie.length+1),Ae=!0),!Ae)for(var pe=new RegExp("^ {0,"+Math.min(3,ae-1)+"}(?:[*+-]|\\\\d{1,9}[.)])((?: [^\\\\n]*)?(?:\\\\n|$))"),Le=new RegExp("^ {0,"+Math.min(3,ae-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)"),ve=new RegExp("^ {0,"+Math.min(3,ae-1)+"}(?:```|~~~)"),be=new RegExp("^ {0,"+Math.min(3,ae-1)+"}#");z&&(Ee=z.split(`\n`,1)[0],ye=Ee,this.options.pedantic&&(ye=ye.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(ve.test(ye)||be.test(ye)||pe.test(ye)||Le.test(z)));){if(ye.search(/[^ ]/)>=ae||!ye.trim())ke+=`\n`+ye.slice(ae);else if(!Ce)ke+=`\n`+ye;else break;!Ce&&!ye.trim()&&(Ce=!0),X+=Ee+`\n`,z=z.substring(Ee.length+1)}me.loose||(Se?me.loose=!0:/\\n *\\n *$/.test(X)&&(Se=!0)),this.options.gfm&&(te=/^\\[[ xX]\\] /.exec(ke),te&&(G=te[0]!=="[ ] ",ke=ke.replace(/^\\[[ xX]\\] +/,""))),me.items.push({type:"list_item",raw:X,task:!!te,checked:G,loose:!1,text:ke}),me.raw+=X}me.items[me.items.length-1].raw=X.trimRight(),me.items[me.items.length-1].text=ke.trimRight(),me.raw=me.raw.trimRight();var De=me.items.length;for(fe=0;fe<De;fe++){this.lexer.state.top=!1,me.items[fe].tokens=this.lexer.blockTokens(me.items[fe].text,[]);var Me=me.items[fe].tokens.filter(function(xe){return xe.type==="space"}),Oe=Me.every(function(xe){for(var Fe=xe.raw.split(""),Ue=0,Be=D(Fe),Ke;!(Ke=Be()).done;){var Ye=Ke.value;if(Ye===`\n`&&(Ue+=1),Ue>1)return!0}return!1});!me.loose&&Me.length&&Oe&&(me.loose=!0,me.items[fe].loose=!0)}return me}},ue.html=function(z){var U=this.rules.block.html.exec(z);if(U){var X={type:"html",raw:U[0],pre:!this.options.sanitizer&&(U[1]==="pre"||U[1]==="script"||U[1]==="style"),text:U[0]};if(this.options.sanitize){var te=this.options.sanitizer?this.options.sanitizer(U[0]):n(U[0]);X.type="paragraph",X.text=te,X.tokens=this.lexer.inline(te)}return X}},ue.def=function(z){var U=this.rules.block.def.exec(z);if(U){U[3]&&(U[3]=U[3].substring(1,U[3].length-1));var X=U[1].toLowerCase().replace(/\\s+/g," ");return{type:"def",tag:X,raw:U[0],href:U[2],title:U[3]}}},ue.table=function(z){var U=this.rules.block.table.exec(z);if(U){var X={type:"table",header:I(U[1]).map(function(Se){return{text:Se}}),align:U[2].replace(/^ *|\\| *$/g,"").split(/ *\\| */),rows:U[3]&&U[3].trim()?U[3].replace(/\\n[ \\t]*$/,"").split(`\n`):[]};if(X.header.length===X.align.length){X.raw=U[0];var te=X.align.length,G,ae,fe,Ce;for(G=0;G<te;G++)/^ *-+: *$/.test(X.align[G])?X.align[G]="right":/^ *:-+: *$/.test(X.align[G])?X.align[G]="center":/^ *:-+ *$/.test(X.align[G])?X.align[G]="left":X.align[G]=null;for(te=X.rows.length,G=0;G<te;G++)X.rows[G]=I(X.rows[G],X.header.length).map(function(Se){return{text:Se}});for(te=X.header.length,ae=0;ae<te;ae++)X.header[ae].tokens=this.lexer.inline(X.header[ae].text);for(te=X.rows.length,ae=0;ae<te;ae++)for(Ce=X.rows[ae],fe=0;fe<Ce.length;fe++)Ce[fe].tokens=this.lexer.inline(Ce[fe].text);return X}}},ue.lheading=function(z){var U=this.rules.block.lheading.exec(z);if(U)return{type:"heading",raw:U[0],depth:U[2].charAt(0)==="="?1:2,text:U[1],tokens:this.lexer.inline(U[1])}},ue.paragraph=function(z){var U=this.rules.block.paragraph.exec(z);if(U){var X=U[1].charAt(U[1].length-1)===`\n`?U[1].slice(0,-1):U[1];return{type:"paragraph",raw:U[0],text:X,tokens:this.lexer.inline(X)}}},ue.text=function(z){var U=this.rules.block.text.exec(z);if(U)return{type:"text",raw:U[0],text:U[0],tokens:this.lexer.inline(U[0])}},ue.escape=function(z){var U=this.rules.inline.escape.exec(z);if(U)return{type:"escape",raw:U[0],text:n(U[1])}},ue.tag=function(z){var U=this.rules.inline.tag.exec(z);if(U)return!this.lexer.state.inLink&&/^<a /i.test(U[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\\/a>/i.test(U[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\\s|>)/i.test(U[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\\/(pre|code|kbd|script)(\\s|>)/i.test(U[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:U[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(U[0]):n(U[0]):U[0]}},ue.link=function(z){var U=this.rules.inline.link.exec(z);if(U){var X=U[2].trim();if(!this.options.pedantic&&/^</.test(X)){if(!/>$/.test(X))return;var te=T(X.slice(0,-1),"\\\\");if((X.length-te.length)%2===0)return}else{var G=O(U[2],"()");if(G>-1){var ae=U[0].indexOf("!")===0?5:4,fe=ae+U[1].length+G;U[2]=U[2].substring(0,G),U[0]=U[0].substring(0,fe).trim(),U[3]=""}}var Ce=U[2],Se="";if(this.options.pedantic){var ye=/^([^\'"]*[^\\s])\\s+([\'"])(.*)\\2/.exec(Ce);ye&&(Ce=ye[1],Se=ye[3])}else Se=U[3]?U[3].slice(1,-1):"";return Ce=Ce.trim(),/^</.test(Ce)&&(this.options.pedantic&&!/>$/.test(X)?Ce=Ce.slice(1):Ce=Ce.slice(1,-1)),N(U,{href:Ce&&Ce.replace(this.rules.inline._escapes,"$1"),title:Se&&Se.replace(this.rules.inline._escapes,"$1")},U[0],this.lexer)}},ue.reflink=function(z,U){var X;if((X=this.rules.inline.reflink.exec(z))||(X=this.rules.inline.nolink.exec(z))){var te=(X[2]||X[1]).replace(/\\s+/g," ");if(te=U[te.toLowerCase()],!te||!te.href){var G=X[0].charAt(0);return{type:"text",raw:G,text:G}}return N(X,te,X[0],this.lexer)}},ue.emStrong=function(z,U,X){X===void 0&&(X="");var te=this.rules.inline.emStrong.lDelim.exec(z);if(te&&!(te[3]&&X.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 G=te[1]||te[2]||"";if(!G||G&&(X===""||this.rules.inline.punctuation.exec(X))){var ae=te[0].length-1,fe,Ce,Se=ae,ye=0,Ie=te[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ie.lastIndex=0,U=U.slice(-1*z.length+ae);(te=Ie.exec(U))!=null;)if(fe=te[1]||te[2]||te[3]||te[4]||te[5]||te[6],!!fe){if(Ce=fe.length,te[3]||te[4]){Se+=Ce;continue}else if((te[5]||te[6])&&ae%3&&!((ae+Ce)%3)){ye+=Ce;continue}if(Se-=Ce,!(Se>0)){if(Ce=Math.min(Ce,Ce+Se+ye),Math.min(ae,Ce)%2){var Ee=z.slice(1,ae+te.index+Ce);return{type:"em",raw:z.slice(0,ae+te.index+Ce+1),text:Ee,tokens:this.lexer.inlineTokens(Ee)}}var ke=z.slice(2,ae+te.index+Ce-1);return{type:"strong",raw:z.slice(0,ae+te.index+Ce+1),text:ke,tokens:this.lexer.inlineTokens(ke)}}}}}},ue.codespan=function(z){var U=this.rules.inline.code.exec(z);if(U){var X=U[2].replace(/\\n/g," "),te=/[^ ]/.test(X),G=/^ /.test(X)&&/ $/.test(X);return te&&G&&(X=X.substring(1,X.length-1)),X=n(X,!0),{type:"codespan",raw:U[0],text:X}}},ue.br=function(z){var U=this.rules.inline.br.exec(z);if(U)return{type:"br",raw:U[0]}},ue.del=function(z){var U=this.rules.inline.del.exec(z);if(U)return{type:"del",raw:U[0],text:U[2],tokens:this.lexer.inlineTokens(U[2])}},ue.autolink=function(z,U){var X=this.rules.inline.autolink.exec(z);if(X){var te,G;return X[2]==="@"?(te=n(this.options.mangle?U(X[1]):X[1]),G="mailto:"+te):(te=n(X[1]),G=te),{type:"link",raw:X[0],text:te,href:G,tokens:[{type:"text",raw:te,text:te}]}}},ue.url=function(z,U){var X;if(X=this.rules.inline.url.exec(z)){var te,G;if(X[2]==="@")te=n(this.options.mangle?U(X[0]):X[0]),G="mailto:"+te;else{var ae;do ae=X[0],X[0]=this.rules.inline._backpedal.exec(X[0])[0];while(ae!==X[0]);te=n(X[0]),X[1]==="www."?G="http://"+te:G=te}return{type:"link",raw:X[0],text:te,href:G,tokens:[{type:"text",raw:te,text:te}]}}},ue.inlineText=function(z,U){var X=this.rules.inline.text.exec(z);if(X){var te;return this.lexer.state.inRawBlock?te=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(X[0]):n(X[0]):X[0]:te=n(this.options.smartypants?U(X[0]):X[0]),{type:"text",raw:X[0],text:te}}},de}(),F={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:y,lheading:/^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,_paragraph:/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,text:/^[^\\n]+/};F._label=/(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/,F._title=/(?:"(?:\\\\"?|[^"\\\\])*"|\'[^\'\\n]*(?:\\n[^\'\\n]+)*\\n?\'|\\([^()]*\\))/,F.def=o(F.def).replace("label",F._label).replace("title",F._title).getRegex(),F.bullet=/(?:[*+-]|\\d{1,9}[.)])/,F.listItemStart=o(/^( *)(bull) */).replace("bull",F.bullet).getRegex(),F.list=o(F.list).replace(/bull/g,F.bullet).replace("hr","\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))").replace("def","\\\\n+(?="+F.def.source+")").getRegex(),F._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",F._comment=/\x3c!--(?!-?>)[\\s\\S]*?(?:--\x3e|$)/,F.html=o(F.html,"i").replace("comment",F._comment).replace("tag",F._tag).replace("attribute",/ +[a-zA-Z:_][\\w.:-]*(?: *= *"[^"\\n]*"| *= *\'[^\'\\n]*\'| *= *[^\\s"\'=<>`]+)?/).getRegex(),F.paragraph=o(F._paragraph).replace("hr",F.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",F._tag).getRegex(),F.blockquote=o(F.blockquote).replace("paragraph",F.paragraph).getRegex(),F.normal=E({},F),F.gfm=E({},F.normal,{table:"^ *([^\\\\n ].*\\\\|.*)\\\\n {0,3}(?:\\\\| *)?(:?-+:? *(?:\\\\| *:?-+:? *)*)(?:\\\\| *)?(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)"}),F.gfm.table=o(F.gfm.table).replace("hr",F.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",F._tag).getRegex(),F.gfm.paragraph=o(F._paragraph).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",F.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",F._tag).getRegex(),F.pedantic=E({},F.normal,{html:o(`^ *(?:comment *(?:\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)|<tag(?:"[^"]*"|\'[^\']*\'|\\\\s[^\'"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))`).replace("comment",F._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:y,paragraph:o(F.normal._paragraph).replace("hr",F.hr).replace("heading",` *#{1,6} *[^\n]`).replace("lheading",F.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var B={escape:/^\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,autolink:/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,url:y,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:y,text:/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,punctuation:/^([\\spunctuation])/};B._punctuation="!\\"#$%&\'()+\\\\-.,/:;<=>?@\\\\[\\\\]`^{|}~",B.punctuation=o(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=/\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g,B.escapedEmSt=/\\\\\\*|\\\\_/g,B._comment=o(F._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),B.emStrong.lDelim=o(B.emStrong.lDelim).replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimAst=o(B.emStrong.rDelimAst,"g").replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimUnd=o(B.emStrong.rDelimUnd,"g").replace(/punct/g,B._punctuation).getRegex(),B._escapes=/\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g,B._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,B._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])?)+(?![-_])/,B.autolink=o(B.autolink).replace("scheme",B._scheme).replace("email",B._email).getRegex(),B._attribute=/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*"[^"]*"|\\s*=\\s*\'[^\']*\'|\\s*=\\s*[^\\s"\'=<>`]+)?/,B.tag=o(B.tag).replace("comment",B._comment).replace("attribute",B._attribute).getRegex(),B._label=/(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/,B._href=/<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/,B._title=/"(?:\\\\"?|[^"\\\\])*"|\'(?:\\\\\'?|[^\'\\\\])*\'|\\((?:\\\\\\)?|[^)\\\\])*\\)/,B.link=o(B.link).replace("label",B._label).replace("href",B._href).replace("title",B._title).getRegex(),B.reflink=o(B.reflink).replace("label",B._label).replace("ref",F._label).getRegex(),B.nolink=o(B.nolink).replace("ref",F._label).getRegex(),B.reflinkSearch=o(B.reflinkSearch,"g").replace("reflink",B.reflink).replace("nolink",B.nolink).getRegex(),B.normal=E({},B),B.pedantic=E({},B.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",B._label).getRegex(),reflink:o(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace("label",B._label).getRegex()}),B.gfm=E({},B.normal,{escape:o(B.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.!#$%&\'*+\\/=?_`{\\|}~-]+@)))/}),B.gfm.url=o(B.gfm.url,"i").replace("email",B.gfm._extended_email).getRegex(),B.breaks=E({},B.gfm,{br:o(B.br).replace("{2,}","*").getRegex(),text:o(B.gfm.text).replace("\\\\b_","\\\\b_| {2,}\\\\n").replace(/\\{2,\\}/g,"*").getRegex()});function V(de){return de.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 K(de){var ue="",q,z,U=de.length;for(q=0;q<U;q++)z=de.charCodeAt(q),Math.random()>.5&&(z="x"+z.toString(16)),ue+="&#"+z+";";return ue}var A=function(){function de(q){this.tokens=[],this.tokens.links=Object.create(null),this.options=q||j.defaults,this.options.tokenizer=this.options.tokenizer||new x,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 z={block:F.normal,inline:B.normal};this.options.pedantic?(z.block=F.pedantic,z.inline=B.pedantic):this.options.gfm&&(z.block=F.gfm,this.options.breaks?z.inline=B.breaks:z.inline=B.gfm),this.tokenizer.rules=z}de.lex=function(z,U){var X=new de(U);return X.lex(z)},de.lexInline=function(z,U){var X=new de(U);return X.inlineTokens(z)};var ue=de.prototype;return ue.lex=function(z){z=z.replace(/\\r\\n|\\r/g,`\n`),this.blockTokens(z,this.tokens);for(var U;U=this.inlineQueue.shift();)this.inlineTokens(U.src,U.tokens);return this.tokens},ue.blockTokens=function(z,U){var X=this;U===void 0&&(U=[]),this.options.pedantic?z=z.replace(/\\t/g," ").replace(/^ +$/gm,""):z=z.replace(/^( *)(\\t+)/gm,function(Se,ye,Ie){return ye+" ".repeat(Ie.length)});for(var te,G,ae,fe;z;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Se){return(te=Se.call({lexer:X},z,U))?(z=z.substring(te.raw.length),U.push(te),!0):!1}))){if(te=this.tokenizer.space(z)){z=z.substring(te.raw.length),te.raw.length===1&&U.length>0?U[U.length-1].raw+=`\n`:U.push(te);continue}if(te=this.tokenizer.code(z)){z=z.substring(te.raw.length),G=U[U.length-1],G&&(G.type==="paragraph"||G.type==="text")?(G.raw+=`\n`+te.raw,G.text+=`\n`+te.text,this.inlineQueue[this.inlineQueue.length-1].src=G.text):U.push(te);continue}if(te=this.tokenizer.fences(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.heading(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.hr(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.blockquote(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.list(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.html(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.def(z)){z=z.substring(te.raw.length),G=U[U.length-1],G&&(G.type==="paragraph"||G.type==="text")?(G.raw+=`\n`+te.raw,G.text+=`\n`+te.raw,this.inlineQueue[this.inlineQueue.length-1].src=G.text):this.tokens.links[te.tag]||(this.tokens.links[te.tag]={href:te.href,title:te.title});continue}if(te=this.tokenizer.table(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.lheading(z)){z=z.substring(te.raw.length),U.push(te);continue}if(ae=z,this.options.extensions&&this.options.extensions.startBlock&&function(){var Se=1/0,ye=z.slice(1),Ie=void 0;X.options.extensions.startBlock.forEach(function(Ee){Ie=Ee.call({lexer:this},ye),typeof Ie=="number"&&Ie>=0&&(Se=Math.min(Se,Ie))}),Se<1/0&&Se>=0&&(ae=z.substring(0,Se+1))}(),this.state.top&&(te=this.tokenizer.paragraph(ae))){G=U[U.length-1],fe&&G.type==="paragraph"?(G.raw+=`\n`+te.raw,G.text+=`\n`+te.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=G.text):U.push(te),fe=ae.length!==z.length,z=z.substring(te.raw.length);continue}if(te=this.tokenizer.text(z)){z=z.substring(te.raw.length),G=U[U.length-1],G&&G.type==="text"?(G.raw+=`\n`+te.raw,G.text+=`\n`+te.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=G.text):U.push(te);continue}if(z){var Ce="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(Ce);break}else throw new Error(Ce)}}return this.state.top=!0,U},ue.inline=function(z,U){return U===void 0&&(U=[]),this.inlineQueue.push({src:z,tokens:U}),U},ue.inlineTokens=function(z,U){var X=this;U===void 0&&(U=[]);var te,G,ae,fe=z,Ce,Se,ye;if(this.tokens.links){var Ie=Object.keys(this.tokens.links);if(Ie.length>0)for(;(Ce=this.tokenizer.rules.inline.reflinkSearch.exec(fe))!=null;)Ie.includes(Ce[0].slice(Ce[0].lastIndexOf("[")+1,-1))&&(fe=fe.slice(0,Ce.index)+"["+M("a",Ce[0].length-2)+"]"+fe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ce=this.tokenizer.rules.inline.blockSkip.exec(fe))!=null;)fe=fe.slice(0,Ce.index)+"["+M("a",Ce[0].length-2)+"]"+fe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ce=this.tokenizer.rules.inline.escapedEmSt.exec(fe))!=null;)fe=fe.slice(0,Ce.index)+"++"+fe.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;z;)if(Se||(ye=""),Se=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(ke){return(te=ke.call({lexer:X},z,U))?(z=z.substring(te.raw.length),U.push(te),!0):!1}))){if(te=this.tokenizer.escape(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.tag(z)){z=z.substring(te.raw.length),G=U[U.length-1],G&&te.type==="text"&&G.type==="text"?(G.raw+=te.raw,G.text+=te.text):U.push(te);continue}if(te=this.tokenizer.link(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.reflink(z,this.tokens.links)){z=z.substring(te.raw.length),G=U[U.length-1],G&&te.type==="text"&&G.type==="text"?(G.raw+=te.raw,G.text+=te.text):U.push(te);continue}if(te=this.tokenizer.emStrong(z,fe,ye)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.codespan(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.br(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.del(z)){z=z.substring(te.raw.length),U.push(te);continue}if(te=this.tokenizer.autolink(z,K)){z=z.substring(te.raw.length),U.push(te);continue}if(!this.state.inLink&&(te=this.tokenizer.url(z,K))){z=z.substring(te.raw.length),U.push(te);continue}if(ae=z,this.options.extensions&&this.options.extensions.startInline&&function(){var ke=1/0,Ae=z.slice(1),Pe=void 0;X.options.extensions.startInline.forEach(function(_e){Pe=_e.call({lexer:this},Ae),typeof Pe=="number"&&Pe>=0&&(ke=Math.min(ke,Pe))}),ke<1/0&&ke>=0&&(ae=z.substring(0,ke+1))}(),te=this.tokenizer.inlineText(ae,V)){z=z.substring(te.raw.length),te.raw.slice(-1)!=="_"&&(ye=te.raw.slice(-1)),Se=!0,G=U[U.length-1],G&&G.type==="text"?(G.raw+=te.raw,G.text+=te.text):U.push(te);continue}if(z){var Ee="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(Ee);break}else throw new Error(Ee)}}return U},_(de,null,[{key:"rules",get:function(){return{block:F,inline:B}}}]),de}(),Y=function(){function de(q){this.options=q||j.defaults}var ue=de.prototype;return ue.code=function(z,U,X){var te=(U||"").match(/\\S*/)[0];if(this.options.highlight){var G=this.options.highlight(z,te);G!=null&&G!==z&&(X=!0,z=G)}return z=z.replace(/\\n$/,"")+`\n`,te?\'<pre><code class="\'+this.options.langPrefix+n(te,!0)+\'">\'+(X?z:n(z,!0))+`</code></pre>\n`:"<pre><code>"+(X?z:n(z,!0))+`</code></pre>\n`},ue.blockquote=function(z){return`<blockquote>\n`+z+`</blockquote>\n`},ue.html=function(z){return z},ue.heading=function(z,U,X,te){if(this.options.headerIds){var G=this.options.headerPrefix+te.slug(X);return"<h"+U+\' id="\'+G+\'">\'+z+"</h"+U+`>\n`}return"<h"+U+">"+z+"</h"+U+`>\n`},ue.hr=function(){return this.options.xhtml?`<hr/>\n`:`<hr>\n`},ue.list=function(z,U,X){var te=U?"ol":"ul",G=U&&X!==1?\' start="\'+X+\'"\':"";return"<"+te+G+`>\n`+z+"</"+te+`>\n`},ue.listitem=function(z){return"<li>"+z+`</li>\n`},ue.checkbox=function(z){return"<input "+(z?\'checked="" \':"")+\'disabled="" type="checkbox"\'+(this.options.xhtml?" /":"")+"> "},ue.paragraph=function(z){return"<p>"+z+`</p>\n`},ue.table=function(z,U){return U&&(U="<tbody>"+U+"</tbody>"),`<table>\n<thead>\n`+z+`</thead>\n`+U+`</table>\n`},ue.tablerow=function(z){return`<tr>\n`+z+`</tr>\n`},ue.tablecell=function(z,U){var X=U.header?"th":"td",te=U.align?"<"+X+\' align="\'+U.align+\'">\':"<"+X+">";return te+z+("</"+X+`>\n`)},ue.strong=function(z){return"<strong>"+z+"</strong>"},ue.em=function(z){return"<em>"+z+"</em>"},ue.codespan=function(z){return"<code>"+z+"</code>"},ue.br=function(){return this.options.xhtml?"<br/>":"<br>"},ue.del=function(z){return"<del>"+z+"</del>"},ue.link=function(z,U,X){if(z=l(this.options.sanitize,this.options.baseUrl,z),z===null)return X;var te=\'<a href="\'+n(z)+\'"\';return U&&(te+=\' title="\'+U+\'"\'),te+=">"+X+"</a>",te},ue.image=function(z,U,X){if(z=l(this.options.sanitize,this.options.baseUrl,z),z===null)return X;var te=\'<img src="\'+z+\'" alt="\'+X+\'"\';return U&&(te+=\' title="\'+U+\'"\'),te+=this.options.xhtml?"/>":">",te},ue.text=function(z){return z},de}(),ie=function(){function de(){}var ue=de.prototype;return ue.strong=function(z){return z},ue.em=function(z){return z},ue.codespan=function(z){return z},ue.del=function(z){return z},ue.html=function(z){return z},ue.text=function(z){return z},ue.link=function(z,U,X){return""+X},ue.image=function(z,U,X){return""+X},ue.br=function(){return""},de}(),le=function(){function de(){this.seen={}}var ue=de.prototype;return ue.serialize=function(z){return z.toLowerCase().trim().replace(/<[!\\/a-z].*?>/ig,"").replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\\'!"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g,"").replace(/\\s/g,"-")},ue.getNextSafeSlug=function(z,U){var X=z,te=0;if(this.seen.hasOwnProperty(X)){te=this.seen[z];do te++,X=z+"-"+te;while(this.seen.hasOwnProperty(X))}return U||(this.seen[z]=te,this.seen[X]=0),X},ue.slug=function(z,U){U===void 0&&(U={});var X=this.serialize(z);return this.getNextSafeSlug(X,U.dryrun)},de}(),ne=function(){function de(q){this.options=q||j.defaults,this.options.renderer=this.options.renderer||new Y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new le}de.parse=function(z,U){var X=new de(U);return X.parse(z)},de.parseInline=function(z,U){var X=new de(U);return X.parseInline(z)};var ue=de.prototype;return ue.parse=function(z,U){U===void 0&&(U=!0);var X="",te,G,ae,fe,Ce,Se,ye,Ie,Ee,ke,Ae,Pe,_e,me,oe,pe,Le,ve,be,De=z.length;for(te=0;te<De;te++){if(ke=z[te],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ke.type]&&(be=this.options.extensions.renderers[ke.type].call({parser:this},ke),be!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(ke.type))){X+=be||"";continue}switch(ke.type){case"space":continue;case"hr":{X+=this.renderer.hr();continue}case"heading":{X+=this.renderer.heading(this.parseInline(ke.tokens),ke.depth,d(this.parseInline(ke.tokens,this.textRenderer)),this.slugger);continue}case"code":{X+=this.renderer.code(ke.text,ke.lang,ke.escaped);continue}case"table":{for(Ie="",ye="",fe=ke.header.length,G=0;G<fe;G++)ye+=this.renderer.tablecell(this.parseInline(ke.header[G].tokens),{header:!0,align:ke.align[G]});for(Ie+=this.renderer.tablerow(ye),Ee="",fe=ke.rows.length,G=0;G<fe;G++){for(Se=ke.rows[G],ye="",Ce=Se.length,ae=0;ae<Ce;ae++)ye+=this.renderer.tablecell(this.parseInline(Se[ae].tokens),{header:!1,align:ke.align[ae]});Ee+=this.renderer.tablerow(ye)}X+=this.renderer.table(Ie,Ee);continue}case"blockquote":{Ee=this.parse(ke.tokens),X+=this.renderer.blockquote(Ee);continue}case"list":{for(Ae=ke.ordered,Pe=ke.start,_e=ke.loose,fe=ke.items.length,Ee="",G=0;G<fe;G++)oe=ke.items[G],pe=oe.checked,Le=oe.task,me="",oe.task&&(ve=this.renderer.checkbox(pe),_e?oe.tokens.length>0&&oe.tokens[0].type==="paragraph"?(oe.tokens[0].text=ve+" "+oe.tokens[0].text,oe.tokens[0].tokens&&oe.tokens[0].tokens.length>0&&oe.tokens[0].tokens[0].type==="text"&&(oe.tokens[0].tokens[0].text=ve+" "+oe.tokens[0].tokens[0].text)):oe.tokens.unshift({type:"text",text:ve}):me+=ve),me+=this.parse(oe.tokens,_e),Ee+=this.renderer.listitem(me,Le,pe);X+=this.renderer.list(Ee,Ae,Pe);continue}case"html":{X+=this.renderer.html(ke.text);continue}case"paragraph":{X+=this.renderer.paragraph(this.parseInline(ke.tokens));continue}case"text":{for(Ee=ke.tokens?this.parseInline(ke.tokens):ke.text;te+1<De&&z[te+1].type==="text";)ke=z[++te],Ee+=`\n`+(ke.tokens?this.parseInline(ke.tokens):ke.text);X+=U?this.renderer.paragraph(Ee):Ee;continue}default:{var Me=\'Token with "\'+ke.type+\'" type was not found.\';if(this.options.silent){console.error(Me);return}else throw new Error(Me)}}}return X},ue.parseInline=function(z,U){U=U||this.renderer;var X="",te,G,ae,fe=z.length;for(te=0;te<fe;te++){if(G=z[te],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[G.type]&&(ae=this.options.extensions.renderers[G.type].call({parser:this},G),ae!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(G.type))){X+=ae||"";continue}switch(G.type){case"escape":{X+=U.text(G.text);break}case"html":{X+=U.html(G.text);break}case"link":{X+=U.link(G.href,G.title,this.parseInline(G.tokens,U));break}case"image":{X+=U.image(G.href,G.title,G.text);break}case"strong":{X+=U.strong(this.parseInline(G.tokens,U));break}case"em":{X+=U.em(this.parseInline(G.tokens,U));break}case"codespan":{X+=U.codespan(G.text);break}case"br":{X+=U.br();break}case"del":{X+=U.del(this.parseInline(G.tokens,U));break}case"text":{X+=U.text(G.text);break}default:{var Ce=\'Token with "\'+G.type+\'" type was not found.\';if(this.options.silent){console.error(Ce);return}else throw new Error(Ce)}}}return X},de}();function se(de,ue,q){if(typeof de>"u"||de===null)throw new Error("marked(): input parameter is undefined or null");if(typeof de!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(de)+", string expected");if(typeof ue=="function"&&(q=ue,ue=null),ue=E({},se.defaults,ue||{}),R(ue),q){var z=ue.highlight,U;try{U=A.lex(de,ue)}catch(fe){return q(fe)}var X=function(Ce){var Se;if(!Ce)try{ue.walkTokens&&se.walkTokens(U,ue.walkTokens),Se=ne.parse(U,ue)}catch(ye){Ce=ye}return ue.highlight=z,Ce?q(Ce):q(null,Se)};if(!z||z.length<3||(delete ue.highlight,!U.length))return X();var te=0;se.walkTokens(U,function(fe){fe.type==="code"&&(te++,setTimeout(function(){z(fe.text,fe.lang,function(Ce,Se){if(Ce)return X(Ce);Se!=null&&Se!==fe.text&&(fe.text=Se,fe.escaped=!0),te--,te===0&&X()})},0))}),te===0&&X();return}function G(fe){if(fe.message+=`\nPlease report this to https://github.com/markedjs/marked.`,ue.silent)return"<p>An error occurred:</p><pre>"+n(fe.message+"",!0)+"</pre>";throw fe}try{var ae=A.lex(de,ue);if(ue.walkTokens){if(ue.async)return Promise.all(se.walkTokens(ae,ue.walkTokens)).then(function(){return ne.parse(ae,ue)}).catch(G);se.walkTokens(ae,ue.walkTokens)}return ne.parse(ae,ue)}catch(fe){G(fe)}}se.options=se.setOptions=function(de){return E(se.defaults,de),b(se.defaults),se},se.getDefaults=w,se.defaults=j.defaults,se.use=function(){for(var de=arguments.length,ue=new Array(de),q=0;q<de;q++)ue[q]=arguments[q];var z=E.apply(void 0,[{}].concat(ue)),U=se.defaults.extensions||{renderers:{},childTokens:{}},X;ue.forEach(function(te){if(te.extensions&&(X=!0,te.extensions.forEach(function(ae){if(!ae.name)throw new Error("extension name required");if(ae.renderer){var fe=U.renderers?U.renderers[ae.name]:null;fe?U.renderers[ae.name]=function(){for(var Ce=arguments.length,Se=new Array(Ce),ye=0;ye<Ce;ye++)Se[ye]=arguments[ye];var Ie=ae.renderer.apply(this,Se);return Ie===!1&&(Ie=fe.apply(this,Se)),Ie}:U.renderers[ae.name]=ae.renderer}if(ae.tokenizer){if(!ae.level||ae.level!=="block"&&ae.level!=="inline")throw new Error("extension level must be \'block\' or \'inline\'");U[ae.level]?U[ae.level].unshift(ae.tokenizer):U[ae.level]=[ae.tokenizer],ae.start&&(ae.level==="block"?U.startBlock?U.startBlock.push(ae.start):U.startBlock=[ae.start]:ae.level==="inline"&&(U.startInline?U.startInline.push(ae.start):U.startInline=[ae.start]))}ae.childTokens&&(U.childTokens[ae.name]=ae.childTokens)})),te.renderer&&function(){var ae=se.defaults.renderer||new Y,fe=function(ye){var Ie=ae[ye];ae[ye]=function(){for(var Ee=arguments.length,ke=new Array(Ee),Ae=0;Ae<Ee;Ae++)ke[Ae]=arguments[Ae];var Pe=te.renderer[ye].apply(ae,ke);return Pe===!1&&(Pe=Ie.apply(ae,ke)),Pe}};for(var Ce in te.renderer)fe(Ce);z.renderer=ae}(),te.tokenizer&&function(){var ae=se.defaults.tokenizer||new x,fe=function(ye){var Ie=ae[ye];ae[ye]=function(){for(var Ee=arguments.length,ke=new Array(Ee),Ae=0;Ae<Ee;Ae++)ke[Ae]=arguments[Ae];var Pe=te.tokenizer[ye].apply(ae,ke);return Pe===!1&&(Pe=Ie.apply(ae,ke)),Pe}};for(var Ce in te.tokenizer)fe(Ce);z.tokenizer=ae}(),te.walkTokens){var G=se.defaults.walkTokens;z.walkTokens=function(ae){var fe=[];return fe.push(te.walkTokens.call(this,ae)),G&&(fe=fe.concat(G.call(this,ae))),fe}}X&&(z.extensions=U),se.setOptions(z)})},se.walkTokens=function(de,ue){for(var q=[],z=function(){var G=X.value;switch(q=q.concat(ue.call(se,G)),G.type){case"table":{for(var ae=D(G.header),fe;!(fe=ae()).done;){var Ce=fe.value;q=q.concat(se.walkTokens(Ce.tokens,ue))}for(var Se=D(G.rows),ye;!(ye=Se()).done;)for(var Ie=ye.value,Ee=D(Ie),ke;!(ke=Ee()).done;){var Ae=ke.value;q=q.concat(se.walkTokens(Ae.tokens,ue))}break}case"list":{q=q.concat(se.walkTokens(G.items,ue));break}default:se.defaults.extensions&&se.defaults.extensions.childTokens&&se.defaults.extensions.childTokens[G.type]?se.defaults.extensions.childTokens[G.type].forEach(function(Pe){q=q.concat(se.walkTokens(G[Pe],ue))}):G.tokens&&(q=q.concat(se.walkTokens(G.tokens,ue)))}},U=D(de),X;!(X=U()).done;)z();return q},se.parseInline=function(de,ue){if(typeof de>"u"||de===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof de!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(de)+", string expected");ue=E({},se.defaults,ue||{}),R(ue);try{var q=A.lexInline(de,ue);return ue.walkTokens&&se.walkTokens(q,ue.walkTokens),ne.parseInline(q,ue)}catch(z){if(z.message+=`\nPlease report this to https://github.com/markedjs/marked.`,ue.silent)return"<p>An error occurred:</p><pre>"+n(z.message+"",!0)+"</pre>";throw z}},se.Parser=ne,se.parser=ne.parse,se.Renderer=Y,se.TextRenderer=ie,se.Lexer=A,se.lexer=A.lex,se.Tokenizer=x,se.Slugger=le,se.parse=se;var H=se.options,W=se.setOptions,$=se.use,Z=se.walkTokens,Q=se.parseInline,re=se,ce=ne.parse,he=A.lex;j.Lexer=A,j.Parser=ne,j.Renderer=Y,j.Slugger=le,j.TextRenderer=ie,j.Tokenizer=x,j.getDefaults=w,j.lexer=he,j.marked=se,j.options=H,j.parse=re,j.parseInline=Q,j.parser=ce,j.setOptions=W,j.use=$,j.walkTokens=Z,Object.defineProperty(j,"__esModule",{value:!0})}),define(J[103],ee([1,0]),function(j,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[191],ee([1,0,103]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransfers=void 0,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:_.Mimes.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}}),define(J[374],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class _{constructor(L,D=0,w=L.length,b=D-1){this.items=L,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=_}),define(J[375],ee([1,0,374]),function(j,e,_){"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._navigator.next()}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 _.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[135],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.clamp=void 0;function _(D,w,b){return Math.min(Math.max(D,w),b)}e.clamp=_;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 L{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=L}),define(J[136],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleObservableLogger=e.getLogger=e.setLogger=void 0;let _;function k(r){_=r}e.setLogger=k;function L(){return _}e.getLogger=L;class D{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(d){return w([b(i("| ",this.indentation)),d])}formatInfo(d){return d.didChange?[b(" "),g(m(d.oldValue,70),{color:"red",strikeThrough:!0}),b(" "),g(m(d.newValue,60),{color:"green"})]:[b(" (unchanged)")]}handleObservableChanged(d,h){console.log(...this.textToConsoleArgs([S("observable value changed"),g(d.debugName,{color:"BlueViolet"}),...this.formatInfo(h)]))}formatChanges(d){if(d.size!==0)return g(" (changed deps: "+[...d].map(h=>h.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(d){const h=d.handleChange;this.changedObservablesSets.set(d,new Set),d.handleChange=(o,c)=>(this.changedObservablesSets.get(d).add(o),h.apply(d,[o,c]))}handleDerivedRecomputed(d,h){const o=this.changedObservablesSets.get(d);console.log(...this.textToConsoleArgs([S("derived recomputed"),g(d.debugName,{color:"BlueViolet"}),...this.formatInfo(h),this.formatChanges(o)])),o.clear()}handleFromEventObservableTriggered(d,h){console.log(...this.textToConsoleArgs([S("observable from event triggered"),g(d.debugName,{color:"BlueViolet"}),...this.formatInfo(h)]))}handleAutorunCreated(d){const h=d.handleChange;this.changedObservablesSets.set(d,new Set),d.handleChange=(o,c)=>(this.changedObservablesSets.get(d).add(o),h.apply(d,[o,c]))}handleAutorunTriggered(d){const h=this.changedObservablesSets.get(d);console.log(...this.textToConsoleArgs([S("autorun"),g(d.debugName,{color:"BlueViolet"}),this.formatChanges(h)])),h.clear()}handleBeginTransaction(d){let h=d.getDebugName();h===void 0&&(h=""),console.log(...this.textToConsoleArgs([S("transaction"),g(h,{color:"BlueViolet"})])),this.indentation++}handleEndTransaction(){this.indentation--}}e.ConsoleObservableLogger=D;function w(r){const d=new Array,o={};let c="";function a(u){if("length"in u)for(const v of u)v&&a(v);else"text"in u?(c+=`%c${u.text}`,d.push(u.style),u.data&&Object.assign(o,u.data)):"data"in u&&Object.assign(o,u.data)}a(r);const l=[c,...d];return Object.keys(o).length>0&&l.push(o),l}function b(r){return g(r,{color:"black"})}function S(r){return g(n(`${r}: `,10),{color:"black",bold:!0})}function g(r,d={color:"black"}){function h(c){return Object.entries(c).reduce((a,[l,u])=>`${a}${l}:${u};`,"")}const o={color:d.color};return d.strikeThrough&&(o["text-decoration"]="line-through"),d.bold&&(o["font-weight"]="bold"),{text:r,style:h(o)}}function m(r,d){switch(typeof r){case"number":return""+r;case"string":return r.length+2<=d?`"${r}"`:`"${r.substr(0,d-7)}"+...`;case"boolean":return r?"true":"false";case"undefined":return"undefined";case"object":return r===null?"null":Array.isArray(r)?s(r,d):t(r,d);case"symbol":return r.toString();case"function":return`[[Function${r.name?" "+r.name:""}]]`;default:return""+r}}function s(r,d){let h="[ ",o=!0;for(const c of r){if(o||(h+=", "),h.length-5>d){h+="...";break}o=!1,h+=`${m(c,d-h.length)}`}return h+=" ]",h}function t(r,d){let h="{ ",o=!0;for(const[c,a]of Object.entries(r)){if(o||(h+=", "),h.length-5>d){h+="...";break}o=!1,h+=`${c}: ${m(a,d-h.length)}`}return h+=" }",h}function i(r,d){let h="";for(let o=1;o<=d;o++)h+=r;return h}function n(r,d){for(;r.length<d;)r+=" ";return r}}),define(J[252],ee([1,0,81,2,136]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutorunObserver=e.autorunWithStore=e.autorunWithStore2=e.autorun=void 0;function D(g,m){return new S(g,m,void 0,void 0)}e.autorun=D;function w(g,m){return b(m,g)}e.autorunWithStore2=w;function b(g,m){const s=new k.DisposableStore,t=D(m,i=>{s.clear(),g(i,s)});return(0,k.toDisposable)(()=>{t.dispose(),s.dispose()})}e.autorunWithStore=b;class S{constructor(m,s,t,i){var n,r;this.debugName=m,this.runFn=s,this.createChangeSummary=t,this._handleChange=i,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(n=this.createChangeSummary)===null||n===void 0?void 0:n.call(this),(r=(0,L.getLogger)())===null||r===void 0||r.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const m of this.dependencies)m.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var m,s;if(this.state===3)return;const t=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=t,this.state=3,(m=(0,L.getLogger)())===null||m===void 0||m.handleAutorunTriggered(this);try{const i=this.changeSummary;this.changeSummary=(s=this.createChangeSummary)===null||s===void 0?void 0:s.call(this),this.runFn(this,i)}finally{for(const i of this.dependenciesToBeRemoved)i.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const m of this.dependencies)if(m.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,(0,_.assertFn)(()=>this.updateCount>=0)}handlePossibleChange(m){this.state===3&&this.dependencies.has(m)&&!this.dependenciesToBeRemoved.has(m)&&(this.state=1)}handleChange(m,s){this.dependencies.has(m)&&!this.dependenciesToBeRemoved.has(m)&&(!this._handleChange||this._handleChange({changedObservable:m,change:s,didChange:i=>i===m},this.changeSummary))&&(this.state=2)}readObservable(m){if(this.disposed)return m.get();m.addObserver(this);const s=m.get();return this.dependencies.add(m),this.dependenciesToBeRemoved.delete(m),s}}e.AutorunObserver=S,function(g){g.Observer=S}(D||(e.autorun=D={}))}),define(J[114],ee([1,0,136]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableObservableValue=e.disposableObservableValue=e.ObservableValue=e.observableValue=e.getFunctionName=e.TransactionImpl=e.subtransaction=e.transaction=e.BaseObservable=e.ConvenientObservable=e._setDerived=void 0;let k;function L(r){k=r}e._setDerived=L;class D{get TChange(){return null}reportChanges(){this.get()}read(d){return d?d.readObservable(this):this.get()}map(d){return k(()=>{const h=m(d);return h!==void 0?h:`${this.debugName} (mapped)`},h=>d(this.read(h),h))}}e.ConvenientObservable=D;class w extends D{constructor(){super(...arguments),this.observers=new Set}addObserver(d){const h=this.observers.size;this.observers.add(d),h===0&&this.onFirstObserverAdded()}removeObserver(d){this.observers.delete(d)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}e.BaseObservable=w;function b(r,d){var h,o;const c=new g(r,d);try{(h=(0,_.getLogger)())===null||h===void 0||h.handleBeginTransaction(c),r(c)}finally{c.finish(),(o=(0,_.getLogger)())===null||o===void 0||o.handleEndTransaction()}}e.transaction=b;function S(r,d,h){r?d(r):b(d,h)}e.subtransaction=S;class g{constructor(d,h){this.fn=d,this._getDebugName=h,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():m(this.fn)}updateObserver(d,h){this.updatingObservers.push({observer:d,observable:h}),d.beginUpdate(h)}finish(){const d=this.updatingObservers;this.updatingObservers=null;for(const{observer:h,observable:o}of d)h.endUpdate(o)}}e.TransactionImpl=g;function m(r){const d=r.toString(),o=/\\/\\*\\*\\s*@description\\s*([^*]*)\\*\\//.exec(d),c=o?o[1]:void 0;return c?.trim()}e.getFunctionName=m;function s(r,d){return new t(r,d)}e.observableValue=s;class t extends w{constructor(d,h){super(),this.debugName=d,this._value=h}get(){return this._value}set(d,h,o){var c;if(this._value===d)return;let a;h||(h=a=new g(()=>{},()=>`Setting ${this.debugName}`));try{const l=this._value;this._setValue(d),(c=(0,_.getLogger)())===null||c===void 0||c.handleObservableChanged(this,{oldValue:l,newValue:d,change:o,didChange:!0});for(const u of this.observers)h.updateObserver(u,this),u.handleChange(this,o)}finally{a&&a.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(d){this._value=d}}e.ObservableValue=t;function i(r,d){return new n(r,d)}e.disposableObservableValue=i;class n extends t{_setValue(d){this._value!==d&&(this._value&&this._value.dispose(),this._value=d)}dispose(){var d;(d=this._value)===null||d===void 0||d.dispose()}}e.DisposableObservableValue=n}),define(J[253],ee([1,0,11,114,136]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Derived=e.derivedHandleChanges=e.derived=void 0;function D(S,g){return new b(S,g,void 0,void 0)}e.derived=D;function w(S,g,m){return new b(S,m,g.createEmptyChangeSummary,g.handleChange)}e.derivedHandleChanges=w,(0,k._setDerived)(D);class b extends k.BaseObservable{get debugName(){return typeof this._debugName=="function"?this._debugName():this._debugName}constructor(g,m,s,t){var i,n;super(),this._debugName=g,this.computeFn=m,this.createChangeSummary=s,this._handleChange=t,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(i=this.createChangeSummary)===null||i===void 0?void 0:i.call(this),(n=(0,L.getLogger)())===null||n===void 0||n.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const g of this.dependencies)g.removeObserver(this);this.dependencies.clear()}get(){var g;if(this.observers.size===0){const m=this.computeFn(this,(g=this.createChangeSummary)===null||g===void 0?void 0:g.call(this));return this.onLastObserverRemoved(),m}else{do{if(this.state===1){this.state=3;for(const m of this.dependencies)if(m.reportChanges(),this.state===2)break}this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var g,m;if(this.state===3)return;const s=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=s;const t=this.state!==0,i=this.value;this.state=3;const n=this.changeSummary;this.changeSummary=(g=this.createChangeSummary)===null||g===void 0?void 0:g.call(this);try{this.value=this.computeFn(this,n)}finally{for(const d of this.dependenciesToBeRemoved)d.removeObserver(this);this.dependenciesToBeRemoved.clear()}const r=t&&i!==this.value;if((m=(0,L.getLogger)())===null||m===void 0||m.handleDerivedRecomputed(this,{oldValue:i,newValue:this.value,change:void 0,didChange:r}),r)for(const d of this.observers)d.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(g){this.updateCount++;const m=this.updateCount===1;if(this.state===3&&(this.state=1,!m))for(const s of this.observers)s.handlePossibleChange(this);if(m)for(const s of this.observers)s.beginUpdate(this)}endUpdate(g){if(this.updateCount--,this.updateCount===0){const m=[...this.observers];for(const s of m)s.endUpdate(this)}if(this.updateCount<0)throw new _.BugIndicatingError}handlePossibleChange(g){if(this.state===3&&this.dependencies.has(g)&&!this.dependenciesToBeRemoved.has(g)){this.state=1;for(const m of this.observers)m.handlePossibleChange(this)}}handleChange(g,m){if(this.dependencies.has(g)&&!this.dependenciesToBeRemoved.has(g)){const s=this._handleChange?this._handleChange({changedObservable:g,change:m,didChange:i=>i===g},this.changeSummary):!0,t=this.state===3;if(s&&(this.state===1||t)&&(this.state=2,t))for(const i of this.observers)i.handlePossibleChange(this)}}readObservable(g){g.addObserver(this);const m=g.get();return this.dependencies.add(g),this.dependenciesToBeRemoved.delete(g),m}addObserver(g){const m=!this.observers.has(g)&&this.updateCount>0;super.addObserver(g),m&&g.beginUpdate(this)}removeObserver(g){const m=this.observers.has(g)&&this.updateCount>0;super.removeObserver(g),m&&g.endUpdate(this)}}e.Derived=b}),define(J[376],ee([1,0,2,114,136]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.keepAlive=e.observableSignal=e.observableSignalFromEvent=e.FromEventObservable=e.observableFromEvent=e.constObservable=void 0;function D(r){return new w(r)}e.constObservable=D;class w extends k.ConvenientObservable{constructor(d){super(),this.value=d}get debugName(){return this.toString()}get(){return this.value}addObserver(d){}removeObserver(d){}toString(){return`Const: ${this.value}`}}function b(r,d){return new S(r,d)}e.observableFromEvent=b;class S extends k.BaseObservable{constructor(d,h){super(),this.event=d,this.getValue=h,this.hasValue=!1,this.handleEvent=o=>{var c;const a=this.getValue(o),l=!this.hasValue||this.value!==a;(c=(0,L.getLogger)())===null||c===void 0||c.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:a,change:void 0,didChange:l}),l&&(this.value=a,this.hasValue&&(0,k.transaction)(u=>{for(const v of this.observers)u.updateObserver(v,this),v.handleChange(this,void 0)},()=>{const u=this.getDebugName();return"Event fired"+(u?`: ${u}`:"")}),this.hasValue=!0)}}getDebugName(){return(0,k.getFunctionName)(this.getValue)}get debugName(){const d=this.getDebugName();return"From Event"+(d?`: ${d}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this.getValue(void 0)}}e.FromEventObservable=S,function(r){r.Observer=S}(b||(e.observableFromEvent=b={}));function g(r,d){return new m(r,d)}e.observableSignalFromEvent=g;class m extends k.BaseObservable{constructor(d,h){super(),this.debugName=d,this.event=h,this.handleEvent=()=>{(0,k.transaction)(o=>{for(const c of this.observers)o.updateObserver(c,this),c.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function s(r){return new t(r)}e.observableSignal=s;class t extends k.BaseObservable{constructor(d){super(),this.debugName=d}trigger(d,h){if(!d){(0,k.transaction)(o=>{this.trigger(o,h)},()=>`Trigger signal ${this.debugName}`);return}for(const o of this.observers)d.updateObserver(o,this),o.handleChange(this,h)}get(){}}function i(r,d){const h=new n(d??!1);return r.addObserver(h),d&&r.reportChanges(),(0,_.toDisposable)(()=>{r.removeObserver(h)})}e.keepAlive=i;class n{constructor(d){this.forceRecompute=d,this.counter=0}beginUpdate(d){this.counter++}endUpdate(d){this.counter--,this.counter===0&&this.forceRecompute&&d.reportChanges()}handlePossibleChange(d){}handleChange(d,h){}}});var ri=this&&this.__createBinding||(Object.create?function(j,e,_,k){k===void 0&&(k=_);var L=Object.getOwnPropertyDescriptor(e,_);(!L||("get"in L?!e.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return e[_]}}),Object.defineProperty(j,k,L)}:function(j,e,_,k){k===void 0&&(k=_),j[k]=e[_]}),ai=this&&this.__exportStar||function(j,e){for(var _ in j)_!=="default"&&!Object.prototype.hasOwnProperty.call(e,_)&&ri(e,j,_)};define(J[82],ee([1,0,114,253,252,376,136]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.autorunWithStore=e.autorun=e.derived=e.transaction=e.observableValue=void 0,Object.defineProperty(e,"observableValue",{enumerable:!0,get:function(){return _.observableValue}}),Object.defineProperty(e,"transaction",{enumerable:!0,get:function(){return _.transaction}}),Object.defineProperty(e,"derived",{enumerable:!0,get:function(){return k.derived}}),Object.defineProperty(e,"autorun",{enumerable:!0,get:function(){return L.autorun}}),Object.defineProperty(e,"autorunWithStore",{enumerable:!0,get:function(){return L.autorunWithStore}}),ai(D,e),!1&&(0,w.setLogger)(new w.ConsoleObservableLogger)}),define(J[161],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var _;(function(k){function L(S,g){if(S.start>=g.end||g.start>=S.end)return{start:0,end:0};const m=Math.max(S.start,g.start),s=Math.min(S.end,g.end);return s-m<=0?{start:0,end:0}:{start:m,end:s}}k.intersect=L;function D(S){return S.end-S.start<=0}k.isEmpty=D;function w(S,g){return!D(L(S,g))}k.intersects=w;function b(S,g){const m=[],s={start:S.start,end:Math.min(g.start,S.end)},t={start:Math.max(g.end,S.start),end:S.end};return D(s)||m.push(s),D(t)||m.push(t),m}k.relativeComplement=b})(_||(e.Range=_={}))}),define(J[377],ee([1,0,161]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function k(S,g){const m=[];for(const s of g){if(S.start>=s.range.end)continue;if(S.end<s.range.start)break;const t=_.Range.intersect(S,s.range);_.Range.isEmpty(t)||m.push({range:t,size:s.size})}return m}e.groupIntersect=k;function L({start:S,end:g},m){return{start:S+m,end:g+m}}e.shift=L;function D(S){const g=[];let m=null;for(const s of S){const t=s.range.start,i=s.range.end,n=s.size;if(m&&n===m.size){m.range.end=i;continue}m={range:{start:t,end:i},size:n},g.push(m)}return g}e.consolidate=D;function w(...S){return D(S.reduce((g,m)=>g.concat(m),[]))}class b{constructor(){this.groups=[],this._size=0}splice(g,m,s=[]){const t=s.length-m,i=k({start:0,end:g},this.groups),n=k({start:g+m,end:Number.POSITIVE_INFINITY},this.groups).map(d=>({range:L(d.range,t),size:d.size})),r=s.map((d,h)=>({range:{start:g+h,end:g+h+1},size:d.size}));this.groups=w(i,r,n),this._size=this.groups.reduce((d,h)=>d+h.size*(h.range.end-h.range.start),0)}get count(){const g=this.groups.length;return g?this.groups[g-1].range.end:0}get size(){return this._size}indexAt(g){if(g<0)return-1;let m=0,s=0;for(const t of this.groups){const i=t.range.end-t.range.start,n=s+i*t.size;if(g<n)return m+Math.floor((g-s)/t.size);m+=i,s=n}return m}indexAfter(g){return Math.min(this.indexAt(g)+1,this.count)}positionAt(g){if(g<0)return-1;let m=0,s=0;for(const t of this.groups){const i=t.range.end-t.range.start,n=s+i;if(g<n)return m+(g-s)*t.size;m+=i*t.size,s=n}return-1}}e.RangeMap=b}),define(J[9],ee([1,0,251,102]),function(j,e,_,k){"use strict";var L;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(G){return!G||typeof G!="string"?!0:G.trim().length===0}e.isFalsyOrWhitespace=D;const w=/{(\\d+)}/g;function b(G,...ae){return ae.length===0?G:G.replace(w,function(fe,Ce){const Se=parseInt(Ce,10);return isNaN(Se)||Se<0||Se>=ae.length?fe:ae[Se]})}e.format=b;function S(G){return G.replace(/[<>&]/g,function(ae){switch(ae){case"<":return"<";case">":return">";case"&":return"&";default:return ae}})}e.escape=S;function g(G){return G.replace(/[\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\[\\]\\(\\)]/g,"\\\\$&")}e.escapeRegExpCharacters=g;function m(G,ae=" "){const fe=s(G,ae);return t(fe,ae)}e.trim=m;function s(G,ae){if(!G||!ae)return G;const fe=ae.length;if(fe===0||G.length===0)return G;let Ce=0;for(;G.indexOf(ae,Ce)===Ce;)Ce=Ce+fe;return G.substring(Ce)}e.ltrim=s;function t(G,ae){if(!G||!ae)return G;const fe=ae.length,Ce=G.length;if(fe===0||Ce===0)return G;let Se=Ce,ye=-1;for(;ye=G.lastIndexOf(ae,Se-1),!(ye===-1||ye+fe!==Se);){if(ye===0)return"";Se=ye}return G.substring(0,Se)}e.rtrim=t;function i(G){return G.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g,"\\\\$&").replace(/[\\*]/g,".*")}e.convertSimple2RegExpPattern=i;function n(G){return G.replace(/\\*/g,"")}e.stripWildcards=n;function r(G,ae,fe={}){if(!G)throw new Error("Cannot create regex from empty string");ae||(G=g(G)),fe.wholeWord&&(/\\B/.test(G.charAt(0))||(G="\\\\b"+G),/\\B/.test(G.charAt(G.length-1))||(G=G+"\\\\b"));let Ce="";return fe.global&&(Ce+="g"),fe.matchCase||(Ce+="i"),fe.multiline&&(Ce+="m"),fe.unicode&&(Ce+="u"),new RegExp(G,Ce)}e.createRegExp=r;function d(G){return G.source==="^"||G.source==="^$"||G.source==="$"||G.source==="^\\\\s*$"?!1:!!(G.exec("")&&G.lastIndex===0)}e.regExpLeadsToEndlessLoop=d;function h(G){return(G.global?"g":"")+(G.ignoreCase?"i":"")+(G.multiline?"m":"")+(G.unicode?"u":"")}e.regExpFlags=h;function o(G){return G.split(/\\r\\n|\\r|\\n/)}e.splitLines=o;function c(G){for(let ae=0,fe=G.length;ae<fe;ae++){const Ce=G.charCodeAt(ae);if(Ce!==32&&Ce!==9)return ae}return-1}e.firstNonWhitespaceIndex=c;function a(G,ae=0,fe=G.length){for(let Ce=ae;Ce<fe;Ce++){const Se=G.charCodeAt(Ce);if(Se!==32&&Se!==9)return G.substring(ae,Ce)}return G.substring(ae,fe)}e.getLeadingWhitespace=a;function l(G,ae=G.length-1){for(let fe=ae;fe>=0;fe--){const Ce=G.charCodeAt(fe);if(Ce!==32&&Ce!==9)return fe}return-1}e.lastNonWhitespaceIndex=l;function u(G,ae){return G<ae?-1:G>ae?1:0}e.compare=u;function v(G,ae,fe=0,Ce=G.length,Se=0,ye=ae.length){for(;fe<Ce&&Se<ye;fe++,Se++){const ke=G.charCodeAt(fe),Ae=ae.charCodeAt(Se);if(ke<Ae)return-1;if(ke>Ae)return 1}const Ie=Ce-fe,Ee=ye-Se;return Ie<Ee?-1:Ie>Ee?1:0}e.compareSubstring=v;function f(G,ae){return p(G,ae,0,G.length,0,ae.length)}e.compareIgnoreCase=f;function p(G,ae,fe=0,Ce=G.length,Se=0,ye=ae.length){for(;fe<Ce&&Se<ye;fe++,Se++){let ke=G.charCodeAt(fe),Ae=ae.charCodeAt(Se);if(ke===Ae)continue;if(ke>=128||Ae>=128)return v(G.toLowerCase(),ae.toLowerCase(),fe,Ce,Se,ye);y(ke)&&(ke-=32),y(Ae)&&(Ae-=32);const Pe=ke-Ae;if(Pe!==0)return Pe}const Ie=Ce-fe,Ee=ye-Se;return Ie<Ee?-1:Ie>Ee?1:0}e.compareSubstringIgnoreCase=p;function C(G){return G>=48&&G<=57}e.isAsciiDigit=C;function y(G){return G>=97&&G<=122}e.isLowerAsciiLetter=y;function E(G){return G>=65&&G<=90}e.isUpperAsciiLetter=E;function I(G,ae){return G.length===ae.length&&p(G,ae)===0}e.equalsIgnoreCase=I;function T(G,ae){const fe=ae.length;return ae.length>G.length?!1:p(G,ae,0,fe)===0}e.startsWithIgnoreCase=T;function O(G,ae){const fe=Math.min(G.length,ae.length);let Ce;for(Ce=0;Ce<fe;Ce++)if(G.charCodeAt(Ce)!==ae.charCodeAt(Ce))return Ce;return fe}e.commonPrefixLength=O;function R(G,ae){const fe=Math.min(G.length,ae.length);let Ce;const Se=G.length-1,ye=ae.length-1;for(Ce=0;Ce<fe;Ce++)if(G.charCodeAt(Se-Ce)!==ae.charCodeAt(ye-Ce))return Ce;return fe}e.commonSuffixLength=R;function M(G){return 55296<=G&&G<=56319}e.isHighSurrogate=M;function N(G){return 56320<=G&&G<=57343}e.isLowSurrogate=N;function P(G,ae){return(G-55296<<10)+(ae-56320)+65536}e.computeCodePoint=P;function x(G,ae,fe){const Ce=G.charCodeAt(fe);if(M(Ce)&&fe+1<ae){const Se=G.charCodeAt(fe+1);if(N(Se))return P(Ce,Se)}return Ce}e.getNextCodePoint=x;function F(G,ae){const fe=G.charCodeAt(ae-1);if(N(fe)&&ae>1){const Ce=G.charCodeAt(ae-2);if(M(Ce))return P(Ce,fe)}return fe}class B{get offset(){return this._offset}constructor(ae,fe=0){this._str=ae,this._len=ae.length,this._offset=fe}setOffset(ae){this._offset=ae}prevCodePoint(){const ae=F(this._str,this._offset);return this._offset-=ae>=65536?2:1,ae}nextCodePoint(){const ae=x(this._str,this._len,this._offset);return this._offset+=ae>=65536?2:1,ae}eol(){return this._offset>=this._len}}e.CodePointIterator=B;class V{get offset(){return this._iterator.offset}constructor(ae,fe=0){this._iterator=new B(ae,fe)}nextGraphemeLength(){const ae=de.getInstance(),fe=this._iterator,Ce=fe.offset;let Se=ae.getGraphemeBreakType(fe.nextCodePoint());for(;!fe.eol();){const ye=fe.offset,Ie=ae.getGraphemeBreakType(fe.nextCodePoint());if(he(Se,Ie)){fe.setOffset(ye);break}Se=Ie}return fe.offset-Ce}prevGraphemeLength(){const ae=de.getInstance(),fe=this._iterator,Ce=fe.offset;let Se=ae.getGraphemeBreakType(fe.prevCodePoint());for(;fe.offset>0;){const ye=fe.offset,Ie=ae.getGraphemeBreakType(fe.prevCodePoint());if(he(Ie,Se)){fe.setOffset(ye);break}Se=Ie}return Ce-fe.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=V;function K(G,ae){return new V(G,ae).nextGraphemeLength()}e.nextCharLength=K;function A(G,ae){return new V(G,ae).prevGraphemeLength()}e.prevCharLength=A;function Y(G,ae){ae>0&&N(G.charCodeAt(ae))&&ae--;const fe=ae+K(G,ae);return[fe-A(G,fe),fe]}e.getCharContainingOffset=Y;let ie;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 ne(G){return ie||(ie=le()),ie.test(G)}e.containsRTL=ne;const se=/^[\\t\\n\\r\\x20-\\x7E]*$/;function H(G){return se.test(G)}e.isBasicASCII=H,e.UNUSUAL_LINE_TERMINATORS=/[\\u2028\\u2029]/;function W(G){return e.UNUSUAL_LINE_TERMINATORS.test(G)}e.containsUnusualLineTerminators=W;function $(G){return G>=11904&&G<=55215||G>=63744&&G<=64255||G>=65281&&G<=65374}e.isFullWidthCharacter=$;function Z(G){return G>=127462&&G<=127487||G===8986||G===8987||G===9200||G===9203||G>=9728&&G<=10175||G===11088||G===11093||G>=127744&&G<=128591||G>=128640&&G<=128764||G>=128992&&G<=129008||G>=129280&&G<=129535||G>=129648&&G<=129782}e.isEmojiImprecise=Z,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function Q(G){return!!(G&&G.length>0&&G.charCodeAt(0)===65279)}e.startsWithUTF8BOM=Q;function re(G,ae=!1){return G?(ae&&(G=G.replace(/\\\\./g,"")),G.toLowerCase()!==G):!1}e.containsUppercaseCharacter=re;function ce(G){return G=G%(2*26),G<26?String.fromCharCode(97+G):String.fromCharCode(65+G-26)}e.singleLetterHash=ce;function he(G,ae){return G===0?ae!==5&&ae!==7:G===2&&ae===3?!1:G===4||G===2||G===3||ae===4||ae===2||ae===3?!0:!(G===8&&(ae===8||ae===9||ae===11||ae===12)||(G===11||G===9)&&(ae===9||ae===10)||(G===12||G===10)&&ae===10||ae===5||ae===13||ae===7||G===1||G===13&&ae===14||G===6&&ae===6)}class de{static getInstance(){return de._INSTANCE||(de._INSTANCE=new de),de._INSTANCE}constructor(){this._data=ue()}getGraphemeBreakType(ae){if(ae<32)return ae===10?3:ae===13?2:4;if(ae<127)return 0;const fe=this._data,Ce=fe.length/3;let Se=1;for(;Se<=Ce;)if(ae<fe[3*Se])Se=2*Se;else if(ae>fe[3*Se+1])Se=2*Se+1;else return fe[3*Se+2];return 0}}de._INSTANCE=null;function ue(){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 q(G,ae){if(G===0)return 0;const fe=z(G,ae);if(fe!==void 0)return fe;const Ce=new B(ae,G);return Ce.prevCodePoint(),Ce.offset}e.getLeftDeleteOffset=q;function z(G,ae){const fe=new B(ae,G);let Ce=fe.prevCodePoint();for(;U(Ce)||Ce===65039||Ce===8419;){if(fe.offset===0)return;Ce=fe.prevCodePoint()}if(!Z(Ce))return;let Se=fe.offset;return Se>0&&fe.prevCodePoint()===8205&&(Se=fe.offset),Se}function U(G){return 127995<=G&&G<=127999}e.noBreakWhitespace="\\xA0";class X{static getInstance(ae){return X.cache.get(Array.from(ae))}static getLocales(){return X._locales.value}constructor(ae){this.confusableDictionary=ae}isAmbiguous(ae){return this.confusableDictionary.has(ae)}getPrimaryConfusable(ae){return this.confusableDictionary.get(ae)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=X,L=X,X.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]}\')),X.cache=new _.LRUCachedFunction(G=>{function ae(Ae){const Pe=new Map;for(let _e=0;_e<Ae.length;_e+=2)Pe.set(Ae[_e],Ae[_e+1]);return Pe}function fe(Ae,Pe){const _e=new Map(Ae);for(const[me,oe]of Pe)_e.set(me,oe);return _e}function Ce(Ae,Pe){if(!Ae)return Pe;const _e=new Map;for(const[me,oe]of Ae)Pe.has(me)&&_e.set(me,oe);return _e}const Se=L.ambiguousCharacterData.value;let ye=G.filter(Ae=>!Ae.startsWith("_")&&Ae in Se);ye.length===0&&(ye=["_default"]);let Ie;for(const Ae of ye){const Pe=ae(Se[Ae]);Ie=Ce(Ie,Pe)}const Ee=ae(Se._common),ke=fe(Ee,Ie);return new X(ke)}),X._locales=new k.Lazy(()=>Object.keys(X.ambiguousCharacterData.value).filter(G=>!G.startsWith("_")));class te{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(te.getRawData())),this._data}static isInvisibleCharacter(ae){return te.getData().has(ae)}static get codePoints(){return te.getData()}}e.InvisibleCharacters=te,te._data=void 0}),define(J[64],ee([1,0,60,9]),function(j,e,_,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 L(...q){return function(z,U){for(let X=0,te=q.length;X<te;X++){const G=q[X](z,U);if(G)return G}return null}}e.or=L,e.matchesStrictPrefix=D.bind(void 0,!1),e.matchesPrefix=D.bind(void 0,!0);function D(q,z,U){if(!U||U.length<z.length)return null;let X;return q?X=k.startsWithIgnoreCase(U,z):X=U.indexOf(z)===0,X?z.length>0?[{start:0,end:z.length}]:[]:null}function w(q,z){const U=z.toLowerCase().indexOf(q.toLowerCase());return U===-1?null:[{start:U,end:U+q.length}]}e.matchesContiguousSubString=w;function b(q,z){return S(q.toLowerCase(),z.toLowerCase(),0,0)}e.matchesSubString=b;function S(q,z,U,X){if(U===q.length)return[];if(X===z.length)return null;if(q[U]===z[X]){let te=null;return(te=S(q,z,U+1,X+1))?h({start:X,end:X+1},te):null}return S(q,z,U,X+1)}function g(q){return 97<=q&&q<=122}function m(q){return 65<=q&&q<=90}e.isUpper=m;function s(q){return 48<=q&&q<=57}function t(q){return q===32||q===9||q===10||q===13}const i=new Set;"()[]{}<>`\'\\"-/;:,.?!".split("").forEach(q=>i.add(q.charCodeAt(0)));function n(q){return t(q)||i.has(q)}function r(q,z){return q===z||n(q)&&n(z)}function d(q){return g(q)||m(q)||s(q)}function h(q,z){return z.length===0?z=[q]:q.end===z[0].start?z[0].start=q.start:z.unshift(q),z}function o(q,z){for(let U=z;U<q.length;U++){const X=q.charCodeAt(U);if(m(X)||s(X)||U>0&&!d(q.charCodeAt(U-1)))return U}return q.length}function c(q,z,U,X){if(U===q.length)return[];if(X===z.length)return null;if(q[U]!==z[X].toLowerCase())return null;{let te=null,G=X+1;for(te=c(q,z,U+1,X+1);!te&&(G=o(z,G))<z.length;)te=c(q,z,U+1,G),G++;return te===null?null:h({start:X,end:X+1},te)}}function a(q){let z=0,U=0,X=0,te=0,G=0;for(let ye=0;ye<q.length;ye++)G=q.charCodeAt(ye),m(G)&&z++,g(G)&&U++,d(G)&&X++,s(G)&&te++;const ae=z/q.length,fe=U/q.length,Ce=X/q.length,Se=te/q.length;return{upperPercent:ae,lowerPercent:fe,alphaPercent:Ce,numericPercent:Se}}function l(q){const{upperPercent:z,lowerPercent:U}=q;return U===0&&z>.6}function u(q){const{upperPercent:z,lowerPercent:U,alphaPercent:X,numericPercent:te}=q;return U>.2&&z<.8&&X>.6&&te<.2}function v(q){let z=0,U=0,X=0,te=0;for(let G=0;G<q.length;G++)X=q.charCodeAt(G),m(X)&&z++,g(X)&&U++,t(X)&&te++;return(z===0||U===0)&&te===0?q.length<=30:z<=5}function f(q,z){if(!z||(z=z.trim(),z.length===0)||!v(q)||z.length>60)return null;const U=a(z);if(!u(U)){if(!l(U))return null;z=z.toLowerCase()}let X=null,te=0;for(q=q.toLowerCase();te<z.length&&(X=c(q,z,0,te))===null;)te=o(z,te+1);return X}e.matchesCamelCase=f;function p(q,z,U=!1){if(!z||z.length===0)return null;let X=null,te=0;for(q=q.toLowerCase(),z=z.toLowerCase();te<z.length&&(X=C(q,z,0,te,U))===null;)te=y(z,te+1);return X}e.matchesWords=p;function C(q,z,U,X,te){if(U===q.length)return[];if(X===z.length)return null;if(r(q.charCodeAt(U),z.charCodeAt(X))){let G=null,ae=X+1;if(G=C(q,z,U+1,X+1,te),!te)for(;!G&&(ae=y(z,ae))<z.length;)G=C(q,z,U+1,ae,te),ae++;return G?q.charCodeAt(U)!==z.charCodeAt(X)?G:h({start:X,end:X+1},G):null}else return null}function y(q,z){for(let U=z;U<q.length;U++)if(n(q.charCodeAt(U))||U>0&&n(q.charCodeAt(U-1)))return U;return q.length}const E=L(e.matchesPrefix,f,w),I=L(e.matchesPrefix,f,b),T=new _.LRUCache(1e4);function O(q,z,U=!1){if(typeof q!="string"||typeof z!="string")return null;let X=T.get(q);X||(X=new RegExp(k.convertSimple2RegExpPattern(q),"i"),T.set(q,X));const te=X.exec(z);return te?[{start:te.index,end:te.index+te[0].length}]:U?I(q,z):E(q,z)}e.matchesFuzzy=O;function R(q,z,U,X,te,G){const ae=Math.min(13,q.length);for(;U<ae;U++){const fe=Q(q,z,U,X,te,G,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(fe)return fe}return[0,G]}e.anyScore=R;function M(q){if(typeof q>"u")return[];const z=[],U=q[1];for(let X=q.length-1;X>1;X--){const te=q[X]+U,G=z[z.length-1];G&&G.end===te?G.end=te+1:z.push({start:te,end:te+1})}return z}e.createMatches=M;const N=128;function P(){const q=[],z=[];for(let U=0;U<=N;U++)z[U]=0;for(let U=0;U<=N;U++)q.push(z.slice(0));return q}function x(q){const z=[];for(let U=0;U<=q;U++)z[U]=0;return z}const F=x(2*N),B=x(2*N),V=P(),K=P(),A=P(),Y=!1;function ie(q,z,U,X,te){function G(fe,Ce,Se=" "){for(;fe.length<Ce;)fe=Se+fe;return fe}let ae=` | |${X.split("").map(fe=>G(fe,3)).join("|")}\n`;for(let fe=0;fe<=U;fe++)fe===0?ae+=" |":ae+=`${z[fe-1]}|`,ae+=q[fe].slice(0,te+1).map(Ce=>G(Ce.toString(),3)).join("|")+`\n`;return ae}function le(q,z,U,X){q=q.substr(z),U=U.substr(X),console.log(ie(K,q,q.length,U,U.length)),console.log(ie(A,q,q.length,U,U.length)),console.log(ie(V,q,q.length,U,U.length))}function ne(q,z){if(z<0||z>=q.length)return!1;const U=q.codePointAt(z);switch(U){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(U)}}function se(q,z){if(z<0||z>=q.length)return!1;switch(q.charCodeAt(z)){case 32:case 9:return!0;default:return!1}}function H(q,z,U){return z[q]!==U[q]}function W(q,z,U,X,te,G,ae=!1){for(;z<U&&te<G;)q[z]===X[te]&&(ae&&(F[z]=te),z+=1),te+=1;return z===U}e.isPatternInWord=W;var $;(function(q){q.Default=[-100,0];function z(U){return!U||U.length===2&&U[0]===-100&&U[1]===0}q.isDefault=z})($||(e.FuzzyScore=$={}));class Z{constructor(z,U){this.firstMatchCanBeWeak=z,this.boostFullMatch=U}}e.FuzzyScoreOptions=Z,Z.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};function Q(q,z,U,X,te,G,ae=Z.default){const fe=q.length>N?N:q.length,Ce=X.length>N?N:X.length;if(U>=fe||G>=Ce||fe-U>Ce-G||!W(z,U,fe,te,G,Ce,!0))return;re(fe,Ce,U,G,z,te);let Se=1,ye=1,Ie=U,Ee=G;const ke=[!1];for(Se=1,Ie=U;Ie<fe;Se++,Ie++){const oe=F[Ie],pe=B[Ie],Le=Ie+1<fe?B[Ie+1]:Ce;for(ye=oe-G+1,Ee=oe;Ee<Le;ye++,Ee++){let ve=Number.MIN_SAFE_INTEGER,be=!1;Ee<=pe&&(ve=ce(q,z,Ie,U,X,te,Ee,Ce,G,V[Se-1][ye-1]===0,ke));let De=0;ve!==Number.MAX_SAFE_INTEGER&&(be=!0,De=ve+K[Se-1][ye-1]);const Me=Ee>oe,Oe=Me?K[Se][ye-1]+(V[Se][ye-1]>0?-5:0):0,xe=Ee>oe+1&&V[Se][ye-1]>0,Fe=xe?K[Se][ye-2]+(V[Se][ye-2]>0?-5:0):0;if(xe&&(!Me||Fe>=Oe)&&(!be||Fe>=De))K[Se][ye]=Fe,A[Se][ye]=3,V[Se][ye]=0;else if(Me&&(!be||Oe>=De))K[Se][ye]=Oe,A[Se][ye]=2,V[Se][ye]=0;else if(be)K[Se][ye]=De,A[Se][ye]=1,V[Se][ye]=V[Se-1][ye-1]+1;else throw new Error("not possible")}}if(Y&&le(q,U,X,G),!ke[0]&&!ae.firstMatchCanBeWeak)return;Se--,ye--;const Ae=[K[Se][ye],G];let Pe=0,_e=0;for(;Se>=1;){let oe=ye;do{const pe=A[Se][oe];if(pe===3)oe=oe-2;else if(pe===2)oe=oe-1;else break}while(oe>=1);Pe>1&&z[U+Se-1]===te[G+ye-1]&&!H(oe+G-1,X,te)&&Pe+1>V[Se][oe]&&(oe=ye),oe===ye?Pe++:Pe=1,_e||(_e=oe),Se--,ye=oe-1,Ae.push(ye)}Ce===fe&&ae.boostFullMatch&&(Ae[0]+=2);const me=_e-fe;return Ae[0]-=me,Ae}e.fuzzyScore=Q;function re(q,z,U,X,te,G){let ae=q-1,fe=z-1;for(;ae>=U&&fe>=X;)te[ae]===G[fe]&&(B[ae]=fe,ae--),fe--}function ce(q,z,U,X,te,G,ae,fe,Ce,Se,ye){if(z[U]!==G[ae])return Number.MIN_SAFE_INTEGER;let Ie=1,Ee=!1;return ae===U-X?Ie=q[U]===te[ae]?7:5:H(ae,te,G)&&(ae===0||!H(ae-1,te,G))?(Ie=q[U]===te[ae]?7:5,Ee=!0):ne(G,ae)&&(ae===0||!ne(G,ae-1))?Ie=5:(ne(G,ae-1)||se(G,ae-1))&&(Ie=5,Ee=!0),Ie>1&&U===X&&(ye[0]=!0),Ee||(Ee=H(ae,te,G)||ne(G,ae-1)||se(G,ae-1)),U===X?ae>Ce&&(Ie-=Ee?3:5):Se?Ie+=Ee?2:0:Ie+=Ee?0:1,ae+1===fe&&(Ie-=Ee?3:5),Ie}function he(q,z,U,X,te,G,ae){return de(q,z,U,X,te,G,!0,ae)}e.fuzzyScoreGracefulAggressive=he;function de(q,z,U,X,te,G,ae,fe){let Ce=Q(q,z,U,X,te,G,fe);if(Ce&&!ae)return Ce;if(q.length>=3){const Se=Math.min(7,q.length-1);for(let ye=U+1;ye<Se;ye++){const Ie=ue(q,ye);if(Ie){const Ee=Q(Ie,Ie.toLowerCase(),U,X,te,G,fe);Ee&&(Ee[0]-=3,(!Ce||Ee[0]>Ce[0])&&(Ce=Ee))}}}return Ce}function ue(q,z){if(z+1>=q.length)return;const U=q[z],X=q[z+1];if(U!==X)return q.slice(0,z)+X+U+q.slice(z+2)}}),define(J[137],ee([1,0,9]),function(j,e,_){"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 L(r,0)}e.hash=k;function L(r,d){switch(typeof r){case"object":return r===null?D(349,d):Array.isArray(r)?S(r,d):g(r,d);case"string":return b(r,d);case"boolean":return w(r,d);case"number":return D(r,d);case"undefined":return D(937,d);default:return D(617,d)}}e.doHash=L;function D(r,d){return(d<<5)-d+r|0}e.numberHash=D;function w(r,d){return D(r?433:863,d)}function b(r,d){d=D(149417,d);for(let h=0,o=r.length;h<o;h++)d=D(r.charCodeAt(h),d);return d}e.stringHash=b;function S(r,d){return d=D(104579,d),r.reduce((h,o)=>L(o,h),d)}function g(r,d){return d=D(181387,d),Object.keys(r).sort().reduce((h,o)=>(h=b(o,h),L(r[o],h)),d)}function m(r,d,h=32){const o=h-d,c=~((1<<o)-1);return(r<<d|(c&r)>>>o)>>>0}function s(r,d=0,h=r.byteLength,o=0){for(let c=0;c<h;c++)r[d+c]=o}function t(r,d,h="0"){for(;r.length<d;)r=h+r;return r}function i(r,d=32){return r instanceof ArrayBuffer?Array.from(new Uint8Array(r)).map(h=>h.toString(16).padStart(2,"0")).join(""):t((r>>>0).toString(16),d/4)}e.toHexString=i;class n{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(d){const h=d.length;if(h===0)return;const o=this._buff;let c=this._buffLen,a=this._leftoverHighSurrogate,l,u;for(a!==0?(l=a,u=-1,a=0):(l=d.charCodeAt(0),u=0);;){let v=l;if(_.isHighSurrogate(l))if(u+1<h){const f=d.charCodeAt(u+1);_.isLowSurrogate(f)?(u++,v=_.computeCodePoint(l,f)):v=65533}else{a=l;break}else _.isLowSurrogate(l)&&(v=65533);if(c=this._push(o,c,v),u++,u<h)l=d.charCodeAt(u);else break}this._buffLen=c,this._leftoverHighSurrogate=a}_push(d,h,o){return o<128?d[h++]=o:o<2048?(d[h++]=192|(o&1984)>>>6,d[h++]=128|(o&63)>>>0):o<65536?(d[h++]=224|(o&61440)>>>12,d[h++]=128|(o&4032)>>>6,d[h++]=128|(o&63)>>>0):(d[h++]=240|(o&1835008)>>>18,d[h++]=128|(o&258048)>>>12,d[h++]=128|(o&4032)>>>6,d[h++]=128|(o&63)>>>0),h>=64&&(this._step(),h-=64,this._totalLen+=64,d[0]=d[64+0],d[1]=d[64+1],d[2]=d[64+2]),h}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,s(this._buff,this._buffLen),this._buffLen>56&&(this._step(),s(this._buff));const d=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(d/4294967296),!1),this._buffDV.setUint32(60,d%4294967296,!1),this._step()}_step(){const d=n._bigBlock32,h=this._buffDV;for(let C=0;C<64;C+=4)d.setUint32(C,h.getUint32(C,!1),!1);for(let C=64;C<320;C+=4)d.setUint32(C,m(d.getUint32(C-12,!1)^d.getUint32(C-32,!1)^d.getUint32(C-56,!1)^d.getUint32(C-64,!1),1),!1);let o=this._h0,c=this._h1,a=this._h2,l=this._h3,u=this._h4,v,f,p;for(let C=0;C<80;C++)C<20?(v=c&a|~c&l,f=1518500249):C<40?(v=c^a^l,f=1859775393):C<60?(v=c&a|c&l|a&l,f=2400959708):(v=c^a^l,f=3395469782),p=m(o,5)+v+u+f+d.getUint32(C*4,!1)&4294967295,u=l,l=a,a=m(c,30),c=o,o=p;this._h0=this._h0+o&4294967295,this._h1=this._h1+c&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+u&4294967295}}e.StringSHA1=n,n._bigBlock32=new DataView(new ArrayBuffer(320))}),define(J[162],ee([1,0,370,137]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.stringDiff=e.StringDiffSequence=void 0;class L{constructor(s){this.source=s}getElements(){const s=this.source,t=new Int32Array(s.length);for(let i=0,n=s.length;i<n;i++)t[i]=s.charCodeAt(i);return t}}e.StringDiffSequence=L;function D(m,s,t){return new g(new L(m),new L(s)).ComputeDiff(t).changes}e.stringDiff=D;class w{static Assert(s,t){if(!s)throw new Error(t)}}class b{static Copy(s,t,i,n,r){for(let d=0;d<r;d++)i[n+d]=s[t+d]}static Copy2(s,t,i,n,r){for(let d=0;d<r;d++)i[n+d]=s[t+d]}}class S{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 _.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(s,t){this.m_originalStart=Math.min(this.m_originalStart,s),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(s,t){this.m_originalStart=Math.min(this.m_originalStart,s),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 g{constructor(s,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=s,this._modifiedSequence=t;const[n,r,d]=g._getElements(s),[h,o,c]=g._getElements(t);this._hasStrings=d&&c,this._originalStringElements=n,this._originalElementsOrHash=r,this._modifiedStringElements=h,this._modifiedElementsOrHash=o,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(s){return s.length>0&&typeof s[0]=="string"}static _getElements(s){const t=s.getElements();if(g._isStringArray(t)){const i=new Int32Array(t.length);for(let n=0,r=t.length;n<r;n++)i[n]=(0,k.stringHash)(t[n],0);return[t,i,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(s,t){return this._originalElementsOrHash[s]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[s]===this._modifiedStringElements[t]:!0}ElementsAreStrictEqual(s,t){if(!this.ElementsAreEqual(s,t))return!1;const i=g._getStrictElement(this._originalSequence,s),n=g._getStrictElement(this._modifiedSequence,t);return i===n}static _getStrictElement(s,t){return typeof s.getStrictElement=="function"?s.getStrictElement(t):null}OriginalElementsAreEqual(s,t){return this._originalElementsOrHash[s]!==this._originalElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[s]===this._originalStringElements[t]:!0}ModifiedElementsAreEqual(s,t){return this._modifiedElementsOrHash[s]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._modifiedStringElements[s]===this._modifiedStringElements[t]:!0}ComputeDiff(s){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,s)}_ComputeDiff(s,t,i,n,r){const d=[!1];let h=this.ComputeDiffRecursive(s,t,i,n,d);return r&&(h=this.PrettifyChanges(h)),{quitEarly:d[0],changes:h}}ComputeDiffRecursive(s,t,i,n,r){for(r[0]=!1;s<=t&&i<=n&&this.ElementsAreEqual(s,i);)s++,i++;for(;t>=s&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(s>t||i>n){let l;return i<=n?(w.Assert(s===t+1,"originalStart should only be one more than originalEnd"),l=[new _.DiffChange(s,0,i,n-i+1)]):s<=t?(w.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),l=[new _.DiffChange(s,t-s+1,i,0)]):(w.Assert(s===t+1,"originalStart should only be one more than originalEnd"),w.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),l=[]),l}const d=[0],h=[0],o=this.ComputeRecursionPoint(s,t,i,n,d,h,r),c=d[0],a=h[0];if(o!==null)return o;if(!r[0]){const l=this.ComputeDiffRecursive(s,c,i,a,r);let u=[];return r[0]?u=[new _.DiffChange(c+1,t-(c+1)+1,a+1,n-(a+1)+1)]:u=this.ComputeDiffRecursive(c+1,t,a+1,n,r),this.ConcatenateChanges(l,u)}return[new _.DiffChange(s,t-s+1,i,n-i+1)]}WALKTRACE(s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E){let I=null,T=null,O=new S,R=t,M=i,N=v[0]-C[0]-n,P=-1073741824,x=this.m_forwardHistory.length-1;do{const F=N+s;F===R||F<M&&c[F-1]<c[F+1]?(l=c[F+1],f=l-N-n,l<P&&O.MarkNextChange(),P=l,O.AddModifiedElement(l+1,f),N=F+1-s):(l=c[F-1]+1,f=l-N-n,l<P&&O.MarkNextChange(),P=l-1,O.AddOriginalElement(l,f+1),N=F-1-s),x>=0&&(c=this.m_forwardHistory[x],s=c[0],R=1,M=c.length-1)}while(--x>=-1);if(I=O.getReverseChanges(),E[0]){let F=v[0]+1,B=C[0]+1;if(I!==null&&I.length>0){const V=I[I.length-1];F=Math.max(F,V.getOriginalEnd()),B=Math.max(B,V.getModifiedEnd())}T=[new _.DiffChange(F,u-F+1,B,p-B+1)]}else{O=new S,R=d,M=h,N=v[0]-C[0]-o,P=1073741824,x=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const F=N+r;F===R||F<M&&a[F-1]>=a[F+1]?(l=a[F+1]-1,f=l-N-o,l>P&&O.MarkNextChange(),P=l+1,O.AddOriginalElement(l+1,f+1),N=F+1-r):(l=a[F-1],f=l-N-o,l>P&&O.MarkNextChange(),P=l,O.AddModifiedElement(l+1,f+1),N=F-1-r),x>=0&&(a=this.m_reverseHistory[x],r=a[0],R=1,M=a.length-1)}while(--x>=-1);T=O.getChanges()}return this.ConcatenateChanges(I,T)}ComputeRecursionPoint(s,t,i,n,r,d,h){let o=0,c=0,a=0,l=0,u=0,v=0;s--,i--,r[0]=0,d[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-s+(n-i),p=f+1,C=new Int32Array(p),y=new Int32Array(p),E=n-i,I=t-s,T=s-i,O=t-n,M=(I-E)%2===0;C[E]=s,y[I]=t,h[0]=!1;for(let N=1;N<=f/2+1;N++){let P=0,x=0;a=this.ClipDiagonalBound(E-N,N,E,p),l=this.ClipDiagonalBound(E+N,N,E,p);for(let B=a;B<=l;B+=2){B===a||B<l&&C[B-1]<C[B+1]?o=C[B+1]:o=C[B-1]+1,c=o-(B-E)-T;const V=o;for(;o<t&&c<n&&this.ElementsAreEqual(o+1,c+1);)o++,c++;if(C[B]=o,o+c>P+x&&(P=o,x=c),!M&&Math.abs(B-I)<=N-1&&o>=y[B])return r[0]=o,d[0]=c,V<=y[B]&&1447>0&&N<=1447+1?this.WALKTRACE(E,a,l,T,I,u,v,O,C,y,o,t,r,c,n,d,M,h):null}const F=(P-s+(x-i)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(P,F))return h[0]=!0,r[0]=P,d[0]=x,F>0&&1447>0&&N<=1447+1?this.WALKTRACE(E,a,l,T,I,u,v,O,C,y,o,t,r,c,n,d,M,h):(s++,i++,[new _.DiffChange(s,t-s+1,i,n-i+1)]);u=this.ClipDiagonalBound(I-N,N,I,p),v=this.ClipDiagonalBound(I+N,N,I,p);for(let B=u;B<=v;B+=2){B===u||B<v&&y[B-1]>=y[B+1]?o=y[B+1]-1:o=y[B-1],c=o-(B-I)-O;const V=o;for(;o>s&&c>i&&this.ElementsAreEqual(o,c);)o--,c--;if(y[B]=o,M&&Math.abs(B-E)<=N&&o<=C[B])return r[0]=o,d[0]=c,V>=C[B]&&1447>0&&N<=1447+1?this.WALKTRACE(E,a,l,T,I,u,v,O,C,y,o,t,r,c,n,d,M,h):null}if(N<=1447){let B=new Int32Array(l-a+2);B[0]=E-a+1,b.Copy2(C,a,B,1,l-a+1),this.m_forwardHistory.push(B),B=new Int32Array(v-u+2),B[0]=I-u+1,b.Copy2(y,u,B,1,v-u+1),this.m_reverseHistory.push(B)}}return this.WALKTRACE(E,a,l,T,I,u,v,O,C,y,o,t,r,c,n,d,M,h)}PrettifyChanges(s){for(let t=0;t<s.length;t++){const i=s[t],n=t<s.length-1?s[t+1].originalStart:this._originalElementsOrHash.length,r=t<s.length-1?s[t+1].modifiedStart:this._modifiedElementsOrHash.length,d=i.originalLength>0,h=i.modifiedLength>0;for(;i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<r&&(!d||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!h||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const c=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!c)break;i.originalStart++,i.modifiedStart++}const o=[null];if(t<s.length-1&&this.ChangesOverlap(s[t],s[t+1],o)){s[t]=o[0],s.splice(t+1,1),t--;continue}}for(let t=s.length-1;t>=0;t--){const i=s[t];let n=0,r=0;if(t>0){const l=s[t-1];n=l.originalStart+l.originalLength,r=l.modifiedStart+l.modifiedLength}const d=i.originalLength>0,h=i.modifiedLength>0;let o=0,c=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let l=1;;l++){const u=i.originalStart-l,v=i.modifiedStart-l;if(u<n||v<r||d&&!this.OriginalElementsAreEqual(u,u+i.originalLength)||h&&!this.ModifiedElementsAreEqual(v,v+i.modifiedLength))break;const p=(u===n&&v===r?5:0)+this._boundaryScore(u,i.originalLength,v,i.modifiedLength);p>c&&(c=p,o=l)}i.originalStart-=o,i.modifiedStart-=o;const a=[null];if(t>0&&this.ChangesOverlap(s[t-1],s[t],a)){s[t-1]=a[0],s.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,i=s.length;t<i;t++){const n=s[t-1],r=s[t],d=r.originalStart-n.originalStart-n.originalLength,h=n.originalStart,o=r.originalStart+r.originalLength,c=o-h,a=n.modifiedStart,l=r.modifiedStart+r.modifiedLength,u=l-a;if(d<5&&c<20&&u<20){const v=this._findBetterContiguousSequence(h,c,a,u,d);if(v){const[f,p]=v;(f!==n.originalStart+n.originalLength||p!==n.modifiedStart+n.modifiedLength)&&(n.originalLength=f-n.originalStart,n.modifiedLength=p-n.modifiedStart,r.originalStart=f+d,r.modifiedStart=p+d,r.originalLength=o-r.originalStart,r.modifiedLength=l-r.modifiedStart)}}}return s}_findBetterContiguousSequence(s,t,i,n,r){if(t<r||n<r)return null;const d=s+t-r+1,h=i+n-r+1;let o=0,c=0,a=0;for(let l=s;l<d;l++)for(let u=i;u<h;u++){const v=this._contiguousSequenceScore(l,u,r);v>0&&v>o&&(o=v,c=l,a=u)}return o>0?[c,a]:null}_contiguousSequenceScore(s,t,i){let n=0;for(let r=0;r<i;r++){if(!this.ElementsAreEqual(s+r,t+r))return 0;n+=this._originalStringElements[s+r].length}return n}_OriginalIsBoundary(s){return s<=0||s>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\\s*$/.test(this._originalStringElements[s])}_OriginalRegionIsBoundary(s,t){if(this._OriginalIsBoundary(s)||this._OriginalIsBoundary(s-1))return!0;if(t>0){const i=s+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(s){return s<=0||s>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\\s*$/.test(this._modifiedStringElements[s])}_ModifiedRegionIsBoundary(s,t){if(this._ModifiedIsBoundary(s)||this._ModifiedIsBoundary(s-1))return!0;if(t>0){const i=s+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(s,t,i,n){const r=this._OriginalRegionIsBoundary(s,t)?1:0,d=this._ModifiedRegionIsBoundary(i,n)?1:0;return r+d}ConcatenateChanges(s,t){const i=[];if(s.length===0||t.length===0)return t.length>0?t:s;if(this.ChangesOverlap(s[s.length-1],t[0],i)){const n=new Array(s.length+t.length-1);return b.Copy(s,0,n,0,s.length-1),n[s.length-1]=i[0],b.Copy(t,1,n,s.length,t.length-1),n}else{const n=new Array(s.length+t.length);return b.Copy(s,0,n,0,s.length),b.Copy(t,0,n,s.length,t.length),n}}ChangesOverlap(s,t,i){if(w.Assert(s.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),w.Assert(s.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),s.originalStart+s.originalLength>=t.originalStart||s.modifiedStart+s.modifiedLength>=t.modifiedStart){const n=s.originalStart;let r=s.originalLength;const d=s.modifiedStart;let h=s.modifiedLength;return s.originalStart+s.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-s.originalStart),s.modifiedStart+s.modifiedLength>=t.modifiedStart&&(h=t.modifiedStart+t.modifiedLength-s.modifiedStart),i[0]=new _.DiffChange(n,r,d,h),!0}else return i[0]=null,!1}ClipDiagonalBound(s,t,i,n){if(s>=0&&s<n)return s;const r=i,d=n-i-1,h=t%2===0;if(s<0){const o=r%2===0;return h===o?0:1}else{const o=d%2===0;return h===o?n-1:n-2}}}e.LcsDiff=g}),define(J[378],ee([1,0,9]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function k(w,b){if(w&&w[0]!==""){const S=L(w,b,"-"),g=L(w,b,"_");return S&&!g?D(w,b,"-"):!S&&g?D(w,b,"_"):w[0].toUpperCase()===w[0]?b.toUpperCase():w[0].toLowerCase()===w[0]?b.toLowerCase():_.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 L(w,b,S){return w[0].indexOf(S)!==-1&&b.indexOf(S)!==-1&&w[0].split(S).length===b.split(S).length}function D(w,b,S){const g=b.split(S),m=w[0].split(S);let s="";return g.forEach((t,i)=>{s+=k([m[i]],t)+S}),s.slice(0,-1)}}),define(J[104],ee([1,0,9]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var k;(function(L){L[L.Ignore=0]="Ignore",L[L.Info=1]="Info",L[L.Warning=2]="Warning",L[L.Error=3]="Error"})(k||(k={})),function(L){const D="error",w="warning",b="warn",S="info",g="ignore";function m(t){return t?_.equalsIgnoreCase(D,t)?L.Error:_.equalsIgnoreCase(w,t)||_.equalsIgnoreCase(b,t)?L.Warning:_.equalsIgnoreCase(S,t)?L.Info:L.Ignore:L.Ignore}L.fromValue=m;function s(t){switch(t){case L.Error:return D;case L.Warning:return w;case L.Info:return S;default:return g}}L.toString=s}(k||(k={})),e.default=k}),define(J[254],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(J[192],ee([1,0,9]),function(j,e,_){"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 s=m.charCodeAt(0),t=this._value.charCodeAt(this._pos);return s-t}value(){return this._value[this._pos]}}e.StringIterator=k;class L{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,_.compareSubstring)(m,this._value,0,m.length,this._from,this._to):(0,_.compareSubstringIgnoreCase)(m,this._value,0,m.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=L;class D{constructor(m=!0,s=!0){this._splitOnBackslash=m,this._caseSensitive=s}reset(m){this._from=0,this._to=0,this._value=m,this._valueLen=m.length;for(let s=m.length-1;s>=0;s--,this._valueLen--){const t=this._value.charCodeAt(s);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 s=this._value.charCodeAt(this._to);if(s===47||this._splitOnBackslash&&s===92)if(m)this._from++;else break;else m=!1}return this}cmp(m){return this._caseSensitive?(0,_.compareSubstring)(m,this._value,0,m.length,this._from,this._to):(0,_.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,s){this._ignorePathCasing=m,this._ignoreQueryAndFragment=s,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,_.compareIgnoreCase)(m,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,_.compareIgnoreCase)(m,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(m);if(this._states[this._stateIdx]===4)return(0,_.compare)(m,this._value.query);if(this._states[this._stateIdx]===5)return(0,_.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,s;return(s=(m=this.left)===null||m===void 0?void 0:m.height)!==null&&s!==void 0?s:0}get heightRight(){var m,s;return(s=(m=this.right)===null||m===void 0?void 0:m.height)!==null&&s!==void 0?s:0}}class S{static forUris(m=()=>!1,s=()=>!1){return new S(new w(m,s))}static forStrings(){return new S(new k)}static forConfigKeys(){return new S(new L)}constructor(m){this._iter=m}clear(){this._root=void 0}set(m,s){const t=this._iter.reset(m);let i;this._root||(this._root=new b,this._root.segment=t.value());const n=[];for(i=this._root;;){const d=t.cmp(i.segment);if(d>0)i.left||(i.left=new b,i.left.segment=t.value()),n.push([-1,i]),i=i.left;else if(d<0)i.right||(i.right=new b,i.right.segment=t.value()),n.push([1,i]),i=i.right;else if(t.hasNext())t.next(),i.mid||(i.mid=new b,i.mid.segment=t.value()),n.push([0,i]),i=i.mid;else break}const r=i.value;i.value=s,i.key=m;for(let d=n.length-1;d>=0;d--){const h=n[d][1];h.updateHeight();const o=h.balanceFactor();if(o<-1||o>1){const c=n[d][0],a=n[d+1][0];if(c===1&&a===1)n[d][1]=h.rotateLeft();else if(c===-1&&a===-1)n[d][1]=h.rotateRight();else if(c===1&&a===-1)h.right=n[d+1][1]=n[d+1][1].rotateRight(),n[d][1]=h.rotateLeft();else if(c===-1&&a===1)h.left=n[d+1][1]=n[d+1][1].rotateLeft(),n[d][1]=h.rotateRight();else throw new Error;if(d>0)switch(n[d-1][0]){case-1:n[d-1][1].left=n[d][1];break;case 1:n[d-1][1].right=n[d][1];break;case 0:n[d-1][1].mid=n[d][1];break}else this._root=n[0][1]}}return r}get(m){var s;return(s=this._getNode(m))===null||s===void 0?void 0:s.value}_getNode(m){const s=this._iter.reset(m);let t=this._root;for(;t;){const i=s.cmp(t.segment);if(i>0)t=t.left;else if(i<0)t=t.right;else if(s.hasNext())s.next(),t=t.mid;else break}return t}has(m){const s=this._getNode(m);return!(s?.value===void 0&&s?.mid===void 0)}delete(m){return this._delete(m,!1)}deleteSuperstr(m){return this._delete(m,!0)}_delete(m,s){var t;const i=this._iter.reset(m),n=[];let r=this._root;for(;r;){const d=i.cmp(r.segment);if(d>0)n.push([-1,r]),r=r.left;else if(d<0)n.push([1,r]),r=r.right;else if(i.hasNext())i.next(),n.push([0,r]),r=r.mid;else break}if(r){if(s?(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 d=this._min(r.right);if(d.key){const{key:h,value:o,segment:c}=d;this._delete(d.key,!1),r.key=h,r.value=o,r.segment=c}}else{const d=(t=r.left)!==null&&t!==void 0?t:r.right;if(n.length>0){const[h,o]=n[n.length-1];switch(h){case-1:o.left=d;break;case 0:o.mid=d;break;case 1:o.right=d;break}}else this._root=d}for(let d=n.length-1;d>=0;d--){const h=n[d][1];h.updateHeight();const o=h.balanceFactor();if(o>1?(h.right.balanceFactor()>=0||(h.right=h.right.rotateRight()),n[d][1]=h.rotateLeft()):o<-1&&(h.left.balanceFactor()<=0||(h.left=h.left.rotateLeft()),n[d][1]=h.rotateRight()),d>0)switch(n[d-1][0]){case-1:n[d-1][1].left=n[d][1];break;case 1:n[d-1][1].right=n[d][1];break;case 0:n[d-1][1].mid=n[d][1];break}else this._root=n[0][1]}}}_min(m){for(;m.left;)m=m.left;return m}findSubstr(m){const s=this._iter.reset(m);let t=this._root,i;for(;t;){const n=s.cmp(t.segment);if(n>0)t=t.left;else if(n<0)t=t.right;else if(s.hasNext())s.next(),i=t.value||i,t=t.mid;else break}return t&&t.value||i}findSuperstr(m){return this._findSuperstrOrElement(m,!1)}_findSuperstrOrElement(m,s){const t=this._iter.reset(m);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):s?i.value:void 0}}forEach(m){for(const[s,t]of this)m(t,s)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(m){const s=[];return this._dfsEntries(m,s),s[Symbol.iterator]()}_dfsEntries(m,s){m&&(m.left&&this._dfsEntries(m.left,s),m.value&&s.push([m.key,m.value]),m.mid&&this._dfsEntries(m.mid,s),m.right&&this._dfsEntries(m.right,s))}}e.TernarySearchTree=S}),define(J[18],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withUndefinedAsNull=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 _(o){return typeof o=="string"}e.isString=_;function k(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}e.isObject=k;function L(o){const c=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof c}e.isTypedArray=L;function D(o){return typeof o=="number"&&!isNaN(o)}e.isNumber=D;function w(o){return!!o&&typeof o[Symbol.iterator]=="function"}e.isIterable=w;function b(o){return o===!0||o===!1}e.isBoolean=b;function S(o){return typeof o>"u"}e.isUndefined=S;function g(o){return!m(o)}e.isDefined=g;function m(o){return S(o)||o===null}e.isUndefinedOrNull=m;function s(o,c){if(!o)throw new Error(c?`Unexpected type, expected \'${c}\'`:"Unexpected type")}e.assertType=s;function t(o){if(m(o))throw new Error("Assertion Failed: argument is undefined or null");return o}e.assertIsDefined=t;function i(o){return typeof o=="function"}e.isFunction=i;function n(o,c){const a=Math.min(o.length,c.length);for(let l=0;l<a;l++)r(o[l],c[l])}e.validateConstraints=n;function r(o,c){if(_(c)){if(typeof o!==c)throw new Error(`argument does not match constraint: typeof ${c}`)}else if(i(c)){try{if(o instanceof c)return}catch{}if(!m(o)&&o.constructor===c||c.length===1&&c.call(void 0,o)===!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 d(o){return o===null?void 0:o}e.withNullAsUndefined=d;function h(o){return typeof o>"u"?null:o}e.withUndefinedAsNull=h}),define(J[26],ee([1,0,18]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Codicon=e.getCodiconFontCharacters=void 0;const k=Object.create(null);function L(w,b){if((0,_.isString)(b)){const S=k[b];if(S===void 0)throw new Error(`${w} references an unknown codicon: ${b}`);b=S}return k[w]=b,{id:w}}function D(){return k}e.getCodiconFontCharacters=D,e.Codicon={add:L("add",6e4),plus:L("plus",6e4),gistNew:L("gist-new",6e4),repoCreate:L("repo-create",6e4),lightbulb:L("lightbulb",60001),lightBulb:L("light-bulb",60001),repo:L("repo",60002),repoDelete:L("repo-delete",60002),gistFork:L("gist-fork",60003),repoForked:L("repo-forked",60003),gitPullRequest:L("git-pull-request",60004),gitPullRequestAbandoned:L("git-pull-request-abandoned",60004),recordKeys:L("record-keys",60005),keyboard:L("keyboard",60005),tag:L("tag",60006),tagAdd:L("tag-add",60006),tagRemove:L("tag-remove",60006),person:L("person",60007),personFollow:L("person-follow",60007),personOutline:L("person-outline",60007),personFilled:L("person-filled",60007),gitBranch:L("git-branch",60008),gitBranchCreate:L("git-branch-create",60008),gitBranchDelete:L("git-branch-delete",60008),sourceControl:L("source-control",60008),mirror:L("mirror",60009),mirrorPublic:L("mirror-public",60009),star:L("star",60010),starAdd:L("star-add",60010),starDelete:L("star-delete",60010),starEmpty:L("star-empty",60010),comment:L("comment",60011),commentAdd:L("comment-add",60011),alert:L("alert",60012),warning:L("warning",60012),search:L("search",60013),searchSave:L("search-save",60013),logOut:L("log-out",60014),signOut:L("sign-out",60014),logIn:L("log-in",60015),signIn:L("sign-in",60015),eye:L("eye",60016),eyeUnwatch:L("eye-unwatch",60016),eyeWatch:L("eye-watch",60016),circleFilled:L("circle-filled",60017),primitiveDot:L("primitive-dot",60017),closeDirty:L("close-dirty",60017),debugBreakpoint:L("debug-breakpoint",60017),debugBreakpointDisabled:L("debug-breakpoint-disabled",60017),debugHint:L("debug-hint",60017),primitiveSquare:L("primitive-square",60018),edit:L("edit",60019),pencil:L("pencil",60019),info:L("info",60020),issueOpened:L("issue-opened",60020),gistPrivate:L("gist-private",60021),gitForkPrivate:L("git-fork-private",60021),lock:L("lock",60021),mirrorPrivate:L("mirror-private",60021),close:L("close",60022),removeClose:L("remove-close",60022),x:L("x",60022),repoSync:L("repo-sync",60023),sync:L("sync",60023),clone:L("clone",60024),desktopDownload:L("desktop-download",60024),beaker:L("beaker",60025),microscope:L("microscope",60025),vm:L("vm",60026),deviceDesktop:L("device-desktop",60026),file:L("file",60027),fileText:L("file-text",60027),more:L("more",60028),ellipsis:L("ellipsis",60028),kebabHorizontal:L("kebab-horizontal",60028),mailReply:L("mail-reply",60029),reply:L("reply",60029),organization:L("organization",60030),organizationFilled:L("organization-filled",60030),organizationOutline:L("organization-outline",60030),newFile:L("new-file",60031),fileAdd:L("file-add",60031),newFolder:L("new-folder",60032),fileDirectoryCreate:L("file-directory-create",60032),trash:L("trash",60033),trashcan:L("trashcan",60033),history:L("history",60034),clock:L("clock",60034),folder:L("folder",60035),fileDirectory:L("file-directory",60035),symbolFolder:L("symbol-folder",60035),logoGithub:L("logo-github",60036),markGithub:L("mark-github",60036),github:L("github",60036),terminal:L("terminal",60037),console:L("console",60037),repl:L("repl",60037),zap:L("zap",60038),symbolEvent:L("symbol-event",60038),error:L("error",60039),stop:L("stop",60039),variable:L("variable",60040),symbolVariable:L("symbol-variable",60040),array:L("array",60042),symbolArray:L("symbol-array",60042),symbolModule:L("symbol-module",60043),symbolPackage:L("symbol-package",60043),symbolNamespace:L("symbol-namespace",60043),symbolObject:L("symbol-object",60043),symbolMethod:L("symbol-method",60044),symbolFunction:L("symbol-function",60044),symbolConstructor:L("symbol-constructor",60044),symbolBoolean:L("symbol-boolean",60047),symbolNull:L("symbol-null",60047),symbolNumeric:L("symbol-numeric",60048),symbolNumber:L("symbol-number",60048),symbolStructure:L("symbol-structure",60049),symbolStruct:L("symbol-struct",60049),symbolParameter:L("symbol-parameter",60050),symbolTypeParameter:L("symbol-type-parameter",60050),symbolKey:L("symbol-key",60051),symbolText:L("symbol-text",60051),symbolReference:L("symbol-reference",60052),goToFile:L("go-to-file",60052),symbolEnum:L("symbol-enum",60053),symbolValue:L("symbol-value",60053),symbolRuler:L("symbol-ruler",60054),symbolUnit:L("symbol-unit",60054),activateBreakpoints:L("activate-breakpoints",60055),archive:L("archive",60056),arrowBoth:L("arrow-both",60057),arrowDown:L("arrow-down",60058),arrowLeft:L("arrow-left",60059),arrowRight:L("arrow-right",60060),arrowSmallDown:L("arrow-small-down",60061),arrowSmallLeft:L("arrow-small-left",60062),arrowSmallRight:L("arrow-small-right",60063),arrowSmallUp:L("arrow-small-up",60064),arrowUp:L("arrow-up",60065),bell:L("bell",60066),bold:L("bold",60067),book:L("book",60068),bookmark:L("bookmark",60069),debugBreakpointConditionalUnverified:L("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:L("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:L("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:L("debug-breakpoint-data-unverified",60072),debugBreakpointData:L("debug-breakpoint-data",60073),debugBreakpointDataDisabled:L("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:L("debug-breakpoint-log-unverified",60074),debugBreakpointLog:L("debug-breakpoint-log",60075),debugBreakpointLogDisabled:L("debug-breakpoint-log-disabled",60075),briefcase:L("briefcase",60076),broadcast:L("broadcast",60077),browser:L("browser",60078),bug:L("bug",60079),calendar:L("calendar",60080),caseSensitive:L("case-sensitive",60081),check:L("check",60082),checklist:L("checklist",60083),chevronDown:L("chevron-down",60084),dropDownButton:L("drop-down-button",60084),chevronLeft:L("chevron-left",60085),chevronRight:L("chevron-right",60086),chevronUp:L("chevron-up",60087),chromeClose:L("chrome-close",60088),chromeMaximize:L("chrome-maximize",60089),chromeMinimize:L("chrome-minimize",60090),chromeRestore:L("chrome-restore",60091),circle:L("circle",60092),circleOutline:L("circle-outline",60092),debugBreakpointUnverified:L("debug-breakpoint-unverified",60092),circleSlash:L("circle-slash",60093),circuitBoard:L("circuit-board",60094),clearAll:L("clear-all",60095),clippy:L("clippy",60096),closeAll:L("close-all",60097),cloudDownload:L("cloud-download",60098),cloudUpload:L("cloud-upload",60099),code:L("code",60100),collapseAll:L("collapse-all",60101),colorMode:L("color-mode",60102),commentDiscussion:L("comment-discussion",60103),compareChanges:L("compare-changes",60157),creditCard:L("credit-card",60105),dash:L("dash",60108),dashboard:L("dashboard",60109),database:L("database",60110),debugContinue:L("debug-continue",60111),debugDisconnect:L("debug-disconnect",60112),debugPause:L("debug-pause",60113),debugRestart:L("debug-restart",60114),debugStart:L("debug-start",60115),debugStepInto:L("debug-step-into",60116),debugStepOut:L("debug-step-out",60117),debugStepOver:L("debug-step-over",60118),debugStop:L("debug-stop",60119),debug:L("debug",60120),deviceCameraVideo:L("device-camera-video",60121),deviceCamera:L("device-camera",60122),deviceMobile:L("device-mobile",60123),diffAdded:L("diff-added",60124),diffIgnored:L("diff-ignored",60125),diffModified:L("diff-modified",60126),diffRemoved:L("diff-removed",60127),diffRenamed:L("diff-renamed",60128),diff:L("diff",60129),discard:L("discard",60130),editorLayout:L("editor-layout",60131),emptyWindow:L("empty-window",60132),exclude:L("exclude",60133),extensions:L("extensions",60134),eyeClosed:L("eye-closed",60135),fileBinary:L("file-binary",60136),fileCode:L("file-code",60137),fileMedia:L("file-media",60138),filePdf:L("file-pdf",60139),fileSubmodule:L("file-submodule",60140),fileSymlinkDirectory:L("file-symlink-directory",60141),fileSymlinkFile:L("file-symlink-file",60142),fileZip:L("file-zip",60143),files:L("files",60144),filter:L("filter",60145),flame:L("flame",60146),foldDown:L("fold-down",60147),foldUp:L("fold-up",60148),fold:L("fold",60149),folderActive:L("folder-active",60150),folderOpened:L("folder-opened",60151),gear:L("gear",60152),gift:L("gift",60153),gistSecret:L("gist-secret",60154),gist:L("gist",60155),gitCommit:L("git-commit",60156),gitCompare:L("git-compare",60157),gitMerge:L("git-merge",60158),githubAction:L("github-action",60159),githubAlt:L("github-alt",60160),globe:L("globe",60161),grabber:L("grabber",60162),graph:L("graph",60163),gripper:L("gripper",60164),heart:L("heart",60165),home:L("home",60166),horizontalRule:L("horizontal-rule",60167),hubot:L("hubot",60168),inbox:L("inbox",60169),issueClosed:L("issue-closed",60324),issueReopened:L("issue-reopened",60171),issues:L("issues",60172),italic:L("italic",60173),jersey:L("jersey",60174),json:L("json",60175),bracket:L("bracket",60175),kebabVertical:L("kebab-vertical",60176),key:L("key",60177),law:L("law",60178),lightbulbAutofix:L("lightbulb-autofix",60179),linkExternal:L("link-external",60180),link:L("link",60181),listOrdered:L("list-ordered",60182),listUnordered:L("list-unordered",60183),liveShare:L("live-share",60184),loading:L("loading",60185),location:L("location",60186),mailRead:L("mail-read",60187),mail:L("mail",60188),markdown:L("markdown",60189),megaphone:L("megaphone",60190),mention:L("mention",60191),milestone:L("milestone",60192),mortarBoard:L("mortar-board",60193),move:L("move",60194),multipleWindows:L("multiple-windows",60195),mute:L("mute",60196),noNewline:L("no-newline",60197),note:L("note",60198),octoface:L("octoface",60199),openPreview:L("open-preview",60200),package_:L("package",60201),paintcan:L("paintcan",60202),pin:L("pin",60203),play:L("play",60204),run:L("run",60204),plug:L("plug",60205),preserveCase:L("preserve-case",60206),preview:L("preview",60207),project:L("project",60208),pulse:L("pulse",60209),question:L("question",60210),quote:L("quote",60211),radioTower:L("radio-tower",60212),reactions:L("reactions",60213),references:L("references",60214),refresh:L("refresh",60215),regex:L("regex",60216),remoteExplorer:L("remote-explorer",60217),remote:L("remote",60218),remove:L("remove",60219),replaceAll:L("replace-all",60220),replace:L("replace",60221),repoClone:L("repo-clone",60222),repoForcePush:L("repo-force-push",60223),repoPull:L("repo-pull",60224),repoPush:L("repo-push",60225),report:L("report",60226),requestChanges:L("request-changes",60227),rocket:L("rocket",60228),rootFolderOpened:L("root-folder-opened",60229),rootFolder:L("root-folder",60230),rss:L("rss",60231),ruby:L("ruby",60232),saveAll:L("save-all",60233),saveAs:L("save-as",60234),save:L("save",60235),screenFull:L("screen-full",60236),screenNormal:L("screen-normal",60237),searchStop:L("search-stop",60238),server:L("server",60240),settingsGear:L("settings-gear",60241),settings:L("settings",60242),shield:L("shield",60243),smiley:L("smiley",60244),sortPrecedence:L("sort-precedence",60245),splitHorizontal:L("split-horizontal",60246),splitVertical:L("split-vertical",60247),squirrel:L("squirrel",60248),starFull:L("star-full",60249),starHalf:L("star-half",60250),symbolClass:L("symbol-class",60251),symbolColor:L("symbol-color",60252),symbolCustomColor:L("symbol-customcolor",60252),symbolConstant:L("symbol-constant",60253),symbolEnumMember:L("symbol-enum-member",60254),symbolField:L("symbol-field",60255),symbolFile:L("symbol-file",60256),symbolInterface:L("symbol-interface",60257),symbolKeyword:L("symbol-keyword",60258),symbolMisc:L("symbol-misc",60259),symbolOperator:L("symbol-operator",60260),symbolProperty:L("symbol-property",60261),wrench:L("wrench",60261),wrenchSubaction:L("wrench-subaction",60261),symbolSnippet:L("symbol-snippet",60262),tasklist:L("tasklist",60263),telescope:L("telescope",60264),textSize:L("text-size",60265),threeBars:L("three-bars",60266),thumbsdown:L("thumbsdown",60267),thumbsup:L("thumbsup",60268),tools:L("tools",60269),triangleDown:L("triangle-down",60270),triangleLeft:L("triangle-left",60271),triangleRight:L("triangle-right",60272),triangleUp:L("triangle-up",60273),twitter:L("twitter",60274),unfold:L("unfold",60275),unlock:L("unlock",60276),unmute:L("unmute",60277),unverified:L("unverified",60278),verified:L("verified",60279),versions:L("versions",60280),vmActive:L("vm-active",60281),vmOutline:L("vm-outline",60282),vmRunning:L("vm-running",60283),watch:L("watch",60284),whitespace:L("whitespace",60285),wholeWord:L("whole-word",60286),window:L("window",60287),wordWrap:L("word-wrap",60288),zoomIn:L("zoom-in",60289),zoomOut:L("zoom-out",60290),listFilter:L("list-filter",60291),listFlat:L("list-flat",60292),listSelection:L("list-selection",60293),selection:L("selection",60293),listTree:L("list-tree",60294),debugBreakpointFunctionUnverified:L("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:L("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:L("debug-breakpoint-function-disabled",60296),debugStackframeActive:L("debug-stackframe-active",60297),circleSmallFilled:L("circle-small-filled",60298),debugStackframeDot:L("debug-stackframe-dot",60298),debugStackframe:L("debug-stackframe",60299),debugStackframeFocused:L("debug-stackframe-focused",60299),debugBreakpointUnsupported:L("debug-breakpoint-unsupported",60300),symbolString:L("symbol-string",60301),debugReverseContinue:L("debug-reverse-continue",60302),debugStepBack:L("debug-step-back",60303),debugRestartFrame:L("debug-restart-frame",60304),callIncoming:L("call-incoming",60306),callOutgoing:L("call-outgoing",60307),menu:L("menu",60308),expandAll:L("expand-all",60309),feedback:L("feedback",60310),groupByRefType:L("group-by-ref-type",60311),ungroupByRefType:L("ungroup-by-ref-type",60312),account:L("account",60313),bellDot:L("bell-dot",60314),debugConsole:L("debug-console",60315),library:L("library",60316),output:L("output",60317),runAll:L("run-all",60318),syncIgnored:L("sync-ignored",60319),pinned:L("pinned",60320),githubInverted:L("github-inverted",60321),debugAlt:L("debug-alt",60305),serverProcess:L("server-process",60322),serverEnvironment:L("server-environment",60323),pass:L("pass",60324),stopCircle:L("stop-circle",60325),playCircle:L("play-circle",60326),record:L("record",60327),debugAltSmall:L("debug-alt-small",60328),vmConnect:L("vm-connect",60329),cloud:L("cloud",60330),merge:L("merge",60331),exportIcon:L("export",60332),graphLeft:L("graph-left",60333),magnet:L("magnet",60334),notebook:L("notebook",60335),redo:L("redo",60336),checkAll:L("check-all",60337),pinnedDirty:L("pinned-dirty",60338),passFilled:L("pass-filled",60339),circleLargeFilled:L("circle-large-filled",60340),circleLarge:L("circle-large",60341),circleLargeOutline:L("circle-large-outline",60341),combine:L("combine",60342),gather:L("gather",60342),table:L("table",60343),variableGroup:L("variable-group",60344),typeHierarchy:L("type-hierarchy",60345),typeHierarchySub:L("type-hierarchy-sub",60346),typeHierarchySuper:L("type-hierarchy-super",60347),gitPullRequestCreate:L("git-pull-request-create",60348),runAbove:L("run-above",60349),runBelow:L("run-below",60350),notebookTemplate:L("notebook-template",60351),debugRerun:L("debug-rerun",60352),workspaceTrusted:L("workspace-trusted",60353),workspaceUntrusted:L("workspace-untrusted",60354),workspaceUnspecified:L("workspace-unspecified",60355),terminalCmd:L("terminal-cmd",60356),terminalDebian:L("terminal-debian",60357),terminalLinux:L("terminal-linux",60358),terminalPowershell:L("terminal-powershell",60359),terminalTmux:L("terminal-tmux",60360),terminalUbuntu:L("terminal-ubuntu",60361),terminalBash:L("terminal-bash",60362),arrowSwap:L("arrow-swap",60363),copy:L("copy",60364),personAdd:L("person-add",60365),filterFilled:L("filter-filled",60366),wand:L("wand",60367),debugLineByLine:L("debug-line-by-line",60368),inspect:L("inspect",60369),layers:L("layers",60370),layersDot:L("layers-dot",60371),layersActive:L("layers-active",60372),compass:L("compass",60373),compassDot:L("compass-dot",60374),compassActive:L("compass-active",60375),azure:L("azure",60376),issueDraft:L("issue-draft",60377),gitPullRequestClosed:L("git-pull-request-closed",60378),gitPullRequestDraft:L("git-pull-request-draft",60379),debugAll:L("debug-all",60380),debugCoverage:L("debug-coverage",60381),runErrors:L("run-errors",60382),folderLibrary:L("folder-library",60383),debugContinueSmall:L("debug-continue-small",60384),beakerStop:L("beaker-stop",60385),graphLine:L("graph-line",60386),graphScatter:L("graph-scatter",60387),pieChart:L("pie-chart",60388),bracketDot:L("bracket-dot",60389),bracketError:L("bracket-error",60390),lockSmall:L("lock-small",60391),azureDevops:L("azure-devops",60392),verifiedFilled:L("verified-filled",60393),newLine:L("newline",60394),layout:L("layout",60395),layoutActivitybarLeft:L("layout-activitybar-left",60396),layoutActivitybarRight:L("layout-activitybar-right",60397),layoutPanelLeft:L("layout-panel-left",60398),layoutPanelCenter:L("layout-panel-center",60399),layoutPanelJustify:L("layout-panel-justify",60400),layoutPanelRight:L("layout-panel-right",60401),layoutPanel:L("layout-panel",60402),layoutSidebarLeft:L("layout-sidebar-left",60403),layoutSidebarRight:L("layout-sidebar-right",60404),layoutStatusbar:L("layout-statusbar",60405),layoutMenubar:L("layout-menubar",60406),layoutCentered:L("layout-centered",60407),layoutSidebarRightOff:L("layout-sidebar-right-off",60416),layoutPanelOff:L("layout-panel-off",60417),layoutSidebarLeftOff:L("layout-sidebar-left-off",60418),target:L("target",60408),indent:L("indent",60409),recordSmall:L("record-small",60410),errorSmall:L("error-small",60411),arrowCircleDown:L("arrow-circle-down",60412),arrowCircleLeft:L("arrow-circle-left",60413),arrowCircleRight:L("arrow-circle-right",60414),arrowCircleUp:L("arrow-circle-up",60415),heartFilled:L("heart-filled",60420),map:L("map",60421),mapFilled:L("map-filled",60422),circleSmall:L("circle-small",60423),bellSlash:L("bell-slash",60424),bellSlashDot:L("bell-slash-dot",60425),commentUnresolved:L("comment-unresolved",60426),gitPullRequestGoToChanges:L("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:L("git-pull-request-new-changes",60428),searchFuzzy:L("search-fuzzy",60429),commentDraft:L("comment-draft",60430),send:L("send",60431),sparkle:L("sparkle",60432),insert:L("insert",60433),dialogError:L("dialog-error","error"),dialogWarning:L("dialog-warning","warning"),dialogInfo:L("dialog-info","info"),dialogClose:L("dialog-close","close"),treeItemExpanded:L("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:L("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:L("tree-filter-on-type-off","list-selection"),treeFilterClear:L("tree-filter-clear","close"),treeItemLoading:L("tree-item-loading","loading"),menuSelection:L("menu-selection","check"),menuSubmenu:L("menu-submenu","chevron-right"),menuBarMore:L("menubar-more","more"),scrollbarButtonLeft:L("scrollbar-button-left","triangle-left"),scrollbarButtonRight:L("scrollbar-button-right","triangle-right"),scrollbarButtonUp:L("scrollbar-button-up","triangle-up"),scrollbarButtonDown:L("scrollbar-button-down","triangle-down"),toolBarMore:L("toolbar-more","more"),quickInputBack:L("quick-input-back","arrow-left")}}),define(J[45],ee([1,0,18]),function(j,e,_){"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 n=Array.isArray(i)?[]:{};return Object.entries(i).forEach(([r,d])=>{n[r]=d&&typeof d=="object"?k(d):d}),n}e.deepClone=k;function L(i){if(!i||typeof i!="object")return i;const n=[i];for(;n.length>0;){const r=n.shift();Object.freeze(r);for(const d in r)if(D.call(r,d)){const h=r[d];typeof h=="object"&&!Object.isFrozen(h)&&!(0,_.isTypedArray)(h)&&n.push(h)}}return i}e.deepFreeze=L;const D=Object.prototype.hasOwnProperty;function w(i,n){return b(i,n,new Set)}e.cloneAndChange=w;function b(i,n,r){if((0,_.isUndefinedOrNull)(i))return i;const d=n(i);if(typeof d<"u")return d;if(Array.isArray(i)){const h=[];for(const o of i)h.push(b(o,n,r));return h}if((0,_.isObject)(i)){if(r.has(i))throw new Error("Cannot clone recursive data-structure");r.add(i);const h={};for(const o in i)D.call(i,o)&&(h[o]=b(i[o],n,r));return r.delete(i),h}return i}function S(i,n,r=!0){return(0,_.isObject)(i)?((0,_.isObject)(n)&&Object.keys(n).forEach(d=>{d in i?r&&((0,_.isObject)(i[d])&&(0,_.isObject)(n[d])?S(i[d],n[d],r):i[d]=n[d]):i[d]=n[d]}),i):n}e.mixin=S;function g(i,n){if(i===n)return!0;if(i==null||n===null||n===void 0||typeof i!=typeof n||typeof i!="object"||Array.isArray(i)!==Array.isArray(n))return!1;let r,d;if(Array.isArray(i)){if(i.length!==n.length)return!1;for(r=0;r<i.length;r++)if(!g(i[r],n[r]))return!1}else{const h=[];for(d in i)h.push(d);h.sort();const o=[];for(d in n)o.push(d);if(o.sort(),!g(h,o))return!1;for(r=0;r<h.length;r++)if(!g(i[h[r]],n[h[r]]))return!1}return!0}e.equals=g;function m(i){let n=[],r=Object.getPrototypeOf(i);for(;Object.prototype!==r;)n=n.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return n}e.getAllPropertyNames=m;function s(i){const n=[];for(const r of m(i))typeof i[r]=="function"&&n.push(r);return n}e.getAllMethodNames=s;function t(i,n){const r=h=>function(){const o=Array.prototype.slice.call(arguments,0);return n(h,o)},d={};for(const h of i)d[h]=r(h);return d}e.createProxyObject=t}),define(J[31],ee([1,0,26]),function(j,e,_){"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=k={}));var L;(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(h){const o=w.exec(h.id);if(!o)return b(_.Codicon.error);const[,c,a]=o,l=["codicon","codicon-"+c];return a&&l.push("codicon-modifier-"+a.substring(1)),l}D.asClassNameArray=b;function S(h){return b(h).join(" ")}D.asClassName=S;function g(h){return"."+b(h).join(".")}D.asCSSSelector=g;function m(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||k.isThemeColor(h.color))}D.isThemeIcon=m;const s=new RegExp(`^\\\\$\\\\((${D.iconNameExpression}(?:${D.iconModifierExpression})?)\\\\)$`);function t(h){const o=s.exec(h);if(!o)return;const[,c]=o;return{id:c}}D.fromString=t;function i(h){return{id:h}}D.fromId=i;function n(h,o){let c=h.id;const a=c.lastIndexOf("~");return a!==-1&&(c=c.substring(0,a)),o&&(c=`${c}~${o}`),{id:c}}D.modify=n;function r(h){const o=h.id.lastIndexOf("~");if(o!==-1)return h.id.substring(o+1)}D.getModifier=r;function d(h,o){var c,a;return h.id===o.id&&((c=h.color)===null||c===void 0?void 0:c.id)===((a=o.color)===null||a===void 0?void 0:a.id)}D.isEqual=d})(L||(e.ThemeIcon=L={}))}),define(J[115],ee([1,0,64,9,31]),function(j,e,_,k,L){"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(`\\\\$\\\\(${L.ThemeIcon.iconNameExpression}(?:${L.ThemeIcon.iconModifierExpression})?\\\\)`,"g"),b=new RegExp(`(\\\\\\\\)?${w.source}`,"g");function S(h){return h.replace(b,(o,c)=>c?o:`\\\\${o}`)}e.escapeIcons=S;const g=new RegExp(`\\\\\\\\${w.source}`,"g");function m(h){return h.replace(g,o=>`\\\\${o}`)}e.markdownEscapeEscapedIcons=m;const s=new RegExp(`(\\\\s)?(\\\\\\\\)?${w.source}(\\\\s)?`,"g");function t(h){return h.indexOf(D)===-1?h:h.replace(s,(o,c,a,l)=>a?o:c||l||"")}e.stripIcons=t;function i(h){return h?h.replace(/\\$\\((.*?)\\)/g,(o,c)=>` ${c} `).trim():""}e.getCodiconAriaLabel=i;const n=new RegExp(`\\\\$\\\\(${L.ThemeIcon.iconNameCharacter}+\\\\)`,"g");function r(h){n.lastIndex=0;let o="";const c=[];let a=0;for(;;){const l=n.lastIndex,u=n.exec(h),v=h.substring(l,u?.index);if(v.length>0){o+=v;for(let f=0;f<v.length;f++)c.push(a)}if(!u)break;a+=u[0].length}return{text:o,iconOffsets:c}}e.parseLabelWithIcons=r;function d(h,o,c=!1){const{text:a,iconOffsets:l}=o;if(!l||l.length===0)return(0,_.matchesFuzzy)(h,a,c);const u=(0,k.ltrim)(a," "),v=a.length-u.length,f=(0,_.matchesFuzzy)(h,u,c);if(f)for(const p of f){const C=l[p.start+v]+v;p.start+=C,p.end+=C}return f}e.matchesFuzzyIconAware=d}),define(J[163],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=void 0;function _(L){return L<0?0:L>255?255:L|0}e.toUint8=_;function k(L){return L<0?0:L>4294967295?4294967295:L|0}e.toUint32=k}),define(J[164],ee([1,0]),function(j,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 _;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?_=crypto.getRandomValues.bind(crypto):_=function(D){for(let w=0;w<D.length;w++)D[w]=Math.floor(Math.random()*256);return D};const k=new Uint8Array(16),L=[];for(let D=0;D<256;D++)L.push(D.toString(16).padStart(2,"0"));return function(){_(k),k[6]=k[6]&15|64,k[8]=k[8]&63|128;let w=0,b="";return b+=L[k[w++]],b+=L[k[w++]],b+=L[k[w++]],b+=L[k[w++]],b+="-",b+=L[k[w++]],b+=L[k[w++]],b+="-",b+=L[k[w++]],b+=L[k[w++]],b+="-",b+=L[k[w++]],b+=L[k[w++]],b+="-",b+=L[k[w++]],b+=L[k[w++]],b+=L[k[w++]],b+=L[k[w++]],b+=L[k[w++]],b+=L[k[w++]],b}}()}),define(J[165],ee([1,0,16,53,164]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriList=e.matchesMimeType=e.VSDataTransfer=e.createFileDataTransferItem=e.createStringDataTransferItem=void 0;function D(s){return{asString:()=>we(this,void 0,void 0,function*(){return s}),asFile:()=>{},value:typeof s=="string"?s:void 0}}e.createStringDataTransferItem=D;function w(s,t,i){const n={id:(0,L.generateUuid)(),name:s,uri:t,data:i};return{asString:()=>we(this,void 0,void 0,function*(){return""}),asFile:()=>n,value:void 0}}e.createFileDataTransferItem=w;class b{constructor(){this._entries=new Map}get size(){let t=0;for(const i of this._entries)t++;return t}has(t){return this._entries.has(this.toKey(t))}matches(t){const i=[...this._entries.keys()];return k.Iterable.some(this,([n,r])=>r.asFile())&&i.push("files"),m(S(t),i)}get(t){var i;return(i=this._entries.get(this.toKey(t)))===null||i===void 0?void 0:i[0]}append(t,i){const n=this._entries.get(t);n?n.push(i):this._entries.set(this.toKey(t),[i])}replace(t,i){this._entries.set(this.toKey(t),[i])}delete(t){this._entries.delete(this.toKey(t))}*[Symbol.iterator](){for(const[t,i]of this._entries)for(const n of i)yield[t,n]}toKey(t){return S(t)}}e.VSDataTransfer=b;function S(s){return s.toLowerCase()}function g(s,t){return m(S(s),t.map(S))}e.matchesMimeType=g;function m(s,t){if(s==="*/*")return t.length>0;if(t.includes(s))return!0;const i=s.match(/^([a-z]+)\\/([a-z]+|\\*)$/i);if(!i)return!1;const[n,r,d]=i;return d==="*"?t.some(h=>h.startsWith(r+"/")):!1}e.UriList=Object.freeze({create:s=>(0,_.distinct)(s.map(t=>t.toString())).join(`\\r\n`),split:s=>s.split(`\\r\n`),parse:s=>e.UriList.split(s).filter(t=>!t.startsWith("#"))})}),define(J[255],ee([10]),{}),define(J[379],ee([10]),{}),define(J[380],ee([10]),{}),define(J[381],ee([10]),{}),define(J[382],ee([10]),{}),define(J[166],ee([1,0,381,382]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(J[383],ee([10]),{}),define(J[384],ee([10]),{}),define(J[256],ee([10]),{}),define(J[257],ee([10]),{}),define(J[385],ee([10]),{}),define(J[386],ee([10]),{}),define(J[387],ee([10]),{}),define(J[388],ee([10]),{}),define(J[258],ee([10]),{}),define(J[389],ee([10]),{}),define(J[167],ee([1,0,389]),function(j,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[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[193],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[439],ee([10]),{}),define(J[440],ee([10]),{}),define(J[441],ee([10]),{}),define(J[442],ee([10]),{}),define(J[443],ee([10]),{}),define(J[444],ee([10]),{}),define(J[445],ee([10]),{}),define(J[446],ee([10]),{}),define(J[447],ee([10]),{}),define(J[448],ee([10]),{}),define(J[449],ee([10]),{}),define(J[450],ee([10]),{}),define(J[451],ee([10]),{}),define(J[452],ee([10]),{}),define(J[453],ee([10]),{}),define(J[454],ee([10]),{}),define(J[455],ee([10]),{}),define(J[456],ee([10]),{}),define(J[457],ee([10]),{}),define(J[259],ee([10]),{}),define(J[458],ee([10]),{}),define(J[459],ee([10]),{}),define(J[168],ee([10]),{}),define(J[460],ee([10]),{}),define(J[76],ee([1,0,35]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function k(L,D){L instanceof _.FastDomNode?(L.setFontFamily(D.getMassagedFontFamily()),L.setFontWeight(D.fontWeight),L.setFontSize(D.fontSize),L.setFontFeatureSettings(D.fontFeatureSettings),L.setFontVariationSettings(D.fontVariationSettings),L.setLineHeight(D.lineHeight),L.setLetterSpacing(D.letterSpacing)):(L.style.fontFamily=D.getMassagedFontFamily(),L.style.fontWeight=D.fontWeight,L.style.fontSize=D.fontSize+"px",L.style.fontFeatureSettings=D.fontFeatureSettings,L.style.fontVariationSettings=D.fontVariationSettings,L.style.lineHeight=D.lineHeight+"px",L.style.letterSpacing=D.letterSpacing+"px")}e.applyFontInfo=k}),define(J[461],ee([1,0,76]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=void 0;class k{constructor(b,S){this.chr=b,this.type=S,this.width=0}fulfill(b){this.width=b}}e.CharWidthRequest=k;class L{constructor(b,S){this._bareFontInfo=b,this._requests=S,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 S=document.createElement("div");(0,_.applyFontInfo)(S,this._bareFontInfo),b.appendChild(S);const g=document.createElement("div");(0,_.applyFontInfo)(g,this._bareFontInfo),g.style.fontWeight="bold",b.appendChild(g);const m=document.createElement("div");(0,_.applyFontInfo)(m,this._bareFontInfo),m.style.fontStyle="italic",b.appendChild(m);const s=[];for(const t of this._requests){let i;t.type===0&&(i=S),t.type===2&&(i=g),t.type===1&&(i=m),i.appendChild(document.createElement("br"));const n=document.createElement("span");L._render(n,t),i.appendChild(n),s.push(n)}this._container=b,this._testElements=s}static _render(b,S){if(S.chr===" "){let g="\\xA0";for(let m=0;m<8;m++)g+=g;b.innerText=g}else{let g=S.chr;for(let m=0;m<8;m++)g+=g;b.textContent=g}}_readFromDomElements(){for(let b=0,S=this._requests.length;b<S;b++){const g=this._requests[b],m=this._testElements[b];g.fulfill(m.offsetWidth/256)}}}function D(w,b){new L(w,b).read()}e.readCharWidths=D}),define(J[462],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateOptions=e.EditorSettingMigration=void 0;class _{constructor(S,g){this.key=S,this.migrate=g}apply(S){const g=_._read(S,this.key),m=t=>_._read(S,t),s=(t,i)=>_._write(S,t,i);this.migrate(g,m,s)}static _read(S,g){if(typeof S>"u")return;const m=g.indexOf(".");if(m>=0){const s=g.substring(0,m);return this._read(S[s],g.substring(m+1))}return S[g]}static _write(S,g,m){const s=g.indexOf(".");if(s>=0){const t=g.substring(0,s);S[t]=S[t]||{},this._write(S[t],g.substring(s+1),m);return}S[g]=m}}e.EditorSettingMigration=_,_.items=[];function k(b,S){_.items.push(new _(b,S))}function L(b,S){k(b,(g,m,s)=>{if(typeof g<"u"){for(const[t,i]of S)if(g===t){s(b,i);return}}})}function D(b){_.items.forEach(S=>S.apply(b))}e.migrateOptions=D,L("wordWrap",[[!0,"on"],[!1,"off"]]),L("lineNumbers",[[!0,"on"],[!1,"off"]]),L("cursorBlinking",[["visible","solid"]]),L("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),L("renderLineHighlight",[[!0,"line"],[!1,"none"]]),L("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),L("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),L("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),L("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),L("autoIndent",[[!1,"advanced"],[!0,"full"]]),L("matchBrackets",[[!0,"always"],[!1,"never"]]),L("renderFinalNewline",[[!0,"on"],[!1,"off"]]),L("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),k("autoClosingBrackets",(b,S,g)=>{b===!1&&(g("autoClosingBrackets","never"),typeof S("autoClosingQuotes")>"u"&&g("autoClosingQuotes","never"),typeof S("autoSurround")>"u"&&g("autoSurround","never"))}),k("renderIndentGuides",(b,S,g)=>{typeof b<"u"&&(g("renderIndentGuides",void 0),typeof S("guides.indentation")>"u"&&g("guides.indentation",!!b))}),k("highlightActiveIndentGuide",(b,S,g)=>{typeof b<"u"&&(g("highlightActiveIndentGuide",void 0),typeof S("guides.highlightActiveIndentation")>"u"&&g("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,S,g)=>{if(b&&typeof b=="object"){for(const m of Object.entries(w))b[m[0]]===!1&&typeof S(`suggest.${m[1]}`)>"u"&&g(`suggest.${m[1]}`,!1);g("suggest.filteredTypes",void 0)}}),k("quickSuggestions",(b,S,g)=>{if(typeof b=="boolean"){const m=b?"on":"off";g("quickSuggestions",{comments:m,strings:m,other:m})}}),k("experimental.stickyScroll.enabled",(b,S,g)=>{typeof b=="boolean"&&(g("experimental.stickyScroll.enabled",void 0),typeof S("stickyScroll.enabled")>"u"&&g("stickyScroll.enabled",b))}),k("experimental.stickyScroll.maxLineCount",(b,S,g)=>{typeof b=="number"&&(g("experimental.stickyScroll.maxLineCount",void 0),typeof S("stickyScroll.maxLineCount")>"u"&&g("stickyScroll.maxLineCount",b))})}),define(J[116],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class _{static capture(L){if(L.getScrollTop()===0||L.hasPendingScrollAnimation())return new _(L.getScrollTop(),L.getContentHeight(),null,0,null);let D=null,w=0;const b=L.getVisibleRanges();if(b.length>0){D=b[0].getStartPosition();const S=L.getTopForPosition(D.lineNumber,D.column);w=L.getScrollTop()-S}return new _(L.getScrollTop(),L.getContentHeight(),D,w,L.getPosition())}constructor(L,D,w,b,S){this._initialScrollTop=L,this._initialContentHeight=D,this._visiblePosition=w,this._visiblePositionScrollDelta=b,this._cursorPosition=S}restore(L){if(!(this._initialContentHeight===L.getContentHeight()&&this._initialScrollTop===L.getScrollTop())&&this._visiblePosition){const D=L.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);L.setScrollTop(D+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(L){if(this._initialContentHeight===L.getContentHeight()&&this._initialScrollTop===L.getScrollTop())return;const D=L.getPosition();if(!this._cursorPosition||!D)return;const w=L.getTopForLineNumber(D.lineNumber)-L.getTopForLineNumber(this._cursorPosition.lineNumber);L.setScrollTop(L.getScrollTop()+w)}}e.StableEditorScrollState=_}),define(J[138],ee([1,0]),function(j,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 _{constructor(m,s){this._restrictedRenderingContextBrand=void 0,this._viewLayout=m,this.viewportData=s,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,s){return this._viewLayout.getVerticalOffsetForLineNumber(m,s)}getVerticalOffsetAfterLineNumber(m,s){return this._viewLayout.getVerticalOffsetAfterLineNumber(m,s)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=_;class k extends _{constructor(m,s,t){super(m,s),this._renderingContextBrand=void 0,this._viewLines=t}linesVisibleRangesForRange(m,s){return this._viewLines.linesVisibleRangesForRange(m,s)}visibleRangeForPosition(m){return this._viewLines.visibleRangeForPosition(m)}}e.RenderingContext=k;class L{constructor(m,s,t){this.outsideRenderedLine=m,this.lineNumber=s,this.ranges=t}}e.LineVisibleRanges=L;class D{static from(m){const s=new Array(m.length);for(let t=0,i=m.length;t<i;t++){const n=m[t];s[t]=new D(n.left,n.width)}return s}constructor(m,s){this._horizontalRangeBrand=void 0,this.left=Math.round(m),this.width=Math.round(s)}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=D;class w{constructor(m,s){this._floatHorizontalRangeBrand=void 0,this.left=m,this.width=s}toString(){return`[${this.left},${this.width}]`}static compare(m,s){return m.left-s.left}}e.FloatHorizontalRange=w;class b{constructor(m,s){this.outsideRenderedLine=m,this.originalLeft=s,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=b;class S{constructor(m,s){this.outsideRenderedLine=m,this.ranges=s}}e.VisibleRanges=S}),define(J[463],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomReadingContext=void 0;class _{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const L=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=L.left,this._clientRectScale=L.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(L,D){this._domNode=L,this.endNode=D,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}e.DomReadingContext=_}),define(J[464],ee([1,0,138]),function(j,e,_){"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,S,g){const m=this._createRange();try{return m.setStart(D,w),m.setEnd(b,S),m.getClientRects()}catch{return null}finally{this._detachRange(m,g)}}static _mergeAdjacentRanges(D){if(D.length===1)return D;D.sort(_.FloatHorizontalRange.compare);const w=[];let b=0,S=D[0];for(let g=1,m=D.length;g<m;g++){const s=D[g];S.left+S.width+.9>=s.left?S.width=Math.max(S.width,s.left+s.width-S.left):(w[b++]=S,S=s)}return w[b++]=S,w}static _createHorizontalRangesFromClientRects(D,w,b){if(!D||D.length===0)return null;const S=[];for(let g=0,m=D.length;g<m;g++){const s=D[g];S[g]=new _.FloatHorizontalRange(Math.max(0,(s.left-w)/b),s.width/b)}return this._mergeAdjacentRanges(S)}static readHorizontalRanges(D,w,b,S,g,m){const t=D.children.length-1;if(0>t)return null;if(w=Math.min(t,Math.max(0,w)),S=Math.min(t,Math.max(0,S)),w===S&&b===g&&b===0&&!D.children[w].firstChild){const d=D.children[w].getClientRects();return m.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,m.clientRectDeltaLeft,m.clientRectScale)}w!==S&&S>0&&g===0&&(S--,g=1073741824);let i=D.children[w].firstChild,n=D.children[S].firstChild;if((!i||!n)&&(!i&&b===0&&w>0&&(i=D.children[w-1].firstChild,b=1073741824),!n&&g===0&&S>0&&(n=D.children[S-1].firstChild,g=1073741824)),!i||!n)return null;b=Math.min(i.textContent.length,Math.max(0,b)),g=Math.min(n.textContent.length,Math.max(0,g));const r=this._readClientRects(i,b,n,g,m.endNode);return m.markDidDomLayout(),this._createHorizontalRangesFromClientRects(r,m.clientRectDeltaLeft,m.clientRectScale)}}e.RangeUtil=k}),define(J[260],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=void 0,e.allCharCodes=(()=>{const k=[];for(let L=32;L<=126;L++)k.push(L);return k.push(65533),k})();const _=(k,L)=>(k-=32,k<0||k>96?L<=2?(k+96)%96:96-1:k);e.getCharIndex=_}),define(J[465],ee([1,0,260,163]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class L{constructor(w,b){this.scale=b,this._minimapCharRendererBrand=void 0,this.charDataNormal=L.soften(w,12/15),this.charDataLight=L.soften(w,50/60)}static soften(w,b){const S=new Uint8ClampedArray(w.length);for(let g=0,m=w.length;g<m;g++)S[g]=(0,k.toUint8)(w[g]*b);return S}renderChar(w,b,S,g,m,s,t,i,n,r,d){const h=1*this.scale,o=2*this.scale,c=d?1:o;if(b+h>w.width||S+c>w.height){console.warn("bad render request outside image data");return}const a=r?this.charDataLight:this.charDataNormal,l=(0,_.getCharIndex)(g,n),u=w.width*4,v=t.r,f=t.g,p=t.b,C=m.r-v,y=m.g-f,E=m.b-p,I=Math.max(s,i),T=w.data;let O=l*h*o,R=S*u+b*4;for(let M=0;M<c;M++){let N=R;for(let P=0;P<h;P++){const x=a[O++]/255*(s/255);T[N++]=v+C*x,T[N++]=f+y*x,T[N++]=p+E*x,T[N++]=I}R+=u}}blockRenderChar(w,b,S,g,m,s,t,i){const n=1*this.scale,r=2*this.scale,d=i?1:r;if(b+n>w.width||S+d>w.height){console.warn("bad render request outside image data");return}const h=w.width*4,o=.5*(m/255),c=s.r,a=s.g,l=s.b,u=g.r-c,v=g.g-a,f=g.b-l,p=c+u*o,C=a+v*o,y=l+f*o,E=Math.max(m,t),I=w.data;let T=S*h+b*4;for(let O=0;O<d;O++){let R=T;for(let M=0;M<n;M++)I[R++]=p,I[R++]=C,I[R++]=y,I[R++]=E;T+=h}}}e.MinimapCharRenderer=L}),define(J[466],ee([1,0,94]),function(j,e,_){"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},L=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,_.once)(()=>L("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,_.once)(()=>L("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(J[467],ee([1,0,465,260,466,163]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class w{static create(S,g){if(this.lastCreated&&S===this.lastCreated.scale&&g===this.lastFontFamily)return this.lastCreated;let m;return L.prebakedMiniMaps[S]?m=new _.MinimapCharRenderer(L.prebakedMiniMaps[S](),S):m=w.createFromSampleData(w.createSampleData(g).data,S),this.lastFontFamily=g,this.lastCreated=m,m}static createSampleData(S){const g=document.createElement("canvas"),m=g.getContext("2d");g.style.height="16px",g.height=16,g.width=96*10,g.style.width=96*10+"px",m.fillStyle="#ffffff",m.font=`bold 16px ${S}`,m.textBaseline="middle";let s=0;for(const t of k.allCharCodes)m.fillText(String.fromCharCode(t),s,16/2),s+=10;return m.getImageData(0,0,96*10,16)}static createFromSampleData(S,g){if(S.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const s=w._downsample(S,g);return new _.MinimapCharRenderer(s,g)}static _downsampleChar(S,g,m,s,t){const i=1*t,n=2*t;let r=s,d=0;for(let h=0;h<n;h++){const o=h/n*16,c=(h+1)/n*16;for(let a=0;a<i;a++){const l=a/i*10,u=(a+1)/i*10;let v=0,f=0;for(let C=o;C<c;C++){const y=g+Math.floor(C)*3840,E=1-(C-Math.floor(C));for(let I=l;I<u;I++){const T=1-(I-Math.floor(I)),O=y+Math.floor(I)*4,R=T*E;f+=R,v+=S[O]*S[O+3]/255*R}}const p=v/f;d=Math.max(d,p),m[r++]=(0,D.toUint8)(p)}}return d}static _downsample(S,g){const m=2*g*1*g,s=m*96,t=new Uint8ClampedArray(s);let i=0,n=0,r=0;for(let d=0;d<96;d++)r=Math.max(r,this._downsampleChar(S,n,t,i,g)),i+=m,n+=10*4;if(r>0){const d=255/r;for(let h=0;h<s;h++)t[h]*=d}return t}}e.MinimapCharRendererFactory=w}),define(J[117],ee([1,0,163]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class k{constructor(w){const b=(0,_.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 S=(0,_.toUint8)(b);w>=0&&w<256?this._asciiMap[w]=S:this._map.set(w,S)}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 L{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=L}),define(J[77],ee([1,0,9]),function(j,e,_){"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):_.isFullWidthCharacter(D)||_.isEmojiImprecise(D)?w+2:w+1}static visibleColumnFromColumn(D,w,b){const S=Math.min(w-1,D.length),g=D.substring(0,S),m=new _.GraphemeIterator(g);let s=0;for(;!m.eol();){const t=_.getNextCodePoint(g,S,m.offset);m.nextGraphemeLength(),s=this._nextVisibleColumn(t,s,b)}return s}static columnFromVisibleColumn(D,w,b){if(w<=0)return 1;const S=D.length,g=new _.GraphemeIterator(D);let m=0,s=1;for(;!g.eol();){const t=_.getNextCodePoint(D,S,g.offset);g.nextGraphemeLength();const i=this._nextVisibleColumn(t,m,b),n=g.offset+1;if(i>=w){const r=w-m;return i-w<r?n:s}m=i,s=n}return S+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[118],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countEOL=void 0;function _(k){let L=0,D=0,w=0,b=0;for(let S=0,g=k.length;S<g;S++){const m=k.charCodeAt(S);m===13?(L===0&&(D=S),L++,S+1<g&&k.charCodeAt(S+1)===10?(b|=2,S++):b|=3,w=S+1):m===10&&(b|=1,L===0&&(D=S),L++,w=S+1)}return L===0&&(D=k.length),[L,D,k.length-w,b]}e.countEOL=_}),define(J[194],ee([1,0,9,77]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeIndentation=void 0;function L(w,b,S){let g=0;for(let s=0;s<w.length;s++)w.charAt(s)==="\t"?g=k.CursorColumns.nextIndentTabStop(g,b):g++;let m="";if(!S){const s=Math.floor(g/b);g=g%b;for(let t=0;t<s;t++)m+="\t"}for(let s=0;s<g;s++)m+=" ";return m}function D(w,b,S){let g=_.firstNonWhitespaceIndex(w);return g===-1&&(g=w.length),L(w.substring(0,g),b,S)+w.substring(g)}e.normalizeIndentation=D}),define(J[119],ee([1,0,11]),function(j,e,_){"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 S=b;for(;S<w.length&&w[S].start<=D.endExclusive;)S++;if(b===S)w.splice(b,0,D);else{const g=Math.min(D.start,w[b].start),m=Math.max(D.endExclusive,w[S-1].endExclusive);w.splice(b,S-b,new k(g,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 _.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[12],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class _{constructor(L,D){this.lineNumber=L,this.column=D}with(L=this.lineNumber,D=this.column){return L===this.lineNumber&&D===this.column?this:new _(L,D)}delta(L=0,D=0){return this.with(this.lineNumber+L,this.column+D)}equals(L){return _.equals(this,L)}static equals(L,D){return!L&&!D?!0:!!L&&!!D&&L.lineNumber===D.lineNumber&&L.column===D.column}isBefore(L){return _.isBefore(this,L)}static isBefore(L,D){return L.lineNumber<D.lineNumber?!0:D.lineNumber<L.lineNumber?!1:L.column<D.column}isBeforeOrEqual(L){return _.isBeforeOrEqual(this,L)}static isBeforeOrEqual(L,D){return L.lineNumber<D.lineNumber?!0:D.lineNumber<L.lineNumber?!1:L.column<=D.column}static compare(L,D){const w=L.lineNumber|0,b=D.lineNumber|0;if(w===b){const S=L.column|0,g=D.column|0;return S-g}return w-b}clone(){return new _(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(L){return new _(L.lineNumber,L.column)}static isIPosition(L){return L&&typeof L.lineNumber=="number"&&typeof L.column=="number"}}e.Position=_}),define(J[261],ee([1,0,12]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class k{constructor(D){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=D}emitKeyDown(D){var w;(w=this.onKeyDown)===null||w===void 0||w.call(this,D)}emitKeyUp(D){var w;(w=this.onKeyUp)===null||w===void 0||w.call(this,D)}emitContextMenu(D){var w;(w=this.onContextMenu)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(D))}emitMouseMove(D){var w;(w=this.onMouseMove)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(D))}emitMouseLeave(D){var w;(w=this.onMouseLeave)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(D))}emitMouseDown(D){var w;(w=this.onMouseDown)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(D))}emitMouseUp(D){var w;(w=this.onMouseUp)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(D))}emitMouseDrag(D){var w;(w=this.onMouseDrag)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(D))}emitMouseDrop(D){var w;(w=this.onMouseDrop)===null||w===void 0||w.call(this,this._convertViewToModelMouseEvent(D))}emitMouseDropCanceled(){var D;(D=this.onMouseDropCanceled)===null||D===void 0||D.call(this)}emitMouseWheel(D){var w;(w=this.onMouseWheel)===null||w===void 0||w.call(this,D)}_convertViewToModelMouseEvent(D){return D.target?{event:D.event,target:this._convertViewToModelMouseTarget(D.target)}:D}_convertViewToModelMouseTarget(D){return k.convertViewToModelMouseTarget(D,this._coordinatesConverter)}static convertViewToModelMouseTarget(D,w){const b=Object.assign({},D);return b.position&&(b.position=w.convertViewPositionToModelPosition(b.position)),b.range&&(b.range=w.convertViewRangeToModelRange(b.range)),(b.type===5||b.type===8)&&(b.detail=this.convertViewToModelViewZoneData(b.detail,w)),b}static convertViewToModelViewZoneData(D,w){return{viewZoneId:D.viewZoneId,positionBefore:D.positionBefore?w.convertViewPositionToModelPosition(D.positionBefore):D.positionBefore,positionAfter:D.positionAfter?w.convertViewPositionToModelPosition(D.positionAfter):D.positionAfter,position:w.convertViewPositionToModelPosition(D.position),afterLineNumber:w.convertViewPositionToModelPosition(new _.Position(D.afterLineNumber,1)).lineNumber}}}e.ViewUserInputEvents=k}),define(J[5],ee([1,0,12]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class k{constructor(D,w,b,S){D>b||D===b&&w>S?(this.startLineNumber=b,this.startColumn=S,this.endLineNumber=D,this.endColumn=w):(this.startLineNumber=D,this.startColumn=w,this.endLineNumber=b,this.endColumn=S)}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,S,g,m;return w.startLineNumber<D.startLineNumber?(b=w.startLineNumber,S=w.startColumn):w.startLineNumber===D.startLineNumber?(b=w.startLineNumber,S=Math.min(w.startColumn,D.startColumn)):(b=D.startLineNumber,S=D.startColumn),w.endLineNumber>D.endLineNumber?(g=w.endLineNumber,m=w.endColumn):w.endLineNumber===D.endLineNumber?(g=w.endLineNumber,m=Math.max(w.endColumn,D.endColumn)):(g=D.endLineNumber,m=D.endColumn),new k(b,S,g,m)}intersectRanges(D){return k.intersectRanges(this,D)}static intersectRanges(D,w){let b=D.startLineNumber,S=D.startColumn,g=D.endLineNumber,m=D.endColumn;const s=w.startLineNumber,t=w.startColumn,i=w.endLineNumber,n=w.endColumn;return b<s?(b=s,S=t):b===s&&(S=Math.max(S,t)),g>i?(g=i,m=n):g===i&&(m=Math.min(m,n)),b>g||b===g&&S>m?null:new k(b,S,g,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 _.Position(D.endLineNumber,D.endColumn)}getStartPosition(){return k.getStartPosition(this)}static getStartPosition(D){return new _.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 g=D.startLineNumber|0,m=w.startLineNumber|0;if(g===m){const s=D.startColumn|0,t=w.startColumn|0;if(s===t){const i=D.endLineNumber|0,n=w.endLineNumber|0;if(i===n){const r=D.endColumn|0,d=w.endColumn|0;return r-d}return i-n}return s-t}return g-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[262],ee([1,0,9,5]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class L{constructor(b,S,g,m,s){this.value=b,this.selectionStart=S,this.selectionEnd=g,this.selection=m,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(b,S){const g=b.getValue(),m=b.getSelectionStart(),s=b.getSelectionEnd();let t;if(S){const i=g.substring(0,m),n=S.value.substring(0,S.selectionStart);i===n&&(t=S.newlineCountBeforeSelection)}return new L(g,m,s,null,t)}collapseSelection(){return this.selectionStart===this.value.length?this:new L(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(b,S,g){e._debugComposition&&console.log(`writeToTextArea ${b}: ${this.toString()}`),S.setValue(b,this.value),g&&S.setSelectionRange(b,this.selectionStart,this.selectionEnd)}deduceEditorPosition(b){var S,g,m,s,t,i,n,r;if(b<=this.selectionStart){const o=this.value.substring(b,this.selectionStart);return this._finishDeduceEditorPosition((g=(S=this.selection)===null||S===void 0?void 0:S.getStartPosition())!==null&&g!==void 0?g:null,o,-1)}if(b>=this.selectionEnd){const o=this.value.substring(this.selectionEnd,b);return this._finishDeduceEditorPosition((s=(m=this.selection)===null||m===void 0?void 0:m.getEndPosition())!==null&&s!==void 0?s:null,o,1)}const d=this.value.substring(this.selectionStart,b);if(d.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,d,1);const h=this.value.substring(b,this.selectionEnd);return this._finishDeduceEditorPosition((r=(n=this.selection)===null||n===void 0?void 0:n.getEndPosition())!==null&&r!==void 0?r:null,h,-1)}_finishDeduceEditorPosition(b,S,g){let m=0,s=-1;for(;(s=S.indexOf(`\n`,s+1))!==-1;)m++;return[b,g*S.length,m]}static deduceInput(b,S,g){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: ${S.toString()}`));const m=Math.min(_.commonPrefixLength(b.value,S.value),b.selectionStart,S.selectionStart),s=Math.min(_.commonSuffixLength(b.value,S.value),b.value.length-b.selectionEnd,S.value.length-S.selectionEnd),t=b.value.substring(m,b.value.length-s),i=S.value.substring(m,S.value.length-s),n=b.selectionStart-m,r=b.selectionEnd-m,d=S.selectionStart-m,h=S.selectionEnd-m;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${t}>, selectionStart: ${n}, selectionEnd: ${r}`),console.log(`AFTER DIFFING CURRENT STATE: <${i}>, selectionStart: ${d}, selectionEnd: ${h}`)),d===h){const c=b.selectionStart-m;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${c} chars`),{text:i,replacePrevCharCnt:c,replaceNextCharCnt:0,positionDelta:0}}const o=r-n;return{text:i,replacePrevCharCnt:o,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(b,S){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: ${S.toString()}`)),b.value===S.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:S.selectionEnd-b.selectionEnd};const g=Math.min(_.commonPrefixLength(b.value,S.value),b.selectionEnd),m=Math.min(_.commonSuffixLength(b.value,S.value),b.value.length-b.selectionEnd),s=b.value.substring(g,b.value.length-m),t=S.value.substring(g,S.value.length-m),i=b.selectionStart-g,n=b.selectionEnd-g,r=S.selectionStart-g,d=S.selectionEnd-g;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${s}>, selectionStart: ${i}, selectionEnd: ${n}`),console.log(`AFTER DIFFING CURRENT STATE: <${t}>, selectionStart: ${r}, selectionEnd: ${d}`)),{text:t,replacePrevCharCnt:n,replaceNextCharCnt:s.length-n,positionDelta:d-t.length}}}e.TextAreaState=L,L.EMPTY=new L("",0,0,null,void 0);class D{static _getPageOfLine(b,S){return Math.floor((b-1)/S)}static _getRangeForPage(b,S){const g=b*S,m=g+1,s=g+S;return new k.Range(m,1,s+1,1)}static fromEditorSelection(b,S,g,m){const t=D._getPageOfLine(S.startLineNumber,g),i=D._getRangeForPage(t,g),n=D._getPageOfLine(S.endLineNumber,g),r=D._getRangeForPage(n,g);let d=i.intersectRanges(new k.Range(1,1,S.startLineNumber,S.startColumn));if(m&&b.getValueLengthInRange(d,1)>500){const v=b.modifyPosition(d.getEndPosition(),-500);d=k.Range.fromPositions(v,d.getEndPosition())}const h=b.getValueInRange(d,1),o=b.getLineCount(),c=b.getLineMaxColumn(o);let a=r.intersectRanges(new k.Range(S.endLineNumber,S.endColumn,o,c));if(m&&b.getValueLengthInRange(a,1)>500){const v=b.modifyPosition(a.getStartPosition(),500);a=k.Range.fromPositions(a.getStartPosition(),v)}const l=b.getValueInRange(a,1);let u;if(t===n||t+1===n)u=b.getValueInRange(S,1);else{const v=i.intersectRanges(S),f=r.intersectRanges(S);u=b.getValueInRange(v,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 L(h+u+l,h.length,h.length+u.length,S,d.endLineNumber-d.startLineNumber)}}e.PagedScreenReaderStrategy=D}),define(J[65],ee([1,0,5]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class k{static insert(D,w){return{range:new _.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[468],ee([1,0,9,65,5]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class D{constructor(S,g){this._selection=S,this._cursors=g,this._selectionId=null}getEditOperations(S,g){const m=w(S,this._cursors);for(let s=0,t=m.length;s<t;s++){const i=m[s];g.addEditOperation(i.range,i.text)}this._selectionId=g.trackSelection(this._selection)}computeCursorState(S,g){return g.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=D;function w(b,S){S.sort((i,n)=>i.lineNumber===n.lineNumber?i.column-n.column:i.lineNumber-n.lineNumber);for(let i=S.length-2;i>=0;i--)S[i].lineNumber===S[i+1].lineNumber&&S.splice(i,1);const g=[];let m=0,s=0;const t=S.length;for(let i=1,n=b.getLineCount();i<=n;i++){const r=b.getLineContent(i),d=r.length+1;let h=0;if(s<t&&S[s].lineNumber===i&&(h=S[s].column,s++,h===d)||r.length===0)continue;const o=_.lastNonWhitespaceIndex(r);let c=0;if(o===-1)c=1;else if(o!==r.length-1)c=o+2;else continue;c=Math.max(h,c),g[m++]=k.EditOperation.delete(new L.Range(i,c,i,d))}return g}e.trimTrailingWhitespace=w}),define(J[87],ee([1,0,11,5]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=void 0;class L{static fromRange(w){return new L(w.startLineNumber,w.endLineNumber)}static joinMany(w){if(w.length===0)return[];let b=w[0];for(let S=1;S<w.length;S++)b=this.join(b,w[S]);return b}static join(w,b){if(w.length===0)return b;if(b.length===0)return w;const S=[];let g=0,m=0,s=null;for(;g<w.length||m<b.length;){let t=null;if(g<w.length&&m<b.length){const i=w[g],n=b[m];i.startLineNumber<n.startLineNumber?(t=i,g++):(t=n,m++)}else g<w.length?(t=w[g],g++):(t=b[m],m++);s===null?s=t:s.endLineNumberExclusive>=t.startLineNumber?s=new L(s.startLineNumber,Math.max(s.endLineNumberExclusive,t.endLineNumberExclusive)):(S.push(s),s=t)}return s!==null&&S.push(s),S}static ofLength(w,b){return new L(w,w+b)}constructor(w,b){if(w>b)throw new _.BugIndicatingError(`startLineNumber ${w} cannot be after endLineNumberExclusive ${b}`);this.startLineNumber=w,this.endLineNumberExclusive=b}contains(w){return this.startLineNumber<=w&&w<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(w){return new L(this.startLineNumber+w,this.endLineNumberExclusive+w)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(w){return new L(Math.min(this.startLineNumber,w.startLineNumber),Math.max(this.endLineNumberExclusive,w.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(w){const b=Math.max(this.startLineNumber,w.startLineNumber),S=Math.min(this.endLineNumberExclusive,w.endLineNumberExclusive);if(b<=S)return new L(b,S)}intersectsStrict(w){return this.startLineNumber<w.endLineNumberExclusive&&w.startLineNumber<this.endLineNumberExclusive}overlapOrTouch(w){return this.startLineNumber<=w.endLineNumberExclusive&&w.startLineNumber<=this.endLineNumberExclusive}equals(w){return this.startLineNumber===w.startLineNumber&&this.endLineNumberExclusive===w.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new k.Range(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new k.Range(this.startLineNumber,1,this.endLineNumberExclusive,1)}}e.LineRange=L}),define(J[263],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class _{constructor(L,D,w,b){this._rgba8Brand=void 0,this.r=_._clamp(L),this.g=_._clamp(D),this.b=_._clamp(w),this.a=_._clamp(b)}equals(L){return this.r===L.r&&this.g===L.g&&this.b===L.b&&this.a===L.a}static _clamp(L){return L<0?0:L>255?255:L|0}}e.RGBA8=_,_.Empty=new _(0,0,0,0)}),define(J[24],ee([1,0,12,5]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class L extends k.Range{constructor(w,b,S,g){super(w,b,S,g),this.selectionStartLineNumber=w,this.selectionStartColumn=b,this.positionLineNumber=S,this.positionColumn=g}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(w){return L.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 L(this.startLineNumber,this.startColumn,w,b):new L(w,b,this.startLineNumber,this.startColumn)}getPosition(){return new _.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new _.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(w,b){return this.getDirection()===0?new L(w,b,this.endLineNumber,this.endColumn):new L(this.endLineNumber,this.endColumn,w,b)}static fromPositions(w,b=w){return new L(w.lineNumber,w.column,b.lineNumber,b.column)}static fromRange(w,b){return b===0?new L(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn):new L(w.endLineNumber,w.endColumn,w.startLineNumber,w.startColumn)}static liftSelection(w){return new L(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 S=0,g=w.length;S<g;S++)if(!this.selectionsEqual(w[S],b[S]))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,S,g,m){return m===0?new L(w,b,S,g):new L(S,g,w,b)}}e.Selection=L}),define(J[120],ee([1,0,24]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class k{constructor(g,m,s=!1){this._range=g,this._text=m,this.insertsAutoWhitespace=s}getEditOperations(g,m){m.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,m){const t=m.getInverseEditOperations()[0].range;return _.Selection.fromPositions(t.getEndPosition())}}e.ReplaceCommand=k;class L{constructor(g,m){this._range=g,this._text=m}getEditOperations(g,m){m.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,m){const t=m.getInverseEditOperations()[0].range;return _.Selection.fromRange(t,0)}}e.ReplaceCommandThatSelectsText=L;class D{constructor(g,m,s=!1){this._range=g,this._text=m,this.insertsAutoWhitespace=s}getEditOperations(g,m){m.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,m){const t=m.getInverseEditOperations()[0].range;return _.Selection.fromPositions(t.getStartPosition())}}e.ReplaceCommandWithoutChangingPosition=D;class w{constructor(g,m,s,t,i=!1){this._range=g,this._text=m,this._columnDeltaOffset=t,this._lineNumberDeltaOffset=s,this.insertsAutoWhitespace=i}getEditOperations(g,m){m.addTrackedEditOperation(this._range,this._text)}computeCursorState(g,m){const t=m.getInverseEditOperations()[0].range;return _.Selection.fromPositions(t.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}e.ReplaceCommandWithOffsetCursorState=w;class b{constructor(g,m,s,t=!1){this._range=g,this._text=m,this._initialSelection=s,this._forceMoveMarkers=t,this._selectionId=null}getEditOperations(g,m){m.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=m.trackSelection(this._initialSelection)}computeCursorState(g,m){return m.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=b}),define(J[469],ee([1,0,5,24]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionSurroundSelectionCommand=e.SurroundSelectionCommand=void 0;class L{constructor(b,S,g){this._range=b,this._charBeforeSelection=S,this._charAfterSelection=g}getEditOperations(b,S){S.addTrackedEditOperation(new _.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),S.addTrackedEditOperation(new _.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(b,S){const g=S.getInverseEditOperations(),m=g[0].range,s=g[1].range;return new k.Selection(m.endLineNumber,m.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=L;class D{constructor(b,S,g){this._position=b,this._text=S,this._charAfter=g}getEditOperations(b,S){S.addTrackedEditOperation(new _.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(b,S){const m=S.getInverseEditOperations()[0].range;return new k.Selection(m.endLineNumber,m.startColumn,m.endLineNumber,m.endColumn-this._charAfter.length)}}e.CompositionSurroundSelectionCommand=D}),define(J[169],ee([1,0]),function(j,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[139],ee([1,0,117]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=void 0;class k extends _.CharacterClassifier{constructor(w){super(0);for(let b=0,S=w.length;b<S;b++)this.set(w.charCodeAt(b),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=k;function L(D){const w={};return b=>(w.hasOwnProperty(b)||(w[b]=D(b)),w[b])}e.getMapForWordSeparators=L(D=>new k(D))}),define(J[140],ee([1,0,53,59]),function(j,e,_,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 L(g=""){let m="(-?\\\\d*\\\\.\\\\d\\\\w*)|([^";for(const s of e.USUAL_WORD_SEPARATORS)g.indexOf(s)>=0||(m+="\\\\"+s);return m+="\\\\s]+)",new RegExp(m,"g")}e.DEFAULT_WORD_REGEXP=L();function D(g){let m=e.DEFAULT_WORD_REGEXP;if(g&&g instanceof RegExp)if(g.global)m=g;else{let s="g";g.ignoreCase&&(s+="i"),g.multiline&&(s+="m"),g.unicode&&(s+="u"),m=new RegExp(g.source,s)}return m.lastIndex=0,m}e.ensureValidWordDefinition=D;const w=new k.LinkedList;w.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function b(g,m,s,t,i){if(i||(i=_.Iterable.first(w)),s.length>i.maxLen){let o=g-i.maxLen/2;return o<0?o=0:t+=o,s=s.substring(o,g+i.maxLen/2),b(g,m,s,t,i)}const n=Date.now(),r=g-1-t;let d=-1,h=null;for(let o=1;!(Date.now()-n>=i.timeBudget);o++){const c=r-i.windowSize*o;m.lastIndex=Math.max(0,c);const a=S(m,s,r,d);if(!a&&h||(h=a,c<=0))break;d=c}if(h){const o={word:h[0],startColumn:t+1+h.index,endColumn:t+1+h.index+h[0].length};return m.lastIndex=0,o}return null}e.getWordAtText=b;function S(g,m,s,t){let i;for(;i=g.exec(m);){const n=i.index||0;if(n<=s&&g.lastIndex>=s)return i;if(t>0&&n>t)return null}return null}}),define(J[264],ee([1,0,77]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class k{static whitespaceVisibleColumn(D,w,b){const S=D.length;let g=0,m=-1,s=-1;for(let t=0;t<S;t++){if(t===w)return[m,s,g];switch(g%b===0&&(m=t,s=g),D.charCodeAt(t)){case 32:g+=1;break;case 9:g=_.CursorColumns.nextRenderTabStop(g,b);break;default:return[-1,-1,-1]}}return w===S?[m,s,g]:[-1,-1,-1]}static atomicPosition(D,w,b,S){const g=D.length,[m,s,t]=k.whitespaceVisibleColumn(D,w,b);if(t===-1)return-1;let i;switch(S){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 d=s;for(let h=m;h<g;++h){if(d===s+b)return m;switch(D.charCodeAt(h)){case 32:d+=1;break;case 9:d=_.CursorColumns.nextRenderTabStop(d,b);break;default:return-1}}return d===s+b?m:-1}const n=_.CursorColumns.nextRenderTabStop(t,b);let r=t;for(let d=w;d<g;d++){if(r===n)return d;switch(D.charCodeAt(d)){case 32:r+=1;break;case 9:r=_.CursorColumns.nextRenderTabStop(r,b);break;default:return-1}}return r===n?g:-1}}e.AtomicTabMoveOperations=k}),define(J[470],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorContext=void 0;class _{constructor(L,D,w,b){this._cursorContextBrand=void 0,this.model=L,this.viewModel=D,this.coordinatesConverter=w,this.cursorConfig=b}}e.CursorContext=_}),define(J[170],ee([1,0,11,119]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DateTimeout=e.InfiniteTimeout=e.SequenceDiff=e.DiffAlgorithmResult=void 0;class L{static trivial(g,m){return new L([new D(new k.OffsetRange(0,g.length),new k.OffsetRange(0,m.length))],!1)}static trivialTimedOut(g,m){return new L([new D(new k.OffsetRange(0,g.length),new k.OffsetRange(0,m.length))],!0)}constructor(g,m){this.diffs=g,this.hitTimeout=m}}e.DiffAlgorithmResult=L;class D{constructor(g,m){this.seq1Range=g,this.seq2Range=m}reverse(){return new D(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(g){return new D(this.seq1Range.join(g.seq1Range),this.seq2Range.join(g.seq2Range))}}e.SequenceDiff=D;class w{isValid(){return!0}}e.InfiniteTimeout=w,w.instance=new w;class b{constructor(g){if(this.timeout=g,this.startTime=Date.now(),this.valid=!0,g<=0)throw new _.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[471],ee([1,0,119,170]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shiftSequenceDiffs=e.joinSequenceDiffs=e.smoothenSequenceDiffs=e.optimizeSequenceDiffs=void 0;function L(g,m,s){let t=s;return t=w(g,m,t),t=b(g,m,t),t}e.optimizeSequenceDiffs=L;function D(g,m,s){const t=[];for(const i of s){const n=t[t.length-1];if(!n){t.push(i);continue}i.seq1Range.start-n.seq1Range.endExclusive<=2||i.seq2Range.start-n.seq2Range.endExclusive<=2?t[t.length-1]=new k.SequenceDiff(n.seq1Range.join(i.seq1Range),n.seq2Range.join(i.seq2Range)):t.push(i)}return t}e.smoothenSequenceDiffs=D;function w(g,m,s){const t=[];s.length>0&&t.push(s[0]);for(let i=1;i<s.length;i++){const n=t[t.length-1],r=s[i];if(r.seq1Range.isEmpty){let d=!0;const h=r.seq1Range.start-n.seq1Range.endExclusive;for(let o=1;o<=h;o++)if(m.getElement(r.seq2Range.start-o)!==m.getElement(r.seq2Range.endExclusive-o)){d=!1;break}if(d){t[t.length-1]=new k.SequenceDiff(n.seq1Range,new _.OffsetRange(n.seq2Range.start,r.seq2Range.endExclusive-h));continue}}t.push(r)}return t}e.joinSequenceDiffs=w;function b(g,m,s){if(!g.getBoundaryScore||!m.getBoundaryScore)return s;for(let t=0;t<s.length;t++){const i=s[t];if(i.seq1Range.isEmpty){const n=t>0?s[t-1].seq2Range.endExclusive:-1,r=t+1<s.length?s[t+1].seq2Range.start:m.length;s[t]=S(i,g,m,r,n)}else if(i.seq2Range.isEmpty){const n=t>0?s[t-1].seq1Range.endExclusive:-1,r=t+1<s.length?s[t+1].seq1Range.start:g.length;s[t]=S(i.reverse(),m,g,r,n).reverse()}}return s}e.shiftSequenceDiffs=b;function S(g,m,s,t,i){let r=1;for(;g.seq2Range.start-r>i&&s.getElement(g.seq2Range.start-r)===s.getElement(g.seq2Range.endExclusive-r)&&r<20;)r++;r--;let d=0;for(;g.seq2Range.start+d<t&&s.getElement(g.seq2Range.start+d)===s.getElement(g.seq2Range.endExclusive+d)&&d<20;)d++;if(r===0&&d===0)return g;let h=0,o=-1;for(let c=-r;c<=d;c++){const a=g.seq2Range.start+c,l=g.seq2Range.endExclusive+c,u=g.seq1Range.start+c,v=m.getBoundaryScore(u)+s.getBoundaryScore(a)+s.getBoundaryScore(l);v>o&&(o=v,h=c)}return h!==0?new k.SequenceDiff(g.seq1Range.delta(h),g.seq2Range.delta(h)):g}}),define(J[472],ee([1,0,119,170]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MyersDiffAlgorithm=void 0;class L{compute(g,m,s=k.InfiniteTimeout.instance){if(g.length===0||m.length===0)return k.DiffAlgorithmResult.trivial(g,m);function t(l,u){for(;l<g.length&&u<m.length&&g.getElement(l)===m.getElement(u);)l++,u++;return l}let i=0;const n=new w;n.set(0,t(0,0));const r=new b;r.set(0,n.get(0)===0?null:new D(null,0,0,n.get(0)));let d=0;e:for(;;)for(i++,d=-i;d<=i;d+=2){if(!s.isValid())return k.DiffAlgorithmResult.trivialTimedOut(g,m);const l=d===i?-1:n.get(d+1),u=d===-i?-1:n.get(d-1)+1,v=Math.min(Math.max(l,u),g.length),f=v-d,p=t(v,f);n.set(d,p);const C=v===l?r.get(d+1):r.get(d-1);if(r.set(d,p!==v?new D(C,v,f,p-v):C),n.get(d)===g.length&&n.get(d)-d===m.length)break e}let h=r.get(d);const o=[];let c=g.length,a=m.length;for(;;){const l=h?h.x+h.length:0,u=h?h.y+h.length:0;if((l!==c||u!==a)&&o.push(new k.SequenceDiff(new _.OffsetRange(l,c),new _.OffsetRange(u,a))),!h)break;c=h.x,a=h.y,h=h.prev}return o.reverse(),new k.DiffAlgorithmResult(o,!1)}}e.MyersDiffAlgorithm=L;class D{constructor(g,m,s,t){this.prev=g,this.x=m,this.y=s,this.length=t}}class w{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(g){return g<0?(g=-g-1,this.negativeArr[g]):this.positiveArr[g]}set(g,m){if(g<0){if(g=-g-1,g>=this.negativeArr.length){const s=this.negativeArr;this.negativeArr=new Int32Array(s.length*2),this.negativeArr.set(s)}this.negativeArr[g]=m}else{if(g>=this.positiveArr.length){const s=this.positiveArr;this.positiveArr=new Int32Array(s.length*2),this.positiveArr.set(s)}this.positiveArr[g]=m}}}class b{constructor(){this.positiveArr=[],this.negativeArr=[]}get(g){return g<0?(g=-g-1,this.negativeArr[g]):this.positiveArr[g]}set(g,m){g<0?(g=-g-1,this.negativeArr[g]=m):this.positiveArr[g]=m}}}),define(J[473],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Array2D=void 0;class _{constructor(L,D){this.width=L,this.height=D,this.array=[],this.array=new Array(L*D)}get(L,D){return this.array[L+D*this.width]}set(L,D,w){this.array[L+D*this.width]=w}}e.Array2D=_}),define(J[474],ee([1,0,119,170,473]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicProgrammingDiffing=void 0;class D{compute(b,S,g=k.InfiniteTimeout.instance,m){if(b.length===0||S.length===0)return k.DiffAlgorithmResult.trivial(b,S);const s=new L.Array2D(b.length,S.length),t=new L.Array2D(b.length,S.length),i=new L.Array2D(b.length,S.length);for(let a=0;a<b.length;a++)for(let l=0;l<S.length;l++){if(!g.isValid())return k.DiffAlgorithmResult.trivialTimedOut(b,S);const u=a===0?0:s.get(a-1,l),v=l===0?0:s.get(a,l-1);let f;b.getElement(a)===S.getElement(l)?(a===0||l===0?f=0:f=s.get(a-1,l-1),a>0&&l>0&&t.get(a-1,l-1)===3&&(f+=i.get(a-1,l-1)),f+=m?m(a,l):1):f=-1;const p=Math.max(u,v,f);if(p===f){const C=a>0&&l>0?i.get(a-1,l-1):0;i.set(a,l,C+1),t.set(a,l,3)}else p===u?(i.set(a,l,0),t.set(a,l,1)):p===v&&(i.set(a,l,0),t.set(a,l,2));s.set(a,l,p)}const n=[];let r=b.length,d=S.length;function h(a,l){(a+1!==r||l+1!==d)&&n.push(new k.SequenceDiff(new _.OffsetRange(a+1,r),new _.OffsetRange(l+1,d))),r=a,d=l}let o=b.length-1,c=S.length-1;for(;o>=0&&c>=0;)t.get(o,c)===3?(h(o,c),o--,c--):t.get(o,c)===1?o--:c--;return h(-1,-1),n.reverse(),new k.DiffAlgorithmResult(n,!1)}}e.DynamicProgrammingDiffing=D}),define(J[141],ee([1,0,87]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMapping=e.LineRangeMapping=e.LinesDiff=void 0;class k{constructor(b,S){this.changes=b,this.hitTimeout=S}}e.LinesDiff=k;class L{static inverse(b,S,g){const m=[];let s=1,t=1;for(const n of b){const r=new L(new _.LineRange(s,n.originalRange.startLineNumber),new _.LineRange(t,n.modifiedRange.startLineNumber),void 0);r.modifiedRange.isEmpty||m.push(r),s=n.originalRange.endLineNumberExclusive,t=n.modifiedRange.endLineNumberExclusive}const i=new L(new _.LineRange(s,S+1),new _.LineRange(t,g+1),void 0);return i.modifiedRange.isEmpty||m.push(i),m}constructor(b,S,g){this.originalRange=b,this.modifiedRange=S,this.innerChanges=g}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}get changedLineCount(){return Math.max(this.originalRange.length,this.modifiedRange.length)}}e.LineRangeMapping=L;class D{constructor(b,S){this.originalRange=b,this.modifiedRange=S}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}e.RangeMapping=D}),define(J[475],ee([1,0,162,141,9,5,81,87]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=e.SmartLinesDiffComputer=void 0;const S=3;class g{computeDiff(l,u,v){var f;const C=new d(l,u,{maxComputationTime:v.maxComputationTimeMs,shouldIgnoreTrimWhitespace:v.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),y=[];let E=null;for(const I of C.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 O;I.modifiedEndLineNumber===0?O=new b.LineRange(I.modifiedStartLineNumber+1,I.modifiedStartLineNumber+1):O=new b.LineRange(I.modifiedStartLineNumber,I.modifiedEndLineNumber+1);let R=new k.LineRangeMapping(T,O,(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),y.pop()),y.push(R),E=R}return(0,w.assertFn)(()=>(0,w.checkAdjacentItems)(y,(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(y,C.quitEarly)}}e.SmartLinesDiffComputer=g;function m(a,l,u,v){return new _.LcsDiff(a,l,u).ComputeDiff(v)}class s{constructor(l){const u=[],v=[];for(let f=0,p=l.length;f<p;f++)u[f]=h(l[f],1),v[f]=o(l[f],1);this.lines=l,this._startColumns=u,this._endColumns=v}getElements(){const l=[];for(let u=0,v=this.lines.length;u<v;u++)l[u]=this.lines[u].substring(this._startColumns[u]-1,this._endColumns[u]-1);return l}getStrictElement(l){return this.lines[l]}getStartLineNumber(l){return l+1}getEndLineNumber(l){return l+1}createCharSequence(l,u,v){const f=[],p=[],C=[];let y=0;for(let E=u;E<=v;E++){const I=this.lines[E],T=l?this._startColumns[E]:1,O=l?this._endColumns[E]:I.length+1;for(let R=T;R<O;R++)f[y]=I.charCodeAt(R-1),p[y]=E+1,C[y]=R,y++;!l&&E<v&&(f[y]=10,p[y]=E+1,C[y]=I.length+1,y++)}return new t(f,p,C)}}class t{constructor(l,u,v){this._charCodes=l,this._lineNumbers=u,this._columns=v}toString(){return"["+this._charCodes.map((l,u)=>(l===10?"\\\\n":String.fromCharCode(l))+`-(${this._lineNumbers[u]},${this._columns[u]})`).join(", ")+"]"}_assertIndex(l,u){if(l<0||l>=u.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(l){return l>0&&l===this._lineNumbers.length?this.getEndLineNumber(l-1):(this._assertIndex(l,this._lineNumbers),this._lineNumbers[l])}getEndLineNumber(l){return l===-1?this.getStartLineNumber(l+1):(this._assertIndex(l,this._lineNumbers),this._charCodes[l]===10?this._lineNumbers[l]+1:this._lineNumbers[l])}getStartColumn(l){return l>0&&l===this._columns.length?this.getEndColumn(l-1):(this._assertIndex(l,this._columns),this._columns[l])}getEndColumn(l){return l===-1?this.getStartColumn(l+1):(this._assertIndex(l,this._columns),this._charCodes[l]===10?1:this._columns[l]+1)}}class i{constructor(l,u,v,f,p,C,y,E){this.originalStartLineNumber=l,this.originalStartColumn=u,this.originalEndLineNumber=v,this.originalEndColumn=f,this.modifiedStartLineNumber=p,this.modifiedStartColumn=C,this.modifiedEndLineNumber=y,this.modifiedEndColumn=E}static createFromDiffChange(l,u,v){const f=u.getStartLineNumber(l.originalStart),p=u.getStartColumn(l.originalStart),C=u.getEndLineNumber(l.originalStart+l.originalLength-1),y=u.getEndColumn(l.originalStart+l.originalLength-1),E=v.getStartLineNumber(l.modifiedStart),I=v.getStartColumn(l.modifiedStart),T=v.getEndLineNumber(l.modifiedStart+l.modifiedLength-1),O=v.getEndColumn(l.modifiedStart+l.modifiedLength-1);return new i(f,p,C,y,E,I,T,O)}}function n(a){if(a.length<=1)return a;const l=[a[0]];let u=l[0];for(let v=1,f=a.length;v<f;v++){const p=a[v],C=p.originalStart-(u.originalStart+u.originalLength),y=p.modifiedStart-(u.modifiedStart+u.modifiedLength);Math.min(C,y)<S?(u.originalLength=p.originalStart+p.originalLength-u.originalStart,u.modifiedLength=p.modifiedStart+p.modifiedLength-u.modifiedStart):(l.push(p),u=p)}return l}class r{constructor(l,u,v,f,p){this.originalStartLineNumber=l,this.originalEndLineNumber=u,this.modifiedStartLineNumber=v,this.modifiedEndLineNumber=f,this.charChanges=p}static createFromDiffResult(l,u,v,f,p,C,y){let E,I,T,O,R;if(u.originalLength===0?(E=v.getStartLineNumber(u.originalStart)-1,I=0):(E=v.getStartLineNumber(u.originalStart),I=v.getEndLineNumber(u.originalStart+u.originalLength-1)),u.modifiedLength===0?(T=f.getStartLineNumber(u.modifiedStart)-1,O=0):(T=f.getStartLineNumber(u.modifiedStart),O=f.getEndLineNumber(u.modifiedStart+u.modifiedLength-1)),C&&u.originalLength>0&&u.originalLength<20&&u.modifiedLength>0&&u.modifiedLength<20&&p()){const M=v.createCharSequence(l,u.originalStart,u.originalStart+u.originalLength-1),N=f.createCharSequence(l,u.modifiedStart,u.modifiedStart+u.modifiedLength-1);if(M.getElements().length>0&&N.getElements().length>0){let P=m(M,N,p,!0).changes;y&&(P=n(P)),R=[];for(let x=0,F=P.length;x<F;x++)R.push(i.createFromDiffChange(P[x],M,N))}}return new r(E,I,T,O,R)}}class d{constructor(l,u,v){this.shouldComputeCharChanges=v.shouldComputeCharChanges,this.shouldPostProcessCharChanges=v.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=v.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=v.shouldMakePrettyDiff,this.originalLines=l,this.modifiedLines=u,this.original=new s(l),this.modified=new s(u),this.continueLineDiff=c(v.maxComputationTime),this.continueCharDiff=c(v.maxComputationTime===0?0:Math.min(v.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 l=m(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),u=l.changes,v=l.quitEarly;if(this.shouldIgnoreTrimWhitespace){const y=[];for(let E=0,I=u.length;E<I;E++)y.push(r.createFromDiffResult(this.shouldIgnoreTrimWhitespace,u[E],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:v,changes:y}}const f=[];let p=0,C=0;for(let y=-1,E=u.length;y<E;y++){const I=y+1<E?u[y+1]:null,T=I?I.originalStart:this.originalLines.length,O=I?I.modifiedStart:this.modifiedLines.length;for(;p<T&&C<O;){const R=this.originalLines[p],M=this.modifiedLines[C];if(R!==M){{let N=h(R,1),P=h(M,1);for(;N>1&&P>1;){const x=R.charCodeAt(N-2),F=M.charCodeAt(P-2);if(x!==F)break;N--,P--}(N>1||P>1)&&this._pushTrimWhitespaceCharChange(f,p+1,1,N,C+1,1,P)}{let N=o(R,1),P=o(M,1);const x=R.length+1,F=M.length+1;for(;N<x&&P<F;){const B=R.charCodeAt(N-1),V=R.charCodeAt(P-1);if(B!==V)break;N++,P++}(N<x||P<F)&&this._pushTrimWhitespaceCharChange(f,p+1,N,x,C+1,P,F)}}p++,C++}I&&(f.push(r.createFromDiffResult(this.shouldIgnoreTrimWhitespace,I,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),p+=I.originalLength,C+=I.modifiedLength)}return{quitEarly:v,changes:f}}_pushTrimWhitespaceCharChange(l,u,v,f,p,C,y){if(this._mergeTrimWhitespaceCharChange(l,u,v,f,p,C,y))return;let E;this.shouldComputeCharChanges&&(E=[new i(u,v,u,f,p,C,p,y)]),l.push(new r(u,u,p,p,E))}_mergeTrimWhitespaceCharChange(l,u,v,f,p,C,y){const E=l.length;if(E===0)return!1;const I=l[E-1];return I.originalEndLineNumber===0||I.modifiedEndLineNumber===0?!1:I.originalEndLineNumber===u&&I.modifiedEndLineNumber===p?(this.shouldComputeCharChanges&&I.charChanges&&I.charChanges.push(new i(u,v,u,f,p,C,p,y)),!0):I.originalEndLineNumber+1===u&&I.modifiedEndLineNumber+1===p?(I.originalEndLineNumber=u,I.modifiedEndLineNumber=p,this.shouldComputeCharChanges&&I.charChanges&&I.charChanges.push(new i(u,v,u,f,p,C,p,y)),!0):!1}}e.DiffComputer=d;function h(a,l){const u=L.firstNonWhitespaceIndex(a);return u===-1?l:u+1}function o(a,l){const u=L.lastNonWhitespaceIndex(a);return u===-1?l:u+2}function c(a){if(a===0)return()=>!0;const l=Date.now();return()=>Date.now()-l<a}}),define(J[476],ee([1,0,81,87,119,12,5,170,474,471,472,141]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineSequence=e.getLineRangeMapping=e.lineRangeMappingFromRangeMappings=e.StandardLinesDiffComputer=void 0;class t{constructor(){this.dynamicProgrammingDiffing=new S.DynamicProgrammingDiffing,this.myersDiffingAlgorithm=new m.MyersDiffAlgorithm}computeDiff(y,E,I){const T=I.maxComputationTimeMs===0?b.InfiniteTimeout.instance:new b.DateTimeout(I.maxComputationTimeMs),O=!I.ignoreTrimWhitespace,R=new Map;function M(se){let H=R.get(se);return H===void 0&&(H=R.size,R.set(se,H)),H}const N=y.map(se=>M(se.trim())),P=E.map(se=>M(se.trim())),x=new o(N,y),F=new o(P,E),B=(()=>x.length+F.length<1500?this.dynamicProgrammingDiffing.compute(x,F,T,(se,H)=>y[se]===E[H]?E[H].length===0?.1:1+Math.log(1+E[H].length):.99):this.myersDiffingAlgorithm.compute(x,F))();let V=B.diffs,K=B.hitTimeout;V=(0,g.optimizeSequenceDiffs)(x,F,V);const A=[],Y=se=>{if(O)for(let H=0;H<se;H++){const W=ie+H,$=le+H;if(y[W]!==E[$]){const Z=this.refineDiff(y,E,new b.SequenceDiff(new L.OffsetRange(W,W+1),new L.OffsetRange($,$+1)),T,O);for(const Q of Z.mappings)A.push(Q);Z.hitTimeout&&(K=!0)}}};let ie=0,le=0;for(const se of V){(0,_.assertFn)(()=>se.seq1Range.start-ie===se.seq2Range.start-le);const H=se.seq1Range.start-ie;Y(H),ie=se.seq1Range.endExclusive,le=se.seq2Range.endExclusive;const W=this.refineDiff(y,E,se,T,O);W.hitTimeout&&(K=!0);for(const $ of W.mappings)A.push($)}Y(y.length-ie);const ne=r(A,y,E);return new s.LinesDiff(ne,K)}refineDiff(y,E,I,T,O){const R=new a(y,I.seq1Range,O),M=new a(E,I.seq2Range,O),N=R.length+M.length<500?this.dynamicProgrammingDiffing.compute(R,M,T):this.myersDiffingAlgorithm.compute(R,M,T);let P=N.diffs;return P=(0,g.optimizeSequenceDiffs)(R,M,P),P=i(R,M,P),P=(0,g.smoothenSequenceDiffs)(R,M,P),{mappings:P.map(F=>new s.RangeMapping(R.translateRange(F.seq1Range),M.translateRange(F.seq2Range))),hitTimeout:N.hitTimeout}}}e.StandardLinesDiffComputer=t;function i(C,y,E){const I=[];let T;function O(){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(V,K){var A,Y,ie,le;if(!T||!T.s1Range.containsRange(V)||!T.s2Range.containsRange(K))if(T&&!(T.s1Range.endExclusive<V.start&&T.s2Range.endExclusive<K.start)){const H=L.OffsetRange.tryCreate(T.s1Range.endExclusive,V.start),W=L.OffsetRange.tryCreate(T.s2Range.endExclusive,K.start);T.deleted+=(A=H?.length)!==null&&A!==void 0?A:0,T.added+=(Y=W?.length)!==null&&Y!==void 0?Y:0,T.s1Range=T.s1Range.join(V),T.s2Range=T.s2Range.join(K)}else O(),T={added:0,deleted:0,count:0,s1Range:V,s2Range:K};const ne=V.intersect(M.seq1Range),se=K.intersect(M.seq2Range);T.count++,T.deleted+=(ie=ne?.length)!==null&&ie!==void 0?ie:0,T.added+=(le=se?.length)!==null&&le!==void 0?le:0};const P=C.findWordContaining(M.seq1Range.start-1),x=y.findWordContaining(M.seq2Range.start-1),F=C.findWordContaining(M.seq1Range.endExclusive),B=y.findWordContaining(M.seq2Range.endExclusive);P&&F&&x&&B&&P.equals(F)&&x.equals(B)?N(P,x):(P&&x&&N(P,x),F&&B&&N(F,B))}return O(),n(E,I)}function n(C,y){const E=[];for(;C.length>0||y.length>0;){const I=C[0],T=y[0];let O;I&&(!T||I.seq1Range.start<T.seq1Range.start)?O=C.shift():O=y.shift(),E.length>0&&E[E.length-1].seq1Range.endExclusive>=O.seq1Range.start?E[E.length-1]=E[E.length-1].join(O):E.push(O)}return E}function r(C,y,E){const I=[];for(const T of h(C.map(O=>d(O,y,E)),(O,R)=>O.originalRange.overlapOrTouch(R.originalRange)||O.modifiedRange.overlapOrTouch(R.modifiedRange))){const O=T[0],R=T[T.length-1];I.push(new s.LineRangeMapping(O.originalRange.join(R.originalRange),O.modifiedRange.join(R.modifiedRange),T.map(M=>M.innerChanges[0])))}return(0,_.assertFn)(()=>(0,_.checkAdjacentItems)(I,(T,O)=>O.originalRange.startLineNumber-T.originalRange.endLineNumberExclusive===O.modifiedRange.startLineNumber-T.modifiedRange.endLineNumberExclusive&&T.originalRange.endLineNumberExclusive<O.originalRange.startLineNumber&&T.modifiedRange.endLineNumberExclusive<O.modifiedRange.startLineNumber)),I}e.lineRangeMappingFromRangeMappings=r;function d(C,y,E){let I=0,T=0;C.modifiedRange.startColumn-1>=E[C.modifiedRange.startLineNumber-1].length&&C.originalRange.startColumn-1>=y[C.originalRange.startLineNumber-1].length&&(I=1),C.modifiedRange.endColumn===1&&C.originalRange.endColumn===1&&C.originalRange.startLineNumber+I<=C.originalRange.endLineNumber&&C.modifiedRange.startLineNumber+I<=C.modifiedRange.endLineNumber&&(T=-1);const O=new k.LineRange(C.originalRange.startLineNumber+I,C.originalRange.endLineNumber+1+T),R=new k.LineRange(C.modifiedRange.startLineNumber+I,C.modifiedRange.endLineNumber+1+T);return new s.LineRangeMapping(O,R,[C])}e.getLineRangeMapping=d;function*h(C,y){let E,I;for(const T of C)I!==void 0&&y(I,T)?E.push(T):(E&&(yield E),E=[T]),I=T;E&&(yield E)}class o{constructor(y,E){this.trimmedHash=y,this.lines=E}getElement(y){return this.trimmedHash[y]}get length(){return this.trimmedHash.length}getBoundaryScore(y){const E=y===0?0:c(this.lines[y-1]),I=y===this.lines.length?0:c(this.lines[y]);return 1e3-(E+I)}}e.LineSequence=o;function c(C){let y=0;for(;y<C.length&&(C.charCodeAt(y)===32||C.charCodeAt(y)===9);)y++;return y}class a{constructor(y,E,I){this.lines=y,this.considerWhitespaceChanges=I,this.elements=[],this.firstCharOffsetByLineMinusOne=[],this.offsetByLine=[];let T=!1;E.start>0&&E.endExclusive>=y.length&&(E=new L.OffsetRange(E.start-1,E.endExclusive),T=!0),this.lineRange=E;for(let O=this.lineRange.start;O<this.lineRange.endExclusive;O++){let R=y[O],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));O<y.length-1&&(this.elements.push(`\n`.charCodeAt(0)),this.firstCharOffsetByLineMinusOne[O-this.lineRange.start]=this.elements.length)}this.offsetByLine.push(0)}toString(){return`Slice: "${this.text}"`}get text(){return[...this.elements].map(y=>String.fromCharCode(y)).join("")}getElement(y){return this.elements[y]}get length(){return this.elements.length}getBoundaryScore(y){const E=f(y>0?this.elements[y-1]:-1),I=f(y<this.elements.length?this.elements[y]:-1);if(E===6&&I===7)return 0;let T=0;return E!==I&&(T+=10,I===1&&(T+=1)),T+=v(E),T+=v(I),T}translateOffset(y){if(this.lineRange.isEmpty)return new D.Position(this.lineRange.start+1,1);let E=0,I=this.firstCharOffsetByLineMinusOne.length;for(;E<I;){const O=Math.floor((E+I)/2);this.firstCharOffsetByLineMinusOne[O]>y?I=O:E=O+1}const T=E===0?0:this.firstCharOffsetByLineMinusOne[E-1];return new D.Position(this.lineRange.start+E+1,y-T+1+this.offsetByLine[E])}translateRange(y){return w.Range.fromPositions(this.translateOffset(y.start),this.translateOffset(y.endExclusive))}findWordContaining(y){if(y<0||y>=this.elements.length||!l(this.elements[y]))return;let E=y;for(;E>0&&l(this.elements[E-1]);)E--;let I=y;for(;I<this.elements.length&&l(this.elements[I]);)I++;return new L.OffsetRange(E,I)}}function l(C){return C>=97&&C<=122||C>=65&&C<=90||C>=48&&C<=57}const u={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:3,[6]:10,[7]:10};function v(C){return u[C]}function f(C){return C===10?7:C===13?6:p(C)?5:C>=97&&C<=122?0:C>=65&&C<=90?1:C>=48&&C<=57?2:C===-1?3:4}function p(C){return C===32||C===9}}),define(J[477],ee([1,0,475,476]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linesDiffComputers=void 0,e.linesDiffComputers={legacy:new _.SmartLinesDiffComputer,advanced:new k.StandardLinesDiffComputer}}),define(J[265],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class _{constructor(L,D,w,b,S,g){this.id=L,this.label=D,this.alias=w,this._precondition=b,this._run=S,this._contextKeyService=g}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(L){return this.isSupported()?this._run(L):Promise.resolve(void 0)}}e.InternalEditorAction=_}),define(J[171],ee([1,0]),function(j,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[172],ee([1,0,171]),function(j,e,_){"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()===_.EditorType.ICodeEditor:!1}e.isCodeEditor=k;function L(b){return b&&typeof b.getEditorType=="function"?b.getEditorType()===_.EditorType.IDiffEditor:!1}e.isDiffEditor=L;function D(b){return!!b&&typeof b=="object"&&typeof b.onDidChangeActiveEditor=="function"}e.isCompositeEditor=D;function w(b){return k(b)?b:L(b)?b.getModifiedEditor():D(b)&&k(b.activeCodeEditor)?b.activeCodeEditor:null}e.getCodeEditor=w}),define(J[142],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditorFeatures=e.registerEditorFeature=void 0;const _=[];function k(D){_.push(D)}e.registerEditorFeature=k;function L(){return _.slice(0)}e.getEditorFeatures=L}),define(J[478],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTheme=void 0;class _{get type(){return this._theme.type}get value(){return this._theme}constructor(L){this._theme=L}update(L){this._theme=L}getColor(L){return this._theme.getColor(L)}}e.EditorTheme=_}),define(J[121],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMetadata=void 0;class _{static getLanguageId(L){return(L&255)>>>0}static getTokenType(L){return(L&768)>>>8}static containsBalancedBrackets(L){return(L&1024)!==0}static getFontStyle(L){return(L&30720)>>>11}static getForeground(L){return(L&16744448)>>>15}static getBackground(L){return(L&4278190080)>>>24}static getClassNameFromMetadata(L){let w="mtk"+this.getForeground(L);const b=this.getFontStyle(L);return b&1&&(w+=" mtki"),b&2&&(w+=" mtkb"),b&4&&(w+=" mtku"),b&8&&(w+=" mtks"),w}static getInlineStyleFromMetadata(L,D){const w=this.getForeground(L),b=this.getFontStyle(L);let S=`color: ${D[w]};`;b&1&&(S+="font-style: italic;"),b&2&&(S+="font-weight: bold;");let g="";return b&4&&(g+=" underline"),b&8&&(g+=" line-through"),g&&(S+=`text-decoration:${g};`),S}static getPresentationFromMetadata(L){const D=this.getForeground(L),w=this.getFontStyle(L);return{foreground:D,italic:!!(w&1),bold:!!(w&2),underline:!!(w&4),strikethrough:!!(w&8)}}}e.TokenMetadata=_}),define(J[479],ee([1,0,36]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeDefaultDocumentColors=void 0;function k(t){const i=[];for(const n of t){const r=Number(n);(r||r===0&&n.replace(/\\s/g,"")!=="")&&i.push(r)}return i}function L(t,i,n,r){return{red:t/255,blue:n/255,green:i/255,alpha:r}}function D(t,i){const n=i.index,r=i[0].length;if(!n)return;const d=t.positionAt(n);return{startLineNumber:d.lineNumber,startColumn:d.column,endLineNumber:d.lineNumber,endColumn:d.column+r}}function w(t,i){if(!t)return;const n=_.Color.Format.CSS.parseHex(i);if(n)return{range:t,color:L(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function b(t,i,n){if(!t||i.length!==1)return;const d=i[0].values(),h=k(d);return{range:t,color:L(h[0],h[1],h[2],n?h[3]:1)}}function S(t,i,n){if(!t||i.length!==1)return;const d=i[0].values(),h=k(d),o=new _.Color(new _.HSLA(h[0],h[1]/100,h[2]/100,n?h[3]:1));return{range:t,color:L(o.rgba.r,o.rgba.g,o.rgba.b,o.rgba.a)}}function g(t,i){return typeof t=="string"?[...t.matchAll(i)]:t.findMatches(i)}function m(t){const i=[],r=g(t,/\\b(rgb|rgba|hsl|hsla)(\\([0-9\\s,.\\%]*\\))|(#)([A-Fa-f0-9]{6})\\b|(#)([A-Fa-f0-9]{8})\\b/gm);if(r.length>0)for(const d of r){const h=d.filter(l=>l!==void 0),o=h[1],c=h[2];if(!c)continue;let a;if(o==="rgb"){const l=/^\\(\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*\\)$/gm;a=b(D(t,d),g(c,l),!1)}else if(o==="rgba"){const l=/^\\(\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\\s*,\\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\\s*\\)$/gm;a=b(D(t,d),g(c,l),!0)}else if(o==="hsl"){const l=/^\\(\\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\\s*,\\s*(100|\\d{1,2}[.]\\d*|\\d{1,2})%\\s*,\\s*(100|\\d{1,2}[.]\\d*|\\d{1,2})%\\s*\\)$/gm;a=S(D(t,d),g(c,l),!1)}else if(o==="hsla"){const l=/^\\(\\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\\s*,\\s*(100|\\d{1,2}[.]\\d*|\\d{1,2})%\\s*,\\s*(100|\\d{1,2}[.]\\d*|\\d{1,2})%\\s*,\\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\\s*\\)$/gm;a=S(D(t,d),g(c,l),!0)}else o==="#"&&(a=w(D(t,d),o+c));a&&i.push(a)}return i}function s(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:m(t)}e.computeDefaultDocumentColors=s}),define(J[105],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var _;(function(w){w[w.None=0]="None",w[w.Indent=1]="Indent",w[w.IndentOutdent=2]="IndentOutdent",w[w.Outdent=3]="Outdent"})(_||(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 S=0,g=b.notIn.length;S<g;S++)switch(b.notIn[S]){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,S){if(b.getTokenCount()===0)return!0;const g=b.findTokenIndexAtOffset(S-2),m=b.getStandardTokenType(g);return this.isOK(m)}_findNeutralCharacterInRange(b,S){for(let g=b;g<=S;g++){const m=String.fromCharCode(g);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 L{constructor(b){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const S of b)D(this.autoClosingPairsOpenByStart,S.open.charAt(0),S),D(this.autoClosingPairsOpenByEnd,S.open.charAt(S.open.length-1),S),D(this.autoClosingPairsCloseByStart,S.close.charAt(0),S),D(this.autoClosingPairsCloseByEnd,S.close.charAt(S.close.length-1),S),S.close.length===1&&S.open.length===1&&D(this.autoClosingPairsCloseSingleChar,S.close,S)}}e.AutoClosingPairs=L;function D(w,b,S){w.has(b)?w.get(b).push(S):w.set(b,[S])}}),define(J[480],ee([1,0,117]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=void 0;class k{constructor(t,i,n){const r=new Uint8Array(t*i);for(let d=0,h=t*i;d<h;d++)r[d]=n;this._data=r,this.rows=t,this.cols=i}get(t,i){return this._data[t*this.cols+i]}set(t,i,n){this._data[t*this.cols+i]=n}}class L{constructor(t){let i=0,n=0;for(let d=0,h=t.length;d<h;d++){const[o,c,a]=t[d];c>i&&(i=c),o>n&&(n=o),a>n&&(n=a)}i++,n++;const r=new k(n,i,0);for(let d=0,h=t.length;d<h;d++){const[o,c,a]=t[d];r.set(o,c,a)}this._states=r,this._maxCharCode=i}nextState(t,i){return i<0||i>=this._maxCharCode?0:this._states.get(t,i)}}e.StateMachine=L;let D=null;function w(){return D===null&&(D=new L([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),D}let b=null;function S(){if(b===null){b=new _.CharacterClassifier(0);const s=` \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<s.length;i++)b.set(s.charCodeAt(i),1);const t=".,;:";for(let i=0;i<t.length;i++)b.set(t.charCodeAt(i),2)}return b}class g{static _createLink(t,i,n,r,d){let h=d-1;do{const o=i.charCodeAt(h);if(t.get(o)!==2)break;h--}while(h>r);if(r>0){const o=i.charCodeAt(r-1),c=i.charCodeAt(h);(o===40&&c===41||o===91&&c===93||o===123&&c===125)&&h--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:h+2},url:i.substring(r,h+1)}}static computeLinks(t,i=w()){const n=S(),r=[];for(let d=1,h=t.getLineCount();d<=h;d++){const o=t.getLineContent(d),c=o.length;let a=0,l=0,u=0,v=1,f=!1,p=!1,C=!1,y=!1;for(;a<c;){let E=!1;const I=o.charCodeAt(a);if(v===13){let T;switch(I){case 40:f=!0,T=0;break;case 41:T=f?0:1;break;case 91:C=!0,p=!0,T=0;break;case 93:C=!1,T=p?0:1;break;case 123:y=!0,T=0;break;case 125:T=y?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=C?0:1;break;default:T=n.get(I)}T===1&&(r.push(g._createLink(n,o,d,l,a)),E=!0)}else if(v===12){let T;I===91?(p=!0,T=0):T=n.get(I),T===1?E=!0:v=13}else v=i.nextState(v,I),v===0&&(E=!0);E&&(v=1,f=!1,p=!1,y=!1,l=a+1,u=I),a++}v===13&&r.push(g._createLink(n,o,d,l,c))}return r}}e.LinkComputer=g;function m(s){return!s||typeof s.getLineCount!="function"||typeof s.getLineContent!="function"?[]:g.computeLinks(s)}e.computeLinks=m}),define(J[122],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function _(D,w){const b=D.getCount(),S=D.findTokenIndexAtOffset(w),g=D.getLanguageId(S);let m=S;for(;m+1<b&&D.getLanguageId(m+1)===g;)m++;let s=S;for(;s>0&&D.getLanguageId(s-1)===g;)s--;return new k(D,g,s,m+1,D.getStartOffset(s),D.getEndOffset(m))}e.createScopedLineTokens=_;class k{constructor(w,b,S,g,m,s){this._scopedLineTokensBrand=void 0,this._actual=w,this.languageId=b,this._firstTokenIndex=S,this._lastTokenIndex=g,this.firstCharOffset=m,this._lastCharOffset=s}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 L(D){return(D&3)!==0}e.ignoreBracketsInToken=L}),define(J[66],ee([1,0,12,5,24,122,77,194]),function(j,e,_,k,L,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 S=()=>!0,g=()=>!1,m=o=>o===" "||o==="\t";class s{static shouldRecreate(c){return c.hasChanged(140)||c.hasChanged(126)||c.hasChanged(35)||c.hasChanged(74)||c.hasChanged(76)||c.hasChanged(77)||c.hasChanged(5)||c.hasChanged(9)||c.hasChanged(7)||c.hasChanged(8)||c.hasChanged(12)||c.hasChanged(124)||c.hasChanged(48)||c.hasChanged(88)}constructor(c,a,l,u){this.languageConfigurationService=u,this._cursorMoveConfigurationBrand=void 0,this._languageId=c;const v=l.options,f=v.get(140),p=v.get(48);this.readOnly=v.get(88),this.tabSize=a.tabSize,this.indentSize=a.indentSize,this.insertSpaces=a.insertSpaces,this.stickyTabStops=v.get(112),this.lineHeight=p.lineHeight,this.typicalHalfwidthCharacterWidth=p.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(f.height/this.lineHeight)-2),this.useTabStops=v.get(124),this.wordSeparators=v.get(126),this.emptySelectionClipboard=v.get(35),this.copyWithSyntaxHighlighting=v.get(23),this.multiCursorMergeOverlapping=v.get(74),this.multiCursorPaste=v.get(76),this.multiCursorLimit=v.get(77),this.autoClosingBrackets=v.get(5),this.autoClosingQuotes=v.get(9),this.autoClosingDelete=v.get(7),this.autoClosingOvertype=v.get(8),this.autoSurround=v.get(12),this.autoIndent=v.get(10),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(c,this.autoClosingQuotes,!0),bracket:this._getShouldAutoClose(c,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(c).getAutoClosingPairs();const C=this.languageConfigurationService.getLanguageConfiguration(c).getSurroundingPairs();if(C)for(const y of C)this.surroundingPairs[y.open]=y.close}get electricChars(){var c;if(!this._electricChars){this._electricChars={};const a=(c=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||c===void 0?void 0:c.getElectricCharacters();if(a)for(const l of a)this._electricChars[l]=!0}return this._electricChars}onElectricCharacter(c,a,l){const u=(0,D.createScopedLineTokens)(a,l-1),v=this.languageConfigurationService.getLanguageConfiguration(u.languageId).electricCharacter;return v?v.onElectricCharacter(c,u,l-u.firstCharOffset):null}normalizeIndentation(c){return(0,b.normalizeIndentation)(c,this.indentSize,this.insertSpaces)}_getShouldAutoClose(c,a,l){switch(a){case"beforeWhitespace":return m;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(c,l);case"always":return S;case"never":return g}}_getLanguageDefinedShouldAutoClose(c,a){const l=this.languageConfigurationService.getLanguageConfiguration(c).getAutoCloseBeforeSet(a);return u=>l.indexOf(u)!==-1}visibleColumnFromColumn(c,a){return w.CursorColumns.visibleColumnFromColumn(c.getLineContent(a.lineNumber),a.column,this.tabSize)}columnFromVisibleColumn(c,a,l){const u=w.CursorColumns.columnFromVisibleColumn(c.getLineContent(a),l,this.tabSize),v=c.getLineMinColumn(a);if(u<v)return v;const f=c.getLineMaxColumn(a);return u>f?f:u}}e.CursorConfiguration=s;class t{static fromModelState(c){return new i(c)}static fromViewState(c){return new n(c)}static fromModelSelection(c){const a=L.Selection.liftSelection(c),l=new r(k.Range.fromPositions(a.getSelectionStart()),0,0,a.getPosition(),0);return t.fromModelState(l)}static fromModelSelections(c){const a=[];for(let l=0,u=c.length;l<u;l++)a[l]=this.fromModelSelection(c[l]);return a}constructor(c,a){this._cursorStateBrand=void 0,this.modelState=c,this.viewState=a}equals(c){return this.viewState.equals(c.viewState)&&this.modelState.equals(c.modelState)}}e.CursorState=t;class i{constructor(c){this.modelState=c,this.viewState=null}}e.PartialModelCursorState=i;class n{constructor(c){this.modelState=null,this.viewState=c}}e.PartialViewCursorState=n;class r{constructor(c,a,l,u,v){this.selectionStart=c,this.selectionStartKind=a,this.selectionStartLeftoverVisibleColumns=l,this.position=u,this.leftoverVisibleColumns=v,this._singleCursorStateBrand=void 0,this.selection=r._computeSelection(this.selectionStart,this.position)}equals(c){return this.selectionStartLeftoverVisibleColumns===c.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===c.leftoverVisibleColumns&&this.selectionStartKind===c.selectionStartKind&&this.position.equals(c.position)&&this.selectionStart.equalsRange(c.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(c,a,l,u){return c?new r(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new _.Position(a,l),u):new r(new k.Range(a,l,a,l),0,u,new _.Position(a,l),u)}static _computeSelection(c,a){return c.isEmpty()||!a.isBeforeOrEqual(c.getStartPosition())?L.Selection.fromPositions(c.getStartPosition(),a):L.Selection.fromPositions(c.getEndPosition(),a)}}e.SingleCursorState=r;class d{constructor(c,a,l){this._editOperationResultBrand=void 0,this.type=c,this.commands=a,this.shouldPushStackElementBefore=l.shouldPushStackElementBefore,this.shouldPushStackElementAfter=l.shouldPushStackElementAfter}}e.EditOperationResult=d;function h(o){return o==="\'"||o===\'"\'||o==="`"}e.isQuote=h}),define(J[481],ee([1,0,66,12,5]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class D{static columnSelect(b,S,g,m,s,t){const i=Math.abs(s-g)+1,n=g>s,r=m>t,d=m<t,h=[];for(let o=0;o<i;o++){const c=g+(n?-o:o),a=b.columnFromVisibleColumn(S,c,m),l=b.columnFromVisibleColumn(S,c,t),u=b.visibleColumnFromColumn(S,new k.Position(c,a)),v=b.visibleColumnFromColumn(S,new k.Position(c,l));d&&(u>t||v<m)||r&&(v>m||u<t)||h.push(new _.SingleCursorState(new L.Range(c,a,c,a),0,0,new k.Position(c,l),0))}if(h.length===0)for(let o=0;o<i;o++){const c=g+(n?-o:o),a=S.getLineMaxColumn(c);h.push(new _.SingleCursorState(new L.Range(c,a,c,a),0,0,new k.Position(c,a),0))}return{viewStates:h,reversed:n,fromLineNumber:g,fromVisualColumn:m,toLineNumber:s,toVisualColumn:t}}static columnSelectLeft(b,S,g){let m=g.toViewVisualColumn;return m>0&&m--,D.columnSelect(b,S,g.fromViewLineNumber,g.fromViewVisualColumn,g.toViewLineNumber,m)}static columnSelectRight(b,S,g){let m=0;const s=Math.min(g.fromViewLineNumber,g.toViewLineNumber),t=Math.max(g.fromViewLineNumber,g.toViewLineNumber);for(let n=s;n<=t;n++){const r=S.getLineMaxColumn(n),d=b.visibleColumnFromColumn(S,new k.Position(n,r));m=Math.max(m,d)}let i=g.toViewVisualColumn;return i<m&&i++,this.columnSelect(b,S,g.fromViewLineNumber,g.fromViewVisualColumn,g.toViewLineNumber,i)}static columnSelectUp(b,S,g,m){const s=m?b.pageSize:1,t=Math.max(1,g.toViewLineNumber-s);return this.columnSelect(b,S,g.fromViewLineNumber,g.fromViewVisualColumn,t,g.toViewVisualColumn)}static columnSelectDown(b,S,g,m){const s=m?b.pageSize:1,t=Math.min(S.getLineCount(),g.toViewLineNumber+s);return this.columnSelect(b,S,g.fromViewLineNumber,g.fromViewVisualColumn,t,g.toViewVisualColumn)}}e.ColumnSelection=D}),define(J[195],ee([1,0,66,77,12,5,9,264]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class S{constructor(s,t,i){this._cursorPositionBrand=void 0,this.lineNumber=s,this.column=t,this.leftoverVisibleColumns=i}}e.CursorPosition=S;class g{static leftPosition(s,t){if(t.column>s.getLineMinColumn(t.lineNumber))return t.delta(void 0,-w.prevCharLength(s.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new L.Position(i,s.getLineMaxColumn(i))}else return t}static leftPositionAtomicSoftTabs(s,t,i){if(t.column<=s.getLineIndentColumn(t.lineNumber)){const n=s.getLineMinColumn(t.lineNumber),r=s.getLineContent(t.lineNumber),d=b.AtomicTabMoveOperations.atomicPosition(r,t.column-1,i,0);if(d!==-1&&d+1>=n)return new L.Position(t.lineNumber,d+1)}return this.leftPosition(s,t)}static left(s,t,i){const n=s.stickyTabStops?g.leftPositionAtomicSoftTabs(t,i,s.tabSize):g.leftPosition(t,i);return new S(n.lineNumber,n.column,0)}static moveLeft(s,t,i,n,r){let d,h;if(i.hasSelection()&&!n)d=i.selection.startLineNumber,h=i.selection.startColumn;else{const o=i.position.delta(void 0,-(r-1)),c=t.normalizePosition(g.clipPositionColumn(o,t),0),a=g.left(s,t,c);d=a.lineNumber,h=a.column}return i.move(n,d,h,0)}static clipPositionColumn(s,t){return new L.Position(s.lineNumber,g.clipRange(s.column,t.getLineMinColumn(s.lineNumber),t.getLineMaxColumn(s.lineNumber)))}static clipRange(s,t,i){return s<t?t:s>i?i:s}static rightPosition(s,t,i){return i<s.getLineMaxColumn(t)?i=i+w.nextCharLength(s.getLineContent(t),i-1):t<s.getLineCount()&&(t=t+1,i=s.getLineMinColumn(t)),new L.Position(t,i)}static rightPositionAtomicSoftTabs(s,t,i,n,r){if(i<s.getLineIndentColumn(t)){const d=s.getLineContent(t),h=b.AtomicTabMoveOperations.atomicPosition(d,i-1,n,1);if(h!==-1)return new L.Position(t,h+1)}return this.rightPosition(s,t,i)}static right(s,t,i){const n=s.stickyTabStops?g.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,s.tabSize,s.indentSize):g.rightPosition(t,i.lineNumber,i.column);return new S(n.lineNumber,n.column,0)}static moveRight(s,t,i,n,r){let d,h;if(i.hasSelection()&&!n)d=i.selection.endLineNumber,h=i.selection.endColumn;else{const o=i.position.delta(void 0,r-1),c=t.normalizePosition(g.clipPositionColumn(o,t),1),a=g.right(s,t,c);d=a.lineNumber,h=a.column}return i.move(n,d,h,0)}static vertical(s,t,i,n,r,d,h,o){const c=k.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),n,s.tabSize)+r,a=t.getLineCount(),l=i===1&&n===1,u=i===a&&n===t.getLineMaxColumn(i),v=d<i?l:u;if(i=d,i<1?(i=1,h?n=t.getLineMinColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):i>a?(i=a,h?n=t.getLineMaxColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):n=s.columnFromVisibleColumn(t,i,c),v?r=0:r=c-k.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),n,s.tabSize),o!==void 0){const f=new L.Position(i,n),p=t.normalizePosition(f,o);r=r+(n-p.column),i=p.lineNumber,n=p.column}return new S(i,n,r)}static down(s,t,i,n,r,d,h){return this.vertical(s,t,i,n,r,i+d,h,4)}static moveDown(s,t,i,n,r){let d,h;i.hasSelection()&&!n?(d=i.selection.endLineNumber,h=i.selection.endColumn):(d=i.position.lineNumber,h=i.position.column);const o=g.down(s,t,d,h,i.leftoverVisibleColumns,r,!0);return i.move(n,o.lineNumber,o.column,o.leftoverVisibleColumns)}static translateDown(s,t,i){const n=i.selection,r=g.down(s,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),d=g.down(s,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new _.SingleCursorState(new D.Range(r.lineNumber,r.column,r.lineNumber,r.column),0,r.leftoverVisibleColumns,new L.Position(d.lineNumber,d.column),d.leftoverVisibleColumns)}static up(s,t,i,n,r,d,h){return this.vertical(s,t,i,n,r,i-d,h,3)}static moveUp(s,t,i,n,r){let d,h;i.hasSelection()&&!n?(d=i.selection.startLineNumber,h=i.selection.startColumn):(d=i.position.lineNumber,h=i.position.column);const o=g.up(s,t,d,h,i.leftoverVisibleColumns,r,!0);return i.move(n,o.lineNumber,o.column,o.leftoverVisibleColumns)}static translateUp(s,t,i){const n=i.selection,r=g.up(s,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),d=g.up(s,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new _.SingleCursorState(new D.Range(r.lineNumber,r.column,r.lineNumber,r.column),0,r.leftoverVisibleColumns,new L.Position(d.lineNumber,d.column),d.leftoverVisibleColumns)}static _isBlankLine(s,t){return s.getLineFirstNonWhitespaceColumn(t)===0}static moveToPrevBlankLine(s,t,i,n){let r=i.position.lineNumber;for(;r>1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return i.move(n,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(s,t,i,n){const r=t.getLineCount();let d=i.position.lineNumber;for(;d<r&&this._isBlankLine(t,d);)d++;for(;d<r&&!this._isBlankLine(t,d);)d++;return i.move(n,d,t.getLineMinColumn(d),0)}static moveToBeginningOfLine(s,t,i,n){const r=i.position.lineNumber,d=t.getLineMinColumn(r),h=t.getLineFirstNonWhitespaceColumn(r)||d;let o;return i.position.column===h?o=d:o=h,i.move(n,r,o,0)}static moveToEndOfLine(s,t,i,n,r){const d=i.position.lineNumber,h=t.getLineMaxColumn(d);return i.move(n,d,h,r?1073741824-h:0)}static moveToBeginningOfBuffer(s,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(s,t,i,n){const r=t.getLineCount(),d=t.getLineMaxColumn(r);return i.move(n,r,d,0)}}e.MoveOperations=g}),define(J[196],ee([1,0,9,120,66,77,195,5,12]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class g{static deleteRight(s,t,i,n){const r=[];let d=s!==3;for(let h=0,o=n.length;h<o;h++){const c=n[h];let a=c;if(a.isEmpty()){const l=c.getPosition(),u=w.MoveOperations.right(t,i,l);a=new b.Range(u.lineNumber,u.column,l.lineNumber,l.column)}if(a.isEmpty()){r[h]=null;continue}a.startLineNumber!==a.endLineNumber&&(d=!0),r[h]=new k.ReplaceCommand(a,"")}return[d,r]}static isAutoClosingPairDelete(s,t,i,n,r,d,h){if(t==="never"&&i==="never"||s==="never")return!1;for(let o=0,c=d.length;o<c;o++){const a=d[o],l=a.getPosition();if(!a.isEmpty())return!1;const u=r.getLineContent(l.lineNumber);if(l.column<2||l.column>=u.length+1)return!1;const v=u.charAt(l.column-2),f=n.get(v);if(!f)return!1;if((0,L.isQuote)(v)){if(i==="never")return!1}else if(t==="never")return!1;const p=u.charAt(l.column-1);let C=!1;for(const y of f)y.open===v&&y.close===p&&(C=!0);if(!C)return!1;if(s==="auto"){let y=!1;for(let E=0,I=h.length;E<I;E++){const T=h[E];if(l.lineNumber===T.startLineNumber&&l.column===T.startColumn){y=!0;break}}if(!y)return!1}}return!0}static _runAutoClosingPairDelete(s,t,i){const n=[];for(let r=0,d=i.length;r<d;r++){const h=i[r].getPosition(),o=new b.Range(h.lineNumber,h.column-1,h.lineNumber,h.column+1);n[r]=new k.ReplaceCommand(o,"")}return[!0,n]}static deleteLeft(s,t,i,n,r){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,r))return this._runAutoClosingPairDelete(t,i,n);const d=[];let h=s!==2;for(let o=0,c=n.length;o<c;o++){const a=g.getDeleteRange(n[o],i,t);if(a.isEmpty()){d[o]=null;continue}a.startLineNumber!==a.endLineNumber&&(h=!0),d[o]=new k.ReplaceCommand(a,"")}return[h,d]}static getDeleteRange(s,t,i){if(!s.isEmpty())return s;const n=s.getPosition();if(i.useTabStops&&n.column>1){const r=t.getLineContent(n.lineNumber),d=_.firstNonWhitespaceIndex(r),h=d===-1?r.length+1:d+1;if(n.column<=h){const o=i.visibleColumnFromColumn(t,n),c=D.CursorColumns.prevIndentTabStop(o,i.indentSize),a=i.columnFromVisibleColumn(t,n.lineNumber,c);return new b.Range(n.lineNumber,a,n.lineNumber,n.column)}}return b.Range.fromPositions(g.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(s,t){if(s.column>1){const i=_.getLeftDeleteOffset(s.column-1,t.getLineContent(s.lineNumber));return s.with(void 0,i+1)}else if(s.lineNumber>1){const i=s.lineNumber-1;return new S.Position(i,t.getLineMaxColumn(i))}else return s}static cut(s,t,i){const n=[];let r=null;i.sort((d,h)=>S.Position.compare(d.getStartPosition(),h.getEndPosition()));for(let d=0,h=i.length;d<h;d++){const o=i[d];if(o.isEmpty())if(s.emptySelectionClipboard){const c=o.getPosition();let a,l,u,v;c.lineNumber<t.getLineCount()?(a=c.lineNumber,l=1,u=c.lineNumber+1,v=1):c.lineNumber>1&&r?.endLineNumber!==c.lineNumber?(a=c.lineNumber-1,l=t.getLineMaxColumn(c.lineNumber-1),u=c.lineNumber,v=t.getLineMaxColumn(c.lineNumber)):(a=c.lineNumber,l=1,u=c.lineNumber,v=t.getLineMaxColumn(c.lineNumber));const f=new b.Range(a,l,u,v);r=f,f.isEmpty()?n[d]=null:n[d]=new k.ReplaceCommand(f,"")}else n[d]=null;else n[d]=new k.ReplaceCommand(o,"")}return new L.EditOperationResult(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=g}),define(J[173],ee([1,0,9,66,196,139,12,5]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class S{static _createWord(t,i,n,r,d){return{start:r,end:d,wordType:i,nextCharClass:n}}static _findPreviousWordOnLine(t,i,n){const r=i.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(r,t,n)}static _doFindPreviousWordOnLine(t,i,n){let r=0;for(let d=n.column-2;d>=0;d--){const h=t.charCodeAt(d),o=i.get(h);if(o===0){if(r===2)return this._createWord(t,r,o,d+1,this._findEndOfWord(t,i,r,d+1));r=1}else if(o===2){if(r===1)return this._createWord(t,r,o,d+1,this._findEndOfWord(t,i,r,d+1));r=2}else if(o===1&&r!==0)return this._createWord(t,r,o,d+1,this._findEndOfWord(t,i,r,d+1))}return r!==0?this._createWord(t,r,1,0,this._findEndOfWord(t,i,r,0)):null}static _findEndOfWord(t,i,n,r){const d=t.length;for(let h=r;h<d;h++){const o=t.charCodeAt(h),c=i.get(o);if(c===1||n===1&&c===2||n===2&&c===0)return h}return d}static _findNextWordOnLine(t,i,n){const r=i.getLineContent(n.lineNumber);return this._doFindNextWordOnLine(r,t,n)}static _doFindNextWordOnLine(t,i,n){let r=0;const d=t.length;for(let h=n.column-1;h<d;h++){const o=t.charCodeAt(h),c=i.get(o);if(c===0){if(r===2)return this._createWord(t,r,c,this._findStartOfWord(t,i,r,h-1),h);r=1}else if(c===2){if(r===1)return this._createWord(t,r,c,this._findStartOfWord(t,i,r,h-1),h);r=2}else if(c===1&&r!==0)return this._createWord(t,r,c,this._findStartOfWord(t,i,r,h-1),h)}return r!==0?this._createWord(t,r,1,this._findStartOfWord(t,i,r,d-1),d):null}static _findStartOfWord(t,i,n,r){for(let d=r;d>=0;d--){const h=t.charCodeAt(d),o=i.get(h);if(o===1||n===1&&o===2||n===2&&o===0)return d+1}return 0}static moveWordLeft(t,i,n,r){let d=n.lineNumber,h=n.column;h===1&&d>1&&(d=d-1,h=i.getLineMaxColumn(d));let o=S._findPreviousWordOnLine(t,i,new w.Position(d,h));if(r===0)return new w.Position(d,o?o.start+1:1);if(r===1)return o&&o.wordType===2&&o.end-o.start===1&&o.nextCharClass===0&&(o=S._findPreviousWordOnLine(t,i,new w.Position(d,o.start+1))),new w.Position(d,o?o.start+1:1);if(r===3){for(;o&&o.wordType===2;)o=S._findPreviousWordOnLine(t,i,new w.Position(d,o.start+1));return new w.Position(d,o?o.start+1:1)}return o&&h<=o.end+1&&(o=S._findPreviousWordOnLine(t,i,new w.Position(d,o.start+1))),new w.Position(d,o?o.end+1:1)}static _moveWordPartLeft(t,i){const n=i.lineNumber,r=t.getLineMaxColumn(n);if(i.column===1)return n>1?new w.Position(n-1,t.getLineMaxColumn(n-1)):i;const d=t.getLineContent(n);for(let h=i.column-1;h>1;h--){const o=d.charCodeAt(h-2),c=d.charCodeAt(h-1);if(o===95&&c!==95)return new w.Position(n,h);if(o===45&&c!==45)return new w.Position(n,h);if((_.isLowerAsciiLetter(o)||_.isAsciiDigit(o))&&_.isUpperAsciiLetter(c))return new w.Position(n,h);if(_.isUpperAsciiLetter(o)&&_.isUpperAsciiLetter(c)&&h+1<r){const a=d.charCodeAt(h);if(_.isLowerAsciiLetter(a)||_.isAsciiDigit(a))return new w.Position(n,h)}}return new w.Position(n,1)}static moveWordRight(t,i,n,r){let d=n.lineNumber,h=n.column,o=!1;h===i.getLineMaxColumn(d)&&d<i.getLineCount()&&(o=!0,d=d+1,h=1);let c=S._findNextWordOnLine(t,i,new w.Position(d,h));if(r===2)c&&c.wordType===2&&c.end-c.start===1&&c.nextCharClass===0&&(c=S._findNextWordOnLine(t,i,new w.Position(d,c.end+1))),c?h=c.end+1:h=i.getLineMaxColumn(d);else if(r===3){for(o&&(h=0);c&&(c.wordType===2||c.start+1<=h);)c=S._findNextWordOnLine(t,i,new w.Position(d,c.end+1));c?h=c.start+1:h=i.getLineMaxColumn(d)}else c&&!o&&h>=c.start+1&&(c=S._findNextWordOnLine(t,i,new w.Position(d,c.end+1))),c?h=c.start+1:h=i.getLineMaxColumn(d);return new w.Position(d,h)}static _moveWordPartRight(t,i){const n=i.lineNumber,r=t.getLineMaxColumn(n);if(i.column===r)return n<t.getLineCount()?new w.Position(n+1,1):i;const d=t.getLineContent(n);for(let h=i.column+1;h<r;h++){const o=d.charCodeAt(h-2),c=d.charCodeAt(h-1);if(o!==95&&c===95)return new w.Position(n,h);if(o!==45&&c===45)return new w.Position(n,h);if((_.isLowerAsciiLetter(o)||_.isAsciiDigit(o))&&_.isUpperAsciiLetter(c))return new w.Position(n,h);if(_.isUpperAsciiLetter(o)&&_.isUpperAsciiLetter(c)&&h+1<r){const a=d.charCodeAt(h);if(_.isLowerAsciiLetter(a)||_.isAsciiDigit(a))return new w.Position(n,h)}}return new w.Position(n,r)}static _deleteWordLeftWhitespace(t,i){const n=t.getLineContent(i.lineNumber),r=i.column-2,d=_.lastNonWhitespaceIndex(n,r);return d+1<r?new b.Range(i.lineNumber,d+2,i.lineNumber,i.column):null}static deleteWordLeft(t,i){const n=t.wordSeparators,r=t.model,d=t.selection,h=t.whitespaceHeuristics;if(!d.isEmpty())return d;if(L.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(d.positionLineNumber,d.positionColumn);let c=o.lineNumber,a=o.column;if(c===1&&a===1)return null;if(h){const u=this._deleteWordLeftWhitespace(r,o);if(u)return u}let l=S._findPreviousWordOnLine(n,r,o);return i===0?l?a=l.start+1:a>1?a=1:(c--,a=r.getLineMaxColumn(c)):(l&&a<=l.end+1&&(l=S._findPreviousWordOnLine(n,r,new w.Position(c,l.start+1))),l?a=l.end+1:a>1?a=1:(c--,a=r.getLineMaxColumn(c))),new b.Range(c,a,o.lineNumber,o.column)}static deleteInsideWord(t,i,n){if(!n.isEmpty())return n;const r=new w.Position(n.positionLineNumber,n.positionColumn),d=this._deleteInsideWordWhitespace(i,r);return d||this._deleteInsideWordDetermineDeleteRange(t,i,r)}static _charAtIsWhitespace(t,i){const n=t.charCodeAt(i);return n===32||n===9}static _deleteInsideWordWhitespace(t,i){const n=t.getLineContent(i.lineNumber),r=n.length;if(r===0)return null;let d=Math.max(i.column-2,0);if(!this._charAtIsWhitespace(n,d))return null;let h=Math.min(i.column-1,r-1);if(!this._charAtIsWhitespace(n,h))return null;for(;d>0&&this._charAtIsWhitespace(n,d-1);)d--;for(;h+1<r&&this._charAtIsWhitespace(n,h+1);)h++;return new b.Range(i.lineNumber,d+1,i.lineNumber,h+2)}static _deleteInsideWordDetermineDeleteRange(t,i,n){const r=i.getLineContent(n.lineNumber),d=r.length;if(d===0)return n.lineNumber>1?new b.Range(n.lineNumber-1,i.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumber<i.getLineCount()?new b.Range(n.lineNumber,1,n.lineNumber+1,1):new b.Range(n.lineNumber,1,n.lineNumber,1);const h=u=>u.start+1<=n.column&&n.column<=u.end+1,o=(u,v)=>(u=Math.min(u,n.column),v=Math.max(v,n.column),new b.Range(n.lineNumber,u,n.lineNumber,v)),c=u=>{let v=u.start+1,f=u.end+1,p=!1;for(;f-1<d&&this._charAtIsWhitespace(r,f-1);)p=!0,f++;if(!p)for(;v>1&&this._charAtIsWhitespace(r,v-2);)v--;return o(v,f)},a=S._findPreviousWordOnLine(t,i,n);if(a&&h(a))return c(a);const l=S._findNextWordOnLine(t,i,n);return l&&h(l)?c(l):a&&l?o(a.end+1,l.start+1):a?o(a.start+1,a.end+1):l?o(l.start+1,l.end+1):o(1,d+1)}static _deleteWordPartLeft(t,i){if(!i.isEmpty())return i;const n=i.getPosition(),r=S._moveWordPartLeft(t,n);return new b.Range(n.lineNumber,n.column,r.lineNumber,r.column)}static _findFirstNonWhitespaceChar(t,i){const n=t.length;for(let r=i;r<n;r++){const d=t.charAt(r);if(d!==" "&&d!=="\t")return r}return n}static _deleteWordRightWhitespace(t,i){const n=t.getLineContent(i.lineNumber),r=i.column-1,d=this._findFirstNonWhitespaceChar(n,r);return r+1<d?new b.Range(i.lineNumber,i.column,i.lineNumber,d+1):null}static deleteWordRight(t,i){const n=t.wordSeparators,r=t.model,d=t.selection,h=t.whitespaceHeuristics;if(!d.isEmpty())return d;const o=new w.Position(d.positionLineNumber,d.positionColumn);let c=o.lineNumber,a=o.column;const l=r.getLineCount(),u=r.getLineMaxColumn(c);if(c===l&&a===u)return null;if(h){const f=this._deleteWordRightWhitespace(r,o);if(f)return f}let v=S._findNextWordOnLine(n,r,o);return i===2?v?a=v.end+1:a<u||c===l?a=u:(c++,v=S._findNextWordOnLine(n,r,new w.Position(c,1)),v?a=v.start+1:a=r.getLineMaxColumn(c)):(v&&a>=v.start+1&&(v=S._findNextWordOnLine(n,r,new w.Position(c,v.end+1))),v?a=v.start+1:a<u||c===l?a=u:(c++,v=S._findNextWordOnLine(n,r,new w.Position(c,1)),v?a=v.start+1:a=r.getLineMaxColumn(c))),new b.Range(c,a,o.lineNumber,o.column)}static _deleteWordPartRight(t,i){if(!i.isEmpty())return i;const n=i.getPosition(),r=S._moveWordPartRight(t,n);return new b.Range(n.lineNumber,n.column,r.lineNumber,r.column)}static _createWordAtPosition(t,i,n){const r=new b.Range(i,n.start+1,i,n.end+1);return{word:t.getValueInRange(r),startColumn:r.startColumn,endColumn:r.endColumn}}static getWordAtPosition(t,i,n){const r=(0,D.getMapForWordSeparators)(i),d=S._findPreviousWordOnLine(r,t,n);if(d&&d.wordType===1&&d.start<=n.column-1&&n.column-1<=d.end)return S._createWordAtPosition(t,n.lineNumber,d);const h=S._findNextWordOnLine(r,t,n);return h&&h.wordType===1&&h.start<=n.column-1&&n.column-1<=h.end?S._createWordAtPosition(t,n.lineNumber,h):null}static word(t,i,n,r,d){const h=(0,D.getMapForWordSeparators)(t.wordSeparators),o=S._findPreviousWordOnLine(h,i,d),c=S._findNextWordOnLine(h,i,d);if(!r){let f,p;return o&&o.wordType===1&&o.start<=d.column-1&&d.column-1<=o.end?(f=o.start+1,p=o.end+1):c&&c.wordType===1&&c.start<=d.column-1&&d.column-1<=c.end?(f=c.start+1,p=c.end+1):(o?f=o.end+1:f=1,c?p=c.start+1:p=i.getLineMaxColumn(d.lineNumber)),new k.SingleCursorState(new b.Range(d.lineNumber,f,d.lineNumber,p),1,0,new w.Position(d.lineNumber,p),0)}let a,l;o&&o.wordType===1&&o.start<d.column-1&&d.column-1<o.end?(a=o.start+1,l=o.end+1):c&&c.wordType===1&&c.start<d.column-1&&d.column-1<c.end?(a=c.start+1,l=c.end+1):(a=d.column,l=d.column);const u=d.lineNumber;let v;if(n.selectionStart.containsPosition(d))v=n.selectionStart.endColumn;else if(d.isBeforeOrEqual(n.selectionStart.getStartPosition())){v=a;const f=new w.Position(u,v);n.selectionStart.containsPosition(f)&&(v=n.selectionStart.endColumn)}else{v=l;const f=new w.Position(u,v);n.selectionStart.containsPosition(f)&&(v=n.selectionStart.startColumn)}return n.move(!0,u,v,0)}}e.WordOperations=S;class g extends S{static deleteWordPartLeft(t){const i=m([S.deleteWordLeft(t,0),S.deleteWordLeft(t,2),S._deleteWordPartLeft(t.model,t.selection)]);return i.sort(b.Range.compareRangesUsingEnds),i[2]}static deleteWordPartRight(t){const i=m([S.deleteWordRight(t,0),S.deleteWordRight(t,2),S._deleteWordPartRight(t.model,t.selection)]);return i.sort(b.Range.compareRangesUsingStarts),i[0]}static moveWordPartLeft(t,i,n){const r=m([S.moveWordLeft(t,i,n,0),S.moveWordLeft(t,i,n,2),S._moveWordPartLeft(i,n)]);return r.sort(w.Position.compare),r[2]}static moveWordPartRight(t,i,n){const r=m([S.moveWordRight(t,i,n,0),S.moveWordRight(t,i,n,2),S._moveWordPartRight(i,n)]);return r.sort(w.Position.compare),r[0]}}e.WordPartOperations=g;function m(s){return s.filter(t=>!!t)}}),define(J[197],ee([1,0,18,66,195,173,12,5]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class S{static addCursorDown(s,t,i){const n=[];let r=0;for(let d=0,h=t.length;d<h;d++){const o=t[d];n[r++]=new k.CursorState(o.modelState,o.viewState),i?n[r++]=k.CursorState.fromModelState(L.MoveOperations.translateDown(s.cursorConfig,s.model,o.modelState)):n[r++]=k.CursorState.fromViewState(L.MoveOperations.translateDown(s.cursorConfig,s,o.viewState))}return n}static addCursorUp(s,t,i){const n=[];let r=0;for(let d=0,h=t.length;d<h;d++){const o=t[d];n[r++]=new k.CursorState(o.modelState,o.viewState),i?n[r++]=k.CursorState.fromModelState(L.MoveOperations.translateUp(s.cursorConfig,s.model,o.modelState)):n[r++]=k.CursorState.fromViewState(L.MoveOperations.translateUp(s.cursorConfig,s,o.viewState))}return n}static moveToBeginningOfLine(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r];n[r]=this._moveToLineStart(s,h,i)}return n}static _moveToLineStart(s,t,i){const n=t.viewState.position.column,r=t.modelState.position.column,d=n===r,h=t.viewState.position.lineNumber,o=s.getLineFirstNonWhitespaceColumn(h);return!d&&!(n===o)?this._moveToLineStartByView(s,t,i):this._moveToLineStartByModel(s,t,i)}static _moveToLineStartByView(s,t,i){return k.CursorState.fromViewState(L.MoveOperations.moveToBeginningOfLine(s.cursorConfig,s,t.viewState,i))}static _moveToLineStartByModel(s,t,i){return k.CursorState.fromModelState(L.MoveOperations.moveToBeginningOfLine(s.cursorConfig,s.model,t.modelState,i))}static moveToEndOfLine(s,t,i,n){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=this._moveToLineEnd(s,o,i,n)}return r}static _moveToLineEnd(s,t,i,n){const r=t.viewState.position,d=s.getLineMaxColumn(r.lineNumber),h=r.column===d,o=t.modelState.position,c=s.model.getLineMaxColumn(o.lineNumber),a=d-r.column===c-o.column;return h||a?this._moveToLineEndByModel(s,t,i,n):this._moveToLineEndByView(s,t,i,n)}static _moveToLineEndByView(s,t,i,n){return k.CursorState.fromViewState(L.MoveOperations.moveToEndOfLine(s.cursorConfig,s,t.viewState,i,n))}static _moveToLineEndByModel(s,t,i,n){return k.CursorState.fromModelState(L.MoveOperations.moveToEndOfLine(s.cursorConfig,s.model,t.modelState,i,n))}static expandLineSelection(s,t){const i=[];for(let n=0,r=t.length;n<r;n++){const d=t[n],h=d.modelState.selection.startLineNumber,o=s.model.getLineCount();let c=d.modelState.selection.endLineNumber,a;c===o?a=s.model.getLineMaxColumn(o):(c++,a=1),i[n]=k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(h,1,h,1),0,0,new w.Position(c,a),0))}return i}static moveToBeginningOfBuffer(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r];n[r]=k.CursorState.fromModelState(L.MoveOperations.moveToBeginningOfBuffer(s.cursorConfig,s.model,h.modelState,i))}return n}static moveToEndOfBuffer(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r];n[r]=k.CursorState.fromModelState(L.MoveOperations.moveToEndOfBuffer(s.cursorConfig,s.model,h.modelState,i))}return n}static selectAll(s,t){const i=s.model.getLineCount(),n=s.model.getLineMaxColumn(i);return k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(1,1,1,1),0,0,new w.Position(i,n),0))}static line(s,t,i,n,r){const d=s.model.validatePosition(n),h=r?s.coordinatesConverter.validateViewPosition(new w.Position(r.lineNumber,r.column),d):s.coordinatesConverter.convertModelPositionToViewPosition(d);if(!i){const c=s.model.getLineCount();let a=d.lineNumber+1,l=1;return a>c&&(a=c,l=s.model.getLineMaxColumn(a)),k.CursorState.fromModelState(new k.SingleCursorState(new b.Range(d.lineNumber,1,a,l),2,0,new w.Position(a,l),0))}const o=t.modelState.selectionStart.getStartPosition().lineNumber;if(d.lineNumber<o)return k.CursorState.fromViewState(t.viewState.move(!0,h.lineNumber,1,0));if(d.lineNumber>o){const c=s.getLineCount();let a=h.lineNumber+1,l=1;return a>c&&(a=c,l=s.getLineMaxColumn(a)),k.CursorState.fromViewState(t.viewState.move(!0,a,l,0))}else{const c=t.modelState.selectionStart.getEndPosition();return k.CursorState.fromModelState(t.modelState.move(!0,c.lineNumber,c.column,0))}}static word(s,t,i,n){const r=s.model.validatePosition(n);return k.CursorState.fromModelState(D.WordOperations.word(s.cursorConfig,s.model,t.modelState,i,r))}static cancelSelection(s,t){if(!t.modelState.hasSelection())return new k.CursorState(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return k.CursorState.fromViewState(new k.SingleCursorState(new b.Range(i,n,i,n),0,0,new w.Position(i,n),0))}static moveTo(s,t,i,n,r){if(i){if(t.modelState.selectionStartKind===1)return this.word(s,t,i,n);if(t.modelState.selectionStartKind===2)return this.line(s,t,i,n,r)}const d=s.model.validatePosition(n),h=r?s.coordinatesConverter.validateViewPosition(new w.Position(r.lineNumber,r.column),d):s.coordinatesConverter.convertModelPositionToViewPosition(d);return k.CursorState.fromViewState(t.viewState.move(i,h.lineNumber,h.column,0))}static simpleMove(s,t,i,n,r,d){switch(i){case 0:return d===4?this._moveHalfLineLeft(s,t,n):this._moveLeft(s,t,n,r);case 1:return d===4?this._moveHalfLineRight(s,t,n):this._moveRight(s,t,n,r);case 2:return d===2?this._moveUpByViewLines(s,t,n,r):this._moveUpByModelLines(s,t,n,r);case 3:return d===2?this._moveDownByViewLines(s,t,n,r):this._moveDownByModelLines(s,t,n,r);case 4:return d===2?t.map(h=>k.CursorState.fromViewState(L.MoveOperations.moveToPrevBlankLine(s.cursorConfig,s,h.viewState,n))):t.map(h=>k.CursorState.fromModelState(L.MoveOperations.moveToPrevBlankLine(s.cursorConfig,s.model,h.modelState,n)));case 5:return d===2?t.map(h=>k.CursorState.fromViewState(L.MoveOperations.moveToNextBlankLine(s.cursorConfig,s,h.viewState,n))):t.map(h=>k.CursorState.fromModelState(L.MoveOperations.moveToNextBlankLine(s.cursorConfig,s.model,h.modelState,n)));case 6:return this._moveToViewMinColumn(s,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(s,t,n);case 8:return this._moveToViewCenterColumn(s,t,n);case 9:return this._moveToViewMaxColumn(s,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(s,t,n);default:return null}}static viewportMove(s,t,i,n,r){const d=s.getCompletelyVisibleViewRange(),h=s.coordinatesConverter.convertViewRangeToModelRange(d);switch(i){case 11:{const o=this._firstLineNumberInRange(s.model,h,r),c=s.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(s,t[0],n,o,c)]}case 13:{const o=this._lastLineNumberInRange(s.model,h,r),c=s.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(s,t[0],n,o,c)]}case 12:{const o=Math.round((h.startLineNumber+h.endLineNumber)/2),c=s.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(s,t[0],n,o,c)]}case 14:{const o=[];for(let c=0,a=t.length;c<a;c++){const l=t[c];o[c]=this.findPositionInViewportIfOutside(s,l,d,n)}return o}default:return null}}static findPositionInViewportIfOutside(s,t,i,n){const r=t.viewState.position.lineNumber;if(i.startLineNumber<=r&&r<=i.endLineNumber-1)return new k.CursorState(t.modelState,t.viewState);{let d;r>i.endLineNumber-1?d=i.endLineNumber-1:r<i.startLineNumber?d=i.startLineNumber:d=r;const h=L.MoveOperations.vertical(s.cursorConfig,s,r,t.viewState.position.column,t.viewState.leftoverVisibleColumns,d,!1);return k.CursorState.fromViewState(t.viewState.move(n,h.lineNumber,h.column,h.leftoverVisibleColumns))}}static _firstLineNumberInRange(s,t,i){let n=t.startLineNumber;return t.startColumn!==s.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(s,t,i){let n=t.startLineNumber;return t.startColumn!==s.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(s,t,i,n){return t.map(r=>k.CursorState.fromViewState(L.MoveOperations.moveLeft(s.cursorConfig,s,r.viewState,i,n)))}static _moveHalfLineLeft(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=Math.round(s.getLineContent(o).length/2);n[r]=k.CursorState.fromViewState(L.MoveOperations.moveLeft(s.cursorConfig,s,h.viewState,i,c))}return n}static _moveRight(s,t,i,n){return t.map(r=>k.CursorState.fromViewState(L.MoveOperations.moveRight(s.cursorConfig,s,r.viewState,i,n)))}static _moveHalfLineRight(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=Math.round(s.getLineContent(o).length/2);n[r]=k.CursorState.fromViewState(L.MoveOperations.moveRight(s.cursorConfig,s,h.viewState,i,c))}return n}static _moveDownByViewLines(s,t,i,n){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=k.CursorState.fromViewState(L.MoveOperations.moveDown(s.cursorConfig,s,o.viewState,i,n))}return r}static _moveDownByModelLines(s,t,i,n){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=k.CursorState.fromModelState(L.MoveOperations.moveDown(s.cursorConfig,s.model,o.modelState,i,n))}return r}static _moveUpByViewLines(s,t,i,n){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=k.CursorState.fromViewState(L.MoveOperations.moveUp(s.cursorConfig,s,o.viewState,i,n))}return r}static _moveUpByModelLines(s,t,i,n){const r=[];for(let d=0,h=t.length;d<h;d++){const o=t[d];r[d]=k.CursorState.fromModelState(L.MoveOperations.moveUp(s.cursorConfig,s.model,o.modelState,i,n))}return r}static _moveToViewPosition(s,t,i,n,r){return k.CursorState.fromViewState(t.viewState.move(i,n,r,0))}static _moveToModelPosition(s,t,i,n,r){return k.CursorState.fromModelState(t.modelState.move(i,n,r,0))}static _moveToViewMinColumn(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=s.getLineMinColumn(o);n[r]=this._moveToViewPosition(s,h,i,o,c)}return n}static _moveToViewFirstNonWhitespaceColumn(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=s.getLineFirstNonWhitespaceColumn(o);n[r]=this._moveToViewPosition(s,h,i,o,c)}return n}static _moveToViewCenterColumn(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=Math.round((s.getLineMaxColumn(o)+s.getLineMinColumn(o))/2);n[r]=this._moveToViewPosition(s,h,i,o,c)}return n}static _moveToViewMaxColumn(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=s.getLineMaxColumn(o);n[r]=this._moveToViewPosition(s,h,i,o,c)}return n}static _moveToViewLastNonWhitespaceColumn(s,t,i){const n=[];for(let r=0,d=t.length;r<d;r++){const h=t[r],o=h.viewState.position.lineNumber,c=s.getLineLastNonWhitespaceColumn(o);n[r]=this._moveToViewPosition(s,h,i,o,c)}return n}}e.CursorMoveCommands=S;var g;(function(m){const s=function(i){if(!_.isObject(i))return!1;const n=i;return!(!_.isString(n.to)||!_.isUndefined(n.select)&&!_.isBoolean(n.select)||!_.isUndefined(n.by)&&!_.isString(n.by)||!_.isUndefined(n.value)&&!_.isNumber(n.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:s,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 n;switch(i.to){case m.RawDirection.Left:n=0;break;case m.RawDirection.Right:n=1;break;case m.RawDirection.Up:n=2;break;case m.RawDirection.Down:n=3;break;case m.RawDirection.PrevBlankLine:n=4;break;case m.RawDirection.NextBlankLine:n=5;break;case m.RawDirection.WrappedLineStart:n=6;break;case m.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case m.RawDirection.WrappedLineColumnCenter:n=8;break;case m.RawDirection.WrappedLineEnd:n=9;break;case m.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case m.RawDirection.ViewPortTop:n=11;break;case m.RawDirection.ViewPortBottom:n=13;break;case m.RawDirection.ViewPortCenter:n=12;break;case m.RawDirection.ViewPortIfOutside:n=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:n,unit:r,select:!!i.select,value:i.value||1}}m.parse=t})(g||(e.CursorMove=g={}))}),define(J[482],ee([1,0,66,12,5,24]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=void 0;class w{constructor(S){this._selTrackedRange=null,this._trackSelection=!0,this._setState(S,new _.SingleCursorState(new L.Range(1,1,1,1),0,0,new k.Position(1,1),0),new _.SingleCursorState(new L.Range(1,1,1,1),0,0,new k.Position(1,1),0))}dispose(S){this._removeTrackedRange(S)}startTrackingSelection(S){this._trackSelection=!0,this._updateTrackedRange(S)}stopTrackingSelection(S){this._trackSelection=!1,this._removeTrackedRange(S)}_updateTrackedRange(S){this._trackSelection&&(this._selTrackedRange=S.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(S){this._selTrackedRange=S.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new _.CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(S){const g=S.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!g.isEmpty()?D.Selection.fromRange(g.collapseToEnd(),this.modelState.selection.getDirection()):D.Selection.fromRange(g,this.modelState.selection.getDirection())}ensureValidState(S){this._setState(S,this.modelState,this.viewState)}setState(S,g,m){this._setState(S,g,m)}static _validatePositionWithCache(S,g,m,s){return g.equals(m)?s:S.normalizePosition(g,2)}static _validateViewState(S,g){const m=g.position,s=g.selectionStart.getStartPosition(),t=g.selectionStart.getEndPosition(),i=S.normalizePosition(m,2),n=this._validatePositionWithCache(S,s,m,i),r=this._validatePositionWithCache(S,t,s,n);return m.equals(i)&&s.equals(n)&&t.equals(r)?g:new _.SingleCursorState(L.Range.fromPositions(n,r),g.selectionStartKind,g.selectionStartLeftoverVisibleColumns+s.column-n.column,i,g.leftoverVisibleColumns+m.column-i.column)}_setState(S,g,m){if(m&&(m=w._validateViewState(S.viewModel,m)),g){const s=S.model.validateRange(g.selectionStart),t=g.selectionStart.equalsRange(s)?g.selectionStartLeftoverVisibleColumns:0,i=S.model.validatePosition(g.position),n=g.position.equals(i)?g.leftoverVisibleColumns:0;g=new _.SingleCursorState(s,g.selectionStartKind,t,i,n)}else{if(!m)return;const s=S.model.validateRange(S.coordinatesConverter.convertViewRangeToModelRange(m.selectionStart)),t=S.model.validatePosition(S.coordinatesConverter.convertViewPositionToModelPosition(m.position));g=new _.SingleCursorState(s,m.selectionStartKind,m.selectionStartLeftoverVisibleColumns,t,m.leftoverVisibleColumns)}if(m){const s=S.coordinatesConverter.validateViewRange(m.selectionStart,g.selectionStart),t=S.coordinatesConverter.validateViewPosition(m.position,g.position);m=new _.SingleCursorState(s,g.selectionStartKind,g.selectionStartLeftoverVisibleColumns,t,g.leftoverVisibleColumns)}else{const s=S.coordinatesConverter.convertModelPositionToViewPosition(new k.Position(g.selectionStart.startLineNumber,g.selectionStart.startColumn)),t=S.coordinatesConverter.convertModelPositionToViewPosition(new k.Position(g.selectionStart.endLineNumber,g.selectionStart.endColumn)),i=new L.Range(s.lineNumber,s.column,t.lineNumber,t.column),n=S.coordinatesConverter.convertModelPositionToViewPosition(g.position);m=new _.SingleCursorState(i,g.selectionStartKind,g.selectionStartLeftoverVisibleColumns,n,g.leftoverVisibleColumns)}this.modelState=g,this.viewState=m,this._updateTrackedRange(S)}}e.Cursor=w}),define(J[483],ee([1,0,16,66,482,12,5,24]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class S{constructor(m){this.context=m,this.cursors=[new L.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,_.findMinBy)(this.cursors,(0,_.compareBy)(m=>m.viewState.position,D.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,_.findLastMaxBy)(this.cursors,(0,_.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 s=this.cursors.length-1,t=m.length;if(s<t){const i=t-s;for(let n=0;n<i;n++)this._addSecondaryCursor()}else if(s>t){const i=s-t;for(let n=0;n<i;n++)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 L.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),s=[];for(let t=0,i=m.length;t<i;t++)s.push({index:t,selection:m[t].modelState.selection});s.sort((0,_.compareBy)(t=>t.selection,w.Range.compareRangesUsingStarts));for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1],r=i.selection,d=n.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let h;if(d.isEmpty()||r.isEmpty()?h=d.getStartPosition().isBeforeOrEqual(r.getEndPosition()):h=d.getStartPosition().isBefore(r.getEndPosition()),h){const o=i.index<n.index?t:t+1,c=i.index<n.index?t+1:t,a=s[c].index,l=s[o].index,u=s[c].selection,v=s[o].selection;if(!u.equalsSelection(v)){const f=u.plusRange(v),p=u.selectionStartLineNumber===u.startLineNumber&&u.selectionStartColumn===u.startColumn,C=v.selectionStartLineNumber===v.startLineNumber&&v.selectionStartColumn===v.startColumn;let y;a===this.lastAddedCursorIndex?(y=p,this.lastAddedCursorIndex=l):y=C;let E;y?E=new b.Selection(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn):E=new b.Selection(f.endLineNumber,f.endColumn,f.startLineNumber,f.startColumn),s[o].selection=E;const I=k.CursorState.fromModelSelection(E);m[l].setState(this.context,I.modelState,I.viewState)}for(const f of s)f.index>a&&f.index--;m.splice(a,1),s.splice(c,1),this._removeSecondaryCursor(a-1),t--}}}}e.CursorCollection=S}),define(J[484],ee([1,0,105]),function(j,e,_){"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 _.StandardAutoClosingPairConditional(w)):D.brackets?this._autoClosingPairs=D.brackets.map(w=>new _.StandardAutoClosingPairConditional({open:w[0],close:w[1]})):this._autoClosingPairs=[],D.__electricCharacterSupport&&D.__electricCharacterSupport.docComment){const w=D.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new _.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}}e.CharacterPairSupport=k,k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> \n\t`,k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`\'"\\`;:.,=}])> \n\t`}),define(J[485],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=void 0;function _(L){return L.global&&(L.lastIndex=0),!0}class k{constructor(D){this._indentationRules=D}shouldIncrease(D){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&_(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(D))}shouldDecrease(D){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&_(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(D))}shouldIndentNextLine(D){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&_(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(D))}shouldIgnore(D){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&_(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[486],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class _{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(L,D,w,b,S){if(L&&D){const g=this.doNavigateValueSet(D,S);if(g)return{range:L,value:g}}if(w&&b){const g=this.doNavigateValueSet(b,S);if(g)return{range:w,value:g}}return null}doNavigateValueSet(L,D){const w=this.numberReplace(L,D);return w!==null?w:this.textReplace(L,D)}numberReplace(L,D){const w=Math.pow(10,L.length-(L.lastIndexOf(".")+1));let b=Number(L);const S=parseFloat(L);return!isNaN(b)&&!isNaN(S)&&b===S?b===0&&!D?null:(b=Math.floor(b*w),b+=D?w:-w,String(b/w)):null}textReplace(L,D){return this.valueSetsReplace(this._defaultValueSet,L,D)}valueSetsReplace(L,D,w){let b=null;for(let S=0,g=L.length;b===null&&S<g;S++)b=this.valueSetReplace(L[S],D,w);return b}valueSetReplace(L,D,w){let b=L.indexOf(D);return b>=0?(b+=w?1:-1,b<0?b=L.length-1:b%=L.length,L[b]):null}}e.BasicInplaceReplace=_,_.INSTANCE=new _}),define(J[487],ee([1,0,251]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClosingBracketKind=e.OpeningBracketKind=e.BracketKindBase=e.LanguageBracketsConfiguration=void 0;class k{constructor(g,m){this.languageId=g;const s=m.brackets?L(m.brackets):[],t=new _.CachedFunction(r=>{const d=new Set;return{info:new w(this,r,d),closing:d}}),i=new _.CachedFunction(r=>{const d=new Set,h=new Set;return{info:new b(this,r,d,h),opening:d,openingColorized:h}});for(const[r,d]of s){const h=t.get(r),o=i.get(d);h.closing.add(o.info),o.opening.add(h.info)}const n=m.colorizedBracketPairs?L(m.colorizedBracketPairs):s.filter(r=>!(r[0]==="<"&&r[1]===">"));for(const[r,d]of n){const h=t.get(r),o=i.get(d);h.closing.add(o.info),o.openingColorized.add(h.info),o.opening.add(h.info)}this._openingBrackets=new Map([...t.cachedValues].map(([r,d])=>[r,d.info])),this._closingBrackets=new Map([...i.cachedValues].map(([r,d])=>[r,d.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(g){return this._openingBrackets.get(g)}getClosingBracketInfo(g){return this._closingBrackets.get(g)}getBracketInfo(g){return this.getOpeningBracketInfo(g)||this.getClosingBracketInfo(g)}}e.LanguageBracketsConfiguration=k;function L(S){return S.filter(([g,m])=>g!==""&&m!=="")}class D{constructor(g,m){this.config=g,this.bracketText=m}get languageId(){return this.config.languageId}}e.BracketKindBase=D;class w extends D{constructor(g,m,s){super(g,m),this.openedBrackets=s,this.isOpeningBracket=!0}}e.OpeningBracketKind=w;class b extends D{constructor(g,m,s,t){super(g,m),this.openingBrackets=s,this.openingColorizedBrackets=t,this.isOpeningBracket=!1}closes(g){return g.config!==this.config?!1:this.openingBrackets.has(g)}closesColorized(g){return g.config!==this.config?!1:this.openingColorizedBrackets.has(g)}getOpeningBrackets(){return[...this.openingBrackets]}}e.ClosingBracketKind=b}),define(J[488],ee([1,0,11,9,105]),function(j,e,_,k,L){"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(S=>{const g=D._createOpenBracketRegExp(S[0]),m=D._createCloseBracketRegExp(S[1]);g&&m&&this._brackets.push({open:S[0],openRegExp:g,close:S[1],closeRegExp:m})}),this._regExpRules=b.onEnterRules||[]}onEnter(b,S,g,m){if(b>=3)for(let s=0,t=this._regExpRules.length;s<t;s++){const i=this._regExpRules[s];if([{reg:i.beforeText,text:g},{reg:i.afterText,text:m},{reg:i.previousLineText,text:S}].every(r=>r.reg?(r.reg.lastIndex=0,r.reg.test(r.text)):!0))return i.action}if(b>=2&&g.length>0&&m.length>0)for(let s=0,t=this._brackets.length;s<t;s++){const i=this._brackets[s];if(i.openRegExp.test(g)&&i.closeRegExp.test(m))return{indentAction:L.IndentAction.IndentOutdent}}if(b>=2&&g.length>0){for(let s=0,t=this._brackets.length;s<t;s++)if(this._brackets[s].openRegExp.test(g))return{indentAction:L.IndentAction.Indent}}return null}static _createOpenBracketRegExp(b){let S=k.escapeRegExpCharacters(b);return/\\B/.test(S.charAt(0))||(S="\\\\b"+S),S+="\\\\s*$",D._safeRegExp(S)}static _createCloseBracketRegExp(b){let S=k.escapeRegExpCharacters(b);return/\\B/.test(S.charAt(S.length-1))||(S=S+"\\\\b"),S="^\\\\s*"+S,D._safeRegExp(S)}static _safeRegExp(b){try{return new RegExp(b)}catch(S){return(0,_.onUnexpectedError)(S),null}}}e.OnEnterSupport=D}),define(J[489],ee([1,0,36]),function(j,e,_){"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(d,h,o,c,a){this._parsedThemeRuleBrand=void 0,this.token=d,this.index=h,this.fontStyle=o,this.foreground=c,this.background=a}}e.ParsedTokenThemeRule=k;function L(r){if(!r||!Array.isArray(r))return[];const d=[];let h=0;for(let o=0,c=r.length;o<c;o++){const a=r[o];let l=-1;if(typeof a.fontStyle=="string"){l=0;const f=a.fontStyle.split(" ");for(let p=0,C=f.length;p<C;p++)switch(f[p]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof a.foreground=="string"&&(u=a.foreground);let v=null;typeof a.background=="string"&&(v=a.background),d[h++]=new k(a.token||"",o,l,u,v)}return d}e.parseTokenTheme=L;function D(r,d){r.sort((p,C)=>{const y=s(p.token,C.token);return y!==0?y:p.index-C.index});let h=0,o="000000",c="ffffff";for(;r.length>=1&&r[0].token==="";){const p=r.shift();p.fontStyle!==-1&&(h=p.fontStyle),p.foreground!==null&&(o=p.foreground),p.background!==null&&(c=p.background)}const a=new b;for(const p of d)a.getId(p);const l=a.getId(o),u=a.getId(c),v=new t(h,l,u),f=new i(v);for(let p=0,C=r.length;p<C;p++){const y=r[p];f.insert(y.token,y.fontStyle,a.getId(y.foreground),a.getId(y.background))}return new S(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(d){if(d===null)return 0;const h=d.match(w);if(!h)throw new Error("Illegal value for token color: "+d);d=h[1].toUpperCase();let o=this._color2id.get(d);return o||(o=++this._lastColorId,this._color2id.set(d,o),this._id2color[o]=_.Color.fromHex("#"+d),o)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=b;class S{static createFromRawTokenTheme(d,h){return this.createFromParsedTokenTheme(L(d),h)}static createFromParsedTokenTheme(d,h){return D(d,h)}constructor(d,h){this._colorMap=d,this._root=h,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(d){return this._root.match(d)}match(d,h){let o=this._cache.get(h);if(typeof o>"u"){const c=this._match(h),a=m(h);o=(c.metadata|a<<8)>>>0,this._cache.set(h,o)}return(o|d<<0)>>>0}}e.TokenTheme=S;const g=/\\b(comment|string|regex|regexp)\\b/;function m(r){const d=r.match(g);if(!d)return 0;switch(d[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 s(r,d){return r<d?-1:r>d?1:0}e.strcmp=s;class t{constructor(d,h,o){this._themeTrieElementRuleBrand=void 0,this._fontStyle=d,this._foreground=h,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(d,h,o){d!==-1&&(this._fontStyle=d),h!==0&&(this._foreground=h),o!==0&&(this._background=o),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}e.ThemeTrieElementRule=t;class i{constructor(d){this._themeTrieElementBrand=void 0,this._mainRule=d,this._children=new Map}match(d){if(d==="")return this._mainRule;const h=d.indexOf(".");let o,c;h===-1?(o=d,c=""):(o=d.substring(0,h),c=d.substring(h+1));const a=this._children.get(o);return typeof a<"u"?a.match(c):this._mainRule}insert(d,h,o,c){if(d===""){this._mainRule.acceptOverwrite(h,o,c);return}const a=d.indexOf(".");let l,u;a===-1?(l=d,u=""):(l=d.substring(0,a),u=d.substring(a+1));let v=this._children.get(l);typeof v>"u"&&(v=new i(this._mainRule.clone()),this._children.set(l,v)),v.insert(u,h,o,c)}}e.ThemeTrieElement=i;function n(r){const d=[];for(let h=1,o=r.length;h<o;h++){const c=r[h];d[h]=`.mtk${h} { color: ${c}; }`}return d.push(".mtki { font-style: italic; }"),d.push(".mtkb { font-weight: bold; }"),d.push(".mtku { text-decoration: underline; text-underline-position: under; }"),d.push(".mtks { text-decoration: line-through; }"),d.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),d.join(`\n`)}e.generateTokensCSSForColorMap=n}),define(J[46],ee([1,0,45]),function(j,e,_){"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.GlyphMarginLane=e.OverviewRulerLane=void 0;var k;(function(n){n[n.Left=1]="Left",n[n.Center=2]="Center",n[n.Right=4]="Right",n[n.Full=7]="Full"})(k||(e.OverviewRulerLane=k={}));var L;(function(n){n[n.Left=1]="Left",n[n.Right=2]="Right"})(L||(e.GlyphMarginLane=L={}));var D;(function(n){n[n.Inline=1]="Inline",n[n.Gutter=2]="Gutter"})(D||(e.MinimapPosition=D={}));var w;(function(n){n[n.Both=0]="Both",n[n.Right=1]="Right",n[n.Left=2]="Left",n[n.None=3]="None"})(w||(e.InjectedTextCursorStops=w={}));class b{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(r){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,r.tabSize|0),r.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,r.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!r.insertSpaces,this.defaultEOL=r.defaultEOL|0,this.trimAutoWhitespace=!!r.trimAutoWhitespace,this.bracketPairColorizationOptions=r.bracketPairColorizationOptions}equals(r){return this.tabSize===r.tabSize&&this._indentSizeIsTabSize===r._indentSizeIsTabSize&&this.indentSize===r.indentSize&&this.insertSpaces===r.insertSpaces&&this.defaultEOL===r.defaultEOL&&this.trimAutoWhitespace===r.trimAutoWhitespace&&(0,_.equals)(this.bracketPairColorizationOptions,r.bracketPairColorizationOptions)}createChangeEvent(r){return{tabSize:this.tabSize!==r.tabSize,indentSize:this.indentSize!==r.indentSize,insertSpaces:this.insertSpaces!==r.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==r.trimAutoWhitespace}}}e.TextModelResolvedOptions=b;class S{constructor(r,d){this._findMatchBrand=void 0,this.range=r,this.matches=d}}e.FindMatch=S;function g(n){return n&&typeof n.read=="function"}e.isITextSnapshot=g;class m{constructor(r,d,h,o,c,a){this.identifier=r,this.range=d,this.text=h,this.forceMoveMarkers=o,this.isAutoWhitespaceEdit=c,this._isTracked=a}}e.ValidAnnotatedEditOperation=m;class s{constructor(r,d,h){this.regex=r,this.wordSeparators=d,this.simpleSearch=h}}e.SearchData=s;class t{constructor(r,d,h){this.reverseEdits=r,this.changes=d,this.trimAutoWhitespaceLineNumbers=h}}e.ApplyEditsResult=t;function i(n){return!n.isTooLargeForSyncing()&&!n.isForSimpleWidget}e.shouldSynchronizeModel=i}),define(J[88],ee([1,0,9,5]),function(j,e,_,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 L{constructor(v,f){this.lineCount=v,this.columnCount=f}toString(){return`${this.lineCount},${this.columnCount}`}}e.LengthObj=L,L.zero=new L(0,0);function D(u,v,f,p){return u!==f?S(f-u,p):S(0,p-v)}e.lengthDiff=D,e.lengthZero=0;function w(u){return u===0}e.lengthIsZero=w;const b=Math.pow(2,26);function S(u,v){return u*b+v}e.toLength=S;function g(u){const v=u,f=Math.floor(v/b),p=v-f*b;return new L(f,p)}e.lengthToObj=g;function m(u){return Math.floor(u/b)}e.lengthGetLineCount=m;function s(u){return u}e.lengthGetColumnCountIfZeroLineCount=s;function t(u,v){let f=u+v;return v>=b&&(f=f-u%b),f}e.lengthAdd=t;function i(u,v){return u.reduce((f,p)=>t(f,v(p)),e.lengthZero)}e.sumLengths=i;function n(u,v){return u===v}e.lengthEquals=n;function r(u,v){const f=u,p=v;if(p-f<=0)return e.lengthZero;const y=Math.floor(f/b),E=Math.floor(p/b),I=p-E*b;if(y===E){const T=f-y*b;return S(0,I-T)}else return S(E-y,I)}e.lengthDiffNonNegative=r;function d(u,v){return u<v}e.lengthLessThan=d;function h(u,v){return u<=v}e.lengthLessThanEqual=h;function o(u,v){return u>=v}e.lengthGreaterThanEqual=o;function c(u){return S(u.lineNumber-1,u.column-1)}e.positionToLength=c;function a(u,v){const f=u,p=Math.floor(f/b),C=f-p*b,y=v,E=Math.floor(y/b),I=y-E*b;return new k.Range(p+1,C+1,E+1,I+1)}e.lengthsToRange=a;function l(u){const v=(0,_.splitLines)(u);return S(v.length-1,v[v.length-1].length)}e.lengthOfString=l}),define(J[198],ee([1,0,5,88]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class L{static fromModelContentChanges(S){return S.map(m=>{const s=_.Range.lift(m.range);return new L((0,k.positionToLength)(s.getStartPosition()),(0,k.positionToLength)(s.getEndPosition()),(0,k.lengthOfString)(m.text))}).reverse()}constructor(S,g,m){this.startOffset=S,this.endOffset=g,this.newLength=m}toString(){return`[${(0,k.lengthToObj)(this.startOffset)}...${(0,k.lengthToObj)(this.endOffset)}) -> ${(0,k.lengthToObj)(this.newLength)}`}}e.TextEditInfo=L;class D{constructor(S){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=S.map(g=>w.from(g))}getOffsetBeforeChange(S){return this.adjustNextEdit(S),this.translateCurToOld(S)}getDistanceToNextChange(S){this.adjustNextEdit(S);const g=this.edits[this.nextEditIdx],m=g?this.translateOldToCur(g.offsetObj):null;return m===null?null:(0,k.lengthDiffNonNegative)(S,m)}translateOldToCur(S){return S.lineCount===this.deltaLineIdxInOld?(0,k.toLength)(S.lineCount+this.deltaOldToNewLineCount,S.columnCount+this.deltaOldToNewColumnCount):(0,k.toLength)(S.lineCount+this.deltaOldToNewLineCount,S.columnCount)}translateCurToOld(S){const g=(0,k.lengthToObj)(S);return g.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,k.toLength)(g.lineCount-this.deltaOldToNewLineCount,g.columnCount-this.deltaOldToNewColumnCount):(0,k.toLength)(g.lineCount-this.deltaOldToNewLineCount,g.columnCount)}adjustNextEdit(S){for(;this.nextEditIdx<this.edits.length;){const g=this.edits[this.nextEditIdx],m=this.translateOldToCur(g.endOffsetAfterObj);if((0,k.lengthLessThanEqual)(m,S)){this.nextEditIdx++;const s=(0,k.lengthToObj)(m),t=(0,k.lengthToObj)(this.translateOldToCur(g.endOffsetBeforeObj)),i=s.lineCount-t.lineCount;this.deltaOldToNewLineCount+=i;const n=this.deltaLineIdxInOld===g.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,r=s.columnCount-t.columnCount;this.deltaOldToNewColumnCount=n+r,this.deltaLineIdxInOld=g.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=D;class w{static from(S){return new w(S.startOffset,S.endOffset,S.newLength)}constructor(S,g,m){this.endOffsetBeforeObj=(0,k.lengthToObj)(g),this.endOffsetAfterObj=(0,k.lengthToObj)((0,k.lengthAdd)(S,m)),this.offsetObj=(0,k.lengthToObj)(S)}}}),define(J[490],ee([1,0,16,198,88]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineTextEditInfos=void 0;function D(S,g){if(S.length===0)return g;if(g.length===0)return S;const m=new _.ArrayQueue(b(S)),s=b(g);s.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let t=m.dequeue();function i(h){if(h===void 0){const c=m.takeWhile(a=>!0)||[];return t&&c.unshift(t),c}const o=[];for(;t&&!(0,L.lengthIsZero)(h);){const[c,a]=t.splitAt(h);o.push(c),h=(0,L.lengthDiffNonNegative)(c.lengthAfter,h),t=a??m.dequeue()}return(0,L.lengthIsZero)(h)||o.push(new w(!1,h,h)),o}const n=[];function r(h,o,c){if(n.length>0&&(0,L.lengthEquals)(n[n.length-1].endOffset,h)){const a=n[n.length-1];n[n.length-1]=new k.TextEditInfo(a.startOffset,o,(0,L.lengthAdd)(a.newLength,c))}else n.push({startOffset:h,endOffset:o,newLength:c})}let d=L.lengthZero;for(const h of s){const o=i(h.lengthBefore);if(h.modified){const c=(0,L.sumLengths)(o,l=>l.lengthBefore),a=(0,L.lengthAdd)(d,c);r(d,a,h.lengthAfter),d=a}else for(const c of o){const a=d;d=(0,L.lengthAdd)(d,c.lengthBefore),c.modified&&r(a,d,c.lengthAfter)}}return n}e.combineTextEditInfos=D;class w{constructor(g,m,s){this.modified=g,this.lengthBefore=m,this.lengthAfter=s}splitAt(g){const m=(0,L.lengthDiffNonNegative)(g,this.lengthAfter);return(0,L.lengthEquals)(m,L.lengthZero)?[this,void 0]:this.modified?[new w(this.modified,this.lengthBefore,g),new w(this.modified,L.lengthZero,m)]:[new w(this.modified,g,g),new w(this.modified,m,m)]}toString(){return`${this.modified?"M":"U"}:${(0,L.lengthToObj)(this.lengthBefore)} -> ${(0,L.lengthToObj)(this.lengthAfter)}`}}function b(S){const g=[];let m=L.lengthZero;for(const s of S){const t=(0,L.lengthDiffNonNegative)(m,s.startOffset);(0,L.lengthIsZero)(t)||g.push(new w(!1,t,t));const i=(0,L.lengthDiffNonNegative)(s.startOffset,s.endOffset);g.push(new w(!0,i,s.newLength)),m=s.endOffset}return g}}),define(J[491],ee([1,0,88]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class k{constructor(b){this.lastOffset=_.lengthZero,this.nextNodes=[b],this.offsets=[_.lengthZero],this.idxs=[]}readLongestNodeAt(b,S){if((0,_.lengthLessThan)(b,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=b;;){const g=D(this.nextNodes);if(!g)return;const m=D(this.offsets);if((0,_.lengthLessThan)(b,m))return;if((0,_.lengthLessThan)(m,b))if((0,_.lengthAdd)(m,g.length)<=b)this.nextNodeAfterCurrent();else{const s=L(g);s!==-1?(this.nextNodes.push(g.getChild(s)),this.offsets.push(m),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(S(g))return this.nextNodeAfterCurrent(),g;{const s=L(g);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(g.getChild(s)),this.offsets.push(m),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const b=D(this.offsets),S=D(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const g=D(this.nextNodes),m=L(g,this.idxs[this.idxs.length-1]);if(m!==-1){this.nextNodes.push(g.getChild(m)),this.offsets.push((0,_.lengthAdd)(b,S.length)),this.idxs[this.idxs.length-1]=m;break}else this.idxs.pop()}}}e.NodeReader=k;function L(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[123],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const _=[];class k{static create(w,b){if(w<=128&&b.length===0){let S=k.cache[w];return S||(S=new k(w,b),k.cache[w]=S),S}return new k(w,b)}static getEmpty(){return this.empty}constructor(w,b){this.items=w,this.additionalItems=b}add(w,b){const S=b.getKey(w);let g=S>>5;if(g===0){const s=1<<S|this.items;return s===this.items?this:k.create(s,this.additionalItems)}g--;const m=this.additionalItems.slice(0);for(;m.length<g;)m.push(0);return m[g]|=1<<(S&31),k.create(this.items,m)}merge(w){const b=this.items|w.items;if(this.additionalItems===_&&w.additionalItems===_)return b===this.items?this:b===w.items?w:k.create(b,_);const S=[];for(let g=0;g<Math.max(this.additionalItems.length,w.additionalItems.length);g++){const m=this.additionalItems[g]||0,s=w.additionalItems[g]||0;S.push(m|s)}return k.create(b,S)}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}}e.SmallImmutableSet=k,k.cache=new Array(129),k.empty=k.create(0,_),e.identityKeyProvider={getKey(D){return D}};class L{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=L}),define(J[174],ee([1,0,11,77,88,123]),function(j,e,_,k,L,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(c){this._length=c}}class b extends w{static create(c,a,l){let u=c.length;return a&&(u=(0,L.lengthAdd)(u,a.length)),l&&(u=(0,L.lengthAdd)(u,l.length)),new b(u,c,a,l,a?a.missingOpeningBracketIds:D.SmallImmutableSet.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(c){switch(c){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const c=[];return c.push(this.openingBracket),this.child&&c.push(this.child),this.closingBracket&&c.push(this.closingBracket),c}constructor(c,a,l,u,v){super(c),this.openingBracket=a,this.child=l,this.closingBracket=u,this.missingOpeningBracketIds=v}canBeReused(c){return!(this.closingBracket===null||c.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(c,a){return this.child?this.child.computeMinIndentation((0,L.lengthAdd)(c,this.openingBracket.length),a):Number.MAX_SAFE_INTEGER}}e.PairAstNode=b;class S extends w{static create23(c,a,l,u=!1){let v=c.length,f=c.missingOpeningBracketIds;if(c.listHeight!==a.listHeight)throw new Error("Invalid list heights");if(v=(0,L.lengthAdd)(v,a.length),f=f.merge(a.missingOpeningBracketIds),l){if(c.listHeight!==l.listHeight)throw new Error("Invalid list heights");v=(0,L.lengthAdd)(v,l.length),f=f.merge(l.missingOpeningBracketIds)}return u?new m(v,c.listHeight+1,c,a,l,f):new g(v,c.listHeight+1,c,a,l,f)}static getEmpty(){return new t(L.lengthZero,0,[],D.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(c,a,l){super(c),this.listHeight=a,this._missingOpeningBracketIds=l,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const c=this.childrenLength;if(c===0)return;const a=this.getChild(c-1),l=a.kind===4?a.toMutable():a;return a!==l&&this.setChild(c-1,l),l}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const a=this.getChild(0),l=a.kind===4?a.toMutable():a;return a!==l&&this.setChild(0,l),l}canBeReused(c){if(c.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let a=this;for(;a.kind===4;){const l=a.childrenLength;if(l===0)throw new _.BugIndicatingError;a=a.getChild(l-1)}return a.canBeReused(c)}handleChildrenChanged(){this.throwIfImmutable();const c=this.childrenLength;let a=this.getChild(0).length,l=this.getChild(0).missingOpeningBracketIds;for(let u=1;u<c;u++){const v=this.getChild(u);a=(0,L.lengthAdd)(a,v.length),l=l.merge(v.missingOpeningBracketIds)}this._length=a,this._missingOpeningBracketIds=l,this.cachedMinIndentation=-1}computeMinIndentation(c,a){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let l=Number.MAX_SAFE_INTEGER,u=c;for(let v=0;v<this.childrenLength;v++){const f=this.getChild(v);f&&(l=Math.min(l,f.computeMinIndentation(u,a)),u=(0,L.lengthAdd)(u,f.length))}return this.cachedMinIndentation=l,l}}e.ListAstNode=S;class g extends S{get childrenLength(){return this._item3!==null?3:2}getChild(c){switch(c){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(c,a){switch(c){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(c,a,l,u,v,f){super(c,a,f),this._item1=l,this._item2=u,this._item3=v}deepClone(){return new g(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(c){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=c,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const c=this._item3;return this._item3=null,this.handleChildrenChanged(),c}prependChildOfSameHeight(c){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=c,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const c=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),c}toMutable(){return this}}class m extends g{toMutable(){return new g(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class s extends S{get childrenLength(){return this._children.length}getChild(c){return this._children[c]}setChild(c,a){this._children[c]=a}get children(){return this._children}constructor(c,a,l,u){super(c,a,u),this._children=l}deepClone(){const c=new Array(this._children.length);for(let a=0;a<this._children.length;a++)c[a]=this._children[a].deepClone();return new s(this.length,this.listHeight,c,this.missingOpeningBracketIds)}appendChildOfSameHeight(c){this.throwIfImmutable(),this._children.push(c),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const c=this._children.pop();return this.handleChildrenChanged(),c}prependChildOfSameHeight(c){this.throwIfImmutable(),this._children.unshift(c),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const c=this._children.shift();return this.handleChildrenChanged(),c}toMutable(){return this}}class t extends s{toMutable(){return new s(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const i=[];class n extends w{get listHeight(){return 0}get childrenLength(){return 0}getChild(c){return null}get children(){return i}deepClone(){return this}}class r extends n{get kind(){return 0}get missingOpeningBracketIds(){return D.SmallImmutableSet.getEmpty()}canBeReused(c){return!0}computeMinIndentation(c,a){const l=(0,L.lengthToObj)(c),u=(l.columnCount===0?l.lineCount:l.lineCount+1)+1,v=(0,L.lengthGetLineCount)((0,L.lengthAdd)(c,this.length))+1;let f=Number.MAX_SAFE_INTEGER;for(let p=u;p<=v;p++){const C=a.getLineFirstNonWhitespaceColumn(p),y=a.getLineContent(p);if(C===0)continue;const E=k.CursorColumns.visibleColumnFromColumn(y,C,a.getOptions().tabSize);f=Math.min(f,E)}return f}}e.TextAstNode=r;class d extends n{static create(c,a,l){return new d(c,a,l)}get kind(){return 1}get missingOpeningBracketIds(){return D.SmallImmutableSet.getEmpty()}constructor(c,a,l){super(c),this.bracketInfo=a,this.bracketIds=l}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(c){return!1}computeMinIndentation(c,a){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=d;class h extends n{get kind(){return 3}constructor(c,a){super(a),this.missingOpeningBracketIds=c}canBeReused(c){return!c.intersects(this.missingOpeningBracketIds)}computeMinIndentation(c,a){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=h}),define(J[492],ee([1,0,174]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat23TreesOfSameHeight=e.concat23Trees=void 0;function k(g){if(g.length===0)return null;if(g.length===1)return g[0];let m=0;function s(){if(m>=g.length)return null;const r=m,d=g[r].listHeight;for(m++;m<g.length&&g[m].listHeight===d;)m++;return m-r>=2?L(r===0&&m===g.length?g:g.slice(r,m),!1):g[r]}let t=s(),i=s();if(!i)return t;for(let r=s();r;r=s())D(t,i)<=D(i,r)?(t=w(t,i),i=r):i=w(i,r);return w(t,i)}e.concat23Trees=k;function L(g,m=!1){if(g.length===0)return null;if(g.length===1)return g[0];let s=g.length;for(;s>3;){const t=s>>1;for(let i=0;i<t;i++){const n=i<<1;g[i]=_.ListAstNode.create23(g[n],g[n+1],n+3===s?g[n+2]:null,m)}s=t}return _.ListAstNode.create23(g[0],g[1],s>=3?g[2]:null,m)}e.concat23TreesOfSameHeight=L;function D(g,m){return Math.abs(g.listHeight-m.listHeight)}function w(g,m){return g.listHeight===m.listHeight?_.ListAstNode.create23(g,m,null,!1):g.listHeight>m.listHeight?b(g,m):S(m,g)}function b(g,m){g=g.toMutable();let s=g;const t=[];let i;for(;;){if(m.listHeight===s.listHeight){i=m;break}if(s.kind!==4)throw new Error("unexpected");t.push(s),s=s.makeLastElementMutable()}for(let n=t.length-1;n>=0;n--){const r=t[n];i?r.childrenLength>=3?i=_.ListAstNode.create23(r.unappendChild(),i,null,!1):(r.appendChildOfSameHeight(i),i=void 0):r.handleChildrenChanged()}return i?_.ListAstNode.create23(g,i,null,!1):g}function S(g,m){g=g.toMutable();let s=g;const t=[];for(;m.listHeight!==s.listHeight;){if(s.kind!==4)throw new Error("unexpected");t.push(s),s=s.makeFirstElementMutable()}let i=m;for(let n=t.length-1;n>=0;n--){const r=t[n];i?r.childrenLength>=3?i=_.ListAstNode.create23(i,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(i),i=void 0):r.handleChildrenChanged()}return i?_.ListAstNode.create23(i,g,null,!1):g}}),define(J[266],ee([1,0,174,198,123,88,492,491]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function S(m,s,t,i){return new g(m,s,t,i).parseDocument()}e.parseDocument=S;class g{constructor(s,t,i,n){if(this.tokenizer=s,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)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 s=this.parseList(L.SmallImmutableSet.getEmpty(),0);return s||(s=_.ListAstNode.getEmpty()),s}parseList(s,t){const i=[];for(;;){let r=this.tryReadChildFromCache(s);if(!r){const d=this.tokenizer.peek();if(!d||d.kind===2&&d.bracketIds.intersects(s))break;r=this.parseChild(s,t+1)}r.kind===4&&r.childrenLength===0||i.push(r)}return this.oldNodeReader?(0,w.concat23Trees)(i):(0,w.concat23TreesOfSameHeight)(i,this.createImmutableLists)}tryReadChildFromCache(s){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),n=>t!==null&&!(0,D.lengthLessThan)(n.length,t)?!1:n.canBeReused(s));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(s,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new _.InvalidBracketAstNode(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new _.TextAstNode(i.length);const n=s.merge(i.bracketIds),r=this.parseList(n,t+1),d=this.tokenizer.peek();return d&&d.kind===2&&(d.bracketId===i.bracketId||d.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),_.PairAstNode.create(i.astNode,r,d.astNode)):_.PairAstNode.create(i.astNode,r,null)}default:throw new Error("unexpected")}}}}),define(J[199],ee([1,0,11,121,174,88,123]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=void 0;class b{constructor(t,i,n,r,d){this.length=t,this.kind=i,this.bracketId=n,this.bracketIds=r,this.astNode=d}}e.Token=b;class S{constructor(t,i){this.textModel=t,this.bracketTokens=i,this.reader=new g(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=S;class g{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 d=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,D.lengthGetColumnCountIfZeroLineCount)(d.length),d}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 n=0;for(;;){const d=this.lineTokens,h=d.getCount();let o=null;if(this.lineTokenOffset<h){const c=d.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<h&&c===d.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const a=k.TokenMetadata.getTokenType(c)===0,l=k.TokenMetadata.containsBalancedBrackets(c),u=d.getEndOffset(this.lineTokenOffset);if(l&&a&&this.lineCharOffset<u){const v=d.getLanguageId(this.lineTokenOffset),f=this.line.substring(this.lineCharOffset,u),p=this.bracketTokens.getSingleLanguageBracketTokens(v),C=p.regExpGlobal;if(C){C.lastIndex=0;const y=C.exec(f);y&&(o=p.getToken(y[0]),o&&(this.lineCharOffset+=y.index))}}if(n+=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,n+=33,n>1e3))break;if(n>1500)break}const r=(0,D.lengthDiff)(t,i,this.lineIdx,this.lineCharOffset);return new b(r,0,-1,w.SmallImmutableSet.getEmpty(),new L.TextAstNode(r))}}class m{constructor(t,i){this.text=t,this._offset=D.lengthZero,this.idx=0;const n=i.getRegExpStr(),r=n?new RegExp(n+`|\n`,"gi"):null,d=[];let h,o=0,c=0,a=0,l=0;const u=[];for(let p=0;p<60;p++)u.push(new b((0,D.toLength)(0,p),0,-1,w.SmallImmutableSet.getEmpty(),new L.TextAstNode((0,D.toLength)(0,p))));const v=[];for(let p=0;p<60;p++)v.push(new b((0,D.toLength)(1,p),0,-1,w.SmallImmutableSet.getEmpty(),new L.TextAstNode((0,D.toLength)(1,p))));if(r)for(r.lastIndex=0;(h=r.exec(t))!==null;){const p=h.index,C=h[0];if(C===`\n`)o++,c=p+1;else{if(a!==p){let y;if(l===o){const E=p-a;if(E<u.length)y=u[E];else{const I=(0,D.toLength)(0,E);y=new b(I,0,-1,w.SmallImmutableSet.getEmpty(),new L.TextAstNode(I))}}else{const E=o-l,I=p-c;if(E===1&&I<v.length)y=v[I];else{const T=(0,D.toLength)(E,I);y=new b(T,0,-1,w.SmallImmutableSet.getEmpty(),new L.TextAstNode(T))}}d.push(y)}d.push(i.getToken(C)),a=p+C.length,l=o}}const f=t.length;if(a!==f){const p=l===o?(0,D.toLength)(0,f-a):(0,D.toLength)(o-l,f-c);d.push(new b(p,0,-1,w.SmallImmutableSet.getEmpty(),new L.TextAstNode(p)))}this.length=(0,D.toLength)(o,f-c),this.tokens=d}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(t){throw new _.NotSupportedError}}e.FastTokenizer=m}),define(J[267],ee([1,0,9,174,88,123,199]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class b{static createFromLanguage(s,t){function i(r){return t.getKey(`${r.languageId}:::${r.bracketText}`)}const n=new Map;for(const r of s.bracketsNew.openingBrackets){const d=(0,L.toLength)(0,r.bracketText.length),h=i(r),o=D.SmallImmutableSet.getEmpty().add(h,D.identityKeyProvider);n.set(r.bracketText,new w.Token(d,1,h,o,k.BracketAstNode.create(d,r,o)))}for(const r of s.bracketsNew.closingBrackets){const d=(0,L.toLength)(0,r.bracketText.length);let h=D.SmallImmutableSet.getEmpty();const o=r.getOpeningBrackets();for(const c of o)h=h.add(i(c),D.identityKeyProvider);n.set(r.bracketText,new w.Token(d,2,i(o[0]),h,k.BracketAstNode.create(d,r,h)))}return new b(n)}constructor(s){this.map=s,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const s=[...this.map.keys()];return s.sort(),s.reverse(),s.map(t=>S(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const s=this.getRegExpStr();this._regExpGlobal=s?new RegExp(s,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(s){return this.map.get(s.toLowerCase())}findClosingTokenText(s){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(s))return t}get isEmpty(){return this.map.size===0}}e.BracketTokens=b;function S(m){let s=(0,_.escapeRegExpCharacters)(m);return/^[\\w ]+/.test(m)&&(s=`\\\\b${s}`),/[\\w ]+$/.test(m)&&(s=`${s}\\\\b`),s}class g{constructor(s,t){this.denseKeyProvider=s,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(s){return this.languageIdToBracketTokens.has(s)}getSingleLanguageBracketTokens(s){let t=this.languageIdToBracketTokens.get(s);return t||(t=b.createFromLanguage(this.getLanguageConfiguration(s),this.denseKeyProvider),this.languageIdToBracketTokens.set(s,t)),t}}e.LanguageAgnosticBracketTokens=g}),define(J[493],ee([1,0,267,88,266,123,199]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function b(g,m){const s=new D.DenseKeyProvider,t=new _.LanguageAgnosticBracketTokens(s,o=>m.getLanguageConfiguration(o)),i=new w.TextBufferTokenizer(new S([g]),t),n=(0,L.parseDocument)(i,[],void 0,!0);let r="";const d=g.getLineContent();function h(o,c){if(o.kind===2)if(h(o.openingBracket,c),c=(0,k.lengthAdd)(c,o.openingBracket.length),o.child&&(h(o.child,c),c=(0,k.lengthAdd)(c,o.child.length)),o.closingBracket)h(o.closingBracket,c),c=(0,k.lengthAdd)(c,o.closingBracket.length);else{const l=t.getSingleLanguageBracketTokens(o.openingBracket.languageId).findClosingTokenText(o.openingBracket.bracketIds);r+=l}else if(o.kind!==3){if(o.kind===0||o.kind===1)r+=d.substring((0,k.lengthGetColumnCountIfZeroLineCount)(c),(0,k.lengthGetColumnCountIfZeroLineCount)((0,k.lengthAdd)(c,o.length)));else if(o.kind===4)for(const a of o.children)h(a,c),c=(0,k.lengthAdd)(c,a.length)}}return h(n,k.lengthZero),r}e.fixBracketsInLine=b;class S{constructor(m){this.lines=m,this.tokenization={getLineTokens:s=>this.lines[s-1]}}getLineCount(){return this.lines.length}getLineLength(m){return this.lines[m-1].getLineContent().length}}}),define(J[494],ee([1,0,16]),function(j,e,_){"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,S){if(w>=this._store.length)return;if(b===0){this.insert(w,S);return}else if(S===0){this.delete(w,b);return}const g=this._store.slice(0,w),m=this._store.slice(w+b),s=L(S,this._default);this._store=g.concat(s,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 S=[];for(let g=0;g<b;g++)S[g]=this._default;this._store=(0,_.arrayInsert)(this._store,w,S)}}e.FixedArray=k;function L(D,w){const b=[];for(let S=0;S<D;S++)b[S]=w;return b}}),define(J[495],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class _{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function k(D,w,b,S,g){g.spacesDiff=0,g.looksLikeAlignment=!1;let m;for(m=0;m<w&&m<S;m++){const h=D.charCodeAt(m),o=b.charCodeAt(m);if(h!==o)break}let s=0,t=0;for(let h=m;h<w;h++)D.charCodeAt(h)===32?s++:t++;let i=0,n=0;for(let h=m;h<S;h++)b.charCodeAt(h)===32?i++:n++;if(s>0&&t>0||i>0&&n>0)return;const r=Math.abs(t-n),d=Math.abs(s-i);if(r===0){g.spacesDiff=d,d>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&&(g.looksLikeAlignment=!0);return}if(d%r===0){g.spacesDiff=d/r;return}}function L(D,w,b){const S=Math.min(D.getLineCount(),1e4);let g=0,m=0,s="",t=0;const i=[2,4,6,8,3,5,7],n=8,r=[0,0,0,0,0,0,0,0,0],d=new _;for(let c=1;c<=S;c++){const a=D.getLineLength(c),l=D.getLineContent(c),u=a<=65536;let v=!1,f=0,p=0,C=0;for(let E=0,I=a;E<I;E++){const T=u?l.charCodeAt(E):D.getLineCharCode(c,E);if(T===9)C++;else if(T===32)p++;else{v=!0,f=E;break}}if(!v||(C>0?g++:p>1&&m++,k(s,t,l,f,d),d.looksLikeAlignment&&!(b&&w===d.spacesDiff)))continue;const y=d.spacesDiff;y<=n&&r[y]++,s=l,t=f}let h=b;g!==m&&(h=g<m);let o=w;if(h){let c=h?0:.1*S;i.forEach(a=>{const l=r[a];l>c&&(c=l,o=a)}),o===4&&r[4]>0&&r[2]>0&&r[2]>=r[4]/2&&(o=2)}return{insertSpaces:h,tabSize:o}}e.guessIndentation=L}),define(J[496],ee([1,0]),function(j,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 _(x){return(x.metadata&1)>>>0}e.getNodeColor=_;function k(x,F){x.metadata=x.metadata&254|F<<0}function L(x){return(x.metadata&2)>>>1===1}function D(x,F){x.metadata=x.metadata&253|(F?1:0)<<1}function w(x){return(x.metadata&4)>>>2===1}function b(x,F){x.metadata=x.metadata&251|(F?1:0)<<2}function S(x){return(x.metadata&64)>>>6===1}function g(x,F){x.metadata=x.metadata&191|(F?1:0)<<6}function m(x){return(x.metadata&24)>>>3}function s(x,F){x.metadata=x.metadata&231|F<<3}function t(x){return(x.metadata&32)>>>5===1}function i(x,F){x.metadata=x.metadata&223|(F?1:0)<<5}class n{constructor(F,B,V){this.metadata=0,this.parent=this,this.left=this,this.right=this,k(this,1),this.start=B,this.end=V,this.delta=0,this.maxEnd=V,this.id=F,this.ownerId=0,this.options=null,b(this,!1),g(this,!1),s(this,1),i(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=B,this.cachedAbsoluteEnd=V,this.range=null,D(this,!1)}reset(F,B,V,K){this.start=B,this.end=V,this.maxEnd=V,this.cachedVersionId=F,this.cachedAbsoluteStart=B,this.cachedAbsoluteEnd=V,this.range=K}setOptions(F){this.options=F;const B=this.options.className;b(this,B==="squiggly-error"||B==="squiggly-warning"||B==="squiggly-info"),g(this,this.options.glyphMarginClassName!==null),s(this,this.options.stickiness),i(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(F,B,V){this.cachedVersionId!==V&&(this.range=null),this.cachedVersionId=V,this.cachedAbsoluteStart=F,this.cachedAbsoluteEnd=B}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=n,e.SENTINEL=new n(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,k(e.SENTINEL,0);class r{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(F,B,V,K,A,Y){return this.root===e.SENTINEL?[]:f(this,F,B,V,K,A,Y)}search(F,B,V,K){return this.root===e.SENTINEL?[]:v(this,F,B,V,K)}collectNodesFromOwner(F){return l(this,F)}collectNodesPostOrder(){return u(this)}insert(F){p(this,F),this._normalizeDeltaIfNecessary()}delete(F){y(this,F),this._normalizeDeltaIfNecessary()}resolveNode(F,B){const V=F;let K=0;for(;F!==this.root;)F===F.parent.right&&(K+=F.parent.delta),F=F.parent;const A=V.start+K,Y=V.end+K;V.setCachedOffsets(A,Y,B)}acceptReplace(F,B,V,K){const A=c(this,F,F+B);for(let Y=0,ie=A.length;Y<ie;Y++){const le=A[Y];y(this,le)}this._normalizeDeltaIfNecessary(),a(this,F,F+B,V),this._normalizeDeltaIfNecessary();for(let Y=0,ie=A.length;Y<ie;Y++){const le=A[Y];le.start=le.cachedAbsoluteStart,le.end=le.cachedAbsoluteEnd,o(le,F,F+B,V,K),le.maxEnd=le.end,p(this,le)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,d(this))}}e.IntervalTree=r;function d(x){let F=x.root,B=0;for(;F!==e.SENTINEL;){if(F.left!==e.SENTINEL&&!L(F.left)){F=F.left;continue}if(F.right!==e.SENTINEL&&!L(F.right)){B+=F.delta,F=F.right;continue}F.start=B+F.start,F.end=B+F.end,F.delta=0,M(F),D(F,!0),D(F.left,!1),D(F.right,!1),F===F.parent.right&&(B-=F.parent.delta),F=F.parent}D(x.root,!1)}function h(x,F,B,V){return x<B?!0:x>B||V===1?!1:V===2?!0:F}function o(x,F,B,V,K){const A=m(x),Y=A===0||A===2,ie=A===1||A===2,le=B-F,ne=V,se=Math.min(le,ne),H=x.start;let W=!1;const $=x.end;let Z=!1;F<=H&&$<=B&&t(x)&&(x.start=F,W=!0,x.end=F,Z=!0);{const re=K?1:le>0?2:0;!W&&h(H,Y,F,re)&&(W=!0),!Z&&h($,ie,F,re)&&(Z=!0)}if(se>0&&!K){const re=le>ne?2:0;!W&&h(H,Y,F+se,re)&&(W=!0),!Z&&h($,ie,F+se,re)&&(Z=!0)}{const re=K?1:0;!W&&h(H,Y,B,re)&&(x.start=F+ne,W=!0),!Z&&h($,ie,B,re)&&(x.end=F+ne,Z=!0)}const Q=ne-le;W||(x.start=Math.max(0,H+Q)),Z||(x.end=Math.max(0,$+Q)),x.start>x.end&&(x.end=x.start)}e.nodeAcceptEdit=o;function c(x,F,B){let V=x.root,K=0,A=0,Y=0,ie=0;const le=[];let ne=0;for(;V!==e.SENTINEL;){if(L(V)){D(V.left,!1),D(V.right,!1),V===V.parent.right&&(K-=V.parent.delta),V=V.parent;continue}if(!L(V.left)){if(A=K+V.maxEnd,A<F){D(V,!0);continue}if(V.left!==e.SENTINEL){V=V.left;continue}}if(Y=K+V.start,Y>B){D(V,!0);continue}if(ie=K+V.end,ie>=F&&(V.setCachedOffsets(Y,ie,0),le[ne++]=V),D(V,!0),V.right!==e.SENTINEL&&!L(V.right)){K+=V.delta,V=V.right;continue}}return D(x.root,!1),le}function a(x,F,B,V){let K=x.root,A=0,Y=0,ie=0;const le=V-(B-F);for(;K!==e.SENTINEL;){if(L(K)){D(K.left,!1),D(K.right,!1),K===K.parent.right&&(A-=K.parent.delta),M(K),K=K.parent;continue}if(!L(K.left)){if(Y=A+K.maxEnd,Y<F){D(K,!0);continue}if(K.left!==e.SENTINEL){K=K.left;continue}}if(ie=A+K.start,ie>B){K.start+=le,K.end+=le,K.delta+=le,(K.delta<-1073741824||K.delta>1073741824)&&(x.requestNormalizeDelta=!0),D(K,!0);continue}if(D(K,!0),K.right!==e.SENTINEL&&!L(K.right)){A+=K.delta,K=K.right;continue}}D(x.root,!1)}function l(x,F){let B=x.root;const V=[];let K=0;for(;B!==e.SENTINEL;){if(L(B)){D(B.left,!1),D(B.right,!1),B=B.parent;continue}if(B.left!==e.SENTINEL&&!L(B.left)){B=B.left;continue}if(B.ownerId===F&&(V[K++]=B),D(B,!0),B.right!==e.SENTINEL&&!L(B.right)){B=B.right;continue}}return D(x.root,!1),V}function u(x){let F=x.root;const B=[];let V=0;for(;F!==e.SENTINEL;){if(L(F)){D(F.left,!1),D(F.right,!1),F=F.parent;continue}if(F.left!==e.SENTINEL&&!L(F.left)){F=F.left;continue}if(F.right!==e.SENTINEL&&!L(F.right)){F=F.right;continue}B[V++]=F,D(F,!0)}return D(x.root,!1),B}function v(x,F,B,V,K){let A=x.root,Y=0,ie=0,le=0;const ne=[];let se=0;for(;A!==e.SENTINEL;){if(L(A)){D(A.left,!1),D(A.right,!1),A===A.parent.right&&(Y-=A.parent.delta),A=A.parent;continue}if(A.left!==e.SENTINEL&&!L(A.left)){A=A.left;continue}ie=Y+A.start,le=Y+A.end,A.setCachedOffsets(ie,le,V);let H=!0;if(F&&A.ownerId&&A.ownerId!==F&&(H=!1),B&&w(A)&&(H=!1),K&&!S(A)&&(H=!1),H&&(ne[se++]=A),D(A,!0),A.right!==e.SENTINEL&&!L(A.right)){Y+=A.delta,A=A.right;continue}}return D(x.root,!1),ne}function f(x,F,B,V,K,A,Y){let ie=x.root,le=0,ne=0,se=0,H=0;const W=[];let $=0;for(;ie!==e.SENTINEL;){if(L(ie)){D(ie.left,!1),D(ie.right,!1),ie===ie.parent.right&&(le-=ie.parent.delta),ie=ie.parent;continue}if(!L(ie.left)){if(ne=le+ie.maxEnd,ne<F){D(ie,!0);continue}if(ie.left!==e.SENTINEL){ie=ie.left;continue}}if(se=le+ie.start,se>B){D(ie,!0);continue}if(H=le+ie.end,H>=F){ie.setCachedOffsets(se,H,A);let Z=!0;V&&ie.ownerId&&ie.ownerId!==V&&(Z=!1),K&&w(ie)&&(Z=!1),Y&&!S(ie)&&(Z=!1),Z&&(W[$++]=ie)}if(D(ie,!0),ie.right!==e.SENTINEL&&!L(ie.right)){le+=ie.delta,ie=ie.right;continue}}return D(x.root,!1),W}function p(x,F){if(x.root===e.SENTINEL)return F.parent=e.SENTINEL,F.left=e.SENTINEL,F.right=e.SENTINEL,k(F,0),x.root=F,x.root;C(x,F),N(F.parent);let B=F;for(;B!==x.root&&_(B.parent)===1;)if(B.parent===B.parent.parent.left){const V=B.parent.parent.right;_(V)===1?(k(B.parent,0),k(V,0),k(B.parent.parent,1),B=B.parent.parent):(B===B.parent.right&&(B=B.parent,T(x,B)),k(B.parent,0),k(B.parent.parent,1),O(x,B.parent.parent))}else{const V=B.parent.parent.left;_(V)===1?(k(B.parent,0),k(V,0),k(B.parent.parent,1),B=B.parent.parent):(B===B.parent.left&&(B=B.parent,O(x,B)),k(B.parent,0),k(B.parent.parent,1),T(x,B.parent.parent))}return k(x.root,0),F}function C(x,F){let B=0,V=x.root;const K=F.start,A=F.end;for(;;)if(P(K,A,V.start+B,V.end+B)<0)if(V.left===e.SENTINEL){F.start-=B,F.end-=B,F.maxEnd-=B,V.left=F;break}else V=V.left;else if(V.right===e.SENTINEL){F.start-=B+V.delta,F.end-=B+V.delta,F.maxEnd-=B+V.delta,V.right=F;break}else B+=V.delta,V=V.right;F.parent=V,F.left=e.SENTINEL,F.right=e.SENTINEL,k(F,1)}function y(x,F){let B,V;if(F.left===e.SENTINEL?(B=F.right,V=F,B.delta+=F.delta,(B.delta<-1073741824||B.delta>1073741824)&&(x.requestNormalizeDelta=!0),B.start+=F.delta,B.end+=F.delta):F.right===e.SENTINEL?(B=F.left,V=F):(V=E(F.right),B=V.right,B.start+=V.delta,B.end+=V.delta,B.delta+=V.delta,(B.delta<-1073741824||B.delta>1073741824)&&(x.requestNormalizeDelta=!0),V.start+=F.delta,V.end+=F.delta,V.delta=F.delta,(V.delta<-1073741824||V.delta>1073741824)&&(x.requestNormalizeDelta=!0)),V===x.root){x.root=B,k(B,0),F.detach(),I(),M(B),x.root.parent=e.SENTINEL;return}const K=_(V)===1;if(V===V.parent.left?V.parent.left=B:V.parent.right=B,V===F?B.parent=V.parent:(V.parent===F?B.parent=V:B.parent=V.parent,V.left=F.left,V.right=F.right,V.parent=F.parent,k(V,_(F)),F===x.root?x.root=V:F===F.parent.left?F.parent.left=V:F.parent.right=V,V.left!==e.SENTINEL&&(V.left.parent=V),V.right!==e.SENTINEL&&(V.right.parent=V)),F.detach(),K){N(B.parent),V!==F&&(N(V),N(V.parent)),I();return}N(B),N(B.parent),V!==F&&(N(V),N(V.parent));let A;for(;B!==x.root&&_(B)===0;)B===B.parent.left?(A=B.parent.right,_(A)===1&&(k(A,0),k(B.parent,1),T(x,B.parent),A=B.parent.right),_(A.left)===0&&_(A.right)===0?(k(A,1),B=B.parent):(_(A.right)===0&&(k(A.left,0),k(A,1),O(x,A),A=B.parent.right),k(A,_(B.parent)),k(B.parent,0),k(A.right,0),T(x,B.parent),B=x.root)):(A=B.parent.left,_(A)===1&&(k(A,0),k(B.parent,1),O(x,B.parent),A=B.parent.left),_(A.left)===0&&_(A.right)===0?(k(A,1),B=B.parent):(_(A.left)===0&&(k(A.right,0),k(A,1),T(x,A),A=B.parent.left),k(A,_(B.parent)),k(B.parent,0),k(A.left,0),O(x,B.parent),B=x.root));k(B,0),I()}function E(x){for(;x.left!==e.SENTINEL;)x=x.left;return x}function I(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function T(x,F){const B=F.right;B.delta+=F.delta,(B.delta<-1073741824||B.delta>1073741824)&&(x.requestNormalizeDelta=!0),B.start+=F.delta,B.end+=F.delta,F.right=B.left,B.left!==e.SENTINEL&&(B.left.parent=F),B.parent=F.parent,F.parent===e.SENTINEL?x.root=B:F===F.parent.left?F.parent.left=B:F.parent.right=B,B.left=F,F.parent=B,M(F),M(B)}function O(x,F){const B=F.left;F.delta-=B.delta,(F.delta<-1073741824||F.delta>1073741824)&&(x.requestNormalizeDelta=!0),F.start-=B.delta,F.end-=B.delta,F.left=B.right,B.right!==e.SENTINEL&&(B.right.parent=F),B.parent=F.parent,F.parent===e.SENTINEL?x.root=B:F===F.parent.right?F.parent.right=B:F.parent.left=B,B.right=F,F.parent=B,M(F),M(B)}function R(x){let F=x.end;if(x.left!==e.SENTINEL){const B=x.left.maxEnd;B>F&&(F=B)}if(x.right!==e.SENTINEL){const B=x.right.maxEnd+x.delta;B>F&&(F=B)}return F}function M(x){x.maxEnd=R(x)}e.recomputeMaxEnd=M;function N(x){for(;x!==e.SENTINEL;){const F=R(x);if(x.maxEnd===F)return;x.maxEnd=F,x=x.parent}}function P(x,F,B,V){return x===B?F-V:x-B}e.intervalCompare=P}),define(J[497],ee([1,0]),function(j,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 _{constructor(r,d){this.piece=r,this.color=d,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 L(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=_,e.SENTINEL=new _(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function k(n){for(;n.left!==e.SENTINEL;)n=n.left;return n}e.leftest=k;function L(n){for(;n.right!==e.SENTINEL;)n=n.right;return n}e.righttest=L;function D(n){return n===e.SENTINEL?0:n.size_left+n.piece.length+D(n.right)}function w(n){return n===e.SENTINEL?0:n.lf_left+n.piece.lineFeedCnt+w(n.right)}function b(){e.SENTINEL.parent=e.SENTINEL}function S(n,r){const d=r.right;d.size_left+=r.size_left+(r.piece?r.piece.length:0),d.lf_left+=r.lf_left+(r.piece?r.piece.lineFeedCnt:0),r.right=d.left,d.left!==e.SENTINEL&&(d.left.parent=r),d.parent=r.parent,r.parent===e.SENTINEL?n.root=d:r.parent.left===r?r.parent.left=d:r.parent.right=d,d.left=r,r.parent=d}e.leftRotate=S;function g(n,r){const d=r.left;r.left=d.right,d.right!==e.SENTINEL&&(d.right.parent=r),d.parent=r.parent,r.size_left-=d.size_left+(d.piece?d.piece.length:0),r.lf_left-=d.lf_left+(d.piece?d.piece.lineFeedCnt:0),r.parent===e.SENTINEL?n.root=d:r===r.parent.right?r.parent.right=d:r.parent.left=d,d.right=r,r.parent=d}e.rightRotate=g;function m(n,r){let d,h;if(r.left===e.SENTINEL?(h=r,d=h.right):r.right===e.SENTINEL?(h=r,d=h.left):(h=k(r.right),d=h.right),h===n.root){n.root=d,d.color=0,r.detach(),b(),n.root.parent=e.SENTINEL;return}const o=h.color===1;if(h===h.parent.left?h.parent.left=d:h.parent.right=d,h===r?(d.parent=h.parent,i(n,d)):(h.parent===r?d.parent=h:d.parent=h.parent,i(n,d),h.left=r.left,h.right=r.right,h.parent=r.parent,h.color=r.color,r===n.root?n.root=h:r===r.parent.left?r.parent.left=h:r.parent.right=h,h.left!==e.SENTINEL&&(h.left.parent=h),h.right!==e.SENTINEL&&(h.right.parent=h),h.size_left=r.size_left,h.lf_left=r.lf_left,i(n,h)),r.detach(),d.parent.left===d){const a=D(d),l=w(d);if(a!==d.parent.size_left||l!==d.parent.lf_left){const u=a-d.parent.size_left,v=l-d.parent.lf_left;d.parent.size_left=a,d.parent.lf_left=l,t(n,d.parent,u,v)}}if(i(n,d.parent),o){b();return}let c;for(;d!==n.root&&d.color===0;)d===d.parent.left?(c=d.parent.right,c.color===1&&(c.color=0,d.parent.color=1,S(n,d.parent),c=d.parent.right),c.left.color===0&&c.right.color===0?(c.color=1,d=d.parent):(c.right.color===0&&(c.left.color=0,c.color=1,g(n,c),c=d.parent.right),c.color=d.parent.color,d.parent.color=0,c.right.color=0,S(n,d.parent),d=n.root)):(c=d.parent.left,c.color===1&&(c.color=0,d.parent.color=1,g(n,d.parent),c=d.parent.left),c.left.color===0&&c.right.color===0?(c.color=1,d=d.parent):(c.left.color===0&&(c.right.color=0,c.color=1,S(n,c),c=d.parent.left),c.color=d.parent.color,d.parent.color=0,c.left.color=0,g(n,d.parent),d=n.root));d.color=0,b()}e.rbDelete=m;function s(n,r){for(i(n,r);r!==n.root&&r.parent.color===1;)if(r.parent===r.parent.parent.left){const d=r.parent.parent.right;d.color===1?(r.parent.color=0,d.color=0,r.parent.parent.color=1,r=r.parent.parent):(r===r.parent.right&&(r=r.parent,S(n,r)),r.parent.color=0,r.parent.parent.color=1,g(n,r.parent.parent))}else{const d=r.parent.parent.left;d.color===1?(r.parent.color=0,d.color=0,r.parent.parent.color=1,r=r.parent.parent):(r===r.parent.left&&(r=r.parent,g(n,r)),r.parent.color=0,r.parent.parent.color=1,S(n,r.parent.parent))}n.root.color=0}e.fixInsert=s;function t(n,r,d,h){for(;r!==n.root&&r!==e.SENTINEL;)r.parent.left===r&&(r.parent.size_left+=d,r.parent.lf_left+=h),r=r.parent}e.updateTreeMetadata=t;function i(n,r){let d=0,h=0;if(r!==n.root){for(;r!==n.root&&r===r.parent.right;)r=r.parent;if(r!==n.root)for(r=r.parent,d=D(r.left)-r.size_left,h=w(r.left)-r.lf_left,r.size_left+=d,r.lf_left+=h;r!==n.root&&(d!==0||h!==0);)r.parent.left===r&&(r.parent.size_left+=d,r.parent.lf_left+=h),r=r.parent}}e.recomputeTreeMetadata=i}),define(J[268],ee([1,0,16,163]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class L{constructor(S){this.values=S,this.prefixSum=new Uint32Array(S.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(S,g){S=(0,k.toUint32)(S);const m=this.values,s=this.prefixSum,t=g.length;return t===0?!1:(this.values=new Uint32Array(m.length+t),this.values.set(m.subarray(0,S),0),this.values.set(m.subarray(S),S+t),this.values.set(g,S),S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(S,g){return S=(0,k.toUint32)(S),g=(0,k.toUint32)(g),this.values[S]===g?!1:(this.values[S]=g,S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),!0)}removeValues(S,g){S=(0,k.toUint32)(S),g=(0,k.toUint32)(g);const m=this.values,s=this.prefixSum;if(S>=m.length)return!1;const t=m.length-S;return g>=t&&(g=t),g===0?!1:(this.values=new Uint32Array(m.length-g),this.values.set(m.subarray(0,S),0),this.values.set(m.subarray(S+g),S),this.prefixSum=new Uint32Array(this.values.length),S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(S){return S<0?0:(S=(0,k.toUint32)(S),this._getPrefixSum(S))}_getPrefixSum(S){if(S<=this.prefixSumValidIndex[0])return this.prefixSum[S];let g=this.prefixSumValidIndex[0]+1;g===0&&(this.prefixSum[0]=this.values[0],g++),S>=this.values.length&&(S=this.values.length-1);for(let m=g;m<=S;m++)this.prefixSum[m]=this.prefixSum[m-1]+this.values[m];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],S),this.prefixSum[S]}getIndexOf(S){S=Math.floor(S),this.getTotalSum();let g=0,m=this.values.length-1,s=0,t=0,i=0;for(;g<=m;)if(s=g+(m-g)/2|0,t=this.prefixSum[s],i=t-this.values[s],S<i)m=s-1;else if(S>=t)g=s+1;else break;return new w(s,S-i)}}e.PrefixSumComputer=L;class D{constructor(S){this._values=S,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(S){return this._ensureValid(),S===0?0:this._prefixSum[S-1]}getIndexOf(S){this._ensureValid();const g=this._indexBySum[S],m=g>0?this._prefixSum[g-1]:0;return new w(g,S-m)}removeValues(S,g){this._values.splice(S,g),this._invalidate(S)}insertValues(S,g){this._values=(0,_.arrayInsert)(this._values,S,g),this._invalidate(S)}_invalidate(S){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,S-1)}_ensureValid(){if(!this._isValid){for(let S=this._validEndIndex+1,g=this._values.length;S<g;S++){const m=this._values[S],s=S>0?this._prefixSum[S-1]:0;this._prefixSum[S]=s+m;for(let t=0;t<m;t++)this._indexBySum[s+t]=S}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(S,g){this._values[S]!==g&&(this._values[S]=g,this._invalidate(S))}}e.ConstantTimePrefixSumComputer=D;class w{constructor(S,g){this.index=S,this.remainder=g,this._prefixSumIndexOfResultBrand=void 0,this.index=S,this.remainder=g}}e.PrefixSumIndexOfResult=w}),define(J[498],ee([1,0,9,12,268]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class D{constructor(b,S,g,m){this._uri=b,this._lines=S,this._eol=g,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 S=b.changes;for(const g of S)this._acceptDeleteRange(g.range),this._acceptInsertText(new k.Position(g.range.startLineNumber,g.range.startColumn),g.text);this._versionId=b.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const b=this._eol.length,S=this._lines.length,g=new Uint32Array(S);for(let m=0;m<S;m++)g[m]=this._lines[m].length+b;this._lineStarts=new L.PrefixSumComputer(g)}}_setLineText(b,S){this._lines[b]=S,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,S){if(S.length===0)return;const g=(0,_.splitLines)(S);if(g.length===1){this._setLineText(b.lineNumber-1,this._lines[b.lineNumber-1].substring(0,b.column-1)+g[0]+this._lines[b.lineNumber-1].substring(b.column-1));return}g[g.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)+g[0]);const m=new Uint32Array(g.length-1);for(let s=1;s<g.length;s++)this._lines.splice(b.lineNumber+s-1,0,g[s]),m[s-1]=g[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(b.lineNumber,m)}}e.MirrorTextModel=D}),define(J[269],ee([1,0,2]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelPart=void 0;class k extends _.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[175],ee([1,0,9,139,12,5,46]),function(j,e,_,k,L,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 S{constructor(o,c,a,l){this.searchString=o,this.isRegex=c,this.matchCase=a,this.wordSeparators=l}parseSearchRequest(){if(this.searchString==="")return null;let o;this.isRegex?o=g(this.searchString):o=this.searchString.indexOf(`\n`)>=0;let c=null;try{c=_.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:o,global:!0,unicode:!0})}catch{return null}if(!c)return null;let a=!this.isRegex&&!o;return a&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(a=this.matchCase),new w.SearchData(c,this.wordSeparators?(0,k.getMapForWordSeparators)(this.wordSeparators):null,a?this.searchString:null)}}e.SearchParams=S;function g(h){if(!h||h.length===0)return!1;for(let o=0,c=h.length;o<c;o++){const a=h.charCodeAt(o);if(a===10)return!0;if(a===92){if(o++,o>=c)break;const l=h.charCodeAt(o);if(l===110||l===114||l===87)return!0}}return!1}e.isMultilineRegexSource=g;function m(h,o,c){if(!c)return new w.FindMatch(h,null);const a=[];for(let l=0,u=o.length;l<u;l++)a[l]=o[l];return new w.FindMatch(h,a)}e.createFindMatch=m;class s{constructor(o){const c=[];let a=0;for(let l=0,u=o.length;l<u;l++)o.charCodeAt(l)===10&&(c[a++]=l);this._lineFeedsOffsets=c}findLineFeedCountBeforeOffset(o){const c=this._lineFeedsOffsets;let a=0,l=c.length-1;if(l===-1||o<=c[0])return 0;for(;a<l;){const u=a+((l-a)/2>>0);c[u]>=o?l=u-1:c[u+1]>=o?(a=u,l=u):a=u+1}return a+1}}class t{static findMatches(o,c,a,l,u){const v=c.parseSearchRequest();return v?v.regex.multiline?this._doFindMatchesMultiline(o,a,new d(v.wordSeparators,v.regex),l,u):this._doFindMatchesLineByLine(o,a,v,l,u):[]}static _getMultilineMatchRange(o,c,a,l,u,v){let f,p=0;l?(p=l.findLineFeedCountBeforeOffset(u),f=c+u+p):f=c+u;let C;if(l){const T=l.findLineFeedCountBeforeOffset(u+v.length)-p;C=f+v.length+T}else C=f+v.length;const y=o.getPositionAt(f),E=o.getPositionAt(C);return new D.Range(y.lineNumber,y.column,E.lineNumber,E.column)}static _doFindMatchesMultiline(o,c,a,l,u){const v=o.getOffsetAt(c.getStartPosition()),f=o.getValueInRange(c,1),p=o.getEOL()===`\\r\n`?new s(f):null,C=[];let y=0,E;for(a.reset(0);E=a.next(f);)if(C[y++]=m(this._getMultilineMatchRange(o,v,f,p,E.index,E[0]),E,l),y>=u)return C;return C}static _doFindMatchesLineByLine(o,c,a,l,u){const v=[];let f=0;if(c.startLineNumber===c.endLineNumber){const C=o.getLineContent(c.startLineNumber).substring(c.startColumn-1,c.endColumn-1);return f=this._findMatchesInLine(a,C,c.startLineNumber,c.startColumn-1,f,v,l,u),v}const p=o.getLineContent(c.startLineNumber).substring(c.startColumn-1);f=this._findMatchesInLine(a,p,c.startLineNumber,c.startColumn-1,f,v,l,u);for(let C=c.startLineNumber+1;C<c.endLineNumber&&f<u;C++)f=this._findMatchesInLine(a,o.getLineContent(C),C,0,f,v,l,u);if(f<u){const C=o.getLineContent(c.endLineNumber).substring(0,c.endColumn-1);f=this._findMatchesInLine(a,C,c.endLineNumber,0,f,v,l,u)}return v}static _findMatchesInLine(o,c,a,l,u,v,f,p){const C=o.wordSeparators;if(!f&&o.simpleSearch){const I=o.simpleSearch,T=I.length,O=c.length;let R=-T;for(;(R=c.indexOf(I,R+T))!==-1;)if((!C||r(C,c,O,R,T))&&(v[u++]=new w.FindMatch(new D.Range(a,R+1+l,a,R+1+T+l),null),u>=p))return u;return u}const y=new d(o.wordSeparators,o.regex);let E;y.reset(0);do if(E=y.next(c),E&&(v[u++]=m(new D.Range(a,E.index+1+l,a,E.index+1+E[0].length+l),E,f),u>=p))return u;while(E);return u}static findNextMatch(o,c,a,l){const u=c.parseSearchRequest();if(!u)return null;const v=new d(u.wordSeparators,u.regex);return u.regex.multiline?this._doFindNextMatchMultiline(o,a,v,l):this._doFindNextMatchLineByLine(o,a,v,l)}static _doFindNextMatchMultiline(o,c,a,l){const u=new L.Position(c.lineNumber,1),v=o.getOffsetAt(u),f=o.getLineCount(),p=o.getValueInRange(new D.Range(u.lineNumber,u.column,f,o.getLineMaxColumn(f)),1),C=o.getEOL()===`\\r\n`?new s(p):null;a.reset(c.column-1);const y=a.next(p);return y?m(this._getMultilineMatchRange(o,v,p,C,y.index,y[0]),y,l):c.lineNumber!==1||c.column!==1?this._doFindNextMatchMultiline(o,new L.Position(1,1),a,l):null}static _doFindNextMatchLineByLine(o,c,a,l){const u=o.getLineCount(),v=c.lineNumber,f=o.getLineContent(v),p=this._findFirstMatchInLine(a,f,v,c.column,l);if(p)return p;for(let C=1;C<=u;C++){const y=(v+C-1)%u,E=o.getLineContent(y+1),I=this._findFirstMatchInLine(a,E,y+1,1,l);if(I)return I}return null}static _findFirstMatchInLine(o,c,a,l,u){o.reset(l-1);const v=o.next(c);return v?m(new D.Range(a,v.index+1,a,v.index+1+v[0].length),v,u):null}static findPreviousMatch(o,c,a,l){const u=c.parseSearchRequest();if(!u)return null;const v=new d(u.wordSeparators,u.regex);return u.regex.multiline?this._doFindPreviousMatchMultiline(o,a,v,l):this._doFindPreviousMatchLineByLine(o,a,v,l)}static _doFindPreviousMatchMultiline(o,c,a,l){const u=this._doFindMatchesMultiline(o,new D.Range(1,1,c.lineNumber,c.column),a,l,10*b);if(u.length>0)return u[u.length-1];const v=o.getLineCount();return c.lineNumber!==v||c.column!==o.getLineMaxColumn(v)?this._doFindPreviousMatchMultiline(o,new L.Position(v,o.getLineMaxColumn(v)),a,l):null}static _doFindPreviousMatchLineByLine(o,c,a,l){const u=o.getLineCount(),v=c.lineNumber,f=o.getLineContent(v).substring(0,c.column-1),p=this._findLastMatchInLine(a,f,v,l);if(p)return p;for(let C=1;C<=u;C++){const y=(u+v-C-1)%u,E=o.getLineContent(y+1),I=this._findLastMatchInLine(a,E,y+1,l);if(I)return I}return null}static _findLastMatchInLine(o,c,a,l){let u=null,v;for(o.reset(0);v=o.next(c);)u=m(new D.Range(a,v.index+1,a,v.index+1+v[0].length),v,l);return u}}e.TextModelSearch=t;function i(h,o,c,a,l){if(a===0)return!0;const u=o.charCodeAt(a-1);if(h.get(u)!==0||u===13||u===10)return!0;if(l>0){const v=o.charCodeAt(a);if(h.get(v)!==0)return!0}return!1}function n(h,o,c,a,l){if(a+l===c)return!0;const u=o.charCodeAt(a+l);if(h.get(u)!==0||u===13||u===10)return!0;if(l>0){const v=o.charCodeAt(a+l-1);if(h.get(v)!==0)return!0}return!1}function r(h,o,c,a,l){return i(h,o,c,a,l)&&n(h,o,c,a,l)}e.isValidMatch=r;class d{constructor(o,c){this._wordSeparators=o,this._searchRegex=c,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(o){this._searchRegex.lastIndex=o,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(o){const c=o.length;let a;do{if(this._prevMatchStartIndex+this._prevMatchLength===c||(a=this._searchRegex.exec(o),!a))return null;const l=a.index,u=a[0].length;if(l===this._prevMatchStartIndex&&u===this._prevMatchLength){if(u===0){_.getNextCodePoint(o,c,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=l,this._prevMatchLength=u,!this._wordSeparators||r(this._wordSeparators,o,c,l,u))return a}while(a);return null}}e.Searcher=d}),define(J[270],ee([1,0,12,5,46,497,175]),function(j,e,_,k,L,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 S(h){let o;return h[h.length-1]<65536?o=new Uint16Array(h.length):o=new Uint32Array(h.length),o.set(h,0),o}class g{constructor(o,c,a,l,u){this.lineStarts=o,this.cr=c,this.lf=a,this.crlf=l,this.isBasicASCII=u}}function m(h,o=!0){const c=[0];let a=1;for(let l=0,u=h.length;l<u;l++){const v=h.charCodeAt(l);v===13?l+1<u&&h.charCodeAt(l+1)===10?(c[a++]=l+2,l++):c[a++]=l+1:v===10&&(c[a++]=l+1)}return o?S(c):c}e.createLineStartsFast=m;function s(h,o){h.length=0,h[0]=0;let c=1,a=0,l=0,u=0,v=!0;for(let p=0,C=o.length;p<C;p++){const y=o.charCodeAt(p);y===13?p+1<C&&o.charCodeAt(p+1)===10?(u++,h[c++]=p+2,p++):(a++,h[c++]=p+1):y===10?(l++,h[c++]=p+1):v&&y!==9&&(y<32||y>126)&&(v=!1)}const f=new g(S(h),a,l,u,v);return h.length=0,f}e.createLineStarts=s;class t{constructor(o,c,a,l,u){this.bufferIndex=o,this.start=c,this.end=a,this.lineFeedCnt=l,this.length=u}}e.Piece=t;class i{constructor(o,c){this.buffer=o,this.lineStarts=c}}e.StringBuffer=i;class n{constructor(o,c){this._pieces=[],this._tree=o,this._BOM=c,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 c=this._cache.length-1;c>=0;c--){const a=this._cache[c];if(a.nodeStartOffset<=o&&a.nodeStartOffset+a.node.piece.length>=o)return a}return null}get2(o){for(let c=this._cache.length-1;c>=0;c--){const a=this._cache[c];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 c=!1;const a=this._cache;for(let l=0;l<a.length;l++){const u=a[l];if(u.node.parent===null||u.nodeStartOffset>=o){a[l]=null,c=!0;continue}}if(c){const l=[];for(const u of a)u!==null&&l.push(u);this._cache=l}}}class d{constructor(o,c,a){this.create(o,c,a)}create(o,c,a){this._buffers=[new i("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=D.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=c,this._EOLLength=c.length,this._EOLNormalized=a;let l=null;for(let u=0,v=o.length;u<v;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]),l=this.rbInsertRight(l,f)}this._searchCache=new r(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(o){const c=b,a=c-Math.floor(c/3),l=a*2;let u="",v=0;const f=[];if(this.iterate(this.root,p=>{const C=this.getNodeContent(p),y=C.length;if(v<=a||v+y<l)return u+=C,v+=y,!0;const E=u.replace(/\\r\\n|\\r|\\n/g,o);return f.push(new i(E,m(E))),u=C,v=y,!0}),v>0){const p=u.replace(/\\r\\n|\\r|\\n/g,o);f.push(new i(p,m(p)))}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 n(this,o)}getOffsetAt(o,c){let a=0,l=this.root;for(;l!==D.SENTINEL;)if(l.left!==D.SENTINEL&&l.lf_left+1>=o)l=l.left;else if(l.lf_left+l.piece.lineFeedCnt+1>=o){a+=l.size_left;const u=this.getAccumulatedValue(l,o-l.lf_left-2);return a+=u+c-1}else o-=l.lf_left+l.piece.lineFeedCnt,a+=l.size_left+l.piece.length,l=l.right;return a}getPositionAt(o){o=Math.floor(o),o=Math.max(0,o);let c=this.root,a=0;const l=o;for(;c!==D.SENTINEL;)if(c.size_left!==0&&c.size_left>=o)c=c.left;else if(c.size_left+c.piece.length>=o){const u=this.getIndexOf(c,o-c.size_left);if(a+=c.lf_left+u.index,u.index===0){const v=this.getOffsetAt(a+1,1),f=l-v;return new _.Position(a+1,f+1)}return new _.Position(a+1,u.remainder+1)}else if(o-=c.size_left+c.piece.length,a+=c.lf_left+c.piece.lineFeedCnt,c.right===D.SENTINEL){const u=this.getOffsetAt(a+1,1),v=l-o-u;return new _.Position(a+1,v+1)}else c=c.right;return new _.Position(1,1)}getValueInRange(o,c){if(o.startLineNumber===o.endLineNumber&&o.startColumn===o.endColumn)return"";const a=this.nodeAt2(o.startLineNumber,o.startColumn),l=this.nodeAt2(o.endLineNumber,o.endColumn),u=this.getValueInRange2(a,l);return c?c!==this._EOL||!this._EOLNormalized?u.replace(/\\r\\n|\\r|\\n/g,c):c===this.getEOL()&&this._EOLNormalized?u:u.replace(/\\r\\n|\\r|\\n/g,c):u}getValueInRange2(o,c){if(o.node===c.node){const f=o.node,p=this._buffers[f.piece.bufferIndex].buffer,C=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start);return p.substring(C+o.remainder,C+c.remainder)}let a=o.node;const l=this._buffers[a.piece.bufferIndex].buffer,u=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);let v=l.substring(u+o.remainder,u+a.piece.length);for(a=a.next();a!==D.SENTINEL;){const f=this._buffers[a.piece.bufferIndex].buffer,p=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);if(a===c.node){v+=f.substring(p,p+c.remainder);break}else v+=f.substr(p,a.piece.length);a=a.next()}return v}getLinesContent(){const o=[];let c=0,a="",l=!1;return this.iterate(this.root,u=>{if(u===D.SENTINEL)return!0;const v=u.piece;let f=v.length;if(f===0)return!0;const p=this._buffers[v.bufferIndex].buffer,C=this._buffers[v.bufferIndex].lineStarts,y=v.start.line,E=v.end.line;let I=C[y]+v.start.column;if(l&&(p.charCodeAt(I)===10&&(I++,f--),o[c++]=a,a="",l=!1,f===0))return!0;if(y===E)return!this._EOLNormalized&&p.charCodeAt(I+f-1)===13?(l=!0,a+=p.substr(I,f-1)):a+=p.substr(I,f),!0;a+=this._EOLNormalized?p.substring(I,Math.max(I,C[y+1]-this._EOLLength)):p.substring(I,C[y+1]).replace(/(\\r\\n|\\r|\\n)$/,""),o[c++]=a;for(let T=y+1;T<E;T++)a=this._EOLNormalized?p.substring(C[T],C[T+1]-this._EOLLength):p.substring(C[T],C[T+1]).replace(/(\\r\\n|\\r|\\n)$/,""),o[c++]=a;return!this._EOLNormalized&&p.charCodeAt(C[E]+v.end.column-1)===13?(l=!0,v.end.column===0?c--:a=p.substr(C[E],v.end.column-1)):a=p.substr(C[E],v.end.column),!0}),l&&(o[c++]=a,a=""),o[c++]=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 c=o.node.next();if(!c)return 0;const a=this._buffers[c.piece.bufferIndex],l=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);return a.buffer.charCodeAt(l)}else{const c=this._buffers[o.node.piece.bufferIndex],l=this.offsetInBuffer(o.node.piece.bufferIndex,o.node.piece.start)+o.remainder;return c.buffer.charCodeAt(l)}}getLineCharCode(o,c){const a=this.nodeAt2(o,c+1);return this._getCharCode(a)}getLineLength(o){if(o===this.getLineCount()){const c=this.getOffsetAt(o,1);return this.getLength()-c}return this.getOffsetAt(o+1,1)-this.getOffsetAt(o,1)-this._EOLLength}findMatchesInNode(o,c,a,l,u,v,f,p,C,y,E){const I=this._buffers[o.piece.bufferIndex],T=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start),O=this.offsetInBuffer(o.piece.bufferIndex,u),R=this.offsetInBuffer(o.piece.bufferIndex,v);let M;const N={line:0,column:0};let P,x;c._wordSeparators?(P=I.buffer.substring(O,R),x=F=>F+O,c.reset(0)):(P=I.buffer,x=F=>F,c.reset(O));do if(M=c.next(P),M){if(x(M.index)>=R)return y;this.positionInBuffer(o,x(M.index)-T,N);const F=this.getLineFeedCnt(o.piece.bufferIndex,u,N),B=N.line===u.line?N.column-u.column+l:N.column+1,V=B+M[0].length;if(E[y++]=(0,w.createFindMatch)(new k.Range(a+F,B,a+F,V),M,p),x(M.index)+M[0].length>=R||y>=C)return y}while(M);return y}findMatchesLineByLine(o,c,a,l){const u=[];let v=0;const f=new w.Searcher(c.wordSeparators,c.regex);let p=this.nodeAt2(o.startLineNumber,o.startColumn);if(p===null)return[];const C=this.nodeAt2(o.endLineNumber,o.endColumn);if(C===null)return[];let y=this.positionInBuffer(p.node,p.remainder);const E=this.positionInBuffer(C.node,C.remainder);if(p.node===C.node)return this.findMatchesInNode(p.node,f,o.startLineNumber,o.startColumn,y,E,c,a,l,v,u),u;let I=o.startLineNumber,T=p.node;for(;T!==C.node;){const R=this.getLineFeedCnt(T.piece.bufferIndex,y,T.piece.end);if(R>=1){const N=this._buffers[T.piece.bufferIndex].lineStarts,P=this.offsetInBuffer(T.piece.bufferIndex,T.piece.start),x=N[y.line+R],F=I===o.startLineNumber?o.startColumn:1;if(v=this.findMatchesInNode(T,f,I,F,y,this.positionInBuffer(T,x-P),c,a,l,v,u),v>=l)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 v=this._findMatchesInLine(c,f,N,o.endLineNumber,M,v,u,a,l),u}if(v=this._findMatchesInLine(c,f,this.getLineContent(I).substr(M),I,M,v,u,a,l),v>=l)return u;I++,p=this.nodeAt2(I,1),T=p.node,y=this.positionInBuffer(p.node,p.remainder)}if(I===o.endLineNumber){const R=I===o.startLineNumber?o.startColumn-1:0,M=this.getLineContent(I).substring(R,o.endColumn-1);return v=this._findMatchesInLine(c,f,M,o.endLineNumber,R,v,u,a,l),u}const O=I===o.startLineNumber?o.startColumn:1;return v=this.findMatchesInNode(C.node,f,I,O,y,E,c,a,l,v,u),u}_findMatchesInLine(o,c,a,l,u,v,f,p,C){const y=o.wordSeparators;if(!p&&o.simpleSearch){const I=o.simpleSearch,T=I.length,O=a.length;let R=-T;for(;(R=a.indexOf(I,R+T))!==-1;)if((!y||(0,w.isValidMatch)(y,a,O,R,T))&&(f[v++]=new L.FindMatch(new k.Range(l,R+1+u,l,R+1+T+u),null),v>=C))return v;return v}let E;c.reset(0);do if(E=c.next(a),E&&(f[v++]=(0,w.createFindMatch)(new k.Range(l,E.index+1+u,l,E.index+1+E[0].length+u),E,p),v>=C))return v;while(E);return v}insert(o,c,a=!1){if(this._EOLNormalized=this._EOLNormalized&&a,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==D.SENTINEL){const{node:l,remainder:u,nodeStartOffset:v}=this.nodeAt(o),f=l.piece,p=f.bufferIndex,C=this.positionInBuffer(l,u);if(l.piece.bufferIndex===0&&f.end.line===this._lastChangeBufferPos.line&&f.end.column===this._lastChangeBufferPos.column&&v+f.length===o&&c.length<b){this.appendToNode(l,c),this.computeBufferMetadata();return}if(v===o)this.insertContentToNodeLeft(c,l),this._searchCache.validate(o);else if(v+l.piece.length>o){const y=[];let E=new t(f.bufferIndex,C,f.end,this.getLineFeedCnt(f.bufferIndex,C,f.end),this.offsetInBuffer(p,f.end)-this.offsetInBuffer(p,C));if(this.shouldCheckCRLF()&&this.endWithCR(c)&&this.nodeCharCodeAt(l,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),c+=`\n`}if(this.shouldCheckCRLF()&&this.startWithLF(c))if(this.nodeCharCodeAt(l,u-1)===13){const R=this.positionInBuffer(l,u-1);this.deleteNodeTail(l,R),c="\\r"+c,l.piece.length===0&&y.push(l)}else this.deleteNodeTail(l,C);else this.deleteNodeTail(l,C);const I=this.createNewPieces(c);E.length>0&&this.rbInsertRight(l,E);let T=l;for(let O=0;O<I.length;O++)T=this.rbInsertRight(T,I[O]);this.deleteNodes(y)}else this.insertContentToNodeRight(c,l)}else{const l=this.createNewPieces(c);let u=this.rbInsertLeft(null,l[0]);for(let v=1;v<l.length;v++)u=this.rbInsertRight(u,l[v])}this.computeBufferMetadata()}delete(o,c){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",c<=0||this.root===D.SENTINEL)return;const a=this.nodeAt(o),l=this.nodeAt(o+c),u=a.node,v=l.node;if(u===v){const I=this.positionInBuffer(u,a.remainder),T=this.positionInBuffer(u,l.remainder);if(a.nodeStartOffset===o){if(c===u.piece.length){const O=u.next();(0,D.rbDelete)(this,u),this.validateCRLFWithPrevNode(O),this.computeBufferMetadata();return}this.deleteNodeHead(u,T),this._searchCache.validate(o),this.validateCRLFWithPrevNode(u),this.computeBufferMetadata();return}if(a.nodeStartOffset+u.piece.length===o+c){this.deleteNodeTail(u,I),this.validateCRLFWithNextNode(u),this.computeBufferMetadata();return}this.shrinkNode(u,I,T),this.computeBufferMetadata();return}const f=[],p=this.positionInBuffer(u,a.remainder);this.deleteNodeTail(u,p),this._searchCache.validate(o),u.piece.length===0&&f.push(u);const C=this.positionInBuffer(v,l.remainder);this.deleteNodeHead(v,C),v.piece.length===0&&f.push(v);const y=u.next();for(let I=y;I!==D.SENTINEL&&I!==v;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,c){const a=[];if(this.shouldCheckCRLF()&&this.endWithCR(o)&&this.startWithLF(c)){const v=c.piece,f={line:v.start.line+1,column:0},p=new t(v.bufferIndex,f,v.end,this.getLineFeedCnt(v.bufferIndex,f,v.end),v.length-1);c.piece=p,o+=`\n`,(0,D.updateTreeMetadata)(this,c,-1,-1),c.piece.length===0&&a.push(c)}const l=this.createNewPieces(o);let u=this.rbInsertLeft(c,l[l.length-1]);for(let v=l.length-2;v>=0;v--)u=this.rbInsertLeft(u,l[v]);this.validateCRLFWithPrevNode(u),this.deleteNodes(a)}insertContentToNodeRight(o,c){this.adjustCarriageReturnFromNext(o,c)&&(o+=`\n`);const a=this.createNewPieces(o),l=this.rbInsertRight(c,a[0]);let u=l;for(let v=1;v<a.length;v++)u=this.rbInsertRight(u,a[v]);this.validateCRLFWithPrevNode(l)}positionInBuffer(o,c,a){const l=o.piece,u=o.piece.bufferIndex,v=this._buffers[u].lineStarts,p=v[l.start.line]+l.start.column+c;let C=l.start.line,y=l.end.line,E=0,I=0,T=0;for(;C<=y&&(E=C+(y-C)/2|0,T=v[E],E!==y);)if(I=v[E+1],p<T)y=E-1;else if(p>=I)C=E+1;else break;return a?(a.line=E,a.column=p-T,null):{line:E,column:p-T}}getLineFeedCnt(o,c,a){if(a.column===0)return a.line-c.line;const l=this._buffers[o].lineStarts;if(a.line===l.length-1)return a.line-c.line;const u=l[a.line+1],v=l[a.line]+a.column;if(u>v+1)return a.line-c.line;const f=v-1;return this._buffers[o].buffer.charCodeAt(f)===13?a.line-c.line+1:a.line-c.line}offsetInBuffer(o,c){return this._buffers[o].lineStarts[c.line]+c.column}deleteNodes(o){for(let c=0;c<o.length;c++)(0,D.rbDelete)(this,o[c])}createNewPieces(o){if(o.length>b){const y=[];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 O=m(T);y.push(new t(this._buffers.length,{line:0,column:0},{line:O.length-1,column:T.length-O[O.length-1]},O.length-1,T.length)),this._buffers.push(new i(T,O))}const E=m(o);return y.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)),y}let c=this._buffers[0].buffer.length;const a=m(o,!1);let l=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===c&&c!==0&&this.startWithLF(o)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},l=this._lastChangeBufferPos;for(let y=0;y<a.length;y++)a[y]+=c+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1)),this._buffers[0].buffer+="_"+o,c+=1}else{if(c!==0)for(let y=0;y<a.length;y++)a[y]+=c;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1)),this._buffers[0].buffer+=o}const u=this._buffers[0].buffer.length,v=this._buffers[0].lineStarts.length-1,f=u-this._buffers[0].lineStarts[v],p={line:v,column:f},C=new t(0,l,p,this.getLineFeedCnt(0,l,p),u-c);return this._lastChangeBufferPos=p,[C]}getLineRawContent(o,c=0){let a=this.root,l="";const u=this._searchCache.get2(o);if(u){a=u.node;const v=this.getAccumulatedValue(a,o-u.nodeStartLineNumber-1),f=this._buffers[a.piece.bufferIndex].buffer,p=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);if(u.nodeStartLineNumber+a.piece.lineFeedCnt===o)l=f.substring(p+v,p+a.piece.length);else{const C=this.getAccumulatedValue(a,o-u.nodeStartLineNumber);return f.substring(p+v,p+C-c)}}else{let v=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 p=this.getAccumulatedValue(a,o-a.lf_left-2),C=this.getAccumulatedValue(a,o-a.lf_left-1),y=this._buffers[a.piece.bufferIndex].buffer,E=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return v+=a.size_left,this._searchCache.set({node:a,nodeStartOffset:v,nodeStartLineNumber:f-(o-1-a.lf_left)}),y.substring(E+p,E+C-c)}else if(a.lf_left+a.piece.lineFeedCnt===o-1){const p=this.getAccumulatedValue(a,o-a.lf_left-2),C=this._buffers[a.piece.bufferIndex].buffer,y=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);l=C.substring(y+p,y+a.piece.length);break}else o-=a.lf_left+a.piece.lineFeedCnt,v+=a.size_left+a.piece.length,a=a.right}for(a=a.next();a!==D.SENTINEL;){const v=this._buffers[a.piece.bufferIndex].buffer;if(a.piece.lineFeedCnt>0){const f=this.getAccumulatedValue(a,0),p=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l+=v.substring(p,p+f-c),l}else{const f=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);l+=v.substr(f,a.piece.length)}a=a.next()}return l}computeBufferMetadata(){let o=this.root,c=1,a=0;for(;o!==D.SENTINEL;)c+=o.lf_left+o.piece.lineFeedCnt,a+=o.size_left+o.piece.length,o=o.right;this._lineCnt=c,this._length=a,this._searchCache.validate(this._length)}getIndexOf(o,c){const a=o.piece,l=this.positionInBuffer(o,c),u=l.line-a.start.line;if(this.offsetInBuffer(a.bufferIndex,a.end)-this.offsetInBuffer(a.bufferIndex,a.start)===c){const v=this.getLineFeedCnt(o.piece.bufferIndex,a.start,l);if(v!==u)return{index:v,remainder:0}}return{index:u,remainder:l.column}}getAccumulatedValue(o,c){if(c<0)return 0;const a=o.piece,l=this._buffers[a.bufferIndex].lineStarts,u=a.start.line+c+1;return u>a.end.line?l[a.end.line]+a.end.column-l[a.start.line]-a.start.column:l[u]-l[a.start.line]-a.start.column}deleteNodeTail(o,c){const a=o.piece,l=a.lineFeedCnt,u=this.offsetInBuffer(a.bufferIndex,a.end),v=c,f=this.offsetInBuffer(a.bufferIndex,v),p=this.getLineFeedCnt(a.bufferIndex,a.start,v),C=p-l,y=f-u,E=a.length+y;o.piece=new t(a.bufferIndex,a.start,v,p,E),(0,D.updateTreeMetadata)(this,o,y,C)}deleteNodeHead(o,c){const a=o.piece,l=a.lineFeedCnt,u=this.offsetInBuffer(a.bufferIndex,a.start),v=c,f=this.getLineFeedCnt(a.bufferIndex,v,a.end),p=this.offsetInBuffer(a.bufferIndex,v),C=f-l,y=u-p,E=a.length+y;o.piece=new t(a.bufferIndex,v,a.end,f,E),(0,D.updateTreeMetadata)(this,o,y,C)}shrinkNode(o,c,a){const l=o.piece,u=l.start,v=l.end,f=l.length,p=l.lineFeedCnt,C=c,y=this.getLineFeedCnt(l.bufferIndex,l.start,C),E=this.offsetInBuffer(l.bufferIndex,c)-this.offsetInBuffer(l.bufferIndex,u);o.piece=new t(l.bufferIndex,l.start,C,y,E),(0,D.updateTreeMetadata)(this,o,E-f,y-p);const I=new t(l.bufferIndex,a,v,this.getLineFeedCnt(l.bufferIndex,a,v),this.offsetInBuffer(l.bufferIndex,v)-this.offsetInBuffer(l.bufferIndex,a)),T=this.rbInsertRight(o,I);this.validateCRLFWithPrevNode(T)}appendToNode(o,c){this.adjustCarriageReturnFromNext(c,o)&&(c+=`\n`);const a=this.shouldCheckCRLF()&&this.startWithLF(c)&&this.endWithCR(o),l=this._buffers[0].buffer.length;this._buffers[0].buffer+=c;const u=m(c,!1);for(let T=0;T<u.length;T++)u[T]+=l;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:l-T}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(u.slice(1));const v=this._buffers[0].lineStarts.length-1,f=this._buffers[0].buffer.length-this._buffers[0].lineStarts[v],p={line:v,column:f},C=o.piece.length+c.length,y=o.piece.lineFeedCnt,E=this.getLineFeedCnt(0,o.piece.start,p),I=E-y;o.piece=new t(o.piece.bufferIndex,o.piece.start,p,E,C),this._lastChangeBufferPos=p,(0,D.updateTreeMetadata)(this,o,c.length,I)}nodeAt(o){let c=this.root;const a=this._searchCache.get(o);if(a)return{node:a.node,nodeStartOffset:a.nodeStartOffset,remainder:o-a.nodeStartOffset};let l=0;for(;c!==D.SENTINEL;)if(c.size_left>o)c=c.left;else if(c.size_left+c.piece.length>=o){l+=c.size_left;const u={node:c,remainder:o-c.size_left,nodeStartOffset:l};return this._searchCache.set(u),u}else o-=c.size_left+c.piece.length,l+=c.size_left+c.piece.length,c=c.right;return null}nodeAt2(o,c){let a=this.root,l=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),v=this.getAccumulatedValue(a,o-a.lf_left-1);return l+=a.size_left,{node:a,remainder:Math.min(u+c-1,v),nodeStartOffset:l}}else if(a.lf_left+a.piece.lineFeedCnt===o-1){const u=this.getAccumulatedValue(a,o-a.lf_left-2);if(u+c-1<=a.piece.length)return{node:a,remainder:u+c-1,nodeStartOffset:l};c-=a.piece.length-u;break}else o-=a.lf_left+a.piece.lineFeedCnt,l+=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),v=this.offsetOfNode(a);return{node:a,remainder:Math.min(c-1,u),nodeStartOffset:v}}else if(a.piece.length>=c-1){const u=this.offsetOfNode(a);return{node:a,remainder:c-1,nodeStartOffset:u}}else c-=a.piece.length;a=a.next()}return null}nodeCharCodeAt(o,c){if(o.piece.lineFeedCnt<1)return-1;const a=this._buffers[o.piece.bufferIndex],l=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start)+c;return a.buffer.charCodeAt(l)}offsetOfNode(o){if(!o)return 0;let c=o.size_left;for(;o!==this.root;)o.parent.right===o&&(c+=o.parent.size_left+o.parent.piece.length),o=o.parent;return c}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 c=o.piece,a=this._buffers[c.bufferIndex].lineStarts,l=c.start.line,u=a[l]+c.start.column;return l===a.length-1||a[l+1]>u+1?!1:this._buffers[c.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 c=o.prev();this.endWithCR(c)&&this.fixCRLF(c,o)}}validateCRLFWithNextNode(o){if(this.shouldCheckCRLF()&&this.endWithCR(o)){const c=o.next();this.startWithLF(c)&&this.fixCRLF(o,c)}}fixCRLF(o,c){const a=[],l=this._buffers[o.piece.bufferIndex].lineStarts;let u;o.piece.end.column===0?u={line:o.piece.end.line-1,column:l[o.piece.end.line]-l[o.piece.end.line-1]-1}:u={line:o.piece.end.line,column:o.piece.end.column-1};const v=o.piece.length-1,f=o.piece.lineFeedCnt-1;o.piece=new t(o.piece.bufferIndex,o.piece.start,u,f,v),(0,D.updateTreeMetadata)(this,o,-1,-1),o.piece.length===0&&a.push(o);const p={line:c.piece.start.line+1,column:0},C=c.piece.length-1,y=this.getLineFeedCnt(c.piece.bufferIndex,p,c.piece.end);c.piece=new t(c.piece.bufferIndex,p,c.piece.end,y,C),(0,D.updateTreeMetadata)(this,c,-1,-1),c.piece.length===0&&a.push(c);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,c){if(this.shouldCheckCRLF()&&this.endWithCR(o)){const a=c.next();if(this.startWithLF(a)){if(o+=`\n`,a.piece.length===1)(0,D.rbDelete)(this,a);else{const l=a.piece,u={line:l.start.line+1,column:0},v=l.length-1,f=this.getLineFeedCnt(l.bufferIndex,u,l.end);a.piece=new t(l.bufferIndex,u,l.end,f,v),(0,D.updateTreeMetadata)(this,a,-1,-1)}return!0}}return!1}iterate(o,c){if(o===D.SENTINEL)return c(D.SENTINEL);const a=this.iterate(o.left,c);return a&&c(o)&&this.iterate(o.right,c)}getNodeContent(o){if(o===D.SENTINEL)return"";const c=this._buffers[o.piece.bufferIndex],a=o.piece,l=this.offsetInBuffer(a.bufferIndex,a.start),u=this.offsetInBuffer(a.bufferIndex,a.end);return c.buffer.substring(l,u)}getPieceContent(o){const c=this._buffers[o.bufferIndex],a=this.offsetInBuffer(o.bufferIndex,o.start),l=this.offsetInBuffer(o.bufferIndex,o.end);return c.buffer.substring(a,l)}rbInsertRight(o,c){const a=new D.TreeNode(c,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,c){const a=new D.TreeNode(c,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 l=(0,D.righttest)(o.left);l.right=a,a.parent=l}return(0,D.fixInsert)(this,a),a}}e.PieceTreeBase=d}),define(J[200],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeIndentLevel=void 0;function _(k,L){let D=0,w=0;const b=k.length;for(;w<b;){const S=k.charCodeAt(w);if(S===32)D++;else if(S===9)D=D-D%L+L;else break;w++}return w===b?-1:D}e.computeIndentLevel=_}),define(J[271],ee([1,0,81,12,46]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputPosition=e.InjectedText=e.ModelLineProjectionData=void 0;class D{constructor(s,t,i,n,r){this.injectionOffsets=s,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(s){return s>0?this.wrappedTextIndentLength:0}getLineLength(s){const t=s>0?this.breakOffsets[s-1]:0;let n=this.breakOffsets[s]-t;return s>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(s){return this.getLineLength(s)}translateToInputOffset(s,t){s>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let n=s===0?t:this.breakOffsets[s-1]+t;if(this.injectionOffsets!==null)for(let r=0;r<this.injectionOffsets.length&&n>this.injectionOffsets[r];r++)n<this.injectionOffsets[r]+this.injectionOptions[r].content.length?n=this.injectionOffsets[r]:n-=this.injectionOptions[r].content.length;return n}translateToOutputPosition(s,t=2){let i=s;if(this.injectionOffsets!==null)for(let n=0;n<this.injectionOffsets.length&&!(s<this.injectionOffsets[n]||t!==1&&s===this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,t)}offsetInInputWithInjectionsToOutputPosition(s,t=2){let i=0,n=this.breakOffsets.length-1,r=0,d=0;for(;i<=n;){r=i+(n-i)/2|0;const o=this.breakOffsets[r];if(d=r>0?this.breakOffsets[r-1]:0,t===0)if(s<=d)n=r-1;else if(s>o)i=r+1;else break;else if(s<d)n=r-1;else if(s>=o)i=r+1;else break}let h=s-d;return r>0&&(h+=this.wrappedTextIndentLength),new g(r,h)}normalizeOutputPosition(s,t,i){if(this.injectionOffsets!==null){const n=this.outputPositionToOffsetInInputWithInjections(s,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(r!==n)return this.offsetInInputWithInjectionsToOutputPosition(r,i)}if(i===0){if(s>0&&t===this.getMinOutputOffset(s))return new g(s-1,this.getMaxOutputOffset(s-1))}else if(i===1){const n=this.getOutputLineCount()-1;if(s<n&&t===this.getMaxOutputOffset(s))return new g(s+1,this.getMinOutputOffset(s+1))}return new g(s,t)}outputPositionToOffsetInInputWithInjections(s,t){return s>0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(s>0?this.breakOffsets[s-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(s,t){const i=this.getInjectedTextAtOffset(s);if(!i)return s;if(t===2){if(s===i.offsetInInputWithInjections+i.length&&w(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let n=i.offsetInInputWithInjections;if(b(this.injectionOptions[i.injectedTextIndex].cursorStops))return n;let r=i.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[i.injectedTextIndex]&&!(w(this.injectionOptions[r].cursorStops)||(n-=this.injectionOptions[r].content.length,b(this.injectionOptions[r].cursorStops)));)r--;return n}}else if(t===1||t===4){let n=i.offsetInInputWithInjections+i.length,r=i.injectedTextIndex;for(;r+1<this.injectionOffsets.length&&this.injectionOffsets[r+1]===this.injectionOffsets[r];)n+=this.injectionOptions[r+1].content.length,r++;return n}else if(t===0||t===3){let n=i.offsetInInputWithInjections,r=i.injectedTextIndex;for(;r-1>=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)n-=this.injectionOptions[r-1].content.length,r--;return n}(0,_.assertNever)(t)}getInjectedText(s,t){const i=this.outputPositionToOffsetInInputWithInjections(s,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(s){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let r=0;r<t.length;r++){const d=i[r].content.length,h=t[r]+n,o=t[r]+n+d;if(h>s)break;if(s<=o)return{injectedTextIndex:r,offsetInInputWithInjections:h,length:d};n+=d}}}}e.ModelLineProjectionData=D;function w(m){return m==null?!0:m===L.InjectedTextCursorStops.Right||m===L.InjectedTextCursorStops.Both}function b(m){return m==null?!0:m===L.InjectedTextCursorStops.Left||m===L.InjectedTextCursorStops.Both}class S{constructor(s){this.options=s}}e.InjectedText=S;class g{constructor(s,t){this.outputLineIndex=s,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(s){return new k.Position(s+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=g}),define(J[272],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DraggedTreeItemsIdentifier=e.TreeViewsDnDService=void 0;class _{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(D){if(D&&this._dragOperations.has(D)){const w=this._dragOperations.get(D);return this._dragOperations.delete(D),w}}}e.TreeViewsDnDService=_;class k{constructor(D){this.identifier=D}}e.DraggedTreeItemsIdentifier=k}),define(J[273],ee([1,0,5,175,9,81,140]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeTextModelHighlighter=void 0;class b{static computeUnicodeHighlights(t,i,n){const r=n?n.startLineNumber:1,d=n?n.endLineNumber:t.getLineCount(),h=new g(i),o=h.getCandidateCodePoints();let c;o==="allNonBasicAscii"?c=new RegExp("[^\\\\t\\\\n\\\\r\\\\x20-\\\\x7E]","g"):c=new RegExp(`${S(Array.from(o))}`,"g");const a=new k.Searcher(null,c),l=[];let u=!1,v,f=0,p=0,C=0;e:for(let y=r,E=d;y<=E;y++){const I=t.getLineContent(y),T=I.length;a.reset(0);do if(v=a.next(I),v){let O=v.index,R=v.index+v[0].length;if(O>0){const x=I.charCodeAt(O-1);L.isHighSurrogate(x)&&O--}if(R+1<T){const x=I.charCodeAt(R-1);L.isHighSurrogate(x)&&R++}const M=I.substring(O,R);let N=(0,w.getWordAtText)(O+1,w.DEFAULT_WORD_REGEXP,I,0);N&&N.endColumn<=O+1&&(N=null);const P=h.shouldHighlightNonBasicASCII(M,N?N.word:null);if(P!==0){P===3?f++:P===2?p++:P===1?C++:(0,D.assertNever)(P);const x=1e3;if(l.length>=x){u=!0;break e}l.push(new _.Range(y,O+1,y,R+1))}}while(v)}return{ranges:l,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(t,i){const n=new g(i);switch(n.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{const d=t.codePointAt(0),h=n.ambiguousCharacters.getPrimaryConfusable(d),o=L.AmbiguousCharacters.getLocales().filter(c=>!L.AmbiguousCharacters.getInstance(new Set([...i.allowedLocales,c])).isAmbiguous(d));return{kind:0,confusableWith:String.fromCodePoint(h),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}e.UnicodeTextModelHighlighter=b;function S(s,t){return`[${L.escapeRegExpCharacters(s.map(n=>String.fromCodePoint(n)).join(""))}]`}class g{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=L.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 L.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 n=t.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,d=!1;if(i)for(const h of i){const o=h.codePointAt(0),c=L.isBasicASCII(h);r=r||c,!c&&!this.ambiguousCharacters.isAmbiguous(o)&&!L.InvisibleCharacters.isInvisibleCharacter(o)&&(d=!0)}return!r&&d?0:this.options.invisibleCharacters&&!m(t)&&L.InvisibleCharacters.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function m(s){return s===" "||s===`\n`||s==="\t"}}),define(J[201],ee([1,0]),function(j,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.GlyphMarginLane=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 _;(function(A){A[A.Unknown=0]="Unknown",A[A.Disabled=1]="Disabled",A[A.Enabled=2]="Enabled"})(_||(e.AccessibilitySupport=_={}));var k;(function(A){A[A.Invoke=1]="Invoke",A[A.Auto=2]="Auto"})(k||(e.CodeActionTriggerType=k={}));var L;(function(A){A[A.None=0]="None",A[A.KeepWhitespace=1]="KeepWhitespace",A[A.InsertAsSnippet=4]="InsertAsSnippet"})(L||(e.CompletionItemInsertTextRule=L={}));var D;(function(A){A[A.Method=0]="Method",A[A.Function=1]="Function",A[A.Constructor=2]="Constructor",A[A.Field=3]="Field",A[A.Variable=4]="Variable",A[A.Class=5]="Class",A[A.Struct=6]="Struct",A[A.Interface=7]="Interface",A[A.Module=8]="Module",A[A.Property=9]="Property",A[A.Event=10]="Event",A[A.Operator=11]="Operator",A[A.Unit=12]="Unit",A[A.Value=13]="Value",A[A.Constant=14]="Constant",A[A.Enum=15]="Enum",A[A.EnumMember=16]="EnumMember",A[A.Keyword=17]="Keyword",A[A.Text=18]="Text",A[A.Color=19]="Color",A[A.File=20]="File",A[A.Reference=21]="Reference",A[A.Customcolor=22]="Customcolor",A[A.Folder=23]="Folder",A[A.TypeParameter=24]="TypeParameter",A[A.User=25]="User",A[A.Issue=26]="Issue",A[A.Snippet=27]="Snippet"})(D||(e.CompletionItemKind=D={}));var w;(function(A){A[A.Deprecated=1]="Deprecated"})(w||(e.CompletionItemTag=w={}));var b;(function(A){A[A.Invoke=0]="Invoke",A[A.TriggerCharacter=1]="TriggerCharacter",A[A.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(b||(e.CompletionTriggerKind=b={}));var S;(function(A){A[A.EXACT=0]="EXACT",A[A.ABOVE=1]="ABOVE",A[A.BELOW=2]="BELOW"})(S||(e.ContentWidgetPositionPreference=S={}));var g;(function(A){A[A.NotSet=0]="NotSet",A[A.ContentFlush=1]="ContentFlush",A[A.RecoverFromMarkers=2]="RecoverFromMarkers",A[A.Explicit=3]="Explicit",A[A.Paste=4]="Paste",A[A.Undo=5]="Undo",A[A.Redo=6]="Redo"})(g||(e.CursorChangeReason=g={}));var m;(function(A){A[A.LF=1]="LF",A[A.CRLF=2]="CRLF"})(m||(e.DefaultEndOfLine=m={}));var s;(function(A){A[A.Text=0]="Text",A[A.Read=1]="Read",A[A.Write=2]="Write"})(s||(e.DocumentHighlightKind=s={}));var t;(function(A){A[A.None=0]="None",A[A.Keep=1]="Keep",A[A.Brackets=2]="Brackets",A[A.Advanced=3]="Advanced",A[A.Full=4]="Full"})(t||(e.EditorAutoIndentStrategy=t={}));var i;(function(A){A[A.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",A[A.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",A[A.accessibilitySupport=2]="accessibilitySupport",A[A.accessibilityPageSize=3]="accessibilityPageSize",A[A.ariaLabel=4]="ariaLabel",A[A.autoClosingBrackets=5]="autoClosingBrackets",A[A.screenReaderAnnounceInlineSuggestion=6]="screenReaderAnnounceInlineSuggestion",A[A.autoClosingDelete=7]="autoClosingDelete",A[A.autoClosingOvertype=8]="autoClosingOvertype",A[A.autoClosingQuotes=9]="autoClosingQuotes",A[A.autoIndent=10]="autoIndent",A[A.automaticLayout=11]="automaticLayout",A[A.autoSurround=12]="autoSurround",A[A.bracketPairColorization=13]="bracketPairColorization",A[A.guides=14]="guides",A[A.codeLens=15]="codeLens",A[A.codeLensFontFamily=16]="codeLensFontFamily",A[A.codeLensFontSize=17]="codeLensFontSize",A[A.colorDecorators=18]="colorDecorators",A[A.colorDecoratorsLimit=19]="colorDecoratorsLimit",A[A.columnSelection=20]="columnSelection",A[A.comments=21]="comments",A[A.contextmenu=22]="contextmenu",A[A.copyWithSyntaxHighlighting=23]="copyWithSyntaxHighlighting",A[A.cursorBlinking=24]="cursorBlinking",A[A.cursorSmoothCaretAnimation=25]="cursorSmoothCaretAnimation",A[A.cursorStyle=26]="cursorStyle",A[A.cursorSurroundingLines=27]="cursorSurroundingLines",A[A.cursorSurroundingLinesStyle=28]="cursorSurroundingLinesStyle",A[A.cursorWidth=29]="cursorWidth",A[A.disableLayerHinting=30]="disableLayerHinting",A[A.disableMonospaceOptimizations=31]="disableMonospaceOptimizations",A[A.domReadOnly=32]="domReadOnly",A[A.dragAndDrop=33]="dragAndDrop",A[A.dropIntoEditor=34]="dropIntoEditor",A[A.emptySelectionClipboard=35]="emptySelectionClipboard",A[A.experimentalWhitespaceRendering=36]="experimentalWhitespaceRendering",A[A.extraEditorClassName=37]="extraEditorClassName",A[A.fastScrollSensitivity=38]="fastScrollSensitivity",A[A.find=39]="find",A[A.fixedOverflowWidgets=40]="fixedOverflowWidgets",A[A.folding=41]="folding",A[A.foldingStrategy=42]="foldingStrategy",A[A.foldingHighlight=43]="foldingHighlight",A[A.foldingImportsByDefault=44]="foldingImportsByDefault",A[A.foldingMaximumRegions=45]="foldingMaximumRegions",A[A.unfoldOnClickAfterEndOfLine=46]="unfoldOnClickAfterEndOfLine",A[A.fontFamily=47]="fontFamily",A[A.fontInfo=48]="fontInfo",A[A.fontLigatures=49]="fontLigatures",A[A.fontSize=50]="fontSize",A[A.fontWeight=51]="fontWeight",A[A.fontVariations=52]="fontVariations",A[A.formatOnPaste=53]="formatOnPaste",A[A.formatOnType=54]="formatOnType",A[A.glyphMargin=55]="glyphMargin",A[A.gotoLocation=56]="gotoLocation",A[A.hideCursorInOverviewRuler=57]="hideCursorInOverviewRuler",A[A.hover=58]="hover",A[A.inDiffEditor=59]="inDiffEditor",A[A.inlineSuggest=60]="inlineSuggest",A[A.letterSpacing=61]="letterSpacing",A[A.lightbulb=62]="lightbulb",A[A.lineDecorationsWidth=63]="lineDecorationsWidth",A[A.lineHeight=64]="lineHeight",A[A.lineNumbers=65]="lineNumbers",A[A.lineNumbersMinChars=66]="lineNumbersMinChars",A[A.linkedEditing=67]="linkedEditing",A[A.links=68]="links",A[A.matchBrackets=69]="matchBrackets",A[A.minimap=70]="minimap",A[A.mouseStyle=71]="mouseStyle",A[A.mouseWheelScrollSensitivity=72]="mouseWheelScrollSensitivity",A[A.mouseWheelZoom=73]="mouseWheelZoom",A[A.multiCursorMergeOverlapping=74]="multiCursorMergeOverlapping",A[A.multiCursorModifier=75]="multiCursorModifier",A[A.multiCursorPaste=76]="multiCursorPaste",A[A.multiCursorLimit=77]="multiCursorLimit",A[A.occurrencesHighlight=78]="occurrencesHighlight",A[A.overviewRulerBorder=79]="overviewRulerBorder",A[A.overviewRulerLanes=80]="overviewRulerLanes",A[A.padding=81]="padding",A[A.pasteAs=82]="pasteAs",A[A.parameterHints=83]="parameterHints",A[A.peekWidgetDefaultFocus=84]="peekWidgetDefaultFocus",A[A.definitionLinkOpensInPeek=85]="definitionLinkOpensInPeek",A[A.quickSuggestions=86]="quickSuggestions",A[A.quickSuggestionsDelay=87]="quickSuggestionsDelay",A[A.readOnly=88]="readOnly",A[A.renameOnType=89]="renameOnType",A[A.renderControlCharacters=90]="renderControlCharacters",A[A.renderFinalNewline=91]="renderFinalNewline",A[A.renderLineHighlight=92]="renderLineHighlight",A[A.renderLineHighlightOnlyWhenFocus=93]="renderLineHighlightOnlyWhenFocus",A[A.renderValidationDecorations=94]="renderValidationDecorations",A[A.renderWhitespace=95]="renderWhitespace",A[A.revealHorizontalRightPadding=96]="revealHorizontalRightPadding",A[A.roundedSelection=97]="roundedSelection",A[A.rulers=98]="rulers",A[A.scrollbar=99]="scrollbar",A[A.scrollBeyondLastColumn=100]="scrollBeyondLastColumn",A[A.scrollBeyondLastLine=101]="scrollBeyondLastLine",A[A.scrollPredominantAxis=102]="scrollPredominantAxis",A[A.selectionClipboard=103]="selectionClipboard",A[A.selectionHighlight=104]="selectionHighlight",A[A.selectOnLineNumbers=105]="selectOnLineNumbers",A[A.showFoldingControls=106]="showFoldingControls",A[A.showUnused=107]="showUnused",A[A.snippetSuggestions=108]="snippetSuggestions",A[A.smartSelect=109]="smartSelect",A[A.smoothScrolling=110]="smoothScrolling",A[A.stickyScroll=111]="stickyScroll",A[A.stickyTabStops=112]="stickyTabStops",A[A.stopRenderingLineAfter=113]="stopRenderingLineAfter",A[A.suggest=114]="suggest",A[A.suggestFontSize=115]="suggestFontSize",A[A.suggestLineHeight=116]="suggestLineHeight",A[A.suggestOnTriggerCharacters=117]="suggestOnTriggerCharacters",A[A.suggestSelection=118]="suggestSelection",A[A.tabCompletion=119]="tabCompletion",A[A.tabIndex=120]="tabIndex",A[A.unicodeHighlighting=121]="unicodeHighlighting",A[A.unusualLineTerminators=122]="unusualLineTerminators",A[A.useShadowDOM=123]="useShadowDOM",A[A.useTabStops=124]="useTabStops",A[A.wordBreak=125]="wordBreak",A[A.wordSeparators=126]="wordSeparators",A[A.wordWrap=127]="wordWrap",A[A.wordWrapBreakAfterCharacters=128]="wordWrapBreakAfterCharacters",A[A.wordWrapBreakBeforeCharacters=129]="wordWrapBreakBeforeCharacters",A[A.wordWrapColumn=130]="wordWrapColumn",A[A.wordWrapOverride1=131]="wordWrapOverride1",A[A.wordWrapOverride2=132]="wordWrapOverride2",A[A.wrappingIndent=133]="wrappingIndent",A[A.wrappingStrategy=134]="wrappingStrategy",A[A.showDeprecated=135]="showDeprecated",A[A.inlayHints=136]="inlayHints",A[A.editorClassName=137]="editorClassName",A[A.pixelRatio=138]="pixelRatio",A[A.tabFocusMode=139]="tabFocusMode",A[A.layoutInfo=140]="layoutInfo",A[A.wrappingInfo=141]="wrappingInfo",A[A.defaultColorDecorators=142]="defaultColorDecorators"})(i||(e.EditorOption=i={}));var n;(function(A){A[A.TextDefined=0]="TextDefined",A[A.LF=1]="LF",A[A.CRLF=2]="CRLF"})(n||(e.EndOfLinePreference=n={}));var r;(function(A){A[A.LF=0]="LF",A[A.CRLF=1]="CRLF"})(r||(e.EndOfLineSequence=r={}));var d;(function(A){A[A.Left=1]="Left",A[A.Right=2]="Right"})(d||(e.GlyphMarginLane=d={}));var h;(function(A){A[A.None=0]="None",A[A.Indent=1]="Indent",A[A.IndentOutdent=2]="IndentOutdent",A[A.Outdent=3]="Outdent"})(h||(e.IndentAction=h={}));var o;(function(A){A[A.Both=0]="Both",A[A.Right=1]="Right",A[A.Left=2]="Left",A[A.None=3]="None"})(o||(e.InjectedTextCursorStops=o={}));var c;(function(A){A[A.Type=1]="Type",A[A.Parameter=2]="Parameter"})(c||(e.InlayHintKind=c={}));var a;(function(A){A[A.Automatic=0]="Automatic",A[A.Explicit=1]="Explicit"})(a||(e.InlineCompletionTriggerKind=a={}));var l;(function(A){A[A.DependsOnKbLayout=-1]="DependsOnKbLayout",A[A.Unknown=0]="Unknown",A[A.Backspace=1]="Backspace",A[A.Tab=2]="Tab",A[A.Enter=3]="Enter",A[A.Shift=4]="Shift",A[A.Ctrl=5]="Ctrl",A[A.Alt=6]="Alt",A[A.PauseBreak=7]="PauseBreak",A[A.CapsLock=8]="CapsLock",A[A.Escape=9]="Escape",A[A.Space=10]="Space",A[A.PageUp=11]="PageUp",A[A.PageDown=12]="PageDown",A[A.End=13]="End",A[A.Home=14]="Home",A[A.LeftArrow=15]="LeftArrow",A[A.UpArrow=16]="UpArrow",A[A.RightArrow=17]="RightArrow",A[A.DownArrow=18]="DownArrow",A[A.Insert=19]="Insert",A[A.Delete=20]="Delete",A[A.Digit0=21]="Digit0",A[A.Digit1=22]="Digit1",A[A.Digit2=23]="Digit2",A[A.Digit3=24]="Digit3",A[A.Digit4=25]="Digit4",A[A.Digit5=26]="Digit5",A[A.Digit6=27]="Digit6",A[A.Digit7=28]="Digit7",A[A.Digit8=29]="Digit8",A[A.Digit9=30]="Digit9",A[A.KeyA=31]="KeyA",A[A.KeyB=32]="KeyB",A[A.KeyC=33]="KeyC",A[A.KeyD=34]="KeyD",A[A.KeyE=35]="KeyE",A[A.KeyF=36]="KeyF",A[A.KeyG=37]="KeyG",A[A.KeyH=38]="KeyH",A[A.KeyI=39]="KeyI",A[A.KeyJ=40]="KeyJ",A[A.KeyK=41]="KeyK",A[A.KeyL=42]="KeyL",A[A.KeyM=43]="KeyM",A[A.KeyN=44]="KeyN",A[A.KeyO=45]="KeyO",A[A.KeyP=46]="KeyP",A[A.KeyQ=47]="KeyQ",A[A.KeyR=48]="KeyR",A[A.KeyS=49]="KeyS",A[A.KeyT=50]="KeyT",A[A.KeyU=51]="KeyU",A[A.KeyV=52]="KeyV",A[A.KeyW=53]="KeyW",A[A.KeyX=54]="KeyX",A[A.KeyY=55]="KeyY",A[A.KeyZ=56]="KeyZ",A[A.Meta=57]="Meta",A[A.ContextMenu=58]="ContextMenu",A[A.F1=59]="F1",A[A.F2=60]="F2",A[A.F3=61]="F3",A[A.F4=62]="F4",A[A.F5=63]="F5",A[A.F6=64]="F6",A[A.F7=65]="F7",A[A.F8=66]="F8",A[A.F9=67]="F9",A[A.F10=68]="F10",A[A.F11=69]="F11",A[A.F12=70]="F12",A[A.F13=71]="F13",A[A.F14=72]="F14",A[A.F15=73]="F15",A[A.F16=74]="F16",A[A.F17=75]="F17",A[A.F18=76]="F18",A[A.F19=77]="F19",A[A.F20=78]="F20",A[A.F21=79]="F21",A[A.F22=80]="F22",A[A.F23=81]="F23",A[A.F24=82]="F24",A[A.NumLock=83]="NumLock",A[A.ScrollLock=84]="ScrollLock",A[A.Semicolon=85]="Semicolon",A[A.Equal=86]="Equal",A[A.Comma=87]="Comma",A[A.Minus=88]="Minus",A[A.Period=89]="Period",A[A.Slash=90]="Slash",A[A.Backquote=91]="Backquote",A[A.BracketLeft=92]="BracketLeft",A[A.Backslash=93]="Backslash",A[A.BracketRight=94]="BracketRight",A[A.Quote=95]="Quote",A[A.OEM_8=96]="OEM_8",A[A.IntlBackslash=97]="IntlBackslash",A[A.Numpad0=98]="Numpad0",A[A.Numpad1=99]="Numpad1",A[A.Numpad2=100]="Numpad2",A[A.Numpad3=101]="Numpad3",A[A.Numpad4=102]="Numpad4",A[A.Numpad5=103]="Numpad5",A[A.Numpad6=104]="Numpad6",A[A.Numpad7=105]="Numpad7",A[A.Numpad8=106]="Numpad8",A[A.Numpad9=107]="Numpad9",A[A.NumpadMultiply=108]="NumpadMultiply",A[A.NumpadAdd=109]="NumpadAdd",A[A.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",A[A.NumpadSubtract=111]="NumpadSubtract",A[A.NumpadDecimal=112]="NumpadDecimal",A[A.NumpadDivide=113]="NumpadDivide",A[A.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",A[A.ABNT_C1=115]="ABNT_C1",A[A.ABNT_C2=116]="ABNT_C2",A[A.AudioVolumeMute=117]="AudioVolumeMute",A[A.AudioVolumeUp=118]="AudioVolumeUp",A[A.AudioVolumeDown=119]="AudioVolumeDown",A[A.BrowserSearch=120]="BrowserSearch",A[A.BrowserHome=121]="BrowserHome",A[A.BrowserBack=122]="BrowserBack",A[A.BrowserForward=123]="BrowserForward",A[A.MediaTrackNext=124]="MediaTrackNext",A[A.MediaTrackPrevious=125]="MediaTrackPrevious",A[A.MediaStop=126]="MediaStop",A[A.MediaPlayPause=127]="MediaPlayPause",A[A.LaunchMediaPlayer=128]="LaunchMediaPlayer",A[A.LaunchMail=129]="LaunchMail",A[A.LaunchApp2=130]="LaunchApp2",A[A.Clear=131]="Clear",A[A.MAX_VALUE=132]="MAX_VALUE"})(l||(e.KeyCode=l={}));var u;(function(A){A[A.Hint=1]="Hint",A[A.Info=2]="Info",A[A.Warning=4]="Warning",A[A.Error=8]="Error"})(u||(e.MarkerSeverity=u={}));var v;(function(A){A[A.Unnecessary=1]="Unnecessary",A[A.Deprecated=2]="Deprecated"})(v||(e.MarkerTag=v={}));var f;(function(A){A[A.Inline=1]="Inline",A[A.Gutter=2]="Gutter"})(f||(e.MinimapPosition=f={}));var p;(function(A){A[A.UNKNOWN=0]="UNKNOWN",A[A.TEXTAREA=1]="TEXTAREA",A[A.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",A[A.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",A[A.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",A[A.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",A[A.CONTENT_TEXT=6]="CONTENT_TEXT",A[A.CONTENT_EMPTY=7]="CONTENT_EMPTY",A[A.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",A[A.CONTENT_WIDGET=9]="CONTENT_WIDGET",A[A.OVERVIEW_RULER=10]="OVERVIEW_RULER",A[A.SCROLLBAR=11]="SCROLLBAR",A[A.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",A[A.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(p||(e.MouseTargetType=p={}));var C;(function(A){A[A.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",A[A.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",A[A.TOP_CENTER=2]="TOP_CENTER"})(C||(e.OverlayWidgetPositionPreference=C={}));var y;(function(A){A[A.Left=1]="Left",A[A.Center=2]="Center",A[A.Right=4]="Right",A[A.Full=7]="Full"})(y||(e.OverviewRulerLane=y={}));var E;(function(A){A[A.Left=0]="Left",A[A.Right=1]="Right",A[A.None=2]="None",A[A.LeftOfInjectedText=3]="LeftOfInjectedText",A[A.RightOfInjectedText=4]="RightOfInjectedText"})(E||(e.PositionAffinity=E={}));var I;(function(A){A[A.Off=0]="Off",A[A.On=1]="On",A[A.Relative=2]="Relative",A[A.Interval=3]="Interval",A[A.Custom=4]="Custom"})(I||(e.RenderLineNumbersType=I={}));var T;(function(A){A[A.None=0]="None",A[A.Text=1]="Text",A[A.Blocks=2]="Blocks"})(T||(e.RenderMinimap=T={}));var O;(function(A){A[A.Smooth=0]="Smooth",A[A.Immediate=1]="Immediate"})(O||(e.ScrollType=O={}));var R;(function(A){A[A.Auto=1]="Auto",A[A.Hidden=2]="Hidden",A[A.Visible=3]="Visible"})(R||(e.ScrollbarVisibility=R={}));var M;(function(A){A[A.LTR=0]="LTR",A[A.RTL=1]="RTL"})(M||(e.SelectionDirection=M={}));var N;(function(A){A[A.Invoke=1]="Invoke",A[A.TriggerCharacter=2]="TriggerCharacter",A[A.ContentChange=3]="ContentChange"})(N||(e.SignatureHelpTriggerKind=N={}));var P;(function(A){A[A.File=0]="File",A[A.Module=1]="Module",A[A.Namespace=2]="Namespace",A[A.Package=3]="Package",A[A.Class=4]="Class",A[A.Method=5]="Method",A[A.Property=6]="Property",A[A.Field=7]="Field",A[A.Constructor=8]="Constructor",A[A.Enum=9]="Enum",A[A.Interface=10]="Interface",A[A.Function=11]="Function",A[A.Variable=12]="Variable",A[A.Constant=13]="Constant",A[A.String=14]="String",A[A.Number=15]="Number",A[A.Boolean=16]="Boolean",A[A.Array=17]="Array",A[A.Object=18]="Object",A[A.Key=19]="Key",A[A.Null=20]="Null",A[A.EnumMember=21]="EnumMember",A[A.Struct=22]="Struct",A[A.Event=23]="Event",A[A.Operator=24]="Operator",A[A.TypeParameter=25]="TypeParameter"})(P||(e.SymbolKind=P={}));var x;(function(A){A[A.Deprecated=1]="Deprecated"})(x||(e.SymbolTag=x={}));var F;(function(A){A[A.Hidden=0]="Hidden",A[A.Blink=1]="Blink",A[A.Smooth=2]="Smooth",A[A.Phase=3]="Phase",A[A.Expand=4]="Expand",A[A.Solid=5]="Solid"})(F||(e.TextEditorCursorBlinkingStyle=F={}));var B;(function(A){A[A.Line=1]="Line",A[A.Block=2]="Block",A[A.Underline=3]="Underline",A[A.LineThin=4]="LineThin",A[A.BlockOutline=5]="BlockOutline",A[A.UnderlineThin=6]="UnderlineThin"})(B||(e.TextEditorCursorStyle=B={}));var V;(function(A){A[A.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",A[A.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",A[A.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",A[A.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(V||(e.TrackedRangeStickiness=V={}));var K;(function(A){A[A.None=0]="None",A[A.Same=1]="Same",A[A.Indent=2]="Indent",A[A.DeepIndent=3]="DeepIndent"})(K||(e.WrappingIndent=K={}))}),define(J[499],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class _{constructor(w,b,S,g){this.range=w,this.nestingLevel=b,this.nestingLevelOfEqualBracketType=S,this.isInvalid=g}}e.BracketInfo=_;class k{constructor(w,b,S,g,m,s){this.range=w,this.openingBracketRange=b,this.closingBracketRange=S,this.nestingLevel=g,this.nestingLevelOfEqualBracketType=m,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}e.BracketPairInfo=k;class L extends k{constructor(w,b,S,g,m,s,t){super(w,b,S,g,m,s),this.minVisibleColumnIndentation=t}}e.BracketPairWithMinIndentationInfo=L}),define(J[106],ee([1,0]),function(j,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 _{constructor(){this.changeType=1}}e.ModelRawFlush=_;class k{static applyInjectedText(t,i){if(!i||i.length===0)return t;let n="",r=0;for(const d of i)n+=t.substring(r,d.column-1),r=d.column-1,n+=d.options.content;return n+=t.substring(r),n}static fromDecorations(t){const i=[];for(const n of t)n.options.before&&n.options.before.content.length>0&&i.push(new k(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&i.push(new k(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return i.sort((n,r)=>n.lineNumber===r.lineNumber?n.column===r.column?n.order-r.order:n.column-r.column:n.lineNumber-r.lineNumber),i}constructor(t,i,n,r,d){this.ownerId=t,this.lineNumber=i,this.column=n,this.options=r,this.order=d}}e.LineInjectedText=k;class L{constructor(t,i,n){this.changeType=2,this.lineNumber=t,this.detail=i,this.injectedText=n}}e.ModelRawLineChanged=L;class D{constructor(t,i){this.changeType=3,this.fromLineNumber=t,this.toLineNumber=i}}e.ModelRawLinesDeleted=D;class w{constructor(t,i,n,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=t,this.toLineNumber=i,this.detail=n}}e.ModelRawLinesInserted=w;class b{constructor(){this.changeType=5}}e.ModelRawEOLChanged=b;class S{constructor(t,i,n,r){this.changes=t,this.versionId=i,this.isUndoing=n,this.isRedoing=r,this.resultingSelection=null}containsEvent(t){for(let i=0,n=this.changes.length;i<n;i++)if(this.changes[i].changeType===t)return!0;return!1}static merge(t,i){const n=[].concat(t.changes).concat(i.changes),r=i.versionId,d=t.isUndoing||i.isUndoing,h=t.isRedoing||i.isRedoing;return new S(n,r,d,h)}}e.ModelRawContentChangedEvent=S;class g{constructor(t){this.changes=t}}e.ModelInjectedTextChangedEvent=g;class m{constructor(t,i){this.rawContentChangedEvent=t,this.contentChangedEvent=i}merge(t){const i=S.merge(this.rawContentChangedEvent,t.rawContentChangedEvent),n=m._mergeChangeEvents(this.contentChangedEvent,t.contentChangedEvent);return new m(i,n)}static _mergeChangeEvents(t,i){const n=[].concat(t.changes).concat(i.changes),r=i.eol,d=i.versionId,h=t.isUndoing||i.isUndoing,o=t.isRedoing||i.isRedoing,c=t.isFlush||i.isFlush,a=t.isEolChange&&i.isEolChange;return{changes:n,eol:r,isEolChange:a,versionId:d,isUndoing:h,isRedoing:o,isFlush:c}}}e.InternalModelContentChangeEvent=m}),define(J[202],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuideHorizontalLine=e.IndentGuide=e.HorizontalGuidesState=void 0;var _;(function(D){D[D.Disabled=0]="Disabled",D[D.EnabledForActive=1]="EnabledForActive",D[D.Enabled=2]="Enabled"})(_||(e.HorizontalGuidesState=_={}));class k{constructor(w,b,S,g,m,s){if(this.visibleColumn=w,this.column=b,this.className=S,this.horizontalLine=g,this.forWrappedLinesAfterColumn=m,this.forWrappedLinesBeforeOrAtColumn=s,w!==-1==(b!==-1))throw new Error}}e.IndentGuide=k;class L{constructor(w,b){this.top=w,this.endColumn=b}}e.IndentGuideHorizontalLine=L}),define(J[274],ee([1,0,16,9,77,5,269,200,202,11]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairGuidesClassNames=e.GuidesTextModelPart=void 0;class m extends w.TextModelPart{constructor(i,n){super(),this.textModel=i,this.languageConfigurationService=n}getLanguageConfiguration(i){return this.languageConfigurationService.getLanguageConfiguration(i)}_computeIndentLevel(i){return(0,b.computeIndentLevel)(this.textModel.getLineContent(i+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(i,n,r){this.assertNotDisposed();const d=this.textModel.getLineCount();if(i<1||i>d)throw new g.BugIndicatingError("Illegal value for lineNumber");const h=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=!!(h&&h.offSide);let c=-2,a=-1,l=-2,u=-1;const v=P=>{if(c!==-1&&(c===-2||c>P-1)){c=-1,a=-1;for(let x=P-2;x>=0;x--){const F=this._computeIndentLevel(x);if(F>=0){c=x,a=F;break}}}if(l===-2){l=-1,u=-1;for(let x=P;x<d;x++){const F=this._computeIndentLevel(x);if(F>=0){l=x,u=F;break}}}};let f=-2,p=-1,C=-2,y=-1;const E=P=>{if(f===-2){f=-1,p=-1;for(let x=P-2;x>=0;x--){const F=this._computeIndentLevel(x);if(F>=0){f=x,p=F;break}}}if(C!==-1&&(C===-2||C<P-1)){C=-1,y=-1;for(let x=P;x<d;x++){const F=this._computeIndentLevel(x);if(F>=0){C=x,y=F;break}}}};let I=0,T=!0,O=0,R=!0,M=0,N=0;for(let P=0;T||R;P++){const x=i-P,F=i+P;P>1&&(x<1||x<n)&&(T=!1),P>1&&(F>d||F>r)&&(R=!1),P>5e4&&(T=!1,R=!1);let B=-1;if(T&&x>=1){const K=this._computeIndentLevel(x-1);K>=0?(l=x-1,u=K,B=Math.ceil(K/this.textModel.getOptions().indentSize)):(v(x),B=this._getIndentLevelForWhitespaceLine(o,a,u))}let V=-1;if(R&&F<=d){const K=this._computeIndentLevel(F-1);K>=0?(f=F-1,p=K,V=Math.ceil(K/this.textModel.getOptions().indentSize)):(E(F),V=this._getIndentLevelForWhitespaceLine(o,p,y))}if(P===0){N=B;continue}if(P===1){if(F<=d&&V>=0&&N+1===V){T=!1,I=F,O=F,M=V;continue}if(x>=1&&B>=0&&B-1===N){R=!1,I=x,O=x,M=B;continue}if(I=i,O=i,M=N,M===0)return{startLineNumber:I,endLineNumber:O,indent:M}}T&&(B>=M?I=x:T=!1),R&&(V>=M?O=F:R=!1)}return{startLineNumber:I,endLineNumber:O,indent:M}}getLinesBracketGuides(i,n,r,d){var h;const o=[];for(let f=i;f<=n;f++)o.push([]);const c=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new D.Range(i,1,n,this.textModel.getLineMaxColumn(n))).toArray();let l;if(r&&a.length>0){const f=(i<=r.lineNumber&&r.lineNumber<=n?a:this.textModel.bracketPairs.getBracketPairsInRange(D.Range.fromPositions(r)).toArray()).filter(p=>D.Range.strictContainsPosition(p.range,r));l=(h=(0,_.findLast)(f,p=>c||p.range.startLineNumber!==p.range.endLineNumber))===null||h===void 0?void 0:h.range}const u=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,v=new s;for(const f of a){if(!f.closingBracketRange)continue;const p=l&&f.range.equalsRange(l);if(!p&&!d.includeInactive)continue;const C=v.getInlineClassName(f.nestingLevel,f.nestingLevelOfEqualBracketType,u)+(d.highlightActive&&p?" "+v.activeClassName:""),y=f.openingBracketRange.getStartPosition(),E=f.closingBracketRange.getStartPosition(),I=d.horizontalGuides===S.HorizontalGuidesState.Enabled||d.horizontalGuides===S.HorizontalGuidesState.EnabledForActive&&p;if(f.range.startLineNumber===f.range.endLineNumber){c&&I&&o[f.range.startLineNumber-i].push(new S.IndentGuide(-1,f.openingBracketRange.getEndPosition().column,C,new S.IndentGuideHorizontalLine(!1,E.column),-1,-1));continue}const T=this.getVisibleColumnFromPosition(E),O=this.getVisibleColumnFromPosition(f.openingBracketRange.getStartPosition()),R=Math.min(O,T,f.minVisibleColumnIndentation+1);let M=!1;k.firstNonWhitespaceIndex(this.textModel.getLineContent(f.closingBracketRange.startLineNumber))<f.closingBracketRange.startColumn-1&&(M=!0);const x=Math.max(y.lineNumber,i),F=Math.min(E.lineNumber,n),B=M?1:0;for(let V=x;V<F+B;V++)o[V-i].push(new S.IndentGuide(R,-1,C,null,V===y.lineNumber?y.column:-1,V===E.lineNumber?E.column:-1));I&&(y.lineNumber>=i&&O>R&&o[y.lineNumber-i].push(new S.IndentGuide(R,-1,C,new S.IndentGuideHorizontalLine(!1,y.column),-1,-1)),E.lineNumber<=n&&T>R&&o[E.lineNumber-i].push(new S.IndentGuide(R,-1,C,new S.IndentGuideHorizontalLine(!M,E.column),-1,-1)))}for(const f of o)f.sort((p,C)=>p.visibleColumn-C.visibleColumn);return o}getVisibleColumnFromPosition(i){return L.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(i.lineNumber),i.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(i,n){this.assertNotDisposed();const r=this.textModel.getLineCount();if(i<1||i>r)throw new Error("Illegal value for startLineNumber");if(n<1||n>r)throw new Error("Illegal value for endLineNumber");const d=this.textModel.getOptions(),h=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=!!(h&&h.offSide),c=new Array(n-i+1);let a=-2,l=-1,u=-2,v=-1;for(let f=i;f<=n;f++){const p=f-i,C=this._computeIndentLevel(f-1);if(C>=0){a=f-1,l=C,c[p]=Math.ceil(C/d.indentSize);continue}if(a===-2){a=-1,l=-1;for(let y=f-2;y>=0;y--){const E=this._computeIndentLevel(y);if(E>=0){a=y,l=E;break}}}if(u!==-1&&(u===-2||u<f-1)){u=-1,v=-1;for(let y=f;y<r;y++){const E=this._computeIndentLevel(y);if(E>=0){u=y,v=E;break}}}c[p]=this._getIndentLevelForWhitespaceLine(o,l,v)}return c}_getIndentLevelForWhitespaceLine(i,n,r){const d=this.textModel.getOptions();return n===-1||r===-1?0:n<r?1+Math.floor(n/d.indentSize):n===r||i?Math.ceil(r/d.indentSize):1+Math.floor(r/d.indentSize)}}e.GuidesTextModelPart=m;class s{constructor(){this.activeClassName="indent-active"}getInlineClassName(i,n,r){return this.getInlineClassNameOfLevel(r?n:i)}getInlineClassNameOfLevel(i){return`bracket-indent-guide lvl-${i%30}`}}e.BracketPairGuidesClassNames=s}),define(J[500],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokens=void 0;class _{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(L,D){this._startLineNumber=L,this._tokens=D}getLineTokens(L){return this._tokens[L-this._startLineNumber]}appendLineTokens(L){this._tokens.push(L)}}e.ContiguousMultilineTokens=_}),define(J[275],ee([1,0,500]),function(j,e,_){"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 _.ContiguousMultilineTokens(D,[w]))}finalize(){return this._tokens}}e.ContiguousMultilineTokensBuilder=k}),define(J[89],ee([1,0,121]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class k{static createEmpty(w,b){const S=k.defaultTokenMetadata,g=new Uint32Array(2);return g[0]=w.length,g[1]=S,new k(g,w,b)}constructor(w,b,S){this._lineTokensBrand=void 0,this._tokens=w,this._tokensCount=this._tokens.length>>>1,this._text=b,this._languageIdCodec=S}equals(w){return w instanceof k?this.slicedEquals(w,0,this._tokensCount):!1}slicedEquals(w,b,S){if(this._text!==w._text||this._tokensCount!==w._tokensCount)return!1;const g=b<<1,m=g+(S<<1);for(let s=g;s<m;s++)if(this._tokens[s]!==w._tokens[s])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(S)}getStandardTokenType(w){const b=this._tokens[(w<<1)+1];return _.TokenMetadata.getTokenType(b)}getForeground(w){const b=this._tokens[(w<<1)+1];return _.TokenMetadata.getForeground(b)}getClassName(w){const b=this._tokens[(w<<1)+1];return _.TokenMetadata.getClassNameFromMetadata(b)}getInlineStyle(w,b){const S=this._tokens[(w<<1)+1];return _.TokenMetadata.getInlineStyleFromMetadata(S,b)}getPresentation(w){const b=this._tokens[(w<<1)+1];return _.TokenMetadata.getPresentationFromMetadata(b)}getEndOffset(w){return this._tokens[w<<1]}findTokenIndexAtOffset(w){return k.findIndexInTokensArray(this._tokens,w)}inflate(){return this}sliceAndInflate(w,b,S){return new L(this,w,b,S)}static convertToEndOffset(w,b){const g=(w.length>>>1)-1;for(let m=0;m<g;m++)w[m<<1]=w[m+1<<1];w[g<<1]=b}static findIndexInTokensArray(w,b){if(w.length<=2)return 0;let S=0,g=(w.length>>>1)-1;for(;S<g;){const m=S+Math.floor((g-S)/2),s=w[m<<1];if(s===b)return m+1;s<b?S=m+1:s>b&&(g=m)}return S}withInserted(w){if(w.length===0)return this;let b=0,S=0,g="";const m=new Array;let s=0;for(;;){const t=b<this._tokensCount?this._tokens[b<<1]:-1,i=S<w.length?w[S]:null;if(t!==-1&&(i===null||t<=i.offset)){g+=this._text.substring(s,t);const n=this._tokens[(b<<1)+1];m.push(g.length,n),b++,s=t}else if(i){if(i.offset>s){g+=this._text.substring(s,i.offset);const n=this._tokens[(b<<1)+1];m.push(g.length,n),s=i.offset}g+=i.text,m.push(g.length,i.tokenMetadata),S++}else break}return new k(new Uint32Array(m),g,this._languageIdCodec)}}e.LineTokens=k,k.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0;class L{constructor(w,b,S,g){this._source=w,this._startOffset=b,this._endOffset=S,this._deltaOffset=g,this._firstTokenIndex=w.findTokenIndexAtOffset(b),this._tokensCount=0;for(let m=this._firstTokenIndex,s=w.getCount();m<s&&!(w.getStartOffset(m)>=S);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 L?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[501],ee([1,0,89]),function(j,e,_){"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 S=L(w),g=S[S.length-2];return k.delete(w,b,g)}static delete(w,b,S){if(w===null||w===e.EMPTY_LINE_TOKENS||b===S)return w;const g=L(w),m=g.length>>>1;if(b===0&&g[g.length-2]===S)return e.EMPTY_LINE_TOKENS;const s=_.LineTokens.findIndexInTokensArray(g,b),t=s>0?g[s-1<<1]:0,i=g[s<<1];if(S<i){const o=S-b;for(let c=s;c<m;c++)g[c<<1]-=o;return w}let n,r;t!==b?(g[s<<1]=b,n=s+1<<1,r=b):(n=s<<1,r=t);const d=S-b;for(let o=s+1;o<m;o++){const c=g[o<<1]-d;c>r&&(g[n++]=c,g[n++]=g[(o<<1)+1],r=c)}if(n===g.length)return w;const h=new Uint32Array(n);return h.set(g.subarray(0,n),0),h.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 S=L(w),g=L(b),m=g.length>>>1,s=new Uint32Array(S.length+g.length);s.set(S,0);let t=S.length;const i=S[S.length-2];for(let n=0;n<m;n++)s[t++]=g[n<<1]+i,s[t++]=g[(n<<1)+1];return s.buffer}static insert(w,b,S){if(w===null||w===e.EMPTY_LINE_TOKENS)return w;const g=L(w),m=g.length>>>1;let s=_.LineTokens.findIndexInTokensArray(g,b);s>0&&g[s-1<<1]===b&&s--;for(let t=s;t<m;t++)g[t<<1]+=S;return w}}e.ContiguousTokensEditing=k;function L(D){return D instanceof Uint32Array?D:new Uint32Array(D)}e.toUint32Array=L}),define(J[502],ee([1,0,16,12,501,89,121]),function(j,e,_,k,L,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,s,t){let i=null;if(s<this._len&&(i=this._lineTokens[s]),i!==null&&i!==L.EMPTY_LINE_TOKENS)return new D.LineTokens((0,L.toUint32Array)(i),t,this._languageIdCodec);const n=new Uint32Array(2);return n[0]=t.length,n[1]=S(this._languageIdCodec.encodeLanguageId(m)),new D.LineTokens(n,t,this._languageIdCodec)}static _massageTokens(m,s,t){const i=t?(0,L.toUint32Array)(t):null;if(s===0){let n=!1;if(i&&i.length>1&&(n=w.TokenMetadata.getLanguageId(i[1])!==m),!n)return L.EMPTY_LINE_TOKENS}if(!i||i.length===0){const n=new Uint32Array(2);return n[0]=s,n[1]=S(m),n.buffer}return i[i.length-2]=s,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,s){s!==0&&(m+s>this._len&&(s=this._len-m),this._lineTokens.splice(m,s),this._len-=s)}_insertLines(m,s){if(s===0)return;const t=[];for(let i=0;i<s;i++)t[i]=null;this._lineTokens=_.arrayInsert(this._lineTokens,m,t),this._len+=s}setTokens(m,s,t,i,n){const r=b._massageTokens(this._languageIdCodec.encodeLanguageId(m),t,i);this._ensureLine(s);const d=this._lineTokens[s];return this._lineTokens[s]=r,n?!b._equals(d,r):!1}static _equals(m,s){if(!m||!s)return!m&&!s;const t=(0,L.toUint32Array)(m),i=(0,L.toUint32Array)(s);if(t.length!==i.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==i[n])return!1;return!0}acceptEdit(m,s,t){this._acceptDeleteRange(m),this._acceptInsertText(new k.Position(m.startLineNumber,m.startColumn),s,t)}_acceptDeleteRange(m){const s=m.startLineNumber-1;if(s>=this._len)return;if(m.startLineNumber===m.endLineNumber){if(m.startColumn===m.endColumn)return;this._lineTokens[s]=L.ContiguousTokensEditing.delete(this._lineTokens[s],m.startColumn-1,m.endColumn-1);return}this._lineTokens[s]=L.ContiguousTokensEditing.deleteEnding(this._lineTokens[s],m.startColumn-1);const t=m.endLineNumber-1;let i=null;t<this._len&&(i=L.ContiguousTokensEditing.deleteBeginning(this._lineTokens[t],m.endColumn-1)),this._lineTokens[s]=L.ContiguousTokensEditing.append(this._lineTokens[s],i),this._deleteLines(m.startLineNumber,m.endLineNumber-m.startLineNumber)}_acceptInsertText(m,s,t){if(s===0&&t===0)return;const i=m.lineNumber-1;if(!(i>=this._len)){if(s===0){this._lineTokens[i]=L.ContiguousTokensEditing.insert(this._lineTokens[i],m.column-1,t);return}this._lineTokens[i]=L.ContiguousTokensEditing.deleteEnding(this._lineTokens[i],m.column-1),this._lineTokens[i]=L.ContiguousTokensEditing.insert(this._lineTokens[i],m.column-1,t),this._insertLines(m.lineNumber,s)}}setMultilineTokens(m,s){if(m.length===0)return{changes:[]};const t=[];for(let i=0,n=m.length;i<n;i++){const r=m[i];let d=0,h=0,o=!1;for(let c=r.startLineNumber;c<=r.endLineNumber;c++)o?(this.setTokens(s.getLanguageId(),c-1,s.getLineLength(c),r.getLineTokens(c),!1),h=c):this.setTokens(s.getLanguageId(),c-1,s.getLineLength(c),r.getLineTokens(c),!0)&&(o=!0,d=c,h=c);o&&t.push({fromLineNumber:d,toLineNumber:h})}return{changes:t}}}e.ContiguousTokensStore=b;function S(g){return(g<<0|0<<8|0<<11|1<<15|2<<24|1024)>>>0}}),define(J[503],ee([1,0,12,5,118]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class D{static create(g,m){return new D(g,new w(m))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(g,m){this._startLineNumber=g,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(g){return this._startLineNumber<=g&&g<=this._endLineNumber?this._tokens.getLineTokens(g-this._startLineNumber):null}getRange(){const g=this._tokens.getRange();return g&&new k.Range(this._startLineNumber+g.startLineNumber,g.startColumn,this._startLineNumber+g.endLineNumber,g.endColumn)}removeTokens(g){const m=g.startLineNumber-this._startLineNumber,s=g.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(m,g.startColumn-1,s,g.endColumn-1),this._updateEndLineNumber()}split(g){const m=g.startLineNumber-this._startLineNumber,s=g.endLineNumber-this._startLineNumber,[t,i,n]=this._tokens.split(m,g.startColumn-1,s,g.endColumn-1);return[new D(this._startLineNumber,t),new D(this._startLineNumber+n,i)]}applyEdit(g,m){const[s,t,i]=(0,L.countEOL)(m);this.acceptEdit(g,s,t,i,m.length>0?m.charCodeAt(0):0)}acceptEdit(g,m,s,t,i){this._acceptDeleteRange(g),this._acceptInsertText(new _.Position(g.startLineNumber,g.startColumn),m,s,t,i),this._updateEndLineNumber()}_acceptDeleteRange(g){if(g.startLineNumber===g.endLineNumber&&g.startColumn===g.endColumn)return;const m=g.startLineNumber-this._startLineNumber,s=g.endLineNumber-this._startLineNumber;if(s<0){const i=s-m;this._startLineNumber-=i;return}const t=this._tokens.getMaxDeltaLine();if(!(m>=t+1)){if(m<0&&s>=t+1){this._startLineNumber=0,this._tokens.clear();return}if(m<0){const i=-m;this._startLineNumber-=i,this._tokens.acceptDeleteRange(g.startColumn-1,0,0,s,g.endColumn-1)}else this._tokens.acceptDeleteRange(0,m,g.startColumn-1,s,g.endColumn-1)}}_acceptInsertText(g,m,s,t,i){if(m===0&&s===0)return;const n=g.lineNumber-this._startLineNumber;if(n<0){this._startLineNumber+=m;return}const r=this._tokens.getMaxDeltaLine();n>=r+1||this._tokens.acceptInsertText(n,g.column-1,m,s,t,i)}}e.SparseMultilineTokens=D;class w{constructor(g){this._tokens=g,this._tokenCount=g.length/4}toString(g){const m=[];for(let s=0;s<this._tokenCount;s++)m.push(`(${this._getDeltaLine(s)+g},${this._getStartCharacter(s)}-${this._getEndCharacter(s)})`);return`[${m.join(",")}]`}getMaxDeltaLine(){const g=this._getTokenCount();return g===0?-1:this._getDeltaLine(g-1)}getRange(){const g=this._getTokenCount();if(g===0)return null;const m=this._getStartCharacter(0),s=this._getDeltaLine(g-1),t=this._getEndCharacter(g-1);return new k.Range(0,m+1,s,t+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(g){return this._tokens[4*g]}_getStartCharacter(g){return this._tokens[4*g+1]}_getEndCharacter(g){return this._tokens[4*g+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(g){let m=0,s=this._getTokenCount()-1;for(;m<s;){const t=m+Math.floor((s-m)/2),i=this._getDeltaLine(t);if(i<g)m=t+1;else if(i>g)s=t-1;else{let n=t;for(;n>m&&this._getDeltaLine(n-1)===g;)n--;let r=t;for(;r<s&&this._getDeltaLine(r+1)===g;)r++;return new b(this._tokens.subarray(4*n,4*r+4))}}return this._getDeltaLine(m)===g?new b(this._tokens.subarray(4*m,4*m+4)):null}clear(){this._tokenCount=0}removeTokens(g,m,s,t){const i=this._tokens,n=this._tokenCount;let r=0,d=!1,h=0;for(let o=0;o<n;o++){const c=4*o,a=i[c],l=i[c+1],u=i[c+2],v=i[c+3];if((a>g||a===g&&u>=m)&&(a<s||a===s&&l<=t))d=!0;else{if(r===0&&(h=a),d){const f=4*r;i[f]=a-h,i[f+1]=l,i[f+2]=u,i[f+3]=v}r++}}return this._tokenCount=r,h}split(g,m,s,t){const i=this._tokens,n=this._tokenCount,r=[],d=[];let h=r,o=0,c=0;for(let a=0;a<n;a++){const l=4*a,u=i[l],v=i[l+1],f=i[l+2],p=i[l+3];if(u>g||u===g&&f>=m){if(u<s||u===s&&v<=t)continue;h!==d&&(h=d,o=0,c=u)}h[o++]=u-c,h[o++]=v,h[o++]=f,h[o++]=p}return[new w(new Uint32Array(r)),new w(new Uint32Array(d)),c]}acceptDeleteRange(g,m,s,t,i){const n=this._tokens,r=this._tokenCount,d=t-m;let h=0,o=!1;for(let c=0;c<r;c++){const a=4*c;let l=n[a],u=n[a+1],v=n[a+2];const f=n[a+3];if(l<m||l===m&&v<=s){h++;continue}else if(l===m&&u<s)l===t&&v>i?v-=i-s:v=s;else if(l===m&&u===s)if(l===t&&v>i)v-=i-s;else{o=!0;continue}else if(l<t||l===t&&u<i)if(l===t&&v>i)l=m,u=s,v=u+(v-i);else{o=!0;continue}else if(l>t){if(d===0&&!o){h=r;break}l-=d}else if(l===t&&u>=i)g&&l===0&&(u+=g,v+=g),l-=d,u-=i-s,v-=i-s;else throw new Error("Not possible!");const p=4*h;n[p]=l,n[p+1]=u,n[p+2]=v,n[p+3]=f,h++}this._tokenCount=h}acceptInsertText(g,m,s,t,i,n){const r=s===0&&t===1&&(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122),d=this._tokens,h=this._tokenCount;for(let o=0;o<h;o++){const c=4*o;let a=d[c],l=d[c+1],u=d[c+2];if(!(a<g||a===g&&u<m)){if(a===g&&u===m)if(r)u+=1;else continue;else if(a===g&&l<m&&m<u)s===0?u+=t:u=m;else{if(a===g&&l===m&&r)continue;if(a===g)if(a+=s,s===0)l+=t,u+=t;else{const v=u-l;l=i+(l-m),u=l+v}else a+=s}d[c]=a,d[c+1]=l,d[c+2]=u}}}}class b{constructor(g){this._tokens=g}getCount(){return this._tokens.length/4}getStartCharacter(g){return this._tokens[4*g+1]}getEndCharacter(g){return this._tokens[4*g+2]}getMetadata(g){return this._tokens[4*g+3]}}e.SparseLineTokens=b}),define(J[504],ee([1,0,16,89]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseTokensStore=void 0;class L{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 S=w;if(b.length>0){const m=b[0].getRange(),s=b[b.length-1].getRange();if(!m||!s)return w;S=w.plusRange(m).plusRange(s)}let g=null;for(let m=0,s=this._pieces.length;m<s;m++){const t=this._pieces[m];if(t.endLineNumber<S.startLineNumber)continue;if(t.startLineNumber>S.endLineNumber){g=g||{index:m};break}if(t.removeTokens(S),t.isEmpty()){this._pieces.splice(m,1),m--,s--;continue}if(t.endLineNumber<S.startLineNumber)continue;if(t.startLineNumber>S.endLineNumber){g=g||{index:m};continue}const[i,n]=t.split(S);if(i.isEmpty()){g=g||{index:m};continue}n.isEmpty()||(this._pieces.splice(m,1,i,n),m++,s++,g=g||{index:m})}return g=g||{index:this._pieces.length},b.length>0&&(this._pieces=_.arrayInsert(this._pieces,g.index,b)),S}isComplete(){return this._isComplete}addSparseTokens(w,b){if(b.getLineContent().length===0)return b;const S=this._pieces;if(S.length===0)return b;const g=L._findFirstPieceWithLine(S,w),m=S[g].getLineTokens(w);if(!m)return b;const s=b.getCount(),t=m.getCount();let i=0;const n=[];let r=0,d=0;const h=(o,c)=>{o!==d&&(d=o,n[r++]=o,n[r++]=c)};for(let o=0;o<t;o++){const c=m.getStartCharacter(o),a=m.getEndCharacter(o),l=m.getMetadata(o),u=((l&1?2048:0)|(l&2?4096:0)|(l&4?8192:0)|(l&8?16384:0)|(l&16?16744448:0)|(l&32?4278190080:0))>>>0,v=~u>>>0;for(;i<s&&b.getEndOffset(i)<=c;)h(b.getEndOffset(i),b.getMetadata(i)),i++;for(i<s&&b.getStartOffset(i)<c&&h(c,b.getMetadata(i));i<s&&b.getEndOffset(i)<a;)h(b.getEndOffset(i),b.getMetadata(i)&v|l&u),i++;if(i<s)h(a,b.getMetadata(i)&v|l&u),b.getEndOffset(i)===a&&i++;else{const f=Math.min(Math.max(0,i-1),s-1);h(a,b.getMetadata(f)&v|l&u)}}for(;i<s;)h(b.getEndOffset(i),b.getMetadata(i)),i++;return new k.LineTokens(new Uint32Array(n),b.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(w,b){let S=0,g=w.length-1;for(;S<g;){let m=S+Math.floor((g-S)/2);if(w[m].endLineNumber<b)S=m+1;else if(w[m].startLineNumber>b)g=m-1;else{for(;m>S&&w[m-1].startLineNumber<=b&&b<=w[m-1].endLineNumber;)m--;return m}}return S}acceptEdit(w,b,S,g,m){for(const s of this._pieces)s.acceptEdit(w,b,S,g,m)}}e.SparseTokensStore=L}),define(J[143],ee([1,0,2]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class k extends _.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,S=D.length;b<S;b++){const g=D[b];switch(g.type){case 0:this.onCompositionStart(g)&&(w=!0);break;case 1:this.onCompositionEnd(g)&&(w=!0);break;case 2:this.onConfigurationChanged(g)&&(w=!0);break;case 3:this.onCursorStateChanged(g)&&(w=!0);break;case 4:this.onDecorationsChanged(g)&&(w=!0);break;case 5:this.onFlushed(g)&&(w=!0);break;case 6:this.onFocusChanged(g)&&(w=!0);break;case 7:this.onLanguageConfigurationChanged(g)&&(w=!0);break;case 8:this.onLineMappingChanged(g)&&(w=!0);break;case 9:this.onLinesChanged(g)&&(w=!0);break;case 10:this.onLinesDeleted(g)&&(w=!0);break;case 11:this.onLinesInserted(g)&&(w=!0);break;case 12:this.onRevealRangeRequest(g)&&(w=!0);break;case 13:this.onScrollChanged(g)&&(w=!0);break;case 15:this.onTokensChanged(g)&&(w=!0);break;case 14:this.onThemeChanged(g)&&(w=!0);break;case 16:this.onTokensColorsChanged(g)&&(w=!0);break;case 17:this.onZonesChanged(g)&&(w=!0);break;default:console.info("View received unknown event: "),console.info(g)}}w&&(this._shouldRender=!0)}}e.ViewEventHandler=k}),define(J[107],ee([1,0,143]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class k extends _.ViewEventHandler{}e.DynamicViewOverlay=k}),define(J[54],ee([1,0,143]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.ViewPart=void 0;class k extends _.ViewEventHandler{constructor(w){super(),this._context=w,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=k;class L{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 S=[];let g=0;for(;w&&w!==document.body&&w!==b;)w.nodeType===w.ELEMENT_NODE&&(S[g++]=this.read(w)),w=w.parentElement;const m=new Uint8Array(g);for(let s=0;s<g;s++)m[s]=S[g-s-1];return m}}e.PartFingerprints=L}),define(J[505],ee([1,0,35,54,401]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockDecorations=void 0;class L extends k.ViewPart{constructor(w){super(w),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,_.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 S=this._context.configuration.options.get(140),g=S.contentWidth-S.verticalScrollbarWidth;this.contentWidth!==g&&(this.contentWidth=g,w=!0);const m=S.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 S=0;const g=w.getDecorationsInViewport();for(const m of g){if(!m.options.blockClassName)continue;let s=this.blocks[S];s||(s=this.blocks[S]=(0,_.createFastDomNode)(document.createElement("div")),this.domNode.appendChild(s));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[n,r,d,h]=(b=m.options.blockPadding)!==null&&b!==void 0?b:[0,0,0,0];s.setClassName("blockDecorations-block "+m.options.blockClassName),s.setLeft(this.contentLeft-h),s.setWidth(this.contentWidth+h+r),s.setTop(t-w.scrollTop-n),s.setHeight(i-t+n+d),S++}for(let m=S;m<this.blocks.length;m++)this.blocks[m].domNode.remove();this.blocks.length=S}}e.BlockDecorations=L}),define(J[506],ee([1,0,107,5,138,403]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class D extends _.DynamicViewOverlay{constructor(b){super(),this._context=b;const S=this._context.configuration.options;this._lineHeight=S.get(64),this._typicalHalfwidthCharacterWidth=S.get(48).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(b){const S=this._context.configuration.options;return this._lineHeight=S.get(64),this._typicalHalfwidthCharacterWidth=S.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 S=b.getDecorationsInViewport();let g=[],m=0;for(let n=0,r=S.length;n<r;n++){const d=S[n];d.options.className&&(g[m++]=d)}g=g.sort((n,r)=>{if(n.options.zIndex<r.options.zIndex)return-1;if(n.options.zIndex>r.options.zIndex)return 1;const d=n.options.className,h=r.options.className;return d<h?-1:d>h?1:k.Range.compareRangesUsingStarts(n.range,r.range)});const s=b.visibleRange.startLineNumber,t=b.visibleRange.endLineNumber,i=[];for(let n=s;n<=t;n++){const r=n-s;i[r]=""}this._renderWholeLineDecorations(b,g,i),this._renderNormalDecorations(b,g,i),this._renderResult=i}_renderWholeLineDecorations(b,S,g){const m=String(this._lineHeight),s=b.visibleRange.startLineNumber,t=b.visibleRange.endLineNumber;for(let i=0,n=S.length;i<n;i++){const r=S[i];if(!r.options.isWholeLine)continue;const d=\'<div class="cdr \'+r.options.className+\'" style="left:0;width:100%;height:\'+m+\'px;"></div>\',h=Math.max(r.range.startLineNumber,s),o=Math.min(r.range.endLineNumber,t);for(let c=h;c<=o;c++){const a=c-s;g[a]+=d}}}_renderNormalDecorations(b,S,g){const m=String(this._lineHeight),s=b.visibleRange.startLineNumber;let t=null,i=!1,n=null;for(let r=0,d=S.length;r<d;r++){const h=S[r];if(h.options.isWholeLine)continue;const o=h.options.className,c=!!h.options.showIfCollapsed;let a=h.range;if(c&&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===c&&k.Range.areIntersectingOrTouching(n,a)){n=k.Range.plusRange(n,a);continue}t!==null&&this._renderNormalDecoration(b,n,t,i,m,s,g),t=o,i=c,n=a}t!==null&&this._renderNormalDecoration(b,n,t,i,m,s,g)}_renderNormalDecoration(b,S,g,m,s,t,i){const n=b.linesVisibleRangesForRange(S,g==="findMatch");if(n)for(let r=0,d=n.length;r<d;r++){const h=n[r];if(h.outsideRenderedLine)continue;const o=h.lineNumber-t;if(m&&h.ranges.length===1){const c=h.ranges[0];if(c.width<this._typicalHalfwidthCharacterWidth){const a=Math.round(c.left+c.width/2),l=Math.max(0,Math.round(a-this._typicalHalfwidthCharacterWidth/2));h.ranges[0]=new L.HorizontalRange(l,this._typicalHalfwidthCharacterWidth)}}for(let c=0,a=h.ranges.length;c<a;c++){const l=h.ranges[c],u=\'<div class="cdr \'+g+\'" style="left:\'+String(l.left)+"px;width:"+String(l.width)+"px;height:"+s+\'px;"></div>\';i[o]+=u}}}render(b,S){if(!this._renderResult)return"";const g=S-b;return g<0||g>=this._renderResult.length?"":this._renderResult[g]}}e.DecorationsOverlay=D}),define(J[203],ee([1,0,107,404]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginOverlay=e.DedupOverlay=e.LineRenderedDecorations=e.RenderedDecoration=e.DecorationToRender=void 0;class k{constructor(g,m,s,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+g,this.endLineNumber=+m,this.className=String(s),this.zIndex=t??0,this.decorationLane=i??1}}e.DecorationToRender=k;class L{constructor(g,m){this.className=g,this.zIndex=m}}e.RenderedDecoration=L;class D{constructor(){this.lanes=[]}add(g,m){for(;g>=this.lanes.length;)this.lanes.push([]);this.lanes[g].push(m)}getLaneDecorations(g){return g<this.lanes.length?this.lanes[g]:[]}isEmpty(){for(const g of this.lanes)if(g.length>0)return!1;return!0}}e.LineRenderedDecorations=D;class w extends _.DynamicViewOverlay{_render(g,m,s,t){const i=[];for(let d=g;d<=m;d++){const h=d-g;i[h]=new D}if(s.length===0)return i;s.sort((d,h)=>d.className===h.className?d.startLineNumber===h.startLineNumber?d.endLineNumber-h.endLineNumber:d.startLineNumber-h.startLineNumber:d.className<h.className?-1:1);let n=null,r=0;for(let d=0,h=s.length;d<h;d++){const o=s[d],c=o.className,a=o.zIndex;let l=Math.max(o.startLineNumber,g)-g;const u=Math.min(o.endLineNumber,m)-g,v=Math.min(o.decorationLane,t);n===c?(l=Math.max(r+1,l),r=Math.max(r,u)):(n=c,r=u);for(let f=l;f<=r;f++)i[f].add(v,new L(c,a))}return i}}e.DedupOverlay=w;class b extends w{constructor(g){super(),this._context=g;const m=this._context.configuration.options,s=m.get(140);this._lineHeight=m.get(64),this._glyphMargin=m.get(55),this._glyphMarginLeft=s.glyphMarginLeft,this._glyphMarginWidth=s.glyphMarginWidth,this._glyphMarginDecorationLaneCount=s.glyphMarginDecorationLaneCount,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(g){const m=this._context.configuration.options,s=m.get(140);return this._lineHeight=m.get(64),this._glyphMargin=m.get(55),this._glyphMarginLeft=s.glyphMarginLeft,this._glyphMarginWidth=s.glyphMarginWidth,this._glyphMarginDecorationLaneCount=s.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(g){return!0}onFlushed(g){return!0}onLinesChanged(g){return!0}onLinesDeleted(g){return!0}onLinesInserted(g){return!0}onScrollChanged(g){return g.scrollTopChanged}onZonesChanged(g){return!0}_getDecorations(g){var m;const s=g.getDecorationsInViewport(),t=[];let i=0;for(let n=0,r=s.length;n<r;n++){const d=s[n],h=d.options.glyphMarginClassName,o=d.options.zIndex,c=(m=d.options.glyphMargin)===null||m===void 0?void 0:m.position;h&&(t[i++]=new k(d.range.startLineNumber,d.range.endLineNumber,h,o,c))}return t}prepareRender(g){if(!this._glyphMargin){this._renderResult=null;return}const m=g.visibleRange.startLineNumber,s=g.visibleRange.endLineNumber,t=this._getDecorations(g),i=this._render(m,s,t,this._glyphMarginDecorationLaneCount),n=this._lineHeight.toString(),d=\'" style="width:\'+Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount).toString()+"px;height:"+n+"px;",h=[];for(let o=m;o<=s;o++){const c=o-m,a=i[c];if(a.isEmpty())h[c]="";else{let l="";for(let u=1;u<=this._glyphMarginDecorationLaneCount;u+=1){const v=a.getLaneDecorations(u);if(v.length===0)continue;v.sort((y,E)=>E.zIndex-y.zIndex);const f=v[0],p=[f.className];for(let y=1;y<v.length;y+=1){const E=v[y];if(E.zIndex!==f.zIndex)break;p.push(E.className)}const C=(this._glyphMarginLeft+(u-1)*this._lineHeight).toString();l+=\'<div class="cgmr codicon \'+p.join(" ")+d+"left:"+C+\'px;"></div>\'}h[c]=l}}this._renderResult=h}render(g,m){if(!this._renderResult)return"";const s=m-g;return s<0||s>=this._renderResult.length?"":this._renderResult[s]}}e.GlyphMarginOverlay=b}),define(J[507],ee([1,0,203,408]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class k extends _.DedupOverlay{constructor(D){super(),this._context=D;const b=this._context.configuration.options.get(140);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(140);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 S=0;for(let g=0,m=w.length;g<m;g++){const s=w[g],t=s.options.linesDecorationsClassName,i=s.options.zIndex;t&&(b[S++]=new _.DecorationToRender(s.range.startLineNumber,s.range.endLineNumber,t,i));const n=s.options.firstLineDecorationClassName;n&&(b[S++]=new _.DecorationToRender(s.range.startLineNumber,s.range.startLineNumber,n,i))}return b}prepareRender(D){const w=D.visibleRange.startLineNumber,b=D.visibleRange.endLineNumber,S=this._render(w,b,this._getDecorations(D),1),g=this._decorationsLeft.toString(),m=this._decorationsWidth.toString(),s=\'" style="left:\'+g+"px;width:"+m+\'px;"></div>\',t=[];for(let i=w;i<=b;i++){const n=i-w,r=S[n].getLaneDecorations(1);let d="";for(const h of r)d+=\'<div class="cldr \'+h.className+s;t[n]=d}this._renderResult=t}render(D,w){return this._renderResult?this._renderResult[w-D]:""}}e.LinesDecorationsOverlay=k}),define(J[276],ee([1,0,35,54,409]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class L extends k.ViewPart{constructor(w){super(w);const b=this._context.configuration.options,S=b.get(140);this._canUseLayerHinting=!b.get(30),this._contentLeft=S.contentLeft,this._glyphMarginLeft=S.glyphMarginLeft,this._glyphMarginWidth=S.glyphMarginWidth,this._domNode=(0,_.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(L.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,_.createFastDomNode)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(L.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(w){const b=this._context.configuration.options,S=b.get(140);return this._canUseLayerHinting=!b.get(30),this._contentLeft=S.contentLeft,this._glyphMarginLeft=S.glyphMarginLeft,this._glyphMarginWidth=S.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 S=Math.min(w.scrollHeight,1e6);this._domNode.setHeight(S),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(S)}}e.Margin=L,L.CLASS_NAME="glyph-margin",L.OUTER_CLASS_NAME="margin"}),define(J[508],ee([1,0,203,410]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class k extends _.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 S=0;for(let g=0,m=w.length;g<m;g++){const s=w[g],t=s.options.marginClassName,i=s.options.zIndex;t&&(b[S++]=new _.DecorationToRender(s.range.startLineNumber,s.range.endLineNumber,t,i))}return b}prepareRender(D){const w=D.visibleRange.startLineNumber,b=D.visibleRange.endLineNumber,S=this._render(w,b,this._getDecorations(D),1),g=[];for(let m=w;m<=b;m++){const s=m-w,t=S[s].getLaneDecorations(1);let i="";for(const n of t)i+=\'<div class="cmdr \'+n.className+\'" style=""></div>\';g[s]=i}this._renderResult=g}render(D,w){return this._renderResult?this._renderResult[w-D]:""}}e.MarginViewLineDecorationsOverlay=k}),define(J[509],ee([1,0,35,54,412]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class L extends k.ViewPart{constructor(w){super(w);const S=this._context.configuration.options.get(140);this._widgets={},this._verticalScrollbarWidth=S.verticalScrollbarWidth,this._minimapWidth=S.minimap.minimapWidth,this._horizontalScrollbarHeight=S.horizontalScrollbarHeight,this._editorHeight=S.height,this._editorWidth=S.width,this._domNode=(0,_.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 S=this._context.configuration.options.get(140);return this._verticalScrollbarWidth=S.verticalScrollbarWidth,this._minimapWidth=S.minimap.minimapWidth,this._horizontalScrollbarHeight=S.horizontalScrollbarHeight,this._editorHeight=S.height,this._editorWidth=S.width,!0}addWidget(w){const b=(0,_.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 S=this._widgets[w.getId()];return S.preference===b?!1:(S.preference=b,this.setShouldRender(),!0)}removeWidget(w){const b=w.getId();if(this._widgets.hasOwnProperty(b)){const g=this._widgets[b].domNode.domNode;delete this._widgets[b],g.parentNode.removeChild(g),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 S=b.domNode.clientHeight;b.setTop(this._editorHeight-S-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 S=0,g=b.length;S<g;S++){const m=b[S];this._renderWidget(this._widgets[m])}}}e.ViewOverlayWidgets=L}),define(J[510],ee([1,0,35,54,413]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class L extends k.ViewPart{constructor(w){super(w),this.domNode=(0,_.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(98),this._typicalHalfwidthCharacterWidth=b.get(48).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(w){const b=this._context.configuration.options;return this._rulers=b.get(98),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:g}=this._context.viewModel.model.getOptions(),m=g;let s=b-w;for(;s>0;){const t=(0,_.createFastDomNode)(document.createElement("div"));t.setClassName("view-ruler"),t.setWidth(m),this.domNode.appendChild(t),this._renderedRulers.push(t),s--}return}let S=w-b;for(;S>0;){const g=this._renderedRulers.pop();this.domNode.removeChild(g),S--}}render(w){this._ensureRulersCount();for(let b=0,S=this._rulers.length;b<S;b++){const g=this._renderedRulers[b],m=this._rulers[b];g.setBoxShadow(m.color?`1px 0 0 0 ${m.color} inset`:""),g.setHeight(Math.min(w.scrollHeight,1e6)),g.setLeft(m.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=L}),define(J[511],ee([1,0,35,54,414]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class L extends k.ViewPart{constructor(w){super(w),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const S=this._context.configuration.options.get(99);this._useShadows=S.useShadows,this._domNode=(0,_.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(140);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 S=this._context.configuration.options.get(99);return this._useShadows=S.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=L}),define(J[512],ee([1,0,35,11,54,12]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const w=()=>{throw new Error("Invalid change accessor")};class b extends L.ViewPart{constructor(m){super(m);const s=this._context.configuration.options,t=s.get(140);this._lineHeight=s.get(64),this._contentWidth=t.contentWidth,this._contentLeft=t.contentLeft,this.domNode=(0,_.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,_.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(),s=new Map;for(const i of m)s.set(i.id,i);let t=!1;return this._context.viewModel.changeWhitespace(i=>{const n=Object.keys(this._zones);for(let r=0,d=n.length;r<d;r++){const h=n[r],o=this._zones[h],c=this._computeWhitespaceProps(o.delegate);o.isInHiddenArea=c.isInHiddenArea;const a=s.get(h);a&&(a.afterLineNumber!==c.afterViewLineNumber||a.height!==c.heightInPx)&&(i.changeOneWhitespace(h,c.afterViewLineNumber,c.heightInPx),this._safeCallOnComputedHeight(o.delegate,c.heightInPx),t=!0)}}),t}onConfigurationChanged(m){const s=this._context.configuration.options,t=s.get(140);return this._lineHeight=s.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){var s,t;return(t=(s=m.ordinal)!==null&&s!==void 0?s:m.afterColumn)!==null&&t!==void 0?t:1e4}_computeWhitespaceProps(m){if(m.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(m),minWidthInPx:this._minWidthInPixels(m)};let s;if(typeof m.afterColumn<"u")s=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;s=new D.Position(r,this._context.viewModel.model.getLineMaxColumn(r))}let t;s.column===this._context.viewModel.model.getLineMaxColumn(s.lineNumber)?t=this._context.viewModel.model.validatePosition({lineNumber:s.lineNumber+1,column:1}):t=this._context.viewModel.model.validatePosition({lineNumber:s.lineNumber,column:s.column+1});const i=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s,m.afterColumnAffinity),n=m.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(t);return{isInHiddenArea:!n,afterViewLineNumber:i.lineNumber,heightInPx:n?this._heightInPixels(m):0,minWidthInPx:this._minWidthInPixels(m)}}changeViewZones(m){let s=!1;return this._context.viewModel.changeWhitespace(t=>{const i={addZone:n=>(s=!0,this._addZone(t,n)),removeZone:n=>{n&&(s=this._removeZone(t,n)||s)},layoutZone:n=>{n&&(s=this._layoutZone(t,n)||s)}};S(m,i),i.addZone=w,i.removeZone=w,i.layoutZone=w}),s}_addZone(m,s){const t=this._computeWhitespaceProps(s),n={whitespaceId:m.insertWhitespace(t.afterViewLineNumber,this._getZoneOrdinal(s),t.heightInPx,t.minWidthInPx),delegate:s,isInHiddenArea:t.isInHiddenArea,isVisible:!1,domNode:(0,_.createFastDomNode)(s.domNode),marginDomNode:s.marginDomNode?(0,_.createFastDomNode)(s.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,t.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(m,s){if(this._zones.hasOwnProperty(s)){const t=this._zones[s];return delete this._zones[s],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,s){if(this._zones.hasOwnProperty(s)){const t=this._zones[s],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,s){if(typeof m.onComputedHeight=="function")try{m.onComputedHeight(s)}catch(t){(0,k.onUnexpectedError)(t)}}_safeCallOnDomNodeTop(m,s){if(typeof m.onDomNodeTop=="function")try{m.onDomNodeTop(s)}catch(t){(0,k.onUnexpectedError)(t)}}prepareRender(m){}render(m){const s=m.viewportData.whitespaceViewportData,t={};let i=!1;for(const r of s)this._zones[r.id].isInHiddenArea||(t[r.id]=r,i=!0);const n=Object.keys(this._zones);for(let r=0,d=n.length;r<d;r++){const h=n[r],o=this._zones[h];let c=0,a=0,l="none";t.hasOwnProperty(h)?(c=t[h].verticalOffset-m.bigNumbersDelta,a=t[h].height,l="block",o.isVisible||(o.domNode.setAttribute("monaco-visible-view-zone","true"),o.isVisible=!0),this._safeCallOnDomNodeTop(o.delegate,m.getScrolledTopFromAbsoluteTop(t[h].verticalOffset))):(o.isVisible&&(o.domNode.removeAttribute("monaco-visible-view-zone"),o.isVisible=!1),this._safeCallOnDomNodeTop(o.delegate,m.getScrolledTopFromAbsoluteTop(-1e6))),o.domNode.setTop(c),o.domNode.setHeight(a),o.domNode.setDisplay(l),o.marginDomNode&&(o.marginDomNode.setTop(c),o.marginDomNode.setHeight(a),o.marginDomNode.setDisplay(l))}i&&(this.domNode.setWidth(Math.max(m.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=b;function S(g,m){try{return g(m)}catch(s){(0,k.onUnexpectedError)(s)}}}),define(J[204],ee([1,0]),function(j,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 _{constructor(){this.type=0}}e.ViewCompositionStartEvent=_;class k{constructor(){this.type=1}}e.ViewCompositionEndEvent=k;class L{constructor(l){this.type=2,this._source=l}hasChanged(l){return this._source.hasChanged(l)}}e.ViewConfigurationChangedEvent=L;class D{constructor(l,u,v){this.selections=l,this.modelSelections=u,this.reason=v,this.type=3}}e.ViewCursorStateChangedEvent=D;class w{constructor(l){this.type=4,l?(this.affectsMinimap=l.affectsMinimap,this.affectsOverviewRuler=l.affectsOverviewRuler,this.affectsGlyphMargin=l.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}e.ViewDecorationsChangedEvent=w;class b{constructor(){this.type=5}}e.ViewFlushedEvent=b;class S{constructor(l){this.type=6,this.isFocused=l}}e.ViewFocusChangedEvent=S;class g{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=g;class m{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=m;class s{constructor(l,u){this.fromLineNumber=l,this.count=u,this.type=9}}e.ViewLinesChangedEvent=s;class t{constructor(l,u){this.type=10,this.fromLineNumber=l,this.toLineNumber=u}}e.ViewLinesDeletedEvent=t;class i{constructor(l,u){this.type=11,this.fromLineNumber=l,this.toLineNumber=u}}e.ViewLinesInsertedEvent=i;class n{constructor(l,u,v,f,p,C,y){this.source=l,this.minimalReveal=u,this.range=v,this.selections=f,this.verticalType=p,this.revealHorizontal=C,this.scrollType=y,this.type=12}}e.ViewRevealRangeRequestEvent=n;class r{constructor(l){this.type=13,this.scrollWidth=l.scrollWidth,this.scrollLeft=l.scrollLeft,this.scrollHeight=l.scrollHeight,this.scrollTop=l.scrollTop,this.scrollWidthChanged=l.scrollWidthChanged,this.scrollLeftChanged=l.scrollLeftChanged,this.scrollHeightChanged=l.scrollHeightChanged,this.scrollTopChanged=l.scrollTopChanged}}e.ViewScrollChangedEvent=r;class d{constructor(l){this.theme=l,this.type=14}}e.ViewThemeChangedEvent=d;class h{constructor(l){this.type=15,this.ranges=l}}e.ViewTokensChangedEvent=h;class o{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=o;class c{constructor(){this.type=17}}e.ViewZonesChangedEvent=c}),define(J[144],ee([1,0,9]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class k{constructor(S,g,m,s){this.startColumn=S,this.endColumn=g,this.className=m,this.type=s,this._lineDecorationBrand=void 0}static _equals(S,g){return S.startColumn===g.startColumn&&S.endColumn===g.endColumn&&S.className===g.className&&S.type===g.type}static equalsArr(S,g){const m=S.length,s=g.length;if(m!==s)return!1;for(let t=0;t<m;t++)if(!k._equals(S[t],g[t]))return!1;return!0}static extractWrapped(S,g,m){if(S.length===0)return S;const s=g+1,t=m+1,i=m-g,n=[];let r=0;for(const d of S)d.endColumn<=s||d.startColumn>=t||(n[r++]=new k(Math.max(1,d.startColumn-s+1),Math.min(i+1,d.endColumn-s+1),d.className,d.type));return n}static filter(S,g,m,s){if(S.length===0)return[];const t=[];let i=0;for(let n=0,r=S.length;n<r;n++){const d=S[n],h=d.range;if(h.endLineNumber<g||h.startLineNumber>g||h.isEmpty()&&(d.type===0||d.type===3))continue;const o=h.startLineNumber===g?h.startColumn:m,c=h.endLineNumber===g?h.endColumn:s;t[i++]=new k(o,c,d.inlineClassName,d.type)}return t}static _typeCompare(S,g){const m=[2,0,1,3];return m[S]-m[g]}static compare(S,g){if(S.startColumn!==g.startColumn)return S.startColumn-g.startColumn;if(S.endColumn!==g.endColumn)return S.endColumn-g.endColumn;const m=k._typeCompare(S.type,g.type);return m!==0?m:S.className!==g.className?S.className<g.className?-1:1:0}}e.LineDecoration=k;class L{constructor(S,g,m,s){this.startOffset=S,this.endOffset=g,this.className=m,this.metadata=s}}e.DecorationSegment=L;class D{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(S){let g=0;for(let m=0,s=S.length;m<s;m++)g|=S[m];return g}consumeLowerThan(S,g,m){for(;this.count>0&&this.stopOffsets[0]<S;){let s=0;for(;s+1<this.count&&this.stopOffsets[s]===this.stopOffsets[s+1];)s++;m.push(new L(g,this.stopOffsets[s],this.classNames.join(" "),D._metadata(this.metadata))),g=this.stopOffsets[s]+1,this.stopOffsets.splice(0,s+1),this.classNames.splice(0,s+1),this.metadata.splice(0,s+1),this.count-=s+1}return this.count>0&&g<S&&(m.push(new L(g,S-1,this.classNames.join(" "),D._metadata(this.metadata))),g=S),g}insert(S,g,m){if(this.count===0||this.stopOffsets[this.count-1]<=S)this.stopOffsets.push(S),this.classNames.push(g),this.metadata.push(m);else for(let s=0;s<this.count;s++)if(this.stopOffsets[s]>=S){this.stopOffsets.splice(s,0,S),this.classNames.splice(s,0,g),this.metadata.splice(s,0,m);break}this.count++}}class w{static normalize(S,g){if(g.length===0)return[];const m=[],s=new D;let t=0;for(let i=0,n=g.length;i<n;i++){const r=g[i];let d=r.startColumn,h=r.endColumn;const o=r.className,c=r.type===1?2:r.type===2?4:0;if(d>1){const u=S.charCodeAt(d-2);_.isHighSurrogate(u)&&d--}if(h>1){const u=S.charCodeAt(h-2);_.isHighSurrogate(u)&&h--}const a=d-1,l=h-2;t=s.consumeLowerThan(a,t,m),s.count===0&&(t=a),s.insert(l,o,c)}return s.consumeLowerThan(1073741824,t,m),m}}e.LineDecorationsNormalizer=w}),define(J[513],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinePart=void 0;class _{constructor(L,D,w,b){this.endIndex=L,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=_}),define(J[514],ee([1,0,9]),function(j,e,_){"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 S=this._inserts,g=this._changes,m=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],b._commitPendingChanges(S,g,m)}}class L{constructor(b,S,g,m,s){this.id=b,this.afterLineNumber=S,this.ordinal=g,this.height=m,this.minWidth=s,this.prefixSum=0}}e.EditorWhitespace=L;class D{constructor(b,S,g,m){this._instanceId=_.singleLetterHash(++D.INSTANCE_COUNT),this._pendingChanges=new k,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=b,this._lineHeight=S,this._paddingTop=g,this._paddingBottom=m}static findInsertionIndex(b,S,g){let m=0,s=b.length;for(;m<s;){const t=m+s>>>1;S===b[t].afterLineNumber?g<b[t].ordinal?s=t:m=t+1:S<b[t].afterLineNumber?s=t:m=t+1}return m}setLineHeight(b){this._checkPendingChanges(),this._lineHeight=b}setPadding(b,S){this._paddingTop=b,this._paddingBottom=S}onFlushed(b){this._checkPendingChanges(),this._lineCount=b}changeWhitespace(b){let S=!1;try{b({insertWhitespace:(m,s,t,i)=>{S=!0,m=m|0,s=s|0,t=t|0,i=i|0;const n=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new L(n,m,s,t,i)),n},changeOneWhitespace:(m,s,t)=>{S=!0,s=s|0,t=t|0,this._pendingChanges.change({id:m,newAfterLineNumber:s,newHeight:t})},removeWhitespace:m=>{S=!0,this._pendingChanges.remove({id:m})}})}finally{this._pendingChanges.commit(this)}return S}_commitPendingChanges(b,S,g){if((b.length>0||g.length>0)&&(this._minWidth=-1),b.length+S.length+g.length<=1){for(const n of b)this._insertWhitespace(n);for(const n of S)this._changeOneWhitespace(n.id,n.newAfterLineNumber,n.newHeight);for(const n of g){const r=this._findWhitespaceIndex(n.id);r!==-1&&this._removeWhitespace(r)}return}const m=new Set;for(const n of g)m.add(n.id);const s=new Map;for(const n of S)s.set(n.id,n);const t=n=>{const r=[];for(const d of n)if(!m.has(d.id)){if(s.has(d.id)){const h=s.get(d.id);d.afterLineNumber=h.newAfterLineNumber,d.height=h.newHeight}r.push(d)}return r},i=t(this._arr).concat(t(b));i.sort((n,r)=>n.afterLineNumber===r.afterLineNumber?n.ordinal-r.ordinal:n.afterLineNumber-r.afterLineNumber),this._arr=i,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(b){const S=D.findInsertionIndex(this._arr,b.afterLineNumber,b.ordinal);this._arr.splice(S,0,b),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,S-1)}_findWhitespaceIndex(b){const S=this._arr;for(let g=0,m=S.length;g<m;g++)if(S[g].id===b)return g;return-1}_changeOneWhitespace(b,S,g){const m=this._findWhitespaceIndex(b);if(m!==-1&&(this._arr[m].height!==g&&(this._arr[m].height=g,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,m-1)),this._arr[m].afterLineNumber!==S)){const s=this._arr[m];this._removeWhitespace(m),s.afterLineNumber=S,this._insertWhitespace(s)}}_removeWhitespace(b){this._arr.splice(b,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,b-1)}onLinesDeleted(b,S){this._checkPendingChanges(),b=b|0,S=S|0,this._lineCount-=S-b+1;for(let g=0,m=this._arr.length;g<m;g++){const s=this._arr[g].afterLineNumber;b<=s&&s<=S?this._arr[g].afterLineNumber=b-1:s>S&&(this._arr[g].afterLineNumber-=S-b+1)}}onLinesInserted(b,S){this._checkPendingChanges(),b=b|0,S=S|0,this._lineCount+=S-b+1;for(let g=0,m=this._arr.length;g<m;g++){const s=this._arr[g].afterLineNumber;b<=s&&(this._arr[g].afterLineNumber+=S-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 S=Math.max(0,this._prefixSumValidIndex+1);S===0&&(this._arr[0].prefixSum=this._arr[0].height,S++);for(let g=S;g<=b;g++)this._arr[g].prefixSum=this._arr[g-1].prefixSum+this._arr[g].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,b),this._arr[b].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const b=this._lineHeight*this._lineCount,S=this.getWhitespacesTotalHeight();return b+S+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(b){this._checkPendingChanges(),b=b|0;const S=this._findLastWhitespaceBeforeLineNumber(b);return S===-1?0:this.getWhitespacesAccumulatedHeight(S)}_findLastWhitespaceBeforeLineNumber(b){b=b|0;const S=this._arr;let g=0,m=S.length-1;for(;g<=m;){const t=(m-g|0)/2|0,i=g+t|0;if(S[i].afterLineNumber<b){if(i+1>=S.length||S[i+1].afterLineNumber>=b)return i;g=i+1|0}else m=i-1|0}return-1}_findFirstWhitespaceAfterLineNumber(b){b=b|0;const g=this._findLastWhitespaceBeforeLineNumber(b)+1;return g<this._arr.length?g:-1}getFirstWhitespaceIndexAfterLineNumber(b){return this._checkPendingChanges(),b=b|0,this._findFirstWhitespaceAfterLineNumber(b)}getVerticalOffsetForLineNumber(b,S=!1){this._checkPendingChanges(),b=b|0;let g;b>1?g=this._lineHeight*(b-1):g=0;const m=this.getWhitespaceAccumulatedHeightBeforeLineNumber(b-(S?1:0));return g+m+this._paddingTop}getVerticalOffsetAfterLineNumber(b,S=!1){this._checkPendingChanges(),b=b|0;const g=this._lineHeight*b,m=this.getWhitespaceAccumulatedHeightBeforeLineNumber(b+(S?1:0));return g+m+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let b=0;for(let S=0,g=this._arr.length;S<g;S++)b=Math.max(b,this._arr[S].minWidth);this._minWidth=b}return this._minWidth}isAfterLines(b){this._checkPendingChanges();const S=this.getLinesTotalHeight();return b>S}isInTopPadding(b){return this._paddingTop===0?!1:(this._checkPendingChanges(),b<this._paddingTop)}isInBottomPadding(b){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const S=this.getLinesTotalHeight();return b>=S-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(b){if(this._checkPendingChanges(),b=b|0,b<0)return 1;const S=this._lineCount|0,g=this._lineHeight;let m=1,s=S;for(;m<s;){const t=(m+s)/2|0,i=this.getVerticalOffsetForLineNumber(t)|0;if(b>=i+g)m=t+1;else{if(b>=i)return t;s=t}}return m>S?S:m}getLinesViewportData(b,S){this._checkPendingChanges(),b=b|0,S=S|0;const g=this._lineHeight,m=this.getLineNumberAtOrAfterVerticalOffset(b)|0,s=this.getVerticalOffsetForLineNumber(m)|0;let t=this._lineCount|0,i=this.getFirstWhitespaceIndexAfterLineNumber(m)|0;const n=this.getWhitespacesCount()|0;let r,d;i===-1?(i=n,d=t+1,r=0):(d=this.getAfterLineNumberForWhitespaceIndex(i)|0,r=this.getHeightForWhitespaceIndex(i)|0);let h=s,o=h;const c=5e5;let a=0;s>=c&&(a=Math.floor(s/c)*c,a=Math.floor(a/g)*g,o-=a);const l=[],u=b+(S-b)/2;let v=-1;for(let y=m;y<=t;y++){if(v===-1){const E=h,I=h+g;(E<=u&&u<I||E>u)&&(v=y)}for(h+=g,l[y-m]=o,o+=g;d===y;)o+=r,h+=r,i++,i>=n?d=t+1:(d=this.getAfterLineNumberForWhitespaceIndex(i)|0,r=this.getHeightForWhitespaceIndex(i)|0);if(h>=S){t=y;break}}v===-1&&(v=t);const f=this.getVerticalOffsetForLineNumber(t)|0;let p=m,C=t;return p<C&&s<b&&p++,p<C&&f+g>S&&C--,{bigNumbersDelta:a,startLineNumber:m,endLineNumber:t,relativeVerticalOffset:l,centeredLineNumber:v,completelyVisibleStartLineNumber:p,completelyVisibleEndLineNumber:C}}getVerticalOffsetForWhitespaceIndex(b){this._checkPendingChanges(),b=b|0;const S=this.getAfterLineNumberForWhitespaceIndex(b);let g;S>=1?g=this._lineHeight*S:g=0;let m;return b>0?m=this.getWhitespacesAccumulatedHeight(b-1):m=0,g+m+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(b){this._checkPendingChanges(),b=b|0;let S=0,g=this.getWhitespacesCount()-1;if(g<0)return-1;const m=this.getVerticalOffsetForWhitespaceIndex(g),s=this.getHeightForWhitespaceIndex(g);if(b>=m+s)return-1;for(;S<g;){const t=Math.floor((S+g)/2),i=this.getVerticalOffsetForWhitespaceIndex(t),n=this.getHeightForWhitespaceIndex(t);if(b>=i+n)S=t+1;else{if(b>=i)return t;g=t}}return S}getWhitespaceAtVerticalOffset(b){this._checkPendingChanges(),b=b|0;const S=this.getWhitespaceIndexAtOrAfterVerticallOffset(b);if(S<0||S>=this.getWhitespacesCount())return null;const g=this.getVerticalOffsetForWhitespaceIndex(S);if(g>b)return null;const m=this.getHeightForWhitespaceIndex(S),s=this.getIdForWhitespaceIndex(S),t=this.getAfterLineNumberForWhitespaceIndex(S);return{id:s,afterLineNumber:t,verticalOffset:g,height:m}}getWhitespaceViewportData(b,S){this._checkPendingChanges(),b=b|0,S=S|0;const g=this.getWhitespaceIndexAtOrAfterVerticallOffset(b),m=this.getWhitespacesCount()-1;if(g<0)return[];const s=[];for(let t=g;t<=m;t++){const i=this.getVerticalOffsetForWhitespaceIndex(t),n=this.getHeightForWhitespaceIndex(t);if(i>=S)break;s.push({id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n})}return s}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}}e.LinesLayout=D,D.INSTANCE_COUNT=0}),define(J[515],ee([1,0,5]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class k{constructor(D,w,b,S){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=S,this.visibleRange=new _.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[83],ee([1,0,9,5]),function(j,e,_,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 L{constructor(i,n,r,d){this._viewportBrand=void 0,this.top=i|0,this.left=n|0,this.width=r|0,this.height=d|0}}e.Viewport=L;class D{constructor(i,n){this.tabSize=i,this.data=n}}e.MinimapLinesRenderingData=D;class w{constructor(i,n,r,d,h,o,c){this._viewLineDataBrand=void 0,this.content=i,this.continuesWithWrappedLine=n,this.minColumn=r,this.maxColumn=d,this.startVisibleColumn=h,this.tokens=o,this.inlineDecorations=c}}e.ViewLineData=w;class b{constructor(i,n,r,d,h,o,c,a,l,u){this.minColumn=i,this.maxColumn=n,this.content=r,this.continuesWithWrappedLine=d,this.isBasicASCII=b.isBasicASCII(r,o),this.containsRTL=b.containsRTL(r,this.isBasicASCII,h),this.tokens=c,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=u}static isBasicASCII(i,n){return n?_.isBasicASCII(i):!0}static containsRTL(i,n,r){return!n&&r?_.containsRTL(i):!1}}e.ViewLineRenderingData=b;class S{constructor(i,n,r){this.range=i,this.inlineClassName=n,this.type=r}}e.InlineDecoration=S;class g{constructor(i,n,r,d){this.startOffset=i,this.endOffset=n,this.inlineClassName=r,this.inlineClassNameAffectsLetterSpacing=d}toInlineDecoration(i){return new S(new k.Range(i,this.startOffset+1,i,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=g;class m{constructor(i,n){this._viewModelDecorationBrand=void 0,this.range=i,this.options=n}}e.ViewModelDecoration=m;class s{constructor(i,n,r){this.color=i,this.zIndex=n,this.data=r}static cmp(i,n){return i.zIndex===n.zIndex?i.color<n.color?-1:i.color>n.color?1:0:i.zIndex-n.zIndex}}e.OverviewRulerDecorationsGroup=s}),define(J[516],ee([1,0,89,12,106,83]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function w(i,n){return i===null?n?S.INSTANCE:g.INSTANCE:new b(i,n)}e.createModelLineProjection=w;class b{constructor(n,r){this._projectionData=n,this._isVisible=r}isVisible(){return this._isVisible}setVisible(n){return this._isVisible=n,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(n,r,d){this._assertVisible();const h=d>0?this._projectionData.breakOffsets[d-1]:0,o=this._projectionData.breakOffsets[d];let c;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((u,v)=>new L.LineInjectedText(0,0,u+1,this._projectionData.injectionOptions[v],0));c=L.LineInjectedText.applyInjectedText(n.getLineContent(r),a).substring(h,o)}else c=n.getValueInRange({startLineNumber:r,startColumn:h+1,endLineNumber:r,endColumn:o+1});return d>0&&(c=s(this._projectionData.wrappedTextIndentLength)+c),c}getViewLineLength(n,r,d){return this._assertVisible(),this._projectionData.getLineLength(d)}getViewLineMinColumn(n,r,d){return this._assertVisible(),this._projectionData.getMinOutputOffset(d)+1}getViewLineMaxColumn(n,r,d){return this._assertVisible(),this._projectionData.getMaxOutputOffset(d)+1}getViewLineData(n,r,d){const h=new Array;return this.getViewLinesData(n,r,d,1,0,[!0],h),h[0]}getViewLinesData(n,r,d,h,o,c,a){this._assertVisible();const l=this._projectionData,u=l.injectionOffsets,v=l.injectionOptions;let f=null;if(u){f=[];let C=0,y=0;for(let E=0;E<l.getOutputLineCount();E++){const I=new Array;f[E]=I;const T=E>0?l.breakOffsets[E-1]:0,O=l.breakOffsets[E];for(;y<u.length;){const R=v[y].content.length,M=u[y]+C,N=M+R;if(M>O)break;if(T<N){const P=v[y];if(P.inlineClassName){const x=E>0?l.wrappedTextIndentLength:0,F=x+Math.max(M-T,0),B=x+Math.min(N-T,O);F!==B&&I.push(new D.SingleLineInlineDecoration(F,B,P.inlineClassName,P.inlineClassNameAffectsLetterSpacing))}}if(N<=O)C+=R,y++;else break}}}let p;u?p=n.tokenization.getLineTokens(r).withInserted(u.map((C,y)=>({offset:C,text:v[y].content,tokenMetadata:_.LineTokens.defaultTokenMetadata}))):p=n.tokenization.getLineTokens(r);for(let C=d;C<d+h;C++){const y=o+C-d;if(!c[y]){a[y]=null;continue}a[y]=this._getViewLineData(p,f?f[C]:null,C)}}_getViewLineData(n,r,d){this._assertVisible();const h=this._projectionData,o=d>0?h.wrappedTextIndentLength:0,c=d>0?h.breakOffsets[d-1]:0,a=h.breakOffsets[d],l=n.sliceAndInflate(c,a,o);let u=l.getLineContent();d>0&&(u=s(h.wrappedTextIndentLength)+u);const v=this._projectionData.getMinOutputOffset(d)+1,f=u.length+1,p=d+1<this.getViewLineCount(),C=d===0?0:h.breakOffsetsVisibleColumn[d-1];return new D.ViewLineData(u,p,v,f,C,l,r)}getModelColumnOfViewPosition(n,r){return this._assertVisible(),this._projectionData.translateToInputOffset(n,r-1)+1}getViewPositionOfModelPosition(n,r,d=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(r-1,d).toPosition(n)}getViewLineNumberOfModelPosition(n,r){this._assertVisible();const d=this._projectionData.translateToOutputPosition(r-1);return n+d.outputLineIndex}normalizePosition(n,r,d){const h=r.lineNumber-n;return this._projectionData.normalizeOutputPosition(n,r.column-1,d).toPosition(h)}getInjectedTextAt(n,r){return this._projectionData.getInjectedText(n,r-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class S{constructor(){}isVisible(){return!0}setVisible(n){return n?this:g.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(n,r,d){return n.getLineContent(r)}getViewLineLength(n,r,d){return n.getLineLength(r)}getViewLineMinColumn(n,r,d){return n.getLineMinColumn(r)}getViewLineMaxColumn(n,r,d){return n.getLineMaxColumn(r)}getViewLineData(n,r,d){const h=n.tokenization.getLineTokens(r),o=h.getLineContent();return new D.ViewLineData(o,!1,1,o.length+1,0,h.inflate(),null)}getViewLinesData(n,r,d,h,o,c,a){if(!c[o]){a[o]=null;return}a[o]=this.getViewLineData(n,r,0)}getModelColumnOfViewPosition(n,r){return r}getViewPositionOfModelPosition(n,r){return new k.Position(n,r)}getViewLineNumberOfModelPosition(n,r){return n}normalizePosition(n,r,d){return r}getInjectedTextAt(n,r){return null}}S.INSTANCE=new S;class g{constructor(){}isVisible(){return!1}setVisible(n){return n?S.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(n,r,d){throw new Error("Not supported")}getViewLineLength(n,r,d){throw new Error("Not supported")}getViewLineMinColumn(n,r,d){throw new Error("Not supported")}getViewLineMaxColumn(n,r,d){throw new Error("Not supported")}getViewLineData(n,r,d){throw new Error("Not supported")}getViewLinesData(n,r,d,h,o,c,a){throw new Error("Not supported")}getModelColumnOfViewPosition(n,r){throw new Error("Not supported")}getViewPositionOfModelPosition(n,r){throw new Error("Not supported")}getViewLineNumberOfModelPosition(n,r){throw new Error("Not supported")}normalizePosition(n,r,d){throw new Error("Not supported")}getInjectedTextAt(n,r){throw new Error("Not supported")}}g.INSTANCE=new g;const m=[""];function s(i){if(i>=m.length)for(let n=1;n<=i;n++)m[n]=t(n);return m[i]}function t(i){return new Array(i+1).join(" ")}}),define(J[517],ee([1,0,9,117,106,271]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class w{static create(h){return new w(h.get(129),h.get(128))}constructor(h,o){this.classifier=new b(h,o)}createLineBreaksComputer(h,o,c,a,l){const u=[],v=[],f=[];return{addRequest:(p,C,y)=>{u.push(p),v.push(C),f.push(y)},finalize:()=>{const p=h.typicalFullwidthCharacterWidth/h.typicalHalfwidthCharacterWidth,C=[];for(let y=0,E=u.length;y<E;y++){const I=v[y],T=f[y];T&&!T.injectionOptions&&!I?C[y]=m(this.classifier,T,u[y],o,c,p,a,l):C[y]=s(this.classifier,u[y],I,o,c,p,a,l)}return S.length=0,g.length=0,C}}}}e.MonospaceLineBreaksComputerFactory=w;class b extends k.CharacterClassifier{constructor(h,o){super(0);for(let c=0;c<h.length;c++)this.set(h.charCodeAt(c),1);for(let c=0;c<o.length;c++)this.set(o.charCodeAt(c),2)}get(h){return h>=0&&h<256?this._asciiMap[h]:h>=12352&&h<=12543||h>=13312&&h<=19903||h>=19968&&h<=40959?3:this._map.get(h)||this._defaultValue}}let S=[],g=[];function m(d,h,o,c,a,l,u,v){if(a===-1)return null;const f=o.length;if(f<=1)return null;const p=v==="keepAll",C=h.breakOffsets,y=h.breakOffsetsVisibleColumn,E=r(o,c,a,l,u),I=a-E,T=S,O=g;let R=0,M=0,N=0,P=a;const x=C.length;let F=0;if(F>=0){let B=Math.abs(y[F]-P);for(;F+1<x;){const V=Math.abs(y[F+1]-P);if(V>=B)break;B=V,F++}}for(;F<x;){let B=F<0?0:C[F],V=F<0?0:y[F];M>B&&(B=M,V=N);let K=0,A=0,Y=0,ie=0;if(V<=P){let ne=V,se=B===0?0:o.charCodeAt(B-1),H=B===0?0:d.get(se),W=!0;for(let $=B;$<f;$++){const Z=$,Q=o.charCodeAt($);let re,ce;if(_.isHighSurrogate(Q)?($++,re=0,ce=2):(re=d.get(Q),ce=t(Q,ne,c,l)),Z>M&&n(se,H,Q,re,p)&&(K=Z,A=ne),ne+=ce,ne>P){Z>M?(Y=Z,ie=ne-ce):(Y=$+1,ie=ne),ne-A>I&&(K=0),W=!1;break}se=Q,H=re}if(W){R>0&&(T[R]=C[C.length-1],O[R]=y[C.length-1],R++);break}}if(K===0){let ne=V,se=o.charCodeAt(B),H=d.get(se),W=!1;for(let $=B-1;$>=M;$--){const Z=$+1,Q=o.charCodeAt($);if(Q===9){W=!0;break}let re,ce;if(_.isLowSurrogate(Q)?($--,re=0,ce=2):(re=d.get(Q),ce=_.isFullWidthCharacter(Q)?l:1),ne<=P){if(Y===0&&(Y=Z,ie=ne),ne<=P-I)break;if(n(Q,re,se,H,p)){K=Z,A=ne;break}}ne-=ce,se=Q,H=re}if(K!==0){const $=I-(ie-A);if($<=c){const Z=o.charCodeAt(Y);let Q;_.isHighSurrogate(Z)?Q=2:Q=t(Z,ie,c,l),$-Q<0&&(K=0)}}if(W){F--;continue}}if(K===0&&(K=Y,A=ie),K<=M){const ne=o.charCodeAt(M);_.isHighSurrogate(ne)?(K=M+2,A=N+2):(K=M+1,A=N+t(ne,N,c,l))}for(M=K,T[R]=K,N=A,O[R]=A,R++,P=A+I;F<0||F<x&&y[F]<A;)F++;let le=Math.abs(y[F]-P);for(;F+1<x;){const ne=Math.abs(y[F+1]-P);if(ne>=le)break;le=ne,F++}}return R===0?null:(T.length=R,O.length=R,S=h.breakOffsets,g=h.breakOffsetsVisibleColumn,h.breakOffsets=T,h.breakOffsetsVisibleColumn=O,h.wrappedTextIndentLength=E,h)}function s(d,h,o,c,a,l,u,v){const f=L.LineInjectedText.applyInjectedText(h,o);let p,C;if(o&&o.length>0?(p=o.map(A=>A.options),C=o.map(A=>A.column-1)):(p=null,C=null),a===-1)return p?new D.ModelLineProjectionData(C,p,[f.length],[],0):null;const y=f.length;if(y<=1)return p?new D.ModelLineProjectionData(C,p,[f.length],[],0):null;const E=v==="keepAll",I=r(f,c,a,l,u),T=a-I,O=[],R=[];let M=0,N=0,P=0,x=a,F=f.charCodeAt(0),B=d.get(F),V=t(F,0,c,l),K=1;_.isHighSurrogate(F)&&(V+=1,F=f.charCodeAt(1),B=d.get(F),K++);for(let A=K;A<y;A++){const Y=A,ie=f.charCodeAt(A);let le,ne;_.isHighSurrogate(ie)?(A++,le=0,ne=2):(le=d.get(ie),ne=t(ie,V,c,l)),n(F,B,ie,le,E)&&(N=Y,P=V),V+=ne,V>x&&((N===0||V-P>T)&&(N=Y,P=V-ne),O[M]=N,R[M]=P,M++,x=P+T,N=0),F=ie,B=le}return M===0&&(!o||o.length===0)?null:(O[M]=y,R[M]=V,new D.ModelLineProjectionData(C,p,O,R,I))}function t(d,h,o,c){return d===9?o-h%o:_.isFullWidthCharacter(d)||d<32?c:1}function i(d,h){return h-d%h}function n(d,h,o,c,a){return o!==32&&(h===2&&c!==2||h!==1&&c===1||!a&&h===3&&c!==2||!a&&c===3&&h!==1)}function r(d,h,o,c,a){let l=0;if(a!==0){const u=_.firstNonWhitespaceIndex(d);if(u!==-1){for(let f=0;f<u;f++){const p=d.charCodeAt(f)===9?i(l,h):1;l+=p}const v=a===3?2:a===2?1:0;for(let f=0;f<v;f++){const p=i(l,h);l+=p}l+c>o&&(l=0)}}return l}}),define(J[277],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class _{constructor(w,b,S){this._colorZoneBrand=void 0,this.from=w|0,this.to=b|0,this.colorId=S|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=_;class k{constructor(w,b,S,g){this._overviewRulerZoneBrand=void 0,this.startLineNumber=w,this.endLineNumber=b,this.heightInLines=S,this.color=g,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 L{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),S=Math.floor(this.getCanvasHeight()),g=Math.floor(this._outerHeight),m=S/g,s=Math.floor(4*this._pixelRatio/2),t=[];for(let i=0,n=this._zones.length;i<n;i++){const r=this._zones[i];if(!w){const p=r.getColorZones();if(p){t.push(p);continue}}const d=this._getVerticalOffsetForLine(r.startLineNumber),h=r.heightInLines===0?this._getVerticalOffsetForLine(r.endLineNumber)+b:d+r.heightInLines*b,o=Math.floor(m*d),c=Math.floor(m*h);let a=Math.floor((o+c)/2),l=c-a;l<s&&(l=s),a-l<0&&(a=l),a+l>S&&(a=S-l);const u=r.color;let v=this._color2Id[u];v||(v=++this._lastAssignedId,this._color2Id[u]=v,this._id2Color[v]=u);const f=new _(a-l,a+l,v);r.setColorZone(f),t.push(f)}return this._colorZonesInvalid=!1,t.sort(_.compare),t}}e.OverviewZoneManager=L}),define(J[518],ee([1,0,35,277,143]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class D extends L.ViewEventHandler{constructor(b,S){super(),this._context=b;const g=this._context.configuration.options;this._domNode=(0,_.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(S),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(g.get(64)),this._zoneManager.setPixelRatio(g.get(138)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(b){const S=this._context.configuration.options;return b.hasChanged(64)&&(this._zoneManager.setLineHeight(S.get(64)),this._render()),b.hasChanged(138)&&(this._zoneManager.setPixelRatio(S.get(138)),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 S=!1;S=this._zoneManager.setDOMWidth(b.width)||S,S=this._zoneManager.setDOMHeight(b.height)||S,S&&(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(),S=this._zoneManager.getCanvasHeight(),g=this._zoneManager.resolveColorZones(),m=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,b,S),g.length>0&&this._renderOneLane(s,g,m,b),!0}_renderOneLane(b,S,g,m){let s=0,t=0,i=0;for(const n of S){const r=n.colorId,d=n.from,h=n.to;r!==s?(b.fillRect(0,t,m,i-t),s=r,b.fillStyle=g[s],t=d,i=h):i>=d?i=Math.max(i,h):(b.fillRect(0,t,m,i-t),t=d,i=h)}b.fillRect(0,t,m,i-t)}}e.OverviewRuler=D}),define(J[519],ee([1,0,478]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class k{constructor(D,w,b){this.configuration=D,this.theme=new _.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[520],ee([1,0,5,24]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class L{constructor(w,b){this._selection=w,this._isMovingLeft=b}getEditOperations(w,b){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const S=this._selection.startLineNumber,g=this._selection.startColumn,m=this._selection.endColumn;if(!(this._isMovingLeft&&g===1)&&!(!this._isMovingLeft&&m===w.getLineMaxColumn(S)))if(this._isMovingLeft){const s=new _.Range(S,g-1,S,g),t=w.getValueInRange(s);b.addEditOperation(s,null),b.addEditOperation(new _.Range(S,m,S,m),t)}else{const s=new _.Range(S,m,S,m+1),t=w.getValueInRange(s);b.addEditOperation(s,null),b.addEditOperation(new _.Range(S,g,S,g),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=L}),define(J[108],ee([1,0,11]),function(j,e,_){"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(s){this.value=s}equals(s){return this.value===s.value}contains(s){return this.equals(s)||this.value===""||s.value.startsWith(this.value+k.sep)}intersects(s){return this.contains(s)||s.contains(this)}append(s){return new k(this.value+k.sep+s)}}e.CodeActionKind=k,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");var L;(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"})(L||(e.CodeActionTriggerSource=L={}));function D(m,s){return!(m.include&&!m.include.intersects(s)||m.excludes&&m.excludes.some(t=>b(s,t,m.include))||!m.includeSourceActions&&k.Source.contains(s))}e.mayIncludeActionsOfKind=D;function w(m,s){const t=s.kind?new k(s.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&&!s.isPreferred)}e.filtersAction=w;function b(m,s,t){return!(!s.contains(m)||t&&s.contains(t))}class S{static fromUser(s,t){return!s||typeof s!="object"?new S(t.kind,t.apply,!1):new S(S.getKindFromUser(s,t.kind),S.getApplyFromUser(s,t.apply),S.getPreferredUser(s))}static getApplyFromUser(s,t){switch(typeof s.apply=="string"?s.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(s,t){return typeof s.kind=="string"?new k(s.kind):t}static getPreferredUser(s){return typeof s.preferred=="boolean"?s.preferred:!1}constructor(s,t,i){this.kind=s,this.apply=t,this.preferred=i}}e.CodeActionCommandArgs=S;class g{constructor(s,t){this.action=s,this.provider=t}resolve(s){var t;return we(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,s)}catch(n){(0,_.onUnexpectedExternalError)(n)}i&&(this.action.edit=i.edit)}return this})}}e.CodeActionItem=g}),define(J[278],ee([1,0,65,12,5,24]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class w{constructor(S,g,m){this.languageConfigurationService=m,this._selection=S,this._insertSpace=g,this._usedEndToken=null}static _haystackHasNeedleAtOffset(S,g,m){if(m<0)return!1;const s=g.length,t=S.length;if(m+s>t)return!1;for(let i=0;i<s;i++){const n=S.charCodeAt(m+i),r=g.charCodeAt(i);if(n!==r&&!(n>=65&&n<=90&&n+32===r)&&!(r>=65&&r<=90&&r+32===n))return!1}return!0}_createOperationsForBlockComment(S,g,m,s,t,i){const n=S.startLineNumber,r=S.startColumn,d=S.endLineNumber,h=S.endColumn,o=t.getLineContent(n),c=t.getLineContent(d);let a=o.lastIndexOf(g,r-1+g.length),l=c.indexOf(m,h-1-m.length);if(a!==-1&&l!==-1)if(n===d)o.substring(a+g.length,l).indexOf(m)>=0&&(a=-1,l=-1);else{const v=o.substring(a+g.length),f=c.substring(0,l);(v.indexOf(m)>=0||f.indexOf(m)>=0)&&(a=-1,l=-1)}let u;a!==-1&&l!==-1?(s&&a+g.length<o.length&&o.charCodeAt(a+g.length)===32&&(g=g+" "),s&&l>0&&c.charCodeAt(l-1)===32&&(m=" "+m,l-=1),u=w._createRemoveBlockCommentOperations(new L.Range(n,a+g.length+1,d,l+1),g,m)):(u=w._createAddBlockCommentOperations(S,g,m,this._insertSpace),this._usedEndToken=u.length===1?m:null);for(const v of u)i.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(S,g,m){const s=[];return L.Range.isEmpty(S)?s.push(_.EditOperation.delete(new L.Range(S.startLineNumber,S.startColumn-g.length,S.endLineNumber,S.endColumn+m.length))):(s.push(_.EditOperation.delete(new L.Range(S.startLineNumber,S.startColumn-g.length,S.startLineNumber,S.startColumn))),s.push(_.EditOperation.delete(new L.Range(S.endLineNumber,S.endColumn,S.endLineNumber,S.endColumn+m.length)))),s}static _createAddBlockCommentOperations(S,g,m,s){const t=[];return L.Range.isEmpty(S)?t.push(_.EditOperation.replace(new L.Range(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn),g+" "+m)):(t.push(_.EditOperation.insert(new k.Position(S.startLineNumber,S.startColumn),g+(s?" ":""))),t.push(_.EditOperation.insert(new k.Position(S.endLineNumber,S.endColumn),(s?" ":"")+m))),t}getEditOperations(S,g){const m=this._selection.startLineNumber,s=this._selection.startColumn;S.tokenization.tokenizeIfCheap(m);const t=S.getLanguageIdAtPosition(m,s),i=this.languageConfigurationService.getLanguageConfiguration(t).comments;!i||!i.blockCommentStartToken||!i.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,i.blockCommentStartToken,i.blockCommentEndToken,this._insertSpace,S,g)}computeCursorState(S,g){const m=g.getInverseEditOperations();if(m.length===2){const s=m[0],t=m[1];return new D.Selection(s.range.endLineNumber,s.range.endColumn,t.range.startLineNumber,t.range.startColumn)}else{const s=m[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new D.Selection(s.endLineNumber,s.endColumn+t,s.endLineNumber,s.endColumn+t)}}}e.BlockCommentCommand=w}),define(J[521],ee([1,0,9,65,12,5,24,278]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class S{constructor(m,s,t,i,n,r,d){this.languageConfigurationService=m,this._selection=s,this._tabSize=t,this._type=i,this._insertSpace=n,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=d||!1}static _gatherPreflightCommentStrings(m,s,t,i){m.tokenization.tokenizeIfCheap(s);const n=m.getLanguageIdAtPosition(s,1),r=i.getLanguageConfiguration(n).comments,d=r?r.lineCommentToken:null;if(!d)return null;const h=[];for(let o=0,c=t-s+1;o<c;o++)h[o]={ignore:!1,commentStr:d,commentStrOffset:0,commentStrLength:d.length};return h}static _analyzeLines(m,s,t,i,n,r,d,h){let o=!0,c;m===0?c=!0:m===1?c=!1:c=!0;for(let a=0,l=i.length;a<l;a++){const u=i[a],v=n+a;if(v===n&&d){u.ignore=!0;continue}const f=t.getLineContent(v),p=_.firstNonWhitespaceIndex(f);if(p===-1){u.ignore=r,u.commentStrOffset=f.length;continue}if(o=!1,u.ignore=!1,u.commentStrOffset=p,c&&!b.BlockCommentCommand._haystackHasNeedleAtOffset(f,u.commentStr,p)&&(m===0?c=!1:m===1||(u.ignore=!0)),c&&s){const C=p+u.commentStrLength;C<f.length&&f.charCodeAt(C)===32&&(u.commentStrLength+=1)}}if(m===0&&o){c=!1;for(let a=0,l=i.length;a<l;a++)i[a].ignore=!1}return{supported:!0,shouldRemoveComments:c,lines:i}}static _gatherPreflightData(m,s,t,i,n,r,d,h){const o=S._gatherPreflightCommentStrings(t,i,n,h);return o===null?{supported:!1}:S._analyzeLines(m,s,t,o,i,r,d,h)}_executeLineComments(m,s,t,i){let n;t.shouldRemoveComments?n=S._createRemoveLineCommentsOperations(t.lines,i.startLineNumber):(S._normalizeInsertionPoint(m,t.lines,i.startLineNumber,this._tabSize),n=this._createAddLineCommentsOperations(t.lines,i.startLineNumber));const r=new L.Position(i.positionLineNumber,i.positionColumn);for(let d=0,h=n.length;d<h;d++)s.addEditOperation(n[d].range,n[d].text),D.Range.isEmpty(n[d].range)&&D.Range.getStartPosition(n[d].range).equals(r)&&m.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(n[d].text||"").length);this._selectionId=s.trackSelection(i)}_attemptRemoveBlockComment(m,s,t,i){let n=s.startLineNumber,r=s.endLineNumber;const d=i.length+Math.max(m.getLineFirstNonWhitespaceColumn(s.startLineNumber),s.startColumn);let h=m.getLineContent(n).lastIndexOf(t,d-1),o=m.getLineContent(r).indexOf(i,s.endColumn-1-t.length);return h!==-1&&o===-1&&(o=m.getLineContent(n).indexOf(i,h+t.length),r=n),h===-1&&o!==-1&&(h=m.getLineContent(r).lastIndexOf(t,o),n=r),s.isEmpty()&&(h===-1||o===-1)&&(h=m.getLineContent(n).indexOf(t),h!==-1&&(o=m.getLineContent(n).indexOf(i,h+t.length))),h!==-1&&m.getLineContent(n).charCodeAt(h+t.length)===32&&(t+=" "),o!==-1&&m.getLineContent(r).charCodeAt(o-1)===32&&(i=" "+i,o-=1),h!==-1&&o!==-1?b.BlockCommentCommand._createRemoveBlockCommentOperations(new D.Range(n,h+t.length+1,r,o+1),t,i):null}_executeBlockComment(m,s,t){m.tokenization.tokenizeIfCheap(t.startLineNumber);const i=m.getLanguageIdAtPosition(t.startLineNumber,1),n=this.languageConfigurationService.getLanguageConfiguration(i).comments;if(!n||!n.blockCommentStartToken||!n.blockCommentEndToken)return;const r=n.blockCommentStartToken,d=n.blockCommentEndToken;let h=this._attemptRemoveBlockComment(m,t,r,d);if(!h){if(t.isEmpty()){const o=m.getLineContent(t.startLineNumber);let c=_.firstNonWhitespaceIndex(o);c===-1&&(c=o.length),h=b.BlockCommentCommand._createAddBlockCommentOperations(new D.Range(t.startLineNumber,c+1,t.startLineNumber,o.length+1),r,d,this._insertSpace)}else h=b.BlockCommentCommand._createAddBlockCommentOperations(new D.Range(t.startLineNumber,m.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.endLineNumber,m.getLineMaxColumn(t.endLineNumber)),r,d,this._insertSpace);h.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=s.trackSelection(t);for(const o of h)s.addEditOperation(o.range,o.text)}getEditOperations(m,s){let t=this._selection;if(this._moveEndPositionDown=!1,t.startLineNumber===t.endLineNumber&&this._ignoreFirstLine){s.addEditOperation(new D.Range(t.startLineNumber,m.getLineMaxColumn(t.startLineNumber),t.startLineNumber+1,1),t.startLineNumber===m.getLineCount()?"":`\n`),this._selectionId=s.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=S._gatherPreflightData(this._type,this._insertSpace,m,t.startLineNumber,t.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return i.supported?this._executeLineComments(m,s,i,t):this._executeBlockComment(m,s,t)}computeCursorState(m,s){let t=s.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,s){const t=[];for(let i=0,n=m.length;i<n;i++){const r=m[i];r.ignore||t.push(k.EditOperation.delete(new D.Range(s+i,r.commentStrOffset+1,s+i,r.commentStrOffset+r.commentStrLength+1)))}return t}_createAddLineCommentsOperations(m,s){const t=[],i=this._insertSpace?" ":"";for(let n=0,r=m.length;n<r;n++){const d=m[n];d.ignore||t.push(k.EditOperation.insert(new L.Position(s+n,d.commentStrOffset+1),d.commentStr+i))}return t}static nextVisibleColumn(m,s,t,i){return t?m+(s-m%s):m+i}static _normalizeInsertionPoint(m,s,t,i){let n=1073741824,r,d;for(let h=0,o=s.length;h<o;h++){if(s[h].ignore)continue;const c=m.getLineContent(t+h);let a=0;for(let l=0,u=s[h].commentStrOffset;a<n&&l<u;l++)a=S.nextVisibleColumn(a,i,c.charCodeAt(l)===9,1);a<n&&(n=a)}n=Math.floor(n/i)*i;for(let h=0,o=s.length;h<o;h++){if(s[h].ignore)continue;const c=m.getLineContent(t+h);let a=0;for(r=0,d=s[h].commentStrOffset;a<n&&r<d;r++)a=S.nextVisibleColumn(a,i,c.charCodeAt(r)===9,1);a>n?s[h].commentStrOffset=r-1:s[h].commentStrOffset=r}}}e.LineCommentCommand=S}),define(J[522],ee([1,0,5,24]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class L{constructor(w,b,S){this.selection=w,this.targetPosition=b,this.copy=S,this.targetSelection=null}getEditOperations(w,b){const S=w.getValueInRange(this.selection);if(this.copy||b.addEditOperation(this.selection,null),b.addEditOperation(new _.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),S),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=L}),define(J[523],ee([1,0,5]),function(j,e,_){"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,s)=>_.Range.compareRangesUsingStarts(m.range,s.range));const S=[];let g=b[0];for(let m=1;m<b.length;m++)g.range.endLineNumber===b[m].range.startLineNumber&&g.range.endColumn===b[m].range.startColumn?(g.range=g.range.plusRange(b[m].range),g.text=g.text+b[m].text):(S.push(g),g=b[m]);S.push(g);for(const m of S)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[524],ee([1,0,378]),function(j,e,_){"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 L{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 L(m)}buildReplaceString(m,s){if(this._state.kind===0)return s?(0,_.buildReplaceStringWithCasePreserved)(m,this._state.staticValue):this._state.staticValue;let t="";for(let i=0,n=this._state.pieces.length;i<n;i++){const r=this._state.pieces[i];if(r.staticValue!==null){t+=r.staticValue;continue}let d=D._substitute(r.matchIndex,m);if(r.caseOps!==null&&r.caseOps.length>0){const h=[],o=r.caseOps.length;let c=0;for(let a=0,l=d.length;a<l;a++){if(c>=o){h.push(d.slice(a));break}switch(r.caseOps[c]){case"U":h.push(d[a].toUpperCase());break;case"u":h.push(d[a].toUpperCase()),c++;break;case"L":h.push(d[a].toLowerCase());break;case"l":h.push(d[a].toLowerCase()),c++;break;default:h.push(d[a])}}d=h.join("")}t+=d}return t}static _substitute(m,s){if(s===null)return"";if(m===0)return s[0];let t="";for(;m>0;){if(m<s.length)return(s[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,s){return new w(null,m,s)}constructor(m,s,t){this.staticValue=m,this.matchIndex=s,!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,s){this._emitStatic(m),this._lastCharIndex=s}_emitStatic(m){m.length!==0&&(this._currentStaticPiece+=m)}emitMatchIndex(m,s,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=s}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 S(g){if(!g||g.length===0)return new D(null);const m=[],s=new b(g);for(let t=0,i=g.length;t<i;t++){const n=g.charCodeAt(t);if(n===92){if(t++,t>=i)break;const r=g.charCodeAt(t);switch(r){case 92:s.emitUnchanged(t-1),s.emitStatic("\\\\",t+1);break;case 110:s.emitUnchanged(t-1),s.emitStatic(`\n`,t+1);break;case 116:s.emitUnchanged(t-1),s.emitStatic("\t",t+1);break;case 117:case 85:case 108:case 76:s.emitUnchanged(t-1),s.emitStatic("",t+1),m.push(String.fromCharCode(r));break}continue}if(n===36){if(t++,t>=i)break;const r=g.charCodeAt(t);if(r===36){s.emitUnchanged(t-1),s.emitStatic("$",t+1);continue}if(r===48||r===38){s.emitUnchanged(t-1),s.emitMatchIndex(0,t+1,m),m.length=0;continue}if(49<=r&&r<=57){let d=r-48;if(t+1<i){const h=g.charCodeAt(t+1);if(48<=h&&h<=57){t++,d=d*10+(h-48),s.emitUnchanged(t-2),s.emitMatchIndex(d,t+1,m),m.length=0;continue}}s.emitUnchanged(t-1),s.emitMatchIndex(d,t+1,m),m.length=0;continue}}}return s.finalize()}e.parseReplaceString=S}),define(J[176],ee([1,0]),function(j,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 _=4278190080;class k{constructor(b){const S=Math.ceil(b/32);this._states=new Uint32Array(S)}get(b){const S=b/32|0,g=b%32;return(this._states[S]&1<<g)!==0}set(b,S){const g=b/32|0,m=b%32,s=this._states[g];S?this._states[g]=s|1<<m:this._states[g]=s&~(1<<m)}}class L{constructor(b,S,g){if(b.length!==S.length||b.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=b,this._endIndexes=S,this._collapseStates=new k(b.length),this._userDefinedStates=new k(b.length),this._recoveredStates=new k(b.length),this._types=g,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const b=[],S=(g,m)=>{const s=b[b.length-1];return this.getStartLineNumber(s)<=g&&this.getEndLineNumber(s)>=m};for(let g=0,m=this._startIndexes.length;g<m;g++){const s=this._startIndexes[g],t=this._endIndexes[g];if(s>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&&!S(s,t);)b.pop();const i=b.length>0?b[b.length-1]:-1;b.push(g),this._startIndexes[g]=s+((i&255)<<24),this._endIndexes[g]=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,S){this._collapseStates.set(b,S)}isUserDefined(b){return this._userDefinedStates.get(b)}setUserDefined(b,S){return this._userDefinedStates.set(b,S)}isRecovered(b){return this._recoveredStates.get(b)}setRecovered(b,S){return this._recoveredStates.set(b,S)}getSource(b){return this.isUserDefined(b)?1:this.isRecovered(b)?2:0}setSource(b,S){S===1?(this.setUserDefined(b,!0),this.setRecovered(b,!1)):S===2?(this.setUserDefined(b,!1),this.setRecovered(b,!0)):(this.setUserDefined(b,!1),this.setRecovered(b,!1))}setCollapsedAllOfType(b,S){let g=!1;if(this._types)for(let m=0;m<this._types.length;m++)this._types[m]===b&&(this.setCollapsed(m,S),g=!0);return g}toRegion(b){return new D(this,b)}getParentIndex(b){this.ensureParentIndices();const S=((this._startIndexes[b]&_)>>>24)+((this._endIndexes[b]&_)>>>16);return S===e.MAX_FOLDING_REGIONS?-1:S}contains(b,S){return this.getStartLineNumber(b)<=S&&this.getEndLineNumber(b)>=S}findIndex(b){let S=0,g=this._startIndexes.length;if(g===0)return-1;for(;S<g;){const m=Math.floor((S+g)/2);b<this.getStartLineNumber(m)?g=m:S=m+1}return S-1}findRange(b){let S=this.findIndex(b);if(S>=0){if(this.getEndLineNumber(S)>=b)return S;for(S=this.getParentIndex(S);S!==-1;){if(this.contains(S,b))return S;S=this.getParentIndex(S)}}return-1}toString(){const b=[];for(let S=0;S<this.length;S++)b[S]=`[${e.foldSourceAbbr[this.getSource(S)]}${this.isCollapsed(S)?"+":"-"}] ${this.getStartLineNumber(S)}/${this.getEndLineNumber(S)}`;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 S=b.length,g=new Uint32Array(S),m=new Uint32Array(S);let s=[],t=!1;for(let n=0;n<S;n++){const r=b[n];g[n]=r.startLineNumber,m[n]=r.endLineNumber,s.push(r.type),r.type&&(t=!0)}t||(s=void 0);const i=new L(g,m,s);for(let n=0;n<S;n++)b[n].isCollapsed&&i.setCollapsed(n,!0),i.setSource(n,b[n].source);return i}static sanitizeAndMerge(b,S,g){g=g??Number.MAX_VALUE;const m=(l,u)=>Array.isArray(l)?v=>v<u?l[v]:void 0:v=>v<u?l.toFoldRange(v):void 0,s=m(b,b.length),t=m(S,S.length);let i=0,n=0,r=s(0),d=t(0);const h=[];let o,c=0;const a=[];for(;r||d;){let l;if(d&&(!r||r.startLineNumber>=d.startLineNumber))r&&r.startLineNumber===d.startLineNumber?(d.source===1?l=d:(l=r,l.isCollapsed=d.isCollapsed&&r.endLineNumber===d.endLineNumber,l.source=0),r=s(++i)):(l=d,d.isCollapsed&&d.source===0&&(l.source=2)),d=t(++n);else{let u=n,v=d;for(;;){if(!v||v.startLineNumber>r.endLineNumber){l=r;break}if(v.source===1&&v.endLineNumber>r.endLineNumber)break;v=t(++u)}r=s(++i)}if(l){for(;o&&o.endLineNumber<l.startLineNumber;)o=h.pop();l.endLineNumber>l.startLineNumber&&l.startLineNumber>c&&l.endLineNumber<=g&&(!o||o.endLineNumber>=l.endLineNumber)&&(a.push(l),c=l.startLineNumber,o&&h.push(o),o=l)}}return a}}e.FoldingRegions=L;class D{constructor(b,S){this.ranges=b,this.index=S}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[279],ee([1,0,200,176]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=void 0;const L=5e3,D="indent";class w{constructor(s,t,i){this.editorModel=s,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id=D}dispose(){}compute(s){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(g(this.editorModel,i,n,this.foldingRangesLimit))}}e.IndentRangeProvider=w;class b{constructor(s){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=s}insertFirst(s,t,i){if(s>k.MAX_LINE_NUMBER||t>k.MAX_LINE_NUMBER)return;const n=this._length;this._startIndexes[n]=s,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(s){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let r=this._length-1,d=0;r>=0;r--,d++)i[d]=this._startIndexes[r],n[d]=this._endIndexes[r];return new k.FoldingRegions(i,n)}else{this._foldingRangesLimit.update(this._length,t);let i=0,n=this._indentOccurrences.length;for(let o=0;o<this._indentOccurrences.length;o++){const c=this._indentOccurrences[o];if(c){if(c+i>t){n=o;break}i+=c}}const r=s.getOptions().tabSize,d=new Uint32Array(t),h=new Uint32Array(t);for(let o=this._length-1,c=0;o>=0;o--){const a=this._startIndexes[o],l=s.getLineContent(a),u=(0,_.computeIndentLevel)(l,r);(u<n||u===n&&i++<t)&&(d[c]=a,h[c]=this._endIndexes[o],c++)}return new k.FoldingRegions(d,h)}}}e.RangesCollector=b;const S={limit:L,update:()=>{}};function g(m,s,t,i=S){const n=m.getOptions().tabSize,r=new b(i);let d;t&&(d=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const h=[],o=m.getLineCount()+1;h.push({indent:-1,endAbove:o,line:o});for(let c=m.getLineCount();c>0;c--){const a=m.getLineContent(c),l=(0,_.computeIndentLevel)(a,n);let u=h[h.length-1];if(l===-1){s&&(u.endAbove=c);continue}let v;if(d&&(v=a.match(d)))if(v[1]){let f=h.length-1;for(;f>0&&h[f].indent!==-2;)f--;if(f>0){h.length=f+1,u=h[f],r.insertFirst(c,u.line,l),u.line=c,u.indent=l,u.endAbove=c;continue}}else{h.push({indent:-2,endAbove:c,line:c});continue}if(u.indent>l){do h.pop(),u=h[h.length-1];while(u.indent>l);const f=u.endAbove-1;f-c>=1&&r.insertFirst(c,f,l)}u.indent===l?u.endAbove=c:h.push({indent:l,endAbove:c,line:c})}return r.toIndentRanges(m)}e.computeRanges=g}),define(J[280],ee([1,0,11,2,176]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.SyntaxRangeProvider=void 0;const D={},w="syntax";class b{constructor(t,i,n,r,d){this.editorModel=t,this.providers=i,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=d,this.id=w,this.disposables=new k.DisposableStore,d&&this.disposables.add(d);for(const h of i)typeof h.onDidChange=="function"&&this.disposables.add(h.onDidChange(n))}compute(t){return S(this.providers,this.editorModel,t).then(i=>{var n,r;return i?m(i,this.foldingRangesLimit):(r=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(t))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}}e.SyntaxRangeProvider=b;function S(s,t,i){let n=null;const r=s.map((d,h)=>Promise.resolve(d.provideFoldingRanges(t,D,i)).then(o=>{if(!i.isCancellationRequested&&Array.isArray(o)){Array.isArray(n)||(n=[]);const c=t.getLineCount();for(const a of o)a.start>0&&a.end>a.start&&a.end<=c&&n.push({start:a.start,end:a.end,rank:h,kind:a.kind})}},_.onUnexpectedExternalError));return Promise.all(r).then(d=>n)}class g{constructor(t){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=t}add(t,i,n,r){if(t>L.MAX_LINE_NUMBER||i>L.MAX_LINE_NUMBER)return;const d=this._length;this._startIndexes[d]=t,this._endIndexes[d]=i,this._nestingLevels[d]=r,this._types[d]=n,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),n=new Uint32Array(this._length);for(let r=0;r<this._length;r++)i[r]=this._startIndexes[r],n[r]=this._endIndexes[r];return new L.FoldingRegions(i,n,this._types)}else{this._foldingRangesLimit.update(this._length,t);let i=0,n=this._nestingLevelCounts.length;for(let o=0;o<this._nestingLevelCounts.length;o++){const c=this._nestingLevelCounts[o];if(c){if(c+i>t){n=o;break}i+=c}}const r=new Uint32Array(t),d=new Uint32Array(t),h=[];for(let o=0,c=0;o<this._length;o++){const a=this._nestingLevels[o];(a<n||a===n&&i++<t)&&(r[c]=this._startIndexes[o],d[c]=this._endIndexes[o],h[c]=this._types[o],c++)}return new L.FoldingRegions(r,d,h)}}}function m(s,t){const i=s.sort((h,o)=>{let c=h.start-o.start;return c===0&&(c=h.rank-o.rank),c}),n=new g(t);let r;const d=[];for(const h of i)if(!r)r=h,n.add(h.start,h.end,h.kind&&h.kind.value,d.length);else if(h.start>r.start)if(h.end<=r.end)d.push(r),r=h,n.add(h.start,h.end,h.kind&&h.kind.value,d.length);else{if(h.start>r.end){do r=d.pop();while(r&&h.start>r.end);r&&d.push(r),r=h}n.add(h.start,h.end,h.kind&&h.kind.value,d.length)}return n.toIndentRanges()}e.sanitizeRanges=m}),define(J[281],ee([1,0,65,5,116]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class D{static _handleEolEdits(b,S){let g;const m=[];for(const s of S)typeof s.eol=="number"&&(g=s.eol),s.range&&typeof s.text=="string"&&m.push(s);return typeof g=="number"&&b.hasModel()&&b.getModel().pushEOL(g),m}static _isFullModelReplaceEdit(b,S){if(!b.hasModel())return!1;const g=b.getModel(),m=g.validateRange(S.range);return g.getFullModelRange().equalsRange(m)}static execute(b,S,g){g&&b.pushUndoStop();const m=L.StableEditorScrollState.capture(b),s=D._handleEolEdits(b,S);s.length===1&&D._isFullModelReplaceEdit(b,s[0])?b.executeEdits("formatEditsCommand",s.map(t=>_.EditOperation.replace(k.Range.lift(t.range),t.text))):b.executeEdits("formatEditsCommand",s.map(t=>_.EditOperation.replaceMove(k.Range.lift(t.range),t.text))),g&&b.pushUndoStop(),m.restoreRelativeVerticalPositionOfCursor(b)}}e.FormattingEdit=D}),define(J[95],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class _{constructor(D,w,b,S){this.priority=D,this.range=w,this.initialMousePosX=b,this.initialMousePosY=S,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=_;class k{constructor(D,w,b,S,g,m){this.priority=D,this.owner=w,this.range=b,this.initialMousePosX=S,this.initialMousePosY=g,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[525],ee([1,0,24]),function(j,e,_){"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 S=w.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new _.Selection(S.endLineNumber,Math.min(this._originalSelection.positionColumn,S.endColumn),S.endLineNumber,Math.min(this._originalSelection.positionColumn,S.endColumn)):new _.Selection(S.endLineNumber,S.endColumn-this._text.length,S.endLineNumber,S.endColumn)}}e.InPlaceReplaceCommand=k}),define(J[282],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function _(L,D){let w=0;for(let b=0;b<L.length;b++)L.charAt(b)==="\t"?w+=D:w++;return w}e.getSpaceCnt=_;function k(L,D,w){L=L<0?0:L;let b="";if(!w){const S=Math.floor(L/D);L=L%D;for(let g=0;g<S;g++)b+="\t"}for(let S=0;S<L;S++)b+=" ";return b}e.generateIndent=k}),define(J[205],ee([1,0]),function(j,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[145],ee([1,0,11,2,82,12,5]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthOfText=e.addPositions=e.applyObservableDecorations=e.ColumnRange=e.getReadonlyEmptyArray=e.applyEdits=void 0;function b(r,d){const h=new S(r),o=d.map(c=>{const a=w.Range.lift(c.range);return{startOffset:h.getOffset(a.getStartPosition()),endOffset:h.getOffset(a.getEndPosition()),text:c.text}});o.sort((c,a)=>a.startOffset-c.startOffset);for(const c of o)r=r.substring(0,c.startOffset)+c.text+r.substring(c.endOffset);return r}e.applyEdits=b;class S{constructor(d){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let h=0;h<d.length;h++)d.charAt(h)===`\n`&&this.lineStartOffsetByLineIdx.push(h+1)}getOffset(d){return this.lineStartOffsetByLineIdx[d.lineNumber-1]+d.column-1}}const g=[];function m(){return g}e.getReadonlyEmptyArray=m;class s{constructor(d,h){if(this.startColumn=d,this.endColumnExclusive=h,d>h)throw new _.BugIndicatingError(`startColumn ${d} cannot be after endColumnExclusive ${h}`)}toRange(d){return new w.Range(d,this.startColumn,d,this.endColumnExclusive)}}e.ColumnRange=s;function t(r,d){const h=new k.DisposableStore,o=r.createDecorationsCollection();return h.add((0,L.autorun)(`Apply decorations from ${d.debugName}`,c=>{const a=d.read(c);o.set(a)})),h.add({dispose:()=>{o.clear()}}),h}e.applyObservableDecorations=t;function i(r,d){return new D.Position(r.lineNumber+d.lineNumber-1,d.lineNumber===1?r.column+d.column-1:d.column)}e.addPositions=i;function n(r){let d=1,h=1;for(const o of r)o===`\n`?(d++,h=1):h++;return new D.Position(d,h)}e.lengthOfText=n}),define(J[206],ee([1,0,145]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextReplacement=e.GhostTextPart=e.GhostText=void 0;class k{constructor(b,S){this.lineNumber=b,this.parts=S}renderForScreenReader(b){if(this.parts.length===0)return"";const S=this.parts[this.parts.length-1],g=b.substr(0,S.column-1);return(0,_.applyEdits)(g,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(b=>b.lines.length===0)}get lineCount(){return 1+this.parts.reduce((b,S)=>b+S.lines.length-1,0)}}e.GhostText=k;class L{constructor(b,S,g){this.column=b,this.lines=S,this.preview=g}}e.GhostTextPart=L;class D{constructor(b,S,g,m=0){this.lineNumber=b,this.columnRange=S,this.newLines=g,this.additionalReservedLineCount=m,this.parts=[new L(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(b){return this.newLines.join(`\n`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(b=>b.lines.length===0)}}e.GhostTextReplacement=D}),define(J[283],ee([1,0,162,9,5,206,145]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SingleTextEdit=void 0;class b{constructor(n,r){this.range=n,this.text=r}removeCommonPrefix(n,r){const d=r?this.range.intersectRanges(r):this.range;if(!d)return this;const h=n.getValueInRange(d,1),o=(0,k.commonPrefixLength)(h,this.text),c=(0,w.addPositions)(this.range.getStartPosition(),(0,w.lengthOfText)(h.substring(0,o))),a=this.text.substring(o),l=L.Range.fromPositions(c,this.range.getEndPosition());return new b(l,a)}augments(n){return this.text.startsWith(n.text)&&S(this.range,n.range)}computeGhostText(n,r,d,h=0){let o=this.removeCommonPrefix(n);if(o.range.endLineNumber!==o.range.startLineNumber)return;const c=n.getLineContent(o.range.startLineNumber),a=(0,k.getLeadingWhitespace)(c).length;if(o.range.startColumn-1<=a){const y=(0,k.getLeadingWhitespace)(o.text).length,E=c.substring(o.range.startColumn-1,a),I=L.Range.fromPositions(o.range.getStartPosition().delta(0,E.length),o.range.getEndPosition()),T=o.text.startsWith(E)?o.text.substring(E.length):o.text.substring(y);o=new b(I,T)}const u=n.getValueInRange(o.range),v=m(u,o.text);if(!v)return;const f=o.range.startLineNumber,p=new Array;if(r==="prefix"){const y=v.filter(E=>E.originalLength===0);if(y.length>1||y.length===1&&y[0].originalStart!==u.length)return}const C=o.text.length-h;for(const y of v){const E=o.range.startColumn+y.originalStart+y.originalLength;if(r==="subwordSmart"&&d&&d.lineNumber===o.range.startLineNumber&&E<d.column||y.originalLength>0)return;if(y.modifiedLength===0)continue;const I=y.modifiedStart+y.modifiedLength,T=Math.max(y.modifiedStart,Math.min(I,C)),O=o.text.substring(y.modifiedStart,T),R=o.text.substring(T,Math.max(y.modifiedStart,I));if(O.length>0){const M=(0,k.splitLines)(O);p.push(new D.GhostTextPart(E,M,!1))}if(R.length>0){const M=(0,k.splitLines)(R);p.push(new D.GhostTextPart(E,M,!0))}}return new D.GhostText(f,p)}}e.SingleTextEdit=b;function S(i,n){return n.getStartPosition().equals(i.getStartPosition())&&n.getEndPosition().isBeforeOrEqual(i.getEndPosition())}let g;function m(i,n){if(g?.originalValue===i&&g?.newValue===n)return g?.changes;{let r=t(i,n,!0);if(r){const d=s(r);if(d>0){const h=t(i,n,!1);h&&s(h)<d&&(r=h)}}return g={originalValue:i,newValue:n,changes:r},r}}function s(i){let n=0;for(const r of i)n+=r.originalLength;return n}function t(i,n,r){if(i.length>5e3||n.length>5e3)return;function d(u){let v=0;for(let f=0,p=u.length;f<p;f++){const C=u.charCodeAt(f);C>v&&(v=C)}return v}const h=Math.max(d(i),d(n));function o(u){if(u<0)throw new Error("unexpected");return h+u+1}function c(u){let v=0,f=0;const p=new Int32Array(u.length);for(let C=0,y=u.length;C<y;C++)if(r&&u[C]==="("){const E=f*100+v;p[C]=o(2*E),v++}else if(r&&u[C]===")"){v=Math.max(v-1,0);const E=f*100+v;p[C]=o(2*E+1),v===0&&f++}else p[C]=u.charCodeAt(C);return p}const a=c(i),l=c(n);return new _.LcsDiff({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}}),define(J[526],ee([1,0,5,24]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class L{constructor(w,b,S){this._selection=w,this._isCopyingDown=b,this._noop=S||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(w,b){let S=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,S.startLineNumber<S.endLineNumber&&S.endColumn===1&&(this._endLineNumberDelta=1,S=S.setEndPosition(S.endLineNumber-1,w.getLineMaxColumn(S.endLineNumber-1)));const g=[];for(let s=S.startLineNumber;s<=S.endLineNumber;s++)g.push(w.getLineContent(s));const m=g.join(`\n`);m===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?b.addEditOperation(new _.Range(S.endLineNumber,w.getLineMaxColumn(S.endLineNumber),S.endLineNumber+1,1),S.endLineNumber===w.getLineCount()?"":`\n`):this._isCopyingDown?b.addEditOperation(new _.Range(S.startLineNumber,1,S.startLineNumber,1),m+`\n`):b.addEditOperation(new _.Range(S.endLineNumber,w.getLineMaxColumn(S.endLineNumber),S.endLineNumber,w.getLineMaxColumn(S.endLineNumber)),`\n`+m),this._selectionId=b.trackSelection(S),this._selectionDirection=this._selection.getDirection()}computeCursorState(w,b){let S=b.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let g=S.startLineNumber,m=S.startColumn,s=S.endLineNumber,t=S.endColumn;this._startLineNumberDelta!==0&&(g=g+this._startLineNumberDelta,m=1),this._endLineNumberDelta!==0&&(s=s+this._endLineNumberDelta,t=1),S=k.Selection.createWithDirection(g,m,s,t,this._selectionDirection)}return S}}e.CopyLinesCommand=L}),define(J[527],ee([1,0,65,5]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class L{static getCollator(){return L._COLLATOR||(L._COLLATOR=new Intl.Collator),L._COLLATOR}constructor(S,g){this.selection=S,this.descending=g,this.selectionId=null}getEditOperations(S,g){const m=w(S,this.selection,this.descending);m&&g.addEditOperation(m.range,m.text),this.selectionId=g.trackSelection(this.selection)}computeCursorState(S,g){return g.getTrackedSelection(this.selectionId)}static canRun(S,g,m){if(S===null)return!1;const s=D(S,g,m);if(!s)return!1;for(let t=0,i=s.before.length;t<i;t++)if(s.before[t]!==s.after[t])return!0;return!1}}e.SortLinesCommand=L,L._COLLATOR=null;function D(b,S,g){const m=S.startLineNumber;let s=S.endLineNumber;if(S.endColumn===1&&s--,m>=s)return null;const t=[];for(let n=m;n<=s;n++)t.push(b.getLineContent(n));let i=t.slice(0);return i.sort(L.getCollator().compare),g===!0&&(i=i.reverse()),{startLineNumber:m,endLineNumber:s,before:t,after:i}}function w(b,S,g){const m=D(b,S,g);return m?_.EditOperation.replace(new k.Range(m.startLineNumber,1,m.endLineNumber,b.getLineMaxColumn(m.endLineNumber)),m.after.join(`\n`)):null}}),define(J[284],ee([1,0]),function(j,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 _(k,L,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:L.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=_}),define(J[285],ee([1,0,59,12,5]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class D{provideSelectionRanges(b,S){return we(this,void 0,void 0,function*(){const g=[];for(const m of S){const s=[];g.push(s);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,s))}return g})}static _bracketsRightYield(b,S,g,m,s){const t=new Map,i=Date.now();for(;;){if(S>=D._maxRounds){b();break}if(!m){b();break}const n=g.bracketPairs.findNextBracket(m);if(!n){b();break}if(Date.now()-i>D._maxDuration){setTimeout(()=>D._bracketsRightYield(b,S+1,g,m,s));break}if(n.bracketInfo.isOpeningBracket){const d=n.bracketInfo.bracketText,h=t.has(d)?t.get(d):0;t.set(d,h+1)}else{const d=n.bracketInfo.getOpeningBrackets()[0].bracketText;let h=t.has(d)?t.get(d):0;if(h-=1,t.set(d,Math.max(0,h)),h<0){let o=s.get(d);o||(o=new _.LinkedList,s.set(d,o)),o.push(n.range)}}m=n.range.getEndPosition()}}static _bracketsLeftYield(b,S,g,m,s,t){const i=new Map,n=Date.now();for(;;){if(S>=D._maxRounds&&s.size===0){b();break}if(!m){b();break}const r=g.bracketPairs.findPrevBracket(m);if(!r){b();break}if(Date.now()-n>D._maxDuration){setTimeout(()=>D._bracketsLeftYield(b,S+1,g,m,s,t));break}if(r.bracketInfo.isOpeningBracket){const h=r.bracketInfo.bracketText;let o=i.has(h)?i.get(h):0;if(o-=1,i.set(h,Math.max(0,o)),o<0){const c=s.get(h);if(c){const a=c.shift();c.size===0&&s.delete(h);const l=L.Range.fromPositions(r.range.getEndPosition(),a.getStartPosition()),u=L.Range.fromPositions(r.range.getStartPosition(),a.getEndPosition());t.push({range:l}),t.push({range:u}),D._addBracketLeading(g,u,t)}}}else{const h=r.bracketInfo.getOpeningBrackets()[0].bracketText,o=i.has(h)?i.get(h):0;i.set(h,o+1)}m=r.range.getStartPosition()}}static _addBracketLeading(b,S,g){if(S.startLineNumber===S.endLineNumber)return;const m=S.startLineNumber,s=b.getLineFirstNonWhitespaceColumn(m);s!==0&&s!==S.startColumn&&(g.push({range:L.Range.fromPositions(new k.Position(m,s),S.getEndPosition())}),g.push({range:L.Range.fromPositions(new k.Position(m,1),S.getEndPosition())}));const t=m-1;if(t>0){const i=b.getLineFirstNonWhitespaceColumn(t);i===S.startColumn&&i!==b.getLineLastNonWhitespaceColumn(t)&&(g.push({range:L.Range.fromPositions(new k.Position(t,i),S.getEndPosition())}),g.push({range:L.Range.fromPositions(new k.Position(t,1),S.getEndPosition())}))}}}e.BracketSelectionRangeProvider=D,D._maxDuration=30,D._maxRounds=2}),define(J[528],ee([1,0,9,5]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class L{provideSelectionRanges(w,b){const S=[];for(const g of b){const m=[];S.push(m),this._addInWordRanges(m,w,g),this._addWordRanges(m,w,g),this._addWhitespaceLine(m,w,g),m.push({range:w.getFullModelRange()})}return S}_addInWordRanges(w,b,S){const g=b.getWordAtPosition(S);if(!g)return;const{word:m,startColumn:s}=g,t=S.column-s;let i=t,n=t,r=0;for(;i>=0;i--){const d=m.charCodeAt(i);if(i!==t&&(d===95||d===45))break;if((0,_.isLowerAsciiLetter)(d)&&(0,_.isUpperAsciiLetter)(r))break;r=d}for(i+=1;n<m.length;n++){const d=m.charCodeAt(n);if((0,_.isUpperAsciiLetter)(d)&&(0,_.isLowerAsciiLetter)(r))break;if(d===95||d===45)break;r=d}i<n&&w.push({range:new k.Range(S.lineNumber,s+i,S.lineNumber,s+n)})}_addWordRanges(w,b,S){const g=b.getWordAtPosition(S);g&&w.push({range:new k.Range(S.lineNumber,g.startColumn,S.lineNumber,g.endColumn)})}_addWhitespaceLine(w,b,S){b.getLineLength(S.lineNumber)>0&&b.getLineFirstNonWhitespaceColumn(S.lineNumber)===0&&b.getLineLastNonWhitespaceColumn(S.lineNumber)===0&&w.push({range:new k.Range(S.lineNumber,1,S.lineNumber,b.getLineMaxColumn(S.lineNumber))})}}e.WordSelectionRangeProvider=L}),define(J[124],ee([1,0]),function(j,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 _{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 d=0,h=this.value.charCodeAt(r),o;if(o=_._table[h],typeof o=="number")return this.pos+=1,{type:o,pos:r,len:1};if(_.isDigitCharacter(h)){o=8;do d+=1,h=this.value.charCodeAt(r+d);while(_.isDigitCharacter(h));return this.pos+=d,{type:o,pos:r,len:d}}if(_.isVariableCharacter(h)){o=9;do h=this.value.charCodeAt(r+ ++d);while(_.isVariableCharacter(h)||_.isDigitCharacter(h));return this.pos+=d,{type:o,pos:r,len:d}}o=10;do d+=1,h=this.value.charCodeAt(r+d);while(!isNaN(h)&&typeof _._table[h]>"u"&&!_.isDigitCharacter(h)&&!_.isVariableCharacter(h));return this.pos+=d,{type:o,pos:r,len:d}}}e.Scanner=_,_._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class k{constructor(){this._children=[]}appendChild(r){return r instanceof L&&this._children[this._children.length-1]instanceof L?this._children[this._children.length-1].value+=r.value:(r.parent=this,this._children.push(r)),this}replace(r,d){const{parent:h}=r,o=h.children.indexOf(r),c=h.children.slice(0);c.splice(o,1,...d),h._children=c,function a(l,u){for(const v of l)v.parent=u,a(v.children,v)}(d,h)}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,d)=>r+d.toString(),"")}len(){return 0}}e.Marker=k;class L extends k{constructor(r){super(),this.value=r}toString(){return this.value}len(){return this.value.length}clone(){return new L(this.value)}}e.Text=L;class D extends k{}e.TransformableMarker=D;class w extends D{static compareByIndex(r,d){return r.index===d.index?0:r.isFinalTabstop?1:d.isFinalTabstop||r.index<d.index?-1:r.index>d.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(d=>d.clone()),r}}e.Placeholder=w;class b extends k{constructor(){super(...arguments),this.options=[]}appendChild(r){return r instanceof L&&(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 S extends k{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(r){const d=this;let h=!1,o=r.replace(this.regexp,function(){return h=!0,d._replace(Array.prototype.slice.call(arguments,0,-2))});return!h&&this._children.some(c=>c instanceof g&&!!c.elseValue)&&(o=this._replace([])),o}_replace(r){let d="";for(const h of this._children)if(h instanceof g){let o=r[h.index]||"";o=h.resolve(o),d+=o}else d+=h.toString();return d}toString(){return""}clone(){const r=new S;return r.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),r._children=this.children.map(d=>d.clone()),r}}e.Transform=S;class g extends k{constructor(r,d,h,o){super(),this.index=r,this.shorthandName=d,this.ifValue=h,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 d=r.match(/[a-z0-9]+/gi);return d?d.map(h=>h.charAt(0).toUpperCase()+h.substr(1)).join(""):r}_toCamelCase(r){const d=r.match(/[a-z0-9]+/gi);return d?d.map((h,o)=>o===0?h.charAt(0).toLowerCase()+h.substr(1):h.charAt(0).toUpperCase()+h.substr(1)).join(""):r}clone(){return new g(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=g;class m extends D{constructor(r){super(),this.name=r}resolve(r){let d=r.resolve(this);return this.transform&&(d=this.transform.resolve(d||"")),d!==void 0?(this._children=[new L(d)],!0):!1}clone(){const r=new m(this.name);return this.transform&&(r.transform=this.transform.clone()),r._children=this.children.map(d=>d.clone()),r}}e.Variable=m;function s(n,r){const d=[...n];for(;d.length>0;){const h=d.shift();if(!r(h))break;d.unshift(...h.children)}}class t extends k{get placeholderInfo(){if(!this._placeholders){const r=[];let d;this.walk(function(h){return h instanceof w&&(r.push(h),d=!d||d.index<h.index?h:d),!0}),this._placeholders={all:r,last:d}}return this._placeholders}get placeholders(){const{all:r}=this.placeholderInfo;return r}offset(r){let d=0,h=!1;return this.walk(o=>o===r?(h=!0,!1):(d+=o.len(),!0)),h?d:-1}fullLen(r){let d=0;return s([r],h=>(d+=h.len(),!0)),d}enclosingPlaceholders(r){const d=[];let{parent:h}=r;for(;h;)h instanceof w&&d.push(h),h=h.parent;return d}resolveVariables(r){return this.walk(d=>(d instanceof m&&d.resolve(r)&&(this._placeholders=void 0),!0)),this}appendChild(r){return this._placeholders=void 0,super.appendChild(r)}replace(r,d){return this._placeholders=void 0,super.replace(r,d)}clone(){const r=new t;return this._children=this.children.map(d=>d.clone()),r}walk(r){s(this.children,r)}}e.TextmateSnippet=t;class i{constructor(){this._scanner=new _,this._token={type:14,pos:0,len:0}}static escape(r){return r.replace(/\\$|}|\\\\/g,"\\\\$&")}static guessNeedsClipboard(r){return/\\${?CLIPBOARD/.test(r)}parse(r,d,h){const o=new t;return this.parseFragment(r,o),this.ensureFinalTabstop(o,h??!1,d??!1),o}parseFragment(r,d){const h=d.children.length;for(this._scanner.text(r),this._token=this._scanner.next();this._parse(d););const o=new Map,c=[];d.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):c.push(u)),!0));const a=(u,v)=>{const f=o.get(u.index);if(!f)return;const p=new w(u.index);p.transform=u.transform;for(const C of f){const y=C.clone();p.appendChild(y),y instanceof w&&o.has(y.index)&&!v.has(y.index)&&(v.add(y.index),a(y,v),v.delete(y.index))}d.replace(u,[p])},l=new Set;for(const u of c)a(u,l);return d.children.slice(h)}ensureFinalTabstop(r,d,h){(d||h&&r.placeholders.length>0)&&(r.placeholders.find(c=>c.index===0)||r.appendChild(new w(0)))}_accept(r,d){if(r===void 0||this._token.type===r){const h=d?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),h}return!1}_backTo(r){return this._scanner.pos=r.pos+r.len,this._token=r,!1}_until(r){const d=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 h=this._scanner.value.substring(d.pos,this._token.pos).replace(/\\\\(\\$|}|\\\\)/g,"$1");return this._token=this._scanner.next(),h}_parse(r){return this._parseEscaped(r)||this._parseTabstopOrVariableName(r)||this._parseComplexPlaceholder(r)||this._parseComplexVariable(r)||this._parseAnything(r)}_parseEscaped(r){let d;return(d=this._accept(5,!0))?(d=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||d,r.appendChild(new L(d)),!0):!1}_parseTabstopOrVariableName(r){let d;const h=this._token;return this._accept(0)&&(d=this._accept(9,!0)||this._accept(8,!0))?(r.appendChild(/^\\d+$/.test(d)?new w(Number(d)):new m(d)),!0):this._backTo(h)}_parseComplexPlaceholder(r){let d;const h=this._token;if(!(this._accept(0)&&this._accept(3)&&(d=this._accept(8,!0))))return this._backTo(h);const c=new w(Number(d));if(this._accept(1))for(;;){if(this._accept(4))return r.appendChild(c),!0;if(!this._parse(c))return r.appendChild(new L("${"+d+":")),c.children.forEach(r.appendChild,r),!0}else if(c.index>0&&this._accept(7)){const a=new b;for(;;){if(this._parseChoiceElement(a)){if(this._accept(2))continue;if(this._accept(7)&&(c.appendChild(a),this._accept(4)))return r.appendChild(c),!0}return this._backTo(h),!1}}else return this._accept(6)?this._parseTransform(c)?(r.appendChild(c),!0):(this._backTo(h),!1):this._accept(4)?(r.appendChild(c),!0):this._backTo(h)}_parseChoiceElement(r){const d=this._token,h=[];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(d),!1;h.push(o)}return h.length===0?(this._backTo(d),!1):(r.appendChild(new L(h.join(""))),!0)}_parseComplexVariable(r){let d;const h=this._token;if(!(this._accept(0)&&this._accept(3)&&(d=this._accept(9,!0))))return this._backTo(h);const c=new m(d);if(this._accept(1))for(;;){if(this._accept(4))return r.appendChild(c),!0;if(!this._parse(c))return r.appendChild(new L("${"+d+":")),c.children.forEach(r.appendChild,r),!0}else return this._accept(6)?this._parseTransform(c)?(r.appendChild(c),!0):(this._backTo(h),!1):this._accept(4)?(r.appendChild(c),!0):this._backTo(h)}_parseTransform(r){const d=new S;let h="",o="";for(;!this._accept(6);){let c;if(c=this._accept(5,!0)){c=this._accept(6,!0)||c,h+=c;continue}if(this._token.type!==14){h+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let c;if(c=this._accept(5,!0)){c=this._accept(5,!0)||this._accept(6,!0)||c,d.appendChild(new L(c));continue}if(!(this._parseFormatString(d)||this._parseAnything(d)))return!1}for(;!this._accept(4);){if(this._token.type!==14){o+=this._accept(void 0,!0);continue}return!1}try{d.regexp=new RegExp(h,o)}catch{return!1}return r.transform=d,!0}_parseFormatString(r){const d=this._token;if(!this._accept(0))return!1;let h=!1;this._accept(3)&&(h=!0);const o=this._accept(8,!0);if(o)if(h){if(this._accept(4))return r.appendChild(new g(Number(o))),!0;if(!this._accept(1))return this._backTo(d),!1}else return r.appendChild(new g(Number(o))),!0;else return this._backTo(d),!1;if(this._accept(6)){const c=this._accept(9,!0);return!c||!this._accept(4)?(this._backTo(d),!1):(r.appendChild(new g(Number(o),c)),!0)}else if(this._accept(11)){const c=this._until(4);if(c)return r.appendChild(new g(Number(o),void 0,c,void 0)),!0}else if(this._accept(12)){const c=this._until(4);if(c)return r.appendChild(new g(Number(o),void 0,void 0,c)),!0}else if(this._accept(13)){const c=this._until(1);if(c){const a=this._until(4);if(a)return r.appendChild(new g(Number(o),void 0,c,a)),!0}}else{const c=this._until(4);if(c)return r.appendChild(new g(Number(o),void 0,void 0,c)),!0}return this._backTo(d),!1}_parseAnything(r){return this._token.type!==14?(r.appendChild(new L(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=i}),define(J[207],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModel=e.StickyElement=e.StickyRange=void 0;class _{constructor(w,b){this.startLineNumber=w,this.endLineNumber=b}}e.StickyRange=_;class k{constructor(w,b,S){this.range=w,this.children=b,this.parent=S}}e.StickyElement=k;class L{constructor(w,b,S,g){this.uri=w,this.version=b,this.element=S,this.outlineProviderId=g}}e.StickyModel=L}),define(J[286],ee([1,0,16,64,9]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class D{constructor(S,g){this.leadingLineContent=S,this.characterCountDelta=g}}e.LineContext=D;class w{constructor(S,g,m,s,t,i,n=k.FuzzyScoreOptions.default,r=void 0){this.clipboardText=r,this._snippetCompareFn=w._compareCompletionItems,this._items=S,this._column=g,this._wordDistance=s,this._options=t,this._refilterKind=1,this._lineContext=m,this._fuzzyScoreOptions=n,i==="top"?this._snippetCompareFn=w._compareCompletionItemsSnippetsUp:i==="bottom"&&(this._snippetCompareFn=w._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(S){(this._lineContext.leadingLineContent!==S.leadingLineContent||this._lineContext.characterCountDelta!==S.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<S.characterCountDelta&&this._filteredItems?2:1,this._lineContext=S)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const S=new Set;for(const[g,m]of this.getItemsByProvider())m.length>0&&m[0].container.incomplete&&S.add(g);return S}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const S=[],{leadingLineContent:g,characterCountDelta:m}=this._lineContext;let s="",t="";const i=this._refilterKind===1?this._items:this._filteredItems,n=[],r=!this._options.filterGraceful||i.length>2e3?k.fuzzyScore:k.fuzzyScoreGracefulAggressive;for(let d=0;d<i.length;d++){const h=i[d];if(h.isInvalid)continue;const o=this._itemsByProvider.get(h.provider);o?o.push(h):this._itemsByProvider.set(h.provider,[h]);const c=h.position.column-h.editStart.column,a=c+m-(h.position.column-this._column);if(s.length!==a&&(s=a===0?"":g.slice(-a),t=s.toLowerCase()),h.word=s,a===0)h.score=k.FuzzyScore.Default;else{let l=0;for(;l<c;){const u=s.charCodeAt(l);if(u===32||u===9)l+=1;else break}if(l>=a)h.score=k.FuzzyScore.Default;else if(typeof h.completion.filterText=="string"){const u=r(s,t,l,h.completion.filterText,h.filterTextLow,0,this._fuzzyScoreOptions);if(!u)continue;(0,L.compareIgnoreCase)(h.completion.filterText,h.textLabel)===0?h.score=u:(h.score=(0,k.anyScore)(s,t,l,h.textLabel,h.labelLow,0),h.score[0]=u[0])}else{const u=r(s,t,l,h.textLabel,h.labelLow,0,this._fuzzyScoreOptions);if(!u)continue;h.score=u}}h.idx=d,h.distance=this._wordDistance.distance(h.position,h.completion),n.push(h),S.push(h.textLabel.length)}this._filteredItems=n.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:S.length?(0,_.quickSelect)(S.length-.85,S,(d,h)=>d-h):0}}static _compareCompletionItems(S,g){return S.score[0]>g.score[0]?-1:S.score[0]<g.score[0]?1:S.distance<g.distance?-1:S.distance>g.distance?1:S.idx<g.idx?-1:S.idx>g.idx?1:0}static _compareCompletionItemsSnippetsDown(S,g){if(S.completion.kind!==g.completion.kind){if(S.completion.kind===27)return 1;if(g.completion.kind===27)return-1}return w._compareCompletionItems(S,g)}static _compareCompletionItemsSnippetsUp(S,g){if(S.completion.kind!==g.completion.kind){if(S.completion.kind===27)return-1;if(g.completion.kind===27)return 1}return w._compareCompletionItems(S,g)}}e.CompletionModel=w}),define(J[529],ee([1,0,16,2,117]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class D{constructor(b,S,g,m){this._disposables=new k.DisposableStore,this._disposables.add(g.onDidSuggest(s=>{s.completionModel.items.length===0&&this.reset()})),this._disposables.add(g.onDidCancel(s=>{this.reset()})),this._disposables.add(S.onDidShow(()=>this._onItem(S.getFocusedItem()))),this._disposables.add(S.onDidFocus(this._onItem,this)),this._disposables.add(S.onDidHide(this.reset,this)),this._disposables.add(b.onWillType(s=>{if(this._active&&!S.isFrozen()&&g.state!==0){const t=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(t)&&b.getOption(0)&&m(this._active.item)}}))}_onItem(b){if(!b||!(0,_.isNonEmptyArray)(b.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===b.item)return;const S=new L.CharacterSet;for(const g of b.item.completion.commitCharacters)g.length>0&&S.add(g.charCodeAt(0));this._active={acceptCharacters:S,item:b}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=D}),define(J[530],ee([1,0,2]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class k{constructor(D,w){this._disposables=new _.DisposableStore,this._lastOvertyped=[],this._locked=!1,this._disposables.add(D.onWillType(()=>{if(this._locked||!D.hasModel())return;const b=D.getSelections(),S=b.length;let g=!1;for(let s=0;s<S;s++)if(!b[s].isEmpty()){g=!0;break}if(!g){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];const m=D.getModel();for(let s=0;s<S;s++){const t=b[s];if(m.getValueLengthInRange(t)>k._maxSelectionLength)return;this._lastOvertyped[s]={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()}}e.OvertypingCapturer=k,k._maxSelectionLength=51200}),define(J[287],ee([1,0,16,5,285]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class D{static create(b,S){return we(this,void 0,void 0,function*(){if(!S.getOption(114).localityBonus||!S.hasModel())return D.None;const g=S.getModel(),m=S.getPosition();if(!b.canComputeWordRanges(g.uri))return D.None;const[s]=yield new L.BracketSelectionRangeProvider().provideSelectionRanges(g,[m]);if(s.length===0)return D.None;const t=yield b.computeWordRanges(g.uri,s[0].range);if(!t)return D.None;const i=g.getWordUntilPosition(m);return delete t[i.word],new class extends D{distance(n,r){if(!m.equals(S.getPosition()))return 0;if(r.kind===17)return 2<<20;const d=typeof r.label=="string"?r.label:r.label.label,h=t[d];if((0,_.isFalsyOrEmpty)(h))return 2<<20;const o=(0,_.binarySearch)(h,k.Range.fromPositions(n),k.Range.compareRangesUsingStarts),c=o>=0?h[o]:h[Math.max(0,~o-1)];let a=s.length;for(const l of s){if(!k.Range.containsRange(l.range,c))break;a-=1}return a}}})}}e.WordDistance=D,D.None=new class extends D{distance(){return 0}}}),define(J[288],ee([1,0]),function(j,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 _(n){return Array.isArray(n)}e.isFuzzyActionArr=_;function k(n){return!_(n)}e.isFuzzyAction=k;function L(n){return typeof n=="string"}e.isString=L;function D(n){return!L(n)}e.isIAction=D;function w(n){return!n}e.empty=w;function b(n,r){return n.ignoreCase&&r?r.toLowerCase():r}e.fixCase=b;function S(n){return n.replace(/[&<>\'"_]/g,"-")}e.sanitize=S;function g(n,r){console.log(`${n.languageId}: ${r}`)}e.log=g;function m(n,r){return new Error(`${n.languageId}: ${r}`)}e.createError=m;function s(n,r,d,h,o){const c=/\\$((\\$)|(#)|(\\d\\d?)|[sS](\\d\\d?)|@(\\w+))/g;let a=null;return r.replace(c,function(l,u,v,f,p,C,y,E,I){return w(v)?w(f)?!w(p)&&p<h.length?b(n,h[p]):!w(y)&&n&&typeof n[y]=="string"?n[y]:(a===null&&(a=o.split("."),a.unshift(o)),!w(C)&&C<a.length?b(n,a[C]):""):b(n,d):"$"})}e.substituteMatches=s;function t(n,r){let d=r;for(;d&&d.length>0;){const h=n.tokenizer[d];if(h)return h;const o=d.lastIndexOf(".");o<0?d=null:d=d.substr(0,o)}return null}e.findRules=t;function i(n,r){let d=r;for(;d&&d.length>0;){if(n.stateNames[d])return!0;const o=d.lastIndexOf(".");o<0?d=null:d=d.substr(0,o)}return!1}e.stateExists=i}),define(J[531],ee([1,0,288]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function k(n,r){if(!r||!Array.isArray(r))return!1;for(const d of r)if(!n(d))return!1;return!0}function L(n,r){return typeof n=="boolean"?n:r}function D(n,r){return typeof n=="string"?n:r}function w(n){const r={};for(const d of n)r[d]=!0;return r}function b(n,r=!1){r&&(n=n.map(function(h){return h.toLowerCase()}));const d=w(n);return r?function(h){return d[h.toLowerCase()]!==void 0&&d.hasOwnProperty(h.toLowerCase())}:function(h){return d[h]!==void 0&&d.hasOwnProperty(h)}}function S(n,r){r=r.replace(/@@/g,"");let d=0,h;do h=!1,r=r.replace(/@(\\w+)/g,function(c,a){h=!0;let l="";if(typeof n[a]=="string")l=n[a];else if(n[a]&&n[a]instanceof RegExp)l=n[a].source;else throw n[a]===void 0?_.createError(n,"language definition does not contain attribute \'"+a+"\', used at: "+r):_.createError(n,"attribute reference \'"+a+"\' must be a string, used at: "+r);return _.empty(l)?"":"(?:"+l+")"}),d++;while(h&&d<5);r=r.replace(/\\x01/g,"@");const o=(n.ignoreCase?"i":"")+(n.unicode?"u":"");return new RegExp(r,o)}function g(n,r,d,h){if(h<0)return n;if(h<r.length)return r[h];if(h>=100){h=h-100;const o=d.split(".");if(o.unshift(d),h<o.length)return o[h]}return null}function m(n,r,d,h){let o=-1,c=d,a=d.match(/^\\$(([sS]?)(\\d\\d?)|#)(.*)$/);a&&(a[3]&&(o=parseInt(a[3]),a[2]&&(o=o+100)),c=a[4]);let l="~",u=c;!c||c.length===0?(l="!=",u=""):/^\\w*$/.test(u)?l="==":(a=c.match(/^(@|!@|~|!~|==|!=)(.*)$/),a&&(l=a[1],u=a[2]));let v;if((l==="~"||l==="!~")&&/^(\\w|\\|)*$/.test(u)){const f=b(u.split("|"),n.ignoreCase);v=function(p){return l==="~"?f(p):!f(p)}}else if(l==="@"||l==="!@"){const f=n[u];if(!f)throw _.createError(n,"the @ match target \'"+u+"\' is not defined, in rule: "+r);if(!k(function(C){return typeof C=="string"},f))throw _.createError(n,"the @ match target \'"+u+"\' must be an array of strings, in rule: "+r);const p=b(f,n.ignoreCase);v=function(C){return l==="@"?p(C):!p(C)}}else if(l==="~"||l==="!~")if(u.indexOf("$")<0){const f=S(n,"^"+u+"$");v=function(p){return l==="~"?f.test(p):!f.test(p)}}else v=function(f,p,C,y){return S(n,"^"+_.substituteMatches(n,u,p,C,y)+"$").test(f)};else if(u.indexOf("$")<0){const f=_.fixCase(n,u);v=function(p){return l==="=="?p===f:p!==f}}else{const f=_.fixCase(n,u);v=function(p,C,y,E,I){const T=_.substituteMatches(n,f,C,y,E);return l==="=="?p===T:p!==T}}return o===-1?{name:d,value:h,test:function(f,p,C,y){return v(f,f,p,C,y)}}:{name:d,value:h,test:function(f,p,C,y){const E=g(f,p,C,o);return v(E||"",f,p,C,y)}}}function s(n,r,d){if(d){if(typeof d=="string")return d;if(d.token||d.token===""){if(typeof d.token!="string")throw _.createError(n,"a \'token\' attribute must be of type string, in rule: "+r);{const h={token:d.token};if(d.token.indexOf("$")>=0&&(h.tokenSubst=!0),typeof d.bracket=="string")if(d.bracket==="@open")h.bracket=1;else if(d.bracket==="@close")h.bracket=-1;else throw _.createError(n,"a \'bracket\' attribute must be either \'@open\' or \'@close\', in rule: "+r);if(d.next){if(typeof d.next!="string")throw _.createError(n,"the next state must be a string value in rule: "+r);{let o=d.next;if(!/^(@pop|@push|@popall)$/.test(o)&&(o[0]==="@"&&(o=o.substr(1)),o.indexOf("$")<0&&!_.stateExists(n,_.substituteMatches(n,o,"",[],""))))throw _.createError(n,"the next state \'"+d.next+"\' is not defined in rule: "+r);h.next=o}}return typeof d.goBack=="number"&&(h.goBack=d.goBack),typeof d.switchTo=="string"&&(h.switchTo=d.switchTo),typeof d.log=="string"&&(h.log=d.log),typeof d.nextEmbedded=="string"&&(h.nextEmbedded=d.nextEmbedded,n.usesEmbedded=!0),h}}else if(Array.isArray(d)){const h=[];for(let o=0,c=d.length;o<c;o++)h[o]=s(n,r,d[o]);return{group:h}}else if(d.cases){const h=[];for(const c in d.cases)if(d.cases.hasOwnProperty(c)){const a=s(n,r,d.cases[c]);c==="@default"||c==="@"||c===""?h.push({test:void 0,value:a,name:c}):c==="@eos"?h.push({test:function(l,u,v,f){return f},value:a,name:c}):h.push(m(n,r,c,a))}const o=n.defaultToken;return{test:function(c,a,l,u){for(const v of h)if(!v.test||v.test(c,a,l,u))return v.value;return o}}}else throw _.createError(n,"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,d){let h;if(typeof d=="string")h=d;else if(d instanceof RegExp)h=d.source;else throw _.createError(r,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=h.length>0&&h[0]==="^",this.name=this.name+": "+h,this.regex=S(r,"^(?:"+(this.matchOnlyAtLineStart?h.substr(1):h)+")")}setAction(r,d){this.action=s(r,this.name,d)}}function i(n,r){if(!r||typeof r!="object")throw new Error("Monarch: expecting a language definition object");const d={};d.languageId=n,d.includeLF=L(r.includeLF,!1),d.noThrow=!1,d.maxStack=100,d.start=typeof r.start=="string"?r.start:null,d.ignoreCase=L(r.ignoreCase,!1),d.unicode=L(r.unicode,!1),d.tokenPostfix=D(r.tokenPostfix,"."+d.languageId),d.defaultToken=D(r.defaultToken,"source"),d.usesEmbedded=!1;const h=r;h.languageId=n,h.includeLF=d.includeLF,h.ignoreCase=d.ignoreCase,h.unicode=d.unicode,h.noThrow=d.noThrow,h.usesEmbedded=d.usesEmbedded,h.stateNames=r.tokenizer,h.defaultToken=d.defaultToken;function o(a,l,u){for(const v of u){let f=v.include;if(f){if(typeof f!="string")throw _.createError(d,"an \'include\' attribute must be a string at: "+a);if(f[0]==="@"&&(f=f.substr(1)),!r.tokenizer[f])throw _.createError(d,"include target \'"+f+"\' is not defined at: "+a);o(a+"."+f,l,r.tokenizer[f])}else{const p=new t(a);if(Array.isArray(v)&&v.length>=1&&v.length<=3)if(p.setRegex(h,v[0]),v.length>=3)if(typeof v[1]=="string")p.setAction(h,{token:v[1],next:v[2]});else if(typeof v[1]=="object"){const C=v[1];C.next=v[2],p.setAction(h,C)}else throw _.createError(d,"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 p.setAction(h,v[1]);else{if(!v.regex)throw _.createError(d,"a rule must either be an array, or an object with a \'regex\' or \'include\' field at: "+a);v.name&&typeof v.name=="string"&&(p.name=v.name),v.matchOnlyAtStart&&(p.matchOnlyAtLineStart=L(v.matchOnlyAtLineStart,!1)),p.setRegex(h,v.regex),p.setAction(h,v.action)}l.push(p)}}}if(!r.tokenizer||typeof r.tokenizer!="object")throw _.createError(d,"a language definition must define the \'tokenizer\' attribute as an object");d.tokenizer=[];for(const a in r.tokenizer)if(r.tokenizer.hasOwnProperty(a)){d.start||(d.start=a);const l=r.tokenizer[a];d.tokenizer[a]=new Array,o("tokenizer."+a,d.tokenizer[a],l)}if(d.usesEmbedded=h.usesEmbedded,r.brackets){if(!Array.isArray(r.brackets))throw _.createError(d,"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 c=[];for(const a of r.brackets){let l=a;if(l&&Array.isArray(l)&&l.length===3&&(l={token:l[2],open:l[0],close:l[1]}),l.open===l.close)throw _.createError(d,"open and close brackets in a \'brackets\' attribute must be different: "+l.open+`\n hint: use the \'bracket\' attribute if matching on equal brackets is required.`);if(typeof l.open=="string"&&typeof l.token=="string"&&typeof l.close=="string")c.push({token:l.token+d.tokenPostfix,open:_.fixCase(d,l.open),close:_.fixCase(d,l.close)});else throw _.createError(d,"every element in the \'brackets\' array must be a \'{open,close,token}\' object or array")}return d.brackets=c,d.noThrow=!0,d}e.compile=i}),define(J[532],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(J[533],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/findinput/findInput",e)}),define(J[534],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(J[535],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(J[536],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(J[537],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(J[538],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(J[539],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(J[540],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(J[541],ee([3,4]),function(j,e){return j.create("vs/base/browser/ui/tree/abstractTree",e)}),define(J[542],ee([3,4]),function(j,e){return j.create("vs/base/common/actions",e)}),define(J[543],ee([3,4]),function(j,e){return j.create("vs/base/common/errorMessage",e)}),define(J[544],ee([1,0,16,18,543]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function D(g,m){return m&&(g.stack||g.stacktrace)?L.localize(0,null,b(g),w(g.stack)||w(g.stacktrace)):b(g)}function w(g){return Array.isArray(g)?g.join(`\n`):g}function b(g){return g.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${g.message}. Please update the \'security.allowedUNCHosts\' setting if you want to allow this host.`:typeof g.code=="string"&&typeof g.errno=="number"&&typeof g.syscall=="string"?L.localize(1,null,g.message):g.message||L.localize(2,null)}function S(g=null,m=!1){if(!g)return L.localize(3,null);if(Array.isArray(g)){const s=_.coalesce(g),t=S(s[0],m);return s.length>1?L.localize(4,null,t,s.length):t}if(k.isString(g))return g;if(g.detail){const s=g.detail;if(s.error)return D(s.error,m);if(s.exception)return D(s.exception,m)}return g.stack?D(g,m):g.message?g.message:L.localize(5,null)}e.toErrorMessage=S}),define(J[545],ee([3,4]),function(j,e){return j.create("vs/base/common/keybindingLabels",e)}),define(J[208],ee([1,0,545]),function(j,e,_){"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,S=b){this.modifierLabels=[null],this.modifierLabels[2]=w,this.modifierLabels[1]=b,this.modifierLabels[3]=S}toLabel(w,b,S){if(b.length===0)return null;const g=[];for(let m=0,s=b.length;m<s;m++){const t=b[m],i=S(t);if(i===null)return null;g[m]=L(t,i,this.modifierLabels[w])}return g.join(" ")}}e.ModifierLabelProvider=k,e.UILabelProvider=new k({ctrlKey:"\\u2303",shiftKey:"\\u21E7",altKey:"\\u2325",metaKey:"\\u2318",separator:""},{ctrlKey:_.localize(0,null),shiftKey:_.localize(1,null),altKey:_.localize(2,null),metaKey:_.localize(3,null),separator:"+"},{ctrlKey:_.localize(4,null),shiftKey:_.localize(5,null),altKey:_.localize(6,null),metaKey:_.localize(7,null),separator:"+"}),e.AriaLabelProvider=new k({ctrlKey:_.localize(8,null),shiftKey:_.localize(9,null),altKey:_.localize(10,null),metaKey:_.localize(11,null),separator:"+"},{ctrlKey:_.localize(12,null),shiftKey:_.localize(13,null),altKey:_.localize(14,null),metaKey:_.localize(15,null),separator:"+"},{ctrlKey:_.localize(16,null),shiftKey:_.localize(17,null),altKey:_.localize(18,null),metaKey:_.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 L(D,w,b){if(w===null)return"";const S=[];return D.ctrlKey&&S.push(b.ctrlKey),D.shiftKey&&S.push(b.shiftKey),D.altKey&&S.push(b.altKey),D.metaKey&&S.push(b.metaKey),w!==""&&S.push(w),S.join(b.separator)}}),define(J[546],ee([3,4]),function(j,e){return j.create("vs/base/common/platform",e)}),define(J[17],ee([1,0,546]),function(j,e,_){"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 L=!1,D=!1,w=!1,b=!1,S=!1,g=!1,m=!1,s=!1,t=!1,i=!1,n,r=e.LANGUAGE_DEFAULT,d=e.LANGUAGE_DEFAULT,h,o;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let c;typeof e.globals.vscode<"u"&&typeof e.globals.vscode.process<"u"?c=e.globals.vscode.process:typeof process<"u"&&(c=process);const a=typeof((k=c?.versions)===null||k===void 0?void 0:k.electron)=="string",l=a&&c?.type==="renderer";if(typeof navigator=="object"&&!l)o=navigator.userAgent,L=o.indexOf("Windows")>=0,D=o.indexOf("Macintosh")>=0,s=(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,g=!0,n=_.getConfiguredDefaultLocale(_.localize(0,null))||e.LANGUAGE_DEFAULT,r=n,d=navigator.language;else if(typeof c=="object"){L=c.platform==="win32",D=c.platform==="darwin",w=c.platform==="linux",b=w&&!!c.env.SNAP&&!!c.env.SNAP_REVISION,m=a,t=!!c.env.CI||!!c.env.BUILD_ARTIFACTSTAGINGDIRECTORY,n=e.LANGUAGE_DEFAULT,r=e.LANGUAGE_DEFAULT;const C=c.env.VSCODE_NLS_CONFIG;if(C)try{const y=JSON.parse(C),E=y.availableLanguages["*"];n=y.locale,d=y.osLocale,r=E||e.LANGUAGE_DEFAULT,h=y._translationsConfigFile}catch{}S=!0}else console.error("Unable to resolve platform.");let u=0;D?u=1:L?u=3:w&&(u=2),e.isWindows=L,e.isMacintosh=D,e.isLinux=w,e.isNative=S,e.isWeb=g,e.isWebWorker=g&&typeof e.globals.importScripts=="function",e.isIOS=s,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 C=[];e.globals.addEventListener("message",E=>{if(E.data&&E.data.vscodeScheduleAsyncWork)for(let I=0,T=C.length;I<T;I++){const O=C[I];if(O.id===E.data.vscodeScheduleAsyncWork){C.splice(I,1),O.callback();return}}});let y=0;return E=>{const I=++y;C.push({id:I,callback:E}),e.globals.postMessage({vscodeScheduleAsyncWork:I},"*")}}return C=>setTimeout(C)})(),e.OS=D||s?2:L?1:3;let v=!0,f=!1;function p(){if(!f){f=!0;const C=new Uint8Array(2);C[0]=1,C[1]=2,v=new Uint16Array(C.buffer)[0]===(2<<8)+1}return v}e.isLittleEndian=p,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[547],ee([1,0,17]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.env=e.cwd=void 0;let k;if(typeof _.globals.vscode<"u"&&typeof _.globals.vscode.process<"u"){const L=_.globals.vscode.process;k={get platform(){return L.platform},get arch(){return L.arch},get env(){return L.env},cwd(){return L.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 _.isWindows?"win32":_.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=k.cwd,e.env=k.env,e.platform=k.platform}),define(J[90],ee([1,0,547]),function(j,e,_){"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,L=97,D=90,w=122,b=46,S=47,g=92,m=58,s=63;class t extends Error{constructor(v,f,p){let C;typeof f=="string"&&f.indexOf("not ")===0?(C="must not be",f=f.replace(/^not /,"")):C="must be";const y=v.indexOf(".")!==-1?"property":"argument";let E=`The "${v}" ${y} ${C} of type ${f}`;E+=`. Received type ${typeof p}`,super(E),this.code="ERR_INVALID_ARG_TYPE"}}function i(u,v){if(u===null||typeof u!="object")throw new t(v,"Object",u)}function n(u,v){if(typeof u!="string")throw new t(v,"string",u)}const r=_.platform==="win32";function d(u){return u===S||u===g}function h(u){return u===S}function o(u){return u>=k&&u<=D||u>=L&&u<=w}function c(u,v,f,p){let C="",y=0,E=-1,I=0,T=0;for(let O=0;O<=u.length;++O){if(O<u.length)T=u.charCodeAt(O);else{if(p(T))break;T=S}if(p(T)){if(!(E===O-1||I===1))if(I===2){if(C.length<2||y!==2||C.charCodeAt(C.length-1)!==b||C.charCodeAt(C.length-2)!==b){if(C.length>2){const R=C.lastIndexOf(f);R===-1?(C="",y=0):(C=C.slice(0,R),y=C.length-1-C.lastIndexOf(f)),E=O,I=0;continue}else if(C.length!==0){C="",y=0,E=O,I=0;continue}}v&&(C+=C.length>0?`${f}..`:"..",y=2)}else C.length>0?C+=`${f}${u.slice(E+1,O)}`:C=u.slice(E+1,O),y=O-E-1;E=O,I=0}else T===b&&I!==-1?++I:I=-1}return C}function a(u,v){i(v,"pathObject");const f=v.dir||v.root,p=v.base||`${v.name||""}${v.ext||""}`;return f?f===v.root?`${f}${p}`:`${f}${u}${p}`:p}e.win32={resolve(...u){let v="",f="",p=!1;for(let C=u.length-1;C>=-1;C--){let y;if(C>=0){if(y=u[C],n(y,"path"),y.length===0)continue}else v.length===0?y=_.cwd():(y=_.env[`=${v}`]||_.cwd(),(y===void 0||y.slice(0,2).toLowerCase()!==v.toLowerCase()&&y.charCodeAt(2)===g)&&(y=`${v}\\\\`));const E=y.length;let I=0,T="",O=!1;const R=y.charCodeAt(0);if(E===1)d(R)&&(I=1,O=!0);else if(d(R))if(O=!0,d(y.charCodeAt(1))){let M=2,N=M;for(;M<E&&!d(y.charCodeAt(M));)M++;if(M<E&&M!==N){const P=y.slice(N,M);for(N=M;M<E&&d(y.charCodeAt(M));)M++;if(M<E&&M!==N){for(N=M;M<E&&!d(y.charCodeAt(M));)M++;(M===E||M!==N)&&(T=`\\\\\\\\${P}\\\\${y.slice(N,M)}`,I=M)}}}else I=1;else o(R)&&y.charCodeAt(1)===m&&(T=y.slice(0,2),I=2,E>2&&d(y.charCodeAt(2))&&(O=!0,I=3));if(T.length>0)if(v.length>0){if(T.toLowerCase()!==v.toLowerCase())continue}else v=T;if(p){if(v.length>0)break}else if(f=`${y.slice(I)}\\\\${f}`,p=O,O&&v.length>0)break}return f=c(f,!p,"\\\\",d),p?`${v}\\\\${f}`:`${v}${f}`||"."},normalize(u){n(u,"path");const v=u.length;if(v===0)return".";let f=0,p,C=!1;const y=u.charCodeAt(0);if(v===1)return h(y)?"\\\\":u;if(d(y))if(C=!0,d(u.charCodeAt(1))){let I=2,T=I;for(;I<v&&!d(u.charCodeAt(I));)I++;if(I<v&&I!==T){const O=u.slice(T,I);for(T=I;I<v&&d(u.charCodeAt(I));)I++;if(I<v&&I!==T){for(T=I;I<v&&!d(u.charCodeAt(I));)I++;if(I===v)return`\\\\\\\\${O}\\\\${u.slice(T)}\\\\`;I!==T&&(p=`\\\\\\\\${O}\\\\${u.slice(T,I)}`,f=I)}}}else f=1;else o(y)&&u.charCodeAt(1)===m&&(p=u.slice(0,2),f=2,v>2&&d(u.charCodeAt(2))&&(C=!0,f=3));let E=f<v?c(u.slice(f),!C,"\\\\",d):"";return E.length===0&&!C&&(E="."),E.length>0&&d(u.charCodeAt(v-1))&&(E+="\\\\"),p===void 0?C?`\\\\${E}`:E:C?`${p}\\\\${E}`:`${p}${E}`},isAbsolute(u){n(u,"path");const v=u.length;if(v===0)return!1;const f=u.charCodeAt(0);return d(f)||v>2&&o(f)&&u.charCodeAt(1)===m&&d(u.charCodeAt(2))},join(...u){if(u.length===0)return".";let v,f;for(let y=0;y<u.length;++y){const E=u[y];n(E,"path"),E.length>0&&(v===void 0?v=f=E:v+=`\\\\${E}`)}if(v===void 0)return".";let p=!0,C=0;if(typeof f=="string"&&d(f.charCodeAt(0))){++C;const y=f.length;y>1&&d(f.charCodeAt(1))&&(++C,y>2&&(d(f.charCodeAt(2))?++C:p=!1))}if(p){for(;C<v.length&&d(v.charCodeAt(C));)C++;C>=2&&(v=`\\\\${v.slice(C)}`)}return e.win32.normalize(v)},relative(u,v){if(n(u,"from"),n(v,"to"),u===v)return"";const f=e.win32.resolve(u),p=e.win32.resolve(v);if(f===p||(u=f.toLowerCase(),v=p.toLowerCase(),u===v))return"";let C=0;for(;C<u.length&&u.charCodeAt(C)===g;)C++;let y=u.length;for(;y-1>C&&u.charCodeAt(y-1)===g;)y--;const E=y-C;let I=0;for(;I<v.length&&v.charCodeAt(I)===g;)I++;let T=v.length;for(;T-1>I&&v.charCodeAt(T-1)===g;)T--;const O=T-I,R=E<O?E:O;let M=-1,N=0;for(;N<R;N++){const x=u.charCodeAt(C+N);if(x!==v.charCodeAt(I+N))break;x===g&&(M=N)}if(N!==R){if(M===-1)return p}else{if(O>R){if(v.charCodeAt(I+N)===g)return p.slice(I+N+1);if(N===2)return p.slice(I+N)}E>R&&(u.charCodeAt(C+N)===g?M=N:N===2&&(M=3)),M===-1&&(M=0)}let P="";for(N=C+M+1;N<=y;++N)(N===y||u.charCodeAt(N)===g)&&(P+=P.length===0?"..":"\\\\..");return I+=M,P.length>0?`${P}${p.slice(I,T)}`:(p.charCodeAt(I)===g&&++I,p.slice(I,T))},toNamespacedPath(u){if(typeof u!="string"||u.length===0)return u;const v=e.win32.resolve(u);if(v.length<=2)return u;if(v.charCodeAt(0)===g){if(v.charCodeAt(1)===g){const f=v.charCodeAt(2);if(f!==s&&f!==b)return`\\\\\\\\?\\\\UNC\\\\${v.slice(2)}`}}else if(o(v.charCodeAt(0))&&v.charCodeAt(1)===m&&v.charCodeAt(2)===g)return`\\\\\\\\?\\\\${v}`;return u},dirname(u){n(u,"path");const v=u.length;if(v===0)return".";let f=-1,p=0;const C=u.charCodeAt(0);if(v===1)return d(C)?u:".";if(d(C)){if(f=p=1,d(u.charCodeAt(1))){let I=2,T=I;for(;I<v&&!d(u.charCodeAt(I));)I++;if(I<v&&I!==T){for(T=I;I<v&&d(u.charCodeAt(I));)I++;if(I<v&&I!==T){for(T=I;I<v&&!d(u.charCodeAt(I));)I++;if(I===v)return u;I!==T&&(f=p=I+1)}}}}else o(C)&&u.charCodeAt(1)===m&&(f=v>2&&d(u.charCodeAt(2))?3:2,p=f);let y=-1,E=!0;for(let I=v-1;I>=p;--I)if(d(u.charCodeAt(I))){if(!E){y=I;break}}else E=!1;if(y===-1){if(f===-1)return".";y=f}return u.slice(0,y)},basename(u,v){v!==void 0&&n(v,"ext"),n(u,"path");let f=0,p=-1,C=!0,y;if(u.length>=2&&o(u.charCodeAt(0))&&u.charCodeAt(1)===m&&(f=2),v!==void 0&&v.length>0&&v.length<=u.length){if(v===u)return"";let E=v.length-1,I=-1;for(y=u.length-1;y>=f;--y){const T=u.charCodeAt(y);if(d(T)){if(!C){f=y+1;break}}else I===-1&&(C=!1,I=y+1),E>=0&&(T===v.charCodeAt(E)?--E===-1&&(p=y):(E=-1,p=I))}return f===p?p=I:p===-1&&(p=u.length),u.slice(f,p)}for(y=u.length-1;y>=f;--y)if(d(u.charCodeAt(y))){if(!C){f=y+1;break}}else p===-1&&(C=!1,p=y+1);return p===-1?"":u.slice(f,p)},extname(u){n(u,"path");let v=0,f=-1,p=0,C=-1,y=!0,E=0;u.length>=2&&u.charCodeAt(1)===m&&o(u.charCodeAt(0))&&(v=p=2);for(let I=u.length-1;I>=v;--I){const T=u.charCodeAt(I);if(d(T)){if(!y){p=I+1;break}continue}C===-1&&(y=!1,C=I+1),T===b?f===-1?f=I:E!==1&&(E=1):f!==-1&&(E=-1)}return f===-1||C===-1||E===0||E===1&&f===C-1&&f===p+1?"":u.slice(f,C)},format:a.bind(null,"\\\\"),parse(u){n(u,"path");const v={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return v;const f=u.length;let p=0,C=u.charCodeAt(0);if(f===1)return d(C)?(v.root=v.dir=u,v):(v.base=v.name=u,v);if(d(C)){if(p=1,d(u.charCodeAt(1))){let M=2,N=M;for(;M<f&&!d(u.charCodeAt(M));)M++;if(M<f&&M!==N){for(N=M;M<f&&d(u.charCodeAt(M));)M++;if(M<f&&M!==N){for(N=M;M<f&&!d(u.charCodeAt(M));)M++;M===f?p=M:M!==N&&(p=M+1)}}}}else if(o(C)&&u.charCodeAt(1)===m){if(f<=2)return v.root=v.dir=u,v;if(p=2,d(u.charCodeAt(2))){if(f===3)return v.root=v.dir=u,v;p=3}}p>0&&(v.root=u.slice(0,p));let y=-1,E=p,I=-1,T=!0,O=u.length-1,R=0;for(;O>=p;--O){if(C=u.charCodeAt(O),d(C)){if(!T){E=O+1;break}continue}I===-1&&(T=!1,I=O+1),C===b?y===-1?y=O:R!==1&&(R=1):y!==-1&&(R=-1)}return I!==-1&&(y===-1||R===0||R===1&&y===I-1&&y===E+1?v.base=v.name=u.slice(E,I):(v.name=u.slice(E,y),v.base=u.slice(E,I),v.ext=u.slice(y,I))),E>0&&E!==p?v.dir=u.slice(0,E-1):v.dir=v.root,v},sep:"\\\\",delimiter:";",win32:null,posix:null};const l=(()=>{if(r){const u=/\\\\/g;return()=>{const v=_.cwd().replace(u,"/");return v.slice(v.indexOf("/"))}}return()=>_.cwd()})();e.posix={resolve(...u){let v="",f=!1;for(let p=u.length-1;p>=-1&&!f;p--){const C=p>=0?u[p]:l();n(C,"path"),C.length!==0&&(v=`${C}/${v}`,f=C.charCodeAt(0)===S)}return v=c(v,!f,"/",h),f?`/${v}`:v.length>0?v:"."},normalize(u){if(n(u,"path"),u.length===0)return".";const v=u.charCodeAt(0)===S,f=u.charCodeAt(u.length-1)===S;return u=c(u,!v,"/",h),u.length===0?v?"/":f?"./":".":(f&&(u+="/"),v?`/${u}`:u)},isAbsolute(u){return n(u,"path"),u.length>0&&u.charCodeAt(0)===S},join(...u){if(u.length===0)return".";let v;for(let f=0;f<u.length;++f){const p=u[f];n(p,"path"),p.length>0&&(v===void 0?v=p:v+=`/${p}`)}return v===void 0?".":e.posix.normalize(v)},relative(u,v){if(n(u,"from"),n(v,"to"),u===v||(u=e.posix.resolve(u),v=e.posix.resolve(v),u===v))return"";const f=1,p=u.length,C=p-f,y=1,E=v.length-y,I=C<E?C:E;let T=-1,O=0;for(;O<I;O++){const M=u.charCodeAt(f+O);if(M!==v.charCodeAt(y+O))break;M===S&&(T=O)}if(O===I)if(E>I){if(v.charCodeAt(y+O)===S)return v.slice(y+O+1);if(O===0)return v.slice(y+O)}else C>I&&(u.charCodeAt(f+O)===S?T=O:O===0&&(T=0));let R="";for(O=f+T+1;O<=p;++O)(O===p||u.charCodeAt(O)===S)&&(R+=R.length===0?"..":"/..");return`${R}${v.slice(y+T)}`},toNamespacedPath(u){return u},dirname(u){if(n(u,"path"),u.length===0)return".";const v=u.charCodeAt(0)===S;let f=-1,p=!0;for(let C=u.length-1;C>=1;--C)if(u.charCodeAt(C)===S){if(!p){f=C;break}}else p=!1;return f===-1?v?"/":".":v&&f===1?"//":u.slice(0,f)},basename(u,v){v!==void 0&&n(v,"ext"),n(u,"path");let f=0,p=-1,C=!0,y;if(v!==void 0&&v.length>0&&v.length<=u.length){if(v===u)return"";let E=v.length-1,I=-1;for(y=u.length-1;y>=0;--y){const T=u.charCodeAt(y);if(T===S){if(!C){f=y+1;break}}else I===-1&&(C=!1,I=y+1),E>=0&&(T===v.charCodeAt(E)?--E===-1&&(p=y):(E=-1,p=I))}return f===p?p=I:p===-1&&(p=u.length),u.slice(f,p)}for(y=u.length-1;y>=0;--y)if(u.charCodeAt(y)===S){if(!C){f=y+1;break}}else p===-1&&(C=!1,p=y+1);return p===-1?"":u.slice(f,p)},extname(u){n(u,"path");let v=-1,f=0,p=-1,C=!0,y=0;for(let E=u.length-1;E>=0;--E){const I=u.charCodeAt(E);if(I===S){if(!C){f=E+1;break}continue}p===-1&&(C=!1,p=E+1),I===b?v===-1?v=E:y!==1&&(y=1):v!==-1&&(y=-1)}return v===-1||p===-1||y===0||y===1&&v===p-1&&v===f+1?"":u.slice(v,p)},format:a.bind(null,"/"),parse(u){n(u,"path");const v={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return v;const f=u.charCodeAt(0)===S;let p;f?(v.root="/",p=1):p=0;let C=-1,y=0,E=-1,I=!0,T=u.length-1,O=0;for(;T>=p;--T){const R=u.charCodeAt(T);if(R===S){if(!I){y=T+1;break}continue}E===-1&&(I=!1,E=T+1),R===b?C===-1?C=T:O!==1&&(O=1):C!==-1&&(O=-1)}if(E!==-1){const R=y===0&&f?1:y;C===-1||O===0||O===1&&C===E-1&&C===y+1?v.base=v.name=u.slice(R,E):(v.name=u.slice(R,C),v.base=u.slice(R,E),v.ext=u.slice(C,E))}return y>0?v.dir=u.slice(0,y-1):f&&(v.dir="/"),v},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[209],ee([1,0,90,17,9]),function(j,e,_,k,L){"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,_.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 S(t,i=_.posix.sep){if(!t)return"";const n=t.length,r=t.charCodeAt(0);if(D(r)){if(D(t.charCodeAt(1))&&!D(t.charCodeAt(2))){let h=3;const o=h;for(;h<n&&!D(t.charCodeAt(h));h++);if(o!==h&&!D(t.charCodeAt(h+1))){for(h+=1;h<n;h++)if(D(t.charCodeAt(h)))return t.slice(0,h+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 d=t.indexOf("://");if(d!==-1){for(d+=3;d<n;d++)if(D(t.charCodeAt(d)))return t.slice(0,d+1)}return""}e.getRoot=S;function g(t,i,n,r=_.sep){if(t===i)return!0;if(!t||!i||i.length>t.length)return!1;if(n){if(!(0,L.startsWithIgnoreCase)(t,i))return!1;if(i.length===t.length)return!0;let h=i.length;return i.charAt(i.length-1)===r&&h--,t.charAt(h)===r}return i.charAt(i.length-1)!==r&&(i+=r),t.indexOf(i)===0}e.isEqualOrParent=g;function m(t){return t>=65&&t<=90||t>=97&&t<=122}e.isWindowsDriveLetter=m;function s(t,i=k.isWindows){return i?m(t.charCodeAt(0))&&t.charCodeAt(1)===58:!1}e.hasDriveLetter=s}),define(J[548],ee([1,0,64,90,17,9]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const w=[void 0,[]];function b(o,c,a=0,l=0){const u=c;return u.values&&u.values.length>1?S(o,u.values,a,l):g(o,c,a,l)}e.scoreFuzzy2=b;function S(o,c,a,l){let u=0;const v=[];for(const f of c){const[p,C]=g(o,f,a,l);if(typeof p!="number")return w;u+=p,v.push(...C)}return[u,s(v)]}function g(o,c,a,l){const u=(0,_.fuzzyScore)(c.original,c.originalLowercase,a,o,o.toLowerCase(),l,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return u?[u[0],(0,_.createMatches)(u)]:w}const m=Object.freeze({score:0});function s(o){const c=o.sort((u,v)=>u.start-v.start),a=[];let l;for(const u of c)!l||!t(l,u)?(l=u,a.push(u)):(l.start=Math.min(l.start,u.start),l.end=Math.max(l.end,u.end));return a}function t(o,c){return!(o.end<c.start||c.end<o.start)}function i(o){return o.startsWith(\'"\')&&o.endsWith(\'"\')}const n=" ";function r(o){typeof o!="string"&&(o="");const c=o.toLowerCase(),{pathNormalized:a,normalized:l,normalizedLowercase:u}=d(o),v=a.indexOf(k.sep)>=0,f=i(o);let p;const C=o.split(n);if(C.length>1)for(const y of C){const E=i(y),{pathNormalized:I,normalized:T,normalizedLowercase:O}=d(y);T&&(p||(p=[]),p.push({original:y,originalLowercase:y.toLowerCase(),pathNormalized:I,normalized:T,normalizedLowercase:O,expectContiguousMatch:E}))}return{original:o,originalLowercase:c,pathNormalized:a,normalized:l,normalizedLowercase:u,values:p,containsPathSeparator:v,expectContiguousMatch:f}}e.prepareQuery=r;function d(o){let c;L.isWindows?c=o.replace(/\\//g,k.sep):c=o.replace(/\\\\/g,k.sep);const a=(0,D.stripWildcards)(c).replace(/\\s|"/g,"");return{pathNormalized:c,normalized:a,normalizedLowercase:a.toLowerCase()}}function h(o){return Array.isArray(o)?r(o.map(c=>c.original).join(n)):r(o.original)}e.pieceToQuery=h}),define(J[549],ee([1,0,209,17]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=void 0;function L(w,b=k.isWindows){return(0,_.hasDriveLetter)(w,b)?w.charAt(0).toUpperCase()+w.slice(1):w}e.normalizeDriveLetter=L;let D=Object.create(null)}),define(J[56],ee([1,0,17]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const k=_.globals.performance&&typeof _.globals.performance.now=="function";class L{static create(w=!0){return new L(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?_.globals.performance.now():Date.now()}}e.StopWatch=L}),define(J[6],ee([1,0,11,94,2,59,56]),function(j,e,_,k,L,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,S=!1;var g;(function(p){p.None=()=>L.Disposable.None;function C(Q){if(S){const{onDidAddListener:re}=Q,ce=i.create();let he=0;Q.onDidAddListener=()=>{++he===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),ce.print()),re?.()}}}function y(Q,re){return x(Q,()=>{},0,void 0,!0,void 0,re)}p.defer=y;function E(Q){return(re,ce=null,he)=>{let de=!1,ue;return ue=Q(q=>{if(!de)return ue?ue.dispose():de=!0,re.call(ce,q)},null,he),de&&ue.dispose(),ue}}p.once=E;function I(Q,re,ce){return P((he,de=null,ue)=>Q(q=>he.call(de,re(q)),null,ue),ce)}p.map=I;function T(Q,re,ce){return P((he,de=null,ue)=>Q(q=>{re(q),he.call(de,q)},null,ue),ce)}p.forEach=T;function O(Q,re,ce){return P((he,de=null,ue)=>Q(q=>re(q)&&he.call(de,q),null,ue),ce)}p.filter=O;function R(Q){return Q}p.signal=R;function M(...Q){return(re,ce=null,he)=>(0,L.combinedDisposable)(...Q.map(de=>de(ue=>re.call(ce,ue),null,he)))}p.any=M;function N(Q,re,ce,he){let de=ce;return I(Q,ue=>(de=re(de,ue),de),he)}p.reduce=N;function P(Q,re){let ce;const he={onWillAddFirstListener(){ce=Q(de.fire,de)},onDidRemoveLastListener(){ce?.dispose()}};re||C(he);const de=new r(he);return re?.add(de),de.event}function x(Q,re,ce=100,he=!1,de=!1,ue,q){let z,U,X,te=0,G;const ae={leakWarningThreshold:ue,onWillAddFirstListener(){z=Q(Ce=>{te++,U=re(U,Ce),he&&!X&&(fe.fire(U),U=void 0),G=()=>{const Se=U;U=void 0,X=void 0,(!he||te>1)&&fe.fire(Se),te=0},typeof ce=="number"?(clearTimeout(X),X=setTimeout(G,ce)):X===void 0&&(X=0,queueMicrotask(G))})},onWillRemoveListener(){de&&te>0&&G?.()},onDidRemoveLastListener(){G=void 0,z.dispose()}};q||C(ae);const fe=new r(ae);return q?.add(fe),fe.event}p.debounce=x;function F(Q,re=0,ce){return p.debounce(Q,(he,de)=>he?(he.push(de),he):[de],re,void 0,!0,void 0,ce)}p.accumulate=F;function B(Q,re=(he,de)=>he===de,ce){let he=!0,de;return O(Q,ue=>{const q=he||!re(ue,de);return he=!1,de=ue,q},ce)}p.latch=B;function V(Q,re,ce){return[p.filter(Q,re,ce),p.filter(Q,he=>!re(he),ce)]}p.split=V;function K(Q,re=!1,ce=[]){let he=ce.slice(),de=Q(z=>{he?he.push(z):q.fire(z)});const ue=()=>{he?.forEach(z=>q.fire(z)),he=null},q=new r({onWillAddFirstListener(){de||(de=Q(z=>q.fire(z)))},onDidAddFirstListener(){he&&(re?setTimeout(ue):ue())},onDidRemoveLastListener(){de&&de.dispose(),de=null}});return q.event}p.buffer=K;class A{constructor(re){this.event=re,this.disposables=new L.DisposableStore}map(re){return new A(I(this.event,re,this.disposables))}forEach(re){return new A(T(this.event,re,this.disposables))}filter(re){return new A(O(this.event,re,this.disposables))}reduce(re,ce){return new A(N(this.event,re,ce,this.disposables))}latch(){return new A(B(this.event,void 0,this.disposables))}debounce(re,ce=100,he=!1,de=!1,ue){return new A(x(this.event,re,ce,he,de,ue,this.disposables))}on(re,ce,he){return this.event(re,ce,he)}once(re,ce,he){return E(this.event)(re,ce,he)}dispose(){this.disposables.dispose()}}function Y(Q){return new A(Q)}p.chain=Y;function ie(Q,re,ce=he=>he){const he=(...z)=>q.fire(ce(...z)),de=()=>Q.on(re,he),ue=()=>Q.removeListener(re,he),q=new r({onWillAddFirstListener:de,onDidRemoveLastListener:ue});return q.event}p.fromNodeEventEmitter=ie;function le(Q,re,ce=he=>he){const he=(...z)=>q.fire(ce(...z)),de=()=>Q.addEventListener(re,he),ue=()=>Q.removeEventListener(re,he),q=new r({onWillAddFirstListener:de,onDidRemoveLastListener:ue});return q.event}p.fromDOMEventEmitter=le;function ne(Q){return new Promise(re=>E(Q)(re))}p.toPromise=ne;function se(Q,re){return re(void 0),Q(ce=>re(ce))}p.runAndSubscribe=se;function H(Q,re){let ce=null;function he(ue){ce?.dispose(),ce=new L.DisposableStore,re(ue,ce)}he(void 0);const de=Q(ue=>he(ue));return(0,L.toDisposable)(()=>{de.dispose(),ce?.dispose()})}p.runAndSubscribeWithStore=H;class W{constructor(re,ce){this._observable=re,this._counter=0,this._hasChanged=!1;const he={onWillAddFirstListener:()=>{re.addObserver(this)},onDidRemoveLastListener:()=>{re.removeObserver(this)}};ce||C(he),this.emitter=new r(he),ce&&ce.add(this.emitter)}beginUpdate(re){this._counter++}handlePossibleChange(re){}handleChange(re,ce){this._hasChanged=!0}endUpdate(re){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function $(Q,re){return new W(Q,re).emitter.event}p.fromObservable=$;function Z(Q){return re=>{let ce=0,he=!1;const de={beginUpdate(){ce++},endUpdate(){ce--,ce===0&&(Q.reportChanges(),he&&(he=!1,re()))},handlePossibleChange(){},handleChange(){he=!0}};return Q.addObserver(de),{dispose(){Q.removeObserver(de)}}}}p.fromObservableLight=Z})(g||(e.Event=g={}));class m{constructor(C){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${C}_${m._idPool++}`,m.all.add(this)}start(C){this._stopWatch=new w.StopWatch(!0),this.listenerCount=C}stop(){if(this._stopWatch){const C=this._stopWatch.elapsed();this.durations.push(C),this.elapsedOverall+=C,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=m,m.all=new Set,m._idPool=0;let s=-1;class t{constructor(C,y=Math.random().toString(18).slice(2,5)){this.threshold=C,this.name=y,this._warnCountdown=0}dispose(){var C;(C=this._stacks)===null||C===void 0||C.clear()}check(C,y){const E=this.threshold;if(E<=0||y<E)return;this._stacks||(this._stacks=new Map);const I=this._stacks.get(C.value)||0;if(this._stacks.set(C.value,I+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=E*.5;let T,O=0;for(const[R,M]of this._stacks)(!T||O<M)&&(T=R,O=M);console.warn(`[${this.name}] potential listener LEAK detected, having ${y} listeners already. MOST frequent listener (${O}):`),console.warn(T)}return()=>{const T=this._stacks.get(C.value)||0;this._stacks.set(C.value,T-1)}}}class i{static create(){var C;return new i((C=new Error().stack)!==null&&C!==void 0?C:"")}constructor(C){this.value=C}print(){console.warn(this.value.split(`\n`).slice(2).join(`\n`))}}class n{constructor(C,y,E){this.callback=C,this.callbackThis=y,this.stack=E,this.subscription=new L.SafeDisposable}invoke(C){this.callback.call(this.callbackThis,C)}}class r{constructor(C){var y,E,I,T,O;this._disposed=!1,this._options=C,this._leakageMon=s>0||!((y=this._options)===null||y===void 0)&&y.leakWarningThreshold?new t((I=(E=this._options)===null||E===void 0?void 0:E.leakWarningThreshold)!==null&&I!==void 0?I:s):void 0,this._perfMon=!((T=this._options)===null||T===void 0)&&T._profName?new m(this._options._profName):void 0,this._deliveryQueue=(O=this._options)===null||O===void 0?void 0:O.deliveryQueue}dispose(){var C,y,E,I;if(!this._disposed){if(this._disposed=!0,this._listeners){if(b){const T=Array.from(this._listeners);queueMicrotask(()=>{var O;for(const R of T)R.subscription.isset()&&(R.subscription.unset(),(O=R.stack)===null||O===void 0||O.print())})}this._listeners.clear()}(C=this._deliveryQueue)===null||C===void 0||C.clear(this),(E=(y=this._options)===null||y===void 0?void 0:y.onDidRemoveLastListener)===null||E===void 0||E.call(y),(I=this._leakageMon)===null||I===void 0||I.dispose()}}get event(){return this._event||(this._event=(C,y,E)=>{var I,T,O;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`),L.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 P=new n(C,y,N),x=this._listeners.push(P);R&&(!((T=this._options)===null||T===void 0)&&T.onDidAddFirstListener)&&this._options.onDidAddFirstListener(this),!((O=this._options)===null||O===void 0)&&O.onDidAddListener&&this._options.onDidAddListener(this,C,y);const F=P.subscription.set(()=>{var B,V;M?.(),this._disposed||((V=(B=this._options)===null||B===void 0?void 0:B.onWillRemoveListener)===null||V===void 0||V.call(B,this),x(),this._options&&this._options.onDidRemoveLastListener&&(this._listeners&&!this._listeners.isEmpty()||this._options.onDidRemoveLastListener(this)))});return E instanceof L.DisposableStore?E.add(F):Array.isArray(E)&&E.push(F),F}),this._event}fire(C){var y,E,I;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new h((y=this._options)===null||y===void 0?void 0:y.onListenerError));for(const T of this._listeners)this._deliveryQueue.push(this,T,C);(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 d{constructor(C=_.onUnexpectedError){this._onListenerError=C,this._queue=new D.LinkedList}get size(){return this._queue.size}push(C,y,E){this._queue.push(new o(C,y,E))}clear(C){const y=new D.LinkedList;for(const E of this._queue)E.emitter!==C&&y.push(E);this._queue=y}deliver(){for(;this._queue.size>0;){const C=this._queue.shift();try{C.listener.invoke(C.event)}catch(y){this._onListenerError(y)}}}}e.EventDeliveryQueue=d;class h extends d{clear(C){this._queue.clear()}}class o{constructor(C,y,E){this.emitter=C,this.listener=y,this.event=E}}class c extends r{constructor(C){super(C),this._isPaused=0,this._eventQueue=new D.LinkedList,this._mergeFn=C?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const C=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(C))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(C){this._listeners&&(this._isPaused!==0?this._eventQueue.push(C):super.fire(C))}}e.PauseableEmitter=c;class a extends c{constructor(C){var y;super(C),this._delay=(y=C.delay)!==null&&y!==void 0?y:100}fire(C){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(C)}}e.DebounceEmitter=a;class l extends r{constructor(C){super(C),this._queuedEvents=[],this._mergeFn=C?.merge}fire(C){this.hasListeners()&&(this._queuedEvents.push(C),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(y=>super.fire(y)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=l;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(C){const y={event:C,listener:null};this.events.push(y),this.hasListeners&&this.hook(y);const E=()=>{this.hasListeners&&this.unhook(y);const I=this.events.indexOf(y);this.events.splice(I,1)};return(0,L.toDisposable)((0,k.once)(E))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(C=>this.hook(C))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(C=>this.unhook(C))}hook(C){C.listener=C.event(y=>this.emitter.fire(y))}unhook(C){C.listener&&C.listener.dispose(),C.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=u;class v{constructor(){this.buffers=[]}wrapEvent(C){return(y,E,I)=>C(T=>{const O=this.buffers[this.buffers.length-1];O?O.push(()=>y.call(E,T)):y.call(E,T)},void 0,I)}bufferEvents(C){const y=[];this.buffers.push(y);const E=C();return this.buffers.pop(),y.forEach(I=>I()),E}}e.EventBufferer=v;class f{constructor(){this.listening=!1,this.inputEvent=g.None,this.inputEventListener=L.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(C){this.inputEvent=C,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=C(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=f}),define(J[47],ee([1,0,6,2]),function(j,e,_,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 L{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}L.INSTANCE=new L;class D extends k.Disposable{constructor(){super(),this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(n){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),n&&this._onDidChange.fire()}}class w extends k.Disposable{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const n=this._register(new D);this._register(n.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const n=document.createElement("canvas").getContext("2d"),r=window.devicePixelRatio||1,d=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;return r/d}}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 S(i,n){typeof i=="string"&&(i=window.matchMedia(i)),i.addEventListener("change",n)}e.addMatchMediaChangeListener=S,e.PixelRatio=new b;function g(){return L.INSTANCE.getZoomFactor()}e.getZoomFactor=g;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 s=!1;if(window.matchMedia){const i=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),n=window.matchMedia("(display-mode: fullscreen)");s=i.matches,S(i,({matches:r})=>{s&&n.matches||(s=r)})}function t(){return s}e.isStandalone=t}),define(J[210],ee([1,0,47,17]),function(j,e,_,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||_.isStandalone()?0:navigator.keyboard||_.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[78],ee([1,0,6]),function(j,e,_){"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 S=g=>this.emitter.fire(g);this.emitter=new _.Emitter({onWillAddFirstListener:()=>D.addEventListener(w,S,b),onDidRemoveLastListener:()=>D.removeEventListener(w,S,b)})}dispose(){this.emitter.dispose()}}e.DomEmitter=k}),define(J[44],ee([1,0,47,58,113,17]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;function w(t){if(t.charCode){const n=String.fromCharCode(t.charCode).toUpperCase();return k.KeyCodeUtils.fromString(n)}const i=t.keyCode;if(i===3)return 7;if(_.isFirefox)switch(i){case 59:return 85;case 60:if(D.isLinux)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(D.isMacintosh)return 57;break}else if(_.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,S=512,g=1024,m=D.isMacintosh?2048:256;class s{constructor(i){this._standardKeyboardEventBrand=!0;const n=i;this.browserEvent=n,this.target=n.target,this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.altKey=n.altKey,this.metaKey=n.metaKey,this.altGraphKey=n.getModifierState("AltGraph"),this.keyCode=w(n),this.code=n.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 n=0;return this.ctrlKey&&(n|=b),this.altKey&&(n|=S),this.shiftKey&&(n|=g),this.metaKey&&(n|=m),n|=i,n}_computeKeyCodeChord(){let i=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(i=this.keyCode),new L.KeyCodeChord(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,i)}}e.StandardKeyboardEvent=s}),define(J[67],ee([1,0,47,366,17]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class D{constructor(S){this.timestamp=Date.now(),this.browserEvent=S,this.leftButton=S.button===0,this.middleButton=S.button===1,this.rightButton=S.button===2,this.buttons=S.buttons,this.target=S.target,this.detail=S.detail||1,S.type==="dblclick"&&(this.detail=2),this.ctrlKey=S.ctrlKey,this.shiftKey=S.shiftKey,this.altKey=S.altKey,this.metaKey=S.metaKey,typeof S.pageX=="number"?(this.posx=S.pageX,this.posy=S.pageY):(this.posx=S.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=S.clientY+document.body.scrollTop+document.documentElement.scrollTop);const g=k.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(window,S.view);this.posx-=g.left,this.posy-=g.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=D;class w{constructor(S,g=0,m=0){if(this.browserEvent=S||null,this.target=S?S.target||S.targetNode||S.srcElement:null,this.deltaY=m,this.deltaX=g,S){const s=S,t=S;if(typeof s.wheelDeltaY<"u")this.deltaY=s.wheelDeltaY/120;else if(typeof t.VERTICAL_AXIS<"u"&&t.axis===t.VERTICAL_AXIS)this.deltaY=-t.detail/3;else if(S.type==="wheel"){const i=S;i.deltaMode===i.DOM_DELTA_LINE?_.isFirefox&&!L.isMacintosh?this.deltaY=-S.deltaY/3:this.deltaY=-S.deltaY:this.deltaY=-S.deltaY/40}if(typeof s.wheelDeltaX<"u")_.isSafari&&L.isWindows?this.deltaX=-(s.wheelDeltaX/120):this.deltaX=s.wheelDeltaX/120;else if(typeof t.HORIZONTAL_AXIS<"u"&&t.axis===t.HORIZONTAL_AXIS)this.deltaX=-S.detail/3;else if(S.type==="wheel"){const i=S;i.deltaMode===i.DOM_DELTA_LINE?_.isFirefox&&!L.isMacintosh?this.deltaX=-S.deltaX/3:this.deltaX=-S.deltaX:this.deltaX=-S.deltaX/40}this.deltaY===0&&this.deltaX===0&&S.wheelDelta&&(this.deltaY=S.wheelDelta/120)}}preventDefault(){var S;(S=this.browserEvent)===null||S===void 0||S.preventDefault()}stopPropagation(){var S;(S=this.browserEvent)===null||S===void 0||S.stopPropagation()}}e.StandardWheelEvent=w}),define(J[40],ee([1,0,6,2,542]),function(j,e,_,k,L){"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="",n="",r=!0,d){super(),this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=t,this._label=i,this._cssClass=n,this._enabled=r,this._actionCallback=d}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 we(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 _.Emitter),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new _.Emitter),this.onDidRun=this._onDidRun.event}run(t,i){return we(this,void 0,void 0,function*(){if(!t.enabled)return;this._onWillRun.fire({action:t});let n;try{yield this.runAction(t,i)}catch(r){n=r}this._onDidRun.fire({action:t,error:n})})}runAction(t,i){return we(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 n of t)n.length&&(i.length?i=[...i,new b,...n]:i=n);return i}run(){return we(this,void 0,void 0,function*(){})}}e.Separator=b,b.ID="vs.actions.separator";class S{get actions(){return this._actions}constructor(t,i,n,r){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=t,this.label=i,this.class=r,this._actions=n}run(){return we(this,void 0,void 0,function*(){})}}e.SubmenuAction=S;class g extends D{constructor(){super(g.ID,L.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=g,g.ID="vs.actions.empty";function m(s){var t,i;return{id:s.id,label:s.label,class:void 0,enabled:(t=s.enabled)!==null&&t!==void 0?t:!0,checked:(i=s.checked)!==null&&i!==void 0?i:!1,run:()=>we(this,void 0,void 0,function*(){return s.run()}),tooltip:s.label}}e.toAction=m}),define(J[20],ee([1,0,6]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const k=Object.freeze(function(b,S){const g=setTimeout(b.bind(S),0);return{dispose(){clearTimeout(g)}}});var L;(function(b){function S(g){return g===b.None||g===b.Cancelled||g instanceof D?!0:!g||typeof g!="object"?!1:typeof g.isCancellationRequested=="boolean"&&typeof g.onCancellationRequested=="function"}b.isCancellationToken=S,b.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:_.Event.None}),b.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:k})})(L||(e.CancellationToken=L={}));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 _.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class w{constructor(S){this._token=void 0,this._parentListener=void 0,this._parentListener=S&&S.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=L.Cancelled}dispose(S=!1){var g;S&&this.cancel(),(g=this._parentListener)===null||g===void 0||g.dispose(),this._token?this._token instanceof D&&this._token.dispose():this._token=L.None}}e.CancellationTokenSource=w});var Lt=this&&this.__asyncValues||function(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=j[Symbol.asyncIterator],_;return e?e.call(j):(j=typeof __values=="function"?__values(j):j[Symbol.iterator](),_={},k("next"),k("throw"),k("return"),_[Symbol.asyncIterator]=function(){return this},_);function k(D){_[D]=j[D]&&function(w){return new Promise(function(b,S){w=j[D](w),L(b,S,w.done,w.value)})}}function L(D,w,b,S){Promise.resolve(S).then(function(g){D({value:g,done:b})},w)}};define(J[14],ee([1,0,20,11,6,2,17,254]),function(j,e,_,k,L,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 S(E){return!!E&&typeof E.then=="function"}e.isThenable=S;function g(E){const I=new _.CancellationTokenSource,T=E(I.token),O=new Promise((R,M)=>{const N=I.token.onCancellationRequested(()=>{N.dispose(),I.dispose(),M(new k.CancellationError)});Promise.resolve(T).then(P=>{N.dispose(),I.dispose(),R(P)},P=>{N.dispose(),I.dispose(),M(P)})});return new class{cancel(){I.cancel()}then(R,M){return O.then(R,M)}catch(R){return this.then(void 0,R)}finally(R){return O.finally(R)}}}e.createCancelablePromise=g;function m(E,I,T){return new Promise((O,R)=>{const M=I.onCancellationRequested(()=>{M.dispose(),O(T)});E.then(O,R).finally(()=>M.dispose())})}e.raceCancellation=m;class s{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 O=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,O};this.queuedPromise=new Promise(O=>{this.activePromise.then(T,T).then(O)})}return new Promise((T,O)=>{this.queuedPromise.then(T,O)})}return this.activePromise=I(),new Promise((T,O)=>{this.activePromise.then(R=>{this.activePromise=null,T(R)},R=>{this.activePromise=null,O(R)})})}}e.Throttler=s;const t=(E,I)=>{let T=!0;const O=setTimeout(()=>{T=!1,I()},E);return{isTriggered:()=>T,dispose:()=>{clearTimeout(O),T=!1}}},i=E=>{let I=!0;return queueMicrotask(()=>{I&&(I=!1,E())}),{isTriggered:()=>I,dispose:()=>{I=!1}}};class n{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 O=()=>{var R;this.deferred=null,(R=this.doResolve)===null||R===void 0||R.call(this,null)};return this.deferred=T===b.MicrotaskDelay?i(O):t(T,O),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=n;class r{constructor(I){this.delayer=new n(I),this.throttler=new s}trigger(I,T){return this.delayer.trigger(()=>this.throttler.queue(I),T)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=r;function d(E,I){return I?new Promise((T,O)=>{const R=setTimeout(()=>{M.dispose(),T()},E),M=I.onCancellationRequested(()=>{clearTimeout(R),M.dispose(),O(new k.CancellationError)})}):g(T=>d(E,T))}e.timeout=d;function h(E,I=0){const T=setTimeout(E,I);return(0,D.toDisposable)(()=>clearTimeout(T))}e.disposableTimeout=h;function o(E,I=O=>!!O,T=null){let O=0;const R=E.length,M=()=>{if(O>=R)return Promise.resolve(T);const N=E[O++];return Promise.resolve(N()).then(x=>I(x)?Promise.resolve(x):M())};return M()}e.first=o;class c{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=c;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 l{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=l,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 O=!1;return{dispose(){O||(O=!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 v{get isRejected(){var I;return((I=this.outcome)===null||I===void 0?void 0:I.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((I,T)=>{this.completeCallback=I,this.errorCallback=T})}complete(I){return new Promise(T=>{this.completeCallback(I),this.outcome={outcome:0,value:I},T()})}error(I){return new Promise(T=>{this.errorCallback(I),this.outcome={outcome:1,value:I},T()})}cancel(){return this.error(new k.CancellationError)}}e.DeferredPromise=v;var f;(function(E){function I(O){return we(this,void 0,void 0,function*(){let R;const M=yield Promise.all(O.map(N=>N.then(P=>P,P=>{R||(R=P)})));if(typeof R<"u")throw R;return M})}E.settled=I;function T(O){return new Promise((R,M)=>we(this,void 0,void 0,function*(){try{yield O(R,M)}catch(N){M(N)}}))}E.withAsyncBody=T})(f||(e.Promises=f={}));class p{static fromArray(I){return new p(T=>{T.emitMany(I)})}static fromPromise(I){return new p(T=>we(this,void 0,void 0,function*(){T.emitMany(yield I)}))}static fromPromises(I){return new p(T=>we(this,void 0,void 0,function*(){yield Promise.all(I.map(O=>we(this,void 0,void 0,function*(){return T.emitOne(yield O)})))}))}static merge(I){return new p(T=>we(this,void 0,void 0,function*(){yield Promise.all(I.map(O=>{var R,M,N;return we(this,void 0,void 0,function*(){var P,x,F,B;try{for(R=!0,M=Lt(O);N=yield M.next(),P=N.done,!P;R=!0){B=N.value,R=!1;const V=B;T.emitOne(V)}}catch(V){x={error:V}}finally{try{!R&&!P&&(F=M.return)&&(yield F.call(M))}finally{if(x)throw x.error}}})}))}))}constructor(I){this._state=0,this._results=[],this._error=null,this._onStateChanged=new L.Emitter,queueMicrotask(()=>we(this,void 0,void 0,function*(){const T={emitOne:O=>this.emitOne(O),emitMany:O=>this.emitMany(O),reject:O=>this.reject(O)};try{yield Promise.resolve(I(T)),this.resolve()}catch(O){this.reject(O)}finally{T.emitOne=void 0,T.emitMany=void 0,T.reject=void 0}}))}[Symbol.asyncIterator](){let I=0;return{next:()=>we(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 L.Event.toPromise(this._onStateChanged.event)}while(!0)})}}static map(I,T){return new p(O=>we(this,void 0,void 0,function*(){var R,M,N,P;try{for(var x=!0,F=Lt(I),B;B=yield F.next(),R=B.done,!R;x=!0){P=B.value,x=!1;const V=P;O.emitOne(T(V))}}catch(V){M={error:V}}finally{try{!x&&!R&&(N=F.return)&&(yield N.call(F))}finally{if(M)throw M.error}}}))}map(I){return p.map(this,I)}static filter(I,T){return new p(O=>we(this,void 0,void 0,function*(){var R,M,N,P;try{for(var x=!0,F=Lt(I),B;B=yield F.next(),R=B.done,!R;x=!0){P=B.value,x=!1;const V=P;T(V)&&O.emitOne(V)}}catch(V){M={error:V}}finally{try{!x&&!R&&(N=F.return)&&(yield N.call(F))}finally{if(M)throw M.error}}}))}filter(I){return p.filter(this,I)}static coalesce(I){return p.filter(I,T=>!!T)}coalesce(){return p.coalesce(this)}static toPromise(I){var T,O,R,M,N,P,x;return we(this,void 0,void 0,function*(){const F=[];try{for(T=!0,O=Lt(I);R=yield O.next(),M=R.done,!M;T=!0){x=R.value,T=!1;const B=x;F.push(B)}}catch(B){N={error:B}}finally{try{!T&&!M&&(P=O.return)&&(yield P.call(O))}finally{if(N)throw N.error}}return F})}toPromise(){return p.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())}}e.AsyncIterableObject=p,p.EMPTY=p.fromArray([]);class C extends p{constructor(I,T){super(T),this._source=I}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=C;function y(E){const I=new _.CancellationTokenSource,T=E(I.token);return new C(I,O=>we(this,void 0,void 0,function*(){var R,M,N,P;const x=I.token.onCancellationRequested(()=>{x.dispose(),I.dispose(),O.reject(new k.CancellationError)});try{try{for(var F=!0,B=Lt(T),V;V=yield B.next(),R=V.done,!R;F=!0){P=V.value,F=!1;const K=P;if(I.token.isCancellationRequested)return;O.emitOne(K)}}catch(K){M={error:K}}finally{try{!F&&!R&&(N=B.return)&&(yield N.call(B))}finally{if(M)throw M.error}}x.dispose(),I.dispose()}catch(K){x.dispose(),I.dispose(),O.reject(K)}}))}e.createCancelableAsyncIterable=y}),define(J[550],ee([1,0,14,2]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class L extends k.Disposable{constructor(w,b,S){super(),this._visibility=w,this._visibleClassName=b,this._invisibleClassName=S,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new _.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=L}),define(J[211],ee([1,0,133,16,14,254,162,6,53]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function g(i){return typeof i=="object"&&"visibility"in i&&"data"in i}e.isFilterResult=g;function m(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}e.getVisibleState=m;function s(i){return typeof i.collapsible=="boolean"}class t{constructor(n,r,d,h={}){this.user=n,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 L.Delayer(D.MicrotaskDelay),this.collapseByDefault=typeof h.collapseByDefault>"u"?!1:h.collapseByDefault,this.filter=h.filter,this.autoExpandSingleChildren=typeof h.autoExpandSingleChildren>"u"?!1:h.autoExpandSingleChildren,this.root={parent:void 0,element:d,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(n,r,d=S.Iterable.empty(),h={}){if(n.length===0)throw new _.TreeError(this.user,"Invalid tree location");h.diffIdentityProvider?this.spliceSmart(h.diffIdentityProvider,n,r,d,h):this.spliceSimple(n,r,d,h)}spliceSmart(n,r,d,h,o,c){var a;h===void 0&&(h=S.Iterable.empty()),c===void 0&&(c=(a=o.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:l}=this.getParentNodeWithListIndex(r);if(!l.lastDiffIds)return this.spliceSimple(r,d,h,o);const u=[...h],v=r[r.length-1],f=new w.LcsDiff({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,v),...u,...l.children.slice(v+d)].map(I=>n.getId(I.element).toString())}).ComputeDiff(!1);if(f.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(r,d,u,o);const p=r.slice(0,-1),C=(I,T,O)=>{if(c>0)for(let R=0;R<O;R++)I--,T--,this.spliceSmart(n,[...p,I,0],Number.MAX_SAFE_INTEGER,u[T].children,o,c-1)};let y=Math.min(l.children.length,v+d),E=u.length;for(const I of f.changes.sort((T,O)=>O.originalStart-T.originalStart))C(y,E,y-(I.originalStart+I.originalLength)),y=I.originalStart,E=I.modifiedStart-v,this.spliceSimple([...p,y],I.originalLength,S.Iterable.slice(u,E,E+I.modifiedLength),o);C(y,E,y)}spliceSimple(n,r,d=S.Iterable.empty(),{onDidCreateNode:h,onDidDeleteNode:o,diffIdentityProvider:c}){const{parentNode:a,listIndex:l,revealed:u,visible:v}=this.getParentNodeWithListIndex(n),f=[],p=S.Iterable.map(d,x=>this.createTreeNode(x,a,a.visible?1:0,u,f,h)),C=n[n.length-1],y=a.children.length>0;let E=0;for(let x=C;x>=0&&x<a.children.length;x--){const F=a.children[x];if(F.visible){E=F.visibleChildIndex;break}}const I=[];let T=0,O=0;for(const x of p)I.push(x),O+=x.renderNodeCount,x.visible&&(x.visibleChildIndex=E+T++);const R=(0,k.splice)(a.children,C,r,I);c?a.lastDiffIds?(0,k.splice)(a.lastDiffIds,C,r,I.map(x=>c.getId(x.element).toString())):a.lastDiffIds=a.children.map(x=>c.getId(x.element).toString()):a.lastDiffIds=void 0;let M=0;for(const x of R)x.visible&&M++;if(M!==0)for(let x=C+I.length;x<a.children.length;x++){const F=a.children[x];F.visible&&(F.visibleChildIndex-=M)}if(a.visibleChildrenCount+=T-M,u&&v){const x=R.reduce((F,B)=>F+(B.visible?B.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,O-x),this.list.splice(l,x,f)}if(R.length>0&&o){const x=F=>{o(F),F.children.forEach(x)};R.forEach(x)}this._onDidSplice.fire({insertedNodes:I,deletedNodes:R});const N=a.children.length>0;y!==N&&this.setCollapsible(n.slice(0,-1),N);let P=a;for(;P;){if(P.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}P=P.parent}}rerender(n){if(n.length===0)throw new _.TreeError(this.user,"Invalid tree location");const{node:r,listIndex:d,revealed:h}=this.getTreeNodeWithListIndex(n);r.visible&&h&&this.list.splice(d,1,[r])}has(n){return this.hasTreeNode(n)}getListIndex(n){const{listIndex:r,visible:d,revealed:h}=this.getTreeNodeWithListIndex(n);return d&&h?r:-1}getListRenderCount(n){return this.getTreeNode(n).renderNodeCount}isCollapsible(n){return this.getTreeNode(n).collapsible}setCollapsible(n,r){const d=this.getTreeNode(n);typeof r>"u"&&(r=!d.collapsible);const h={collapsible:r};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(n,h))}isCollapsed(n){return this.getTreeNode(n).collapsed}setCollapsed(n,r,d){const h=this.getTreeNode(n);typeof r>"u"&&(r=!h.collapsed);const o={collapsed:r,recursive:d||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(n,o))}_setCollapseState(n,r){const{node:d,listIndex:h,revealed:o}=this.getTreeNodeWithListIndex(n),c=this._setListNodeCollapseState(d,h,o,r);if(d!==this.root&&this.autoExpandSingleChildren&&c&&!s(r)&&d.collapsible&&!d.collapsed&&!r.recursive){let a=-1;for(let l=0;l<d.children.length;l++)if(d.children[l].visible)if(a>-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...n,a],r)}return c}_setListNodeCollapseState(n,r,d,h){const o=this._setNodeCollapseState(n,h,!1);if(!d||!n.visible||!o)return o;const c=n.renderNodeCount,a=this.updateNodeAfterCollapseChange(n),l=c-(r===-1?0:1);return this.list.splice(r+1,l,a.slice(1)),o}_setNodeCollapseState(n,r,d){let h;if(n===this.root?h=!1:(s(r)?(h=n.collapsible!==r.collapsible,n.collapsible=r.collapsible):n.collapsible?(h=n.collapsed!==r.collapsed,n.collapsed=r.collapsed):h=!1,h&&this._onDidChangeCollapseState.fire({node:n,deep:d})),!s(r)&&r.recursive)for(const o of n.children)h=this._setNodeCollapseState(o,r,!0)||h;return h}expandTo(n){this.eventBufferer.bufferEvents(()=>{let r=this.getTreeNode(n);for(;r.parent;)r=r.parent,n=n.slice(0,n.length-1),r.collapsed&&this._setCollapseState(n,{collapsed:!1,recursive:!1})})}refilter(){const n=this.root.renderNodeCount,r=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,n,r),this.refilterDelayer.cancel()}createTreeNode(n,r,d,h,o,c){const a={parent:r,element:n.element,children:[],depth:r.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof n.collapsible=="boolean"?n.collapsible:typeof n.collapsed<"u",collapsed:typeof n.collapsed>"u"?this.collapseByDefault:n.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,d);a.visibility=l,h&&o.push(a);const u=n.children||S.Iterable.empty(),v=h&&l!==0&&!a.collapsed;let f=0,p=1;for(const C of u){const y=this.createTreeNode(C,a,l,v,o,c);a.children.push(y),p+=y.renderNodeCount,y.visible&&(y.visibleChildIndex=f++)}return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=f,a.visible=l===2?f>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=p):(a.renderNodeCount=0,h&&o.pop()),c?.(a),a}updateNodeAfterCollapseChange(n){const r=n.renderNodeCount,d=[];return this._updateNodeAfterCollapseChange(n,d),this._updateAncestorsRenderNodeCount(n.parent,d.length-r),d}_updateNodeAfterCollapseChange(n,r){if(n.visible===!1)return 0;if(r.push(n),n.renderNodeCount=1,!n.collapsed)for(const d of n.children)n.renderNodeCount+=this._updateNodeAfterCollapseChange(d,r);return this._onDidChangeRenderNodeCount.fire(n),n.renderNodeCount}updateNodeAfterFilterChange(n){const r=n.renderNodeCount,d=[];return this._updateNodeAfterFilterChange(n,n.visible?1:0,d),this._updateAncestorsRenderNodeCount(n.parent,d.length-r),d}_updateNodeAfterFilterChange(n,r,d,h=!0){let o;if(n!==this.root){if(o=this._filterNode(n,r),o===0)return n.visible=!1,n.renderNodeCount=0,!1;h&&d.push(n)}const c=d.length;n.renderNodeCount=n===this.root?0:1;let a=!1;if(!n.collapsed||o!==0){let l=0;for(const u of n.children)a=this._updateNodeAfterFilterChange(u,o,d,h&&!n.collapsed)||a,u.visible&&(u.visibleChildIndex=l++);n.visibleChildrenCount=l}else n.visibleChildrenCount=0;return n!==this.root&&(n.visible=o===2?a:o===1,n.visibility=o),n.visible?n.collapsed||(n.renderNodeCount+=d.length-c):(n.renderNodeCount=0,h&&d.pop()),this._onDidChangeRenderNodeCount.fire(n),n.visible}_updateAncestorsRenderNodeCount(n,r){if(r!==0)for(;n;)n.renderNodeCount+=r,this._onDidChangeRenderNodeCount.fire(n),n=n.parent}_filterNode(n,r){const d=this.filter?this.filter.filter(n.element,r):1;return typeof d=="boolean"?(n.filterData=void 0,d?1:0):g(d)?(n.filterData=d.data,m(d.visibility)):(n.filterData=void 0,m(d))}hasTreeNode(n,r=this.root){if(!n||n.length===0)return!0;const[d,...h]=n;return d<0||d>r.children.length?!1:this.hasTreeNode(h,r.children[d])}getTreeNode(n,r=this.root){if(!n||n.length===0)return r;const[d,...h]=n;if(d<0||d>r.children.length)throw new _.TreeError(this.user,"Invalid tree location");return this.getTreeNode(h,r.children[d])}getTreeNodeWithListIndex(n){if(n.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:r,listIndex:d,revealed:h,visible:o}=this.getParentNodeWithListIndex(n),c=n[n.length-1];if(c<0||c>r.children.length)throw new _.TreeError(this.user,"Invalid tree location");const a=r.children[c];return{node:a,listIndex:d,revealed:h,visible:o&&a.visible}}getParentNodeWithListIndex(n,r=this.root,d=0,h=!0,o=!0){const[c,...a]=n;if(c<0||c>r.children.length)throw new _.TreeError(this.user,"Invalid tree location");for(let l=0;l<c;l++)d+=r.children[l].renderNodeCount;return h=h&&!r.collapsed,o=o&&r.visible,a.length===0?{parentNode:r,listIndex:d,revealed:h,visible:o}:this.getParentNodeWithListIndex(a,r.children[c],d+1,h,o)}getNode(n=[]){return this.getTreeNode(n)}getNodeLocation(n){const r=[];let d=n;for(;d.parent;)r.push(d.parent.children.indexOf(d)),d=d.parent;return r.reverse()}getParentNodeLocation(n){if(n.length!==0)return n.length===1?[]:(0,k.tail2)(n)[0]}getFirstElementChild(n){const r=this.getTreeNode(n);if(r.children.length!==0)return r.children[0].element}}e.IndexTreeModel=t}),define(J[212],ee([1,0,211,133,53]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class D{constructor(b,S,g={}){this.user=b,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new _.IndexTreeModel(b,S,null,g),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,g.sorter&&(this.sorter={compare(m,s){return g.sorter.compare(m.element,s.element)}}),this.identityProvider=g.identityProvider}setChildren(b,S=L.Iterable.empty(),g={}){const m=this.getElementLocation(b);this._setChildren(m,this.preserveCollapseState(S),g)}_setChildren(b,S=L.Iterable.empty(),g){const m=new Set,s=new Set,t=n=>{var r;if(n.element===null)return;const d=n;if(m.add(d.element),this.nodes.set(d.element,d),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();s.add(h),this.nodesByIdentity.set(h,d)}(r=g.onDidCreateNode)===null||r===void 0||r.call(g,d)},i=n=>{var r;if(n.element===null)return;const d=n;if(m.has(d.element)||this.nodes.delete(d.element),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();s.has(h)||this.nodesByIdentity.delete(h)}(r=g.onDidDeleteNode)===null||r===void 0||r.call(g,d)};this.model.splice([...b,0],Number.MAX_VALUE,S,Object.assign(Object.assign({},g),{onDidCreateNode:t,onDidDeleteNode:i}))}preserveCollapseState(b=L.Iterable.empty()){return this.sorter&&(b=[...b].sort(this.sorter.compare.bind(this.sorter))),L.Iterable.map(b,S=>{let g=this.nodes.get(S.element);if(!g&&this.identityProvider){const t=this.identityProvider.getId(S.element).toString();g=this.nodesByIdentity.get(t)}if(!g){let t;return typeof S.collapsed>"u"?t=void 0:S.collapsed===k.ObjectTreeElementCollapseState.Collapsed||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed?t=!0:S.collapsed===k.ObjectTreeElementCollapseState.Expanded||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?t=!1:t=!!S.collapsed,Object.assign(Object.assign({},S),{children:this.preserveCollapseState(S.children),collapsed:t})}const m=typeof S.collapsible=="boolean"?S.collapsible:g.collapsible;let s;return typeof S.collapsed>"u"||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?s=g.collapsed:S.collapsed===k.ObjectTreeElementCollapseState.Collapsed?s=!0:S.collapsed===k.ObjectTreeElementCollapseState.Expanded?s=!1:s=!!S.collapsed,Object.assign(Object.assign({},S),{collapsible:m,collapsed:s,children:this.preserveCollapseState(S.children)})})}rerender(b){const S=this.getElementLocation(b);this.model.rerender(S)}getFirstElementChild(b=null){const S=this.getElementLocation(b);return this.model.getFirstElementChild(S)}has(b){return this.nodes.has(b)}getListIndex(b){const S=this.getElementLocation(b);return this.model.getListIndex(S)}getListRenderCount(b){const S=this.getElementLocation(b);return this.model.getListRenderCount(S)}isCollapsible(b){const S=this.getElementLocation(b);return this.model.isCollapsible(S)}setCollapsible(b,S){const g=this.getElementLocation(b);return this.model.setCollapsible(g,S)}isCollapsed(b){const S=this.getElementLocation(b);return this.model.isCollapsed(S)}setCollapsed(b,S,g){const m=this.getElementLocation(b);return this.model.setCollapsed(m,S,g)}expandTo(b){const S=this.getElementLocation(b);this.model.expandTo(S)}refilter(){this.model.refilter()}getNode(b=null){if(b===null)return this.model.getNode(this.model.rootRef);const S=this.nodes.get(b);if(!S)throw new k.TreeError(this.user,`Tree element not found: ${b}`);return S}getNodeLocation(b){return b.element}getParentNodeLocation(b){if(b===null)throw new k.TreeError(this.user,"Invalid getParentNodeLocation call");const S=this.nodes.get(b);if(!S)throw new k.TreeError(this.user,`Tree element not found: ${b}`);const g=this.model.getNodeLocation(S),m=this.model.getParentNodeLocation(g);return this.model.getNode(m).element}getElementLocation(b){if(b===null)return[];const S=this.nodes.get(b);if(!S)throw new k.TreeError(this.user,`Tree element not found: ${b}`);return this.model.getNodeLocation(S)}}e.ObjectTreeModel=D}),define(J[551],ee([1,0,212,133,6,53]),function(j,e,_,k,L,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 c=[o.element],a=o.incompressible||!1;return{element:{elements:c,incompressible:a},children:D.Iterable.map(D.Iterable.from(o.children),w),collapsible:o.collapsible,collapsed:o.collapsed}}function b(o){const c=[o.element],a=o.incompressible||!1;let l,u;for(;[u,l]=D.Iterable.consume(D.Iterable.from(o.children),2),!(u.length!==1||u[0].incompressible);)o=u[0],c.push(o.element);return{element:{elements:c,incompressible:a},children:D.Iterable.map(D.Iterable.concat(u,l),b),collapsible:o.collapsible,collapsed:o.collapsed}}e.compress=b;function S(o,c=0){let a;return c<o.element.elements.length-1?a=[S(o,c+1)]:a=D.Iterable.map(D.Iterable.from(o.children),l=>S(l,0)),c===0&&o.element.incompressible?{element:o.element.elements[c],children:a,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[c],children:a,collapsible:o.collapsible,collapsed:o.collapsed}}function g(o){return S(o,0)}e.decompress=g;function m(o,c,a){return o.element===c?Object.assign(Object.assign({},o),{children:a}):Object.assign(Object.assign({},o),{children:D.Iterable.map(D.Iterable.from(o.children),l=>m(l,c,a))})}const s=o=>({getId(c){return c.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(c,a,l={}){this.user=c,this.rootRef=null,this.nodes=new Map,this.model=new _.ObjectTreeModel(c,a,l),this.enabled=typeof l.compressionEnabled>"u"?!0:l.compressionEnabled,this.identityProvider=l.identityProvider}setChildren(c,a=D.Iterable.empty(),l){const u=l.diffIdentityProvider&&s(l.diffIdentityProvider);if(c===null){const O=D.Iterable.map(a,this.enabled?b:w);this._setChildren(null,O,{diffIdentityProvider:u,diffDepth:1/0});return}const v=this.nodes.get(c);if(!v)throw new k.TreeError(this.user,"Unknown compressed tree node");const f=this.model.getNode(v),p=this.model.getParentNodeLocation(v),C=this.model.getNode(p),y=g(f),E=m(y,c,a),I=(this.enabled?b:w)(E),T=C.children.map(O=>O===f?I:O);this._setChildren(C.element,T,{diffIdentityProvider:u,diffDepth:f.depth-C.depth})}setCompressionEnabled(c){if(c===this.enabled)return;this.enabled=c;const l=this.model.getNode().children,u=D.Iterable.map(l,g),v=D.Iterable.map(u,c?b:w);this._setChildren(null,v,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(c,a,l){const u=new Set,v=p=>{for(const C of p.element.elements)u.add(C),this.nodes.set(C,p.element)},f=p=>{for(const C of p.element.elements)u.has(C)||this.nodes.delete(C)};this.model.setChildren(c,a,Object.assign(Object.assign({},l),{onDidCreateNode:v,onDidDeleteNode:f}))}has(c){return this.nodes.has(c)}getListIndex(c){const a=this.getCompressedNode(c);return this.model.getListIndex(a)}getListRenderCount(c){const a=this.getCompressedNode(c);return this.model.getListRenderCount(a)}getNode(c){if(typeof c>"u")return this.model.getNode();const a=this.getCompressedNode(c);return this.model.getNode(a)}getNodeLocation(c){const a=this.model.getNodeLocation(c);return a===null?null:a.elements[a.elements.length-1]}getParentNodeLocation(c){const a=this.getCompressedNode(c),l=this.model.getParentNodeLocation(a);return l===null?null:l.elements[l.elements.length-1]}getFirstElementChild(c){const a=this.getCompressedNode(c);return this.model.getFirstElementChild(a)}isCollapsible(c){const a=this.getCompressedNode(c);return this.model.isCollapsible(a)}setCollapsible(c,a){const l=this.getCompressedNode(c);return this.model.setCollapsible(l,a)}isCollapsed(c){const a=this.getCompressedNode(c);return this.model.isCollapsed(a)}setCollapsed(c,a,l){const u=this.getCompressedNode(c);return this.model.setCollapsed(u,a,l)}expandTo(c){const a=this.getCompressedNode(c);this.model.expandTo(a)}rerender(c){const a=this.getCompressedNode(c);this.model.rerender(a)}refilter(){this.model.refilter()}getCompressedNode(c){if(c===null)return null;const a=this.nodes.get(c);if(!a)throw new k.TreeError(this.user,`Tree element not found: ${c}`);return a}}e.CompressedObjectTreeModel=t;const i=o=>o[o.length-1];e.DefaultElementMapper=i;class n{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(c=>new n(this.unwrapper,c))}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(c,a){this.unwrapper=c,this.node=a}}function r(o,c){return{splice(a,l,u){c.splice(a,l,u.map(v=>o.map(v)))},updateElementHeight(a,l){c.updateElementHeight(a,l)}}}function d(o,c){return Object.assign(Object.assign({},c),{identityProvider:c.identityProvider&&{getId(a){return c.identityProvider.getId(o(a))}},sorter:c.sorter&&{compare(a,l){return c.sorter.compare(a.elements[0],l.elements[0])}},filter:c.filter&&{filter(a,l){return c.filter.filter(o(a),l)}}})}class h{get onDidSplice(){return L.Event.map(this.model.onDidSplice,({insertedNodes:c,deletedNodes:a})=>({insertedNodes:c.map(l=>this.nodeMapper.map(l)),deletedNodes:a.map(l=>this.nodeMapper.map(l))}))}get onDidChangeCollapseState(){return L.Event.map(this.model.onDidChangeCollapseState,({node:c,deep:a})=>({node:this.nodeMapper.map(c),deep:a}))}get onDidChangeRenderNodeCount(){return L.Event.map(this.model.onDidChangeRenderNodeCount,c=>this.nodeMapper.map(c))}constructor(c,a,l={}){this.rootRef=null,this.elementMapper=l.elementMapper||e.DefaultElementMapper;const u=v=>this.elementMapper(v.elements);this.nodeMapper=new k.WeakMapper(v=>new n(u,v)),this.model=new t(c,r(this.nodeMapper,a),d(u,l))}setChildren(c,a=D.Iterable.empty(),l={}){this.model.setChildren(c,a,l)}setCompressionEnabled(c){this.model.setCompressionEnabled(c)}has(c){return this.model.has(c)}getListIndex(c){return this.model.getListIndex(c)}getListRenderCount(c){return this.model.getListRenderCount(c)}getNode(c){return this.nodeMapper.map(this.model.getNode(c))}getNodeLocation(c){return c.element}getParentNodeLocation(c){return this.model.getParentNodeLocation(c)}getFirstElementChild(c){const a=this.model.getFirstElementChild(c);return a===null||typeof a>"u"?a:this.elementMapper(a.elements)}isCollapsible(c){return this.model.isCollapsible(c)}setCollapsible(c,a){return this.model.setCollapsible(c,a)}isCollapsed(c){return this.model.isCollapsed(c)}setCollapsed(c,a,l){return this.model.setCollapsed(c,a,l)}expandTo(c){return this.model.expandTo(c)}rerender(c){return this.model.rerender(c)}refilter(){return this.model.refilter()}getCompressedTreeNode(c=null){return this.model.getNode(c)}}e.CompressibleObjectTreeModel=h}),define(J[289],ee([1,0,14,209,60,90,17,9]),function(j,e,_,k,L,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 S="[/\\\\\\\\]",g="[^/\\\\\\\\]",m=/\\//g;function s(F,B){switch(F){case 0:return"";case 1:return`${g}*?`;default:return`(?:${S}|${g}+${S}${B?`|${S}${g}+`:""})*?`}}function t(F,B){if(!F)return[];const V=[];let K=!1,A=!1,Y="";for(const ie of F){switch(ie){case B:if(!K&&!A){V.push(Y),Y="";continue}break;case"{":K=!0;break;case"}":K=!1;break;case"[":A=!0;break;case"]":A=!1;break}Y+=ie}return Y&&V.push(Y),V}e.splitGlobAware=t;function i(F){if(!F)return"";let B="";const V=t(F,e.GLOB_SPLIT);if(V.every(K=>K===e.GLOBSTAR))B=".*";else{let K=!1;V.forEach((A,Y)=>{if(A===e.GLOBSTAR){if(K)return;B+=s(2,Y===V.length-1)}else{let ie=!1,le="",ne=!1,se="";for(const H of A){if(H!=="}"&&ie){le+=H;continue}if(ne&&(H!=="]"||!se)){let W;H==="-"?W=H:(H==="^"||H==="!")&&!se?W="^":H===e.GLOB_SPLIT?W="":W=(0,b.escapeRegExpCharacters)(H),se+=W;continue}switch(H){case"{":ie=!0;continue;case"[":ne=!0;continue;case"}":{const $=`(?:${t(le,",").map(Z=>i(Z)).join("|")})`;B+=$,ie=!1,le="";break}case"]":{B+="["+se+"]",ne=!1,se="";break}case"?":B+=g;continue;case"*":B+=s(1);continue;default:B+=(0,b.escapeRegExpCharacters)(H)}}Y<V.length-1&&(V[Y+1]!==e.GLOBSTAR||Y+2<V.length)&&(B+=S)}K=A===e.GLOBSTAR})}return B}const n=/^\\*\\*\\/\\*\\.[\\w\\.-]+$/,r=/^\\*\\*\\/([\\w\\.-]+)\\/?$/,d=/^{\\*\\*\\/\\*?[\\w\\.-]+\\/?(,\\*\\*\\/\\*?[\\w\\.-]+\\/?)*}$/,h=/^{\\*\\*\\/\\*?[\\w\\.-]+(\\/(\\*\\*)?)?(,\\*\\*\\/\\*?[\\w\\.-]+(\\/(\\*\\*)?)?)*}$/,o=/^\\*\\*((\\/[\\w\\.-]+)+)\\/?$/,c=/^([\\w\\.-]+(\\/[\\w\\.-]+)*)\\/?$/,a=new L.LRUCache(1e4),l=function(){return!1},u=function(){return null};function v(F,B){if(!F)return u;let V;typeof F!="string"?V=F.pattern:V=F,V=V.trim();const K=`${V}_${!!B.trimForExclusions}`;let A=a.get(K);if(A)return f(A,F);let Y;return n.test(V)?A=C(V.substr(4),V):(Y=r.exec(p(V,B)))?A=y(Y[1],V):(B.trimForExclusions?h:d).test(V)?A=E(V,B):(Y=o.exec(p(V,B)))?A=I(Y[1].substr(1),V,!0):(Y=c.exec(p(V,B)))?A=I(Y[1],V,!1):A=T(V),a.set(K,A),f(A,F)}function f(F,B){if(typeof B=="string")return F;const V=function(K,A){return(0,k.isEqualOrParent)(K,B.base,!w.isLinux)?F((0,b.ltrim)(K.substr(B.base.length),D.sep),A):null};return V.allBasenames=F.allBasenames,V.allPaths=F.allPaths,V.basenames=F.basenames,V.patterns=F.patterns,V}function p(F,B){return B.trimForExclusions&&F.endsWith("/**")?F.substr(0,F.length-2):F}function C(F,B){return function(V,K){return typeof V=="string"&&V.endsWith(F)?B:null}}function y(F,B){const V=`/${F}`,K=`\\\\${F}`,A=function(ie,le){return typeof ie!="string"?null:le?le===F?B:null:ie===F||ie.endsWith(V)||ie.endsWith(K)?B:null},Y=[F];return A.basenames=Y,A.patterns=[B],A.allBasenames=Y,A}function E(F,B){const V=x(F.slice(1,-1).split(",").map(le=>v(le,B)).filter(le=>le!==u),F),K=V.length;if(!K)return u;if(K===1)return V[0];const A=function(le,ne){for(let se=0,H=V.length;se<H;se++)if(V[se](le,ne))return F;return null},Y=V.find(le=>!!le.allBasenames);Y&&(A.allBasenames=Y.allBasenames);const ie=V.reduce((le,ne)=>ne.allPaths?le.concat(ne.allPaths):le,[]);return ie.length&&(A.allPaths=ie),A}function I(F,B,V){const K=D.sep===D.posix.sep,A=K?F:F.replace(m,D.sep),Y=D.sep+A,ie=D.posix.sep+F;let le;return V?le=function(ne,se){return typeof ne=="string"&&(ne===A||ne.endsWith(Y)||!K&&(ne===F||ne.endsWith(ie)))?B:null}:le=function(ne,se){return typeof ne=="string"&&(ne===A||!K&&ne===F)?B:null},le.allPaths=[(V?"*/":"./")+F],le}function T(F){try{const B=new RegExp(`^${i(F)}$`);return function(V){return B.lastIndex=0,typeof V=="string"&&B.test(V)?F:null}}catch{return u}}function O(F,B,V){return!F||typeof B!="string"?!1:R(F)(B,void 0,V)}e.match=O;function R(F,B={}){if(!F)return l;if(typeof F=="string"||M(F)){const V=v(F,B);if(V===u)return l;const K=function(A,Y){return!!V(A,Y)};return V.allBasenames&&(K.allBasenames=V.allBasenames),V.allPaths&&(K.allPaths=V.allPaths),K}return N(F,B)}e.parse=R;function M(F){const B=F;return B?typeof B.base=="string"&&typeof B.pattern=="string":!1}e.isRelativePattern=M;function N(F,B){const V=x(Object.getOwnPropertyNames(F).map(le=>P(le,F[le],B)).filter(le=>le!==u)),K=V.length;if(!K)return u;if(!V.some(le=>!!le.requiresSiblings)){if(K===1)return V[0];const le=function(H,W){let $;for(let Z=0,Q=V.length;Z<Q;Z++){const re=V[Z](H,W);if(typeof re=="string")return re;(0,_.isThenable)(re)&&($||($=[]),$.push(re))}return $?(()=>we(this,void 0,void 0,function*(){for(const Z of $){const Q=yield Z;if(typeof Q=="string")return Q}return null}))():null},ne=V.find(H=>!!H.allBasenames);ne&&(le.allBasenames=ne.allBasenames);const se=V.reduce((H,W)=>W.allPaths?H.concat(W.allPaths):H,[]);return se.length&&(le.allPaths=se),le}const A=function(le,ne,se){let H,W;for(let $=0,Z=V.length;$<Z;$++){const Q=V[$];Q.requiresSiblings&&se&&(ne||(ne=(0,D.basename)(le)),H||(H=ne.substr(0,ne.length-(0,D.extname)(le).length)));const re=Q(le,ne,H,se);if(typeof re=="string")return re;(0,_.isThenable)(re)&&(W||(W=[]),W.push(re))}return W?(()=>we(this,void 0,void 0,function*(){for(const $ of W){const Z=yield $;if(typeof Z=="string")return Z}return null}))():null},Y=V.find(le=>!!le.allBasenames);Y&&(A.allBasenames=Y.allBasenames);const ie=V.reduce((le,ne)=>ne.allPaths?le.concat(ne.allPaths):le,[]);return ie.length&&(A.allPaths=ie),A}function P(F,B,V){if(B===!1)return u;const K=v(F,V);if(K===u)return u;if(typeof B=="boolean")return K;if(B){const A=B.when;if(typeof A=="string"){const Y=(ie,le,ne,se)=>{if(!se||!K(ie,le))return null;const H=A.replace("$(basename)",()=>ne),W=se(H);return(0,_.isThenable)(W)?W.then($=>$?F:null):W?F:null};return Y.requiresSiblings=!0,Y}}return K}function x(F,B){const V=F.filter(le=>!!le.basenames);if(V.length<2)return F;const K=V.reduce((le,ne)=>{const se=ne.basenames;return se?le.concat(se):le},[]);let A;if(B){A=[];for(let le=0,ne=K.length;le<ne;le++)A.push(B)}else A=V.reduce((le,ne)=>{const se=ne.patterns;return se?le.concat(se):le},[]);const Y=function(le,ne){if(typeof le!="string")return null;if(!ne){let H;for(H=le.length;H>0;H--){const W=le.charCodeAt(H-1);if(W===47||W===92)break}ne=le.substr(H)}const se=K.indexOf(ne);return se!==-1?A[se]:null};Y.basenames=K,Y.patterns=A,Y.allBasenames=K;const ie=F.filter(le=>!le.basenames);return ie.push(Y),ie}}),define(J[290],ee([1,0,6]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IME=e.IMEImpl=void 0;class k{constructor(){this._onDidChange=new _.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[177],ee([1,0,6,2]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=void 0;class L{constructor(i,n,r,d,h,o,c){this._forceIntegerValues=i,this._scrollStateBrand=void 0,this._forceIntegerValues&&(n=n|0,r=r|0,d=d|0,h=h|0,o=o|0,c=c|0),this.rawScrollLeft=d,this.rawScrollTop=c,n<0&&(n=0),d+n>r&&(d=r-n),d<0&&(d=0),h<0&&(h=0),c+h>o&&(c=o-h),c<0&&(c=0),this.width=n,this.scrollWidth=r,this.scrollLeft=d,this.height=h,this.scrollHeight=o,this.scrollTop=c}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,n){return new L(this._forceIntegerValues,typeof i.width<"u"?i.width:this.width,typeof i.scrollWidth<"u"?i.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof i.height<"u"?i.height:this.height,typeof i.scrollHeight<"u"?i.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(i){return new L(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,n){const r=this.width!==i.width,d=this.scrollWidth!==i.scrollWidth,h=this.scrollLeft!==i.scrollLeft,o=this.height!==i.height,c=this.scrollHeight!==i.scrollHeight,a=this.scrollTop!==i.scrollTop;return{inSmoothScrolling:n,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:d,scrollLeftChanged:h,heightChanged:o,scrollHeightChanged:c,scrollTopChanged:a}}}e.ScrollState=L;class D extends k.Disposable{constructor(i){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new _.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=i.smoothScrollDuration,this._scheduleAtNextAnimationFrame=i.scheduleAtNextAnimationFrame,this._state=new L(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,n){var r;const d=this._state.withScrollDimensions(i,n);this._setState(d,!!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 n=this._state.withScrollPosition(i);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(n,!1)}setScrollPositionSmooth(i,n){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 d;n?d=new g(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):d=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=d}else{const r=this._state.withScrollPosition(i);this._smoothScrolling=g.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const i=this._smoothScrolling.tick(),n=this._state.withScrollPosition(i);if(this._setState(n,!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,n){const r=this._state;r.equals(i)||(this._state=i,this._onScroll.fire(this._state.createScrollEvent(r,n)))}}e.Scrollable=D;class w{constructor(i,n,r){this.scrollLeft=i,this.scrollTop=n,this.isDone=r}}e.SmoothScrollingUpdate=w;function b(t,i){const n=i-t;return function(r){return t+n*s(r)}}function S(t,i,n){return function(r){return r<n?t(r/n):i((r-n)/(1-n))}}class g{constructor(i,n,r,d){this.from=i,this.to=n,this.duration=d,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,n,r){if(Math.abs(i-n)>2.5*r){let h,o;return i<n?(h=i+.75*r,o=n-.75*r):(h=i-.75*r,o=n+.75*r),S(b(i,h),b(o,n),.33)}return b(i,n)}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 n=(i-this.startTime)/this.duration;if(n<1){const r=this.scrollLeft(n),d=this.scrollTop(n);return new w(r,d,!1)}return new w(this.to.scrollLeft,this.to.scrollTop,!0)}combine(i,n,r){return g.start(i,n,r)}static start(i,n,r){r=r+10;const d=Date.now()-10;return new g(i,n,d,r)}}e.SmoothScrollingOperation=g;function m(t){return Math.pow(t,3)}function s(t){return 1-m(1-t)}}),define(J[21],ee([1,0,90,17]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const L=/^\\w[\\w\\d+.-]*$/,D=/^\\//,w=/^\\/\\//;function b(f,p){if(!f.scheme&&p)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${f.authority}", path: "${f.path}", query: "${f.query}", fragment: "${f.fragment}"}`);if(f.scheme&&!L.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 S(f,p){return!f&&!p?"file":f}function g(f,p){switch(f){case"https":case"http":case"file":p?p[0]!==s&&(p=s+p):p=s;break}return p}const m="",s="/",t=/^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;class i{static isUri(p){return p instanceof i?!0:p?typeof p.authority=="string"&&typeof p.fragment=="string"&&typeof p.path=="string"&&typeof p.query=="string"&&typeof p.scheme=="string"&&typeof p.fsPath=="string"&&typeof p.with=="function"&&typeof p.toString=="function":!1}constructor(p,C,y,E,I,T=!1){typeof p=="object"?(this.scheme=p.scheme||m,this.authority=p.authority||m,this.path=p.path||m,this.query=p.query||m,this.fragment=p.fragment||m):(this.scheme=S(p,T),this.authority=C||m,this.path=g(this.scheme,y||m),this.query=E||m,this.fragment=I||m,b(this,T))}get fsPath(){return c(this,!1)}with(p){if(!p)return this;let{scheme:C,authority:y,path:E,query:I,fragment:T}=p;return C===void 0?C=this.scheme:C===null&&(C=m),y===void 0?y=this.authority:y===null&&(y=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),C===this.scheme&&y===this.authority&&E===this.path&&I===this.query&&T===this.fragment?this:new r(C,y,E,I,T)}static parse(p,C=!1){const y=t.exec(p);return y?new r(y[2]||m,v(y[4]||m),v(y[5]||m),v(y[7]||m),v(y[9]||m),C):new r(m,m,m,m,m)}static file(p){let C=m;if(k.isWindows&&(p=p.replace(/\\\\/g,s)),p[0]===s&&p[1]===s){const y=p.indexOf(s,2);y===-1?(C=p.substring(2),p=s):(C=p.substring(2,y),p=p.substring(y)||s)}return new r("file",C,p,m,m)}static from(p,C){return new r(p.scheme,p.authority,p.path,p.query,p.fragment,C)}static joinPath(p,...C){if(!p.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let y;return k.isWindows&&p.scheme==="file"?y=i.file(_.win32.join(c(p,!0),...C)).path:y=_.posix.join(p.path,...C),p.with({path:y})}toString(p=!1){return a(this,p)}toJSON(){return this}static revive(p){var C,y;if(p){if(p instanceof i)return p;{const E=new r(p);return E._formatted=(C=p.external)!==null&&C!==void 0?C:null,E._fsPath=p._sep===n&&(y=p.fsPath)!==null&&y!==void 0?y:null,E}}else return p}}e.URI=i;const n=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=c(this,!1)),this._fsPath}toString(p=!1){return p?a(this,!0):(this._formatted||(this._formatted=a(this,!1)),this._formatted)}toJSON(){const p={$mid:1};return this._fsPath&&(p.fsPath=this._fsPath,p._sep=n),this._formatted&&(p.external=this._formatted),this.path&&(p.path=this.path),this.scheme&&(p.scheme=this.scheme),this.authority&&(p.authority=this.authority),this.query&&(p.query=this.query),this.fragment&&(p.fragment=this.fragment),p}}const d={[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 h(f,p,C){let y,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||p&&T===47||C&&T===91||C&&T===93||C&&T===58)E!==-1&&(y+=encodeURIComponent(f.substring(E,I)),E=-1),y!==void 0&&(y+=f.charAt(I));else{y===void 0&&(y=f.substr(0,I));const O=d[T];O!==void 0?(E!==-1&&(y+=encodeURIComponent(f.substring(E,I)),E=-1),y+=O):E===-1&&(E=I)}}return E!==-1&&(y+=encodeURIComponent(f.substring(E))),y!==void 0?y:f}function o(f){let p;for(let C=0;C<f.length;C++){const y=f.charCodeAt(C);y===35||y===63?(p===void 0&&(p=f.substr(0,C)),p+=d[y]):p!==void 0&&(p+=f[C])}return p!==void 0?p:f}function c(f,p){let C;return f.authority&&f.path.length>1&&f.scheme==="file"?C=`//${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?p?C=f.path.substr(1):C=f.path[1].toLowerCase()+f.path.substr(2):C=f.path,k.isWindows&&(C=C.replace(/\\//g,"\\\\")),C}e.uriToFsPath=c;function a(f,p){const C=p?o:h;let y="",{scheme:E,authority:I,path:T,query:O,fragment:R}=f;if(E&&(y+=E,y+=":"),(I||E==="file")&&(y+=s,y+=s),I){let M=I.indexOf("@");if(M!==-1){const N=I.substr(0,M);I=I.substr(M+1),M=N.lastIndexOf(":"),M===-1?y+=C(N,!1,!1):(y+=C(N.substr(0,M),!1,!1),y+=":",y+=C(N.substr(M+1),!1,!0)),y+="@"}I=I.toLowerCase(),M=I.lastIndexOf(":"),M===-1?y+=C(I,!1,!0):(y+=C(I.substr(0,M),!1,!0),y+=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)}`)}y+=C(T,!0,!1)}return O&&(y+="?",y+=C(O,!1,!1)),R&&(y+="#",y+=p?R:h(R,!1,!1)),y}function l(f){try{return decodeURIComponent(f)}catch{return f.length>3?f.substr(0,3)+l(f.substr(3)):f}}const u=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(f){return f.match(u)?f.replace(u,p=>l(p)):f}}),define(J[213],ee([1,0,134,9,21]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function D(g){return JSON.stringify(g,b)}e.stringify=D;function w(g){let m=JSON.parse(g);return m=S(m),m}e.parse=w;function b(g,m){return m instanceof RegExp?{$mid:2,source:m.source,flags:(0,k.regExpFlags)(m)}:m}function S(g,m=0){if(!g||m>200)return g;if(typeof g=="object"){switch(g.$mid){case 1:return L.URI.revive(g);case 2:return new RegExp(g.source,g.flags);case 16:return new Date(g.source)}if(g instanceof _.VSBuffer||g instanceof Uint8Array)return g;if(Array.isArray(g))for(let s=0;s<g.length;++s)g[s]=S(g[s],m+1);else for(const s in g)Object.hasOwnProperty.call(g,s)&&(g[s]=S(g[s],m+1))}return g}e.revive=S}),define(J[51],ee([1,0,11,17,21]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.RemoteAuthorities=e.connectionTokenQueryName=e.Schemas=void 0;var D;(function(g){g.inMemory="inmemory",g.vscode="vscode",g.internal="private",g.walkThrough="walkThrough",g.walkThroughSnippet="walkThroughSnippet",g.http="http",g.https="https",g.file="file",g.mailto="mailto",g.untitled="untitled",g.data="data",g.command="command",g.vscodeRemote="vscode-remote",g.vscodeRemoteResource="vscode-remote-resource",g.vscodeUserData="vscode-userdata",g.vscodeCustomEditor="vscode-custom-editor",g.vscodeNotebookCell="vscode-notebook-cell",g.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",g.vscodeNotebookCellOutput="vscode-notebook-cell-output",g.vscodeInteractive="vscode-interactive",g.vscodeInteractiveInput="vscode-interactive-input",g.vscodeSettings="vscode-settings",g.vscodeWorkspaceTrust="vscode-workspace-trust",g.vscodeTerminal="vscode-terminal",g.vscodeChatSesssion="vscode-chat-editor",g.webviewPanel="webview-panel",g.vscodeWebview="vscode-webview",g.extension="extension",g.vscodeFileResource="vscode-file",g.tmp="tmp",g.vsls="vsls",g.vscodeSourceControl="vscode-scm"})(D||(e.Schemas=D={})),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(d){return _.onUnexpectedError(d),m}const s=m.authority;let t=this._hosts[s];t&&t.indexOf(":")!==-1&&t.indexOf("[")===-1&&(t=`[${t}]`);const i=this._ports[s],n=this._connectionTokens[s];let r=`path=${encodeURIComponent(m.path)}`;return typeof n=="string"&&(r+=`&${e.connectionTokenQueryName}=${encodeURIComponent(n)}`),L.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 S;(function(g){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"}]]);g.CoopAndCoep=Object.freeze(m.get("3"));const s="vscode-coi";function t(n){let r;typeof n=="string"?r=new URL(n).searchParams:n instanceof URL?r=n.searchParams:L.URI.isUri(n)&&(r=new URL(n.toString(!0)).searchParams);const d=r?.get(s);if(d)return m.get(d)}g.getHeadersFromQuery=t;function i(n,r,d){if(!globalThis.crossOriginIsolated)return;const h=r&&d?"3":d?"2":"1";n instanceof URLSearchParams?n.set(s,h):n[s]=h}g.addSearchParam=i})(S||(e.COI=S={}))}),define(J[7],ee([1,0,47,210,44,67,11,6,291,2,51,17]),function(j,e,_,k,L,D,w,b,S,g,m,s){"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(ve){for(;ve.firstChild;)ve.firstChild.remove()}e.clearNode=t;function i(ve){var be;return(be=ve?.isConnected)!==null&&be!==void 0?be:!1}e.isInDOM=i;class n{constructor(be,De,Me,Oe){this._node=be,this._type=De,this._handler=Me,this._options=Oe||!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(ve,be,De,Me){return new n(ve,be,De,Me)}e.addDisposableListener=r;function d(ve){return function(be){return ve(new D.StandardMouseEvent(be))}}function h(ve){return function(be){return ve(new L.StandardKeyboardEvent(be))}}const o=function(be,De,Me,Oe){let xe=Me;return De==="click"||De==="mousedown"?xe=d(Me):(De==="keydown"||De==="keypress"||De==="keyup")&&(xe=h(Me)),r(be,De,xe,Oe)};e.addStandardDisposableListener=o;const c=function(be,De,Me){const Oe=d(De);return l(be,Oe,Me)};e.addStandardDisposableGenericMouseDownListener=c;const a=function(be,De,Me){const Oe=d(De);return u(be,Oe,Me)};e.addStandardDisposableGenericMouseUpListener=a;function l(ve,be,De){return r(ve,s.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,be,De)}e.addDisposableGenericMouseDownListener=l;function u(ve,be,De){return r(ve,s.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,be,De)}e.addDisposableGenericMouseUpListener=u;class v{constructor(be,De=0){this._runner=be,this.priority=De,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(be){(0,w.onUnexpectedError)(be)}}static sort(be,De){return De.priority-be.priority}}(function(){let ve=[],be=null,De=!1,Me=!1;const Oe=()=>{for(De=!1,be=ve,ve=[],Me=!0;be.length>0;)be.sort(v.sort),be.shift().execute();Me=!1};e.scheduleAtNextAnimationFrame=(xe,Fe=0)=>{const Ue=new v(xe,Fe);return ve.push(Ue),De||(De=!0,requestAnimationFrame(Oe)),Ue},e.runAtThisOrScheduleAtNextAnimationFrame=(xe,Fe)=>{if(Me){const Ue=new v(xe,Fe);return be.push(Ue),Ue}else return(0,e.scheduleAtNextAnimationFrame)(xe,Fe)}})();function f(ve){return document.defaultView.getComputedStyle(ve,null)}e.getComputedStyle=f;function p(ve){if(ve!==document.body)return new y(ve.clientWidth,ve.clientHeight);if(s.isIOS&&window.visualViewport)return new y(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new y(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new y(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new y(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=p;class C{static convertToPixels(be,De){return parseFloat(De)||0}static getDimension(be,De,Me){const Oe=f(be),xe=Oe?Oe.getPropertyValue(De):"0";return C.convertToPixels(be,xe)}static getBorderLeftWidth(be){return C.getDimension(be,"border-left-width","borderLeftWidth")}static getBorderRightWidth(be){return C.getDimension(be,"border-right-width","borderRightWidth")}static getBorderTopWidth(be){return C.getDimension(be,"border-top-width","borderTopWidth")}static getBorderBottomWidth(be){return C.getDimension(be,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(be){return C.getDimension(be,"padding-left","paddingLeft")}static getPaddingRight(be){return C.getDimension(be,"padding-right","paddingRight")}static getPaddingTop(be){return C.getDimension(be,"padding-top","paddingTop")}static getPaddingBottom(be){return C.getDimension(be,"padding-bottom","paddingBottom")}static getMarginLeft(be){return C.getDimension(be,"margin-left","marginLeft")}static getMarginTop(be){return C.getDimension(be,"margin-top","marginTop")}static getMarginRight(be){return C.getDimension(be,"margin-right","marginRight")}static getMarginBottom(be){return C.getDimension(be,"margin-bottom","marginBottom")}}class y{constructor(be,De){this.width=be,this.height=De}with(be=this.width,De=this.height){return be!==this.width||De!==this.height?new y(be,De):this}static is(be){return typeof be=="object"&&typeof be.height=="number"&&typeof be.width=="number"}static lift(be){return be instanceof y?be:new y(be.width,be.height)}static equals(be,De){return be===De?!0:!be||!De?!1:be.width===De.width&&be.height===De.height}}e.Dimension=y,y.None=new y(0,0);function E(ve){let be=ve.offsetParent,De=ve.offsetTop,Me=ve.offsetLeft;for(;(ve=ve.parentNode)!==null&&ve!==document.body&&ve!==document.documentElement;){De-=ve.scrollTop;const Oe=V(ve)?null:f(ve);Oe&&(Me-=Oe.direction!=="rtl"?ve.scrollLeft:-ve.scrollLeft),ve===be&&(Me+=C.getBorderLeftWidth(ve),De+=C.getBorderTopWidth(ve),De+=ve.offsetTop,Me+=ve.offsetLeft,be=ve.offsetParent)}return{left:Me,top:De}}e.getTopLeftOffset=E;function I(ve,be,De){typeof be=="number"&&(ve.style.width=`${be}px`),typeof De=="number"&&(ve.style.height=`${De}px`)}e.size=I;function T(ve){const be=ve.getBoundingClientRect();return{left:be.left+window.scrollX,top:be.top+window.scrollY,width:be.width,height:be.height}}e.getDomNodePagePosition=T;function O(ve){let be=ve,De=1;do{const Me=f(be).zoom;Me!=null&&Me!=="1"&&(De*=Me),be=be.parentElement}while(be!==null&&be!==document.documentElement);return De}e.getDomNodeZoomLevel=O;function R(ve){const be=C.getMarginLeft(ve)+C.getMarginRight(ve);return ve.offsetWidth+be}e.getTotalWidth=R;function M(ve){const be=C.getBorderLeftWidth(ve)+C.getBorderRightWidth(ve),De=C.getPaddingLeft(ve)+C.getPaddingRight(ve);return ve.offsetWidth-be-De}e.getContentWidth=M;function N(ve){const be=C.getBorderTopWidth(ve)+C.getBorderBottomWidth(ve),De=C.getPaddingTop(ve)+C.getPaddingBottom(ve);return ve.offsetHeight-be-De}e.getContentHeight=N;function P(ve){const be=C.getMarginTop(ve)+C.getMarginBottom(ve);return ve.offsetHeight+be}e.getTotalHeight=P;function x(ve,be){for(;ve;){if(ve===be)return!0;ve=ve.parentNode}return!1}e.isAncestor=x;function F(ve,be,De){for(;ve&&ve.nodeType===ve.ELEMENT_NODE;){if(ve.classList.contains(be))return ve;if(De){if(typeof De=="string"){if(ve.classList.contains(De))return null}else if(ve===De)return null}ve=ve.parentNode}return null}e.findParentWithClass=F;function B(ve,be,De){return!!F(ve,be,De)}e.hasParentWithClass=B;function V(ve){return ve&&!!ve.host&&!!ve.mode}e.isShadowRoot=V;function K(ve){return!!A(ve)}e.isInShadowDOM=K;function A(ve){for(;ve.parentNode;){if(ve===document.body)return null;ve=ve.parentNode}return V(ve)?ve:null}e.getShadowRoot=A;function Y(){let ve=document.activeElement;for(;ve?.shadowRoot;)ve=ve.shadowRoot.activeElement;return ve}e.getActiveElement=Y;function ie(ve=document.getElementsByTagName("head")[0],be){const De=document.createElement("style");return De.type="text/css",De.media="screen",be?.(De),ve.appendChild(De),De}e.createStyleSheet=ie;let le=null;function ne(){return le||(le=ie()),le}function se(ve){var be,De;return!((be=ve?.sheet)===null||be===void 0)&&be.rules?ve.sheet.rules:!((De=ve?.sheet)===null||De===void 0)&&De.cssRules?ve.sheet.cssRules:[]}function H(ve,be,De=ne()){!De||!be||De.sheet.insertRule(ve+"{"+be+"}",0)}e.createCSSRule=H;function W(ve,be=ne()){if(!be)return;const De=se(be),Me=[];for(let Oe=0;Oe<De.length;Oe++)De[Oe].selectorText.indexOf(ve)!==-1&&Me.push(Oe);for(let Oe=Me.length-1;Oe>=0;Oe--)be.sheet.deleteRule(Me[Oe])}e.removeCSSRulesContainingSelector=W;function $(ve){return typeof HTMLElement=="object"?ve instanceof HTMLElement:ve&&typeof ve=="object"&&ve.nodeType===1&&typeof ve.nodeName=="string"}e.isHTMLElement=$,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:_.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:_.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:_.isWebKit?"webkitAnimationIteration":"animationiteration"};function Z(ve){const be=ve;return!!(be&&typeof be.preventDefault=="function"&&typeof be.stopPropagation=="function")}e.isEventLike=Z,e.EventHelper={stop:(ve,be)=>(ve.preventDefault(),be&&ve.stopPropagation(),ve)};function Q(ve){const be=[];for(let De=0;ve&&ve.nodeType===ve.ELEMENT_NODE;De++)be[De]=ve.scrollTop,ve=ve.parentNode;return be}e.saveParentsScrollTop=Q;function re(ve,be){for(let De=0;ve&&ve.nodeType===ve.ELEMENT_NODE;De++)ve.scrollTop!==be[De]&&(ve.scrollTop=be[De]),ve=ve.parentNode}e.restoreParentsScrollTop=re;class ce extends g.Disposable{static hasFocusWithin(be){const De=A(be),Me=De?De.activeElement:document.activeElement;return x(Me,be)}constructor(be){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 De=ce.hasFocusWithin(be),Me=!1;const Oe=()=>{Me=!1,De||(De=!0,this._onDidFocus.fire())},xe=()=>{De&&(Me=!0,window.setTimeout(()=>{Me&&(Me=!1,De=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{ce.hasFocusWithin(be)!==De&&(De?xe():Oe())},this._register(r(be,e.EventType.FOCUS,Oe,!0)),this._register(r(be,e.EventType.BLUR,xe,!0)),this._register(r(be,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(r(be,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler()))}}function he(ve){return new ce(ve)}e.trackFocus=he;function de(ve,...be){if(ve.append(...be),be.length===1&&typeof be[0]!="string")return be[0]}e.append=de;function ue(ve,be){return ve.insertBefore(be,ve.firstChild),be}e.prepend=ue;function q(ve,...be){ve.innerText="",de(ve,...be)}e.reset=q;const z=/([\\w\\-]+)?(#([\\w\\-]+))?((\\.([\\w\\-]+))*)/;var U;(function(ve){ve.HTML="http://www.w3.org/1999/xhtml",ve.SVG="http://www.w3.org/2000/svg"})(U||(e.Namespace=U={}));function X(ve,be,De,...Me){const Oe=z.exec(be);if(!Oe)throw new Error("Bad use of emmet");const xe=Oe[1]||"div";let Fe;return ve!==U.HTML?Fe=document.createElementNS(ve,xe):Fe=document.createElement(xe),Oe[3]&&(Fe.id=Oe[3]),Oe[4]&&(Fe.className=Oe[4].replace(/\\./g," ").trim()),De&&Object.entries(De).forEach(([Ue,Be])=>{typeof Be>"u"||(/^on\\w+$/.test(Ue)?Fe[Ue]=Be:Ue==="selected"?Be&&Fe.setAttribute(Ue,"true"):Fe.setAttribute(Ue,Be))}),Fe.append(...Me),Fe}function te(ve,be,...De){return X(U.HTML,ve,be,...De)}e.$=te,te.SVG=function(ve,be,...De){return X(U.SVG,ve,be,...De)};function G(ve,...be){ve?ae(...be):fe(...be)}e.setVisibility=G;function ae(...ve){for(const be of ve)be.style.display="",be.removeAttribute("aria-hidden")}e.show=ae;function fe(...ve){for(const be of ve)be.style.display="none",be.setAttribute("aria-hidden","true")}e.hide=fe;function Ce(ve){const be=window.devicePixelRatio*ve;return Math.max(1,Math.floor(be))/window.devicePixelRatio}e.computeScreenAwareSize=Ce;function Se(ve){window.open(ve,"_blank","noopener")}e.windowOpenNoOpener=Se;function ye(ve){const be=()=>{ve(),De=(0,e.scheduleAtNextAnimationFrame)(be)};let De=(0,e.scheduleAtNextAnimationFrame)(be);return(0,g.toDisposable)(()=>De.dispose())}e.animate=ye,m.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Ie(ve){return ve?`url(\'${m.FileAccess.uriToBrowserUri(ve).toString(!0).replace(/\'/g,"%27")}\')`:"url(\'\')"}e.asCSSUrl=Ie;function Ee(ve){return`\'${ve.replace(/\'/g,"%27")}\'`}e.asCSSPropertyValue=Ee;function ke(ve,be){if(ve!==void 0){const De=ve.match(/^\\s*var\\((.+)\\)$/);if(De){const Me=De[1].split(",",2);return Me.length===2&&(be=ke(Me[1].trim(),be)),`var(${Me[0]}, ${be})`}return ve}return be}e.asCssValueWithDefault=ke;function Ae(ve,be=!1){const De=document.createElement("a");return S.addHook("afterSanitizeAttributes",Me=>{for(const Oe of["href","src"])if(Me.hasAttribute(Oe)){const xe=Me.getAttribute(Oe);if(Oe==="href"&&xe.startsWith("#"))continue;if(De.href=xe,!ve.includes(De.protocol.replace(/:$/,""))){if(be&&Oe==="src"&&De.href.startsWith("data:"))continue;Me.removeAttribute(Oe)}}}),(0,g.toDisposable)(()=>{S.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=Ae,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 _e extends b.Emitter{constructor(){super(),this._subscriptions=new g.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(r(window,"keydown",be=>{if(be.defaultPrevented)return;const De=new L.StandardKeyboardEvent(be);if(!(De.keyCode===6&&be.repeat)){if(be.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(be.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(be.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(be.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(De.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=be.altKey,this._keyStatus.ctrlKey=be.ctrlKey,this._keyStatus.metaKey=be.metaKey,this._keyStatus.shiftKey=be.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=be,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(r(window,"keyup",be=>{be.defaultPrevented||(!be.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!be.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!be.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!be.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=be.altKey,this._keyStatus.ctrlKey=be.ctrlKey,this._keyStatus.metaKey=be.metaKey,this._keyStatus.shiftKey=be.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=be,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",be=>{be.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 _e.instance||(_e.instance=new _e),_e.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=_e;class me extends g.Disposable{constructor(be,De){super(),this.element=be,this.callbacks=De,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(r(this.element,e.EventType.DRAG_ENTER,be=>{this.counter++,this.dragStartTime=be.timeStamp,this.callbacks.onDragEnter(be)})),this._register(r(this.element,e.EventType.DRAG_OVER,be=>{var De,Me;be.preventDefault(),(Me=(De=this.callbacks).onDragOver)===null||Me===void 0||Me.call(De,be,be.timeStamp-this.dragStartTime)})),this._register(r(this.element,e.EventType.DRAG_LEAVE,be=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(be))})),this._register(r(this.element,e.EventType.DRAG_END,be=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(be)})),this._register(r(this.element,e.EventType.DROP,be=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(be)}))}}e.DragAndDropObserver=me;const oe=/(?<tag>[\\w\\-]+)?(?:#(?<id>[\\w\\-]+))?(?<class>(?:\\.(?:[\\w\\-]+))*)(?:@(?<name>(?:[\\w\\_])+))?/;function pe(ve,...be){let De,Me;Array.isArray(be[0])?(De={},Me=be[0]):(De=be[0]||{},Me=be[1]);const Oe=oe.exec(ve);if(!Oe||!Oe.groups)throw new Error("Bad use of h");const xe=Oe.groups.tag||"div",Fe=document.createElement(xe);Oe.groups.id&&(Fe.id=Oe.groups.id);const Ue=[];if(Oe.groups.class)for(const Ke of Oe.groups.class.split("."))Ke!==""&&Ue.push(Ke);if(De.className!==void 0)for(const Ke of De.className.split("."))Ke!==""&&Ue.push(Ke);Ue.length>0&&(Fe.className=Ue.join(" "));const Be={};if(Oe.groups.name&&(Be[Oe.groups.name]=Fe),Me)for(const Ke of Me)Ke instanceof HTMLElement?Fe.appendChild(Ke):typeof Ke=="string"?Fe.append(Ke):"root"in Ke&&(Object.assign(Be,Ke),Fe.appendChild(Ke.root));for(const[Ke,Ye]of Object.entries(De))if(Ke!=="className")if(Ke==="style")for(const[He,Ne]of Object.entries(Ye))Fe.style.setProperty(Le(He),typeof Ne=="number"?Ne+"px":""+Ne);else Ke==="tabIndex"?Fe.tabIndex=Ye:Fe.setAttribute(Le(Ke),Ye.toString());return Be.root=Fe,Be}e.h=pe;function Le(ve){return ve.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}),define(J[292],ee([1,0,7]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function k(s,t={}){const i=D(t);return i.textContent=s,i}e.renderText=k;function L(s,t={}){const i=D(t);return b(i,S(s,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}e.renderFormattedText=L;function D(s){const t=s.inline?"span":"div",i=document.createElement(t);return s.className&&(i.className=s.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(s,t,i,n){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&&n)r=document.createElement("code");else if(t.type===5&&i){const d=document.createElement("a");i.disposables.add(_.addStandardDisposableListener(d,"click",h=>{i.callback(String(t.index),h)})),r=d}else t.type===8?r=document.createElement("br"):t.type===1&&(r=s);r&&s!==r&&s.appendChild(r),r&&Array.isArray(t.children)&&t.children.forEach(d=>{b(r,d,i,n)})}function S(s,t){const i={type:1,children:[]};let n=0,r=i;const d=[],h=new w(s);for(;!h.eos();){let o=h.next();const c=o==="\\\\"&&m(h.peek(),t)!==0;if(c&&(o=h.next()),!c&&g(o,t)&&o===h.peek()){h.advance(),r.type===2&&(r=d.pop());const a=m(o,t);if(r.type===a||r.type===5&&a===6)r=d.pop();else{const l={type:a,children:[]};a===5&&(l.index=n,n++),r.children.push(l),d.push(r),r=l}}else if(o===`\n`)r.type===2&&(r=d.pop()),r.children.push({type:8});else if(r.type!==2){const a={type:2,content:o};r.children.push(a),d.push(r),r=a}else r.content+=o}return r.type===2&&(r=d.pop()),d.length,i}function g(s,t){return m(s,t)!==0}function m(s,t){switch(s){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}}),define(J[146],ee([1,0,7,2]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalPointerMoveMonitor=void 0;class L{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 S=this._onStopCallback;this._onStopCallback=null,w&&S&&S(b)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(w,b,S,g,m){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=g,this._onStopCallback=m;let s=w;try{w.setPointerCapture(b),this._hooks.add((0,k.toDisposable)(()=>{try{w.releasePointerCapture(b)}catch{}}))}catch{s=window}this._hooks.add(_.addDisposableListener(s,_.EventType.POINTER_MOVE,t=>{if(t.buttons!==S){this.stopMonitoring(!0);return}t.preventDefault(),this._pointerMoveCallback(t)})),this._hooks.add(_.addDisposableListener(s,_.EventType.POINTER_UP,t=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=L}),define(J[57],ee([1,0,7,16,101,2,59]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var b;(function(g){g.Tap="-monaco-gesturetap",g.Change="-monaco-gesturechange",g.Start="-monaco-gesturestart",g.End="-monaco-gesturesend",g.Contextmenu="-monaco-gesturecontextmenu"})(b||(e.EventType=b={}));class S 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(_.addDisposableListener(document,"touchstart",m=>this.onTouchStart(m),{passive:!1})),this._register(_.addDisposableListener(document,"touchend",m=>this.onTouchEnd(m))),this._register(_.addDisposableListener(document,"touchmove",m=>this.onTouchMove(m),{passive:!1}))}static addTarget(m){if(!S.isTouchDevice())return D.Disposable.None;S.INSTANCE||(S.INSTANCE=new S);const s=S.INSTANCE.targets.push(m);return(0,D.toDisposable)(s)}static ignoreTarget(m){if(!S.isTouchDevice())return D.Disposable.None;S.INSTANCE||(S.INSTANCE=new S);const s=S.INSTANCE.ignoreTargets.push(m);return(0,D.toDisposable)(s)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(m){const s=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let t=0,i=m.targetTouches.length;t<i;t++){const n=m.targetTouches.item(t);this.activeTouches[n.identifier]={id:n.identifier,initialTarget:n.target,initialTimeStamp:s,initialPageX:n.pageX,initialPageY:n.pageY,rollingTimestamps:[s],rollingPageX:[n.pageX],rollingPageY:[n.pageY]};const r=this.newGestureEvent(b.Start,n.target);r.pageX=n.pageX,r.pageY=n.pageY,this.dispatchEvent(r)}this.dispatched&&(m.preventDefault(),m.stopPropagation(),this.dispatched=!1)}onTouchEnd(m){const s=Date.now(),t=Object.keys(this.activeTouches).length;for(let i=0,n=m.changedTouches.length;i<n;i++){const r=m.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(r.identifier))){console.warn("move of an UNKNOWN touch",r);continue}const d=this.activeTouches[r.identifier],h=Date.now()-d.initialTimeStamp;if(h<S.HOLD_DELAY&&Math.abs(d.initialPageX-k.tail(d.rollingPageX))<30&&Math.abs(d.initialPageY-k.tail(d.rollingPageY))<30){const o=this.newGestureEvent(b.Tap,d.initialTarget);o.pageX=k.tail(d.rollingPageX),o.pageY=k.tail(d.rollingPageY),this.dispatchEvent(o)}else if(h>=S.HOLD_DELAY&&Math.abs(d.initialPageX-k.tail(d.rollingPageX))<30&&Math.abs(d.initialPageY-k.tail(d.rollingPageY))<30){const o=this.newGestureEvent(b.Contextmenu,d.initialTarget);o.pageX=k.tail(d.rollingPageX),o.pageY=k.tail(d.rollingPageY),this.dispatchEvent(o)}else if(t===1){const o=k.tail(d.rollingPageX),c=k.tail(d.rollingPageY),a=k.tail(d.rollingTimestamps)-d.rollingTimestamps[0],l=o-d.rollingPageX[0],u=c-d.rollingPageY[0],v=[...this.targets].filter(f=>d.initialTarget instanceof Node&&f.contains(d.initialTarget));this.inertia(v,s,Math.abs(l)/a,l>0?1:-1,o,Math.abs(u)/a,u>0?1:-1,c)}this.dispatchEvent(this.newGestureEvent(b.End,d.initialTarget)),delete this.activeTouches[r.identifier]}this.dispatched&&(m.preventDefault(),m.stopPropagation(),this.dispatched=!1)}newGestureEvent(m,s){const t=document.createEvent("CustomEvent");return t.initEvent(m,!1,!0),t.initialTarget=s,t.tapCount=0,t}dispatchEvent(m){if(m.type===b.Tap){const s=new Date().getTime();let t=0;s-this._lastSetTapCountTime>S.CLEAR_TAP_COUNT_TIME?t=1:t=2,this._lastSetTapCountTime=s,m.tapCount=t}else(m.type===b.Change||m.type===b.Contextmenu)&&(this._lastSetTapCountTime=0);if(m.initialTarget instanceof Node){for(const s of this.ignoreTargets)if(s.contains(m.initialTarget))return;for(const s of this.targets)s.contains(m.initialTarget)&&(s.dispatchEvent(m),this.dispatched=!0)}}inertia(m,s,t,i,n,r,d,h){this.handle=_.scheduleAtNextAnimationFrame(()=>{const o=Date.now(),c=o-s;let a=0,l=0,u=!0;t+=S.SCROLL_FRICTION*c,r+=S.SCROLL_FRICTION*c,t>0&&(u=!1,a=i*t*c),r>0&&(u=!1,l=d*r*c);const v=this.newGestureEvent(b.Change);v.translationX=a,v.translationY=l,m.forEach(f=>f.dispatchEvent(v)),u||this.inertia(m,o,t,i,n+a,r,d,h+l)})}onTouchMove(m){const s=Date.now();for(let t=0,i=m.changedTouches.length;t<i;t++){const n=m.changedTouches.item(t);if(!this.activeTouches.hasOwnProperty(String(n.identifier))){console.warn("end of an UNKNOWN touch",n);continue}const r=this.activeTouches[n.identifier],d=this.newGestureEvent(b.Change,r.initialTarget);d.translationX=n.pageX-k.tail(r.rollingPageX),d.translationY=n.pageY-k.tail(r.rollingPageY),d.pageX=n.pageX,d.pageY=n.pageY,this.dispatchEvent(d),r.rollingPageX.length>3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(n.pageX),r.rollingPageY.push(n.pageY),r.rollingTimestamps.push(s)}this.dispatched&&(m.preventDefault(),m.stopPropagation(),this.dispatched=!1)}}e.Gesture=S,S.SCROLL_FRICTION=-.005,S.HOLD_DELAY=700,S.CLEAR_TAP_COUNT_TIME=400,Te([L.memoize],S,"isTouchDevice",null)}),define(J[48],ee([1,0,7,17,379]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const L=2e4;let D,w,b,S,g;function m(n){D=document.createElement("div"),D.className="monaco-aria-container";const r=()=>{const h=document.createElement("div");return h.className="monaco-alert",h.setAttribute("role","alert"),h.setAttribute("aria-atomic","true"),D.appendChild(h),h};w=r(),b=r();const d=()=>{const h=document.createElement("div");return h.className="monaco-status",h.setAttribute("role","complementary"),h.setAttribute("aria-live","polite"),h.setAttribute("aria-atomic","true"),D.appendChild(h),h};S=d(),g=d(),n.appendChild(D)}e.setARIAContainer=m;function s(n){D&&(w.textContent!==n?(_.clearNode(b),i(w,n)):(_.clearNode(w),i(b,n)))}e.alert=s;function t(n){D&&(k.isMacintosh?s(n):S.textContent!==n?(_.clearNode(g),i(S,n)):(_.clearNode(S),i(g,n)))}e.status=t;function i(n,r){_.clearNode(n),r.length>L&&(r=r.substr(0,L)),n.textContent=r,n.style.visibility="hidden",n.style.visibility="visible"}}),define(J[293],ee([1,0,210,7,2,17,161,383]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=void 0;var b;(function(s){s[s.AVOID=0]="AVOID",s[s.ALIGN=1]="ALIGN"})(b||(e.LayoutAnchorMode=b={}));function S(s,t,i){const n=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<=s-n?n:t<=r?r-t:Math.max(s-t,0):t<=r?r-t:t<=s-n?n:0}e.layout=S;class g extends L.Disposable{constructor(t,i){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=L.Disposable.None,this.toDisposeOnSetContainer=L.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,L.toDisposable)(()=>this.setContainer(null,1)))}setContainer(t,i){var n;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(n=this.shadowRootHostElement)===null||n===void 0||n.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 d=document.createElement("style");d.textContent=m,this.shadowRoot.appendChild(d),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(k.$("slot"))}else this.container.appendChild(this.view);const r=new L.DisposableStore;g.BUBBLE_UP_EVENTS.forEach(d=>{r.add(k.addStandardDisposableListener(this.container,d,h=>{this.onDOMEvent(h,!1)}))}),g.BUBBLE_DOWN_EVENTS.forEach(d=>{r.add(k.addStandardDisposableListener(this.container,d,h=>{this.onDOMEvent(h,!0)},!0))}),this.toDisposeOnSetContainer=r}}show(t){var i,n;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)||L.Disposable.None,this.delegate=t,this.doLayout(),(n=(i=this.delegate).focus)===null||n===void 0||n.call(i)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(D.isIOS&&_.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),v=k.getDomNodeZoomLevel(t);i={top:u.top*v,left:u.left*v,width:u.width*v,height:u.height*v}}else i={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const n=k.getTotalWidth(this.view),r=k.getTotalHeight(this.view),d=this.delegate.anchorPosition||0,h=this.delegate.anchorAlignment||0,o=this.delegate.anchorAxisAlignment||0;let c,a;if(o===0){const u={offset:i.top-window.pageYOffset,size:i.height,position:d===0?0:1},v={offset:i.left,size:i.width,position:h===0?0:1,mode:b.ALIGN};c=S(window.innerHeight,r,u)+window.pageYOffset,w.Range.intersects({start:c,end:c+r},{start:u.offset,end:u.offset+u.size})&&(v.mode=b.AVOID),a=S(window.innerWidth,n,v)}else{const u={offset:i.left,size:i.width,position:h===0?0:1},v={offset:i.top,size:i.height,position:d===0?0:1,mode:b.ALIGN};a=S(window.innerWidth,n,u),w.Range.intersects({start:a,end:a+n},{start:u.offset,end:u.offset+u.size})&&(v.mode=b.AVOID),c=S(window.innerHeight,r,v)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(d===0?"bottom":"top"),this.view.classList.add(h===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=k.getDomNodePagePosition(this.container);this.view.style.top=`${c-(this.useFixedPosition?k.getDomNodePagePosition(this.view).top:l.top)}px`,this.view.style.left=`${a-(this.useFixedPosition?k.getDomNodePagePosition(this.view).left:l.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()}}e.ContextView=g,g.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],g.BUBBLE_DOWN_EVENTS=["click"];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[294],ee([1,0,7,9,384]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;class L{constructor(w,b,S){this.options=b,this.styles=S,this.count=0,this.element=(0,_.append)(w,(0,_.$)(".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=L}),define(J[552],ee([1,0,7,44,57,40,6,256]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=void 0;class b extends D.ActionRunner{constructor(m,s){super(),this._onDidChangeVisibility=this._register(new w.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,_.append)(m,(0,_.$)(".monaco-dropdown")),this._label=(0,_.append)(this._element,(0,_.$)(".dropdown-label"));let t=s.labelRenderer;t||(t=n=>(n.textContent=s.label||"",null));for(const n of[_.EventType.CLICK,_.EventType.MOUSE_DOWN,L.EventType.Tap])this._register((0,_.addDisposableListener)(this.element,n,r=>_.EventHelper.stop(r,!0)));for(const n of[_.EventType.MOUSE_DOWN,L.EventType.Tap])this._register((0,_.addDisposableListener)(this._label,n,r=>{r instanceof MouseEvent&&(r.detail>1||r.button!==0)||(this.visible?this.hide():this.show())}));this._register((0,_.addDisposableListener)(this._label,_.EventType.KEY_UP,n=>{const r=new k.StandardKeyboardEvent(n);(r.equals(3)||r.equals(10))&&(_.EventHelper.stop(n,!0),this.visible?this.hide():this.show())}));const i=t(this._label);i&&this._register(i),this._register(L.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 S extends b{constructor(m,s){super(m,s),this._actions=[],this._contextMenuProvider=s.contextMenuProvider,this.actions=s.actions||[],this.actionProvider=s.actionProvider,this.menuClassName=s.menuClassName||"",this.menuAsChild=!!s.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,s)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(m,s):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=S}),define(J[147],ee([1,0,7,31]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const L=new RegExp(`(\\\\\\\\)?\\\\$\\\\((${k.ThemeIcon.iconNameExpression}(?:${k.ThemeIcon.iconModifierExpression})?)\\\\)`,"g");function D(b){const S=new Array;let g,m=0,s=0;for(;(g=L.exec(b))!==null;){s=g.index||0,m<s&&S.push(b.substring(m,s)),m=(g.index||0)+g[0].length;const[,t,i]=g;S.push(t?`$(${i})`:w({id:i}))}return m<b.length&&S.push(b.substring(m)),S}e.renderLabelWithIcons=D;function w(b){const S=_.$("span");return S.classList.add(...k.ThemeIcon.asClassNameArray(b)),S}e.renderIcon=w}),define(J[295],ee([1,0,7,147,45]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class D{constructor(b,S){var g;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(g=S?.supportIcons)!==null&&g!==void 0?g:!1,this.domNode=_.append(b,_.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(b,S=[],g="",m){b||(b=""),m&&(b=D.escapeNewLines(b,S)),!(this.didEverRender&&this.text===b&&this.title===g&&L.equals(this.highlights,S))&&(this.text=b,this.title=g,this.highlights=S,this.render())}render(){const b=[];let S=0;for(const g of this.highlights){if(g.end===g.start)continue;if(S<g.start){const t=this.text.substring(S,g.start);this.supportIcons?b.push(...(0,k.renderLabelWithIcons)(t)):b.push(t),S=g.start}const m=this.text.substring(S,g.end),s=_.$("span.highlight",void 0,...this.supportIcons?(0,k.renderLabelWithIcons)(m):[m]);g.extraClasses&&s.classList.add(...g.extraClasses),b.push(s),S=g.end}if(S<this.text.length){const g=this.text.substring(S);this.supportIcons?b.push(...(0,k.renderLabelWithIcons)(g)):b.push(g)}_.reset(this.domNode,...b),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(b,S){let g=0,m=0;return b.replace(/\\r\\n|\\r|\\n/g,(s,t)=>{m=s===`\\r\n`?-1:0,t+=g;for(const i of S)i.end<=t||(i.start>=t&&(i.start+=m),i.end>=t&&(i.end+=m));return g+=m,"\\u23CE"})}}e.HighlightedLabel=D}),define(J[214],ee([1,0,7,208,45,538,388]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=e.unthemedKeybindingLabelOptions=void 0;const w=_.$;e.unthemedKeybindingLabelOptions={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class b{constructor(g,m,s){this.os=m,this.keyElements=new Set,this.options=s||Object.create(null);const t=this.options.keybindingLabelForeground;this.domNode=_.append(g,w(".monaco-keybinding")),t&&(this.domNode.style.color=t),this.didEverRender=!1,g.appendChild(this.domNode)}get element(){return this.domNode}set(g,m){this.didEverRender&&this.keybinding===g&&b.areSame(this.matches,m)||(this.keybinding=g,this.matches=m,this.render())}render(){var g;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++)_.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 s=(g=this.options.disableTitle)!==null&&g!==void 0&&g?void 0:this.keybinding.getAriaLabel()||void 0;s!==void 0?this.domNode.title=s:this.domNode.removeAttribute("title")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){_.clearNode(this.domNode),this.keyElements.clear()}renderChord(g,m,s){const t=k.UILabelProvider.modifierLabels[this.os];m.ctrlKey&&this.renderKey(g,t.ctrlKey,!!s?.ctrlKey,t.separator),m.shiftKey&&this.renderKey(g,t.shiftKey,!!s?.shiftKey,t.separator),m.altKey&&this.renderKey(g,t.altKey,!!s?.altKey,t.separator),m.metaKey&&this.renderKey(g,t.metaKey,!!s?.metaKey,t.separator);const i=m.keyLabel;i&&this.renderKey(g,i,!!s?.keyCode,"")}renderKey(g,m,s,t){_.append(g,this.createKeyElement(m,s?".highlight":"")),t&&_.append(g,w("span.monaco-keybinding-key-separator",void 0,t))}renderUnbound(g){_.append(g,this.createKeyElement((0,D.localize)(0,null)))}createKeyElement(g,m=""){const s=w("span.monaco-keybinding-key"+m,void 0,g);return this.keyElements.add(s),this.options.keybindingLabelBackground&&(s.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(s.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(s.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(s.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),s}static areSame(g,m){return g===m||!g&&!m?!0:!!g&&!!m&&(0,L.equals)(g.firstPart,m.firstPart)&&(0,L.equals)(g.chordPart,m.chordPart)}}e.KeybindingLabel=b}),define(J[553],ee([1,0,7]),function(j,e,_){"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 L{constructor(w){this.renderers=w,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(w){let b=this.getTemplateCache(w).pop(),S=!1;if(b)S=this.transactionNodesPendingRemoval.has(b.domNode),S&&this.transactionNodesPendingRemoval.delete(b.domNode);else{const g=(0,_.$)(".monaco-list-row"),s=this.getRenderer(w).renderTemplate(g);b={domNode:g,templateId:w,templateData:s}}return{row:b,isReusingConnectedDomNode:S}}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:S}=w;b&&(this.inTransaction?this.transactionNodesPendingRemoval.add(b):this.doRemoveNode(b)),this.getTemplateCache(S).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 S of w)this.getRenderer(b).disposeTemplate(S.templateData),S.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=L}),define(J[554],ee([1,0,7,14,2,390]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const D="done",w="active",b="infinite",S="infinite-long-running",g="discrete";class m extends L.Disposable{constructor(t,i){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new k.RunOnceScheduler(()=>(0,_.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,S,g),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(g,D,S),this.element.classList.add(w,b),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(S)}getContainer(){return this.element}}e.ProgressBar=m,m.LONG_RUNNING_INFINITE_THRESHOLD=1e4}),define(J[148],ee([1,0,7,78,57,14,101,6,2,17,391]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;const m=!1;var s;(function(l){l.North="north",l.South="south",l.East="east",l.West="west"})(s||(e.OrthogonalEdge=s={}));let t=4;const i=new b.Emitter;let n=300;const r=new b.Emitter;class d{constructor(){this.disposables=new S.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()}}Te([w.memoize],d.prototype,"onPointerMove",null),Te([w.memoize],d.prototype,"onPointerUp",null);class h{get onPointerMove(){return this.disposables.add(new k.DomEmitter(this.el,L.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new k.DomEmitter(this.el,L.EventType.End)).event}constructor(u){this.el=u,this.disposables=new S.DisposableStore}dispose(){this.disposables.dispose()}}Te([w.memoize],h.prototype,"onPointerMove",null),Te([w.memoize],h.prototype,"onPointerUp",null);class o{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(u){this.factory=u}dispose(){}}Te([w.memoize],o.prototype,"onPointerMove",null),Te([w.memoize],o.prototype,"onPointerUp",null);const c="pointer-events-disabled";class a extends S.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 v=f=>{this.orthogonalStartDragHandleDisposables.clear(),f!==0&&(this._orthogonalStartDragHandle=(0,_.append)(this.el,(0,_.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,S.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(v,this)),v(u.state)}this._orthogonalStartSash=u}set orthogonalEndSash(u){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),u){const v=f=>{this.orthogonalEndDragHandleDisposables.clear(),f!==0&&(this._orthogonalEndDragHandle=(0,_.append)(this.el,(0,_.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,S.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(v,this)),v(u.state)}this._orthogonalEndSash=u}constructor(u,v,f){super(),this.hoverDelay=n,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 S.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new S.DisposableStore),this.orthogonalEndSashDisposables=this._register(new S.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new S.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,_.append)(u,(0,_.$)(".monaco-sash")),f.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${f.orthogonalEdge}`),g.isMacintosh&&this.el.classList.add("mac");const p=this._register(new k.DomEmitter(this.el,"mousedown")).event;this._register(p(R=>this.onPointerStart(R,new d),this));const C=this._register(new k.DomEmitter(this.el,"dblclick")).event;this._register(C(this.onPointerDoublePress,this));const y=this._register(new k.DomEmitter(this.el,"mouseenter")).event;this._register(y(()=>a.onMouseEnter(this)));const E=this._register(new k.DomEmitter(this.el,"mouseleave")).event;this._register(E(()=>a.onMouseLeave(this))),this._register(L.Gesture.addTarget(this.el));const I=this._register(new k.DomEmitter(this.el,L.EventType.Start)).event;this._register(I(R=>this.onPointerStart(R,new h(this.el)),this));const T=this._register(new k.DomEmitter(this.el,L.EventType.Tap)).event;let O;this._register(T(R=>{if(O){clearTimeout(O),O=void 0,this.onPointerDoublePress(R);return}clearTimeout(O),O=setTimeout(()=>O=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=v,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,v){_.EventHelper.stop(u);let f=!1;if(!u.__orthogonalSashEvent){const P=this.getOrthogonalSash(u);P&&(f=!0,u.__orthogonalSashEvent=!0,P.onPointerStart(u,new o(v)))}if(this.linkedSash&&!u.__linkedSashEvent&&(u.__linkedSashEvent=!0,this.linkedSash.onPointerStart(u,new o(v))),!this.state)return;const p=document.getElementsByTagName("iframe");for(const P of p)P.classList.add(c);const C=u.pageX,y=u.pageY,E=u.altKey,I={startX:C,currentX:C,startY:y,currentY:y,altKey:E};this.el.classList.add("active"),this._onDidStart.fire(I);const T=(0,_.createStyleSheet)(this.el),O=()=>{let P="";f?P="all-scroll":this.orientation===1?this.state===1?P="s-resize":this.state===2?P="n-resize":P=g.isMacintosh?"row-resize":"ns-resize":this.state===1?P="e-resize":this.state===2?P="w-resize":P=g.isMacintosh?"col-resize":"ew-resize",T.textContent=`* { cursor: ${P} !important; }`},R=new S.DisposableStore;O(),f||this.onDidEnablementChange.event(O,null,R);const M=P=>{_.EventHelper.stop(P,!1);const x={startX:C,currentX:P.pageX,startY:y,currentY:P.pageY,altKey:E};this._onDidChange.fire(x)},N=P=>{_.EventHelper.stop(P,!1),this.el.removeChild(T),this.el.classList.remove("active"),this._onDidEnd.fire(),R.dispose();for(const x of p)x.classList.remove(c)};v.onPointerMove(M,null,R),v.onPointerUp(N,null,R),R.add(v)}onPointerDoublePress(u){const v=this.getOrthogonalSash(u);v&&v._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(u,v=!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,()=>{}),!v&&u.linkedSash&&a.onMouseEnter(u.linkedSash,!0)}static onMouseLeave(u,v=!1){u.hoverDelayer.cancel(),u.el.classList.remove("hover"),!v&&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 v;const f=(v=u.initialTarget)!==null&&v!==void 0?v: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[296],ee([1,0,7,148,6,2]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class w{constructor(){this._onDidWillResize=new L.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new L.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new D.DisposableStore,this._size=new _.Dimension(0,0),this._minSize=new _.Dimension(0,0),this._maxSize=new _.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 S,g=0,m=0;this._sashListener.add(L.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{S===void 0&&(this._onDidWillResize.fire(),S=this._size,g=0,m=0)})),this._sashListener.add(L.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{S!==void 0&&(S=void 0,g=0,m=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(s=>{S&&(m=s.currentX-s.startX,this.layout(S.height+g,S.width+m),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(s=>{S&&(m=-(s.currentX-s.startX),this.layout(S.height+g,S.width+m),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(s=>{S&&(g=-(s.currentY-s.startY),this.layout(S.height+g,S.width+m),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(s=>{S&&(g=s.currentY-s.startY,this.layout(S.height+g,S.width+m),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(L.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(L.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(s=>{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(S,g,m,s){this._northSash.state=S?3:0,this._eastSash.state=g?3:0,this._southSash.state=m?3:0,this._westSash.state=s?3:0}layout(S=this.size.height,g=this.size.width){const{height:m,width:s}=this._minSize,{height:t,width:i}=this._maxSize;S=Math.max(m,Math.min(t,S)),g=Math.max(s,Math.min(i,g));const n=new _.Dimension(g,S);_.Dimension.equals(n,this._size)||(this.domNode.style.height=S+"px",this.domNode.style.width=g+"px",this._size=n,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(S){this._maxSize=S}get maxSize(){return this._maxSize}set minSize(S){this._minSize=S}get minSize(){return this._minSize}set preferredSize(S){this._preferredSize=S}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=w}),define(J[555],ee([1,0,7,57,16,6,2,17]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class S extends w.Disposable{constructor(m,s,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,s)}registerListeners(){this._register(k.Gesture.addTarget(this.selectElement)),[k.EventType.Tap].forEach(m=>{this._register(_.addDisposableListener(this.selectElement,m,s=>{this.selectElement.focus()}))}),this._register(_.addStandardDisposableListener(this.selectElement,"click",m=>{_.EventHelper.stop(m,!0)})),this._register(_.addStandardDisposableListener(this.selectElement,"change",m=>{this.selectElement.title=m.target.value,this._onDidSelect.fire({index:m.target.selectedIndex,selected:m.target.value})})),this._register(_.addStandardDisposableListener(this.selectElement,"keydown",m=>{let s=!1;b.isMacintosh?(m.keyCode===18||m.keyCode===16||m.keyCode===10)&&(s=!0):(m.keyCode===18&&m.altKey||m.keyCode===10||m.keyCode===3)&&(s=!0),s&&m.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(m,s){(!this.options||!L.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))})),s!==void 0&&this.select(s)}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,s,t;this.selectElement&&(this.selectElement.style.backgroundColor=(m=this.styles.selectBackground)!==null&&m!==void 0?m:"",this.selectElement.style.color=(s=this.styles.selectForeground)!==null&&s!==void 0?s:"",this.selectElement.style.borderColor=(t=this.styles.selectBorder)!==null&&t!==void 0?t:"")}createOption(m,s,t){const i=document.createElement("option");return i.value=m,i.text=m,i.disabled=!!t,i}}e.SelectBoxNative=S}),define(J[68],ee([1,0,7,44,67,57,2]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class b extends w.Disposable{onclick(g,m){this._register(_.addDisposableListener(g,_.EventType.CLICK,s=>m(new L.StandardMouseEvent(s))))}onmousedown(g,m){this._register(_.addDisposableListener(g,_.EventType.MOUSE_DOWN,s=>m(new L.StandardMouseEvent(s))))}onmouseover(g,m){this._register(_.addDisposableListener(g,_.EventType.MOUSE_OVER,s=>m(new L.StandardMouseEvent(s))))}onmouseleave(g,m){this._register(_.addDisposableListener(g,_.EventType.MOUSE_LEAVE,s=>m(new L.StandardMouseEvent(s))))}onkeydown(g,m){this._register(_.addDisposableListener(g,_.EventType.KEY_DOWN,s=>m(new k.StandardKeyboardEvent(s))))}onkeyup(g,m){this._register(_.addDisposableListener(g,_.EventType.KEY_UP,s=>m(new k.StandardKeyboardEvent(s))))}oninput(g,m){this._register(_.addDisposableListener(g,_.EventType.INPUT,m))}onblur(g,m){this._register(_.addDisposableListener(g,_.EventType.BLUR,m))}onfocus(g,m){this._register(_.addDisposableListener(g,_.EventType.FOCUS,m))}ignoreGesture(g){return D.Gesture.ignoreTarget(g)}}e.Widget=b}),define(J[215],ee([1,0,146,68,14,31,7]),function(j,e,_,k,L,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(g){super(),this._onActivate=g.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=g.bgWidth+"px",this.bgDomNode.style.height=g.bgHeight+"px",typeof g.top<"u"&&(this.bgDomNode.style.top="0px"),typeof g.left<"u"&&(this.bgDomNode.style.left="0px"),typeof g.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof g.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=g.className,this.domNode.classList.add(...D.ThemeIcon.asClassNameArray(g.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 g.top<"u"&&(this.domNode.style.top=g.top+"px"),typeof g.left<"u"&&(this.domNode.style.left=g.left+"px"),typeof g.bottom<"u"&&(this.domNode.style.bottom=g.bottom+"px"),typeof g.right<"u"&&(this.domNode.style.right=g.right+"px"),this._pointerMoveMonitor=this._register(new _.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 L.IntervalTimer),this._pointerdownScheduleRepeatTimer=this._register(new L.TimeoutTimer)}_arrowPointerDown(g){if(!g.target||!(g.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(g.target,g.pointerId,g.buttons,s=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),g.preventDefault()}}e.ScrollbarArrow=b}),define(J[297],ee([1,0,7,35,146,215,550,68,17]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const g=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 L.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(_.addDisposableListener(this.domNode.domNode,_.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,n,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 n=="number"&&this.slider.setWidth(n),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(_.addDisposableListener(this.slider.domNode,_.EventType.POINTER_DOWN,d=>{d.button===0&&(d.preventDefault(),this._sliderPointerDown(d))})),this.onclick(this.slider.domNode,d=>{d.leftButton&&d.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,n=i+this._scrollbarState.getSliderPosition(),r=i+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),d=this._sliderPointerPosition(t);n<=d&&d<=r?t.button===0&&(t.preventDefault(),this._sliderPointerDown(t)):this._onPointerDown(t)}_onPointerDown(t){let i,n;if(t.target===this.domNode.domNode&&typeof t.offsetX=="number"&&typeof t.offsetY=="number")i=t.offsetX,n=t.offsetY;else{const d=_.getDomNodePagePosition(this.domNode.domNode);i=t.pageX-d.left,n=t.pageY-d.top}const r=this._pointerDownRelativePosition(i,n);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),n=this._sliderOrthogonalPointerPosition(t),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(t.target,t.pointerId,t.buttons,d=>{const h=this._sliderOrthogonalPointerPosition(d),o=Math.abs(h-n);if(S.isWindows&&o>g){this._setDesiredScrollPositionNow(r.getScrollPosition());return}const a=this._sliderPointerPosition(d)-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[556],ee([1,0,67,297,215,250,26]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class b extends k.AbstractScrollbar{constructor(g,m,s){const t=g.getScrollDimensions(),i=g.getCurrentScrollPosition();if(super({lazyRender:m.lazyRender,host:s,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:g,scrollByPage:m.scrollByPage}),m.horizontalHasArrows){const n=(m.arrowSize-L.ARROW_IMG_SIZE)/2,r=(m.horizontalScrollbarSize-L.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonLeft,top:r,left:n,bottom:void 0,right:void 0,bgWidth:m.arrowSize,bgHeight:m.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new _.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonRight,top:r,left:void 0,bottom:void 0,right:n,bgWidth:m.arrowSize,bgHeight:m.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new _.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((m.horizontalScrollbarSize-m.horizontalSliderSize)/2),0,void 0,m.horizontalSliderSize)}_updateSlider(g,m){this.slider.setWidth(g),this.slider.setLeft(m)}_renderDomNode(g,m){this.domNode.setWidth(g),this.domNode.setHeight(m),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(g){return this._shouldRender=this._onElementScrollSize(g.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(g.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(g.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(g,m){return g}_sliderPointerPosition(g){return g.pageX}_sliderOrthogonalPointerPosition(g){return g.pageY}_updateScrollbarSize(g){this.slider.setHeight(g)}writeScrollPosition(g,m){g.scrollLeft=m}updateOptions(g){this.updateScrollbarSize(g.horizontal===2?0:g.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(g.vertical===2?0:g.verticalScrollbarSize),this._visibilityController.setVisibility(g.horizontal),this._scrollByPage=g.scrollByPage}}e.HorizontalScrollbar=b}),define(J[557],ee([1,0,67,297,215,250,26]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class b extends k.AbstractScrollbar{constructor(g,m,s){const t=g.getScrollDimensions(),i=g.getCurrentScrollPosition();if(super({lazyRender:m.lazyRender,host:s,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:g,scrollByPage:m.scrollByPage}),m.verticalHasArrows){const n=(m.arrowSize-L.ARROW_IMG_SIZE)/2,r=(m.verticalScrollbarSize-L.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonUp,top:n,left:r,bottom:void 0,right:void 0,bgWidth:m.verticalScrollbarSize,bgHeight:m.arrowSize,onActivate:()=>this._host.onMouseWheel(new _.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonDown,top:void 0,left:r,bottom:n,right:void 0,bgWidth:m.verticalScrollbarSize,bgHeight:m.arrowSize,onActivate:()=>this._host.onMouseWheel(new _.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((m.verticalScrollbarSize-m.verticalSliderSize)/2),m.verticalSliderSize,void 0)}_updateSlider(g,m){this.slider.setHeight(g),this.slider.setTop(m)}_renderDomNode(g,m){this.domNode.setWidth(m),this.domNode.setHeight(g),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(g){return this._shouldRender=this._onElementScrollSize(g.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(g.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(g.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(g,m){return m}_sliderPointerPosition(g){return g.pageY}_sliderOrthogonalPointerPosition(g){return g.pageX}_updateScrollbarSize(g){this.slider.setWidth(g)}writeScrollPosition(g,m){g.scrollTop=m}updateOptions(g){this.updateScrollbarSize(g.vertical===2?0:g.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(g.vertical),this._scrollByPage=g.scrollByPage}}e.VerticalScrollbar=b}),define(J[79],ee([1,0,47,7,35,67,556,557,68,14,6,2,17,177,392]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const n=500,r=50,d=!0;class h{constructor(p,C,y){this.timestamp=p,this.deltaX=C,this.deltaY=y,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 p=1,C=0,y=1,E=this._rear;do{const I=E===this._front?p:Math.pow(2,-y);if(p-=I,C+=this._memory[E].score*I,E===this._front)break;E=(this._capacity+E-1)%this._capacity,y++}while(!0);return C<=.5}acceptStandardWheelEvent(p){const C=window.devicePixelRatio/(0,_.getZoomFactor)();t.isWindows||t.isLinux?this.accept(Date.now(),p.deltaX/C,p.deltaY/C):this.accept(Date.now(),p.deltaX,p.deltaY)}accept(p,C,y){const E=new h(p,C,y);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(p){if(Math.abs(p.deltaX)>0&&Math.abs(p.deltaY)>0)return 1;let C=.5;const y=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(p.deltaX)||!this._isAlmostInt(p.deltaY))&&(C+=.25),Math.min(Math.max(C,0),1)}_isAlmostInt(p){return Math.abs(Math.round(p)-p)<.01}}e.MouseWheelClassifier=o,o.INSTANCE=new o;class c extends S.Widget{get options(){return this._options}constructor(p,C,y){super(),this._onScroll=this._register(new m.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new m.Emitter),p.style.overflow="hidden",this._options=v(C),this._scrollable=y,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(p),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,L.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,L.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,L.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 g.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,s.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(p){this._verticalScrollbar.delegatePointerDown(p)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(p){this._scrollable.setScrollDimensions(p,!1)}updateClassName(p){this._options.className=p,t.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(p){typeof p.handleMouseWheel<"u"&&(this._options.handleMouseWheel=p.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof p.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=p.mouseWheelScrollSensitivity),typeof p.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=p.fastScrollSensitivity),typeof p.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=p.scrollPredominantAxis),typeof p.horizontal<"u"&&(this._options.horizontal=p.horizontal),typeof p.vertical<"u"&&(this._options.vertical=p.vertical),typeof p.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=p.horizontalScrollbarSize),typeof p.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=p.verticalScrollbarSize),typeof p.scrollByPage<"u"&&(this._options.scrollByPage=p.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(p){this._onMouseWheel(new D.StandardWheelEvent(p))}_setListeningToMouseWheel(p){if(this._mouseWheelToDispose.length>0!==p&&(this._mouseWheelToDispose=(0,s.dispose)(this._mouseWheelToDispose),p)){const y=E=>{this._onMouseWheel(new D.StandardWheelEvent(E))};this._mouseWheelToDispose.push(k.addDisposableListener(this._listenOnDomNode,k.EventType.MOUSE_WHEEL,y,{passive:!1}))}}_onMouseWheel(p){const C=o.INSTANCE;d&&C.acceptStandardWheelEvent(p);let y=!1;if(p.deltaY||p.deltaX){let I=p.deltaY*this._options.mouseWheelScrollSensitivity,T=p.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 O=!t.isMacintosh&&p.browserEvent&&p.browserEvent.shiftKey;(this._options.scrollYToX||O)&&!T&&(T=I,I=0),p.browserEvent&&p.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,P=R.scrollTop-(N<0?Math.floor(N):Math.ceil(N));this._verticalScrollbar.writeScrollPosition(M,P)}if(T){const N=r*T,P=R.scrollLeft-(N<0?Math.floor(N):Math.ceil(N));this._horizontalScrollbar.writeScrollPosition(M,P)}M=this._scrollable.validateScrollPosition(M),(R.scrollLeft!==M.scrollLeft||R.scrollTop!==M.scrollTop)&&(d&&this._options.mouseWheelSmoothScroll&&C.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(M):this._scrollable.setScrollPositionNow(M),y=!0)}let E=y;!E&&this._options.alwaysConsumeMouseWheel&&(E=!0),!E&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(E=!0),E&&(p.preventDefault(),p.stopPropagation())}_onDidScroll(p){this._shouldRender=this._horizontalScrollbar.onDidScroll(p)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(p)||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 p=this._scrollable.getCurrentScrollPosition(),C=p.scrollTop>0,y=p.scrollLeft>0,E=y?" left":"",I=C?" top":"",T=y||C?" 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(p){this._mouseIsOver=!1,this._hide()}_onMouseOver(p){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(),n)}}e.AbstractScrollableElement=c;class a extends c{constructor(p,C){C=C||{},C.mouseWheelSmoothScroll=!1;const y=new i.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>k.scheduleAtNextAnimationFrame(E)});super(p,C,y),this._register(y)}setScrollPosition(p){this._scrollable.setScrollPositionNow(p)}}e.ScrollableElement=a;class l extends c{constructor(p,C,y){super(p,C,y)}setScrollPosition(p){p.reuseAnimation?this._scrollable.setScrollPositionSmooth(p,p.reuseAnimation):this._scrollable.setScrollPositionNow(p)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=l;class u extends c{constructor(p,C){C=C||{},C.mouseWheelSmoothScroll=!1;const y=new i.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>k.scheduleAtNextAnimationFrame(E)});super(p,C,y),this._register(y),this._element=p,this.onScroll(E=>{E.scrollTopChanged&&(this._element.scrollTop=E.scrollTop),E.scrollLeftChanged&&(this._element.scrollLeft=E.scrollLeft)}),this.scanDomNode()}setScrollPosition(p){this._scrollable.setScrollPositionNow(p)}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 v(f){const p={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 p.horizontalSliderSize=typeof f.horizontalSliderSize<"u"?f.horizontalSliderSize:p.horizontalScrollbarSize,p.verticalSliderSize=typeof f.verticalSliderSize<"u"?f.verticalSliderSize:p.verticalScrollbarSize,t.isMacintosh&&(p.className+=" mac"),p}}),define(J[298],ee([1,0,7,44,79,2,385]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverAction=e.HoverWidget=void 0;const w=_.$;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 L.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=b;class S extends D.Disposable{static render(m,s,t){return new S(m,s,t)}constructor(m,s,t){super(),this.actionContainer=_.append(m,w("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=_.append(this.actionContainer,w("a.action")),this.action.setAttribute("role","button"),s.iconClass&&_.append(this.action,w(`span.icon.${s.iconClass}`));const i=_.append(this.action,w("span"));i.textContent=t?`${s.label} (${t})`:s.label,this._register(_.addDisposableListener(this.actionContainer,_.EventType.CLICK,n=>{n.stopPropagation(),n.preventDefault(),s.run(this.actionContainer)})),this._register(_.addDisposableListener(this.actionContainer,_.EventType.KEY_DOWN,n=>{const r=new k.StandardKeyboardEvent(n);(r.equals(3)||r.equals(10))&&(n.stopPropagation(),n.preventDefault(),s.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=S}),define(J[216],ee([1,0,191,7,78,57,79,16,14,101,6,2,161,177,377,553,11]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const h={CurrentDragAndDropData:void 0},o={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(p){return[p]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class c{constructor(C){this.elements=C}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=c;class a{constructor(C){this.elements=C}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=a;class l{constructor(){this.types=[],this.files=[]}update(C){if(C.types&&this.types.splice(0,this.types.length,...C.types),C.files){this.files.splice(0,this.files.length);for(let y=0;y<C.files.length;y++){const E=C.files.item(y);E&&(E.size||E.type)&&this.files.push(E)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=l;function u(p,C){return Array.isArray(p)&&Array.isArray(C)?(0,b.equals)(p,C):p===C}class v{constructor(C){C?.getSetSize?this.getSetSize=C.getSetSize.bind(C):this.getSetSize=(y,E,I)=>I,C?.getPosInSet?this.getPosInSet=C.getPosInSet.bind(C):this.getPosInSet=(y,E)=>E+1,C?.getRole?this.getRole=C.getRole.bind(C):this.getRole=y=>"listitem",C?.isChecked?this.isChecked=C.isChecked.bind(C):this.isChecked=y=>{}}}class f{get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(C){if(C!==this._horizontalScrolling){if(C&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=C,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const y of this.items)this.measureItemWidth(y);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(C,y,E,I=o){var T,O,R,M,N,P,x,F,B,V,K,A;if(this.virtualDelegate=y,this.domId=`list_id_${++f.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new S.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=s.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=s.Disposable.None,this.onDragLeaveTimeout=s.Disposable.None,this.disposables=new s.DisposableStore,this._onDidChangeContentHeight=new m.Emitter,this._onDidChangeContentWidth=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 n.RangeMap;for(const ie of E)this.renderers.set(ie.templateId,ie);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 v(I.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((O=I.transformOptimization)!==null&&O!==void 0?O: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:ie=>(0,k.scheduleAtNextAnimationFrame)(ie)}),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:(P=I.useShadows)!==null&&P!==void 0?P:o.useShadows,mouseWheelScrollSensitivity:I.mouseWheelScrollSensitivity,fastScrollSensitivity:I.fastScrollSensitivity,scrollByPage:I.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),C.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,k.addDisposableListener)(this.rowsContainer,D.EventType.Change,ie=>this.onTouchChange(ie))),this.disposables.add((0,k.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",ie=>ie.target.scrollTop=0)),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragover",ie=>this.onDragOver(this.toDragEvent(ie)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"drop",ie=>this.onDrop(this.toDragEvent(ie)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragleave",ie=>this.onDragLeave(this.toDragEvent(ie)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragend",ie=>this.onDragEnd(ie))),this.setRowLineHeight=(x=I.setRowLineHeight)!==null&&x!==void 0?x:o.setRowLineHeight,this.setRowHeight=(F=I.setRowHeight)!==null&&F!==void 0?F:o.setRowHeight,this.supportDynamicHeights=(B=I.supportDynamicHeights)!==null&&B!==void 0?B:o.supportDynamicHeights,this.dnd=(V=I.dnd)!==null&&V!==void 0?V:o.dnd,this.layout((K=I.initialSize)===null||K===void 0?void 0:K.height,(A=I.initialSize)===null||A===void 0?void 0:A.width)}updateOptions(C){C.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=C.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),C.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(C.smoothScrolling?125:0),C.horizontalScrolling!==void 0&&(this.horizontalScrolling=C.horizontalScrolling);let y;C.scrollByPage!==void 0&&(y=Object.assign(Object.assign({},y??{}),{scrollByPage:C.scrollByPage})),C.mouseWheelScrollSensitivity!==void 0&&(y=Object.assign(Object.assign({},y??{}),{mouseWheelScrollSensitivity:C.mouseWheelScrollSensitivity})),C.fastScrollSensitivity!==void 0&&(y=Object.assign(Object.assign({},y??{}),{fastScrollSensitivity:C.fastScrollSensitivity})),y&&this.scrollableElement.updateOptions(y)}splice(C,y,E=[]){if(this.splicing)throw new Error("Can\'t run recursive splices.");this.splicing=!0;try{return this._splice(C,y,E)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(C,y,E=[]){const I=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),T={start:C,end:C+y},O=t.Range.intersect(I,T),R=new Map;for(let H=O.end-1;H>=O.start;H--){const W=this.items[H];if(W.dragStartDisposable.dispose(),W.checkedDisposable.dispose(),W.row){let $=R.get(W.templateId);$||($=[],R.set(W.templateId,$));const Z=this.renderers.get(W.templateId);Z&&Z.disposeElement&&Z.disposeElement(W.element,H,W.row.templateData,W.size),$.push(W.row)}W.row=null}const M={start:C+y,end:this.items.length},N=t.Range.intersect(M,I),P=t.Range.relativeComplement(M,I),x=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:s.Disposable.None,checkedDisposable:s.Disposable.None}));let F;C===0&&y>=this.items.length?(this.rangeMap=new n.RangeMap,this.rangeMap.splice(0,0,x),F=this.items,this.items=x):(this.rangeMap.splice(C,y,x),F=this.items.splice(C,y,...x));const B=E.length-y,V=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),K=(0,n.shift)(N,B),A=t.Range.intersect(V,K);for(let H=A.start;H<A.end;H++)this.updateItemInDOM(this.items[H],H);const Y=t.Range.relativeComplement(K,V);for(const H of Y)for(let W=H.start;W<H.end;W++)this.removeItemFromDOM(W);const ie=P.map(H=>(0,n.shift)(H,B)),ne=[{start:C,end:C+E.length},...ie].map(H=>t.Range.intersect(V,H)),se=this.getNextToLastElement(ne);for(const H of ne)for(let W=H.start;W<H.end;W++){const $=this.items[W],Z=R.get($.templateId),Q=Z?.pop();this.insertItemInDOM(W,se,Q)}for(const H of R.values())for(const W of H)this.cache.release(W);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),F.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 C=0;for(const y of this.items)typeof y.width<"u"&&(C=Math.max(C,y.width));this.scrollWidth=C,this.scrollableElement.setScrollDimensions({scrollWidth:C===0?0:C+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const C of this.items)C.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 C=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),y=this.rangeMap.positionAt(C.start),E=this.rangeMap.positionAt(C.start+1);return E!==-1&&(E-y)/2+y<this.scrollTop?C.start+1:C.start}element(C){return this.items[C].element}domElement(C){const y=this.items[C].row;return y&&y.domNode}elementHeight(C){return this.items[C].size}elementTop(C){return this.rangeMap.positionAt(C)}indexAt(C){return this.rangeMap.indexAt(C)}indexAfter(C){return this.rangeMap.indexAfter(C)}layout(C,y){const E={height:typeof C=="number"?C:(0,k.getContentHeight)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,E.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(E),typeof y<"u"&&(this.renderWidth=y,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof y=="number"?y:(0,k.getContentWidth)(this.domNode)})}render(C,y,E,I,T,O=!1){const R=this.getRenderRange(y,E),M=t.Range.relativeComplement(R,C),N=t.Range.relativeComplement(C,R),P=this.getNextToLastElement(M);if(O){const x=t.Range.intersect(C,R);for(let F=x.start;F<x.end;F++)this.updateItemInDOM(this.items[F],F)}this.cache.transact(()=>{for(const x of N)for(let F=x.start;F<x.end;F++)this.removeItemFromDOM(F);for(const x of M)for(let F=x.start;F<x.end;F++)this.insertItemInDOM(F,P)}),I!==void 0&&(this.rowsContainer.style.left=`-${I}px`),this.rowsContainer.style.top=`-${y}px`,this.horizontalScrolling&&T!==void 0&&(this.rowsContainer.style.width=`${Math.max(T,this.renderWidth)}px`),this.lastRenderTop=y,this.lastRenderHeight=E}insertItemInDOM(C,y,E){const I=this.items[C];let T=!1;if(!I.row)if(E)I.row=E;else{const P=this.cache.alloc(I.templateId);I.row=P.row,T=P.isReusingConnectedDomNode}const O=this.accessibilityProvider.getRole(I.element)||"listitem";I.row.domNode.setAttribute("role",O);const R=this.accessibilityProvider.isChecked(I.element);if(typeof R=="boolean")I.row.domNode.setAttribute("aria-checked",String(!!R));else if(R){const P=x=>I.row.domNode.setAttribute("aria-checked",String(!!x));P(R.value),I.checkedDisposable=R.onDidChange(P)}(T||!I.row.domNode.parentElement)&&(y?this.rowsContainer.insertBefore(I.row.domNode,y):this.rowsContainer.appendChild(I.row.domNode)),this.updateItemInDOM(I,C);const M=this.renderers.get(I.templateId);if(!M)throw new Error(`No renderer found for template id ${I.templateId}`);M?.renderElement(I.element,C,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",P=>this.onDragStart(I.element,N,P))),this.horizontalScrolling&&(this.measureItemWidth(I),this.eventuallyUpdateScrollWidth())}measureItemWidth(C){if(!C.row||!C.row.domNode)return;C.row.domNode.style.width="fit-content",C.width=(0,k.getContentWidth)(C.row.domNode);const y=window.getComputedStyle(C.row.domNode);y.paddingLeft&&(C.width+=parseFloat(y.paddingLeft)),y.paddingRight&&(C.width+=parseFloat(y.paddingRight)),C.row.domNode.style.width=""}updateItemInDOM(C,y){C.row.domNode.style.top=`${this.elementTop(y)}px`,this.setRowHeight&&(C.row.domNode.style.height=`${C.size}px`),this.setRowLineHeight&&(C.row.domNode.style.lineHeight=`${C.size}px`),C.row.domNode.setAttribute("data-index",`${y}`),C.row.domNode.setAttribute("data-last-element",y===this.length-1?"true":"false"),C.row.domNode.setAttribute("data-parity",y%2===0?"even":"odd"),C.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(C.element,y,this.length))),C.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(C.element,y))),C.row.domNode.setAttribute("id",this.getElementDomId(y)),C.row.domNode.classList.toggle("drop-target",C.dropTarget)}removeItemFromDOM(C){const y=this.items[C];if(y.dragStartDisposable.dispose(),y.checkedDisposable.dispose(),y.row){const E=this.renderers.get(y.templateId);E&&E.disposeElement&&E.disposeElement(y.element,C,y.row.templateData,y.size),this.cache.release(y.row),y.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(C,y){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:C,reuseAnimation:y})}get scrollTop(){return this.getScrollTop()}set scrollTop(C){this.setScrollTop(C)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,"click")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseDblClick(){return m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,"dblclick")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseMiddleClick(){return m.Event.filter(m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,"auxclick")).event,C=>this.toMouseEvent(C),this.disposables),C=>C.browserEvent.button===1,this.disposables)}get onMouseDown(){return m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,"mousedown")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseOver(){return m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,"mouseover")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseOut(){return m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,"mouseout")).event,C=>this.toMouseEvent(C),this.disposables)}get onContextMenu(){return m.Event.any(m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,"contextmenu")).event,C=>this.toMouseEvent(C),this.disposables),m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,D.EventType.Contextmenu)).event,C=>this.toGestureEvent(C),this.disposables))}get onTouchStart(){return m.Event.map(this.disposables.add(new L.DomEmitter(this.domNode,"touchstart")).event,C=>this.toTouchEvent(C),this.disposables)}get onTap(){return m.Event.map(this.disposables.add(new L.DomEmitter(this.rowsContainer,D.EventType.Tap)).event,C=>this.toGestureEvent(C),this.disposables)}toMouseEvent(C){const y=this.getItemIndexFromEventTarget(C.target||null),E=typeof y>"u"?void 0:this.items[y],I=E&&E.element;return{browserEvent:C,index:y,element:I}}toTouchEvent(C){const y=this.getItemIndexFromEventTarget(C.target||null),E=typeof y>"u"?void 0:this.items[y],I=E&&E.element;return{browserEvent:C,index:y,element:I}}toGestureEvent(C){const y=this.getItemIndexFromEventTarget(C.initialTarget||null),E=typeof y>"u"?void 0:this.items[y],I=E&&E.element;return{browserEvent:C,index:y,element:I}}toDragEvent(C){const y=this.getItemIndexFromEventTarget(C.target||null),E=typeof y>"u"?void 0:this.items[y],I=E&&E.element;return{browserEvent:C,index:y,element:I}}onScroll(C){try{const y=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(y,C.scrollTop,C.height,C.scrollLeft,C.scrollWidth),this.supportDynamicHeights&&this._rerender(C.scrollTop,C.height,C.inSmoothScrolling)}catch(y){throw console.error("Got bad scroll event:",C),y}}onTouchChange(C){C.preventDefault(),C.stopPropagation(),this.scrollTop-=C.translationY}onDragStart(C,y,E){var I,T;if(!E.dataTransfer)return;const O=this.dnd.getDragElements(C);if(E.dataTransfer.effectAllowed="copyMove",E.dataTransfer.setData(_.DataTransfers.TEXT,y),E.dataTransfer.setDragImage){let R;this.dnd.getDragLabel&&(R=this.dnd.getDragLabel(O,E)),typeof R>"u"&&(R=String(O.length));const M=(0,k.$)(".monaco-drag-image");M.textContent=R;const P=(x=>{for(;x&&!x.classList.contains("monaco-workbench");)x=x.parentElement;return x||document.body})(this.domNode);P.appendChild(M),E.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>P.removeChild(M),0)}this.domNode.classList.add("dragging"),this.currentDragData=new c(O),h.CurrentDragAndDropData=new a(O),(T=(I=this.dnd).onDragStart)===null||T===void 0||T.call(I,this.currentDragData,E)}onDragOver(C){var y;if(C.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),h.CurrentDragAndDropData&&h.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(C.browserEvent),!C.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(h.CurrentDragAndDropData)this.currentDragData=h.CurrentDragAndDropData;else{if(!C.browserEvent.dataTransfer.types)return!1;this.currentDragData=new l}const E=this.dnd.onDragOver(this.currentDragData,C.element,C.index,C.browserEvent);if(this.canDrop=typeof E=="boolean"?E:E.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;C.browserEvent.dataTransfer.dropEffect=typeof E!="boolean"&&E.effect===0?"copy":"move";let I;if(typeof E!="boolean"&&E.feedback?I=E.feedback:typeof C.index>"u"?I=[-1]:I=[C.index],I=(0,b.distinct)(I).filter(T=>T>=-1&&T<this.length).sort((T,O)=>T-O),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,s.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const T of I){const O=this.items[T];O.dropTarget=!0,(y=O.row)===null||y===void 0||y.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,s.toDisposable)(()=>{var T;for(const O of I){const R=this.items[O];R.dropTarget=!1,(T=R.row)===null||T===void 0||T.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(C){var y,E;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,S.disposableTimeout)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((E=(y=this.dnd).onDragLeave)===null||E===void 0||E.call(y,this.currentDragData,C.element,C.index,C.browserEvent))}onDrop(C){if(!this.canDrop)return;const y=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,h.CurrentDragAndDropData=void 0,!(!y||!C.browserEvent.dataTransfer)&&(C.browserEvent.preventDefault(),y.update(C.browserEvent.dataTransfer),this.dnd.drop(y,C.element,C.index,C.browserEvent))}onDragEnd(C){var y,E;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,h.CurrentDragAndDropData=void 0,(E=(y=this.dnd).onDragEnd)===null||E===void 0||E.call(y,C)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=s.Disposable.None}setupDragAndDropScrollTopAnimation(C){if(!this.dragOverAnimationDisposable){const y=(0,k.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,k.animate)(this.animateDragAndDropScrollTop.bind(this,y))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,S.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=C.pageY}animateDragAndDropScrollTop(C){if(this.dragOverMouseY===void 0)return;const y=this.dragOverMouseY-C,E=this.renderHeight-35;y<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(y-35))):y>E&&(this.scrollTop+=Math.min(14,Math.floor(.3*(y-E))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(C){const y=this.scrollableElement.getDomNode();let E=C;for(;E instanceof HTMLElement&&E!==this.rowsContainer&&y.contains(E);){const I=E.getAttribute("data-index");if(I){const T=Number(I);if(!isNaN(T))return T}E=E.parentElement}}getRenderRange(C,y){return{start:this.rangeMap.indexAt(C),end:this.rangeMap.indexAfter(C+y-1)}}_rerender(C,y,E){const I=this.getRenderRange(C,y);let T,O;C===this.elementTop(I.start)?(T=I.start,O=0):I.end-I.start>1&&(T=I.start+1,O=this.elementTop(T)-C);let R=0;for(;;){const M=this.getRenderRange(C,y);let N=!1;for(let P=M.start;P<M.end;P++){const x=this.probeDynamicHeight(P);x!==0&&this.rangeMap.splice(P,1,[this.items[P]]),R+=x,N=N||x!==0}if(!N){R!==0&&this.eventuallyUpdateScrollDimensions();const P=t.Range.relativeComplement(I,M);for(const F of P)for(let B=F.start;B<F.end;B++)this.items[B].row&&this.removeItemFromDOM(B);const x=t.Range.relativeComplement(M,I);for(const F of x)for(let B=F.start;B<F.end;B++){const V=B+1,K=V<this.items.length?this.items[V].row:null,A=K?K.domNode:null;this.insertItemInDOM(B,A)}for(let F=M.start;F<M.end;F++)this.items[F].row&&this.updateItemInDOM(this.items[F],F);if(typeof T=="number"){const F=this.scrollable.getFutureScrollPosition().scrollTop-C,B=this.elementTop(T)-O+F;this.setScrollTop(B,E)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(C){var y,E,I;const T=this.items[C];if(this.virtualDelegate.getDynamicHeight){const N=this.virtualDelegate.getDynamicHeight(T.element);if(N!==null){const P=T.size;return T.size=N,T.lastDynamicHeightWidth=this.renderWidth,N-P}}if(!T.hasDynamicHeight||T.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(T.element))return 0;const O=T.size;if(T.row)return T.row.domNode.style.height="",T.size=T.row.domNode.offsetHeight,T.lastDynamicHeightWidth=this.renderWidth,T.size-O;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 d.BugIndicatingError("Missing renderer for templateId: "+T.templateId);return M.renderElement(T.element,C,R.templateData,void 0),T.size=R.domNode.offsetHeight,(y=M.disposeElement)===null||y===void 0||y.call(M,T.element,C,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-O}getNextToLastElement(C){const y=C[C.length-1];if(!y)return null;const E=this.items[y.end];return!E||!E.row?null:E.row.domNode}getElementDomId(C){return`${this.domId}_${C}`}dispose(){var C;if(this.items){for(const y of this.items)if(y.row){const E=this.renderers.get(y.row.templateId);E&&((C=E.disposeElement)===null||C===void 0||C.call(E,y.element,-1,y.row.templateData,void 0),E.disposeTemplate(y.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,s.dispose)(this.disposables)}}e.ListView=f,f.InstanceCount=0,Te([g.memoize],f.prototype,"onMouseClick",null),Te([g.memoize],f.prototype,"onMouseDblClick",null),Te([g.memoize],f.prototype,"onMouseMiddleClick",null),Te([g.memoize],f.prototype,"onMouseDown",null),Te([g.memoize],f.prototype,"onMouseOver",null),Te([g.memoize],f.prototype,"onMouseOut",null),Te([g.memoize],f.prototype,"onContextMenu",null),Te([g.memoize],f.prototype,"onTouchStart",null),Te([g.memoize],f.prototype,"onTap",null)}),define(J[109],ee([1,0,7,78,44,57,48,368,16,14,36,101,6,64,2,135,17,18,367,216,258]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c){"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(W){this.trait=W,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(W){return W}renderElement(W,$,Z){const Q=this.renderedElements.findIndex(re=>re.templateData===Z);if(Q>=0){const re=this.renderedElements[Q];this.trait.unrender(Z),re.index=$}else{const re={index:$,templateData:Z};this.renderedElements.push(re)}this.trait.renderIndex($,Z)}splice(W,$,Z){const Q=[];for(const re of this.renderedElements)re.index<W?Q.push(re):re.index>=W+$&&Q.push({index:re.index+Z-$,templateData:re.templateData});this.renderedElements=Q}renderIndexes(W){for(const{index:$,templateData:Z}of this.renderedElements)W.indexOf($)>-1&&this.trait.renderIndex($,Z)}disposeTemplate(W){const $=this.renderedElements.findIndex(Z=>Z.templateData===W);$<0||this.renderedElements.splice($,1)}}class l{get name(){return this._trait}get renderer(){return new a(this)}constructor(W){this._trait=W,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new t.Emitter,this.onChange=this._onChange.event}splice(W,$,Z){var Q;$=Math.max(0,Math.min($,this.length-W));const re=Z.length-$,ce=W+$,he=[...this.sortedIndexes.filter(ue=>ue<W),...Z.map((ue,q)=>ue?q+W:-1).filter(ue=>ue!==-1),...this.sortedIndexes.filter(ue=>ue>=ce).map(ue=>ue+re)],de=this.length+re;if(this.sortedIndexes.length>0&&he.length===0&&de>0){const ue=(Q=this.sortedIndexes.find(q=>q>=W))!==null&&Q!==void 0?Q:de-1;he.push(Math.min(ue,de-1))}this.renderer.splice(W,$,Z.length),this._set(he,he),this.length=de}renderIndex(W,$){$.classList.toggle(this._trait,this.contains(W))}unrender(W){W.classList.remove(this._trait)}set(W,$){return this._set(W,[...W].sort(Y),$)}_set(W,$,Z){const Q=this.indexes,re=this.sortedIndexes;this.indexes=W,this.sortedIndexes=$;const ce=K(re,W);return this.renderer.renderIndexes(ce),this._onChange.fire({indexes:W,browserEvent:Z}),Q}get(){return this.indexes}contains(W){return(0,S.binarySearch)(this.sortedIndexes,W,Y)>=0}dispose(){(0,n.dispose)(this._onChange)}}Te([s.memoize],l.prototype,"renderer",null);class u extends l{constructor(W){super("selected"),this.setAriaSelected=W}renderIndex(W,$){super.renderIndex(W,$),this.setAriaSelected&&(this.contains(W)?$.setAttribute("aria-selected","true"):$.setAttribute("aria-selected","false"))}}class v{constructor(W,$,Z){this.trait=W,this.view=$,this.identityProvider=Z}splice(W,$,Z){if(!this.identityProvider)return this.trait.splice(W,$,Z.map(()=>!1));const Q=this.trait.get().map(ce=>this.identityProvider.getId(this.view.element(ce)).toString()),re=Z.map(ce=>Q.indexOf(this.identityProvider.getId(ce).toString())>-1);this.trait.splice(W,$,re)}}function f(H){return H.tagName==="INPUT"||H.tagName==="TEXTAREA"}e.isInputElement=f;function p(H){return H.classList.contains("monaco-editor")?!0:H.classList.contains("monaco-list")||!H.parentElement?!1:p(H.parentElement)}e.isMonacoEditor=p;function C(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:C(H.parentElement)}e.isButton=C;class y{get onKeyDown(){return this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event).filter(W=>!f(W.target)).map(W=>new L.StandardKeyboardEvent(W)))}constructor(W,$,Z){this.list=W,this.view=$,this.disposables=new n.DisposableStore,this.multipleSelectionDisposables=new n.DisposableStore,this.onKeyDown.filter(Q=>Q.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(Q=>Q.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(Q=>Q.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(Q=>Q.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(Q=>Q.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(Q=>Q.keyCode===9).on(this.onEscape,this,this.disposables),Z.multipleSelectionSupport!==!1&&this.onKeyDown.filter(Q=>(d.isMacintosh?Q.metaKey:Q.ctrlKey)&&Q.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}updateOptions(W){W.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),W.multipleSelectionSupport&&this.onKeyDown.filter($=>(d.isMacintosh?$.metaKey:$.ctrlKey)&&$.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(W){W.preventDefault(),W.stopPropagation(),this.list.setSelection(this.list.getFocus(),W.browserEvent)}onUpArrow(W){W.preventDefault(),W.stopPropagation(),this.list.focusPrevious(1,!1,W.browserEvent);const $=this.list.getFocus()[0];this.list.setAnchor($),this.list.reveal($),this.view.domNode.focus()}onDownArrow(W){W.preventDefault(),W.stopPropagation(),this.list.focusNext(1,!1,W.browserEvent);const $=this.list.getFocus()[0];this.list.setAnchor($),this.list.reveal($),this.view.domNode.focus()}onPageUpArrow(W){W.preventDefault(),W.stopPropagation(),this.list.focusPreviousPage(W.browserEvent);const $=this.list.getFocus()[0];this.list.setAnchor($),this.list.reveal($),this.view.domNode.focus()}onPageDownArrow(W){W.preventDefault(),W.stopPropagation(),this.list.focusNextPage(W.browserEvent);const $=this.list.getFocus()[0];this.list.setAnchor($),this.list.reveal($),this.view.domNode.focus()}onCtrlA(W){W.preventDefault(),W.stopPropagation(),this.list.setSelection((0,S.range)(this.list.length),W.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(W){this.list.getSelection().length&&(W.preventDefault(),W.stopPropagation(),this.list.setSelection([],W.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Te([s.memoize],y.prototype,"onKeyDown",null);var E;(function(H){H[H.Automatic=0]="Automatic",H[H.Trigger=1]="Trigger"})(E||(e.TypeNavigationMode=E={}));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>=98&&H.keyCode<=107||H.keyCode>=85&&H.keyCode<=95}};class T{constructor(W,$,Z,Q,re){this.list=W,this.view=$,this.keyboardNavigationLabelProvider=Z,this.keyboardNavigationEventFilter=Q,this.delegate=re,this.enabled=!1,this.state=I.Idle,this.mode=E.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new n.DisposableStore,this.disposables=new n.DisposableStore,this.updateOptions(W.options)}updateOptions(W){var $,Z;!(($=W.typeNavigationEnabled)!==null&&$!==void 0)||$?this.enable():this.disable(),this.mode=(Z=W.typeNavigationMode)!==null&&Z!==void 0?Z:E.Automatic}enable(){if(this.enabled)return;let W=!1;const $=this.enabledDisposables.add(t.Event.chain(this.enabledDisposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event)).filter(re=>!f(re.target)).filter(()=>this.mode===E.Automatic||this.triggered).map(re=>new L.StandardKeyboardEvent(re)).filter(re=>W||this.keyboardNavigationEventFilter(re)).filter(re=>this.delegate.mightProducePrintableCharacter(re)).forEach(re=>_.EventHelper.stop(re,!0)).map(re=>re.browserEvent.key).event,Z=t.Event.debounce($,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);t.Event.reduce(t.Event.any($,Z),(re,ce)=>ce===null?null:(re||"")+ce,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),Z(this.onClear,this,this.enabledDisposables),$(()=>W=!0,void 0,this.enabledDisposables),Z(()=>W=!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 W;const $=this.list.getFocus();if($.length>0&&$[0]===this.previouslyFocused){const Z=(W=this.list.options.accessibilityProvider)===null||W===void 0?void 0:W.getAriaLabel(this.list.element($[0]));Z&&(0,w.alert)(Z)}this.previouslyFocused=-1}onInput(W){if(!W){this.state=I.Idle,this.triggered=!1;return}const $=this.list.getFocus(),Z=$.length>0?$[0]:0,Q=this.state===I.Idle?1:0;this.state=I.Typing;for(let re=0;re<this.list.length;re++){const ce=(Z+re+Q)%this.list.length,he=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(ce)),de=he&&he.toString();if(typeof de>"u"||(0,i.matchesPrefix)(W,de)){this.previouslyFocused=Z,this.list.setFocus([ce]),this.list.reveal(ce);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class O{constructor(W,$){this.list=W,this.view=$,this.disposables=new n.DisposableStore,this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter($.domNode,"keydown")).event)).filter(Q=>!f(Q.target)).map(Q=>new L.StandardKeyboardEvent(Q)).filter(Q=>Q.keyCode===2&&!Q.ctrlKey&&!Q.metaKey&&!Q.shiftKey&&!Q.altKey).on(this.onTab,this,this.disposables)}onTab(W){if(W.target!==this.view.domNode)return;const $=this.list.getFocus();if($.length===0)return;const Z=this.view.domElement($[0]);if(!Z)return;const Q=Z.querySelector("[tabIndex]");if(!Q||!(Q instanceof HTMLElement)||Q.tabIndex===-1)return;const re=window.getComputedStyle(Q);re.visibility==="hidden"||re.display==="none"||(W.preventDefault(),W.stopPropagation(),Q.focus())}dispose(){this.disposables.dispose()}}function R(H){return d.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 P={isSelectionSingleChangeEvent:R,isSelectionRangeChangeEvent:M};class x{constructor(W){this.list=W,this.disposables=new n.DisposableStore,this._onPointer=new t.Emitter,this.onPointer=this._onPointer.event,W.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||P),this.mouseSupport=typeof W.options.mouseSupport>"u"||!!W.options.mouseSupport,this.mouseSupport&&(W.onMouseDown(this.onMouseDown,this,this.disposables),W.onContextMenu(this.onContextMenu,this,this.disposables),W.onMouseDblClick(this.onDoubleClick,this,this.disposables),W.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(D.Gesture.addTarget(W.getHTMLElement()))),t.Event.any(W.onMouseClick,W.onMouseMiddleClick,W.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(W){W.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,W.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||P))}isSelectionSingleChangeEvent(W){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(W):!1}isSelectionRangeChangeEvent(W){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(W):!1}isSelectionChangeEvent(W){return this.isSelectionSingleChangeEvent(W)||this.isSelectionRangeChangeEvent(W)}onMouseDown(W){p(W.browserEvent.target)||document.activeElement!==W.browserEvent.target&&this.list.domFocus()}onContextMenu(W){if(f(W.browserEvent.target)||p(W.browserEvent.target))return;const $=typeof W.index>"u"?[]:[W.index];this.list.setFocus($,W.browserEvent)}onViewPointer(W){if(!this.mouseSupport||f(W.browserEvent.target)||p(W.browserEvent.target)||W.browserEvent.isHandledByList)return;W.browserEvent.isHandledByList=!0;const $=W.index;if(typeof $>"u"){this.list.setFocus([],W.browserEvent),this.list.setSelection([],W.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(W))return this.changeSelection(W);if(this.isSelectionChangeEvent(W))return this.changeSelection(W);this.list.setFocus([$],W.browserEvent),this.list.setAnchor($),N(W.browserEvent)||this.list.setSelection([$],W.browserEvent),this._onPointer.fire(W)}onDoubleClick(W){if(f(W.browserEvent.target)||p(W.browserEvent.target)||this.isSelectionChangeEvent(W)||W.browserEvent.isHandledByList)return;W.browserEvent.isHandledByList=!0;const $=this.list.getFocus();this.list.setSelection($,W.browserEvent)}changeSelection(W){const $=W.index;let Z=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(W)){if(typeof Z>"u"){const q=this.list.getFocus()[0];Z=q??$,this.list.setAnchor(Z)}const Q=Math.min(Z,$),re=Math.max(Z,$),ce=(0,S.range)(Q,re+1),he=this.list.getSelection(),de=V(K(he,[Z]),Z);if(de.length===0)return;const ue=K(ce,A(he,de));this.list.setSelection(ue,W.browserEvent),this.list.setFocus([$],W.browserEvent)}else if(this.isSelectionSingleChangeEvent(W)){const Q=this.list.getSelection(),re=Q.filter(ce=>ce!==$);this.list.setFocus([$]),this.list.setAnchor($),Q.length===re.length?this.list.setSelection([...re,$],W.browserEvent):this.list.setSelection(re,W.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=x;class F{constructor(W,$){this.styleElement=W,this.selectorSuffix=$}style(W){var $,Z;const Q=this.selectorSuffix&&`.${this.selectorSuffix}`,re=[];W.listBackground&&re.push(`.monaco-list${Q} .monaco-list-rows { background: ${W.listBackground}; }`),W.listFocusBackground&&(re.push(`.monaco-list${Q}:focus .monaco-list-row.focused { background-color: ${W.listFocusBackground}; }`),re.push(`.monaco-list${Q}:focus .monaco-list-row.focused:hover { background-color: ${W.listFocusBackground}; }`)),W.listFocusForeground&&re.push(`.monaco-list${Q}:focus .monaco-list-row.focused { color: ${W.listFocusForeground}; }`),W.listActiveSelectionBackground&&(re.push(`.monaco-list${Q}:focus .monaco-list-row.selected { background-color: ${W.listActiveSelectionBackground}; }`),re.push(`.monaco-list${Q}:focus .monaco-list-row.selected:hover { background-color: ${W.listActiveSelectionBackground}; }`)),W.listActiveSelectionForeground&&re.push(`.monaco-list${Q}:focus .monaco-list-row.selected { color: ${W.listActiveSelectionForeground}; }`),W.listActiveSelectionIconForeground&&re.push(`.monaco-list${Q}:focus .monaco-list-row.selected .codicon { color: ${W.listActiveSelectionIconForeground}; }`),W.listFocusAndSelectionBackground&&re.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${Q}:focus .monaco-list-row.selected.focused { background-color: ${W.listFocusAndSelectionBackground}; }\n\t\t\t`),W.listFocusAndSelectionForeground&&re.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${Q}:focus .monaco-list-row.selected.focused { color: ${W.listFocusAndSelectionForeground}; }\n\t\t\t`),W.listInactiveFocusForeground&&(re.push(`.monaco-list${Q} .monaco-list-row.focused { color: ${W.listInactiveFocusForeground}; }`),re.push(`.monaco-list${Q} .monaco-list-row.focused:hover { color: ${W.listInactiveFocusForeground}; }`)),W.listInactiveSelectionIconForeground&&re.push(`.monaco-list${Q} .monaco-list-row.focused .codicon { color: ${W.listInactiveSelectionIconForeground}; }`),W.listInactiveFocusBackground&&(re.push(`.monaco-list${Q} .monaco-list-row.focused { background-color: ${W.listInactiveFocusBackground}; }`),re.push(`.monaco-list${Q} .monaco-list-row.focused:hover { background-color: ${W.listInactiveFocusBackground}; }`)),W.listInactiveSelectionBackground&&(re.push(`.monaco-list${Q} .monaco-list-row.selected { background-color: ${W.listInactiveSelectionBackground}; }`),re.push(`.monaco-list${Q} .monaco-list-row.selected:hover { background-color: ${W.listInactiveSelectionBackground}; }`)),W.listInactiveSelectionForeground&&re.push(`.monaco-list${Q} .monaco-list-row.selected { color: ${W.listInactiveSelectionForeground}; }`),W.listHoverBackground&&re.push(`.monaco-list${Q}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${W.listHoverBackground}; }`),W.listHoverForeground&&re.push(`.monaco-list${Q}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${W.listHoverForeground}; }`);const ce=(0,_.asCssValueWithDefault)(W.listFocusAndSelectionOutline,(0,_.asCssValueWithDefault)(W.listSelectionOutline,($=W.listFocusOutline)!==null&&$!==void 0?$:""));ce&&re.push(`.monaco-list${Q}:focus .monaco-list-row.focused.selected { outline: 1px solid ${ce}; outline-offset: -1px;}`),W.listFocusOutline&&re.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${Q}:focus .monaco-list-row.focused { outline: 1px solid ${W.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${Q}.last-focused .monaco-list-row.focused { outline: 1px solid ${W.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const he=(0,_.asCssValueWithDefault)(W.listSelectionOutline,(Z=W.listInactiveFocusOutline)!==null&&Z!==void 0?Z:"");he&&re.push(`.monaco-list${Q} .monaco-list-row.focused.selected { outline: 1px dotted ${he}; outline-offset: -1px; }`),W.listSelectionOutline&&re.push(`.monaco-list${Q} .monaco-list-row.selected { outline: 1px dotted ${W.listSelectionOutline}; outline-offset: -1px; }`),W.listInactiveFocusOutline&&re.push(`.monaco-list${Q} .monaco-list-row.focused { outline: 1px dotted ${W.listInactiveFocusOutline}; outline-offset: -1px; }`),W.listHoverOutline&&re.push(`.monaco-list${Q} .monaco-list-row:hover { outline: 1px dashed ${W.listHoverOutline}; outline-offset: -1px; }`),W.listDropBackground&&re.push(`\n\t\t\t\t.monaco-list${Q}.drop-target,\n\t\t\t\t.monaco-list${Q} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${Q} .monaco-list-row.drop-target { background-color: ${W.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),W.tableColumnsBorder&&re.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: ${W.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`),W.tableOddRowsBackgroundColor&&re.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: ${W.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=re.join(`\n`)}}e.DefaultStyleController=F,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 B={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function V(H,W){const $=H.indexOf(W);if($===-1)return[];const Z=[];let Q=$-1;for(;Q>=0&&H[Q]===W-($-Q);)Z.push(H[Q--]);for(Z.reverse(),Q=$;Q<H.length&&H[Q]===W+(Q-$);)Z.push(H[Q++]);return Z}function K(H,W){const $=[];let Z=0,Q=0;for(;Z<H.length||Q<W.length;)if(Z>=H.length)$.push(W[Q++]);else if(Q>=W.length)$.push(H[Z++]);else if(H[Z]===W[Q]){$.push(H[Z]),Z++,Q++;continue}else H[Z]<W[Q]?$.push(H[Z++]):$.push(W[Q++]);return $}function A(H,W){const $=[];let Z=0,Q=0;for(;Z<H.length||Q<W.length;)if(Z>=H.length)$.push(W[Q++]);else if(Q>=W.length)$.push(H[Z++]);else if(H[Z]===W[Q]){Z++,Q++;continue}else H[Z]<W[Q]?$.push(H[Z++]):Q++;return $}const Y=(H,W)=>H-W;class ie{constructor(W,$){this._templateId=W,this.renderers=$}get templateId(){return this._templateId}renderTemplate(W){return this.renderers.map($=>$.renderTemplate(W))}renderElement(W,$,Z,Q){let re=0;for(const ce of this.renderers)ce.renderElement(W,$,Z[re++],Q)}disposeElement(W,$,Z,Q){var re;let ce=0;for(const he of this.renderers)(re=he.disposeElement)===null||re===void 0||re.call(he,W,$,Z[ce],Q),ce+=1}disposeTemplate(W){let $=0;for(const Z of this.renderers)Z.disposeTemplate(W[$++])}}class le{constructor(W){this.accessibilityProvider=W,this.templateId="a18n"}renderTemplate(W){return W}renderElement(W,$,Z){const Q=this.accessibilityProvider.getAriaLabel(W);Q?Z.setAttribute("aria-label",Q):Z.removeAttribute("aria-label");const re=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(W);typeof re=="number"?Z.setAttribute("aria-level",`${re}`):Z.removeAttribute("aria-level")}disposeTemplate(W){}}class ne{constructor(W,$){this.list=W,this.dnd=$}getDragElements(W){const $=this.list.getSelectedElements();return $.indexOf(W)>-1?$:[W]}getDragURI(W){return this.dnd.getDragURI(W)}getDragLabel(W,$){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(W,$)}onDragStart(W,$){var Z,Q;(Q=(Z=this.dnd).onDragStart)===null||Q===void 0||Q.call(Z,W,$)}onDragOver(W,$,Z,Q){return this.dnd.onDragOver(W,$,Z,Q)}onDragLeave(W,$,Z,Q){var re,ce;(ce=(re=this.dnd).onDragLeave)===null||ce===void 0||ce.call(re,W,$,Z,Q)}onDragEnd(W){var $,Z;(Z=($=this.dnd).onDragEnd)===null||Z===void 0||Z.call($,W)}drop(W,$,Z,Q){this.dnd.drop(W,$,Z,Q)}}class se{get onDidChangeFocus(){return t.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),W=>this.toListEvent(W),this.disposables)}get onDidChangeSelection(){return t.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),W=>this.toListEvent(W),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 W=!1;const $=this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event)).map(re=>new L.StandardKeyboardEvent(re)).filter(re=>W=re.keyCode===58||re.shiftKey&&re.keyCode===68).map(re=>_.EventHelper.stop(re,!0)).filter(()=>!1).event,Z=this.disposables.add(t.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keyup")).event)).forEach(()=>W=!1).map(re=>new L.StandardKeyboardEvent(re)).filter(re=>re.keyCode===58||re.shiftKey&&re.keyCode===68).map(re=>_.EventHelper.stop(re,!0)).map(({browserEvent:re})=>{const ce=this.getFocus(),he=ce.length?ce[0]:void 0,de=typeof he<"u"?this.view.element(he):void 0,ue=typeof he<"u"?this.view.domElement(he):this.view.domNode;return{index:he,element:de,anchor:ue,browserEvent:re}}).event,Q=this.disposables.add(t.Event.chain(this.view.onContextMenu)).filter(re=>!W).map(({element:re,index:ce,browserEvent:he})=>({element:re,index:ce,anchor:{x:he.pageX+1,y:he.pageY},browserEvent:he})).event;return t.Event.any($,Z,Q)}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(W,$,Z,Q,re=B){var ce,he,de,ue;this.user=W,this._options=re,this.focus=new l("focused"),this.anchor=new l("anchor"),this.eventBufferer=new t.EventBufferer,this._ariaLabel="",this.disposables=new n.DisposableStore,this._onDidDispose=new t.Emitter,this.onDidDispose=this._onDidDispose.event;const q=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(ce=this._options.accessibilityProvider)===null||ce===void 0?void 0:ce.getWidgetRole():"list";this.selection=new u(q!=="listbox");const z=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=re.accessibilityProvider,this.accessibilityProvider&&(z.push(new le(this.accessibilityProvider)),(de=(he=this.accessibilityProvider).onDidChangeActiveDescendant)===null||de===void 0||de.call(he,this.onDidChangeActiveDescendant,this,this.disposables)),Q=Q.map(X=>new ie(X.templateId,[...z,X]));const U=Object.assign(Object.assign({},re),{dnd:re.dnd&&new ne(this,re.dnd)});if(this.view=this.createListView($,Z,Q,U),this.view.domNode.setAttribute("role",q),re.styleController)this.styleController=re.styleController(this.view.domId);else{const X=(0,_.createStyleSheet)(this.view.domNode);this.styleController=new F(X,this.view.domId)}if(this.spliceable=new b.CombinedSpliceable([new v(this.focus,this.view,re.identityProvider),new v(this.selection,this.view,re.identityProvider),new v(this.anchor,this.view,re.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 O(this,this.view)),(typeof re.keyboardSupport!="boolean"||re.keyboardSupport)&&(this.keyboardController=new y(this,this.view,re),this.disposables.add(this.keyboardController)),re.keyboardNavigationLabelProvider){const X=re.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeNavigationController=new T(this,this.view,re.keyboardNavigationLabelProvider,(ue=re.keyboardNavigationEventFilter)!==null&&ue!==void 0?ue:()=>!0,X),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(re),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(W,$,Z,Q){return new c.ListView(W,$,Z,Q)}createMouseController(W){return new x(this)}updateOptions(W={}){var $,Z;this._options=Object.assign(Object.assign({},this._options),W),($=this.typeNavigationController)===null||$===void 0||$.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(W),(Z=this.keyboardController)===null||Z===void 0||Z.updateOptions(W),this.view.updateOptions(W)}get options(){return this._options}splice(W,$,Z=[]){if(W<0||W>this.view.length)throw new o.ListError(this.user,`Invalid start index: ${W}`);if($<0)throw new o.ListError(this.user,`Invalid delete count: ${$}`);$===0&&Z.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(W,$,Z))}rerender(){this.view.rerender()}element(W){return this.view.element(W)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(W){this.view.setScrollTop(W)}get scrollHeight(){return this.view.scrollHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(W){this._ariaLabel=W,this.view.domNode.setAttribute("aria-label",W)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(W,$){this.view.layout(W,$)}setSelection(W,$){for(const Z of W)if(Z<0||Z>=this.length)throw new o.ListError(this.user,`Invalid index ${Z}`);this.selection.set(W,$)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(W=>this.view.element(W))}setAnchor(W){if(typeof W>"u"){this.anchor.set([]);return}if(W<0||W>=this.length)throw new o.ListError(this.user,`Invalid index ${W}`);this.anchor.set([W])}getAnchor(){return(0,S.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const W=this.getAnchor();return typeof W>"u"?void 0:this.element(W)}setFocus(W,$){for(const Z of W)if(Z<0||Z>=this.length)throw new o.ListError(this.user,`Invalid index ${Z}`);this.focus.set(W,$)}focusNext(W=1,$=!1,Z,Q){if(this.length===0)return;const re=this.focus.get(),ce=this.findNextIndex(re.length>0?re[0]+W:0,$,Q);ce>-1&&this.setFocus([ce],Z)}focusPrevious(W=1,$=!1,Z,Q){if(this.length===0)return;const re=this.focus.get(),ce=this.findPreviousIndex(re.length>0?re[0]-W:0,$,Q);ce>-1&&this.setFocus([ce],Z)}focusNextPage(W,$){return we(this,void 0,void 0,function*(){let Z=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);Z=Z===0?0:Z-1;const Q=this.getFocus()[0];if(Q!==Z&&(Q===void 0||Z>Q)){const re=this.findPreviousIndex(Z,!1,$);re>-1&&Q!==re?this.setFocus([re],W):this.setFocus([Z],W)}else{const re=this.view.getScrollTop();let ce=re+this.view.renderHeight;Z>Q&&(ce-=this.view.elementHeight(Z)),this.view.setScrollTop(ce),this.view.getScrollTop()!==re&&(this.setFocus([]),yield(0,g.timeout)(0),yield this.focusNextPage(W,$))}})}focusPreviousPage(W,$){return we(this,void 0,void 0,function*(){let Z;const Q=this.view.getScrollTop();Q===0?Z=this.view.indexAt(Q):Z=this.view.indexAfter(Q-1);const re=this.getFocus()[0];if(re!==Z&&(re===void 0||re>=Z)){const ce=this.findNextIndex(Z,!1,$);ce>-1&&re!==ce?this.setFocus([ce],W):this.setFocus([Z],W)}else{const ce=Q;this.view.setScrollTop(Q-this.view.renderHeight),this.view.getScrollTop()!==ce&&(this.setFocus([]),yield(0,g.timeout)(0),yield this.focusPreviousPage(W,$))}})}focusLast(W,$){if(this.length===0)return;const Z=this.findPreviousIndex(this.length-1,!1,$);Z>-1&&this.setFocus([Z],W)}focusFirst(W,$){this.focusNth(0,W,$)}focusNth(W,$,Z){if(this.length===0)return;const Q=this.findNextIndex(W,!1,Z);Q>-1&&this.setFocus([Q],$)}findNextIndex(W,$=!1,Z){for(let Q=0;Q<this.length;Q++){if(W>=this.length&&!$)return-1;if(W=W%this.length,!Z||Z(this.element(W)))return W;W++}return-1}findPreviousIndex(W,$=!1,Z){for(let Q=0;Q<this.length;Q++){if(W<0&&!$)return-1;if(W=(this.length+W%this.length)%this.length,!Z||Z(this.element(W)))return W;W--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(W=>this.view.element(W))}reveal(W,$){if(W<0||W>=this.length)throw new o.ListError(this.user,`Invalid index ${W}`);const Z=this.view.getScrollTop(),Q=this.view.elementTop(W),re=this.view.elementHeight(W);if((0,h.isNumber)($)){const ce=re-this.view.renderHeight;this.view.setScrollTop(ce*(0,r.clamp)($,0,1)+Q)}else{const ce=Q+re,he=Z+this.view.renderHeight;Q<Z&&ce>=he||(Q<Z||ce>=he&&re>=this.view.renderHeight?this.view.setScrollTop(Q):ce>=he&&this.view.setScrollTop(ce-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(W){return this.view.getElementDomId(W)}style(W){this.styleController.style(W)}toListEvent({indexes:W,browserEvent:$}){return{indexes:W,elements:W.map(Z=>this.view.element(Z)),browserEvent:$}}_onFocusChange(){const W=this.focus.get();this.view.domNode.classList.toggle("element-focused",W.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var W;const $=this.focus.get();if($.length>0){let Z;!((W=this.accessibilityProvider)===null||W===void 0)&&W.getActiveDescendantId&&(Z=this.accessibilityProvider.getActiveDescendantId(this.view.element($[0]))),this.view.domNode.setAttribute("aria-activedescendant",Z||this.view.getElementDomId($[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const W=this.selection.get();this.view.domNode.classList.toggle("selection-none",W.length===0),this.view.domNode.classList.toggle("selection-single",W.length===1),this.view.domNode.classList.toggle("selection-multiple",W.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}e.List=se,Te([s.memoize],se.prototype,"onDidChangeFocus",null),Te([s.memoize],se.prototype,"onDidChangeSelection",null),Te([s.memoize],se.prototype,"onContextMenu",null),Te([s.memoize],se.prototype,"onKeyDown",null),Te([s.memoize],se.prototype,"onDidFocus",null)}),define(J[558],ee([1,0,16,20,6,2,109,258]),function(j,e,_,k,L,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,n,r){var d;if((d=n.disposable)===null||d===void 0||d.dispose(),!n.data)return;const h=this.modelProvider();if(h.isResolved(t))return this.renderer.renderElement(h.get(t),t,n.data,r);const o=new k.CancellationTokenSource,c=h.resolve(t,o.token);n.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(t,n.data),c.then(a=>this.renderer.renderElement(a,t,n.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 S{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 g(s,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new S(s,t.accessibilityProvider)})}class m{constructor(t,i,n,r,d={}){const h=()=>this.model,o=r.map(c=>new b(c,h));this.list=new w.List(t,i,n,o,g(h,d))}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 L.Event.map(this.list.onMouseDblClick,({element:t,index:i,browserEvent:n})=>({element:t===void 0?void 0:this._model.get(t),index:i,browserEvent:n}))}get onPointer(){return L.Event.map(this.list.onPointer,({element:t,index:i,browserEvent:n})=>({element:t===void 0?void 0:this._model.get(t),index:i,browserEvent:n}))}get onDidChangeSelection(){return L.Event.map(this.list.onDidChangeSelection,({elements:t,indexes:i,browserEvent:n})=>({elements:t.map(r=>this._model.get(r)),indexes:i,browserEvent:n}))}get model(){return this._model}set model(t){this._model=t,this.list.splice(0,this.list.length,(0,_.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[299],ee([1,0,7,78,148,79,16,36,6,2,135,177,18,395]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const i={separatorBorder:b.Color.transparent};class n{set size(l){this._size=l}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(l,u){var v,f;l!==this.visible&&(l?(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",l),(f=(v=this.view).setVisible)===null||f===void 0||f.call(v,l))}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 l;return(l=this.view.proportionalLayout)!==null&&l!==void 0?l:!0}get snap(){return!!this.view.snap}set enabled(l){this.container.style.pointerEvents=l?"":"none"}constructor(l,u,v,f){this.container=l,this.view=u,this.disposable=f,this._cachedVisibleSize=void 0,typeof v=="number"?(this._size=v,this._cachedVisibleSize=void 0,l.classList.add("visible")):(this._size=0,this._cachedVisibleSize=v.cachedVisibleSize)}layout(l,u){this.layoutContainer(l),this.view.layout(this.size,l,u)}dispose(){return this.disposable.dispose(),this.view}}class r extends n{layoutContainer(l){this.container.style.top=`${l}px`,this.container.style.height=`${this.size}px`}}class d extends n{layoutContainer(l){this.container.style.left=`${l}px`,this.container.style.width=`${this.size}px`}}var h;(function(a){a[a.Idle=0]="Idle",a[a.Busy=1]="Busy"})(h||(h={}));var o;(function(a){a.Distribute={type:"distribute"};function l(v){return{type:"split",index:v}}a.Split=l;function u(v){return{type:"invisible",cachedVisibleSize:v}}a.Invisible=u})(o||(e.Sizing=o={}));class c extends g.Disposable{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(l){for(const u of this.sashItems)u.sash.orthogonalStartSash=l;this._orthogonalStartSash=l}set orthogonalEndSash(l){for(const u of this.sashItems)u.sash.orthogonalEndSash=l;this._orthogonalEndSash=l}set startSnappingEnabled(l){this._startSnappingEnabled!==l&&(this._startSnappingEnabled=l,this.updateSashEnablement())}set endSnappingEnabled(l){this._endSnappingEnabled!==l&&(this._endSnappingEnabled=l,this.updateSashEnablement())}constructor(l,u={}){var v,f,p,C,y;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=h.Idle,this._onDidSashChange=this._register(new S.Emitter),this._onDidSashReset=this._register(new S.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(v=u.orientation)!==null&&v!==void 0?v:0,this.inverseAltBehavior=(f=u.inverseAltBehavior)!==null&&f!==void 0?f:!1,this.proportionalLayout=(p=u.proportionalLayout)!==null&&p!==void 0?p:!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"),l.appendChild(this.el),this.sashContainer=(0,_.append)(this.el,(0,_.$)(".sash-container")),this.viewContainer=(0,_.$)(".split-view-container"),this.scrollable=new s.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:_.scheduleAtNextAnimationFrame}),this.scrollableElement=this._register(new D.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(C=u.scrollbarVisibility)!==null&&C!==void 0?C:1:2,horizontal:this.orientation===1?(y=u.scrollbarVisibility)!==null&&y!==void 0?y:1:2},this.scrollable));const E=this._register(new k.DomEmitter(this.viewContainer,"scroll")).event;this._register(E(I=>{const T=this.scrollableElement.getScrollPosition(),O=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;(O!==void 0||R!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:O,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,_.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 O=t.isUndefined(I.visible)||I.visible?I.size:{type:"invisible",cachedVisibleSize:I.size},R=I.view;this.doAddView(R,O,T,!0)}),this.contentSize=this.viewItems.reduce((I,T)=>I+T.size,0),this.saveProportions())}style(l){l.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",l.separatorBorder.toString()))}addView(l,u,v=this.viewItems.length,f){this.doAddView(l,u,v,f)}layout(l,u){const v=Math.max(this.size,this.contentSize);if(this.size=l,this.layoutContext=u,this.proportions){let f=0;for(let p=0;p<this.viewItems.length;p++){const C=this.viewItems[p],y=this.proportions[p];typeof y=="number"?f+=y:l-=C.size}for(let p=0;p<this.viewItems.length;p++){const C=this.viewItems[p],y=this.proportions[p];typeof y=="number"&&(C.size=(0,m.clamp)(Math.round(y*l/f),C.minimumSize,C.maximumSize))}}else{const f=(0,w.range)(this.viewItems.length),p=f.filter(y=>this.viewItems[y].priority===1),C=f.filter(y=>this.viewItems[y].priority===2);this.resize(this.viewItems.length-1,l-v,void 0,p,C)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(l=>l.proportionalLayout?l.size/this.contentSize:void 0))}onSashStart({sash:l,start:u,alt:v}){for(const y of this.viewItems)y.enabled=!1;const f=this.sashItems.findIndex(y=>y.sash===l),p=(0,g.combinedDisposable)((0,_.addDisposableListener)(document.body,"keydown",y=>C(this.sashDragState.current,y.altKey)),(0,_.addDisposableListener)(document.body,"keyup",()=>C(this.sashDragState.current,!1))),C=(y,E)=>{const I=this.viewItems.map(N=>N.size);let T=Number.NEGATIVE_INFINITY,O=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(E=!E),E)if(f===this.sashItems.length-1){const P=this.viewItems[f];T=(P.minimumSize-P.size)/2,O=(P.maximumSize-P.size)/2}else{const P=this.viewItems[f+1];T=(P.size-P.maximumSize)/2,O=(P.size-P.minimumSize)/2}let R,M;if(!E){const N=(0,w.range)(f,-1),P=(0,w.range)(f+1,this.viewItems.length),x=N.reduce((le,ne)=>le+(this.viewItems[ne].minimumSize-I[ne]),0),F=N.reduce((le,ne)=>le+(this.viewItems[ne].viewMaximumSize-I[ne]),0),B=P.length===0?Number.POSITIVE_INFINITY:P.reduce((le,ne)=>le+(I[ne]-this.viewItems[ne].minimumSize),0),V=P.length===0?Number.NEGATIVE_INFINITY:P.reduce((le,ne)=>le+(I[ne]-this.viewItems[ne].viewMaximumSize),0),K=Math.max(x,V),A=Math.min(B,F),Y=this.findFirstSnapIndex(N),ie=this.findFirstSnapIndex(P);if(typeof Y=="number"){const le=this.viewItems[Y],ne=Math.floor(le.viewMinimumSize/2);R={index:Y,limitDelta:le.visible?K-ne:K+ne,size:le.size}}if(typeof ie=="number"){const le=this.viewItems[ie],ne=Math.floor(le.viewMinimumSize/2);M={index:ie,limitDelta:le.visible?A+ne:A-ne,size:le.size}}}this.sashDragState={start:y,current:y,index:f,sizes:I,minDelta:T,maxDelta:O,alt:E,snapBefore:R,snapAfter:M,disposable:p}};C(u,v)}onSashChange({current:l}){const{index:u,start:v,sizes:f,alt:p,minDelta:C,maxDelta:y,snapBefore:E,snapAfter:I}=this.sashDragState;this.sashDragState.current=l;const T=l-v,O=this.resize(u,T,f,void 0,void 0,C,y,E,I);if(p){const R=u===this.sashItems.length-1,M=this.viewItems.map(V=>V.size),N=R?u:u+1,P=this.viewItems[N],x=P.size-P.maximumSize,F=P.size-P.minimumSize,B=R?u-1:u+1;this.resize(B,-O,M,void 0,void 0,x,F)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(l){this._onDidSashChange.fire(l),this.sashDragState.disposable.dispose(),this.saveProportions();for(const u of this.viewItems)u.enabled=!0}onViewChange(l,u){const v=this.viewItems.indexOf(l);v<0||v>=this.viewItems.length||(u=typeof u=="number"?u:l.size,u=(0,m.clamp)(u,l.minimumSize,l.maximumSize),this.inverseAltBehavior&&v>0?(this.resize(v-1,Math.floor((l.size-u)/2)),this.distributeEmptySpace(),this.layoutViews()):(l.size=u,this.relayout([v],void 0)))}resizeView(l,u){if(this.state!==h.Idle)throw new Error("Cant modify splitview");if(this.state=h.Busy,l<0||l>=this.viewItems.length)return;const v=(0,w.range)(this.viewItems.length).filter(y=>y!==l),f=[...v.filter(y=>this.viewItems[y].priority===1),l],p=v.filter(y=>this.viewItems[y].priority===2),C=this.viewItems[l];u=Math.round(u),u=(0,m.clamp)(u,C.minimumSize,Math.min(C.maximumSize,this.size)),C.size=u,this.relayout(f,p),this.state=h.Idle}distributeViewSizes(){const l=[];let u=0;for(const y of this.viewItems)y.maximumSize-y.minimumSize>0&&(l.push(y),u+=y.size);const v=Math.floor(u/l.length);for(const y of l)y.size=(0,m.clamp)(v,y.minimumSize,y.maximumSize);const f=(0,w.range)(this.viewItems.length),p=f.filter(y=>this.viewItems[y].priority===1),C=f.filter(y=>this.viewItems[y].priority===2);this.relayout(p,C)}getViewSize(l){return l<0||l>=this.viewItems.length?-1:this.viewItems[l].size}doAddView(l,u,v=this.viewItems.length,f){if(this.state!==h.Idle)throw new Error("Cant modify splitview");this.state=h.Busy;const p=(0,_.$)(".split-view-view");v===this.viewItems.length?this.viewContainer.appendChild(p):this.viewContainer.insertBefore(p,this.viewContainer.children.item(v));const C=l.onDidChange(R=>this.onViewChange(T,R)),y=(0,g.toDisposable)(()=>this.viewContainer.removeChild(p)),E=(0,g.combinedDisposable)(C,y);let I;typeof u=="number"?I=u:u.type==="split"?I=this.getViewSize(u.index)/2:u.type==="invisible"?I={cachedVisibleSize:u.cachedVisibleSize}:I=l.minimumSize;const T=this.orientation===0?new r(p,l,I,E):new d(p,l,I,E);if(this.viewItems.splice(v,0,T),this.viewItems.length>1){const R={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},M=this.orientation===0?new L.Sash(this.sashContainer,{getHorizontalSashTop:le=>this.getSashPosition(le),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},R),{orientation:1})):new L.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}),x=S.Event.map(M.onDidStart,N)(this.onSashStart,this),B=S.Event.map(M.onDidChange,N)(this.onSashChange,this),K=S.Event.map(M.onDidEnd,()=>this.sashItems.findIndex(le=>le.sash===M))(this.onSashEnd,this),A=M.onDidReset(()=>{const le=this.sashItems.findIndex($=>$.sash===M),ne=(0,w.range)(le,-1),se=(0,w.range)(le+1,this.viewItems.length),H=this.findFirstSnapIndex(ne),W=this.findFirstSnapIndex(se);typeof H=="number"&&!this.viewItems[H].visible||typeof W=="number"&&!this.viewItems[W].visible||this._onDidSashReset.fire(le)}),Y=(0,g.combinedDisposable)(x,B,K,A,M),ie={sash:M,disposable:Y};this.sashItems.splice(v-1,0,ie)}p.appendChild(l.element);let O;typeof u!="number"&&u.type==="split"&&(O=[u.index]),f||this.relayout([v],O),this.state=h.Idle,!f&&typeof u!="number"&&u.type==="distribute"&&this.distributeViewSizes()}relayout(l,u){const v=this.viewItems.reduce((f,p)=>f+p.size,0);this.resize(this.viewItems.length-1,this.size-v,void 0,l,u),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(l,u,v=this.viewItems.map(T=>T.size),f,p,C=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,E,I){if(l<0||l>=this.viewItems.length)return 0;const T=(0,w.range)(l,-1),O=(0,w.range)(l+1,this.viewItems.length);if(p)for(const ie of p)(0,w.pushToStart)(T,ie),(0,w.pushToStart)(O,ie);if(f)for(const ie of f)(0,w.pushToEnd)(T,ie),(0,w.pushToEnd)(O,ie);const R=T.map(ie=>this.viewItems[ie]),M=T.map(ie=>v[ie]),N=O.map(ie=>this.viewItems[ie]),P=O.map(ie=>v[ie]),x=T.reduce((ie,le)=>ie+(this.viewItems[le].minimumSize-v[le]),0),F=T.reduce((ie,le)=>ie+(this.viewItems[le].maximumSize-v[le]),0),B=O.length===0?Number.POSITIVE_INFINITY:O.reduce((ie,le)=>ie+(v[le]-this.viewItems[le].minimumSize),0),V=O.length===0?Number.NEGATIVE_INFINITY:O.reduce((ie,le)=>ie+(v[le]-this.viewItems[le].maximumSize),0),K=Math.max(x,V,C),A=Math.min(B,F,y);let Y=!1;if(E){const ie=this.viewItems[E.index],le=u>=E.limitDelta;Y=le!==ie.visible,ie.setVisible(le,E.size)}if(!Y&&I){const ie=this.viewItems[I.index],le=u<I.limitDelta;Y=le!==ie.visible,ie.setVisible(le,I.size)}if(Y)return this.resize(l,u,v,f,p,C,y);u=(0,m.clamp)(u,K,A);for(let ie=0,le=u;ie<R.length;ie++){const ne=R[ie],se=(0,m.clamp)(M[ie]+le,ne.minimumSize,ne.maximumSize),H=se-M[ie];le-=H,ne.size=se}for(let ie=0,le=u;ie<N.length;ie++){const ne=N[ie],se=(0,m.clamp)(P[ie]-le,ne.minimumSize,ne.maximumSize),H=se-P[ie];le+=H,ne.size=se}return u}distributeEmptySpace(l){const u=this.viewItems.reduce((y,E)=>y+E.size,0);let v=this.size-u;const f=(0,w.range)(this.viewItems.length-1,-1),p=f.filter(y=>this.viewItems[y].priority===1),C=f.filter(y=>this.viewItems[y].priority===2);for(const y of C)(0,w.pushToStart)(f,y);for(const y of p)(0,w.pushToEnd)(f,y);typeof l=="number"&&(0,w.pushToEnd)(f,l);for(let y=0;v!==0&&y<f.length;y++){const E=this.viewItems[f[y]],I=(0,m.clamp)(E.size+v,E.minimumSize,E.maximumSize),T=I-E.size;v-=T,E.size=I}}layoutViews(){this.contentSize=this.viewItems.reduce((u,v)=>u+v.size,0);let l=0;for(const u of this.viewItems)u.layout(l,this.layoutContext),l+=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 l=!1;const u=this.viewItems.map(E=>l=E.size-E.minimumSize>0||l);l=!1;const v=this.viewItems.map(E=>l=E.maximumSize-E.size>0||l),f=[...this.viewItems].reverse();l=!1;const p=f.map(E=>l=E.size-E.minimumSize>0||l).reverse();l=!1;const C=f.map(E=>l=E.maximumSize-E.size>0||l).reverse();let y=0;for(let E=0;E<this.sashItems.length;E++){const{sash:I}=this.sashItems[E],T=this.viewItems[E];y+=T.size;const O=!(u[E]&&C[E+1]),R=!(v[E]&&p[E+1]);if(O&&R){const M=(0,w.range)(E,-1),N=(0,w.range)(E+1,this.viewItems.length),P=this.findFirstSnapIndex(M),x=this.findFirstSnapIndex(N),F=typeof P=="number"&&!this.viewItems[P].visible,B=typeof x=="number"&&!this.viewItems[x].visible;F&&p[E]&&(y>0||this.startSnappingEnabled)?I.state=1:B&&u[E]&&(y<this.contentSize||this.endSnappingEnabled)?I.state=2:I.state=0}else O&&!R?I.state=1:!O&&R?I.state=2:I.state=3}}getSashPosition(l){let u=0;for(let v=0;v<this.sashItems.length;v++)if(u+=this.viewItems[v].size,this.sashItems[v].sash===l)return u;return 0}findFirstSnapIndex(l){for(const u of l){const v=this.viewItems[u];if(v.visible&&v.snap)return u}for(const u of l){const v=this.viewItems[u];if(v.visible&&v.maximumSize-v.minimumSize>0)return;if(!v.visible&&v.snap)return u}}dispose(){var l;(l=this.sashDragState)===null||l===void 0||l.disposable.dispose(),(0,g.dispose)(this.viewItems),this.viewItems=[],this.sashItems.forEach(u=>u.disposable.dispose()),this.sashItems=[],super.dispose()}}e.SplitView=c}),define(J[559],ee([1,0,7,109,299,6,2,396]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class b{constructor(t,i,n){this.columns=t,this.getColumnSize=n,this.templateId=b.TemplateId,this.renderedTemplates=new Set;const r=new Map(i.map(d=>[d.templateId,d]));this.renderers=[];for(const d of t){const h=r.get(d.templateId);if(!h)throw new Error(`Table cell renderer for template id ${d.templateId} not found.`);this.renderers.push(h)}}renderTemplate(t){const i=(0,_.append)(t,(0,_.$)(".monaco-table-tr")),n=[],r=[];for(let h=0;h<this.columns.length;h++){const o=this.renderers[h],c=(0,_.append)(i,(0,_.$)(".monaco-table-td",{"data-col-index":h}));c.style.width=`${this.getColumnSize(h)}px`,n.push(c),r.push(o.renderTemplate(c))}const d={container:t,cellContainers:n,cellTemplateData:r};return this.renderedTemplates.add(d),d}renderElement(t,i,n,r){for(let d=0;d<this.columns.length;d++){const o=this.columns[d].project(t);this.renderers[d].renderElement(o,i,n.cellTemplateData[d],r)}}disposeElement(t,i,n,r){for(let d=0;d<this.columns.length;d++){const h=this.renderers[d];if(h.disposeElement){const c=this.columns[d].project(t);h.disposeElement(c,i,n.cellTemplateData[d],r)}}}disposeTemplate(t){for(let i=0;i<this.columns.length;i++)this.renderers[i].disposeTemplate(t.cellTemplateData[i]);(0,_.clearNode)(t.container),this.renderedTemplates.delete(t)}layoutColumn(t,i){for(const{cellContainers:n}of this.renderedTemplates)n[t].style.width=`${i}px`}}b.TemplateId="row";function S(s){return{getHeight(t){return s.getHeight(t)},getTemplateId(){return b.TemplateId}}}class g{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,_.$)(".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,n,r,d,h){this.virtualDelegate=n,this.domId=`table_id_${++m.InstanceCount}`,this.disposables=new w.DisposableStore,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,_.append)(i,(0,_.$)(`.monaco-table.${this.domId}`));const o=r.map((l,u)=>new g(l,u)),c={size:o.reduce((l,u)=>l+u.column.weight,0),views:o.map(l=>({size:l.column.weight,view:l}))};this.splitview=this.disposables.add(new L.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:c})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const a=new b(r,d,l=>this.splitview.getViewSize(l));this.list=this.disposables.add(new k.List(t,this.domNode,S(n),[a],h)),D.Event.any(...o.map(l=>l.onDidLayout))(([l,u])=>a.layoutColumn(l,u),null,this.disposables),this.splitview.onDidSashReset(l=>{const u=r.reduce((f,p)=>f+p.weight,0),v=r[l].weight/u*this.cachedWidth;this.splitview.resizeView(l,v)},null,this.disposables),this.styleElement=(0,_.createStyleSheet)(this.domNode),this.style(k.unthemedListStyles)}updateOptions(t){this.list.updateOptions(t)}splice(t,i,n=[]){this.list.splice(t,i,n)}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()}}e.Table=m,m.InstanceCount=0}),define(J[149],ee([1,0,68,31,6,397]),function(j,e,_,k,L){"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 _.Widget{constructor(b){super(),this._onChange=this._register(new L.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new L.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=b,this._checked=this._opts.isChecked;const S=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,S.push(...k.ThemeIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&S.push(...this._opts.actionClassName.split(" ")),this._checked&&S.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...S),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,g=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),g.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,g=>{if(g.keyCode===10||g.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),g.preventDefault(),g.stopPropagation();return}this._onKeyDown.fire(g)})}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[300],ee([1,0,149,26,534]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexToggle=e.WholeWordsToggle=e.CaseSensitiveToggle=void 0;const D=L.localize(0,null),w=L.localize(1,null),b=L.localize(2,null);class S extends _.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=S;class g extends _.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=g;class m extends _.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,209,51,90,17,9,21]),function(j,e,_,k,L,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 S(s){return(0,b.uriToFsPath)(s,!0)}e.originalFSPath=S;class g{constructor(t){this._ignorePathCasing=t}compare(t,i,n=!1){return t===i?0:(0,w.compare)(this.getComparisonKey(t,n),this.getComparisonKey(i,n))}isEqual(t,i,n=!1){return t===i?!0:!t||!i?!1:this.getComparisonKey(t,n)===this.getComparisonKey(i,n)}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,n=!1){if(t.scheme===i.scheme){if(t.scheme===k.Schemas.file)return _.isEqualOrParent(S(t),S(i),this._ignorePathCasing(t))&&t.query===i.query&&(n||t.fragment===i.fragment);if((0,e.isEqualAuthority)(t.authority,i.authority))return _.isEqualOrParent(t.path,i.path,this._ignorePathCasing(t),"/")&&t.query===i.query&&(n||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 L.posix.basename(t.path)}extname(t){return L.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(L.dirname(S(t))).path:(i=L.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(L.normalize(S(t))).path:i=L.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 d=L.relative(S(t),S(i));return D.isWindows?_.toSlashes(d):d}let n=t.path||"/";const r=i.path||"/";if(this._ignorePathCasing(t)){let d=0;for(const h=Math.min(n.length,r.length);d<h&&!(n.charCodeAt(d)!==r.charCodeAt(d)&&n.charAt(d).toLowerCase()!==r.charAt(d).toLowerCase());d++);n=r.substr(0,d)+n.substr(d)}return L.posix.relative(n,r)}resolvePath(t,i){if(t.scheme===k.Schemas.file){const n=b.URI.file(L.resolve(S(t),i));return t.with({authority:n.authority,path:n.path})}return i=_.toPosixPath(i),t.with({path:L.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=L.sep){if(t.scheme===k.Schemas.file){const n=S(t);return n.length>_.getRoot(n).length&&n[n.length-1]===i}else{const n=t.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\\/$|\\\\$)/.test(t.fsPath)}}removeTrailingPathSeparator(t,i=L.sep){return(0,e.hasTrailingPathSeparator)(t,i)?t.with({path:t.path.substr(0,t.path.length-1)}):t}addTrailingPathSeparator(t,i=L.sep){let n=!1;if(t.scheme===k.Schemas.file){const r=S(t);n=r!==void 0&&r.length===_.getRoot(r).length&&r[r.length-1]===i}else{i="/";const r=t.path;n=r.length===1&&r.charCodeAt(r.length-1)===47}return!n&&!(0,e.hasTrailingPathSeparator)(t,i)?t.with({path:t.path+"/"}):t}}e.ExtUri=g,e.extUri=new g(()=>!1),e.extUriBiasedIgnorePathCase=new g(s=>s.scheme===k.Schemas.file?!D.isLinux:!0),e.extUriIgnorePathCase=new g(s=>!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(s){s.META_DATA_LABEL="label",s.META_DATA_DESCRIPTION="description",s.META_DATA_SIZE="size",s.META_DATA_MIME="mime";function t(i){const n=new Map;i.path.substring(i.path.indexOf(";")+1,i.path.lastIndexOf(";")).split(";").forEach(h=>{const[o,c]=h.split(":");o&&c&&n.set(o,c)});const d=i.path.substring(0,i.path.indexOf(";"));return d&&n.set(s.META_DATA_MIME,d),n}s.parseMetaData=t})(m||(e.DataUri=m={}))}),define(J[61],ee([1,0,11,115,42,9,21]),function(j,e,_,k,L,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(d="",h=!1){var o,c,a;if(this.value=d,typeof this.value!="string")throw(0,_.illegalArgument)("value");typeof h=="boolean"?(this.isTrusted=h,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(o=h.isTrusted)!==null&&o!==void 0?o:void 0,this.supportThemeIcons=(c=h.supportThemeIcons)!==null&&c!==void 0?c:!1,this.supportHtml=(a=h.supportHtml)!==null&&a!==void 0?a:!1)}appendText(d,h=0){return this.value+=s(this.supportThemeIcons?(0,k.escapeIcons)(d):d).replace(/([ \\t]+)/g,(o,c)=>" ".repeat(c.length)).replace(/\\>/gm,"\\\\>").replace(/\\n/g,h===1?`\\\\\n`:`\n\n`),this}appendMarkdown(d){return this.value+=d,this}appendCodeblock(d,h){return this.value+="\\n```",this.value+=d,this.value+=`\n`,this.value+=h,this.value+="\\n```\\n",this}appendLink(d,h,o){return this.value+="[",this.value+=this._escape(h,"]"),this.value+="](",this.value+=this._escape(String(d),")"),o&&(this.value+=` "${this._escape(this._escape(o,\'"\'),")")}"`),this.value+=")",this}_escape(d,h){const o=new RegExp((0,D.escapeRegExpCharacters)(h),"g");return d.replace(o,(c,a)=>d.charAt(a-1)!=="\\\\"?`\\\\${c}`:c)}}e.MarkdownString=b;function S(r){return g(r)?!r.value:Array.isArray(r)?r.every(S):!0}e.isEmptyMarkdownString=S;function g(r){return r instanceof b?!0:r&&typeof r=="object"?typeof r.value=="string"&&(typeof r.isTrusted=="boolean"||typeof r.isTrusted=="object"||r.isTrusted===void 0)&&(typeof r.supportThemeIcons=="boolean"||r.supportThemeIcons===void 0):!1}e.isMarkdownString=g;function m(r,d){return r===d?!0:!r||!d?!1:r.value===d.value&&r.isTrusted===d.isTrusted&&r.supportThemeIcons===d.supportThemeIcons&&r.supportHtml===d.supportHtml&&(r.baseUri===d.baseUri||!!r.baseUri&&!!d.baseUri&&(0,L.isEqual)(w.URI.from(r.baseUri),w.URI.from(d.baseUri)))}e.markdownStringEqual=m;function s(r){return r.replace(/[\\\\`*_{}[\\]()#+\\-!~]/g,"\\\\$&")}e.escapeMarkdownSyntaxTokens=s;function t(r){return r.replace(/"/g,""")}e.escapeDoubleQuotes=t;function i(r){return r&&r.replace(/\\\\([\\\\`*_{}[\\]()#+\\-.!~])/g,"$1")}e.removeMarkdownEscapes=i;function n(r){const d=[],h=r.split("|").map(c=>c.trim());r=h[0];const o=h[1];if(o){const c=/height=(\\d+)/.exec(o),a=/width=(\\d+)/.exec(o),l=c?c[1]:"",u=a?a[1]:"",v=isFinite(parseInt(u)),f=isFinite(parseInt(l));v&&d.push(`width="${u}"`),f&&d.push(`height="${l}"`)}return{href:r,dimensions:d}}e.parseHrefAndDimensions=n}),define(J[217],ee([1,0,7,291,78,292,44,67,147,11,6,61,115,160,102,2,373,213,51,45,42,9,21]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fillInIncompleteTokens=e.renderMarkdownAsPlaintext=e.renderStringAsPlaintext=e.allowedMarkdownAttr=e.renderMarkdown=void 0;const v=Object.freeze({image:(se,H,W)=>{let $=[],Z=[];return se&&({href:se,dimensions:$}=(0,s.parseHrefAndDimensions)(se),Z.push(`src="${(0,s.escapeDoubleQuotes)(se)}"`)),W&&Z.push(`alt="${(0,s.escapeDoubleQuotes)(W)}"`),H&&Z.push(`title="${(0,s.escapeDoubleQuotes)(H)}"`),$.length&&(Z=Z.concat($)),"<img "+Z.join(" ")+">"},paragraph:se=>`<p>${se}</p>`,link:(se,H,W)=>typeof se!="string"?"":(se===W&&(W=(0,s.removeMarkdownEscapes)(W)),H=typeof H=="string"?(0,s.escapeDoubleQuotes)((0,s.removeMarkdownEscapes)(H)):"",se=(0,s.removeMarkdownEscapes)(se),se=se.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'"),`<a href="${se}" title="${H||se}">${W}</a>`)});function f(se,H={},W={}){var $,Z;const Q=new r.DisposableStore;let re=!1;const ce=(0,D.createElement)(H),he=function(ae){let fe;try{fe=(0,h.parse)(decodeURIComponent(ae))}catch{}return fe?(fe=(0,c.cloneAndChange)(fe,Ce=>{if(se.uris&&se.uris[Ce])return u.URI.revive(se.uris[Ce])}),encodeURIComponent(JSON.stringify(fe))):ae},de=function(ae,fe){const Ce=se.uris&&se.uris[ae];let Se=u.URI.revive(Ce);return fe?ae.startsWith(o.Schemas.data+":")?ae:(Se||(Se=u.URI.parse(ae)),o.FileAccess.uriToBrowserUri(Se).toString(!0)):!Se||u.URI.parse(ae).toString()===Se.toString()?ae:(Se.query&&(Se=Se.with({query:he(Se.query)})),Se.toString())},ue=new d.marked.Renderer;ue.image=v.image,ue.link=v.link,ue.paragraph=v.paragraph;const q=[],z=[];if(H.codeBlockRendererSync?ue.code=(ae,fe)=>{const Ce=i.defaultGenerator.nextId(),Se=H.codeBlockRendererSync(p(fe),ae);return z.push([Ce,Se]),`<div class="code" data-code="${Ce}">${(0,l.escape)(ae)}</div>`}:H.codeBlockRenderer&&(ue.code=(ae,fe)=>{const Ce=i.defaultGenerator.nextId(),Se=H.codeBlockRenderer(p(fe),ae);return q.push(Se.then(ye=>[Ce,ye])),`<div class="code" data-code="${Ce}">${(0,l.escape)(ae)}</div>`}),H.actionHandler){const ae=function(Se){let ye=Se.target;if(!(ye.tagName!=="A"&&(ye=ye.parentElement,!ye||ye.tagName!=="A")))try{let Ie=ye.dataset.href;Ie&&(se.baseUri&&(Ie=C(u.URI.from(se.baseUri),Ie)),H.actionHandler.callback(Ie,Se))}catch(Ie){(0,g.onUnexpectedError)(Ie)}finally{Se.preventDefault()}},fe=H.actionHandler.disposables.add(new L.DomEmitter(ce,"click")),Ce=H.actionHandler.disposables.add(new L.DomEmitter(ce,"auxclick"));H.actionHandler.disposables.add(m.Event.any(fe.event,Ce.event)(Se=>{const ye=new b.StandardMouseEvent(Se);!ye.leftButton&&!ye.middleButton||ae(ye)})),H.actionHandler.disposables.add(_.addDisposableListener(ce,"keydown",Se=>{const ye=new w.StandardKeyboardEvent(Se);!ye.equals(10)&&!ye.equals(3)||ae(ye)}))}se.supportHtml||(W.sanitizer=ae=>(se.isTrusted?ae.match(/^(<span[^>]+>)|(<\\/\\s*span>)$/):void 0)?ae:"",W.sanitize=!0,W.silent=!0),W.renderer=ue;let U=($=se.value)!==null&&$!==void 0?$:"";U.length>1e5&&(U=`${U.substr(0,1e5)}\\u2026`),se.supportThemeIcons&&(U=(0,t.markdownEscapeEscapedIcons)(U));let X;if(H.fillInIncompleteTokens){const ae=Object.assign(Object.assign({},d.marked.defaults),W),fe=d.marked.lexer(U,ae),Ce=P(fe);X=d.marked.parser(Ce,ae)}else X=d.marked.parse(U,W);se.supportThemeIcons&&(X=(0,S.renderLabelWithIcons)(X).map(fe=>typeof fe=="string"?fe:fe.outerHTML).join(""));const G=new DOMParser().parseFromString(y(se,X),"text/html");if(G.body.querySelectorAll("img").forEach(ae=>{const fe=ae.getAttribute("src");if(fe){let Ce=fe;try{se.baseUri&&(Ce=C(u.URI.from(se.baseUri),Ce))}catch{}ae.src=de(Ce,!0)}}),G.body.querySelectorAll("a").forEach(ae=>{const fe=ae.getAttribute("href");if(ae.setAttribute("href",""),!fe||/^data:|javascript:/i.test(fe)||/^command:/i.test(fe)&&!se.isTrusted||/^command:(\\/\\/\\/)?_workbench\\.downloadResource/i.test(fe))ae.replaceWith(...ae.childNodes);else{let Ce=de(fe,!1);se.baseUri&&(Ce=C(u.URI.from(se.baseUri),fe)),ae.dataset.href=Ce}}),ce.innerHTML=y(se,G.body.innerHTML),q.length>0)Promise.all(q).then(ae=>{var fe,Ce;if(re)return;const Se=new Map(ae),ye=ce.querySelectorAll("div[data-code]");for(const Ie of ye){const Ee=Se.get((fe=Ie.dataset.code)!==null&&fe!==void 0?fe:"");Ee&&_.reset(Ie,Ee)}(Ce=H.asyncRenderCallback)===null||Ce===void 0||Ce.call(H)});else if(z.length>0){const ae=new Map(z),fe=ce.querySelectorAll("div[data-code]");for(const Ce of fe){const Se=ae.get((Z=Ce.dataset.code)!==null&&Z!==void 0?Z:"");Se&&_.reset(Ce,Se)}}if(H.asyncRenderCallback)for(const ae of ce.getElementsByTagName("img")){const fe=Q.add(_.addDisposableListener(ae,"load",()=>{fe.dispose(),H.asyncRenderCallback()}))}return{element:ce,dispose:()=>{re=!0,Q.dispose()}}}e.renderMarkdown=f;function p(se){if(!se)return"";const H=se.split(/[\\s+|:|,|\\{|\\?]/,1);return H.length?H[0]:se}function C(se,H){return/^\\w[\\w\\d+.-]*:/.test(H)?H:se.path.endsWith("/")?(0,a.resolvePath)(se,H).toString():(0,a.resolvePath)((0,a.dirname)(se),H).toString()}function y(se,H){const{config:W,allowedSchemes:$}=E(se);k.addHook("uponSanitizeAttribute",(Q,re)=>{if(re.attrName==="style"||re.attrName==="class"){if(Q.tagName==="SPAN"){if(re.attrName==="style"){re.keepAttr=/^(color\\:(#[0-9a-fA-F]+|var\\(--vscode(-[a-zA-Z]+)+\\));)?(background-color\\:(#[0-9a-fA-F]+|var\\(--vscode(-[a-zA-Z]+)+\\));)?$/.test(re.attrValue);return}else if(re.attrName==="class"){re.keepAttr=/^codicon codicon-[a-z\\-]+( codicon-modifier-[a-z\\-]+)?$/.test(re.attrValue);return}}re.keepAttr=!1;return}});const Z=_.hookDomPurifyHrefAndSrcSanitizer($);try{return k.sanitize(H,Object.assign(Object.assign({},W),{RETURN_TRUSTED_TYPE:!0}))}finally{k.removeHook("uponSanitizeAttribute"),Z.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(se){const H=[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 se.isTrusted&&H.push(o.Schemas.command),{config:{ALLOWED_TAGS:[..._.basicMarkupHtmlTags],ALLOWED_ATTR:e.allowedMarkdownAttr,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:H}}function I(se){return typeof se=="string"?se:T(se)}e.renderStringAsPlaintext=I;function T(se){var H;let W=(H=se.value)!==null&&H!==void 0?H:"";W.length>1e5&&(W=`${W.substr(0,1e5)}\\u2026`);const $=d.marked.parse(W,{renderer:R.value}).replace(/&(#\\d+|[a-zA-Z]+);/g,Z=>{var Q;return(Q=O.get(Z))!==null&&Q!==void 0?Q:Z});return y({isTrusted:!1},$).toString()}e.renderMarkdownAsPlaintext=T;const O=new Map([[""",\'"\'],[" "," "],["&","&"],["'","\'"],["<","<"],[">",">"]]),R=new n.Lazy(()=>{const se=new d.marked.Renderer;return se.code=H=>H,se.blockquote=H=>H,se.html=H=>"",se.heading=(H,W,$)=>H+`\n`,se.hr=()=>"",se.list=(H,W)=>H,se.listitem=H=>H+`\n`,se.paragraph=H=>H+`\n`,se.table=(H,W)=>H+W+`\n`,se.tablerow=H=>H,se.tablecell=(H,W)=>H+" ",se.strong=H=>H,se.em=H=>H,se.codespan=H=>H,se.br=()=>`\n`,se.del=H=>H,se.image=(H,W,$)=>"",se.text=H=>H,se.link=(H,W,$)=>$,se});function M(se){let H="";return se.forEach(W=>{H+=W.raw}),H}function N(se){for(const H of se.tokens)if(H.type==="text"){const W=H.raw.split(`\n`),$=W[W.length-1];if($.includes("`"))return F(se);if($.includes("**"))return Y(se);if($.match(/\\*\\w/))return B(se);if($.match(/(^|\\s)__\\w/))return ie(se);if($.match(/(^|\\s)_\\w/))return V(se);if($.match(/(^|\\s)\\[.*\\]\\(\\w*/))return K(se);if($.match(/(^|\\s)\\[\\w/))return A(se)}}function P(se){let H,W;for(H=0;H<se.length;H++){const $=se[H];if($.type==="paragraph"&&$.raw.match(/(\\n|^)```/)){W=x(se.slice(H));break}if($.type==="paragraph"&&$.raw.match(/(\\n|^)\\|/)){W=ne(se.slice(H));break}if(H===se.length-1&&$.type==="paragraph"){const Z=N($);if(Z){W=[Z];break}}}if(W){const $=[...se.slice(0,H),...W];return $.links=se.links,$}return se}e.fillInIncompleteTokens=P;function x(se){const H=M(se);return d.marked.lexer(H+"\\n```")}function F(se){return le(se,"`")}function B(se){return le(se,"*")}function V(se){return le(se,"_")}function K(se){return le(se,")")}function A(se){return le(se,"](about:blank)")}function Y(se){return le(se,"**")}function ie(se){return le(se,"__")}function le(se,H){const W=M(Array.isArray(se)?se:[se]);return d.marked.lexer(W+H)[0]}function ne(se){const H=M(se),W=H.split(`\n`);let $,Z=!1;for(let Q=0;Q<W.length;Q++){const re=W[Q].trim();if(typeof $>"u"&&re.match(/^\\s*\\|/)){const ce=re.match(/(\\|[^\\|]+)(?=\\||$)/g);ce&&($=ce.length)}else if(typeof $=="number")if(re.match(/^\\s*\\|/)){if(Q!==W.length-1)return;Z=!0}else return}if(typeof $=="number"&&$>0){const Q=Z?W.slice(0,-1).join(`\n`):H,re=!!Q.match(/\\|\\s*$/),ce=Q+(re?"":"|")+`\n|${" --- |".repeat($)}`;return d.marked.lexer(ce)}}}),define(J[301],ee([1,0,7,291,44,217,57,147,36,6,61,2,380]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=e.unthemedButtonStyles=void 0,e.unthemedButtonStyles={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:S.Color.white.toString(),buttonForeground:S.Color.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0};class t extends s.Disposable{get onDidClick(){return this._onDidClick.event}constructor(n,r){super(),this._label="",this._onDidClick=this._register(new g.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 d=r.secondary?r.buttonSecondaryBackground:r.buttonBackground,h=r.secondary?r.buttonSecondaryForeground:r.buttonForeground;this._element.style.color=h||"",this._element.style.backgroundColor=d||"",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")),n.appendChild(this._element),this._register(w.Gesture.addTarget(this._element)),[_.EventType.CLICK,w.EventType.Tap].forEach(o=>{this._register((0,_.addDisposableListener)(this._element,o,c=>{if(!this.enabled){_.EventHelper.stop(c);return}this._onDidClick.fire(c)}))}),this._register((0,_.addDisposableListener)(this._element,_.EventType.KEY_DOWN,o=>{const c=new L.StandardKeyboardEvent(o);let a=!1;this.enabled&&(c.equals(3)||c.equals(10))?(this._onDidClick.fire(o),a=!0):c.equals(9)&&(this._element.blur(),a=!0),a&&_.EventHelper.stop(c,!0)})),this._register((0,_.addDisposableListener)(this._element,_.EventType.MOUSE_OVER,o=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register((0,_.addDisposableListener)(this._element,_.EventType.MOUSE_OUT,o=>{this.updateBackground(!1)})),this.focusTracker=this._register((0,_.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}getContentElements(n){const r=[];for(let d of(0,b.renderLabelWithIcons)(n))if(typeof d=="string"){if(d=d.trim(),d==="")continue;const h=document.createElement("span");h.textContent=d,r.push(h)}else r.push(d);return r}updateBackground(n){let r;this.options.secondary?r=n?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:r=n?this.options.buttonHoverBackground:this.options.buttonBackground,r&&(this._element.style.backgroundColor=r)}get element(){return this._element}set label(n){var r;if(this._label===n||(0,m.isMarkdownString)(this._label)&&(0,m.isMarkdownString)(n)&&(0,m.markdownStringEqual)(this._label,n))return;this._element.classList.add("monaco-text-button");const d=this.options.supportShortLabel?this._labelElement:this._element;if((0,m.isMarkdownString)(n)){const h=(0,D.renderMarkdown)(n,{inline:!0});h.dispose();const o=(r=h.element.querySelector("p"))===null||r===void 0?void 0:r.innerHTML;if(o){const c=(0,k.sanitize)(o,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});d.innerHTML=c}else(0,_.reset)(d)}else this.options.supportIcons?(0,_.reset)(d,...this.getContentElements(n)):d.textContent=n;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=(0,D.renderStringAsPlaintext)(n)),this._label=n}get label(){return this._label}set enabled(n){n?(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[302],ee([1,0,7,14,20,61,115,2,18,536]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function m(i,n){(0,S.isString)(n)?i.title=(0,w.stripIcons)(n):n?.markdownNotSupportedFallback?i.title=n.markdownNotSupportedFallback:i.removeAttribute("title")}e.setupNativeHover=m;class s{constructor(n,r,d){this.hoverDelegate=n,this.target=r,this.fadeInAnimation=d}update(n,r,d){var h;return we(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(n===void 0||(0,S.isString)(n)||n instanceof HTMLElement)o=n;else if(!(0,S.isFunction)(n.markdown))o=(h=n.markdown)!==null&&h!==void 0?h:n.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,g.localize)(0,null),r),this._cancellationTokenSource=new L.CancellationTokenSource;const c=this._cancellationTokenSource.token;if(o=yield n.markdown(c),o===void 0&&(o=n.markdownNotSupportedFallback),this.isDisposed||c.isCancellationRequested)return}this.show(o,r,d)})}show(n,r,d){const h=this._hoverWidget;if(this.hasContent(n)){const o=Object.assign({content:n,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!h},d);this._hoverWidget=this.hoverDelegate.showHover(o,r)}h?.dispose()}hasContent(n){return n?(0,D.isMarkdownString)(n)?!!n.value:!0:!1}get isDisposed(){var n;return(n=this._hoverWidget)===null||n===void 0?void 0:n.isDisposed}dispose(){var n,r;(n=this._hoverWidget)===null||n===void 0||n.dispose(),(r=this._cancellationTokenSource)===null||r===void 0||r.dispose(!0),this._cancellationTokenSource=void 0}}function t(i,n,r,d){let h,o;const c=(f,p)=>{var C;const y=o!==void 0;f&&(o?.dispose(),o=void 0),p&&(h?.dispose(),h=void 0),y&&((C=i.onDidHideHover)===null||C===void 0||C.call(i))},a=(f,p,C)=>new k.TimeoutTimer(()=>we(this,void 0,void 0,function*(){(!o||o.isDisposed)&&(o=new s(i,C||n,f>0),yield o.update(r,p,d))}),f),l=()=>{if(h)return;const f=new b.DisposableStore,p=E=>c(!1,E.fromElement===n);f.add(_.addDisposableListener(n,_.EventType.MOUSE_LEAVE,p,!0));const C=()=>c(!0,!0);f.add(_.addDisposableListener(n,_.EventType.MOUSE_DOWN,C,!0));const y={targetElements:[n],dispose:()=>{}};if(i.placement===void 0||i.placement==="mouse"){const E=I=>{y.x=I.x+10,I.target instanceof HTMLElement&&I.target.classList.contains("action-label")&&c(!0,!0)};f.add(_.addDisposableListener(n,_.EventType.MOUSE_MOVE,E,!0))}f.add(a(i.delay,!1,y)),h=f},u=_.addDisposableListener(n,_.EventType.MOUSE_OVER,l,!0);return{show:f=>{c(!1,!0),a(0,f)},hide:()=>{c(!0,!0)},update:(f,p)=>we(this,void 0,void 0,function*(){r=f,yield o?.update(r,void 0,p)}),dispose:()=>{u.dispose(),c(!0,!0)}}}e.setupCustomHover=t}),define(J[218],ee([1,0,7,295,302,2,45,161,386]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class S{constructor(n){this._element=n}get element(){return this._element}set textContent(n){this.disposed||n===this._textContent||(this._textContent=n,this._element.textContent=n)}set className(n){this.disposed||n===this._className||(this._className=n,this._element.className=n)}set empty(n){this.disposed||n===this._empty||(this._empty=n,this._element.style.marginLeft=n?"0":"")}dispose(){this.disposed=!0}}class g extends D.Disposable{constructor(n,r){super(),this.customHovers=new Map,this.creationOptions=r,this.domNode=this._register(new S(_.append(n,_.$(".monaco-icon-label")))),this.labelContainer=_.append(this.domNode.element,_.$(".monaco-icon-label-container"));const d=_.append(this.labelContainer,_.$("span.monaco-icon-name-container"));r?.supportHighlights||r?.supportIcons?this.nameNode=new t(d,!!r.supportIcons):this.nameNode=new m(d),this.hoverDelegate=r?.hoverDelegate}get element(){return this.domNode.element}setLabel(n,r,d){const h=["monaco-icon-label"],o=["monaco-icon-label-container"];if(d&&(d.extraClasses&&h.push(...d.extraClasses),d.italic&&h.push("italic"),d.strikethrough&&h.push("strikethrough"),d.disabledCommand&&o.push("disabled")),this.domNode.className=h.join(" "),this.labelContainer.className=o.join(" "),this.setupHover(d?.descriptionTitle?this.labelContainer:this.element,d?.title),this.nameNode.setLabel(n,d),r||this.descriptionNode){const c=this.getOrCreateDescriptionNode();c instanceof k.HighlightedLabel?(c.set(r||"",d?d.descriptionMatches:void 0,void 0,d?.labelEscapeNewLines),this.setupHover(c.element,d?.descriptionTitle)):(c.textContent=r&&d?.labelEscapeNewLines?k.HighlightedLabel.escapeNewLines(r,[]):r||"",this.setupHover(c.element,d?.descriptionTitle||""),c.empty=!r)}}setupHover(n,r){const d=this.customHovers.get(n);if(d&&(d.dispose(),this.customHovers.delete(n)),!r){n.removeAttribute("title");return}if(!this.hoverDelegate)(0,L.setupNativeHover)(n,r);else{const h=(0,L.setupCustomHover)(this.hoverDelegate,n,r);h&&this.customHovers.set(n,h)}}dispose(){super.dispose();for(const n of this.customHovers.values())n.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var n;if(!this.descriptionNode){const r=this._register(new S(_.append(this.labelContainer,_.$("span.monaco-icon-description-container"))));!((n=this.creationOptions)===null||n===void 0)&&n.supportDescriptionHighlights?this.descriptionNode=new k.HighlightedLabel(_.append(r.element,_.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new S(_.append(r.element,_.$("span.label-description"))))}return this.descriptionNode}}e.IconLabel=g;class m{constructor(n){this.container=n,this.label=void 0,this.singleLabel=void 0}setLabel(n,r){if(!(this.label===n&&(0,w.equals)(this.options,r)))if(this.label=n,this.options=r,typeof n=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=_.append(this.container,_.$("a.label-name",{id:r?.domId}))),this.singleLabel.textContent=n;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let d=0;d<n.length;d++){const h=n[d],o=r?.domId&&`${r?.domId}_${d}`;_.append(this.container,_.$("a.label-name",{id:o,"data-icon-label-count":n.length,"data-icon-label-index":d,role:"treeitem"},h)),d<n.length-1&&_.append(this.container,_.$("span.label-separator",void 0,r?.separator||"/"))}}}}function s(i,n,r){if(!r)return;let d=0;return i.map(h=>{const o={start:d,end:d+h.length},c=r.map(a=>b.Range.intersect(o,a)).filter(a=>!b.Range.isEmpty(a)).map(({start:a,end:l})=>({start:a-d,end:l-d}));return d=o.end+n.length,c})}class t{constructor(n,r){this.container=n,this.supportIcons=r,this.label=void 0,this.singleLabel=void 0}setLabel(n,r){if(!(this.label===n&&(0,w.equals)(this.options,r)))if(this.label=n,this.options=r,typeof n=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new k.HighlightedLabel(_.append(this.container,_.$("a.label-name",{id:r?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(n,r?.matches,void 0,r?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const d=r?.separator||"/",h=s(n,d,r?.matches);for(let o=0;o<n.length;o++){const c=n[o],a=h?h[o]:void 0,l=r?.domId&&`${r?.domId}_${o}`,u=_.$("a.label-name",{id:l,"data-icon-label-count":n.length,"data-icon-label-index":o,role:"treeitem"});new k.HighlightedLabel(_.append(this.container,u),{supportIcons:this.supportIcons}).set(c,a,void 0,r?.labelEscapeNewLines),o<n.length-1&&_.append(u,_.$("span.label-separator",void 0,d))}}}}}),define(J[560],ee([1,0,7,78,44,217,109,16,6,58,2,17,539,394]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxList=void 0;const i=_.$,n="selectOption.entry.template";class r{get templateId(){return n}renderTemplate(o){const c=Object.create(null);return c.root=o,c.text=_.append(o,i(".option-text")),c.detail=_.append(o,i(".option-detail")),c.decoratorRight=_.append(o,i(".option-decorator-right")),c}renderElement(o,c,a){const l=a,u=o.text,v=o.detail,f=o.decoratorRight,p=o.isDisabled;l.text.textContent=u,l.detail.textContent=v||"",l.decoratorRight.innerText=f||"",p?l.root.classList.add("option-disabled"):l.root.classList.remove("option-disabled")}disposeTemplate(o){}}class d extends m.Disposable{constructor(o,c,a,l,u){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=l,this.selectBoxOptions=u||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=d.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 S.Emitter,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(a),this.selected=c||0,o&&this.setOptions(o,c),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return n}constructSelectDropDown(o){this.contextViewProvider=o,this.selectDropDownContainer=_.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=_.append(this.selectDropDownContainer,i(".select-box-details-pane"));const c=_.append(this.selectDropDownContainer,i(".select-box-dropdown-container-width-control")),a=_.append(c,i(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",_.append(a,this.widthControlElement),this._dropDownPosition=0,this.styleElement=_.createStyleSheet(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(_.addDisposableListener(this.selectDropDownContainer,_.EventType.DRAG_START,l=>{_.EventHelper.stop(l,!0)}))}registerListeners(){this._register(_.addStandardDisposableListener(this.selectElement,"change",c=>{this.selected=c.target.selectedIndex,this._onDidSelect.fire({index:c.target.selectedIndex,selected:c.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(_.addDisposableListener(this.selectElement,_.EventType.CLICK,c=>{_.EventHelper.stop(c),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(_.addDisposableListener(this.selectElement,_.EventType.MOUSE_DOWN,c=>{_.EventHelper.stop(c)}));let o;this._register(_.addDisposableListener(this.selectElement,"touchstart",c=>{o=this._isVisible})),this._register(_.addDisposableListener(this.selectElement,"touchend",c=>{_.EventHelper.stop(c),o?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(_.addDisposableListener(this.selectElement,_.EventType.KEY_DOWN,c=>{const a=new L.StandardKeyboardEvent(c);let l=!1;s.isMacintosh?(a.keyCode===18||a.keyCode===16||a.keyCode===10||a.keyCode===3)&&(l=!0):(a.keyCode===18&&a.altKey||a.keyCode===16&&a.altKey||a.keyCode===10||a.keyCode===3)&&(l=!0),l&&(this.showSelectDropDown(),_.EventHelper.stop(c,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(o,c){b.equals(this.options,o)||(this.options=o,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((a,l)=>{this.selectElement.add(this.createOption(a.text,l,a.isDisabled)),typeof a.description=="string"&&(this._hasDetails=!0)})),c!==void 0&&(this.select(c),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,c,a;const l=(o=this.styles.selectBackground)!==null&&o!==void 0?o:"",u=(c=this.styles.selectForeground)!==null&&c!==void 0?c:"",v=(a=this.styles.selectBorder)!==null&&a!==void 0?a:"";this.selectElement.style.backgroundColor=l,this.selectElement.style.color=u,this.selectElement.style.borderColor=v}styleList(){var o,c;const a=(o=this.styles.selectBackground)!==null&&o!==void 0?o:"",l=_.asCssValueWithDefault(this.styles.selectListBackground,a);this.selectDropDownListContainer.style.backgroundColor=l,this.selectionDetailsPane.style.backgroundColor=l;const u=(c=this.styles.focusBorder)!==null&&c!==void 0?c:"";this.selectDropDownContainer.style.outlineColor=u,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(o,c,a){const l=document.createElement("option");return l.value=o,l.text=o,l.disabled=!!a,l}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,c){return o.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(c),{dispose:()=>{try{o.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let o=0;return this.options.forEach((c,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 c=_.getDomNodePagePosition(this.selectElement),a=getComputedStyle(this.selectElement),l=parseFloat(a.getPropertyValue("--dropdown-padding-top"))+parseFloat(a.getPropertyValue("--dropdown-padding-bottom")),u=window.innerHeight-c.top-c.height-(this.selectBoxOptions.minBottomMargin||0),v=c.top-d.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,f=this.selectElement.offsetWidth,p=this.setWidthControlElement(this.widthControlElement),C=Math.max(p,Math.round(f)).toString()+"px";this.selectDropDownContainer.style.width=C,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let y=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const E=this._hasDetails?this._cachedMaxDetailsHeight:0,I=y+l+E,T=Math.floor((u-l-E)/this.getHeight()),O=Math.floor((v-l-E)/this.getHeight());if(o)return c.top+c.height>window.innerHeight-22||c.top<d.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||T<1&&O<1?!1:(T<d.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&O>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(c.top+c.height>window.innerHeight-22||c.top<d.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&T<1||this._dropDownPosition===1&&O<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&T+O<1)return this.hideSelectDropDown(!0),!1;I>u&&(y=T*this.getHeight())}else I>v&&(y=O*this.getHeight());return this.selectList.layout(y),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=y+l+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=y+l+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=C,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(o){let c=0;if(o){let a=0,l=0;this.options.forEach((u,v)=>{const f=u.detail?u.detail.length:0,p=u.decoratorRight?u.decoratorRight.length:0,C=u.text.length+f+p;C>l&&(a=v,l=C)}),o.textContent=this.options[a].text+(this.options[a].decoratorRight?this.options[a].decoratorRight+" ":""),c=_.getTotalWidth(o)}return c}createSelectList(o){if(this.selectList)return;this.selectDropDownListContainer=_.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:l=>{let u=l.text;return l.detail&&(u+=`. ${l.detail}`),l.decoratorRight&&(u+=`. ${l.decoratorRight}`),l.description&&(u+=`. ${l.description}`),u},getWidgetAriaLabel:()=>(0,t.localize)(0,null),getRole:()=>s.isMacintosh?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const c=this._register(new k.DomEmitter(this.selectDropDownListContainer,"keydown")),a=S.Event.chain(c.event).filter(()=>this.selectList.length>0).map(l=>new L.StandardKeyboardEvent(l));this._register(a.filter(l=>l.keyCode===3).on(l=>this.onEnter(l),this)),this._register(a.filter(l=>l.keyCode===2).on(l=>this.onEnter(l),this)),this._register(a.filter(l=>l.keyCode===9).on(l=>this.onEscape(l),this)),this._register(a.filter(l=>l.keyCode===16).on(l=>this.onUpArrow(l),this)),this._register(a.filter(l=>l.keyCode===18).on(l=>this.onDownArrow(l),this)),this._register(a.filter(l=>l.keyCode===12).on(this.onPageDown,this)),this._register(a.filter(l=>l.keyCode===11).on(this.onPageUp,this)),this._register(a.filter(l=>l.keyCode===14).on(this.onHome,this)),this._register(a.filter(l=>l.keyCode===13).on(this.onEnd,this)),this._register(a.filter(l=>l.keyCode>=21&&l.keyCode<=56||l.keyCode>=85&&l.keyCode<=113).on(this.onCharacter,this)),this._register(_.addDisposableListener(this.selectList.getHTMLElement(),_.EventType.POINTER_UP,l=>this.onPointerUp(l))),this._register(this.selectList.onMouseOver(l=>typeof l.index<"u"&&this.selectList.setFocus([l.index]))),this._register(this.selectList.onDidChangeFocus(l=>this.onListFocus(l))),this._register(_.addDisposableListener(this.selectDropDownContainer,_.EventType.FOCUS_OUT,l=>{!this._isVisible||_.isAncestor(l.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;_.EventHelper.stop(o);const c=o.target;if(!c||c.classList.contains("slider"))return;const a=c.closest(".monaco-list-row");if(!a)return;const l=Number(a.getAttribute("data-index")),u=a.classList.contains("option-disabled");l>=0&&l<this.options.length&&!u&&(this.selected=l,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,c){const a=u=>{for(let v=0;v<u.childNodes.length;v++){const f=u.childNodes.item(v);(f.tagName&&f.tagName.toLowerCase())==="img"?u.removeChild(f):a(f)}},l=(0,D.renderMarkdown)({value:o,supportThemeIcons:!0},{actionHandler:c});return l.element.classList.add("select-box-description-markdown"),a(l.element),l.element}onListFocus(o){!this._isVisible||!this._hasDetails||this.updateDetail(o.indexes[0])}updateDetail(o){var c,a;this.selectionDetailsPane.innerText="";const l=this.options[o],u=(c=l?.description)!==null&&c!==void 0?c:"",v=(a=l?.descriptionIsMarkdown)!==null&&a!==void 0?a:!1;if(u){if(v){const f=l.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){_.EventHelper.stop(o),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(o){_.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){_.EventHelper.stop(o,!0);const c=this.options[this.selected+1].isDisabled;if(c&&this.options.length>this.selected+2)this.selected+=2;else{if(c)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(o){this.selected>0&&(_.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){_.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){_.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){_.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){_.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 c=g.KeyCodeUtils.toString(o.keyCode);let a=-1;for(let l=0;l<this.options.length-1;l++)if(a=(l+this.selected+1)%this.options.length,this.options[a].text.charAt(0).toUpperCase()===c&&!this.options[a].isDisabled){this.select(a),this.selectList.setFocus([a]),this.selectList.reveal(this.selectList.getFocus()[0]),_.EventHelper.stop(o);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}e.SelectBoxList=d,d.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,d.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,d.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}),define(J[561],ee([1,0,560,555,68,17,393]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBox=void 0;class w extends L.Widget{constructor(S,g,m,s,t){super(),D.isMacintosh&&!t?.useCustomDrawn?this.selectBoxDelegate=new k.SelectBoxNative(S,g,s,t):this.selectBoxDelegate=new _.SelectBoxList(S,g,m,s,t),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(S,g){this.selectBoxDelegate.setOptions(S,g)}select(S){this.selectBoxDelegate.select(S)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(S){this.selectBoxDelegate.setFocusable(S)}render(S){this.selectBoxDelegate.render(S)}}e.SelectBox=w}),define(J[150],ee([1,0,47,191,7,57,302,561,40,2,17,18,532,255]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectActionViewItem=e.ActionViewItem=e.BaseActionViewItem=void 0;class i extends g.Disposable{get action(){return this._action}constructor(h,o,c={}){super(),this.options=c,this._context=h||this,this._action=o,o instanceof S.Action&&this._register(o.onDidChange(a=>{this.element&&this.handleActionChangeEvent(a)}))}handleActionChangeEvent(h){h.enabled!==void 0&&this.updateEnabled(),h.checked!==void 0&&this.updateChecked(),h.class!==void 0&&this.updateClass(),h.label!==void 0&&(this.updateLabel(),this.updateTooltip()),h.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new S.ActionRunner)),this._actionRunner}set actionRunner(h){this._actionRunner=h}isEnabled(){return this._action.enabled}setActionContext(h){this._context=h}render(h){const o=this.element=h;this._register(D.Gesture.addTarget(h));const c=this.options&&this.options.draggable;c&&(h.draggable=!0,_.isFirefox&&this._register((0,L.addDisposableListener)(h,L.EventType.DRAG_START,a=>{var l;return(l=a.dataTransfer)===null||l===void 0?void 0:l.setData(k.DataTransfers.TEXT,this._action.label)}))),this._register((0,L.addDisposableListener)(o,D.EventType.Tap,a=>this.onClick(a,!0))),this._register((0,L.addDisposableListener)(o,L.EventType.MOUSE_DOWN,a=>{c||L.EventHelper.stop(a,!0),this._action.enabled&&a.button===0&&o.classList.add("active")})),m.isMacintosh&&this._register((0,L.addDisposableListener)(o,L.EventType.CONTEXT_MENU,a=>{a.button===0&&a.ctrlKey===!0&&this.onClick(a)})),this._register((0,L.addDisposableListener)(o,L.EventType.CLICK,a=>{L.EventHelper.stop(a,!0),this.options&&this.options.isMenu||this.onClick(a)})),this._register((0,L.addDisposableListener)(o,L.EventType.DBLCLICK,a=>{L.EventHelper.stop(a,!0)})),[L.EventType.MOUSE_UP,L.EventType.MOUSE_OUT].forEach(a=>{this._register((0,L.addDisposableListener)(o,a,l=>{L.EventHelper.stop(l),o.classList.remove("active")}))})}onClick(h,o=!1){var c;L.EventHelper.stop(h,!0);const a=s.isUndefinedOrNull(this._context)?!((c=this.options)===null||c===void 0)&&c.useEventAsContext?h:{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(h){this.element&&(this.element.tabIndex=h?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var h;if(!this.element)return;const o=(h=this.getTooltip())!==null&&h!==void 0?h:"";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 h;if(this.element){const o=(h=this.getTooltip())!==null&&h!==void 0?h:"";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 n extends i{constructor(h,o,c){super(h,o,c),this.options=c,this.options.icon=c.icon!==void 0?c.icon:!1,this.options.label=c.label!==void 0?c.label:!0,this.cssClass=""}render(h){super.render(h),this.element&&(this.label=(0,L.append)(this.element,(0,L.$)("a.action-label"))),this.label&&this.label.setAttribute("role",this.getDefaultAriaRole()),this.options.label&&this.options.keybinding&&this.element&&((0,L.append)(this.element,(0,L.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===S.Separator.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(h){this.label&&(this.label.tabIndex=h?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let h=null;return this.action.tooltip?h=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(h=this.action.label,this.options.keybinding&&(h=t.localize(0,null,h,this.options.keybinding))),h??void 0}updateClass(){var h;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()):(h=this.label)===null||h===void 0||h.classList.remove("codicon")}updateEnabled(){var h,o;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(h=this.element)===null||h===void 0||h.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 h;if(this.label){const o=(h=this.getTooltip())!==null&&h!==void 0?h:"";this.label.setAttribute("aria-label",o)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.setAttribute("aria-checked",""),this.label.setAttribute("role",this.getDefaultAriaRole())))}}e.ActionViewItem=n;class r extends i{constructor(h,o,c,a,l,u,v){super(h,o),this.selectBox=new b.SelectBox(c,a,l,u,v),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(h){this.selectBox.select(h)}registerListeners(){this._register(this.selectBox.onDidSelect(h=>this.runAction(h.selected,h.index)))}runAction(h,o){this.actionRunner.run(this._action,this.getActionContext(h,o))}getActionContext(h,o){return h}setFocusable(h){this.selectBox.setFocusable(h)}focus(){var h;(h=this.selectBox)===null||h===void 0||h.focus()}blur(){var h;(h=this.selectBox)===null||h===void 0||h.blur()}render(h){this.selectBox.render(h)}}e.SelectActionViewItem=r}),define(J[69],ee([1,0,7,44,150,40,6,2,18,255]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class g extends b.Disposable{constructor(s,t={}){var i,n,r,d,h,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=(n=this.options.orientation)!==null&&n!==void 0?n:0,this._triggerKeys={keyDown:(d=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.keyDown)!==null&&d!==void 0?d:!1,keys:(o=(h=this.options.triggerKeys)===null||h===void 0?void 0:h.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(l=>this._onDidRun.fire(l))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(l=>this._onWillRun.fire(l))),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 c,a;switch(this._orientation){case 0:c=[15],a=[17];break;case 1:c=[16],a=[18],this.domNode.className+=" vertical";break}this._register(_.addDisposableListener(this.domNode,_.EventType.KEY_DOWN,l=>{const u=new k.StandardKeyboardEvent(l);let v=!0;const f=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;c&&(u.equals(c[0])||u.equals(c[1]))?v=this.focusPrevious():a&&(u.equals(a[0])||u.equals(a[1]))?v=this.focusNext():u.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():u.equals(14)?v=this.focusFirst():u.equals(13)?v=this.focusLast():u.equals(2)&&f instanceof L.BaseActionViewItem&&f.trapsArrowNavigation?v=this.focusNext():this.isTriggerKeyEvent(u)?this._triggerKeys.keyDown?this.doTrigger(u):this.triggerKeyDown=!0:v=!1,v&&(u.preventDefault(),u.stopPropagation())})),this._register(_.addDisposableListener(this.domNode,_.EventType.KEY_UP,l=>{const u=new k.StandardKeyboardEvent(l);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(_.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(_.getActiveElement()===this.domNode||!_.isAncestor(_.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),s.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(s){if(this.focusable=s,this.focusable){const t=this.viewItems.find(i=>i instanceof L.BaseActionViewItem&&i.isEnabled());t instanceof L.BaseActionViewItem&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof L.BaseActionViewItem&&t.setFocusable(!1)})}isTriggerKeyEvent(s){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||s.equals(i)}),t}updateFocusedItem(){for(let s=0;s<this.actionsList.children.length;s++){const t=this.actionsList.children[s];if(_.isAncestor(_.getActiveElement(),t)){this.focusedItem=s;break}}}get context(){return this._context}set context(s){this._context=s,this.viewItems.forEach(t=>t.setActionContext(s))}get actionRunner(){return this._actionRunner}set actionRunner(s){this._actionRunner=s,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=s)}getContainer(){return this.domNode}getAction(s){var t;if(typeof s=="number")return(t=this.viewItems[s])===null||t===void 0?void 0:t.action;if(s instanceof HTMLElement){for(;s.parentElement!==this.actionsList;){if(!s.parentElement)return;s=s.parentElement}for(let i=0;i<this.actionsList.childNodes.length;i++)if(this.actionsList.childNodes[i]===s)return this.viewItems[i].action}}push(s,t={}){const i=Array.isArray(s)?s:[s];let n=S.isNumber(t.index)?t.index:null;i.forEach(r=>{const d=document.createElement("li");d.className="action-item",d.setAttribute("role","presentation");let h;const o=Object.assign({hoverDelegate:this.options.hoverDelegate},t);this.options.actionViewItemProvider&&(h=this.options.actionViewItemProvider(r,o)),h||(h=new L.ActionViewItem(this.context,r,o)),this.options.allowContextMenu||this.viewItemDisposables.set(h,_.addDisposableListener(d,_.EventType.CONTEXT_MENU,c=>{_.EventHelper.stop(c,!0)})),h.actionRunner=this._actionRunner,h.setActionContext(this.context),h.render(d),this.focusable&&h instanceof L.BaseActionViewItem&&this.viewItems.length===0&&h.setFocusable(!0),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(d),this.viewItems.push(h)):(this.actionsList.insertBefore(d,this.actionsList.children[n]),this.viewItems.splice(n,0,h),n++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,b.dispose)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),_.clearNode(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(s){let t=!1,i;if(s===void 0?t=!0:typeof s=="number"?i=s:typeof s=="boolean"&&(t=s),t&&typeof this.focusedItem>"u"){const n=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=n===-1?void 0:n,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(s){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(!s&&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(s){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(!s&&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(s,t,i=!1){var n;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((n=this.viewItems[this.previouslyFocusedItem])===null||n===void 0||n.blur());const r=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(r){let d=!0;S.isFunction(r.focus)||(d=!1),this.options.focusOnlyEnabledItems&&S.isFunction(r.isEnabled)&&!r.isEnabled()&&(d=!1),r.action.id===D.Separator.ID&&(d=!1),d?(i||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(s),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(s){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof L.BaseActionViewItem){const i=t._context===null||t._context===void 0?s:t._context;this.run(t._action,i)}}run(s,t){return we(this,void 0,void 0,function*(){yield this._actionRunner.run(s,t)})}dispose(){this._context=void 0,this.viewItems=(0,b.dispose)(this.viewItems),this.getContainer().remove(),super.dispose()}}e.ActionBar=g}),define(J[303],ee([1,0,7,150,552,6,256]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class w extends k.BaseActionViewItem{constructor(S,g,m,s=Object.create(null)){super(null,S,s),this.actionItem=null,this._onDidChangeVisibility=this._register(new D.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=g,this.contextMenuProvider=m,this.options=s,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(S){this.actionItem=S;const g=t=>{this.element=(0,_.append)(t,(0,_.$)("a.action-label"));let i=[];return typeof this.options.classNames=="string"?i=this.options.classNames.split(/\\s+/g).filter(n=>!!n):this.options.classNames&&(i=this.options.classNames),i.find(n=>n==="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),s={contextMenuProvider:this.contextMenuProvider,labelRenderer:g,menuAsChild:this.options.menuAsChild,actions:m?this.menuActionsOrProvider:void 0,actionProvider:m?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new L.DropdownMenu(S,s)),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 S=null;return this.action.tooltip?S=this.action.tooltip:this.action.label&&(S=this.action.label),S??void 0}setActionContext(S){super.setActionContext(S),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=S:this.dropdownMenu.menuOptions={context:S})}show(){var S;(S=this.dropdownMenu)===null||S===void 0||S.show()}updateEnabled(){var S,g;const m=!this.action.enabled;(S=this.actionItem)===null||S===void 0||S.classList.toggle("disabled",m),(g=this.element)===null||g===void 0||g.classList.toggle("disabled",m)}}e.DropdownMenuActionViewItem=w}),define(J[219],ee([1,0,7,78,292,69,48,79,68,6,375,45,537,387]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=e.unthemedInboxStyles=void 0;const i=_.$;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 n extends S.Widget{constructor(h,o,c){var a;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new g.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new g.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=o,this.options=c,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=_.append(h,i(".monaco-inputbox.idle"));const l=this.options.flexibleHeight?"textarea":"input",u=_.append(this.element,i(".ibwrapper"));if(this.input=_.append(u,i(l+".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=_.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"),_.append(h,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(p=>this.input.scrollTop=p.scrollTop));const v=this._register(new k.DomEmitter(document,"selectionchange")),f=g.Event.filter(v.event,()=>{const p=document.getSelection();return p?.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(h){this.placeholder=h,this.input.setAttribute("placeholder",h)}setTooltip(h){this.tooltip=h,this.input.title=h}get inputElement(){return this.input}get value(){return this.input.value}set value(h){this.input.value!==h&&(this.input.value=h,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:_.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(h=null){this.input.select(),h&&(this.input.setSelectionRange(h.start,h.end),h.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(h){this.input.style.width=`calc(100% - ${h}px)`,this.mirror&&(this.mirror.style.paddingRight=h+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const h=this.cachedContentHeight,o=this.cachedHeight,c=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:h,height:o}),this.scrollableElement.setScrollPosition({scrollTop:c})}showMessage(h,o){if(this.state==="open"&&(0,s.equals)(this.message,h))return;this.message=h,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(h.type));const c=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${_.asCssValueWithDefault(c.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 h=null;return this.validation&&(h=this.validation(this.value),h?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(h)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),h?.type}stylesForType(h){const o=this.options.inputBoxStyles;switch(h){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(h){switch(h){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let h;const o=()=>h.style.width=_.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:a=>{var l,u;if(!this.message)return null;h=_.append(a,i(".monaco-inputbox-container")),o();const v={inline:!0,className:"monaco-inputbox-message"},f=this.message.formatContent?(0,L.renderFormattedText)(this.message.content,v):(0,L.renderText)(this.message.content,v);f.classList.add(this.classForType(this.message.type));const p=this.stylesForType(this.message.type);return f.style.backgroundColor=(l=p.background)!==null&&l!==void 0?l:"",f.style.color=(u=p.foreground)!==null&&u!==void 0?u:"",f.style.border=p.border?`1px solid ${p.border}`:"",_.append(h,f),null},onHide:()=>{this.state="closed"},layout:o});let c;this.message.type===3?c=t.localize(0,null,this.message.content):this.message.type===2?c=t.localize(1,null,this.message.content):c=t.localize(2,null,this.message.content),w.alert(c),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 h=this.value,c=h.charCodeAt(h.length-1)===10?" ":"";(h+c).replace(/\\u000c/g,"")?this.mirror.textContent=h+c:this.mirror.innerText="\\xA0",this.layout()}applyStyles(){var h,o,c;const a=this.options.inputBoxStyles,l=(h=a.inputBackground)!==null&&h!==void 0?h:"",u=(o=a.inputForeground)!==null&&o!==void 0?o:"",v=(c=a.inputBorder)!==null&&c!==void 0?c:"";this.element.style.backgroundColor=l,this.element.style.color=u,this.input.style.backgroundColor="inherit",this.input.style.color=u,this.element.style.border=`1px solid ${_.asCssValueWithDefault(v,"transparent")}`}layout(){if(!this.mirror)return;const h=this.cachedContentHeight;this.cachedContentHeight=_.getTotalHeight(this.mirror),h!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(h){const o=this.inputElement,c=o.selectionStart,a=o.selectionEnd,l=o.value;c!==null&&a!==null&&(this.value=l.substr(0,c)+h+l.substr(a),o.setSelectionRange(c+1,c+1),this.layout())}dispose(){var h;this._hideMessage(),this.message=null,(h=this.actionbar)===null||h===void 0||h.dispose(),super.dispose()}}e.InputBox=n;class r extends n{constructor(h,o,c){const a=t.localize(3,null),l=` or \\u21C5 ${a}`,u=` (\\u21C5 ${a})`;super(h,o,c),this._onDidFocus=this._register(new g.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new g.Emitter),this.onDidBlur=this._onDidBlur.event,this.history=new m.HistoryNavigator(c.history,100);const v=()=>{if(c.showHistoryHint&&c.showHistoryHint()&&!this.placeholder.endsWith(l)&&!this.placeholder.endsWith(u)&&this.history.getHistory().length){const f=this.placeholder.endsWith(")")?l:u,p=this.placeholder+f;c.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=p:this.setPlaceHolder(p)}};this.observer=new MutationObserver((f,p)=>{f.forEach(C=>{C.target.textContent||v()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>v()),this.onblur(this.input,()=>{const f=p=>{if(this.placeholder.endsWith(p)){const C=this.placeholder.slice(0,this.placeholder.length-p.length);return c.showPlaceholderOnFocus?this.placeholder=C:this.setPlaceHolder(C),!0}else return!1};f(u)||f(l)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(h){this.value&&(h||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 h=this.getNextValue();h&&(h=h===this.value?this.getNextValue():h),this.value=h??"",w.status(this.value?this.value:t.localize(4,null))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let h=this.getPreviousValue();h&&(h=h===this.value?this.getPreviousValue():h),h&&(this.value=h,w.status(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let h=this.history.current();return h||(h=this.history.last(),this.history.next()),h}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}e.HistoryInputBox=r}),define(J[220],ee([1,0,7,300,219,68,6,533,2,257]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const g=b.localize(0,null);class m extends D.Widget{constructor(t,i,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=new S.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=n.placeholder||"",this.validation=n.validation,this.label=n.label||g,this.showCommonFindToggles=!!n.showCommonFindToggles;const r=n.appendCaseSensitiveLabel||"",d=n.appendWholeWordsLabel||"",h=n.appendRegexLabel||"",o=n.history||[],c=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new L.HistoryInputBox(this.domNode,i,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:o,showHistoryHint:n.showHistoryHint,flexibleHeight:c,flexibleWidth:a,flexibleMaxHeight:l,inputBoxStyles:n.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new k.RegexToggle(Object.assign({appendTitle:h,isChecked:!1},n.toggleStyles))),this._register(this.regex.onChange(v=>{this._onDidOptionChange.fire(v),!v&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(v=>{this._onRegexKeyDown.fire(v)})),this.wholeWords=this._register(new k.WholeWordsToggle(Object.assign({appendTitle:d,isChecked:!1},n.toggleStyles))),this._register(this.wholeWords.onChange(v=>{this._onDidOptionChange.fire(v),!v&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new k.CaseSensitiveToggle(Object.assign({appendTitle:r,isChecked:!1},n.toggleStyles))),this._register(this.caseSensitive.onChange(v=>{this._onDidOptionChange.fire(v),!v&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(v=>{this._onCaseSensitiveKeyDown.fire(v)}));const u=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,v=>{if(v.equals(15)||v.equals(17)||v.equals(9)){const f=u.indexOf(document.activeElement);if(f>=0){let p=-1;v.equals(17)?p=(f+1)%u.length:v.equals(15)&&(f===0?p=u.length-1:p=f-1),v.equals(9)?(u[f].blur(),this.inputBox.focus()):p>=0&&u[p].focus(),_.EventHelper.stop(v,!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(n?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),t?.appendChild(this.domNode),this._register(_.addDisposableListener(this.inputBox.inputElement,"compositionstart",u=>{this.imeSessionInProgress=!0})),this._register(_.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,n;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(),(n=this.caseSensitive)===null||n===void 0||n.enable();for(const r of this.additionalToggles)r.enable()}disable(){var t,i,n;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(),(n=this.caseSensitive)===null||n===void 0||n.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 S.DisposableStore;for(const i of t??[])this.additionalTogglesDisposables.add(i),this.controls.appendChild(i.domNode),this.additionalTogglesDisposables.add(i.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(i);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(t=!1){var i,n,r,d,h,o;t?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((n=(i=this.caseSensitive)===null||i===void 0?void 0:i.width())!==null&&n!==void 0?n:0)+((d=(r=this.wholeWords)===null||r===void 0?void 0:r.width())!==null&&d!==void 0?d:0)+((o=(h=this.regex)===null||h===void 0?void 0:h.width())!==null&&o!==void 0?o:0)+this.additionalToggles.reduce((c,a)=>c+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[562],ee([1,0,7,149,219,68,26,6,535,257]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=void 0;const g=S.localize(0,null),m=S.localize(1,null);class s extends k.Toggle{constructor(n){super({icon:w.Codicon.preserveCase,title:m+n.appendTitle,isChecked:n.isChecked,inputActiveOptionBorder:n.inputActiveOptionBorder,inputActiveOptionForeground:n.inputActiveOptionForeground,inputActiveOptionBackground:n.inputActiveOptionBackground})}}class t extends D.Widget{constructor(n,r,d,h){super(),this._showOptionButtons=d,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=h.placeholder||"",this.validation=h.validation,this.label=h.label||g;const o=h.appendPreserveCaseLabel||"",c=h.history||[],a=!!h.flexibleHeight,l=!!h.flexibleWidth,u=h.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new L.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:c,showHistoryHint:h.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:u,inputBoxStyles:h.inputBoxStyles})),this.preserveCase=this._register(new s(Object.assign({appendTitle:o,isChecked:!1},h.toggleStyles))),this._register(this.preserveCase.onChange(p=>{this._onDidOptionChange.fire(p),!p&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(p=>{this._onPreserveCaseKeyDown.fire(p)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const v=[this.preserveCase.domNode];this.onkeydown(this.domNode,p=>{if(p.equals(15)||p.equals(17)||p.equals(9)){const C=v.indexOf(document.activeElement);if(C>=0){let y=-1;p.equals(17)?y=(C+1)%v.length:p.equals(15)&&(C===0?y=v.length-1:y=C-1),p.equals(9)?(v[C].blur(),this.inputBox.focus()):y>=0&&v[y].focus(),_.EventHelper.stop(p,!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),n?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,p=>this._onKeyDown.fire(p)),this.onkeyup(this.inputBox.inputElement,p=>this._onKeyUp.fire(p)),this.oninput(this.inputBox.inputElement,p=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,p=>this._onMouseDown.fire(p))}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(n){n?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(n){this.preserveCase.checked=n}focusOnPreserve(){this.preserveCase.focus()}validate(){var n;(n=this.inputBox)===null||n===void 0||n.validate()}set width(n){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=n+"px"}dispose(){super.dispose()}}e.ReplaceInput=t}),define(J[563],ee([1,0,47,57,7,44,67,69,150,293,79,40,14,26,31,115,2,17,9]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,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 c;(function(y){y[y.Right=0]="Right",y[y.Left=1]="Left"})(c||(e.Direction=c={}));class a extends b.ActionBar{constructor(E,I,T,O){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:P=>this.doGetActionViewItem(P,T,M),context:T.context,actionRunner:T.actionRunner,ariaLabel:T.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...h.isMacintosh||h.isLinux?[10]:[]],keyDown:!0}}),this.menuStyles=O,this.menuElement=R,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new d.DisposableStore),this.initializeOrUpdateStyleSheet(E,O),this._register(k.Gesture.addTarget(R)),(0,L.addDisposableListener)(R,L.EventType.KEY_DOWN,P=>{new D.StandardKeyboardEvent(P).equals(2)&&P.preventDefault()}),T.enableMnemonics&&this.menuDisposables.add((0,L.addDisposableListener)(R,L.EventType.KEY_DOWN,P=>{const x=P.key.toLocaleLowerCase();if(this.mnemonics.has(x)){L.EventHelper.stop(P,!0);const F=this.mnemonics.get(x);if(F.length===1&&(F[0]instanceof u&&F[0].container&&this.focusItemByElement(F[0].container),F[0].onClick(P)),F.length>1){const B=F.shift();B&&B.container&&(this.focusItemByElement(B.container),F.push(B)),this.mnemonics.set(x,F)}}})),h.isLinux&&this._register((0,L.addDisposableListener)(R,L.EventType.KEY_DOWN,P=>{const x=new D.StandardKeyboardEvent(P);x.equals(14)||x.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),L.EventHelper.stop(P,!0)):(x.equals(13)||x.equals(12))&&(this.focusedItem=0,this.focusPrevious(),L.EventHelper.stop(P,!0))})),this._register((0,L.addDisposableListener)(this.domNode,L.EventType.MOUSE_OUT,P=>{const x=P.relatedTarget;(0,L.isAncestor)(x,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),P.stopPropagation())})),this._register((0,L.addDisposableListener)(this.actionsList,L.EventType.MOUSE_OVER,P=>{let x=P.target;if(!(!x||!(0,L.isAncestor)(x,this.actionsList)||x===this.actionsList)){for(;x.parentElement!==this.actionsList&&x.parentElement!==null;)x=x.parentElement;if(x.classList.contains("action-item")){const F=this.focusedItem;this.setFocusedItem(x),F!==this.focusedItem&&this.updateFocus()}}})),this._register(k.Gesture.addTarget(this.actionsList)),this._register((0,L.addDisposableListener)(this.actionsList,k.EventType.Tap,P=>{let x=P.initialTarget;if(!(!x||!(0,L.isAncestor)(x,this.actionsList)||x===this.actionsList)){for(;x.parentElement!==this.actionsList&&x.parentElement!==null;)x=x.parentElement;if(x.classList.contains("action-item")){const F=this.focusedItem;this.setFocusedItem(x),F!==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,O),this._register((0,L.addDisposableListener)(R,k.EventType.Change,P=>{L.EventHelper.stop(P,!0);const x=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:x-P.translationY})})),this._register((0,L.addDisposableListener)(N,L.EventType.MOUSE_UP,P=>{P.preventDefault()})),R.style.maxHeight=`${Math.max(10,window.innerHeight-E.getBoundingClientRect().top-35)}px`,I=I.filter(P=>{var x;return!((x=T.submenuIds)===null||x===void 0)&&x.has(P.id)?(console.warn(`Found submenu cycle: ${P.id}`),!1):!0}),this.push(I,{icon:!0,label:!0,isMenu:!0}),E.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(P=>!(P instanceof v)).forEach((P,x,F)=>{P.updatePositionInSet(x+1,F.length)})}initializeOrUpdateStyleSheet(E,I){this.styleSheet||((0,L.isInShadowDOM)(E)?this.styleSheet=(0,L.createStyleSheet)(E):(a.globalStyleSheet||(a.globalStyleSheet=(0,L.createStyleSheet)()),this.styleSheet=a.globalStyleSheet)),this.styleSheet.textContent=C(I,(0,L.isInShadowDOM)(E))}styleScrollElement(E,I){var T,O;const R=(T=I.foregroundColor)!==null&&T!==void 0?T:"",M=(O=I.backgroundColor)!==null&&O!==void 0?O:"",N=I.borderColor?`1px solid ${I.borderColor}`:"",P="5px",x=I.shadowColor?`0 2px 8px ${I.shadowColor}`:"";E.style.outline=N,E.style.borderRadius=P,E.style.color=R,E.style.backgroundColor=M,E.style.boxShadow=x}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 s.Separator)return new v(I.context,E,{icon:!0},this.menuStyles);if(E instanceof s.SubmenuAction){const O=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=O.getMnemonic();if(R&&O.isEnabled()){let M=[];this.mnemonics.has(R)&&(M=this.mnemonics.get(R)),M.push(O),this.mnemonics.set(R,M)}}return O}else{const O={enableMnemonics:I.enableMnemonics,useEventAsContext:I.useEventAsContext};if(I.getKeyBinding){const M=I.getKeyBinding(E);if(M){const N=M.getLabel();N&&(O.keybinding=N)}}const R=new l(I.context,E,O,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 l extends S.BaseActionViewItem{constructor(E,I,T,O){if(T.isMenu=!0,super(I,I,T),this.menuStyle=O,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,L.addDisposableListener)(this.element,L.EventType.MOUSE_UP,R=>{if(L.EventHelper.stop(R,!0),_.isFirefox){if(new w.StandardMouseEvent(R).rightButton)return;this.onClick(R)}else setTimeout(()=>{this.onClick(R)},0)})),this._register((0,L.addDisposableListener)(this.element,L.EventType.CONTEXT_MENU,R=>{L.EventHelper.stop(R,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(E){super.render(E),this.element&&(this.container=E,this.item=(0,L.append)(this.element,(0,L.$)("a.action-menu-item")),this._action.id===s.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,L.append)(this.item,(0,L.$)("span.menu-item-check"+n.ThemeIcon.asCSSSelector(i.Codicon.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,L.append)(this.item,(0,L.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,L.append)(this.item,(0,L.$)("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,L.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 O=e.MENU_MNEMONIC_REGEX.exec(I);if(O){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,L.$)("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",(O[1]?O[1]:O[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,O=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=O,this.item.style.outlineOffset=R),this.check&&(this.check.style.color=I??"")}}class u extends l{constructor(E,I,T,O,R){super(E,E,O,R),this.submenuActions=I,this.parentData=T,this.submenuOptions=O,this.mysubmenu=null,this.submenuDisposables=this._register(new d.DisposableStore),this.mouseOver=!1,this.expandDirection=O&&O.expandDirection!==void 0?O.expandDirection:c.Right,this.showScheduler=new t.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new t.RunOnceScheduler(()=>{this.element&&!(0,L.isAncestor)((0,L.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,L.append)(this.item,(0,L.$)("span.submenu-indicator"+n.ThemeIcon.asCSSSelector(i.Codicon.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,L.addDisposableListener)(this.element,L.EventType.KEY_UP,I=>{const T=new D.StandardKeyboardEvent(I);(T.equals(17)||T.equals(3))&&(L.EventHelper.stop(I,!0),this.createSubmenu(!0))})),this._register((0,L.addDisposableListener)(this.element,L.EventType.KEY_DOWN,I=>{const T=new D.StandardKeyboardEvent(I);(0,L.getActiveElement)()===this.item&&(T.equals(17)||T.equals(3))&&L.EventHelper.stop(I,!0)})),this._register((0,L.addDisposableListener)(this.element,L.EventType.MOUSE_OVER,I=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,L.addDisposableListener)(this.element,L.EventType.MOUSE_LEAVE,I=>{this.mouseOver=!1})),this._register((0,L.addDisposableListener)(this.element,L.EventType.FOCUS_OUT,I=>{this.element&&!(0,L.isAncestor)((0,L.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){L.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,O){const R={top:0,left:0};return R.left=(0,g.layout)(E.width,I.width,{position:O===c.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,g.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,L.append)(this.element,(0,L.$)("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 s.EmptySubmenuAction],this.submenuOptions,this.menuStyle);const O=this.element.getBoundingClientRect(),R={top:O.top-T,left:O.left,height:O.height+2*T,width:O.width},M=this.submenuContainer.getBoundingClientRect(),{top:N,left:P}=this.calculateSubmenuMenuLayout(new L.Dimension(window.innerWidth,window.innerHeight),L.Dimension.lift(M),R,this.expandDirection);this.submenuContainer.style.left=`${P-M.left}px`,this.submenuContainer.style.top=`${N-M.top}px`,this.submenuDisposables.add((0,L.addDisposableListener)(this.submenuContainer,L.EventType.KEY_UP,x=>{new D.StandardKeyboardEvent(x).equals(15)&&(L.EventHelper.stop(x,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,L.addDisposableListener)(this.submenuContainer,L.EventType.KEY_DOWN,x=>{new D.StandardKeyboardEvent(x).equals(15)&&L.EventHelper.stop(x,!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 v extends S.ActionViewItem{constructor(E,I,T,O){super(E,I,T),this.menuStyles=O}render(E){super.render(E),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function f(y){const E=e.MENU_MNEMONIC_REGEX,I=E.exec(y);if(!I)return y;const T=!I[1];return y.replace(E,T?"$2$3":"").trim()}e.cleanMnemonic=f;function p(y){const E=(0,i.getCodiconFontCharacters)()[y.id];return`.codicon-${y.id}:before { content: \'\\\\${E.toString(16)}\'; }`}e.formatRule=p;function C(y,E){let I=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${p(i.Codicon.menuSelection)}\n${p(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=y.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 O=y.scrollbarSliderBackground;O&&(I+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${O};\n\t\t\t\t}\n\t\t\t`);const R=y.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=y.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[564],ee([1,0,69,303,40,26,31,6,2,18,540,398]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class s extends S.Disposable{constructor(n,r,d={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new b.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new S.DisposableStore,this.options=d,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new t(()=>{var h;return(h=this.toggleMenuActionViewItem)===null||h===void 0?void 0:h.show()},d.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",n.appendChild(this.element),this.actionBar=this._register(new _.ActionBar(this.element,{orientation:d.orientation,ariaLabel:d.ariaLabel,actionRunner:d.actionRunner,allowContextMenu:d.allowContextMenu,actionViewItemProvider:(h,o)=>{var c;if(h.id===t.ID)return this.toggleMenuActionViewItem=new k.DropdownMenuActionViewItem(h,h.menuActions,r,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:w.ThemeIcon.asClassNameArray((c=d.moreIcon)!==null&&c!==void 0?c: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(d.actionViewItemProvider){const a=d.actionViewItemProvider(h,o);if(a)return a}if(h instanceof L.SubmenuAction){const a=new k.DropdownMenuActionViewItem(h,h.actions,r,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:h.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(n){this.actionBar.actionRunner=n}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(n){return this.actionBar.getAction(n)}setActions(n,r){this.clear();const d=n?n.slice(0):[];this.hasSecondaryActions=!!(r&&r.length>0),this.hasSecondaryActions&&r&&(this.toggleMenuAction.menuActions=r.slice(0),d.push(this.toggleMenuAction)),d.forEach(h=>{this.actionBar.push(h,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(h)})})}getKeybindingLabel(n){var r,d;const h=this.lookupKeybindings?(d=(r=this.options).getKeyBinding)===null||d===void 0?void 0:d.call(r,n):void 0;return(0,g.withNullAsUndefined)(h?.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}e.ToolBar=s;class t extends L.Action{constructor(n,r){r=r||m.localize(0,null),super(t.ID,r,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=n}run(){return we(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(n){this._menuActions=n}}e.ToggleMenuAction=t,t.ID="toolbar.toggle.more"}),define(J[178],ee([1,0,7,78,44,69,220,219,216,109,149,211,133,40,16,14,26,31,369,6,64,2,135,18,541,399]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,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 p extends S.ElementsDragAndDropData{constructor(W){super(W.elements.map($=>$.element)),this.data=W}}function C(H){return H instanceof S.ElementsDragAndDropData?new p(H):H}class y{constructor(W,$){this.modelProvider=W,this.dnd=$,this.autoExpandDisposable=l.Disposable.None}getDragURI(W){return this.dnd.getDragURI(W.element)}getDragLabel(W,$){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(W.map(Z=>Z.element),$)}onDragStart(W,$){var Z,Q;(Q=(Z=this.dnd).onDragStart)===null||Q===void 0||Q.call(Z,C(W),$)}onDragOver(W,$,Z,Q,re=!0){const ce=this.dnd.onDragOver(C(W),$&&$.element,Z,Q),he=this.autoExpandNode!==$;if(he&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=$),typeof $>"u")return ce;if(he&&typeof ce!="boolean"&&ce.autoExpand&&(this.autoExpandDisposable=(0,r.disposableTimeout)(()=>{const U=this.modelProvider(),X=U.getNodeLocation($);U.isCollapsed(X)&&U.setCollapsed(X,!1),this.autoExpandNode=void 0},500)),typeof ce=="boolean"||!ce.accept||typeof ce.bubble>"u"||ce.feedback){if(!re){const U=typeof ce=="boolean"?ce:ce.accept,X=typeof ce=="boolean"?void 0:ce.effect;return{accept:U,effect:X,feedback:[Z]}}return ce}if(ce.bubble===1){const U=this.modelProvider(),X=U.getNodeLocation($),te=U.getParentNodeLocation(X),G=U.getNode(te),ae=te&&U.getListIndex(te);return this.onDragOver(W,G,ae,Q,!1)}const de=this.modelProvider(),ue=de.getNodeLocation($),q=de.getListIndex(ue),z=de.getListRenderCount(ue);return Object.assign(Object.assign({},ce),{feedback:(0,n.range)(q,q+z)})}drop(W,$,Z,Q){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(C(W),$&&$.element,Z,Q)}onDragEnd(W){var $,Z;(Z=($=this.dnd).onDragEnd)===null||Z===void 0||Z.call($,W)}}function E(H,W){return W&&Object.assign(Object.assign({},W),{identityProvider:W.identityProvider&&{getId($){return W.identityProvider.getId($.element)}},dnd:W.dnd&&new y(H,W.dnd),multipleSelectionController:W.multipleSelectionController&&{isSelectionSingleChangeEvent($){return W.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},$),{element:$.element}))},isSelectionRangeChangeEvent($){return W.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},$),{element:$.element}))}},accessibilityProvider:W.accessibilityProvider&&Object.assign(Object.assign({},W.accessibilityProvider),{getSetSize($){const Z=H(),Q=Z.getNodeLocation($),re=Z.getParentNodeLocation(Q);return Z.getNode(re).visibleChildrenCount},getPosInSet($){return $.visibleChildIndex+1},isChecked:W.accessibilityProvider&&W.accessibilityProvider.isChecked?$=>W.accessibilityProvider.isChecked($.element):void 0,getRole:W.accessibilityProvider&&W.accessibilityProvider.getRole?$=>W.accessibilityProvider.getRole($.element):()=>"treeitem",getAriaLabel($){return W.accessibilityProvider.getAriaLabel($.element)},getWidgetAriaLabel(){return W.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:W.accessibilityProvider&&W.accessibilityProvider.getWidgetRole?()=>W.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:W.accessibilityProvider&&W.accessibilityProvider.getAriaLevel?$=>W.accessibilityProvider.getAriaLevel($.element):$=>$.depth,getActiveDescendantId:W.accessibilityProvider.getActiveDescendantId&&($=>W.accessibilityProvider.getActiveDescendantId($.element))}),keyboardNavigationLabelProvider:W.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},W.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel($){return W.keyboardNavigationLabelProvider.getKeyboardNavigationLabel($.element)}})})}class I{constructor(W){this.delegate=W}getHeight(W){return this.delegate.getHeight(W.element)}getTemplateId(W){return this.delegate.getTemplateId(W.element)}hasDynamicHeight(W){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(W.element)}setDynamicHeight(W,$){var Z,Q;(Q=(Z=this.delegate).setDynamicHeight)===null||Q===void 0||Q.call(Z,W.element,$)}}e.ComposedTreeDelegate=I;var T;(function(H){H.None="none",H.OnHover="onHover",H.Always="always"})(T||(e.RenderIndentGuides=T={}));class O{get elements(){return this._elements}constructor(W,$=[]){this._elements=$,this.disposables=new l.DisposableStore,this.onDidChange=c.Event.forEach(W,Z=>this._elements=Z,this.disposables)}dispose(){this.disposables.dispose()}}class R{constructor(W,$,Z,Q,re,ce={}){var he;this.renderer=W,this.modelProvider=$,this.activeNodes=Q,this.renderedIndentGuides=re,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=R.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=l.Disposable.None,this.disposables=new l.DisposableStore,this.templateId=W.templateId,this.updateOptions(ce),c.Event.map(Z,de=>de.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(he=W.onDidChangeTwistieState)===null||he===void 0||he.call(W,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(W={}){if(typeof W.indent<"u"){const $=(0,u.clamp)(W.indent,0,40);if($!==this.indent){this.indent=$;for(const[Z,Q]of this.renderedNodes)this.renderTreeElement(Z,Q)}}if(typeof W.renderIndentGuides<"u"){const $=W.renderIndentGuides!==T.None;if($!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=$;for(const[Z,Q]of this.renderedNodes)this._renderIndentGuides(Z,Q);if(this.indentGuidesDisposable.dispose(),$){const Z=new l.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,Z),this.indentGuidesDisposable=Z,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof W.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=W.hideTwistiesOfChildlessElements)}renderTemplate(W){const $=(0,_.append)(W,(0,_.$)(".monaco-tl-row")),Z=(0,_.append)($,(0,_.$)(".monaco-tl-indent")),Q=(0,_.append)($,(0,_.$)(".monaco-tl-twistie")),re=(0,_.append)($,(0,_.$)(".monaco-tl-contents")),ce=this.renderer.renderTemplate(re);return{container:W,indent:Z,twistie:Q,indentGuidesDisposable:l.Disposable.None,templateData:ce}}renderElement(W,$,Z,Q){this.renderedNodes.set(W,Z),this.renderedElements.set(W.element,W),this.renderTreeElement(W,Z),this.renderer.renderElement(W,$,Z.templateData,Q)}disposeElement(W,$,Z,Q){var re,ce;Z.indentGuidesDisposable.dispose(),(ce=(re=this.renderer).disposeElement)===null||ce===void 0||ce.call(re,W,$,Z.templateData,Q),typeof Q=="number"&&(this.renderedNodes.delete(W),this.renderedElements.delete(W.element))}disposeTemplate(W){this.renderer.disposeTemplate(W.templateData)}onDidChangeTwistieState(W){const $=this.renderedElements.get(W);$&&this.onDidChangeNodeTwistieState($)}onDidChangeNodeTwistieState(W){const $=this.renderedNodes.get(W);$&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(W,$))}renderTreeElement(W,$){const Z=R.DefaultIndent+(W.depth-1)*this.indent;$.twistie.style.paddingLeft=`${Z}px`,$.indent.style.width=`${Z+this.indent-16}px`,W.collapsible?$.container.setAttribute("aria-expanded",String(!W.collapsed)):$.container.removeAttribute("aria-expanded"),$.twistie.classList.remove(...h.ThemeIcon.asClassNameArray(d.Codicon.treeItemExpanded));let Q=!1;this.renderer.renderTwistie&&(Q=this.renderer.renderTwistie(W.element,$.twistie)),W.collapsible&&(!this.hideTwistiesOfChildlessElements||W.visibleChildrenCount>0)?(Q||$.twistie.classList.add(...h.ThemeIcon.asClassNameArray(d.Codicon.treeItemExpanded)),$.twistie.classList.add("collapsible"),$.twistie.classList.toggle("collapsed",W.collapsed)):$.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(W,$)}_renderIndentGuides(W,$){if((0,_.clearNode)($.indent),$.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const Z=new l.DisposableStore,Q=this.modelProvider();for(;;){const re=Q.getNodeLocation(W),ce=Q.getParentNodeLocation(re);if(!ce)break;const he=Q.getNode(ce),de=(0,_.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(he)&&de.classList.add("active"),$.indent.childElementCount===0?$.indent.appendChild(de):$.indent.insertBefore(de,$.indent.firstElementChild),this.renderedIndentGuides.add(he,de),Z.add((0,l.toDisposable)(()=>this.renderedIndentGuides.delete(he,de))),W=he}$.indentGuidesDisposable=Z}_onDidChangeActiveNodes(W){if(!this.shouldRenderIndentGuides)return;const $=new Set,Z=this.modelProvider();W.forEach(Q=>{const re=Z.getNodeLocation(Q);try{const ce=Z.getParentNodeLocation(re);Q.collapsible&&Q.children.length>0&&!Q.collapsed?$.add(Q):ce&&$.add(Z.getNode(ce))}catch{}}),this.activeIndentNodes.forEach(Q=>{$.has(Q)||this.renderedIndentGuides.forEach(Q,re=>re.classList.remove("active"))}),$.forEach(Q=>{this.activeIndentNodes.has(Q)||this.renderedIndentGuides.forEach(Q,re=>re.classList.add("active"))}),this.activeIndentNodes=$}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,l.dispose)(this.disposables)}}R.DefaultIndent=8;class M{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(W,$,Z){this.tree=W,this.keyboardNavigationLabelProvider=$,this._filter=Z,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new l.DisposableStore,W.onWillRefilter(this.reset,this,this.disposables)}filter(W,$){let Z=1;if(this._filter){const ce=this._filter.filter(W,$);if(typeof ce=="boolean"?Z=ce?1:0:(0,s.isFilterResult)(ce)?Z=(0,s.getVisibleState)(ce.visibility):Z=ce,Z===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:a.FuzzyScore.Default,visibility:Z};const Q=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(W),re=Array.isArray(Q)?Q:[Q];for(const ce of re){const he=ce&&ce.toString();if(typeof he>"u")return{data:a.FuzzyScore.Default,visibility:Z};let de;if(this.tree.findMatchType===B.Contiguous){const ue=he.toLowerCase().indexOf(this._lowercasePattern);if(ue>-1){de=[Number.MAX_SAFE_INTEGER,0];for(let q=this._lowercasePattern.length;q>0;q--)de.push(ue+q-1)}}else de=(0,a.fuzzyScore)(this._pattern,this._lowercasePattern,0,he,he.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(de)return this._matchCount++,re.length===1?{data:de,visibility:Z}:{data:{label:he,score:de},visibility:Z}}return this.tree.findMode===F.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(W):2:{data:a.FuzzyScore.Default,visibility:Z}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,l.dispose)(this.disposables)}}class N extends m.Toggle{constructor(W){var $;super({icon:d.Codicon.listFilter,title:(0,f.localize)(0,null),isChecked:($=W.isChecked)!==null&&$!==void 0?$:!1,inputActiveOptionBorder:W.inputActiveOptionBorder,inputActiveOptionForeground:W.inputActiveOptionForeground,inputActiveOptionBackground:W.inputActiveOptionBackground})}}e.ModeToggle=N;class P extends m.Toggle{constructor(W){var $;super({icon:d.Codicon.searchFuzzy,title:(0,f.localize)(1,null),isChecked:($=W.isChecked)!==null&&$!==void 0?$:!1,inputActiveOptionBorder:W.inputActiveOptionBorder,inputActiveOptionForeground:W.inputActiveOptionForeground,inputActiveOptionBackground:W.inputActiveOptionBackground})}}e.FuzzyToggle=P;const x={inputBoxStyles:b.unthemedInboxStyles,toggleStyles:m.unthemedToggleStyles,listFilterWidgetBackground:void 0,listFilterWidgetNoMatchesOutline:void 0,listFilterWidgetOutline:void 0,listFilterWidgetShadow:void 0};var F;(function(H){H[H.Highlight=0]="Highlight",H[H.Filter=1]="Filter"})(F||(e.TreeFindMode=F={}));var B;(function(H){H[H.Fuzzy=0]="Fuzzy",H[H.Contiguous=1]="Contiguous"})(B||(e.TreeFindMatchType=B={}));class V extends l.Disposable{set mode(W){this.modeToggle.checked=W===F.Filter,this.findInput.inputBox.setPlaceHolder(W===F.Filter?(0,f.localize)(2,null):(0,f.localize)(3,null))}set matchType(W){this.matchTypeToggle.checked=W===B.Fuzzy}constructor(W,$,Z,Q,re,ce){var he;super(),this.tree=$,this.elements=(0,_.h)(".monaco-tree-type-filter",[(0,_.h)(".monaco-tree-type-filter-grab.codicon.codicon-debug-gripper@grab",{tabIndex:0}),(0,_.h)(".monaco-tree-type-filter-input@findInput"),(0,_.h)(".monaco-tree-type-filter-actionbar@actionbar")]),this.width=0,this.right=0,this.top=0,this._onDidDisable=new c.Emitter,W.appendChild(this.elements.root),this._register((0,l.toDisposable)(()=>W.removeChild(this.elements.root)));const de=(he=ce?.styles)!==null&&he!==void 0?he:x;de.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=de.listFilterWidgetBackground),de.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${de.listFilterWidgetShadow}`),this.modeToggle=this._register(new N(Object.assign(Object.assign({},de.toggleStyles),{isChecked:Q===F.Filter}))),this.matchTypeToggle=this._register(new P(Object.assign(Object.assign({},de.toggleStyles),{isChecked:re===B.Fuzzy}))),this.onDidChangeMode=c.Event.map(this.modeToggle.onChange,()=>this.modeToggle.checked?F.Filter:F.Highlight,this._store),this.onDidChangeMatchType=c.Event.map(this.matchTypeToggle.onChange,()=>this.matchTypeToggle.checked?B.Fuzzy:B.Contiguous,this._store),this.findInput=this._register(new w.FindInput(this.elements.findInput,Z,{label:(0,f.localize)(4,null),additionalToggles:[this.modeToggle,this.matchTypeToggle],showCommonFindToggles:!1,inputBoxStyles:de.inputBoxStyles,toggleStyles:de.toggleStyles,history:ce?.history})),this.actionbar=this._register(new D.ActionBar(this.elements.actionbar)),this.mode=Q;const ue=this._register(new k.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),q=this._register(c.Event.chain(ue.event)).map(te=>new L.StandardKeyboardEvent(te)).event;this._register(q(te=>{if(te.equals(3)){te.preventDefault(),te.stopPropagation(),this.findInput.inputBox.addToHistory(),this.tree.domFocus();return}if(te.equals(18)){te.preventDefault(),te.stopPropagation(),this.findInput.inputBox.isAtLastInHistory()||this.findInput.inputBox.isNowhereInHistory()?(this.findInput.inputBox.addToHistory(),this.tree.domFocus()):this.findInput.inputBox.showNextValue();return}if(te.equals(16)){te.preventDefault(),te.stopPropagation(),this.findInput.inputBox.showPreviousValue();return}}));const z=this._register(new i.Action("close",(0,f.localize)(5,null),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push(z,{icon:!0,label:!1});const U=this._register(new k.DomEmitter(this.elements.grab,"mousedown"));this._register(U.event(te=>{const G=new l.DisposableStore,ae=G.add(new k.DomEmitter(window,"mousemove")),fe=G.add(new k.DomEmitter(window,"mouseup")),Ce=this.right,Se=te.pageX,ye=this.top,Ie=te.pageY;this.elements.grab.classList.add("grabbing");const Ee=this.elements.root.style.transition;this.elements.root.style.transition="unset";const ke=Ae=>{const Pe=Ae.pageX-Se;this.right=Ce-Pe;const _e=Ae.pageY-Ie;this.top=ye+_e,this.layout()};G.add(ae.event(ke)),G.add(fe.event(Ae=>{ke(Ae),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=Ee,G.dispose()}))}));const X=this._register(c.Event.chain(this._register(new k.DomEmitter(this.elements.grab,"keydown")).event)).map(te=>new L.StandardKeyboardEvent(te)).event;this._register(X(te=>{let G,ae;if(te.keyCode===15?G=Number.POSITIVE_INFINITY:te.keyCode===17?G=0:te.keyCode===10&&(G=this.right===0?Number.POSITIVE_INFINITY:0),te.keyCode===16?ae=0:te.keyCode===18&&(ae=Number.POSITIVE_INFINITY),G!==void 0&&(te.preventDefault(),te.stopPropagation(),this.right=G,this.layout()),ae!==void 0){te.preventDefault(),te.stopPropagation(),this.top=ae;const fe=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=fe},0)}})),this.onDidChangeValue=this.findInput.onDidChange}layout(W=this.width){this.width=W,this.right=(0,u.clamp)(this.right,0,Math.max(0,W-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(W){this.findInput.showMessage(W)}clearMessage(){this.findInput.clearMessage()}dispose(){const W=Object.create(null,{dispose:{get:()=>super.dispose}});return we(this,void 0,void 0,function*(){this._onDidDisable.fire(),this.elements.root.classList.add("disabled"),yield(0,r.timeout)(300),W.dispose.call(this)})}}class K{get pattern(){return this._pattern}get mode(){return this._mode}set mode(W){W!==this._mode&&(this._mode=W,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(W))}get matchType(){return this._matchType}set matchType(W){W!==this._matchType&&(this._matchType=W,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(W))}constructor(W,$,Z,Q,re,ce={}){var he,de;this.tree=W,this.view=Z,this.filter=Q,this.contextViewProvider=re,this.options=ce,this._pattern="",this.width=0,this._onDidChangeMode=new c.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new c.Emitter,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new c.Emitter,this._onDidChangeOpenState=new c.Emitter,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new l.DisposableStore,this.disposables=new l.DisposableStore,this._mode=(he=W.options.defaultFindMode)!==null&&he!==void 0?he:F.Highlight,this._matchType=(de=W.options.defaultFindMatchType)!==null&&de!==void 0?de:B.Fuzzy,$.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(W={}){W.defaultFindMode!==void 0&&(this.mode=W.defaultFindMode),W.defaultFindMatchType!==void 0&&(this.matchType=W.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var W,$,Z,Q;const re=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&re?!((W=this.tree.options.showNotFoundMessage)!==null&&W!==void 0)||W?($=this.widget)===null||$===void 0||$.showMessage({type:2,content:(0,f.localize)(6,null)}):(Z=this.widget)===null||Z===void 0||Z.showMessage({type:2}):(Q=this.widget)===null||Q===void 0||Q.clearMessage()}shouldAllowFocus(W){return!this.widget||!this.pattern||this._mode===F.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!a.FuzzyScore.isDefault(W.filterData)}layout(W){var $;this.width=W,($=this.widget)===null||$===void 0||$.layout(W)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function A(H){let W=t.TreeMouseEventTarget.Unknown;return(0,_.hasParentWithClass)(H.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?W=t.TreeMouseEventTarget.Twistie:(0,_.hasParentWithClass)(H.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?W=t.TreeMouseEventTarget.Element:(0,_.hasParentWithClass)(H.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(W=t.TreeMouseEventTarget.Filter),{browserEvent:H.browserEvent,element:H.element?H.element.element:null,target:W}}function Y(H,W){W(H),H.children.forEach($=>Y($,W))}class ie{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(W,$){this.getFirstViewElementWithTrait=W,this.identityProvider=$,this.nodes=[],this._onDidChange=new c.Emitter,this.onDidChange=this._onDidChange.event}set(W,$){!$?.__forceEvent&&(0,n.equals)(this.nodes,W)||this._set(W,!1,$)}_set(W,$,Z){if(this.nodes=[...W],this.elements=void 0,this._nodeSet=void 0,!$){const Q=this;this._onDidChange.fire({get elements(){return Q.get()},browserEvent:Z})}}get(){return this.elements||(this.elements=this.nodes.map(W=>W.element)),[...this.elements]}getNodes(){return this.nodes}has(W){return this.nodeSet.has(W)}onDidModelSplice({insertedNodes:W,deletedNodes:$}){if(!this.identityProvider){const de=this.createNodeSet(),ue=q=>de.delete(q);$.forEach(q=>Y(q,ue)),this.set([...de.values()]);return}const Z=new Set,Q=de=>Z.add(this.identityProvider.getId(de.element).toString());$.forEach(de=>Y(de,Q));const re=new Map,ce=de=>re.set(this.identityProvider.getId(de.element).toString(),de);W.forEach(de=>Y(de,ce));const he=[];for(const de of this.nodes){const ue=this.identityProvider.getId(de.element).toString();if(!Z.has(ue))he.push(de);else{const z=re.get(ue);z&&z.visible&&he.push(z)}}if(this.nodes.length>0&&he.length===0){const de=this.getFirstViewElementWithTrait();de&&he.push(de)}this._set(he,!0)}createNodeSet(){const W=new Set;for(const $ of this.nodes)W.add($);return W}}class le extends g.MouseController{constructor(W,$){super(W),this.tree=$}onViewPointer(W){if((0,g.isButton)(W.browserEvent.target)||(0,g.isInputElement)(W.browserEvent.target)||(0,g.isMonacoEditor)(W.browserEvent.target)||W.browserEvent.isHandledByList)return;const $=W.element;if(!$)return super.onViewPointer(W);if(this.isSelectionRangeChangeEvent(W)||this.isSelectionSingleChangeEvent(W))return super.onViewPointer(W);const Z=W.browserEvent.target,Q=Z.classList.contains("monaco-tl-twistie")||Z.classList.contains("monaco-icon-label")&&Z.classList.contains("folder-icon")&&W.browserEvent.offsetX<16;let re=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?re=this.tree.expandOnlyOnTwistieClick($.element):re=!!this.tree.expandOnlyOnTwistieClick,re&&!Q&&W.browserEvent.detail!==2)return super.onViewPointer(W);if(!this.tree.expandOnDoubleClick&&W.browserEvent.detail===2)return super.onViewPointer(W);if($.collapsible){const ce=this.tree.getNodeLocation($),he=W.browserEvent.altKey;if(this.tree.setFocus([ce]),this.tree.toggleCollapsed(ce,he),re&&Q){W.browserEvent.isHandledByList=!0;return}}super.onViewPointer(W)}onDoubleClick(W){W.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||W.browserEvent.isHandledByList||super.onDoubleClick(W)}}class ne extends g.List{constructor(W,$,Z,Q,re,ce,he,de){super(W,$,Z,Q,de),this.focusTrait=re,this.selectionTrait=ce,this.anchorTrait=he}createMouseController(W){return new le(this,W.tree)}splice(W,$,Z=[]){if(super.splice(W,$,Z),Z.length===0)return;const Q=[],re=[];let ce;Z.forEach((he,de)=>{this.focusTrait.has(he)&&Q.push(W+de),this.selectionTrait.has(he)&&re.push(W+de),this.anchorTrait.has(he)&&(ce=W+de)}),Q.length>0&&super.setFocus((0,n.distinct)([...super.getFocus(),...Q])),re.length>0&&super.setSelection((0,n.distinct)([...super.getSelection(),...re])),typeof ce=="number"&&super.setAnchor(ce)}setFocus(W,$,Z=!1){super.setFocus(W,$),Z||this.focusTrait.set(W.map(Q=>this.element(Q)),$)}setSelection(W,$,Z=!1){super.setSelection(W,$),Z||this.selectionTrait.set(W.map(Q=>this.element(Q)),$)}setAnchor(W,$=!1){super.setAnchor(W),$||(typeof W>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(W)]))}}class se{get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return c.Event.filter(c.Event.map(this.view.onMouseDblClick,A),W=>W.target!==t.TreeMouseEventTarget.Filter)}get onPointer(){return c.Event.map(this.view.onPointer,A)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return c.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var W,$;return($=(W=this.findController)===null||W===void 0?void 0:W.mode)!==null&&$!==void 0?$:F.Highlight}set findMode(W){this.findController&&(this.findController.mode=W)}get findMatchType(){var W,$;return($=(W=this.findController)===null||W===void 0?void 0:W.matchType)!==null&&$!==void 0?$:B.Fuzzy}set findMatchType(W){this.findController&&(this.findController.matchType=W)}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(W,$,Z,Q,re={}){var ce;this._user=W,this._options=re,this.eventBufferer=new c.EventBufferer,this.onDidChangeFindOpenState=c.Event.None,this.disposables=new l.DisposableStore,this._onWillRefilter=new c.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new c.Emitter;const he=new I(Z),de=new c.Relay,ue=new c.Relay,q=this.disposables.add(new O(ue.event)),z=new o.SetMap;this.renderers=Q.map(te=>new R(te,()=>this.model,de.event,q,z,re));for(const te of this.renderers)this.disposables.add(te);let U;re.keyboardNavigationLabelProvider&&(U=new M(this,re.keyboardNavigationLabelProvider,re.filter),re=Object.assign(Object.assign({},re),{filter:U}),this.disposables.add(U)),this.focus=new ie(()=>this.view.getFocusedElements()[0],re.identityProvider),this.selection=new ie(()=>this.view.getSelectedElements()[0],re.identityProvider),this.anchor=new ie(()=>this.view.getAnchorElement(),re.identityProvider),this.view=new ne(W,$,he,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},E(()=>this.model,re)),{tree:this})),this.model=this.createModel(W,this.view,re),de.input=this.model.onDidChangeCollapseState;const X=c.Event.forEach(this.model.onDidSplice,te=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(te),this.selection.onDidModelSplice(te)})},this.disposables);if(X(()=>null,null,this.disposables),ue.input=c.Event.chain(c.Event.any(X,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const te=new Set;for(const G of this.focus.getNodes())te.add(G);for(const G of this.selection.getNodes())te.add(G);return[...te.values()]}).event,re.keyboardSupport!==!1){const te=c.Event.chain(this.view.onKeyDown).filter(G=>!(0,g.isInputElement)(G.target)).map(G=>new L.StandardKeyboardEvent(G));te.filter(G=>G.keyCode===15).on(this.onLeftArrow,this,this.disposables),te.filter(G=>G.keyCode===17).on(this.onRightArrow,this,this.disposables),te.filter(G=>G.keyCode===10).on(this.onSpace,this,this.disposables)}if((!((ce=re.findWidgetEnabled)!==null&&ce!==void 0)||ce)&&re.keyboardNavigationLabelProvider&&re.contextViewProvider){const te=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new K(this,this.model,this.view,U,re.contextViewProvider,te),this.focusNavigationFilter=G=>this.findController.shouldAllowFocus(G),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=c.Event.None,this.onDidChangeFindMatchType=c.Event.None;this.styleElement=(0,_.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===T.Always)}updateOptions(W={}){var $;this._options=Object.assign(Object.assign({},this._options),W);for(const Z of this.renderers)Z.updateOptions(W);this.view.updateOptions(this._options),($=this.findController)===null||$===void 0||$.updateOptions(W),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(W){this.view.scrollTop=W}domFocus(){this.view.domFocus()}layout(W,$){var Z;this.view.layout(W,$),(0,v.isNumber)($)&&((Z=this.findController)===null||Z===void 0||Z.layout($))}style(W){const $=`.${this.view.domId}`,Z=[];W.treeIndentGuidesStroke&&(Z.push(`.monaco-list${$}:hover .monaco-tl-indent > .indent-guide, .monaco-list${$}.always .monaco-tl-indent > .indent-guide { border-color: ${W.treeInactiveIndentGuidesStroke}; }`),Z.push(`.monaco-list${$} .monaco-tl-indent > .indent-guide.active { border-color: ${W.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=Z.join(`\n`),this.view.style(W)}getParentElement(W){const $=this.model.getParentNodeLocation(W);return this.model.getNode($).element}getFirstElementChild(W){return this.model.getFirstElementChild(W)}getNode(W){return this.model.getNode(W)}getNodeLocation(W){return this.model.getNodeLocation(W)}collapse(W,$=!1){return this.model.setCollapsed(W,!0,$)}expand(W,$=!1){return this.model.setCollapsed(W,!1,$)}toggleCollapsed(W,$=!1){return this.model.setCollapsed(W,void 0,$)}isCollapsible(W){return this.model.isCollapsible(W)}setCollapsible(W,$){return this.model.setCollapsible(W,$)}isCollapsed(W){return this.model.isCollapsed(W)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(W,$){const Z=W.map(re=>this.model.getNode(re));this.selection.set(Z,$);const Q=W.map(re=>this.model.getListIndex(re)).filter(re=>re>-1);this.view.setSelection(Q,$,!0)}getSelection(){return this.selection.get()}setFocus(W,$){const Z=W.map(re=>this.model.getNode(re));this.focus.set(Z,$);const Q=W.map(re=>this.model.getListIndex(re)).filter(re=>re>-1);this.view.setFocus(Q,$,!0)}getFocus(){return this.focus.get()}reveal(W,$){this.model.expandTo(W);const Z=this.model.getListIndex(W);Z!==-1&&this.view.reveal(Z,$)}onLeftArrow(W){W.preventDefault(),W.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Z=$[0],Q=this.model.getNodeLocation(Z);if(!this.model.setCollapsed(Q,!0)){const ce=this.model.getParentNodeLocation(Q);if(!ce)return;const he=this.model.getListIndex(ce);this.view.reveal(he),this.view.setFocus([he])}}onRightArrow(W){W.preventDefault(),W.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Z=$[0],Q=this.model.getNodeLocation(Z);if(!this.model.setCollapsed(Q,!1)){if(!Z.children.some(de=>de.visible))return;const[ce]=this.view.getFocus(),he=ce+1;this.view.reveal(he),this.view.setFocus([he])}}onSpace(W){W.preventDefault(),W.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Z=$[0],Q=this.model.getNodeLocation(Z),re=W.browserEvent.altKey;this.model.setCollapsed(Q,void 0,re)}dispose(){(0,l.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=se}),define(J[565],ee([1,0,178,212]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class L extends _.AbstractTree{constructor(w,b,S,g,m,s={}){super(w,b,S,g,s),this.user=w,this.dataSource=m,this.identityProvider=s.identityProvider}createModel(w,b,S){return new k.ObjectTreeModel(w,b,S)}}e.DataTree=L}),define(J[304],ee([1,0,178,551,212,101,53]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class b extends _.AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(t,i,n,r,d={}){super(t,i,n,r,d),this.user=t}setChildren(t,i=w.Iterable.empty(),n){this.model.setChildren(t,i,n)}rerender(t){if(t===void 0){this.view.rerender();return}this.model.rerender(t)}hasElement(t){return this.model.has(t)}createModel(t,i,n){return new L.ObjectTreeModel(t,i,n)}}e.ObjectTree=b;class S{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,n,r){const d=this.compressedTreeNodeProvider.getCompressedTreeNode(t.element);d.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(t,i,n.data,r)):(n.compressedTreeNode=d,this.renderer.renderCompressedElements(d,i,n.data,r))}disposeElement(t,i,n,r){var d,h,o,c;n.compressedTreeNode?(h=(d=this.renderer).disposeCompressedElements)===null||h===void 0||h.call(d,n.compressedTreeNode,i,n.data,r):(c=(o=this.renderer).disposeElement)===null||c===void 0||c.call(o,t,i,n.data,r)}disposeTemplate(t){this.renderer.disposeTemplate(t.data)}renderTwistie(t,i){return this.renderer.renderTwistie?this.renderer.renderTwistie(t,i):!1}}Te([D.memoize],S.prototype,"compressedTreeNodeProvider",null);function g(s,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=s().getCompressedTreeNode(i)}catch{return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return n.element.elements.length===1?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}class m extends b{constructor(t,i,n,r,d={}){const h=()=>this,o=r.map(c=>new S(h,c));super(t,i,n,o,g(h,d))}setChildren(t,i=w.Iterable.empty(),n){this.model.setChildren(t,i,n)}createModel(t,i,n){return new k.CompressibleObjectTreeModel(t,i,n)}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[566],ee([1,0,216,178,211,304,133,14,26,31,11,6,53,2,18]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n){"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 d(M,N){return N.parent?N.parent===M?!0:d(M,N.parent):!1}function h(M,N){return M===N||d(M,N)||d(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 c{constructor(N,P,x){this.renderer=N,this.nodeMapper=P,this.onDidChangeTwistieState=x,this.renderedNodes=new Map,this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,P,x,F){this.renderer.renderElement(this.nodeMapper.map(N),P,x.templateData,F)}renderTwistie(N,P){return N.slow?(P.classList.add(...g.ThemeIcon.asClassNameArray(S.Codicon.treeItemLoading)),!0):(P.classList.remove(...g.ThemeIcon.asClassNameArray(S.Codicon.treeItemLoading)),!1)}disposeElement(N,P,x,F){var B,V;(V=(B=this.renderer).disposeElement)===null||V===void 0||V.call(B,this.nodeMapper.map(N),P,x.templateData,F)}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 l(M){return{browserEvent:M.browserEvent,element:M.element&&M.element.element,target:M.target}}class u extends _.ElementsDragAndDropData{constructor(N){super(N.elements.map(P=>P.element)),this.data=N}}function v(M){return M instanceof _.ElementsDragAndDropData?new u(M):M}class f{constructor(N){this.dnd=N}getDragURI(N){return this.dnd.getDragURI(N.element)}getDragLabel(N,P){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(N.map(x=>x.element),P)}onDragStart(N,P){var x,F;(F=(x=this.dnd).onDragStart)===null||F===void 0||F.call(x,v(N),P)}onDragOver(N,P,x,F,B=!0){return this.dnd.onDragOver(v(N),P&&P.element,x,F)}drop(N,P,x,F){this.dnd.drop(v(N),P&&P.element,x,F)}onDragEnd(N){var P,x;(x=(P=this.dnd).onDragEnd)===null||x===void 0||x.call(P,N)}}function p(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 P;return!!(!((P=M.accessibilityProvider)===null||P===void 0)&&P.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,P){return M.filter.filter(N.element,P)}},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 C(M,N){N(M),M.children.forEach(P=>C(P,N))}class y{get onDidChangeFocus(){return s.Event.map(this.tree.onDidChangeFocus,a)}get onDidChangeSelection(){return s.Event.map(this.tree.onDidChangeSelection,a)}get onMouseDblClick(){return s.Event.map(this.tree.onMouseDblClick,l)}get onPointer(){return s.Event.map(this.tree.onPointer,l)}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,P,x,F,B,V={}){this.user=N,this.dataSource=B,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new s.Emitter,this._onDidChangeNodeSlowState=new s.Emitter,this.nodeMapper=new w.WeakMapper(K=>new o(K)),this.disposables=new i.DisposableStore,this.identityProvider=V.identityProvider,this.autoExpandSingleChildren=typeof V.autoExpandSingleChildren>"u"?!1:V.autoExpandSingleChildren,this.sorter=V.sorter,this.collapseByDefault=V.collapseByDefault,this.tree=this.createTree(N,P,x,F,V),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,P,x,F,B){const V=new k.ComposedTreeDelegate(x),K=F.map(Y=>new c(Y,this.nodeMapper,this._onDidChangeNodeSlowState.event)),A=p(B)||{};return new D.ObjectTree(N,P,V,K,A)}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,P){this.tree.layout(N,P)}style(N){this.tree.style(N)}getInput(){return this.root.element}setInput(N,P){return we(this,void 0,void 0,function*(){this.refreshPromises.forEach(F=>F.cancel()),this.refreshPromises.clear(),this.root.element=N;const x=P&&{viewState:P,focus:[],selection:[]};yield this._updateChildren(N,!0,!1,x),x&&(this.tree.setFocus(x.focus),this.tree.setSelection(x.selection)),P&&typeof P.scrollTop=="number"&&(this.scrollTop=P.scrollTop)})}_updateChildren(N=this.root.element,P=!0,x=!1,F,B){return we(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 s.Event.toPromise(this._onDidRender.event));const V=this.getDataNode(N);if(yield this.refreshAndRenderNode(V,P,F,B),x)try{this.tree.rerender(V)}catch{}})}rerender(N){if(N===void 0||N===this.root.element){this.tree.rerender();return}const P=this.getDataNode(N);this.tree.rerender(P)}getNode(N=this.root.element){const P=this.getDataNode(N),x=this.tree.getNode(P===this.root?null:P);return this.nodeMapper.map(x)}collapse(N,P=!1){const x=this.getDataNode(N);return this.tree.collapse(x===this.root?null:x,P)}expand(N,P=!1){return we(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 s.Event.toPromise(this._onDidRender.event));const x=this.getDataNode(N);if(this.tree.hasElement(x)&&!this.tree.isCollapsible(x)||(x.refreshPromise&&(yield this.root.refreshPromise,yield s.Event.toPromise(this._onDidRender.event)),x!==this.root&&!x.refreshPromise&&!this.tree.isCollapsed(x)))return!1;const F=this.tree.expand(x===this.root?null:x,P);return x.refreshPromise&&(yield this.root.refreshPromise,yield s.Event.toPromise(this._onDidRender.event)),F})}setSelection(N,P){const x=N.map(F=>this.getDataNode(F));this.tree.setSelection(x,P)}getSelection(){return this.tree.getSelection().map(P=>P.element)}setFocus(N,P){const x=N.map(F=>this.getDataNode(F));this.tree.setFocus(x,P)}getFocus(){return this.tree.getFocus().map(P=>P.element)}reveal(N,P){this.tree.reveal(this.getDataNode(N),P)}getParentElement(N){const P=this.tree.getParentElement(this.getDataNode(N));return P&&P.element}getFirstElementChild(N=this.root.element){const P=this.getDataNode(N),x=this.tree.getFirstElementChild(P===this.root?null:P);return x&&x.element}getDataNode(N){const P=this.nodes.get(N===this.root.element?null:N);if(!P)throw new w.TreeError(this.user,`Data tree node not found: ${N}`);return P}refreshAndRenderNode(N,P,x,F){return we(this,void 0,void 0,function*(){yield this.refreshNode(N,P,x),this.render(N,x,F)})}refreshNode(N,P,x){return we(this,void 0,void 0,function*(){let F;if(this.subTreeRefreshPromises.forEach((B,V)=>{!F&&h(V,N)&&(F=B.then(()=>this.refreshNode(N,P,x)))}),F)return F;if(N!==this.root&&this.tree.getNode(N).collapsed){N.hasChildren=!!this.dataSource.hasChildren(N.element),N.stale=!0;return}return this.doRefreshSubTree(N,P,x)})}doRefreshSubTree(N,P,x){return we(this,void 0,void 0,function*(){let F;N.refreshPromise=new Promise(B=>F=B),this.subTreeRefreshPromises.set(N,N.refreshPromise),N.refreshPromise.finally(()=>{N.refreshPromise=void 0,this.subTreeRefreshPromises.delete(N)});try{const B=yield this.doRefreshNode(N,P,x);N.stale=!1,yield b.Promises.settled(B.map(V=>this.doRefreshSubTree(V,P,x)))}finally{F()}})}doRefreshNode(N,P,x){return we(this,void 0,void 0,function*(){N.hasChildren=!!this.dataSource.hasChildren(N.element);let F;if(!N.hasChildren)F=Promise.resolve(t.Iterable.empty());else{const B=this.doGetChildren(N);if((0,n.isIterable)(B))F=Promise.resolve(B);else{const V=(0,b.timeout)(800);V.then(()=>{N.slow=!0,this._onDidChangeNodeSlowState.fire(N)},K=>null),F=B.finally(()=>V.cancel())}}try{const B=yield F;return this.setChildren(N,B,P,x)}catch(B){if(N!==this.root&&this.tree.hasElement(N)&&this.tree.collapse(N),(0,m.isCancellationError)(B))return[];throw B}finally{N.slow&&(N.slow=!1,this._onDidChangeNodeSlowState.fire(N))}})}doGetChildren(N){let P=this.refreshPromises.get(N);if(P)return P;const x=this.dataSource.getChildren(N.element);return(0,n.isIterable)(x)?this.processChildren(x):(P=(0,b.createCancelablePromise)(()=>we(this,void 0,void 0,function*(){return this.processChildren(yield x)})),this.refreshPromises.set(N,P),P.finally(()=>{this.refreshPromises.delete(N)}))}_onDidChangeCollapseState({node:N,deep:P}){N.element!==null&&!N.collapsed&&N.element.stale&&(P?this.collapse(N.element.element):this.refreshAndRenderNode(N.element,!1).catch(m.onUnexpectedError))}setChildren(N,P,x,F){const B=[...P];if(N.children.length===0&&B.length===0)return[];const V=new Map,K=new Map;for(const ie of N.children)if(V.set(ie.element,ie),this.identityProvider){const le=this.tree.isCollapsed(ie);K.set(ie.id,{node:ie,collapsed:le})}const A=[],Y=B.map(ie=>{const le=!!this.dataSource.hasChildren(ie);if(!this.identityProvider){const W=r({element:ie,parent:N,hasChildren:le});return le&&this.collapseByDefault&&!this.collapseByDefault(ie)&&(W.collapsedByDefault=!1,A.push(W)),W}const ne=this.identityProvider.getId(ie).toString(),se=K.get(ne);if(se){const W=se.node;return V.delete(W.element),this.nodes.delete(W.element),this.nodes.set(ie,W),W.element=ie,W.hasChildren=le,x?se.collapsed?(W.children.forEach($=>C($,Z=>this.nodes.delete(Z.element))),W.children.splice(0,W.children.length),W.stale=!0):A.push(W):le&&this.collapseByDefault&&!this.collapseByDefault(ie)&&(W.collapsedByDefault=!1,A.push(W)),W}const H=r({element:ie,parent:N,id:ne,hasChildren:le});return F&&F.viewState.focus&&F.viewState.focus.indexOf(ne)>-1&&F.focus.push(H),F&&F.viewState.selection&&F.viewState.selection.indexOf(ne)>-1&&F.selection.push(H),F&&F.viewState.expanded&&F.viewState.expanded.indexOf(ne)>-1?A.push(H):le&&this.collapseByDefault&&!this.collapseByDefault(ie)&&(H.collapsedByDefault=!1,A.push(H)),H});for(const ie of V.values())C(ie,le=>this.nodes.delete(le.element));for(const ie of Y)this.nodes.set(ie.element,ie);return N.children.splice(0,N.children.length,...Y),N!==this.root&&this.autoExpandSingleChildren&&Y.length===1&&A.length===0&&(Y[0].collapsedByDefault=!1,A.push(Y[0])),A}render(N,P,x){const F=N.children.map(V=>this.asTreeElement(V,P)),B=x&&Object.assign(Object.assign({},x),{diffIdentityProvider:x.diffIdentityProvider&&{getId(V){return x.diffIdentityProvider.getId(V.element)}}});this.tree.setChildren(N===this.root?null:N,F,B),N!==this.root&&this.tree.setCollapsible(N,N.hasChildren),this._onDidRender.fire()}asTreeElement(N,P){if(N.stale)return{element:N,collapsible:N.hasChildren,collapsed:!0};let x;return P&&P.viewState.expanded&&N.id&&P.viewState.expanded.indexOf(N.id)>-1?x=!1:x=N.collapsedByDefault,N.collapsedByDefault=void 0,{element:N,children:N.hasChildren?t.Iterable.map(N.children,F=>this.asTreeElement(F,P)):[],collapsible:N.hasChildren,collapsed:x}}processChildren(N){return this.sorter&&(N=[...N].sort(this.sorter.compare.bind(this.sorter))),N}dispose(){this.disposables.dispose()}}e.AsyncDataTree=y;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,P,x,F){this.renderer=N,this.nodeMapper=P,this.compressibleNodeMapperProvider=x,this.onDidChangeTwistieState=F,this.renderedNodes=new Map,this.disposables=[],this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,P,x,F){this.renderer.renderElement(this.nodeMapper.map(N),P,x.templateData,F)}renderCompressedElements(N,P,x,F){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(N),P,x.templateData,F)}renderTwistie(N,P){return N.slow?(P.classList.add(...g.ThemeIcon.asClassNameArray(S.Codicon.treeItemLoading)),!0):(P.classList.remove(...g.ThemeIcon.asClassNameArray(S.Codicon.treeItemLoading)),!1)}disposeElement(N,P,x,F){var B,V;(V=(B=this.renderer).disposeElement)===null||V===void 0||V.call(B,this.nodeMapper.map(N),P,x.templateData,F)}disposeCompressedElements(N,P,x,F){var B,V;(V=(B=this.renderer).disposeCompressedElements)===null||V===void 0||V.call(B,this.compressibleNodeMapperProvider().map(N),P,x.templateData,F)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,i.dispose)(this.disposables)}}function T(M){const N=M&&p(M);return N&&Object.assign(Object.assign({},N),{keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},N.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(P){return M.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(P.map(x=>x.element))}})})}class O extends y{constructor(N,P,x,F,B,V,K={}){super(N,P,x,B,V,K),this.compressionDelegate=F,this.compressibleNodeMapper=new w.WeakMapper(A=>new E(A)),this.filter=K.filter}createTree(N,P,x,F,B){const V=new k.ComposedTreeDelegate(x),K=F.map(Y=>new I(Y,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),A=T(B)||{};return new D.CompressibleObjectTree(N,P,V,K,A)}asTreeElement(N,P){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(N.element)},super.asTreeElement(N,P))}updateOptions(N={}){this.tree.updateOptions(N)}render(N,P){if(!this.identityProvider)return super.render(N,P);const x=ne=>this.identityProvider.getId(ne).toString(),F=ne=>{const se=new Set;for(const H of ne){const W=this.tree.getCompressedTreeNode(H===this.root?null:H);if(W.element)for(const $ of W.element.elements)se.add(x($.element))}return se},B=F(this.tree.getSelection()),V=F(this.tree.getFocus());super.render(N,P);const K=this.getSelection();let A=!1;const Y=this.getFocus();let ie=!1;const le=ne=>{const se=ne.element;if(se)for(let H=0;H<se.elements.length;H++){const W=x(se.elements[H].element),$=se.elements[se.elements.length-1].element;B.has(W)&&K.indexOf($)===-1&&(K.push($),A=!0),V.has(W)&&Y.indexOf($)===-1&&(Y.push($),ie=!0)}ne.children.forEach(le)};le(this.tree.getCompressedTreeNode(N===this.root?null:N)),A&&this.setSelection(K),ie&&this.setFocus(Y)}processChildren(N){return this.filter&&(N=t.Iterable.filter(N,P=>{const x=this.filter.filter(P,1),F=R(x);if(F===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return F===1})),super.processChildren(N)}}e.CompressibleAsyncDataTree=O;function R(M){return typeof M=="boolean"?M?1:0:(0,L.isFilterResult)(M)?(0,L.getVisibleState)(M.visibility):(0,L.getVisibleState)(M)}}),define(J[305],ee([1,0,11,6,2,45,17,9]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const S="$initialize";let g=!1;function m(v){w.isWeb&&(g||(g=!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(v.message))}e.logOnceWebWorkerWarning=m;class s{constructor(f,p,C,y){this.vsWorker=f,this.req=p,this.method=C,this.args=y,this.type=0}}class t{constructor(f,p,C,y){this.vsWorker=f,this.seq=p,this.res=C,this.err=y,this.type=1}}class i{constructor(f,p,C,y){this.vsWorker=f,this.req=p,this.eventName=C,this.arg=y,this.type=2}}class n{constructor(f,p,C){this.vsWorker=f,this.req=p,this.event=C,this.type=3}}class r{constructor(f,p){this.vsWorker=f,this.req=p,this.type=4}}class d{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,p){const C=String(++this._lastSentReq);return new Promise((y,E)=>{this._pendingReplies[C]={resolve:y,reject:E},this._send(new s(this._workerId,C,f,p))})}listen(f,p){let C=null;const y=new k.Emitter({onWillAddFirstListener:()=>{C=String(++this._lastSentReq),this._pendingEmitters.set(C,y),this._send(new i(this._workerId,C,f,p))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(C),this._send(new r(this._workerId,C)),C=null}});return y.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 p=this._pendingReplies[f.seq];if(delete this._pendingReplies[f.seq],f.err){let C=f.err;f.err.$isError&&(C=new Error,C.name=f.err.name,C.message=f.err.message,C.stack=f.err.stack),p.reject(C);return}p.resolve(f.res)}_handleRequestMessage(f){const p=f.req;this._handler.handleMessage(f.method,f.args).then(y=>{this._send(new t(this._workerId,p,y,void 0))},y=>{y.detail instanceof Error&&(y.detail=(0,_.transformErrorForSerialization)(y.detail)),this._send(new t(this._workerId,p,void 0,(0,_.transformErrorForSerialization)(y)))})}_handleSubscribeEventMessage(f){const p=f.req,C=this._handler.handleEvent(f.eventName,f.arg)(y=>{this._send(new n(this._workerId,p,y))});this._pendingEvents.set(p,C)}_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 p=[];if(f.type===0)for(let C=0;C<f.args.length;C++)f.args[C]instanceof ArrayBuffer&&p.push(f.args[C]);else f.type===1&&f.res instanceof ArrayBuffer&&p.push(f.res);this._handler.sendMessage(f,p)}}class h extends L.Disposable{constructor(f,p,C){super();let y=null;this._worker=this._register(f.create("vs/base/common/worker/simpleWorker",M=>{this._protocol.handleMessage(M)},M=>{y?.(M)})),this._protocol=new d({sendMessage:(M,N)=>{this._worker.postMessage(M,N)},handleMessage:(M,N)=>{if(typeof C[M]!="function")return Promise.reject(new Error("Missing method "+M+" on main thread host."));try{return Promise.resolve(C[M].apply(C,N))}catch(P){return Promise.reject(P)}},handleEvent:(M,N)=>{if(c(M)){const P=C[M].call(C,N);if(typeof P!="function")throw new Error(`Missing dynamic event ${M} on main thread host.`);return P}if(o(M)){const P=C[M];if(typeof P!="function")throw new Error(`Missing event ${M} on main thread host.`);return P}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)(C);this._onModuleLoaded=this._protocol.sendMessage(S,[this._worker.getId(),JSON.parse(JSON.stringify(E)),p,T]);const O=(M,N)=>this._request(M,N),R=(M,N)=>this._protocol.listen(M,N);this._lazyProxy=new Promise((M,N)=>{y=N,this._onModuleLoaded.then(P=>{M(a(P,O,R))},P=>{N(P),this._onError("Worker failed to load "+p,P)})})}getProxyObject(){return this._lazyProxy}_request(f,p){return new Promise((C,y)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(f,p).then(C,y)},y)})}_onError(f,p){console.error(f),console.info(p)}}e.SimpleWorkerClient=h;function o(v){return v[0]==="o"&&v[1]==="n"&&b.isUpperAsciiLetter(v.charCodeAt(2))}function c(v){return/^onDynamic/.test(v)&&b.isUpperAsciiLetter(v.charCodeAt(9))}function a(v,f,p){const C=I=>function(){const T=Array.prototype.slice.call(arguments,0);return f(I,T)},y=I=>function(T){return p(I,T)},E={};for(const I of v){if(c(I)){E[I]=y(I);continue}if(o(I)){E[I]=p(I,void 0);continue}E[I]=C(I)}return E}class l{constructor(f,p){this._requestHandlerFactory=p,this._requestHandler=null,this._protocol=new d({sendMessage:(C,y)=>{f(C,y)},handleMessage:(C,y)=>this._handleMessage(C,y),handleEvent:(C,y)=>this._handleEvent(C,y)})}onmessage(f){this._protocol.handleMessage(f)}_handleMessage(f,p){if(f===S)return this.initialize(p[0],p[1],p[2],p[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,p))}catch(C){return Promise.reject(C)}}_handleEvent(f,p){if(!this._requestHandler)throw new Error("Missing requestHandler");if(c(f)){const C=this._requestHandler[f].call(this._requestHandler,p);if(typeof C!="function")throw new Error(`Missing dynamic event ${f} on request handler.`);return C}if(o(f)){const C=this._requestHandler[f];if(typeof C!="function")throw new Error(`Missing event ${f} on request handler.`);return C}throw new Error(`Malformed event name ${f}`)}initialize(f,p,C,y){this._protocol.setWorkerId(f);const T=a(y,(O,R)=>this._protocol.sendMessage(O,R),(O,R)=>this._protocol.listen(O,R));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(T),Promise.resolve((0,D.getAllMethodNames)(this._requestHandler))):(p&&(typeof p.baseUrl<"u"&&delete p.baseUrl,typeof p.paths<"u"&&typeof p.paths.vs<"u"&&delete p.paths.vs,typeof p.trustedTypesPolicy!==void 0&&delete p.trustedTypesPolicy,p.catchError=!0,globalThis.require.config(p)),new Promise((O,R)=>{(globalThis.require||j)([C],N=>{if(this._requestHandler=N.create(T),!this._requestHandler){R(new Error("No RequestHandler!"));return}O((0,D.getAllMethodNames)(this._requestHandler))},R)}))}}e.SimpleWorkerServer=l;function u(v){return new l(v,null)}e.create=u}),define(J[567],ee([1,0,86,51,305]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const D=(0,_.createTrustedTypesPolicy)("defaultWorkerFactory",{createScriptURL:s=>s});function w(s){const t=globalThis.MonacoEnvironment;if(t){if(typeof t.getWorker=="function")return t.getWorker("workerMain.js",s);if(typeof t.getWorkerUrl=="function"){const i=t.getWorkerUrl("workerMain.js",s);return new Worker(D?D.createScriptURL(i):i,{name:s})}}if(typeof j=="function"){const i=j.toUrl("vs/base/worker/workerMain.js"),n=b(i,s);return new Worker(D?D.createScriptURL(n):n,{name:s})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function b(s,t){if(/^((http:)|(https:)|(file:))/.test(s)&&s.substring(0,globalThis.origin.length)!==globalThis.origin){const h="vs/base/worker/defaultWorkerFactory.js",o=j.toUrl(h).slice(0,-h.length),c=`/*${t}*/globalThis.MonacoEnvironment={baseUrl: \'${o}\'};const ttPolicy = globalThis.trustedTypes?.createPolicy(\'defaultWorkerFactory\', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL(\'${s}\') ?? \'${s}\');/*${t}*/`,a=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(a)}const i=s.lastIndexOf("?"),n=s.lastIndexOf("#",i),r=i>0?new URLSearchParams(s.substring(i+1,~n?n:void 0)):new URLSearchParams;return k.COI.addSearchParam(r,!0,!0),r.toString()?`${s}?${r.toString()}#${t}`:`${s}#${t}`}e.getWorkerBootstrapUrl=b;function S(s){return typeof s.then=="function"}class g{constructor(t,i,n,r,d){this.id=i;const h=w(n);S(h)?this.worker=h:this.worker=Promise.resolve(h),this.postMessage(t,[]),this.worker.then(o=>{o.onmessage=function(c){r(c.data)},o.onmessageerror=d,typeof o.addEventListener=="function"&&o.addEventListener("error",d)})}getId(){return this.id}postMessage(t,i){var n;(n=this.worker)===null||n===void 0||n.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,n){const r=++m.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new g(t,r,this._label||"anonymous"+r,i,d=>{(0,L.logOnceWebWorkerWarning)(d),this._webWorkerFailedBeforeError=d,n(d)})}}e.DefaultWorkerFactory=m,m.LAST_WORKER_ID=0}),define(J[568],ee([1,0,14,6,2,213,18]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.StorageHint=void 0;var b;(function(s){s[s.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",s[s.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(b||(e.StorageHint=b={}));var S;(function(s){s[s.None=0]="None",s[s.Initialized=1]="Initialized",s[s.Closed=2]="Closed"})(S||(e.StorageState=S={}));class g extends L.Disposable{constructor(t,i=Object.create(null)){super(),this.database=t,this.options=i,this._onDidChangeStorage=this._register(new k.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=S.None,this.cache=new Map,this.flushDelayer=new _.ThrottledDelayer(g.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(t=>this.onDidChangeItemsExternal(t)))}onDidChangeItemsExternal(t){var i,n;(i=t.changed)===null||i===void 0||i.forEach((r,d)=>this.accept(d,r)),(n=t.deleted)===null||n===void 0||n.forEach(r=>this.accept(r,void 0))}accept(t,i){if(this.state===S.Closed)return;let n=!1;(0,w.isUndefinedOrNull)(i)?n=this.cache.delete(t):this.cache.get(t)!==i&&(this.cache.set(t,i),n=!0),n&&this._onDidChangeStorage.fire(t)}get(t,i){const n=this.cache.get(t);return(0,w.isUndefinedOrNull)(n)?i:n}getBoolean(t,i){const n=this.get(t);return(0,w.isUndefinedOrNull)(n)?i:n==="true"}getNumber(t,i){const n=this.get(t);return(0,w.isUndefinedOrNull)(n)?i:parseInt(n,10)}set(t,i){return we(this,void 0,void 0,function*(){if(this.state===S.Closed)return;if((0,w.isUndefinedOrNull)(i))return this.delete(t);const n=(0,w.isObject)(i)||Array.isArray(i)?(0,D.stringify)(i):String(i);if(this.cache.get(t)!==n)return this.cache.set(t,n),this.pendingInserts.set(t,n),this.pendingDeletes.delete(t),this._onDidChangeStorage.fire(t),this.doFlush()})}delete(t){return we(this,void 0,void 0,function*(){if(!(this.state===S.Closed||!this.cache.delete(t)))return this.pendingDeletes.has(t)||this.pendingDeletes.add(t),this.pendingInserts.delete(t),this._onDidChangeStorage.fire(t),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return we(this,void 0,void 0,function*(){if(!this.hasPending)return;const t={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(t).finally(()=>{var i;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(i=this.whenFlushedCallbacks.pop())===null||i===void 0||i()})})}doFlush(t){return we(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),t)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=g,g.DEFAULT_FLUSH_DELAY=100;class m{constructor(){this.onDidChangeItemsExternal=k.Event.None,this.items=new Map}updateItems(t){var i,n;return we(this,void 0,void 0,function*(){(i=t.insert)===null||i===void 0||i.forEach((r,d)=>this.items.set(d,r)),(n=t.delete)===null||n===void 0||n.forEach(r=>this.items.delete(r))})}}e.InMemoryStorageDatabase=m}),define(J[306],ee([1,0,2,6]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class L extends _.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 S=0,g=0;b?(S=b.width,g=b.height):this._referenceDomElement&&(S=this._referenceDomElement.clientWidth,g=this._referenceDomElement.clientHeight),S=Math.max(5,S),g=Math.max(5,g),(this._width!==S||this._height!==g)&&(this._width=S,this._height=g,w&&this._onDidChange.fire())}}e.ElementSizeObserver=L}),define(J[221],ee([1,0,6]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocus=void 0;class k{constructor(){this._tabFocusTerminal=!1,this._tabFocusEditor=!1,this._onDidChangeTabFocus=new _.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[222],ee([1,0,47,7,78,44,249,14,6,2,103,9,262,24]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var n;(function(a){a.Tap="-monaco-textarea-synthetic-tap"})(n||(e.TextAreaSyntethicEvents=n={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class r{constructor(){this._lastState=null}set(l,u){this._lastState={lastCopiedValue:l,data:u}}get(l){return this._lastState&&this._lastState.lastCopiedValue===l?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=r,r.INSTANCE=new r;class d{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(l){l=l||"";const u={text:l,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=l.length,u}}class h extends g.Disposable{get textAreaState(){return this._textAreaState}constructor(l,u,v,f){super(),this._host=l,this._textArea=u,this._OS=v,this._browser=f,this._onFocus=this._register(new S.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new S.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new S.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new S.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new S.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new S.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new S.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new S.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new S.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new S.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new S.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 p=null;this._register(this._textArea.onKeyDown(C=>{const y=new D.StandardKeyboardEvent(C);(y.keyCode===114||this._currentComposition&&y.keyCode===1)&&y.stopPropagation(),y.equals(9)&&y.preventDefault(),p=y,this._onKeyDown.fire(y)})),this._register(this._textArea.onKeyUp(C=>{const y=new D.StandardKeyboardEvent(C);this._onKeyUp.fire(y)})),this._register(this._textArea.onCompositionStart(C=>{t._debugComposition&&console.log("[compositionstart]",C);const y=new d;if(this._currentComposition){this._currentComposition=y;return}if(this._currentComposition=y,this._OS===2&&p&&p.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===C.data&&(p.code==="ArrowRight"||p.code==="ArrowLeft")){t._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",C),y.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:C.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:C.data});return}this._onCompositionStart.fire({data:C.data})})),this._register(this._textArea.onCompositionUpdate(C=>{t._debugComposition&&console.log("[compositionupdate]",C);const y=this._currentComposition;if(!y)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(C);return}const E=y.handleCompositionUpdate(C.data);this._textAreaState=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(E),this._onCompositionUpdate.fire(C)})),this._register(this._textArea.onCompositionEnd(C=>{t._debugComposition&&console.log("[compositionend]",C);const y=this._currentComposition;if(!y)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=y.handleCompositionUpdate(C.data);this._textAreaState=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(E),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(C=>{if(t._debugComposition&&console.log("[input]",C),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const y=t.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),E=t.TextAreaState.deduceInput(this._textAreaState,y,this._OS===2);E.replacePrevCharCnt===0&&E.text.length===1&&(s.isHighSurrogate(E.text.charCodeAt(0))||E.text.charCodeAt(0)===127)||(this._textAreaState=y,(E.text!==""||E.replacePrevCharCnt!==0||E.replaceNextCharCnt!==0||E.positionDelta!==0)&&this._onType.fire(E))})),this._register(this._textArea.onCut(C=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(C),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(C=>{this._ensureClipboardGetsEditorSelection(C)})),this._register(this._textArea.onPaste(C=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),C.preventDefault(),!C.clipboardData)return;let[y,E]=o.getTextData(C.clipboardData);y&&(E=E||r.INSTANCE.get(y),this._onPaste.fire({text:y,metadata:E}))})),this._register(this._textArea.onFocus(()=>{const C=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!C&&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 l=0;return k.addDisposableListener(document,"selectionchange",u=>{if(w.inputLatency.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const v=Date.now(),f=v-l;if(l=v,f<5)return;const p=v-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),p<100||!this._textAreaState.selection)return;const C=this._textArea.getValue();if(this._textAreaState.value!==C)return;const y=this._textArea.getSelectionStart(),E=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===y&&this._textAreaState.selectionEnd===E)return;const I=this._textAreaState.deduceEditorPosition(y),T=this._host.deduceModelPosition(I[0],I[1],I[2]),O=this._textAreaState.deduceEditorPosition(E),R=this._host.deduceModelPosition(O[0],O[1],O[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(l){this._hasFocus!==l&&(this._hasFocus=l,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(l,u){this._hasFocus||(u=u.collapseSelection()),u.writeToTextArea(l,this._textArea,this._hasFocus),this._textAreaState=u}writeScreenReaderContent(l){this._currentComposition||this._setAndWriteTextAreaState(l,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(l){const u=this._host.getDataToCopy(),v={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,v),l.preventDefault(),l.clipboardData&&o.setTextData(l.clipboardData,u.text,u.html,v)}}e.TextAreaInput=h;class o{static getTextData(l){const u=l.getData(m.Mimes.text);let v=null;const f=l.getData("vscode-editor-data");if(typeof f=="string")try{v=JSON.parse(f),v.version!==1&&(v=null)}catch{}return u.length===0&&v===null&&l.files.length>0?[Array.prototype.slice.call(l.files,0).map(C=>C.name).join(`\n`),null]:[u,v]}static setTextData(l,u,v,f){l.setData(m.Mimes.text,u),typeof v=="string"&&l.setData("text/html",v),l.setData("vscode-editor-data",JSON.stringify(f))}}class c extends g.Disposable{constructor(l){super(),this._actual=l,this.onKeyDown=this._register(new L.DomEmitter(this._actual,"keydown")).event,this.onKeyUp=this._register(new L.DomEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(new L.DomEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new L.DomEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new L.DomEmitter(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new L.DomEmitter(this._actual,"beforeinput")).event,this.onInput=this._register(new L.DomEmitter(this._actual,"input")).event,this.onCut=this._register(new L.DomEmitter(this._actual,"cut")).event,this.onCopy=this._register(new L.DomEmitter(this._actual,"copy")).event,this.onPaste=this._register(new L.DomEmitter(this._actual,"paste")).event,this.onFocus=this._register(new L.DomEmitter(this._actual,"focus")).event,this.onBlur=this._register(new L.DomEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new S.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,n.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const l=k.getShadowRoot(this._actual);return l?l.activeElement===this._actual:k.isInDOM(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(l){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(l,u){const v=this._actual;v.value!==u&&(this.setIgnoreSelectionChangeTime("setValue"),v.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(l,u,v){const f=this._actual;let p=null;const C=k.getShadowRoot(f);C?p=C.activeElement:p=document.activeElement;const y=p===f,E=f.selectionStart,I=f.selectionEnd;if(y&&E===u&&I===v){_.isFirefox&&window.parent!==window&&f.focus();return}if(y){this.setIgnoreSelectionChangeTime("setSelectionRange"),f.setSelectionRange(u,v),_.isFirefox&&window.parent!==window&&f.focus();return}try{const T=k.saveParentsScrollTop(f);this.setIgnoreSelectionChangeTime("setSelectionRange"),f.focus(),f.setSelectionRange(u,v),k.restoreParentsScrollTop(f,T)}catch{}}}e.TextAreaWrapper=c}),define(J[569],ee([1,0,7,35,54]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class D extends L.ViewPart{constructor(t,i){super(t),this._viewDomNode=i,this._widgets={},this.domNode=(0,k.createFastDomNode)(document.createElement("div")),L.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")),L.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(t){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].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,n,r,d){this._widgets[t.getId()].setPosition(i,n,r,d),this.setShouldRender()}removeWidget(t){const i=t.getId();if(this._widgets.hasOwnProperty(i)){const n=this._widgets[i];delete this._widgets[i];const r=n.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 n of i)this._widgets[n].onBeforeRender(t)}prepareRender(t){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].prepareRender(t)}render(t){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].render(t)}}e.ViewContentWidgets=D;class w{constructor(t,i,n){this._primaryAnchor=new b(null,null),this._secondaryAnchor=new b(null,null),this._context=t,this._viewDomNode=i,this._actual=n,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,d=r.get(140);this._fixedOverflowWidgets=r.get(40),this._contentWidth=d.contentWidth,this._contentLeft=d.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(140)){const n=i.get(140);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(t,i,n){this._affinity=t,this._primaryAnchor=r(i,this._context.viewModel,this._affinity),this._secondaryAnchor=r(n,this._context.viewModel,this._affinity);function r(d,h,o){if(!d)return new b(null,null);const c=h.model.validatePosition(d);if(h.coordinatesConverter.modelPositionIsVisible(c)){const a=h.coordinatesConverter.convertModelPositionToViewPosition(c,o??void 0);return new b(d,a)}return new b(d,null)}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(t,i,n,r){this._setPosition(r,t,i),this._preference=n,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,n,r){const d=t.top,h=d,o=t.top+t.height,c=r.viewportHeight-o,a=d-n,l=h>=n,u=o,v=c>=n;let f=t.left;return f+i>r.scrollLeft+r.viewportWidth&&(f=r.scrollLeft+r.viewportWidth-i),f<r.scrollLeft&&(f=r.scrollLeft),{fitsAbove:l,aboveTop:a,fitsBelow:v,belowTop:u,left:f}}_layoutHorizontalSegmentInPage(t,i,n,r){const o=Math.max(15,i.left-r),c=Math.min(i.left+i.width+r,t.width-15);let a=i.left+n-window.scrollX;if(a+r>c){const l=a-(c-r);a-=l,n-=l}if(a<o){const l=a-o;a-=l,n-=l}return[n,a]}_layoutBoxInPage(t,i,n,r){const d=t.top-n,h=t.top+t.height,o=_.getDomNodePagePosition(this._viewDomNode.domNode),c=o.top+d-window.scrollY,a=o.top+h-window.scrollY,l=_.getClientArea(document.body),[u,v]=this._layoutHorizontalSegmentInPage(l,o,t.left-r.scrollLeft+this._contentLeft,i),f=22,p=22,C=c>=f,y=a+n<=l.height-p;return this._fixedOverflowWidgets?{fitsAbove:C,aboveTop:Math.max(c,f),fitsBelow:y,belowTop:a,left:v}:{fitsAbove:C,aboveTop:d,fitsBelow:y,belowTop:h,left:u}}_prepareRenderWidgetAtExactPositionOverflowing(t){return new S(t.top,t.left+this._contentLeft)}_getAnchorsCoordinates(t){var i,n;const r=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),d=((i=this._secondaryAnchor.viewPosition)===null||i===void 0?void 0:i.lineNumber)===((n=this._primaryAnchor.viewPosition)===null||n===void 0?void 0:n.lineNumber)?this._secondaryAnchor.viewPosition:null,h=o(d,this._affinity,this._lineHeight);return{primary:r,secondary:h};function o(c,a,l){if(!c)return null;const u=t.visibleRangeForPosition(c);if(!u)return null;const v=c.column===1&&a===3?0:u.left,f=t.getVerticalOffsetForLineNumber(c.lineNumber)-t.scrollTop;return new g(f,v,l)}}_reduceAnchorCoordinates(t,i,n){if(!i)return t;const r=this._context.configuration.options.get(48);let d=i.left;return d<t.left?d=Math.max(d,t.left-n+r.typicalFullwidthCharacterWidth):d=Math.min(d,t.left+n-r.typicalFullwidthCharacterWidth),new g(t.top,d,t.height)}_prepareRenderWidget(t){if(!this._preference||this._preference.length===0)return null;const{primary:i,secondary:n}=this._getAnchorsCoordinates(t);if(!i)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let h=null;if(typeof this._actual.beforeRender=="function"&&(h=m(this._actual.beforeRender,this._actual)),h)this._cachedDomNodeOffsetWidth=h.width,this._cachedDomNodeOffsetHeight=h.height;else{const c=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(c.width),this._cachedDomNodeOffsetHeight=Math.round(c.height)}}const r=this._reduceAnchorCoordinates(i,n,this._cachedDomNodeOffsetWidth);let d;this.allowEditorOverflow?d=this._layoutBoxInPage(r,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,t):d=this._layoutBoxInViewport(r,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,t);for(let h=1;h<=2;h++)for(const o of this._preference)if(o===1){if(!d)return null;if(h===2||d.fitsAbove)return{coordinate:new S(d.aboveTop,d.left),position:1}}else if(o===2){if(!d)return null;if(h===2||d.fitsBelow)return{coordinate:new S(d.belowTop,d.left),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new S(r.top,r.left)),position:0}:{coordinate:new S(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 S{constructor(t,i){this.top=t,this.left=i,this._coordinateBrand=void 0}}class g{constructor(t,i,n){this.top=t,this.left=i,this.height=n,this._anchorCoordinateBrand=void 0}}function m(s,t,...i){try{return s.call(t,...i)}catch{return null}}}),define(J[570],ee([1,0,14,11,2]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorContributions=void 0;class D extends L.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new L.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,S,g){this._editor=b,this._instantiationService=g;for(const m of S){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,_.runWhenIdle)(()=>{this._instantiateSome(1)})),this._register((0,_.runWhenIdle)(()=>{this._instantiateSome(2)})),this._register((0,_.runWhenIdle)(()=>{this._instantiateSome(3)},5e3))}saveViewState(){const b={};for(const[S,g]of this._instances)typeof g.saveViewState=="function"&&(b[S]=g.saveViewState());return b}restoreViewState(b){for(const[S,g]of this._instances)typeof g.restoreViewState=="function"&&g.restoreViewState(b[S])}get(b){return this._instantiateById(b),this._instances.get(b)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register((0,_.runWhenIdle)(()=>{this._instantiateSome(1)},50))}_instantiateSome(b){if(this._finishedInstantiation[b])return;this._finishedInstantiation[b]=!0;const S=this._findPendingContributionsByInstantiation(b);for(const g of S)this._instantiateById(g.id)}_findPendingContributionsByInstantiation(b){const S=[];for(const[,g]of this._pending)g.instantiation===b&&S.push(g);return S}_instantiateById(b){const S=this._pending.get(b);if(S){if(this._pending.delete(b),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const g=this._instantiationService.createInstance(S.ctor,this._editor);this._instances.set(S.id,g),typeof g.restoreViewState=="function"&&S.instantiation!==0&&console.warn(`Editor contribution \'${S.id}\' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(g){(0,k.onUnexpectedError)(g)}}}}e.CodeEditorContributions=D}),define(J[151],ee([1,0,6]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorZoom=void 0,e.EditorZoom=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new _.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[96],ee([1,0,9,17,134]),function(j,e,_,k,L){"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 S(){return b||(b=new TextDecoder("UTF-16BE")),b}let g;function m(){return g||(g=k.isLittleEndian()?w():S()),g}e.getPlatformTextDecoder=m;function s(n,r,d){const h=new Uint16Array(n.buffer,r,d);return d>0&&(h[0]===65279||h[0]===65534)?t(n,r,d):w().decode(h)}e.decodeUTF16LE=s;function t(n,r,d){const h=[];let o=0;for(let c=0;c<d;c++){const a=L.readUInt16LE(n,r);r+=2,h[o++]=String.fromCharCode(a)}return h.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 d=this._capacity-this._bufferLength;d<=1&&(d===0||_.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 d=r.length;if(this._bufferLength+d>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=r;return}for(let h=0;h<d;h++)this._buffer[this._bufferLength++]=r.charCodeAt(h)}}e.StringBuilder=i}),define(J[571],ee([1,0,86,9,76,96,271,106]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const S=(0,_.createTrustedTypesPolicy)("domLineBreaksComputer",{createHTML:r=>r});class g{static create(){return new g}constructor(){}createLineBreaksComputer(d,h,o,c,a){const l=[],u=[];return{addRequest:(v,f,p)=>{l.push(v),u.push(f)},finalize:()=>m(l,d,h,o,c,a,u)}}}e.DOMLineBreaksComputerFactory=g;function m(r,d,h,o,c,a,l){var u;function v(K){const A=l[K];if(A){const Y=b.LineInjectedText.applyInjectedText(r[K],A),ie=A.map(ne=>ne.options),le=A.map(ne=>ne.column-1);return new w.ModelLineProjectionData(le,ie,[Y.length],[],0)}else return null}if(o===-1){const K=[];for(let A=0,Y=r.length;A<Y;A++)K[A]=v(A);return K}const f=Math.round(o*d.typicalHalfwidthCharacterWidth),C=Math.round(h*(c===3?2:c===2?1:0)),y=Math.ceil(d.spaceWidth*C),E=document.createElement("div");(0,L.applyFontInfo)(E,d);const I=new D.StringBuilder(1e4),T=[],O=[],R=[],M=[],N=[];for(let K=0;K<r.length;K++){const A=b.LineInjectedText.applyInjectedText(r[K],l[K]);let Y=0,ie=0,le=f;if(c!==0)if(Y=k.firstNonWhitespaceIndex(A),Y===-1)Y=0;else{for(let W=0;W<Y;W++){const $=A.charCodeAt(W)===9?h-ie%h:1;ie+=$}const H=Math.ceil(d.spaceWidth*ie);H+d.typicalFullwidthCharacterWidth>f?(Y=0,ie=0):le=f-H}const ne=A.substr(Y),se=s(ne,ie,h,le,I,y);T[K]=Y,O[K]=ie,R[K]=ne,M[K]=se[0],N[K]=se[1]}const P=I.build(),x=(u=S?.createHTML(P))!==null&&u!==void 0?u:P;E.innerHTML=x,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 F=document.createRange(),B=Array.prototype.slice.call(E.children,0),V=[];for(let K=0;K<r.length;K++){const A=B[K],Y=t(F,A,R[K],M[K]);if(Y===null){V[K]=v(K);continue}const ie=T[K],le=O[K]+C,ne=N[K],se=[];for(let Z=0,Q=Y.length;Z<Q;Z++)se[Z]=ne[Y[Z]];if(ie!==0)for(let Z=0,Q=Y.length;Z<Q;Z++)Y[Z]+=ie;let H,W;const $=l[K];$?(H=$.map(Z=>Z.options),W=$.map(Z=>Z.column-1)):(H=null,W=null),V[K]=new w.ModelLineProjectionData(W,H,Y,se,le)}return document.body.removeChild(E),V}function s(r,d,h,o,c,a){if(a!==0){const y=String(a);c.appendString(\'<div style="text-indent: -\'),c.appendString(y),c.appendString("px; padding-left: "),c.appendString(y),c.appendString("px; box-sizing: border-box; width:")}else c.appendString(\'<div style="width:\');c.appendString(String(o)),c.appendString(\'px;">\');const l=r.length;let u=d,v=0;const f=[],p=[];let C=0<l?r.charCodeAt(0):0;c.appendString("<span>");for(let y=0;y<l;y++){y!==0&&y%16384===0&&c.appendString("</span><span>"),f[y]=v,p[y]=u;const E=C;C=y+1<l?r.charCodeAt(y+1):0;let I=1,T=1;switch(E){case 9:I=h-u%h,T=I;for(let O=1;O<=I;O++)O<I?c.appendCharCode(160):c.appendASCIICharCode(32);break;case 32:C===32?c.appendCharCode(160):c.appendASCIICharCode(32);break;case 60:c.appendString("<");break;case 62:c.appendString(">");break;case 38:c.appendString("&");break;case 0:c.appendString("�");break;case 65279:case 8232:case 8233:case 133:c.appendCharCode(65533);break;default:k.isFullWidthCharacter(E)&&T++,E<32?c.appendCharCode(9216+E):c.appendCharCode(E)}v+=I,u+=T}return c.appendString("</span>"),f[r.length]=v,p[r.length]=u,c.appendString("</div>"),[f,p]}function t(r,d,h,o){if(h.length<=1)return null;const c=Array.prototype.slice.call(d.children,0),a=[];try{i(r,c,o,0,null,h.length-1,null,a)}catch(l){return console.log(l),null}return a.length===0?null:(a.push(h.length),a)}function i(r,d,h,o,c,a,l,u){if(o===a||(c=c||n(r,d,h[o],h[o+1]),l=l||n(r,d,h[a],h[a+1]),Math.abs(c[0].top-l[0].top)<=.1))return;if(o+1===a){u.push(a);return}const v=o+(a-o)/2|0,f=n(r,d,h[v],h[v+1]);i(r,d,h,o,c,v,f,u),i(r,d,h,v,f,a,l,u)}function n(r,d,h,o){return r.setStart(d[h/16384|0].firstChild,h%16384),r.setEnd(d[o/16384|0].firstChild,o%16384),r.getClientRects()}}),define(J[223],ee([1,0,35,86,11,96]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class w{constructor(m){this._createLine=m,this._set(1,[])}flush(){this._set(1,[])}_set(m,s){this._lines=s,this._rendLineNumberStart=m}_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(m){const s=m-this._rendLineNumberStart;if(s<0||s>=this._lines.length)throw new L.BugIndicatingError("Illegal value for lineNumber");return this._lines[s]}onLinesDeleted(m,s){if(this.getCount()===0)return null;const t=this.getStartLineNumber(),i=this.getEndLineNumber();if(s<t){const h=s-m+1;return this._rendLineNumberStart-=h,null}if(m>i)return null;let n=0,r=0;for(let h=t;h<=i;h++){const o=h-this._rendLineNumberStart;m<=h&&h<=s&&(r===0?(n=o,r=1):r++)}if(m<t){let h=0;s<t?h=s-m+1:h=t-m,this._rendLineNumberStart-=h}return this._lines.splice(n,r)}onLinesChanged(m,s){const t=m+s-1;if(this.getCount()===0)return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let r=!1;for(let d=m;d<=t;d++)d>=i&&d<=n&&(this._lines[d-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(m,s){if(this.getCount()===0)return null;const t=s-m+1,i=this.getStartLineNumber(),n=this.getEndLineNumber();if(m<=i)return this._rendLineNumberStart+=t,null;if(m>n)return null;if(t+m>n)return this._lines.splice(m-this._rendLineNumberStart,n-m+1);const r=[];for(let a=0;a<t;a++)r[a]=this._createLine();const d=m-this._rendLineNumberStart,h=this._lines.slice(0,d),o=this._lines.slice(d,this._lines.length-t),c=this._lines.slice(this._lines.length-t,this._lines.length);return this._lines=h.concat(r).concat(o),c}onTokensChanged(m){if(this.getCount()===0)return!1;const s=this.getStartLineNumber(),t=this.getEndLineNumber();let i=!1;for(let n=0,r=m.length;n<r;n++){const d=m[n];if(d.toLineNumber<s||d.fromLineNumber>t)continue;const h=Math.max(s,d.fromLineNumber),o=Math.min(t,d.toLineNumber);for(let c=h;c<=o;c++){const a=c-this._rendLineNumberStart;this._lines[a].onTokensChanged(),i=!0}}return i}}e.RenderedLinesCollection=w;class b{constructor(m){this._host=m,this.domNode=this._createDomNode(),this._linesCollection=new w(()=>this._host.createVisibleLine())}_createDomNode(){const m=(0,_.createFastDomNode)(document.createElement("div"));return m.setClassName("view-layer"),m.setPosition("absolute"),m.domNode.setAttribute("role","presentation"),m.domNode.setAttribute("aria-hidden","true"),m}onConfigurationChanged(m){return!!m.hasChanged(140)}onFlushed(m){return this._linesCollection.flush(),!0}onLinesChanged(m){return this._linesCollection.onLinesChanged(m.fromLineNumber,m.count)}onLinesDeleted(m){const s=this._linesCollection.onLinesDeleted(m.fromLineNumber,m.toLineNumber);if(s)for(let t=0,i=s.length;t<i;t++){const n=s[t].getDomNode();n&&this.domNode.domNode.removeChild(n)}return!0}onLinesInserted(m){const s=this._linesCollection.onLinesInserted(m.fromLineNumber,m.toLineNumber);if(s)for(let t=0,i=s.length;t<i;t++){const n=s[t].getDomNode();n&&this.domNode.domNode.removeChild(n)}return!0}onScrollChanged(m){return m.scrollTopChanged}onTokensChanged(m){return this._linesCollection.onTokensChanged(m.ranges)}onZonesChanged(m){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(m){return this._linesCollection.getLine(m)}renderLines(m){const s=this._linesCollection._get(),t=new S(this.domNode.domNode,this._host,m),i={rendLineNumberStart:s.rendLineNumberStart,lines:s.lines,linesLength:s.lines.length},n=t.render(i,m.startLineNumber,m.endLineNumber,m.relativeVerticalOffset);this._linesCollection._set(n.rendLineNumberStart,n.lines)}}e.VisibleLinesCollection=b;class S{constructor(m,s,t){this.domNode=m,this.host=s,this.viewportData=t}render(m,s,t,i){const n={rendLineNumberStart:m.rendLineNumberStart,lines:m.lines.slice(0),linesLength:m.linesLength};if(n.rendLineNumberStart+n.linesLength-1<s||t<n.rendLineNumberStart){n.rendLineNumberStart=s,n.linesLength=t-s+1,n.lines=[];for(let r=s;r<=t;r++)n.lines[r-s]=this.host.createVisibleLine();return this._finishRendering(n,!0,i),n}if(this._renderUntouchedLines(n,Math.max(s-n.rendLineNumberStart,0),Math.min(t-n.rendLineNumberStart,n.linesLength-1),i,s),n.rendLineNumberStart>s){const r=s,d=Math.min(t,n.rendLineNumberStart-1);r<=d&&(this._insertLinesBefore(n,r,d,i,s),n.linesLength+=d-r+1)}else if(n.rendLineNumberStart<s){const r=Math.min(n.linesLength,s-n.rendLineNumberStart);r>0&&(this._removeLinesBefore(n,r),n.linesLength-=r)}if(n.rendLineNumberStart=s,n.rendLineNumberStart+n.linesLength-1<t){const r=n.rendLineNumberStart+n.linesLength,d=t;r<=d&&(this._insertLinesAfter(n,r,d,i,s),n.linesLength+=d-r+1)}else if(n.rendLineNumberStart+n.linesLength-1>t){const r=Math.max(0,t-n.rendLineNumberStart+1),h=n.linesLength-1-r+1;h>0&&(this._removeLinesAfter(n,h),n.linesLength-=h)}return this._finishRendering(n,!1,i),n}_renderUntouchedLines(m,s,t,i,n){const r=m.rendLineNumberStart,d=m.lines;for(let h=s;h<=t;h++){const o=r+h;d[h].layoutLine(o,i[o-n])}}_insertLinesBefore(m,s,t,i,n){const r=[];let d=0;for(let h=s;h<=t;h++)r[d++]=this.host.createVisibleLine();m.lines=r.concat(m.lines)}_removeLinesBefore(m,s){for(let t=0;t<s;t++){const i=m.lines[t].getDomNode();i&&this.domNode.removeChild(i)}m.lines.splice(0,s)}_insertLinesAfter(m,s,t,i,n){const r=[];let d=0;for(let h=s;h<=t;h++)r[d++]=this.host.createVisibleLine();m.lines=m.lines.concat(r)}_removeLinesAfter(m,s){const t=m.linesLength-s;for(let i=0;i<s;i++){const n=m.lines[t+i].getDomNode();n&&this.domNode.removeChild(n)}m.lines.splice(t,s)}_finishRenderingNewLines(m,s,t,i){S._ttPolicy&&(t=S._ttPolicy.createHTML(t));const n=this.domNode.lastChild;s||!n?this.domNode.innerHTML=t:n.insertAdjacentHTML("afterend",t);let r=this.domNode.lastChild;for(let d=m.linesLength-1;d>=0;d--){const h=m.lines[d];i[d]&&(h.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(m,s,t){const i=document.createElement("div");S._ttPolicy&&(s=S._ttPolicy.createHTML(s)),i.innerHTML=s;for(let n=0;n<m.linesLength;n++){const r=m.lines[n];if(t[n]){const d=i.firstChild,h=r.getDomNode();h.parentNode.replaceChild(d,h),r.setDomNode(d)}}}_finishRendering(m,s,t){const i=S._sb,n=m.linesLength,r=m.lines,d=m.rendLineNumberStart,h=[];{i.reset();let o=!1;for(let c=0;c<n;c++){const a=r[c];h[c]=!1,!(a.getDomNode()||!a.renderLine(c+d,t[c],this.viewportData,i))&&(h[c]=!0,o=!0)}o&&this._finishRenderingNewLines(m,s,i.build(),h)}{i.reset();let o=!1;const c=[];for(let a=0;a<n;a++){const l=r[a];c[a]=!1,!(h[a]||!l.renderLine(a+d,t[a],this.viewportData,i))&&(c[a]=!0,o=!0)}o&&this._finishRenderingInvalidLines(m,i.build(),c)}}}S._ttPolicy=(0,k.createTrustedTypesPolicy)("editorViewLayer",{createHTML:g=>g}),S._sb=new D.StringBuilder(1e5)}),define(J[572],ee([1,0,35,76,223,54]),function(j,e,_,k,L,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(s){super(s),this._visibleLines=new L.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 s=0,t=this._dynamicOverlays.length;s<t;s++)if(this._dynamicOverlays[s].shouldRender())return!0;return!1}dispose(){super.dispose();for(let s=0,t=this._dynamicOverlays.length;s<t;s++)this._dynamicOverlays[s].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new b(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(s){this._dynamicOverlays.push(s)}onConfigurationChanged(s){this._visibleLines.onConfigurationChanged(s);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let d=t;d<=i;d++)this._visibleLines.getVisibleLine(d).onConfigurationChanged(s);const r=this._context.configuration.options.get(48);return(0,k.applyFontInfo)(this.domNode,r),!0}onFlushed(s){return this._visibleLines.onFlushed(s)}onFocusChanged(s){return this._isFocused=s.isFocused,!0}onLinesChanged(s){return this._visibleLines.onLinesChanged(s)}onLinesDeleted(s){return this._visibleLines.onLinesDeleted(s)}onLinesInserted(s){return this._visibleLines.onLinesInserted(s)}onScrollChanged(s){return this._visibleLines.onScrollChanged(s)||!0}onTokensChanged(s){return this._visibleLines.onTokensChanged(s)}onZonesChanged(s){return this._visibleLines.onZonesChanged(s)}prepareRender(s){const t=this._dynamicOverlays.filter(i=>i.shouldRender());for(let i=0,n=t.length;i<n;i++){const r=t[i];r.prepareRender(s),r.onDidRender()}}render(s){this._viewOverlaysRender(s),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(s){this._visibleLines.renderLines(s.viewportData)}}e.ViewOverlays=w;class b{constructor(s,t){this._configuration=s,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(s){this._domNode=(0,_.createFastDomNode)(s)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(s){this._lineHeight=this._configuration.options.get(64)}renderLine(s,t,i,n){let r="";for(let d=0,h=this._dynamicOverlays.length;d<h;d++){const o=this._dynamicOverlays[d];r+=o.render(i.startLineNumber,s)}return this._renderedContent===r?!1:(this._renderedContent=r,n.appendString(\'<div style="position:absolute;top:\'),n.appendString(String(t)),n.appendString("px;width:100%;height:"),n.appendString(String(this._lineHeight)),n.appendString(\'px;">\'),n.appendString(r),n.appendString("</div>"),!0)}layoutLine(s,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=b;class S extends w{constructor(s){super(s);const i=this._context.configuration.options.get(140);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(s){const i=this._context.configuration.options.get(140);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(s)||!0}onScrollChanged(s){return super.onScrollChanged(s)||s.scrollWidthChanged}_viewOverlaysRender(s){super._viewOverlaysRender(s),this.domNode.setWidth(Math.max(s.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=S;class g extends w{constructor(s){super(s);const t=this._context.configuration.options,i=t.get(140);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,k.applyFontInfo)(this.domNode,t.get(48))}onConfigurationChanged(s){const t=this._context.configuration.options;(0,k.applyFontInfo)(this.domNode,t.get(48));const i=t.get(140);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(s)||!0}onScrollChanged(s){return super.onScrollChanged(s)||s.scrollHeightChanged}_viewOverlaysRender(s){super._viewOverlaysRender(s);const t=Math.min(s.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=g}),define(J[307],ee([1,0,134,96]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function L(S){return S.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(g,m,s,t){this.oldPosition=g,this.oldText=m,this.newPosition=s,this.newText=t}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${L(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${L(this.oldText)}")`:`(replace@${this.oldPosition} "${L(this.oldText)}" with "${L(this.newText)}")`}static _writeStringSize(g){return 4+2*g.length}static _writeString(g,m,s){const t=m.length;_.writeUInt32BE(g,t,s),s+=4;for(let i=0;i<t;i++)_.writeUInt16LE(g,m.charCodeAt(i),s),s+=2;return s}static _readString(g,m){const s=_.readUInt32BE(g,m);return m+=4,(0,k.decodeUTF16LE)(g,m,s)}writeSize(){return 4+4+D._writeStringSize(this.oldText)+D._writeStringSize(this.newText)}write(g,m){return _.writeUInt32BE(g,this.oldPosition,m),m+=4,_.writeUInt32BE(g,this.newPosition,m),m+=4,m=D._writeString(g,this.oldText,m),m=D._writeString(g,this.newText,m),m}static read(g,m,s){const t=_.readUInt32BE(g,m);m+=4;const i=_.readUInt32BE(g,m);m+=4;const n=D._readString(g,m);m+=D._writeStringSize(n);const r=D._readString(g,m);return m+=D._writeStringSize(r),s.push(new D(t,n,i,r)),m}}e.TextChange=D;function w(S,g){return S===null||S.length===0?g:new b(S,g).compress()}e.compressConsecutiveTextChanges=w;class b{constructor(g,m){this._prevEdits=g,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 g=0,m=0,s=this._getPrev(g),t=this._getCurr(m);for(;g<this._prevLen||m<this._currLen;){if(s===null){this._acceptCurr(t),t=this._getCurr(++m);continue}if(t===null){this._acceptPrev(s),s=this._getPrev(++g);continue}if(t.oldEnd<=s.newPosition){this._acceptCurr(t),t=this._getCurr(++m);continue}if(s.newEnd<=t.oldPosition){this._acceptPrev(s),s=this._getPrev(++g);continue}if(t.oldPosition<s.newPosition){const[h,o]=b._splitCurr(t,s.newPosition-t.oldPosition);this._acceptCurr(h),t=o;continue}if(s.newPosition<t.oldPosition){const[h,o]=b._splitPrev(s,t.oldPosition-s.newPosition);this._acceptPrev(h),s=o;continue}let r,d;if(t.oldEnd===s.newEnd)r=s,d=t,s=this._getPrev(++g),t=this._getCurr(++m);else if(t.oldEnd<s.newEnd){const[h,o]=b._splitPrev(s,t.oldLength);r=h,d=t,s=o,t=this._getCurr(++m)}else{const[h,o]=b._splitCurr(t,s.newLength);r=s,d=h,s=this._getPrev(++g),t=o}this._result[this._resultLen++]=new D(r.oldPosition,r.oldText,d.newPosition,d.newText),this._prevDeltaOffset+=r.newLength-r.oldLength,this._currDeltaOffset+=d.newLength-d.oldLength}const i=b._merge(this._result);return b._removeNoOps(i)}_acceptCurr(g){this._result[this._resultLen++]=b._rebaseCurr(this._prevDeltaOffset,g),this._currDeltaOffset+=g.newLength-g.oldLength}_getCurr(g){return g<this._currLen?this._currEdits[g]:null}_acceptPrev(g){this._result[this._resultLen++]=b._rebasePrev(this._currDeltaOffset,g),this._prevDeltaOffset+=g.newLength-g.oldLength}_getPrev(g){return g<this._prevLen?this._prevEdits[g]:null}static _rebaseCurr(g,m){return new D(m.oldPosition-g,m.oldText,m.newPosition,m.newText)}static _rebasePrev(g,m){return new D(m.oldPosition,m.oldText,m.newPosition+g,m.newText)}static _splitPrev(g,m){const s=g.newText.substr(0,m),t=g.newText.substr(m);return[new D(g.oldPosition,g.oldText,g.newPosition,s),new D(g.oldEnd,"",g.newPosition+m,t)]}static _splitCurr(g,m){const s=g.oldText.substr(0,m),t=g.oldText.substr(m);return[new D(g.oldPosition,s,g.newPosition,g.newText),new D(g.oldPosition+m,t,g.newEnd,"")]}static _merge(g){if(g.length===0)return g;const m=[];let s=0,t=g[0];for(let i=1;i<g.length;i++){const n=g[i];t.oldEnd===n.oldPosition?t=new D(t.oldPosition,t.oldText+n.oldText,t.newPosition,t.newText+n.newText):(m[s++]=t,t=n)}return m[s++]=t,m}static _removeNoOps(g){if(g.length===0)return g;const m=[];let s=0;for(let t=0;t<g.length;t++){const i=g[t];i.oldText!==i.newText&&(m[s++]=i)}return m}}}),define(J[573],ee([1,0,289,90]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function L(D,w,b,S,g,m){if(Array.isArray(D)){let s=0;for(const t of D){const i=L(t,w,b,S,g,m);if(i===10)return i;i>s&&(s=i)}return s}else{if(typeof D=="string")return S?D==="*"?5:D===b?10:0:0;if(D){const{language:s,pattern:t,scheme:i,hasAccessToAllModels:n,notebookType:r}=D;if(!S&&!n)return 0;r&&g&&(w=g);let d=0;if(i)if(i===w.scheme)d=10;else if(i==="*")d=5;else return 0;if(s)if(s===b)d=10;else if(s==="*")d=Math.max(d,5);else return 0;if(r)if(r===m)d=10;else if(r==="*"&&m!==void 0)d=Math.max(d,5);else return 0;if(t){let h;if(typeof t=="string"?h=t:h=Object.assign(Object.assign({},t),{base:(0,k.normalize)(t.base)}),h===w.fsPath||(0,_.match)(h,w.fsPath))d=10;else return 0}return d}else return 0}}e.score=L}),define(J[574],ee([1,0,6,2,46,573]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function w(m){return typeof m=="string"?!1:Array.isArray(m)?m.every(w):!!m.exclusive}class b{constructor(s,t,i,n){this.uri=s,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(s){var t,i;return this.notebookType===s.notebookType&&this.languageId===s.languageId&&this.uri.toString()===s.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((i=s.notebookUri)===null||i===void 0?void 0:i.toString())}}class S{constructor(s){this._notebookInfoResolver=s,this._clock=0,this._entries=[],this._onDidChange=new _.Emitter,this.onDidChange=this._onDidChange.event}register(s,t){let i={selector:s,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,k.toDisposable)(()=>{if(i){const n=this._entries.indexOf(i);n>=0&&(this._entries.splice(n,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(s){return this.all(s).length>0}all(s){if(!s)return[];this._updateScores(s);const t=[];for(const i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(s){const t=[];return this._orderedForEach(s,i=>t.push(i.provider)),t}orderedGroups(s){const t=[];let i,n;return this._orderedForEach(s,r=>{i&&n===r._score?i.push(r.provider):(n=r._score,i=[r.provider],t.push(i))}),t}_orderedForEach(s,t){this._updateScores(s);for(const i of this._entries)i._score>0&&t(i)}_updateScores(s){var t,i;const n=(t=this._notebookInfoResolver)===null||t===void 0?void 0:t.call(this,s.uri),r=n?new b(s.uri,s.getLanguageId(),n.uri,n.type):new b(s.uri,s.getLanguageId(),void 0,void 0);if(!(!((i=this._lastCandidate)===null||i===void 0)&&i.equals(r))){this._lastCandidate=r;for(const d of this._entries)if(d._score=(0,D.score)(d.selector,r.uri,r.languageId,(0,L.shouldSynchronizeModel)(s),r.notebookUri,r.notebookType),w(d.selector)&&d._score>0){for(const h of this._entries)h._score=0;d._score=1e3;break}this._entries.sort(S._compareByScoreAndTime)}}static _compareByScoreAndTime(s,t){return s._score<t._score?1:s._score>t._score?-1:g(s.selector)&&!g(t.selector)?1:!g(s.selector)&&g(t.selector)?-1:s._time<t._time?1:s._time>t._time?-1:0}}e.LanguageFeatureRegistry=S;function g(m){return typeof m=="string"?!1:Array.isArray(m)?m.some(g):!!m.isBuiltin}}),define(J[224],ee([1,0,9,96,5]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class D{constructor(a,l,u,v,f,p){this._richEditBracketBrand=void 0,this.languageId=a,this.index=l,this.open=u,this.close=v,this.forwardRegex=f,this.reversedRegex=p,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 l=new Set;for(const u of a)l.add(u);return l}}e.RichEditBracket=D;function w(c){const a=c.length;c=c.map(p=>[p[0].toLowerCase(),p[1].toLowerCase()]);const l=[];for(let p=0;p<a;p++)l[p]=p;const u=(p,C)=>{const[y,E]=p,[I,T]=C;return y===I||y===T||E===I||E===T},v=(p,C)=>{const y=Math.min(p,C),E=Math.max(p,C);for(let I=0;I<a;I++)l[I]===E&&(l[I]=y)};for(let p=0;p<a;p++){const C=c[p];for(let y=p+1;y<a;y++){const E=c[y];u(C,E)&&v(l[p],l[y])}}const f=[];for(let p=0;p<a;p++){const C=[],y=[];for(let E=0;E<a;E++)if(l[E]===p){const[I,T]=c[E];C.push(I),y.push(T)}C.length>0&&f.push({open:C,close:y})}return f}class b{constructor(a,l){this._richEditBracketsBrand=void 0;const u=w(l);this.brackets=u.map((v,f)=>new D(a,f,v.open,v.close,s(v.open,v.close,u,f),t(v.open,v.close,u,f))),this.forwardRegex=i(this.brackets),this.reversedRegex=n(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const v of this.brackets){for(const f of v.open)this.textIsBracket[f]=v,this.textIsOpenBracket[f]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,f.length);for(const f of v.close)this.textIsBracket[f]=v,this.textIsOpenBracket[f]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,f.length)}}}e.RichEditBrackets=b;function S(c,a,l,u){for(let v=0,f=a.length;v<f;v++){if(v===l)continue;const p=a[v];for(const C of p.open)C.indexOf(c)>=0&&u.push(C);for(const C of p.close)C.indexOf(c)>=0&&u.push(C)}}function g(c,a){return c.length-a.length}function m(c){if(c.length<=1)return c;const a=[],l=new Set;for(const u of c)l.has(u)||(a.push(u),l.add(u));return a}function s(c,a,l,u){let v=[];v=v.concat(c),v=v.concat(a);for(let f=0,p=v.length;f<p;f++)S(v[f],l,u,v);return v=m(v),v.sort(g),v.reverse(),d(v)}function t(c,a,l,u){let v=[];v=v.concat(c),v=v.concat(a);for(let f=0,p=v.length;f<p;f++)S(v[f],l,u,v);return v=m(v),v.sort(g),v.reverse(),d(v.map(h))}function i(c){let a=[];for(const l of c){for(const u of l.open)a.push(u);for(const u of l.close)a.push(u)}return a=m(a),d(a)}function n(c){let a=[];for(const l of c){for(const u of l.open)a.push(u);for(const u of l.close)a.push(u)}return a=m(a),d(a.map(h))}function r(c){const a=/^[\\w ]+$/.test(c);return c=_.escapeRegExpCharacters(c),a?`\\\\b${c}\\\\b`:c}function d(c){const a=`(${c.map(r).join(")|(")})`;return _.createRegExp(a,!0)}const h=function(){function c(u){const v=new Uint16Array(u.length);let f=0;for(let p=u.length-1;p>=0;p--)v[f++]=u.charCodeAt(p);return k.getPlatformTextDecoder().decode(v)}let a=null,l=null;return function(v){return a!==v&&(a=v,l=c(a)),l}}();class o{static _findPrevBracketInText(a,l,u,v){const f=u.match(a);if(!f)return null;const p=u.length-(f.index||0),C=f[0].length,y=v+p;return new L.Range(l,y-C+1,l,y+1)}static findPrevBracketInRange(a,l,u,v,f){const C=h(u).substring(u.length-f,u.length-v);return this._findPrevBracketInText(a,l,C,v)}static findNextBracketInText(a,l,u,v){const f=u.match(a);if(!f)return null;const p=f.index||0,C=f[0].length;if(C===0)return null;const y=v+p;return new L.Range(l,y+1,l,y+1+C)}static findNextBracketInRange(a,l,u,v,f){const p=u.substring(v,f);return this.findNextBracketInText(a,l,p,v)}}e.BracketsUtils=o}),define(J[575],ee([1,0,16,122,224]),function(j,e,_,k,L){"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 S of this._richEditBrackets.brackets)for(const g of S.close){const m=g.charAt(g.length-1);b.push(m)}return(0,_.distinct)(b)}onElectricCharacter(b,S,g){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const m=S.findTokenIndexAtOffset(g-1);if((0,k.ignoreBracketsInToken)(S.getStandardTokenType(m)))return null;const s=this._richEditBrackets.reversedRegex,t=S.getLineContent().substring(0,g-1)+b,i=L.BracketsUtils.findPrevBracketInRange(s,1,t,0,t.length);if(!i)return null;const n=t.substring(i.startColumn-1,i.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[n])return null;const d=S.getActualLineContentBefore(i.startColumn-1);return/^\\s*$/.test(d)?{matchOpenBracket:n}:null}}e.BracketElectricCharacterSupport=D}),define(J[576],ee([1,0,6,2,499,198,267,88,266,123,199,16,490]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class i extends k.Disposable{didLanguageChange(a){return this.brackets.didLanguageChange(a)}constructor(a,l){if(super(),this.textModel=a,this.getLanguageConfiguration=l,this.didChangeEmitter=new _.Emitter,this.denseKeyProvider=new g.DenseKeyProvider,this.brackets=new w.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],a.tokenization.hasTokens)a.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 u=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),v=new m.FastTokenizer(this.textModel.getValue(),u);this.initialAstWithoutTokens=(0,S.parseDocument)(v,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const a=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,a||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:a}){const l=a.map(u=>new D.TextEditInfo((0,b.toLength)(u.fromLineNumber-1,0),(0,b.toLength)(u.toLineNumber,0),(0,b.toLength)(u.toLineNumber-u.fromLineNumber+1,0)));this.handleEdits(l,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(a){const l=D.TextEditInfo.fromModelContentChanges(a.changes);this.handleEdits(l,!1)}handleEdits(a,l){const u=(0,t.combineTextEditInfos)(this.queuedTextEdits,a);this.queuedTextEdits=u,this.initialAstWithoutTokens&&!l&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,t.combineTextEditInfos)(this.queuedTextEditsForInitialAstWithoutTokens,a))}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(a,l,u){const f=l,p=new m.TextBufferTokenizer(this.textModel,this.brackets);return(0,S.parseDocument)(p,a,f,u)}getBracketsInRange(a,l){this.flushQueue();const u=(0,b.toLength)(a.startLineNumber-1,a.startColumn-1),v=(0,b.toLength)(a.endLineNumber-1,a.endColumn-1);return new s.CallbackIterable(f=>{const p=this.initialAstWithoutTokens||this.astWithTokens;d(p,b.lengthZero,p.length,u,v,f,0,0,new Map,l)})}getBracketPairsInRange(a,l){this.flushQueue();const u=(0,b.positionToLength)(a.getStartPosition()),v=(0,b.positionToLength)(a.getEndPosition());return new s.CallbackIterable(f=>{const p=this.initialAstWithoutTokens||this.astWithTokens,C=new h(f,l,this.textModel);o(p,b.lengthZero,p.length,u,v,C,0,new Map)})}getFirstBracketAfter(a){this.flushQueue();const l=this.initialAstWithoutTokens||this.astWithTokens;return r(l,b.lengthZero,l.length,(0,b.positionToLength)(a))}getFirstBracketBefore(a){this.flushQueue();const l=this.initialAstWithoutTokens||this.astWithTokens;return n(l,b.lengthZero,l.length,(0,b.positionToLength)(a))}}e.BracketPairsTree=i;function n(c,a,l,u){if(c.kind===4||c.kind===2){const v=[];for(const f of c.children)l=(0,b.lengthAdd)(a,f.length),v.push({nodeOffsetStart:a,nodeOffsetEnd:l}),a=l;for(let f=v.length-1;f>=0;f--){const{nodeOffsetStart:p,nodeOffsetEnd:C}=v[f];if((0,b.lengthLessThan)(p,u)){const y=n(c.children[f],p,C,u);if(y)return y}}return null}else{if(c.kind===3)return null;if(c.kind===1){const v=(0,b.lengthsToRange)(a,l);return{bracketInfo:c.bracketInfo,range:v}}}return null}function r(c,a,l,u){if(c.kind===4||c.kind===2){for(const v of c.children){if(l=(0,b.lengthAdd)(a,v.length),(0,b.lengthLessThan)(u,l)){const f=r(v,a,l,u);if(f)return f}a=l}return null}else{if(c.kind===3)return null;if(c.kind===1){const v=(0,b.lengthsToRange)(a,l);return{bracketInfo:c.bracketInfo,range:v}}}return null}function d(c,a,l,u,v,f,p,C,y,E,I=!1){if(p>200)return!0;e:for(;;)switch(c.kind){case 4:{const T=c.childrenLength;for(let O=0;O<T;O++){const R=c.getChild(O);if(R){if(l=(0,b.lengthAdd)(a,R.length),(0,b.lengthLessThanEqual)(a,v)&&(0,b.lengthGreaterThanEqual)(l,u)){if((0,b.lengthGreaterThanEqual)(l,v)){c=R;continue e}if(!d(R,a,l,u,v,f,p,0,y,E))return!1}a=l}}return!0}case 2:{const T=!E||!c.closingBracket||c.closingBracket.bracketInfo.closesColorized(c.openingBracket.bracketInfo);let O=0;if(y){let M=y.get(c.openingBracket.text);M===void 0&&(M=0),O=M,T&&(M++,y.set(c.openingBracket.text,M))}const R=c.childrenLength;for(let M=0;M<R;M++){const N=c.getChild(M);if(N){if(l=(0,b.lengthAdd)(a,N.length),(0,b.lengthLessThanEqual)(a,v)&&(0,b.lengthGreaterThanEqual)(l,u)){if((0,b.lengthGreaterThanEqual)(l,v)&&N.kind!==1){c=N,T?(p++,C=O+1):C=O;continue e}if((T||N.kind!==1||!c.closingBracket)&&!d(N,a,l,u,v,f,T?p+1:p,T?O+1:O,y,E,!c.closingBracket))return!1}a=l}}return y?.set(c.openingBracket.text,O),!0}case 3:{const T=(0,b.lengthsToRange)(a,l);return f(new L.BracketInfo(T,p-1,0,!0))}case 1:{const T=(0,b.lengthsToRange)(a,l);return f(new L.BracketInfo(T,p-1,C-1,I))}case 0:return!0}}class h{constructor(a,l,u){this.push=a,this.includeMinIndentation=l,this.textModel=u}}function o(c,a,l,u,v,f,p,C){var y;if(p>200)return!0;let E=!0;if(c.kind===2){let I=0;if(C){let R=C.get(c.openingBracket.text);R===void 0&&(R=0),I=R,R++,C.set(c.openingBracket.text,R)}const T=(0,b.lengthAdd)(a,c.openingBracket.length);let O=-1;if(f.includeMinIndentation&&(O=c.computeMinIndentation(a,f.textModel)),E=f.push(new L.BracketPairWithMinIndentationInfo((0,b.lengthsToRange)(a,l),(0,b.lengthsToRange)(a,T),c.closingBracket?(0,b.lengthsToRange)((0,b.lengthAdd)(T,((y=c.child)===null||y===void 0?void 0:y.length)||b.lengthZero),l):void 0,p,I,c,O)),a=T,E&&c.child){const R=c.child;if(l=(0,b.lengthAdd)(a,R.length),(0,b.lengthLessThanEqual)(a,v)&&(0,b.lengthGreaterThanEqual)(l,u)&&(E=o(R,a,l,u,v,f,p+1,C),!E))return!1}C?.set(c.openingBracket.text,I)}else{let I=a;for(const T of c.children){const O=I;if(I=(0,b.lengthAdd)(I,T.length),(0,b.lengthLessThanEqual)(O,v)&&(0,b.lengthLessThanEqual)(u,I)&&(E=o(T,O,I,u,v,f,p,C),!E))return!1}}return E}}),define(J[577],ee([1,0,16,6,2,5,122,224,576]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class g extends L.Disposable{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(r,d){super(),this.textModel=r,this.languageConfigurationService=d,this.bracketPairsTree=this._register(new L.MutableDisposable),this.onDidChangeEmitter=new k.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(h=>{var o;(!h.languageId||!((o=this.bracketPairsTree.value)===null||o===void 0)&&o.object.didLanguageChange(h.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(r){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(r){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(r){var d;(d=this.bracketPairsTree.value)===null||d===void 0||d.object.handleContentChanged(r)}handleDidChangeBackgroundTokenizationState(){var r;(r=this.bracketPairsTree.value)===null||r===void 0||r.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(r){var d;(d=this.bracketPairsTree.value)===null||d===void 0||d.object.handleDidChangeTokens(r)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const r=new L.DisposableStore;this.bracketPairsTree.value=m(r.add(new S.BracketPairsTree(this.textModel,d=>this.languageConfigurationService.getLanguageConfiguration(d))),r),r.add(this.bracketPairsTree.value.object.onDidChange(d=>this.onDidChangeEmitter.fire(d))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(r){var d;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((d=this.bracketPairsTree.value)===null||d===void 0?void 0:d.object.getBracketPairsInRange(r,!1))||_.CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(r){var d;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((d=this.bracketPairsTree.value)===null||d===void 0?void 0:d.object.getBracketPairsInRange(r,!0))||_.CallbackIterable.empty}getBracketsInRange(r,d=!1){var h;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((h=this.bracketPairsTree.value)===null||h===void 0?void 0:h.object.getBracketsInRange(r,d))||_.CallbackIterable.empty}findMatchingBracketUp(r,d,h){const o=this.textModel.validatePosition(d),c=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column);if(this.canBuildAST){const a=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew.getClosingBracketInfo(r);if(!a)return null;const l=this.getBracketPairsInRange(D.Range.fromPositions(d,d)).findLast(u=>a.closes(u.openingBracketInfo));return l?l.openingBracketRange:null}else{const a=r.toLowerCase(),l=this.languageConfigurationService.getLanguageConfiguration(c).brackets;if(!l)return null;const u=l.textIsBracket[a];return u?i(this._findMatchingBracketUp(u,o,s(h))):null}}matchBracket(r,d){if(this.canBuildAST){const h=this.getBracketPairsInRange(D.Range.fromPositions(r,r)).filter(o=>o.closingBracketRange!==void 0&&(o.openingBracketRange.containsPosition(r)||o.closingBracketRange.containsPosition(r))).findLastMaxBy((0,_.compareBy)(o=>o.openingBracketRange.containsPosition(r)?o.openingBracketRange:o.closingBracketRange,D.Range.compareRangesUsingStarts));return h?[h.openingBracketRange,h.closingBracketRange]:null}else{const h=s(d);return this._matchBracket(this.textModel.validatePosition(r),h)}}_establishBracketSearchOffsets(r,d,h,o){const c=d.getCount(),a=d.getLanguageId(o);let l=Math.max(0,r.column-1-h.maxBracketLength);for(let v=o-1;v>=0;v--){const f=d.getEndOffset(v);if(f<=l)break;if((0,w.ignoreBracketsInToken)(d.getStandardTokenType(v))||d.getLanguageId(v)!==a){l=f;break}}let u=Math.min(d.getLineContent().length,r.column-1+h.maxBracketLength);for(let v=o+1;v<c;v++){const f=d.getStartOffset(v);if(f>=u)break;if((0,w.ignoreBracketsInToken)(d.getStandardTokenType(v))||d.getLanguageId(v)!==a){u=f;break}}return{searchStartOffset:l,searchEndOffset:u}}_matchBracket(r,d){const h=r.lineNumber,o=this.textModel.tokenization.getLineTokens(h),c=this.textModel.getLineContent(h),a=o.findTokenIndexAtOffset(r.column-1);if(a<0)return null;const l=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(a)).brackets;if(l&&!(0,w.ignoreBracketsInToken)(o.getStandardTokenType(a))){let{searchStartOffset:u,searchEndOffset:v}=this._establishBracketSearchOffsets(r,o,l,a),f=null;for(;;){const p=b.BracketsUtils.findNextBracketInRange(l.forwardRegex,h,c,u,v);if(!p)break;if(p.startColumn<=r.column&&r.column<=p.endColumn){const C=c.substring(p.startColumn-1,p.endColumn-1).toLowerCase(),y=this._matchFoundBracket(p,l.textIsBracket[C],l.textIsOpenBracket[C],d);if(y){if(y instanceof t)return null;f=y}}u=p.endColumn-1}if(f)return f}if(a>0&&o.getStartOffset(a)===r.column-1){const u=a-1,v=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId(u)).brackets;if(v&&!(0,w.ignoreBracketsInToken)(o.getStandardTokenType(u))){const{searchStartOffset:f,searchEndOffset:p}=this._establishBracketSearchOffsets(r,o,v,u),C=b.BracketsUtils.findPrevBracketInRange(v.reversedRegex,h,c,f,p);if(C&&C.startColumn<=r.column&&r.column<=C.endColumn){const y=c.substring(C.startColumn-1,C.endColumn-1).toLowerCase(),E=this._matchFoundBracket(C,v.textIsBracket[y],v.textIsOpenBracket[y],d);if(E)return E instanceof t?null:E}}}return null}_matchFoundBracket(r,d,h,o){if(!d)return null;const c=h?this._findMatchingBracketDown(d,r.getEndPosition(),o):this._findMatchingBracketUp(d,r.getStartPosition(),o);return c?c instanceof t?c:[r,c]:null}_findMatchingBracketUp(r,d,h){const o=r.languageId,c=r.reversedRegex;let a=-1,l=0;const u=(v,f,p,C)=>{for(;;){if(h&&++l%100===0&&!h())return t.INSTANCE;const y=b.BracketsUtils.findPrevBracketInRange(c,v,f,p,C);if(!y)break;const E=f.substring(y.startColumn-1,y.endColumn-1).toLowerCase();if(r.isOpen(E)?a++:r.isClose(E)&&a--,a===0)return y;C=y.startColumn-1}return null};for(let v=d.lineNumber;v>=1;v--){const f=this.textModel.tokenization.getLineTokens(v),p=f.getCount(),C=this.textModel.getLineContent(v);let y=p-1,E=C.length,I=C.length;v===d.lineNumber&&(y=f.findTokenIndexAtOffset(d.column-1),E=d.column-1,I=d.column-1);let T=!0;for(;y>=0;y--){const O=f.getLanguageId(y)===o&&!(0,w.ignoreBracketsInToken)(f.getStandardTokenType(y));if(O)T?E=f.getStartOffset(y):(E=f.getStartOffset(y),I=f.getEndOffset(y));else if(T&&E!==I){const R=u(v,C,E,I);if(R)return R}T=O}if(T&&E!==I){const O=u(v,C,E,I);if(O)return O}}return null}_findMatchingBracketDown(r,d,h){const o=r.languageId,c=r.forwardRegex;let a=1,l=0;const u=(f,p,C,y)=>{for(;;){if(h&&++l%100===0&&!h())return t.INSTANCE;const E=b.BracketsUtils.findNextBracketInRange(c,f,p,C,y);if(!E)break;const I=p.substring(E.startColumn-1,E.endColumn-1).toLowerCase();if(r.isOpen(I)?a++:r.isClose(I)&&a--,a===0)return E;C=E.endColumn-1}return null},v=this.textModel.getLineCount();for(let f=d.lineNumber;f<=v;f++){const p=this.textModel.tokenization.getLineTokens(f),C=p.getCount(),y=this.textModel.getLineContent(f);let E=0,I=0,T=0;f===d.lineNumber&&(E=p.findTokenIndexAtOffset(d.column-1),I=d.column-1,T=d.column-1);let O=!0;for(;E<C;E++){const R=p.getLanguageId(E)===o&&!(0,w.ignoreBracketsInToken)(p.getStandardTokenType(E));if(R)O||(I=p.getStartOffset(E)),T=p.getEndOffset(E);else if(O&&I!==T){const M=u(f,y,I,T);if(M)return M}O=R}if(O&&I!==T){const R=u(f,y,I,T);if(R)return R}}return null}findPrevBracket(r){var d;const h=this.textModel.validatePosition(r);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((d=this.bracketPairsTree.value)===null||d===void 0?void 0:d.object.getFirstBracketBefore(h))||null;let o=null,c=null,a=null;for(let l=h.lineNumber;l>=1;l--){const u=this.textModel.tokenization.getLineTokens(l),v=u.getCount(),f=this.textModel.getLineContent(l);let p=v-1,C=f.length,y=f.length;if(l===h.lineNumber){p=u.findTokenIndexAtOffset(h.column-1),C=h.column-1,y=h.column-1;const I=u.getLanguageId(p);o!==I&&(o=I,c=this.languageConfigurationService.getLanguageConfiguration(o).brackets,a=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let E=!0;for(;p>=0;p--){const I=u.getLanguageId(p);if(o!==I){if(c&&a&&E&&C!==y){const O=b.BracketsUtils.findPrevBracketInRange(c.reversedRegex,l,f,C,y);if(O)return this._toFoundBracket(a,O);E=!1}o=I,c=this.languageConfigurationService.getLanguageConfiguration(o).brackets,a=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew}const T=!!c&&!(0,w.ignoreBracketsInToken)(u.getStandardTokenType(p));if(T)E?C=u.getStartOffset(p):(C=u.getStartOffset(p),y=u.getEndOffset(p));else if(a&&c&&E&&C!==y){const O=b.BracketsUtils.findPrevBracketInRange(c.reversedRegex,l,f,C,y);if(O)return this._toFoundBracket(a,O)}E=T}if(a&&c&&E&&C!==y){const I=b.BracketsUtils.findPrevBracketInRange(c.reversedRegex,l,f,C,y);if(I)return this._toFoundBracket(a,I)}}return null}findNextBracket(r){var d;const h=this.textModel.validatePosition(r);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((d=this.bracketPairsTree.value)===null||d===void 0?void 0:d.object.getFirstBracketAfter(h))||null;const o=this.textModel.getLineCount();let c=null,a=null,l=null;for(let u=h.lineNumber;u<=o;u++){const v=this.textModel.tokenization.getLineTokens(u),f=v.getCount(),p=this.textModel.getLineContent(u);let C=0,y=0,E=0;if(u===h.lineNumber){C=v.findTokenIndexAtOffset(h.column-1),y=h.column-1,E=h.column-1;const T=v.getLanguageId(C);c!==T&&(c=T,a=this.languageConfigurationService.getLanguageConfiguration(c).brackets,l=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew)}let I=!0;for(;C<f;C++){const T=v.getLanguageId(C);if(c!==T){if(l&&a&&I&&y!==E){const R=b.BracketsUtils.findNextBracketInRange(a.forwardRegex,u,p,y,E);if(R)return this._toFoundBracket(l,R);I=!1}c=T,a=this.languageConfigurationService.getLanguageConfiguration(c).brackets,l=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew}const O=!!a&&!(0,w.ignoreBracketsInToken)(v.getStandardTokenType(C));if(O)I||(y=v.getStartOffset(C)),E=v.getEndOffset(C);else if(l&&a&&I&&y!==E){const R=b.BracketsUtils.findNextBracketInRange(a.forwardRegex,u,p,y,E);if(R)return this._toFoundBracket(l,R)}I=O}if(l&&a&&I&&y!==E){const T=b.BracketsUtils.findNextBracketInRange(a.forwardRegex,u,p,y,E);if(T)return this._toFoundBracket(l,T)}}return null}findEnclosingBrackets(r,d){const h=this.textModel.validatePosition(r);if(this.canBuildAST){const y=D.Range.fromPositions(h),E=this.getBracketPairsInRange(D.Range.fromPositions(h,h)).findLast(I=>I.closingBracketRange!==void 0&&I.range.strictContainsRange(y));return E?[E.openingBracketRange,E.closingBracketRange]:null}const o=s(d),c=this.textModel.getLineCount(),a=new Map;let l=[];const u=(y,E)=>{if(!a.has(y)){const I=[];for(let T=0,O=E?E.brackets.length:0;T<O;T++)I[T]=0;a.set(y,I)}l=a.get(y)};let v=0;const f=(y,E,I,T,O)=>{for(;;){if(o&&++v%100===0&&!o())return t.INSTANCE;const R=b.BracketsUtils.findNextBracketInRange(y.forwardRegex,E,I,T,O);if(!R)break;const M=I.substring(R.startColumn-1,R.endColumn-1).toLowerCase(),N=y.textIsBracket[M];if(N&&(N.isOpen(M)?l[N.index]++:N.isClose(M)&&l[N.index]--,l[N.index]===-1))return this._matchFoundBracket(R,N,!1,o);T=R.endColumn-1}return null};let p=null,C=null;for(let y=h.lineNumber;y<=c;y++){const E=this.textModel.tokenization.getLineTokens(y),I=E.getCount(),T=this.textModel.getLineContent(y);let O=0,R=0,M=0;if(y===h.lineNumber){O=E.findTokenIndexAtOffset(h.column-1),R=h.column-1,M=h.column-1;const P=E.getLanguageId(O);p!==P&&(p=P,C=this.languageConfigurationService.getLanguageConfiguration(p).brackets,u(p,C))}let N=!0;for(;O<I;O++){const P=E.getLanguageId(O);if(p!==P){if(C&&N&&R!==M){const F=f(C,y,T,R,M);if(F)return i(F);N=!1}p=P,C=this.languageConfigurationService.getLanguageConfiguration(p).brackets,u(p,C)}const x=!!C&&!(0,w.ignoreBracketsInToken)(E.getStandardTokenType(O));if(x)N||(R=E.getStartOffset(O)),M=E.getEndOffset(O);else if(C&&N&&R!==M){const F=f(C,y,T,R,M);if(F)return i(F)}N=x}if(C&&N&&R!==M){const P=f(C,y,T,R,M);if(P)return i(P)}}return null}_toFoundBracket(r,d){if(!d)return null;let h=this.textModel.getValueInRange(d);h=h.toLowerCase();const o=r.getBracketInfo(h);return o?{range:d,bracketInfo:o}:null}}e.BracketPairsTextModelPart=g;function m(n,r){return{object:n,dispose:()=>r?.dispose()}}function s(n){if(typeof n>"u")return()=>!0;{const r=Date.now();return()=>Date.now()-r<=n}}class t{constructor(){this._searchCanceledBrand=void 0}}t.INSTANCE=new t;function i(n){return n instanceof t?null:n}}),define(J[308],ee([1,0,6,9,5,46,270,118,307,2]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class m extends g.Disposable{constructor(t,i,n,r,d,h,o){super(),this._onDidChangeContent=this._register(new _.Emitter),this._BOM=i,this._mightContainNonBasicASCII=!h,this._mightContainRTL=r,this._mightContainUnusualLineTerminators=d,this._pieceTree=new w.PieceTreeBase(t,n,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 n=t+i,r=this.getPositionAt(t),d=this.getPositionAt(n);return new L.Range(r.lineNumber,r.column,d.lineNumber,d.column)}getValueInRange(t,i=0){if(t.isEmpty())return"";const n=this._getEndOfLine(i);return this._pieceTree.getValueInRange(t,n)}getValueLengthInRange(t,i=0){if(t.isEmpty())return 0;if(t.startLineNumber===t.endLineNumber)return t.endColumn-t.startColumn;const n=this.getOffsetAt(t.startLineNumber,t.startColumn),r=this.getOffsetAt(t.endLineNumber,t.endColumn);let d=0;const h=this._getEndOfLine(i),o=this.getEOL();if(h.length!==o.length){const c=h.length-o.length,a=t.endLineNumber-t.startLineNumber;d=c*a}return r-n+d}getCharacterCountInRange(t,i=0){if(this._mightContainNonBasicASCII){let n=0;const r=t.startLineNumber,d=t.endLineNumber;for(let h=r;h<=d;h++){const o=this.getLineContent(h),c=h===r?t.startColumn-1:0,a=h===d?t.endColumn-1:o.length;for(let l=c;l<a;l++)k.isHighSurrogate(o.charCodeAt(l))?(n=n+1,l=l+1):n=n+1}return n+=this._getEndOfLine(i).length*(d-r),n}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,n){let r=this._mightContainRTL,d=this._mightContainUnusualLineTerminators,h=this._mightContainNonBasicASCII,o=!0,c=[];for(let C=0;C<t.length;C++){const y=t[C];o&&y._isTracked&&(o=!1);const E=y.range;if(y.text){let M=!0;h||(M=!k.isBasicASCII(y.text),h=M),!r&&M&&(r=k.containsRTL(y.text)),!d&&M&&(d=k.containsUnusualLineTerminators(y.text))}let I="",T=0,O=0,R=0;if(y.text){let M;[T,O,R,M]=(0,b.countEOL)(y.text);const N=this.getEOL();M===0||M===(N===`\\r\n`?2:1)?I=y.text:I=y.text.replace(/\\r\\n|\\r|\\n/g,N)}c[C]={sortIndex:C,identifier:y.identifier||null,range:E,rangeOffset:this.getOffsetAt(E.startLineNumber,E.startColumn),rangeLength:this.getValueLengthInRange(E),text:I,eolCount:T,firstLineLength:O,lastLineLength:R,forceMoveMarkers:!!y.forceMoveMarkers,isAutoWhitespaceEdit:y.isAutoWhitespaceEdit||!1}}c.sort(m._sortOpsAscending);let a=!1;for(let C=0,y=c.length-1;C<y;C++){const E=c[C].range.getEndPosition(),I=c[C+1].range.getStartPosition();if(I.isBeforeOrEqual(E)){if(I.isBefore(E))throw new Error("Overlapping ranges are not allowed!");a=!0}}o&&(c=this._reduceOperations(c));const l=n||i?m._getInverseEditRanges(c):[],u=[];if(i)for(let C=0;C<c.length;C++){const y=c[C],E=l[C];if(y.isAutoWhitespaceEdit&&y.range.isEmpty())for(let I=E.startLineNumber;I<=E.endLineNumber;I++){let T="";I===E.startLineNumber&&(T=this.getLineContent(y.range.startLineNumber),k.firstNonWhitespaceIndex(T)!==-1)||u.push({lineNumber:I,oldContent:T})}}let v=null;if(n){let C=0;v=[];for(let y=0;y<c.length;y++){const E=c[y],I=l[y],T=this.getValueInRange(E.range),O=E.rangeOffset+C;C+=E.text.length-T.length,v[y]={sortIndex:E.sortIndex,identifier:E.identifier,range:I,text:T,textChange:new S.TextChange(E.rangeOffset,T,O,E.text)}}a||v.sort((y,E)=>y.sortIndex-E.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=d,this._mightContainNonBasicASCII=h;const f=this._doApplyEdits(c);let p=null;if(i&&u.length>0){u.sort((C,y)=>y.lineNumber-C.lineNumber),p=[];for(let C=0,y=u.length;C<y;C++){const E=u[C].lineNumber;if(C>0&&u[C-1].lineNumber===E)continue;const I=u[C].oldContent,T=this.getLineContent(E);T.length===0||T===I||k.firstNonWhitespaceIndex(T)!==-1||p.push(E)}}return this._onDidChangeContent.fire(),new D.ApplyEditsResult(v,f,p)}_reduceOperations(t){return t.length<1e3?t:[this._toSingleEditOperation(t)]}_toSingleEditOperation(t){let i=!1;const n=t[0].range,r=t[t.length-1].range,d=new L.Range(n.startLineNumber,n.startColumn,r.endLineNumber,r.endColumn);let h=n.startLineNumber,o=n.startColumn;const c=[];for(let f=0,p=t.length;f<p;f++){const C=t[f],y=C.range;i=i||C.forceMoveMarkers,c.push(this.getValueInRange(new L.Range(h,o,y.startLineNumber,y.startColumn))),C.text.length>0&&c.push(C.text),h=y.endLineNumber,o=y.endColumn}const a=c.join(""),[l,u,v]=(0,b.countEOL)(a);return{sortIndex:0,identifier:t[0].identifier,range:d,rangeOffset:this.getOffsetAt(d.startLineNumber,d.startColumn),rangeLength:this.getValueLengthInRange(d,0),text:a,eolCount:l,firstLineLength:u,lastLineLength:v,forceMoveMarkers:i,isAutoWhitespaceEdit:!1}}_doApplyEdits(t){t.sort(m._sortOpsDescending);const i=[];for(let n=0;n<t.length;n++){const r=t[n],d=r.range.startLineNumber,h=r.range.startColumn,o=r.range.endLineNumber,c=r.range.endColumn;if(d===o&&h===c&&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 L.Range(d,h,o,c);i.push({range:a,rangeLength:r.rangeLength,text:r.text,rangeOffset:r.rangeOffset,forceMoveMarkers:r.forceMoveMarkers})}return i}findMatchesLineByLine(t,i,n,r){return this._pieceTree.findMatchesLineByLine(t,i,n,r)}static _getInverseEditRanges(t){const i=[];let n=0,r=0,d=null;for(let h=0,o=t.length;h<o;h++){const c=t[h];let a,l;d?d.range.endLineNumber===c.range.startLineNumber?(a=n,l=r+(c.range.startColumn-d.range.endColumn)):(a=n+(c.range.startLineNumber-d.range.endLineNumber),l=c.range.startColumn):(a=c.range.startLineNumber,l=c.range.startColumn);let u;if(c.text.length>0){const v=c.eolCount+1;v===1?u=new L.Range(a,l,a,l+c.firstLineLength):u=new L.Range(a,l,a+v-1,c.lastLineLength+1)}else u=new L.Range(a,l,a,l);n=u.endLineNumber,r=u.endColumn,i.push(u),d=c}return i}static _sortOpsAscending(t,i){const n=L.Range.compareRangesUsingEnds(t.range,i.range);return n===0?t.sortIndex-i.sortIndex:n}static _sortOpsDescending(t,i){const n=L.Range.compareRangesUsingEnds(t.range,i.range);return n===0?i.sortIndex-t.sortIndex:-n}}e.PieceTreeTextBuffer=m}),define(J[578],ee([1,0,9,270,308]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=void 0;class D{constructor(S,g,m,s,t,i,n,r,d){this._chunks=S,this._bom=g,this._cr=m,this._lf=s,this._crlf=t,this._containsRTL=i,this._containsUnusualLineTerminators=n,this._isBasicASCII=r,this._normalizeEOL=d}_getEOL(S){const g=this._cr+this._lf+this._crlf,m=this._cr+this._crlf;return g===0?S===1?`\n`:`\\r\n`:m>g/2?`\\r\n`:`\n`}create(S){const g=this._getEOL(S),m=this._chunks;if(this._normalizeEOL&&(g===`\\r\n`&&(this._cr>0||this._lf>0)||g===`\n`&&(this._cr>0||this._crlf>0)))for(let t=0,i=m.length;t<i;t++){const n=m[t].buffer.replace(/\\r\\n|\\r|\\n/g,g),r=(0,k.createLineStartsFast)(n);m[t]=new k.StringBuffer(n,r)}const s=new L.PieceTreeTextBuffer(m,this._bom,g,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:s,disposable:s}}}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(S){if(S.length===0)return;this.chunks.length===0&&_.startsWithUTF8BOM(S)&&(this.BOM=_.UTF8_BOM_CHARACTER,S=S.substr(1));const g=S.charCodeAt(S.length-1);g===13||g>=55296&&g<=56319?(this._acceptChunk1(S.substr(0,S.length-1),!1),this._hasPreviousChar=!0,this._previousChar=g):(this._acceptChunk1(S,!1),this._hasPreviousChar=!1,this._previousChar=g)}_acceptChunk1(S,g){!g&&S.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+S):this._acceptChunk2(S))}_acceptChunk2(S){const g=(0,k.createLineStarts)(this._tmpLineStarts,S);this.chunks.push(new k.StringBuffer(S,g.lineStarts)),this.cr+=g.cr,this.lf+=g.lf,this.crlf+=g.crlf,g.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=_.containsRTL(S)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=_.containsUnusualLineTerminators(S)))}finish(S=!0){return this._finish(),new D(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,S)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const S=this.chunks[this.chunks.length-1];S.buffer+=String.fromCharCode(this._previousChar);const g=(0,k.createLineStartsFast)(S.buffer);S.lineStarts=g,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=w}),define(J[579],ee([1,0,134,17]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function L(S){for(let g=0,m=S.length;g<m;g+=4){const s=S[g+0],t=S[g+1],i=S[g+2],n=S[g+3];S[g+0]=n,S[g+1]=i,S[g+2]=t,S[g+3]=s}}function D(S){const g=new Uint8Array(S.buffer,S.byteOffset,S.length*4);return k.isLittleEndian()||L(g),_.VSBuffer.wrap(g)}function w(S){const g=new Uint32Array(b(S));let m=0;if(g[m++]=S.id,S.type==="full")g[m++]=1,g[m++]=S.data.length,g.set(S.data,m),m+=S.data.length;else{g[m++]=2,g[m++]=S.deltas.length;for(const s of S.deltas)g[m++]=s.start,g[m++]=s.deleteCount,s.data?(g[m++]=s.data.length,g.set(s.data,m),m+=s.data.length):g[m++]=0}return D(g)}e.encodeSemanticTokensDto=w;function b(S){let g=0;if(g+=1+1,S.type==="full")g+=1+S.data.length;else{g+=1,g+=(1+1+1)*S.deltas.length;for(const m of S.deltas)m.data&&(g+=m.data.length)}return g}}),define(J[580],ee([1,0,6,2]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=void 0;class L{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new _.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(b){this._onDidChange.fire({changedLanguages:b,changedColorMap:!1})}register(b,S){return this._tokenizationSupports.set(b,S),this.handleChange([b]),(0,k.toDisposable)(()=>{this._tokenizationSupports.get(b)===S&&(this._tokenizationSupports.delete(b),this.handleChange([b]))})}get(b){return this._tokenizationSupports.get(b)||null}registerFactory(b,S){var g;(g=this._factories.get(b))===null||g===void 0||g.dispose();const m=new D(this,b,S);return this._factories.set(b,m),(0,k.toDisposable)(()=>{const s=this._factories.get(b);!s||s!==m||(this._factories.delete(b),s.dispose())})}getOrCreate(b){return we(this,void 0,void 0,function*(){const S=this.get(b);if(S)return S;const g=this._factories.get(b);return!g||g.isResolved?null:(yield g.resolve(),this.get(b))})}isResolved(b){if(this.get(b))return!0;const g=this._factories.get(b);return!!(!g||g.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=L;class D extends k.Disposable{get isResolved(){return this._isResolved}constructor(b,S,g){super(),this._registry=b,this._languageId=S,this._factory=g,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return we(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return we(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[27],ee([1,0,26,21,5,580]),function(j,e,_,k,L,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.SelectedSuggestionInfo=e.InlineCompletionTriggerKind=e.CompletionItemKinds=e.EncodedTokenizationResult=e.TokenizationResult=e.Token=void 0;class w{constructor(l,u,v){this.offset=l,this.type=u,this.language=v,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=w;class b{constructor(l,u){this.tokens=l,this.endState=u,this._tokenizationResultBrand=void 0}}e.TokenizationResult=b;class S{constructor(l,u){this.tokens=l,this.endState=u,this._encodedTokenizationResultBrand=void 0}}e.EncodedTokenizationResult=S;var g;(function(a){const l=new Map;l.set(0,_.Codicon.symbolMethod),l.set(1,_.Codicon.symbolFunction),l.set(2,_.Codicon.symbolConstructor),l.set(3,_.Codicon.symbolField),l.set(4,_.Codicon.symbolVariable),l.set(5,_.Codicon.symbolClass),l.set(6,_.Codicon.symbolStruct),l.set(7,_.Codicon.symbolInterface),l.set(8,_.Codicon.symbolModule),l.set(9,_.Codicon.symbolProperty),l.set(10,_.Codicon.symbolEvent),l.set(11,_.Codicon.symbolOperator),l.set(12,_.Codicon.symbolUnit),l.set(13,_.Codicon.symbolValue),l.set(15,_.Codicon.symbolEnum),l.set(14,_.Codicon.symbolConstant),l.set(15,_.Codicon.symbolEnum),l.set(16,_.Codicon.symbolEnumMember),l.set(17,_.Codicon.symbolKeyword),l.set(27,_.Codicon.symbolSnippet),l.set(18,_.Codicon.symbolText),l.set(19,_.Codicon.symbolColor),l.set(20,_.Codicon.symbolFile),l.set(21,_.Codicon.symbolReference),l.set(22,_.Codicon.symbolCustomColor),l.set(23,_.Codicon.symbolFolder),l.set(24,_.Codicon.symbolTypeParameter),l.set(25,_.Codicon.account),l.set(26,_.Codicon.issues);function u(p){let C=l.get(p);return C||(console.info("No codicon found for CompletionItemKind "+p),C=_.Codicon.symbolProperty),C}a.toIcon=u;const v=new Map;v.set("method",0),v.set("function",1),v.set("constructor",2),v.set("field",3),v.set("variable",4),v.set("class",5),v.set("struct",6),v.set("interface",7),v.set("module",8),v.set("property",9),v.set("event",10),v.set("operator",11),v.set("unit",12),v.set("value",13),v.set("constant",14),v.set("enum",15),v.set("enum-member",16),v.set("enumMember",16),v.set("keyword",17),v.set("snippet",27),v.set("text",18),v.set("color",19),v.set("file",20),v.set("reference",21),v.set("customcolor",22),v.set("folder",23),v.set("type-parameter",24),v.set("typeParameter",24),v.set("account",25),v.set("issue",26);function f(p,C){let y=v.get(p);return typeof y>"u"&&!C&&(y=9),y}a.fromString=f})(g||(e.CompletionItemKinds=g={}));var m;(function(a){a[a.Automatic=0]="Automatic",a[a.Explicit=1]="Explicit"})(m||(e.InlineCompletionTriggerKind=m={}));class s{constructor(l,u,v,f){this.range=l,this.text=u,this.completionKind=v,this.isSnippetText=f}equals(l){return L.Range.lift(this.range).equalsRange(l.range)&&this.text===l.text&&this.completionKind===l.completionKind&&this.isSnippetText===l.isSnippetText}}e.SelectedSuggestionInfo=s;var t;(function(a){a[a.Invoke=1]="Invoke",a[a.TriggerCharacter=2]="TriggerCharacter",a[a.ContentChange=3]="ContentChange"})(t||(e.SignatureHelpTriggerKind=t={}));var i;(function(a){a[a.Text=0]="Text",a[a.Read=1]="Read",a[a.Write=2]="Write"})(i||(e.DocumentHighlightKind=i={}));function n(a){return a&&k.URI.isUri(a.uri)&&L.Range.isIRange(a.range)&&(L.Range.isIRange(a.originSelectionRange)||L.Range.isIRange(a.targetSelectionRange))}e.isLocationLink=n;var r;(function(a){const l=new Map;l.set(0,_.Codicon.symbolFile),l.set(1,_.Codicon.symbolModule),l.set(2,_.Codicon.symbolNamespace),l.set(3,_.Codicon.symbolPackage),l.set(4,_.Codicon.symbolClass),l.set(5,_.Codicon.symbolMethod),l.set(6,_.Codicon.symbolProperty),l.set(7,_.Codicon.symbolField),l.set(8,_.Codicon.symbolConstructor),l.set(9,_.Codicon.symbolEnum),l.set(10,_.Codicon.symbolInterface),l.set(11,_.Codicon.symbolFunction),l.set(12,_.Codicon.symbolVariable),l.set(13,_.Codicon.symbolConstant),l.set(14,_.Codicon.symbolString),l.set(15,_.Codicon.symbolNumber),l.set(16,_.Codicon.symbolBoolean),l.set(17,_.Codicon.symbolArray),l.set(18,_.Codicon.symbolObject),l.set(19,_.Codicon.symbolKey),l.set(20,_.Codicon.symbolNull),l.set(21,_.Codicon.symbolEnumMember),l.set(22,_.Codicon.symbolStruct),l.set(23,_.Codicon.symbolEvent),l.set(24,_.Codicon.symbolOperator),l.set(25,_.Codicon.symbolTypeParameter);function u(v){let f=l.get(v);return f||(console.info("No codicon found for SymbolKind "+v),f=_.Codicon.symbolProperty),f}a.toIcon=u})(r||(e.SymbolKinds=r={}));class d{static fromValue(l){switch(l){case"comment":return d.Comment;case"imports":return d.Imports;case"region":return d.Region}return new d(l)}constructor(l){this.value=l}}e.FoldingRangeKind=d,d.Comment=new d("comment"),d.Imports=new d("imports"),d.Region=new d("region");var h;(function(a){function l(u){return!u||typeof u!="object"?!1:typeof u.id=="string"&&typeof u.title=="string"}a.is=l})(h||(e.Command=h={}));var o;(function(a){a[a.Type=1]="Type",a[a.Parameter=2]="Parameter"})(o||(e.InlayHintKind=o={}));class c{constructor(l){this.createSupport=l,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(l=>{l&&l.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}e.LazyTokenizationSupport=c,e.TokenizationRegistry=new D.TokenizationRegistry}),define(J[152],ee([1,0,27]),function(j,e,_){"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 _.TokenizationResult([new _.Token(0,"",D)],w)}e.nullTokenize=k;function L(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 _.EncodedTokenizationResult(b,w===null?e.NullState:w)}e.nullTokenizeEncoded=L}),define(J[309],ee([1,0,9,89,27,152]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=void 0;const w={getInitialState:()=>D.NullState,tokenizeEncoded:(m,s,t)=>(0,D.nullTokenizeEncoded)(0,t)};function b(m,s,t){return we(this,void 0,void 0,function*(){if(!t)return g(s,m.languageIdCodec,w);const i=yield L.TokenizationRegistry.getOrCreate(t);return g(s,m.languageIdCodec,i||w)})}e.tokenizeToString=b;function S(m,s,t,i,n,r,d){let h="<div>",o=i,c=0,a=!0;for(let l=0,u=s.getCount();l<u;l++){const v=s.getEndOffset(l);if(v<=i)continue;let f="";for(;o<v&&o<n;o++){const p=m.charCodeAt(o);switch(p){case 9:{let C=r-(o+c)%r;for(c+=C-1;C>0;)d&&a?(f+=" ",a=!1):(f+=" ",a=!0),C--;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:d&&a?(f+=" ",a=!1):(f+=" ",a=!0);break;default:f+=String.fromCharCode(p),a=!1}}if(h+=`<span style="${s.getInlineStyle(l,t)}">${f}</span>`,v>n||o>=n)break}return h+="</div>",h}e.tokenizeLineToHTML=S;function g(m,s,t){let i=\'<div class="monaco-tokenized-source">\';const n=_.splitLines(m);let r=t.getInitialState();for(let d=0,h=n.length;d<h;d++){const o=n[d];d>0&&(i+="<br/>");const c=t.tokenizeEncoded(o,!0,r);k.LineTokens.convertToEndOffset(c.tokens,o.length);const l=new k.LineTokens(c.tokens,o,s).inflate();let u=0;for(let v=0,f=l.getCount();v<f;v++){const p=l.getClassName(v),C=l.getEndOffset(v);i+=`<span class="${p}">${_.escape(o.substring(u,C))}</span>`,u=C}r=c.endState}return i+="</div>",i}e._tokenizeToString=g}),define(J[581],ee([1,0,14,11,17,56,118,87,119,152,494,275,89]),function(j,e,_,k,L,D,w,b,S,g,m,s,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(l,u){this.tokenizationSupport=u,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new r(l)}getStartState(l){return l===1?this.initialState:this.store.getEndState(l-1)}}e.TokenizerWithStateStore=i;class n extends i{constructor(l,u,v,f){super(l,u),this._textModel=v,this._languageIdCodec=f}updateTokensUntilLine(l,u){const v=this._textModel.getLanguageId();for(;;){const f=this.store.getFirstInvalidEndStateLineNumber();if(!f||f>u)break;const p=this._textModel.getLineContent(f),C=this.getStartState(f),y=o(this._languageIdCodec,v,this.tokenizationSupport,p,!0,C);l.add(f,y.tokens),this.store.setEndState(f,y.endState)}}getTokenTypeIfInsertingCharacter(l,u){const v=this.getStartState(l.lineNumber);if(!v)return 0;const f=this._textModel.getLanguageId(),p=this._textModel.getLineContent(l.lineNumber),C=p.substring(0,l.column-1)+u+p.substring(l.column-1),y=o(this._languageIdCodec,f,this.tokenizationSupport,C,!0,v),E=new t.LineTokens(y.tokens,C,this._languageIdCodec);if(E.getCount()===0)return 0;const I=E.findTokenIndexAtOffset(l.column-1);return E.getStandardTokenType(I)}tokenizeLineWithEdit(l,u,v){const f=l.lineNumber,p=l.column,C=this.getStartState(f);if(!C)return null;const y=this._textModel.getLineContent(f),E=y.substring(0,p-1)+v+y.substring(p-1+u),I=this._textModel.getLanguageIdAtPosition(f,0),T=o(this._languageIdCodec,I,this.tokenizationSupport,E,!0,C);return new t.LineTokens(T.tokens,E,this._languageIdCodec)}isCheapToTokenize(l){const u=this.store.getFirstInvalidEndStateLineNumberOrMax();return l<u||l===u&&this._textModel.getLineLength(l)<2048}tokenizeHeuristically(l,u,v){if(v<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(u<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(l,v),{heuristicTokens:!1};let f=this.guessStartState(u);const p=this._textModel.getLanguageId();for(let C=u;C<=v;C++){const y=this._textModel.getLineContent(C),E=o(this._languageIdCodec,p,this.tokenizationSupport,y,!0,f);l.add(C,E.tokens),f=E.endState}return{heuristicTokens:!0}}guessStartState(l){let u=this._textModel.getLineFirstNonWhitespaceColumn(l);const v=[];let f=null;for(let y=l-1;u>1&&y>=1;y--){const E=this._textModel.getLineFirstNonWhitespaceColumn(y);if(E!==0&&E<u&&(v.push(this._textModel.getLineContent(y)),u=E,f=this.getStartState(y),f))break}f||(f=this.tokenizationSupport.getInitialState()),v.reverse();const p=this._textModel.getLanguageId();let C=f;for(const y of v)C=o(this._languageIdCodec,p,this.tokenizationSupport,y,!1,C).endState;return C}}e.TokenizerWithStateStoreAndTextModel=n;class r{constructor(l){this.lineCount=l,this.tokenizationStateStore=new d,this._invalidEndStatesLineNumbers=new h,this._invalidEndStatesLineNumbers.addRange(new S.OffsetRange(1,l+1))}getEndState(l){return this.tokenizationStateStore.getEndState(l)}setEndState(l,u){for(;;){const f=this._invalidEndStatesLineNumbers.min;if(f!==null&&f<=l)this._invalidEndStatesLineNumbers.removeMin();else break}const v=this.tokenizationStateStore.setEndState(l,u);return v&&l<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new S.OffsetRange(l+1,l+2)),v}acceptChange(l,u){this.lineCount+=u-l.length,this.tokenizationStateStore.acceptChange(l,u),this._invalidEndStatesLineNumbers.addRangeAndResize(new S.OffsetRange(l.startLineNumber,l.endLineNumberExclusive),u)}acceptChanges(l){for(const u of l){const[v]=(0,w.countEOL)(u.text);this.acceptChange(new b.LineRange(u.range.startLineNumber,u.range.endLineNumber+1),v+1)}}invalidateEndStateRange(l){this._invalidEndStatesLineNumbers.addRange(new S.OffsetRange(l.startLineNumber,l.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 d{constructor(){this._lineEndStates=new m.FixedArray(null)}getEndState(l){return this._lineEndStates.get(l)}setEndState(l,u){const v=this._lineEndStates.get(l);return v&&v.equals(u)?!1:(this._lineEndStates.set(l,u),!0)}acceptChange(l,u){let v=l.length;u>0&&v>0&&(v--,u--),this._lineEndStates.replace(l.startLineNumber,v,u)}}e.TokenizationStateStore=d;class h{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}removeMin(){if(this._ranges.length===0)return null;const l=this._ranges[0];return l.start+1===l.endExclusive?this._ranges.shift():this._ranges[0]=new S.OffsetRange(l.start+1,l.endExclusive),l.start}addRange(l){S.OffsetRange.addRange(l,this._ranges)}addRangeAndResize(l,u){let v=0;for(;!(v>=this._ranges.length||l.start<=this._ranges[v].endExclusive);)v++;let f=v;for(;!(f>=this._ranges.length||l.endExclusive<this._ranges[f].start);)f++;const p=u-l.length;for(let C=f;C<this._ranges.length;C++)this._ranges[C]=this._ranges[C].delta(p);if(v===f){const C=new S.OffsetRange(l.start,l.start+u);C.isEmpty||this._ranges.splice(v,0,C)}else{const C=Math.min(l.start,this._ranges[v].start),y=Math.max(l.endExclusive,this._ranges[f-1].endExclusive),E=new S.OffsetRange(C,y+p);E.isEmpty?this._ranges.splice(v,f-v):this._ranges.splice(v,f-v,E)}}toString(){return this._ranges.map(l=>l.toString()).join(" + ")}}e.RangePriorityQueueImpl=h;function o(a,l,u,v,f,p){let C=null;if(u)try{C=u.tokenizeEncoded(v,f,p.clone())}catch(y){(0,k.onUnexpectedError)(y)}return C||(C=(0,g.nullTokenizeEncoded)(a.encodeLanguageId(l),p)),t.LineTokens.convertToEndOffset(C.tokens,v.length),C}class c{constructor(l,u){this._tokenizerWithStateStore=l,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,_.runWhenIdle)(l=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(l)}))}_backgroundTokenizeWithDeadline(l){const u=Date.now()+l.timeRemaining(),v=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<u?(0,L.setTimeout0)(v):this._beginBackgroundTokenization())};v()}_backgroundTokenizeForAtLeast1ms(){const l=this._tokenizerWithStateStore._textModel.getLineCount(),u=new s.ContiguousMultilineTokensBuilder,v=D.StopWatch.create(!1);do if(v.elapsed()>1||this._tokenizeOneInvalidLine(u)>=l)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(u.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.isTokenizationComplete():!1}_tokenizeOneInvalidLine(l){if(!this._tokenizerWithStateStore||!this._hasLinesToTokenize())return this._tokenizerWithStateStore._textModel.getLineCount()+1;const u=this._tokenizerWithStateStore.store.getFirstInvalidEndStateLineNumber();return this._tokenizerWithStateStore.updateTokensUntilLine(l,u),u}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.isTokenizationComplete()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(l,u){this._tokenizerWithStateStore.store.invalidateEndStateRange(new b.LineRange(l,u))}}e.DefaultBackgroundTokenizer=c}),define(J[582],ee([1,0,16,14,11,6,2,118,87,12,140,27,269,581,275,502,504]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationTextModelPart=void 0;class h extends t.TextModelPart{constructor(l,u,v,f,p,C){super(),this._languageService=l,this._languageConfigurationService=u,this._textModel=v,this._bracketPairsTextModelPart=f,this._languageId=p,this._attachedViews=C,this._semanticTokens=new d.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(y=>{y.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(y=>{this._emitModelTokensChangedEvent(y)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(y=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(l){if(l.isFlush)this._semanticTokens.flush();else if(!l.isEolChange)for(const u of l.changes){const[v,f,p]=(0,b.countEOL)(u.text);this._semanticTokens.acceptEdit(u.range,v,f,p,u.text.length>0?u.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(l)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(l){this.validateLineNumber(l);const u=this.grammarTokens.getLineTokens(l);return this._semanticTokens.addSparseTokens(l,u)}_emitModelTokensChangedEvent(l){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(l),this._onDidChangeTokens.fire(l))}validateLineNumber(l){if(l<1||l>this._textModel.getLineCount())throw new L.BugIndicatingError("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(l){this.validateLineNumber(l),this.grammarTokens.forceTokenization(l)}isCheapToTokenize(l){return this.validateLineNumber(l),this.grammarTokens.isCheapToTokenize(l)}tokenizeIfCheap(l){this.validateLineNumber(l),this.grammarTokens.tokenizeIfCheap(l)}getTokenTypeIfInsertingCharacter(l,u,v){return this.grammarTokens.getTokenTypeIfInsertingCharacter(l,u,v)}tokenizeLineWithEdit(l,u,v){return this.grammarTokens.tokenizeLineWithEdit(l,u,v)}setSemanticTokens(l,u){this._semanticTokens.set(l,u),this._emitModelTokensChangedEvent({semanticTokensApplied:l!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(l,u){if(this.hasCompleteSemanticTokens())return;const v=this._textModel.validateRange(this._semanticTokens.setPartial(l,u));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:v.startLineNumber,toLineNumber:v.endLineNumber}]})}getWordAtPosition(l){this.assertNotDisposed();const u=this._textModel.validatePosition(l),v=this._textModel.getLineContent(u.lineNumber),f=this.getLineTokens(u.lineNumber),p=f.findTokenIndexAtOffset(u.column-1),[C,y]=h._findLanguageBoundaries(f,p),E=(0,m.getWordAtText)(u.column,this.getLanguageConfiguration(f.getLanguageId(p)).getWordDefinition(),v.substring(C,y),C);if(E&&E.startColumn<=l.column&&l.column<=E.endColumn)return E;if(p>0&&C===u.column-1){const[I,T]=h._findLanguageBoundaries(f,p-1),O=(0,m.getWordAtText)(u.column,this.getLanguageConfiguration(f.getLanguageId(p-1)).getWordDefinition(),v.substring(I,T),I);if(O&&O.startColumn<=l.column&&l.column<=O.endColumn)return O}return null}getLanguageConfiguration(l){return this._languageConfigurationService.getLanguageConfiguration(l)}static _findLanguageBoundaries(l,u){const v=l.getLanguageId(u);let f=0;for(let C=u;C>=0&&l.getLanguageId(C)===v;C--)f=l.getStartOffset(C);let p=l.getLineContent().length;for(let C=u,y=l.getCount();C<y&&l.getLanguageId(C)===v;C++)p=l.getEndOffset(C);return[f,p]}getWordUntilPosition(l){const u=this.getWordAtPosition(l);return u?{word:u.word.substr(0,l.column-u.startColumn),startColumn:u.startColumn,endColumn:l.column}:{word:"",startColumn:l.column,endColumn:l.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(l,u){const v=this._textModel.validatePosition(new g.Position(l,u)),f=this.getLineTokens(v.lineNumber);return f.getLanguageId(f.findTokenIndexAtOffset(v.column-1))}setLanguageId(l,u="api"){if(this._languageId===l)return;const v={oldLanguage:this._languageId,newLanguage:l,source:u};this._languageId=l,this._bracketPairsTextModelPart.handleDidChangeLanguage(v),this.grammarTokens.resetTokenization(),this._onDidChangeLanguage.fire(v),this._onDidChangeLanguageConfiguration.fire({})}}e.TokenizationTextModelPart=h;class o extends w.Disposable{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(l,u,v,f){super(),this._languageIdCodec=l,this._textModel=u,this.getLanguageId=v,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(s.TokenizationRegistry.onDidChange(p=>{const C=this.getLanguageId();p.changedLanguages.indexOf(C)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(f.onDidChangeVisibleRanges(({view:p,state:C})=>{if(C){let y=this._attachedViewStates.get(p);y||(y=new c(()=>this.refreshRanges(y.lineRanges)),this._attachedViewStates.set(p,y)),y.handleStateChange(C)}else this._attachedViewStates.deleteAndDispose(p)}))}resetTokenization(l=!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())),l&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const v=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const C=s.TokenizationRegistry.get(this.getLanguageId());if(!C)return[null,null];let y;try{y=C.getInitialState()}catch(E){return(0,L.onUnexpectedError)(E),[null,null]}return[C,y]},[f,p]=v();if(f&&p?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 C={setTokens:y=>{this.setTokens(y)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const y=2;this._backgroundTokenizationState=y,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(y,E)=>{var I,T,O;if(!E)throw new L.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&&y>=R&&((O=this._tokenizer)===null||O===void 0||O.store.setEndState(y,E))}};f&&f.createBackgroundTokenizer&&!f.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=f.createBackgroundTokenizer(this._textModel,C)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new i.DefaultBackgroundTokenizer(this._tokenizer,C),this._defaultBackgroundTokenizer.handleChanges()),f?.backgroundTokenizerShouldOnlyVerifyTokens&&f.createBackgroundTokenizer?(this._debugBackgroundTokens=new r.ContiguousTokensStore(this._languageIdCodec),this._debugBackgroundStates=new i.TrackingTokenizationStateStore(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=f.createBackgroundTokenizer(this._textModel,{setTokens:y=>{var E;(E=this._debugBackgroundTokens)===null||E===void 0||E.setMultilineTokens(y,this._textModel)},backgroundTokenizationFinished(){},setEndState:(y,E)=>{var I;(I=this._debugBackgroundStates)===null||I===void 0||I.setEndState(y,E)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var l;(l=this._defaultBackgroundTokenizer)===null||l===void 0||l.handleChanges()}handleDidChangeContent(l){var u,v,f;if(l.isFlush)this.resetTokenization(!1);else if(!l.isEolChange){for(const p of l.changes){const[C,y]=(0,b.countEOL)(p.text);this._tokens.acceptEdit(p.range,C,y),(u=this._debugBackgroundTokens)===null||u===void 0||u.acceptEdit(p.range,C,y)}(v=this._debugBackgroundStates)===null||v===void 0||v.acceptChanges(l.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(l.changes),(f=this._defaultBackgroundTokenizer)===null||f===void 0||f.handleChanges()}}setTokens(l){const{changes:u}=this._tokens.setMultilineTokens(l,this._textModel);return u.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:u}),{changes:u}}refreshAllVisibleLineTokens(){const l=S.LineRange.joinMany([...this._attachedViewStates].map(([u,v])=>v.lineRanges));this.refreshRanges(l)}refreshRanges(l){for(const u of l)this.refreshRange(u.startLineNumber,u.endLineNumberExclusive-1)}refreshRange(l,u){var v,f;if(!this._tokenizer)return;l=Math.max(1,Math.min(this._textModel.getLineCount(),l)),u=Math.min(this._textModel.getLineCount(),u);const p=new n.ContiguousMultilineTokensBuilder,{heuristicTokens:C}=this._tokenizer.tokenizeHeuristically(p,l,u),y=this.setTokens(p.finalize());if(C)for(const E of y.changes)(v=this._backgroundTokenizer.value)===null||v===void 0||v.requestTokens(E.fromLineNumber,E.toLineNumber+1);(f=this._defaultBackgroundTokenizer)===null||f===void 0||f.checkFinished()}forceTokenization(l){var u,v;const f=new n.ContiguousMultilineTokensBuilder;(u=this._tokenizer)===null||u===void 0||u.updateTokensUntilLine(f,l),this.setTokens(f.finalize()),(v=this._defaultBackgroundTokenizer)===null||v===void 0||v.checkFinished()}isCheapToTokenize(l){return this._tokenizer?this._tokenizer.isCheapToTokenize(l):!0}tokenizeIfCheap(l){this.isCheapToTokenize(l)&&this.forceTokenization(l)}getLineTokens(l){var u;const v=this._textModel.getLineContent(l),f=this._tokens.getTokens(this._textModel.getLanguageId(),l-1,v);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>l&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>l){const p=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),l-1,v);!f.equals(p)&&(!((u=this._debugBackgroundTokenizer.value)===null||u===void 0)&&u.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(l)}return f}getTokenTypeIfInsertingCharacter(l,u,v){if(!this._tokenizer)return 0;const f=this._textModel.validatePosition(new g.Position(l,u));return this.forceTokenization(f.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(f,v)}tokenizeLineWithEdit(l,u,v){if(!this._tokenizer)return null;const f=this._textModel.validatePosition(l);return this.forceTokenization(f.lineNumber),this._tokenizer.tokenizeLineWithEdit(f,u,v)}get hasTokens(){return this._tokens.hasTokens}}class c extends w.Disposable{get lineRanges(){return this._lineRanges}constructor(l){super(),this._refreshTokens=l,this.runner=this._register(new k.RunOnceScheduler(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,_.equals)(this._computedLineRanges,this._lineRanges)||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(l){this._lineRanges=l.visibleLineRanges,l.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}}),define(J[310],ee([1,0,20,6,58,21,12,5,24,27,201]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class s{static chord(n,r){return(0,L.KeyChord)(n,r)}}e.KeyMod=s,s.CtrlCmd=2048,s.Shift=1024,s.Alt=512,s.WinCtrl=256;function t(){return{editor:void 0,languages:void 0,CancellationTokenSource:_.CancellationTokenSource,Emitter:k.Emitter,KeyCode:m.KeyCode,KeyMod:s,Position:w.Position,Range:b.Range,Selection:S.Selection,SelectionDirection:m.SelectionDirection,MarkerSeverity:m.MarkerSeverity,MarkerTag:m.MarkerTag,Uri:D.URI,Token:g.Token}}e.createMonacoBaseAPI=t}),define(J[583],ee([1,0,162,21,12,5,498,140,480,486,310,56,273,477,45,479]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=void 0;class d extends w.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(a){const l=[];for(let u=0;u<this._lines.length;u++){const v=this._lines[u],f=this.offsetAt(new L.Position(u+1,1)),p=v.matchAll(a);for(const C of p)(C.index||C.index===0)&&(C.index=C.index+f),l.push(C)}return l}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(a){return this._lines[a-1]}getWordAtPosition(a,l){const u=(0,b.getWordAtText)(a.column,(0,b.ensureValidWordDefinition)(l),this._lines[a.lineNumber-1],0);return u?new D.Range(a.lineNumber,u.startColumn,a.lineNumber,u.endColumn):null}words(a){const l=this._lines,u=this._wordenize.bind(this);let v=0,f="",p=0,C=[];return{*[Symbol.iterator](){for(;;)if(p<C.length){const y=f.substring(C[p].start,C[p].end);p+=1,yield y}else if(v<l.length)f=l[v],C=u(f,a),p=0,v+=1;else break}}}getLineWords(a,l){const u=this._lines[a-1],v=this._wordenize(u,l),f=[];for(const p of v)f.push({word:u.substring(p.start,p.end),startColumn:p.start+1,endColumn:p.end+1});return f}_wordenize(a,l){const u=[];let v;for(l.lastIndex=0;(v=l.exec(a))&&v[0].length!==0;)u.push({start:v.index,end:v.index+v[0].length});return u}getValueInRange(a){if(a=this._validateRange(a),a.startLineNumber===a.endLineNumber)return this._lines[a.startLineNumber-1].substring(a.startColumn-1,a.endColumn-1);const l=this._eol,u=a.startLineNumber-1,v=a.endLineNumber-1,f=[];f.push(this._lines[u].substring(a.startColumn-1));for(let p=u+1;p<v;p++)f.push(this._lines[p]);return f.push(this._lines[v].substring(0,a.endColumn-1)),f.join(l)}offsetAt(a){return a=this._validatePosition(a),this._ensureLineStarts(),this._lineStarts.getPrefixSum(a.lineNumber-2)+(a.column-1)}positionAt(a){a=Math.floor(a),a=Math.max(0,a),this._ensureLineStarts();const l=this._lineStarts.getIndexOf(a),u=this._lines[l.index].length;return{lineNumber:1+l.index,column:1+Math.min(l.remainder,u)}}_validateRange(a){const l=this._validatePosition({lineNumber:a.startLineNumber,column:a.startColumn}),u=this._validatePosition({lineNumber:a.endLineNumber,column:a.endColumn});return l.lineNumber!==a.startLineNumber||l.column!==a.startColumn||u.lineNumber!==a.endLineNumber||u.column!==a.endColumn?{startLineNumber:l.lineNumber,startColumn:l.column,endLineNumber:u.lineNumber,endColumn:u.column}:a}_validatePosition(a){if(!L.Position.isIPosition(a))throw new Error("bad position");let{lineNumber:l,column:u}=a,v=!1;if(l<1)l=1,u=1,v=!0;else if(l>this._lines.length)l=this._lines.length,u=this._lines[l-1].length+1,v=!0;else{const f=this._lines[l-1].length+1;u<1?(u=1,v=!0):u>f&&(u=f,v=!0)}return v?{lineNumber:l,column:u}:a}}class h{constructor(a,l){this._host=a,this._models=Object.create(null),this._foreignModuleFactory=l,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(a){return this._models[a]}_getModels(){const a=[];return Object.keys(this._models).forEach(l=>a.push(this._models[l])),a}acceptNewModel(a){this._models[a.url]=new d(k.URI.parse(a.url),a.lines,a.EOL,a.versionId)}acceptModelChanged(a,l){if(!this._models[a])return;this._models[a].onEvents(l)}acceptRemovedModel(a){this._models[a]&&delete this._models[a]}computeUnicodeHighlights(a,l,u){return we(this,void 0,void 0,function*(){const v=this._getModel(a);return v?t.UnicodeTextModelHighlighter.computeUnicodeHighlights(v,l,u):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(a,l,u,v){return we(this,void 0,void 0,function*(){const f=this._getModel(a),p=this._getModel(l);return!f||!p?null:h.computeDiff(f,p,u,v)})}static computeDiff(a,l,u,v){const f=v==="advanced"?i.linesDiffComputers.advanced:i.linesDiffComputers.legacy,p=a.getLinesContent(),C=l.getLinesContent(),y=f.computeDiff(p,C,u);return{identical:y.changes.length>0?!1:this._modelsAreIdentical(a,l),quitEarly:y.hitTimeout,changes:y.changes.map(I=>{var T;return[I.originalRange.startLineNumber,I.originalRange.endLineNumberExclusive,I.modifiedRange.startLineNumber,I.modifiedRange.endLineNumberExclusive,(T=I.innerChanges)===null||T===void 0?void 0:T.map(O=>[O.originalRange.startLineNumber,O.originalRange.startColumn,O.originalRange.endLineNumber,O.originalRange.endColumn,O.modifiedRange.startLineNumber,O.modifiedRange.startColumn,O.modifiedRange.endLineNumber,O.modifiedRange.endColumn])]})}}static _modelsAreIdentical(a,l){const u=a.getLineCount(),v=l.getLineCount();if(u!==v)return!1;for(let f=1;f<=u;f++){const p=a.getLineContent(f),C=l.getLineContent(f);if(p!==C)return!1}return!0}computeMoreMinimalEdits(a,l,u){return we(this,void 0,void 0,function*(){const v=this._getModel(a);if(!v)return l;const f=[];let p;l=l.slice(0).sort((C,y)=>{if(C.range&&y.range)return D.Range.compareRangesUsingStarts(C.range,y.range);const E=C.range?0:1,I=y.range?0:1;return E-I});for(let{range:C,text:y,eol:E}of l){if(typeof E=="number"&&(p=E),D.Range.isEmpty(C)&&!y)continue;const I=v.getValueInRange(C);if(y=y.replace(/\\r\\n|\\n|\\r/g,v.eol),I===y)continue;if(Math.max(y.length,I.length)>h._diffLimit){f.push({range:C,text:y});continue}const T=(0,_.stringDiff)(I,y,u),O=v.offsetAt(D.Range.lift(C).getStartPosition());for(const R of T){const M=v.positionAt(O+R.originalStart),N=v.positionAt(O+R.originalStart+R.originalLength),P={text:y.substr(R.modifiedStart,R.modifiedLength),range:{startLineNumber:M.lineNumber,startColumn:M.column,endLineNumber:N.lineNumber,endColumn:N.column}};v.getValueInRange(P.range)!==P.text&&f.push(P)}}return typeof p=="number"&&f.push({eol:p,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),f})}computeLinks(a){return we(this,void 0,void 0,function*(){const l=this._getModel(a);return l?(0,S.computeLinks)(l):null})}computeDefaultDocumentColors(a){return we(this,void 0,void 0,function*(){const l=this._getModel(a);return l?(0,r.computeDefaultDocumentColors)(l):null})}textualSuggest(a,l,u,v){return we(this,void 0,void 0,function*(){const f=new s.StopWatch(!0),p=new RegExp(u,v),C=new Set;e:for(const y of a){const E=this._getModel(y);if(E){for(const I of E.words(p))if(!(I===l||!isNaN(Number(I)))&&(C.add(I),C.size>h._suggestionsLimit))break e}}return{words:Array.from(C),duration:f.elapsed()}})}computeWordRanges(a,l,u,v){return we(this,void 0,void 0,function*(){const f=this._getModel(a);if(!f)return Object.create(null);const p=new RegExp(u,v),C=Object.create(null);for(let y=l.startLineNumber;y<l.endLineNumber;y++){const E=f.getLineWords(y,p);for(const I of E){if(!isNaN(Number(I.word)))continue;let T=C[I.word];T||(T=[],C[I.word]=T),T.push({startLineNumber:y,startColumn:I.startColumn,endLineNumber:y,endColumn:I.endColumn})}}return C})}navigateValueSet(a,l,u,v,f){return we(this,void 0,void 0,function*(){const p=this._getModel(a);if(!p)return null;const C=new RegExp(v,f);l.startColumn===l.endColumn&&(l={startLineNumber:l.startLineNumber,startColumn:l.startColumn,endLineNumber:l.endLineNumber,endColumn:l.endColumn+1});const y=p.getValueInRange(l),E=p.getWordAtPosition({lineNumber:l.startLineNumber,column:l.startColumn},C);if(!E)return null;const I=p.getValueInRange(E);return g.BasicInplaceReplace.INSTANCE.navigateValueSet(l,y,E,I,u)})}loadForeignModule(a,l,u){const v=(C,y)=>this._host.fhr(C,y),p={host:(0,n.createProxyObject)(u,v),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(p,l),Promise.resolve((0,n.getAllMethodNames)(this._foreignModule))):new Promise((C,y)=>{j([a],E=>{this._foreignModule=E.create(p,l),C((0,n.getAllMethodNames)(this._foreignModule))},y)})}fmr(a,l){if(!this._foreignModule||typeof this._foreignModule[a]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+a));try{return Promise.resolve(this._foreignModule[a].apply(this._foreignModule,l))}catch(u){return Promise.reject(u)}}}e.EditorSimpleWorker=h,h._diffLimit=1e5,h._suggestionsLimit=1e4;function o(c){return new h(c,null)}e.create=o,typeof importScripts=="function"&&(globalThis.monaco=(0,m.createMonacoBaseAPI)())}),define(J[311],ee([1,0,6,2,263,27]),function(j,e,_,k,L,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 _.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(D.TokenizationRegistry.onDidChange(S=>{S.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const S=D.TokenizationRegistry.getColorMap();if(!S){this._colors=[L.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[L.RGBA8.Empty];for(let m=1;m<S.length;m++){const s=S[m].rgba;this._colors[m]=new L.RGBA8(s.r,s.g,s.b,Math.round(s.a*255))}const g=S[2].getRelativeLuminance();this._backgroundIsLight=g>=.5,this._onDidChange.fire(void 0)}getColor(S){return(S<1||S>=this._colors.length)&&(S=2),this._colors[S]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=w,w._INSTANCE=null}),define(J[225],ee([1,0,6,2]),function(j,e,_,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 L extends k.Disposable{constructor(){super(),this._onEvent=this._register(new _.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 l=0,u=this._outgoingEvents.length;l<u;l++){const v=this._outgoingEvents[l].kind===a.kind?this._outgoingEvents[l].attemptToMerge(a):null;if(v){this._outgoingEvents[l]=v;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 l=0,u=this._eventHandlers.length;l<u;l++)this._eventHandlers[l]===a&&console.warn("Detected duplicate listener in ViewEventDispatcher",a);this._eventHandlers.push(a)}removeViewEventHandler(a){for(let l=0;l<this._eventHandlers.length;l++)if(this._eventHandlers[l]===a){this._eventHandlers.splice(l,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,l=this._collector.viewEvents;this._collector=null;for(const u of a)this._addOutgoingEvent(u);l.length>0&&this._emitMany(l)}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 l=this._eventHandlers.slice(0);for(const u of l)u.handleEvents(a)}}}e.ViewModelEventDispatcher=L;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,l,u,v){this.kind=0,this._oldContentWidth=a,this._oldContentHeight=l,this.contentWidth=u,this.contentHeight=v,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,l){this.kind=1,this.oldHasFocus=a,this.hasFocus=l}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(a){return a.kind!==this.kind?null:new b(this.oldHasFocus,a.hasFocus)}}e.FocusChangedEvent=b;class S{constructor(a,l,u,v,f,p,C,y){this.kind=2,this._oldScrollWidth=a,this._oldScrollLeft=l,this._oldScrollHeight=u,this._oldScrollTop=v,this.scrollWidth=f,this.scrollLeft=p,this.scrollHeight=C,this.scrollTop=y,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 S(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,a.scrollWidth,a.scrollLeft,a.scrollHeight,a.scrollTop)}}e.ScrollChangedEvent=S;class g{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(a){return a.kind!==this.kind?null:this}}e.ViewZonesChangedEvent=g;class m{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(a){return a.kind!==this.kind?null:this}}e.HiddenAreasChangedEvent=m;class s{constructor(a,l,u,v,f,p,C){this.kind=6,this.oldSelections=a,this.selections=l,this.oldModelVersionId=u,this.modelVersionId=v,this.source=f,this.reason=p,this.reachedMaxCursorCount=C}static _selectionsAreEqual(a,l){if(!a&&!l)return!0;if(!a||!l)return!1;const u=a.length,v=l.length;if(u!==v)return!1;for(let f=0;f<u;f++)if(!a[f].equalsSelection(l[f]))return!1;return!0}isNoOp(){return s._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(a){return a.kind!==this.kind?null:new s(this.oldSelections,a.selections,this.oldModelVersionId,a.modelVersionId,a.source,a.reason,this.reachedMaxCursorCount||a.reachedMaxCursorCount)}}e.CursorStateChangedEvent=s;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 n{constructor(a){this.event=a,this.kind=8}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelLanguageChangedEvent=n;class r{constructor(a){this.event=a,this.kind=9}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelLanguageConfigurationChangedEvent=r;class d{constructor(a){this.event=a,this.kind=10}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelContentChangedEvent=d;class h{constructor(a){this.event=a,this.kind=11}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelOptionsChangedEvent=h;class o{constructor(a){this.event=a,this.kind=12}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelTokensChangedEvent=o}),define(J[584],ee([1,0,6,2,177,514,83,225]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const S=125;class g{constructor(i,n,r,d){i=i|0,n=n|0,r=r|0,d=d|0,i<0&&(i=0),n<0&&(n=0),r<0&&(r=0),d<0&&(d=0),this.width=i,this.contentWidth=n,this.scrollWidth=Math.max(i,n),this.height=r,this.contentHeight=d,this.scrollHeight=Math.max(r,d)}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,n){super(),this._onDidContentSizeChange=this._register(new _.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new g(0,0,0,0),this._scrollable=this._register(new L.Scrollable({forceIntegerValues:!0,smoothScrollDuration:i,scheduleAtNextAnimationFrame:n})),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 n=this._dimensions;this._dimensions=i,this._scrollable.setScrollDimensions({width:i.width,scrollWidth:i.scrollWidth,height:i.height,scrollHeight:i.scrollHeight},!0);const r=n.contentWidth!==i.contentWidth,d=n.contentHeight!==i.contentHeight;(r||d)&&this._onDidContentSizeChange.fire(new b.ContentSizeChangedEvent(n.contentWidth,n.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)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class s extends k.Disposable{constructor(i,n,r){super(),this._configuration=i;const d=this._configuration.options,h=d.get(140),o=d.get(81);this._linesLayout=new D.LinesLayout(n,d.get(64),o.top,o.bottom),this._scrollable=this._register(new m(0,r)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new g(h.contentWidth,0,h.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(110)?S:0)}onConfigurationChanged(i){const n=this._configuration.options;if(i.hasChanged(64)&&this._linesLayout.setLineHeight(n.get(64)),i.hasChanged(81)){const r=n.get(81);this._linesLayout.setPadding(r.top,r.bottom)}if(i.hasChanged(140)){const r=n.get(140),d=r.contentWidth,h=r.height,o=this._scrollable.getScrollDimensions(),c=o.contentWidth;this._scrollable.setScrollDimensions(new g(d,o.contentWidth,h,this._getContentHeight(d,h,c)))}else this._updateHeight();i.hasChanged(110)&&this._configureSmoothScrollDuration()}onFlushed(i){this._linesLayout.onFlushed(i)}onLinesDeleted(i,n){this._linesLayout.onLinesDeleted(i,n)}onLinesInserted(i,n){this._linesLayout.onLinesInserted(i,n)}_getHorizontalScrollbarHeight(i,n){const d=this._configuration.options.get(99);return d.horizontal===2||i>=n?0:d.horizontalScrollbarSize}_getContentHeight(i,n,r){const d=this._configuration.options;let h=this._linesLayout.getLinesTotalHeight();return d.get(101)?h+=Math.max(0,n-d.get(64)-d.get(81).bottom):h+=this._getHorizontalScrollbarHeight(i,r),h}_updateHeight(){const i=this._scrollable.getScrollDimensions(),n=i.width,r=i.height,d=i.contentWidth;this._scrollable.setScrollDimensions(new g(n,i.contentWidth,r,this._getContentHeight(n,r,d)))}getCurrentViewport(){const i=this._scrollable.getScrollDimensions(),n=this._scrollable.getCurrentScrollPosition();return new w.Viewport(n.scrollTop,n.scrollLeft,i.width,i.height)}getFutureViewport(){const i=this._scrollable.getScrollDimensions(),n=this._scrollable.getFutureScrollPosition();return new w.Viewport(n.scrollTop,n.scrollLeft,i.width,i.height)}_computeContentWidth(i){const n=this._configuration.options,r=n.get(141),d=n.get(48),h=n.get(140);if(r.isViewportWrapping){const o=n.get(70);return i>h.contentWidth+d.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?i+h.verticalScrollbarWidth:i}else{const o=n.get(100)*d.typicalHalfwidthCharacterWidth,c=this._linesLayout.getWhitespaceMinWidth();return Math.max(i+o+h.verticalScrollbarWidth,c)}}setMaxLineWidth(i){const n=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new g(n.width,this._computeContentWidth(i),n.height,n.contentHeight)),this._updateHeight()}saveState(){const i=this._scrollable.getFutureScrollPosition(),n=i.scrollTop,r=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(n),d=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(r);return{scrollTop:n,scrollTopWithoutViewZones:n-d,scrollLeft:i.scrollLeft}}changeWhitespace(i){const n=this._linesLayout.changeWhitespace(i);return n&&this.onHeightMaybeChanged(),n}getVerticalOffsetForLineNumber(i,n=!1){return this._linesLayout.getVerticalOffsetForLineNumber(i,n)}getVerticalOffsetAfterLineNumber(i,n=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(i,n)}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 n=this._scrollable.getScrollDimensions();return i+n.height>n.scrollHeight&&(i=n.scrollHeight-n.height),i<0&&(i=0),this._linesLayout.getLinesViewportData(i,i+n.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,n){n===1?this._scrollable.setScrollPositionNow(i):this._scrollable.setScrollPositionSmooth(i)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(i,n){const r=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:r.scrollLeft+i,scrollTop:r.scrollTop+n})}}e.ViewLayout=s}),define(J[585],ee([1,0,6]),function(j,e,_){"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 _.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new _.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new _.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 S=0;S<this.colorPresentations.length;S++)if(w.toLowerCase()===this.colorPresentations[S].label){b=S;break}if(b===-1){const S=w.split("(")[0].toLowerCase();for(let g=0;g<this.colorPresentations.length;g++)if(this.colorPresentations[g].label.toLowerCase().startsWith(S)){b=g;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[586],ee([1,0,6,176,137]),function(j,e,_,k,L){"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,c){this._updateEventEmitter=new _.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=o,this._decorationProvider=c,this._regions=new k.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(o){if(!o.length)return;o=o.sort((a,l)=>a.regionIndex-l.regionIndex);const c={};this._decorationProvider.changeDecorations(a=>{let l=0,u=-1,v=-1;const f=p=>{for(;l<p;){const C=this._regions.getEndLineNumber(l),y=this._regions.isCollapsed(l);if(C<=u){const E=this.regions.getSource(l)!==0;a.changeDecorationOptions(this._editorDecorationIds[l],this._decorationProvider.getDecorationOption(y,C<=v,E))}y&&C>v&&(v=C),l++}};for(const p of o){const C=p.regionIndex,y=this._editorDecorationIds[C];if(y&&!c[y]){c[y]=!0,f(C);const E=!this._regions.isCollapsed(C);this._regions.setCollapsed(C,E),u=Math.max(u,this._regions.getEndLineNumber(C))}}f(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:o})}removeManualRanges(o){const c=new Array,a=l=>{for(const u of o)if(!(u.startLineNumber>l.endLineNumber||l.startLineNumber>u.endLineNumber))return!0;return!1};for(let l=0;l<this._regions.length;l++){const u=this._regions.toFoldRange(l);(u.source===0||!a(u))&&c.push(u)}this.updatePost(k.FoldingRegions.fromFoldRanges(c))}update(o,c=[]){const a=this._currentFoldedOrManualRanges(c),l=k.FoldingRegions.sanitizeAndMerge(o,a,this._textModel.getLineCount());this.updatePost(k.FoldingRegions.fromFoldRanges(l))}updatePost(o){const c=[];let a=-1;for(let l=0,u=o.length;l<u;l++){const v=o.getStartLineNumber(l),f=o.getEndLineNumber(l),p=o.isCollapsed(l),C=o.getSource(l)!==0,y={startLineNumber:v,startColumn:this._textModel.getLineMaxColumn(v),endLineNumber:f,endColumn:this._textModel.getLineMaxColumn(f)+1};c.push({range:y,options:this._decorationProvider.getDecorationOption(p,f<=a,C)}),p&&f>a&&(a=f)}this._decorationProvider.changeDecorations(l=>this._editorDecorationIds=l.deltaDecorations(this._editorDecorationIds,c)),this._regions=o,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(o=[]){const c=(l,u)=>{for(const v of o)if(l<v&&v<=u)return!0;return!1},a=[];for(let l=0,u=this._regions.length;l<u;l++){let v=this.regions.isCollapsed(l);const f=this.regions.getSource(l);if(v||f!==0){const p=this._regions.toFoldRange(l),C=this._textModel.getDecorationRange(this._editorDecorationIds[l]);C&&(v&&c(C.startLineNumber,C.endLineNumber)&&(v=!1),a.push({startLineNumber:C.startLineNumber,endLineNumber:C.endLineNumber,type:p.type,isCollapsed:v,source:f}))}}return a}getMemento(){const o=this._currentFoldedOrManualRanges(),c=[],a=this._textModel.getLineCount();for(let l=0,u=o.length;l<u;l++){const v=o[l];if(v.startLineNumber>=v.endLineNumber||v.startLineNumber<1||v.endLineNumber>a)continue;const f=this._getLinesChecksum(v.startLineNumber+1,v.endLineNumber);c.push({startLineNumber:v.startLineNumber,endLineNumber:v.endLineNumber,isCollapsed:v.isCollapsed,source:v.source,checksum:f})}return c.length>0?c:void 0}applyMemento(o){var c,a;if(!Array.isArray(o))return;const l=[],u=this._textModel.getLineCount();for(const f of o){if(f.startLineNumber>=f.endLineNumber||f.startLineNumber<1||f.endLineNumber>u)continue;const p=this._getLinesChecksum(f.startLineNumber+1,f.endLineNumber);(!f.checksum||p===f.checksum)&&l.push({startLineNumber:f.startLineNumber,endLineNumber:f.endLineNumber,type:void 0,isCollapsed:(c=f.isCollapsed)!==null&&c!==void 0?c:!0,source:(a=f.source)!==null&&a!==void 0?a:0})}const v=k.FoldingRegions.sanitizeAndMerge(this._regions,l,u);this.updatePost(k.FoldingRegions.fromFoldRanges(v))}_getLinesChecksum(o,c){return(0,L.hash)(this._textModel.getLineContent(o)+this._textModel.getLineContent(c))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(o,c){const a=[];if(this._regions){let l=this._regions.findRange(o),u=1;for(;l>=0;){const v=this._regions.toRegion(l);(!c||c(v,u))&&a.push(v),u++,l=v.parentIndex}}return a}getRegionAtLine(o){if(this._regions){const c=this._regions.findRange(o);if(c>=0)return this._regions.toRegion(c)}return null}getRegionsInside(o,c){const a=[],l=o?o.regionIndex+1:0,u=o?o.endLineNumber:Number.MAX_VALUE;if(c&&c.length===2){const v=[];for(let f=l,p=this._regions.length;f<p;f++){const C=this._regions.toRegion(f);if(this._regions.getStartLineNumber(f)<u){for(;v.length>0&&!C.containedBy(v[v.length-1]);)v.pop();v.push(C),c(C,v.length)&&a.push(C)}else break}}else for(let v=l,f=this._regions.length;v<f;v++){const p=this._regions.toRegion(v);if(this._regions.getStartLineNumber(v)<u)(!c||c(p))&&a.push(p);else break}return a}}e.FoldingModel=D;function w(h,o,c){const a=[];for(const l of c){const u=h.getRegionAtLine(l);if(u){const v=!u.isCollapsed;if(a.push(u),o>1){const f=h.getRegionsInside(u,(p,C)=>p.isCollapsed!==v&&C<o);a.push(...f)}}}h.toggleCollapseState(a)}e.toggleCollapseState=w;function b(h,o,c=Number.MAX_VALUE,a){const l=[];if(a&&a.length>0)for(const u of a){const v=h.getRegionAtLine(u);if(v&&(v.isCollapsed!==o&&l.push(v),c>1)){const f=h.getRegionsInside(v,(p,C)=>p.isCollapsed!==o&&C<c);l.push(...f)}}else{const u=h.getRegionsInside(null,(v,f)=>v.isCollapsed!==o&&f<c);l.push(...u)}h.toggleCollapseState(l)}e.setCollapseStateLevelsDown=b;function S(h,o,c,a){const l=[];for(const u of a){const v=h.getAllRegionsAtLine(u,(f,p)=>f.isCollapsed!==o&&p<=c);l.push(...v)}h.toggleCollapseState(l)}e.setCollapseStateLevelsUp=S;function g(h,o,c){const a=[];for(const l of c){const u=h.getAllRegionsAtLine(l,v=>v.isCollapsed!==o);u.length>0&&a.push(u[0])}h.toggleCollapseState(a)}e.setCollapseStateUp=g;function m(h,o,c,a){const l=(v,f)=>f===o&&v.isCollapsed!==c&&!a.some(p=>v.containsLine(p)),u=h.getRegionsInside(null,l);h.toggleCollapseState(u)}e.setCollapseStateAtLevel=m;function s(h,o,c){const a=[];for(const v of c){const f=h.getAllRegionsAtLine(v,void 0);f.length>0&&a.push(f[0])}const l=v=>a.every(f=>!f.containedBy(v)&&!v.containedBy(f))&&v.isCollapsed!==o,u=h.getRegionsInside(null,l);h.toggleCollapseState(u)}e.setCollapseStateForRest=s;function t(h,o,c){const a=h.textModel,l=h.regions,u=[];for(let v=l.length-1;v>=0;v--)if(c!==l.isCollapsed(v)){const f=l.getStartLineNumber(v);o.test(a.getLineContent(f))&&u.push(l.toRegion(v))}h.toggleCollapseState(u)}e.setCollapseStateForMatchingLines=t;function i(h,o,c){const a=h.regions,l=[];for(let u=a.length-1;u>=0;u--)c!==a.isCollapsed(u)&&o===a.getType(u)&&l.push(a.toRegion(u));h.toggleCollapseState(l)}e.setCollapseStateForType=i;function n(h,o){let c=null;const a=o.getRegionAtLine(h);if(a!==null&&(c=a.startLineNumber,h===c)){const l=a.parentIndex;l!==-1?c=o.regions.getStartLineNumber(l):c=null}return c}e.getParentFoldLine=n;function r(h,o){let c=o.getRegionAtLine(h);if(c!==null&&c.startLineNumber===h){if(h!==c.startLineNumber)return c.startLineNumber;{const a=c.parentIndex;let l=0;for(a!==-1&&(l=o.regions.getStartLineNumber(c.parentIndex));c!==null;)if(c.regionIndex>0){if(c=o.regions.toRegion(c.regionIndex-1),c.startLineNumber<=l)return null;if(c.parentIndex===a)return c.startLineNumber}else return null}}else if(o.regions.length>0)for(c=o.regions.toRegion(o.regions.length-1);c!==null;){if(c.startLineNumber<h)return c.startLineNumber;c.regionIndex>0?c=o.regions.toRegion(c.regionIndex-1):c=null}return null}e.getPreviousFoldLine=r;function d(h,o){let c=o.getRegionAtLine(h);if(c!==null&&c.startLineNumber===h){const a=c.parentIndex;let l=0;if(a!==-1)l=o.regions.getEndLineNumber(c.parentIndex);else{if(o.regions.length===0)return null;l=o.regions.getEndLineNumber(o.regions.length-1)}for(;c!==null;)if(c.regionIndex<o.regions.length){if(c=o.regions.toRegion(c.regionIndex+1),c.startLineNumber>=l)return null;if(c.parentIndex===a)return c.startLineNumber}else return null}else if(o.regions.length>0)for(c=o.regions.toRegion(0);c!==null;){if(c.startLineNumber>h)return c.startLineNumber;c.regionIndex<o.regions.length?c=o.regions.toRegion(c.regionIndex+1):c=null}return null}e.getNextFoldLine=d}),define(J[587],ee([1,0,16,6,5,118]),function(j,e,_,k,L,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(s=>this.updateHiddenRanges()),this._hiddenRanges=[],m.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(m){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=m.changes.some(s=>s.range.endLineNumber!==s.range.startLineNumber||(0,D.countEOL)(s.text)[0]!==0))}updateHiddenRanges(){let m=!1;const s=[];let t=0,i=0,n=Number.MAX_VALUE,r=-1;const d=this._foldingModel.regions;for(;t<d.length;t++){if(!d.isCollapsed(t))continue;const h=d.getStartLineNumber(t)+1,o=d.getEndLineNumber(t);n<=h&&o<=r||(!m&&i<this._hiddenRanges.length&&this._hiddenRanges[i].startLineNumber===h&&this._hiddenRanges[i].endLineNumber===o?(s.push(this._hiddenRanges[i]),i++):(m=!0,s.push(new L.Range(h,1,o,1))),n=h,r=o)}(this._hasLineChanges||m||i<this._hiddenRanges.length)&&this.applyHiddenRanges(s)}applyHiddenRanges(m){this._hiddenRanges=m,this._hasLineChanges=!1,this._updateEventEmitter.fire(m)}hasRanges(){return this._hiddenRanges.length>0}isHidden(m){return S(this._hiddenRanges,m)!==null}adjustSelections(m){let s=!1;const t=this._foldingModel.textModel;let i=null;const n=r=>((!i||!b(r,i))&&(i=S(this._hiddenRanges,r)),i?i.startLineNumber-1:null);for(let r=0,d=m.length;r<d;r++){let h=m[r];const o=n(h.startLineNumber);o&&(h=h.setStartPosition(o,t.getLineMaxColumn(o)),s=!0);const c=n(h.endLineNumber);c&&(h=h.setEndPosition(c,t.getLineMaxColumn(c)),s=!0),m[r]=h}return s}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(g,m){return g>=m.startLineNumber&&g<=m.endLineNumber}function S(g,m){const s=(0,_.findFirstInSorted)(g,t=>m<t.startLineNumber)-1;return s>=0&&g[s].endLineNumber>=m?g[s]:null}}),define(J[179],ee([1,0,6,2,17]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function D(s,t){return!!s[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 S{constructor(t,i,n,r){this.triggerKey=t,this.triggerModifier=i,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=r}equals(t){return this.triggerKey===t.triggerKey&&this.triggerModifier===t.triggerModifier&&this.triggerSideBySideKey===t.triggerSideBySideKey&&this.triggerSideBySideModifier===t.triggerSideBySideModifier}}e.ClickLinkOptions=S;function g(s){return s==="altKey"?L.isMacintosh?new S(57,"metaKey",6,"altKey"):new S(5,"ctrlKey",6,"altKey"):L.isMacintosh?new S(6,"altKey",57,"metaKey"):new S(6,"altKey",5,"ctrlKey")}class m extends k.Disposable{constructor(t,i){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new _.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new _.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new _.Emitter),this.onCancel=this._onCancel.event,this._editor=t,this._alwaysFireExecuteOnMouseUp=i,this._opts=g(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(75)){const r=g(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(n=>this._onEditorMouseMove(new w(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new w(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new w(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new b(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new b(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.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 Lt=this&&this.__asyncValues||function(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=j[Symbol.asyncIterator],_;return e?e.call(j):(j=typeof __values=="function"?__values(j):j[Symbol.iterator](),_={},k("next"),k("throw"),k("return"),_[Symbol.asyncIterator]=function(){return this},_);function k(D){_[D]=j[D]&&function(w){return new Promise(function(b,S){w=j[D](w),L(b,S,w.done,w.value)})}}function L(D,w,b,S){Promise.resolve(S).then(function(g){D({value:g,done:b})},w)}};define(J[312],ee([1,0,14,11,6,2]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=void 0;class w{constructor(g,m,s){this.value=g,this.isComplete=m,this.hasLoadingMessage=s}}e.HoverResult=w;class b extends D.Disposable{constructor(g,m){super(),this._editor=g,this._computer=m,this._onResult=this._register(new L.Emitter),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new _.RunOnceScheduler(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new _.RunOnceScheduler(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new _.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(g,m=!0){this._state=g,m&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,_.createCancelableAsyncIterable)(g=>this._computer.computeAsync(g)),we(this,void 0,void 0,function*(){var g,m,s,t;try{try{for(var i=!0,n=Lt(this._asyncIterable),r;r=yield n.next(),g=r.done,!g;i=!0){t=r.value,i=!1;const d=t;d&&(this._result.push(d),this._fireResult())}}catch(d){m={error:d}}finally{try{!i&&!g&&(s=n.return)&&(yield s.call(n))}finally{if(m)throw m.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(d){(0,k.onUnexpectedError)(d)}})):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 g=this._state===0,m=this._state===4;this._onResult.fire(new w(this._result.slice(0),g,m))}start(g){if(g===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[313],ee([1,0,11,2,12,5,51,21]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class S{constructor(i,n){this.range=i,this.direction=n}}e.InlayHintAnchor=S;class g{constructor(i,n,r){this.hint=i,this.anchor=n,this.provider=r,this._isResolved=!1}with(i){const n=new g(this.hint,i.anchor,this.provider);return n._isResolved=this._isResolved,n._currentResolve=this._currentResolve,n}resolve(i){return we(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 n,r;return we(this,void 0,void 0,function*(){try{const d=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,i));this.hint.tooltip=(n=d?.tooltip)!==null&&n!==void 0?n:this.hint.tooltip,this.hint.label=(r=d?.label)!==null&&r!==void 0?r:this.hint.label,this._isResolved=!0}catch(d){(0,_.onUnexpectedExternalError)(d),this._isResolved=!1}})}}e.InlayHintItem=g;class m{static create(i,n,r,d){return we(this,void 0,void 0,function*(){const h=[],o=i.ordered(n).reverse().map(c=>r.map(a=>we(this,void 0,void 0,function*(){try{const l=yield c.provideInlayHints(n,a,d);l?.hints.length&&h.push([l,c])}catch(l){(0,_.onUnexpectedExternalError)(l)}})));if(yield Promise.all(o.flat()),d.isCancellationRequested||n.isDisposed())throw new _.CancellationError;return new m(r,h,n)})}constructor(i,n,r){this._disposables=new k.DisposableStore,this.ranges=i,this.provider=new Set;const d=[];for(const[h,o]of n){this._disposables.add(h),this.provider.add(o);for(const c of h.hints){const a=r.validatePosition(c.position);let l="before";const u=m._getRangeAtPosition(r,a);let v;u.getStartPosition().isBefore(a)?(v=D.Range.fromPositions(u.getStartPosition(),a),l="after"):(v=D.Range.fromPositions(a,u.getEndPosition()),l="before"),d.push(new g(c,new S(v,l),o))}}this.items=d.sort((h,o)=>L.Position.compare(h.hint.position,o.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(i,n){const r=n.lineNumber,d=i.getWordAtPosition(n);if(d)return new D.Range(r,d.startColumn,r,d.endColumn);i.tokenization.tokenizeIfCheap(r);const h=i.tokenization.getLineTokens(r),o=n.column-1,c=h.findTokenIndexAtOffset(o);let a=h.getStartOffset(c),l=h.getEndOffset(c);return l-a===1&&(a===o&&c>1?(a=h.getStartOffset(c-1),l=h.getEndOffset(c-1)):l===o&&c<h.getCount()-1&&(a=h.getStartOffset(c+1),l=h.getEndOffset(c+1))),new D.Range(r,a+1,r,l+1)}}e.InlayHintsFragments=m;function s(t){return b.URI.from({scheme:w.Schemas.command,path:t.id,query:t.arguments&&encodeURIComponent(JSON.stringify(t.arguments))}).toString()}e.asCommandLink=s}),define(J[588],ee([1,0,81,20,11,5,493,145,124]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionItem=e.InlineCompletionList=e.InlineCompletionProviderResult=e.provideInlineCompletions=void 0;function g(r,d,h,o,c=k.CancellationToken.None,a){return we(this,void 0,void 0,function*(){const l=i(d,h),u=r.all(h),v=yield Promise.all(u.map(C=>we(this,void 0,void 0,function*(){try{const y=yield C.provideInlineCompletions(h,d,o,c);return{provider:C,completions:y}}catch(y){(0,L.onUnexpectedExternalError)(y)}return{provider:C,completions:void 0}}))),f=new Map,p=[];for(const C of v){const y=C.completions;if(!y)continue;const E=new s(y,C.provider);p.push(E);for(const I of y.items){const T=t.from(I,E,l,h,a);f.set(T.hash(),T)}}return new m(Array.from(f.values()),new Set(f.keys()),p)})}e.provideInlineCompletions=g;class m{constructor(d,h,o){this.completions=d,this.hashs=h,this.providerResults=o}has(d){return this.hashs.has(d.hash())}dispose(){for(const d of this.providerResults)d.removeRef()}}e.InlineCompletionProviderResult=m;class s{constructor(d,h){this.inlineCompletions=d,this.provider=h,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}e.InlineCompletionList=s;class t{static from(d,h,o,c,a){let l,u,v=d.range?D.Range.lift(d.range):o;if(typeof d.insertText=="string"){if(l=d.insertText,a&&d.completeBracketPairs){l=n(l,v.getStartPosition(),c,a);const f=l.length-d.insertText.length;f!==0&&(v=new D.Range(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn+f))}u=void 0}else if("snippet"in d.insertText){const f=d.insertText.snippet.length;if(a&&d.completeBracketPairs){d.insertText.snippet=n(d.insertText.snippet,v.getStartPosition(),c,a);const C=d.insertText.snippet.length-f;C!==0&&(v=new D.Range(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn+C))}const p=new S.SnippetParser().parse(d.insertText.snippet);p.children.length===1&&p.children[0]instanceof S.Text?(l=p.children[0].value,u=void 0):(l=p.toString(),u={snippet:d.insertText.snippet,range:v})}else(0,_.assertNever)(d.insertText);return new t(l,d.command,v,l,u,d.additionalTextEdits||(0,b.getReadonlyEmptyArray)(),d,h)}constructor(d,h,o,c,a,l,u,v){this.filterText=d,this.command=h,this.range=o,this.insertText=c,this.snippetInfo=a,this.additionalTextEdits=l,this.sourceInlineCompletion=u,this.source=v,d=d.replace(/\\r\\n|\\r/g,`\n`),c=d.replace(/\\r\\n|\\r/g,`\n`)}withRange(d){return new t(this.filterText,this.command,d,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}e.InlineCompletionItem=t;function i(r,d){const h=d.getWordAtPosition(r),o=d.getLineMaxColumn(r.lineNumber);return h?new D.Range(r.lineNumber,h.startColumn,r.lineNumber,o):D.Range.fromPositions(r,r.with(void 0,o))}function n(r,d,h,o){const a=h.getLineContent(d.lineNumber).substring(0,d.column-1)+r,l=h.tokenization.tokenizeLineWithEdit(d,a.length-(d.column-1),r),u=l?.sliceAndInflate(d.column-1,a.length,0);return u?(0,w.fixBracketsInLine)(u,o):r}}),define(J[589],ee([3,4]),function(j,e){return j.create("vs/editor/browser/controller/textAreaHandler",e)}),define(J[590],ee([3,4]),function(j,e){return j.create("vs/editor/browser/coreCommands",e)}),define(J[591],ee([3,4]),function(j,e){return j.create("vs/editor/browser/editorExtensions",e)}),define(J[592],ee([3,4]),function(j,e){return j.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(J[593],ee([3,4]),function(j,e){return j.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(J[594],ee([3,4]),function(j,e){return j.create("vs/editor/browser/widget/diffReview",e)}),define(J[595],ee([3,4]),function(j,e){return j.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(J[596],ee([1,0,595,7,40,2,5,26,31,17]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class m extends D.Disposable{get visibility(){return this._visibility}set visibility(t){this._visibility!==t&&(this._visibility=t,t?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}constructor(t,i,n,r,d,h){super(),this._viewZoneId=t,this._marginDomNode=i,this.editor=n,this.diff=r,this._contextMenuService=d,this._clipboardService=h,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=S.ThemeIcon.asClassName(b.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const o=n.getOption(64),c=n.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${o}px`,this._diffActions.style.lineHeight=`${o}px`,this._marginDomNode.appendChild(this._diffActions);const a=[],l=r.modifiedEndLineNumber===0;a.push(new L.Action("diff.clipboard.copyDeletedContent",l?r.originalEndLineNumber>r.modifiedStartLineNumber?_.localize(0,null):_.localize(1,null):r.originalEndLineNumber>r.modifiedStartLineNumber?_.localize(2,null):_.localize(3,null),void 0,!0,()=>we(this,void 0,void 0,function*(){const y=new w.Range(r.originalStartLineNumber,1,r.originalEndLineNumber+1,1),E=r.originalModel.getValueInRange(y);yield this._clipboardService.writeText(E)})));let u=0,v;r.originalEndLineNumber>r.modifiedStartLineNumber&&(v=new L.Action("diff.clipboard.copyDeletedLineContent",l?_.localize(4,null,r.originalStartLineNumber):_.localize(5,null,r.originalStartLineNumber),void 0,!0,()=>we(this,void 0,void 0,function*(){const y=r.originalModel.getLineContent(r.originalStartLineNumber+u);if(y===""){const E=r.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(E===0?`\n`:`\\r\n`)}else yield this._clipboardService.writeText(y)})),a.push(v)),n.getOption(88)||a.push(new L.Action("diff.inline.revertChange",_.localize(6,null),void 0,!0,()=>we(this,void 0,void 0,function*(){const y=new w.Range(r.originalStartLineNumber,1,r.originalEndLineNumber,r.originalModel.getLineMaxColumn(r.originalEndLineNumber)),E=r.originalModel.getValueInRange(y);if(r.modifiedEndLineNumber===0){const I=n.getModel().getLineMaxColumn(r.modifiedStartLineNumber);n.executeEdits("diffEditor",[{range:new w.Range(r.modifiedStartLineNumber,I,r.modifiedStartLineNumber,I),text:c+E}])}else{const I=n.getModel().getLineMaxColumn(r.modifiedEndLineNumber);n.executeEdits("diffEditor",[{range:new w.Range(r.modifiedStartLineNumber,1,r.modifiedEndLineNumber,I),text:E}])}})));const p=n.getOption(123)&&!g.isIOS,C=(y,E)=>{var I;this._contextMenuService.showContextMenu({domForShadowRoot:p&&(I=n.getDomNode())!==null&&I!==void 0?I:void 0,getAnchor:()=>({x:y,y:E}),getActions:()=>(v&&(v.label=l?_.localize(7,null,r.originalStartLineNumber+u):_.localize(8,null,r.originalStartLineNumber+u)),a),autoSelectFirstItem:!0})};this._register(k.addStandardDisposableListener(this._diffActions,"mousedown",y=>{const{top:E,height:I}=k.getDomNodePagePosition(this._diffActions),T=Math.floor(o/3);y.preventDefault(),C(y.posx,E+I+T)})),this._register(n.onMouseMove(y=>{y.target.type===8||y.target.type===5?y.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,u=this._updateLightBulbPosition(this._marginDomNode,y.event.browserEvent.y,o)):this.visibility=!1:this.visibility=!1})),this._register(n.onMouseDown(y=>{y.event.rightButton&&(y.target.type===8||y.target.type===5)&&y.target.detail.viewZoneId===this._viewZoneId&&(y.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,y.event.browserEvent.y,o),C(y.event.posx,y.event.posy+o))}))}_updateLightBulbPosition(t,i,n){const{top:r}=k.getDomNodePagePosition(t),d=i-r,h=Math.floor(d/n),o=h*n;if(this._diffActions.style.top=`${o}px`,this.diff.viewLineCounts){let c=0;for(let a=0;a<this.diff.viewLineCounts.length;a++)if(c+=this.diff.viewLineCounts[a],h<c)return a}return h}}e.InlineDiffMargin=m}),define(J[597],ee([3,4]),function(j,e){return j.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(J[598],ee([3,4]),function(j,e){return j.create("vs/editor/common/config/editorOptions",e)}),define(J[41],ee([1,0,598,17,140,16,45,169]),function(j,e,_,k,L,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.clampedFloat=e.clampedInt=e.boolean=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=void 0,e.MINIMAP_GUTTER_WIDTH=8;class S{constructor(oe){this._values=oe}hasChanged(oe){return this._values[oe]}}e.ConfigurationChangedEvent=S;class g{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=g;class m{constructor(oe,pe,Le,ve){this.id=oe,this.name=pe,this.defaultValue=Le,this.schema=ve}applyUpdate(oe,pe){return t(oe,pe)}compute(oe,pe,Le){return Le}}class s{constructor(oe,pe){this.newValue=oe,this.didChange=pe}}e.ApplyUpdateResult=s;function t(me,oe){if(typeof me!="object"||typeof oe!="object"||!me||!oe)return new s(oe,me!==oe);if(Array.isArray(me)||Array.isArray(oe)){const Le=Array.isArray(me)&&Array.isArray(oe)&&D.equals(me,oe);return new s(oe,!Le)}let pe=!1;for(const Le in oe)if(oe.hasOwnProperty(Le)){const ve=t(me[Le],oe[Le]);ve.didChange&&(me[Le]=ve.newValue,pe=!0)}return new s(me,pe)}class i{constructor(oe){this.schema=void 0,this.id=oe,this.name="_never_",this.defaultValue=void 0}applyUpdate(oe,pe){return t(oe,pe)}validate(oe){return this.defaultValue}}class n{constructor(oe,pe,Le,ve){this.id=oe,this.name=pe,this.defaultValue=Le,this.schema=ve}applyUpdate(oe,pe){return t(oe,pe)}validate(oe){return typeof oe>"u"?this.defaultValue:oe}compute(oe,pe,Le){return Le}}function r(me,oe){return typeof me>"u"?oe:me==="false"?!1:!!me}e.boolean=r;class d extends n{constructor(oe,pe,Le,ve=void 0){typeof ve<"u"&&(ve.type="boolean",ve.default=Le),super(oe,pe,Le,ve)}validate(oe){return r(oe,this.defaultValue)}}function h(me,oe,pe,Le){if(typeof me>"u")return oe;let ve=parseInt(me,10);return isNaN(ve)?oe:(ve=Math.max(pe,ve),ve=Math.min(Le,ve),ve|0)}e.clampedInt=h;class o extends n{static clampedInt(oe,pe,Le,ve){return h(oe,pe,Le,ve)}constructor(oe,pe,Le,ve,be,De=void 0){typeof De<"u"&&(De.type="integer",De.default=Le,De.minimum=ve,De.maximum=be),super(oe,pe,Le,De),this.minimum=ve,this.maximum=be}validate(oe){return o.clampedInt(oe,this.defaultValue,this.minimum,this.maximum)}}function c(me,oe,pe,Le){if(typeof me>"u")return oe;const ve=a.float(me,oe);return a.clamp(ve,pe,Le)}e.clampedFloat=c;class a extends n{static clamp(oe,pe,Le){return oe<pe?pe:oe>Le?Le:oe}static float(oe,pe){if(typeof oe=="number")return oe;if(typeof oe>"u")return pe;const Le=parseFloat(oe);return isNaN(Le)?pe:Le}constructor(oe,pe,Le,ve,be){typeof be<"u"&&(be.type="number",be.default=Le),super(oe,pe,Le,be),this.validationFn=ve}validate(oe){return this.validationFn(a.float(oe,this.defaultValue))}}class l extends n{static string(oe,pe){return typeof oe!="string"?pe:oe}constructor(oe,pe,Le,ve=void 0){typeof ve<"u"&&(ve.type="string",ve.default=Le),super(oe,pe,Le,ve)}validate(oe){return l.string(oe,this.defaultValue)}}function u(me,oe,pe,Le){return typeof me!="string"?oe:Le&&me in Le?Le[me]:pe.indexOf(me)===-1?oe:me}e.stringSet=u;class v extends n{constructor(oe,pe,Le,ve,be=void 0){typeof be<"u"&&(be.type="string",be.enum=ve,be.default=Le),super(oe,pe,Le,be),this._allowedValues=ve}validate(oe){return u(oe,this.defaultValue,this._allowedValues)}}class f extends m{constructor(oe,pe,Le,ve,be,De,Me=void 0){typeof Me<"u"&&(Me.type="string",Me.enum=be,Me.default=ve),super(oe,pe,Le,Me),this._allowedValues=be,this._convert=De}validate(oe){return typeof oe!="string"?this.defaultValue:this._allowedValues.indexOf(oe)===-1?this.defaultValue:this._convert(oe)}}function p(me){switch(me){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class C extends m{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[_.localize(0,null),_.localize(1,null),_.localize(2,null)],default:"auto",tags:["accessibility"],description:_.localize(3,null)})}validate(oe){switch(oe){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(oe,pe,Le){return Le===0?oe.accessibilitySupport:Le}}class y extends m{constructor(){const oe={insertSpace:!0,ignoreEmptyLines:!0};super(21,"comments",oe,{"editor.comments.insertSpace":{type:"boolean",default:oe.insertSpace,description:_.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:oe.ignoreEmptyLines,description:_.localize(5,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{insertSpace:r(pe.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:r(pe.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function E(me){switch(me){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var I;(function(me){me[me.Line=1]="Line",me[me.Block=2]="Block",me[me.Underline=3]="Underline",me[me.LineThin=4]="LineThin",me[me.BlockOutline=5]="BlockOutline",me[me.UnderlineThin=6]="UnderlineThin"})(I||(e.TextEditorCursorStyle=I={}));function T(me){switch(me){case"line":return I.Line;case"block":return I.Block;case"underline":return I.Underline;case"line-thin":return I.LineThin;case"block-outline":return I.BlockOutline;case"underline-thin":return I.UnderlineThin}}class O extends i{constructor(){super(137)}compute(oe,pe,Le){const ve=["monaco-editor"];return pe.get(37)&&ve.push(pe.get(37)),oe.extraEditorClassName&&ve.push(oe.extraEditorClassName),pe.get(71)==="default"?ve.push("mouse-default"):pe.get(71)==="copy"&&ve.push("mouse-copy"),pe.get(107)&&ve.push("showUnused"),pe.get(135)&&ve.push("showDeprecated"),ve.join(" ")}}class R extends d{constructor(){super(35,"emptySelectionClipboard",!0,{description:_.localize(6,null)})}compute(oe,pe,Le){return Le&&oe.emptySelectionClipboard}}class M extends m{constructor(){const oe={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(39,"find",oe,{"editor.find.cursorMoveOnType":{type:"boolean",default:oe.cursorMoveOnType,description:_.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:oe.seedSearchStringFromSelection,enumDescriptions:[_.localize(8,null),_.localize(9,null),_.localize(10,null)],description:_.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:oe.autoFindInSelection,enumDescriptions:[_.localize(12,null),_.localize(13,null),_.localize(14,null)],description:_.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:oe.globalFindClipboard,description:_.localize(16,null),included:k.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:oe.addExtraSpaceOnTop,description:_.localize(17,null)},"editor.find.loop":{type:"boolean",default:oe.loop,description:_.localize(18,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{cursorMoveOnType:r(pe.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof oe.seedSearchStringFromSelection=="boolean"?oe.seedSearchStringFromSelection?"always":"never":u(pe.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof oe.autoFindInSelection=="boolean"?oe.autoFindInSelection?"always":"never":u(pe.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:r(pe.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:r(pe.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:r(pe.loop,this.defaultValue.loop)}}}class N extends m{constructor(){super(49,"fontLigatures",N.OFF,{anyOf:[{type:"boolean",description:_.localize(19,null)},{type:"string",description:_.localize(20,null)}],description:_.localize(21,null),default:!1})}validate(oe){return typeof oe>"u"?this.defaultValue:typeof oe=="string"?oe==="false"?N.OFF:oe==="true"?N.ON:oe:oe?N.ON:N.OFF}}e.EditorFontLigatures=N,N.OFF=\'"liga" off, "calt" off\',N.ON=\'"liga" on, "calt" on\';class P extends m{constructor(){super(52,"fontVariations",P.OFF,{anyOf:[{type:"boolean",description:_.localize(22,null)},{type:"string",description:_.localize(23,null)}],description:_.localize(24,null),default:!1})}validate(oe){return typeof oe>"u"?this.defaultValue:typeof oe=="string"?oe==="false"?P.OFF:oe==="true"?P.TRANSLATE:oe:oe?P.TRANSLATE:P.OFF}compute(oe,pe,Le){return oe.fontInfo.fontVariationSettings}}e.EditorFontVariations=P,P.OFF="normal",P.TRANSLATE="translate";class x extends i{constructor(){super(48)}compute(oe,pe,Le){return oe.fontInfo}}class F extends n{constructor(){super(50,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:_.localize(25,null)})}validate(oe){const pe=a.float(oe,this.defaultValue);return pe===0?e.EDITOR_FONT_DEFAULTS.fontSize:a.clamp(pe,6,100)}compute(oe,pe,Le){return oe.fontInfo.fontSize}}class B extends m{constructor(){super(51,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:B.MINIMUM_VALUE,maximum:B.MAXIMUM_VALUE,errorMessage:_.localize(26,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:B.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:_.localize(27,null)})}validate(oe){return oe==="normal"||oe==="bold"?oe:String(o.clampedInt(oe,e.EDITOR_FONT_DEFAULTS.fontWeight,B.MINIMUM_VALUE,B.MAXIMUM_VALUE))}}B.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],B.MINIMUM_VALUE=1,B.MAXIMUM_VALUE=1e3;class V extends m{constructor(){const oe={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:""},pe={type:"string",enum:["peek","gotoAndPeek","goto"],default:oe.multiple,enumDescriptions:[_.localize(28,null),_.localize(29,null),_.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",oe,{"editor.gotoLocation.multiple":{deprecationMessage:_.localize(31,null)},"editor.gotoLocation.multipleDefinitions":Object.assign({description:_.localize(32,null)},pe),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:_.localize(33,null)},pe),"editor.gotoLocation.multipleDeclarations":Object.assign({description:_.localize(34,null)},pe),"editor.gotoLocation.multipleImplementations":Object.assign({description:_.localize(35,null)},pe),"editor.gotoLocation.multipleReferences":Object.assign({description:_.localize(36,null)},pe),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:oe.alternativeDefinitionCommand,enum:Le,description:_.localize(37,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:oe.alternativeTypeDefinitionCommand,enum:Le,description:_.localize(38,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:oe.alternativeDeclarationCommand,enum:Le,description:_.localize(39,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:oe.alternativeImplementationCommand,enum:Le,description:_.localize(40,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:oe.alternativeReferenceCommand,enum:Le,description:_.localize(41,null)}})}validate(oe){var pe,Le,ve,be,De;if(!oe||typeof oe!="object")return this.defaultValue;const Me=oe;return{multiple:u(Me.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(pe=Me.multipleDefinitions)!==null&&pe!==void 0?pe:u(Me.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(Le=Me.multipleTypeDefinitions)!==null&&Le!==void 0?Le:u(Me.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(ve=Me.multipleDeclarations)!==null&&ve!==void 0?ve:u(Me.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(be=Me.multipleImplementations)!==null&&be!==void 0?be:u(Me.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(De=Me.multipleReferences)!==null&&De!==void 0?De:u(Me.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:l.string(Me.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:l.string(Me.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:l.string(Me.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:l.string(Me.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:l.string(Me.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class K extends m{constructor(){const oe={enabled:!0,delay:300,sticky:!0,above:!0};super(58,"hover",oe,{"editor.hover.enabled":{type:"boolean",default:oe.enabled,description:_.localize(42,null)},"editor.hover.delay":{type:"number",default:oe.delay,minimum:0,maximum:1e4,description:_.localize(43,null)},"editor.hover.sticky":{type:"boolean",default:oe.sticky,description:_.localize(44,null)},"editor.hover.above":{type:"boolean",default:oe.above,description:_.localize(45,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{enabled:r(pe.enabled,this.defaultValue.enabled),delay:o.clampedInt(pe.delay,this.defaultValue.delay,0,1e4),sticky:r(pe.sticky,this.defaultValue.sticky),above:r(pe.above,this.defaultValue.above)}}}class A extends i{constructor(){super(140)}compute(oe,pe,Le){return A.computeLayout(pe,{memory:oe.memory,outerWidth:oe.outerWidth,outerHeight:oe.outerHeight,isDominatedByLongLines:oe.isDominatedByLongLines,lineHeight:oe.fontInfo.lineHeight,viewLineCount:oe.viewLineCount,lineNumbersDigitCount:oe.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:oe.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:oe.fontInfo.maxDigitWidth,pixelRatio:oe.pixelRatio,glyphMarginDecorationLaneCount:oe.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(oe){const pe=oe.height/oe.lineHeight,Le=Math.floor(oe.paddingTop/oe.lineHeight);let ve=Math.floor(oe.paddingBottom/oe.lineHeight);oe.scrollBeyondLastLine&&(ve=Math.max(ve,pe-1));const be=(Le+oe.viewLineCount+ve)/(oe.pixelRatio*oe.height),De=Math.floor(oe.viewLineCount/be);return{typicalViewportLineCount:pe,extraLinesBeforeFirstLine:Le,extraLinesBeyondLastLine:ve,desiredRatio:be,minimapLineCount:De}}static _computeMinimapLayout(oe,pe){const Le=oe.outerWidth,ve=oe.outerHeight,be=oe.pixelRatio;if(!oe.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(be*ve),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:ve};const De=pe.stableMinimapLayoutInput,Me=De&&oe.outerHeight===De.outerHeight&&oe.lineHeight===De.lineHeight&&oe.typicalHalfwidthCharacterWidth===De.typicalHalfwidthCharacterWidth&&oe.pixelRatio===De.pixelRatio&&oe.scrollBeyondLastLine===De.scrollBeyondLastLine&&oe.paddingTop===De.paddingTop&&oe.paddingBottom===De.paddingBottom&&oe.minimap.enabled===De.minimap.enabled&&oe.minimap.side===De.minimap.side&&oe.minimap.size===De.minimap.size&&oe.minimap.showSlider===De.minimap.showSlider&&oe.minimap.renderCharacters===De.minimap.renderCharacters&&oe.minimap.maxColumn===De.minimap.maxColumn&&oe.minimap.scale===De.minimap.scale&&oe.verticalScrollbarWidth===De.verticalScrollbarWidth&&oe.isViewportWrapping===De.isViewportWrapping,Oe=oe.lineHeight,xe=oe.typicalHalfwidthCharacterWidth,Fe=oe.scrollBeyondLastLine,Ue=oe.minimap.renderCharacters;let Be=be>=2?Math.round(oe.minimap.scale*2):oe.minimap.scale;const Ke=oe.minimap.maxColumn,Ye=oe.minimap.size,He=oe.minimap.side,Ne=oe.verticalScrollbarWidth,ze=oe.viewLineCount,Ve=oe.remainingWidth,Ze=oe.isViewportWrapping,tt=Ue?2:3;let Je=Math.floor(be*ve);const et=Je/be;let $e=!1,dt=!1,at=tt*Be,rt=Be/be,ht=1;if(Ye==="fill"||Ye==="fit"){const{typicalViewportLineCount:nt,extraLinesBeforeFirstLine:Qe,extraLinesBeyondLastLine:st,desiredRatio:ot,minimapLineCount:lt}=A.computeContainedMinimapLineCount({viewLineCount:ze,scrollBeyondLastLine:Fe,paddingTop:oe.paddingTop,paddingBottom:oe.paddingBottom,height:ve,lineHeight:Oe,pixelRatio:be});if(ze/lt>1)$e=!0,dt=!0,Be=1,at=1,rt=Be/be;else{let ft=!1,_t=Be+1;if(Ye==="fit"){const ct=Math.ceil((Qe+ze+st)*at);Ze&&Me&&Ve<=pe.stableFitRemainingWidth?(ft=!0,_t=pe.stableFitMaxMinimapScale):ft=ct>Je}if(Ye==="fill"||ft){$e=!0;const ct=Be;at=Math.min(Oe*be,Math.max(1,Math.floor(1/ot))),Ze&&Me&&Ve<=pe.stableFitRemainingWidth&&(_t=pe.stableFitMaxMinimapScale),Be=Math.min(_t,Math.max(1,Math.floor(at/tt))),Be>ct&&(ht=Math.min(2,Be/ct)),rt=Be/be/ht,Je=Math.ceil(Math.max(nt,Qe+ze+st)*at),Ze?(pe.stableMinimapLayoutInput=oe,pe.stableFitRemainingWidth=Ve,pe.stableFitMaxMinimapScale=Be):(pe.stableMinimapLayoutInput=null,pe.stableFitRemainingWidth=0)}}}const Xe=Math.floor(Ke*rt),Ge=Math.min(Xe,Math.max(0,Math.floor((Ve-Ne-2)*rt/(xe+rt)))+e.MINIMAP_GUTTER_WIDTH);let Re=Math.floor(be*Ge);const We=Re/be;Re=Math.floor(Re*ht);const je=Ue?1:2,qe=He==="left"?0:Le-Ge-Ne;return{renderMinimap:je,minimapLeft:qe,minimapWidth:Ge,minimapHeightIsEditorHeight:$e,minimapIsSampling:dt,minimapScale:Be,minimapLineHeight:at,minimapCanvasInnerWidth:Re,minimapCanvasInnerHeight:Je,minimapCanvasOuterWidth:We,minimapCanvasOuterHeight:et}}static computeLayout(oe,pe){const Le=pe.outerWidth|0,ve=pe.outerHeight|0,be=pe.lineHeight|0,De=pe.lineNumbersDigitCount|0,Me=pe.typicalHalfwidthCharacterWidth,Oe=pe.maxDigitWidth,xe=pe.pixelRatio,Fe=pe.viewLineCount,Ue=oe.get(132),Be=Ue==="inherit"?oe.get(131):Ue,Ke=Be==="inherit"?oe.get(127):Be,Ye=oe.get(130),He=pe.isDominatedByLongLines,Ne=oe.get(55),ze=oe.get(65).renderType!==0,Ve=oe.get(66),Ze=oe.get(101),tt=oe.get(81),Je=oe.get(70),et=oe.get(99),$e=et.verticalScrollbarSize,dt=et.verticalHasArrows,at=et.arrowSize,rt=et.horizontalScrollbarSize,ht=oe.get(41),Xe=oe.get(106)!=="never";let Ge=oe.get(63);ht&&Xe&&(Ge+=16);let Re=0;if(ze){const Dt=Math.max(De,Ve);Re=Math.round(Dt*Oe)}let We=0;Ne&&(We=be*pe.glyphMarginDecorationLaneCount);let je=0,qe=je+We,nt=qe+Re,Qe=nt+Ge;const st=Le-We-Re-Ge;let ot=!1,lt=!1,pt=-1;Be==="inherit"&&He?(ot=!0,lt=!0):Ke==="on"||Ke==="bounded"?lt=!0:Ke==="wordWrapColumn"&&(pt=Ye);const ft=A._computeMinimapLayout({outerWidth:Le,outerHeight:ve,lineHeight:be,typicalHalfwidthCharacterWidth:Me,pixelRatio:xe,scrollBeyondLastLine:Ze,paddingTop:tt.top,paddingBottom:tt.bottom,minimap:Je,verticalScrollbarWidth:$e,viewLineCount:Fe,remainingWidth:st,isViewportWrapping:lt},pe.memory||new g);ft.renderMinimap!==0&&ft.minimapLeft===0&&(je+=ft.minimapWidth,qe+=ft.minimapWidth,nt+=ft.minimapWidth,Qe+=ft.minimapWidth);const _t=st-ft.minimapWidth,ct=Math.max(1,Math.floor((_t-$e-2)/Me)),Ct=dt?at:0;return lt&&(pt=Math.max(1,ct),Ke==="bounded"&&(pt=Math.min(pt,Ye))),{width:Le,height:ve,glyphMarginLeft:je,glyphMarginWidth:We,glyphMarginDecorationLaneCount:pe.glyphMarginDecorationLaneCount,lineNumbersLeft:qe,lineNumbersWidth:Re,decorationsLeft:nt,decorationsWidth:Ge,contentLeft:Qe,contentWidth:_t,minimap:ft,viewportColumn:ct,isWordWrapMinified:ot,isViewportWrapping:lt,wrappingColumn:pt,verticalScrollbarWidth:$e,horizontalScrollbarHeight:rt,overviewRuler:{top:Ct,width:$e,height:ve-2*Ct,right:0}}}}e.EditorLayoutInfoComputer=A;class Y extends m{constructor(){super(134,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[_.localize(46,null),_.localize(47,null)],type:"string",enum:["simple","advanced"],default:"simple",description:_.localize(48,null)}})}validate(oe){return u(oe,"simple",["simple","advanced"])}compute(oe,pe,Le){return pe.get(2)===2?"advanced":Le}}class ie extends m{constructor(){const oe={enabled:!0};super(62,"lightbulb",oe,{"editor.lightbulb.enabled":{type:"boolean",default:oe.enabled,description:_.localize(49,null)}})}validate(oe){return!oe||typeof oe!="object"?this.defaultValue:{enabled:r(oe.enabled,this.defaultValue.enabled)}}}class le extends m{constructor(){const oe={enabled:!1,maxLineCount:5,defaultModel:"outlineModel"};super(111,"stickyScroll",oe,{"editor.stickyScroll.enabled":{type:"boolean",default:oe.enabled,description:_.localize(50,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:oe.maxLineCount,minimum:1,maximum:10,description:_.localize(51,null)},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:oe.defaultModel,description:_.localize(52,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{enabled:r(pe.enabled,this.defaultValue.enabled),maxLineCount:o.clampedInt(pe.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:u(pe.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"])}}}class ne extends m{constructor(){const oe={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(136,"inlayHints",oe,{"editor.inlayHints.enabled":{type:"string",default:oe.enabled,description:_.localize(53,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[_.localize(54,null),_.localize(55,null,k.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),_.localize(56,null,k.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),_.localize(57,null)]},"editor.inlayHints.fontSize":{type:"number",default:oe.fontSize,markdownDescription:_.localize(58,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:oe.fontFamily,markdownDescription:_.localize(59,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:oe.padding,description:_.localize(60,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return typeof pe.enabled=="boolean"&&(pe.enabled=pe.enabled?"on":"off"),{enabled:u(pe.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:o.clampedInt(pe.fontSize,this.defaultValue.fontSize,0,100),fontFamily:l.string(pe.fontFamily,this.defaultValue.fontFamily),padding:r(pe.padding,this.defaultValue.padding)}}}class se extends m{constructor(){super(63,"lineDecorationsWidth",10)}validate(oe){return typeof oe=="string"&&/^\\d+(\\.\\d+)?ch$/.test(oe)?-parseFloat(oe.substring(0,oe.length-2)):o.clampedInt(oe,this.defaultValue,0,1e3)}compute(oe,pe,Le){return Le<0?o.clampedInt(-Le*oe.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):Le}}class H extends a{constructor(){super(64,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,oe=>a.clamp(oe,0,150),{markdownDescription:_.localize(61,null)})}compute(oe,pe,Le){return oe.fontInfo.lineHeight}}class W extends m{constructor(){const oe={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(70,"minimap",oe,{"editor.minimap.enabled":{type:"boolean",default:oe.enabled,description:_.localize(62,null)},"editor.minimap.autohide":{type:"boolean",default:oe.autohide,description:_.localize(63,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[_.localize(64,null),_.localize(65,null),_.localize(66,null)],default:oe.size,description:_.localize(67,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:oe.side,description:_.localize(68,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:oe.showSlider,description:_.localize(69,null)},"editor.minimap.scale":{type:"number",default:oe.scale,minimum:1,maximum:3,enum:[1,2,3],description:_.localize(70,null)},"editor.minimap.renderCharacters":{type:"boolean",default:oe.renderCharacters,description:_.localize(71,null)},"editor.minimap.maxColumn":{type:"number",default:oe.maxColumn,description:_.localize(72,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{enabled:r(pe.enabled,this.defaultValue.enabled),autohide:r(pe.autohide,this.defaultValue.autohide),size:u(pe.size,this.defaultValue.size,["proportional","fill","fit"]),side:u(pe.side,this.defaultValue.side,["right","left"]),showSlider:u(pe.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:r(pe.renderCharacters,this.defaultValue.renderCharacters),scale:o.clampedInt(pe.scale,1,1,3),maxColumn:o.clampedInt(pe.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function $(me){return me==="ctrlCmd"?k.isMacintosh?"metaKey":"ctrlKey":"altKey"}class Z extends m{constructor(){super(81,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:_.localize(73,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:_.localize(74,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{top:o.clampedInt(pe.top,0,0,1e3),bottom:o.clampedInt(pe.bottom,0,0,1e3)}}}class Q extends m{constructor(){const oe={enabled:!0,cycle:!0};super(83,"parameterHints",oe,{"editor.parameterHints.enabled":{type:"boolean",default:oe.enabled,description:_.localize(75,null)},"editor.parameterHints.cycle":{type:"boolean",default:oe.cycle,description:_.localize(76,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{enabled:r(pe.enabled,this.defaultValue.enabled),cycle:r(pe.cycle,this.defaultValue.cycle)}}}class re extends i{constructor(){super(138)}compute(oe,pe,Le){return oe.pixelRatio}}class ce extends m{constructor(){const oe={other:"on",comments:"off",strings:"off"},pe=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[_.localize(77,null),_.localize(78,null),_.localize(79,null)]}];super(86,"quickSuggestions",oe,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:pe,default:oe.strings,description:_.localize(80,null)},comments:{anyOf:pe,default:oe.comments,description:_.localize(81,null)},other:{anyOf:pe,default:oe.other,description:_.localize(82,null)}},default:oe,markdownDescription:_.localize(83,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=oe}validate(oe){if(typeof oe=="boolean"){const xe=oe?"on":"off";return{comments:xe,strings:xe,other:xe}}if(!oe||typeof oe!="object")return this.defaultValue;const{other:pe,comments:Le,strings:ve}=oe,be=["on","inline","off"];let De,Me,Oe;return typeof pe=="boolean"?De=pe?"on":"off":De=u(pe,this.defaultValue.other,be),typeof Le=="boolean"?Me=Le?"on":"off":Me=u(Le,this.defaultValue.comments,be),typeof ve=="boolean"?Oe=ve?"on":"off":Oe=u(ve,this.defaultValue.strings,be),{other:De,comments:Me,strings:Oe}}}class he extends m{constructor(){super(65,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[_.localize(84,null),_.localize(85,null),_.localize(86,null),_.localize(87,null)],default:"on",description:_.localize(88,null)})}validate(oe){let pe=this.defaultValue.renderType,Le=this.defaultValue.renderFn;return typeof oe<"u"&&(typeof oe=="function"?(pe=4,Le=oe):oe==="interval"?pe=3:oe==="relative"?pe=2:oe==="on"?pe=1:pe=0),{renderType:pe,renderFn:Le}}}function de(me){const oe=me.get(94);return oe==="editable"?me.get(88):oe!=="on"}e.filterValidationDecorations=de;class ue extends m{constructor(){const oe=[],pe={type:"number",description:_.localize(89,null)};super(98,"rulers",oe,{type:"array",items:{anyOf:[pe,{type:["object"],properties:{column:pe,color:{type:"string",description:_.localize(90,null),format:"color-hex"}}}]},default:oe,description:_.localize(91,null)})}validate(oe){if(Array.isArray(oe)){const pe=[];for(const Le of oe)if(typeof Le=="number")pe.push({column:o.clampedInt(Le,0,0,1e4),color:null});else if(Le&&typeof Le=="object"){const ve=Le;pe.push({column:o.clampedInt(ve.column,0,0,1e4),color:ve.color})}return pe.sort((Le,ve)=>Le.column-ve.column),pe}return this.defaultValue}}function q(me,oe){if(typeof me!="string")return oe;switch(me){case"hidden":return 2;case"visible":return 3;default:return 1}}class z extends m{constructor(){const oe={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(99,"scrollbar",oe,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[_.localize(92,null),_.localize(93,null),_.localize(94,null)],default:"auto",description:_.localize(95,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[_.localize(96,null),_.localize(97,null),_.localize(98,null)],default:"auto",description:_.localize(99,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:oe.verticalScrollbarSize,description:_.localize(100,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:oe.horizontalScrollbarSize,description:_.localize(101,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:oe.scrollByPage,description:_.localize(102,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe,Le=o.clampedInt(pe.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),ve=o.clampedInt(pe.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:o.clampedInt(pe.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:q(pe.vertical,this.defaultValue.vertical),horizontal:q(pe.horizontal,this.defaultValue.horizontal),useShadows:r(pe.useShadows,this.defaultValue.useShadows),verticalHasArrows:r(pe.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:r(pe.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:r(pe.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:r(pe.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Le,horizontalSliderSize:o.clampedInt(pe.horizontalSliderSize,Le,0,1e3),verticalScrollbarSize:ve,verticalSliderSize:o.clampedInt(pe.verticalSliderSize,ve,0,1e3),scrollByPage:r(pe.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 U extends m{constructor(){const oe={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(121,"unicodeHighlight",oe,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:oe.nonBasicASCII,description:_.localize(103,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:oe.invisibleCharacters,description:_.localize(104,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:oe.ambiguousCharacters,description:_.localize(105,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:oe.includeComments,description:_.localize(106,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:oe.includeStrings,description:_.localize(107,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:oe.allowedCharacters,description:_.localize(108,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:oe.allowedLocales,description:_.localize(109,null)}})}applyUpdate(oe,pe){let Le=!1;pe.allowedCharacters&&oe&&(w.equals(oe.allowedCharacters,pe.allowedCharacters)||(oe=Object.assign(Object.assign({},oe),{allowedCharacters:pe.allowedCharacters}),Le=!0)),pe.allowedLocales&&oe&&(w.equals(oe.allowedLocales,pe.allowedLocales)||(oe=Object.assign(Object.assign({},oe),{allowedLocales:pe.allowedLocales}),Le=!0));const ve=super.applyUpdate(oe,pe);return Le?new s(ve.newValue,!0):ve}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{nonBasicASCII:ae(pe.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:r(pe.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:r(pe.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:ae(pe.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:ae(pe.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(oe.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(oe.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(oe,pe){if(typeof oe!="object"||!oe)return pe;const Le={};for(const[ve,be]of Object.entries(oe))be===!0&&(Le[ve]=!0);return Le}}class X extends m{constructor(){const oe={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(60,"inlineSuggest",oe,{"editor.inlineSuggest.enabled":{type:"boolean",default:oe.enabled,description:_.localize(110,null)},"editor.inlineSuggest.showToolbar":{type:"string",default:oe.showToolbar,enum:["always","onHover"],enumDescriptions:[_.localize(111,null),_.localize(112,null)],description:_.localize(113,null)},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:oe.suppressSuggestions,description:_.localize(114,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{enabled:r(pe.enabled,this.defaultValue.enabled),mode:u(pe.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:u(pe.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:r(pe.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:r(pe.keepOnBlur,this.defaultValue.keepOnBlur)}}}class te extends m{constructor(){const oe={enabled:b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(13,"bracketPairColorization",oe,{"editor.bracketPairColorization.enabled":{type:"boolean",default:oe.enabled,markdownDescription:_.localize(115,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:oe.independentColorPoolPerBracketType,description:_.localize(116,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{enabled:r(pe.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:r(pe.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class G extends m{constructor(){const oe={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(14,"guides",oe,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[_.localize(117,null),_.localize(118,null),_.localize(119,null)],default:oe.bracketPairs,description:_.localize(120,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[_.localize(121,null),_.localize(122,null),_.localize(123,null)],default:oe.bracketPairsHorizontal,description:_.localize(124,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:oe.highlightActiveBracketPair,description:_.localize(125,null)},"editor.guides.indentation":{type:"boolean",default:oe.indentation,description:_.localize(126,null)},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[_.localize(127,null),_.localize(128,null),_.localize(129,null)],default:oe.highlightActiveIndentation,description:_.localize(130,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{bracketPairs:ae(pe.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:ae(pe.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:r(pe.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:r(pe.indentation,this.defaultValue.indentation),highlightActiveIndentation:ae(pe.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function ae(me,oe,pe){const Le=pe.indexOf(me);return Le===-1?oe:pe[Le]}class fe extends m{constructor(){const oe={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,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(114,"suggest",oe,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[_.localize(131,null),_.localize(132,null)],default:oe.insertMode,description:_.localize(133,null)},"editor.suggest.filterGraceful":{type:"boolean",default:oe.filterGraceful,description:_.localize(134,null)},"editor.suggest.localityBonus":{type:"boolean",default:oe.localityBonus,description:_.localize(135,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:oe.shareSuggestSelections,markdownDescription:_.localize(136,null)},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[_.localize(137,null),_.localize(138,null),_.localize(139,null),_.localize(140,null)],default:oe.selectionMode,markdownDescription:_.localize(141,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:oe.snippetsPreventQuickSuggestions,description:_.localize(142,null)},"editor.suggest.showIcons":{type:"boolean",default:oe.showIcons,description:_.localize(143,null)},"editor.suggest.showStatusBar":{type:"boolean",default:oe.showStatusBar,description:_.localize(144,null)},"editor.suggest.preview":{type:"boolean",default:oe.preview,description:_.localize(145,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:oe.showInlineDetails,description:_.localize(146,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:_.localize(147,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:_.localize(148,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:_.localize(149,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:_.localize(150,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:_.localize(151,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:_.localize(152,null)},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:_.localize(153,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:_.localize(154,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:_.localize(155,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:_.localize(156,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:_.localize(157,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:_.localize(158,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:_.localize(159,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:_.localize(160,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:_.localize(161,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:_.localize(162,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:_.localize(163,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:_.localize(164,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:_.localize(165,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:_.localize(166,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:_.localize(167,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:_.localize(168,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:_.localize(169,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:_.localize(170,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:_.localize(171,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:_.localize(172,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:_.localize(173,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:_.localize(174,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:_.localize(175,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:_.localize(176,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:_.localize(177,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:_.localize(178,null)}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{insertMode:u(pe.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:r(pe.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:r(pe.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:r(pe.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:r(pe.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:u(pe.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:r(pe.showIcons,this.defaultValue.showIcons),showStatusBar:r(pe.showStatusBar,this.defaultValue.showStatusBar),preview:r(pe.preview,this.defaultValue.preview),previewMode:u(pe.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:r(pe.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:r(pe.showMethods,this.defaultValue.showMethods),showFunctions:r(pe.showFunctions,this.defaultValue.showFunctions),showConstructors:r(pe.showConstructors,this.defaultValue.showConstructors),showDeprecated:r(pe.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:r(pe.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:r(pe.showFields,this.defaultValue.showFields),showVariables:r(pe.showVariables,this.defaultValue.showVariables),showClasses:r(pe.showClasses,this.defaultValue.showClasses),showStructs:r(pe.showStructs,this.defaultValue.showStructs),showInterfaces:r(pe.showInterfaces,this.defaultValue.showInterfaces),showModules:r(pe.showModules,this.defaultValue.showModules),showProperties:r(pe.showProperties,this.defaultValue.showProperties),showEvents:r(pe.showEvents,this.defaultValue.showEvents),showOperators:r(pe.showOperators,this.defaultValue.showOperators),showUnits:r(pe.showUnits,this.defaultValue.showUnits),showValues:r(pe.showValues,this.defaultValue.showValues),showConstants:r(pe.showConstants,this.defaultValue.showConstants),showEnums:r(pe.showEnums,this.defaultValue.showEnums),showEnumMembers:r(pe.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:r(pe.showKeywords,this.defaultValue.showKeywords),showWords:r(pe.showWords,this.defaultValue.showWords),showColors:r(pe.showColors,this.defaultValue.showColors),showFiles:r(pe.showFiles,this.defaultValue.showFiles),showReferences:r(pe.showReferences,this.defaultValue.showReferences),showFolders:r(pe.showFolders,this.defaultValue.showFolders),showTypeParameters:r(pe.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:r(pe.showSnippets,this.defaultValue.showSnippets),showUsers:r(pe.showUsers,this.defaultValue.showUsers),showIssues:r(pe.showIssues,this.defaultValue.showIssues)}}}class Ce extends m{constructor(){super(109,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:_.localize(179,null),default:!0,type:"boolean"}})}validate(oe){return!oe||typeof oe!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:r(oe.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class Se extends m{constructor(){super(133,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[_.localize(180,null),_.localize(181,null),_.localize(182,null),_.localize(183,null)],description:_.localize(184,null),default:"same"}})}validate(oe){switch(oe){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(oe,pe,Le){return pe.get(2)===2?0:Le}}class ye extends i{constructor(){super(141)}compute(oe,pe,Le){const ve=pe.get(140);return{isDominatedByLongLines:oe.isDominatedByLongLines,isWordWrapMinified:ve.isWordWrapMinified,isViewportWrapping:ve.isViewportWrapping,wrappingColumn:ve.wrappingColumn}}}class Ie extends m{constructor(){const oe={enabled:!0,showDropSelector:"afterDrop"};super(34,"dropIntoEditor",oe,{"editor.dropIntoEditor.enabled":{type:"boolean",default:oe.enabled,markdownDescription:_.localize(185,null)},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:_.localize(186,null),enum:["afterDrop","never"],enumDescriptions:[_.localize(187,null),_.localize(188,null)],default:"afterDrop"}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{enabled:r(pe.enabled,this.defaultValue.enabled),showDropSelector:u(pe.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class Ee extends m{constructor(){const oe={enabled:!0,showPasteSelector:"afterPaste"};super(82,"pasteAs",oe,{"editor.pasteAs.enabled":{type:"boolean",default:oe.enabled,markdownDescription:_.localize(189,null)},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:_.localize(190,null),enum:["afterPaste","never"],enumDescriptions:[_.localize(191,null),_.localize(192,null)],default:"afterPaste"}})}validate(oe){if(!oe||typeof oe!="object")return this.defaultValue;const pe=oe;return{enabled:r(pe.enabled,this.defaultValue.enabled),showPasteSelector:u(pe.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const ke="Consolas, \'Courier New\', monospace",Ae="Menlo, Monaco, \'Courier New\', monospace",Pe="\'Droid Sans Mono\', \'monospace\', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:k.isMacintosh?Ae:k.isLinux?Pe:ke,fontWeight:"normal",fontSize:k.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function _e(me){return e.editorOptionsRegistry[me.id]=me,me}e.EditorOptions={acceptSuggestionOnCommitCharacter:_e(new d(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:_.localize(193,null)})),acceptSuggestionOnEnter:_e(new v(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",_.localize(194,null),""],markdownDescription:_.localize(195,null)})),accessibilitySupport:_e(new C),accessibilityPageSize:_e(new o(3,"accessibilityPageSize",10,1,1073741824,{description:_.localize(196,null),tags:["accessibility"]})),ariaLabel:_e(new l(4,"ariaLabel",_.localize(197,null))),screenReaderAnnounceInlineSuggestion:_e(new d(6,"screenReaderAnnounceInlineSuggestion",!0,{description:_.localize(198,null),tags:["accessibility"]})),autoClosingBrackets:_e(new v(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",_.localize(199,null),_.localize(200,null),""],description:_.localize(201,null)})),autoClosingDelete:_e(new v(7,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",_.localize(202,null),""],description:_.localize(203,null)})),autoClosingOvertype:_e(new v(8,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",_.localize(204,null),""],description:_.localize(205,null)})),autoClosingQuotes:_e(new v(9,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",_.localize(206,null),_.localize(207,null),""],description:_.localize(208,null)})),autoIndent:_e(new f(10,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],p,{enumDescriptions:[_.localize(209,null),_.localize(210,null),_.localize(211,null),_.localize(212,null),_.localize(213,null)],description:_.localize(214,null)})),automaticLayout:_e(new d(11,"automaticLayout",!1)),autoSurround:_e(new v(12,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[_.localize(215,null),_.localize(216,null),_.localize(217,null),""],description:_.localize(218,null)})),bracketPairColorization:_e(new te),bracketPairGuides:_e(new G),stickyTabStops:_e(new d(112,"stickyTabStops",!1,{description:_.localize(219,null)})),codeLens:_e(new d(15,"codeLens",!0,{description:_.localize(220,null)})),codeLensFontFamily:_e(new l(16,"codeLensFontFamily","",{description:_.localize(221,null)})),codeLensFontSize:_e(new o(17,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:_.localize(222,null)})),colorDecorators:_e(new d(18,"colorDecorators",!0,{description:_.localize(223,null)})),colorDecoratorsLimit:_e(new o(19,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:_.localize(224,null)})),columnSelection:_e(new d(20,"columnSelection",!1,{description:_.localize(225,null)})),comments:_e(new y),contextmenu:_e(new d(22,"contextmenu",!0)),copyWithSyntaxHighlighting:_e(new d(23,"copyWithSyntaxHighlighting",!0,{description:_.localize(226,null)})),cursorBlinking:_e(new f(24,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],E,{description:_.localize(227,null)})),cursorSmoothCaretAnimation:_e(new v(25,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[_.localize(228,null),_.localize(229,null),_.localize(230,null)],description:_.localize(231,null)})),cursorStyle:_e(new f(26,"cursorStyle",I.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],T,{description:_.localize(232,null)})),cursorSurroundingLines:_e(new o(27,"cursorSurroundingLines",0,0,1073741824,{description:_.localize(233,null)})),cursorSurroundingLinesStyle:_e(new v(28,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[_.localize(234,null),_.localize(235,null)],description:_.localize(236,null)})),cursorWidth:_e(new o(29,"cursorWidth",0,0,1073741824,{markdownDescription:_.localize(237,null)})),disableLayerHinting:_e(new d(30,"disableLayerHinting",!1)),disableMonospaceOptimizations:_e(new d(31,"disableMonospaceOptimizations",!1)),domReadOnly:_e(new d(32,"domReadOnly",!1)),dragAndDrop:_e(new d(33,"dragAndDrop",!0,{description:_.localize(238,null)})),emptySelectionClipboard:_e(new R),dropIntoEditor:_e(new Ie),stickyScroll:_e(new le),experimentalWhitespaceRendering:_e(new v(36,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[_.localize(239,null),_.localize(240,null),_.localize(241,null)],description:_.localize(242,null)})),extraEditorClassName:_e(new l(37,"extraEditorClassName","")),fastScrollSensitivity:_e(new a(38,"fastScrollSensitivity",5,me=>me<=0?5:me,{markdownDescription:_.localize(243,null)})),find:_e(new M),fixedOverflowWidgets:_e(new d(40,"fixedOverflowWidgets",!1)),folding:_e(new d(41,"folding",!0,{description:_.localize(244,null)})),foldingStrategy:_e(new v(42,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[_.localize(245,null),_.localize(246,null)],description:_.localize(247,null)})),foldingHighlight:_e(new d(43,"foldingHighlight",!0,{description:_.localize(248,null)})),foldingImportsByDefault:_e(new d(44,"foldingImportsByDefault",!1,{description:_.localize(249,null)})),foldingMaximumRegions:_e(new o(45,"foldingMaximumRegions",5e3,10,65e3,{description:_.localize(250,null)})),unfoldOnClickAfterEndOfLine:_e(new d(46,"unfoldOnClickAfterEndOfLine",!1,{description:_.localize(251,null)})),fontFamily:_e(new l(47,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:_.localize(252,null)})),fontInfo:_e(new x),fontLigatures2:_e(new N),fontSize:_e(new F),fontWeight:_e(new B),fontVariations:_e(new P),formatOnPaste:_e(new d(53,"formatOnPaste",!1,{description:_.localize(253,null)})),formatOnType:_e(new d(54,"formatOnType",!1,{description:_.localize(254,null)})),glyphMargin:_e(new d(55,"glyphMargin",!0,{description:_.localize(255,null)})),gotoLocation:_e(new V),hideCursorInOverviewRuler:_e(new d(57,"hideCursorInOverviewRuler",!1,{description:_.localize(256,null)})),hover:_e(new K),inDiffEditor:_e(new d(59,"inDiffEditor",!1)),letterSpacing:_e(new a(61,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,me=>a.clamp(me,-5,20),{description:_.localize(257,null)})),lightbulb:_e(new ie),lineDecorationsWidth:_e(new se),lineHeight:_e(new H),lineNumbers:_e(new he),lineNumbersMinChars:_e(new o(66,"lineNumbersMinChars",5,1,300)),linkedEditing:_e(new d(67,"linkedEditing",!1,{description:_.localize(258,null)})),links:_e(new d(68,"links",!0,{description:_.localize(259,null)})),matchBrackets:_e(new v(69,"matchBrackets","always",["always","near","never"],{description:_.localize(260,null)})),minimap:_e(new W),mouseStyle:_e(new v(71,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:_e(new a(72,"mouseWheelScrollSensitivity",1,me=>me===0?1:me,{markdownDescription:_.localize(261,null)})),mouseWheelZoom:_e(new d(73,"mouseWheelZoom",!1,{markdownDescription:_.localize(262,null)})),multiCursorMergeOverlapping:_e(new d(74,"multiCursorMergeOverlapping",!0,{description:_.localize(263,null)})),multiCursorModifier:_e(new f(75,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],$,{markdownEnumDescriptions:[_.localize(264,null),_.localize(265,null)],markdownDescription:_.localize(266,null)})),multiCursorPaste:_e(new v(76,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[_.localize(267,null),_.localize(268,null)],markdownDescription:_.localize(269,null)})),multiCursorLimit:_e(new o(77,"multiCursorLimit",1e4,1,1e5,{markdownDescription:_.localize(270,null)})),occurrencesHighlight:_e(new d(78,"occurrencesHighlight",!0,{description:_.localize(271,null)})),overviewRulerBorder:_e(new d(79,"overviewRulerBorder",!0,{description:_.localize(272,null)})),overviewRulerLanes:_e(new o(80,"overviewRulerLanes",3,0,3)),padding:_e(new Z),pasteAs:_e(new Ee),parameterHints:_e(new Q),peekWidgetDefaultFocus:_e(new v(84,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[_.localize(273,null),_.localize(274,null)],description:_.localize(275,null)})),definitionLinkOpensInPeek:_e(new d(85,"definitionLinkOpensInPeek",!1,{description:_.localize(276,null)})),quickSuggestions:_e(new ce),quickSuggestionsDelay:_e(new o(87,"quickSuggestionsDelay",10,0,1073741824,{description:_.localize(277,null)})),readOnly:_e(new d(88,"readOnly",!1)),renameOnType:_e(new d(89,"renameOnType",!1,{description:_.localize(278,null),markdownDeprecationMessage:_.localize(279,null)})),renderControlCharacters:_e(new d(90,"renderControlCharacters",!0,{description:_.localize(280,null),restricted:!0})),renderFinalNewline:_e(new v(91,"renderFinalNewline",k.isLinux?"dimmed":"on",["off","on","dimmed"],{description:_.localize(281,null)})),renderLineHighlight:_e(new v(92,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",_.localize(282,null)],description:_.localize(283,null)})),renderLineHighlightOnlyWhenFocus:_e(new d(93,"renderLineHighlightOnlyWhenFocus",!1,{description:_.localize(284,null)})),renderValidationDecorations:_e(new v(94,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:_e(new v(95,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",_.localize(285,null),_.localize(286,null),_.localize(287,null),""],description:_.localize(288,null)})),revealHorizontalRightPadding:_e(new o(96,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:_e(new d(97,"roundedSelection",!0,{description:_.localize(289,null)})),rulers:_e(new ue),scrollbar:_e(new z),scrollBeyondLastColumn:_e(new o(100,"scrollBeyondLastColumn",4,0,1073741824,{description:_.localize(290,null)})),scrollBeyondLastLine:_e(new d(101,"scrollBeyondLastLine",!0,{description:_.localize(291,null)})),scrollPredominantAxis:_e(new d(102,"scrollPredominantAxis",!0,{description:_.localize(292,null)})),selectionClipboard:_e(new d(103,"selectionClipboard",!0,{description:_.localize(293,null),included:k.isLinux})),selectionHighlight:_e(new d(104,"selectionHighlight",!0,{description:_.localize(294,null)})),selectOnLineNumbers:_e(new d(105,"selectOnLineNumbers",!0)),showFoldingControls:_e(new v(106,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[_.localize(295,null),_.localize(296,null),_.localize(297,null)],description:_.localize(298,null)})),showUnused:_e(new d(107,"showUnused",!0,{description:_.localize(299,null)})),showDeprecated:_e(new d(135,"showDeprecated",!0,{description:_.localize(300,null)})),inlayHints:_e(new ne),snippetSuggestions:_e(new v(108,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[_.localize(301,null),_.localize(302,null),_.localize(303,null),_.localize(304,null)],description:_.localize(305,null)})),smartSelect:_e(new Ce),smoothScrolling:_e(new d(110,"smoothScrolling",!1,{description:_.localize(306,null)})),stopRenderingLineAfter:_e(new o(113,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:_e(new fe),inlineSuggest:_e(new X),suggestFontSize:_e(new o(115,"suggestFontSize",0,0,1e3,{markdownDescription:_.localize(307,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:_e(new o(116,"suggestLineHeight",0,0,1e3,{markdownDescription:_.localize(308,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:_e(new d(117,"suggestOnTriggerCharacters",!0,{description:_.localize(309,null)})),suggestSelection:_e(new v(118,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[_.localize(310,null),_.localize(311,null),_.localize(312,null)],description:_.localize(313,null)})),tabCompletion:_e(new v(119,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[_.localize(314,null),_.localize(315,null),_.localize(316,null)],description:_.localize(317,null)})),tabIndex:_e(new o(120,"tabIndex",0,-1,1073741824)),unicodeHighlight:_e(new U),unusualLineTerminators:_e(new v(122,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[_.localize(318,null),_.localize(319,null),_.localize(320,null)],description:_.localize(321,null)})),useShadowDOM:_e(new d(123,"useShadowDOM",!0)),useTabStops:_e(new d(124,"useTabStops",!0,{description:_.localize(322,null)})),wordBreak:_e(new v(125,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[_.localize(323,null),_.localize(324,null)],description:_.localize(325,null)})),wordSeparators:_e(new l(126,"wordSeparators",L.USUAL_WORD_SEPARATORS,{description:_.localize(326,null)})),wordWrap:_e(new v(127,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[_.localize(327,null),_.localize(328,null),_.localize(329,null),_.localize(330,null)],description:_.localize(331,null)})),wordWrapBreakAfterCharacters:_e(new l(128,"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:_e(new l(129,"wordWrapBreakBeforeCharacters","([{\\u2018\\u201C\\u3008\\u300A\\u300C\\u300E\\u3010\\u3014\\uFF08\\uFF3B\\uFF5B\\uFF62\\xA3\\xA5\\uFF04\\uFFE1\\uFFE5+\\uFF0B")),wordWrapColumn:_e(new o(130,"wordWrapColumn",80,1,1073741824,{markdownDescription:_.localize(332,null)})),wordWrapOverride1:_e(new v(131,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:_e(new v(132,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:_e(new O),defaultColorDecorators:_e(new d(142,"defaultColorDecorators",!1,{markdownDescription:_.localize(333,null)})),pixelRatio:_e(new re),tabFocusMode:_e(new d(139,"tabFocusMode",!1,{markdownDescription:_.localize(334,null)})),layoutInfo:_e(new A),wrappingInfo:_e(new ye),wrappingIndent:_e(new Se),wrappingStrategy:_e(new Y)}}),define(J[599],ee([1,0,7,35,9,76,41,12,5,167]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class m{constructor(i,n,r,d,h,o,c){this.top=i,this.left=n,this.paddingLeft=r,this.width=d,this.height=h,this.textContent=o,this.textContentClassName=c}}class s{constructor(i){this._context=i;const n=this._context.configuration.options,r=n.get(48);this._cursorStyle=n.get(26),this._lineHeight=n.get(64),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(29),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,k.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${g.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(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 n=this._context.configuration.options,r=n.get(48);return this._cursorStyle=n.get(26),this._lineHeight=n.get(64),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(29),this._typicalHalfwidthCharacterWidth),(0,D.applyFontInfo)(this._domNode,r),!0}onCursorPositionChanged(i,n){return n?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=i,!0}_getGraphemeAwarePosition(){const{lineNumber:i,column:n}=this._position,r=this._context.viewModel.getLineContent(i),[d,h]=L.getCharContainingOffset(r,n-1);return[new b.Position(i,d+1),r.substring(d,h)]}_prepareRender(i){let n="",r="";const[d,h]=this._getGraphemeAwarePosition();if(this._cursorStyle===w.TextEditorCursorStyle.Line||this._cursorStyle===w.TextEditorCursorStyle.LineThin){const f=i.visibleRangeForPosition(d);if(!f||f.outsideRenderedLine)return null;let p;this._cursorStyle===w.TextEditorCursorStyle.Line?(p=_.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),p>2&&(n=h,r=this._getTokenClassName(d))):p=_.computeScreenAwareSize(1);let C=f.left,y=0;p>=2&&C>=1&&(y=1,C-=y);const E=i.getVerticalOffsetForLineNumber(d.lineNumber)-i.bigNumbersDelta;return new m(E,C,y,p,this._lineHeight,n,r)}const o=i.linesVisibleRangesForRange(new S.Range(d.lineNumber,d.column,d.lineNumber,d.column+h.length),!1);if(!o||o.length===0)return null;const c=o[0];if(c.outsideRenderedLine||c.ranges.length===0)return null;const a=c.ranges[0],l=h==="\t"?this._typicalHalfwidthCharacterWidth:a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===w.TextEditorCursorStyle.Block&&(n=h,r=this._getTokenClassName(d));let u=i.getVerticalOffsetForLineNumber(d.lineNumber)-i.bigNumbersDelta,v=this._lineHeight;return(this._cursorStyle===w.TextEditorCursorStyle.Underline||this._cursorStyle===w.TextEditorCursorStyle.UnderlineThin)&&(u+=this._lineHeight-2,v=2),new m(u,a.left,0,l,v,n,r)}_getTokenClassName(i){const n=this._context.viewModel.getViewLineData(i.lineNumber),r=n.tokens.findTokenIndexAtOffset(i.column-1);return n.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 ${g.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.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=s}),define(J[226],ee([1,0,17,41,151]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const D=_.isMacintosh?1.5:1.35,w=8;class b{static createFromValidatedSettings(m,s,t){const i=m.get(47),n=m.get(51),r=m.get(50),d=m.get(49),h=m.get(52),o=m.get(64),c=m.get(61);return b._create(i,n,r,d,h,o,c,s,t)}static _create(m,s,t,i,n,r,d,h,o){r===0?r=D*t:r<w&&(r=r*t),r=Math.round(r),r<w&&(r=w);const c=1+(o?0:L.EditorZoom.getZoomLevel()*.1);return t*=c,r*=c,n===k.EditorFontVariations.TRANSLATE&&(s==="normal"||s==="bold"?n=k.EditorFontVariations.OFF:(n=`\'wght\' ${parseInt(s,10)}`,s="normal")),new b({pixelRatio:h,fontFamily:m,fontWeight:s,fontSize:t,fontFeatureSettings:i,fontVariationSettings:n,lineHeight:r,letterSpacing:d})}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,s=b._wrapInQuotes(this.fontFamily);return m&&this.fontFamily!==m?`${s}, ${m}`:s}static _wrapInQuotes(m){return/[,"\']/.test(m)?m:/[+ ]/.test(m)?`"${m}"`:m}}e.BareFontInfo=b,e.SERIALIZED_FONT_INFO_VERSION=2;class S extends b{constructor(m,s){super(m),this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=s,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=S}),define(J[314],ee([1,0,47,6,2,461,41,226]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMeasurements=e.FontMeasurementsImpl=void 0;class S extends L.Disposable{constructor(){super(),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new g,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new g,this._onDidChange.fire()}_writeToCache(s,t){this._cache.put(s,t),!t.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const s=this._cache.getValues();let t=!1;for(const i of s)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(s){if(!this._cache.has(s)){let t=this._actualReadFontInfo(s);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new b.FontInfo({pixelRatio:_.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(s,t)}return this._cache.get(s)}_createRequest(s,t,i,n){const r=new D.CharWidthRequest(s,t);return i.push(r),n?.push(r),r}_actualReadFontInfo(s){const t=[],i=[],n=this._createRequest("n",0,t,i),r=this._createRequest("\\uFF4D",0,t,null),d=this._createRequest(" ",0,t,i),h=this._createRequest("0",0,t,i),o=this._createRequest("1",0,t,i),c=this._createRequest("2",0,t,i),a=this._createRequest("3",0,t,i),l=this._createRequest("4",0,t,i),u=this._createRequest("5",0,t,i),v=this._createRequest("6",0,t,i),f=this._createRequest("7",0,t,i),p=this._createRequest("8",0,t,i),C=this._createRequest("9",0,t,i),y=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),O="|/-_ilm%";for(let x=0,F=O.length;x<F;x++)this._createRequest(O.charAt(x),0,t,i),this._createRequest(O.charAt(x),1,t,i),this._createRequest(O.charAt(x),2,t,i);(0,D.readCharWidths)(s,t);const R=Math.max(h.width,o.width,c.width,a.width,l.width,u.width,v.width,f.width,p.width,C.width);let M=s.fontFeatureSettings===w.EditorFontLigatures.OFF;const N=i[0].width;for(let x=1,F=i.length;M&&x<F;x++){const B=N-i[x].width;if(B<-.001||B>.001){M=!1;break}}let P=!0;return M&&E.width!==N&&(P=!1),E.width>y.width&&(P=!1),new b.FontInfo({pixelRatio:_.PixelRatio.value,fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontSize:s.fontSize,fontFeatureSettings:s.fontFeatureSettings,fontVariationSettings:s.fontVariationSettings,lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,isMonospace:M,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:P,spaceWidth:d.width,middotWidth:I.width,wsmiddotWidth:T.width,maxDigitWidth:R},!0)}}e.FontMeasurementsImpl=S;class g{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(s){const t=s.getId();return!!this._values[t]}get(s){const t=s.getId();return this._values[t]}put(s,t){const i=s.getId();this._keys[i]=s,this._values[i]=t}remove(s){const t=s.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(s=>this._values[s])}}e.FontMeasurements=new S}),define(J[315],ee([1,0,12,5,83,41]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class w{constructor(t,i,n,r,d){this.editorId=t,this.model=i,this.configuration=n,this._linesCollection=r,this._coordinatesConverter=d,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 n=this._decorationsCache[i];if(!n){const r=t.range,d=t.options;let h;if(d.isWholeLine){const o=this._coordinatesConverter.convertModelPositionToViewPosition(new _.Position(r.startLineNumber,1),0),c=this._coordinatesConverter.convertModelPositionToViewPosition(new _.Position(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);h=new k.Range(o.lineNumber,o.column,c.lineNumber,c.column)}else h=this._coordinatesConverter.convertModelRangeToViewRange(r,1);n=new L.ViewModelDecoration(h,d),this._decorationsCache[i]=n}return n}getMinimapDecorationsInRange(t){return this._getDecorationsInRange(t,!0,!1).decorations}getDecorationsViewportData(t){let i=this._cachedModelDecorationsResolver!==null;return i=i&&t.equalsRange(this._cachedModelDecorationsResolverViewRange),i||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(t,!1,!1),this._cachedModelDecorationsResolverViewRange=t),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(t,i=!1,n=!1){const r=new k.Range(t,this._linesCollection.getViewLineMinColumn(t),t,this._linesCollection.getViewLineMaxColumn(t));return this._getDecorationsInRange(r,i,n).inlineDecorations[0]}_getDecorationsInRange(t,i,n){const r=this._linesCollection.getDecorationsInRange(t,this.editorId,(0,D.filterValidationDecorations)(this.configuration.options),i,n),d=t.startLineNumber,h=t.endLineNumber,o=[];let c=0;const a=[];for(let l=d;l<=h;l++)a[l-d]=[];for(let l=0,u=r.length;l<u;l++){const v=r[l],f=v.options;if(!b(this.model,v))continue;const p=this._getOrCreateViewModelDecoration(v),C=p.range;if(o[c++]=p,f.inlineClassName){const y=new L.InlineDecoration(C,f.inlineClassName,f.inlineClassNameAffectsLetterSpacing?3:0),E=Math.max(d,C.startLineNumber),I=Math.min(h,C.endLineNumber);for(let T=E;T<=I;T++)a[T-d].push(y)}if(f.beforeContentClassName&&d<=C.startLineNumber&&C.startLineNumber<=h){const y=new L.InlineDecoration(new k.Range(C.startLineNumber,C.startColumn,C.startLineNumber,C.startColumn),f.beforeContentClassName,1);a[C.startLineNumber-d].push(y)}if(f.afterContentClassName&&d<=C.endLineNumber&&C.endLineNumber<=h){const y=new L.InlineDecoration(new k.Range(C.endLineNumber,C.endColumn,C.endLineNumber,C.endColumn),f.afterContentClassName,2);a[C.endLineNumber-d].push(y)}}return{decorations:o,inlineDecorations:a}}}e.ViewModelDecorations=w;function b(s,t){return!(t.options.hideInCommentTokens&&S(s,t)||t.options.hideInStringTokens&&g(s,t))}e.isModelDecorationVisible=b;function S(s,t){return m(s,t.range,i=>i===1)}e.isModelDecorationInComment=S;function g(s,t){return m(s,t.range,i=>i===2)}e.isModelDecorationInString=g;function m(s,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const r=s.tokenization.getLineTokens(n),d=n===t.startLineNumber,h=n===t.endLineNumber;let o=d?r.findTokenIndexAtOffset(t.startColumn-1):0;for(;o<r.getCount()&&!(h&&r.getStartOffset(o)>t.endColumn-1);){if(!i(r.getStandardTokenType(o)))return!1;o++}}return!0}}),define(J[600],ee([3,4]),function(j,e){return j.create("vs/editor/common/core/editorColorRegistry",e)}),define(J[601],ee([3,4]),function(j,e){return j.create("vs/editor/common/editorContextKeys",e)}),define(J[602],ee([3,4]),function(j,e){return j.create("vs/editor/common/languages/modesRegistry",e)}),define(J[603],ee([3,4]),function(j,e){return j.create("vs/editor/common/model/editStack",e)}),define(J[316],ee([1,0,603,11,24,21,307,134,42]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function g(d){return d.toString()}class m{static create(h,o){const c=h.getAlternativeVersionId(),a=i(h);return new m(c,c,a,a,o,o,[])}constructor(h,o,c,a,l,u,v){this.beforeVersionId=h,this.afterVersionId=o,this.beforeEOL=c,this.afterEOL=a,this.beforeCursorState=l,this.afterCursorState=u,this.changes=v}append(h,o,c,a,l){o.length>0&&(this.changes=(0,w.compressConsecutiveTextChanges)(this.changes,o)),this.afterEOL=c,this.afterVersionId=a,this.afterCursorState=l}static _writeSelectionsSize(h){return 4+4*4*(h?h.length:0)}static _writeSelections(h,o,c){if(b.writeUInt32BE(h,o?o.length:0,c),c+=4,o)for(const a of o)b.writeUInt32BE(h,a.selectionStartLineNumber,c),c+=4,b.writeUInt32BE(h,a.selectionStartColumn,c),c+=4,b.writeUInt32BE(h,a.positionLineNumber,c),c+=4,b.writeUInt32BE(h,a.positionColumn,c),c+=4;return c}static _readSelections(h,o,c){const a=b.readUInt32BE(h,o);o+=4;for(let l=0;l<a;l++){const u=b.readUInt32BE(h,o);o+=4;const v=b.readUInt32BE(h,o);o+=4;const f=b.readUInt32BE(h,o);o+=4;const p=b.readUInt32BE(h,o);o+=4,c.push(new L.Selection(u,v,f,p))}return o}serialize(){let h=10+m._writeSelectionsSize(this.beforeCursorState)+m._writeSelectionsSize(this.afterCursorState)+4;for(const a of this.changes)h+=a.writeSize();const o=new Uint8Array(h);let c=0;b.writeUInt32BE(o,this.beforeVersionId,c),c+=4,b.writeUInt32BE(o,this.afterVersionId,c),c+=4,b.writeUInt8(o,this.beforeEOL,c),c+=1,b.writeUInt8(o,this.afterEOL,c),c+=1,c=m._writeSelections(o,this.beforeCursorState,c),c=m._writeSelections(o,this.afterCursorState,c),b.writeUInt32BE(o,this.changes.length,c),c+=4;for(const a of this.changes)c=a.write(o,c);return o.buffer}static deserialize(h){const o=new Uint8Array(h);let c=0;const a=b.readUInt32BE(o,c);c+=4;const l=b.readUInt32BE(o,c);c+=4;const u=b.readUInt8(o,c);c+=1;const v=b.readUInt8(o,c);c+=1;const f=[];c=m._readSelections(o,c,f);const p=[];c=m._readSelections(o,c,p);const C=b.readUInt32BE(o,c);c+=4;const y=[];for(let E=0;E<C;E++)c=w.TextChange.read(o,c,y);return new m(a,l,u,v,f,p,y)}}e.SingleModelEditStackData=m;class s{get type(){return 0}get resource(){return D.URI.isUri(this.model)?this.model:this.model.uri}constructor(h,o,c,a){this.label=h,this.code=o,this.model=c,this._data=m.create(c,a)}toString(){return(this._data instanceof m?this._data:m.deserialize(this._data)).changes.map(o=>o.toString()).join(", ")}matchesResource(h){return(D.URI.isUri(this.model)?this.model:this.model.uri).toString()===h.toString()}setModel(h){this.model=h}canAppend(h){return this.model===h&&this._data instanceof m}append(h,o,c,a,l){this._data instanceof m&&this._data.append(h,o,c,a,l)}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 h=m.deserialize(this._data);this.model._applyUndo(h.changes,h.beforeEOL,h.beforeVersionId,h.beforeCursorState)}redo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof m&&(this._data=this._data.serialize());const h=m.deserialize(this._data);this.model._applyRedo(h.changes,h.afterEOL,h.afterVersionId,h.afterCursorState)}heapSize(){return this._data instanceof m&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=s;class t{get resources(){return this._editStackElementsArr.map(h=>h.resource)}constructor(h,o,c){this.label=h,this.code=o,this.type=1,this._isOpen=!0,this._editStackElementsArr=c.slice(0),this._editStackElementsMap=new Map;for(const a of this._editStackElementsArr){const l=g(a.resource);this._editStackElementsMap.set(l,a)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(h){const o=g(h);return this._editStackElementsMap.has(o)}setModel(h){const o=g(D.URI.isUri(h)?h:h.uri);this._editStackElementsMap.has(o)&&this._editStackElementsMap.get(o).setModel(h)}canAppend(h){if(!this._isOpen)return!1;const o=g(h.uri);return this._editStackElementsMap.has(o)?this._editStackElementsMap.get(o).canAppend(h):!1}append(h,o,c,a,l){const u=g(h.uri);this._editStackElementsMap.get(u).append(h,o,c,a,l)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const h of this._editStackElementsArr)h.undo()}redo(){for(const h of this._editStackElementsArr)h.redo()}heapSize(h){const o=g(h);return this._editStackElementsMap.has(o)?this._editStackElementsMap.get(o).heapSize():0}split(){return this._editStackElementsArr}toString(){const h=[];for(const o of this._editStackElementsArr)h.push(`${(0,S.basename)(o.resource)}: ${o}`);return`{${h.join(", ")}}`}}e.MultiModelEditStackElement=t;function i(d){return d.getEOL()===`\n`?0:1}function n(d){return d?d instanceof s||d instanceof t:!1}e.isEditStackElement=n;class r{constructor(h,o){this._model=h,this._undoRedoService=o}pushStackElement(){const h=this._undoRedoService.getLastElement(this._model.uri);n(h)&&h.close()}popStackElement(){const h=this._undoRedoService.getLastElement(this._model.uri);n(h)&&h.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(h,o){const c=this._undoRedoService.getLastElement(this._model.uri);if(n(c)&&c.canAppend(this._model))return c;const a=new s(_.localize(0,null),"undoredo.textBufferEdit",this._model,h);return this._undoRedoService.pushElement(a,o),a}pushEOL(h){const o=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(h),o.append(this._model,[],i(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(h,o,c,a){const l=this._getOrCreateEditStackElement(h,a),u=this._model.applyEdits(o,!0),v=r._computeCursorState(c,u),f=u.map((p,C)=>({index:C,textChange:p.textChange}));return f.sort((p,C)=>p.textChange.oldPosition===C.textChange.oldPosition?p.index-C.index:p.textChange.oldPosition-C.textChange.oldPosition),l.append(this._model,f.map(p=>p.textChange),i(this._model),this._model.getAlternativeVersionId(),v),v}static _computeCursorState(h,o){try{return h?h(o):null}catch(c){return(0,k.onUnexpectedError)(c),null}}}e.EditStack=r}),define(J[604],ee([3,4]),function(j,e){return j.create("vs/editor/common/standaloneStrings",e)}),define(J[84],ee([1,0,604]),function(j,e,_){"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=_.localize(0,null),t.singleSelectionRange=_.localize(1,null),t.singleSelection=_.localize(2,null),t.multiSelectionRange=_.localize(3,null),t.multiSelection=_.localize(4,null),t.emergencyConfOn=_.localize(5,null),t.openingDocs=_.localize(6,null),t.readonlyDiffEditor=_.localize(7,null),t.editableDiffEditor=_.localize(8,null),t.readonlyEditor=_.localize(9,null),t.editableEditor=_.localize(10,null),t.changeConfigToOnMac=_.localize(11,null),t.changeConfigToOnWinLinux=_.localize(12,null),t.auto_on=_.localize(13,null),t.auto_off=_.localize(14,null),t.tabFocusModeOnMsg=_.localize(15,null),t.tabFocusModeOnMsgNoKb=_.localize(16,null),t.tabFocusModeOffMsg=_.localize(17,null),t.tabFocusModeOffMsgNoKb=_.localize(18,null),t.openDocMac=_.localize(19,null),t.openDocWinLinux=_.localize(20,null),t.outroMsg=_.localize(21,null),t.showAccessibilityHelpAction=_.localize(22,null),t.accessibilityHelpTitle=_.localize(23,null)})(k||(e.AccessibilityHelpNLS=k={}));var L;(function(t){t.inspectTokensAction=_.localize(24,null)})(L||(e.InspectTokensNLS=L={}));var D;(function(t){t.gotoLineActionLabel=_.localize(25,null)})(D||(e.GoToLineNLS=D={}));var w;(function(t){t.helpQuickAccessActionLabel=_.localize(26,null)})(w||(e.QuickHelpNLS=w={}));var b;(function(t){t.quickCommandActionLabel=_.localize(27,null),t.quickCommandHelp=_.localize(28,null)})(b||(e.QuickCommandNLS=b={}));var S;(function(t){t.quickOutlineActionLabel=_.localize(29,null),t.quickOutlineByCategoryActionLabel=_.localize(30,null)})(S||(e.QuickOutlineNLS=S={}));var g;(function(t){t.editorViewAccessibleLabel=_.localize(31,null),t.accessibilityHelpMessage=_.localize(32,null)})(g||(e.StandaloneCodeEditorNLS=g={}));var m;(function(t){t.toggleHighContrast=_.localize(33,null)})(m||(e.ToggleHighContrastNLS=m={}));var s;(function(t){t.bulkEditServiceSummary=_.localize(34,null)})(s||(e.StandaloneServicesNLS=s={}))}),define(J[605],ee([3,4]),function(j,e){return j.create("vs/editor/common/viewLayout/viewLineRenderer",e)}),define(J[110],ee([1,0,605,9,96,144,513]),function(j,e,_,k,L,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(y,E){this.startOffset=y,this.endOffset=E}equals(y){return this.startOffset===y.startOffset&&this.endOffset===y.endOffset}}e.LineRange=b;class S{constructor(y,E,I,T,O,R,M,N,P,x,F,B,V,K,A,Y,ie,le,ne){this.useMonospaceOptimizations=y,this.canUseHalfwidthRightwardsArrow=E,this.lineContent=I,this.continuesWithWrappedLine=T,this.isBasicASCII=O,this.containsRTL=R,this.fauxIndentLength=M,this.lineTokens=N,this.lineDecorations=P.sort(D.LineDecoration.compare),this.tabSize=x,this.startVisibleColumn=F,this.spaceWidth=B,this.stopRenderingLineAfter=A,this.renderWhitespace=Y==="all"?4:Y==="boundary"?1:Y==="selection"?2:Y==="trailing"?3:0,this.renderControlCharacters=ie,this.fontLigatures=le,this.selectionsOnLine=ne&&ne.sort((W,$)=>W.startOffset<$.startOffset?-1:1);const se=Math.abs(K-B),H=Math.abs(V-B);se<H?(this.renderSpaceWidth=K,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=V,this.renderSpaceCharCode=183)}sameSelection(y){if(this.selectionsOnLine===null)return y===null;if(y===null||y.length!==this.selectionsOnLine.length)return!1;for(let E=0;E<this.selectionsOnLine.length;E++)if(!this.selectionsOnLine[E].equals(y[E]))return!1;return!0}equals(y){return this.useMonospaceOptimizations===y.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===y.canUseHalfwidthRightwardsArrow&&this.lineContent===y.lineContent&&this.continuesWithWrappedLine===y.continuesWithWrappedLine&&this.isBasicASCII===y.isBasicASCII&&this.containsRTL===y.containsRTL&&this.fauxIndentLength===y.fauxIndentLength&&this.tabSize===y.tabSize&&this.startVisibleColumn===y.startVisibleColumn&&this.spaceWidth===y.spaceWidth&&this.renderSpaceWidth===y.renderSpaceWidth&&this.renderSpaceCharCode===y.renderSpaceCharCode&&this.stopRenderingLineAfter===y.stopRenderingLineAfter&&this.renderWhitespace===y.renderWhitespace&&this.renderControlCharacters===y.renderControlCharacters&&this.fontLigatures===y.fontLigatures&&D.LineDecoration.equalsArr(this.lineDecorations,y.lineDecorations)&&this.lineTokens.equals(y.lineTokens)&&this.sameSelection(y.selectionsOnLine)}}e.RenderLineInput=S;class g{constructor(y,E){this.partIndex=y,this.charIndex=E}}e.DomPosition=g;class m{static getPartIndex(y){return(y&4294901760)>>>16}static getCharIndex(y){return(y&65535)>>>0}constructor(y,E){this.length=y,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(y,E,I,T){const O=(E<<16|I<<0)>>>0;this._data[y-1]=O,this._horizontalOffset[y-1]=T}getHorizontalOffset(y){return this._horizontalOffset.length===0?0:this._horizontalOffset[y-1]}charOffsetToPartData(y){return this.length===0?0:y<0?this._data[0]:y>=this.length?this._data[this.length-1]:this._data[y]}getDomPosition(y){const E=this.charOffsetToPartData(y-1),I=m.getPartIndex(E),T=m.getCharIndex(E);return new g(I,T)}getColumn(y,E){return this.partDataToCharOffset(y.partIndex,E,y.charIndex)+1}partDataToCharOffset(y,E,I){if(this.length===0)return 0;const T=(y<<16|I<<0)>>>0;let O=0,R=this.length-1;for(;O+1<R;){const A=O+R>>>1,Y=this._data[A];if(Y===T)return A;Y>T?R=A:O=A}if(O===R)return O;const M=this._data[O],N=this._data[R];if(M===T)return O;if(N===T)return R;const P=m.getPartIndex(M),x=m.getCharIndex(M),F=m.getPartIndex(N);let B;P!==F?B=E:B=m.getCharIndex(N);const V=I-x,K=B-I;return V<=K?O:R}}e.CharacterMapping=m;class s{constructor(y,E,I){this._renderLineOutputBrand=void 0,this.characterMapping=y,this.containsRTL=E,this.containsForeignElements=I}}e.RenderLineOutput=s;function t(C,y){if(C.lineContent.length===0){if(C.lineDecorations.length>0){y.appendString("<span>");let E=0,I=0,T=0;for(const R of C.lineDecorations)(R.type===1||R.type===2)&&(y.appendString(\'<span class="\'),y.appendString(R.className),y.appendString(\'"></span>\'),R.type===1&&(T|=1,E++),R.type===2&&(T|=2,I++));y.appendString("</span>");const O=new m(1,E+I);return O.setColumnInfo(1,E,0,0),new s(O,!1,T)}return y.appendString("<span><span></span></span>"),new s(new m(0,0),!1,0)}return v(d(C),y)}e.renderViewLine=t;class i{constructor(y,E,I,T){this.characterMapping=y,this.html=E,this.containsRTL=I,this.containsForeignElements=T}}e.RenderLineOutput2=i;function n(C){const y=new L.StringBuilder(1e4),E=t(C,y);return new i(E.characterMapping,y.build(),E.containsRTL,E.containsForeignElements)}e.renderViewLine2=n;class r{constructor(y,E,I,T,O,R,M,N,P,x,F,B,V,K,A,Y){this.fontIsMonospace=y,this.canUseHalfwidthRightwardsArrow=E,this.lineContent=I,this.len=T,this.isOverflowing=O,this.overflowingCharCount=R,this.parts=M,this.containsForeignElements=N,this.fauxIndentLength=P,this.tabSize=x,this.startVisibleColumn=F,this.containsRTL=B,this.spaceWidth=V,this.renderSpaceCharCode=K,this.renderWhitespace=A,this.renderControlCharacters=Y}}function d(C){const y=C.lineContent;let E,I,T;C.stopRenderingLineAfter!==-1&&C.stopRenderingLineAfter<y.length?(E=!0,I=y.length-C.stopRenderingLineAfter,T=C.stopRenderingLineAfter):(E=!1,I=0,T=y.length);let O=h(y,C.containsRTL,C.lineTokens,C.fauxIndentLength,T);C.renderControlCharacters&&!C.isBasicASCII&&(O=a(y,O)),(C.renderWhitespace===4||C.renderWhitespace===1||C.renderWhitespace===2&&C.selectionsOnLine||C.renderWhitespace===3&&!C.continuesWithWrappedLine)&&(O=l(C,y,T,O));let R=0;if(C.lineDecorations.length>0){for(let M=0,N=C.lineDecorations.length;M<N;M++){const P=C.lineDecorations[M];P.type===3||P.type===1?R|=1:P.type===2&&(R|=2)}O=u(y,T,O,C.lineDecorations)}return C.containsRTL||(O=o(y,O,!C.isBasicASCII||C.fontLigatures)),new r(C.useMonospaceOptimizations,C.canUseHalfwidthRightwardsArrow,y,T,E,I,O,R,C.fauxIndentLength,C.tabSize,C.startVisibleColumn,C.containsRTL,C.spaceWidth,C.renderSpaceCharCode,C.renderWhitespace,C.renderControlCharacters)}function h(C,y,E,I,T){const O=[];let R=0;I>0&&(O[R++]=new w.LinePart(I,"",0,!1));let M=I;for(let N=0,P=E.getCount();N<P;N++){const x=E.getEndOffset(N);if(x<=I)continue;const F=E.getClassName(N);if(x>=T){const V=y?k.containsRTL(C.substring(M,T)):!1;O[R++]=new w.LinePart(T,F,0,V);break}const B=y?k.containsRTL(C.substring(M,x)):!1;O[R++]=new w.LinePart(x,F,0,B),M=x}return O}function o(C,y,E){let I=0;const T=[];let O=0;if(E)for(let R=0,M=y.length;R<M;R++){const N=y[R],P=N.endIndex;if(I+50<P){const x=N.type,F=N.metadata,B=N.containsRTL;let V=-1,K=I;for(let A=I;A<P;A++)C.charCodeAt(A)===32&&(V=A),V!==-1&&A-K>=50&&(T[O++]=new w.LinePart(V+1,x,F,B),K=V+1,V=-1);K!==P&&(T[O++]=new w.LinePart(P,x,F,B))}else T[O++]=N;I=P}else for(let R=0,M=y.length;R<M;R++){const N=y[R],P=N.endIndex,x=P-I;if(x>50){const F=N.type,B=N.metadata,V=N.containsRTL,K=Math.ceil(x/50);for(let A=1;A<K;A++){const Y=I+A*50;T[O++]=new w.LinePart(Y,F,B,V)}T[O++]=new w.LinePart(P,F,B,V)}else T[O++]=N;I=P}return T}function c(C){return C<32?C!==9:C===127||C>=8234&&C<=8238||C>=8294&&C<=8297||C>=8206&&C<=8207||C===1564}function a(C,y){const E=[];let I=new w.LinePart(0,"",0,!1),T=0;for(const O of y){const R=O.endIndex;for(;T<R;T++){const M=C.charCodeAt(T);c(M)&&(T>I.endIndex&&(I=new w.LinePart(T,O.type,O.metadata,O.containsRTL),E.push(I)),I=new w.LinePart(T+1,"mtkcontrol",O.metadata,!1),E.push(I))}T>I.endIndex&&(I=new w.LinePart(R,O.type,O.metadata,O.containsRTL),E.push(I))}return E}function l(C,y,E,I){const T=C.continuesWithWrappedLine,O=C.fauxIndentLength,R=C.tabSize,M=C.startVisibleColumn,N=C.useMonospaceOptimizations,P=C.selectionsOnLine,x=C.renderWhitespace===1,F=C.renderWhitespace===3,B=C.renderSpaceWidth!==C.spaceWidth,V=[];let K=0,A=0,Y=I[A].type,ie=I[A].containsRTL,le=I[A].endIndex;const ne=I.length;let se=!1,H=k.firstNonWhitespaceIndex(y),W;H===-1?(se=!0,H=E,W=E):W=k.lastNonWhitespaceIndex(y);let $=!1,Z=0,Q=P&&P[Z],re=M%R;for(let he=O;he<E;he++){const de=y.charCodeAt(he);Q&&he>=Q.endOffset&&(Z++,Q=P&&P[Z]);let ue;if(he<H||he>W)ue=!0;else if(de===9)ue=!0;else if(de===32)if(x)if($)ue=!0;else{const q=he+1<E?y.charCodeAt(he+1):0;ue=q===32||q===9}else ue=!0;else ue=!1;if(ue&&P&&(ue=!!Q&&Q.startOffset<=he&&Q.endOffset>he),ue&&F&&(ue=se||he>W),ue&&ie&&he>=H&&he<=W&&(ue=!1),$){if(!ue||!N&&re>=R){if(B){const q=K>0?V[K-1].endIndex:O;for(let z=q+1;z<=he;z++)V[K++]=new w.LinePart(z,"mtkw",1,!1)}else V[K++]=new w.LinePart(he,"mtkw",1,!1);re=re%R}}else(he===le||ue&&he>O)&&(V[K++]=new w.LinePart(he,Y,0,ie),re=re%R);for(de===9?re=R:k.isFullWidthCharacter(de)?re+=2:re++,$=ue;he===le&&(A++,A<ne);)Y=I[A].type,ie=I[A].containsRTL,le=I[A].endIndex}let ce=!1;if($)if(T&&x){const he=E>0?y.charCodeAt(E-1):0,de=E>1?y.charCodeAt(E-2):0;he===32&&de!==32&&de!==9||(ce=!0)}else ce=!0;if(ce)if(B){const he=K>0?V[K-1].endIndex:O;for(let de=he+1;de<=E;de++)V[K++]=new w.LinePart(de,"mtkw",1,!1)}else V[K++]=new w.LinePart(E,"mtkw",1,!1);else V[K++]=new w.LinePart(E,Y,0,ie);return V}function u(C,y,E,I){I.sort(D.LineDecoration.compare);const T=D.LineDecorationsNormalizer.normalize(C,I),O=T.length;let R=0;const M=[];let N=0,P=0;for(let F=0,B=E.length;F<B;F++){const V=E[F],K=V.endIndex,A=V.type,Y=V.metadata,ie=V.containsRTL;for(;R<O&&T[R].startOffset<K;){const le=T[R];if(le.startOffset>P&&(P=le.startOffset,M[N++]=new w.LinePart(P,A,Y,ie)),le.endOffset+1<=K)P=le.endOffset+1,M[N++]=new w.LinePart(P,A+" "+le.className,Y|le.metadata,ie),R++;else{P=K,M[N++]=new w.LinePart(P,A+" "+le.className,Y|le.metadata,ie);break}}K>P&&(P=K,M[N++]=new w.LinePart(P,A,Y,ie))}const x=E[E.length-1].endIndex;if(R<O&&T[R].startOffset===x)for(;R<O&&T[R].startOffset===x;){const F=T[R];M[N++]=new w.LinePart(P,F.className,F.metadata,!1),R++}return M}function v(C,y){const E=C.fontIsMonospace,I=C.canUseHalfwidthRightwardsArrow,T=C.containsForeignElements,O=C.lineContent,R=C.len,M=C.isOverflowing,N=C.overflowingCharCount,P=C.parts,x=C.fauxIndentLength,F=C.tabSize,B=C.startVisibleColumn,V=C.containsRTL,K=C.spaceWidth,A=C.renderSpaceCharCode,Y=C.renderWhitespace,ie=C.renderControlCharacters,le=new m(R+1,P.length);let ne=!1,se=0,H=B,W=0,$=0,Z=0;V?y.appendString(\'<span dir="ltr">\'):y.appendString("<span>");for(let Q=0,re=P.length;Q<re;Q++){const ce=P[Q],he=ce.endIndex,de=ce.type,ue=ce.containsRTL,q=Y!==0&&ce.isWhitespace(),z=q&&!E&&(de==="mtkw"||!T),U=se===he&&ce.isPseudoAfter();if(W=0,y.appendString("<span "),ue&&y.appendString(\'style="unicode-bidi:isolate" \'),y.appendString(\'class="\'),y.appendString(z?"mtkz":de),y.appendASCIICharCode(34),q){let X=0;{let te=se,G=H;for(;te<he;te++){const fe=(O.charCodeAt(te)===9?F-G%F:1)|0;X+=fe,te>=x&&(G+=fe)}}for(z&&(y.appendString(\' style="width:\'),y.appendString(String(K*X)),y.appendString(\'px"\')),y.appendASCIICharCode(62);se<he;se++){le.setColumnInfo(se+1,Q-Z,W,$),Z=0;const te=O.charCodeAt(se);let G,ae;if(te===9){G=F-H%F|0,ae=G,!I||ae>1?y.appendCharCode(8594):y.appendCharCode(65515);for(let fe=2;fe<=ae;fe++)y.appendCharCode(160)}else G=2,ae=1,y.appendCharCode(A),y.appendCharCode(8204);W+=G,$+=ae,se>=x&&(H+=ae)}}else for(y.appendASCIICharCode(62);se<he;se++){le.setColumnInfo(se+1,Q-Z,W,$),Z=0;const X=O.charCodeAt(se);let te=1,G=1;switch(X){case 9:te=F-H%F,G=te;for(let ae=1;ae<=te;ae++)y.appendCharCode(160);break;case 32:y.appendCharCode(160);break;case 60:y.appendString("<");break;case 62:y.appendString(">");break;case 38:y.appendString("&");break;case 0:ie?y.appendCharCode(9216):y.appendString("�");break;case 65279:case 8232:case 8233:case 133:y.appendCharCode(65533);break;default:k.isFullWidthCharacter(X)&&G++,ie&&X<32?y.appendCharCode(9216+X):ie&&X===127?y.appendCharCode(9249):ie&&c(X)?(y.appendString("[U+"),y.appendString(f(X)),y.appendString("]"),te=8,G=te):y.appendCharCode(X)}W+=te,$+=G,se>=x&&(H+=G)}U?Z++:Z=0,se>=R&&!ne&&ce.isPseudoAfter()&&(ne=!0,le.setColumnInfo(se+1,Q,W,$)),y.appendString("</span>")}return ne||le.setColumnInfo(R+1,P.length-1,W,$),M&&(y.appendString(\'<span class="mtkoverflow">\'),y.appendString(_.localize(0,null,p(N))),y.appendString("</span>")),y.appendString("</span>"),new s(le,V,T)}function f(C){return C.toString(16).toUpperCase().padStart(4,"0")}function p(C){return C<1024?_.localize(1,null,C):C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/1024/1024).toFixed(1)} MB`}}),define(J[606],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(J[607],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(J[608],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(J[609],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(J[610],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(J[611],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/codeAction/browser/codeAction",e)}),define(J[612],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(J[613],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/codeAction/browser/codeActionContributions",e)}),define(J[614],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/codeAction/browser/codeActionController",e)}),define(J[615],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/codeAction/browser/codeActionMenu",e)}),define(J[616],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(J[617],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(J[618],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(J[619],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions",e)}),define(J[620],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/comment/browser/comment",e)}),define(J[621],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(J[622],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(J[623],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution",e)}),define(J[624],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteController",e)}),define(J[625],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/dropOrPasteInto/browser/defaultProviders",e)}),define(J[626],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController",e)}),define(J[627],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(J[628],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/find/browser/findController",e)}),define(J[629],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/find/browser/findWidget",e)}),define(J[630],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/folding/browser/folding",e)}),define(J[631],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(J[632],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(J[633],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/format/browser/format",e)}),define(J[634],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/format/browser/formatActions",e)}),define(J[635],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(J[636],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(J[637],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(J[638],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(J[639],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(J[640],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(J[641],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(J[642],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(J[153],ee([1,0,11,6,160,2,60,42,9,5,642]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class s{constructor(d,h,o,c){this.isProviderFirst=d,this.parent=h,this.link=o,this._rangeCallback=c,this.id=L.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){var d,h;return(h=(d=this._range)!==null&&d!==void 0?d:this.link.targetSelectionRange)!==null&&h!==void 0?h:this.link.range}set range(d){this._range=d,this._rangeCallback(this)}get ariaMessage(){var d;const h=(d=this.parent.getPreview(this))===null||d===void 0?void 0:d.preview(this.range);return h?(0,m.localize)(1,null,h.value,(0,b.basename)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,m.localize)(0,null,(0,b.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=s;class t{constructor(d){this._modelReference=d}dispose(){this._modelReference.dispose()}preview(d,h=8){const o=this._modelReference.object.textEditorModel;if(!o)return;const{startLineNumber:c,startColumn:a,endLineNumber:l,endColumn:u}=d,v=o.getWordUntilPosition({lineNumber:c,column:a-h}),f=new g.Range(c,v.startColumn,c,a),p=new g.Range(l,u,l,1073741824),C=o.getValueInRange(f).replace(/^\\s+/,""),y=o.getValueInRange(d),E=o.getValueInRange(p).replace(/\\s+$/,"");return{value:C+y+E,highlight:{start:C.length,end:C.length+y.length}}}}e.FilePreview=t;class i{constructor(d,h){this.parent=d,this.uri=h,this.children=[],this._previews=new w.ResourceMap}dispose(){(0,D.dispose)(this._previews.values()),this._previews.clear()}getPreview(d){return this._previews.get(d.uri)}get ariaMessage(){const d=this.children.length;return d===1?(0,m.localize)(2,null,(0,b.basename)(this.uri),this.uri.fsPath):(0,m.localize)(3,null,d,(0,b.basename)(this.uri),this.uri.fsPath)}resolve(d){return we(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const h of this.children)if(!this._previews.has(h.uri))try{const o=yield d.createModelReference(h.uri);this._previews.set(h.uri,new t(o))}catch(o){(0,_.onUnexpectedError)(o)}return this})}}e.FileReferences=i;class n{constructor(d,h){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new k.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=d,this._title=h;const[o]=d;d.sort(n._compareReferences);let c;for(const a of d)if((!c||!b.extUri.isEqual(c.uri,a.uri,!0))&&(c=new i(this,a.uri),this.groups.push(c)),c.children.length===0||n._compareReferences(a,c.children[c.children.length-1])!==0){const l=new s(o===a,c,a,u=>this._onDidChangeReferenceRange.fire(u));this.references.push(l),c.children.push(l)}}dispose(){(0,D.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new n(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(d,h){const{parent:o}=d;let c=o.children.indexOf(d);const a=o.children.length,l=o.parent.groups.length;return l===1||h&&c+1<a||!h&&c>0?(h?c=(c+1)%a:c=(c+a-1)%a,o.children[c]):(c=o.parent.groups.indexOf(o),h?(c=(c+1)%l,o.parent.groups[c].children[0]):(c=(c+l-1)%l,o.parent.groups[c].children[o.parent.groups[c].children.length-1]))}nearestReference(d,h){const o=this.references.map((c,a)=>({idx:a,prefixLen:S.commonPrefixLength(c.uri.toString(),d.toString()),offsetDist:Math.abs(c.range.startLineNumber-h.lineNumber)*100+Math.abs(c.range.startColumn-h.column)})).sort((c,a)=>c.prefixLen>a.prefixLen?-1:c.prefixLen<a.prefixLen?1:c.offsetDist<a.offsetDist?-1:c.offsetDist>a.offsetDist?1:0)[0];if(o)return this.references[o.idx]}referenceAt(d,h){for(const o of this.references)if(o.uri.toString()===d.toString()&&g.Range.containsPosition(o.range,h))return o}firstReference(){for(const d of this.references)if(d.isProviderFirst)return d;return this.references[0]}static _compareReferences(d,h){return b.extUri.compare(d.uri,h.uri)||g.Range.compareRangesUsingStarts(d.range,h.range)}}e.ReferencesModel=n}),define(J[643],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(J[644],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/hover/browser/hover",e)}),define(J[645],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(J[646],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(J[647],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(J[648],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(J[649],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(J[650],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/inlineCompletions/browser/commands",e)}),define(J[651],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/inlineCompletions/browser/hoverParticipant",e)}),define(J[652],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys",e)}),define(J[653],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget",e)}),define(J[654],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(J[655],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(J[656],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(J[657],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/links/browser/links",e)}),define(J[658],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/message/browser/messageController",e)}),define(J[659],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(J[660],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(J[661],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(J[662],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(J[663],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(J[664],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(J[665],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/readOnlyMessage/browser/contribution",e)}),define(J[666],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/rename/browser/rename",e)}),define(J[667],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(J[668],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(J[669],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(J[670],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(J[671],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/stickyScroll/browser/stickyScrollActions",e)}),define(J[672],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(J[673],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(J[674],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(J[675],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(J[676],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(J[677],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(J[678],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(J[679],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(J[680],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(J[681],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(J[682],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(J[683],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/wordHighlighter/browser/highlightDecorations",e)}),define(J[684],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(J[685],ee([3,4]),function(j,e){return j.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(J[686],ee([3,4]),function(j,e){return j.create("vs/platform/action/common/actionCommonCategories",e)}),define(J[687],ee([3,4]),function(j,e){return j.create("vs/platform/actionWidget/browser/actionList",e)}),define(J[688],ee([3,4]),function(j,e){return j.create("vs/platform/actionWidget/browser/actionWidget",e)}),define(J[689],ee([3,4]),function(j,e){return j.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(J[690],ee([3,4]),function(j,e){return j.create("vs/platform/actions/browser/toolbar",e)}),define(J[691],ee([3,4]),function(j,e){return j.create("vs/platform/actions/common/menuService",e)}),define(J[692],ee([3,4]),function(j,e){return j.create("vs/platform/audioCues/browser/audioCueService",e)}),define(J[693],ee([3,4]),function(j,e){return j.create("vs/platform/configuration/common/configurationRegistry",e)}),define(J[694],ee([3,4]),function(j,e){return j.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(J[695],ee([3,4]),function(j,e){return j.create("vs/platform/contextkey/common/contextkey",e)}),define(J[696],ee([3,4]),function(j,e){return j.create("vs/platform/contextkey/common/contextkeys",e)}),define(J[697],ee([3,4]),function(j,e){return j.create("vs/platform/contextkey/common/scanner",e)}),define(J[698],ee([3,4]),function(j,e){return j.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(J[699],ee([3,4]),function(j,e){return j.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(J[700],ee([3,4]),function(j,e){return j.create("vs/platform/list/browser/listService",e)}),define(J[701],ee([3,4]),function(j,e){return j.create("vs/platform/markers/common/markers",e)}),define(J[702],ee([3,4]),function(j,e){return j.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(J[703],ee([3,4]),function(j,e){return j.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(J[704],ee([3,4]),function(j,e){return j.create("vs/platform/quickinput/browser/quickInput",e)}),define(J[705],ee([3,4]),function(j,e){return j.create("vs/platform/quickinput/browser/quickInputList",e)}),define(J[706],ee([3,4]),function(j,e){return j.create("vs/platform/quickinput/browser/quickInputUtils",e)}),define(J[707],ee([3,4]),function(j,e){return j.create("vs/platform/theme/common/colorRegistry",e)}),define(J[708],ee([3,4]),function(j,e){return j.create("vs/platform/theme/common/iconRegistry",e)}),define(J[709],ee([3,4]),function(j,e){return j.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(J[710],ee([3,4]),function(j,e){return j.create("vs/platform/workspace/common/workspace",e)}),define(J[711],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isICommandActionToggleInfo=void 0;function _(k){return k?k.condition!==void 0:!1}e.isICommandActionToggleInfo=_}),define(J[712],ee([1,0,686]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Categories=void 0,e.Categories=Object.freeze({View:{value:(0,_.localize)(0,null),original:"View"},Help:{value:(0,_.localize)(1,null),original:"Help"},Test:{value:(0,_.localize)(2,null),original:"Test"},File:{value:(0,_.localize)(3,null),original:"File"},Preferences:{value:(0,_.localize)(4,null),original:"Preferences"},Developer:{value:(0,_.localize)(5,null),original:"Developer"}})}),define(J[713],ee([1,0,11,697]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=void 0;function L(...S){switch(S.length){case 1:return(0,k.localize)(0,null,S[0]);case 2:return(0,k.localize)(1,null,S[0],S[1]);case 3:return(0,k.localize)(2,null,S[0],S[1],S[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(g){switch(g.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return g.isTripleEq?"===":"==";case 4:return g.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return g.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 g.lexeme;case 18:return g.lexeme;case 19:return g.lexeme;case 20:return"EOF";default:throw(0,_.illegalState)(`unhandled token type: ${JSON.stringify(g)}; have you forgotten to add a case?`)}}reset(g){return this._input=g,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(L("==","=~"));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(L("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(L("||"));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(g){return this._isAtEnd()||this._input.charCodeAt(this._current)!==g?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(g){this._tokens.push({type:g,offset:this._start})}_error(g){const m=this._start,s=this._input.substring(this._start,this._current),t={type:19,offset:this._start,lexeme:s};this._errors.push({offset:m,lexeme:s,additionalInfo:g}),this._tokens.push(t)}_string(){this.stringRe.lastIndex=this._start;const g=this.stringRe.exec(this._input);if(g){this._current=this._start+g[0].length;const m=this._input.substring(this._start,this._current),s=b._keywords.get(m);s?this._addToken(s):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 g=this._current,m=!1,s=!1;for(;;){if(g>=this._input.length){this._current=g,this._error(w);return}const i=this._input.charCodeAt(g);if(m)m=!1;else if(i===47&&!s){g++;break}else i===91?s=!0:i===92?m=!0:i===93&&(s=!1);g++}for(;g<this._input.length&&b._regexFlags.has(this._input.charCodeAt(g));)g++;this._current=g;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}}e.Scanner=b,b._regexFlags=new Set(["i","g","s","m","y","u"].map(S=>S.charCodeAt(0))),b._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}),define(J[714],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpenSource=void 0;var _;(function(k){k[k.API=0]="API",k[k.USER=1]="USER"})(_||(e.EditorOpenSource=_={}))}),define(J[715],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIdentifierSet=e.ExtensionIdentifier=void 0;class _{constructor(D){this.value=D,this._lower=D.toLowerCase()}static toKey(D){return typeof D=="string"?D.toLowerCase():D._lower}}e.ExtensionIdentifier=_;class k{constructor(D){if(this._set=new Set,D)for(const w of D)this.add(w)}add(D){this._set.add(_.toKey(D))}has(D){return this._set.has(_.toKey(D))}}e.ExtensionIdentifierSet=k}),define(J[317],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileKind=void 0;var _;(function(k){k[k.FILE=0]="FILE",k[k.FOLDER=1]="FOLDER",k[k.ROOT_FOLDER=2]="ROOT_FOLDER"})(_||(e.FileKind=_={}))}),define(J[716],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function _(k){var L,D;return((L=k.lookupKeybinding("history.showPrevious"))===null||L===void 0?void 0:L.getElectronAccelerator())==="Up"&&((D=k.lookupKeybinding("history.showNext"))===null||D===void 0?void 0:D.getElectronAccelerator())==="Down"}e.showHistoryKeybindingHint=_}),define(J[227],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class _{constructor(L,D=[],w=!1){this.ctor=L,this.staticArguments=D,this.supportsDelayedInstantiation=w}}e.SyncDescriptor=_}),define(J[49],ee([1,0,227]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const k=[];function L(w,b,S){b instanceof _.SyncDescriptor||(b=new _.SyncDescriptor(b,[],!!S)),k.push([w,b])}e.registerSingleton=L;function D(){return k}e.getSingletonServiceDescriptors=D}),define(J[717],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class _{constructor(D,w){this.key=D,this.data=w,this.incoming=new Map,this.outgoing=new Map}}e.Node=_;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),S=this.lookupOrInsertNode(w);b.outgoing.set(S.key,S),S.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 _(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]),S=this._findCycle(w,b);if(S)return S}}_findCycle(D,w){for(const[b,S]of D.outgoing){if(w.has(b))return[...w,b].join(" -> ");w.add(b);const g=this._findCycle(S,w);if(g)return g;w.delete(b)}}}e.Graph=k}),define(J[8],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.IInstantiationService=e._util=void 0;var _;(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})(_||(e._util=_={})),e.IInstantiationService=L("instantiationService");function k(D,w,b){w[_.DI_TARGET]===w?w[_.DI_DEPENDENCIES].push({id:D,index:b}):(w[_.DI_DEPENDENCIES]=[{id:D,index:b}],w[_.DI_TARGET]=w)}function L(D){if(_.serviceIds.has(D))return _.serviceIds.get(D);const w=function(b,S,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");k(w,b,g)};return w.toString=()=>D,_.serviceIds.set(D,w),w}e.createDecorator=L}),define(J[125],ee([1,0,8,21,18]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,_.createDecorator)("IWorkspaceEditService");class D{constructor(g){this.metadata=g}static convert(g){return g.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(g){return g instanceof w?!0:(0,L.isObject)(g)&&k.URI.isUri(g.resource)&&(0,L.isObject)(g.textEdit)}static lift(g){return g instanceof w?g:new w(g.resource,g.textEdit,g.versionId,g.metadata)}constructor(g,m,s=void 0,t){super(t),this.resource=g,this.textEdit=m,this.versionId=s}}e.ResourceTextEdit=w;class b extends D{static is(g){return g instanceof b?!0:(0,L.isObject)(g)&&(!!g.newResource||!!g.oldResource)}static lift(g){return g instanceof b?g:new b(g.oldResource,g.newResource,g.options,g.metadata)}constructor(g,m,s={},t){super(t),this.oldResource=g,this.newResource=m,this.options=s}}e.ResourceFileEdit=b}),define(J[32],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,_.createDecorator)("codeEditorService")}),define(J[39],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,_.createDecorator)("languageService")}),define(J[111],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=void 0,e.IEditorWorkerService=(0,_.createDecorator)("editorWorkerService")}),define(J[19],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,_.createDecorator)("ILanguageFeaturesService")}),define(J[718],ee([1,0,574,19,49]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeaturesService=void 0;class D{constructor(){this.referenceProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.renameProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.codeActionProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.definitionProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.typeDefinitionProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.declarationProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.implementationProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.documentSymbolProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.inlayHintsProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.colorProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.codeLensProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.documentFormattingEditProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeFormattingEditProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.onTypeFormattingEditProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.signatureHelpProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.hoverProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.documentHighlightProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.selectionRangeProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.foldingRangeProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.linkProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.inlineCompletionsProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.completionProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.linkedEditingRangeProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.documentSemanticTokensProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.documentOnDropEditProvider=new _.LanguageFeatureRegistry(this._score.bind(this)),this.documentPasteEditProvider=new _.LanguageFeatureRegistry(this._score.bind(this))}_score(b){var S;return(S=this._notebookTypeResolver)===null||S===void 0?void 0:S.call(this,b)}}e.LanguageFeaturesService=D,(0,L.registerSingleton)(k.ILanguageFeaturesService,D,1)}),define(J[228],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,_.createDecorator)("markerDecorationsService")}),define(J[50],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,_.createDecorator)("modelService")}),define(J[62],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,_.createDecorator)("textModelService")}),define(J[229],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISemanticTokensStylingService=void 0,e.ISemanticTokensStylingService=(0,_.createDecorator)("semanticTokensStylingService")}),define(J[180],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=(0,_.createDecorator)("textResourceConfigurationService"),e.ITextResourcePropertiesService=(0,_.createDecorator)("textResourcePropertiesService")}),define(J[719],ee([1,0,49,8,272]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITreeViewsDnDService=void 0,e.ITreeViewsDnDService=(0,k.createDecorator)("treeViewsDndService"),(0,_.registerSingleton)(e.ITreeViewsDnDService,L.TreeViewsDnDService,1)}),define(J[720],ee([1,0,125]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCombinedWorkspaceEdit=void 0;function k(L,D,w){var b,S;return{edits:[...D.map(g=>new _.ResourceTextEdit(L,typeof w.insertText=="string"?{range:g,text:w.insertText,insertAsSnippet:!1}:{range:g,text:w.insertText.snippet,insertAsSnippet:!0})),...(S=(b=w.additionalEdit)===null||b===void 0?void 0:b.edits)!==null&&S!==void 0?S:[]]}}e.createCombinedWorkspaceEdit=k});var ge=this&&this.__param||function(j,e){return function(_,k){e(_,k,j)}};define(J[721],ee([1,0,86,6,2,82,9,76,41,12,5,96,39,46,89,144,110,206,145,435]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=void 0;let c=e.GhostTextWidget=class extends L.Disposable{constructor(f,p,C){super(),this.editor=f,this.model=p,this.languageService=C,this.isDisposed=(0,D.observableValue)("isDisposed",!1),this.currentTextModel=(0,D.observableFromEvent)(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=(0,D.derived)("uiState",y=>{if(this.isDisposed.read(y))return;const E=this.currentTextModel.read(y);if(E!==this.model.targetTextModel.read(y))return;const I=this.model.ghostText.read(y);if(!I)return;const T=I instanceof h.GhostTextReplacement?I.columnRange:void 0,O=[],R=[];function M(B,V){if(R.length>0){const K=R[R.length-1];V&&K.decorations.push(new r.LineDecoration(K.content.length+1,K.content.length+1+B[0].length,V,0)),K.content+=B[0],B=B.slice(1)}for(const K of B)R.push({content:K,decorations:V?[new r.LineDecoration(1,K.length+1,V,0)]:[]})}const N=E.getLineContent(I.lineNumber);let P,x=0;for(const B of I.parts){let V=B.lines;P===void 0?(O.push({column:B.column,text:V[0],preview:B.preview}),V=V.slice(1)):M([N.substring(x,B.column-1)],void 0),V.length>0&&(M(V,"ghost-text"),P===void 0&&B.column<=N.length&&(P=B.column)),x=B.column-1}P!==void 0&&M([N.substring(x)],void 0);const F=P!==void 0?new o.ColumnRange(P,N.length+1):void 0;return{replacedRange:T,inlineTexts:O,additionalLines:R,hiddenRange:F,lineNumber:I.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(y),targetTextModel:E}}),this.decorations=(0,D.derived)("decorations",y=>{const E=this.uiState.read(y);if(!E)return[];const I=[];E.replacedRange&&I.push({range:E.replacedRange.toRange(E.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),E.hiddenRange&&I.push({range:E.hiddenRange.toRange(E.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const T of E.inlineTexts)I.push({range:m.Range.fromPositions(new g.Position(E.lineNumber,T.column)),options:{description:"ghost-text",after:{content:T.text,inlineClassName:T.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:i.InjectedTextCursorStops.Left},showIfCollapsed:!0}});return I}),this.additionalLinesWidget=this._register(new a(this.editor,this.languageService.languageIdCodec,(0,D.derived)("lines",y=>{const E=this.uiState.read(y);return E?{lineNumber:E.lineNumber,additionalLines:E.additionalLines,minReservedLineCount:E.additionalReservedLineCount,targetTextModel:E.targetTextModel}:void 0}))),this._register((0,L.toDisposable)(()=>{this.isDisposed.set(!0,void 0)})),this._register((0,o.applyObservableDecorations)(this.editor,this.decorations))}ownsViewZone(f){return this.additionalLinesWidget.viewZoneId===f}};e.GhostTextWidget=c=Te([ge(2,t.ILanguageService)],c);class a extends L.Disposable{get viewZoneId(){return this._viewZoneId}constructor(f,p,C){super(),this.editor=f,this.languageIdCodec=p,this.lines=C,this._viewZoneId=void 0,this.editorOptionsChanged=(0,D.observableSignalFromEvent)("editorOptionChanged",k.Event.filter(this.editor.onDidChangeConfiguration,y=>y.hasChanged(31)||y.hasChanged(113)||y.hasChanged(95)||y.hasChanged(90)||y.hasChanged(49)||y.hasChanged(48)||y.hasChanged(64))),this._register((0,D.autorun)("update view zone",y=>{const E=this.lines.read(y);this.editorOptionsChanged.read(y),E?this.updateLines(E.lineNumber,E.additionalLines,E.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(f=>{this._viewZoneId&&(f.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(f,p,C){const y=this.editor.getModel();if(!y)return;const{tabSize:E}=y.getOptions();this.editor.changeViewZones(I=>{this._viewZoneId&&(I.removeZone(this._viewZoneId),this._viewZoneId=void 0);const T=Math.max(p.length,C);if(T>0){const O=document.createElement("div");l(O,E,p,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=I.addZone({afterLineNumber:f,heightInLines:T,domNode:O,afterColumnAffinity:1})}})}}function l(v,f,p,C,y){const E=C.get(31),I=C.get(113),T="none",O=C.get(90),R=C.get(49),M=C.get(48),N=C.get(64),P=new s.StringBuilder(1e4);P.appendString(\'<div class="suggest-preview-text">\');for(let B=0,V=p.length;B<V;B++){const K=p[B],A=K.content;P.appendString(\'<div class="view-line\'),P.appendString(\'" style="top:\'),P.appendString(String(B*N)),P.appendString(\'px;width:1000000px;">\');const Y=w.isBasicASCII(A),ie=w.containsRTL(A),le=n.LineTokens.createEmpty(A,y);(0,d.renderViewLine)(new d.RenderLineInput(M.isMonospace&&!E,M.canUseHalfwidthRightwardsArrow,A,!1,Y,ie,0,le,K.decorations,f,0,M.spaceWidth,M.middotWidth,M.wsmiddotWidth,I,T,O,R!==S.EditorFontLigatures.OFF,null),P),P.appendString("</div>")}P.appendString("</div>"),(0,b.applyFontInfo)(v,M);const x=P.build(),F=u?u.createHTML(x):x;v.innerHTML=F}const u=(0,_.createTrustedTypesPolicy)("editorGhostText",{createHTML:v=>v})}),define(J[126],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=(0,_.createDecorator)("themeService")}),define(J[181],ee([1,0,8,692]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCue=e.Sound=e.IAudioCueService=void 0,e.IAudioCueService=(0,_.createDecorator)("audioCue");class L{static register(b){return new L(b.fileName)}constructor(b){this.fileName=b}}e.Sound=L,L.error=L.register({fileName:"error.mp3"}),L.warning=L.register({fileName:"warning.mp3"}),L.foldedArea=L.register({fileName:"foldedAreas.mp3"}),L.break=L.register({fileName:"break.mp3"}),L.quickFixes=L.register({fileName:"quickFixes.mp3"}),L.taskCompleted=L.register({fileName:"taskCompleted.mp3"}),L.taskFailed=L.register({fileName:"taskFailed.mp3"}),L.terminalBell=L.register({fileName:"terminalBell.mp3"}),L.diffLineInserted=L.register({fileName:"diffLineInserted.mp3"}),L.diffLineDeleted=L.register({fileName:"diffLineDeleted.mp3"}),L.diffLineModified=L.register({fileName:"diffLineModified.mp3"});class D{static register(b){const S=new D(b.sound,b.name,b.settingsKey);return D._audioCues.add(S),S}constructor(b,S,g){this.sound=b,this.name=S,this.settingsKey=g}}e.AudioCue=D,D._audioCues=new Set,D.error=D.register({name:(0,k.localize)(0,null),sound:L.error,settingsKey:"audioCues.lineHasError"}),D.warning=D.register({name:(0,k.localize)(1,null),sound:L.warning,settingsKey:"audioCues.lineHasWarning"}),D.foldedArea=D.register({name:(0,k.localize)(2,null),sound:L.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),D.break=D.register({name:(0,k.localize)(3,null),sound:L.break,settingsKey:"audioCues.lineHasBreakpoint"}),D.inlineSuggestion=D.register({name:(0,k.localize)(4,null),sound:L.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),D.terminalQuickFix=D.register({name:(0,k.localize)(5,null),sound:L.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),D.onDebugBreak=D.register({name:(0,k.localize)(6,null),sound:L.break,settingsKey:"audioCues.onDebugBreak"}),D.noInlayHints=D.register({name:(0,k.localize)(7,null),sound:L.error,settingsKey:"audioCues.noInlayHints"}),D.taskCompleted=D.register({name:(0,k.localize)(8,null),sound:L.taskCompleted,settingsKey:"audioCues.taskCompleted"}),D.taskFailed=D.register({name:(0,k.localize)(9,null),sound:L.taskFailed,settingsKey:"audioCues.taskFailed"}),D.terminalCommandFailed=D.register({name:(0,k.localize)(10,null),sound:L.error,settingsKey:"audioCues.terminalCommandFailed"}),D.terminalBell=D.register({name:(0,k.localize)(11,null),sound:L.terminalBell,settingsKey:"audioCues.terminalBell"}),D.notebookCellCompleted=D.register({name:(0,k.localize)(12,null),sound:L.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),D.notebookCellFailed=D.register({name:(0,k.localize)(13,null),sound:L.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),D.diffLineInserted=D.register({name:(0,k.localize)(14,null),sound:L.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),D.diffLineDeleted=D.register({name:(0,k.localize)(15,null),sound:L.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),D.diffLineModified=D.register({name:(0,k.localize)(16,null),sound:L.diffLineModified,settingsKey:"audioCues.diffLineModified"})}),define(J[97],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,_.createDecorator)("clipboardService")}),define(J[25],ee([1,0,6,53,2,59,18,8]),function(j,e,_,k,L,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 _.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(S,g){if(!S)throw new Error("invalid command");if(typeof S=="string"){if(!g)throw new Error("invalid command");return this.registerCommand({id:S,handler:g})}if(S.description){const n=[];for(const d of S.description.args)n.push(d.constraint);const r=S.handler;S.handler=function(d,...h){return(0,w.validateConstraints)(h,n),r(d,...h)}}const{id:m}=S;let s=this._commands.get(m);s||(s=new D.LinkedList,this._commands.set(m,s));const t=s.unshift(S),i=(0,L.toDisposable)(()=>{t();const n=this._commands.get(m);n?.isEmpty()&&this._commands.delete(m)});return this._onDidRegisterCommand.fire(m),i}registerCommandAlias(S,g){return e.CommandsRegistry.registerCommand(S,(m,...s)=>m.get(e.ICommandService).executeCommand(g,...s))}getCommand(S){const g=this._commands.get(S);if(!(!g||g.isEmpty()))return k.Iterable.first(g)}getCommands(){const S=new Map;for(const g of this._commands.keys()){const m=this.getCommand(g);m&&S.set(g,m)}return S}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(J[318],ee([1,0,20,11,2,18,21,50,25,19]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class m{constructor(){this.lenses=[],this._disposables=new L.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(i,n){this._disposables.add(i);for(const r of i.lenses)this.lenses.push({symbol:r,provider:n})}}e.CodeLensModel=m;function s(t,i,n){return we(this,void 0,void 0,function*(){const r=t.ordered(i),d=new Map,h=new m,o=r.map((c,a)=>we(this,void 0,void 0,function*(){d.set(c,a);try{const l=yield Promise.resolve(c.provideCodeLenses(i,n));l&&h.add(l,c)}catch(l){(0,k.onUnexpectedExternalError)(l)}}));return yield Promise.all(o),h.lenses=h.lenses.sort((c,a)=>c.symbol.range.startLineNumber<a.symbol.range.startLineNumber?-1:c.symbol.range.startLineNumber>a.symbol.range.startLineNumber?1:d.get(c.provider)<d.get(a.provider)?-1:d.get(c.provider)>d.get(a.provider)?1:c.symbol.range.startColumn<a.symbol.range.startColumn?-1:c.symbol.range.startColumn>a.symbol.range.startColumn?1:0),h})}e.getCodeLensModel=s,S.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(t,...i){let[n,r]=i;(0,D.assertType)(w.URI.isUri(n)),(0,D.assertType)(typeof r=="number"||!r);const{codeLensProvider:d}=t.get(g.ILanguageFeaturesService),h=t.get(b.IModelService).getModel(n);if(!h)throw(0,k.illegalArgument)();const o=[],c=new L.DisposableStore;return s(d,h,_.CancellationToken.None).then(a=>{c.add(a);const l=[];for(const u of a.lenses)r==null||u.symbol.command?o.push(u.symbol):r-- >0&&u.provider.resolveCodeLens&&l.push(Promise.resolve(u.provider.resolveCodeLens(h,u.symbol,_.CancellationToken.None)).then(v=>o.push(v||u.symbol)));return Promise.all(l)}).then(()=>o).finally(()=>{setTimeout(()=>c.dispose(),100)})})}),define(J[722],ee([1,0,16,20,11,2,18,21,5,50,25,19]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class t{constructor(d,h){this._link=d,this._provider=h}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(d){return we(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,d)).then(h=>(this._link=h||this._link,this._link.url?this.resolve(d):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}e.Link=t;class i{constructor(d){this._disposables=new D.DisposableStore;let h=[];for(const[o,c]of d){const a=o.links.map(l=>new t(l,c));h=i._union(h,a),(0,D.isDisposable)(o)&&this._disposables.add(o)}this.links=h}dispose(){this._disposables.dispose(),this.links.length=0}static _union(d,h){const o=[];let c,a,l,u;for(c=0,l=0,a=d.length,u=h.length;c<a&&l<u;){const v=d[c],f=h[l];if(S.Range.areIntersectingOrTouching(v.range,f.range)){c++;continue}S.Range.compareRangesUsingStarts(v.range,f.range)<0?(o.push(v),c++):(o.push(f),l++)}for(;c<a;c++)o.push(d[c]);for(;l<u;l++)o.push(h[l]);return o}}e.LinksList=i;function n(r,d,h){const o=[],c=r.ordered(d).reverse().map((a,l)=>Promise.resolve(a.provideLinks(d,h)).then(u=>{u&&(o[l]=[u,a])},L.onUnexpectedExternalError));return Promise.all(c).then(()=>{const a=new i((0,_.coalesce)(o));return h.isCancellationRequested?(a.dispose(),new i([])):a})}e.getLinks=n,m.CommandsRegistry.registerCommand("_executeLinkProvider",(r,...d)=>we(void 0,void 0,void 0,function*(){let[h,o]=d;(0,w.assertType)(h instanceof b.URI),typeof o!="number"&&(o=0);const{linkProvider:c}=r.get(s.ILanguageFeaturesService),a=r.get(g.IModelService).getModel(h);if(!a)return[];const l=yield n(c,a,k.CancellationToken.None);if(!l)return[];for(let v=0;v<Math.min(o,l.links.length);v++)yield l.links[v].resolve(k.CancellationToken.None);const u=l.links.slice(0);return l.dispose(),u}))}),define(J[319],ee([1,0,20,11,21,50,25,18,579,5,19]),function(j,e,_,k,L,D,w,b,S,g,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 s(u){return u&&!!u.data}e.isSemanticTokens=s;function t(u){return u&&Array.isArray(u.edits)}e.isSemanticTokensEdits=t;class i{constructor(v,f,p){this.provider=v,this.tokens=f,this.error=p}}e.DocumentSemanticTokensResult=i;function n(u,v){return u.has(v)}e.hasDocumentSemanticTokensProvider=n;function r(u,v){const f=u.orderedGroups(v);return f.length>0?f[0]:[]}function d(u,v,f,p,C){return we(this,void 0,void 0,function*(){const y=r(u,v),E=yield Promise.all(y.map(I=>we(this,void 0,void 0,function*(){let T,O=null;try{T=yield I.provideDocumentSemanticTokens(v,I===f?p:null,C)}catch(R){O=R,T=null}return(!T||!s(T)&&!t(T))&&(T=null),new i(I,T,O)})));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=d;function h(u,v){const f=u.orderedGroups(v);return f.length>0?f[0]:null}class o{constructor(v,f){this.provider=v,this.tokens=f}}function c(u,v){return u.has(v)}e.hasDocumentRangeSemanticTokensProvider=c;function a(u,v){const f=u.orderedGroups(v);return f.length>0?f[0]:[]}function l(u,v,f,p){return we(this,void 0,void 0,function*(){const C=a(u,v),y=yield Promise.all(C.map(E=>we(this,void 0,void 0,function*(){let I;try{I=yield E.provideDocumentRangeSemanticTokens(v,f,p)}catch(T){(0,k.onUnexpectedExternalError)(T),I=null}return(!I||!s(I))&&(I=null),new o(E,I)})));for(const E of y)if(E.tokens)return E;return y.length>0?y[0]:null})}e.getDocumentRangeSemanticTokens=l,w.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",(u,...v)=>we(void 0,void 0,void 0,function*(){const[f]=v;(0,b.assertType)(f instanceof L.URI);const p=u.get(D.IModelService).getModel(f);if(!p)return;const{documentSemanticTokensProvider:C}=u.get(m.ILanguageFeaturesService),y=h(C,p);return y?y[0].getLegend():u.get(w.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",f)})),w.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",(u,...v)=>we(void 0,void 0,void 0,function*(){const[f]=v;(0,b.assertType)(f instanceof L.URI);const p=u.get(D.IModelService).getModel(f);if(!p)return;const{documentSemanticTokensProvider:C}=u.get(m.ILanguageFeaturesService);if(!n(C,p))return u.get(w.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",f,p.getFullModelRange());const y=yield d(C,p,null,null,_.CancellationToken.None);if(!y)return;const{provider:E,tokens:I}=y;if(!I||!s(I))return;const T=(0,S.encodeSemanticTokensDto)({id:0,type:"full",data:I.data});return I.resultId&&E.releaseDocumentSemanticTokens(I.resultId),T})),w.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",(u,...v)=>we(void 0,void 0,void 0,function*(){const[f,p]=v;(0,b.assertType)(f instanceof L.URI);const C=u.get(D.IModelService).getModel(f);if(!C)return;const{documentRangeSemanticTokensProvider:y}=u.get(m.ILanguageFeaturesService),E=a(y,C);if(E.length===0)return;if(E.length===1)return E[0].getLegend();if(!p||!g.Range.isIRange(p))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),E[0].getLegend();const I=yield l(y,C,g.Range.lift(p),_.CancellationToken.None);if(I)return I.provider.getLegend()})),w.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",(u,...v)=>we(void 0,void 0,void 0,function*(){const[f,p]=v;(0,b.assertType)(f instanceof L.URI),(0,b.assertType)(g.Range.isIRange(p));const C=u.get(D.IModelService).getModel(f);if(!C)return;const{documentRangeSemanticTokensProvider:y}=u.get(m.ILanguageFeaturesService),E=yield l(y,C,g.Range.lift(p),_.CancellationToken.None);if(!(!E||!E.tokens))return(0,S.encodeSemanticTokensDto)({id:0,type:"full",data:E.tokens.data})}))}),define(J[28],ee([1,0,8]),function(j,e,_){"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,_.createDecorator)("configurationService");function k(g,m){const s=Object.create(null);for(const t in g)L(s,t,g[t],m);return s}e.toValuesTree=k;function L(g,m,s,t){const i=m.split("."),n=i.pop();let r=g;for(let d=0;d<i.length;d++){const h=i[d];let o=r[h];switch(typeof o){case"undefined":o=r[h]=Object.create(null);break;case"object":break;default:t(`Ignoring ${m} as ${i.slice(0,d+1).join(".")} is ${JSON.stringify(o)}`);return}r=o}if(typeof r=="object"&&r!==null)try{r[n]=s}catch{t(`Ignoring ${m} as ${i.join(".")} is ${JSON.stringify(r)}`)}else t(`Ignoring ${m} as ${i.join(".")} is ${JSON.stringify(r)}`)}e.addToValueTree=L;function D(g,m){const s=m.split(".");w(g,s)}e.removeFromValueTree=D;function w(g,m){const s=m.shift();if(m.length===0){delete g[s];return}if(Object.keys(g).indexOf(s)!==-1){const t=g[s];typeof t=="object"&&!Array.isArray(t)&&(w(t,m),Object.keys(t).length===0&&delete g[s])}}function b(g,m,s){function t(r,d){let h=r;for(const o of d){if(typeof h!="object"||h===null)return;h=h[o]}return h}const i=m.split("."),n=t(g,i);return typeof n>"u"?s:n}e.getConfigurationValue=b;function S(g){return g.replace(/[\\[\\]]/g,"")}e.getLanguageTagSettingPlainKey=S}),define(J[320],ee([1,0,27,152,288,28]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonarchTokenizer=void 0;const w=5;class b{static create(h,o){return this._INSTANCE.create(h,o)}constructor(h){this._maxCacheDepth=h,this._entries=Object.create(null)}create(h,o){if(h!==null&&h.depth>=this._maxCacheDepth)return new S(h,o);let c=S.getStackElementId(h);c.length>0&&(c+="|"),c+=o;let a=this._entries[c];return a||(a=new S(h,o),this._entries[c]=a,a)}}b._INSTANCE=new b(w);class S{constructor(h,o){this.parent=h,this.state=o,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(h){let o="";for(;h!==null;)o.length>0&&(o+="|"),o+=h.state,h=h.parent;return o}static _equals(h,o){for(;h!==null&&o!==null;){if(h===o)return!0;if(h.state!==o.state)return!1;h=h.parent,o=o.parent}return h===null&&o===null}equals(h){return S._equals(this,h)}push(h){return b.create(this,h)}pop(){return this.parent}popall(){let h=this;for(;h.parent;)h=h.parent;return h}switchTo(h){return b.create(this.parent,h)}}class g{constructor(h,o){this.languageId=h,this.state=o}equals(h){return this.languageId===h.languageId&&this.state.equals(h.state)}clone(){return this.state.clone()===this.state?this:new g(this.languageId,this.state)}}class m{static create(h,o){return this._INSTANCE.create(h,o)}constructor(h){this._maxCacheDepth=h,this._entries=Object.create(null)}create(h,o){if(o!==null)return new s(h,o);if(h!==null&&h.depth>=this._maxCacheDepth)return new s(h,o);const c=S.getStackElementId(h);let a=this._entries[c];return a||(a=new s(h,null),this._entries[c]=a,a)}}m._INSTANCE=new m(w);class s{constructor(h,o){this.stack=h,this.embeddedLanguageData=o}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:m.create(this.stack,this.embeddedLanguageData)}equals(h){return!(h instanceof s)||!this.stack.equals(h.stack)?!1:this.embeddedLanguageData===null&&h.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||h.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(h.embeddedLanguageData)}}class t{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(h){this._languageId=h}emit(h,o){this._lastTokenType===o&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=o,this._lastTokenLanguage=this._languageId,this._tokens.push(new _.Token(h,o,this._languageId)))}nestedLanguageTokenize(h,o,c,a){const l=c.languageId,u=c.state,v=_.TokenizationRegistry.get(l);if(!v)return this.enterLanguage(l),this.emit(a,""),u;const f=v.tokenize(h,o,u);if(a!==0)for(const p of f.tokens)this._tokens.push(new _.Token(p.offset+a,p.type,p.language));else this._tokens=this._tokens.concat(f.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,f.endState}finalize(h){return new _.TokenizationResult(this._tokens,h)}}class i{constructor(h,o){this._languageService=h,this._theme=o,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(h){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(h)}emit(h,o){const c=this._theme.match(this._currentLanguageId,o)|1024;this._lastTokenMetadata!==c&&(this._lastTokenMetadata=c,this._tokens.push(h),this._tokens.push(c))}static _merge(h,o,c){const a=h!==null?h.length:0,l=o.length,u=c!==null?c.length:0;if(a===0&&l===0&&u===0)return new Uint32Array(0);if(a===0&&l===0)return c;if(l===0&&u===0)return h;const v=new Uint32Array(a+l+u);h!==null&&v.set(h);for(let f=0;f<l;f++)v[a+f]=o[f];return c!==null&&v.set(c,a+l),v}nestedLanguageTokenize(h,o,c,a){const l=c.languageId,u=c.state,v=_.TokenizationRegistry.get(l);if(!v)return this.enterLanguage(l),this.emit(a,""),u;const f=v.tokenizeEncoded(h,o,u);if(a!==0)for(let p=0,C=f.tokens.length;p<C;p+=2)f.tokens[p]+=a;return this._prependTokens=i._merge(this._prependTokens,this._tokens,f.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,f.endState}finalize(h){return new _.EncodedTokenizationResult(i._merge(this._prependTokens,this._tokens,null),h)}}let n=e.MonarchTokenizer=class Ai{constructor(h,o,c,a,l){this._configurationService=l,this._languageService=h,this._standaloneThemeService=o,this._languageId=c,this._lexer=a,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let u=!1;this._tokenizationRegistryListener=_.TokenizationRegistry.onDidChange(v=>{if(u)return;let f=!1;for(let p=0,C=v.changedLanguages.length;p<C;p++){const y=v.changedLanguages[p];if(this._embeddedLanguages[y]){f=!0;break}}f&&(u=!0,_.TokenizationRegistry.handleChange([this._languageId]),u=!1)}),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._configurationService.onDidChangeConfiguration(v=>{v.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const h=[];for(const o in this._embeddedLanguages){const c=_.TokenizationRegistry.get(o);if(c){if(c instanceof Ai){const a=c.getLoadStatus();a.loaded===!1&&h.push(a.promise)}continue}_.TokenizationRegistry.isResolved(o)||h.push(_.TokenizationRegistry.getOrCreate(o))}return h.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(h).then(o=>{})}}getInitialState(){const h=b.create(null,this._lexer.start);return m.create(h,null)}tokenize(h,o,c){if(h.length>=this._maxTokenizationLineLength)return(0,k.nullTokenize)(this._languageId,c);const a=new t,l=this._tokenize(h,o,c,a);return a.finalize(l)}tokenizeEncoded(h,o,c){if(h.length>=this._maxTokenizationLineLength)return(0,k.nullTokenizeEncoded)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),c);const a=new i(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),l=this._tokenize(h,o,c,a);return a.finalize(l)}_tokenize(h,o,c,a){return c.embeddedLanguageData?this._nestedTokenize(h,o,c,0,a):this._myTokenize(h,o,c,0,a)}_findLeavingNestedLanguageOffset(h,o){let c=this._lexer.tokenizer[o.stack.state];if(!c&&(c=L.findRules(this._lexer,o.stack.state),!c))throw L.createError(this._lexer,"tokenizer state is not defined: "+o.stack.state);let a=-1,l=!1;for(const u of c){if(!L.isIAction(u.action)||u.action.nextEmbedded!=="@pop")continue;l=!0;let v=u.regex;const f=u.regex.source;if(f.substr(0,4)==="^(?:"&&f.substr(f.length-1,1)===")"){const C=(v.ignoreCase?"i":"")+(v.unicode?"u":"");v=new RegExp(f.substr(4,f.length-5),C)}const p=h.search(v);p===-1||p!==0&&u.matchOnlyAtLineStart||(a===-1||p<a)&&(a=p)}if(!l)throw L.createError(this._lexer,\'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: \'+o.stack.state);return a}_nestedTokenize(h,o,c,a,l){const u=this._findLeavingNestedLanguageOffset(h,c);if(u===-1){const p=l.nestedLanguageTokenize(h,o,c.embeddedLanguageData,a);return m.create(c.stack,new g(c.embeddedLanguageData.languageId,p))}const v=h.substring(0,u);v.length>0&&l.nestedLanguageTokenize(v,!1,c.embeddedLanguageData,a);const f=h.substring(u);return this._myTokenize(f,o,c,a+u,l)}_safeRuleName(h){return h?h.name:"(unknown)"}_myTokenize(h,o,c,a,l){l.enterLanguage(this._languageId);const u=h.length,v=o&&this._lexer.includeLF?h+`\n`:h,f=v.length;let p=c.embeddedLanguageData,C=c.stack,y=0,E=null,I=!0;for(;I||y<f;){const T=y,O=C.depth,R=E?E.groups.length:0,M=C.state;let N=null,P=null,x=null,F=null,B=null;if(E){N=E.matches;const A=E.groups.shift();P=A.matched,x=A.action,F=E.rule,E.groups.length===0&&(E=null)}else{if(!I&&y>=f)break;I=!1;let A=this._lexer.tokenizer[M];if(!A&&(A=L.findRules(this._lexer,M),!A))throw L.createError(this._lexer,"tokenizer state is not defined: "+M);const Y=v.substr(y);for(const ie of A)if((y===0||!ie.matchOnlyAtLineStart)&&(N=Y.match(ie.regex),N)){P=N[0],x=ie.action;break}}if(N||(N=[""],P=""),x||(y<f&&(N=[v.charAt(y)],P=N[0]),x=this._lexer.defaultToken),P===null)break;for(y+=P.length;L.isFuzzyAction(x)&&L.isIAction(x)&&x.test;)x=x.test(P,N,M,y===f);let V=null;if(typeof x=="string"||Array.isArray(x))V=x;else if(x.group)V=x.group;else if(x.token!==null&&x.token!==void 0){if(x.tokenSubst?V=L.substituteMatches(this._lexer,x.token,P,N,M):V=x.token,x.nextEmbedded)if(x.nextEmbedded==="@pop"){if(!p)throw L.createError(this._lexer,"cannot pop embedded language if not inside one");p=null}else{if(p)throw L.createError(this._lexer,"cannot enter embedded language from within an embedded language");B=L.substituteMatches(this._lexer,x.nextEmbedded,P,N,M)}if(x.goBack&&(y=Math.max(0,y-x.goBack)),x.switchTo&&typeof x.switchTo=="string"){let A=L.substituteMatches(this._lexer,x.switchTo,P,N,M);if(A[0]==="@"&&(A=A.substr(1)),L.findRules(this._lexer,A))C=C.switchTo(A);else throw L.createError(this._lexer,"trying to switch to a state \'"+A+"\' that is undefined in rule: "+this._safeRuleName(F))}else{if(x.transform&&typeof x.transform=="function")throw L.createError(this._lexer,"action.transform not supported");if(x.next)if(x.next==="@push"){if(C.depth>=this._lexer.maxStack)throw L.createError(this._lexer,"maximum tokenizer stack size reached: ["+C.state+","+C.parent.state+",...]");C=C.push(M)}else if(x.next==="@pop"){if(C.depth<=1)throw L.createError(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(F));C=C.pop()}else if(x.next==="@popall")C=C.popall();else{let A=L.substituteMatches(this._lexer,x.next,P,N,M);if(A[0]==="@"&&(A=A.substr(1)),L.findRules(this._lexer,A))C=C.push(A);else throw L.createError(this._lexer,"trying to set a next state \'"+A+"\' that is undefined in rule: "+this._safeRuleName(F))}}x.log&&typeof x.log=="string"&&L.log(this._lexer,this._lexer.languageId+": "+L.substituteMatches(this._lexer,x.log,P,N,M))}if(V===null)throw L.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(F));const K=A=>{const Y=this._languageService.getLanguageIdByLanguageName(A)||this._languageService.getLanguageIdByMimeType(A)||A,ie=this._getNestedEmbeddedLanguageData(Y);if(y<f){const le=h.substr(y);return this._nestedTokenize(le,o,m.create(C,ie),a+y,l)}else return m.create(C,ie)};if(Array.isArray(V)){if(E&&E.groups.length>0)throw L.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(F));if(N.length!==V.length+1)throw L.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(F));let A=0;for(let Y=1;Y<N.length;Y++)A+=N[Y].length;if(A!==P.length)throw L.createError(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(F));E={rule:F,matches:N,groups:[]};for(let Y=0;Y<V.length;Y++)E.groups[Y]={action:V[Y],matched:N[Y+1]};y-=P.length;continue}else{if(V==="@rematch"&&(y-=P.length,P="",N=null,V="",B!==null))return K(B);if(P.length===0){if(f===0||O!==C.depth||M!==C.state||(E?E.groups.length:0)!==R)continue;throw L.createError(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(F))}let A=null;if(L.isString(V)&&V.indexOf("@brackets")===0){const Y=V.substr(9),ie=r(this._lexer,P);if(!ie)throw L.createError(this._lexer,"@brackets token returned but no bracket defined as: "+P);A=L.sanitize(ie.token+Y)}else{const Y=V===""?"":V+this._lexer.tokenPostfix;A=L.sanitize(Y)}T<u&&l.emit(T+a,A)}if(B!==null)return K(B)}return m.create(C,p)}_getNestedEmbeddedLanguageData(h){if(!this._languageService.isRegisteredLanguageId(h))return new g(h,k.NullState);h!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(h),_.TokenizationRegistry.getOrCreate(h),this._embeddedLanguages[h]=!0);const o=_.TokenizationRegistry.get(h);return o?new g(h,o.getInitialState()):new g(h,k.NullState)}};e.MonarchTokenizer=n=Te([ge(4,D.IConfigurationService)],n);function r(d,h){if(!h)return null;h=L.fixCase(d,h);const o=d.brackets;for(const c of o){if(c.open===h)return{token:c.token,bracketType:1};if(c.close===h)return{token:c.token,bracketType:-1}}return null}}),define(J[723],ee([1,0,86,9,27,89,110,83,320]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Colorizer=void 0;const g=(0,_.createTrustedTypesPolicy)("standaloneColorizer",{createHTML:n=>n});class m{static colorizeElement(r,d,h,o){o=o||{};const c=o.theme||"vs",a=o.mimeType||h.getAttribute("lang")||h.getAttribute("data-lang");if(!a)return console.error("Mode not detected"),Promise.resolve();const l=d.getLanguageIdByMimeType(a)||a;r.setTheme(c);const u=h.firstChild?h.firstChild.nodeValue:"";h.className+=" "+c;const v=f=>{var p;const C=(p=g?.createHTML(f))!==null&&p!==void 0?p:f;h.innerHTML=C};return this.colorize(d,u||"",l,o).then(v,f=>console.error(f))}static colorize(r,d,h,o){return we(this,void 0,void 0,function*(){const c=r.languageIdCodec;let a=4;o&&typeof o.tabSize=="number"&&(a=o.tabSize),k.startsWithUTF8BOM(d)&&(d=d.substr(1));const l=k.splitLines(d);if(!r.isRegisteredLanguageId(h))return t(l,a,c);const u=yield L.TokenizationRegistry.getOrCreate(h);return u?s(l,a,u,c):t(l,a,c)})}static colorizeLine(r,d,h,o,c=4){const a=b.ViewLineRenderingData.isBasicASCII(r,d),l=b.ViewLineRenderingData.containsRTL(r,a,h);return(0,w.renderViewLine2)(new w.RenderLineInput(!1,!0,r,!1,a,l,0,o,[],c,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(r,d,h=4){const o=r.getLineContent(d);r.tokenization.forceTokenization(d);const a=r.tokenization.getLineTokens(d).inflate();return this.colorizeLine(o,r.mightContainNonBasicASCII(),r.mightContainRTL(),a,h)}}e.Colorizer=m;function s(n,r,d,h){return new Promise((o,c)=>{const a=()=>{const l=i(n,r,d,h);if(d instanceof S.MonarchTokenizer){const u=d.getLoadStatus();if(u.loaded===!1){u.promise.then(a,c);return}}o(l)};a()})}function t(n,r,d){let h=[];const c=new Uint32Array(2);c[0]=0,c[1]=33587200;for(let a=0,l=n.length;a<l;a++){const u=n[a];c[0]=u.length;const v=new D.LineTokens(c,u,d),f=b.ViewLineRenderingData.isBasicASCII(u,!0),p=b.ViewLineRenderingData.containsRTL(u,f,!0),C=(0,w.renderViewLine2)(new w.RenderLineInput(!1,!0,u,!1,f,p,0,v,[],r,0,0,0,0,-1,"none",!1,!1,null));h=h.concat(C.html),h.push("<br/>")}return h.join("")}function i(n,r,d,h){let o=[],c=d.getInitialState();for(let a=0,l=n.length;a<l;a++){const u=n[a],v=d.tokenizeEncoded(u,!0,c);D.LineTokens.convertToEndOffset(v.tokens,u.length);const f=new D.LineTokens(v.tokens,u,h),p=b.ViewLineRenderingData.isBasicASCII(u,!0),C=b.ViewLineRenderingData.containsRTL(u,p,!0),y=(0,w.renderViewLine2)(new w.RenderLineInput(!1,!0,u,!1,p,C,0,f.inflate(),[],r,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(y.html),o.push("<br/>"),c=v.endState}return o.join("")}}),define(J[13],ee([1,0,17,9,713,8,695]),function(j,e,_,k,L,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",_.isMacintosh),b.set("isLinux",_.isLinux),b.set("isWindows",_.isWindows),b.set("isWeb",_.isWeb),b.set("isMacNative",_.isMacintosh&&!_.isWeb),b.set("isEdge",_.isEdge),b.set("isFirefox",_.isFirefox),b.set("isChrome",_.isChrome),b.set("isSafari",_.isSafari);const S=Object.prototype.hasOwnProperty,g={regexParsingWithErrorRecovery:!0},m=(0,w.localize)(0,null),s=(0,w.localize)(1,null),t=(0,w.localize)(2,null),i=(0,w.localize)(3,null),n=(0,w.localize)(4,null),r=(0,w.localize)(5,null),d=(0,w.localize)(6,null),h=(0,w.localize)(7,null);class o{constructor(H=g){this._config=H,this._scanner=new L.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:s});return}this._tokens=this._scanner.reset(H).scan(),this._current=0,this._parsingErrors=[];try{const W=this._expr();if(!this._isAtEnd()){const $=this._peek(),Z=$.type===17?r:void 0;throw this._parsingErrors.push({message:n,offset:$.offset,lexeme:L.Scanner.getLexeme($),additionalInfo:Z}),o._parseError}return W}catch(W){if(W!==o._parseError)throw W;return}}_expr(){return this._or()}_or(){const H=[this._and()];for(;this._matchOne(16);){const W=this._and();H.push(W)}return H.length===1?H[0]:c.or(...H)}_and(){const H=[this._term()];for(;this._matchOne(15);){const W=this._term();H.push(W)}return H.length===1?H[0]:c.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(),v.INSTANCE;case 0:{this._advance();const W=this._expr();return this._consume(1,i),W?.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(),c.true();case 12:return this._advance(),c.false();case 0:{this._advance();const W=this._expr();return this._consume(1,i),W}case 17:{const W=H.lexeme;if(this._advance(),this._matchOne(9)){const Z=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),Z.type!==10)throw this._errExpectedButGot("REGEX",Z);const Q=Z.lexeme,re=Q.lastIndexOf("/"),ce=re===Q.length-1?void 0:this._removeFlagsGY(Q.substring(re+1));let he;try{he=new RegExp(Q.substring(1,re),ce)}catch{throw this._errExpectedButGot("REGEX",Z)}return P.create(W,he)}switch(Z.type){case 10:case 19:{const Q=[Z.lexeme];this._advance();let re=this._peek(),ce=0;for(let z=0;z<Z.lexeme.length;z++)Z.lexeme.charCodeAt(z)===40?ce++:Z.lexeme.charCodeAt(z)===41&&ce--;for(;!this._isAtEnd()&&re.type!==15&&re.type!==16;){switch(re.type){case 0:ce++;break;case 1:ce--;break;case 10:case 18:for(let z=0;z<re.lexeme.length;z++)re.lexeme.charCodeAt(z)===40?ce++:Z.lexeme.charCodeAt(z)===41&&ce--}if(ce<0)break;Q.push(L.Scanner.getLexeme(re)),this._advance(),re=this._peek()}const he=Q.join(""),de=he.lastIndexOf("/"),ue=de===he.length-1?void 0:this._removeFlagsGY(he.substring(de+1));let q;try{q=new RegExp(he.substring(1,de),ue)}catch{throw this._errExpectedButGot("REGEX",Z)}return c.regex(W,q)}case 18:{const Q=Z.lexeme;this._advance();let re=null;if(!(0,k.isFalsyOrWhitespace)(Q)){const ce=Q.indexOf("/"),he=Q.lastIndexOf("/");if(ce!==he&&ce>=0){const de=Q.slice(ce+1,he),ue=Q[he+1]==="i"?"i":"";try{re=new RegExp(de,ue)}catch{throw this._errExpectedButGot("REGEX",Z)}}}if(re===null)throw this._errExpectedButGot("REGEX",Z);return P.create(W,re)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,t);const Z=this._value();return c.notIn(W,Z)}switch(this._peek().type){case 3:{this._advance();const Z=this._value();if(this._previous().type===18)return c.equals(W,Z);switch(Z){case"true":return c.has(W);case"false":return c.not(W);default:return c.equals(W,Z)}}case 4:{this._advance();const Z=this._value();if(this._previous().type===18)return c.notEquals(W,Z);switch(Z){case"true":return c.not(W);case"false":return c.has(W);default:return c.notEquals(W,Z)}}case 5:return this._advance(),M.create(W,this._value());case 6:return this._advance(),N.create(W,this._value());case 7:return this._advance(),O.create(W,this._value());case 8:return this._advance(),R.create(W,this._value());case 13:return this._advance(),c.in(W,this._value());default:return c.has(W)}}case 20:throw this._parsingErrors.push({message:d,offset:H.offset,lexeme:"",additionalInfo:h}),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,W){if(this._check(H))return this._advance();throw this._errExpectedButGot(W,this._peek())}_errExpectedButGot(H,W,$){const Z=(0,w.localize)(8,null,H,L.Scanner.getLexeme(W)),Q=W.offset,re=L.Scanner.getLexeme(W);return this._parsingErrors.push({message:Z,offset:Q,lexeme:re,additionalInfo:$}),o._parseError}_check(H){return this._peek().type===H}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}e.Parser=o,o._parseError=new Error;class c{static false(){return u.INSTANCE}static true(){return v.INSTANCE}static has(H){return f.create(H)}static equals(H,W){return p.create(H,W)}static notEquals(H,W){return E.create(H,W)}static regex(H,W){return P.create(H,W)}static in(H,W){return C.create(H,W)}static notIn(H,W){return y.create(H,W)}static not(H){return I.create(H)}static and(...H){return B.create(H,null,!0)}static or(...H){return V.create(H,null,!0)}static deserialize(H){return H==null?void 0:this._parser.parse(H)}}e.ContextKeyExpr=c,c._parser=new o({regexParsingWithErrorRecovery:!1});function a(se,H){const W=se?se.substituteConstants():void 0,$=H?H.substituteConstants():void 0;return!W&&!$?!0:!W||!$?!1:W.equals($)}e.expressionsAreEqualWithConstantSubstitution=a;function l(se,H){return se.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 v.INSTANCE}}e.ContextKeyFalseExpr=u,u.INSTANCE=new u;class v{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}}e.ContextKeyTrueExpr=v,v.INSTANCE=new v;class f{static create(H,W=null){const $=b.get(H);return typeof $=="boolean"?$?v.INSTANCE:u.INSTANCE:new f(H,W)}constructor(H,W){this.key=H,this.negated=W,this.type=2}cmp(H){return H.type!==this.type?this.type-H.type:A(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?v.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 p{static create(H,W,$=null){if(typeof W=="boolean")return W?f.create(H,$):I.create(H,$);const Z=b.get(H);return typeof Z=="boolean"?W===(Z?"true":"false")?v.INSTANCE:u.INSTANCE:new p(H,W,$)}constructor(H,W,$){this.key=H,this.value=W,this.negated=$,this.type=4}cmp(H){return H.type!==this.type?this.type-H.type:Y(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 W=H?"true":"false";return this.value===W?v.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=p;class C{static create(H,W){return new C(H,W)}constructor(H,W){this.key=H,this.valueKey=W,this.type=10,this.negated=null}cmp(H){return H.type!==this.type?this.type-H.type:Y(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 W=H.getValue(this.valueKey),$=H.getValue(this.key);return Array.isArray(W)?W.includes($):typeof $=="string"&&typeof W=="object"&&W!==null?S.call(W,$):!1}serialize(){return`${this.key} in \'${this.valueKey}\'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=y.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=C;class y{static create(H,W){return new y(H,W)}constructor(H,W){this.key=H,this.valueKey=W,this.type=11,this._negated=C.create(H,W)}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=y;class E{static create(H,W,$=null){if(typeof W=="boolean")return W?I.create(H,$):f.create(H,$);const Z=b.get(H);return typeof Z=="boolean"?W===(Z?"true":"false")?u.INSTANCE:v.INSTANCE:new E(H,W,$)}constructor(H,W,$){this.key=H,this.value=W,this.negated=$,this.type=5}cmp(H){return H.type!==this.type?this.type-H.type:Y(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 W=H?"true":"false";return this.value===W?u.INSTANCE:v.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=p.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=E;class I{static create(H,W=null){const $=b.get(H);return typeof $=="boolean"?$?u.INSTANCE:v.INSTANCE:new I(H,W)}constructor(H,W){this.key=H,this.negated=W,this.type=3}cmp(H){return H.type!==this.type?this.type-H.type:A(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:v.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(se,H){if(typeof se=="string"){const W=parseFloat(se);isNaN(W)||(se=W)}return typeof se=="string"||typeof se=="number"?H(se):u.INSTANCE}class O{static create(H,W,$=null){return T(W,Z=>new O(H,Z,$))}constructor(H,W,$){this.key=H,this.value=W,this.negated=$,this.type=12}cmp(H){return H.type!==this.type?this.type-H.type:Y(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=O;class R{static create(H,W,$=null){return T(W,Z=>new R(H,Z,$))}constructor(H,W,$){this.key=H,this.value=W,this.negated=$,this.type=13}cmp(H){return H.type!==this.type?this.type-H.type:Y(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,W,$=null){return T(W,Z=>new M(H,Z,$))}constructor(H,W,$){this.key=H,this.value=W,this.negated=$,this.type=14}cmp(H){return H.type!==this.type?this.type-H.type:Y(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,W,$=null){return T(W,Z=>new N(H,Z,$))}constructor(H,W,$){this.key=H,this.value=W,this.negated=$,this.type=15}cmp(H){return H.type!==this.type?this.type-H.type:Y(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=O.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=N;class P{static create(H,W){return new P(H,W)}constructor(H,W){this.key=H,this.regexp=W,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 W=this.regexp?this.regexp.source:"",$=H.regexp?H.regexp.source:"";return W<$?-1:W>$?1:0}equals(H){if(H.type===this.type){const W=this.regexp?this.regexp.source:"",$=H.regexp?H.regexp.source:"";return this.key===H.key&&W===$}return!1}substituteConstants(){return this}evaluate(H){const W=H.getValue(this.key);return this.regexp?this.regexp.test(W):!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=x.create(this)),this.negated}}e.ContextKeyRegexExpr=P;class x{static create(H){return new x(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(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=x;function F(se){let H=null;for(let W=0,$=se.length;W<$;W++){const Z=se[W].substituteConstants();if(se[W]!==Z&&H===null){H=[];for(let Q=0;Q<W;Q++)H[Q]=se[Q]}H!==null&&(H[W]=Z)}return H===null?se:H}class B{static create(H,W,$){return B._normalizeArr(H,W,$)}constructor(H,W){this.expr=H,this.negated=W,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 W=0,$=this.expr.length;W<$;W++){const Z=l(this.expr[W],H.expr[W]);if(Z!==0)return Z}return 0}equals(H){if(H.type===this.type){if(this.expr.length!==H.expr.length)return!1;for(let W=0,$=this.expr.length;W<$;W++)if(!this.expr[W].equals(H.expr[W]))return!1;return!0}return!1}substituteConstants(){const H=F(this.expr);return H===this.expr?this:B.create(H,this.negated,!1)}evaluate(H){for(let W=0,$=this.expr.length;W<$;W++)if(!this.expr[W].evaluate(H))return!1;return!0}static _normalizeArr(H,W,$){const Z=[];let Q=!1;for(const re of H)if(re){if(re.type===1){Q=!0;continue}if(re.type===0)return u.INSTANCE;if(re.type===6){Z.push(...re.expr);continue}Z.push(re)}if(Z.length===0&&Q)return v.INSTANCE;if(Z.length!==0){if(Z.length===1)return Z[0];Z.sort(l);for(let re=1;re<Z.length;re++)Z[re-1].equals(Z[re])&&(Z.splice(re,1),re--);if(Z.length===1)return Z[0];for(;Z.length>1;){const re=Z[Z.length-1];if(re.type!==9)break;Z.pop();const ce=Z.pop(),he=Z.length===0,de=V.create(re.expr.map(ue=>B.create([ue,ce],null,$)),null,he);de&&(Z.push(de),Z.sort(l))}if(Z.length===1)return Z[0];if($){for(let re=0;re<Z.length;re++)for(let ce=re+1;ce<Z.length;ce++)if(Z[re].negate().equals(Z[ce]))return u.INSTANCE;if(Z.length===1)return Z[0]}return new B(Z,W)}}serialize(){return this.expr.map(H=>H.serialize()).join(" && ")}keys(){const H=[];for(const W of this.expr)H.push(...W.keys());return H}negate(){if(!this.negated){const H=[];for(const W of this.expr)H.push(W.negate());this.negated=V.create(H,this,!0)}return this.negated}}e.ContextKeyAndExpr=B;class V{static create(H,W,$){return V._normalizeArr(H,W,$)}constructor(H,W){this.expr=H,this.negated=W,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 W=0,$=this.expr.length;W<$;W++){const Z=l(this.expr[W],H.expr[W]);if(Z!==0)return Z}return 0}equals(H){if(H.type===this.type){if(this.expr.length!==H.expr.length)return!1;for(let W=0,$=this.expr.length;W<$;W++)if(!this.expr[W].equals(H.expr[W]))return!1;return!0}return!1}substituteConstants(){const H=F(this.expr);return H===this.expr?this:V.create(H,this.negated,!1)}evaluate(H){for(let W=0,$=this.expr.length;W<$;W++)if(this.expr[W].evaluate(H))return!0;return!1}static _normalizeArr(H,W,$){let Z=[],Q=!1;if(H){for(let re=0,ce=H.length;re<ce;re++){const he=H[re];if(he){if(he.type===0){Q=!0;continue}if(he.type===1)return v.INSTANCE;if(he.type===9){Z=Z.concat(he.expr);continue}Z.push(he)}}if(Z.length===0&&Q)return u.INSTANCE;Z.sort(l)}if(Z.length!==0){if(Z.length===1)return Z[0];for(let re=1;re<Z.length;re++)Z[re-1].equals(Z[re])&&(Z.splice(re,1),re--);if(Z.length===1)return Z[0];if($){for(let re=0;re<Z.length;re++)for(let ce=re+1;ce<Z.length;ce++)if(Z[re].negate().equals(Z[ce]))return v.INSTANCE;if(Z.length===1)return Z[0]}return new V(Z,W)}}serialize(){return this.expr.map(H=>H.serialize()).join(" || ")}keys(){const H=[];for(const W of this.expr)H.push(...W.keys());return H}negate(){if(!this.negated){const H=[];for(const W of this.expr)H.push(W.negate());for(;H.length>1;){const W=H.shift(),$=H.shift(),Z=[];for(const Q of ne(W))for(const re of ne($))Z.push(B.create([Q,re],null,!1));H.unshift(V.create(Z,null,!1))}this.negated=V.create(H,this,!0)}return this.negated}}e.ContextKeyOrExpr=V;class K extends f{static all(){return K._info.values()}constructor(H,W,$){super(H,null),this._defaultValue=W,typeof $=="object"?K._info.push(Object.assign(Object.assign({},$),{key:H})):$!==!0&&K._info.push({key:H,description:$,type:W!=null?typeof W: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 p.create(this.key,H)}}e.RawContextKey=K,K._info=[],e.IContextKeyService=(0,D.createDecorator)("contextKeyService");function A(se,H){return se<H?-1:se>H?1:0}function Y(se,H,W,$){return se<W?-1:se>W?1:H<$?-1:H>$?1:0}function ie(se,H){if(se.type===0||H.type===1)return!0;if(se.type===9)return H.type===9?le(se.expr,H.expr):!1;if(H.type===9){for(const W of H.expr)if(ie(se,W))return!0;return!1}if(se.type===6){if(H.type===6)return le(H.expr,se.expr);for(const W of se.expr)if(ie(W,H))return!0;return!1}return se.equals(H)}e.implies=ie;function le(se,H){let W=0,$=0;for(;W<se.length&&$<H.length;){const Z=se[W].cmp(H[$]);if(Z<0)return!1;Z===0&&W++,$++}return W===se.length}function ne(se){return se.type===9?se.expr:[se]}}),define(J[22],ee([1,0,601,13]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var L;(function(D){D.editorSimpleInput=new k.RawContextKey("editorSimpleInput",!1,!0),D.editorTextFocus=new k.RawContextKey("editorTextFocus",!1,_.localize(0,null)),D.focus=new k.RawContextKey("editorFocus",!1,_.localize(1,null)),D.textInputFocus=new k.RawContextKey("textInputFocus",!1,_.localize(2,null)),D.readOnly=new k.RawContextKey("editorReadonly",!1,_.localize(3,null)),D.inDiffEditor=new k.RawContextKey("inDiffEditor",!1,_.localize(4,null)),D.isEmbeddedDiffEditor=new k.RawContextKey("isEmbeddedDiffEditor",!1,_.localize(5,null)),D.columnSelection=new k.RawContextKey("editorColumnSelection",!1,_.localize(6,null)),D.writable=D.readOnly.toNegated(),D.hasNonEmptySelection=new k.RawContextKey("editorHasSelection",!1,_.localize(7,null)),D.hasOnlyEmptySelection=D.hasNonEmptySelection.toNegated(),D.hasMultipleSelections=new k.RawContextKey("editorHasMultipleSelections",!1,_.localize(8,null)),D.hasSingleSelection=D.hasMultipleSelections.toNegated(),D.tabMovesFocus=new k.RawContextKey("editorTabMovesFocus",!1,_.localize(9,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,_.localize(10,null)),D.hoverFocused=new k.RawContextKey("editorHoverFocused",!1,_.localize(11,null)),D.stickyScrollFocused=new k.RawContextKey("stickyScrollFocused",!1,_.localize(12,null)),D.stickyScrollVisible=new k.RawContextKey("stickyScrollVisible",!1,_.localize(13,null)),D.standaloneColorPickerVisible=new k.RawContextKey("standaloneColorPickerVisible",!1,_.localize(14,null)),D.standaloneColorPickerFocused=new k.RawContextKey("standaloneColorPickerFocused",!1,_.localize(15,null)),D.inCompositeEditor=new k.RawContextKey("inCompositeEditor",void 0,_.localize(16,null)),D.notInCompositeEditor=D.inCompositeEditor.toNegated(),D.languageId=new k.RawContextKey("editorLangId","",_.localize(17,null)),D.hasCompletionItemProvider=new k.RawContextKey("editorHasCompletionItemProvider",!1,_.localize(18,null)),D.hasCodeActionsProvider=new k.RawContextKey("editorHasCodeActionsProvider",!1,_.localize(19,null)),D.hasCodeLensProvider=new k.RawContextKey("editorHasCodeLensProvider",!1,_.localize(20,null)),D.hasDefinitionProvider=new k.RawContextKey("editorHasDefinitionProvider",!1,_.localize(21,null)),D.hasDeclarationProvider=new k.RawContextKey("editorHasDeclarationProvider",!1,_.localize(22,null)),D.hasImplementationProvider=new k.RawContextKey("editorHasImplementationProvider",!1,_.localize(23,null)),D.hasTypeDefinitionProvider=new k.RawContextKey("editorHasTypeDefinitionProvider",!1,_.localize(24,null)),D.hasHoverProvider=new k.RawContextKey("editorHasHoverProvider",!1,_.localize(25,null)),D.hasDocumentHighlightProvider=new k.RawContextKey("editorHasDocumentHighlightProvider",!1,_.localize(26,null)),D.hasDocumentSymbolProvider=new k.RawContextKey("editorHasDocumentSymbolProvider",!1,_.localize(27,null)),D.hasReferenceProvider=new k.RawContextKey("editorHasReferenceProvider",!1,_.localize(28,null)),D.hasRenameProvider=new k.RawContextKey("editorHasRenameProvider",!1,_.localize(29,null)),D.hasSignatureHelpProvider=new k.RawContextKey("editorHasSignatureHelpProvider",!1,_.localize(30,null)),D.hasInlayHintsProvider=new k.RawContextKey("editorHasInlayHintsProvider",!1,_.localize(31,null)),D.hasDocumentFormattingProvider=new k.RawContextKey("editorHasDocumentFormattingProvider",!1,_.localize(32,null)),D.hasDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,_.localize(33,null)),D.hasMultipleDocumentFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,_.localize(34,null)),D.hasMultipleDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,_.localize(35,null))})(L||(e.EditorContextKeys=L={}))}),define(J[230],ee([1,0,82,9,77,13,2,652]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionContextKeys=void 0;class S extends w.Disposable{constructor(m,s){super(),this.contextKeyService=m,this.model=s,this.inlineCompletionVisible=S.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=S.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=S.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=S.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,_.autorun)("update context key: inlineCompletionVisible, suppressSuggestions",t=>{const i=this.model.read(t),n=i?.selectedInlineCompletion.read(t),r=i?.ghostText.read(t),d=i?.selectedSuggestItem.read(t);this.inlineCompletionVisible.set(d===void 0&&r!==void 0&&!r.isEmpty()),r&&n&&this.suppressSuggestions.set(n.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register((0,_.autorun)("update context key: inlineCompletionSuggestsIndentation, inlineCompletionSuggestsIndentationLessThanTabSize",t=>{const i=this.model.read(t);let n=!1,r=!0;const d=i?.ghostText.read(t);if(i?.selectedSuggestItem&&d&&d.parts.length>0){const{column:h,lines:o}=d.parts[0],c=o[0],a=i.textModel.getLineIndentColumn(d.lineNumber);if(h<=a){let u=(0,k.firstNonWhitespaceIndex)(c);u===-1&&(u=c.length-1),n=u>0;const v=i.textModel.getOptions().tabSize;r=L.CursorColumns.visibleColumnFromColumn(c,u+1,v)<v}}this.inlineCompletionSuggestsIndentation.set(n),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(r)}))}}e.InlineCompletionContextKeys=S,S.inlineSuggestionVisible=new D.RawContextKey("inlineSuggestionVisible",!1,(0,b.localize)(0,null)),S.inlineSuggestionHasIndentation=new D.RawContextKey("inlineSuggestionHasIndentation",!1,(0,b.localize)(1,null)),S.inlineSuggestionHasIndentationLessThanTabSize=new D.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,b.localize)(2,null)),S.suppressSuggestions=new D.RawContextKey("inlineSuggestionSuppressSuggestions",void 0,(0,b.localize)(3,null))}),define(J[231],ee([1,0,20,11,18,21,12,27,19,62,25,13]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new s.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new s.RawContextKey("parameterHintsMultipleSignatures",!1)};function t(i,n,r,d,h){return we(this,void 0,void 0,function*(){const o=i.ordered(n);for(const c of o)try{const a=yield c.provideSignatureHelp(n,r,h,d);if(a)return a}catch(a){(0,k.onUnexpectedExternalError)(a)}})}e.provideSignatureHelp=t,m.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",(i,...n)=>we(void 0,void 0,void 0,function*(){const[r,d,h]=n;(0,L.assertType)(D.URI.isUri(r)),(0,L.assertType)(w.Position.isIPosition(d)),(0,L.assertType)(typeof h=="string"||!h);const o=i.get(S.ILanguageFeaturesService),c=yield i.get(g.ITextModelService).createModelReference(r);try{const a=yield t(o.signatureHelpProvider,c.object.textEditorModel,w.Position.lift(d),{triggerKind:b.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:h},_.CancellationToken.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{c.dispose()}}))}),define(J[724],ee([1,0,14,11,6,2,117,27,231]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var g;(function(t){t.Default={type:0};class i{constructor(d,h){this.request=d,this.previouslyActiveHints=h,this.type=2}}t.Pending=i;class n{constructor(d){this.hints=d,this.type=1}}t.Active=n})(g||(g={}));class m extends D.Disposable{constructor(i,n,r=m.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new L.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=g.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=n,this.throttledDelayer=new _.Delayer(r),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(d=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(d=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(d=>this.onCursorChange(d))),this._register(this.editor.onDidChangeModelContent(d=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(d=>this.onDidType(d))),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=g.Default,this.throttledDelayer.cancel(),i||this._onChangedHints.fire(void 0)}trigger(i,n){const r=this.editor.getModel();if(!r||!this.providers.has(r))return;const d=++this.triggerId;this._pendingTriggers.push(i),this.throttledDelayer.trigger(()=>this.doTrigger(d),n).catch(k.onUnexpectedError)}next(){if(this.state.type!==1)return;const i=this.state.hints.signatures.length,n=this.state.hints.activeSignature,r=n%i===i-1,d=this.editor.getOption(83).cycle;if((i<2||r)&&!d){this.cancel();return}this.updateActiveSignature(r&&d?0:n+1)}previous(){if(this.state.type!==1)return;const i=this.state.hints.signatures.length,n=this.state.hints.activeSignature,r=n===0,d=this.editor.getOption(83).cycle;if((i<2||r)&&!d){this.cancel();return}this.updateActiveSignature(r&&d?i-1:n-1)}updateActiveSignature(i){this.state.type===1&&(this.state=new g.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:i})),this._onChangedHints.fire(this.state.hints))}doTrigger(i){return we(this,void 0,void 0,function*(){const n=this.state.type===1||this.state.type===2,r=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const d=this._pendingTriggers.reduce(s);this._pendingTriggers=[];const h={triggerKind:d.triggerKind,triggerCharacter:d.triggerCharacter,isRetrigger:n,activeSignatureHelp:r};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),c=this.editor.getPosition();this.state=new g.Pending((0,_.createCancelablePromise)(a=>(0,S.provideSignatureHelp)(this.providers,o,c,h,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 g.Active(a.value),this._lastSignatureHelpResult.value=a,this._onChangedHints.fire(this.state.hints),!0)}catch(a){return i===this.triggerId&&(this.state=g.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 n of this.providers.ordered(i)){for(const r of n.signatureHelpTriggerCharacters||[])if(r.length){const d=r.charCodeAt(0);this.triggerChars.add(d),this.retriggerChars.add(d)}for(const r of n.signatureHelpRetriggerCharacters||[])r.length&&this.retriggerChars.add(r.charCodeAt(0))}}onDidType(i){if(!this.triggerOnType)return;const n=i.length-1,r=i.charCodeAt(n);(this.triggerChars.has(r)||this.isTriggered&&this.retriggerChars.has(r))&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:i.charAt(n)})}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(83).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=m,m.DEFAULT_DELAY=120;function s(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[725],ee([1,0,13]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let k=e.SuggestAlternatives=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 S=b;for(let g=w.items.length;g>0&&(S=(S+w.items.length+(D?1:-1))%w.items.length,!(S===b||!w.items[S].completion.additionalTextEdits));g--);return S}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 _.RawContextKey("hasOtherSuggestions",!1),e.SuggestAlternatives=k=Te([ge(1,_.IContextKeyService)],k)}),define(J[726],ee([1,0,13]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let k=e.WordContextKey=class Pi{constructor(D,w){this._editor=D,this._enabled=!1,this._ckAtEnd=Pi.AtEnd.bindTo(w),this._configListener=this._editor.onDidChangeConfiguration(b=>b.hasChanged(119)&&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(119)==="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(),S=this._editor.getSelection(),g=b.getWordAtPosition(S.getStartPosition());if(!g){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(g.endColumn===S.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 _.RawContextKey("atEndOfWord",!1),e.WordContextKey=k=Te([ge(1,_.IContextKeyService)],k)}),define(J[91],ee([1,0,13,8]),function(j,e,_,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 _.RawContextKey("accessibilityModeEnabled",!1)}),define(J[727],ee([1,0,47,16,6,2,45,17,306,314,462,221,41,151,226,91]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let d=e.EditorConfiguration=class extends D.Disposable{constructor(f,p,C,y){super(),this._accessibilityService=y,this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new L.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new t.ComputeOptionsMemory,this.isSimpleWidget=f,this._containerObserver=this._register(new S.ElementSizeObserver(C,p.dimension)),this._rawOptions=u(p),this._validatedOptions=l.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(11)&&this._containerObserver.startObserving(),this._register(i.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(s.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(g.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(_.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const f=this._computeOptions(),p=l.checkEquals(this.options,f);p!==null&&(this.options=f,this._onDidChangeFast.fire(p),this._onDidChange.fire(p))}_computeOptions(){const f=this._readEnvConfiguration(),p=n.BareFontInfo.createFromValidatedSettings(this._validatedOptions,f.pixelRatio,this.isSimpleWidget),C=this._readFontInfo(p),y={memory:this._computeOptionsMemory,outerWidth:f.outerWidth,outerHeight:f.outerHeight-this._reservedHeight,fontInfo:C,extraEditorClassName:f.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:f.emptySelectionClipboard,pixelRatio:f.pixelRatio,tabFocusMode:s.TabFocus.getTabFocusMode("editorFocus"),accessibilitySupport:f.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return l.computeOptions(this._validatedOptions,y)}_readEnvConfiguration(){return{extraEditorClassName:o(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:_.isWebKit||_.isFirefox,pixelRatio:_.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(f){return g.FontMeasurements.readFontInfo(f)}getRawOptions(){return this._rawOptions}updateOptions(f){const p=u(f);l.applyUpdate(this._rawOptions,p)&&(this._validatedOptions=l.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(f){this._containerObserver.observe(f)}setIsDominatedByLongLines(f){this._isDominatedByLongLines!==f&&(this._isDominatedByLongLines=f,this._recomputeOptions())}setModelLineCount(f){const p=h(f);this._lineNumbersDigitCount!==p&&(this._lineNumbersDigitCount=p,this._recomputeOptions())}setViewLineCount(f){this._viewLineCount!==f&&(this._viewLineCount=f,this._recomputeOptions())}setReservedHeight(f){this._reservedHeight!==f&&(this._reservedHeight=f,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(f){this._glyphMarginDecorationLaneCount!==f&&(this._glyphMarginDecorationLaneCount=f,this._recomputeOptions())}};e.EditorConfiguration=d=Te([ge(3,r.IAccessibilityService)],d);function h(v){let f=0;for(;v;)v=Math.floor(v/10),f++;return f||1}function o(){let v="";return!_.isSafari&&!_.isWebkitWebView&&(v+="no-user-select "),_.isSafari&&(v+="no-minimap-shadow ",v+="enable-user-select "),b.isMacintosh&&(v+="mac "),v}class c{constructor(){this._values=[]}_read(f){return this._values[f]}get(f){return this._values[f]}_write(f,p){this._values[f]=p}}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,p){this._values[f]=p}}e.ComputedEditorOptions=a;class l{static validateOptions(f){const p=new c;for(const C of t.editorOptionsRegistry){const y=C.name==="_never_"?void 0:f[C.name];p._write(C.id,C.validate(y))}return p}static computeOptions(f,p){const C=new a;for(const y of t.editorOptionsRegistry)C._write(y.id,y.compute(p,C,f._read(y.id)));return C}static _deepEquals(f,p){if(typeof f!="object"||typeof p!="object"||!f||!p)return f===p;if(Array.isArray(f)||Array.isArray(p))return Array.isArray(f)&&Array.isArray(p)?k.equals(f,p):!1;if(Object.keys(f).length!==Object.keys(p).length)return!1;for(const C in f)if(!l._deepEquals(f[C],p[C]))return!1;return!0}static checkEquals(f,p){const C=[];let y=!1;for(const E of t.editorOptionsRegistry){const I=!l._deepEquals(f._read(E.id),p._read(E.id));C[E.id]=I,I&&(y=!0)}return y?new t.ConfigurationChangedEvent(C):null}static applyUpdate(f,p){let C=!1;for(const y of t.editorOptionsRegistry)if(p.hasOwnProperty(y.name)){const E=y.applyUpdate(f[y.name],p[y.name]);f[y.name]=E.newValue,C=C||E.didChange}return C}}function u(v){const f=w.deepClone(v);return(0,m.migrateOptions)(f),f}}),define(J[232],ee([1,0,81,6,2,45,5,181,32,91]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const m={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0,findResultLoop:!0};let s=e.DiffNavigator=class extends L.Disposable{constructor(i,n={},r,d,h){super(),this._audioCueService=r,this._codeEditorService=d,this._accessibilityService=h,this._onDidUpdate=this._register(new k.Emitter),this._editor=i,this._options=D.mixin(n,m,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=!!this._options.alwaysRevealFirst,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._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(n=>{!this._options.ignoreCharChanges&&n.charChanges?n.charChanges.forEach(r=>{this.ranges.push({rhs:!0,range:new w.Range(r.modifiedStartLineNumber,r.modifiedStartColumn,r.modifiedEndLineNumber,r.modifiedEndColumn)})}):n.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new w.Range(n.modifiedStartLineNumber,1,n.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new w.Range(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber+1,1)})}),this.ranges.sort((n,r)=>w.Range.compareRangesUsingStarts(n.range,r.range)),this._onDidUpdate.fire(this)}_initIdx(i){let n=!1;const r=this._editor.getPosition();if(!r){this.nextIdx=0;return}for(let d=0,h=this.ranges.length;d<h&&!n;d++){const o=this.ranges[d].range;r.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=d+(i?0:-1),n=!0)}n||(this.nextIdx=i?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(i,n){if(_.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 d=r.range.getStartPosition();this._editor.setPosition(d),this._editor.revealRangeInCenter(r.range,n),this._updateAccessibilityState(d.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(i,n){var r;const d=(r=this._editor.getModel())===null||r===void 0?void 0:r.modified;if(!d)return;const h=d.getLineDecorations(i).find(c=>c.options.className==="line-insert");if(h)this._audioCueService.playAudioCue(b.AudioCue.diffLineModified,!0);else if(n)this._audioCueService.playAudioCue(b.AudioCue.diffLineDeleted,!0);else return;const o=this._codeEditorService.getActiveCodeEditor();n&&o&&h&&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}};e.DiffNavigator=s=Te([ge(2,b.IAudioCueService),ge(3,S.ICodeEditorService),ge(4,g.IAccessibilityService)],s)}),define(J[728],ee([1,0,6,53,2,45,192,21,694,25,28,13]),function(j,e,_,k,L,D,w,b,S,g,m,s){"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 n extends i{constructor(){super(-1,null)}setValue(E,I){return!1}removeValue(E){return!1}getValue(E){}}n.INSTANCE=new n;class r extends i{constructor(E,I,T){super(E,null),this._configurationService=I,this._values=w.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(O=>{if(O.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 O.affectedKeys){const N=`config.${M}`,P=this._values.findSuperstr(N);P!==void 0&&(R.push(...k.Iterable.map(P,([x])=>x)),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 O;switch(typeof T){case"number":case"boolean":case"string":O=T;break;default:Array.isArray(T)?O=JSON.stringify(T):O=T}return this._values.set(E,O),O}setValue(E,I){return super.setValue(E,I)}removeValue(E){return super.removeValue(E)}}r._keyPrefix="config.";class d{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 h{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 c{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(y,E){return y.allKeysContainedIn(new Set(Object.keys(E)))}class l{constructor(E){this._onDidChangeContext=new _.PauseableEmitter({merge:I=>new c(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 d(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 v(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 h(E))}removeContext(E){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(E)&&this._onDidChangeContext.fire(new h(E))}getContext(E){return this._isDisposed?n.INSTANCE:this.getContextValuesContainer(f(E))}}e.AbstractContextKeyService=l;let u=e.ContextKeyService=class extends l{constructor(E){super(0),this._contexts=new Map,this._toDispose=new L.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?n.INSTANCE:this._contexts.get(E)||n.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)}};e.ContextKeyService=u=Te([ge(0,m.IConfigurationService)],u);class v extends l{constructor(E,I){if(super(E.createChildContext()),this._parentChangeListener=new L.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?n.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(y){for(;y;){if(y.hasAttribute(t)){const E=y.getAttribute(t);return E?parseInt(E,10):NaN}y=y.parentElement}return 0}function p(y,E,I){y.get(s.IContextKeyService).createKey(String(E),C(I))}e.setContext=p;function C(y){return(0,D.cloneAndChange)(y,E=>{if(typeof E=="object"&&E.$mid===1)return b.URI.revive(E).toString();if(E instanceof b.URI)return E.toString()})}g.CommandsRegistry.registerCommand("_setContext",p),g.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...s.RawContextKey.all()].sort((y,E)=>y.key.localeCompare(E.key))},description:{description:(0,S.localize)(0,null),args:[]}}),g.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const y=[],E=new Set;for(const I of s.RawContextKey.all())E.has(I.key)||(E.add(I.key),y.push(I));y.sort((I,T)=>I.key.localeCompare(T.key)),console.log(JSON.stringify(y,void 0,2))})}),define(J[321],ee([1,0,17,696,13]),function(j,e,_,k,L){"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 L.RawContextKey("isMac",_.isMacintosh,(0,k.localize)(0,null)),e.IsLinuxContext=new L.RawContextKey("isLinux",_.isLinux,(0,k.localize)(1,null)),e.IsWindowsContext=new L.RawContextKey("isWindows",_.isWindows,(0,k.localize)(2,null)),e.IsWebContext=new L.RawContextKey("isWeb",_.isWeb,(0,k.localize)(3,null)),e.IsMacNativeContext=new L.RawContextKey("isMacNative",_.isMacintosh&&!_.isWeb,(0,k.localize)(4,null)),e.IsIOSContext=new L.RawContextKey("isIOS",_.isIOS,(0,k.localize)(5,null)),e.IsMobileContext=new L.RawContextKey("isMobile",_.isMobile,(0,k.localize)(6,null)),e.IsDevelopmentContext=new L.RawContextKey("isDevelopment",!1,!0),e.ProductQualityContext=new L.RawContextKey("productQualityType","",(0,k.localize)(7,null)),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new L.RawContextKey(e.InputFocusedContextKey,!1,(0,k.localize)(8,null))}),define(J[55],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,_.createDecorator)("contextViewService"),e.IContextMenuService=(0,_.createDecorator)("contextMenuService")}),define(J[154],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,_.createDecorator)("dialogService")}),define(J[182],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class _{constructor(...L){this._entries=new Map;for(const[D,w]of L)this.set(D,w)}set(L,D){const w=this._entries.get(L);return this._entries.set(L,D),w}get(L){return this._entries.get(L)}}e.ServiceCollection=_}),define(J[729],ee([1,0,14,11,2,227,717,8,182,59]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const m=!1;class s extends Error{constructor(r){var d;super("cyclic dependency between services"),this.message=(d=r.findCycleSlow())!==null&&d!==void 0?d:`UNABLE to detect cycle, dumping graph: \n${r.toString()}`}}class t{constructor(r=new S.ServiceCollection,d=!1,h,o=m){var c;this._services=r,this._strict=d,this._parent=h,this._enableTracing=o,this._activeInstantiations=new Set,this._services.set(b.IInstantiationService,this),this._globalGraph=o?(c=h?._globalGraph)!==null&&c!==void 0?c:new w.Graph(a=>a):void 0}createChild(r){return new t(r,this._strict,this,this._enableTracing)}invokeFunction(r,...d){const h=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 l=this._getOrCreateServiceInstance(a,h);if(!l)throw new Error(`[invokeFunction] unknown service \'${a}\'`);return l}},...d)}finally{o=!0,h.stop()}}createInstance(r,...d){let h,o;return r instanceof D.SyncDescriptor?(h=i.traceCreation(this._enableTracing,r.ctor),o=this._createInstance(r.ctor,r.staticArguments.concat(d),h)):(h=i.traceCreation(this._enableTracing,r),o=this._createInstance(r,d,h)),h.stop(),o}_createInstance(r,d=[],h){const o=b._util.getServiceDependencies(r).sort((l,u)=>l.index-u.index),c=[];for(const l of o){const u=this._getOrCreateServiceInstance(l.id,h);u||this._throwIfStrict(`[createInstance] ${r.name} depends on UNKNOWN service ${l.id}.`,!1),c.push(u)}const a=o.length>0?o[0].index:d.length;if(d.length!==a){console.trace(`[createInstance] First service dependency of ${r.name} at position ${a+1} conflicts with ${d.length} static arguments`);const l=a-d.length;l>0?d=d.concat(new Array(l)):d=d.slice(0,a)}return Reflect.construct(r,d.concat(c))}_setServiceInstance(r,d){if(this._services.get(r)instanceof D.SyncDescriptor)this._services.set(r,d);else if(this._parent)this._parent._setServiceInstance(r,d);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(r){const d=this._services.get(r);return!d&&this._parent?this._parent._getServiceInstanceOrDescriptor(r):d}_getOrCreateServiceInstance(r,d){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(r));const h=this._getServiceInstanceOrDescriptor(r);return h instanceof D.SyncDescriptor?this._safeCreateAndCacheServiceInstance(r,h,d.branch(r,!0)):(d.branch(r,!1),h)}_safeCreateAndCacheServiceInstance(r,d,h){if(this._activeInstantiations.has(r))throw new Error(`illegal state - RECURSIVELY instantiating service \'${r}\'`);this._activeInstantiations.add(r);try{return this._createAndCacheServiceInstance(r,d,h)}finally{this._activeInstantiations.delete(r)}}_createAndCacheServiceInstance(r,d,h){var o;const c=new w.Graph(u=>u.id.toString());let a=0;const l=[{id:r,desc:d,_trace:h}];for(;l.length;){const u=l.pop();if(c.lookupOrInsertNode(u),a++>1e3)throw new s(c);for(const v of b._util.getServiceDependencies(u.desc.ctor)){const f=this._getServiceInstanceOrDescriptor(v.id);if(f||this._throwIfStrict(`[createInstance] ${r} depends on ${v.id} which is NOT registered.`,!0),(o=this._globalGraph)===null||o===void 0||o.insertEdge(String(u.id),String(v.id)),f instanceof D.SyncDescriptor){const p={id:v.id,desc:f,_trace:u._trace.branch(v.id,!0)};c.insertEdge(u,p),l.push(p)}}}for(;;){const u=c.roots();if(u.length===0){if(!c.isEmpty())throw new s(c);break}for(const{data:v}of u){if(this._getServiceInstanceOrDescriptor(v.id)instanceof D.SyncDescriptor){const p=this._createServiceInstanceWithOwner(v.id,v.desc.ctor,v.desc.staticArguments,v.desc.supportsDelayedInstantiation,v._trace);this._setServiceInstance(v.id,p)}c.removeNode(v)}}return this._getServiceInstanceOrDescriptor(r)}_createServiceInstanceWithOwner(r,d,h=[],o,c){if(this._services.get(r)instanceof D.SyncDescriptor)return this._createServiceInstance(r,d,h,o,c);if(this._parent)return this._parent._createServiceInstanceWithOwner(r,d,h,o,c);throw new Error(`illegalState - creating UNKNOWN service instance ${d.name}`)}_createServiceInstance(r,d,h=[],o,c){if(o){const a=new t(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(r);const l=new Map,u=new _.IdleValue(()=>{const v=a._createInstance(d,h,c);for(const[f,p]of l){const C=v[f];if(typeof C=="function")for(const y of p)C.apply(v,y)}return l.clear(),v});return new Proxy(Object.create(null),{get(v,f){if(!u.isInitialized&&typeof f=="string"&&(f.startsWith("onDid")||f.startsWith("onWill"))){let y=l.get(f);return y||(y=new g.LinkedList,l.set(f,y)),(I,T,O)=>{const R=y.push([I,T,O]);return(0,L.toDisposable)(R)}}if(f in v)return v[f];const p=u.value;let C=p[f];return typeof C!="function"||(C=C.bind(p),v[f]=C),C},set(v,f,p){return u.value[f]=p,!0},getPrototypeOf(v){return d.prototype}})}else return this._createInstance(d,h,c)}_throwIfStrict(r,d){if(d&&console.warn(r),this._strict)throw new Error(r)}}e.InstantiationService=t;class i{static traceInvocation(r,d){return r?new i(2,d.name||new Error().stack.split(`\n`).slice(3,4).join(`\n`)):i._None}static traceCreation(r,d){return r?new i(1,d.name):i._None}constructor(r,d){this.type=r,this.name=d,this._start=Date.now(),this._dep=[]}branch(r,d){const h=new i(3,r.toString());return this._dep.push([r,d,h]),h}stop(){const r=Date.now()-this._start;i._totals+=r;let d=!1;function h(c,a){const l=[],u=new Array(c+1).join("\t");for(const[v,f,p]of a._dep)if(f&&p){d=!0,l.push(`${u}CREATES -> ${v}`);const C=h(c+1,p);C&&l.push(C)}else l.push(`${u}uses -> ${v}`);return l.join(`\n`)}const o=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${h(1,this)}`,`DONE, took ${r.toFixed(2)}ms (grand total ${i._totals.toFixed(2)}ms)`];(r>2||d)&&i.all.add(o.join(`\n`))}}e.Trace=i,i.all=new Set,i._None=new class extends i{constructor(){super(0,null)}stop(){}branch(){return this}},i._totals=0}),define(J[730],ee([1,0,11,208,113]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class D extends L.ResolvedKeybinding{constructor(b,S){if(super(),S.length===0)throw(0,_.illegalArgument)("chords");this._os=b,this._chords=S}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 L.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[34],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,_.createDecorator)("keybindingService")}),define(J[322],ee([1,0,7,301,40,6,2,125,13,55,8,34,426]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PostEditWidgetManager=void 0;let t=class Ri extends w.Disposable{constructor(r,d,h,o,c,a,l,u,v,f){super(),this.typeId=r,this.editor=d,this.showCommand=o,this.range=c,this.edits=a,this.onSelectNewEdit=l,this._contextMenuService=u,this._keybindingService=f,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=h.bindTo(v),this.visibleContext.set(!0),this._register((0,w.toDisposable)(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,w.toDisposable)(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(p=>{c.containsPosition(p.position)||this.dispose()})),this._register(D.Event.runAndSubscribe(f.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var r;const d=(r=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||r===void 0?void 0:r.getLabel();this.button.element.title=this.showCommand.label+(d?` (${d})`:"")}create(){this.domNode=_.$(".post-edit-widget"),this.button=this._register(new k.Button(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(_.addDisposableListener(this.domNode,_.EventType.CLICK,()=>this.showSelector()))}getId(){return Ri.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const r=_.getDomNodePagePosition(this.button.element);return{x:r.left+r.width,y:r.top+r.height}},getActions:()=>this.edits.allEdits.map((r,d)=>(0,L.toAction)({id:"",label:r.label,checked:d===this.edits.activeEditIndex,run:()=>{if(d!==this.edits.activeEditIndex)return this.onSelectNewEdit(d)}}))})}};t.baseId="editor.widget.postEditWidget",t=Te([ge(7,g.IContextMenuService),ge(8,S.IContextKeyService),ge(9,s.IKeybindingService)],t);let i=e.PostEditWidgetManager=class extends w.Disposable{constructor(r,d,h,o,c,a){super(),this._id=r,this._editor=d,this._visibleContext=h,this._showCommand=o,this._instantiationService=c,this._bulkEditService=a,this._currentWidget=this._register(new w.MutableDisposable),this._register(D.Event.any(d.onDidChangeModel,d.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(r,d,h,o){var c,a;return we(this,void 0,void 0,function*(){const l=this._editor.getModel();if(!l||!r.length)return;const u=d.allEdits[d.activeEditIndex];if(!u)return;const v={edits:[...r.map(E=>new b.ResourceTextEdit(l.uri,typeof u.insertText=="string"?{range:E,text:u.insertText,insertAsSnippet:!1}:{range:E,text:u.insertText.snippet,insertAsSnippet:!0})),...(a=(c=u.additionalEdit)===null||c===void 0?void 0:c.edits)!==null&&a!==void 0?a:[]]},f=r[0],p=l.deltaDecorations([],[{range:f,options:{description:"paste-line-suffix",stickiness:0}}]);let C,y;try{C=yield this._bulkEditService.apply(v,{editor:this._editor,token:o}),y=l.getDecorationRange(p[0])}finally{l.deltaDecorations(p,[])}h&&C.isApplied&&d.allEdits.length>1&&this.show(y??f,d,E=>we(this,void 0,void 0,function*(){const I=this._editor.getModel();I&&(yield I.undo(),this.applyEditAndShowIfNeeded(r,{activeEditIndex:E,allEdits:d.allEdits},h,o))}))})}show(r,d,h){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(t,this._id,this._editor,this._visibleContext,this._showCommand,r,d,h))}clear(){this._currentWidget.clear()}tryShowSelector(){var r;(r=this._currentWidget.value)===null||r===void 0||r.showSelector()}};e.PostEditWidgetManager=i=Te([ge(4,m.IInstantiationService),ge(5,b.IBulkEditService)],i)}),define(J[323],ee([1,0,13]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=e.NoMatchingKb=void 0,e.NoMatchingKb={kind:0};const k={kind:1};function L(S,g,m){return{kind:2,commandId:S,commandArgs:g,isBubble:m}}class D{constructor(g,m,s){var t;this._log=s,this._defaultKeybindings=g,this._defaultBoundCommands=new Map;for(const i of g){const n=i.command;n&&n.charAt(0)!=="-"&&this._defaultBoundCommands.set(n,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=D.handleRemovals([].concat(g).concat(m));for(let i=0,n=this._keybindings.length;i<n;i++){const r=this._keybindings[i];if(r.chords.length===0)continue;const d=(t=r.when)===null||t===void 0?void 0:t.substituteConstants();d&&d.type===0||this._addKeyPress(r.chords[0],r)}}static _isTargetedForRemoval(g,m,s){if(m){for(let t=0;t<m.length;t++)if(m[t]!==g.chords[t])return!1}return!(s&&s.type!==1&&(!g.when||!(0,_.expressionsAreEqualWithConstantSubstitution)(s,g.when)))}static handleRemovals(g){const m=new Map;for(let t=0,i=g.length;t<i;t++){const n=g[t];if(n.command&&n.command.charAt(0)==="-"){const r=n.command.substring(1);m.has(r)?m.get(r).push(n):m.set(r,[n])}}if(m.size===0)return g;const s=[];for(let t=0,i=g.length;t<i;t++){const n=g[t];if(!n.command||n.command.length===0){s.push(n);continue}if(n.command.charAt(0)==="-")continue;const r=m.get(n.command);if(!r||!n.isDefault){s.push(n);continue}let d=!1;for(const h of r){const o=h.when;if(this._isTargetedForRemoval(n,h.chords,o)){d=!0;break}}if(!d){s.push(n);continue}}return s}_addKeyPress(g,m){const s=this._map.get(g);if(typeof s>"u"){this._map.set(g,[m]),this._addToLookupMap(m);return}for(let t=s.length-1;t>=0;t--){const i=s[t];if(i.command===m.command)continue;let n=!0;for(let r=1;r<i.chords.length&&r<m.chords.length;r++)if(i.chords[r]!==m.chords[r]){n=!1;break}n&&D.whenIsEntirelyIncluded(i.when,m.when)&&this._removeFromLookupMap(i)}s.push(m),this._addToLookupMap(m)}_addToLookupMap(g){if(!g.command)return;let m=this._lookupMap.get(g.command);typeof m>"u"?(m=[g],this._lookupMap.set(g.command,m)):m.push(g)}_removeFromLookupMap(g){if(!g.command)return;const m=this._lookupMap.get(g.command);if(!(typeof m>"u")){for(let s=0,t=m.length;s<t;s++)if(m[s]===g){m.splice(s,1);return}}}static whenIsEntirelyIncluded(g,m){return!m||m.type===1?!0:!g||g.type===1?!1:(0,_.implies)(g,m)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(g,m){const s=this._lookupMap.get(g);if(typeof s>"u"||s.length===0)return null;if(s.length===1)return s[0];for(let t=s.length-1;t>=0;t--){const i=s[t];if(m.contextMatchesRules(i.when))return i}return s[s.length-1]}resolve(g,m,s){const t=[...m,s];this._log(`| Resolving ${t}`);const i=this._map.get(t[0]);if(i===void 0)return this._log("\\\\ No keybinding entries."),e.NoMatchingKb;let n=null;if(t.length<2)n=i;else{n=[];for(let d=0,h=i.length;d<h;d++){const o=i[d];if(t.length>o.chords.length)continue;let c=!0;for(let a=1;a<t.length;a++)if(o.chords[a]!==t[a]){c=!1;break}c&&n.push(o)}}const r=this._findCommand(g,n);return r?t.length<r.chords.length?(this._log(`\\\\ From ${n.length} keybinding entries, awaiting ${r.chords.length-t.length} more chord(s), when: ${w(r.when)}, source: ${b(r)}.`),k):(this._log(`\\\\ From ${n.length} keybinding entries, matched ${r.command}, when: ${w(r.when)}, source: ${b(r)}.`),L(r.command,r.commandArgs,r.bubble)):(this._log(`\\\\ From ${n.length} keybinding entries, no when clauses matched the context.`),e.NoMatchingKb)}_findCommand(g,m){for(let s=m.length-1;s>=0;s--){const t=m[s];if(D._contextMatchesRules(g,t.when))return t}return null}static _contextMatchesRules(g,m){return m?m.evaluate(g):!0}}e.KeybindingResolver=D;function w(S){return S?`${S.serialize()}`:"no when condition"}function b(S){return S.extensionId?S.isBuiltinExtension?`built-in extension ${S.extensionId}`:`user extension ${S.extensionId}`:S.isDefault?"built-in":"user"}}),define(J[731],ee([1,0,14,11,6,290,2,699,323]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const g=/^(cursor|delete|undo|redo|tab|editor\\.action\\.clipboard)/;class m extends w.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:L.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(i,n,r,d,h){super(),this._contextKeyService=i,this._commandService=n,this._telemetryService=r,this._notificationService=d,this._logService=h,this._onDidUpdateKeybindings=this._register(new L.Emitter),this._currentChords=[],this._currentChordChecker=new _.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=s.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new _.TimeoutTimer,this._logging=!1}dispose(){super.dispose()}_log(i){this._logging&&this._logService.info(`[KeybindingService]: ${i}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(i,n){const r=this._getResolver().lookupPrimaryKeybinding(i,n||this._contextKeyService);if(r)return r.resolvedKeybinding}dispatchEvent(i,n){return this._dispatch(i,n)}softDispatch(i,n){this._log("/ Soft dispatching keyboard event");const r=this.resolveKeyboardEvent(i);if(r.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),S.NoMatchingKb;const[d]=r.getDispatchChords();if(d===null)return this._log("\\\\ Keyboard event cannot be dispatched"),S.NoMatchingKb;const h=this._contextKeyService.getContext(n),o=this._currentChords.map(({keypress:c})=>c);return this._getResolver().resolve(h,o,d)}_scheduleLeaveChordMode(){const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(i,n){switch(this._currentChords.push({keypress:i,label:n}),this._currentChords.length){case 0:throw(0,k.illegalState)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(b.localize(0,null,n));break;default:{const r=this._currentChords.map(({label:d})=>d).join(", ");this._currentChordStatusMessage=this._notificationService.status(b.localize(1,null,r))}}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(i,n){return this._doDispatch(this.resolveKeyboardEvent(i),n,!1)}_singleModifierDispatch(i,n){const r=this.resolveKeyboardEvent(i),[d]=r.getSingleModifierDispatchChords();if(d)return this._ignoreSingleModifiers.has(d)?(this._log(`+ Ignoring single modifier ${d} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=s.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=s.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${d}.`),this._currentSingleModifier=d,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):d===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${d} ${d}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(r,n,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${d}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[h]=r.getChords();return this._ignoreSingleModifiers=new s(h),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(i,n,r=!1){var d;let h=!1;if(i.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let o=null,c=null;if(r){const[v]=i.getSingleModifierDispatchChords();o=v,c=v?[v]:[]}else[o]=i.getDispatchChords(),c=this._currentChords.map(({keypress:v})=>v);if(o===null)return this._log("\\\\ Keyboard event cannot be dispatched in keydown phase."),h;const a=this._contextKeyService.getContext(n),l=i.getLabel(),u=this._getResolver().resolve(a,c,o);switch(u.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const v=this._currentChords.map(({label:f})=>f).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${v}, ${l}".`),this._notificationService.status(b.localize(2,null,v,l),{hideAfter:10*1e3}),this._leaveChordMode(),h=!0}return h}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),h=!0,this._expectAnotherChord(o,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),h;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${u.commandId} ]`),u.commandId===null||u.commandId===""){if(this.inChordMode){const v=this._currentChords.map(({label:f})=>f).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${v}, ${l}".`),this._notificationService.status(b.localize(3,null,v,l),{hideAfter:10*1e3}),this._leaveChordMode(),h=!0}}else this.inChordMode&&this._leaveChordMode(),u.isBubble||(h=!0),this._log(`+ Invoking command ${u.commandId}.`),typeof u.commandArgs>"u"?this._commandService.executeCommand(u.commandId).then(void 0,v=>this._notificationService.warn(v)):this._commandService.executeCommand(u.commandId,u.commandArgs).then(void 0,v=>this._notificationService.warn(v)),g.test(u.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:u.commandId,from:"keybinding",detail:(d=i.getUserSettingsLabel())!==null&&d!==void 0?d:void 0});return h}}}mightProducePrintableCharacter(i){return i.ctrlKey||i.metaKey?!1:i.keyCode>=31&&i.keyCode<=56||i.keyCode>=21&&i.keyCode<=30}}e.AbstractKeybindingService=m;class s{constructor(i){this._ctrlKey=i?i.ctrlKey:!1,this._shiftKey=i?i.shiftKey:!1,this._altKey=i?i.altKey:!1,this._metaKey=i?i.metaKey:!1}has(i){switch(i){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}s.EMPTY=new s(null)}),define(J[324],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toEmptyArrayIfContainsNull=e.ResolvedKeybindingItem=void 0;class _{constructor(D,w,b,S,g,m,s){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=S,this.isDefault=g,this.extensionId=m,this.isBuiltinExtension=s}}e.ResolvedKeybindingItem=_;function k(L){const D=[];for(let w=0,b=L.length;w<b;w++){const S=L[w];if(!S)return[];D.push(S)}return D}e.toEmptyArrayIfContainsNull=k}),define(J[732],ee([1,0,58,113,730,324]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class w extends L.BaseResolvedKeybinding{constructor(S,g){super(g,S)}_keyCodeToUILabel(S){if(this._os===2)switch(S){case 15:return"\\u2190";case 16:return"\\u2191";case 17:return"\\u2192";case 18:return"\\u2193"}return _.KeyCodeUtils.toString(S)}_getLabel(S){return S.isDuplicateModifierCase()?"":this._keyCodeToUILabel(S.keyCode)}_getAriaLabel(S){return S.isDuplicateModifierCase()?"":_.KeyCodeUtils.toString(S.keyCode)}_getElectronAccelerator(S){return _.KeyCodeUtils.toElectronAccelerator(S.keyCode)}_getUserSettingsLabel(S){if(S.isDuplicateModifierCase())return"";const g=_.KeyCodeUtils.toUserSettingsUS(S.keyCode);return g&&g.toLowerCase()}_getChordDispatch(S){return w.getDispatchStr(S)}static getDispatchStr(S){if(S.isModifierKey())return null;let g="";return S.ctrlKey&&(g+="ctrl+"),S.shiftKey&&(g+="shift+"),S.altKey&&(g+="alt+"),S.metaKey&&(g+="meta+"),g+=_.KeyCodeUtils.toString(S.keyCode),g}_getSingleModifierChordDispatch(S){return S.keyCode===5&&!S.shiftKey&&!S.altKey&&!S.metaKey?"ctrl":S.keyCode===4&&!S.ctrlKey&&!S.altKey&&!S.metaKey?"shift":S.keyCode===6&&!S.ctrlKey&&!S.shiftKey&&!S.metaKey?"alt":S.keyCode===57&&!S.ctrlKey&&!S.shiftKey&&!S.altKey?"meta":null}static _scanCodeToKeyCode(S){const g=_.IMMUTABLE_CODE_TO_KEY_CODE[S];if(g!==-1)return g;switch(S){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 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(S){if(!S)return null;if(S instanceof k.KeyCodeChord)return S;const g=this._scanCodeToKeyCode(S.scanCode);return g===0?null:new k.KeyCodeChord(S.ctrlKey,S.shiftKey,S.altKey,S.metaKey,g)}static resolveKeybinding(S,g){const m=(0,D.toEmptyArrayIfContainsNull)(S.chords.map(s=>this._toKeyCodeChord(s)));return m.length>0?[new w(m,g)]:[]}}e.USLayoutResolvedKeybinding=w}),define(J[155],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,_.createDecorator)("labelService")}),define(J[127],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,_.createDecorator)("layoutService")}),define(J[325],ee([1,0,7,6,127,32,49]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScopedLayoutService=void 0;let b=class{get dimension(){return this._dimension||(this._dimension=_.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=Te([ge(0,D.ICodeEditorService)],b);let S=e.EditorScopedLayoutService=class extends b{get hasContainer(){return!1}get container(){return this._container}constructor(m,s){super(s),this._container=m}};e.EditorScopedLayoutService=S=Te([ge(1,D.ICodeEditorService)],S),(0,w.registerSingleton)(L.ILayoutService,b,1)}),define(J[733],ee([1,0,7,6,2,91,28,13,127]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let g=e.AccessibilityService=class extends L.Disposable{constructor(s,t,i){super(),this._contextKeyService=s,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 n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),d.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));const r=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(r)}initReducedMotionListeners(s){if(!this._layoutService.hasContainer)return;this._register((0,_.addDisposableListener)(s,"change",()=>{this._systemMotionReduced=s.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 s=this._configurationService.getValue("editor.accessibilitySupport");return s==="on"||s==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const s=this._configMotionReduced;return s==="on"||s==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};e.AccessibilityService=g=Te([ge(0,b.IContextKeyService),ge(1,S.ILayoutService),ge(2,w.IConfigurationService)],g)}),define(J[734],ee([1,0,293,2,127]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let D=e.ContextViewService=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 _.ContextView(this.container,1)),this.layout(),this._register(b.onDidLayout(()=>this.layout()))}setContainer(b,S){this.contextView.setContainer(b,S||1)}showContextView(b,S,g){S?(S!==this.container||this.shadowRoot!==g)&&(this.container=S,this.setContainer(S,g?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=g,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)}};e.ContextViewService=D=Te([ge(0,L.ILayoutService)],D)}),define(J[63],ee([1,0,6,2,13,8]),function(j,e,_,k,L,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(s){s[s.Off=0]="Off",s[s.Trace=1]="Trace",s[s.Debug=2]="Debug",s[s.Info=3]="Info",s[s.Warning=4]="Warning",s[s.Error=5]="Error"})(w||(e.LogLevel=w={})),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 _.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 S 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=S;class g 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 n of this.loggers)n.trace(t,...i)}debug(t,...i){for(const n of this.loggers)n.debug(t,...i)}info(t,...i){for(const n of this.loggers)n.info(t,...i)}error(t,...i){for(const n of this.loggers)n.error(t,...i)}dispose(){for(const t of this.loggers)t.dispose()}}e.MultiplexLogger=g;function m(s){switch(s){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 L.RawContextKey("logLevel",m(w.Info))}),define(J[735],ee([1,0,47,7,14,2,127,63]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let S=e.BrowserClipboardService=class extends D.Disposable{constructor(m,s){super(),this.layoutService=m,this.logService=s,this.mapTextToType=new Map,this.findText="",this.resources=[],(_.isSafari||_.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const m=()=>{const s=new L.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=s,navigator.clipboard.write([new ClipboardItem({"text/plain":s.p})]).catch(t=>we(this,void 0,void 0,function*(){(!(t instanceof Error)||t.name!=="NotAllowedError"||!s.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,s){return we(this,void 0,void 0,function*(){if(s){this.mapTextToType.set(s,m);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(m);try{return yield navigator.clipboard.writeText(m)}catch(n){console.error(n)}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 we(this,void 0,void 0,function*(){if(m)return this.mapTextToType.get(m)||"";try{return yield navigator.clipboard.readText()}catch(s){return console.error(s),""}})}readFindText(){return we(this,void 0,void 0,function*(){return this.findText})}writeFindText(m){return we(this,void 0,void 0,function*(){this.findText=m})}readResources(){return we(this,void 0,void 0,function*(){return this.resources})}};e.BrowserClipboardService=S=Te([ge(0,w.ILayoutService),ge(1,b.ILogService)],S)}),define(J[736],ee([1,0,2,63]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class L extends _.Disposable{constructor(w,b=[]){super(),this.logger=new k.MultiplexLogger([w,...b]),this._register(w.onDidChangeLogLevel(S=>this.setLevel(S)))}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=L}),define(J[92],ee([1,0,104,701,8]),function(j,e,_,k,L){"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=D={})),function(b){function S(i,n){return n-i}b.compare=S;const g=Object.create(null);g[b.Error]=(0,k.localize)(0,null),g[b.Warning]=(0,k.localize)(1,null),g[b.Info]=(0,k.localize)(2,null);function m(i){return g[i]||""}b.toString=m;function s(i){switch(i){case _.default.Error:return b.Error;case _.default.Warning:return b.Warning;case _.default.Info:return b.Info;case _.default.Ignore:return b.Hint}}b.fromSeverity=s;function t(i){switch(i){case b.Error:return _.default.Error;case b.Warning:return _.default.Warning;case b.Info:return _.default.Info;case b.Hint:return _.default.Ignore}}b.toSeverity=t}(D||(e.MarkerSeverity=D={}));var w;(function(b){const S="";function g(s){return m(s,!0)}b.makeKey=g;function m(s,t){const i=[S];return s.source?i.push(s.source.replace("\\xA6","\\\\\\xA6")):i.push(S),s.code?typeof s.code=="string"?i.push(s.code.replace("\\xA6","\\\\\\xA6")):i.push(s.code.value.replace("\\xA6","\\\\\\xA6")):i.push(S),s.severity!==void 0&&s.severity!==null?i.push(D.toString(s.severity)):i.push(S),s.message&&t?i.push(s.message.replace("\\xA6","\\\\\\xA6")):i.push(S),s.startLineNumber!==void 0&&s.startLineNumber!==null?i.push(s.startLineNumber.toString()):i.push(S),s.startColumn!==void 0&&s.startColumn!==null?i.push(s.startColumn.toString()):i.push(S),s.endLineNumber!==void 0&&s.endLineNumber!==null?i.push(s.endLineNumber.toString()):i.push(S),s.endColumn!==void 0&&s.endColumn!==null?i.push(s.endColumn.toString()):i.push(S),i.push(S),i.join("\\xA6")}b.makeKeyOptionalMessage=m})(w||(e.IMarkerData=w={})),e.IMarkerService=(0,L.createDecorator)("markerService")}),define(J[737],ee([1,0,16,6,2,59,9,21,5,49,8,92,28]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class i{constructor(h,o,c){this.marker=h,this.index=o,this.total=c}}e.MarkerCoordinate=i;let n=e.MarkerList=class{constructor(h,o,c){this._markerService=o,this._configService=c,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new L.DisposableStore,this._markers=[],this._nextIdx=-1,b.URI.isUri(h)?this._resourceFilter=v=>v.toString()===h.toString():h&&(this._resourceFilter=h);const a=this._configService.getValue("problems.sortOrder"),l=(v,f)=>{let p=(0,w.compare)(v.resource.toString(),f.resource.toString());return p===0&&(a==="position"?p=S.Range.compareRangesUsingStarts(v,f)||s.MarkerSeverity.compare(v.severity,f.severity):p=s.MarkerSeverity.compare(v.severity,f.severity)||S.Range.compareRangesUsingStarts(v,f)),p},u=()=>{this._markers=this._markerService.read({resource:b.URI.isUri(h)?h:void 0,severities:s.MarkerSeverity.Error|s.MarkerSeverity.Warning|s.MarkerSeverity.Info}),typeof h=="function"&&(this._markers=this._markers.filter(v=>this._resourceFilter(v.resource))),this._markers.sort(l)};u(),this._dispoables.add(o.onMarkerChanged(v=>{(!this._resourceFilter||v.some(f=>this._resourceFilter(f)))&&(u(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(h){return!this._resourceFilter&&!h?!0:!this._resourceFilter||!h?!1:this._resourceFilter(h)}get selected(){const h=this._markers[this._nextIdx];return h&&new i(h,this._nextIdx+1,this._markers.length)}_initIdx(h,o,c){let a=!1,l=this._markers.findIndex(u=>u.resource.toString()===h.uri.toString());l<0&&(l=(0,_.binarySearch)(this._markers,{resource:h.uri},(u,v)=>(0,w.compare)(u.resource.toString(),v.resource.toString())),l<0&&(l=~l));for(let u=l;u<this._markers.length;u++){let v=S.Range.lift(this._markers[u]);if(v.isEmpty()){const f=h.getWordAtPosition(v.getStartPosition());f&&(v=new S.Range(v.startLineNumber,f.startColumn,v.startLineNumber,f.endColumn))}if(o&&(v.containsPosition(o)||o.isBeforeOrEqual(v.getStartPosition()))){this._nextIdx=u,a=!0;break}if(this._markers[u].resource.toString()!==h.uri.toString())break}a||(this._nextIdx=c?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(h,o,c){if(this._markers.length===0)return!1;const a=this._nextIdx;return this._nextIdx===-1?this._initIdx(o,c,h):h?this._nextIdx=(this._nextIdx+1)%this._markers.length:h||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),a!==this._nextIdx}find(h,o){let c=this._markers.findIndex(a=>a.resource.toString()===h.toString());if(!(c<0)){for(;c<this._markers.length;c++)if(S.Range.containsPosition(this._markers[c],o))return new i(this._markers[c],c+1,this._markers.length)}}};e.MarkerList=n=Te([ge(1,s.IMarkerService),ge(2,t.IConfigurationService)],n),e.IMarkerNavigationService=(0,m.createDecorator)("IMarkerNavigationService");let r=class{constructor(h,o){this._markerService=h,this._configService=o,this._provider=new D.LinkedList}getMarkerList(h){for(const o of this._provider){const c=o.getMarkerList(h);if(c)return c}return new n(h,this._markerService,this._configService)}};r=Te([ge(0,s.IMarkerService),ge(1,t.IConfigurationService)],r),(0,g.registerSingleton)(e.IMarkerNavigationService,r,1)}),define(J[738],ee([1,0,16,6,53,60,51,21,92]),function(j,e,_,k,L,D,w,b,S){"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 g{constructor(){this._byResource=new D.ResourceMap,this._byOwner=new Map}set(i,n,r){let d=this._byResource.get(i);d||(d=new Map,this._byResource.set(i,d)),d.set(n,r);let h=this._byOwner.get(n);h||(h=new D.ResourceMap,this._byOwner.set(n,h)),h.set(i,r)}get(i,n){const r=this._byResource.get(i);return r?.get(n)}delete(i,n){let r=!1,d=!1;const h=this._byResource.get(i);h&&(r=h.delete(n));const o=this._byOwner.get(n);if(o&&(d=o.delete(i)),r!==d)throw new Error("illegal state");return r&&d}values(i){var n,r,d,h;return typeof i=="string"?(r=(n=this._byOwner.get(i))===null||n===void 0?void 0:n.values())!==null&&r!==void 0?r:L.Iterable.empty():b.URI.isUri(i)?(h=(d=this._byResource.get(i))===null||d===void 0?void 0:d.values())!==null&&h!==void 0?h:L.Iterable.empty():L.Iterable.map(L.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 n of i){const r=this._data.get(n);r&&this._substract(r);const d=this._resourceStats(n);this._add(d),this._data.set(n,d)}}_resourceStats(i){const n={errors:0,warnings:0,infos:0,unknowns:0};if(e.unsupportedSchemas.has(i.scheme))return n;for(const{severity:r}of this._service.read({resource:i}))r===S.MarkerSeverity.Error?n.errors+=1:r===S.MarkerSeverity.Warning?n.warnings+=1:r===S.MarkerSeverity.Info?n.infos+=1:n.unknowns+=1;return n}_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 s{constructor(){this._onMarkerChanged=new k.DebounceEmitter({delay:0,merge:s._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new g,this._stats=new m(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(i,n){for(const r of n||[])this.changeOne(i,r,[])}changeOne(i,n,r){if((0,_.isFalsyOrEmpty)(r))this._data.delete(n,i)&&this._onMarkerChanged.fire([n]);else{const d=[];for(const h of r){const o=s._toMarker(i,n,h);o&&d.push(o)}this._data.set(n,i,d),this._onMarkerChanged.fire([n])}}static _toMarker(i,n,r){let{code:d,severity:h,message:o,source:c,startLineNumber:a,startColumn:l,endLineNumber:u,endColumn:v,relatedInformation:f,tags:p}=r;if(o)return a=a>0?a:1,l=l>0?l:1,u=u>=a?u:a,v=v>0?v:l,{resource:n,owner:i,code:d,severity:h,message:o,source:c,startLineNumber:a,startColumn:l,endLineNumber:u,endColumn:v,relatedInformation:f,tags:p}}changeAll(i,n){const r=[],d=this._data.values(i);if(d)for(const h of d){const o=L.Iterable.first(h);o&&(r.push(o.resource),this._data.delete(o.resource,i))}if((0,_.isNonEmptyArray)(n)){const h=new D.ResourceMap;for(const{resource:o,marker:c}of n){const a=s._toMarker(i,o,c);if(!a)continue;const l=h.get(o);l?l.push(a):(h.set(o,[a]),r.push(o))}for(const[o,c]of h)this._data.set(o,i,c)}r.length>0&&this._onMarkerChanged.fire(r)}read(i=Object.create(null)){let{owner:n,resource:r,severities:d,take:h}=i;if((!h||h<0)&&(h=-1),n&&r){const o=this._data.get(r,n);if(o){const c=[];for(const a of o)if(s._accept(a,d)){const l=c.push(a);if(h>0&&l===h)break}return c}else return[]}else if(!n&&!r){const o=[];for(const c of this._data.values())for(const a of c)if(s._accept(a,d)){const l=o.push(a);if(h>0&&l===h)return o}return o}else{const o=this._data.values(r??n),c=[];for(const a of o)for(const l of a)if(s._accept(l,d)){const u=c.push(l);if(h>0&&u===h)return c}return c}}static _accept(i,n){return n===void 0||(n&i.severity)===i.severity}static _merge(i){const n=new D.ResourceMap;for(const r of i)for(const d of r)n.set(d,!0);return Array.from(n.keys())}}e.MarkerService=s}),define(J[43],ee([1,0,104,8]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpNotification=e.INotificationService=e.Severity=void 0,e.Severity=_.default,e.INotificationService=(0,k.createDecorator)("notificationService");class L{}e.NoOpNotification=L}),define(J[52],ee([1,0,9,21,8]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractSelection=e.matchesSomeScheme=e.matchesScheme=e.IOpenerService=void 0,e.IOpenerService=(0,L.createDecorator)("openerService");function D(S,g){return k.URI.isUri(S)?(0,_.equalsIgnoreCase)(S.scheme,g):(0,_.startsWithIgnoreCase)(S,g+":")}e.matchesScheme=D;function w(S,...g){return g.some(m=>D(S,m))}e.matchesSomeScheme=w;function b(S){let g;const m=/^L?(\\d+)(?:,(\\d+))?(-L?(\\d+)(?:,(\\d+))?)?/.exec(S.fragment);return m&&(g={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},S=S.with({fragment:""})),{selection:g,uri:S}}e.extractSelection=b}),define(J[739],ee([1,0,7,20,59,60,213,51,42,21,32,25,714,52]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let n=class{constructor(o){this._commandService=o}open(o,c){return we(this,void 0,void 0,function*(){if(!(0,i.matchesScheme)(o,b.Schemas.command))return!1;if(!c?.allowCommands||(typeof o=="string"&&(o=g.URI.parse(o)),Array.isArray(c.allowCommands)&&!c.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})}};n=Te([ge(0,s.ICommandService)],n);let r=class{constructor(o){this._editorService=o}open(o,c){return we(this,void 0,void 0,function*(){typeof o=="string"&&(o=g.URI.parse(o));const{selection:a,uri:l}=(0,i.extractSelection)(o);return o=l,o.scheme===b.Schemas.file&&(o=(0,S.normalizePath)(o)),yield this._editorService.openCodeEditor({resource:o,options:Object.assign({selection:a,source:c?.fromUserGesture?t.EditorOpenSource.USER:t.EditorOpenSource.API},c?.editorOptions)},this._editorService.getFocusedCodeEditor(),c?.openToSide),!0})}};r=Te([ge(0,m.ICodeEditorService)],r);let d=e.OpenerService=class{constructor(o,c){this._openers=new L.LinkedList,this._validators=new L.LinkedList,this._resolvers=new L.LinkedList,this._resolvedUriTargets=new D.ResourceMap(a=>a.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new L.LinkedList,this._defaultExternalOpener={openExternal:a=>we(this,void 0,void 0,function*(){return(0,i.matchesSomeScheme)(a,b.Schemas.http,b.Schemas.https)?_.windowOpenNoOpener(a):window.location.href=a,!0})},this._openers.push({open:(a,l)=>we(this,void 0,void 0,function*(){return l?.openExternal||(0,i.matchesSomeScheme)(a,b.Schemas.mailto,b.Schemas.http,b.Schemas.https,b.Schemas.vsls)?(yield this._doOpenExternal(a,l),!0):!1})}),this._openers.push(new n(c)),this._openers.push(new r(o))}registerOpener(o){return{dispose:this._openers.unshift(o)}}open(o,c){var a;return we(this,void 0,void 0,function*(){const l=typeof o=="string"?g.URI.parse(o):o,u=(a=this._resolvedUriTargets.get(l))!==null&&a!==void 0?a:o;for(const v of this._validators)if(!(yield v.shouldOpen(u,c)))return!1;for(const v of this._openers)if(yield v.open(o,c))return!0;return!1})}resolveExternalUri(o,c){return we(this,void 0,void 0,function*(){for(const a of this._resolvers)try{const l=yield a.resolveExternalUri(o,c);if(l)return this._resolvedUriTargets.has(l.resolved)||this._resolvedUriTargets.set(l.resolved,o),l}catch{}throw new Error("Could not resolve external URI: "+o.toString())})}_doOpenExternal(o,c){return we(this,void 0,void 0,function*(){const a=typeof o=="string"?g.URI.parse(o):o;let l;try{l=(yield this.resolveExternalUri(a,c)).resolved}catch{l=a}let u;if(typeof o=="string"&&a.toString()===l.toString()?u=o:u=encodeURI(l.toString(!0)),c?.allowContributedOpeners){const v=typeof c?.allowContributedOpeners=="string"?c?.allowContributedOpeners:void 0;for(const f of this._externalOpeners)if(yield f.openExternal(u,{sourceUri:a,preferredOpenerId:v},k.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(u,{sourceUri:a},k.CancellationToken.None)})}dispose(){this._validators.clear()}};e.OpenerService=d=Te([ge(0,m.ICodeEditorService),ge(1,s.ICommandService)],d)}),define(J[70],ee([1,0,137,60,135,49,8,63,52]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,w.createDecorator)("ILanguageFeatureDebounceService");var g;(function(t){const i=new WeakMap;let n=0;function r(d){let h=i.get(d);return h===void 0&&(h=++n,i.set(d,h)),h}t.of=r})(g||(g={}));class m{constructor(i,n,r,d,h,o){this._logService=i,this._name=n,this._registry=r,this._default=d,this._min=h,this._max=o,this._cache=new k.LRUCache(50,.7)}_key(i){return i.id+this._registry.all(i).reduce((n,r)=>(0,_.doHash)(g.of(r),n),0)}get(i){const n=this._key(i),r=this._cache.get(n);return r?(0,L.clamp)(r.value,this._min,this._max):this.default()}update(i,n){const r=this._key(i);let d=this._cache.get(r);d||(d=new L.SlidingWindowAverage(6),this._cache.set(r,d));const h=(0,L.clamp)(d.update(n),this._min,this._max);return(0,S.matchesScheme)(i.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${i.uri.toString()} is ${h}ms`),h}_overall(){const i=new L.MovingAverage;for(const[,n]of this._cache)i.update(n.value);return i.value}default(){const i=this._overall()|0||this._default;return(0,L.clamp)(i,this._min,this._max)}}let s=e.LanguageFeatureDebounceService=class{constructor(i){this._logService=i,this._data=new Map}for(i,n,r){var d,h,o;const c=(d=r?.min)!==null&&d!==void 0?d:50,a=(h=r?.max)!==null&&h!==void 0?h:Math.pow(c,2),l=(o=r?.key)!==null&&o!==void 0?o:void 0,u=`${g.of(i)},${c}${l?","+l:""}`;let v=this._data.get(u);return v||(v=new m(this._logService,n,i,this._overallAverage()|0||c*1.5,c,a),this._data.set(u,v)),v}_overallAverage(){const i=new L.MovingAverage;for(const n of this._data.values())i.update(n.default());return i.value}};e.LanguageFeatureDebounceService=s=Te([ge(0,b.ILogService)],s),(0,D.registerSingleton)(e.ILanguageFeatureDebounceService,s,1)}),define(J[183],ee([1,0,16,20,11,53,60,12,5,70,8,49,50,2,19]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n){"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 l;(l=this.parent)===null||l===void 0||l.children.delete(this.id)}static findId(l,u){let v;typeof l=="string"?v=`${u.id}/${l}`:(v=`${u.id}/${l.name}`,u.children.get(v)!==void 0&&(v=`${u.id}/${l.name}_${l.range.startLineNumber}_${l.range.startColumn}`));let f=v;for(let p=0;u.children.get(f)!==void 0;p++)f=`${v}_${p}`;return f}static empty(l){return l.children.size===0}}e.TreeElement=r;class d extends r{constructor(l,u,v){super(),this.id=l,this.parent=u,this.symbol=v,this.children=new Map}}e.OutlineElement=d;class h extends r{constructor(l,u,v,f){super(),this.id=l,this.parent=u,this.label=v,this.order=f,this.children=new Map}}e.OutlineGroup=h;class o extends r{static create(l,u,v){const f=new k.CancellationTokenSource(v),p=new o(u.uri),C=l.ordered(u),y=C.map((I,T)=>{var O;const R=r.findId(`provider_${T}`,p),M=new h(R,p,(O=I.displayName)!==null&&O!==void 0?O:"Unknown Outline Provider",T);return Promise.resolve(I.provideDocumentSymbols(u,f.token)).then(N=>{for(const P of N||[])o._makeOutlineElement(P,M);return M},N=>((0,L.onUnexpectedExternalError)(N),M)).then(N=>{r.empty(N)?N.remove():p._groups.set(R,N)})}),E=l.onDidChange(()=>{const I=l.ordered(u);(0,_.equals)(I,C)||f.cancel()});return Promise.all(y).then(()=>f.token.isCancellationRequested&&!v.isCancellationRequested?o.create(l,u,v):p._compact()).finally(()=>{E.dispose()})}static _makeOutlineElement(l,u){const v=r.findId(l,u),f=new d(v,u,l);if(l.children)for(const p of l.children)o._makeOutlineElement(p,f);u.children.set(f.id,f)}constructor(l){super(),this.uri=l,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let l=0;for(const[u,v]of this._groups)v.children.size===0?this._groups.delete(u):l+=1;if(l!==1)this.children=this._groups;else{const u=D.Iterable.first(this._groups.values());for(const[,v]of u.children)v.parent=this,this.children.set(v.id,v)}return this}getTopLevelSymbols(){const l=[];for(const u of this.children.values())u instanceof d?l.push(u.symbol):l.push(...D.Iterable.map(u.children.values(),v=>v.symbol));return l.sort((u,v)=>S.Range.compareRangesUsingStarts(u.range,v.range))}asListOfDocumentSymbols(){const l=this.getTopLevelSymbols(),u=[];return o._flattenDocumentSymbols(u,l,""),u.sort((v,f)=>b.Position.compare(S.Range.getStartPosition(v.range),S.Range.getStartPosition(f.range))||b.Position.compare(S.Range.getEndPosition(f.range),S.Range.getEndPosition(v.range)))}static _flattenDocumentSymbols(l,u,v){for(const f of u)l.push({kind:f.kind,tags:f.tags,name:f.name,detail:f.detail,containerName:f.containerName||v,range:f.range,selectionRange:f.selectionRange,children:void 0}),f.children&&o._flattenDocumentSymbols(l,f.children,f.name)}}e.OutlineModel=o,e.IOutlineModelService=(0,m.createDecorator)("IOutlineModelService");let c=e.OutlineModelService=class{constructor(l,u,v){this._languageFeaturesService=l,this._disposables=new i.DisposableStore,this._cache=new w.LRUCache(10,.7),this._debounceInformation=u.for(l.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(v.onModelRemoved(f=>{this._cache.delete(f.id)}))}dispose(){this._disposables.dispose()}getOrCreate(l,u){return we(this,void 0,void 0,function*(){const v=this._languageFeaturesService.documentSymbolProvider,f=v.ordered(l);let p=this._cache.get(l.id);if(!p||p.versionId!==l.getVersionId()||!(0,_.equals)(p.provider,f)){const y=new k.CancellationTokenSource;p={versionId:l.getVersionId(),provider:f,promiseCnt:0,source:y,promise:o.create(v,l,y.token),model:void 0},this._cache.set(l.id,p);const E=Date.now();p.promise.then(I=>{p.model=I,this._debounceInformation.update(l,Date.now()-E)}).catch(I=>{this._cache.delete(l.id)})}if(p.model)return p.model;p.promiseCnt+=1;const C=u.onCancellationRequested(()=>{--p.promiseCnt===0&&(p.source.cancel(),this._cache.delete(l.id))});try{return yield p.promise}finally{C.dispose()}})}};e.OutlineModelService=c=Te([ge(0,n.ILanguageFeaturesService),ge(1,g.ILanguageFeatureDebounceService),ge(2,t.IModelService)],c),(0,s.registerSingleton)(e.IOutlineModelService,c,1)}),define(J[740],ee([1,0,20,18,21,62,183,25]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",function(S,...g){return we(this,void 0,void 0,function*(){const[m]=g;(0,k.assertType)(L.URI.isUri(m));const s=S.get(w.IOutlineModelService),i=yield S.get(D.ITextModelService).createModelReference(m);try{return(yield s.getOrCreate(i.object.textEditorModel,_.CancellationToken.None)).getTopLevelSymbols()}finally{i.dispose()}})})}),define(J[741],ee([1,0,7,78,44,57,6,2,52,459]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=void 0;let g=e.Link=class extends b.Disposable{get enabled(){return this._enabled}set enabled(s){s?(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=s}constructor(s,t,i={},n){var r;super(),this._link=t,this._enabled=!0,this.el=(0,_.append)(s,(0,_.$)("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 d=this._register(new k.DomEmitter(this.el,"click")),h=this._register(new k.DomEmitter(this.el,"keypress")),o=w.Event.chain(h.event).map(l=>new L.StandardKeyboardEvent(l)).filter(l=>l.keyCode===3).event,c=this._register(new k.DomEmitter(this.el,D.EventType.Tap)).event;this._register(D.Gesture.addTarget(this.el));const a=w.Event.any(d.event,o,c);this._register(a(l=>{this.enabled&&(_.EventHelper.stop(l,!0),i?.opener?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};e.Link=g=Te([ge(3,S.IOpenerService)],g)}),define(J[80],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.Progress=e.emptyProgressRunner=e.IProgressService=void 0,e.IProgressService=(0,_.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)}}e.Progress=k,k.None=Object.freeze({report(){}}),e.IEditorProgressService=(0,_.createDecorator)("editorProgressService")}),define(J[742],ee([1,0,14,20,2,18]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var w;(function(m){m[m.NO_ACTION=0]="NO_ACTION",m[m.CLOSE_PICKER=1]="CLOSE_PICKER",m[m.REFRESH_PICKER=2]="REFRESH_PICKER",m[m.REMOVE_ITEM=3]="REMOVE_ITEM"})(w||(e.TriggerAction=w={}));function b(m){const s=m;return Array.isArray(s.items)}function S(m){const s=m;return!!s.picks&&s.additionalPicks instanceof Promise}class g extends L.Disposable{constructor(s,t){super(),this.prefix=s,this.options=t}provide(s,t,i){var n;const r=new L.DisposableStore;s.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),s.matchOnLabel=s.matchOnDescription=s.matchOnDetail=s.sortByLabel=!1;let d;const h=r.add(new L.MutableDisposable),o=()=>we(this,void 0,void 0,function*(){const c=h.value=new L.DisposableStore;d?.dispose(!0),s.busy=!1,d=new k.CancellationTokenSource(t);const a=d.token,l=s.value.substr(this.prefix.length).trim(),u=this._getPicks(l,c,a,i),v=(p,C)=>{var y;let E,I;if(b(p)?(E=p.items,I=p.active):E=p,E.length===0){if(C)return!1;(l.length>0||s.hideInput)&&(!((y=this.options)===null||y===void 0)&&y.noResultsPick)&&((0,D.isFunction)(this.options.noResultsPick)?E=[this.options.noResultsPick(l)]:E=[this.options.noResultsPick])}return s.items=E,I&&(s.activeItems=[I]),!0},f=p=>we(this,void 0,void 0,function*(){let C=!1,y=!1;yield Promise.all([(()=>we(this,void 0,void 0,function*(){typeof p.mergeDelay=="number"&&(yield(0,_.timeout)(p.mergeDelay),a.isCancellationRequested)||y||(C=v(p.picks,!0))}))(),(()=>we(this,void 0,void 0,function*(){s.busy=!0;try{const E=yield p.additionalPicks;if(a.isCancellationRequested)return;let I,T;b(p.picks)?(I=p.picks.items,T=p.picks.active):I=p.picks;let O,R;if(b(E)?(O=E.items,R=E.active):O=E,O.length>0||!C){let M;if(!T&&!R){const N=s.activeItems[0];N&&I.indexOf(N)!==-1&&(M=N)}v({items:[...I,...O],active:T||R||M})}}finally{a.isCancellationRequested||(s.busy=!1),y=!0}}))()])});if(u!==null)if(S(u))yield f(u);else if(!(u instanceof Promise))v(u);else{s.busy=!0;try{const p=yield u;if(a.isCancellationRequested)return;S(p)?yield f(p):v(p)}finally{a.isCancellationRequested||(s.busy=!1)}}});return r.add(s.onDidChangeValue(()=>o())),o(),r.add(s.onDidAccept(c=>{const[a]=s.selectedItems;typeof a?.accept=="function"&&(c.inBackground||s.hide(),a.accept(s.keyMods,c))})),r.add(s.onDidTriggerItemButton(({button:c,item:a})=>we(this,void 0,void 0,function*(){var l,u;if(typeof a.trigger=="function"){const v=(u=(l=a.buttons)===null||l===void 0?void 0:l.indexOf(c))!==null&&u!==void 0?u:-1;if(v>=0){const f=a.trigger(v,s.keyMods),p=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(p){case w.NO_ACTION:break;case w.CLOSE_PICKER:s.hide();break;case w.REFRESH_PICKER:o();break;case w.REMOVE_ITEM:{const C=s.items.indexOf(a);if(C!==-1){const y=s.items.slice(),E=y.splice(C,1),I=s.activeItems.filter(O=>O!==E[0]),T=s.keepScrollPosition;s.keepScrollPosition=!0,s.items=y,I&&(s.activeItems=I),s.keepScrollPosition=T}break}}}}}))),r}}e.PickerQuickAccessProvider=g}),define(J[743],ee([1,0,7,44,67,220,2,104,168]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const S=_.$;class g extends w.Disposable{constructor(s,t,i){super(),this.parent=s,this.onKeyDown=r=>_.addDisposableListener(this.findInput.inputBox.inputElement,_.EventType.KEY_DOWN,d=>{r(new k.StandardKeyboardEvent(d))}),this.onMouseDown=r=>_.addDisposableListener(this.findInput.inputBox.inputElement,_.EventType.MOUSE_DOWN,d=>{r(new L.StandardMouseEvent(d))}),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=_.append(this.parent,S(".quick-input-box")),this.findInput=this._register(new D.FindInput(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(s){this.findInput.setValue(s)}select(s=null){this.findInput.inputBox.select(s)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(s){this.findInput.inputBox.setPlaceHolder(s)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(s){this.findInput.inputBox.inputElement.type=s?"password":"text"}set enabled(s){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!s)}set toggles(s){this.findInput.setAdditionalToggles(s)}setAttribute(s,t){this.findInput.inputBox.inputElement.setAttribute(s,t)}showDecoration(s){s===b.default.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:s===b.default.Info?1:s===b.default.Warning?2:3,content:""})}stylesForType(s){return this.findInput.inputBox.stylesForType(s===b.default.Info?1:s===b.default.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}e.QuickInputBox=g}),define(J[326],ee([1,0,7,78,6,44,57,147,160,372,706,168]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderQuickInputDescription=e.getIconClass=void 0;const s={},t=new S.IdGenerator("quick-input-button-icon-");function i(r){if(!r)return;let d;const h=r.dark.toString();return s[h]?d=s[h]:(d=t.nextId(),_.createCSSRule(`.${d}, .hc-light .${d}`,`background-image: ${_.asCSSUrl(r.light||r.dark)}`),_.createCSSRule(`.vs-dark .${d}, .hc-black .${d}`,`background-image: ${_.asCSSUrl(r.dark)}`),s[h]=d),d}e.getIconClass=i;function n(r,d,h){_.reset(d);const o=(0,g.parseLinkedText)(r);let c=0;for(const a of o.nodes)if(typeof a=="string")d.append(...(0,b.renderLabelWithIcons)(a));else{let l=a.title;!l&&a.href.startsWith("command:")?l=(0,m.localize)(0,null,a.href.substring(8)):l||(l=a.href);const u=_.$("a",{href:a.href,title:l,tabIndex:c++},a.label);u.style.textDecoration="underline";const v=E=>{_.isEventLike(E)&&_.EventHelper.stop(E,!0),h.callback(a.href)},f=h.disposables.add(new k.DomEmitter(u,_.EventType.CLICK)).event,p=h.disposables.add(new k.DomEmitter(u,_.EventType.KEY_DOWN)).event,C=h.disposables.add(L.Event.chain(p)).filter(E=>{const I=new D.StandardKeyboardEvent(E);return I.equals(10)||I.equals(3)}).event;h.disposables.add(w.Gesture.addTarget(u));const y=h.disposables.add(new k.DomEmitter(u,w.EventType.Tap)).event;L.Event.any(f,y,C)(v,null,h.disposables),d.appendChild(u)}}e.renderQuickInputDescription=n}),define(J[744],ee([1,0,7,44,69,218,214,16,14,371,101,11,6,115,2,17,9,18,705,326,168]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const a=_.$;class l{get checked(){return!!this._checked}set checked(O){O!==this._checked&&(this._checked=O,this._onChecked.fire(O))}constructor(O){this.hidden=!1,this._onChecked=new t.Emitter,this.onChecked=this._onChecked.event,Object.assign(this,O)}dispose(){this._onChecked.dispose()}}class u{get templateId(){return u.ID}renderTemplate(O){const R=Object.create(null);R.toDisposeElement=[],R.toDisposeTemplate=[],R.entry=_.append(O,a(".quick-input-list-entry"));const M=_.append(R.entry,a("label.quick-input-list-label"));R.toDisposeTemplate.push(_.addStandardDisposableListener(M,_.EventType.CLICK,V=>{R.checkbox.offsetParent||V.preventDefault()})),R.checkbox=_.append(M,a("input.quick-input-list-checkbox")),R.checkbox.type="checkbox",R.toDisposeTemplate.push(_.addStandardDisposableListener(R.checkbox,_.EventType.CHANGE,V=>{R.element.checked=R.checkbox.checked}));const N=_.append(M,a(".quick-input-list-rows")),P=_.append(N,a(".quick-input-list-row")),x=_.append(N,a(".quick-input-list-row"));R.label=new D.IconLabel(P,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const F=_.append(P,a(".quick-input-list-entry-keybinding"));R.keybinding=new w.KeybindingLabel(F,r.OS);const B=_.append(x,a(".quick-input-list-label-meta"));return R.detail=new D.IconLabel(B,{supportHighlights:!0,supportIcons:!0}),R.separator=_.append(R.entry,a(".quick-input-list-separator")),R.actionBar=new L.ActionBar(R.entry),R.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),R.toDisposeTemplate.push(R.actionBar),R}renderElement(O,R,M){M.element=O,O.element=(0,h.withNullAsUndefined)(M.entry);const N=O.item?O.item:O.separator;M.checkbox.checked=O.checked,M.toDisposeElement.push(O.onChecked(K=>M.checkbox.checked=K));const{labelHighlights:P,descriptionHighlights:x,detailHighlights:F}=O,B=Object.create(null);B.matches=P||[],B.descriptionTitle=O.saneDescription,B.descriptionMatches=x||[],N.type!=="separator"?(B.extraClasses=N.iconClasses,B.italic=N.italic,B.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(O.saneLabel,O.saneDescription,B),M.keybinding.set(N.type==="separator"?void 0:N.keybinding),O.saneDetail?(M.detail.element.style.display="",M.detail.setLabel(O.saneDetail,void 0,{matches:F,title:O.saneDetail})):M.detail.element.style.display="none",O.item&&O.separator&&O.separator.label?(M.separator.textContent=O.separator.label,M.separator.style.display=""):M.separator.style.display="none",M.entry.classList.toggle("quick-input-list-separator-border",!!O.separator);const V=N.buttons;V&&V.length?(M.actionBar.push(V.map((K,A)=>{let Y=K.iconClass||(K.iconPath?(0,c.getIconClass)(K.iconPath):void 0);return K.alwaysVisible&&(Y=Y?`${Y} always-visible`:"always-visible"),{id:`id-${A}`,class:Y,enabled:!0,label:"",tooltip:K.tooltip||"",run:()=>{N.type!=="separator"?O.fireButtonTriggered({button:K,item:N}):O.fireSeparatorButtonTriggered({button:K,separator:N})}}}),{icon:!0,label:!1}),M.entry.classList.add("has-actions")):M.entry.classList.remove("has-actions")}disposeElement(O,R,M){M.toDisposeElement=(0,n.dispose)(M.toDisposeElement),M.actionBar.clear()}disposeTemplate(O){O.toDisposeElement=(0,n.dispose)(O.toDisposeElement),O.toDisposeTemplate=(0,n.dispose)(O.toDisposeTemplate)}}u.ID="listelement";class v{getHeight(O){return O.item?O.saneDetail?44:22:24}getTemplateId(O){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=f={}));class p{constructor(O,R,M){this.parent=O,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=_.append(this.parent,a(".quick-input-list"));const N=new v,P=new I;this.list=M.createList("QuickInput",this.container,N,[new u],{identityProvider:{getId:F=>F.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:P}),this.list.getHTMLElement().id=R,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(F=>{const B=new k.StandardKeyboardEvent(F);switch(B.keyCode){case 10:this.toggleCheckbox();break;case 31:(r.isMacintosh?F.metaKey:F.ctrlKey)&&this.list.setFocus((0,b.range)(this.list.length));break;case 16:{const V=this.list.getFocus();V.length===1&&V[0]===0&&this._onLeave.fire();break}case 18:{const V=this.list.getFocus();V.length===1&&V[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(B)})),this.disposables.push(this.list.onMouseDown(F=>{F.browserEvent.button!==2&&F.browserEvent.preventDefault()})),this.disposables.push(_.addDisposableListener(this.container,_.EventType.CLICK,F=>{(F.x||F.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(F=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(F=>{typeof F.index=="number"&&(F.browserEvent.preventDefault(),this.list.setSelection([F.index]))}));const x=new S.ThrottledDelayer(M.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(F=>we(this,void 0,void 0,function*(){var B;if(F.browserEvent.target instanceof HTMLAnchorElement){x.cancel();return}if(!(!(F.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&_.isAncestor(F.browserEvent.relatedTarget,(B=F.element)===null||B===void 0?void 0:B.element)))try{yield x.trigger(()=>we(this,void 0,void 0,function*(){F.element&&this.showHover(F.element)}))}catch(V){if(!(0,s.isCancellationError)(V))throw V}}))),this.disposables.push(this.list.onMouseOut(F=>{var B;_.isAncestor(F.browserEvent.relatedTarget,(B=F.element)===null||B===void 0?void 0:B.element)||x.cancel()})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown,x)}get onDidChangeFocus(){return t.Event.map(this.list.onDidChangeFocus,O=>O.elements.map(R=>R.item))}get onDidChangeSelection(){return t.Event.map(this.list.onDidChangeSelection,O=>({items:O.elements.map(R=>R.item),event:O.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(O){this.list.scrollTop=O}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(O){this.list.getHTMLElement().ariaLabel=O}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(O,R=!0){for(let M=0,N=O.length;M<N;M++){const P=O[M];if(!P.hidden)if(P.checked)R=!0;else return!1}return R}getCheckedCount(){let O=0;const R=this.elements;for(let M=0,N=R.length;M<N;M++)R[M].checked&&O++;return O}getVisibleCount(){let O=0;const R=this.elements;for(let M=0,N=R.length;M<N;M++)R[M].hidden||O++;return O}setAllVisibleChecked(O){try{this._fireCheckedEvents=!1,this.elements.forEach(R=>{R.hidden||(R.checked=O)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(O){this.elementDisposables=(0,n.dispose)(this.elementDisposables);const R=N=>this.fireButtonTriggered(N),M=N=>this.fireSeparatorButtonTriggered(N);this.inputElements=O,this.elements=O.reduce((N,P,x)=>{var F,B,V;const K=x&&O[x-1],A=P.label?P.label.replace(/\\r?\\n/g," "):"",Y=(0,i.parseLabelWithIcons)(A).text.trim();let ie,le,ne,se,H,W,$;P.type!=="separator"&&(ie=P.meta&&P.meta.replace(/\\r?\\n/g," "),le=P.description&&P.description.replace(/\\r?\\n/g," "),ne=P.detail&&P.detail.replace(/\\r?\\n/g," "),se=(F=P.highlights)===null||F===void 0?void 0:F.label,H=(B=P.highlights)===null||B===void 0?void 0:B.description,W=(V=P.highlights)===null||V===void 0?void 0:V.detail,$=P.tooltip);const Z=P.ariaLabel||[A,le,ne].map(he=>(0,i.getCodiconAriaLabel)(he)).filter(he=>!!he).join(", "),Q=this.parent.classList.contains("show-checkboxes");let re;if(P.type==="separator"){if(!P.buttons)return N;re=P}else K&&K.type==="separator"&&!K.buttons&&(re=K);const ce=new l({hasCheckbox:Q,index:x,item:P.type!=="separator"?P:void 0,saneLabel:A,saneSortLabel:Y,saneMeta:ie,saneAriaLabel:Z,saneDescription:le,saneDetail:ne,saneTooltip:$,labelHighlights:se,descriptionHighlights:H,detailHighlights:W,checked:!1,separator:re,fireButtonTriggered:R,fireSeparatorButtonTriggered:M});return this.elementDisposables.push(ce),this.elementDisposables.push(ce.onChecked(()=>this.fireCheckedEvents())),N.push(ce),N},[]),this.elementsToIndexes=this.elements.reduce((N,P,x)=>{var F;return N.set((F=P.item)!==null&&F!==void 0?F:P.separator,x),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(O=>O.item)}setFocusedElements(O){if(this.list.setFocus(O.filter(R=>this.elementsToIndexes.has(R)).map(R=>this.elementsToIndexes.get(R))),O.length>0){const R=this.list.getFocus()[0];typeof R=="number"&&this.list.reveal(R)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(O){this.list.setSelection(O.filter(R=>this.elementsToIndexes.has(R)).map(R=>this.elementsToIndexes.get(R)))}getCheckedElements(){return this.elements.filter(O=>O.checked).map(O=>O.item).filter(O=>!!O)}setCheckedElements(O){try{this._fireCheckedEvents=!1;const R=new Set;for(const M of O)R.add(M);for(const M of this.elements)M.checked=R.has(M.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(O){this.list.getHTMLElement().style.pointerEvents=O?"":"none"}focus(O){if(!this.list.length)return;switch(O===f.Second&&this.list.length<2&&(O=f.First),O){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(O){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()),!(!O.element||!O.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:O.saneTooltip,target:O.element,linkHandler:P=>{this.options.linkOpenerDelegate(P)},showPointer:!0,container:this.container,hoverPosition:1},!1))}layout(O){this.list.getHTMLElement().style.maxHeight=O?`${Math.floor(O/44)*44+6}px`:"",this.list.layout()}filter(O){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const R=O;if(O=O.trim(),!O||!(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 P=N.index&&this.inputElements[N.index-1];N.item&&(N.separator=P&&P.type==="separator"&&!P.buttons?P:void 0)});else{let N;this.elements.forEach(P=>{let x;this.matchOnLabelMode==="fuzzy"?x=this.matchOnLabel?(0,h.withNullAsUndefined)((0,i.matchesFuzzyIconAware)(O,(0,i.parseLabelWithIcons)(P.saneLabel))):void 0:x=this.matchOnLabel?(0,h.withNullAsUndefined)(C(R,(0,i.parseLabelWithIcons)(P.saneLabel))):void 0;const F=this.matchOnDescription?(0,h.withNullAsUndefined)((0,i.matchesFuzzyIconAware)(O,(0,i.parseLabelWithIcons)(P.saneDescription||""))):void 0,B=this.matchOnDetail?(0,h.withNullAsUndefined)((0,i.matchesFuzzyIconAware)(O,(0,i.parseLabelWithIcons)(P.saneDetail||""))):void 0,V=this.matchOnMeta?(0,h.withNullAsUndefined)((0,i.matchesFuzzyIconAware)(O,(0,i.parseLabelWithIcons)(P.saneMeta||""))):void 0;if(x||F||B||V?(P.labelHighlights=x,P.descriptionHighlights=F,P.detailHighlights=B,P.hidden=!1):(P.labelHighlights=void 0,P.descriptionHighlights=void 0,P.detailHighlights=void 0,P.hidden=P.item?!P.item.alwaysShow:!0),P.item?P.separator=void 0:P.separator&&(P.hidden=!0),!this.sortByLabel){const K=P.index&&this.inputElements[P.index-1];N=K&&K.type==="separator"?K:N,N&&!P.hidden&&(P.separator=N,N=void 0)}})}const M=this.elements.filter(N=>!N.hidden);if(this.sortByLabel&&O){const N=O.toLowerCase();M.sort((P,x)=>E(P,x,N))}return this.elementsToIndexes=M.reduce((N,P,x)=>{var F;return N.set((F=P.item)!==null&&F!==void 0?F:P.separator,x),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 O=this.list.getFocusedElements(),R=this.allVisibleChecked(O);for(const M of O)M.checked=!R}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(O){this.container.style.display=O?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,n.dispose)(this.elementDisposables),this.disposables=(0,n.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(O){this._onButtonTriggered.fire(O)}fireSeparatorButtonTriggered(O){this._onSeparatorButtonTriggered.fire(O)}style(O){this.list.style(O)}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 n.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)}}e.QuickInputList=p,Te([m.memoize],p.prototype,"onDidChangeFocus",null),Te([m.memoize],p.prototype,"onDidChangeSelection",null);function C(T,O){const{text:R,iconOffsets:M}=O;if(!M||M.length===0)return y(T,R);const N=(0,d.ltrim)(R," "),P=R.length-N.length,x=y(T,N);if(x)for(const F of x){const B=M[F.start+P]+P;F.start+=B,F.end+=B}return x}function y(T,O){const R=O.toLowerCase().indexOf(T.toLowerCase());return R!==-1?[{start:R,end:R+T.length}]:null}function E(T,O,R){const M=T.labelHighlights||[],N=O.labelHighlights||[];return M.length&&!N.length?-1:!M.length&&N.length?1:M.length===0&&N.length===0?0:(0,g.compareAnything)(T.saneSortLabel,O.saneSortLabel,R)}class I{getWidgetAriaLabel(){return(0,o.localize)(0,null)}getAriaLabel(O){var R;return!((R=O.separator)===null||R===void 0)&&R.label?`${O.saneAriaLabel}, ${O.separator.label}`:O.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(O){return O.hasCheckbox?"checkbox":"option"}isChecked(O){if(O.hasCheckbox)return{value:O.checked,onDidChange:O.onChecked}}}}),define(J[71],ee([1,0,8]),function(j,e,_){"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=k={}));var L;(function(w){w[w.NONE=0]="NONE",w[w.FIRST=1]="FIRST",w[w.SECOND=2]="SECOND",w[w.LAST=3]="LAST"})(L||(e.ItemActivation=L={}));class D{constructor(b){this.options=b}}e.QuickPickItemScorerAccessor=D,e.quickPickItemScorerAccessor=new D,e.IQuickInputService=(0,_.createDecorator)("quickInputService")}),define(J[745],ee([1,0,7,44,69,301,294,554,149,40,16,14,20,26,6,2,17,104,31,18,704,71,743,744,326,168]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const p=_.$,C={iconClass:o.ThemeIcon.asClassName(i.Codicon.quickInputBack),tooltip:(0,a.localize)(0,null),handle:-1};class y extends r.Disposable{constructor(R){super(),this.ui=R,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=y.noPromptMessage,this._severity=h.default.Ignore,this.onDidTriggerButtonEmitter=this._register(new n.Emitter),this.onDidHideEmitter=this._register(new n.Emitter),this.onDisposeEmitter=this._register(new n.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&&!d.isIOS;this._ignoreFocusOut=R&&!d.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=l.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 P=this.getDescription();if(this.ui.description1.textContent!==P&&(this.ui.description1.textContent=P),this.ui.description2.textContent!==P&&(this.ui.description2.textContent=P),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?_.reset(this.ui.widget,this._widget):_.reset(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new s.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 F=this.buttons.filter(V=>V===C);this.ui.leftActionBar.push(F.map((V,K)=>{const A=new g.Action(`id-${K}`,"",V.iconClass||(0,f.getIconClass)(V.iconPath),!0,()=>we(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(V)}));return A.tooltip=V.tooltip||"",A}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const B=this.buttons.filter(V=>V!==C);this.ui.rightActionBar.push(B.map((V,K)=>{const A=new g.Action(`id-${K}`,"",V.iconClass||(0,f.getIconClass)(V.iconPath),!0,()=>we(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(V)}));return A.tooltip=V.tooltip||"",A}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const F=(M=(R=this.toggles)===null||R===void 0?void 0:R.filter(B=>B instanceof S.Toggle))!==null&&M!==void 0?M:[];this.ui.inputBox.toggles=F}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const x=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==x&&(this._lastValidationMessage=x,_.reset(this.ui.message),(0,f.renderQuickInputDescription)(x,this.ui.message,{callback:F=>{this.ui.linkOpenerDelegate(F)},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!==h.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()}}y.noPromptMessage=(0,a.localize)(1,null);class E extends y{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new n.Emitter),this.onWillAcceptEmitter=this._register(new n.Emitter),this.onDidAcceptEmitter=this._register(new n.Emitter),this.onDidCustomEmitter=this._register(new n.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=l.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new n.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new n.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new n.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new n.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?l.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(v.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(v.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),_.EventHelper.stop(R,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(v.QuickInputListFocus.Previous):this.ui.list.focus(v.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),_.EventHelper.stop(R,!0);break;case 12:this.ui.list.focus(v.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),_.EventHelper.stop(R,!0);break;case 11:this.ui.list.focus(v.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),_.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(v.QuickInputListFocus.First),_.EventHelper.stop(R,!0));break;case 13:(R.ctrlKey||R.metaKey)&&!R.shiftKey&&!R.altKey&&(this.ui.list.focus(v.QuickInputListFocus.Last),_.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,P)=>N===P)||(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 _.addDisposableListener(this.ui.container,_.EventType.KEY_UP,R=>{if(this.canSelectMany||!this._quickNavigate)return;const M=new k.StandardKeyboardEvent(R),N=M.keyCode;this._quickNavigate.keybindings.some(F=>{const B=F.getChords();return B.length>1?!1:B[0].shiftKey&&N===4?!(M.ctrlKey||M.altKey||M.metaKey):!!(B[0].altKey&&N===6||B[0].ctrlKey&&N===5||B[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 P=this.ariaLabel;if(!P&&N.inputBox&&(P=this.placeholder||E.DEFAULT_ARIA_LABEL,this.title&&(P+=` - ${this.title}`)),this.ui.list.ariaLabel!==P&&(this.ui.list.ariaLabel=(0,c.withUndefinedAsNull)(P)),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 l.ItemActivation.NONE:this._itemActivation=l.ItemActivation.FIRST;break;case l.ItemActivation.SECOND:this.ui.list.focus(v.QuickInputListFocus.Second),this._itemActivation=l.ItemActivation.FIRST;break;case l.ItemActivation.LAST:this.ui.list.focus(v.QuickInputListFocus.Last),this._itemActivation=l.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(v.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=R)}}E.DEFAULT_ARIA_LABEL=(0,a.localize)(3,null);class I extends y{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new n.Emitter),this.onDidAcceptEmitter=this._register(new n.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 n.Emitter),this.onDidCustomEmitter=this._register(new n.Emitter),this.onDidTriggerButtonEmitter=this._register(new n.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new n.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new n.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(_.addDisposableListener(window,_.EventType.KEY_DOWN,R,!0)),this._register(_.addDisposableListener(window,_.EventType.KEY_UP,R,!0)),this._register(_.addDisposableListener(window,_.EventType.MOUSE_DOWN,R,!0))}getUI(){if(this.ui)return this.ui;const R=_.append(this.parentElement,p(".quick-input-widget.show-file-icons"));R.tabIndex=-1,R.style.display="none";const M=_.createStyleSheet(R),N=_.append(R,p(".quick-input-titlebar")),P=this._register(new L.ActionBar(N));P.domNode.classList.add("quick-input-left-action-bar");const x=_.append(N,p(".quick-input-title")),F=this._register(new L.ActionBar(N));F.domNode.classList.add("quick-input-right-action-bar");const B=_.append(R,p(".quick-input-description")),V=_.append(R,p(".quick-input-header")),K=_.append(V,p("input.quick-input-check-all"));K.type="checkbox",K.setAttribute("aria-label",(0,a.localize)(4,null)),this._register(_.addStandardDisposableListener(K,_.EventType.CHANGE,U=>{const X=K.checked;q.setAllVisibleChecked(X)})),this._register(_.addDisposableListener(K,_.EventType.CLICK,U=>{(U.x||U.y)&&le.setFocus()}));const A=_.append(V,p(".quick-input-description")),Y=_.append(V,p(".quick-input-and-message")),ie=_.append(Y,p(".quick-input-filter")),le=this._register(new u.QuickInputBox(ie,this.styles.inputBox,this.styles.toggle));le.setAttribute("aria-describedby",`${this.idPrefix}message`);const ne=_.append(ie,p(".quick-input-visible-count"));ne.setAttribute("aria-live","polite"),ne.setAttribute("aria-atomic","true");const se=new w.CountBadge(ne,{countFormat:(0,a.localize)(5,null)},this.styles.countBadge),H=_.append(ie,p(".quick-input-count"));H.setAttribute("aria-live","polite");const W=new w.CountBadge(H,{countFormat:(0,a.localize)(6,null)},this.styles.countBadge),$=_.append(V,p(".quick-input-action")),Z=new D.Button($,this.styles.button);Z.label=(0,a.localize)(7,null),this._register(Z.onDidClick(U=>{this.onDidAcceptEmitter.fire()}));const Q=_.append(V,p(".quick-input-action")),re=new D.Button(Q,this.styles.button);re.label=(0,a.localize)(8,null),this._register(re.onDidClick(U=>{this.onDidCustomEmitter.fire()}));const ce=_.append(Y,p(`#${this.idPrefix}message.quick-input-message`)),he=new b.ProgressBar(R,this.styles.progressBar);he.getContainer().classList.add("quick-input-progress");const de=_.append(R,p(".quick-input-html-widget"));de.tabIndex=-1;const ue=this.idPrefix+"list",q=this._register(new v.QuickInputList(R,ue,this.options));le.setAttribute("aria-controls",ue),this._register(q.onDidChangeFocus(()=>{var U;le.setAttribute("aria-activedescendant",(U=q.getActiveDescendant())!==null&&U!==void 0?U:"")})),this._register(q.onChangedAllVisibleChecked(U=>{K.checked=U})),this._register(q.onChangedVisibleCount(U=>{se.setCount(U)})),this._register(q.onChangedCheckedCount(U=>{W.setCount(U)})),this._register(q.onLeave(()=>{setTimeout(()=>{le.setFocus(),this.controller instanceof E&&this.controller.canSelectMany&&q.clearFocus()},0)}));const z=_.trackFocus(R);return this._register(z),this._register(_.addDisposableListener(R,_.EventType.FOCUS,U=>{this.previousFocusElement=U.relatedTarget instanceof HTMLElement?U.relatedTarget:void 0},!0)),this._register(z.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(l.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(_.addDisposableListener(R,_.EventType.FOCUS,U=>{le.setFocus()})),this._register(_.addDisposableListener(R,_.EventType.KEY_DOWN,U=>{const X=new k.StandardKeyboardEvent(U);switch(X.keyCode){case 3:_.EventHelper.stop(U,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:_.EventHelper.stop(U,!0),this.hide(l.QuickInputHideReason.Gesture);break;case 2:if(!X.altKey&&!X.ctrlKey&&!X.metaKey){const te=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(R.classList.contains("show-checkboxes")?te.push("input"):te.push("input[type=text]"),this.getUI().list.isDisplayed()&&te.push(".monaco-list"),this.getUI().message&&te.push(".quick-input-message a"),this.getUI().widget){if(_.isAncestor(X.target,this.getUI().widget))break;te.push(".quick-input-html-widget")}const G=R.querySelectorAll(te.join(", "));X.shiftKey&&X.target===G[0]?(_.EventHelper.stop(U,!0),q.clearFocus()):!X.shiftKey&&_.isAncestor(X.target,G[G.length-1])&&(_.EventHelper.stop(U,!0),G[0].focus())}break;case 10:X.ctrlKey&&(_.EventHelper.stop(U,!0),this.getUI().list.toggleHover());break}})),this.ui={container:R,styleSheet:M,leftActionBar:P,titleBar:N,title:x,description1:B,description2:A,widget:de,rightActionBar:F,checkAll:K,filterContainer:ie,inputBox:le,visibleCountContainer:ne,visibleCount:se,countContainer:H,count:W,okContainer:$,ok:Z,message:ce,customButtonContainer:Q,customButton:re,list:q,progressBar:he,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:U=>this.show(U),hide:()=>this.hide(),setVisibilities:U=>this.setVisibilities(U),setEnabled:U=>this.setEnabled(U),setContextKey:U=>this.options.setContextKey(U),linkOpenerDelegate:U=>this.options.linkOpenerDelegate(U)},this.updateStyles(),this.ui}pick(R,M={},N=t.CancellationToken.None){return new Promise((P,x)=>{let F=A=>{var Y;F=P,(Y=M.onKeyMods)===null||Y===void 0||Y.call(M,B.keyMods),P(A)};if(N.isCancellationRequested){F(void 0);return}const B=this.createQuickPick();let V;const K=[B,B.onDidAccept(()=>{if(B.canSelectMany)F(B.selectedItems.slice()),B.hide();else{const A=B.activeItems[0];A&&(F(A),B.hide())}}),B.onDidChangeActive(A=>{const Y=A[0];Y&&M.onDidFocus&&M.onDidFocus(Y)}),B.onDidChangeSelection(A=>{if(!B.canSelectMany){const Y=A[0];Y&&(F(Y),B.hide())}}),B.onDidTriggerItemButton(A=>M.onDidTriggerItemButton&&M.onDidTriggerItemButton(Object.assign(Object.assign({},A),{removeItem:()=>{const Y=B.items.indexOf(A.item);if(Y!==-1){const ie=B.items.slice(),le=ie.splice(Y,1),ne=B.activeItems.filter(H=>H!==le[0]),se=B.keepScrollPosition;B.keepScrollPosition=!0,B.items=ie,ne&&(B.activeItems=ne),B.keepScrollPosition=se}}}))),B.onDidTriggerSeparatorButton(A=>{var Y;return(Y=M.onDidTriggerSeparatorButton)===null||Y===void 0?void 0:Y.call(M,A)}),B.onDidChangeValue(A=>{V&&!A&&(B.activeItems.length!==1||B.activeItems[0]!==V)&&(B.activeItems=[V])}),N.onCancellationRequested(()=>{B.hide()}),B.onDidHide(()=>{(0,r.dispose)(K),F(void 0)})];B.title=M.title,B.canSelectMany=!!M.canPickMany,B.placeholder=M.placeHolder,B.ignoreFocusOut=!!M.ignoreFocusLost,B.matchOnDescription=!!M.matchOnDescription,B.matchOnDetail=!!M.matchOnDetail,B.matchOnLabel=M.matchOnLabel===void 0||M.matchOnLabel,B.autoFocusOnList=M.autoFocusOnList===void 0||M.autoFocusOnList,B.quickNavigate=M.quickNavigate,B.hideInput=!!M.hideInput,B.contextKey=M.contextKey,B.busy=!0,Promise.all([R,M.activeItem]).then(([A,Y])=>{V=Y,B.busy=!1,B.items=A,B.canSelectMany&&(B.selectedItems=A.filter(ie=>ie.type!=="separator"&&ie.picked)),V&&(B.activeItems=[V])}),B.show(),Promise.resolve(R).then(void 0,A=>{x(A),B.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="",_.reset(M.widget),M.rightActionBar.clear(),M.checkAll.checked=!1,M.inputBox.placeholder="",M.inputBox.password=!1,M.inputBox.showDecoration(h.default.Ignore),M.visibleCount.setCount(0),M.count.setCount(0),_.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 P=this.options.backKeybindingLabel();C.tooltip=P?(0,a.localize)(9,null,P):(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 P=!(!((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",!P){let x=this.previousFocusElement;for(;x&&!x.offsetParent;)x=(0,c.withNullAsUndefined)(x.parentElement);x?.offsetParent?(x.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:P,widgetShadow:x}=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=P?`1px solid ${P}`:"",this.ui.container.style.boxShadow=x?`0 0 8px 2px ${x}`:"",this.ui.list.style(this.styles.list);const F=[];this.styles.pickerGroup.pickerGroupBorder&&F.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&F.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&F.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)&&(F.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&F.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&F.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&F.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&F.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&F.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),F.push("}"));const B=F.join(`\n`);B!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=B)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}e.QuickInputController=T,T.MAX_WIDTH=600}),define(J[37],ee([1,0,81,18]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class L{constructor(){this.data=new Map}add(w,b){_.ok(k.isString(w)),_.ok(k.isObject(b)),_.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 L}),define(J[327],ee([1,0,37]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalSelectionTransfer=e.Extensions=e.CodeDataTransfers=void 0,e.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"};class k{}e.Extensions={DragAndDropContribution:"workbench.contributions.dragAndDrop"},_.Registry.add(e.Extensions.DragAndDropContribution,new k);class L{constructor(){}static getInstance(){return L.INSTANCE}hasData(w){return w&&w===this.proto}getData(w){if(this.hasData(w))return this.data}}e.LocalSelectionTransfer=L,L.INSTANCE=new L}),define(J[328],ee([1,0,191,165,103,21,327]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toExternalVSDataTransfer=e.toVSDataTransfer=void 0;function b(s){const t=new k.VSDataTransfer;for(const i of s.items){const n=i.type;if(i.kind==="string"){const r=new Promise(d=>i.getAsString(d));t.append(n,(0,k.createStringDataTransferItem)(r))}else if(i.kind==="file"){const r=i.getAsFile();r&&t.append(n,S(r))}}return t}e.toVSDataTransfer=b;function S(s){const t=s.path?D.URI.parse(s.path):void 0;return(0,k.createFileDataTransferItem)(s.name,t,()=>we(this,void 0,void 0,function*(){return new Uint8Array(yield s.arrayBuffer())}))}const g=Object.freeze([w.CodeDataTransfers.EDITORS,w.CodeDataTransfers.FILES,_.DataTransfers.RESOURCES,_.DataTransfers.INTERNAL_URI_LIST]);function m(s,t=!1){const i=b(s),n=i.get(_.DataTransfers.INTERNAL_URI_LIST);if(n)i.replace(L.Mimes.uriList,n);else if(t||!i.has(L.Mimes.uriList)){const r=[];for(const d of s.items){const h=d.getAsFile();if(h){const o=h.path;try{o?r.push(D.URI.file(o).toString()):r.push(D.URI.parse(h.name,!0).toString())}catch{}}}r.length&&i.replace(L.Mimes.uriList,(0,k.createStringDataTransferItem)(k.UriList.create(r)))}for(const r of g)i.delete(r);return i}e.toExternalVSDataTransfer=m}),define(J[233],ee([1,0,6,37]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function L(b){return b.length>0&&b.charAt(b.length-1)==="#"?b.substring(0,b.length-1):b}class D{constructor(){this._onDidChangeSchema=new _.Emitter,this.schemasById={}}registerSchema(S,g){this.schemasById[L(S)]=g,this._onDidChangeSchema.fire(S)}notifySchemaChanged(S){this._onDidChangeSchema.fire(S)}}const w=new D;k.Registry.add(e.Extensions.JSONContribution,w)}),define(J[98],ee([1,0,16,6,18,693,28,233,37]),function(j,e,_,k,L,D,w,b,S){"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 g=S.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={},g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(o,c=!0){this.registerConfigurations([o],c)}registerConfigurations(o,c=!0){const a=new Set;this.doRegisterConfigurations(o,c,a),g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a})}registerDefaultConfigurations(o){const c=new Set;this.doRegisterDefaultConfigurations(o,c),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:c,defaultsOverrides:!0})}doRegisterDefaultConfigurations(o,c){var a;const l=[];for(const{overrides:u,source:v}of o)for(const f in u)if(c.add(f),e.OVERRIDE_PROPERTY_REGEX.test(f)){const p=this.configurationDefaultsOverrides.get(f),C=(a=p?.valuesSources)!==null&&a!==void 0?a:new Map;if(v)for(const T of Object.keys(u[f]))C.set(T,v);const y=Object.assign(Object.assign({},p?.value||{}),u[f]);this.configurationDefaultsOverrides.set(f,{source:v,value:y,valuesSources:C});const E=(0,w.getLanguageTagSettingPlainKey)(f),I={type:"object",default:y,description:D.localize(1,null,E),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:y,source:L.isString(v)?void 0:v,defaultValueSource:v};l.push(...i(f)),this.configurationProperties[f]=I,this.defaultLanguageConfigurationOverridesNode.properties[f]=I}else{this.configurationDefaultsOverrides.set(f,{value:u[f],source:v});const p=this.configurationProperties[f];p&&(this.updatePropertyDefaultValue(f,p),this.updateSchema(f,p))}this.doRegisterOverrideIdentifiers(l)}registerOverrideIdentifiers(o){this.doRegisterOverrideIdentifiers(o),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(o){for(const c of o)this.overrideIdentifiers.add(c);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(o,c,a){o.forEach(l=>{this.validateAndRegisterProperties(l,c,l.extensionInfo,l.restrictedProperties,void 0,a),this.configurationContributors.push(l),this.registerJSONConfiguration(l)})}validateAndRegisterProperties(o,c=!0,a,l,u=3,v){var f;u=L.isUndefinedOrNull(o.scope)?u:o.scope;const p=o.properties;if(p)for(const y in p){const E=p[y];if(c&&d(y,E)){delete p[y];continue}if(E.source=a,E.defaultDefaultValue=p[y].default,this.updatePropertyDefaultValue(y,E),e.OVERRIDE_PROPERTY_REGEX.test(y)?E.scope=void 0:(E.scope=L.isUndefinedOrNull(E.scope)?u:E.scope,E.restricted=L.isUndefinedOrNull(E.restricted)?!!l?.includes(y):E.restricted),p[y].hasOwnProperty("included")&&!p[y].included){this.excludedConfigurationProperties[y]=p[y],delete p[y];continue}else this.configurationProperties[y]=p[y],!((f=p[y].policy)===null||f===void 0)&&f.name&&this.policyConfigurations.set(p[y].policy.name,y);!p[y].deprecationMessage&&p[y].markdownDeprecationMessage&&(p[y].deprecationMessage=p[y].markdownDeprecationMessage),v.add(y)}const C=o.allOf;if(C)for(const y of C)this.validateAndRegisterProperties(y,c,a,l,u,v)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(o){const c=a=>{const l=a.properties;if(l)for(const v in l)this.updateSchema(v,l[v]);const u=a.allOf;u?.forEach(c)};c(o)}updateSchema(o,c){switch(e.allSettings.properties[o]=c,c.scope){case 1:e.applicationSettings.properties[o]=c;break;case 2:e.machineSettings.properties[o]=c;break;case 6:e.machineOverridableSettings.properties[o]=c;break;case 3:e.windowSettings.properties[o]=c;break;case 4:e.resourceSettings.properties[o]=c;break;case 5:e.resourceSettings.properties[o]=c,this.resourceLanguageSettingsSchema.properties[o]=c;break}}updateOverridePropertyPatternKey(){for(const o of this.overrideIdentifiers.values()){const c=`[${o}]`,a={type:"object",description:D.localize(2,null),errorMessage:D.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(c,a),e.allSettings.properties[c]=a,e.applicationSettings.properties[c]=a,e.machineSettings.properties[c]=a,e.machineOverridableSettings.properties[c]=a,e.windowSettings.properties[c]=a,e.resourceSettings.properties[c]=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,c){const a=this.configurationDefaultsOverrides.get(o);let l=a?.value,u=a?.source;L.isUndefined(l)&&(l=c.defaultDefaultValue,u=void 0),L.isUndefined(l)&&(l=n(c.type)),c.default=l,c.defaultValueSource=u}}const s="\\\\[([^\\\\]]+)\\\\]",t=new RegExp(s,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${s})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function i(h){const o=[];if(e.OVERRIDE_PROPERTY_REGEX.test(h)){let c=t.exec(h);for(;c?.length;){const a=c[1].trim();a&&o.push(a),c=t.exec(h)}}return(0,_.distinct)(o)}e.overrideIdentifiersFromKey=i;function n(h){switch(Array.isArray(h)?h[0]:h){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=n;const r=new m;S.Registry.add(e.Extensions.Configuration,r);function d(h,o){var c,a,l,u;return h.trim()?e.OVERRIDE_PROPERTY_REGEX.test(h)?D.localize(7,null,h):r.getConfigurationProperties()[h]!==void 0?D.localize(8,null,h):!((c=o.policy)===null||c===void 0)&&c.name&&r.getPolicyConfigurations().get((a=o.policy)===null||a===void 0?void 0:a.name)!==void 0?D.localize(9,null,h,(l=o.policy)===null||l===void 0?void 0:l.name,r.getPolicyConfigurations().get((u=o.policy)===null||u===void 0?void 0:u.name)):null:D.localize(6,null)}e.validateProperty=d}),define(J[329],ee([1,0,41,169,597,98,37]),function(j,e,_,k,L,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:L.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:L.localize(1,null,"`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:L.localize(2,null)},"editor.insertSpaces":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:L.localize(3,null,"`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:L.localize(4,null,"`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:L.localize(5,null)},"editor.largeFileOptimizations":{type:"boolean",default:k.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:L.localize(6,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:L.localize(7,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[L.localize(8,null),L.localize(9,null),L.localize(10,null)],description:L.localize(11,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[L.localize(12,null),L.localize(13,null),L.localize(14,null)],default:"configuredByTheme",description:L.localize(15,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:L.localize(16,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:L.localize(17,null)},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:L.localize(18,null),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:L.localize(19,null)},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:L.localize(20,null)},"editor.language.brackets":{type:["array","null"],default:null,description:L.localize(21,null),items:{type:"array",items:[{type:"string",description:L.localize(22,null)},{type:"string",description:L.localize(23,null)}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:L.localize(24,null),items:{type:"array",items:[{type:"string",description:L.localize(25,null)},{type:"string",description:L.localize(26,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:L.localize(27,null)},"diffEditor.maxFileSize":{type:"number",default:50,description:L.localize(28,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:L.localize(29,null)},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:L.localize(30,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:L.localize(31,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:L.localize(32,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:L.localize(33,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[L.localize(34,null),L.localize(35,null),L.localize(36,null,"`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:"legacy",markdownEnumDescriptions:[L.localize(37,null),L.localize(38,null)],tags:["experimental"]},"diffEditor.experimental.collapseUnchangedRegions":{type:"boolean",default:!1,description:L.localize(39,null)},"diffEditor.experimental.useVersion2":{type:"boolean",default:!1,description:L.localize(40,null)}}});function S(n){return typeof n.type<"u"||typeof n.anyOf<"u"}for(const n of _.editorOptionsRegistry){const r=n.schema;if(typeof r<"u")if(S(r))b.properties[`editor.${n.name}`]=r;else for(const d in r)Object.hasOwnProperty.call(r,d)&&(b.properties[d]=r[d])}let g=null;function m(){return g===null&&(g=Object.create(null),Object.keys(b.properties).forEach(n=>{g[n]=!0})),g}function s(n){return m()[`editor.${n}`]||!1}e.isEditorConfigurationKey=s;function t(n){return m()[`diffEditor.${n}`]||!1}e.isDiffEditorConfigurationKey=t,w.Registry.as(D.Extensions.Configuration).registerConfiguration(b)}),define(J[72],ee([1,0,602,6,37,103,98]),function(j,e,_,k,L,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(g){return this._languages.push(g),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let m=0,s=this._languages.length;m<s;m++)if(this._languages[m]===g){this._languages.splice(m,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=b,e.ModesRegistry=new b,L.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:[_.localize(0,null),"text"],mimetypes:[D.Mimes.text]}),L.Registry.as(w.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(J[29],ee([1,0,6,2,9,140,105,122,484,575,485,488,224,8,28,39,49,72,487]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,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 c{constructor(N){this.languageId=N}affects(N){return this.languageId?this.languageId===N:!0}}e.LanguageConfigurationServiceChangeEvent=c,e.ILanguageConfigurationService=(0,i.createDecorator)("languageConfigurationService");let a=e.LanguageConfigurationService=class extends k.Disposable{constructor(N,P){super(),this.configurationService=N,this.languageService=P,this._registry=this._register(new O),this.onDidChangeEmitter=this._register(new _.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const x=new Set(Object.values(u));this._register(this.configurationService.onDidChangeConfiguration(F=>{const B=F.change.keys.some(K=>x.has(K)),V=F.change.overrides.filter(([K,A])=>A.some(Y=>x.has(Y))).map(([K])=>K);if(B)this.configurations.clear(),this.onDidChangeEmitter.fire(new c(void 0));else for(const K of V)this.languageService.isRegisteredLanguageId(K)&&(this.configurations.delete(K),this.onDidChangeEmitter.fire(new c(K)))})),this._register(this._registry.onDidChange(F=>{this.configurations.delete(F.languageId),this.onDidChangeEmitter.fire(new c(F.languageId))}))}register(N,P,x){return this._registry.register(N,P,x)}getLanguageConfiguration(N){let P=this.configurations.get(N);return P||(P=l(N,this._registry,this.configurationService,this.languageService),this.configurations.set(N,P)),P}};e.LanguageConfigurationService=a=Te([ge(0,n.IConfigurationService),ge(1,r.ILanguageService)],a);function l(M,N,P,x){let F=N.getLanguageConfiguration(M);if(!F){if(!x.isRegisteredLanguageId(M))return new R(M,{});F=new R(M,{})}const B=v(F.languageId,P),V=E([F.underlyingConfig,B]);return new R(F.languageId,V)}const u={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function v(M,N){const P=N.getValue(u.brackets,{overrideIdentifier:M}),x=N.getValue(u.colorizedBracketPairs,{overrideIdentifier:M});return{brackets:f(P),colorizedBracketPairs:f(x)}}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 p(M,N,P){const x=M.getLineContent(N);let F=L.getLeadingWhitespace(x);return F.length>P-1&&(F=F.substring(0,P-1)),F}e.getIndentationAtPosition=p;function C(M,N,P){M.tokenization.forceTokenization(N);const x=M.tokenization.getLineTokens(N),F=typeof P>"u"?M.getLineMaxColumn(N)-1:P-1;return(0,b.createScopedLineTokens)(x,F)}e.getScopedLineTokens=C;class y{constructor(N){this.languageId=N,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(N,P){const x=new I(N,P,++this._order);return this._entries.push(x),this._resolved=null,(0,k.toDisposable)(()=>{for(let F=0;F<this._entries.length;F++)if(this._entries[F]===x){this._entries.splice(F,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 P of M)N={comments:P.comments||N.comments,brackets:P.brackets||N.brackets,wordPattern:P.wordPattern||N.wordPattern,indentationRules:P.indentationRules||N.indentationRules,onEnterRules:P.onEnterRules||N.onEnterRules,autoClosingPairs:P.autoClosingPairs||N.autoClosingPairs,surroundingPairs:P.surroundingPairs||N.surroundingPairs,autoCloseBefore:P.autoCloseBefore||N.autoCloseBefore,folding:P.folding||N.folding,colorizedBracketPairs:P.colorizedBracketPairs||N.colorizedBracketPairs,__electricCharacterSupport:P.__electricCharacterSupport||N.__electricCharacterSupport};return N}class I{constructor(N,P,x){this.configuration=N,this.priority=P,this.order=x}static cmp(N,P){return N.priority===P.priority?N.order-P.order:N.priority-P.priority}}class T{constructor(N){this.languageId=N}}e.LanguageConfigurationChangeEvent=T;class O extends k.Disposable{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,this._register(this.register(h.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,P,x=0){let F=this._entries.get(N);F||(F=new y(N),this._entries.set(N,F));const B=F.register(P,x);return this._onDidChange.fire(new T(N)),(0,k.toDisposable)(()=>{B.dispose(),this._onDidChange.fire(new T(N))})}getLanguageConfiguration(N){const P=this._entries.get(N);return P?.getResolvedConfiguration()||null}}e.LanguageConfigurationRegistry=O;class R{constructor(N,P){this.languageId=N,this.underlyingConfig=P,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new s.OnEnterSupport(this.underlyingConfig):null,this.comments=R._handleComments(this.underlyingConfig),this.characterPair=new S.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 g.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(N,P,x,F){return this._onEnterSupport?this._onEnterSupport.onEnter(N,P,x,F):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 P=N.comments;if(!P)return null;const x={};if(P.lineComment&&(x.lineCommentToken=P.lineComment),P.blockComment){const[F,B]=P.blockComment;x.blockCommentStartToken=F,x.blockCommentEndToken=B}return x}}e.ResolvedLanguageConfiguration=R,(0,d.registerSingleton)(e.ILanguageConfigurationService,a,1)}),define(J[234],ee([1,0,14,2,305,567,5,29,583,50,180,9,16,63,56,11,19,141,87]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const c=60*1e3,a=5*60*1e3;function l(I,T){const O=I.getModel(T);return!(!O||O.isTooLargeForSyncing())}let u=e.EditorWorkerService=class extends k.Disposable{constructor(T,O,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:(P,x)=>l(this._modelService,P.uri)?this._workerManager.withWorker().then(F=>F.computeLinks(P.uri)).then(F=>F&&{links:F}):Promise.resolve({links:[]})})),this._register(N.completionProvider.register("*",new v(this._workerManager,O,this._modelService,M)))}dispose(){super.dispose()}canComputeUnicodeHighlights(T){return l(this._modelService,T)}computedUnicodeHighlights(T,O,R){return this._workerManager.withWorker().then(M=>M.computedUnicodeHighlights(T,O,R))}computeDiff(T,O,R,M){return we(this,void 0,void 0,function*(){const N=yield this._workerManager.withWorker().then(x=>x.computeDiff(T,O,R,M));return N?{identical:N.identical,quitEarly:N.quitEarly,changes:N.changes.map(x=>{var F;return new h.LineRangeMapping(new o.LineRange(x[0],x[1]),new o.LineRange(x[2],x[3]),(F=x[4])===null||F===void 0?void 0:F.map(B=>new h.RangeMapping(new w.Range(B[0],B[1],B[2],B[3]),new w.Range(B[4],B[5],B[6],B[7]))))})}:null})}computeMoreMinimalEdits(T,O,R=!1){if((0,t.isNonEmptyArray)(O)){if(!l(this._modelService,T))return Promise.resolve(O);const M=n.StopWatch.create(!0),N=this._workerManager.withWorker().then(P=>P.computeMoreMinimalEdits(T,O,R));return N.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",T.toString(!0),M.elapsed())),Promise.race([N,(0,_.timeout)(1e3).then(()=>O)])}else return Promise.resolve(void 0)}canNavigateValueSet(T){return l(this._modelService,T)}navigateValueSet(T,O,R){return this._workerManager.withWorker().then(M=>M.navigateValueSet(T,O,R))}canComputeWordRanges(T){return l(this._modelService,T)}computeWordRanges(T,O){return this._workerManager.withWorker().then(R=>R.computeWordRanges(T,O))}};e.EditorWorkerService=u=Te([ge(0,g.IModelService),ge(1,m.ITextResourceConfigurationService),ge(2,i.ILogService),ge(3,b.ILanguageConfigurationService),ge(4,d.ILanguageFeaturesService)],u);class v{constructor(T,O,R,M){this.languageConfigurationService=M,this._debugDisplayName="wordbasedCompletions",this._workerManager=T,this._configurationService=O,this._modelService=R}provideCompletionItems(T,O){return we(this,void 0,void 0,function*(){const R=this._configurationService.getValue(T.uri,O,"editor");if(!R.wordBasedSuggestions)return;const M=[];if(R.wordBasedSuggestionsMode==="currentDocument")l(this._modelService,T.uri)&&M.push(T.uri);else for(const K of this._modelService.getModels())l(this._modelService,K.uri)&&(K===T?M.unshift(K.uri):(R.wordBasedSuggestionsMode==="allDocuments"||K.getLanguageId()===T.getLanguageId())&&M.push(K.uri));if(M.length===0)return;const N=this.languageConfigurationService.getLanguageConfiguration(T.getLanguageId()).getWordDefinition(),P=T.getWordAtPosition(O),x=P?new w.Range(O.lineNumber,P.startColumn,O.lineNumber,P.endColumn):w.Range.fromPositions(O),F=x.setEndPosition(O.lineNumber,O.column),V=yield(yield this._workerManager.withWorker()).textualSuggest(M,P?.word,N);if(V)return{duration:V.duration,suggestions:V.words.map(K=>({kind:18,label:K,insertText:K,range:{insert:F,replace:x}}))}})}}class f extends k.Disposable{constructor(T,O){super(),this.languageConfigurationService=O,this._modelService=T,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new _.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 p extends k.Disposable{constructor(T,O,R){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=T,this._modelService=O,!R){const M=new _.IntervalTimer;M.cancelAndSet(()=>this._checkStopModelSync(),Math.round(c/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,O){for(const R of T){const M=R.toString();this._syncedModels[M]||this._beginModelSync(R,O),this._syncedModels[M]&&(this._syncedModelsLastUsedTime[M]=new Date().getTime())}}_checkStopModelSync(){const T=new Date().getTime(),O=[];for(const R in this._syncedModelsLastUsedTime)T-this._syncedModelsLastUsedTime[R]>c&&O.push(R);for(const R of O)this._stopModelSync(R)}_beginModelSync(T,O){const R=this._modelService.getModel(T);if(!R||!O&&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(P=>{this._proxy.acceptModelChanged(M.toString(),P)})),N.add(R.onWillDispose(()=>{this._stopModelSync(M)})),N.add((0,k.toDisposable)(()=>{this._proxy.acceptRemovedModel(M)})),this._syncedModels[M]=N}_stopModelSync(T){const O=this._syncedModels[T];delete this._syncedModels[T],delete this._syncedModelsLastUsedTime[T],(0,k.dispose)(O)}}class C{constructor(T){this._instance=T,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class y{constructor(T){this._workerClient=T}fhr(T,O){return this._workerClient.fhr(T,O)}}e.EditorWorkerHost=y;class E extends k.Disposable{constructor(T,O,R,M){super(),this.languageConfigurationService=M,this._disposed=!1,this._modelService=T,this._keepIdleModels=O,this._workerFactory=new D.DefaultWorkerFactory(R),this._worker=null,this._modelManager=null}fhr(T,O){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new L.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new y(this)))}catch(T){(0,L.logOnceWebWorkerWarning)(T),this._worker=new C(new S.EditorSimpleWorker(new y(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,T=>((0,L.logOnceWebWorkerWarning)(T),this._worker=new C(new S.EditorSimpleWorker(new y(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(T){return this._modelManager||(this._modelManager=this._register(new p(T,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(T,O=!1){return we(this,void 0,void 0,function*(){return this._disposed?Promise.reject((0,r.canceled)()):this._getProxy().then(R=>(this._getOrCreateModelManager(R).ensureSyncedResources(T,O),R))})}computedUnicodeHighlights(T,O,R){return this._withSyncedResources([T]).then(M=>M.computeUnicodeHighlights(T.toString(),O,R))}computeDiff(T,O,R,M){return this._withSyncedResources([T,O],!0).then(N=>N.computeDiff(T.toString(),O.toString(),R,M))}computeMoreMinimalEdits(T,O,R){return this._withSyncedResources([T]).then(M=>M.computeMoreMinimalEdits(T.toString(),O,R))}computeLinks(T){return this._withSyncedResources([T]).then(O=>O.computeLinks(T.toString()))}computeDefaultDocumentColors(T){return this._withSyncedResources([T]).then(O=>O.computeDefaultDocumentColors(T.toString()))}textualSuggest(T,O,R){return we(this,void 0,void 0,function*(){const M=yield this._withSyncedResources(T),N=R.source,P=(0,s.regExpFlags)(R);return M.textualSuggest(T.map(x=>x.toString()),O,N,P)})}computeWordRanges(T,O){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(),P=N.source,x=(0,s.regExpFlags)(N);return R.computeWordRanges(T.toString(),O,P,x)})}navigateValueSet(T,O,R){return this._withSyncedResources([T]).then(M=>{const N=this._modelService.getModel(T);if(!N)return null;const P=this.languageConfigurationService.getLanguageConfiguration(N.getLanguageId()).getWordDefinition(),x=P.source,F=(0,s.regExpFlags)(P);return M.navigateValueSet(T.toString(),O,R,x,F)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=E}),define(J[746],ee([1,0,45,234]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function L(w,b,S){return new D(w,b,S)}e.createWebWorker=L;class D extends k.EditorWorkerClient{constructor(b,S,g){super(b,g.keepIdleModels||!1,g.label,S),this._foreignModuleId=g.moduleId,this._foreignModuleCreateData=g.createData||null,this._foreignModuleHost=g.host||null,this._foreignProxy=null}fhr(b,S){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,S))}catch(g){return Promise.reject(g)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(b=>{const S=this._foreignModuleHost?(0,_.getAllMethodNames)(this._foreignModuleHost):[];return b.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,S).then(g=>{this._foreignModuleCreateData=null;const m=(i,n)=>b.fmr(i,n),s=(i,n)=>function(){const r=Array.prototype.slice.call(arguments,0);return n(i,r)},t={};for(const i of g)t[i]=s(i,m);return t})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(b){return this._withSyncedResources(b).then(S=>this.getProxy())}}}),define(J[235],ee([1,0,9,105,122,29]),function(j,e,_,k,L,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,n){const r=t.tokenization.getLanguageIdAtPosition(i,0);if(i>1){let d,h=-1;for(d=i-1;d>=1;d--){if(t.tokenization.getLanguageIdAtPosition(d,0)!==r)return h;const o=t.getLineContent(d);if(n.shouldIgnore(o)||/^\\s+$/.test(o)||o===""){h=d;continue}return d}}return-1}function b(t,i,n,r=!0,d){if(t<4)return null;const h=d.getLanguageConfiguration(i.tokenization.getLanguageId()).indentRulesSupport;if(!h)return null;if(n<=1)return{indentation:"",action:null};for(let a=n-1;a>0&&i.getLineContent(a)==="";a--)if(a===1)return{indentation:"",action:null};const o=w(i,n,h);if(o<0)return null;if(o<1)return{indentation:"",action:null};const c=i.getLineContent(o);if(h.shouldIncrease(c)||h.shouldIndentNextLine(c))return{indentation:_.getLeadingWhitespace(c),action:k.IndentAction.Indent,line:o};if(h.shouldDecrease(c))return{indentation:_.getLeadingWhitespace(c),action:null,line:o};{if(o===1)return{indentation:_.getLeadingWhitespace(i.getLineContent(o)),action:null,line:o};const a=o-1,l=h.getIndentMetadata(i.getLineContent(a));if(!(l&3)&&l&4){let u=0;for(let v=a-1;v>0;v--)if(!h.shouldIndentNextLine(i.getLineContent(v))){u=v;break}return{indentation:_.getLeadingWhitespace(i.getLineContent(u+1)),action:null,line:u+1}}if(r)return{indentation:_.getLeadingWhitespace(i.getLineContent(o)),action:null,line:o};for(let u=o;u>0;u--){const v=i.getLineContent(u);if(h.shouldIncrease(v))return{indentation:_.getLeadingWhitespace(v),action:k.IndentAction.Indent,line:u};if(h.shouldIndentNextLine(v)){let f=0;for(let p=u-1;p>0;p--)if(!h.shouldIndentNextLine(i.getLineContent(u))){f=p;break}return{indentation:_.getLeadingWhitespace(i.getLineContent(f+1)),action:null,line:f+1}}else if(h.shouldDecrease(v))return{indentation:_.getLeadingWhitespace(v),action:null,line:u}}return{indentation:_.getLeadingWhitespace(i.getLineContent(1)),action:null,line:1}}}e.getInheritIndentForLine=b;function S(t,i,n,r,d,h){if(t<4)return null;const o=h.getLanguageConfiguration(n);if(!o)return null;const c=h.getLanguageConfiguration(n).indentRulesSupport;if(!c)return null;const a=b(t,i,r,void 0,h),l=i.getLineContent(r);if(a){const u=a.line;if(u!==void 0){let v=!0;for(let f=u;f<r-1;f++)if(!/^\\s*$/.test(i.getLineContent(f))){v=!1;break}if(v){const f=o.onEnter(t,"",i.getLineContent(u),"");if(f){let p=_.getLeadingWhitespace(i.getLineContent(u));return f.removeText&&(p=p.substring(0,p.length-f.removeText)),f.indentAction===k.IndentAction.Indent||f.indentAction===k.IndentAction.IndentOutdent?p=d.shiftIndent(p):f.indentAction===k.IndentAction.Outdent&&(p=d.unshiftIndent(p)),c.shouldDecrease(l)&&(p=d.unshiftIndent(p)),f.appendText&&(p+=f.appendText),_.getLeadingWhitespace(p)}}}return c.shouldDecrease(l)?a.action===k.IndentAction.Indent?a.indentation:d.unshiftIndent(a.indentation):a.action===k.IndentAction.Indent?d.shiftIndent(a.indentation):a.indentation}return null}e.getGoodIndentForLine=S;function g(t,i,n,r,d){if(t<4)return null;i.tokenization.forceTokenization(n.startLineNumber);const h=i.tokenization.getLineTokens(n.startLineNumber),o=(0,L.createScopedLineTokens)(h,n.startColumn-1),c=o.getLineContent();let a=!1,l;o.firstCharOffset>0&&h.getLanguageId(0)!==o.languageId?(a=!0,l=c.substr(0,n.startColumn-1-o.firstCharOffset)):l=h.getLineContent().substring(0,n.startColumn-1);let u;n.isEmpty()?u=c.substr(n.startColumn-1-o.firstCharOffset):u=(0,D.getScopedLineTokens)(i,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-o.firstCharOffset);const v=d.getLanguageConfiguration(o.languageId).indentRulesSupport;if(!v)return null;const f=l,p=_.getLeadingWhitespace(l),C={tokenization:{getLineTokens:T=>i.tokenization.getLineTokens(T),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(T,O)=>i.getLanguageIdAtPosition(T,O)},getLineContent:T=>T===n.startLineNumber?f:i.getLineContent(T)},y=_.getLeadingWhitespace(h.getLineContent()),E=b(t,C,n.startLineNumber+1,void 0,d);if(!E){const T=a?y:p;return{beforeEnter:T,afterEnter:T}}let I=a?y:E.indentation;return E.action===k.IndentAction.Indent&&(I=r.shiftIndent(I)),v.shouldDecrease(u)&&(I=r.unshiftIndent(I)),{beforeEnter:a?y:p,afterEnter:I}}e.getIndentForEnter=g;function m(t,i,n,r,d,h){if(t<4)return null;const o=(0,D.getScopedLineTokens)(i,n.startLineNumber,n.startColumn);if(o.firstCharOffset)return null;const c=h.getLanguageConfiguration(o.languageId).indentRulesSupport;if(!c)return null;const a=o.getLineContent(),l=a.substr(0,n.startColumn-1-o.firstCharOffset);let u;if(n.isEmpty()?u=a.substr(n.startColumn-1-o.firstCharOffset):u=(0,D.getScopedLineTokens)(i,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-o.firstCharOffset),!c.shouldDecrease(l+u)&&c.shouldDecrease(l+r+u)){const v=b(t,i,n.startLineNumber,!1,h);if(!v)return null;let f=v.indentation;return v.action!==k.IndentAction.Indent&&(f=d.unshiftIndent(f)),f}return null}e.getIndentActionForType=m;function s(t,i,n){const r=n.getLanguageConfiguration(t.getLanguageId()).indentRulesSupport;return!r||i<1||i>t.getLineCount()?null:r.getIndentMetadata(t.getLineContent(i))}e.getIndentMetadata=s}),define(J[236],ee([1,0,105,29]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnterAction=void 0;function L(D,w,b,S){const g=(0,k.getScopedLineTokens)(w,b.startLineNumber,b.startColumn),m=S.getLanguageConfiguration(g.languageId);if(!m)return null;const s=g.getLineContent(),t=s.substr(0,b.startColumn-1-g.firstCharOffset);let i;b.isEmpty()?i=s.substr(b.startColumn-1-g.firstCharOffset):i=(0,k.getScopedLineTokens)(w,b.endLineNumber,b.endColumn).getLineContent().substr(b.endColumn-1-g.firstCharOffset);let n="";if(b.startLineNumber>1&&g.firstCharOffset===0){const a=(0,k.getScopedLineTokens)(w,b.startLineNumber-1);a.languageId===g.languageId&&(n=a.getLineContent())}const r=m.onEnter(D,n,t,i);if(!r)return null;const d=r.indentAction;let h=r.appendText;const o=r.removeText||0;h?d===_.IndentAction.Indent&&(h="\t"+h):d===_.IndentAction.Indent||d===_.IndentAction.IndentOutdent?h="\t":h="";let c=(0,k.getIndentationAtPosition)(w,b.startLineNumber,b.startColumn);return o&&(c=c.substring(0,c.length-o)),{indentAction:d,appendText:h,removeText:o,indentation:c}}e.getEnterAction=L}),define(J[237],ee([1,0,9,77,5,24,236,29]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=void 0;const S=Object.create(null);function g(s,t){if(t<=0)return"";S[s]||(S[s]=["",s]);const i=S[s];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+s;return i[t]}let m=e.ShiftCommand=class li{static unshiftIndent(t,i,n,r,d){const h=k.CursorColumns.visibleColumnFromColumn(t,i,n);if(d){const o=g(" ",r),a=k.CursorColumns.prevIndentTabStop(h,r)/r;return g(o,a)}else{const o="\t",a=k.CursorColumns.prevRenderTabStop(h,n)/n;return g(o,a)}}static shiftIndent(t,i,n,r,d){const h=k.CursorColumns.visibleColumnFromColumn(t,i,n);if(d){const o=g(" ",r),a=k.CursorColumns.nextIndentTabStop(h,r)/r;return g(o,a)}else{const o="\t",a=k.CursorColumns.nextRenderTabStop(h,n)/n;return g(o,a)}}constructor(t,i,n){this._languageConfigurationService=n,this._opts=i,this._selection=t,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(t,i,n){this._useLastEditRangeForCursorEndPosition?t.addTrackedEditOperation(i,n):t.addEditOperation(i,n)}getEditOperations(t,i){const n=this._selection.startLineNumber;let r=this._selection.endLineNumber;this._selection.endColumn===1&&n!==r&&(r=r-1);const{tabSize:d,indentSize:h,insertSpaces:o}=this._opts,c=n===r;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\\s*$/.test(t.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let a=0,l=0;for(let u=n;u<=r;u++,a=l){l=0;const v=t.getLineContent(u);let f=_.firstNonWhitespaceIndex(v);if(this._opts.isUnshift&&(v.length===0||f===0)||!c&&!this._opts.isUnshift&&v.length===0)continue;if(f===-1&&(f=v.length),u>1&&k.CursorColumns.visibleColumnFromColumn(v,f+1,d)%h!==0&&t.tokenization.isCheapToTokenize(u-1)){const y=(0,w.getEnterAction)(this._opts.autoIndent,t,new L.Range(u-1,t.getLineMaxColumn(u-1),u-1,t.getLineMaxColumn(u-1)),this._languageConfigurationService);if(y){if(l=a,y.appendText)for(let E=0,I=y.appendText.length;E<I&&l<h&&y.appendText.charCodeAt(E)===32;E++)l++;y.removeText&&(l=Math.max(0,l-y.removeText));for(let E=0;E<l&&!(f===0||v.charCodeAt(f-1)!==32);E++)f--}}if(this._opts.isUnshift&&f===0)continue;let p;this._opts.isUnshift?p=li.unshiftIndent(v,f+1,d,h,o):p=li.shiftIndent(v,f+1,d,h,o),this._addEditOperation(i,new L.Range(u,1,u,f+1),p),u===n&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=f+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&t.getLineLength(n)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const a=o?g(" ",h):"\t";for(let l=n;l<=r;l++){const u=t.getLineContent(l);let v=_.firstNonWhitespaceIndex(u);if(!(this._opts.isUnshift&&(u.length===0||v===0))&&!(!c&&!this._opts.isUnshift&&u.length===0)&&(v===-1&&(v=u.length),!(this._opts.isUnshift&&v===0)))if(this._opts.isUnshift){v=Math.min(v,h);for(let f=0;f<v;f++)if(u.charCodeAt(f)===9){v=f+1;break}this._addEditOperation(i,new L.Range(l,1,l,v+1),"")}else this._addEditOperation(i,new L.Range(l,1,l,1),a),l===n&&!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 n=i.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const r=this._selection.startColumn;return n.startColumn<=r?n:n.getDirection()===0?new D.Selection(n.startLineNumber,r,n.endLineNumber,n.endColumn):new D.Selection(n.endLineNumber,n.endColumn,n.startLineNumber,r)}return n}};e.ShiftCommand=m=Te([ge(2,b.ILanguageConfigurationService)],m)}),define(J[238],ee([1,0,11,9,120,237,469,66,139,5,12,105,29,122,235,236]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionOutcome=e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class d{static indent(f,p,C){if(p===null||C===null)return[];const y=[];for(let E=0,I=C.length;E<I;E++)y[E]=new D.ShiftCommand(C[E],{isUnshift:!1,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent},f.languageConfigurationService);return y}static outdent(f,p,C){const y=[];for(let E=0,I=C.length;E<I;E++)y[E]=new D.ShiftCommand(C[E],{isUnshift:!0,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent},f.languageConfigurationService);return y}static shiftIndent(f,p,C){return C=C||1,D.ShiftCommand.shiftIndent(p,p.length+C,f.tabSize,f.indentSize,f.insertSpaces)}static unshiftIndent(f,p,C){return C=C||1,D.ShiftCommand.unshiftIndent(p,p.length+C,f.tabSize,f.indentSize,f.insertSpaces)}static _distributedPaste(f,p,C,y){const E=[];for(let I=0,T=C.length;I<T;I++)E[I]=new L.ReplaceCommand(C[I],y[I]);return new b.EditOperationResult(0,E,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(f,p,C,y,E){const I=[];for(let T=0,O=C.length;T<O;T++){const R=C[T],M=R.getPosition();if(E&&!R.isEmpty()&&(E=!1),E&&y.indexOf(`\n`)!==y.length-1&&(E=!1),E){const N=new g.Range(M.lineNumber,1,M.lineNumber,1);I[T]=new L.ReplaceCommandThatPreservesSelection(N,y,R,!0)}else I[T]=new L.ReplaceCommand(R,y)}return new b.EditOperationResult(0,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(f,p,C,y,E){if(y||p.length===1)return null;if(E&&E.length===p.length)return E;if(f.multiCursorPaste==="spread"){C.charCodeAt(C.length-1)===10&&(C=C.substr(0,C.length-1)),C.charCodeAt(C.length-1)===13&&(C=C.substr(0,C.length-1));const I=k.splitLines(C);if(I.length===p.length)return I}return null}static paste(f,p,C,y,E,I){const T=this._distributePasteToCursors(f,C,y,E,I);return T?(C=C.sort(g.Range.compareRangesUsingStarts),this._distributedPaste(f,p,C,T)):this._simplePaste(f,p,C,y,E)}static _goodIndentForLine(f,p,C){let y=null,E="";const I=(0,n.getInheritIndentForLine)(f.autoIndent,p,C,!1,f.languageConfigurationService);if(I)y=I.action,E=I.indentation;else if(C>1){let T;for(T=C-1;T>=1;T--){const M=p.getLineContent(T);if(k.lastNonWhitespaceIndex(M)>=0)break}if(T<1)return null;const O=p.getLineMaxColumn(T),R=(0,r.getEnterAction)(f.autoIndent,p,new g.Range(T,O,T,O),f.languageConfigurationService);R&&(E=R.indentation+R.appendText)}return y&&(y===s.IndentAction.Indent&&(E=d.shiftIndent(f,E)),y===s.IndentAction.Outdent&&(E=d.unshiftIndent(f,E)),E=f.normalizeIndentation(E)),E||null}static _replaceJumpToNextIndent(f,p,C,y){let E="";const I=C.getStartPosition();if(f.insertSpaces){const T=f.visibleColumnFromColumn(p,I),O=f.indentSize,R=O-T%O;for(let M=0;M<R;M++)E+=" "}else E="\t";return new L.ReplaceCommand(C,E,y)}static tab(f,p,C){const y=[];for(let E=0,I=C.length;E<I;E++){const T=C[E];if(T.isEmpty()){const O=p.getLineContent(T.startLineNumber);if(/^\\s*$/.test(O)&&p.tokenization.isCheapToTokenize(T.startLineNumber)){let R=this._goodIndentForLine(f,p,T.startLineNumber);R=R||"\t";const M=f.normalizeIndentation(R);if(!O.startsWith(M)){y[E]=new L.ReplaceCommand(new g.Range(T.startLineNumber,1,T.startLineNumber,O.length+1),M,!0);continue}}y[E]=this._replaceJumpToNextIndent(f,p,T,!0)}else{if(T.startLineNumber===T.endLineNumber){const O=p.getLineMaxColumn(T.startLineNumber);if(T.startColumn!==1||T.endColumn!==O){y[E]=this._replaceJumpToNextIndent(f,p,T,!1);continue}}y[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 y}static compositionType(f,p,C,y,E,I,T,O){const R=y.map(M=>this._compositionType(C,M,E,I,T,O));return new b.EditOperationResult(4,R,{shouldPushStackElementBefore:a(f,4),shouldPushStackElementAfter:!1})}static _compositionType(f,p,C,y,E,I){if(!p.isEmpty())return null;const T=p.getPosition(),O=Math.max(1,T.column-y),R=Math.min(f.getLineMaxColumn(T.lineNumber),T.column+E),M=new g.Range(T.lineNumber,O,T.lineNumber,R);return f.getValueInRange(M)===C&&I===0?null:new L.ReplaceCommandWithOffsetCursorState(M,C,0,I)}static _typeCommand(f,p,C){return C?new L.ReplaceCommandWithoutChangingPosition(f,p,!0):new L.ReplaceCommand(f,p,!0)}static _enter(f,p,C,y){if(f.autoIndent===0)return d._typeCommand(y,`\n`,C);if(!p.tokenization.isCheapToTokenize(y.getStartPosition().lineNumber)||f.autoIndent===1){const O=p.getLineContent(y.startLineNumber),R=k.getLeadingWhitespace(O).substring(0,y.startColumn-1);return d._typeCommand(y,`\n`+f.normalizeIndentation(R),C)}const E=(0,r.getEnterAction)(f.autoIndent,p,y,f.languageConfigurationService);if(E){if(E.indentAction===s.IndentAction.None)return d._typeCommand(y,`\n`+f.normalizeIndentation(E.indentation+E.appendText),C);if(E.indentAction===s.IndentAction.Indent)return d._typeCommand(y,`\n`+f.normalizeIndentation(E.indentation+E.appendText),C);if(E.indentAction===s.IndentAction.IndentOutdent){const O=f.normalizeIndentation(E.indentation),R=f.normalizeIndentation(E.indentation+E.appendText),M=`\n`+R+`\n`+O;return C?new L.ReplaceCommandWithoutChangingPosition(y,M,!0):new L.ReplaceCommandWithOffsetCursorState(y,M,-1,R.length-O.length,!0)}else if(E.indentAction===s.IndentAction.Outdent){const O=d.unshiftIndent(f,E.indentation);return d._typeCommand(y,`\n`+f.normalizeIndentation(O+E.appendText),C)}}const I=p.getLineContent(y.startLineNumber),T=k.getLeadingWhitespace(I).substring(0,y.startColumn-1);if(f.autoIndent>=4){const O=(0,n.getIndentForEnter)(f.autoIndent,p,y,{unshiftIndent:R=>d.unshiftIndent(f,R),shiftIndent:R=>d.shiftIndent(f,R),normalizeIndentation:R=>f.normalizeIndentation(R)},f.languageConfigurationService);if(O){let R=f.visibleColumnFromColumn(p,y.getEndPosition());const M=y.endColumn,N=p.getLineContent(y.endLineNumber),P=k.firstNonWhitespaceIndex(N);if(P>=0?y=y.setEndPosition(y.endLineNumber,Math.max(y.endColumn,P+1)):y=y.setEndPosition(y.endLineNumber,p.getLineMaxColumn(y.endLineNumber)),C)return new L.ReplaceCommandWithoutChangingPosition(y,`\n`+f.normalizeIndentation(O.afterEnter),!0);{let x=0;return M<=P+1&&(f.insertSpaces||(R=Math.ceil(R/f.indentSize)),x=Math.min(R+1-f.normalizeIndentation(O.afterEnter).length-1,0)),new L.ReplaceCommandWithOffsetCursorState(y,`\n`+f.normalizeIndentation(O.afterEnter),0,x,!0)}}}return d._typeCommand(y,`\n`+f.normalizeIndentation(T),C)}static _isAutoIndentType(f,p,C){if(f.autoIndent<4)return!1;for(let y=0,E=C.length;y<E;y++)if(!p.tokenization.isCheapToTokenize(C[y].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(f,p,C,y){const E=(0,t.getIndentationAtPosition)(p,C.startLineNumber,C.startColumn),I=(0,n.getIndentActionForType)(f.autoIndent,p,C,y,{shiftIndent:T=>d.shiftIndent(f,T),unshiftIndent:T=>d.unshiftIndent(f,T)},f.languageConfigurationService);if(I===null)return null;if(I!==f.normalizeIndentation(E)){const T=p.getLineFirstNonWhitespaceColumn(C.startLineNumber);return T===0?d._typeCommand(new g.Range(C.startLineNumber,1,C.endLineNumber,C.endColumn),f.normalizeIndentation(I)+y,!1):d._typeCommand(new g.Range(C.startLineNumber,1,C.endLineNumber,C.endColumn),f.normalizeIndentation(I)+p.getLineContent(C.startLineNumber).substring(T-1,C.startColumn-1)+y,!1)}return null}static _isAutoClosingOvertype(f,p,C,y,E){if(f.autoClosingOvertype==="never"||!f.autoClosingPairs.autoClosingPairsCloseSingleChar.has(E))return!1;for(let I=0,T=C.length;I<T;I++){const O=C[I];if(!O.isEmpty())return!1;const R=O.getPosition(),M=p.getLineContent(R.lineNumber);if(M.charAt(R.column-1)!==E)return!1;const P=(0,b.isQuote)(E);if((R.column>2?M.charCodeAt(R.column-2):0)===92&&P)return!1;if(f.autoClosingOvertype==="auto"){let F=!1;for(let B=0,V=y.length;B<V;B++){const K=y[B];if(R.lineNumber===K.startLineNumber&&R.column===K.startColumn){F=!0;break}}if(!F)return!1}}return!0}static _runAutoClosingOvertype(f,p,C,y,E){const I=[];for(let T=0,O=y.length;T<O;T++){const M=y[T].getPosition(),N=new g.Range(M.lineNumber,M.column,M.lineNumber,M.column+1);I[T]=new L.ReplaceCommand(N,E)}return new b.EditOperationResult(4,I,{shouldPushStackElementBefore:a(f,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(f,p){const C=p.charAt(0),y=f.autoClosingPairs.autoClosingPairsOpenByStart.get(C)||[],E=f.autoClosingPairs.autoClosingPairsCloseByStart.get(C)||[],I=y.some(O=>p.startsWith(O.open)),T=E.some(O=>p.startsWith(O.close));return!I&&T}static _findAutoClosingPairOpen(f,p,C,y){const E=f.autoClosingPairs.autoClosingPairsOpenByEnd.get(y);if(!E)return null;let I=null;for(const T of E)if(I===null||T.open.length>I.open.length){let O=!0;for(const R of C)if(p.getValueInRange(new g.Range(R.lineNumber,R.column-T.open.length+1,R.lineNumber,R.column))+y!==T.open){O=!1;break}O&&(I=T)}return I}static _findContainedAutoClosingPair(f,p){if(p.open.length<=1)return null;const C=p.close.charAt(p.close.length-1),y=f.autoClosingPairs.autoClosingPairsCloseByEnd.get(C)||[];let E=null;for(const I of y)I.open!==p.open&&p.open.includes(I.open)&&p.close.endsWith(I.close)&&(!E||I.open.length>E.open.length)&&(E=I);return E}static _getAutoClosingPairClose(f,p,C,y,E){const I=(0,b.isQuote)(y),T=I?f.autoClosingQuotes:f.autoClosingBrackets,O=I?f.shouldAutoCloseBefore.quote:f.shouldAutoCloseBefore.bracket;if(T==="never")return null;for(const F of C)if(!F.isEmpty())return null;const R=C.map(F=>{const B=F.getPosition();return E?{lineNumber:B.lineNumber,beforeColumn:B.column-y.length,afterColumn:B.column}:{lineNumber:B.lineNumber,beforeColumn:B.column,afterColumn:B.column}}),M=this._findAutoClosingPairOpen(f,p,R.map(F=>new m.Position(F.lineNumber,F.beforeColumn)),y);if(!M)return null;const N=this._findContainedAutoClosingPair(f,M),P=N?N.close:"";let x=!0;for(const F of R){const{lineNumber:B,beforeColumn:V,afterColumn:K}=F,A=p.getLineContent(B),Y=A.substring(0,V-1),ie=A.substring(K-1);if(ie.startsWith(P)||(x=!1),ie.length>0){const H=ie.charAt(0);if(!d._isBeforeClosingBrace(f,ie)&&!O(H))return null}if(M.open.length===1&&(y==="\'"||y===\'"\')&&T!=="always"){const H=(0,S.getMapForWordSeparators)(f.wordSeparators);if(Y.length>0){const W=Y.charCodeAt(Y.length-1);if(H.get(W)===0)return null}}if(!p.tokenization.isCheapToTokenize(B))return null;p.tokenization.forceTokenization(B);const le=p.tokenization.getLineTokens(B),ne=(0,i.createScopedLineTokens)(le,V-1);if(!M.shouldAutoClose(ne,V-ne.firstCharOffset))return null;const se=M.findNeutralCharacter();if(se){const H=p.tokenization.getTokenTypeIfInsertingCharacter(B,V,se);if(!M.isOK(H))return null}}return x?M.close.substring(0,M.close.length-P.length):M.close}static _runAutoClosingOpenCharType(f,p,C,y,E,I,T){const O=[];for(let R=0,M=y.length;R<M;R++){const N=y[R];O[R]=new h(N,E,!I,T)}return new b.EditOperationResult(4,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(f,p){return(0,b.isQuote)(p)?f.autoSurround==="quotes"||f.autoSurround==="languageDefined":f.autoSurround==="brackets"||f.autoSurround==="languageDefined"}static _isSurroundSelectionType(f,p,C,y){if(!d._shouldSurroundChar(f,y)||!f.surroundingPairs.hasOwnProperty(y))return!1;const E=(0,b.isQuote)(y);for(const I of C){if(I.isEmpty())return!1;let T=!0;for(let O=I.startLineNumber;O<=I.endLineNumber;O++){const R=p.getLineContent(O),M=O===I.startLineNumber?I.startColumn-1:0,N=O===I.endLineNumber?I.endColumn-1:R.length,P=R.substring(M,N);if(/[^ \\t]/.test(P)){T=!1;break}}if(T)return!1;if(E&&I.startLineNumber===I.endLineNumber&&I.startColumn+1===I.endColumn){const O=p.getValueInRange(I);if((0,b.isQuote)(O))return!1}}return!0}static _runSurroundSelectionType(f,p,C,y,E){const I=[];for(let T=0,O=y.length;T<O;T++){const R=y[T],M=p.surroundingPairs[E];I[T]=new w.SurroundSelectionCommand(R,E,M)}return new b.EditOperationResult(0,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(f,p,C){return!!(C.length===1&&p.tokenization.isCheapToTokenize(C[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(f,p,C,y,E){if(!p.electricChars.hasOwnProperty(E)||!y.isEmpty())return null;const I=y.getPosition();C.tokenization.forceTokenization(I.lineNumber);const T=C.tokenization.getLineTokens(I.lineNumber);let O;try{O=p.onElectricCharacter(E,T,I.column)}catch(R){return(0,_.onUnexpectedError)(R),null}if(!O)return null;if(O.matchOpenBracket){const R=(T.getLineContent()+E).lastIndexOf(O.matchOpenBracket)+1,M=C.bracketPairs.findMatchingBracketUp(O.matchOpenBracket,{lineNumber:I.lineNumber,column:R},500);if(M){if(M.startLineNumber===I.lineNumber)return null;const N=C.getLineContent(M.startLineNumber),P=k.getLeadingWhitespace(N),x=p.normalizeIndentation(P),F=C.getLineContent(I.lineNumber),B=C.getLineFirstNonWhitespaceColumn(I.lineNumber)||I.column,V=F.substring(B-1,I.column-1),K=x+V+E,A=new g.Range(I.lineNumber,1,I.lineNumber,I.column),Y=new L.ReplaceCommand(A,K);return new b.EditOperationResult(c(K,f),[Y],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(f,p,C,y,E,I){if(!y)return null;let T=null;for(const N of y)if(T===null)T=N.insertedText;else if(T!==N.insertedText)return null;if(!T||T.length!==1)return null;const O=T;let R=!1;for(const N of y)if(N.deletedText.length!==0){R=!0;break}if(R){if(!d._shouldSurroundChar(p,O)||!p.surroundingPairs.hasOwnProperty(O))return null;const N=(0,b.isQuote)(O);for(const F of y)if(F.deletedSelectionStart!==0||F.deletedSelectionEnd!==F.deletedText.length||/^[ \\t]+$/.test(F.deletedText)||N&&(0,b.isQuote)(F.deletedText))return null;const P=[];for(const F of E){if(!F.isEmpty())return null;P.push(F.getPosition())}if(P.length!==y.length)return null;const x=[];for(let F=0,B=P.length;F<B;F++)x.push(new w.CompositionSurroundSelectionCommand(P[F],y[F].deletedText,p.surroundingPairs[O]));return new b.EditOperationResult(4,x,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(p,C,E,I,O)){const N=E.map(P=>new L.ReplaceCommand(new g.Range(P.positionLineNumber,P.positionColumn,P.positionLineNumber,P.positionColumn+1),"",!1));return new b.EditOperationResult(4,N,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const M=this._getAutoClosingPairClose(p,C,E,O,!0);return M!==null?this._runAutoClosingOpenCharType(f,p,C,E,O,!0,M):null}static typeWithInterceptors(f,p,C,y,E,I,T){if(!f&&T===`\n`){const M=[];for(let N=0,P=E.length;N<P;N++)M[N]=d._enter(C,y,!1,E[N]);return new b.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!f&&this._isAutoIndentType(C,y,E)){const M=[];let N=!1;for(let P=0,x=E.length;P<x;P++)if(M[P]=this._runAutoIndentType(C,y,E[P],T),!M[P]){N=!0;break}if(!N)return new b.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(C,y,E,I,T))return this._runAutoClosingOvertype(p,C,y,E,T);if(!f){const M=this._getAutoClosingPairClose(C,y,E,T,!1);if(M)return this._runAutoClosingOpenCharType(p,C,y,E,T,!1,M)}if(!f&&this._isSurroundSelectionType(C,y,E,T))return this._runSurroundSelectionType(p,C,y,E,T);if(!f&&this._isTypeInterceptorElectricChar(C,y,E)){const M=this._typeInterceptorElectricChar(p,C,y,E[0],T);if(M)return M}const O=[];for(let M=0,N=E.length;M<N;M++)O[M]=new L.ReplaceCommand(E[M],T);const R=c(T,p);return new b.EditOperationResult(R,O,{shouldPushStackElementBefore:a(p,R),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(f,p,C,y,E){const I=[];for(let O=0,R=y.length;O<R;O++)I[O]=new L.ReplaceCommand(y[O],E);const T=c(E,f);return new b.EditOperationResult(T,I,{shouldPushStackElementBefore:a(f,T),shouldPushStackElementAfter:!1})}static lineInsertBefore(f,p,C){if(p===null||C===null)return[];const y=[];for(let E=0,I=C.length;E<I;E++){let T=C[E].positionLineNumber;if(T===1)y[E]=new L.ReplaceCommandWithoutChangingPosition(new g.Range(1,1,1,1),`\n`);else{T--;const O=p.getLineMaxColumn(T);y[E]=this._enter(f,p,!1,new g.Range(T,O,T,O))}}return y}static lineInsertAfter(f,p,C){if(p===null||C===null)return[];const y=[];for(let E=0,I=C.length;E<I;E++){const T=C[E].positionLineNumber,O=p.getLineMaxColumn(T);y[E]=this._enter(f,p,!1,new g.Range(T,O,T,O))}return y}static lineBreakInsert(f,p,C){const y=[];for(let E=0,I=C.length;E<I;E++)y[E]=this._enter(f,p,!0,C[E]);return y}}e.TypeOperations=d;class h extends L.ReplaceCommandWithOffsetCursorState{constructor(f,p,C,y){super(f,(C?p:"")+y,0,-y.length),this._openCharacter=p,this._closeCharacter=y,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(f,p){const y=p.getInverseEditOperations()[0].range;return this.closeCharacterRange=new g.Range(y.startLineNumber,y.endColumn-this._closeCharacter.length,y.endLineNumber,y.endColumn),this.enclosingRange=new g.Range(y.startLineNumber,y.endColumn-this._openCharacter.length-this._closeCharacter.length,y.endLineNumber,y.endColumn),super.computeCursorState(f,p)}}e.TypeWithAutoClosingCommand=h;class o{constructor(f,p,C,y,E,I){this.deletedText=f,this.deletedSelectionStart=p,this.deletedSelectionEnd=C,this.insertedText=y,this.insertedSelectionStart=E,this.insertedSelectionEnd=I}}e.CompositionOutcome=o;function c(v,f){return v===" "?f===5||f===6?6:5:4}function a(v,f){return u(v)&&!u(f)?!0:v===5?!1:l(v)!==l(f)}function l(v){return v===6||v===5?"space":v}function u(v){return v===4||v===5||v===6}}),define(J[747],ee([1,0,11,9,483,66,470,196,238,5,24,106,204,2,225]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=void 0;class r extends i.Disposable{constructor(u,v,f,p){super(),this._model=u,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=v,this._coordinatesConverter=f,this.context=new w.CursorContext(this._model,this._viewModel,this._coordinatesConverter,p),this._cursors=new L.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 v=0;v<this._autoClosedActions.length;v++){const f=this._autoClosedActions[v];f.isValid(u)||(f.dispose(),this._autoClosedActions.splice(v,1),v--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(u,v,f,p){let C=!1;const y=this.context.cursorConfig.multiCursorLimit;p!==null&&p.length>y&&(p=p.slice(0,y),C=!0);const E=d.from(this._model,this);return this._cursors.setStates(p),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(u,v,f,E,C)}setCursorColumnSelectData(u){this._columnSelectData=u}revealPrimary(u,v,f,p,C,y){const E=this._cursors.getViewPositions();let I=null,T=null;E.length>1?T=this._cursors.getViewSelections():I=g.Range.fromPositions(E[0],E[0]),u.emitViewEvent(new t.ViewRevealRangeRequestEvent(v,f,I,T,p,C,y))}saveState(){const u=[],v=this._cursors.getSelections();for(let f=0,p=v.length;f<p;f++){const C=v[f];u.push({inSelectionMode:!C.isEmpty(),selectionStart:{lineNumber:C.selectionStartLineNumber,column:C.selectionStartColumn},position:{lineNumber:C.positionLineNumber,column:C.positionColumn}})}return u}restoreState(u,v){const f=[];for(let p=0,C=v.length;p<C;p++){const y=v[p];let E=1,I=1;y.position&&y.position.lineNumber&&(E=y.position.lineNumber),y.position&&y.position.column&&(I=y.position.column);let T=E,O=I;y.selectionStart&&y.selectionStart.lineNumber&&(T=y.selectionStart.lineNumber),y.selectionStart&&y.selectionStart.column&&(O=y.selectionStart.column),f.push({selectionStartLineNumber:T,selectionStartColumn:O,positionLineNumber:E,positionColumn:I})}this.setStates(u,"restoreState",0,D.CursorState.fromModelSelections(f)),this.revealPrimary(u,"restoreState",!1,0,!0,1)}onModelContentChanged(u,v){if(v instanceof s.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(u,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const f=v.rawContentChangedEvent;if(this._knownModelVersionId=f.versionId,this._isHandling)return;const p=f.containsEvent(1);if(this._prevEditOperationType=0,p)this._cursors.dispose(),this._cursors=new L.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(u,"model",1,null,!1);else if(this._hasFocus&&f.resultingSelection&&f.resultingSelection.length>0){const C=D.CursorState.fromModelSelections(f.resultingSelection);this.setStates(u,"modelChange",f.isUndoing?5:f.isRedoing?6:2,C)&&this.revealPrimary(u,"modelChange",!1,0,!0,0)}else{const C=this._cursors.readSelectionFromMarkers();this.setStates(u,"modelChange",2,D.CursorState.fromModelSelections(C))}}}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(),v=u.viewState.selectionStart.getStartPosition(),f=u.viewState.position;return{isReal:!1,fromViewLineNumber:v.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,v),toViewLineNumber:f.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,f)}}getSelections(){return this._cursors.getSelections()}setSelections(u,v,f,p){this.setStates(u,v,p,D.CursorState.fromModelSelections(f))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(u){this._prevEditOperationType=u}_pushAutoClosedAction(u,v){const f=[],p=[];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}}),p.push({range:v[E],options:{description:"auto-closed-enclosing",stickiness:1}});const C=this._model.deltaDecorations([],f),y=this._model.deltaDecorations([],p);this._autoClosedActions.push(new h(this._model,C,y))}_executeEditOperation(u){if(!u)return;u.shouldPushStackElementBefore&&this._model.pushStackElement();const v=o.executeCommands(this._model,this._cursors.getSelections(),u.commands);if(v){this._interpretCommandResult(v);const f=[],p=[];for(let C=0;C<u.commands.length;C++){const y=u.commands[C];y instanceof S.TypeWithAutoClosingCommand&&y.enclosingRange&&y.closeCharacterRange&&(f.push(y.closeCharacterRange),p.push(y.enclosingRange))}f.length>0&&this._pushAutoClosedAction(f,p),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,v,f,p,C){const y=d.from(this._model,this);if(y.equals(p))return!1;const E=this._cursors.getSelections(),I=this._cursors.getViewSelections();if(u.emitViewEvent(new t.ViewCursorStateChangedEvent(I,E,f)),!p||p.cursorState.length!==y.cursorState.length||y.cursorState.some((T,O)=>!T.modelState.equals(p.cursorState[O].modelState))){const T=p?p.cursorState.map(R=>R.modelState.selection):null,O=p?p.modelVersionId:0;u.emitOutgoingEvent(new n.CursorStateChangedEvent(T,E,O,y.modelVersionId,v||"keyboard",f,C))}return!0}_findAutoClosingPairs(u){if(!u.length)return null;const v=[];for(let f=0,p=u.length;f<p;f++){const C=u[f];if(!C.text||C.text.indexOf(`\n`)>=0)return null;const y=C.text.match(/([)\\]}>\'"`])([^)\\]}>\'"`]*)$/);if(!y)return null;const E=y[1],I=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(E);if(!I||I.length!==1)return null;const T=I[0].open,O=C.text.length-y[2].length-1,R=C.text.lastIndexOf(T,O-1);if(R===-1)return null;v.push([R,O])}return v}executeEdits(u,v,f,p){let C=null;v==="snippet"&&(C=this._findAutoClosingPairs(f)),C&&(f[0]._isTracked=!0);const y=[],E=[],I=this._model.pushEditOperations(this.getSelections(),f,T=>{if(C)for(let R=0,M=C.length;R<M;R++){const[N,P]=C[R],x=T[R],F=x.range.startLineNumber,B=x.range.startColumn-1+N,V=x.range.startColumn-1+P;y.push(new g.Range(F,V+1,F,V+2)),E.push(new g.Range(F,B+1,F,V+2))}const O=p(T);return O&&(this._isHandling=!0),O});I&&(this._isHandling=!1,this.setSelections(u,v,I,0)),y.length>0&&this._pushAutoClosedAction(y,E)}_executeEdit(u,v,f,p=0){if(this.context.cursorConfig.readOnly)return;const C=d.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),u()}catch(y){(0,_.onUnexpectedError)(y)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(v,f,p,C,!1)&&this.revealPrimary(v,f,!1,0,!0,0)}getAutoClosedCharacters(){return h.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(u){this._compositionState=new a(this._model,this.getSelections())}endComposition(u,v){const f=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{v==="keyboard"&&this._executeEditOperation(S.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,f,this.getSelections(),this.getAutoClosedCharacters()))},u,v)}type(u,v,f){this._executeEdit(()=>{if(f==="keyboard"){const p=v.length;let C=0;for(;C<p;){const y=k.nextCharLength(v,C),E=v.substr(C,y);this._executeEditOperation(S.TypeOperations.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),E)),C+=y}}else this._executeEditOperation(S.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),v))},u,f)}compositionType(u,v,f,p,C,y){if(v.length===0&&f===0&&p===0){if(C!==0){const E=this.getSelections().map(I=>{const T=I.getPosition();return new m.Selection(T.lineNumber,T.column+C,T.lineNumber,T.column+C)});this.setSelections(u,y,E,0)}return}this._executeEdit(()=>{this._executeEditOperation(S.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),v,f,p,C))},u,y)}paste(u,v,f,p,C){this._executeEdit(()=>{this._executeEditOperation(S.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),v,f,p||[]))},u,C,4)}cut(u,v){this._executeEdit(()=>{this._executeEditOperation(b.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},u,v)}executeCommand(u,v,f){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new D.EditOperationResult(0,[v],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},u,f)}executeCommands(u,v,f){this._executeEdit(()=>{this._executeEditOperation(new D.EditOperationResult(0,v,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},u,f)}}e.CursorsController=r;class d{static from(u,v){return new d(u.getVersionId(),v.getCursorStates())}constructor(u,v){this.modelVersionId=u,this.cursorState=v}equals(u){if(!u||this.modelVersionId!==u.modelVersionId||this.cursorState.length!==u.cursorState.length)return!1;for(let v=0,f=this.cursorState.length;v<f;v++)if(!this.cursorState[v].equals(u.cursorState[v]))return!1;return!0}}class h{static getAllAutoClosedCharacters(u){let v=[];for(const f of u)v=v.concat(f.getAutoClosedCharactersRanges());return v}constructor(u,v,f){this._model=u,this._autoClosedCharactersDecorations=v,this._autoClosedEnclosingDecorations=f}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const u=[];for(let v=0;v<this._autoClosedCharactersDecorations.length;v++){const f=this._model.getDecorationRange(this._autoClosedCharactersDecorations[v]);f&&u.push(f)}return u}isValid(u){const v=[];for(let f=0;f<this._autoClosedEnclosingDecorations.length;f++){const p=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[f]);if(p&&(v.push(p),p.startLineNumber!==p.endLineNumber))return!1}v.sort(g.Range.compareRangesUsingStarts),u.sort(g.Range.compareRangesUsingStarts);for(let f=0;f<u.length;f++)if(f>=v.length||!v[f].strictContainsRange(u[f]))return!1;return!0}}class o{static executeCommands(u,v,f){const p={model:u,selectionsBefore:v,trackedRanges:[],trackedRangesDirection:[]},C=this._innerExecuteCommands(p,f);for(let y=0,E=p.trackedRanges.length;y<E;y++)p.model._setTrackedRange(p.trackedRanges[y],null,0);return C}static _innerExecuteCommands(u,v){if(this._arrayIsEmpty(v))return null;const f=this._getEditOperations(u,v);if(f.operations.length===0)return null;const p=f.operations,C=this._getLoserCursorMap(p);if(C.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const y=[];for(let T=0,O=p.length;T<O;T++)C.hasOwnProperty(p[T].identifier.major.toString())||y.push(p[T]);f.hadTrackedEditOperation&&y.length>0&&(y[0]._isTracked=!0);let E=u.model.pushEditOperations(u.selectionsBefore,y,T=>{const O=[];for(let N=0;N<u.selectionsBefore.length;N++)O[N]=[];for(const N of T)N.identifier&&O[N.identifier.major].push(N);const R=(N,P)=>N.identifier.minor-P.identifier.minor,M=[];for(let N=0;N<u.selectionsBefore.length;N++)O[N].length>0?(O[N].sort(R),M[N]=v[N].computeCursorState(u.model,{getInverseEditOperations:()=>O[N],getTrackedSelection:P=>{const x=parseInt(P,10),F=u.model._getTrackedRange(u.trackedRanges[x]);return u.trackedRangesDirection[x]===0?new m.Selection(F.startLineNumber,F.startColumn,F.endLineNumber,F.endColumn):new m.Selection(F.endLineNumber,F.endColumn,F.startLineNumber,F.startColumn)}})):M[N]=u.selectionsBefore[N];return M});E||(E=u.selectionsBefore);const I=[];for(const T in C)C.hasOwnProperty(T)&&I.push(parseInt(T,10));I.sort((T,O)=>O-T);for(const T of I)E.splice(T,1);return E}static _arrayIsEmpty(u){for(let v=0,f=u.length;v<f;v++)if(u[v])return!1;return!0}static _getEditOperations(u,v){let f=[],p=!1;for(let C=0,y=v.length;C<y;C++){const E=v[C];if(E){const I=this._getEditOperationsFromCommand(u,C,E);f=f.concat(I.operations),p=p||I.hadTrackedEditOperation}}return{operations:f,hadTrackedEditOperation:p}}static _getEditOperationsFromCommand(u,v,f){const p=[];let C=0;const y=(R,M,N=!1)=>{g.Range.isEmpty(R)&&M===""||p.push({identifier:{major:v,minor:C++},range:R,text:M,forceMoveMarkers:N,isAutoWhitespaceEdit:f.insertsAutoWhitespace})};let E=!1;const O={addEditOperation:y,addTrackedEditOperation:(R,M,N)=>{E=!0,y(R,M,N)},trackSelection:(R,M)=>{const N=m.Selection.liftSelection(R);let P;if(N.isEmpty())if(typeof M=="boolean")M?P=2:P=3;else{const B=u.model.getLineMaxColumn(N.startLineNumber);N.startColumn===B?P=2:P=3}else P=1;const x=u.trackedRanges.length,F=u.model._setTrackedRange(null,N,P);return u.trackedRanges[x]=F,u.trackedRangesDirection[x]=N.getDirection(),x.toString()}};try{f.getEditOperations(u.model,O)}catch(R){return(0,_.onUnexpectedError)(R),{operations:[],hadTrackedEditOperation:!1}}return{operations:p,hadTrackedEditOperation:E}}static _getLoserCursorMap(u){u=u.slice(0),u.sort((f,p)=>-g.Range.compareRangesUsingEnds(f.range,p.range));const v={};for(let f=1;f<u.length;f++){const p=u[f-1],C=u[f];if(g.Range.getStartPosition(p.range).isBefore(g.Range.getEndPosition(C.range))){let y;p.identifier.major>C.identifier.major?y=p.identifier.major:y=C.identifier.major,v[y.toString()]=!0;for(let E=0;E<u.length;E++)u[E].identifier.major===y&&(u.splice(E,1),E<f&&f--,E--);f>0&&f--}}return v}}class c{constructor(u,v,f){this.text=u,this.startSelection=v,this.endSelection=f}}class a{static _capture(u,v){const f=[];for(const p of v){if(p.startLineNumber!==p.endLineNumber)return null;f.push(new c(u.getLineContent(p.startLineNumber),p.startColumn-1,p.endColumn-1))}return f}constructor(u,v){this._original=a._capture(u,v)}deduceOutcome(u,v){if(!this._original)return null;const f=a._capture(u,v);if(!f||this._original.length!==f.length)return null;const p=[];for(let C=0,y=this._original.length;C<y;C++)p.push(a._deduceOutcome(this._original[C],f[C]));return p}static _deduceOutcome(u,v){const f=Math.min(u.startSelection,v.startSelection,k.commonPrefixLength(u.text,v.text)),p=Math.min(u.text.length-u.endSelection,v.text.length-v.endSelection,k.commonSuffixLength(u.text,v.text)),C=u.text.substring(f,u.text.length-p),y=v.text.substring(f,v.text.length-p);return new S.CompositionOutcome(C,u.startSelection-f,u.endSelection-f,y,v.startSelection-f,v.endSelection-f)}}}),define(J[748],ee([1,0,51,42,72,317]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClasses=void 0;const w=/(?:\\/|^)(?:([^\\/]+)\\/)?([^\\/]+)$/;function b(m,s,t,i){const n=i===D.FileKind.ROOT_FOLDER?["rootfolder-icon"]:i===D.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(t){let r;if(t.scheme===_.Schemas.data)r=k.DataUri.parseMetaData(t).get(k.DataUri.META_DATA_LABEL);else{const d=t.path.match(w);d?(r=g(d[2].toLowerCase()),d[1]&&n.push(`${g(d[1].toLowerCase())}-name-dir-icon`)):r=g(t.authority.toLowerCase())}if(i===D.FileKind.FOLDER)n.push(`${r}-name-folder-icon`);else{if(r){if(n.push(`${r}-name-file-icon`),n.push("name-file-icon"),r.length<=255){const h=r.split(".");for(let o=1;o<h.length;o++)n.push(`${h.slice(o).join(".")}-ext-file-icon`)}n.push("ext-file-icon")}const d=S(m,s,t);d&&n.push(`${g(d)}-lang-file-icon`)}}return n}e.getIconClasses=b;function S(m,s,t){if(!t)return null;let i=null;if(t.scheme===_.Schemas.data){const r=k.DataUri.parseMetaData(t).get(k.DataUri.META_DATA_MIME);r&&(i=s.getLanguageIdByMimeType(r))}else{const n=m.getModel(t);n&&(i=n.getLanguageId())}return i&&i!==L.PLAINTEXT_LANGUAGE_ID?i:s.guessLanguageIdByFilepathOrFirstLine(t)}function g(m){return m.replace(/[\\11\\12\\14\\15\\40]/g,"/")}}),define(J[749],ee([1,0,289,103,51,90,42,9,72]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageIds=e.clearPlatformLanguageAssociations=e.registerPlatformLanguageAssociation=void 0;let g=[],m=[],s=[];function t(a,l=!1){i(a,!1,l)}e.registerPlatformLanguageAssociation=t;function i(a,l,u){const v=n(a,l);g.push(v),v.userConfigured?s.push(v):m.push(v),u&&!v.userConfigured&&g.forEach(f=>{f.mime===v.mime||f.userConfigured||(v.extension&&f.extension===v.extension&&console.warn(`Overwriting extension <<${v.extension}>> to now point to mime <<${v.mime}>>`),v.filename&&f.filename===v.filename&&console.warn(`Overwriting filename <<${v.filename}>> to now point to mime <<${v.mime}>>`),v.filepattern&&f.filepattern===v.filepattern&&console.warn(`Overwriting filepattern <<${v.filepattern}>> to now point to mime <<${v.mime}>>`),v.firstline&&f.firstline===v.firstline&&console.warn(`Overwriting firstline <<${v.firstline}>> to now point to mime <<${v.mime}>>`))})}function n(a,l){return{id:a.id,mime:a.mime,filename:a.filename,extension:a.extension,filepattern:a.filepattern,firstline:a.firstline,userConfigured:l,filenameLowercase:a.filename?a.filename.toLowerCase():void 0,extensionLowercase:a.extension?a.extension.toLowerCase():void 0,filepatternLowercase:a.filepattern?(0,_.parse)(a.filepattern.toLowerCase()):void 0,filepatternOnPath:a.filepattern?a.filepattern.indexOf(D.posix.sep)>=0:!1}}function r(){g=g.filter(a=>a.userConfigured),m=[]}e.clearPlatformLanguageAssociations=r;function d(a,l){return h(a,l).map(u=>u.id)}e.getLanguageIds=d;function h(a,l){let u;if(a)switch(a.scheme){case L.Schemas.file:u=a.fsPath;break;case L.Schemas.data:{u=w.DataUri.parseMetaData(a).get(w.DataUri.META_DATA_LABEL);break}case L.Schemas.vscodeNotebookCell:u=void 0;break;default:u=a.path}if(!u)return[{id:"unknown",mime:k.Mimes.unknown}];u=u.toLowerCase();const v=(0,D.basename)(u),f=o(u,v,s);if(f)return[f,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];const p=o(u,v,m);if(p)return[p,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];if(l){const C=c(l);if(C)return[C,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}]}return[{id:"unknown",mime:k.Mimes.unknown}]}function o(a,l,u){var v;let f,p,C;for(let y=u.length-1;y>=0;y--){const E=u[y];if(l===E.filenameLowercase){f=E;break}if(E.filepattern&&(!p||E.filepattern.length>p.filepattern.length)){const I=E.filepatternOnPath?a:l;!((v=E.filepatternLowercase)===null||v===void 0)&&v.call(E,I)&&(p=E)}E.extension&&(!C||E.extension.length>C.extension.length)&&l.endsWith(E.extensionLowercase)&&(C=E)}if(f)return f;if(p)return p;if(C)return C}function c(a){if((0,b.startsWithUTF8BOM)(a)&&(a=a.substr(1)),a.length>0)for(let l=g.length-1;l>=0;l--){const u=g[l];if(!u.firstline)continue;const v=a.match(u.firstline);if(v&&v.length>0)return u}}}),define(J[750],ee([1,0,6,2,9,749,72,98,37]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const g=Object.prototype.hasOwnProperty,m="vs.editor.nullLanguage";class s{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(m,0),this._register(w.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(n,r){this._languageIdToLanguage[r]=n,this._languageToLanguageId.set(n,r)}register(n){if(this._languageToLanguageId.has(n))return;const r=this._nextLanguageId++;this._register(n,r)}encodeLanguageId(n){return this._languageToLanguageId.get(n)||0}decodeLanguageId(n){return this._languageIdToLanguage[n]||m}}e.LanguageIdCodec=s;class t extends k.Disposable{constructor(n=!0,r=!1){super(),this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,t.instanceCount++,this._warnOnOverwrite=r,this.languageIdCodec=new s,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},n&&(this._initializeFromRegistry(),this._register(w.ModesRegistry.onDidChangeLanguages(d=>{this._initializeFromRegistry()})))}dispose(){t.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,D.clearPlatformLanguageAssociations)();const n=[].concat(w.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(n)}_registerLanguages(n){for(const r of n)this._registerLanguage(r);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(r=>{const d=this._languages[r];d.name&&(this._nameMap[d.name]=d.identifier),d.aliases.forEach(h=>{this._lowercaseNameMap[h.toLowerCase()]=d.identifier}),d.mimetypes.forEach(h=>{this._mimeTypesMap[h]=d.identifier})}),S.Registry.as(b.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(n){const r=n.id;let d;g.call(this._languages,r)?d=this._languages[r]:(this.languageIdCodec.register(r),d={identifier:r,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[r]=d),this._mergeLanguage(d,n)}_mergeLanguage(n,r){const d=r.id;let h=null;if(Array.isArray(r.mimetypes)&&r.mimetypes.length>0&&(n.mimetypes.push(...r.mimetypes),h=r.mimetypes[0]),h||(h=`text/x-${d}`,n.mimetypes.push(h)),Array.isArray(r.extensions)){r.configuration?n.extensions=r.extensions.concat(n.extensions):n.extensions=n.extensions.concat(r.extensions);for(const a of r.extensions)(0,D.registerPlatformLanguageAssociation)({id:d,mime:h,extension:a},this._warnOnOverwrite)}if(Array.isArray(r.filenames))for(const a of r.filenames)(0,D.registerPlatformLanguageAssociation)({id:d,mime:h,filename:a},this._warnOnOverwrite),n.filenames.push(a);if(Array.isArray(r.filenamePatterns))for(const a of r.filenamePatterns)(0,D.registerPlatformLanguageAssociation)({id:d,mime:h,filepattern:a},this._warnOnOverwrite);if(typeof r.firstLine=="string"&&r.firstLine.length>0){let a=r.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);(0,L.regExpLeadsToEndlessLoop)(l)||(0,D.registerPlatformLanguageAssociation)({id:d,mime:h,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${r.id}]: Invalid regular expression \\`${a}\\`: `,l)}}n.aliases.push(d);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||n.aliases.push(a);const c=o!==null&&o.length>0;if(!(c&&o[0]===null)){const a=(c?o[0]:null)||d;(c||!n.name)&&(n.name=a)}r.configuration&&n.configurationFiles.push(r.configuration),r.icon&&n.icons.push(r.icon)}isRegisteredLanguageId(n){return n?g.call(this._languages,n):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(n){const r=n.toLowerCase();return g.call(this._lowercaseNameMap,r)?this._lowercaseNameMap[r]:null}getLanguageIdByMimeType(n){return n&&g.call(this._mimeTypesMap,n)?this._mimeTypesMap[n]:null}guessLanguageIdByFilepathOrFirstLine(n,r){return!n&&!r?[]:(0,D.getLanguageIds)(n,r)}}e.LanguagesRegistry=t,t.instanceCount=0}),define(J[751],ee([1,0,6,2,750,16,27,72]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class S extends k.Disposable{constructor(s=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new _.Emitter),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new _.Emitter),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new _.Emitter({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,S.instanceCount++,this._registry=this._register(new L.LanguagesRegistry(!0,s)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){S.instanceCount--,super.dispose()}isRegisteredLanguageId(s){return this._registry.isRegisteredLanguageId(s)}getLanguageIdByLanguageName(s){return this._registry.getLanguageIdByLanguageName(s)}getLanguageIdByMimeType(s){return this._registry.getLanguageIdByMimeType(s)}guessLanguageIdByFilepathOrFirstLine(s,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(s,t);return(0,D.firstOrDefault)(i,null)}createById(s){return new g(this.onDidChange,()=>this._createAndGetLanguageIdentifier(s))}createByFilepathOrFirstLine(s,t){return new g(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(s,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(s){return(!s||!this.isRegisteredLanguageId(s))&&(s=b.PLAINTEXT_LANGUAGE_ID),s}requestBasicLanguageFeatures(s){this._requestedBasicLanguages.has(s)||(this._requestedBasicLanguages.add(s),this._onDidRequestBasicLanguageFeatures.fire(s))}requestRichLanguageFeatures(s){this._requestedRichLanguages.has(s)||(this._requestedRichLanguages.add(s),this.requestBasicLanguageFeatures(s),w.TokenizationRegistry.getOrCreate(s),this._onDidRequestRichLanguageFeatures.fire(s))}}e.LanguageService=S,S.instanceCount=0;class g{constructor(s,t){this._onDidChangeLanguages=s,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 _.Emitter({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var s;const t=this._selector();t!==this.languageId&&(this.languageId=t,(s=this._emitter)===null||s===void 0||s.fire(this.languageId))}}}),define(J[330],ee([1,0,36,234,50,29,2,19,142]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDocumentColorProvider=void 0;class g{constructor(t,i){this._editorWorkerClient=new k.EditorWorkerClient(t,!1,"editorWorkerService",i)}provideDocumentColors(t,i){return we(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(t.uri)})}provideColorPresentations(t,i,n){const r=i.range,d=i.color,h=d.alpha,o=new _.Color(new _.RGBA(Math.round(255*d.red),Math.round(255*d.green),Math.round(255*d.blue),h)),c=h?_.Color.Format.CSS.formatRGB(o):_.Color.Format.CSS.formatRGBA(o),a=h?_.Color.Format.CSS.formatHSL(o):_.Color.Format.CSS.formatHSLA(o),l=h?_.Color.Format.CSS.formatHex(o):_.Color.Format.CSS.formatHexA(o),u=[];return u.push({label:c,textEdit:{range:r,text:c}}),u.push({label:a,textEdit:{range:r,text:a}}),u.push({label:l,textEdit:{range:r,text:l}}),u}}e.DefaultDocumentColorProvider=g;let m=class extends w.Disposable{constructor(t,i,n){super(),this._register(n.colorProvider.register("*",new g(t,i)))}};m=Te([ge(0,L.IModelService),ge(1,D.ILanguageConfigurationService),ge(2,b.ILanguageFeaturesService)],m),(0,S.registerEditorFeature)(m)}),define(J[331],ee([1,0,20,11,21,5,50,25,19,330,28]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function s(o,c,a,l=!0){return we(this,void 0,void 0,function*(){return d(new i,o,c,a,l)})}e.getColors=s;function t(o,c,a,l){return Promise.resolve(a.provideColorPresentations(o,c,l))}e.getColorPresentations=t;class i{constructor(){}compute(c,a,l,u){return we(this,void 0,void 0,function*(){const v=yield c.provideDocumentColors(a,l);if(Array.isArray(v))for(const f of v)u.push({colorInfo:f,provider:c});return Array.isArray(v)})}}class n{constructor(){}compute(c,a,l,u){return we(this,void 0,void 0,function*(){const v=yield c.provideDocumentColors(a,l);if(Array.isArray(v))for(const f of v)u.push({range:f.range,color:[f.color.red,f.color.green,f.color.blue,f.color.alpha]});return Array.isArray(v)})}}class r{constructor(c){this.colorInfo=c}compute(c,a,l,u){return we(this,void 0,void 0,function*(){const v=yield c.provideColorPresentations(a,this.colorInfo,_.CancellationToken.None);return Array.isArray(v)&&u.push(...v),Array.isArray(v)})}}function d(o,c,a,l,u){return we(this,void 0,void 0,function*(){let v=!1,f;const p=[],C=c.ordered(a);for(let y=C.length-1;y>=0;y--){const E=C[y];if(E instanceof g.DefaultDocumentColorProvider)f=E;else try{(yield o.compute(E,a,l,p))&&(v=!0)}catch(I){(0,k.onUnexpectedExternalError)(I)}}return v?p:f&&u?(yield o.compute(f,a,l,p),p):[]})}function h(o,c){const{colorProvider:a}=o.get(S.ILanguageFeaturesService),l=o.get(w.IModelService).getModel(c);if(!l)throw(0,k.illegalArgument)();const u=o.get(m.IConfigurationService).getValue("editor.defaultColorDecorators",{resource:c});return{model:l,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:u}}b.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(o,...c){const[a]=c;if(!(a instanceof L.URI))throw(0,k.illegalArgument)();const{model:l,colorProviderRegistry:u,isDefaultColorDecoratorsEnabled:v}=h(o,a);return d(new n,u,l,_.CancellationToken.None,v)}),b.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(o,...c){const[a,l]=c,{uri:u,range:v}=l;if(!(u instanceof L.URI)||!Array.isArray(a)||a.length!==4||!D.Range.isIRange(v))throw(0,k.illegalArgument)();const{model:f,colorProviderRegistry:p,isDefaultColorDecoratorsEnabled:C}=h(o,u),[y,E,I,T]=a;return d(new r({range:v,color:{red:y,green:E,blue:I,alpha:T}}),p,f,_.CancellationToken.None,C)})}),define(J[752],ee([1,0,20,64,2,82,114,12,27,29,19,283,588]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionWithUpdatedRange=e.UpToDateInlineCompletions=e.InlineCompletionsSource=void 0;let i=e.InlineCompletionsSource=class extends L.Disposable{constructor(u,v,f,p,C){super(),this.textModel=u,this.versionId=v,this._debounceValue=f,this.languageFeaturesService=p,this.languageConfigurationService=C,this._updateOperation=this._register(new L.MutableDisposable),this.inlineCompletions=(0,w.disposableObservableValue)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,w.disposableObservableValue)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(u,v,f){var p,C;const y=new r(u,v,this.textModel.getVersionId()),E=v.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((p=this._updateOperation.value)===null||p===void 0)&&p.request.satisfies(y))return this._updateOperation.value.promise;if(!((C=E.get())===null||C===void 0)&&C.request.satisfies(y))return Promise.resolve(!0);const I=!!this._updateOperation.value;this._updateOperation.clear();const T=new _.CancellationTokenSource,O=(()=>we(this,void 0,void 0,function*(){if((I||v.triggerKind===S.InlineCompletionTriggerKind.Automatic)&&(yield n(this._debounceValue.get(this.textModel))),T.token.isCancellationRequested||this.textModel.getVersionId()!==y.versionId)return!1;const N=new Date,P=yield(0,t.provideInlineCompletions)(this.languageFeaturesService.inlineCompletionsProvider,u,this.textModel,v,T.token,this.languageConfigurationService);if(T.token.isCancellationRequested||this.textModel.getVersionId()!==y.versionId)return!1;const x=new Date;this._debounceValue.update(this.textModel,x.getTime()-N.getTime());const F=new o(P,y,this.textModel,this.versionId);if(f){const B=f.toInlineCompletion(void 0);f.canBeReused(this.textModel,u)&&!P.has(B)&&F.prepend(f.inlineCompletion,B.range,!0)}return this._updateOperation.clear(),(0,w.transaction)(B=>{E.set(F,B)}),!0}))(),R=new h(y,T,O);return this._updateOperation.value=R,O}clear(u){this._updateOperation.clear(),this.inlineCompletions.set(void 0,u),this.suggestWidgetInlineCompletions.set(void 0,u)}clearSuggestWidgetInlineCompletions(u){var v;!((v=this._updateOperation.value)===null||v===void 0)&&v.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,u)}cancelUpdate(){this._updateOperation.clear()}};e.InlineCompletionsSource=i=Te([ge(3,m.ILanguageFeaturesService),ge(4,g.ILanguageConfigurationService)],i);function n(l,u){return new Promise(v=>{let f;const p=setTimeout(()=>{f&&f.dispose(),v()},l);u&&(f=u.onCancellationRequested(()=>{clearTimeout(p),f&&f.dispose(),v()}))})}class r{constructor(u,v,f){this.position=u,this.context=v,this.versionId=f}satisfies(u){return this.position.equals(u.position)&&d(this.context.selectedSuggestionInfo,u.context.selectedSuggestionInfo,(v,f)=>v.equals(f))&&(u.context.triggerKind===S.InlineCompletionTriggerKind.Automatic||this.context.triggerKind===S.InlineCompletionTriggerKind.Explicit)&&this.versionId===u.versionId}}function d(l,u,v){return!l||!u?l===u:v(l,u)}class h{constructor(u,v,f){this.request=u,this.cancellationTokenSource=v,this.promise=f}dispose(){this.cancellationTokenSource.cancel()}}class o{get inlineCompletions(){return this._inlineCompletions}constructor(u,v,f,p){this.inlineCompletionProviderResult=u,this.request=v,this.textModel=f,this.versionId=p,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=(0,D.derived)("ranges",y=>{this.versionId.read(y);let E=!1;for(const I of this._inlineCompletions)E=E||I._updateRange(this.textModel);return E&&this._rangeVersionIdValue++,this._rangeVersionIdValue});const C=f.deltaDecorations([],u.completions.map(y=>({range:y.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=u.completions.map((y,E)=>new c(y,C[E],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){this.textModel.deltaDecorations(this._inlineCompletions.map(u=>u.decorationId),[]),this.inlineCompletionProviderResult.dispose();for(const u of this._prependedInlineCompletionItems)u.source.removeRef()}}prepend(u,v,f){f&&u.source.addRef();const p=this.textModel.deltaDecorations([],[{range:v,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new c(u,p,this._rangeVersionId,v)),this._prependedInlineCompletionItems.push(u)}}e.UpToDateInlineCompletions=o;class c{get forwardStable(){var u;return(u=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&u!==void 0?u:!1}constructor(u,v,f,p){this.inlineCompletion=u,this.decorationId=v,this.rangeVersion=f,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=p??u.range}toInlineCompletion(u){return this.inlineCompletion.withRange(this._getUpdatedRange(u))}toSingleTextEdit(u){return new s.SingleTextEdit(this._getUpdatedRange(u),this.inlineCompletion.insertText)}isVisible(u,v,f){const p=this._toFilterTextReplacement(f).removeCommonPrefix(u);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(f).getStartPosition())||v.lineNumber!==p.range.startLineNumber)return!1;const C=u.getValueInRange(p.range,1).toLowerCase(),y=p.text.toLowerCase(),E=Math.max(0,v.column-p.range.startColumn);let I=y.substring(0,E),T=y.substring(E),O=C.substring(0,E),R=C.substring(E);const M=u.getLineIndentColumn(p.range.startLineNumber);return p.range.startColumn<=M&&(O=O.trimStart(),O.length===0&&(R=R.trimStart()),I=I.trimStart(),I.length===0&&(T=T.trimStart())),I.startsWith(O)&&!!(0,k.matchesSubString)(R,T)}canBeReused(u,v){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(v)&&this.isVisible(u,v,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(u){return new s.SingleTextEdit(this._getUpdatedRange(u),this.inlineCompletion.filterText)}_isSmallerThanOriginal(u){return a(this._getUpdatedRange(u)).isBefore(a(this.inlineCompletion.range))}_getUpdatedRange(u){return this.rangeVersion.read(u),this._updatedRange}_updateRange(u){const v=u.getDecorationRange(this.decorationId);return v?this._updatedRange.equalsRange(v)?!1:(this._updatedRange=v,!0):(this._isValid=!1,!0)}}e.InlineCompletionWithUpdatedRange=c;function a(l){return l.startLineNumber===l.endLineNumber?new b.Position(1,1+l.endColumn-l.startColumn):new b.Position(1+l.endLineNumber-l.startLineNumber,l.endColumn)}}),define(J[753],ee([1,0,9,237,5,24,105,29,282,235,236]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;let s=e.MoveLinesCommand=class{constructor(i,n,r,d){this._languageConfigurationService=d,this._selection=i,this._isMovingDown=n,this._autoIndent=r,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(i,n){const r=i.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){this._selectionId=n.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=n.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let d=this._selection;d.startLineNumber<d.endLineNumber&&d.endColumn===1&&(this._moveEndPositionDown=!0,d=d.setEndPosition(d.endLineNumber-1,i.getLineMaxColumn(d.endLineNumber-1)));const{tabSize:h,indentSize:o,insertSpaces:c}=i.getOptions(),a=this.buildIndentConverter(h,o,c),l={tokenization:{getLineTokens:u=>i.tokenization.getLineTokens(u),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(u,v)=>i.getLanguageIdAtPosition(u,v)},getLineContent:null};if(d.startLineNumber===d.endLineNumber&&i.getLineMaxColumn(d.startLineNumber)===1){const u=d.startLineNumber,v=this._isMovingDown?u+1:u-1;i.getLineMaxColumn(v)===1?n.addEditOperation(new L.Range(1,1,1,1),null):(n.addEditOperation(new L.Range(u,1,u,1),i.getLineContent(v)),n.addEditOperation(new L.Range(v,1,v,i.getLineMaxColumn(v)),null)),d=new D.Selection(v,1,v,1)}else{let u,v;if(this._isMovingDown){u=d.endLineNumber+1,v=i.getLineContent(u),n.addEditOperation(new L.Range(u-1,i.getLineMaxColumn(u-1),u,i.getLineMaxColumn(u)),null);let f=v;if(this.shouldAutoIndent(i,d)){const p=this.matchEnterRule(i,a,h,u,d.startLineNumber-1);if(p!==null){const y=_.getLeadingWhitespace(i.getLineContent(u)),E=p+S.getSpaceCnt(y,h);f=S.generateIndent(E,h,c)+this.trimLeft(v)}else{l.getLineContent=E=>E===d.startLineNumber?i.getLineContent(u):i.getLineContent(E);const y=(0,g.getGoodIndentForLine)(this._autoIndent,l,i.getLanguageIdAtPosition(u,1),d.startLineNumber,a,this._languageConfigurationService);if(y!==null){const E=_.getLeadingWhitespace(i.getLineContent(u)),I=S.getSpaceCnt(y,h),T=S.getSpaceCnt(E,h);I!==T&&(f=S.generateIndent(I,h,c)+this.trimLeft(v))}}n.addEditOperation(new L.Range(d.startLineNumber,1,d.startLineNumber,1),f+`\n`);const C=this.matchEnterRuleMovingDown(i,a,h,d.startLineNumber,u,f);if(C!==null)C!==0&&this.getIndentEditsOfMovingBlock(i,n,d,h,c,C);else{l.getLineContent=E=>E===d.startLineNumber?f:E>=d.startLineNumber+1&&E<=d.endLineNumber+1?i.getLineContent(E-1):i.getLineContent(E);const y=(0,g.getGoodIndentForLine)(this._autoIndent,l,i.getLanguageIdAtPosition(u,1),d.startLineNumber+1,a,this._languageConfigurationService);if(y!==null){const E=_.getLeadingWhitespace(i.getLineContent(d.startLineNumber)),I=S.getSpaceCnt(y,h),T=S.getSpaceCnt(E,h);if(I!==T){const O=I-T;this.getIndentEditsOfMovingBlock(i,n,d,h,c,O)}}}}else n.addEditOperation(new L.Range(d.startLineNumber,1,d.startLineNumber,1),f+`\n`)}else if(u=d.startLineNumber-1,v=i.getLineContent(u),n.addEditOperation(new L.Range(u,1,u+1,1),null),n.addEditOperation(new L.Range(d.endLineNumber,i.getLineMaxColumn(d.endLineNumber),d.endLineNumber,i.getLineMaxColumn(d.endLineNumber)),`\n`+v),this.shouldAutoIndent(i,d)){l.getLineContent=p=>p===u?i.getLineContent(d.startLineNumber):i.getLineContent(p);const f=this.matchEnterRule(i,a,h,d.startLineNumber,d.startLineNumber-2);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(i,n,d,h,c,f);else{const p=(0,g.getGoodIndentForLine)(this._autoIndent,l,i.getLanguageIdAtPosition(d.startLineNumber,1),u,a,this._languageConfigurationService);if(p!==null){const C=_.getLeadingWhitespace(i.getLineContent(d.startLineNumber)),y=S.getSpaceCnt(p,h),E=S.getSpaceCnt(C,h);if(y!==E){const I=y-E;this.getIndentEditsOfMovingBlock(i,n,d,h,c,I)}}}}}this._selectionId=n.trackSelection(d)}buildIndentConverter(i,n,r){return{shiftIndent:d=>k.ShiftCommand.shiftIndent(d,d.length+1,i,n,r),unshiftIndent:d=>k.ShiftCommand.unshiftIndent(d,d.length+1,i,n,r)}}parseEnterResult(i,n,r,d,h){if(h){let o=h.indentation;h.indentAction===w.IndentAction.None||h.indentAction===w.IndentAction.Indent?o=h.indentation+h.appendText:h.indentAction===w.IndentAction.IndentOutdent?o=h.indentation:h.indentAction===w.IndentAction.Outdent&&(o=n.unshiftIndent(h.indentation)+h.appendText);const c=i.getLineContent(d);if(this.trimLeft(c).indexOf(this.trimLeft(o))>=0){const a=_.getLeadingWhitespace(i.getLineContent(d));let l=_.getLeadingWhitespace(o);const u=(0,g.getIndentMetadata)(i,d,this._languageConfigurationService);u!==null&&u&2&&(l=n.unshiftIndent(l));const v=S.getSpaceCnt(l,r),f=S.getSpaceCnt(a,r);return v-f}}return null}matchEnterRuleMovingDown(i,n,r,d,h,o){if(_.lastNonWhitespaceIndex(o)>=0){const c=i.getLineMaxColumn(h),a=(0,m.getEnterAction)(this._autoIndent,i,new L.Range(h,c,h,c),this._languageConfigurationService);return this.parseEnterResult(i,n,r,d,a)}else{let c=d-1;for(;c>=1;){const u=i.getLineContent(c);if(_.lastNonWhitespaceIndex(u)>=0)break;c--}if(c<1||d>i.getLineCount())return null;const a=i.getLineMaxColumn(c),l=(0,m.getEnterAction)(this._autoIndent,i,new L.Range(c,a,c,a),this._languageConfigurationService);return this.parseEnterResult(i,n,r,d,l)}}matchEnterRule(i,n,r,d,h,o){let c=h;for(;c>=1;){let u;if(c===h&&o!==void 0?u=o:u=i.getLineContent(c),_.lastNonWhitespaceIndex(u)>=0)break;c--}if(c<1||d>i.getLineCount())return null;const a=i.getLineMaxColumn(c),l=(0,m.getEnterAction)(this._autoIndent,i,new L.Range(c,a,c,a),this._languageConfigurationService);return this.parseEnterResult(i,n,r,d,l)}trimLeft(i){return i.replace(/^\\s+/,"")}shouldAutoIndent(i,n){if(this._autoIndent<4||!i.tokenization.isCheapToTokenize(n.startLineNumber))return!1;const r=i.getLanguageIdAtPosition(n.startLineNumber,1),d=i.getLanguageIdAtPosition(n.endLineNumber,1);return!(r!==d||this._languageConfigurationService.getLanguageConfiguration(r).indentRulesSupport===null)}getIndentEditsOfMovingBlock(i,n,r,d,h,o){for(let c=r.startLineNumber;c<=r.endLineNumber;c++){const a=i.getLineContent(c),l=_.getLeadingWhitespace(a),v=S.getSpaceCnt(l,d)+o,f=S.generateIndent(v,d,h);f!==l&&(n.addEditOperation(new L.Range(c,1,c,l.length+1),f),c===r.endLineNumber&&r.endColumn<=l.length+1&&f===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(i,n){let r=n.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}};e.MoveLinesCommand=s=Te([ge(3,b.ILanguageConfigurationService)],s)}),define(J[128],ee([1,0,217,86,11,6,2,76,39,72,309,52,440]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.openLinkFromMarkdown=e.MarkdownRenderer=void 0;let t=e.MarkdownRenderer=class Oi{constructor(d,h,o){this._options=d,this._languageService=h,this._openerService=o,this._onDidRenderAsync=new D.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(d,h,o){if(!d)return{element:document.createElement("span"),dispose:()=>{}};const c=new w.DisposableStore,a=c.add((0,_.renderMarkdown)(d,Object.assign(Object.assign({},this._getRenderOptions(d,c)),h),o));return a.element.classList.add("rendered-markdown"),{element:a.element,dispose:()=>c.dispose()}}_getRenderOptions(d,h){return{codeBlockRenderer:(o,c)=>we(this,void 0,void 0,function*(){var a,l,u;let v;o?v=this._languageService.getLanguageIdByLanguageName(o):this._options.editor&&(v=(a=this._options.editor.getModel())===null||a===void 0?void 0:a.getLanguageId()),v||(v=g.PLAINTEXT_LANGUAGE_ID);const f=yield(0,m.tokenizeToString)(this._languageService,c,v),p=document.createElement("span");if(p.innerHTML=(u=(l=Oi._ttpTokenizer)===null||l===void 0?void 0:l.createHTML(f))!==null&&u!==void 0?u:f,this._options.editor){const C=this._options.editor.getOption(48);(0,b.applyFontInfo)(p,C)}else this._options.codeBlockFontFamily&&(p.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(p.style.fontSize=this._options.codeBlockFontSize),p}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:o=>i(this._openerService,o,d.isTrusted),disposables:h}}}};t._ttpTokenizer=(0,k.createTrustedTypesPolicy)("tokenizeToString",{createHTML(r){return r}}),e.MarkdownRenderer=t=Te([ge(1,S.ILanguageService),ge(2,s.IOpenerService)],t);function i(r,d,h){return we(this,void 0,void 0,function*(){try{return yield r.open(d,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:n(h)})}catch(o){return(0,L.onUnexpectedError)(o),!1}})}e.openLinkFromMarkdown=i;function n(r){return r===!0?!0:r&&Array.isArray(r.enabledCommands)?r.enabledCommands:!1}}),define(J[754],ee([1,0,7,16,61,2,128,312,298]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const g=_.$;class m extends D.Disposable{constructor(i,n,r){super(),this._renderDisposeables=this._register(new D.DisposableStore),this._editor=i,this._isVisible=!1,this._messages=[],this._hover=this._register(new S.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new w.MarkdownRenderer({editor:this._editor},n,r)),this._computer=new s(this._editor),this._hoverOperation=this._register(new b.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(d=>{this._withResult(d.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(d=>{d.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(n=>this._editor.applyFontInfo(n))}_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,n){this._renderDisposeables.clear();const r=document.createDocumentFragment();for(const d of n){const h=g("div.hover-row.markdown-hover"),o=_.append(h,g("div.hover-contents")),c=this._renderDisposeables.add(this._markdownRenderer.render(d.value));o.appendChild(c.element),r.appendChild(h)}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 n=this._editor.getLayoutInfo(),r=this._editor.getTopForLineNumber(i),d=this._editor.getScrollTop(),h=this._editor.getOption(64),o=this._hover.containerDomNode.clientHeight,c=r-d-(o-h)/2;this._hover.containerDomNode.style.left=`${n.glyphMarginLeft+n.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(c),0)}px`}}e.MarginHoverWidget=m,m.ID="editor.contrib.modesGlyphHoverWidget";class s{get lineNumber(){return this._lineNumber}set lineNumber(i){this._lineNumber=i}constructor(i){this._editor=i,this._lineNumber=-1}computeSync(){const i=d=>({value:d}),n=this._editor.getLineDecorations(this._lineNumber),r=[];if(!n)return r;for(const d of n){if(!d.options.glyphMarginClassName)continue;const h=d.options.glyphMarginHoverMessage;!h||(0,L.isEmptyMarkdownString)(h)||r.push(...(0,k.asArray)(h).map(i))}return r}}}),define(J[332],ee([1,0,7,79,26,31,6,61,2,128,296,675,8]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function i(d){return!!d&&!!(d.completion.documentation||d.completion.detail&&d.completion.detail!==d.completion.label)}e.canExpandCompletionItem=i;let n=e.SuggestDetailsWidget=class{constructor(h,o){this._editor=h,this._onDidClose=new w.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new w.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new S.DisposableStore,this._renderDisposeable=new S.DisposableStore,this._borderWidth=1,this._size=new _.Dimension(330,0),this.domNode=_.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=o.createInstance(g.MarkdownRenderer,{editor:h}),this._body=_.$(".body"),this._scrollbar=new k.DomScrollableElement(this._body,{alwaysConsumeMouseWheel:!0}),_.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=_.append(this._body,_.$(".header")),this._close=_.append(this._header,_.$("span"+D.ThemeIcon.asCSSSelector(L.Codicon.close))),this._close.title=s.localize(0,null),this._type=_.append(this._header,_.$("p.type")),this._docs=_.append(this._body,_.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(48)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const h=this._editor.getOptions(),o=h.get(48),c=o.getMassagedFontFamily(),a=h.get(115)||o.fontSize,l=h.get(116)||o.lineHeight,u=o.fontWeight,v=`${a}px`,f=`${l}px`;this.domNode.style.fontSize=v,this.domNode.style.lineHeight=`${l/a}`,this.domNode.style.fontWeight=u,this.domNode.style.fontFeatureSettings=o.fontFeatureSettings,this._type.style.fontFamily=c,this._close.style.height=f,this._close.style.width=f}getLayoutInfo(){const h=this._editor.getOption(116)||this._editor.getOption(48).lineHeight,o=this._borderWidth,c=o*2;return{lineHeight:h,borderWidth:o,borderHeight:c,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=s.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(h,o){var c,a;this._renderDisposeable.clear();let{detail:l,documentation:u}=h.completion;if(o){let v="";v+=`score: ${h.score[0]}\n`,v+=`prefix: ${(c=h.word)!==null&&c!==void 0?c:"(no prefix)"}\n`,v+=`word: ${h.completion.filterText?h.completion.filterText+" (filterText)":h.textLabel}\n`,v+=`distance: ${h.distance} (localityBonus-setting)\n`,v+=`index: ${h.idx}, based on ${h.completion.sortText&&`sortText: "${h.completion.sortText}"`||"label"}\n`,v+=`commit_chars: ${(a=h.completion.commitCharacters)===null||a===void 0?void 0:a.join("")}\n`,u=new b.MarkdownString().appendCodeblock("empty",v),l=`Provider: ${h.provider._debugDisplayName}`}if(!o&&!i(h)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),l){const v=l.length>1e5?`${l.substr(0,1e5)}\\u2026`:l;this._type.textContent=v,this._type.title=v,_.show(this._type),this._type.classList.toggle("auto-wrap",!/\\r?\\n^\\s+/gmi.test(v))}else _.clearNode(this._type),this._type.title="",_.hide(this._type),this.domNode.classList.add("no-type");if(_.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"),_.clearNode(this._docs);const v=this._markdownRenderer.render(u);this._docs.appendChild(v.element),this._renderDisposeable.add(v),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=v=>{v.preventDefault(),v.stopPropagation()},this._close.onclick=v=>{v.preventDefault(),v.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(h,o){const c=new _.Dimension(h,o);_.Dimension.equals(c,this._size)||(this._size=c,_.size(this.domNode,h,o)),this._scrollbar.scanDomNode()}scrollDown(h=8){this._body.scrollTop+=h}scrollUp(h=8){this._body.scrollTop-=h}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(h){this._borderWidth=h}get borderWidth(){return this._borderWidth}};e.SuggestDetailsWidget=n=Te([ge(1,t.IInstantiationService)],n);class r{constructor(h,o){this.widget=h,this._editor=o,this._disposables=new S.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new m.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(h.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let c,a,l=0,u=0;this._disposables.add(this._resizable.onDidWillResize(()=>{c=this._topLeft,a=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(v=>{if(c&&a){this.widget.layout(v.dimension.width,v.dimension.height);let f=!1;v.west&&(u=a.width-v.dimension.width,f=!0),v.north&&(l=a.height-v.dimension.height,f=!0),f&&this._applyTopLeft({top:c.top+l,left:c.left+u})}v.done&&(c=void 0,a=void 0,l=0,u=0,this._userSize=v.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var v;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(v=this._userSize)!==null&&v!==void 0?v: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(h=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),h&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(h,o){var c;const a=h.getBoundingClientRect();this._anchorBox=a,this._preferAlignAtTop=o,this._placeAtAnchor(this._anchorBox,(c=this._userSize)!==null&&c!==void 0?c:this.widget.size,o)}_placeAtAnchor(h,o,c){var a;const l=_.getClientArea(document.body),u=this.widget.getLayoutInfo(),v=new _.Dimension(220,2*u.lineHeight),f=h.top,p=function(){const P=l.width-(h.left+h.width+u.borderWidth+u.horizontalPadding),x=-u.borderWidth+h.left+h.width,F=new _.Dimension(P,l.height-h.top-u.borderHeight-u.verticalPadding),B=F.with(void 0,h.top+h.height-u.borderHeight-u.verticalPadding);return{top:f,left:x,fit:P-o.width,maxSizeTop:F,maxSizeBottom:B,minSize:v.with(Math.min(P,v.width))}}(),C=function(){const P=h.left-u.borderWidth-u.horizontalPadding,x=Math.max(u.horizontalPadding,h.left-o.width-u.borderWidth),F=new _.Dimension(P,l.height-h.top-u.borderHeight-u.verticalPadding),B=F.with(void 0,h.top+h.height-u.borderHeight-u.verticalPadding);return{top:f,left:x,fit:P-o.width,maxSizeTop:F,maxSizeBottom:B,minSize:v.with(Math.min(P,v.width))}}(),y=function(){const P=h.left,x=-u.borderWidth+h.top+h.height,F=new _.Dimension(h.width-u.borderHeight,l.height-h.top-h.height-u.verticalPadding);return{top:x,left:P,fit:F.height-o.height,maxSizeBottom:F,maxSizeTop:F,minSize:v.with(F.width)}}(),E=[p,C,y],I=(a=E.find(P=>P.fit>=0))!==null&&a!==void 0?a:E.sort((P,x)=>x.fit-P.fit)[0],T=h.top+h.height-u.borderHeight;let O,R=o.height;const M=Math.max(I.maxSizeTop.height,I.maxSizeBottom.height);R>M&&(R=M);let N;c?R<=I.maxSizeTop.height?(O=!0,N=I.maxSizeTop):(O=!1,N=I.maxSizeBottom):R<=I.maxSizeBottom.height?(O=!1,N=I.maxSizeBottom):(O=!0,N=I.maxSizeTop),this._applyTopLeft({left:I.left,top:O?I.top:T-R}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!O,I===p,O,I!==p),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(h){this._topLeft=h,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=r}),define(J[333],ee([1,0,16,60,45,18,21,28,98,37]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function m(d){return Object.isFrozen(d)?d:L.deepFreeze(d)}class s{constructor(h={},o=[],c=[],a){this._contents=h,this._keys=o,this._overrides=c,this.raw=a,this.overrideConfigurations=new Map}get rawConfiguration(){var h;if(!this._rawConfiguration)if(!((h=this.raw)===null||h===void 0)&&h.length){const o=this.raw.map(c=>{if(c instanceof s)return c;const a=new t("");return a.parseRaw(c),a.configurationModel});this._rawConfiguration=o.reduce((c,a)=>a===c?a:c.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(h){return h?(0,b.getConfigurationValue)(this.contents,h):this.contents}inspect(h,o){const c=this.rawConfiguration.getValue(h),a=o?this.rawConfiguration.getOverrideValue(h,o):void 0,l=o?this.rawConfiguration.override(o).getValue(h):c;return{value:c,override:a,merged:l}}getOverrideValue(h,o){const c=this.getContentsForOverrideIdentifer(o);return c?h?(0,b.getConfigurationValue)(c,h):c:void 0}override(h){let o=this.overrideConfigurations.get(h);return o||(o=this.createOverrideConfigurationModel(h),this.overrideConfigurations.set(h,o)),o}merge(...h){var o,c;const a=L.deepClone(this.contents),l=L.deepClone(this.overrides),u=[...this.keys],v=!((o=this.raw)===null||o===void 0)&&o.length?[...this.raw]:[this];for(const f of h)if(v.push(...!((c=f.raw)===null||c===void 0)&&c.length?f.raw:[f]),!f.isEmpty()){this.mergeContents(a,f.contents);for(const p of f.overrides){const[C]=l.filter(y=>_.equals(y.identifiers,p.identifiers));C?(this.mergeContents(C.contents,p.contents),C.keys.push(...p.keys),C.keys=_.distinct(C.keys)):l.push(L.deepClone(p))}for(const p of f.keys)u.indexOf(p)===-1&&u.push(p)}return new s(a,u,l,v.every(f=>f instanceof s)?void 0:v)}createOverrideConfigurationModel(h){const o=this.getContentsForOverrideIdentifer(h);if(!o||typeof o!="object"||!Object.keys(o).length)return this;const c={};for(const a of _.distinct([...Object.keys(this.contents),...Object.keys(o)])){let l=this.contents[a];const u=o[a];u&&(typeof l=="object"&&typeof u=="object"?(l=L.deepClone(l),this.mergeContents(l,u)):l=u),c[a]=l}return new s(c,this.keys,this.overrides)}mergeContents(h,o){for(const c of Object.keys(o)){if(c in h&&D.isObject(h[c])&&D.isObject(o[c])){this.mergeContents(h[c],o[c]);continue}h[c]=L.deepClone(o[c])}}getContentsForOverrideIdentifer(h){let o=null,c=null;const a=l=>{l&&(c?this.mergeContents(c,l):c=L.deepClone(l))};for(const l of this.overrides)_.equals(l.identifiers,[h])?o=l.contents:l.identifiers.includes(h)&&a(l.contents);return a(o),c}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(h,o){this.updateValue(h,o,!0)}setValue(h,o){this.updateValue(h,o,!1)}removeValue(h){const o=this.keys.indexOf(h);o!==-1&&(this.keys.splice(o,1),(0,b.removeFromValueTree)(this.contents,h),S.OVERRIDE_PROPERTY_REGEX.test(h)&&this.overrides.splice(this.overrides.findIndex(c=>_.equals(c.identifiers,(0,S.overrideIdentifiersFromKey)(h))),1))}updateValue(h,o,c){(0,b.addToValueTree)(this.contents,h,o,a=>console.error(a)),c=c||this.keys.indexOf(h)===-1,c&&this.keys.push(h),S.OVERRIDE_PROPERTY_REGEX.test(h)&&this.overrides.push({identifiers:(0,S.overrideIdentifiersFromKey)(h),keys:Object.keys(this.contents[h]),contents:(0,b.toValuesTree)(this.contents[h],a=>console.error(a))})}}e.ConfigurationModel=s;class t{constructor(h){this._name=h,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new s}parseRaw(h,o){this._raw=h;const{contents:c,keys:a,overrides:l,restricted:u,hasExcludedProperties:v}=this.doParseRaw(h,o);this._configurationModel=new s(c,a,l,v?[h]:void 0),this._restrictedConfigurations=u||[]}doParseRaw(h,o){const c=g.Registry.as(S.Extensions.Configuration).getConfigurationProperties(),a=this.filter(h,c,!0,o);h=a.raw;const l=(0,b.toValuesTree)(h,f=>console.error(`Conflict in settings file ${this._name}: ${f}`)),u=Object.keys(h),v=this.toOverrides(h,f=>console.error(`Conflict in settings file ${this._name}: ${f}`));return{contents:l,keys:u,overrides:v,restricted:a.restricted,hasExcludedProperties:a.hasExcludedProperties}}filter(h,o,c,a){let l=!1;if(!a?.scopes&&!a?.skipRestricted)return{raw:h,restricted:[],hasExcludedProperties:l};const u={},v=[];for(const f in h)if(S.OVERRIDE_PROPERTY_REGEX.test(f)&&c){const p=this.filter(h[f],o,!1,a);u[f]=p.raw,l=l||p.hasExcludedProperties,v.push(...p.restricted)}else{const p=o[f],C=p?typeof p.scope<"u"?p.scope:3:void 0;p?.restricted&&v.push(f),(C===void 0||a.scopes===void 0||a.scopes.includes(C))&&!(a.skipRestricted&&p?.restricted)?u[f]=h[f]:l=!0}return{raw:u,restricted:v,hasExcludedProperties:l}}toOverrides(h,o){const c=[];for(const a of Object.keys(h))if(S.OVERRIDE_PROPERTY_REGEX.test(a)){const l={};for(const u in h[a])l[u]=h[a][u];c.push({identifiers:(0,S.overrideIdentifiersFromKey)(a),keys:Object.keys(l),contents:(0,b.toValuesTree)(l,o)})}return c}}e.ConfigurationModelParser=t;class i{constructor(h,o,c,a,l,u,v,f,p,C,y,E,I){this.key=h,this.overrides=o,this._value=c,this.overrideIdentifiers=a,this.defaultConfiguration=l,this.policyConfiguration=u,this.applicationConfiguration=v,this.userConfiguration=f,this.localUserConfiguration=p,this.remoteUserConfiguration=C,this.workspaceConfiguration=y,this.folderConfigurationModel=E,this.memoryConfigurationModel=I}inspect(h,o,c){const a=h.inspect(o,c);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 n{constructor(h,o,c,a,l=new s,u=new s,v=new k.ResourceMap,f=new s,p=new k.ResourceMap){this._defaultConfiguration=h,this._policyConfiguration=o,this._applicationConfiguration=c,this._localUserConfiguration=a,this._remoteUserConfiguration=l,this._workspaceConfiguration=u,this._folderConfigurations=v,this._memoryConfiguration=f,this._memoryConfigurationByResource=p,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new k.ResourceMap,this._userConfiguration=null}getValue(h,o,c){return this.getConsolidatedConfigurationModel(h,o,c).getValue(h)}updateValue(h,o,c={}){let a;c.resource?(a=this._memoryConfigurationByResource.get(c.resource),a||(a=new s,this._memoryConfigurationByResource.set(c.resource,a))):a=this._memoryConfiguration,o===void 0?a.removeValue(h):a.setValue(h,o),c.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(h,o,c){const a=this.getConsolidatedConfigurationModel(h,o,c),l=this.getFolderConfigurationModelForResource(o.resource,c),u=o.resource?this._memoryConfigurationByResource.get(o.resource)||this._memoryConfiguration:this._memoryConfiguration,v=new Set;for(const f of a.overrides)for(const p of f.identifiers)a.getOverrideValue(h,p)!==void 0&&v.add(p);return new i(h,o,a.getValue(h),v.size?[...v]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,c?this._workspaceConfiguration:void 0,l||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(h,o,c){let a=this.getConsolidatedConfigurationModelForResource(o,c);return o.overrideIdentifier&&(a=a.override(o.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(h)!==void 0&&(a=a.merge(this._policyConfiguration)),a}getConsolidatedConfigurationModelForResource({resource:h},o){let c=this.getWorkspaceConsolidatedConfiguration();if(o&&h){const a=o.getFolder(h);a&&(c=this.getFolderConsolidatedConfiguration(a.uri)||c);const l=this._memoryConfigurationByResource.get(h);l&&(c=c.merge(l))}return c}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(h){let o=this._foldersConsolidatedConfigurations.get(h);if(!o){const c=this.getWorkspaceConsolidatedConfiguration(),a=this._folderConfigurations.get(h);a?(o=c.merge(a),this._foldersConsolidatedConfigurations.set(h,o)):o=c}return o}getFolderConfigurationModelForResource(h,o){if(o&&h){const c=o.getFolder(h);if(c)return this._folderConfigurations.get(c.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((h,o)=>{const{contents:c,overrides:a,keys:l}=this._folderConfigurations.get(o);return h.push([o,{contents:c,overrides:a,keys:l}]),h},[])}}static parse(h){const o=this.parseConfigurationModel(h.defaults),c=this.parseConfigurationModel(h.policy),a=this.parseConfigurationModel(h.application),l=this.parseConfigurationModel(h.user),u=this.parseConfigurationModel(h.workspace),v=h.folders.reduce((f,p)=>(f.set(w.URI.revive(p[0]),this.parseConfigurationModel(p[1])),f),new k.ResourceMap);return new n(o,c,a,l,new s,u,v,new s,new k.ResourceMap)}static parseConfigurationModel(h){return new s(h.contents,h.keys,h.overrides)}}e.Configuration=n;class r{constructor(h,o,c,a){this.change=h,this.previous=o,this.currentConfiguraiton=c,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 l of h.keys)this.affectedKeys.add(l);for(const[,l]of h.overrides)for(const u of l)this.affectedKeys.add(u);this._affectsConfigStr=this._marker;for(const l of this.affectedKeys)this._affectsConfigStr+=l+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=n.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(h,o){var c;const a=this._marker+h,l=this._affectsConfigStr.indexOf(a);if(l<0)return!1;const u=l+a.length;if(u>=this._affectsConfigStr.length)return!1;const v=this._affectsConfigStr.charCodeAt(u);if(v!==this._markerCode1&&v!==this._markerCode2)return!1;if(o){const f=this.previousConfiguration?this.previousConfiguration.getValue(h,o,(c=this.previous)===null||c===void 0?void 0:c.workspace):void 0,p=this.currentConfiguraiton.getValue(h,o,this.currentWorkspace);return!L.equals(f,p)}return!0}}e.ConfigurationChangeEvent=r}),define(J[755],ee([1,0,2,333,98,37]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfiguration=void 0;class w extends _.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 S=D.Registry.as(L.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(S),S)}updateConfigurationModel(S,g){const m=this.getConfigurationDefaultOverrides();for(const s of S){const t=m[s],i=g[s];t!==void 0?this._configurationModel.addValue(s,t):i?this._configurationModel.addValue(s,i.default):this._configurationModel.removeValue(s)}}}e.DefaultConfiguration=w}),define(J[112],ee([1,0,113,17,25,37,2,59]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class S{constructor(){this._coreKeybindings=new b.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(s){if(k.OS===1){if(s&&s.win)return s.win}else if(k.OS===2){if(s&&s.mac)return s.mac}else if(s&&s.linux)return s.linux;return s}registerKeybindingRule(s){const t=S.bindToCurrentPlatform(s),i=new w.DisposableStore;if(t&&t.primary){const n=(0,_.decodeKeybinding)(t.primary,k.OS);n&&i.add(this._registerDefaultKeybinding(n,s.id,s.args,s.weight,0,s.when))}if(t&&Array.isArray(t.secondary))for(let n=0,r=t.secondary.length;n<r;n++){const d=t.secondary[n],h=(0,_.decodeKeybinding)(d,k.OS);h&&i.add(this._registerDefaultKeybinding(h,s.id,s.args,s.weight,-n-1,s.when))}return i}registerCommandAndKeybindingRule(s){return(0,w.combinedDisposable)(this.registerKeybindingRule(s),L.CommandsRegistry.registerCommand(s))}_registerDefaultKeybinding(s,t,i,n,r,d){const h=this._coreKeybindings.push({keybinding:s,command:t,commandArgs:i,when:d,weight1:n,weight2:r,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,w.toDisposable)(()=>{h(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(g)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new S,e.Extensions={EditorModes:"platform.keybindingsRegistry"},D.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function g(m,s){if(m.weight1!==s.weight1)return m.weight1-s.weight1;if(m.command&&s.command){if(m.command<s.command)return-1;if(m.command>s.command)return 1}return m.weight2-s.weight2}});var Bn=this&&this.__rest||function(j,e){var _={};for(var k in j)Object.prototype.hasOwnProperty.call(j,k)&&e.indexOf(k)<0&&(_[k]=j[k]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,k=Object.getOwnPropertySymbols(j);L<k.length;L++)e.indexOf(k[L])<0&&Object.prototype.propertyIsEnumerable.call(j,k[L])&&(_[k[L]]=j[k[L]]);return _};define(J[30],ee([1,0,40,31,6,2,59,25,13,8,112]),function(j,e,_,k,L,D,w,b,S,g,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 s(c){return c.command!==void 0}e.isIMenuItem=s;function t(c){return c.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}}e.MenuId=i,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.OpenEditorsContextShare=new i("OpenEditorsContextShare"),i.ProblemsPanelContext=new i("ProblemsPanelContext"),i.SCMChangeContext=new i("SCMChangeContext"),i.SCMResourceContext=new i("SCMResourceContext"),i.SCMResourceContextShare=new i("SCMResourceContextShare"),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.ChatContext=new i("ChatContext"),i.ChatCodeBlock=new i("ChatCodeblock"),i.ChatMessageTitle=new i("ChatMessageTitle"),i.ChatExecute=new i("ChatExecute"),e.IMenuService=(0,g.createDecorator)("menuService");class n{static for(a){let l=this._all.get(a);return l||(l=new n(a),this._all.set(a,l)),l}static merge(a){const l=new Set;for(const u of a)u instanceof n&&l.add(u.id);return l}constructor(a){this.id=a,this.has=l=>l===a}}n._all=new Map,e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new L.MicrotaskEmitter({merge:n.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(c){return this._commands.set(c.id,c),this._onDidChangeMenu.fire(n.for(i.CommandPalette)),(0,D.toDisposable)(()=>{this._commands.delete(c.id)&&this._onDidChangeMenu.fire(n.for(i.CommandPalette))})}getCommand(c){return this._commands.get(c)}getCommands(){const c=new Map;return this._commands.forEach((a,l)=>c.set(l,a)),c}appendMenuItem(c,a){let l=this._menuItems.get(c);l||(l=new w.LinkedList,this._menuItems.set(c,l));const u=l.push(a);return this._onDidChangeMenu.fire(n.for(c)),(0,D.toDisposable)(u)}appendMenuItems(c){const a=new D.DisposableStore;for(const{id:l,item:u}of c)a.add(this.appendMenuItem(l,u));return a}getMenuItems(c){let a;return this._menuItems.has(c)?a=[...this._menuItems.get(c)]:a=[],c===i.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(c){const a=new Set;for(const l of c)s(l)&&(a.add(l.command.id),l.alt&&a.add(l.alt.id));this._commands.forEach((l,u)=>{a.has(u)||c.push({command:l})})}};class r extends _.SubmenuAction{constructor(a,l,u){super(`submenuitem.${a.submenu.id}`,typeof a.title=="string"?a.title:a.title.value,u,"submenu"),this.item=a,this.hideActions=l}}e.SubmenuItemAction=r;let d=e.MenuItemAction=class di{static label(a,l){return l?.renderShortTitle&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value}constructor(a,l,u,v,f,p){var C,y;this.hideActions=v,this._commandService=p,this.id=a.id,this.label=di.label(a,u),this.tooltip=(y=typeof a.tooltip=="string"?a.tooltip:(C=a.tooltip)===null||C===void 0?void 0:C.value)!==null&&y!==void 0?y:"",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=l?new di(l,void 0,u,v,f,p):void 0,this._options=u,this.class=E&&k.ThemeIcon.asClassName(E)}run(...a){var l,u;let v=[];return!((l=this._options)===null||l===void 0)&&l.arg&&(v=[...v,this._options.arg]),!((u=this._options)===null||u===void 0)&&u.shouldForwardArgs&&(v=[...v,...a]),this._commandService.executeCommand(this.id,...v)}};e.MenuItemAction=d=Te([ge(4,S.IContextKeyService),ge(5,b.ICommandService)],d);class h{constructor(a){this.desc=a}}e.Action2=h;function o(c){const a=new D.DisposableStore,l=new c,u=l.desc,{f1:v,menu:f,keybinding:p,description:C}=u,y=Bn(u,["f1","menu","keybinding","description"]);if(a.add(b.CommandsRegistry.registerCommand({id:y.id,handler:(E,...I)=>l.run(E,...I),description:C})),Array.isArray(f))for(const E of f)a.add(e.MenuRegistry.appendMenuItem(E.id,Object.assign({command:Object.assign(Object.assign({},y),{precondition:E.precondition===null?void 0:y.precondition})},E)));else f&&a.add(e.MenuRegistry.appendMenuItem(f.id,Object.assign({command:Object.assign(Object.assign({},y),{precondition:f.precondition===null?void 0:y.precondition})},f)));if(v&&(a.add(e.MenuRegistry.appendMenuItem(i.CommandPalette,{command:y,when:y.precondition})),a.add(e.MenuRegistry.addCommand(y))),Array.isArray(p))for(const E of p)a.add(m.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},E),{id:y.id,when:y.precondition?S.ContextKeyExpr.and(y.precondition,E.when):E.when})));else p&&a.add(m.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},p),{id:y.id,when:y.precondition?S.ContextKeyExpr.and(y.precondition,p.when):p.when})));return a}e.registerAction2=o}),define(J[334],ee([1,0,48,221,679,30,13]),function(j,e,_,k,L,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:L.localize(0,null),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(g){const m=g.get(w.IContextKeyService).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",t=!k.TabFocus.getTabFocusMode(m);k.TabFocus.setTabFocusMode(t,m),t?(0,_.alert)(L.localize(1,null)):(0,_.alert)(L.localize(2,null))}}e.ToggleTabFocusModeAction=b,b.ID="editor.action.toggleTabFocusMode",(0,D.registerAction2)(b)}),define(J[335],ee([1,0,220,562,13,112,698,2]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.registerAndCreateHistoryNavigationContext=e.historyNavigationVisible=void 0,e.historyNavigationVisible=new L.RawContextKey("suggestWidgetVisible",!1,(0,w.localize)(0,null));const S="historyNavigationWidgetFocus",g="historyNavigationForwardsEnabled",m="historyNavigationBackwardsEnabled";let s;const t=[];function i(d,h){if(t.includes(h))throw new Error("Cannot register the same widget multiple times");t.push(h);const o=new b.DisposableStore,c=new L.RawContextKey(S,!1).bindTo(d),a=new L.RawContextKey(g,!0).bindTo(d),l=new L.RawContextKey(m,!0).bindTo(d),u=()=>{c.set(!0),s=h},v=()=>{c.set(!1),s===h&&(s=void 0)};return h.element===document.activeElement&&u(),o.add(h.onDidFocus(()=>u())),o.add(h.onDidBlur(()=>v())),o.add((0,b.toDisposable)(()=>{t.splice(t.indexOf(h),1),v()})),{historyNavigationForwardsEnablement:a,historyNavigationBackwardsEnablement:l,dispose(){o.dispose()}}}e.registerAndCreateHistoryNavigationContext=i;let n=e.ContextScopedFindInput=class extends _.FindInput{constructor(h,o,c,a){super(h,o,c);const l=this._register(a.createScoped(this.inputBox.element));this._register(i(l,this.inputBox))}};e.ContextScopedFindInput=n=Te([ge(3,L.IContextKeyService)],n);let r=e.ContextScopedReplaceInput=class extends k.ReplaceInput{constructor(h,o,c,a,l=!1){super(h,o,l,c);const u=this._register(a.createScoped(this.inputBox.element));this._register(i(u,this.inputBox))}};e.ContextScopedReplaceInput=r=Te([ge(3,L.IContextKeyService)],r),D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:L.ContextKeyExpr.and(L.ContextKeyExpr.has(S),L.ContextKeyExpr.equals(m,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:d=>{s?.showPreviousValue()}}),D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:L.ContextKeyExpr.and(L.ContextKeyExpr.has(S),L.ContextKeyExpr.equals(g,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:d=>{s?.showNextValue()}})}),define(J[129],ee([1,0,20,11,64,2,56,18,21,12,5,62,124,672,30,25,13,19,335]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,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 d.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,(0,i.localize)(0,null)),DetailsVisible:new d.RawContextKey("suggestWidgetDetailsVisible",!1,(0,i.localize)(1,null)),MultipleSuggestions:new d.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,i.localize)(2,null)),MakesTextEdit:new d.RawContextKey("suggestionMakesTextEdit",!0,(0,i.localize)(3,null)),AcceptSuggestionsOnEnter:new d.RawContextKey("acceptSuggestionOnEnter",!0,(0,i.localize)(4,null)),HasInsertAndReplaceRange:new d.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,i.localize)(5,null)),InsertMode:new d.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,i.localize)(6,null)}),CanResolve:new d.RawContextKey("suggestionCanResolve",!1,(0,i.localize)(7,null))},e.suggestWidgetStatusbarMenu=new n.MenuId("suggestWidgetStatusBar");class c{constructor(M,N,P,x){var F;this.position=M,this.completion=N,this.container=P,this.provider=x,this.isInvalid=!1,this.score=L.FuzzyScore.Default,this.distance=0,this.textLabel=typeof N.label=="string"?N.label:(F=N.label)===null||F===void 0?void 0:F.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 g.Position(N.range.startLineNumber,N.range.startColumn),this.editInsertEnd=new g.Position(N.range.endLineNumber,N.range.endColumn),this.editReplaceEnd=new g.Position(N.range.endLineNumber,N.range.endColumn),this.isInvalid=this.isInvalid||m.Range.spansMultipleLines(N.range)||N.range.startLineNumber!==M.lineNumber):(this.editStart=new g.Position(N.range.insert.startLineNumber,N.range.insert.startColumn),this.editInsertEnd=new g.Position(N.range.insert.endLineNumber,N.range.insert.endColumn),this.editReplaceEnd=new g.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 x.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(M){return we(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(P=>{Object.assign(this.completion,P),this._isResolved=!0,N.dispose()},P=>{(0,k.isCancellationError)(P)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}e.CompletionItem=c;class a{constructor(M=2,N=new Set,P=new Set,x=new Map,F=!0){this.snippetSortOrder=M,this.kindFilter=N,this.providerFilter=P,this.providerItemsToReuse=x,this.showDeprecated=F}}e.CompletionOptions=a,a.default=new a;let l;function u(){return l}e.getSnippetSuggestSupport=u;class v{constructor(M,N,P,x){this.items=M,this.needsClipboard=N,this.durations=P,this.disposable=x}}e.CompletionItemModel=v;function f(R,M,N,P=a.default,x={triggerKind:0},F=_.CancellationToken.None){return we(this,void 0,void 0,function*(){const B=new w.StopWatch(!0);N=N.clone();const V=M.getWordAtPosition(N),K=V?new m.Range(N.lineNumber,V.startColumn,N.lineNumber,V.endColumn):m.Range.fromPositions(N),A={replace:K,insert:K.setEndPosition(N.lineNumber,N.column)},Y=[],ie=new D.DisposableStore,le=[];let ne=!1;const se=(W,$,Z)=>{var Q,re,ce;let he=!1;if(!$)return he;for(const de of $.suggestions)if(!P.kindFilter.has(de.kind)){if(!P.showDeprecated&&(!((Q=de?.tags)===null||Q===void 0)&&Q.includes(1)))continue;de.range||(de.range=A),de.sortText||(de.sortText=typeof de.label=="string"?de.label:de.label.label),!ne&&de.insertTextRules&&de.insertTextRules&4&&(ne=t.SnippetParser.guessNeedsClipboard(de.insertText)),Y.push(new c(N,de,$,W)),he=!0}return(0,D.isDisposable)($)&&ie.add($),le.push({providerName:(re=W._debugDisplayName)!==null&&re!==void 0?re:"unknown_provider",elapsedProvider:(ce=$.duration)!==null&&ce!==void 0?ce:-1,elapsedOverall:Z.elapsed()}),he},H=(()=>we(this,void 0,void 0,function*(){if(!l||P.kindFilter.has(27))return;const W=P.providerItemsToReuse.get(l);if(W){W.forEach(Q=>Y.push(Q));return}if(P.providerFilter.size>0&&!P.providerFilter.has(l))return;const $=new w.StopWatch(!0),Z=yield l.provideCompletionItems(M,N,x,F);se(l,Z,$)}))();for(const W of R.orderedGroups(M)){let $=!1;if(yield Promise.all(W.map(Z=>we(this,void 0,void 0,function*(){if(P.providerItemsToReuse.has(Z)){const Q=P.providerItemsToReuse.get(Z);Q.forEach(re=>Y.push(re)),$=$||Q.length>0;return}if(!(P.providerFilter.size>0&&!P.providerFilter.has(Z)))try{const Q=new w.StopWatch(!0),re=yield Z.provideCompletionItems(M,N,x,F);$=se(Z,re,Q)||$}catch(Q){(0,k.onUnexpectedExternalError)(Q)}}))),$||F.isCancellationRequested)break}return yield H,F.isCancellationRequested?(ie.dispose(),Promise.reject(new k.CancellationError)):new v(Y.sort(I(P.snippetSortOrder)),ne,{entries:le,elapsed:B.elapsed()},ie)})}e.provideSuggestionItems=f;function p(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 C(R,M){if(R.completion.kind!==M.completion.kind){if(R.completion.kind===27)return-1;if(M.completion.kind===27)return 1}return p(R,M)}function y(R,M){if(R.completion.kind!==M.completion.kind){if(R.completion.kind===27)return 1;if(M.completion.kind===27)return-1}return p(R,M)}const E=new Map;E.set(0,C),E.set(2,y),E.set(1,p);function I(R){return E.get(R)}e.getSuggestionComparator=I,r.CommandsRegistry.registerCommand("_executeCompletionItemProvider",(R,...M)=>we(void 0,void 0,void 0,function*(){const[N,P,x,F]=M;(0,b.assertType)(S.URI.isUri(N)),(0,b.assertType)(g.Position.isIPosition(P)),(0,b.assertType)(typeof x=="string"||!x),(0,b.assertType)(typeof F=="number"||!F);const{completionProvider:B}=R.get(h.ILanguageFeaturesService),V=yield R.get(s.ITextModelService).createModelReference(N);try{const K={incomplete:!1,suggestions:[]},A=[],Y=V.object.textEditorModel.validatePosition(P),ie=yield f(B,V.object.textEditorModel,Y,void 0,{triggerCharacter:x??void 0,triggerKind:x?1:0});for(const le of ie.items)A.length<(F??0)&&A.push(le.resolve(_.CancellationToken.None)),K.incomplete=K.incomplete||le.container.incomplete,K.suggestions.push(le.completion);try{return yield Promise.all(A),K}finally{setTimeout(()=>ie.disposable.dispose(),100)}}finally{V.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 O{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=O}),define(J[130],ee([1,0,16,2,37]),function(j,e,_,k,L){"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=D={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class w{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(S){return S.prefix.length===0?this.defaultProvider=S:this.providers.push(S),this.providers.sort((g,m)=>m.prefix.length-g.prefix.length),(0,k.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(S),1),this.defaultProvider===S&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,_.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(S){return S&&this.providers.find(m=>S.startsWith(m.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=w,L.Registry.add(e.Extensions.Quickaccess,new w)}),define(J[756],ee([1,0,703,37,2,34,130,71]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let S=e.HelpQuickAccessProvider=class $t{constructor(m,s){this.quickInputService=m,this.keybindingService=s,this.registry=k.Registry.as(w.Extensions.Quickaccess)}provide(m){const s=new L.DisposableStore;return s.add(m.onDidAccept(()=>{const[t]=m.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),s.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),s}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((s,t)=>s.prefix.localeCompare(t.prefix)).flatMap(s=>this.createPicks(s))}createPicks(m){return m.helpEntries.map(s=>{const t=s.prefix||m.prefix,i=t||"\\u2026";return{prefix:t,label:i,keybinding:s.commandId?this.keybindingService.lookupKeybinding(s.commandId):void 0,ariaLabel:(0,_.localize)(0,null,i,s.description),description:s.description}})}};S.PREFIX="?",e.HelpQuickAccessProvider=S=Te([ge(0,b.IQuickInputService),ge(1,D.IKeybindingService)],S)}),define(J[757],ee([1,0,37,130,84,756]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),_.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:D.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:L.QuickHelpNLS.helpQuickAccessActionLabel}]})}),define(J[758],ee([1,0,14,20,94,2,8,130,71,37]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let m=e.QuickAccessController=class extends D.Disposable{constructor(t,i){super(),this.quickInputService=t,this.instantiationService=i,this.registry=g.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,n){var r;const[d,h]=this.getOrInstantiateProvider(t),o=this.visibleQuickAccess,c=o?.descriptor;if(o&&h&&c===h){t!==h.prefix&&!n?.preserveValue&&(o.picker.value=t),this.adjustValueSelection(o.picker,h,n);return}if(h&&!n?.preserveValue){let f;if(o&&c&&c!==h){const p=o.value.substr(c.prefix.length);p&&(f=`${h.prefix}${p}`)}if(!f){const p=d?.defaultFilterValue;p===b.DefaultQuickAccessFilterValue.LAST?f=this.lastAcceptedPickerValues.get(h):typeof p=="string"&&(f=`${h.prefix}${p}`)}typeof f=="string"&&(t=f)}const a=new D.DisposableStore,l=a.add(this.quickInputService.createQuickPick());l.value=t,this.adjustValueSelection(l,h,n),l.placeholder=h?.placeholder,l.quickNavigate=n?.quickNavigateConfiguration,l.hideInput=!!l.quickNavigate&&!o,(typeof n?.itemActivation=="number"||n?.quickNavigateConfiguration)&&(l.itemActivation=(r=n?.itemActivation)!==null&&r!==void 0?r:S.ItemActivation.SECOND),l.contextKey=h?.contextKey,l.filterValue=f=>f.substring(h?h.prefix.length:0);let u;i&&(u=new _.DeferredPromise,a.add((0,L.once)(l.onWillAccept)(f=>{f.veto(),l.hide()}))),a.add(this.registerPickerListeners(l,d,h,t,n?.providerOptions));const v=a.add(new k.CancellationTokenSource);if(d&&a.add(d.provide(l,v.token,n?.providerOptions)),(0,L.once)(l.onDidHide)(()=>{l.selectedItems.length===0&&v.cancel(),a.dispose(),u?.complete(l.selectedItems.slice(0))}),l.show(),i)return u?.p}adjustValueSelection(t,i,n){var r;let d;n?.preserveValue?d=[t.value.length,t.value.length]:d=[(r=i?.prefix.length)!==null&&r!==void 0?r:0,t.value.length],t.valueSelection=d}registerPickerListeners(t,i,n,r,d){const h=new D.DisposableStore,o=this.visibleQuickAccess={picker:t,descriptor:n,value:r};return h.add((0,D.toDisposable)(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),h.add(t.onDidChangeValue(c=>{const[a]=this.getOrInstantiateProvider(c);a!==i?this.show(c,{preserveValue:!0,providerOptions:d}):o.value=c})),n&&h.add(t.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,t.value)})),h}getOrInstantiateProvider(t){const i=this.registry.getQuickAccessProvider(t);if(!i)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};e.QuickAccessController=m=Te([ge(0,S.IQuickInputService),ge(1,w.IInstantiationService)],m)}),define(J[759],ee([1,0,26,31,104,460]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var D;(function(w){function b(S){switch(S){case L.default.Ignore:return"severity-ignore "+k.ThemeIcon.asClassName(_.Codicon.info);case L.default.Info:return k.ThemeIcon.asClassName(_.Codicon.info);case L.default.Warning:return k.ThemeIcon.asClassName(_.Codicon.warning);case L.default.Error:return k.ThemeIcon.asClassName(_.Codicon.error);default:return""}}w.className=b})(D||(e.SeverityIcon=D={}))}),define(J[85],ee([1,0,6,2,18,568,8]),function(j,e,_,k,L,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(s){s[s.NONE=0]="NONE",s[s.SHUTDOWN=1]="SHUTDOWN"})(b||(e.WillSaveStateReason=b={}));function S(s){const t=s.get(e.TARGET_KEY);if(t)try{return JSON.parse(t)}catch{}return Object.create(null)}e.loadKeyTargets=S;class g extends k.Disposable{constructor(t={flushInterval:g.DEFAULT_FLUSH_INTERVAL}){super(),this.options=t,this._onDidChangeValue=this._register(new _.PauseableEmitter),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new _.PauseableEmitter),this._onWillSaveState=this._register(new _.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,n){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.get(t,n)}getBoolean(t,i,n){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.getBoolean(t,n)}getNumber(t,i,n){var r;return(r=this.getStorage(i))===null||r===void 0?void 0:r.getNumber(t,n)}store(t,i,n,r){if((0,L.isUndefinedOrNull)(i)){this.remove(t,n);return}this.withPausedEmitters(()=>{var d;this.updateKeyTarget(t,n,r),(d=this.getStorage(n))===null||d===void 0||d.set(t,i)})}remove(t,i){this.withPausedEmitters(()=>{var n;this.updateKeyTarget(t,i,void 0),(n=this.getStorage(i))===null||n===void 0||n.delete(t)})}withPausedEmitters(t){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{t()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(t,i,n){var r,d;const h=this.getKeyTargets(i);typeof n=="number"?h[t]!==n&&(h[t]=n,(r=this.getStorage(i))===null||r===void 0||r.set(e.TARGET_KEY,JSON.stringify(h))):typeof h[t]=="number"&&(delete h[t],(d=this.getStorage(i))===null||d===void 0||d.set(e.TARGET_KEY,JSON.stringify(h)))}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?S(i):Object.create(null)}}e.AbstractStorageService=g,g.DEFAULT_FLUSH_INTERVAL=60*1e3;class m extends g{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[760],ee([1,0,14,94,60,5,318,49,8,85]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,S.createDecorator)("ICodeLensCache");class m{constructor(i,n){this.lineCount=i,this.data=n}}let s=e.CodeLensCache=class{constructor(i){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new L.LRUCache(20,.75);const n="codelens/cache";(0,_.runWhenIdle)(()=>i.remove(n,1));const r="codelens/cache2",d=i.get(r,1,"{}");this._deserialize(d),(0,k.once)(i.onWillSaveState)(h=>{h.reason===g.WillSaveStateReason.SHUTDOWN&&i.store(r,this._serialize(),1,1)})}put(i,n){const r=n.lenses.map(o=>{var c;return{range:o.symbol.range,command:o.symbol.command&&{id:"",title:(c=o.symbol.command)===null||c===void 0?void 0:c.title}}}),d=new w.CodeLensModel;d.add({lenses:r,dispose:()=>{}},this._fakeProvider);const h=new m(i.getLineCount(),d);this._cache.set(i.uri.toString(),h)}get(i){const n=this._cache.get(i.uri.toString());return n&&n.lineCount===i.getLineCount()?n.data:void 0}delete(i){this._cache.delete(i.uri.toString())}_serialize(){const i=Object.create(null);for(const[n,r]of this._cache){const d=new Set;for(const h of r.data.lenses)d.add(h.symbol.range.startLineNumber);i[n]={lineCount:r.lineCount,lines:[...d.values()]}}return JSON.stringify(i)}_deserialize(i){try{const n=JSON.parse(i);for(const r in n){const d=n[r],h=[];for(const c of d.lines)h.push({range:new D.Range(c,1,c,11)});const o=new w.CodeLensModel;o.add({lenses:h,dispose(){}},this._fakeProvider),this._cache.set(r,new m(d.lineCount,o))}}catch{}}};e.CodeLensCache=s=Te([ge(0,g.IStorageService)],s),(0,b.registerSingleton)(e.ICodeLensCache,s,1)}),define(J[336],ee([1,0,14,2,60,192,27,28,49,8,85]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class s{constructor(h){this.name=h}select(h,o,c){if(c.length===0)return 0;const a=c[0].score[0];for(let l=0;l<c.length;l++){const{score:u,completion:v}=c[l];if(u[0]!==a)break;if(v.preselect)return l}return 0}}e.Memory=s;class t extends s{constructor(){super("first")}memorize(h,o,c){}toJSON(){}fromJSON(){}}e.NoMemory=t;class i extends s{constructor(){super("recentlyUsed"),this._cache=new L.LRUCache(300,.66),this._seq=0}memorize(h,o,c){const a=`${h.getLanguageId()}/${c.textLabel}`;this._cache.set(a,{touch:this._seq++,type:c.completion.kind,insertText:c.completion.insertText})}select(h,o,c){if(c.length===0)return 0;const a=h.getLineContent(o.lineNumber).substr(o.column-10,o.column-1);if(/\\s$/.test(a))return super.select(h,o,c);const l=c[0].score[0];let u=-1,v=-1,f=-1;for(let p=0;p<c.length&&c[p].score[0]===l;p++){const C=`${h.getLanguageId()}/${c[p].textLabel}`,y=this._cache.peek(C);if(y&&y.touch>f&&y.type===c[p].completion.kind&&y.insertText===c[p].completion.insertText&&(f=y.touch,v=p),c[p].completion.preselect&&u===-1)return u=p}return v!==-1?v:u!==-1?u:0}toJSON(){return this._cache.toJSON()}fromJSON(h){this._cache.clear();const o=0;for(const[c,a]of h)a.touch=o,a.type=typeof a.type=="number"?a.type:w.CompletionItemKinds.fromString(a.type),this._cache.set(c,a);this._seq=this._cache.size}}e.LRUMemory=i;class n extends s{constructor(){super("recentlyUsedByPrefix"),this._trie=D.TernarySearchTree.forStrings(),this._seq=0}memorize(h,o,c){const{word:a}=h.getWordUntilPosition(o),l=`${h.getLanguageId()}/${a}`;this._trie.set(l,{type:c.completion.kind,insertText:c.completion.insertText,touch:this._seq++})}select(h,o,c){const{word:a}=h.getWordUntilPosition(o);if(!a)return super.select(h,o,c);const l=`${h.getLanguageId()}/${a}`;let u=this._trie.get(l);if(u||(u=this._trie.findSubstr(l)),u)for(let v=0;v<c.length;v++){const{kind:f,insertText:p}=c[v].completion;if(f===u.type&&p===u.insertText)return v}return super.select(h,o,c)}toJSON(){const h=[];return this._trie.forEach((o,c)=>h.push([c,o])),h.sort((o,c)=>-(o[1].touch-c[1].touch)).forEach((o,c)=>o[1].touch=c),h.slice(0,200)}fromJSON(h){if(this._trie.clear(),h.length>0){this._seq=h[0][1].touch+1;for(const[o,c]of h)c.type=typeof c.type=="number"?c.type:w.CompletionItemKinds.fromString(c.type),this._trie.set(o,c)}}}e.PrefixMemory=n;let r=e.SuggestMemoryService=class Gt{constructor(h,o){this._storageService=h,this._configService=o,this._disposables=new k.DisposableStore,this._persistSoon=new _.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(h.onWillSaveState(c=>{c.reason===m.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(h,o,c){this._withStrategy(h,o).memorize(h,o,c),this._persistSoon.schedule()}select(h,o,c){return this._withStrategy(h,o).select(h,o,c)}_withStrategy(h,o){var c;const a=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:h.getLanguageIdAtPosition(o.lineNumber,o.column),resource:h.uri});if(((c=this._strategy)===null||c===void 0?void 0:c.name)!==a){this._saveState();const l=Gt._strategyCtors.get(a)||t;this._strategy=new l;try{const v=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,f=this._storageService.get(`${Gt._storagePrefix}/${a}`,v);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,c=JSON.stringify(this._strategy);this._storageService.store(`${Gt._storagePrefix}/${this._strategy.name}`,c,o,1)}}};r._strategyCtors=new Map([["recentlyUsedByPrefix",n],["recentlyUsed",i],["first",t]]),r._storagePrefix="suggest/memories",e.SuggestMemoryService=r=Te([ge(0,m.IStorageService),ge(1,b.IConfigurationService)],r),e.ISuggestMemoryService=(0,g.createDecorator)("ISuggestMemories"),(0,S.registerSingleton)(e.ISuggestMemoryService,r,1)}),define(J[761],ee([1,0,14,6,2,30,25,13,40,85,16,691]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let t=e.MenuService=class{constructor(o,c){this._commandService=o,this._hiddenStates=new i(c)}createMenu(o,c,a){return new r(o,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},a),this._commandService,c)}resetHiddenStates(o){this._hiddenStates.reset(o)}};e.MenuService=t=Te([ge(0,w.ICommandService),ge(1,g.IStorageService)],t);let i=class Bt{constructor(o){this._storageService=o,this._disposables=new L.DisposableStore,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const c=o.get(Bt._key,0,"{}");this._data=JSON.parse(c)}catch{this._data=Object.create(null)}this._disposables.add(o.onDidChangeValue(c=>{if(c.key===Bt._key){if(!this._ignoreChangeEvent)try{const a=o.get(Bt._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,c){var a;return(a=this._hiddenByDefaultCache.get(`${o.id}/${c}`))!==null&&a!==void 0?a:!1}setDefaultState(o,c,a){this._hiddenByDefaultCache.set(`${o.id}/${c}`,a)}isHidden(o,c){var a,l;const u=this._isHiddenByDefault(o,c),v=(l=(a=this._data[o.id])===null||a===void 0?void 0:a.includes(c))!==null&&l!==void 0?l:!1;return u?!v:v}updateHidden(o,c,a){this._isHiddenByDefault(o,c)&&(a=!a);const u=this._data[o.id];if(a)u?u.indexOf(c)<0&&u.push(c):this._data[o.id]=[c];else if(u){const v=u.indexOf(c);v>=0&&(0,m.removeFastWithoutKeepingOrder)(u,v),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:c}of o)this._data[c]&&delete this._data[c];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const o=JSON.stringify(this._data);this._storageService.store(Bt._key,o,0,0)}finally{this._ignoreChangeEvent=!1}}};i._key="menu.hiddenCommands",i=Te([ge(0,g.IStorageService)],i);let n=class Nt{constructor(o,c,a,l,u){this._id=o,this._hiddenStates=c,this._collectContextKeysForSubmenus=a,this._commandService=l,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 c;o.sort(Nt._compareMenuItems);for(const a of o){const l=a.group||"";(!c||c[0]!==l)&&(c=[l,[]],this._menuGroups.push(c)),c[1].push(a),this._collectContextKeys(a)}}_collectContextKeys(o){if(Nt._fillInKbExprKeys(o.when,this._structureContextKeys),(0,D.isIMenuItem)(o)){if(o.command.precondition&&Nt._fillInKbExprKeys(o.command.precondition,this._preconditionContextKeys),o.command.toggled){const c=o.command.toggled.condition||o.command.toggled;Nt._fillInKbExprKeys(c,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&D.MenuRegistry.getMenuItems(o.submenu).forEach(this._collectContextKeys,this)}createActionGroups(o){const c=[];for(const a of this._menuGroups){const[l,u]=a,v=[];for(const f of u)if(this._contextKeyService.contextMatchesRules(f.when)){const p=(0,D.isIMenuItem)(f);p&&this._hiddenStates.setDefaultState(this._id,f.command.id,!!f.isHiddenByDefault);const C=d(this._id,p?f.command:f,this._hiddenStates);if(p)v.push(new D.MenuItemAction(f.command,f.alt,o,C,this._contextKeyService,this._commandService));else{const y=new Nt(f.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(o),E=S.Separator.join(...y.map(I=>I[1]));E.length>0&&v.push(new D.SubmenuItemAction(f,C,E))}}v.length>0&&c.push([l,v])}return c}static _fillInKbExprKeys(o,c){if(o)for(const a of o.keys())c.add(a)}static _compareMenuItems(o,c){const a=o.group,l=c.group;if(a!==l){if(a){if(!l)return-1}else return 1;if(a==="navigation")return-1;if(l==="navigation")return 1;const f=a.localeCompare(l);if(f!==0)return f}const u=o.order||0,v=c.order||0;return u<v?-1:u>v?1:Nt._compareTitles((0,D.isIMenuItem)(o)?o.command.title:o.title,(0,D.isIMenuItem)(c)?c.command.title:c.title)}static _compareTitles(o,c){const a=typeof o=="string"?o:o.original,l=typeof c=="string"?c:c.original;return a.localeCompare(l)}};n=Te([ge(3,w.ICommandService),ge(4,b.IContextKeyService)],n);let r=class{constructor(o,c,a,l,u){this._disposables=new L.DisposableStore,this._menuInfo=new n(o,c,a.emitEventsForSubmenuChanges,l,u);const v=new _.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},a.eventDebounceDelay);this._disposables.add(v),this._disposables.add(D.MenuRegistry.onDidChangeMenu(y=>{y.has(o)&&v.schedule()}));const f=this._disposables.add(new L.DisposableStore),p=y=>{let E=!1,I=!1,T=!1;for(const O of y)if(E=E||O.isStructuralChange,I=I||O.isEnablementChange,T=T||O.isToggleChange,E&&I&&T)break;return{menu:this,isStructuralChange:E,isEnablementChange:I,isToggleChange:T}},C=()=>{f.add(u.onDidChangeContext(y=>{const E=y.affectsSome(this._menuInfo.structureContextKeys),I=y.affectsSome(this._menuInfo.preconditionContextKeys),T=y.affectsSome(this._menuInfo.toggledContextKeys);(E||I||T)&&this._onDidChange.fire({menu:this,isStructuralChange:E,isEnablementChange:I,isToggleChange:T})})),f.add(c.onDidChange(y=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new k.DebounceEmitter({onWillAddFirstListener:C,onDidRemoveLastListener:f.clear.bind(f),delay:a.eventDebounceDelay,merge:p}),this.onDidChange=this._onDidChange.event}getActions(o){return this._menuInfo.createActionGroups(o)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};r=Te([ge(3,w.ICommandService),ge(4,b.IContextKeyService)],r);function d(h,o,c){const a=(0,D.isISubmenuItem)(o)?o.submenu.id:o.id,l=typeof o.title=="string"?o.title:o.title.value,u=(0,S.toAction)({id:`hide/${h.id}/${a}`,label:(0,s.localize)(0,null,l),run(){c.updateHidden(h,a,!0)}}),v=(0,S.toAction)({id:`toggle/${h.id}/${a}`,label:l,get checked(){return!c.isHidden(h,a)},run(){c.updateHidden(h,a,!!this.checked)}});return{hide:u,toggle:v,get isHidden(){return!v.checked}}}}),define(J[73],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,_.createDecorator)("telemetryService")}),define(J[15],ee([1,0,591,21,32,12,50,62,30,25,13,8,112,37,73,18,63]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"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 h{constructor(P){this.id=P.id,this.precondition=P.precondition,this._kbOpts=P.kbOpts,this._menuOpts=P.menuOpts,this._description=P.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const P=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const x of P){let F=x.kbExpr;this.precondition&&(F?F=m.ContextKeyExpr.and(F,this.precondition):F=this.precondition);const B={id:this.id,weight:x.weight,args:x.args,when:F,primary:x.primary,secondary:x.secondary,win:x.win,linux:x.linux,mac:x.mac};t.KeybindingsRegistry.registerKeybindingRule(B)}}g.CommandsRegistry.registerCommand({id:this.id,handler:(P,x)=>this.runCommand(P,x),description:this._description})}_registerMenuItem(P){S.MenuRegistry.appendMenuItem(P.menuId,{group:P.group,command:{id:this.id,title:P.title,icon:P.icon,precondition:this.precondition},when:P.when,order:P.order})}}e.Command=h;class o extends h{constructor(){super(...arguments),this._implementations=[]}addImplementation(P,x,F){return this._implementations.push({priority:P,name:x,implementation:F}),this._implementations.sort((B,V)=>V.priority-B.priority),{dispose:()=>{for(let B=0;B<this._implementations.length;B++)if(this._implementations[B].implementation===F){this._implementations.splice(B,1);return}}}}runCommand(P,x){const F=P.get(d.ILogService);F.trace(`Executing Command \'${this.id}\' which has ${this._implementations.length} bound.`);for(const B of this._implementations){const V=B.implementation(P,x);if(V)return F.trace(`Command \'${this.id}\' was handled by \'${B.name}\'.`),typeof V=="boolean"?void 0:V}F.trace(`The Command \'${this.id}\' was not handled by any implementation.`)}}e.MultiCommand=o;class c extends h{constructor(P,x){super(x),this.command=P}runCommand(P,x){return this.command.runCommand(P,x)}}e.ProxyCommand=c;class a extends h{static bindToContribution(P){return class extends a{constructor(F){super(F),this._callback=F.handler}runEditorCommand(F,B,V){const K=P(B);K&&this._callback(K,V)}}}static runEditorCommand(P,x,F,B){const V=P.get(L.ICodeEditorService),K=V.getFocusedCodeEditor()||V.getActiveCodeEditor();if(K)return K.invokeWithinContext(A=>{if(A.get(m.IContextKeyService).contextMatchesRules((0,r.withNullAsUndefined)(F)))return B(A,K,x)})}runCommand(P,x){return a.runEditorCommand(P,x,this.precondition,(F,B,V)=>this.runEditorCommand(F,B,V))}}e.EditorCommand=a;class l extends a{static convertOptions(P){let x;Array.isArray(P.menuOpts)?x=P.menuOpts:P.menuOpts?x=[P.menuOpts]:x=[];function F(B){return B.menuId||(B.menuId=S.MenuId.EditorContext),B.title||(B.title=P.label),B.when=m.ContextKeyExpr.and(P.precondition,B.when),B}return Array.isArray(P.contextMenuOpts)?x.push(...P.contextMenuOpts.map(F)):P.contextMenuOpts&&x.push(F(P.contextMenuOpts)),P.menuOpts=x,P}constructor(P){super(l.convertOptions(P)),this.label=P.label,this.alias=P.alias}runEditorCommand(P,x,F){return this.reportTelemetry(P,x),this.run(P,x,F||{})}reportTelemetry(P,x){P.get(n.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=l;class u extends l{constructor(){super(...arguments),this._implementations=[]}addImplementation(P,x){return this._implementations.push([P,x]),this._implementations.sort((F,B)=>B[0]-F[0]),{dispose:()=>{for(let F=0;F<this._implementations.length;F++)if(this._implementations[F][1]===x){this._implementations.splice(F,1);return}}}}run(P,x,F){for(const B of this._implementations){const V=B[1](P,x,F);if(V)return typeof V=="boolean"?void 0:V}}}e.MultiEditorAction=u;class v extends S.Action2{run(P,...x){const F=P.get(L.ICodeEditorService),B=F.getFocusedCodeEditor()||F.getActiveCodeEditor();if(B)return B.invokeWithinContext(V=>{var K;const A=V.get(m.IContextKeyService),Y=V.get(d.ILogService);if(!A.contextMatchesRules((0,r.withNullAsUndefined)(this.desc.precondition))){Y.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(K=this.desc.precondition)===null||K===void 0?void 0:K.serialize());return}return this.runEditorCommand(V,B,...x)})}}e.EditorAction2=v;function f(N,P){g.CommandsRegistry.registerCommand(N,function(x,...F){const B=x.get(s.IInstantiationService),[V,K]=F;(0,r.assertType)(k.URI.isUri(V)),(0,r.assertType)(D.Position.isIPosition(K));const A=x.get(w.IModelService).getModel(V);if(A){const Y=D.Position.lift(K);return B.invokeFunction(P,A,Y,...F.slice(2))}return x.get(b.ITextModelService).createModelReference(V).then(Y=>new Promise((ie,le)=>{try{const ne=B.invokeFunction(P,Y.object.textEditorModel,D.Position.lift(K),F.slice(2));ie(ne)}catch(ne){le(ne)}}).finally(()=>{Y.dispose()}))})}e.registerModelAndPositionCommand=f;function p(N){return R.INSTANCE.registerEditorCommand(N),N}e.registerEditorCommand=p;function C(N){const P=new N;return R.INSTANCE.registerEditorAction(P),P}e.registerEditorAction=C;function y(N){return R.INSTANCE.registerEditorAction(N),N}e.registerMultiEditorAction=y;function E(N){R.INSTANCE.registerEditorAction(N)}e.registerInstantiatedEditorAction=E;function I(N,P,x){R.INSTANCE.registerEditorContribution(N,P,x)}e.registerEditorContribution=I;var T;(function(N){function P(K){return R.INSTANCE.getEditorCommand(K)}N.getEditorCommand=P;function x(){return R.INSTANCE.getEditorActions()}N.getEditorActions=x;function F(){return R.INSTANCE.getEditorContributions()}N.getEditorContributions=F;function B(K){return R.INSTANCE.getEditorContributions().filter(A=>K.indexOf(A.id)>=0)}N.getSomeEditorContributions=B;function V(){return R.INSTANCE.getDiffEditorContributions()}N.getDiffEditorContributions=V})(T||(e.EditorExtensionsRegistry=T={}));const O={EditorCommonContributions:"editor.contributions"};class R{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(P,x,F){this.editorContributions.push({id:P,ctor:x,instantiation:F})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(P){P.register(),this.editorActions.push(P)}getEditorActions(){return this.editorActions}registerEditorCommand(P){P.register(),this.editorCommands[P.id]=P}getEditorCommand(P){return this.editorCommands[P]||null}}R.INSTANCE=new R,i.Registry.add(O.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:S.MenuId.MenubarEditMenu,group:"1_do",title:_.localize(0,null),order:1},{menuId:S.MenuId.CommandPalette,group:"",title:_.localize(1,null),order:1}]})),M(new c(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:S.MenuId.MenubarEditMenu,group:"1_do",title:_.localize(2,null),order:2},{menuId:S.MenuId.CommandPalette,group:"",title:_.localize(3,null),order:1}]})),M(new c(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:S.MenuId.MenubarSelectionMenu,group:"1_basic",title:_.localize(4,null),order:1},{menuId:S.MenuId.CommandPalette,group:"",title:_.localize(5,null),order:1}]}))}),define(J[184],ee([1,0,590,47,18,48,15,32,481,66,196,197,238,12,5,22,13,112]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const o=0;class c extends w.EditorCommand{runEditorCommand(O,R,M){const N=R._getViewModel();N&&this.runCoreEditorCommand(N,M||{})}}e.CoreEditorCommand=c;var a;(function(T){const O=function(M){if(!L.isObject(M))return!1;const N=M;return!(!L.isString(N.to)||!L.isUndefined(N.by)&&!L.isString(N.by)||!L.isUndefined(N.value)&&!L.isNumber(N.value)||!L.isUndefined(N.revealCursor)&&!L.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:O,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 P;switch(M.by){case T.RawUnit.Line:P=1;break;case T.RawUnit.WrappedLine:P=2;break;case T.RawUnit.Page:P=3;break;case T.RawUnit.HalfPage:P=4;break;case T.RawUnit.Editor:P=5;break;case T.RawUnit.Column:P=6;break;default:P=2}const x=Math.floor(M.value||1),F=!!M.revealCursor;return{direction:N,unit:P,value:x,revealCursor:F,select:!!M.select}}T.parse=R})(a||(e.EditorScroll_=a={}));var l;(function(T){const O=function(R){if(!L.isObject(R))return!1;const M=R;return!(!L.isNumber(M.lineNumber)&&!L.isString(M.lineNumber)||!L.isUndefined(M.at)&&!L.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:O,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"}})(l||(e.RevealLine_=l={}));class u{constructor(O){O.addImplementation(1e4,"code-editor",(R,M)=>{const N=R.get(b.ICodeEditorService).getFocusedCodeEditor();return N&&N.hasTextFocus()?this._runEditorCommand(R,N,M):!1}),O.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}),O.addImplementation(0,"generic-dom",(R,M)=>{const N=R.get(b.ICodeEditorService).getActiveCodeEditor();return N?(N.focus(),this._runEditorCommand(R,N,M)):!1})}_runEditorCommand(O,R,M){const N=this.runEditorCommand(O,R,M);return N||!0}}var v;(function(T){class O extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){if(!$.position)return;W.model.pushStackElement(),W.setCursorStates($.source,3,[s.CursorMoveCommands.moveTo(W,W.getPrimaryCursorState(),this._inSelectionMode,$.position,$.viewPosition)])&&$.revealType!==2&&W.revealPrimaryCursor($.source,!0,!0)}}T.MoveTo=(0,w.registerEditorCommand)(new O({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),T.MoveToSelect=(0,w.registerEditorCommand)(new O({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class R extends c{runCoreEditorCommand(W,$){W.model.pushStackElement();const Z=this._getColumnSelectResult(W,W.getPrimaryCursorState(),W.getCursorColumnSelectData(),$);Z!==null&&(W.setCursorStates($.source,3,Z.viewStates.map(Q=>g.CursorState.fromViewState(Q))),W.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:Z.fromLineNumber,fromViewVisualColumn:Z.fromVisualColumn,toViewLineNumber:Z.toLineNumber,toViewVisualColumn:Z.toVisualColumn}),Z.reversed?W.revealTopMostCursor($.source):W.revealBottomMostCursor($.source))}}T.ColumnSelect=(0,w.registerEditorCommand)(new class extends R{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(H,W,$,Z){if(typeof Z.position>"u"||typeof Z.viewPosition>"u"||typeof Z.mouseColumn>"u")return null;const Q=H.model.validatePosition(Z.position),re=H.coordinatesConverter.validateViewPosition(new i.Position(Z.viewPosition.lineNumber,Z.viewPosition.column),Q),ce=Z.doColumnSelect?$.fromViewLineNumber:re.lineNumber,he=Z.doColumnSelect?$.fromViewVisualColumn:Z.mouseColumn-1;return S.ColumnSelection.columnSelect(H.cursorConfig,H,ce,he,re.lineNumber,Z.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,W,$,Z){return S.ColumnSelection.columnSelectLeft(H.cursorConfig,H,$)}}),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,W,$,Z){return S.ColumnSelection.columnSelectRight(H.cursorConfig,H,$)}});class M extends R{constructor(W){super(W),this._isPaged=W.isPaged}_getColumnSelectResult(W,$,Z,Q){return S.ColumnSelection.columnSelectUp(W.cursorConfig,W,Z,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(W){super(W),this._isPaged=W.isPaged}_getColumnSelectResult(W,$,Z,Q){return S.ColumnSelection.columnSelectDown(W.cursorConfig,W,Z,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 P extends c{constructor(){super({id:"cursorMove",precondition:void 0,description:s.CursorMove.description})}runCoreEditorCommand(W,$){const Z=s.CursorMove.parse($);Z&&this._runCursorMove(W,$.source,Z)}_runCursorMove(W,$,Z){W.model.pushStackElement(),W.setCursorStates($,3,P._move(W,W.getCursorStates(),Z)),W.revealPrimaryCursor($,!0)}static _move(W,$,Z){const Q=Z.select,re=Z.value;switch(Z.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return s.CursorMoveCommands.simpleMove(W,$,Z.direction,Q,re,Z.unit);case 11:case 13:case 12:case 14:return s.CursorMoveCommands.viewportMove(W,$,Z.direction,Q,re);default:return null}}}T.CursorMoveImpl=P,T.CursorMove=(0,w.registerEditorCommand)(new P);class x extends c{constructor(W){super(W),this._staticArgs=W.args}runCoreEditorCommand(W,$){let Z=this._staticArgs;this._staticArgs.value===-1&&(Z={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:$.pageSize||W.cursorConfig.pageSize}),W.model.pushStackElement(),W.setCursorStates($.source,3,s.CursorMoveCommands.simpleMove(W,W.getCursorStates(),Z.direction,Z.select,Z.value,Z.unit)),W.revealPrimaryCursor($.source,!0)}}T.CursorLeft=(0,w.registerEditorCommand)(new x({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 x({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 x({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 x({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 x({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 x({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 x({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 x({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 x({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 x({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 x({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 x({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 c{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(H,W){if(!W.position)return;let $;W.wholeLine?$=s.CursorMoveCommands.line(H,H.getPrimaryCursorState(),!1,W.position,W.viewPosition):$=s.CursorMoveCommands.moveTo(H,H.getPrimaryCursorState(),!1,W.position,W.viewPosition);const Z=H.getCursorStates();if(Z.length>1){const Q=$.modelState?$.modelState.position:null,re=$.viewState?$.viewState.position:null;for(let ce=0,he=Z.length;ce<he;ce++){const de=Z[ce];if(!(Q&&!de.modelState.selection.containsPosition(Q))&&!(re&&!de.viewState.selection.containsPosition(re))){Z.splice(ce,1),H.model.pushStackElement(),H.setCursorStates(W.source,3,Z);return}}}Z.push($),H.model.pushStackElement(),H.setCursorStates(W.source,3,Z)}}),T.LastCursorMoveToSelect=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(H,W){if(!W.position)return;const $=H.getLastAddedCursorIndex(),Z=H.getCursorStates(),Q=Z.slice(0);Q[$]=s.CursorMoveCommands.moveTo(H,Z[$],!0,W.position,W.viewPosition),H.model.pushStackElement(),H.setCursorStates(W.source,3,Q)}});class F extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){W.model.pushStackElement(),W.setCursorStates($.source,3,s.CursorMoveCommands.moveToBeginningOfLine(W,W.getCursorStates(),this._inSelectionMode)),W.revealPrimaryCursor($.source,!0)}}T.CursorHome=(0,w.registerEditorCommand)(new F({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 F({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class B extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){W.model.pushStackElement(),W.setCursorStates($.source,3,this._exec(W.getCursorStates())),W.revealPrimaryCursor($.source,!0)}_exec(W){const $=[];for(let Z=0,Q=W.length;Z<Q;Z++){const re=W[Z],ce=re.modelState.position.lineNumber;$[Z]=g.CursorState.fromModelState(re.modelState.move(this._inSelectionMode,ce,1,0))}return $}}T.CursorLineStart=(0,w.registerEditorCommand)(new B({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 B({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1311}}}));class V extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){W.model.pushStackElement(),W.setCursorStates($.source,3,s.CursorMoveCommands.moveToEndOfLine(W,W.getCursorStates(),this._inSelectionMode,$.sticky||!1)),W.revealPrimaryCursor($.source,!0)}}T.CursorEnd=(0,w.registerEditorCommand)(new V({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:_.localize(0,null),type:"boolean",default:!1}}}}]}})),T.CursorEndSelect=(0,w.registerEditorCommand)(new V({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:_.localize(1,null),type:"boolean",default:!1}}}}]}}));class K extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){W.model.pushStackElement(),W.setCursorStates($.source,3,this._exec(W,W.getCursorStates())),W.revealPrimaryCursor($.source,!0)}_exec(W,$){const Z=[];for(let Q=0,re=$.length;Q<re;Q++){const ce=$[Q],he=ce.modelState.position.lineNumber,de=W.model.getLineMaxColumn(he);Z[Q]=g.CursorState.fromModelState(ce.modelState.move(this._inSelectionMode,he,de,0))}return Z}}T.CursorLineEnd=(0,w.registerEditorCommand)(new K({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 K({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1315}}}));class A extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){W.model.pushStackElement(),W.setCursorStates($.source,3,s.CursorMoveCommands.moveToBeginningOfBuffer(W,W.getCursorStates(),this._inSelectionMode)),W.revealPrimaryCursor($.source,!0)}}T.CursorTop=(0,w.registerEditorCommand)(new A({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 A({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));class Y extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){W.model.pushStackElement(),W.setCursorStates($.source,3,s.CursorMoveCommands.moveToEndOfBuffer(W,W.getCursorStates(),this._inSelectionMode)),W.revealPrimaryCursor($.source,!0)}}T.CursorBottom=(0,w.registerEditorCommand)(new Y({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 Y({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));class ie extends c{constructor(){super({id:"editorScroll",precondition:void 0,description:a.description})}determineScrollMethod(W){const $=[6],Z=[1,2,3,4,5,6],Q=[4,2],re=[1,3];return $.includes(W.unit)&&Q.includes(W.direction)?this._runHorizontalEditorScroll.bind(this):Z.includes(W.unit)&&re.includes(W.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(W,$){const Z=a.parse($);if(!Z)return;const Q=this.determineScrollMethod(Z);Q&&Q(W,$.source,Z)}_runVerticalEditorScroll(W,$,Z){const Q=this._computeDesiredScrollTop(W,Z);if(Z.revealCursor){const re=W.getCompletelyVisibleViewRangeAtScrollTop(Q);W.setCursorStates($,3,[s.CursorMoveCommands.findPositionInViewportIfOutside(W,W.getPrimaryCursorState(),re,Z.select)])}W.viewLayout.setScrollPosition({scrollTop:Q},0)}_computeDesiredScrollTop(W,$){if($.unit===1){const re=W.viewLayout.getFutureViewport(),ce=W.getCompletelyVisibleViewRangeAtScrollTop(re.top),he=W.coordinatesConverter.convertViewRangeToModelRange(ce);let de;$.direction===1?de=Math.max(1,he.startLineNumber-$.value):de=Math.min(W.model.getLineCount(),he.startLineNumber+$.value);const ue=W.coordinatesConverter.convertModelPositionToViewPosition(new i.Position(de,1));return W.viewLayout.getVerticalOffsetForLineNumber(ue.lineNumber)}if($.unit===5){let re=0;return $.direction===3&&(re=W.model.getLineCount()-W.cursorConfig.pageSize),W.viewLayout.getVerticalOffsetForLineNumber(re)}let Z;$.unit===3?Z=W.cursorConfig.pageSize*$.value:$.unit===4?Z=Math.round(W.cursorConfig.pageSize/2)*$.value:Z=$.value;const Q=($.direction===1?-1:1)*Z;return W.viewLayout.getCurrentScrollTop()+Q*W.cursorConfig.lineHeight}_runHorizontalEditorScroll(W,$,Z){const Q=this._computeDesiredScrollLeft(W,Z);W.viewLayout.setScrollPosition({scrollLeft:Q},0)}_computeDesiredScrollLeft(W,$){const Z=($.direction===4?-1:1)*$.value;return W.viewLayout.getCurrentScrollLeft()+Z*W.cursorConfig.typicalHalfwidthCharacterWidth}}T.EditorScrollImpl=ie,T.EditorScroll=(0,w.registerEditorCommand)(new ie),T.ScrollLineUp=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(H,W){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Up,by:a.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:W.source})}}),T.ScrollPageUp=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(H,W){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Up,by:a.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:W.source})}}),T.ScrollEditorTop=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(H,W){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Up,by:a.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:W.source})}}),T.ScrollLineDown=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(H,W){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Down,by:a.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:W.source})}}),T.ScrollPageDown=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(H,W){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Down,by:a.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:W.source})}}),T.ScrollEditorBottom=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(H,W){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Down,by:a.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:W.source})}}),T.ScrollLeft=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(H,W){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Left,by:a.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:W.source})}}),T.ScrollRight=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(H,W){T.EditorScroll.runCoreEditorCommand(H,{to:a.RawDirection.Right,by:a.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:W.source})}});class le extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){$.position&&(W.model.pushStackElement(),W.setCursorStates($.source,3,[s.CursorMoveCommands.word(W,W.getPrimaryCursorState(),this._inSelectionMode,$.position)]),$.revealType!==2&&W.revealPrimaryCursor($.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 c{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(H,W){if(!W.position)return;const $=H.getLastAddedCursorIndex(),Z=H.getCursorStates(),Q=Z.slice(0),re=Z[$];Q[$]=s.CursorMoveCommands.word(H,re,re.modelState.hasSelection(),W.position),H.model.pushStackElement(),H.setCursorStates(W.source,3,Q)}});class ne extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){$.position&&(W.model.pushStackElement(),W.setCursorStates($.source,3,[s.CursorMoveCommands.line(W,W.getPrimaryCursorState(),this._inSelectionMode,$.position,$.viewPosition)]),$.revealType!==2&&W.revealPrimaryCursor($.source,!1,!0))}}T.LineSelect=(0,w.registerEditorCommand)(new ne({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),T.LineSelectDrag=(0,w.registerEditorCommand)(new ne({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class se extends c{constructor(W){super(W),this._inSelectionMode=W.inSelectionMode}runCoreEditorCommand(W,$){if(!$.position)return;const Z=W.getLastAddedCursorIndex(),Q=W.getCursorStates(),re=Q.slice(0);re[Z]=s.CursorMoveCommands.line(W,Q[Z],this._inSelectionMode,$.position,$.viewPosition),W.model.pushStackElement(),W.setCursorStates($.source,3,re)}}T.LastCursorLineSelect=(0,w.registerEditorCommand)(new se({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),T.LastCursorLineSelectDrag=(0,w.registerEditorCommand)(new se({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),T.CancelSelection=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"cancelSelection",precondition:r.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:o,kbExpr:r.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(H,W){H.model.pushStackElement(),H.setCursorStates(W.source,3,[s.CursorMoveCommands.cancelSelection(H,H.getPrimaryCursorState())]),H.revealPrimaryCursor(W.source,!0)}}),T.RemoveSecondaryCursors=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"removeSecondaryCursors",precondition:r.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:o+1,kbExpr:r.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(H,W){H.model.pushStackElement(),H.setCursorStates(W.source,3,[H.getPrimaryCursorState()]),H.revealPrimaryCursor(W.source,!0),(0,D.status)(_.localize(2,null))}}),T.RevealLine=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"revealLine",precondition:void 0,description:l.description})}runCoreEditorCommand(H,W){const $=W,Z=$.lineNumber||0;let Q=typeof Z=="number"?Z+1:parseInt(Z)+1;Q<1&&(Q=1);const re=H.model.getLineCount();Q>re&&(Q=re);const ce=new n.Range(Q,1,Q,H.model.getLineMaxColumn(Q));let he=0;if($.at)switch($.at){case l.RawAtArgument.Top:he=3;break;case l.RawAtArgument.Center:he=1;break;case l.RawAtArgument.Bottom:he=4;break;default:break}const de=H.coordinatesConverter.convertModelRangeToViewRange(ce);H.revealRange(W.source,!1,de,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,W,$){const Z=W._getViewModel();Z&&this.runCoreEditorCommand(Z,$)}runCoreEditorCommand(H,W){H.model.pushStackElement(),H.setCursorStates("keyboard",3,[s.CursorMoveCommands.selectAll(H,H.getPrimaryCursorState())])}},T.SetSelection=(0,w.registerEditorCommand)(new class extends c{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(H,W){W.selection&&(H.model.pushStackElement(),H.setCursorStates(W.source,3,[g.CursorState.fromModelSelection(W.selection)]))}})})(v||(e.CoreNavigationCommands=v={}));const f=d.ContextKeyExpr.and(r.EditorContextKeys.textInputFocus,r.EditorContextKeys.columnSelection);function p(T,O){h.KeybindingsRegistry.registerKeybindingRule({id:T,primary:O,when:f,weight:o+1})}p(v.CursorColumnSelectLeft.id,1039),p(v.CursorColumnSelectRight.id,1041),p(v.CursorColumnSelectUp.id,1040),p(v.CursorColumnSelectPageUp.id,1035),p(v.CursorColumnSelectDown.id,1042),p(v.CursorColumnSelectPageDown.id,1036);function C(T){return T.register(),T}var y;(function(T){class O extends w.EditorCommand{runEditorCommand(M,N,P){const x=N._getViewModel();x&&this.runCoreEditingCommand(N,x,P||{})}}T.CoreEditingCommand=O,T.LineBreakInsert=(0,w.registerEditorCommand)(new class extends O{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(P=>P.modelState.selection)))}}),T.Outdent=(0,w.registerEditorCommand)(new class extends O{constructor(){super({id:"outdent",precondition:r.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:d.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(P=>P.modelState.selection))),R.pushUndoStop()}}),T.Tab=(0,w.registerEditorCommand)(new class extends O{constructor(){super({id:"tab",precondition:r.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:d.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(P=>P.modelState.selection))),R.pushUndoStop()}}),T.DeleteLeft=(0,w.registerEditorCommand)(new class extends O{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[P,x]=m.DeleteOperations.deleteLeft(M.getPrevEditOperationType(),M.cursorConfig,M.model,M.getCursorStates().map(F=>F.modelState.selection),M.getCursorAutoClosedCharacters());P&&R.pushUndoStop(),R.executeCommands(this.id,x),M.setPrevEditOperationType(2)}}),T.DeleteRight=(0,w.registerEditorCommand)(new class extends O{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[P,x]=m.DeleteOperations.deleteRight(M.getPrevEditOperationType(),M.cursorConfig,M.model,M.getCursorStates().map(F=>F.modelState.selection));P&&R.pushUndoStop(),R.executeCommands(this.id,x),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(88)===!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(88)===!0))return M.getModel().redo()}}})(y||(e.CoreEditingCommands=y={}));class E extends w.Command{constructor(O,R,M){super({id:O,precondition:void 0,description:M}),this._handlerId=R}runCommand(O,R){const M=O.get(b.ICodeEditorService).getFocusedCodeEditor();M&&M.trigger("keyboard",this._handlerId,R)}}function I(T,O){C(new E("default:"+T,T)),C(new E(T,T,O))}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[762],ee([1,0,228,15]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let L=e.MarkerDecorationsContribution=class{constructor(w,b){}dispose(){}};L.ID="editor.contrib.markerDecorations",e.MarkerDecorationsContribution=L=Te([ge(1,_.IMarkerDecorationsService)],L),(0,k.registerEditorContribution)(L.ID,L,0)}),define(J[763],ee([1,0,184,12,17]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class D{constructor(b,S,g,m){this.configuration=b,this.viewModel=S,this.userInputEvents=g,this.commandDelegate=m}paste(b,S,g,m){this.commandDelegate.paste(b,S,g,m)}type(b){this.commandDelegate.type(b)}compositionType(b,S,g,m){this.commandDelegate.compositionType(b,S,g,m)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(b){_.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:b})}_validateViewColumn(b){const S=this.viewModel.getLineMinColumn(b.lineNumber);return b.column<S?new k.Position(b.lineNumber,S):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 S=this.configuration.options,g=L.isLinux&&S.get(103),m=S.get(20);b.middleButton&&!g?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,S){return b=this._validateViewColumn(b),{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b,revealType:S}}moveTo(b,S){_.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_moveToSelect(b,S){_.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_columnSelect(b,S,g){b=this._validateViewColumn(b),_.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b,mouseColumn:S,doColumnSelect:g})}_createCursor(b,S){b=this._validateViewColumn(b),_.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b,wholeLine:S})}_lastCursorMoveToSelect(b,S){_.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_wordSelect(b,S){_.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_wordSelectDrag(b,S){_.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_lastCursorWordSelect(b,S){_.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_lineSelect(b,S){_.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_lineSelectDrag(b,S){_.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_lastCursorLineSelect(b,S){_.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_lastCursorLineSelectDrag(b,S){_.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b,S))}_selectAll(){_.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[764],ee([1,0,6,56,87,141,111,73]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=void 0;let S=e.WorkerBasedDocumentDiffProvider=class{constructor(m,s,t){this.editorWorkerService=s,this.telemetryService=t,this.onDidChangeEventEmitter=new _.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(m)}dispose(){var m;(m=this.diffAlgorithmOnDidChangeSubscription)===null||m===void 0||m.dispose()}computeDiff(m,s,t){var i;return we(this,void 0,void 0,function*(){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(m,s,t);if(m.getLineCount()===1&&m.getLineMaxColumn(1)===1)return{changes:[new D.LineRangeMapping(new L.LineRange(1,1),new L.LineRange(1,s.getLineCount()),[new D.RangeMapping(m.getFullModelRange(),s.getFullModelRange())])],identical:!1,quitEarly:!1};const n=k.StopWatch.create(!0),r=yield this.editorWorkerService.computeDiff(m.uri,s.uri,t,this.diffAlgorithm),d=n.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:d,timedOut:(i=r?.quitEarly)!==null&&i!==void 0?i:!0}),!r)throw new Error("no diff result available");return r})}setOptions(m){var s;let t=!1;m.diffAlgorithm&&this.diffAlgorithm!==m.diffAlgorithm&&((s=this.diffAlgorithmOnDidChangeSubscription)===null||s===void 0||s.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=m.diffAlgorithm,typeof m.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=m.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}};e.WorkerBasedDocumentDiffProvider=S=Te([ge(1,w.IEditorWorkerService),ge(2,b.ITelemetryService)],S)}),define(J[765],ee([1,0,48,61,58,15,24,22,606,13,421]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new g.RawContextKey("selectionAnchorSet",!1);let m=class Fi{static get(d){return d.getContribution(Fi.ID)}constructor(d,h){this.editor=d,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(h),this.modelChangeListener=d.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const d=this.editor.getPosition();this.editor.changeDecorations(h=>{this.decorationId&&h.removeDecoration(this.decorationId),this.decorationId=h.addDecoration(w.Selection.fromPositions(d,d),{description:"selection-anchor",stickiness:1,hoverMessage:new k.MarkdownString().appendText((0,S.localize)(0,null)),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,_.alert)((0,S.localize)(1,null,d.lineNumber,d.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const d=this.editor.getModel().getDecorationRange(this.decorationId);d&&this.editor.setPosition(d.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const d=this.editor.getModel().getDecorationRange(this.decorationId);if(d){const h=this.editor.getPosition();this.editor.setSelection(w.Selection.fromPositions(d.getStartPosition(),h)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const d=this.decorationId;this.editor.changeDecorations(h=>{h.removeDecoration(d),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};m.ID="editor.contrib.selectionAnchorController",m=Te([ge(1,g.IContextKeyService)],m);class s extends D.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,S.localize)(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2080),weight:100}})}run(d,h){var o;return we(this,void 0,void 0,function*(){(o=m.get(h))===null||o===void 0||o.setSelectionAnchor()})}}class t extends D.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,S.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}run(d,h){var o;return we(this,void 0,void 0,function*(){(o=m.get(h))===null||o===void 0||o.goToSelectionAnchor()})}}class i extends D.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,S.localize)(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2089),weight:100}})}run(d,h){var o;return we(this,void 0,void 0,function*(){(o=m.get(h))===null||o===void 0||o.selectFromAnchorToCursor()})}}class n extends D.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,S.localize)(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}run(d,h){var o;return we(this,void 0,void 0,function*(){(o=m.get(h))===null||o===void 0||o.cancelSelectionAnchor()})}}(0,D.registerEditorContribution)(m.ID,m,4),(0,D.registerEditorAction)(s),(0,D.registerEditorAction)(t),(0,D.registerEditorAction)(i),(0,D.registerEditorAction)(n)}),define(J[766],ee([1,0,15,22,520,608]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class w extends _.EditorAction{constructor(m,s){super(s),this.left=m}run(m,s){if(!s.hasModel())return;const t=[],i=s.getSelections();for(const n of i)t.push(new L.MoveCaretCommand(n,this.left));s.pushUndoStop(),s.executeCommands(this.id,t),s.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 S extends w{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:D.localize(1,null),alias:"Move Selected Text Right",precondition:k.EditorContextKeys.writable})}}(0,_.registerEditorAction)(b),(0,_.registerEditorAction)(S)}),define(J[767],ee([1,0,15,120,195,5,22,609]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S extends _.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,s){if(!s.hasModel())return;const t=s.getModel(),i=[],n=s.getSelections();for(const r of n){if(!r.isEmpty())continue;const d=r.startLineNumber,h=r.startColumn,o=t.getLineMaxColumn(d);if(d===1&&(h===1||h===2&&o===2))continue;const c=h===o?r.getPosition():L.MoveOperations.rightPosition(t,r.getPosition().lineNumber,r.getPosition().column),a=L.MoveOperations.leftPosition(t,c),l=L.MoveOperations.leftPosition(t,a),u=t.getValueInRange(D.Range.fromPositions(l,a)),v=t.getValueInRange(D.Range.fromPositions(a,c)),f=D.Range.fromPositions(l,c);i.push(new k.ReplaceCommand(f,v+u))}i.length>0&&(s.pushUndoStop(),s.executeCommands(this.id,i),s.pushUndoStop())}}(0,_.registerEditorAction)(S)}),define(J[768],ee([1,0,47,17,222,15,32,22,610,30,97,13]),function(j,e,_,k,L,D,w,b,S,g,m,s){"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"),n=k.isNative||document.queryCommandSupported("copy"),r=typeof navigator.clipboard>"u"||_.isFirefox?document.queryCommandSupported("paste"):!0;function d(c){return c.register(),c}e.CutAction=i?d(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:g.MenuId.MenubarEditMenu,group:"2_ccp",title:S.localize(0,null),order:1},{menuId:g.MenuId.EditorContext,group:t,title:S.localize(1,null),when:b.EditorContextKeys.writable,order:1},{menuId:g.MenuId.CommandPalette,group:"",title:S.localize(2,null),order:1},{menuId:g.MenuId.SimpleEditorContext,group:t,title:S.localize(3,null),when:b.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=n?d(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:g.MenuId.MenubarEditMenu,group:"2_ccp",title:S.localize(4,null),order:2},{menuId:g.MenuId.EditorContext,group:t,title:S.localize(5,null),order:2},{menuId:g.MenuId.CommandPalette,group:"",title:S.localize(6,null),order:1},{menuId:g.MenuId.SimpleEditorContext,group:t,title:S.localize(7,null),order:2}]})):void 0,g.MenuRegistry.appendMenuItem(g.MenuId.MenubarEditMenu,{submenu:g.MenuId.MenubarCopy,title:{value:S.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),g.MenuRegistry.appendMenuItem(g.MenuId.EditorContext,{submenu:g.MenuId.EditorContextCopy,title:{value:S.localize(9,null),original:"Copy As"},group:t,order:3}),g.MenuRegistry.appendMenuItem(g.MenuId.EditorContext,{submenu:g.MenuId.EditorContextShare,title:{value:S.localize(10,null),original:"Share"},group:"11_share",order:-1,when:s.ContextKeyExpr.and(s.ContextKeyExpr.notEquals("resourceScheme","output"),b.EditorContextKeys.editorTextFocus)}),g.MenuRegistry.appendMenuItem(g.MenuId.EditorTitleContext,{submenu:g.MenuId.EditorTitleContextShare,title:{value:S.localize(11,null),original:"Share"},group:"11_share",order:-1}),g.MenuRegistry.appendMenuItem(g.MenuId.ExplorerContext,{submenu:g.MenuId.ExplorerContextShare,title:{value:S.localize(12,null),original:"Share"},group:"11_share",order:-1}),e.PasteAction=r?d(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:g.MenuId.MenubarEditMenu,group:"2_ccp",title:S.localize(13,null),order:4},{menuId:g.MenuId.EditorContext,group:t,title:S.localize(14,null),when:b.EditorContextKeys.writable,order:4},{menuId:g.MenuId.CommandPalette,group:"",title:S.localize(15,null),order:1},{menuId:g.MenuId.SimpleEditorContext,group:t,title:S.localize(16,null),when:b.EditorContextKeys.writable,order:4}]})):void 0;class h extends D.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:S.localize(17,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(a,l){!l.hasModel()||!l.getOption(35)&&l.getSelection().isEmpty()||(L.CopyOptions.forceCopyWithSyntaxHighlighting=!0,l.focus(),document.execCommand("copy"),L.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function o(c,a){c&&(c.addImplementation(1e4,"code-editor",(l,u)=>{const v=l.get(w.ICodeEditorService).getFocusedCodeEditor();if(v&&v.hasTextFocus()){const f=v.getOption(35),p=v.getSelection();return p&&p.isEmpty()&&!f||document.execCommand(a),!0}return!1}),c.addImplementation(0,"generic-dom",(l,u)=>(document.execCommand(a),!0)))}o(e.CutAction,"cut"),o(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(c,a)=>{const l=c.get(w.ICodeEditorService),u=c.get(m.IClipboardService),v=l.getFocusedCodeEditor();return v&&v.hasTextFocus()?!document.execCommand("paste")&&k.isWeb?(()=>we(void 0,void 0,void 0,function*(){const p=yield u.readText();if(p!==""){const C=L.InMemoryClipboardMetadataManager.INSTANCE.get(p);let y=!1,E=null,I=null;C&&(y=v.getOption(35)&&!!C.isFromEmptySelection,E=typeof C.multicursorText<"u"?C.multicursorText:null,I=C.mode),v.trigger("keyboard","paste",{text:p,pasteOnNewLine:y,multicursorText:E,mode:I})}}))():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(c,a)=>(document.execCommand("paste"),!0))),n&&(0,D.registerEditorAction)(h)}),define(J[769],ee([1,0,58,15,5,22,29,278,521,620,30]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends k.EditorAction{constructor(h,o){super(o),this._type=h}run(h,o){const c=h.get(w.ILanguageConfigurationService);if(!o.hasModel())return;const a=o.getModel(),l=[],u=a.getOptions(),v=o.getOption(21),f=o.getSelections().map((C,y)=>({selection:C,index:y,ignoreFirstLine:!1}));f.sort((C,y)=>L.Range.compareRangesUsingStarts(C.selection,y.selection));let p=f[0];for(let C=1;C<f.length;C++){const y=f[C];p.selection.endLineNumber===y.selection.startLineNumber&&(p.index<y.index?y.ignoreFirstLine=!0:(p.ignoreFirstLine=!0,p=y))}for(const C of f)l.push(new S.LineCommentCommand(c,C.selection,u.tabSize,this._type,v.insertSpace,v.ignoreEmptyLines,C.ignoreFirstLine));o.pushUndoStop(),o.executeCommands(this.id,l),o.pushUndoStop()}}class t extends s{constructor(){super(0,{id:"editor.action.commentLine",label:g.localize(0,null),alias:"Toggle Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:m.MenuId.MenubarEditMenu,group:"5_insert",title:g.localize(1,null),order:1}})}}class i extends s{constructor(){super(1,{id:"editor.action.addCommentLine",label:g.localize(2,null),alias:"Add Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2089,2081),weight:100}})}}class n extends s{constructor(){super(2,{id:"editor.action.removeCommentLine",label:g.localize(3,null),alias:"Remove Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2089,2099),weight:100}})}}class r extends k.EditorAction{constructor(){super({id:"editor.action.blockComment",label:g.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:g.localize(5,null),order:2}})}run(h,o){const c=h.get(w.ILanguageConfigurationService);if(!o.hasModel())return;const a=o.getOption(21),l=[],u=o.getSelections();for(const v of u)l.push(new b.BlockCommentCommand(v,a.insertSpace,c));o.pushUndoStop(),o.executeCommands(this.id,l),o.pushUndoStop()}}(0,k.registerEditorAction)(t),(0,k.registerEditorAction)(i),(0,k.registerEditorAction)(n),(0,k.registerEditorAction)(r)}),define(J[770],ee([1,0,2,15,22,622]),function(j,e,_,k,L,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,n=t.selections.length;if(i!==n)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,n){this.cursorState=t,this.scrollTop=i,this.scrollLeft=n}}class S extends _.Disposable{static get(t){return t.getContribution(S.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 n=new w(i.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new b(n,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}}e.CursorUndoRedoController=S,S.ID="editor.contrib.cursorUndoRedoController";class g extends k.EditorAction{constructor(){super({id:"cursorUndo",label:D.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(t,i,n){var r;(r=S.get(i))===null||r===void 0||r.cursorUndo()}}e.CursorUndo=g;class m extends k.EditorAction{constructor(){super({id:"cursorRedo",label:D.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(t,i,n){var r;(r=S.get(i))===null||r===void 0||r.cursorRedo()}}e.CursorRedo=m,(0,k.registerEditorContribution)(S.ID,S,0),(0,k.registerEditorAction)(g),(0,k.registerEditorAction)(m)}),define(J[771],ee([1,0,15,13,20,59,8,49,627]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const g=(0,w.createDecorator)("IEditorCancelService"),m=new k.RawContextKey("cancellableOperation",!1,(0,S.localize)(0,null));(0,b.registerSingleton)(g,class{constructor(){this._tokens=new WeakMap}add(t,i){let n=this._tokens.get(t);n||(n=t.invokeWithinContext(d=>{const h=m.bindTo(d.get(k.IContextKeyService)),o=new D.LinkedList;return{key:h,tokens:o}}),this._tokens.set(t,n));let r;return n.key.set(!0),r=n.tokens.push(i),()=>{r&&(r(),n.key.set(!n.tokens.isEmpty()),r=void 0)}}cancel(t){const i=this._tokens.get(t);if(!i)return;const n=i.tokens.pop();n&&(n.cancel(),i.key.set(!i.tokens.isEmpty()))}},1);class s extends L.CancellationTokenSource{constructor(i,n){super(n),this.editor=i,this._unregister=i.invokeWithinContext(r=>r.get(g).add(i,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=s,(0,_.registerEditorCommand)(new class extends _.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:m})}runEditorCommand(t,i){t.get(g).cancel(i)}})}),define(J[99],ee([1,0,9,5,20,2,771]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class b{constructor(s,t){if(this.flags=t,this.flags&1){const i=s.getModel();this.modelVersionId=i?_.format("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=s.getPosition():this.position=null,this.flags&2?this.selection=s.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=s.getScrollLeft(),this.scrollTop=s.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(s){if(!(s instanceof b))return!1;const t=s;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(s){return this._equals(new b(s,this.flags))}}e.EditorState=b;class S extends w.EditorKeybindingCancellationTokenSource{constructor(s,t,i,n){super(s,n),this._listener=new D.DisposableStore,t&4&&this._listener.add(s.onDidChangeCursorPosition(r=>{(!i||!k.Range.containsPosition(i,r.position))&&this.cancel()})),t&2&&this._listener.add(s.onDidChangeCursorSelection(r=>{(!i||!k.Range.containsRange(i,r.selection))&&this.cancel()})),t&8&&this._listener.add(s.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(s.onDidChangeModel(r=>this.cancel())),this._listener.add(s.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=S;class g extends L.CancellationTokenSource{constructor(s,t){super(t),this._listener=s.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=g}),define(J[131],ee([1,0,16,20,11,2,21,125,5,24,19,50,99,611,25,43,80,73,108]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,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 c 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,_.isNonEmptyArray)(I.diagnostics)?(0,_.isNonEmptyArray)(T.diagnostics)?c.codeActionsPreferredComparator(I,T):-1:(0,_.isNonEmptyArray)(T.diagnostics)?1:c.codeActionsPreferredComparator(I,T)}constructor(I,T,O){super(),this.documentation=T,this._register(O),this.allActions=[...I].sort(c.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 l(E,I,T,O,R,M){var N;return we(this,void 0,void 0,function*(){const P=O.filter||{},x={only:(N=P.include)===null||N===void 0?void 0:N.value,trigger:O.type},F=new t.TextModelCancellationTokenSource(I,M),B=u(E,I,P),V=new D.DisposableStore,K=B.map(Y=>we(this,void 0,void 0,function*(){try{R.report(Y);const ie=yield Y.provideCodeActions(I,T,x,F.token);if(ie&&V.add(ie),F.token.isCancellationRequested)return a;const le=(ie?.actions||[]).filter(se=>se&&(0,o.filtersAction)(P,se)),ne=f(Y,le,P.include);return{actions:le.map(se=>new o.CodeActionItem(se,Y)),documentation:ne}}catch(ie){if((0,L.isCancellationError)(ie))throw ie;return(0,L.onUnexpectedExternalError)(ie),a}})),A=E.onDidChange(()=>{const Y=E.all(I);(0,_.equals)(Y,B)||F.cancel()});try{const Y=yield Promise.all(K),ie=Y.map(ne=>ne.actions).flat(),le=[...(0,_.coalesce)(Y.map(ne=>ne.documentation)),...v(E,I,O,ie)];return new c(ie,le,V)}finally{A.dispose(),F.dispose()}})}e.getCodeActions=l;function u(E,I,T){return E.all(I).filter(O=>O.providedCodeActionKinds?O.providedCodeActionKinds.some(R=>(0,o.mayIncludeActionsOfKind)(T,new o.CodeActionKind(R))):!0)}function*v(E,I,T,O){var R,M,N;if(I&&O.length)for(const P of E.all(I))P._getAdditionalMenuItems&&(yield*(R=P._getAdditionalMenuItems)===null||R===void 0?void 0:R.call(P,{trigger:T.type,only:(N=(M=T.filter)===null||M===void 0?void 0:M.include)===null||N===void 0?void 0:N.value},O.map(x=>x.action)))}function f(E,I,T){if(!E.documentation)return;const O=E.documentation.map(R=>({kind:new o.CodeActionKind(R.kind),command:R.command}));if(T){let R;for(const M of O)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 O)if(M.kind.contains(new o.CodeActionKind(R.kind)))return M.command}}var p;(function(E){E.OnSave="onSave",E.FromProblemsView="fromProblemsView",E.FromCodeActions="fromCodeActions"})(p||(e.ApplyCodeActionReason=p={}));function C(E,I,T,O,R=k.CancellationToken.None){var M;return we(this,void 0,void 0,function*(){const N=E.get(b.IBulkEditService),P=E.get(n.ICommandService),x=E.get(h.ITelemetryService),F=E.get(r.INotificationService);if(x.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:O?.editor,label:I.action.title,quotableLabel:I.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:T!==p.OnSave,showPreview:O?.preview})).isApplied)&&I.action.command)try{yield P.executeCommand(I.action.command.id,...I.action.command.arguments||[])}catch(B){const V=y(B);F.error(typeof V=="string"?V:i.localize(0,null))}})}e.applyCodeAction=C;function y(E){return typeof E=="string"?E:E instanceof Error&&typeof E.message=="string"?E.message:void 0}n.CommandsRegistry.registerCommand("_executeCodeActionProvider",function(E,I,T,O,R){return we(this,void 0,void 0,function*(){if(!(I instanceof w.URI))throw(0,L.illegalArgument)();const{codeActionProvider:M}=E.get(m.ILanguageFeaturesService),N=E.get(s.IModelService).getModel(I);if(!N)throw(0,L.illegalArgument)();const P=g.Selection.isISelection(T)?g.Selection.liftSelection(T):S.Range.isIRange(T)?N.validateRange(T):void 0;if(!P)throw(0,L.illegalArgument)();const x=typeof O=="string"?new o.CodeActionKind(O):void 0,F=yield l(M,N,P,{type:1,triggerAction:o.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:x}},d.Progress.None,k.CancellationToken.None),B=[],V=Math.min(F.validActions.length,typeof R=="number"?R:0);for(let K=0;K<V;K++)B.push(F.validActions[K].resolve(k.CancellationToken.None));try{return yield Promise.all(B),F.validActions.map(K=>K.action)}finally{setTimeout(()=>F.dispose(),100)}})})}),define(J[772],ee([1,0,102,131,108,34]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;let w=e.CodeActionKeybindingResolver=class xi{constructor(S){this.keybindingService=S}getResolver(){const S=new _.Lazy(()=>this.keybindingService.getKeybindings().filter(g=>xi.codeActionCommands.indexOf(g.command)>=0).filter(g=>g.resolvedKeybinding).map(g=>{let m=g.commandArgs;return g.command===k.organizeImportsCommandId?m={kind:L.CodeActionKind.SourceOrganizeImports.value}:g.command===k.fixAllCommandId&&(m={kind:L.CodeActionKind.SourceFixAll.value}),Object.assign({resolvedKeybinding:g.resolvedKeybinding},L.CodeActionCommandArgs.fromUser(m,{kind:L.CodeActionKind.None,apply:"never"}))}));return g=>{if(g.kind){const m=this.bestKeybindingForCodeAction(g,S.value);return m?.resolvedKeybinding}}}bestKeybindingForCodeAction(S,g){if(!S.kind)return;const m=new L.CodeActionKind(S.kind);return g.filter(s=>s.kind.contains(m)).filter(s=>s.preferred?S.isPreferred:!0).reduceRight((s,t)=>s?s.kind.contains(t.kind)?t:s:t,void 0)}};w.codeActionCommands=[k.refactorCommandId,k.codeActionCommandId,k.sourceActionCommandId,k.organizeImportsCommandId,k.fixAllCommandId],e.CodeActionKeybindingResolver=w=Te([ge(0,D.IKeybindingService)],w)});var xt=this&&this.__classPrivateFieldGet||function(j,e,_,k){if(_==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?j!==e||!k:!e.has(j))throw new TypeError("Cannot read private member from an object whose class did not declare it");return _==="m"?k:_==="a"?k.call(j):k?k.value:e.get(j)},oi=this&&this.__classPrivateFieldSet||function(j,e,_,k,L){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!L)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?j!==e||!L:!e.has(j))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?L.call(j,_):L?L.value=_:e.set(j,_),_};define(J[337],ee([1,0,14,11,6,2,42,13,80,108,131]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";var s;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(h,o,c,a=250){super(),this._editor=h,this._markerService=o,this._signalChange=c,this._delay=a,this._autoTriggerTimer=this._register(new _.TimeoutTimer),this._register(this._markerService.onMarkerChanged(l=>this._onMarkerChanges(l))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(h){const o=this._getRangeOfSelectionUnlessWhitespaceEnclosed(h);this._signalChange(o?{trigger:h,selection:o}:void 0)}_onMarkerChanges(h){const o=this._editor.getModel();o&&h.some(c=>(0,w.isEqual)(c,o.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:g.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(h){if(!this._editor.hasModel())return;const o=this._editor.getModel(),c=this._editor.getSelection();if(c.isEmpty()&&h.type===2){const{lineNumber:a,column:l}=c.getPosition(),u=o.getLineContent(a);if(u.length===0)return;if(l===1){if(/\\s/.test(u[0]))return}else if(l===o.getLineMaxColumn(a)){if(/\\s/.test(u[u.length-1]))return}else if(/\\s/.test(u[l-2])&&/\\s/.test(u[l-1]))return}return c}}var i;(function(d){d.Empty={type:0};class h{constructor(c,a,l){this.trigger=c,this.position=a,this._cancellablePromise=l,this.type=1,this.actions=l.catch(u=>{if((0,k.isCancellationError)(u))return n;throw u})}cancel(){this._cancellablePromise.cancel()}}d.Triggered=h})(i||(e.CodeActionsState=i={}));const n=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class r extends D.Disposable{constructor(h,o,c,a,l){super(),this._editor=h,this._registry=o,this._markerService=c,this._progressService=l,this._codeActionOracle=this._register(new D.MutableDisposable),this._state=i.Empty,this._onDidChangeState=this._register(new L.Emitter),this.onDidChangeState=this._onDidChangeState.event,s.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(){xt(this,s,"f")||(oi(this,s,!0,"f"),super.dispose(),this.setState(i.Empty,!0))}_update(){if(xt(this,s,"f"))return;this._codeActionOracle.value=void 0,this.setState(i.Empty);const h=this._editor.getModel();if(h&&this._registry.has(h)&&!this._editor.getOption(88)){const o=this._registry.all(h).flatMap(c=>{var a;return(a=c.providedCodeActionKinds)!==null&&a!==void 0?a:[]});this._supportedCodeActions.set(o.join(" ")),this._codeActionOracle.value=new t(this._editor,this._markerService,c=>{var a;if(!c){this.setState(i.Empty);return}const l=(0,_.createCancelablePromise)(u=>(0,m.getCodeActions)(this._registry,h,c.selection,c.trigger,S.Progress.None,u));c.trigger.type===1&&((a=this._progressService)===null||a===void 0||a.showWhile(l,250)),this.setState(new i.Triggered(c.trigger,c.selection.getStartPosition(),l))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:g.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(h){var o;(o=this._codeActionOracle.value)===null||o===void 0||o.trigger(h)}setState(h,o){h!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=h,!o&&!xt(this,s,"f")&&this._onDidChangeState.fire(h))}}e.CodeActionModel=r,s=new WeakMap}),define(J[338],ee([1,0,7,57,26,6,2,31,18,200,131,616,34,423]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var i;(function(r){r.Hidden={type:0};class d{constructor(o,c,a,l){this.actions=o,this.trigger=c,this.editorPosition=a,this.widgetPosition=l,this.type=1}}r.Showing=d})(i||(i={}));let n=e.LightBulbWidget=class Bi extends w.Disposable{constructor(d,h){super(),this._editor=d,this._onClick=this._register(new D.Emitter),this.onClick=this._onClick.event,this._state=i.Hidden,this._domNode=_.$("div.lightBulbWidget"),this._register(k.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(o=>{const c=this._editor.getModel();(this.state.type!==1||!c||this.state.editorPosition.lineNumber>=c.getLineCount())&&this.hide()})),this._register(_.addStandardDisposableGenericMouseDownListener(this._domNode,o=>{if(this.state.type!==1)return;this._editor.focus(),o.preventDefault();const{top:c,height:a}=_.getDomNodePagePosition(this._domNode),l=this._editor.getOption(64);let u=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(u+=l),this._onClick.fire({x:o.posx,y:c+a+u,actions:this.state.actions,trigger:this.state.trigger})})),this._register(_.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(h.onDidUpdateKeybindings,()=>{var o,c;this._preferredKbLabel=(0,S.withNullAsUndefined)((o=h.lookupKeybinding(m.autoFixCommandId))===null||o===void 0?void 0:o.getLabel()),this._quickFixKbLabel=(0,S.withNullAsUndefined)((c=h.lookupKeybinding(m.quickFixCommandId))===null||c===void 0?void 0:c.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(d,h,o){if(d.validActions.length<=0)return this.hide();const c=this._editor.getOptions();if(!c.get(62).enabled)return this.hide();const a=this._editor.getModel();if(!a)return this.hide();const{lineNumber:l,column:u}=a.validatePosition(o),v=a.getOptions().tabSize,f=c.get(48),p=a.getLineContent(l),C=(0,g.computeIndentLevel)(p,v),y=f.spaceWidth*C>22,E=T=>T>2&&this._editor.getTopForLineNumber(T)===this._editor.getTopForLineNumber(T-1);let I=l;if(!y){if(l>1&&!E(l-1))I-=1;else if(!E(l+1))I+=1;else if(u*f.spaceWidth<22)return this.hide()}this.state=new i.Showing(d,h,o,{position:{lineNumber:I,column:1},preference:Bi._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(d){this._state=d,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...b.ThemeIcon.asClassNameArray(L.Codicon.lightBulb)),this._domNode.classList.add(...b.ThemeIcon.asClassNameArray(L.Codicon.lightbulbAutofix)),this._preferredKbLabel)){this.title=s.localize(0,null,this._preferredKbLabel);return}this._domNode.classList.remove(...b.ThemeIcon.asClassNameArray(L.Codicon.lightbulbAutofix)),this._domNode.classList.add(...b.ThemeIcon.asClassNameArray(L.Codicon.lightBulb)),this._quickFixKbLabel?this.title=s.localize(1,null,this._quickFixKbLabel):this.title=s.localize(2,null)}set title(d){this._domNode.title=d}};n.ID="editor.contrib.lightbulbWidget",n._posPref=[0],e.LightBulbWidget=n=Te([ge(1,t.IKeybindingService)],n)}),define(J[773],ee([1,0,15,151,632]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends _.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:L.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(g,m){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()+1)}}class w extends _.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:L.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(g,m){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()-1)}}class b extends _.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:L.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(g,m){k.EditorZoom.setZoomLevel(0)}}(0,_.registerEditorAction)(D),(0,_.registerEditorAction)(w),(0,_.registerEditorAction)(b)}),define(J[339],ee([1,0,48,16,20,11,53,59,18,21,99,172,12,5,24,111,62,281,633,25,715,8,19,63]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v){"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(B=>B.range),!N.length)return;let{range:P}=N[0];for(let B=1;B<N.length;B++)P=i.Range.plusRange(P,N[B].range);const{startLineNumber:x,endLineNumber:F}=P;x===F?N.length===1?(0,_.alert)(o.localize(0,null,x)):(0,_.alert)(o.localize(1,null,N.length,x)):N.length===1?(0,_.alert)(o.localize(2,null,x,F)):(0,_.alert)(o.localize(3,null,N.length,x,F))}e.alertFormattingEdits=f;function p(N,P,x){const F=[],B=new a.ExtensionIdentifierSet,V=N.ordered(x);for(const A of V)F.push(A),A.extensionId&&B.add(A.extensionId);const K=P.ordered(x);for(const A of K){if(A.extensionId){if(B.has(A.extensionId))continue;B.add(A.extensionId)}F.push({displayName:A.displayName,extensionId:A.extensionId,provideDocumentFormattingEdits(Y,ie,le){return A.provideDocumentRangeFormattingEdits(Y,Y.getFullModelRange(),ie,le)}})}return F}e.getRealAndSyntheticDocumentFormattersOrdered=p;class C{static setFormatterSelector(P){return{dispose:C._selectors.unshift(P)}}static select(P,x,F){return we(this,void 0,void 0,function*(){if(P.length===0)return;const B=w.Iterable.first(C._selectors);if(B)return yield B(P,x,F)})}}e.FormattingConflicts=C,C._selectors=new b.LinkedList;function y(N,P,x,F,B,V){return we(this,void 0,void 0,function*(){const K=N.get(l.IInstantiationService),{documentRangeFormattingEditProvider:A}=N.get(u.ILanguageFeaturesService),Y=(0,s.isCodeEditor)(P)?P.getModel():P,ie=A.ordered(Y),le=yield C.select(ie,Y,F);le&&(B.report(le),yield K.invokeFunction(E,le,P,x,V))})}e.formatDocumentRangesWithSelectedProvider=y;function E(N,P,x,F,B){var V,K;return we(this,void 0,void 0,function*(){const A=N.get(r.IEditorWorkerService),Y=N.get(v.ILogService);let ie,le;(0,s.isCodeEditor)(x)?(ie=x.getModel(),le=new m.EditorStateCancellationTokenSource(x,5,void 0,B)):(ie=x,le=new m.TextModelCancellationTokenSource(x,B));const ne=[];let se=0;for(const Q of(0,k.asArray)(F).sort(i.Range.compareRangesUsingStarts))se>0&&i.Range.areIntersectingOrTouching(ne[se-1],Q)?ne[se-1]=i.Range.fromPositions(ne[se-1].getStartPosition(),Q.getEndPosition()):se=ne.push(Q);const H=Q=>we(this,void 0,void 0,function*(){var re,ce;Y.trace("[format][provideDocumentRangeFormattingEdits] (request)",(re=P.extensionId)===null||re===void 0?void 0:re.value,Q);const he=(yield P.provideDocumentRangeFormattingEdits(ie,Q,ie.getFormattingOptions(),le.token))||[];return Y.trace("[format][provideDocumentRangeFormattingEdits] (response)",(ce=P.extensionId)===null||ce===void 0?void 0:ce.value,he),he}),W=(Q,re)=>{if(!Q.length||!re.length)return!1;const ce=Q.reduce((he,de)=>i.Range.plusRange(he,de.range),Q[0].range);if(!re.some(he=>i.Range.intersectRanges(ce,he.range)))return!1;for(const he of Q)for(const de of re)if(i.Range.intersectRanges(he.range,de.range))return!0;return!1},$=[],Z=[];try{if(typeof P.provideDocumentRangesFormattingEdits=="function"){Y.trace("[format][provideDocumentRangeFormattingEdits] (request)",(V=P.extensionId)===null||V===void 0?void 0:V.value,ne);const Q=(yield P.provideDocumentRangesFormattingEdits(ie,ne,ie.getFormattingOptions(),le.token))||[];Y.trace("[format][provideDocumentRangeFormattingEdits] (response)",(K=P.extensionId)===null||K===void 0?void 0:K.value,Q),Z.push(Q)}else{for(const Q of ne){if(le.token.isCancellationRequested)return!0;Z.push(yield H(Q))}for(let Q=0;Q<ne.length;++Q)for(let re=Q+1;re<ne.length;++re){if(le.token.isCancellationRequested)return!0;if(W(Z[Q],Z[re])){const ce=i.Range.plusRange(ne[Q],ne[re]),he=yield H(ce);ne.splice(re,1),ne.splice(Q,1),ne.push(ce),Z.splice(re,1),Z.splice(Q,1),Z.push(he),Q=0,re=0}}}for(const Q of Z){if(le.token.isCancellationRequested)return!0;const re=yield A.computeMoreMinimalEdits(ie.uri,Q);re&&$.push(...re)}}finally{le.dispose()}if($.length===0)return!1;if((0,s.isCodeEditor)(x))h.FormattingEdit.execute(x,$,!0),f($),x.revealPositionInCenterIfOutsideViewport(x.getPosition(),1);else{const[{range:Q}]=$,re=new n.Selection(Q.startLineNumber,Q.startColumn,Q.endLineNumber,Q.endColumn);ie.pushEditOperations([re],$.map(ce=>({text:ce.text,range:i.Range.lift(ce.range),forceMoveMarkers:!0})),ce=>{for(const{range:he}of ce)if(i.Range.areIntersectingOrTouching(he,re))return[new n.Selection(he.startLineNumber,he.startColumn,he.endLineNumber,he.endColumn)];return null})}return!0})}e.formatDocumentRangesWithProvider=E;function I(N,P,x,F,B){return we(this,void 0,void 0,function*(){const V=N.get(l.IInstantiationService),K=N.get(u.ILanguageFeaturesService),A=(0,s.isCodeEditor)(P)?P.getModel():P,Y=p(K.documentFormattingEditProvider,K.documentRangeFormattingEditProvider,A),ie=yield C.select(Y,A,x);ie&&(F.report(ie),yield V.invokeFunction(T,ie,P,x,B))})}e.formatDocumentWithSelectedProvider=I;function T(N,P,x,F,B){return we(this,void 0,void 0,function*(){const V=N.get(r.IEditorWorkerService);let K,A;(0,s.isCodeEditor)(x)?(K=x.getModel(),A=new m.EditorStateCancellationTokenSource(x,5,void 0,B)):(K=x,A=new m.TextModelCancellationTokenSource(x,B));let Y;try{const ie=yield P.provideDocumentFormattingEdits(K,K.getFormattingOptions(),A.token);if(Y=yield V.computeMoreMinimalEdits(K.uri,ie),A.token.isCancellationRequested)return!0}finally{A.dispose()}if(!Y||Y.length===0)return!1;if((0,s.isCodeEditor)(x))h.FormattingEdit.execute(x,Y,F!==2),F!==2&&(f(Y),x.revealPositionInCenterIfOutsideViewport(x.getPosition(),1));else{const[{range:ie}]=Y,le=new n.Selection(ie.startLineNumber,ie.startColumn,ie.endLineNumber,ie.endColumn);K.pushEditOperations([le],Y.map(ne=>({text:ne.text,range:i.Range.lift(ne.range),forceMoveMarkers:!0})),ne=>{for(const{range:se}of ne)if(i.Range.areIntersectingOrTouching(se,le))return[new n.Selection(se.startLineNumber,se.startColumn,se.endLineNumber,se.endColumn)];return null})}return!0})}e.formatDocumentWithProvider=T;function O(N,P,x,F,B,V){return we(this,void 0,void 0,function*(){const K=P.documentRangeFormattingEditProvider.ordered(x);for(const A of K){const Y=yield Promise.resolve(A.provideDocumentRangeFormattingEdits(x,F,B,V)).catch(D.onUnexpectedExternalError);if((0,k.isNonEmptyArray)(Y))return yield N.computeMoreMinimalEdits(x.uri,Y)}})}e.getDocumentRangeFormattingEditsUntilResult=O;function R(N,P,x,F,B){return we(this,void 0,void 0,function*(){const V=p(P.documentFormattingEditProvider,P.documentRangeFormattingEditProvider,x);for(const K of V){const A=yield Promise.resolve(K.provideDocumentFormattingEdits(x,F,B)).catch(D.onUnexpectedExternalError);if((0,k.isNonEmptyArray)(A))return yield N.computeMoreMinimalEdits(x.uri,A)}})}e.getDocumentFormattingEditsUntilResult=R;function M(N,P,x,F,B,V,K){const A=P.onTypeFormattingEditProvider.ordered(x);return A.length===0||A[0].autoFormatTriggerCharacters.indexOf(B)<0?Promise.resolve(void 0):Promise.resolve(A[0].provideOnTypeFormattingEdits(x,F,B,V,K)).catch(D.onUnexpectedExternalError).then(Y=>N.computeMoreMinimalEdits(x.uri,Y))}e.getOnTypeFormattingEdits=M,c.CommandsRegistry.registerCommand("_executeFormatRangeProvider",function(N,...P){return we(this,void 0,void 0,function*(){const[x,F,B]=P;(0,S.assertType)(g.URI.isUri(x)),(0,S.assertType)(i.Range.isIRange(F));const V=N.get(d.ITextModelService),K=N.get(r.IEditorWorkerService),A=N.get(u.ILanguageFeaturesService),Y=yield V.createModelReference(x);try{return O(K,A,Y.object.textEditorModel,i.Range.lift(F),B,L.CancellationToken.None)}finally{Y.dispose()}})}),c.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",function(N,...P){return we(this,void 0,void 0,function*(){const[x,F]=P;(0,S.assertType)(g.URI.isUri(x));const B=N.get(d.ITextModelService),V=N.get(r.IEditorWorkerService),K=N.get(u.ILanguageFeaturesService),A=yield B.createModelReference(x);try{return R(V,K,A.object.textEditorModel,F,L.CancellationToken.None)}finally{A.dispose()}})}),c.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",function(N,...P){return we(this,void 0,void 0,function*(){const[x,F,B,V]=P;(0,S.assertType)(g.URI.isUri(x)),(0,S.assertType)(t.Position.isIPosition(F)),(0,S.assertType)(typeof B=="string");const K=N.get(d.ITextModelService),A=N.get(r.IEditorWorkerService),Y=N.get(u.ILanguageFeaturesService),ie=yield K.createModelReference(x);try{return M(A,Y,ie.object.textEditorModel,t.Position.lift(F),B,V,L.CancellationToken.None)}finally{ie.dispose()}})})}),define(J[774],ee([1,0,16,20,11,58,2,15,32,117,5,22,111,19,339,281,634,25,13,8,80]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let l=class{constructor(C,y,E){this._editor=C,this._languageFeaturesService=y,this._workerService=E,this._disposables=new w.DisposableStore,this._sessionDisposables=new w.DisposableStore,this._disposables.add(y.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(C.onDidChangeModel(()=>this._update())),this._disposables.add(C.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(C.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 C=this._editor.getModel(),[y]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(C);if(!y||!y.autoFormatTriggerCharacters)return;const E=new g.CharacterSet;for(const I of y.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(C){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const y=this._editor.getModel(),E=this._editor.getPosition(),I=new k.CancellationTokenSource,T=this._editor.onDidChangeModelContent(O=>{if(O.isFlush){I.cancel(),T.dispose();return}for(let R=0,M=O.changes.length;R<M;R++)if(O.changes[R].range.endLineNumber<=E.lineNumber){I.cancel(),T.dispose();return}});(0,n.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,y,E,C,y.getFormattingOptions(),I.token).then(O=>{I.token.isCancellationRequested||(0,_.isNonEmptyArray)(O)&&(r.FormattingEdit.execute(this._editor,O,!0),(0,n.alertFormattingEdits)(O))}).finally(()=>{T.dispose()})}};l.ID="editor.contrib.autoFormat",l=Te([ge(1,i.ILanguageFeaturesService),ge(2,t.IEditorWorkerService)],l);let u=class{constructor(C,y,E){this.editor=C,this._languageFeaturesService=y,this._instantiationService=E,this._callOnDispose=new w.DisposableStore,this._callOnModel=new w.DisposableStore,this._callOnDispose.add(C.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(C.onDidChangeModel(()=>this._update())),this._callOnDispose.add(C.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(y.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:C})=>this._trigger(C)))}_trigger(C){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(n.formatDocumentRangesWithSelectedProvider,this.editor,C,2,a.Progress.None,k.CancellationToken.None).catch(L.onUnexpectedError))}};u.ID="editor.contrib.formatOnPaste",u=Te([ge(1,i.ILanguageFeaturesService),ge(2,c.IInstantiationService)],u);class v extends b.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:d.localize(0,null),alias:"Format Document",precondition:o.ContextKeyExpr.and(s.EditorContextKeys.notInCompositeEditor,s.EditorContextKeys.writable,s.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(C,y){return we(this,void 0,void 0,function*(){if(y.hasModel()){const E=C.get(c.IInstantiationService);yield C.get(a.IEditorProgressService).showWhile(E.invokeFunction(n.formatDocumentWithSelectedProvider,y,1,a.Progress.None,k.CancellationToken.None),250)}})}}class f extends b.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:d.localize(1,null),alias:"Format Selection",precondition:o.ContextKeyExpr.and(s.EditorContextKeys.writable,s.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:s.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(C,y){return we(this,void 0,void 0,function*(){if(!y.hasModel())return;const E=C.get(c.IInstantiationService),I=y.getModel(),T=y.getSelections().map(R=>R.isEmpty()?new m.Range(R.startLineNumber,1,R.startLineNumber,I.getLineMaxColumn(R.startLineNumber)):R);yield C.get(a.IEditorProgressService).showWhile(E.invokeFunction(n.formatDocumentRangesWithSelectedProvider,y,T,1,a.Progress.None,k.CancellationToken.None),250)})}}(0,b.registerEditorContribution)(l.ID,l,2),(0,b.registerEditorContribution)(u.ID,u,2),(0,b.registerEditorAction)(v),(0,b.registerEditorAction)(f),h.CommandsRegistry.registerCommand("editor.action.format",p=>we(void 0,void 0,void 0,function*(){const C=p.get(S.ICodeEditorService).getFocusedCodeEditor();if(!C||!C.hasModel())return;const y=p.get(h.ICommandService);C.getSelection().isEmpty()?yield y.executeCommand("editor.action.formatDocument"):yield y.executeCommand("editor.action.formatSelection")}))}),define(J[239],ee([1,0,16,20,11,15,19,153]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;function S(r,d,h,o){return we(this,void 0,void 0,function*(){const a=h.ordered(r).map(u=>Promise.resolve(o(u,r,d)).then(void 0,v=>{(0,L.onUnexpectedExternalError)(v)})),l=yield Promise.all(a);return(0,_.coalesce)(l.flat())})}function g(r,d,h,o){return S(d,h,r,(c,a,l)=>c.provideDefinition(a,l,o))}e.getDefinitionsAtPosition=g;function m(r,d,h,o){return S(d,h,r,(c,a,l)=>c.provideDeclaration(a,l,o))}e.getDeclarationsAtPosition=m;function s(r,d,h,o){return S(d,h,r,(c,a,l)=>c.provideImplementation(a,l,o))}e.getImplementationsAtPosition=s;function t(r,d,h,o){return S(d,h,r,(c,a,l)=>c.provideTypeDefinition(a,l,o))}e.getTypeDefinitionsAtPosition=t;function i(r,d,h,o,c){return S(d,h,r,(a,l,u)=>we(this,void 0,void 0,function*(){const v=yield a.provideReferences(l,u,{includeDeclaration:!0},c);if(!o||!v||v.length!==2)return v;const f=yield a.provideReferences(l,u,{includeDeclaration:!1},c);return f&&f.length===1?f:v}))}e.getReferencesAtPosition=i;function n(r){return we(this,void 0,void 0,function*(){const d=yield r(),h=new b.ReferencesModel(d,""),o=h.references.map(c=>c.link);return h.dispose(),o})}(0,D.registerModelAndPositionCommand)("_executeDefinitionProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=g(o.definitionProvider,d,h,k.CancellationToken.None);return n(()=>c)}),(0,D.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=t(o.typeDefinitionProvider,d,h,k.CancellationToken.None);return n(()=>c)}),(0,D.registerModelAndPositionCommand)("_executeDeclarationProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=m(o.declarationProvider,d,h,k.CancellationToken.None);return n(()=>c)}),(0,D.registerModelAndPositionCommand)("_executeReferenceProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=i(o.referenceProvider,d,h,!1,k.CancellationToken.None);return n(()=>c)}),(0,D.registerModelAndPositionCommand)("_executeImplementationProvider",(r,d,h)=>{const o=r.get(w.ILanguageFeaturesService),c=s(o.implementationProvider,d,h,k.CancellationToken.None);return n(()=>c)})}),define(J[775],ee([1,0,6,2,42,15,32,5,643,13,49,8,34,112,43]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new g.RawContextKey("hasSymbols",!1,(0,S.localize)(0,null)),e.ISymbolNavigationService=(0,s.createDecorator)("ISymbolNavigationService");let r=class{constructor(o,c,a,l){this._editorService=c,this._notificationService=a,this._keybindingService=l,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(o)}reset(){var o,c;this._ctxHasSymbols.reset(),(o=this._currentState)===null||o===void 0||o.dispose(),(c=this._currentMessage)===null||c===void 0||c.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(o){const c=o.parent.parent;if(c.references.length<=1){this.reset();return}this._currentModel=c,this._currentIdx=c.references.indexOf(o),this._ctxHasSymbols.set(!0),this._showMessage();const a=new d(this._editorService),l=a.onDidChange(u=>{if(this._ignoreEditorChange)return;const v=this._editorService.getActiveCodeEditor();if(!v)return;const f=v.getModel(),p=v.getPosition();if(!f||!p)return;let C=!1,y=!1;for(const E of c.references)if((0,L.isEqual)(E.uri,f.uri))C=!0,y=y||b.Range.containsPosition(E.range,p);else if(C)break;(!C||!y)&&this.reset()});this._currentState=(0,k.combinedDisposable)(a,l)}revealNext(o){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const c=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:c.uri,options:{selection:b.Range.collapseToStart(c.range),selectionRevealType:3}},o).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var o;(o=this._currentMessage)===null||o===void 0||o.dispose();const c=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),a=c?(0,S.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,c.getLabel()):(0,S.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(a)}};r=Te([ge(0,g.IContextKeyService),ge(1,w.ICodeEditorService),ge(2,n.INotificationService),ge(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(h,o){return h.get(e.ISymbolNavigationService).revealNext(o)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(h){h.get(e.ISymbolNavigationService).reset()}});let d=class{constructor(o){this._listener=new Map,this._disposables=new k.DisposableStore,this._onDidChange=new _.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(c=>this._onDidChange.fire({editor:o})),o.onDidChangeModelContent(c=>this._onDidChange.fire({editor:o}))))}_onDidRemoveEditor(o){var c;(c=this._listener.get(o))===null||c===void 0||c.dispose(),this._listener.delete(o)}};d=Te([ge(0,w.ICodeEditorService)],d)}),define(J[340],ee([1,0,14,20,11,15,19]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class b{constructor(i,n,r){this.provider=i,this.hover=n,this.ordinal=r}}e.HoverProviderResult=b;function S(t,i,n,r,d){return we(this,void 0,void 0,function*(){try{const h=yield Promise.resolve(t.provideHover(n,r,d));if(h&&s(h))return new b(t,h,i)}catch(h){(0,L.onUnexpectedExternalError)(h)}})}function g(t,i,n,r){const h=t.ordered(i).map((o,c)=>S(o,c,i,n,r));return _.AsyncIterableObject.fromPromises(h).coalesce()}e.getHover=g;function m(t,i,n,r){return g(t,i,n,r).map(d=>d.hover).toPromise()}e.getHoverPromise=m,(0,D.registerModelAndPositionCommand)("_executeHoverProvider",(t,i,n)=>{const r=t.get(w.ILanguageFeaturesService);return m(r.hoverProvider,i,n,k.CancellationToken.None)});function s(t){const i=typeof t.range<"u",n=typeof t.contents<"u"&&t.contents&&t.contents.length>0;return i&&n}}),define(J[240],ee([1,0,7,16,14,61,2,128,12,5,39,340,645,28,52,19]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const d=_.$;class h{constructor(l,u,v,f,p){this.owner=l,this.range=u,this.contents=v,this.isBeforeContent=f,this.ordinal=p}isValidForHoverAnchor(l){return l.type===1&&this.range.startColumn<=l.range.startColumn&&this.range.endColumn>=l.range.endColumn}}e.MarkdownHover=h;let o=e.MarkdownHoverParticipant=class{constructor(l,u,v,f,p){this._editor=l,this._languageService=u,this._openerService=v,this._configurationService=f,this._languageFeaturesService=p,this.hoverOrdinal=3}createLoadingMessage(l){return new h(this,l.range,[new D.MarkdownString().appendText(t.localize(0,null))],!1,2e3)}computeSync(l,u){if(!this._editor.hasModel()||l.type!==1)return[];const v=this._editor.getModel(),f=l.range.startLineNumber,p=v.getLineMaxColumn(f),C=[];let y=1e3;const E=v.getLineLength(f),I=v.getLanguageIdAtPosition(l.range.startLineNumber,l.range.startColumn),T=this._editor.getOption(113),O=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:I});let R=!1;T>=0&&E>T&&l.range.startColumn>=T&&(R=!0,C.push(new h(this,l.range,[{value:t.localize(1,null)}],!1,y++))),!R&&typeof O=="number"&&E>=O&&C.push(new h(this,l.range,[{value:t.localize(2,null)}],!1,y++));let M=!1;for(const N of u){const P=N.range.startLineNumber===f?N.range.startColumn:1,x=N.range.endLineNumber===f?N.range.endColumn:p,F=N.options.hoverMessage;if(!F||(0,D.isEmptyMarkdownString)(F))continue;N.options.beforeContentClassName&&(M=!0);const B=new g.Range(l.range.startLineNumber,P,l.range.startLineNumber,x);C.push(new h(this,B,(0,k.asArray)(F),M,y++))}return C}computeAsync(l,u,v){if(!this._editor.hasModel()||l.type!==1)return L.AsyncIterableObject.EMPTY;const f=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(f))return L.AsyncIterableObject.EMPTY;const p=new S.Position(l.range.startLineNumber,l.range.startColumn);return(0,s.getHover)(this._languageFeaturesService.hoverProvider,f,p,v).filter(C=>!(0,D.isEmptyMarkdownString)(C.hover.contents)).map(C=>{const y=C.hover.range?g.Range.lift(C.hover.range):l.range;return new h(this,y,C.hover.contents,!1,C.ordinal)})}renderHoverParts(l,u){return c(l,u,this._editor,this._languageService,this._openerService)}};e.MarkdownHoverParticipant=o=Te([ge(1,m.ILanguageService),ge(2,n.IOpenerService),ge(3,i.IConfigurationService),ge(4,r.ILanguageFeaturesService)],o);function c(a,l,u,v,f){l.sort((C,y)=>C.ordinal-y.ordinal);const p=new w.DisposableStore;for(const C of l)for(const y of C.contents){if((0,D.isEmptyMarkdownString)(y))continue;const E=d("div.hover-row.markdown-hover"),I=_.append(E,d("div.hover-contents")),T=p.add(new b.MarkdownRenderer({editor:u},v,f));p.add(T.onDidRenderAsync(()=>{I.className="hover-contents code-hover-contents",a.onContentsChanged()}));const O=p.add(T.render(y));I.appendChild(O.element),a.fragment.appendChild(E)}return p}e.renderMarkdownHovers=c}),define(J[776],ee([1,0,2,9,15,237,65,5,24,22,29,50,282,648,71,194,235]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"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 h(R,M,N,P,x){if(R.getLineCount()===1&&R.getLineMaxColumn(1)===1)return[];const F=M.getLanguageConfiguration(R.getLanguageId()).indentationRules;if(!F)return[];for(P=Math.min(P,R.getLineCount());N<=P&&F.unIndentedLinePattern;){const W=R.getLineContent(N);if(!F.unIndentedLinePattern.test(W))break;N++}if(N>P-1)return[];const{tabSize:B,indentSize:V,insertSpaces:K}=R.getOptions(),A=(W,$)=>($=$||1,D.ShiftCommand.shiftIndent(W,W.length+$,B,V,K)),Y=(W,$)=>($=$||1,D.ShiftCommand.unshiftIndent(W,W.length+$,B,V,K)),ie=[];let le;const ne=R.getLineContent(N);let se=ne;if(x!=null){le=x;const W=k.getLeadingWhitespace(ne);se=le+ne.substring(W.length),F.decreaseIndentPattern&&F.decreaseIndentPattern.test(se)&&(le=Y(le),se=le+ne.substring(W.length)),ne!==se&&ie.push(w.EditOperation.replaceMove(new S.Selection(N,1,N,W.length+1),(0,r.normalizeIndentation)(le,V,K)))}else le=k.getLeadingWhitespace(ne);let H=le;F.increaseIndentPattern&&F.increaseIndentPattern.test(se)?(H=A(H),le=A(le)):F.indentNextLinePattern&&F.indentNextLinePattern.test(se)&&(H=A(H)),N++;for(let W=N;W<=P;W++){const $=R.getLineContent(W),Z=k.getLeadingWhitespace($),Q=H+$.substring(Z.length);F.decreaseIndentPattern&&F.decreaseIndentPattern.test(Q)&&(H=Y(H),le=Y(le)),Z!==H&&ie.push(w.EditOperation.replaceMove(new S.Selection(W,1,W,Z.length+1),(0,r.normalizeIndentation)(H,V,K))),!(F.unIndentedLinePattern&&F.unIndentedLinePattern.test($))&&(F.increaseIndentPattern&&F.increaseIndentPattern.test(Q)?(le=A(le),H=le):F.indentNextLinePattern&&F.indentNextLinePattern.test(Q)?H=A(H):H=le)}return ie}e.getReindentEditOperations=h;class o extends L.EditorAction{constructor(){super({id:o.ID,label:i.localize(0,null),alias:"Convert Indentation to Spaces",precondition:g.EditorContextKeys.writable})}run(M,N){const P=N.getModel();if(!P)return;const x=P.getOptions(),F=N.getSelection();if(!F)return;const B=new T(F,x.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[B]),N.pushUndoStop(),P.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=o,o.ID="editor.action.indentationToSpaces";class c extends L.EditorAction{constructor(){super({id:c.ID,label:i.localize(1,null),alias:"Convert Indentation to Tabs",precondition:g.EditorContextKeys.writable})}run(M,N){const P=N.getModel();if(!P)return;const x=P.getOptions(),F=N.getSelection();if(!F)return;const B=new O(F,x.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[B]),N.pushUndoStop(),P.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=c,c.ID="editor.action.indentationToTabs";class a extends L.EditorAction{constructor(M,N,P){super(P),this.insertSpaces=M,this.displaySizeOnly=N}run(M,N){const P=M.get(n.IQuickInputService),x=M.get(s.IModelService),F=N.getModel();if(!F)return;const B=x.getCreationOptions(F.getLanguageId(),F.uri,F.isForSimpleWidget),V=F.getOptions(),K=[1,2,3,4,5,6,7,8].map(Y=>({id:Y.toString(),label:Y.toString(),description:Y===B.tabSize&&Y===V.tabSize?i.localize(2,null):Y===B.tabSize?i.localize(3,null):Y===V.tabSize?i.localize(4,null):void 0})),A=Math.min(F.getOptions().tabSize-1,7);setTimeout(()=>{P.pick(K,{placeHolder:i.localize(5,null),activeItem:K[A]}).then(Y=>{if(Y&&F&&!F.isDisposed()){const ie=parseInt(Y.label,10);this.displaySizeOnly?F.updateOptions({tabSize:ie}):F.updateOptions({tabSize:ie,indentSize:ie,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=a;class l extends a{constructor(){super(!1,!1,{id:l.ID,label:i.localize(6,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=l,l.ID="editor.action.indentUsingTabs";class u extends a{constructor(){super(!0,!1,{id:u.ID,label:i.localize(7,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=u,u.ID="editor.action.indentUsingSpaces";class v extends a{constructor(){super(!0,!0,{id:v.ID,label:i.localize(8,null),alias:"Change Tab Display Size",precondition:void 0})}}e.ChangeTabDisplaySize=v,v.ID="editor.action.changeTabDisplaySize";class f extends L.EditorAction{constructor(){super({id:f.ID,label:i.localize(9,null),alias:"Detect Indentation from Content",precondition:void 0})}run(M,N){const P=M.get(s.IModelService),x=N.getModel();if(!x)return;const F=P.getCreationOptions(x.getLanguageId(),x.uri,x.isForSimpleWidget);x.detectIndentation(F.insertSpaces,F.tabSize)}}e.DetectIndentation=f,f.ID="editor.action.detectIndentation";class p extends L.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:i.localize(10,null),alias:"Reindent Lines",precondition:g.EditorContextKeys.writable})}run(M,N){const P=M.get(m.ILanguageConfigurationService),x=N.getModel();if(!x)return;const F=h(x,P,1,x.getLineCount());F.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,F),N.pushUndoStop())}}e.ReindentLinesAction=p;class C extends L.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:i.localize(11,null),alias:"Reindent Selected Lines",precondition:g.EditorContextKeys.writable})}run(M,N){const P=M.get(m.ILanguageConfigurationService),x=N.getModel();if(!x)return;const F=N.getSelections();if(F===null)return;const B=[];for(const V of F){let K=V.startLineNumber,A=V.endLineNumber;if(K!==A&&V.endColumn===1&&A--,K===1){if(K===A)continue}else K--;const Y=h(x,P,K,A);B.push(...Y)}B.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,B),N.pushUndoStop())}}e.ReindentSelectedLinesAction=C;class y{constructor(M,N){this._initialSelection=N,this._edits=[],this._selectionId=null;for(const P of M)P.range&&typeof P.text=="string"&&this._edits.push(P)}getEditOperations(M,N){for(const x of this._edits)N.addEditOperation(b.Range.lift(x.range),x.text);let P=!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?(P=!0,this._selectionId=N.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(P=!0,this._selectionId=N.trackSelection(this._initialSelection,!1))),P||(this._selectionId=N.trackSelection(this._initialSelection))}computeCursorState(M,N){return N.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=y;let E=e.AutoIndentOnPaste=class{constructor(M,N){this.editor=M,this._languageConfigurationService=N,this.callOnDispose=new _.DisposableStore,this.callOnModel=new _.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 P=this.editor.getModel();if(!P||!P.tokenization.isCheapToTokenize(M.getStartPosition().lineNumber))return;const x=this.editor.getOption(10),{tabSize:F,indentSize:B,insertSpaces:V}=P.getOptions(),K=[],A={shiftIndent:ne=>D.ShiftCommand.shiftIndent(ne,ne.length+1,F,B,V),unshiftIndent:ne=>D.ShiftCommand.unshiftIndent(ne,ne.length+1,F,B,V)};let Y=M.startLineNumber;for(;Y<=M.endLineNumber;){if(this.shouldIgnoreLine(P,Y)){Y++;continue}break}if(Y>M.endLineNumber)return;let ie=P.getLineContent(Y);if(!/\\S/.test(ie.substring(0,M.startColumn-1))){const ne=(0,d.getGoodIndentForLine)(x,P,P.getLanguageId(),Y,A,this._languageConfigurationService);if(ne!==null){const se=k.getLeadingWhitespace(ie),H=t.getSpaceCnt(ne,F),W=t.getSpaceCnt(se,F);if(H!==W){const $=t.generateIndent(H,F,V);K.push({range:new b.Range(Y,1,Y,se.length+1),text:$}),ie=$+ie.substr(se.length)}else{const $=(0,d.getIndentMetadata)(P,Y,this._languageConfigurationService);if($===0||$===8)return}}}const le=Y;for(;Y<M.endLineNumber;){if(!/\\S/.test(P.getLineContent(Y+1))){Y++;continue}break}if(Y!==M.endLineNumber){const ne={tokenization:{getLineTokens:H=>P.tokenization.getLineTokens(H),getLanguageId:()=>P.getLanguageId(),getLanguageIdAtPosition:(H,W)=>P.getLanguageIdAtPosition(H,W)},getLineContent:H=>H===le?ie:P.getLineContent(H)},se=(0,d.getGoodIndentForLine)(x,ne,P.getLanguageId(),Y+1,A,this._languageConfigurationService);if(se!==null){const H=t.getSpaceCnt(se,F),W=t.getSpaceCnt(k.getLeadingWhitespace(P.getLineContent(Y+1)),F);if(H!==W){const $=H-W;for(let Z=Y+1;Z<=M.endLineNumber;Z++){const Q=P.getLineContent(Z),re=k.getLeadingWhitespace(Q),he=t.getSpaceCnt(re,F)+$,de=t.generateIndent(he,F,V);de!==re&&K.push({range:new b.Range(Z,1,Z,re.length+1),text:de})}}}}if(K.length>0){this.editor.pushUndoStop();const ne=new y(K,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",ne),this.editor.pushUndoStop()}}shouldIgnoreLine(M,N){M.tokenization.forceTokenization(N);const P=M.getLineFirstNonWhitespaceColumn(N);if(P===0)return!0;const x=M.tokenization.getLineTokens(N);if(x.getCount()>0){const F=x.findTokenIndexAtOffset(P);if(F>=0&&x.getStandardTokenType(F)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};E.ID="editor.contrib.autoIndentOnPaste",e.AutoIndentOnPaste=E=Te([ge(1,m.ILanguageConfigurationService)],E);function I(R,M,N,P){if(R.getLineCount()===1&&R.getLineMaxColumn(1)===1)return;let x="";for(let B=0;B<N;B++)x+=" ";const F=new RegExp(x,"gi");for(let B=1,V=R.getLineCount();B<=V;B++){let K=R.getLineFirstNonWhitespaceColumn(B);if(K===0&&(K=R.getLineMaxColumn(B)),K===1)continue;const A=new b.Range(B,1,B,K),Y=R.getValueInRange(A),ie=P?Y.replace(/\\t/ig,x):Y.replace(F,"\t");M.addEditOperation(A,ie)}}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 O{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=O,(0,L.registerEditorContribution)(E.ID,E,2),(0,L.registerEditorAction)(o),(0,L.registerEditorAction)(c),(0,L.registerEditorAction)(l),(0,L.registerEditorAction)(u),(0,L.registerEditorAction)(v),(0,L.registerEditorAction)(f),(0,L.registerEditorAction)(p),(0,L.registerEditorAction)(C)}),define(J[777],ee([1,0,15,197,22,654]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class w extends _.EditorAction{constructor(){super({id:"expandLineSelection",label:D.localize(0,null),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:L.EditorContextKeys.textInputFocus,primary:2090}})}run(S,g,m){if(m=m||{},!g.hasModel())return;const s=g._getViewModel();s.model.pushStackElement(),s.setCursorStates(m.source,3,k.CursorMoveCommands.expandLineSelection(s,s.getCursorStates())),s.revealPrimaryCursor(m.source,!0)}}e.ExpandLineSelectionAction=w,(0,_.registerEditorAction)(w)}),define(J[778],ee([1,0,58,184,15,120,468,238,65,12,5,24,22,526,753,527,655,30,29]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,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 c extends L.EditorAction{constructor(Z,Q){super(Q),this.down=Z}run(Z,Q){if(!Q.hasModel())return;const re=Q.getSelections().map((de,ue)=>({selection:de,index:ue,ignore:!1}));re.sort((de,ue)=>m.Range.compareRangesUsingStarts(de.selection,ue.selection));let ce=re[0];for(let de=1;de<re.length;de++){const ue=re[de];ce.selection.endLineNumber===ue.selection.startLineNumber&&(ce.index<ue.index?ue.ignore=!0:(ce.ignore=!0,ce=ue))}const he=[];for(const de of re)he.push(new i.CopyLinesCommand(de.selection,this.down,de.ignore));Q.pushUndoStop(),Q.executeCommands(this.id,he),Q.pushUndoStop()}}class a extends c{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:d.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:h.MenuId.MenubarSelectionMenu,group:"2_line",title:d.localize(1,null),order:1}})}}class l extends c{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:d.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:h.MenuId.MenubarSelectionMenu,group:"2_line",title:d.localize(3,null),order:2}})}}class u extends L.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:d.localize(4,null),alias:"Duplicate Selection",precondition:t.EditorContextKeys.writable,menuOpts:{menuId:h.MenuId.MenubarSelectionMenu,group:"2_line",title:d.localize(5,null),order:5}})}run(Z,Q,re){if(!Q.hasModel())return;const ce=[],he=Q.getSelections(),de=Q.getModel();for(const ue of he)if(ue.isEmpty())ce.push(new i.CopyLinesCommand(ue,!0));else{const q=new s.Selection(ue.endLineNumber,ue.endColumn,ue.endLineNumber,ue.endColumn);ce.push(new D.ReplaceCommandThatSelectsText(q,de.getValueInRange(ue)))}Q.pushUndoStop(),Q.executeCommands(this.id,ce),Q.pushUndoStop()}}e.DuplicateSelectionAction=u;class v extends L.EditorAction{constructor(Z,Q){super(Q),this.down=Z}run(Z,Q){const re=Z.get(o.ILanguageConfigurationService),ce=[],he=Q.getSelections()||[],de=Q.getOption(10);for(const ue of he)ce.push(new n.MoveLinesCommand(ue,this.down,de,re));Q.pushUndoStop(),Q.executeCommands(this.id,ce),Q.pushUndoStop()}}class f extends v{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:d.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:h.MenuId.MenubarSelectionMenu,group:"2_line",title:d.localize(7,null),order:3}})}}class p extends v{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:d.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:h.MenuId.MenubarSelectionMenu,group:"2_line",title:d.localize(9,null),order:4}})}}class C extends L.EditorAction{constructor(Z,Q){super(Q),this.descending=Z}run(Z,Q){const re=Q.getSelections()||[];for(const he of re)if(!r.SortLinesCommand.canRun(Q.getModel(),he,this.descending))return;const ce=[];for(let he=0,de=re.length;he<de;he++)ce[he]=new r.SortLinesCommand(re[he],this.descending);Q.pushUndoStop(),Q.executeCommands(this.id,ce),Q.pushUndoStop()}}e.AbstractSortLinesAction=C;class y extends C{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:d.localize(10,null),alias:"Sort Lines Ascending",precondition:t.EditorContextKeys.writable})}}e.SortLinesAscendingAction=y;class E extends C{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:d.localize(11,null),alias:"Sort Lines Descending",precondition:t.EditorContextKeys.writable})}}e.SortLinesDescendingAction=E;class I extends L.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:d.localize(12,null),alias:"Delete Duplicate Lines",precondition:t.EditorContextKeys.writable})}run(Z,Q){if(!Q.hasModel())return;const re=Q.getModel();if(re.getLineCount()===1&&re.getLineMaxColumn(1)===1)return;const ce=[],he=[];let de=0;for(const ue of Q.getSelections()){const q=new Set,z=[];for(let G=ue.startLineNumber;G<=ue.endLineNumber;G++){const ae=re.getLineContent(G);q.has(ae)||(z.push(ae),q.add(ae))}const U=new s.Selection(ue.startLineNumber,1,ue.endLineNumber,re.getLineMaxColumn(ue.endLineNumber)),X=ue.startLineNumber-de,te=new s.Selection(X,1,X+z.length-1,z[z.length-1].length);ce.push(S.EditOperation.replace(U,z.join(`\n`))),he.push(te),de+=ue.endLineNumber-ue.startLineNumber+1-z.length}Q.pushUndoStop(),Q.executeEdits(this.id,ce,he),Q.pushUndoStop()}}e.DeleteDuplicateLinesAction=I;class T extends L.EditorAction{constructor(){super({id:T.ID,label:d.localize(13,null),alias:"Trim Trailing Whitespace",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2089,2102),weight:100}})}run(Z,Q,re){let ce=[];re.reason==="auto-save"&&(ce=(Q.getSelections()||[]).map(ue=>new g.Position(ue.positionLineNumber,ue.positionColumn)));const he=Q.getSelection();if(he===null)return;const de=new w.TrimTrailingWhitespaceCommand(he,ce);Q.pushUndoStop(),Q.executeCommands(this.id,[de]),Q.pushUndoStop()}}e.TrimTrailingWhitespaceAction=T,T.ID="editor.action.trimTrailingWhitespace";class O extends L.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:d.localize(14,null),alias:"Delete Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:3113,weight:100}})}run(Z,Q){if(!Q.hasModel())return;const re=this._getLinesToRemove(Q),ce=Q.getModel();if(ce.getLineCount()===1&&ce.getLineMaxColumn(1)===1)return;let he=0;const de=[],ue=[];for(let q=0,z=re.length;q<z;q++){const U=re[q];let X=U.startLineNumber,te=U.endLineNumber,G=1,ae=ce.getLineMaxColumn(te);te<ce.getLineCount()?(te+=1,ae=1):X>1&&(X-=1,G=ce.getLineMaxColumn(X)),de.push(S.EditOperation.replace(new s.Selection(X,G,te,ae),"")),ue.push(new s.Selection(X-he,U.positionColumn,X-he,U.positionColumn)),he+=U.endLineNumber-U.startLineNumber+1}Q.pushUndoStop(),Q.executeEdits(this.id,de,ue),Q.pushUndoStop()}_getLinesToRemove(Z){const Q=Z.getSelections().map(he=>{let de=he.endLineNumber;return he.startLineNumber<he.endLineNumber&&he.endColumn===1&&(de-=1),{startLineNumber:he.startLineNumber,selectionStartColumn:he.selectionStartColumn,endLineNumber:de,positionColumn:he.positionColumn}});Q.sort((he,de)=>he.startLineNumber===de.startLineNumber?he.endLineNumber-de.endLineNumber:he.startLineNumber-de.startLineNumber);const re=[];let ce=Q[0];for(let he=1;he<Q.length;he++)ce.endLineNumber+1>=Q[he].startLineNumber?ce.endLineNumber=Q[he].endLineNumber:(re.push(ce),ce=Q[he]);return re.push(ce),re}}e.DeleteLinesAction=O;class R extends L.EditorAction{constructor(){super({id:"editor.action.indentLines",label:d.localize(15,null),alias:"Indent Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2142,weight:100}})}run(Z,Q){const re=Q._getViewModel();re&&(Q.pushUndoStop(),Q.executeCommands(this.id,b.TypeOperations.indent(re.cursorConfig,Q.getModel(),Q.getSelections())),Q.pushUndoStop())}}e.IndentLinesAction=R;class M extends L.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:d.localize(16,null),alias:"Outdent Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2140,weight:100}})}run(Z,Q){k.CoreEditingCommands.Outdent.runEditorCommand(Z,Q,null)}}class N extends L.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:d.localize(17,null),alias:"Insert Line Above",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:3075,weight:100}})}run(Z,Q){const re=Q._getViewModel();re&&(Q.pushUndoStop(),Q.executeCommands(this.id,b.TypeOperations.lineInsertBefore(re.cursorConfig,Q.getModel(),Q.getSelections())))}}e.InsertLineBeforeAction=N;class P extends L.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:d.localize(18,null),alias:"Insert Line Below",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2051,weight:100}})}run(Z,Q){const re=Q._getViewModel();re&&(Q.pushUndoStop(),Q.executeCommands(this.id,b.TypeOperations.lineInsertAfter(re.cursorConfig,Q.getModel(),Q.getSelections())))}}e.InsertLineAfterAction=P;class x extends L.EditorAction{run(Z,Q){if(!Q.hasModel())return;const re=Q.getSelection(),ce=this._getRangesToDelete(Q),he=[];for(let q=0,z=ce.length-1;q<z;q++){const U=ce[q],X=ce[q+1];m.Range.intersectRanges(U,X)===null?he.push(U):ce[q+1]=m.Range.plusRange(U,X)}he.push(ce[ce.length-1]);const de=this._getEndCursorState(re,he),ue=he.map(q=>S.EditOperation.replace(q,""));Q.pushUndoStop(),Q.executeEdits(this.id,ue,de),Q.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=x;class F extends x{constructor(){super({id:"deleteAllLeft",label:d.localize(19,null),alias:"Delete All Left",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(Z,Q){let re=null;const ce=[];let he=0;return Q.forEach(de=>{let ue;if(de.endColumn===1&&he>0){const q=de.startLineNumber-he;ue=new s.Selection(q,de.startColumn,q,de.startColumn)}else ue=new s.Selection(de.startLineNumber,de.startColumn,de.startLineNumber,de.startColumn);he+=de.endLineNumber-de.startLineNumber,de.intersectRanges(Z)?re=ue:ce.push(ue)}),re&&ce.unshift(re),ce}_getRangesToDelete(Z){const Q=Z.getSelections();if(Q===null)return[];let re=Q;const ce=Z.getModel();return ce===null?[]:(re.sort(m.Range.compareRangesUsingStarts),re=re.map(he=>{if(he.isEmpty())if(he.startColumn===1){const de=Math.max(1,he.startLineNumber-1),ue=he.startLineNumber===1?1:ce.getLineContent(de).length+1;return new m.Range(de,ue,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)}),re)}}e.DeleteAllLeftAction=F;class B extends x{constructor(){super({id:"deleteAllRight",label:d.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(Z,Q){let re=null;const ce=[];for(let he=0,de=Q.length,ue=0;he<de;he++){const q=Q[he],z=new s.Selection(q.startLineNumber-ue,q.startColumn,q.startLineNumber-ue,q.startColumn);q.intersectRanges(Z)?re=z:ce.push(z)}return re&&ce.unshift(re),ce}_getRangesToDelete(Z){const Q=Z.getModel();if(Q===null)return[];const re=Z.getSelections();if(re===null)return[];const ce=re.map(he=>{if(he.isEmpty()){const de=Q.getLineMaxColumn(he.startLineNumber);return he.startColumn===de?new m.Range(he.startLineNumber,he.startColumn,he.startLineNumber+1,1):new m.Range(he.startLineNumber,he.startColumn,he.startLineNumber,de)}return he});return ce.sort(m.Range.compareRangesUsingStarts),ce}}e.DeleteAllRightAction=B;class V extends L.EditorAction{constructor(){super({id:"editor.action.joinLines",label:d.localize(21,null),alias:"Join Lines",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(Z,Q){const re=Q.getSelections();if(re===null)return;let ce=Q.getSelection();if(ce===null)return;re.sort(m.Range.compareRangesUsingStarts);const he=[],de=re.reduce((te,G)=>te.isEmpty()?te.endLineNumber===G.startLineNumber?(ce.equalsSelection(te)&&(ce=G),G):G.startLineNumber>te.endLineNumber+1?(he.push(te),G):new s.Selection(te.startLineNumber,te.startColumn,G.endLineNumber,G.endColumn):G.startLineNumber>te.endLineNumber?(he.push(te),G):new s.Selection(te.startLineNumber,te.startColumn,G.endLineNumber,G.endColumn));he.push(de);const ue=Q.getModel();if(ue===null)return;const q=[],z=[];let U=ce,X=0;for(let te=0,G=he.length;te<G;te++){const ae=he[te],fe=ae.startLineNumber,Ce=1;let Se=0,ye,Ie;const Ee=ue.getLineContent(ae.endLineNumber).length-ae.endColumn;if(ae.isEmpty()||ae.startLineNumber===ae.endLineNumber){const Pe=ae.getStartPosition();Pe.lineNumber<ue.getLineCount()?(ye=fe+1,Ie=ue.getLineMaxColumn(ye)):(ye=Pe.lineNumber,Ie=ue.getLineMaxColumn(Pe.lineNumber))}else ye=ae.endLineNumber,Ie=ue.getLineMaxColumn(ye);let ke=ue.getLineContent(fe);for(let Pe=fe+1;Pe<=ye;Pe++){const _e=ue.getLineContent(Pe),me=ue.getLineFirstNonWhitespaceColumn(Pe);if(me>=1){let oe=!0;ke===""&&(oe=!1),oe&&(ke.charAt(ke.length-1)===" "||ke.charAt(ke.length-1)==="\t")&&(oe=!1,ke=ke.replace(/[\\s\\uFEFF\\xA0]+$/g," "));const pe=_e.substr(me-1);ke+=(oe?" ":"")+pe,oe?Se=pe.length+1:Se=pe.length}else Se=0}const Ae=new m.Range(fe,Ce,ye,Ie);if(!Ae.isEmpty()){let Pe;ae.isEmpty()?(q.push(S.EditOperation.replace(Ae,ke)),Pe=new s.Selection(Ae.startLineNumber-X,ke.length-Se+1,fe-X,ke.length-Se+1)):ae.startLineNumber===ae.endLineNumber?(q.push(S.EditOperation.replace(Ae,ke)),Pe=new s.Selection(ae.startLineNumber-X,ae.startColumn,ae.endLineNumber-X,ae.endColumn)):(q.push(S.EditOperation.replace(Ae,ke)),Pe=new s.Selection(ae.startLineNumber-X,ae.startColumn,ae.startLineNumber-X,ke.length-Ee)),m.Range.intersectRanges(Ae,ce)!==null?U=Pe:z.push(Pe)}X+=Ae.endLineNumber-Ae.startLineNumber}z.unshift(U),Q.pushUndoStop(),Q.executeEdits(this.id,q,z),Q.pushUndoStop()}}e.JoinLinesAction=V;class K extends L.EditorAction{constructor(){super({id:"editor.action.transpose",label:d.localize(22,null),alias:"Transpose characters around the cursor",precondition:t.EditorContextKeys.writable})}run(Z,Q){const re=Q.getSelections();if(re===null)return;const ce=Q.getModel();if(ce===null)return;const he=[];for(let de=0,ue=re.length;de<ue;de++){const q=re[de];if(!q.isEmpty())continue;const z=q.getStartPosition(),U=ce.getLineMaxColumn(z.lineNumber);if(z.column>=U){if(z.lineNumber===ce.getLineCount())continue;const X=new m.Range(z.lineNumber,Math.max(1,z.column-1),z.lineNumber+1,1),te=ce.getValueInRange(X).split("").reverse().join("");he.push(new D.ReplaceCommand(new s.Selection(z.lineNumber,Math.max(1,z.column-1),z.lineNumber+1,1),te))}else{const X=new m.Range(z.lineNumber,Math.max(1,z.column-1),z.lineNumber,z.column+1),te=ce.getValueInRange(X).split("").reverse().join("");he.push(new D.ReplaceCommandThatPreservesSelection(X,te,new s.Selection(z.lineNumber,z.column+1,z.lineNumber,z.column+1)))}}Q.pushUndoStop(),Q.executeCommands(this.id,he),Q.pushUndoStop()}}e.TransposeAction=K;class A extends L.EditorAction{run(Z,Q){const re=Q.getSelections();if(re===null)return;const ce=Q.getModel();if(ce===null)return;const he=Q.getOption(126),de=[];for(const ue of re)if(ue.isEmpty()){const q=ue.getStartPosition(),z=Q.getConfiguredWordAtPosition(q);if(!z)continue;const U=new m.Range(q.lineNumber,z.startColumn,q.lineNumber,z.endColumn),X=ce.getValueInRange(U);de.push(S.EditOperation.replace(U,this._modifyText(X,he)))}else{const q=ce.getValueInRange(ue);de.push(S.EditOperation.replace(ue,this._modifyText(q,he)))}Q.pushUndoStop(),Q.executeEdits(this.id,de),Q.pushUndoStop()}}e.AbstractCaseAction=A;class Y extends A{constructor(){super({id:"editor.action.transformToUppercase",label:d.localize(23,null),alias:"Transform to Uppercase",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Q){return Z.toLocaleUpperCase()}}e.UpperCaseAction=Y;class ie extends A{constructor(){super({id:"editor.action.transformToLowercase",label:d.localize(24,null),alias:"Transform to Lowercase",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Q){return Z.toLocaleLowerCase()}}e.LowerCaseAction=ie;class le{constructor(Z,Q){this._pattern=Z,this._flags=Q,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 ne extends A{constructor(){super({id:"editor.action.transformToTitlecase",label:d.localize(25,null),alias:"Transform to Title Case",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Q){const re=ne.titleBoundary.get();return re?Z.toLocaleLowerCase().replace(re,ce=>ce.toLocaleUpperCase()):Z}}e.TitleCaseAction=ne,ne.titleBoundary=new le("(^|[^\\\\p{L}\\\\p{N}\']|((^|\\\\P{L})\'))\\\\p{L}","gmu");class se extends A{constructor(){super({id:"editor.action.transformToSnakecase",label:d.localize(26,null),alias:"Transform to Snake Case",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Q){const re=se.caseBoundary.get(),ce=se.singleLetters.get();return!re||!ce?Z:Z.replace(re,"$1_$2").replace(ce,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=se,se.caseBoundary=new le("(\\\\p{Ll})(\\\\p{Lu})","gmu"),se.singleLetters=new le("(\\\\p{Lu}|\\\\p{N})(\\\\p{Lu})(\\\\p{Ll})","gmu");class H extends A{constructor(){super({id:"editor.action.transformToCamelcase",label:d.localize(27,null),alias:"Transform to Camel Case",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Q){const re=H.wordBoundary.get();if(!re)return Z;const ce=Z.split(re);return ce.shift()+ce.map(de=>de.substring(0,1).toLocaleUpperCase()+de.substring(1)).join("")}}e.CamelCaseAction=H,H.wordBoundary=new le("[_\\\\s-]","gm");class W extends A{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(Q=>Q.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:d.localize(28,null),alias:"Transform to Kebab Case",precondition:t.EditorContextKeys.writable})}_modifyText(Z,Q){const re=W.caseBoundary.get(),ce=W.singleLetters.get(),he=W.underscoreBoundary.get();return!re||!ce||!he?Z:Z.replace(he,"$1-$3").replace(re,"$1-$2").replace(ce,"$1-$2").toLocaleLowerCase()}}e.KebabCaseAction=W,W.caseBoundary=new le("(\\\\p{Ll})(\\\\p{Lu})","gmu"),W.singleLetters=new le("(\\\\p{Lu}|\\\\p{N})(\\\\p{Lu}\\\\p{Ll})","gmu"),W.underscoreBoundary=new le("(\\\\S)(_)(\\\\S)","gm"),(0,L.registerEditorAction)(a),(0,L.registerEditorAction)(l),(0,L.registerEditorAction)(u),(0,L.registerEditorAction)(f),(0,L.registerEditorAction)(p),(0,L.registerEditorAction)(y),(0,L.registerEditorAction)(E),(0,L.registerEditorAction)(I),(0,L.registerEditorAction)(T),(0,L.registerEditorAction)(O),(0,L.registerEditorAction)(R),(0,L.registerEditorAction)(M),(0,L.registerEditorAction)(N),(0,L.registerEditorAction)(P),(0,L.registerEditorAction)(F),(0,L.registerEditorAction)(B),(0,L.registerEditorAction)(V),(0,L.registerEditorAction)(K),(0,L.registerEditorAction)(Y),(0,L.registerEditorAction)(ie),se.caseBoundary.isSupported()&&se.singleLetters.isSupported()&&(0,L.registerEditorAction)(se),H.wordBoundary.isSupported()&&(0,L.registerEditorAction)(H),ne.titleBoundary.isSupported()&&(0,L.registerEditorAction)(ne),W.isSupported()&&(0,L.registerEditorAction)(W)}),define(J[779],ee([1,0,2,15]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class L extends _.Disposable{constructor(w){super(),this._editor=w,this._register(this._editor.onMouseDown(b=>{const S=this._editor.getOption(113);S>=0&&b.target.type===6&&b.target.position.column>=S&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}L.ID="editor.contrib.longLinesHelper",(0,k.registerEditorContribution)(L.ID,L,2)}),define(J[185],ee([1,0,48,14,2,15,5,658,13,441]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let g=e.MessageController=class ci{static get(i){return i.getContribution(ci.ID)}constructor(i,n){this._messageWidget=new L.MutableDisposable,this._messageListeners=new L.DisposableStore,this._editor=i,this._visible=ci.MESSAGE_VISIBLE.bindTo(n)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(i,n){(0,_.alert)(i),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new s(this._editor,n,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(d=>{d.target.position&&(r?r.containsPosition(d.target.position)||this.closeMessage():r=new w.Range(n.lineNumber-3,1,d.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(s.fadeOut(this._messageWidget.value))}};g.ID="editor.contrib.messageController",g.MESSAGE_VISIBLE=new S.RawContextKey("messageVisible",!1,b.localize(0,null)),e.MessageController=g=Te([ge(1,S.IContextKeyService)],g);const m=D.EditorCommand.bindToContribution(g.get);(0,D.registerEditorCommand)(new m({id:"leaveEditorMessage",precondition:g.MESSAGE_VISIBLE,handler:t=>t.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class s{static fadeOut(i){const n=()=>{i.dispose(),clearTimeout(r),i.getDomNode().removeEventListener("animationend",n)},r=setTimeout(n,110);return i.getDomNode().addEventListener("animationend",n),i.getDomNode().classList.add("fadeOut"),{dispose:n}}constructor(i,{lineNumber:n,column:r},d){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=i,this._editor.revealLinesInCenterIfOutsideViewport(n,n,0),this._position={lineNumber:n,column:r},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const h=document.createElement("div");h.classList.add("anchor","top"),this._domNode.appendChild(h);const o=document.createElement("div");o.classList.add("message"),o.textContent=d,this._domNode.appendChild(o);const c=document.createElement("div");c.classList.add("anchor","below"),this._domNode.appendChild(c),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)(g.ID,g,4)}),define(J[780],ee([1,0,2,15,185,665]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyMessageController=void 0;class w extends _.Disposable{constructor(S){super(),this.editor=S,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const S=L.MessageController.get(this.editor);S&&this.editor.hasModel()&&(this.editor.isSimpleWidget?S.showMessage(D.localize(0,null),this.editor.getPosition()):S.showMessage(D.localize(1,null),this.editor.getPosition()))}}e.ReadOnlyMessageController=w,w.ID="editor.contrib.readOnlyMessageController",(0,k.registerEditorContribution)(w.ID,w,2)}),define(J[781],ee([1,0,16,20,11,15,12,5,24,22,285,528,668,30,25,19,62,18,21]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=e.SmartSelectController=void 0;class c{constructor(C,y){this.index=C,this.ranges=y}mov(C){const y=this.index+(C?1:-1);if(y<0||y>=this.ranges.length)return this;const E=new c(y,this.ranges);return E.ranges[y].equalsRange(this.ranges[this.index])?E.mov(C):E}}let a=e.SmartSelectController=class Wi{static get(C){return C.getContribution(Wi.ID)}constructor(C,y){this._editor=C,this._languageFeaturesService=y,this._ignoreSelection=!1}dispose(){var C;(C=this._selectionListener)===null||C===void 0||C.dispose()}run(C){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const y=this._editor.getSelections(),E=this._editor.getModel();if(this._state||(yield f(this._languageFeaturesService.selectionRangeProvider,E,y.map(T=>T.getPosition()),this._editor.getOption(109),k.CancellationToken.None).then(T=>{var O;if(!(!_.isNonEmptyArray(T)||T.length!==y.length)&&!(!this._editor.hasModel()||!_.equals(this._editor.getSelections(),y,(R,M)=>R.equalsSelection(M)))){for(let R=0;R<T.length;R++)T[R]=T[R].filter(M=>M.containsPosition(y[R].getStartPosition())&&M.containsPosition(y[R].getEndPosition())),T[R].unshift(y[R]);this._state=T.map(R=>new c(0,R)),(O=this._selectionListener)===null||O===void 0||O.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(C));const I=this._state.map(T=>S.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",e.SmartSelectController=a=Te([ge(1,r.ILanguageFeaturesService)],a);class l extends D.EditorAction{constructor(C,y){super(y),this._forward=C}run(C,y){return we(this,void 0,void 0,function*(){const E=a.get(y);E&&(yield E.run(this._forward))})}}class u extends l{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:t.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:g.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}})}}n.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class v extends l{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:t.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:g.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)(v);function f(p,C,y,E,I){return we(this,void 0,void 0,function*(){const T=p.all(C).concat(new s.WordSelectionRangeProvider);T.length===1&&T.unshift(new m.BracketSelectionRangeProvider);const O=[],R=[];for(const M of T)O.push(Promise.resolve(M.provideSelectionRanges(C,y,I)).then(N=>{if(_.isNonEmptyArray(N)&&N.length===y.length)for(let P=0;P<y.length;P++){R[P]||(R[P]=[]);for(const x of N[P])b.Range.isIRange(x.range)&&b.Range.containsPosition(x.range,y[P])&&R[P].push(b.Range.lift(x.range))}},L.onUnexpectedExternalError));return yield Promise.all(O),R.map(M=>{if(M.length===0)return[];M.sort((F,B)=>w.Position.isBefore(F.getStartPosition(),B.getStartPosition())?1:w.Position.isBefore(B.getStartPosition(),F.getStartPosition())||w.Position.isBefore(F.getEndPosition(),B.getEndPosition())?-1:w.Position.isBefore(B.getEndPosition(),F.getEndPosition())?1:0);const N=[];let P;for(const F of M)(!P||b.Range.containsRange(F,P)&&!b.Range.equalsRange(F,P))&&(N.push(F),P=F);if(!E.selectLeadingAndTrailingWhitespace)return N;const x=[N[0]];for(let F=1;F<N.length;F++){const B=N[F-1],V=N[F];if(V.startLineNumber!==B.startLineNumber||V.endLineNumber!==B.endLineNumber){const K=new b.Range(B.startLineNumber,C.getLineFirstNonWhitespaceColumn(B.startLineNumber),B.endLineNumber,C.getLineLastNonWhitespaceColumn(B.endLineNumber));K.containsRange(B)&&!K.equalsRange(B)&&V.containsRange(K)&&!V.equalsRange(K)&&x.push(K);const A=new b.Range(B.startLineNumber,1,B.endLineNumber,C.getLineMaxColumn(B.endLineNumber));A.containsRange(B)&&!A.equalsRange(K)&&V.containsRange(A)&&!V.equalsRange(A)&&x.push(A)}x.push(V)}return x})})}e.provideSelectionRanges=f,n.CommandsRegistry.registerCommand("_executeSelectionRangeProvider",function(p,...C){return we(this,void 0,void 0,function*(){const[y,E]=C;(0,h.assertType)(o.URI.isUri(y));const I=p.get(r.ILanguageFeaturesService).selectionRangeProvider,T=yield p.get(d.ITextModelService).createModelReference(y);try{return f(I,T.object.textEditorModel,E,{selectLeadingAndTrailingWhitespace:!0},k.CancellationToken.None)}finally{T.dispose()}})})}),define(J[782],ee([1,0,20,64,53,2,15,32,5,19,286,129,336,287,97,8]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestInlineCompletions=void 0;class d{constructor(l,u,v,f,p,C){this.range=l,this.insertText=u,this.filterText=v,this.additionalTextEdits=f,this.command=p,this.completion=C}}let h=class extends D.RefCountedDisposable{constructor(l,u,v,f,p,C){super(p.disposable),this.model=l,this.line=u,this.word=v,this.completionModel=f,this._suggestMemoryService=C}canBeReused(l,u,v){return this.model===l&&this.line===u&&this.word.word.length>0&&this.word.startColumn===v.startColumn&&this.word.endColumn<v.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var l;const u=[],{items:v}=this.completionModel,f=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},v),p=L.Iterable.slice(v,f),C=L.Iterable.slice(v,0,f);let y=5;for(const E of L.Iterable.concat(p,C)){if(E.score===k.FuzzyScore.Default)continue;const I=new S.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 d(I,T,(l=E.filterTextLow)!==null&&l!==void 0?l:E.labelLow,E.completion.additionalTextEdits,E.completion.command,E)),y--\x3e=0&&E.resolve(_.CancellationToken.None)}return u}};h=Te([ge(5,t.ISuggestMemoryService)],h);let o=e.SuggestInlineCompletions=class{constructor(l,u,v,f){this._getEditorOption=l,this._languageFeatureService=u,this._clipboardService=v,this._suggestMemoryService=f}provideInlineCompletions(l,u,v,f){var p;return we(this,void 0,void 0,function*(){if(v.selectedSuggestionInfo)return;const C=this._getEditorOption(86,l);if(s.QuickSuggestionsOptions.isAllOff(C))return;l.tokenization.tokenizeIfCheap(u.lineNumber);const y=l.tokenization.getLineTokens(u.lineNumber),E=y.getStandardTokenType(y.findTokenIndexAtOffset(Math.max(u.column-1-1,0)));if(s.QuickSuggestionsOptions.valueFor(C,E)!=="inline")return;let I=l.getWordAtPosition(u),T;if(I?.word||(T=this._getTriggerCharacterInfo(l,u)),!I?.word&&!T||(I||(I=l.getWordUntilPosition(u)),I.endColumn!==u.column))return;let O;const R=l.getValueInRange(new S.Range(u.lineNumber,1,u.lineNumber,u.column));if(!T&&(!((p=this._lastResult)===null||p===void 0)&&p.canBeReused(l,u.lineNumber,I))){const M=new m.LineContext(R,u.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=M,this._lastResult.acquire(),O=this._lastResult}else{const M=yield(0,s.provideSuggestionItems)(this._languageFeatureService.completionProvider,l,u,new s.CompletionOptions(void 0,void 0,T?.providers),T&&{triggerKind:1,triggerCharacter:T.ch},f);let N;M.needsClipboard&&(N=yield this._clipboardService.readText());const P=new m.CompletionModel(M.items,u.column,new m.LineContext(R,0),i.WordDistance.None,this._getEditorOption(114,l),this._getEditorOption(108,l),{boostFullMatch:!1,firstMatchCanBeWeak:!1},N);O=new h(l,u.lineNumber,I,P,M,this._suggestMemoryService)}return this._lastResult=O,O})}handleItemDidShow(l,u){u.completion.resolve(_.CancellationToken.None)}freeInlineCompletions(l){l.release()}_getTriggerCharacterInfo(l,u){var v;const f=l.getValueInRange(S.Range.fromPositions({lineNumber:u.lineNumber,column:u.column-1},u)),p=new Set;for(const C of this._languageFeatureService.completionProvider.all(l))!((v=C.triggerCharacters)===null||v===void 0)&&v.includes(f)&&p.add(C);if(p.size!==0)return{providers:p,ch:f}}};e.SuggestInlineCompletions=o=Te([ge(1,g.ILanguageFeaturesService),ge(2,n.IClipboardService),ge(3,t.ISuggestMemoryService)],o);let c=class Pt{constructor(l,u,v,f){if(++Pt._counter===1){const p=f.createInstance(o,(C,y)=>{var E;return((E=v.listCodeEditors().find(T=>T.getModel()===y))!==null&&E!==void 0?E:l).getOption(C)});Pt._disposable=u.inlineCompletionsProvider.register("*",p)}}dispose(){var l;--Pt._counter===0&&((l=Pt._disposable)===null||l===void 0||l.dispose(),Pt._disposable=void 0)}};c._counter=0,c=Te([ge(1,g.ILanguageFeaturesService),ge(2,b.ICodeEditorService),ge(3,r.IInstantiationService)],c),(0,w.registerEditorContribution)("suggest.inlineCompletionsProvider",c,0)}),define(J[783],ee([1,0,56,15,680]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends k.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:L.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(b,S){if(!S.hasModel())return;const g=S.getModel();g.tokenization.resetTokenization();const m=new _.StopWatch(!0);g.tokenization.forceTokenization(g.getLineCount()),m.stop(),console.log(`tokenization took ${m.elapsed()}`)}}(0,k.registerEditorAction)(D)}),define(J[784],ee([1,0,2,42,15,32,682,154]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const S="ignoreUnusualLineTerminators";function g(t,i,n){t.setModelProperty(i.uri,S,n)}function m(t,i){return t.getModelProperty(i.uri,S)}let s=e.UnusualLineTerminatorsDetector=class extends _.Disposable{constructor(i,n,r){super(),this._editor=i,this._dialogService=n,this._codeEditorService=r,this._isPresentingDialog=!1,this._config=this._editor.getOption(122),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(122)&&(this._config=this._editor.getOption(122),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(d=>{d.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return we(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(88))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){g(this._codeEditorService,i,!0);return}i.removeUnusualLineTerminators(this._editor.getSelections())})}};s.ID="editor.contrib.unusualLineTerminatorsDetector",e.UnusualLineTerminatorsDetector=s=Te([ge(1,b.IDialogService),ge(2,D.ICodeEditorService)],s),(0,L.registerEditorContribution)(s.ID,s,1)}),define(J[341],ee([1,0,15,120,41,66,173,139,12,5,24,22,29,685,91,13,321]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"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 h extends _.EditorCommand{constructor(H){super(H),this._inSelectionMode=H.inSelectionMode,this._wordNavigationType=H.wordNavigationType}runEditorCommand(H,W,$){if(!W.hasModel())return;const Z=(0,b.getMapForWordSeparators)(W.getOption(126)),Q=W.getModel(),ce=W.getSelections().map(he=>{const de=new S.Position(he.positionLineNumber,he.positionColumn),ue=this._move(Z,Q,de,this._wordNavigationType);return this._moveTo(he,ue,this._inSelectionMode)});if(Q.pushStackElement(),W._getViewModel().setCursorStates("moveWordCommand",3,ce.map(he=>D.CursorState.fromModelSelection(he))),ce.length===1){const he=new S.Position(ce[0].positionLineNumber,ce[0].positionColumn);W.revealPosition(he,0)}}_moveTo(H,W,$){return $?new m.Selection(H.selectionStartLineNumber,H.selectionStartColumn,W.lineNumber,W.column):new m.Selection(W.lineNumber,W.column,W.lineNumber,W.column)}}e.MoveWordCommand=h;class o extends h{_move(H,W,$,Z){return w.WordOperations.moveWordLeft(H,W,$,Z)}}e.WordLeftCommand=o;class c extends h{_move(H,W,$,Z){return w.WordOperations.moveWordRight(H,W,$,Z)}}e.WordRightCommand=c;class a extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=a;class l extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=l;class u extends o{constructor(){var H;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(n.CONTEXT_ACCESSIBILITY_MODE_ENABLED,d.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:2063,mac:{primary:527},weight:100}})}}e.CursorWordLeft=u;class v extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=v;class f extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=f;class p extends o{constructor(){var H;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(n.CONTEXT_ACCESSIBILITY_MODE_ENABLED,d.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:3087,mac:{primary:1551},weight:100}})}}e.CursorWordLeftSelect=p;class C extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(H,W,$,Z){return super._move((0,b.getMapForWordSeparators)(L.EditorOptions.wordSeparators.defaultValue),W,$,Z)}}e.CursorWordAccessibilityLeft=C;class y extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(H,W,$,Z){return super._move((0,b.getMapForWordSeparators)(L.EditorOptions.wordSeparators.defaultValue),W,$,Z)}}e.CursorWordAccessibilityLeftSelect=y;class E extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=E;class I extends c{constructor(){var H;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(n.CONTEXT_ACCESSIBILITY_MODE_ENABLED,d.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:2065,mac:{primary:529},weight:100}})}}e.CursorWordEndRight=I;class T extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=T;class O extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=O;class R extends c{constructor(){var H;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,(H=r.ContextKeyExpr.and(n.CONTEXT_ACCESSIBILITY_MODE_ENABLED,d.IsWindowsContext))===null||H===void 0?void 0:H.negate()),primary:3089,mac:{primary:1553},weight:100}})}}e.CursorWordEndRightSelect=R;class M extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=M;class N extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(H,W,$,Z){return super._move((0,b.getMapForWordSeparators)(L.EditorOptions.wordSeparators.defaultValue),W,$,Z)}}e.CursorWordAccessibilityRight=N;class P extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(H,W,$,Z){return super._move((0,b.getMapForWordSeparators)(L.EditorOptions.wordSeparators.defaultValue),W,$,Z)}}e.CursorWordAccessibilityRightSelect=P;class x extends _.EditorCommand{constructor(H){super(H),this._whitespaceHeuristics=H.whitespaceHeuristics,this._wordNavigationType=H.wordNavigationType}runEditorCommand(H,W,$){const Z=H.get(t.ILanguageConfigurationService);if(!W.hasModel())return;const Q=(0,b.getMapForWordSeparators)(W.getOption(126)),re=W.getModel(),ce=W.getSelections(),he=W.getOption(5),de=W.getOption(9),ue=Z.getLanguageConfiguration(re.getLanguageId()).getAutoClosingPairs(),q=W._getViewModel(),z=ce.map(U=>{const X=this._delete({wordSeparators:Q,model:re,selection:U,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:W.getOption(7),autoClosingBrackets:he,autoClosingQuotes:de,autoClosingPairs:ue,autoClosedCharacters:q.getCursorAutoClosedCharacters()},this._wordNavigationType);return new k.ReplaceCommand(X,"")});W.pushUndoStop(),W.executeCommands(this.id,z),W.pushUndoStop()}}e.DeleteWordCommand=x;class F extends x{_delete(H,W){const $=w.WordOperations.deleteWordLeft(H,W);return $||new g.Range(1,1,1,1)}}e.DeleteWordLeftCommand=F;class B extends x{_delete(H,W){const $=w.WordOperations.deleteWordRight(H,W);if($)return $;const Z=H.model.getLineCount(),Q=H.model.getLineMaxColumn(Z);return new g.Range(Z,Q,Z,Q)}}e.DeleteWordRightCommand=B;class V extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:s.EditorContextKeys.writable})}}e.DeleteWordStartLeft=V;class K extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:s.EditorContextKeys.writable})}}e.DeleteWordEndLeft=K;class A extends F{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=A;class Y extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:s.EditorContextKeys.writable})}}e.DeleteWordStartRight=Y;class ie extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:s.EditorContextKeys.writable})}}e.DeleteWordEndRight=ie;class le extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=le;class ne extends _.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:s.EditorContextKeys.writable,label:i.localize(0,null),alias:"Delete Word"})}run(H,W,$){if(!W.hasModel())return;const Z=(0,b.getMapForWordSeparators)(W.getOption(126)),Q=W.getModel(),ce=W.getSelections().map(he=>{const de=w.WordOperations.deleteInsideWord(Z,Q,he);return new k.ReplaceCommand(de,"")});W.pushUndoStop(),W.executeCommands(this.id,ce),W.pushUndoStop()}}e.DeleteInsideWord=ne,(0,_.registerEditorCommand)(new a),(0,_.registerEditorCommand)(new l),(0,_.registerEditorCommand)(new u),(0,_.registerEditorCommand)(new v),(0,_.registerEditorCommand)(new f),(0,_.registerEditorCommand)(new p),(0,_.registerEditorCommand)(new E),(0,_.registerEditorCommand)(new I),(0,_.registerEditorCommand)(new T),(0,_.registerEditorCommand)(new O),(0,_.registerEditorCommand)(new R),(0,_.registerEditorCommand)(new M),(0,_.registerEditorCommand)(new C),(0,_.registerEditorCommand)(new y),(0,_.registerEditorCommand)(new N),(0,_.registerEditorCommand)(new P),(0,_.registerEditorCommand)(new V),(0,_.registerEditorCommand)(new K),(0,_.registerEditorCommand)(new A),(0,_.registerEditorCommand)(new Y),(0,_.registerEditorCommand)(new ie),(0,_.registerEditorCommand)(new le),(0,_.registerEditorAction)(ne)}),define(J[785],ee([1,0,15,173,5,22,341,25]),function(j,e,_,k,L,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 S 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(h,o){const c=k.WordPartOperations.deleteWordPartLeft(h);return c||new L.Range(1,1,1,1)}}e.DeleteWordPartLeft=S;class g 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(h,o){const c=k.WordPartOperations.deleteWordPartRight(h);if(c)return c;const a=h.model.getLineCount(),l=h.model.getLineMaxColumn(a);return new L.Range(a,l,a,l)}}e.DeleteWordPartRight=g;class m extends w.MoveWordCommand{_move(h,o,c,a){return k.WordPartOperations.moveWordPartLeft(h,o,c)}}e.WordPartLeftCommand=m;class s 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=s,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(h,o,c,a){return k.WordPartOperations.moveWordPartRight(h,o,c)}}e.WordPartRightCommand=i;class n 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=n;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,_.registerEditorCommand)(new S),(0,_.registerEditorCommand)(new g),(0,_.registerEditorCommand)(new s),(0,_.registerEditorCommand)(new t),(0,_.registerEditorCommand)(new n),(0,_.registerEditorCommand)(new r)}),define(J[786],ee([1,0,7,35,48,68,2,17,9,21,15,22,334,13,8,34,52,84,453]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const o=new i.RawContextKey("accessibilityHelpWidgetVisible",!1);let c=class zi extends w.Disposable{static get(p){return p.getContribution(zi.ID)}constructor(p,C){super(),this._editor=p,this._widget=this._register(C.createInstance(l,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};c.ID="editor.contrib.accessibilityHelpController",c=Te([ge(1,n.IInstantiationService)],c);function a(f,p){return!f||f.length===0?h.AccessibilityHelpNLS.noSelection:f.length===1?p?S.format(h.AccessibilityHelpNLS.singleSelectionRange,f[0].positionLineNumber,f[0].positionColumn,p):S.format(h.AccessibilityHelpNLS.singleSelection,f[0].positionLineNumber,f[0].positionColumn):p?S.format(h.AccessibilityHelpNLS.multiSelectionRange,f.length,p):f.length>0?S.format(h.AccessibilityHelpNLS.multiSelection,f.length):""}let l=class Zt extends D.Widget{constructor(p,C,y,E){super(),this._contextKeyService=C,this._keybindingService=y,this._openerService=E,this._editor=p,this._isVisibleKey=o.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-modal","true"),this._domNode.setAttribute("aria-hidden","true");const I=(0,_.append)(this._domNode.domNode,(0,_.$)("h1",void 0,h.AccessibilityHelpNLS.accessibilityHelpTitle));I.id="help-dialog-heading",this._domNode.setAttribute("aria-labelledby",I.id),this._contentDomNode=(0,k.createFastDomNode)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._contentDomNode.domNode.id="help-dialog-content",this._domNode.appendChild(this._contentDomNode),this._contentDomNode.setAttribute("aria-describedby",this._contentDomNode.domNode.id),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register((0,_.addStandardDisposableListener)(this._contentDomNode.domNode,"keydown",T=>{if(this._isVisible&&(T.equals(2083)&&((0,L.alert)(h.AccessibilityHelpNLS.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),(0,_.clearNode)(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),T.preventDefault(),T.stopPropagation()),T.equals(2086))){(0,L.alert)(h.AccessibilityHelpNLS.openingDocs);let O=this._editor.getRawOptions().accessibilityHelpUrl;typeof O>"u"&&(O="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(g.URI.parse(O)),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,C,y){const E=this._keybindingService.lookupKeybinding(p);return E?S.format(C,E.getAriaLabel()):S.format(y,p)}_buildContent(){const p=this._contentDomNode.domNode,C=this._editor.getOptions(),y=this._editor.getSelections();let E=0;if(y){const M=this._editor.getModel();M&&y.forEach(N=>{E+=M.getValueLengthInRange(N)})}(0,_.append)(p,(0,_.$)("p",void 0,a(y,E)));const I=(0,_.append)(p,(0,_.$)("p"));C.get(59)?C.get(88)?I.textContent=h.AccessibilityHelpNLS.readonlyDiffEditor:I.textContent=h.AccessibilityHelpNLS.editableDiffEditor:C.get(88)?I.textContent=h.AccessibilityHelpNLS.readonlyEditor:I.textContent=h.AccessibilityHelpNLS.editableEditor;const T=(0,_.append)(p,(0,_.$)("ul")),O=b.isMacintosh?h.AccessibilityHelpNLS.changeConfigToOnMac:h.AccessibilityHelpNLS.changeConfigToOnWinLinux;switch(C.get(2)){case 0:(0,_.append)(T,(0,_.$)("li",void 0,O));break;case 2:(0,_.append)(T,(0,_.$)("li",void 0,h.AccessibilityHelpNLS.auto_on));break;case 1:(0,_.append)(T,(0,_.$)("li",void 0,h.AccessibilityHelpNLS.auto_off,O));break}C.get(139)?(0,_.append)(T,(0,_.$)("li",void 0,this._descriptionForCommand(t.ToggleTabFocusModeAction.ID,h.AccessibilityHelpNLS.tabFocusModeOnMsg,h.AccessibilityHelpNLS.tabFocusModeOnMsgNoKb))):(0,_.append)(T,(0,_.$)("li",void 0,this._descriptionForCommand(t.ToggleTabFocusModeAction.ID,h.AccessibilityHelpNLS.tabFocusModeOffMsg,h.AccessibilityHelpNLS.tabFocusModeOffMsgNoKb)));const R=b.isMacintosh?h.AccessibilityHelpNLS.openDocMac:h.AccessibilityHelpNLS.openDocWinLinux;(0,_.append)(T,(0,_.$)("li",void 0,R)),(0,_.append)(p,(0,_.$)("p",void 0,h.AccessibilityHelpNLS.outroMsg))}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,(0,_.clearNode)(this._contentDomNode.domNode),this._editor.focus())}_layout(){const p=this._editor.getLayoutInfo(),C=Math.max(5,Math.min(Zt.WIDTH,p.width-40)),y=Math.max(5,Math.min(Zt.HEIGHT,p.height-40));this._domNode.setWidth(C),this._domNode.setHeight(y);const E=Math.round((p.height-y)/2);this._domNode.setTop(E);const I=Math.round((p.width-C)/2);this._domNode.setLeft(I)}};l.ID="editor.contrib.accessibilityHelpWidget",l.WIDTH=500,l.HEIGHT=300,l=Te([ge(1,i.IContextKeyService),ge(2,r.IKeybindingService),ge(3,d.IOpenerService)],l);class u extends m.EditorAction{constructor(){super({id:"editor.action.showAccessibilityHelp",label:h.AccessibilityHelpNLS.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(p,C){const y=c.get(C);y?.show()}}(0,m.registerEditorContribution)(c.ID,c,4),(0,m.registerEditorAction)(u);const v=m.EditorCommand.bindToContribution(c.get);(0,m.registerEditorCommand)(new v({id:"closeAccessibilityHelp",precondition:o,handler:f=>f.hide(),kbOpts:{weight:100+100,kbExpr:s.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(J[787],ee([1,0,7,2,15,17,454]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class w extends k.Disposable{constructor(g){super(),this.editor=g,this.widget=null,D.isIOS&&(this._register(g.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const g=!this.editor.getOption(88);!this.widget&&g?this.widget=new b(this.editor):this.widget&&!g&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}e.IPadShowKeyboard=w,w.ID="editor.contrib.iPadShowKeyboard";class b extends k.Disposable{constructor(g){super(),this.editor=g,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(_.addDisposableListener(this._domNode,"touchstart",m=>{this.editor.focus()})),this._register(_.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,L.registerEditorContribution)(w.ID,w,3)}),define(J[788],ee([1,0,7,36,2,15,27,121,152,39,126,84,455]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let t=class Vi extends L.Disposable{static get(o){return o.getContribution(Vi.ID)}constructor(o,c,a){super(),this._editor=o,this._languageService=a,this._widget=null,this._register(this._editor.onDidChangeModel(l=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(l=>this.stop())),this._register(w.TokenizationRegistry.onDidChange(l=>this.stop())),this._register(this._editor.onKeyUp(l=>l.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new d(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};t.ID="editor.contrib.inspectTokens",t=Te([ge(1,m.IStandaloneThemeService),ge(2,g.ILanguageService)],t);class i extends D.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:s.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(o,c){const a=t.get(c);a?.launch()}}function n(h){let o="";for(let c=0,a=h.length;c<a;c++){const l=h.charCodeAt(c);switch(l){case 9:o+="\\u2192";break;case 32:o+="\\xB7";break;default:o+=String.fromCharCode(l)}}return o}function r(h,o){const c=w.TokenizationRegistry.get(o);if(c)return c;const a=h.encodeLanguageId(o);return{getInitialState:()=>S.NullState,tokenize:(l,u,v)=>(0,S.nullTokenize)(o,v),tokenizeEncoded:(l,u,v)=>(0,S.nullTokenizeEncoded)(a,v)}}class d extends L.Disposable{constructor(o,c){super(),this.allowEditorOverflow=!0,this._editor=o,this._languageService=c,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 d._ID}_compute(o){const c=this._getTokensAtLine(o.lineNumber);let a=0;for(let p=c.tokens1.length-1;p>=0;p--){const C=c.tokens1[p];if(o.column-1>=C.offset){a=p;break}}let l=0;for(let p=c.tokens2.length>>>1;p>=0;p--)if(o.column-1>=c.tokens2[p<<1]){l=p;break}const u=this._model.getLineContent(o.lineNumber);let v="";if(a<c.tokens1.length){const p=c.tokens1[a].offset,C=a+1<c.tokens1.length?c.tokens1[a+1].offset:u.length;v=u.substring(p,C)}(0,_.reset)(this._domNode,(0,_.$)("h2.tm-token",void 0,n(v),(0,_.$)("span.tm-token-length",void 0,`${v.length} ${v.length===1?"char":"chars"}`))),(0,_.append)(this._domNode,(0,_.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const f=(l<<1)+1<c.tokens2.length?this._decodeMetadata(c.tokens2[(l<<1)+1]):null;(0,_.append)(this._domNode,(0,_.$)("table.tm-metadata-table",void 0,(0,_.$)("tbody",void 0,(0,_.$)("tr",void 0,(0,_.$)("td.tm-metadata-key",void 0,"language"),(0,_.$)("td.tm-metadata-value",void 0,`${f?f.languageId:"-?-"}`)),(0,_.$)("tr",void 0,(0,_.$)("td.tm-metadata-key",void 0,"token type"),(0,_.$)("td.tm-metadata-value",void 0,`${f?this._tokenTypeToString(f.tokenType):"-?-"}`)),(0,_.$)("tr",void 0,(0,_.$)("td.tm-metadata-key",void 0,"font style"),(0,_.$)("td.tm-metadata-value",void 0,`${f?this._fontStyleToString(f.fontStyle):"-?-"}`)),(0,_.$)("tr",void 0,(0,_.$)("td.tm-metadata-key",void 0,"foreground"),(0,_.$)("td.tm-metadata-value",void 0,`${f?k.Color.Format.CSS.formatHex(f.foreground):"-?-"}`)),(0,_.$)("tr",void 0,(0,_.$)("td.tm-metadata-key",void 0,"background"),(0,_.$)("td.tm-metadata-value",void 0,`${f?k.Color.Format.CSS.formatHex(f.background):"-?-"}`))))),(0,_.append)(this._domNode,(0,_.$)("hr.tokens-inspect-separator")),a<c.tokens1.length&&(0,_.append)(this._domNode,(0,_.$)("span.tm-token-type",void 0,c.tokens1[a].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(o){const c=w.TokenizationRegistry.getColorMap(),a=b.TokenMetadata.getLanguageId(o),l=b.TokenMetadata.getTokenType(o),u=b.TokenMetadata.getFontStyle(o),v=b.TokenMetadata.getForeground(o),f=b.TokenMetadata.getBackground(o);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(a),tokenType:l,fontStyle:u,foreground:c[v],background:c[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 c="";return o&1&&(c+="italic "),o&2&&(c+="bold "),o&4&&(c+="underline "),o&8&&(c+="strikethrough "),c.length===0&&(c="---"),c}_getTokensAtLine(o){const c=this._getStateBeforeLine(o),a=this._tokenizationSupport.tokenize(this._model.getLineContent(o),!0,c),l=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(o),!0,c);return{startState:c,tokens1:a.tokens,tokens2:l.tokens,endState:a.endState}}_getStateBeforeLine(o){let c=this._tokenizationSupport.getInitialState();for(let a=1;a<o;a++)c=this._tokenizationSupport.tokenize(this._model.getLineContent(a),!0,c).endState;return c}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}d._ID="editor.contrib.inspectTokensWidget",(0,D.registerEditorContribution)(t.ID,t,4),(0,D.registerEditorAction)(i)}),define(J[789],ee([1,0,7,564,40,16,2,690,30,13,55,34,73]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchToolBar=void 0;let i=e.WorkbenchToolBar=class extends k.ToolBar{constructor(r,d,h,o,c,a,l){super(r,c,Object.assign(Object.assign({getKeyBinding:u=>{var v;return(v=a.lookupKeybinding(u.id))!==null&&v!==void 0?v:void 0}},d),{allowContextMenu:!0})),this._options=d,this._menuService=h,this._contextKeyService=o,this._contextMenuService=c,this._sessionDisposables=this._store.add(new w.DisposableStore),d?.telemetrySource&&this._store.add(this.actionBar.onDidRun(u=>l.publicLog2("workbenchActionExecuted",{id:u.action.id,from:d.telemetrySource})))}setActions(r,d=[],h){var o,c,a;this._sessionDisposables.clear();const l=r.slice(),u=d.slice(),v=[];let f=0;const p=[];let C=!1;if(((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==-1)for(let y=0;y<l.length;y++){const E=l[y];!(E instanceof S.MenuItemAction)&&!(E instanceof S.SubmenuItemAction)||E.hideActions&&(v.push(E.hideActions.toggle),E.hideActions.toggle.checked&&f++,E.hideActions.isHidden&&(C=!0,l[y]=void 0,((c=this._options)===null||c===void 0?void 0:c.hiddenItemStrategy)!==0&&(p[y]=E)))}if(((a=this._options)===null||a===void 0?void 0:a.maxNumberOfItems)!==void 0){let y=0;for(let E=0;E<l.length;E++){const I=l[E];I&&++y>=this._options.maxNumberOfItems&&(l[E]=void 0,p[E]=I)}}(0,D.coalesceInPlace)(l),(0,D.coalesceInPlace)(p),super.setActions(l,L.Separator.join(p,u)),v.length>0&&this._sessionDisposables.add((0,_.addDisposableListener)(this.getElement(),"contextmenu",y=>{var E,I,T,O;const R=this.getItemAction(y.target);if(!R)return;y.preventDefault(),y.stopPropagation();let M=!1;if(f===1&&((E=this._options)===null||E===void 0?void 0:E.hiddenItemStrategy)===0){M=!0;for(let x=0;x<v.length;x++)if(v[x].checked){v[x]=(0,L.toAction)({id:R.id,label:R.label,checked:!0,enabled:!1,run(){}});break}}let N;if(!M&&(R instanceof S.MenuItemAction||R instanceof S.SubmenuItemAction)){if(!R.hideActions)return;N=R.hideActions.hide}else N=(0,L.toAction)({id:"label",label:(0,b.localize)(0,null),enabled:!1,run(){}});const P=L.Separator.join([N],v);!((I=this._options)===null||I===void 0)&&I.resetMenu&&!h&&(h=[this._options.resetMenu]),C&&h&&(P.push(new L.Separator),P.push((0,L.toAction)({id:"resetThisMenu",label:(0,b.localize)(1,null),run:()=>this._menuService.resetHiddenStates(h)}))),this._contextMenuService.showContextMenu({getAnchor:()=>y,getActions:()=>P,menuId:(T=this._options)===null||T===void 0?void 0:T.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(O=this._options)===null||O===void 0?void 0:O.menuOptions),contextKeyService:this._contextKeyService})}))}};e.WorkbenchToolBar=i=Te([ge(2,S.IMenuService),ge(3,g.IContextKeyService),ge(4,m.IContextMenuService),ge(5,s.IKeybindingService),ge(6,t.ITelemetryService)],i)}),define(J[790],ee([1,0,544,11,64,2,60,18,702,25,28,154,8,34,742,85,73]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let h=e.AbstractCommandsQuickAccessProvider=class Yt extends n.PickerQuickAccessProvider{constructor(a,l,u,v,f,p){super(Yt.PREFIX,a),this.instantiationService=l,this.keybindingService=u,this.commandService=v,this.telemetryService=f,this.dialogService=p,this.commandsHistory=this._register(this.instantiationService.createInstance(o)),this.options=a}_getPicks(a,l,u,v){var f,p;return we(this,void 0,void 0,function*(){const C=yield this.getCommandPicks(u);if(u.isCancellationRequested)return[];const y=[];for(const R of C){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},y.push(R)):a===R.commandId&&y.push(R)}const E=new Map;for(const R of y){const M=E.get(R.label);M?(R.description=R.commandId,M.description=M.commandId):E.set(R.label,R)}y.sort((R,M)=>{const N=this.commandsHistory.peek(R.commandId),P=this.commandsHistory.peek(M.commandId);if(N&&P)return N>P?-1:1;if(N)return-1;if(P)return 1;if(this.options.suggestedCommandIds){const x=this.options.suggestedCommandIds.has(R.commandId),F=this.options.suggestedCommandIds.has(M.commandId);if(x&&F)return 0;if(x)return-1;if(F)return 1}return R.label.localeCompare(M.label)});const I=[];let T=!1,O=!!this.options.suggestedCommandIds;for(let R=0;R<y.length;R++){const M=y[R];R===0&&this.commandsHistory.peek(M.commandId)&&(I.push({type:"separator",label:(0,S.localize)(0,null)}),T=!0),O&&!this.commandsHistory.peek(M.commandId)&&(!((f=this.options.suggestedCommandIds)===null||f===void 0)&&f.has(M.commandId))&&(I.push({type:"separator",label:(0,S.localize)(1,null)}),T=!0,O=!1),T&&!this.commandsHistory.peek(M.commandId)&&!(!((p=this.options.suggestedCommandIds)===null||p===void 0)&&p.has(M.commandId))&&(I.push({type:"separator",label:(0,S.localize)(2,null)}),T=!1),I.push(this.toCommandPick(M,v))}return this.hasAdditionalCommandPicks(a,u)?{picks:I,additionalPicks:(()=>we(this,void 0,void 0,function*(){const R=yield this.getAdditionalCommandPicks(C,y,a,u);return u.isCancellationRequested?[]:R.map(M=>this.toCommandPick(M,v))}))()}:I})}toCommandPick(a,l){if(a.type==="separator")return a;const u=this.keybindingService.lookupKeybinding(a.commandId),v=u?(0,S.localize)(3,null,a.label,u.getAriaLabel()):a.label;return Object.assign(Object.assign({},a),{ariaLabel:v,detail:this.options.showAlias&&a.commandAlias!==a.label?a.commandAlias:void 0,keybinding:u,accept:()=>we(this,void 0,void 0,function*(){var f;this.commandsHistory.push(a.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:a.commandId,from:(f=l?.from)!==null&&f!==void 0?f:"quick open"});try{yield this.commandService.executeCommand(a.commandId)}catch(p){(0,k.isCancellationError)(p)||this.dialogService.error((0,S.localize)(4,null,a.label),(0,_.toErrorMessage)(p))}})})}};h.PREFIX=">",h.WORD_FILTER=(0,L.or)(L.matchesPrefix,L.matchesWords,L.matchesContiguousSubString),e.AbstractCommandsQuickAccessProvider=h=Te([ge(1,t.IInstantiationService),ge(2,i.IKeybindingService),ge(3,g.ICommandService),ge(4,d.ITelemetryService),ge(5,s.IDialogService)],h);let o=e.CommandsHistory=class ut extends D.Disposable{constructor(a,l){super(),this.storageService=a,this.configurationService=l,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=ut.getConfiguredCommandHistoryLength(this.configurationService),ut.cache&&ut.cache.limit!==this.configuredCommandsHistoryLength&&(ut.cache.limit=this.configuredCommandsHistoryLength,ut.saveState(this.storageService)))}load(){const a=this.storageService.get(ut.PREF_KEY_CACHE,0);let l;if(a)try{l=JSON.parse(a)}catch{}const u=ut.cache=new w.LRUCache(this.configuredCommandsHistoryLength,1);if(l){let v;l.usesLRU?v=l.entries:v=l.entries.sort((f,p)=>f.value-p.value),v.forEach(f=>u.set(f.key,f.value))}ut.counter=this.storageService.getNumber(ut.PREF_KEY_COUNTER,0,ut.counter)}push(a){ut.cache&&(ut.cache.set(a,ut.counter++),ut.saveState(this.storageService))}peek(a){var l;return(l=ut.cache)===null||l===void 0?void 0:l.peek(a)}static saveState(a){if(!ut.cache)return;const l={usesLRU:!0,entries:[]};ut.cache.forEach((u,v)=>l.entries.push({key:v,value:u})),a.store(ut.PREF_KEY_CACHE,JSON.stringify(l),0,0),a.store(ut.PREF_KEY_COUNTER,ut.counter,0,0)}static getConfiguredCommandHistoryLength(a){var l,u;const f=(u=(l=a.getValue().workbench)===null||l===void 0?void 0:l.commandPalette)===null||u===void 0?void 0:u.history;return typeof f=="number"?f:ut.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,e.CommandsHistory=o=Te([ge(0,r.IStorageService),ge(1,m.IConfigurationService)],o)}),define(J[791],ee([1,0,115,790]),function(j,e,_,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class L extends k.AbstractCommandsQuickAccessProvider{constructor(w,b,S,g,m,s){super(w,b,S,g,m,s)}getCodeEditorCommandPicks(){const w=this.activeTextEditorControl;if(!w)return[];const b=[];for(const S of w.getSupportedActions())b.push({commandId:S.id,commandAlias:S.alias,label:(0,_.stripIcons)(S.label)||S.id});return b}}e.AbstractEditorCommandsQuickAccessProvider=L}),define(J[792],ee([1,0,37,130,84,32,791,18,8,34,25,73,154,15,22,71]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let d=e.StandaloneCommandsQuickAccessProvider=class extends w.AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){return(0,b.withNullAsUndefined)(this.codeEditorService.getFocusedCodeEditor())}constructor(c,a,l,u,v,f){super({showAlias:!1},c,l,u,v,f),this.codeEditorService=a}getCommandPicks(){return we(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return we(this,void 0,void 0,function*(){return[]})}};e.StandaloneCommandsQuickAccessProvider=d=Te([ge(0,S.IInstantiationService),ge(1,D.ICodeEditorService),ge(2,g.IKeybindingService),ge(3,m.ICommandService),ge(4,s.ITelemetryService),ge(5,t.IDialogService)],d);class h extends i.EditorAction{constructor(){super({id:h.ID,label:L.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:n.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(c){c.get(r.IQuickInputService).quickAccess.show(d.PREFIX)}}e.GotoLineAction=h,h.ID="editor.action.quickCommand",(0,i.registerEditorAction)(h),_.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:d,prefix:d.PREFIX,helpEntries:[{description:L.QuickCommandNLS.quickCommandHelp,commandId:h.ID}]})}),define(J[33],ee([1,0,14,36,6,81,707,233,37]),function(j,e,_,k,L,D,w,b,S){"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.diffUnchangedRegionBackground=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 g(O){return`--vscode-${O.replace(/\\./g,"-")}`}e.asCssVariableName=g;function m(O){return`var(${g(O)})`}e.asCssVariable=m;function s(O,R){return`var(${g(O)}, ${R})`}e.asCssVariableWithDefault=s,e.Extensions={ColorContribution:"base.contributions.colors"};class t{constructor(){this._onDidChangeSchema=new L.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(R,M,N,P=!1,x){const F={id:R,description:N,defaults:M,needsTransparency:P,deprecationMessage:x};this.colorsById[R]=F;const B={type:"string",description:N,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return x&&(B.deprecationMessage=x),this.colorSchema.properties[R]=B,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 P=N.defaults[M.type];return E(P,M)}}getColorSchema(){return this.colorSchema}toString(){const R=(M,N)=>{const P=M.indexOf(".")===-1?0:1,x=N.indexOf(".")===-1?0:1;return P!==x?P-x:M.localeCompare(N)};return Object.keys(this.colorsById).sort(R).map(M=>`- \\`${M}\\`: ${this.colorsById[M].description}`).join(`\n`)}}const i=new t;S.Registry.add(e.Extensions.ColorContribution,i);function n(O,R,M,N,P){return i.registerColor(O,R,M,N,P)}e.registerColor=n,e.foreground=n("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},w.localize(0,null)),e.disabledForeground=n("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},w.localize(1,null)),e.errorForeground=n("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},w.localize(2,null)),e.descriptionForeground=n("descriptionForeground",{light:"#717171",dark:f(e.foreground,.7),hcDark:f(e.foreground,.7),hcLight:f(e.foreground,.7)},w.localize(3,null)),e.iconForeground=n("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},w.localize(4,null)),e.focusBorder=n("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},w.localize(5,null)),e.contrastBorder=n("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},w.localize(6,null)),e.activeContrastBorder=n("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(7,null)),e.selectionBackground=n("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},w.localize(8,null)),e.textSeparatorForeground=n("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:k.Color.black,hcLight:"#292929"},w.localize(9,null)),e.textLinkForeground=n("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},w.localize(10,null)),e.textLinkActiveForeground=n("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},w.localize(11,null)),e.textPreformatForeground=n("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},w.localize(12,null)),e.textBlockQuoteBackground=n("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},w.localize(13,null)),e.textBlockQuoteBorder=n("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:k.Color.white,hcLight:"#292929"},w.localize(14,null)),e.textCodeBlockBackground=n("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:k.Color.black,hcLight:"#F2F2F2"},w.localize(15,null)),e.widgetShadow=n("widget.shadow",{dark:f(k.Color.black,.36),light:f(k.Color.black,.16),hcDark:null,hcLight:null},w.localize(16,null)),e.widgetBorder=n("widget.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(17,null)),e.inputBackground=n("input.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(18,null)),e.inputForeground=n("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(19,null)),e.inputBorder=n("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(20,null)),e.inputActiveOptionBorder=n("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(21,null)),e.inputActiveOptionHoverBackground=n("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},w.localize(22,null)),e.inputActiveOptionBackground=n("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=n("inputOption.activeForeground",{dark:k.Color.white,light:k.Color.black,hcDark:e.foreground,hcLight:e.foreground},w.localize(24,null)),e.inputPlaceholderForeground=n("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=n("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(26,null)),e.inputValidationInfoForeground=n("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(27,null)),e.inputValidationInfoBorder=n("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(28,null)),e.inputValidationWarningBackground=n("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(29,null)),e.inputValidationWarningForeground=n("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(30,null)),e.inputValidationWarningBorder=n("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(31,null)),e.inputValidationErrorBackground=n("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(32,null)),e.inputValidationErrorForeground=n("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},w.localize(33,null)),e.inputValidationErrorBorder=n("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(34,null)),e.selectBackground=n("dropdown.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(35,null)),e.selectListBackground=n("dropdown.listBackground",{dark:null,light:null,hcDark:k.Color.black,hcLight:k.Color.white},w.localize(36,null)),e.selectForeground=n("dropdown.foreground",{dark:"#F0F0F0",light:e.foreground,hcDark:k.Color.white,hcLight:e.foreground},w.localize(37,null)),e.selectBorder=n("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(38,null)),e.buttonForeground=n("button.foreground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:k.Color.white},w.localize(39,null)),e.buttonSeparator=n("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=n("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},w.localize(41,null)),e.buttonHoverBackground=n("button.hoverBackground",{dark:v(e.buttonBackground,.2),light:u(e.buttonBackground,.2),hcDark:e.buttonBackground,hcLight:e.buttonBackground},w.localize(42,null)),e.buttonBorder=n("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(43,null)),e.buttonSecondaryForeground=n("button.secondaryForeground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:e.foreground},w.localize(44,null)),e.buttonSecondaryBackground=n("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:k.Color.white},w.localize(45,null)),e.buttonSecondaryHoverBackground=n("button.secondaryHoverBackground",{dark:v(e.buttonSecondaryBackground,.2),light:u(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},w.localize(46,null)),e.badgeBackground=n("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:k.Color.black,hcLight:"#0F4A85"},w.localize(47,null)),e.badgeForeground=n("badge.foreground",{dark:k.Color.white,light:"#333",hcDark:k.Color.white,hcLight:k.Color.white},w.localize(48,null)),e.scrollbarShadow=n("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},w.localize(49,null)),e.scrollbarSliderBackground=n("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=n("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=n("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=n("progressBar.background",{dark:k.Color.fromHex("#0E70C0"),light:k.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(53,null)),e.editorErrorBackground=n("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(54,null),!0),e.editorErrorForeground=n("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},w.localize(55,null)),e.editorErrorBorder=n("editorError.border",{dark:null,light:null,hcDark:k.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},w.localize(56,null)),e.editorWarningBackground=n("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(57,null),!0),e.editorWarningForeground=n("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},w.localize(58,null)),e.editorWarningBorder=n("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=n("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(60,null),!0),e.editorInfoForeground=n("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},w.localize(61,null)),e.editorInfoBorder=n("editorInfo.border",{dark:null,light:null,hcDark:k.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},w.localize(62,null)),e.editorHintForeground=n("editorHint.foreground",{dark:k.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},w.localize(63,null)),e.editorHintBorder=n("editorHint.border",{dark:null,light:null,hcDark:k.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},w.localize(64,null)),e.sashHoverBorder=n("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(65,null)),e.editorBackground=n("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:k.Color.black,hcLight:k.Color.white},w.localize(66,null)),e.editorForeground=n("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:k.Color.white,hcLight:e.foreground},w.localize(67,null)),e.editorStickyScrollBackground=n("editorStickyScroll.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},w.localize(68,null)),e.editorStickyScrollHoverBackground=n("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(69,null)),e.editorWidgetBackground=n("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:k.Color.white},w.localize(70,null)),e.editorWidgetForeground=n("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(71,null)),e.editorWidgetBorder=n("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(72,null)),e.editorWidgetResizeBorder=n("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},w.localize(73,null)),e.quickInputBackground=n("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(74,null)),e.quickInputForeground=n("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},w.localize(75,null)),e.quickInputTitleBackground=n("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=n("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:k.Color.white,hcLight:"#0F4A85"},w.localize(77,null)),e.pickerGroupBorder=n("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:k.Color.white,hcLight:"#0F4A85"},w.localize(78,null)),e.keybindingLabelBackground=n("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=n("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=n("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=n("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=n("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},w.localize(83,null)),e.editorSelectionForeground=n("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:k.Color.white},w.localize(84,null)),e.editorInactiveSelection=n("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=n("editor.selectionHighlightBackground",{light:y(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:y(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},w.localize(86,null),!0),e.editorSelectionHighlightBorder=n("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(87,null)),e.editorFindMatch=n("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},w.localize(88,null)),e.editorFindMatchHighlight=n("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},w.localize(89,null),!0),e.editorFindRangeHighlight=n("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},w.localize(90,null),!0),e.editorFindMatchBorder=n("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(91,null)),e.editorFindMatchHighlightBorder=n("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(92,null)),e.editorFindRangeHighlightBorder=n("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:f(e.activeContrastBorder,.4),hcLight:f(e.activeContrastBorder,.4)},w.localize(93,null),!0),e.searchEditorFindMatch=n("searchEditor.findMatchBackground",{light:f(e.editorFindMatchHighlight,.66),dark:f(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},w.localize(94,null)),e.searchEditorFindMatchBorder=n("searchEditor.findMatchBorder",{light:f(e.editorFindMatchHighlightBorder,.66),dark:f(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},w.localize(95,null)),e.searchResultsInfoForeground=n("search.resultsInfoForeground",{light:e.foreground,dark:f(e.foreground,.65),hcDark:e.foreground,hcLight:e.foreground},w.localize(96,null)),e.editorHoverHighlight=n("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},w.localize(97,null),!0),e.editorHoverBackground=n("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(98,null)),e.editorHoverForeground=n("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},w.localize(99,null)),e.editorHoverBorder=n("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},w.localize(100,null)),e.editorHoverStatusBarBackground=n("editorHoverWidget.statusBarBackground",{dark:v(e.editorHoverBackground,.2),light:u(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(101,null)),e.editorActiveLinkForeground=n("editorLink.activeForeground",{dark:"#4E94CE",light:k.Color.blue,hcDark:k.Color.cyan,hcLight:"#292929"},w.localize(102,null)),e.editorInlayHintForeground=n("editorInlayHint.foreground",{dark:e.badgeForeground,light:e.badgeForeground,hcDark:k.Color.black,hcLight:e.badgeForeground},w.localize(103,null)),e.editorInlayHintBackground=n("editorInlayHint.background",{dark:f(e.badgeBackground,.8),light:f(e.badgeBackground,.6),hcDark:"#f38518",hcLight:e.badgeBackground},w.localize(104,null)),e.editorInlayHintTypeForeground=n("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},w.localize(105,null)),e.editorInlayHintTypeBackground=n("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},w.localize(106,null)),e.editorInlayHintParameterForeground=n("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},w.localize(107,null)),e.editorInlayHintParameterBackground=n("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},w.localize(108,null)),e.editorLightBulbForeground=n("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},w.localize(109,null)),e.editorLightBulbAutoFixForeground=n("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=n("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},w.localize(111,null),!0),e.diffRemoved=n("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},w.localize(112,null),!0),e.diffInsertedLine=n("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},w.localize(113,null),!0),e.diffRemovedLine=n("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},w.localize(114,null),!0),e.diffInsertedLineGutter=n("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(115,null)),e.diffRemovedLineGutter=n("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(116,null)),e.diffOverviewRulerInserted=n("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(117,null)),e.diffOverviewRulerRemoved=n("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(118,null)),e.diffInsertedOutline=n("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},w.localize(119,null)),e.diffRemovedOutline=n("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},w.localize(120,null)),e.diffBorder=n("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(121,null)),e.diffDiagonalFill=n("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},w.localize(122,null)),e.diffUnchangedRegionBackground=n("diffEditor.unchangedRegionBackground",{dark:"#000000",light:"#e4e4e4",hcDark:null,hcLight:null},w.localize(123,null)),e.listFocusBackground=n("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(124,null)),e.listFocusForeground=n("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(125,null)),e.listFocusOutline=n("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(126,null)),e.listFocusAndSelectionOutline=n("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(127,null)),e.listActiveSelectionBackground=n("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(128,null)),e.listActiveSelectionForeground=n("list.activeSelectionForeground",{dark:k.Color.white,light:k.Color.white,hcDark:null,hcLight:null},w.localize(129,null)),e.listActiveSelectionIconForeground=n("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(130,null)),e.listInactiveSelectionBackground=n("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(131,null)),e.listInactiveSelectionForeground=n("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(132,null)),e.listInactiveSelectionIconForeground=n("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(133,null)),e.listInactiveFocusBackground=n("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(134,null)),e.listInactiveFocusOutline=n("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(135,null)),e.listHoverBackground=n("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:k.Color.white.transparent(.1),hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},w.localize(136,null)),e.listHoverForeground=n("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(137,null)),e.listDropBackground=n("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},w.localize(138,null)),e.listHighlightForeground=n("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},w.localize(139,null)),e.listFocusHighlightForeground=n("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:C(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},w.localize(140,null)),e.listInvalidItemForeground=n("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},w.localize(141,null)),e.listErrorForeground=n("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},w.localize(142,null)),e.listWarningForeground=n("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},w.localize(143,null)),e.listFilterWidgetBackground=n("listFilterWidget.background",{light:u(e.editorWidgetBackground,0),dark:v(e.editorWidgetBackground,0),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(144,null)),e.listFilterWidgetOutline=n("listFilterWidget.outline",{dark:k.Color.transparent,light:k.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},w.localize(145,null)),e.listFilterWidgetNoMatchesOutline=n("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(146,null)),e.listFilterWidgetShadow=n("listFilterWidget.shadow",{dark:e.widgetShadow,light:e.widgetShadow,hcDark:e.widgetShadow,hcLight:e.widgetShadow},w.localize(147,null)),e.listFilterMatchHighlight=n("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},w.localize(148,null)),e.listFilterMatchHighlightBorder=n("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.activeContrastBorder},w.localize(149,null)),e.treeIndentGuidesStroke=n("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},w.localize(150,null)),e.treeInactiveIndentGuidesStroke=n("tree.inactiveIndentGuidesStroke",{dark:f(e.treeIndentGuidesStroke,.4),light:f(e.treeIndentGuidesStroke,.4),hcDark:f(e.treeIndentGuidesStroke,.4),hcLight:f(e.treeIndentGuidesStroke,.4)},w.localize(151,null)),e.tableColumnsBorder=n("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},w.localize(152,null)),e.tableOddRowsBackgroundColor=n("tree.tableOddRowsBackground",{dark:f(e.foreground,.04),light:f(e.foreground,.04),hcDark:null,hcLight:null},w.localize(153,null)),e.listDeemphasizedForeground=n("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},w.localize(154,null)),e.checkboxBackground=n("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},w.localize(155,null)),e.checkboxSelectBackground=n("checkbox.selectBackground",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(156,null)),e.checkboxForeground=n("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},w.localize(157,null)),e.checkboxBorder=n("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},w.localize(158,null)),e.checkboxSelectBorder=n("checkbox.selectBorder",{dark:e.iconForeground,light:e.iconForeground,hcDark:e.iconForeground,hcLight:e.iconForeground},w.localize(159,null)),e._deprecatedQuickInputListFocusBackground=n("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,w.localize(160,null)),e.quickInputListFocusForeground=n("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},w.localize(161,null)),e.quickInputListFocusIconForeground=n("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},w.localize(162,null)),e.quickInputListFocusBackground=n("quickInputList.focusBackground",{dark:p(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:p(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},w.localize(163,null)),e.menuBorder=n("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(164,null)),e.menuForeground=n("menu.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},w.localize(165,null)),e.menuBackground=n("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},w.localize(166,null)),e.menuSelectionForeground=n("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},w.localize(167,null)),e.menuSelectionBackground=n("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},w.localize(168,null)),e.menuSelectionBorder=n("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(169,null)),e.menuSeparatorBackground=n("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:e.contrastBorder,hcLight:e.contrastBorder},w.localize(170,null)),e.toolbarHoverBackground=n("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},w.localize(171,null)),e.toolbarHoverOutline=n("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},w.localize(172,null)),e.toolbarActiveBackground=n("toolbar.activeBackground",{dark:v(e.toolbarHoverBackground,.1),light:u(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},w.localize(173,null)),e.snippetTabstopHighlightBackground=n("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(174,null)),e.snippetTabstopHighlightBorder=n("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(175,null)),e.snippetFinalTabstopHighlightBackground=n("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(176,null)),e.snippetFinalTabstopHighlightBorder=n("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new k.Color(new k.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},w.localize(177,null)),e.breadcrumbsForeground=n("breadcrumb.foreground",{light:f(e.foreground,.8),dark:f(e.foreground,.8),hcDark:f(e.foreground,.8),hcLight:f(e.foreground,.8)},w.localize(178,null)),e.breadcrumbsBackground=n("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},w.localize(179,null)),e.breadcrumbsFocusForeground=n("breadcrumb.focusForeground",{light:u(e.foreground,.2),dark:v(e.foreground,.1),hcDark:v(e.foreground,.1),hcLight:v(e.foreground,.1)},w.localize(180,null)),e.breadcrumbsActiveSelectionForeground=n("breadcrumb.activeSelectionForeground",{light:u(e.foreground,.2),dark:v(e.foreground,.1),hcDark:v(e.foreground,.1),hcLight:v(e.foreground,.1)},w.localize(181,null)),e.breadcrumbsPickerBackground=n("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},w.localize(182,null));const r=.5,d=k.Color.fromHex("#40C8AE").transparent(r),h=k.Color.fromHex("#40A6FF").transparent(r),o=k.Color.fromHex("#606060").transparent(.4),c=.4,a=1;e.mergeCurrentHeaderBackground=n("merge.currentHeaderBackground",{dark:d,light:d,hcDark:null,hcLight:null},w.localize(183,null),!0),e.mergeCurrentContentBackground=n("merge.currentContentBackground",{dark:f(e.mergeCurrentHeaderBackground,c),light:f(e.mergeCurrentHeaderBackground,c),hcDark:f(e.mergeCurrentHeaderBackground,c),hcLight:f(e.mergeCurrentHeaderBackground,c)},w.localize(184,null),!0),e.mergeIncomingHeaderBackground=n("merge.incomingHeaderBackground",{dark:h,light:h,hcDark:null,hcLight:null},w.localize(185,null),!0),e.mergeIncomingContentBackground=n("merge.incomingContentBackground",{dark:f(e.mergeIncomingHeaderBackground,c),light:f(e.mergeIncomingHeaderBackground,c),hcDark:f(e.mergeIncomingHeaderBackground,c),hcLight:f(e.mergeIncomingHeaderBackground,c)},w.localize(186,null),!0),e.mergeCommonHeaderBackground=n("merge.commonHeaderBackground",{dark:o,light:o,hcDark:null,hcLight:null},w.localize(187,null),!0),e.mergeCommonContentBackground=n("merge.commonContentBackground",{dark:f(e.mergeCommonHeaderBackground,c),light:f(e.mergeCommonHeaderBackground,c),hcDark:f(e.mergeCommonHeaderBackground,c),hcLight:f(e.mergeCommonHeaderBackground,c)},w.localize(188,null),!0),e.mergeBorder=n("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},w.localize(189,null)),e.overviewRulerCurrentContentForeground=n("editorOverviewRuler.currentContentForeground",{dark:f(e.mergeCurrentHeaderBackground,a),light:f(e.mergeCurrentHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(190,null)),e.overviewRulerIncomingContentForeground=n("editorOverviewRuler.incomingContentForeground",{dark:f(e.mergeIncomingHeaderBackground,a),light:f(e.mergeIncomingHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(191,null)),e.overviewRulerCommonContentForeground=n("editorOverviewRuler.commonContentForeground",{dark:f(e.mergeCommonHeaderBackground,a),light:f(e.mergeCommonHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},w.localize(192,null)),e.overviewRulerFindMatchForeground=n("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},w.localize(193,null),!0),e.overviewRulerSelectionHighlightForeground=n("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},w.localize(194,null),!0),e.minimapFindMatch=n("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},w.localize(195,null),!0),e.minimapSelectionOccurrenceHighlight=n("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},w.localize(196,null),!0),e.minimapSelection=n("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},w.localize(197,null),!0),e.minimapError=n("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(198,null)),e.minimapWarning=n("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},w.localize(199,null)),e.minimapBackground=n("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},w.localize(200,null)),e.minimapForegroundOpacity=n("minimap.foregroundOpacity",{dark:k.Color.fromHex("#000f"),light:k.Color.fromHex("#000f"),hcDark:k.Color.fromHex("#000f"),hcLight:k.Color.fromHex("#000f")},w.localize(201,null)),e.minimapSliderBackground=n("minimapSlider.background",{light:f(e.scrollbarSliderBackground,.5),dark:f(e.scrollbarSliderBackground,.5),hcDark:f(e.scrollbarSliderBackground,.5),hcLight:f(e.scrollbarSliderBackground,.5)},w.localize(202,null)),e.minimapSliderHoverBackground=n("minimapSlider.hoverBackground",{light:f(e.scrollbarSliderHoverBackground,.5),dark:f(e.scrollbarSliderHoverBackground,.5),hcDark:f(e.scrollbarSliderHoverBackground,.5),hcLight:f(e.scrollbarSliderHoverBackground,.5)},w.localize(203,null)),e.minimapSliderActiveBackground=n("minimapSlider.activeBackground",{light:f(e.scrollbarSliderActiveBackground,.5),dark:f(e.scrollbarSliderActiveBackground,.5),hcDark:f(e.scrollbarSliderActiveBackground,.5),hcLight:f(e.scrollbarSliderActiveBackground,.5)},w.localize(204,null)),e.problemsErrorIconForeground=n("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},w.localize(205,null)),e.problemsWarningIconForeground=n("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},w.localize(206,null)),e.problemsInfoIconForeground=n("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},w.localize(207,null)),e.chartsForeground=n("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},w.localize(208,null)),e.chartsLines=n("charts.lines",{dark:f(e.foreground,.5),light:f(e.foreground,.5),hcDark:f(e.foreground,.5),hcLight:f(e.foreground,.5)},w.localize(209,null)),e.chartsRed=n("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},w.localize(210,null)),e.chartsBlue=n("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},w.localize(211,null)),e.chartsYellow=n("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},w.localize(212,null)),e.chartsOrange=n("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},w.localize(213,null)),e.chartsGreen=n("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},w.localize(214,null)),e.chartsPurple=n("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w.localize(215,null));function l(O,R){var M,N,P,x;switch(O.op){case 0:return(M=E(O.value,R))===null||M===void 0?void 0:M.darken(O.factor);case 1:return(N=E(O.value,R))===null||N===void 0?void 0:N.lighten(O.factor);case 2:return(P=E(O.value,R))===null||P===void 0?void 0:P.transparent(O.factor);case 3:{const F=E(O.background,R);return F?(x=E(O.value,R))===null||x===void 0?void 0:x.makeOpaque(F):E(O.value,R)}case 4:for(const F of O.values){const B=E(F,R);if(B)return B}return;case 6:return E(R.defines(O.if)?O.then:O.else,R);case 5:{const F=E(O.value,R);if(!F)return;const B=E(O.background,R);return B?F.isDarkerThan(B)?k.Color.getLighterColor(F,B,O.factor).transparent(O.transparency):k.Color.getDarkerColor(F,B,O.factor).transparent(O.transparency):F.transparent(O.factor*O.transparency)}default:throw(0,D.assertNever)(O)}}e.executeTransform=l;function u(O,R){return{op:0,value:O,factor:R}}e.darken=u;function v(O,R){return{op:1,value:O,factor:R}}e.lighten=v;function f(O,R){return{op:2,value:O,factor:R}}e.transparent=f;function p(...O){return{op:4,values:O}}e.oneOf=p;function C(O,R,M){return{op:6,if:O,then:R,else:M}}e.ifDefinedThenElse=C;function y(O,R,M,N){return{op:5,value:O,background:R,factor:M,transparency:N}}function E(O,R){if(O!==null){if(typeof O=="string")return O[0]==="#"?k.Color.fromHex(O):R.getColor(O);if(O instanceof k.Color)return O;if(typeof O=="object")return l(O,R)}}e.resolveColorValue=E,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";const I=S.Registry.as(b.Extensions.JSONContribution);I.registerSchema(e.workbenchColorsSchemaId,i.getColorSchema());const T=new _.RunOnceScheduler(()=>I.notifySchemaChanged(e.workbenchColorsSchemaId),200);i.onDidChangeSchema(()=>{T.isScheduled()||T.schedule()})}),define(J[156],ee([1,0,7,146,67,14,2,33]),function(j,e,_,k,L,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 S{constructor(u,v){this.x=u,this.y=v,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new g(this.x-window.scrollX,this.y-window.scrollY)}}e.PageCoordinates=S;class g{constructor(u,v){this.clientX=u,this.clientY=v,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new S(this.clientX+window.scrollX,this.clientY+window.scrollY)}}e.ClientCoordinates=g;class m{constructor(u,v,f,p){this.x=u,this.y=v,this.width=f,this.height=p,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=m;class s{constructor(u,v){this.x=u,this.y=v,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=s;function t(l){const u=_.getDomNodePagePosition(l);return new m(u.left,u.top,u.width,u.height)}e.createEditorPagePosition=t;function i(l,u,v){const f=u.width/l.offsetWidth,p=u.height/l.offsetHeight,C=(v.x-u.x)/f,y=(v.y-u.y)/p;return new s(C,y)}e.createCoordinatesRelativeToEditor=i;class n extends L.StandardMouseEvent{constructor(u,v,f){super(u),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=v,this.pos=new S(this.posx,this.posy),this.editorPos=t(f),this.relativePos=i(f,this.editorPos,this.pos)}}e.EditorMouseEvent=n;class r{constructor(u){this._editorViewDomNode=u}_create(u){return new n(u,!1,this._editorViewDomNode)}onContextMenu(u,v){return _.addDisposableListener(u,"contextmenu",f=>{v(this._create(f))})}onMouseUp(u,v){return _.addDisposableListener(u,"mouseup",f=>{v(this._create(f))})}onMouseDown(u,v){return _.addDisposableListener(u,_.EventType.MOUSE_DOWN,f=>{v(this._create(f))})}onPointerDown(u,v){return _.addDisposableListener(u,_.EventType.POINTER_DOWN,f=>{v(this._create(f),f.pointerId)})}onMouseLeave(u,v){return _.addDisposableListener(u,_.EventType.MOUSE_LEAVE,f=>{v(this._create(f))})}onMouseMove(u,v){return _.addDisposableListener(u,"mousemove",f=>v(this._create(f)))}}e.EditorMouseEventFactory=r;class d{constructor(u){this._editorViewDomNode=u}_create(u){return new n(u,!1,this._editorViewDomNode)}onPointerUp(u,v){return _.addDisposableListener(u,"pointerup",f=>{v(this._create(f))})}onPointerDown(u,v){return _.addDisposableListener(u,_.EventType.POINTER_DOWN,f=>{v(this._create(f),f.pointerId)})}onPointerLeave(u,v){return _.addDisposableListener(u,_.EventType.POINTER_LEAVE,f=>{v(this._create(f))})}onPointerMove(u,v){return _.addDisposableListener(u,"pointermove",f=>v(this._create(f)))}}e.EditorPointerEventFactory=d;class h extends w.Disposable{constructor(u){super(),this._editorViewDomNode=u,this._globalPointerMoveMonitor=this._register(new k.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(u,v,f,p,C){this._keydownListener=_.addStandardDisposableListener(document,"keydown",y=>{y.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,y.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(u,v,f,y=>{p(new n(y,!0,this._editorViewDomNode))},y=>{this._keydownListener.dispose(),C(y)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorPointerMoveMonitor=h;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 v=this.getOrCreateRule(u);return v.increaseRefCount(),{className:v.className,dispose:()=>{v.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(u){const v=this.computeUniqueKey(u);let f=this._rules.get(v);if(!f){const p=this._counter++;f=new c(v,`dyn-rule-${this._instanceId}-${p}`,_.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,u),this._rules.set(v,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())}}e.DynamicCssRules=o,o._idPool=0;class c{constructor(u,v,f,p){this.key=u,this.className=v,this.properties=p,this._referenceCount=0,this._styleElement=_.createStyleSheet(f),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(u,v){let f=`.${u} {`;for(const p in v){const C=v[p];let y;typeof C=="object"?y=(0,b.asCssVariable)(C.id):y=C;const E=a(p);f+=`\n\t${E}: ${y};`}return f+=`\n}`,f}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function a(l){return l.replace(/(^[A-Z])/,([u])=>u.toLowerCase()).replace(/([A-Z])/g,([u])=>`-${u.toLowerCase()}`)}}),define(J[793],ee([1,0,7,35,146,2,17,9,223,54,41,5,263,311,83,33,24,57,467,46,94,411]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const l=140,u=2;class v{constructor(M,N,P){const x=M.options,F=x.get(138),B=x.get(140),V=B.minimap,K=x.get(48),A=x.get(70);this.renderMinimap=V.renderMinimap,this.size=A.size,this.minimapHeightIsEditorHeight=V.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=x.get(101),this.paddingTop=x.get(81).top,this.paddingBottom=x.get(81).bottom,this.showSlider=A.showSlider,this.autohide=A.autohide,this.pixelRatio=F,this.typicalHalfwidthCharacterWidth=K.typicalHalfwidthCharacterWidth,this.lineHeight=x.get(64),this.minimapLeft=V.minimapLeft,this.minimapWidth=V.minimapWidth,this.minimapHeight=B.height,this.canvasInnerWidth=V.minimapCanvasInnerWidth,this.canvasInnerHeight=V.minimapCanvasInnerHeight,this.canvasOuterWidth=V.minimapCanvasOuterWidth,this.canvasOuterHeight=V.minimapCanvasOuterHeight,this.isSampling=V.minimapIsSampling,this.editorHeight=B.height,this.fontScale=V.minimapScale,this.minimapLineHeight=V.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,a.once)(()=>o.MinimapCharRendererFactory.create(this.fontScale,K.fontFamily)),this.defaultBackgroundColor=P.getColor(2),this.backgroundColor=v._getMinimapBackground(N,this.defaultBackgroundColor),this.foregroundAlpha=v._getMinimapForegroundOpacity(N)}static _getMinimapBackground(M,N){const P=M.getColor(r.minimapBackground);return P?new t.RGBA8(P.rgba.r,P.rgba.g,P.rgba.b,Math.round(255*P.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,P,x,F,B,V,K,A){this.scrollTop=M,this.scrollHeight=N,this.sliderNeeded=P,this._computedSliderRatio=x,this.sliderTop=F,this.sliderHeight=B,this.topPaddingLineCount=V,this.startLineNumber=K,this.endLineNumber=A}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),P=Math.min(this.endLineNumber,M.endLineNumber);return N>P?null:[N,P]}getYForLineNumber(M,N){return+(M-this.startLineNumber+this.topPaddingLineCount)*N}static create(M,N,P,x,F,B,V,K,A,Y,ie){const le=M.pixelRatio,ne=M.minimapLineHeight,se=Math.floor(M.canvasInnerHeight/ne),H=M.lineHeight;if(M.minimapHeightIsEditorHeight){let he=K*M.lineHeight+M.paddingTop+M.paddingBottom;M.scrollBeyondLastLine&&(he+=Math.max(0,F-M.lineHeight-M.paddingBottom));const de=Math.max(1,Math.floor(F*F/he)),ue=Math.max(0,M.minimapHeight-de),q=ue/(Y-F),z=A*q,U=ue>0,X=Math.floor(M.canvasInnerHeight/M.minimapLineHeight),te=Math.floor(M.paddingTop/M.lineHeight);return new f(A,Y,U,q,z,de,te,1,Math.min(V,X))}let W;if(B&&P!==V){const he=P-N+1;W=Math.floor(he*ne/le)}else{const he=F/H;W=Math.floor(he*ne/le)}const $=Math.floor(M.paddingTop/H);let Z=Math.floor(M.paddingBottom/H);if(M.scrollBeyondLastLine){const he=F/H;Z=Math.max(Z,he-1)}let Q;if(Z>0){const he=F/H;Q=($+V+Z-he-1)*ne/le}else Q=Math.max(0,($+V)*ne/le-W);Q=Math.min(M.minimapHeight-W,Q);const re=Q/(Y-F),ce=A*re;if(se>=$+V+Z){const he=Q>0;return new f(A,Y,he,re,ce,W,$,1,V)}else{let he;N>1?he=N+$:he=Math.max(1,A/H);let de,ue=Math.max(1,Math.floor(he-ce*le/ne));ue<$?(de=$-ue+1,ue=1):(de=0,ue=Math.max(1,ue-$)),ie&&ie.scrollHeight===Y&&(ie.scrollTop>A&&(ue=Math.min(ue,ie.startLineNumber),de=Math.max(de,ie.topPaddingLineCount)),ie.scrollTop<A&&(ue=Math.max(ue,ie.startLineNumber),de=Math.min(de,ie.topPaddingLineCount)));const q=Math.min(V,ue-de+se-1),z=(A-x)/H;let U;return A>M.paddingTop?U=(N-ue+de+z)*ne/le:U=A/M.paddingTop*(de+z)*ne/le,new f(A,Y,!0,re,U,W,de,ue,q)}}}class p{constructor(M){this.dy=M}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}p.INVALID=new p(-1);class C{constructor(M,N,P){this.renderedLayout=M,this._imageData=N,this._renderedLines=new S.RenderedLinesCollection(()=>p.INVALID),this._renderedLines._set(M.startLineNumber,P)}linesEquals(M){if(!this.scrollEquals(M))return!1;const P=this._renderedLines._get().lines;for(let x=0,F=P.length;x<F;x++)if(P[x].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 y{constructor(M,N,P,x){this._backgroundFillData=y._createBackgroundFillData(N,P,x),this._buffers=[M.createImageData(N,P),M.createImageData(N,P)],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,P){const x=P.r,F=P.g,B=P.b,V=P.a,K=new Uint8ClampedArray(M*N*4);let A=0;for(let Y=0;Y<N;Y++)for(let ie=0;ie<M;ie++)K[A]=x,K[A+1]=F,K[A+2]=B,K[A+3]=V,A+=4;return K}}class E{static compute(M,N,P){if(M.renderMinimap===0||!M.isSampling)return[null,[]];const{minimapLineCount:x}=m.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:N,scrollBeyondLastLine:M.scrollBeyondLastLine,paddingTop:M.paddingTop,paddingBottom:M.paddingBottom,height:M.editorHeight,lineHeight:M.lineHeight,pixelRatio:M.pixelRatio}),F=N/x,B=F/2;if(!P||P.minimapLines.length===0){const W=[];if(W[0]=1,x>1){for(let $=0,Z=x-1;$<Z;$++)W[$]=Math.round($*F+B);W[x-1]=N}return[new E(F,W),[]]}const V=P.minimapLines,K=V.length,A=[];let Y=0,ie=0,le=1;const ne=10;let se=[],H=null;for(let W=0;W<x;W++){const $=Math.max(le,Math.round(W*F)),Z=Math.max($,Math.round((W+1)*F));for(;Y<K&&V[Y]<$;){if(se.length<ne){const re=Y+1+ie;H&&H.type==="deleted"&&H._oldIndex===Y-1?H.deleteToLineNumber++:(H={type:"deleted",_oldIndex:Y,deleteFromLineNumber:re,deleteToLineNumber:re},se.push(H)),ie--}Y++}let Q;if(Y<K&&V[Y]<=Z)Q=V[Y],Y++;else if(W===0?Q=1:W+1===x?Q=N:Q=Math.round(W*F+B),se.length<ne){const re=Y+1+ie;H&&H.type==="inserted"&&H._i===W-1?H.insertToLineNumber++:(H={type:"inserted",_i:W,insertFromLineNumber:re,insertToLineNumber:re},se.push(H)),ie++}A[W]=Q,le=Q}if(se.length<ne)for(;Y<K;){const W=Y+1+ie;H&&H.type==="deleted"&&H._oldIndex===Y-1?H.deleteToLineNumber++:(H={type:"deleted",_oldIndex:Y,deleteFromLineNumber:W,deleteToLineNumber:W},se.push(H)),ie--,Y++}else se=[{type:"flush"}];return[new E(F,A),se]}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 P=this.modelLineToMinimapLine(M)-1;for(;P>0&&this.minimapLines[P-1]>=M;)P--;let x=this.modelLineToMinimapLine(N)-1;for(;x+1<this.minimapLines.length&&this.minimapLines[x+1]<=N;)x++;if(P===x){const F=this.minimapLines[P];if(F<M||F>N)return null}return[P+1,x+1]}decorationLineRangeToMinimapLineRange(M,N){let P=this.modelLineToMinimapLine(M),x=this.modelLineToMinimapLine(N);return M!==N&&x===P&&(x===this.minimapLines.length?P>1&&P--:x++),[P,x]}onLinesDeleted(M){const N=M.toLineNumber-M.fromLineNumber+1;let P=this.minimapLines.length,x=0;for(let F=this.minimapLines.length-1;F>=0&&!(this.minimapLines[F]<M.fromLineNumber);F--)this.minimapLines[F]<=M.toLineNumber?(this.minimapLines[F]=Math.max(1,M.fromLineNumber-1),P=Math.min(P,F),x=Math.max(x,F)):this.minimapLines[F]-=N;return[P,x]}onLinesInserted(M){const N=M.toLineNumber-M.fromLineNumber+1;for(let P=this.minimapLines.length-1;P>=0&&!(this.minimapLines[P]<M.fromLineNumber);P--)this.minimapLines[P]+=N}}class I extends g.ViewPart{constructor(M){super(M),this.tokensColorTracker=i.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new v(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 v(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,P]=this._samplingState.onLinesDeleted(M);return N<=P&&this._actual.onLinesChanged(N+1,P-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 P of M.ranges){const x=this._samplingState.modelLineRangeToMinimapLineRange(P.fromLineNumber,P.toLineNumber);x&&N.push({fromLineNumber:x[0],toLineNumber:x[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,P=M.visibleRange.endLineNumber;this._samplingState&&(N=this._samplingState.modelLineToMinimapLine(N),P=this._samplingState.modelLineToMinimapLine(P));const x={viewportContainsWhitespaceGaps:M.viewportData.whitespaceViewportData.length>0,scrollWidth:M.scrollWidth,scrollHeight:M.scrollHeight,viewportStartLineNumber:N,viewportEndLineNumber:P,viewportStartLineNumberVerticalOffset:M.getVerticalOffsetForLineNumber(N),scrollTop:M.scrollTop,scrollLeft:M.scrollLeft,viewportWidth:M.viewportWidth,viewportHeight:M.viewportHeight};this._actual.render(x)}_recreateLineSampling(){this._minimapSelections=null;const M=!!this._samplingState,[N,P]=E.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=N,M&&this._samplingState)for(const x of P)switch(x.type){case"deleted":this._actual.onLinesDeleted(x.deleteFromLineNumber,x.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(x.insertFromLineNumber,x.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,P){if(this._samplingState){const x=[];for(let F=0,B=N-M+1;F<B;F++)P[F]?x[F]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[M+F-1]):x[F]=null;return x}return this._context.viewModel.getMinimapLinesRenderingData(M,N,P).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const M of this._selections){const[N,P]=this._samplingState.decorationLineRangeToMinimapLineRange(M.startLineNumber,M.endLineNumber);this._minimapSelections.push(new d.Selection(N,M.startColumn,P,M.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(M,N){let P;if(this._samplingState){const F=this._samplingState.minimapLines[M-1],B=this._samplingState.minimapLines[N-1];P=new s.Range(F,1,B,this._context.viewModel.getLineMaxColumn(B))}else P=new s.Range(M,1,N,this._context.viewModel.getLineMaxColumn(N));const x=this._context.viewModel.getMinimapDecorationsInRange(P);if(this._samplingState){const F=[];for(const B of x){if(!B.options.minimap)continue;const V=B.range,K=this._samplingState.modelLineToMinimapLine(V.startLineNumber),A=this._samplingState.modelLineToMinimapLine(V.endLineNumber);F.push(new n.ViewModelDecoration(new s.Range(K,V.startColumn,A,V.endColumn),B.options))}return F}return x}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(M){this._samplingState&&(M=this._samplingState.minimapLines[M-1]),this._context.viewModel.revealRange("mouse",!1,new s.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")),g.PartFingerprints.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(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=_.addStandardDisposableListener(this._domNode.domNode,_.EventType.POINTER_DOWN,P=>{if(P.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(P.button===0&&this._lastRenderData){const A=_.getDomNodePagePosition(this._slider.domNode),Y=A.top+A.height/2;this._startSliderDragging(P,Y,this._lastRenderData.renderedLayout)}return}const F=this._model.options.minimapLineHeight,B=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*P.offsetY;let K=Math.floor(B/F)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;K=Math.min(K,this._model.getLineCount()),this._model.revealLineNumber(K)}),this._sliderPointerMoveMonitor=new L.GlobalPointerMoveMonitor,this._sliderPointerDownListener=_.addStandardDisposableListener(this._slider.domNode,_.EventType.POINTER_DOWN,P=>{P.preventDefault(),P.stopPropagation(),P.button===0&&this._lastRenderData&&this._startSliderDragging(P,P.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=h.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=_.addDisposableListener(this._domNode.domNode,h.EventType.Start,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(P))},{passive:!1}),this._sliderTouchMoveListener=_.addDisposableListener(this._domNode.domNode,h.EventType.Change,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(P)},{passive:!1}),this._sliderTouchEndListener=_.addStandardDisposableListener(this._domNode.domNode,h.EventType.End,P=>{P.preventDefault(),P.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(M,N,P){if(!M.target||!(M.target instanceof Element))return;const x=M.pageX;this._slider.toggleClassName("active",!0);const F=(B,V)=>{const K=_.getDomNodePagePosition(this._domNode.domNode),A=Math.min(Math.abs(V-x),Math.abs(V-K.left),Math.abs(V-K.left-K.width));if(w.isWindows&&A>l){this._model.setScrollTop(P.scrollTop);return}const Y=B-N;this._model.setScrollTop(P.getDesiredScrollTopFromDelta(Y))};M.pageY!==N&&F(M.pageY,x),this._sliderPointerMoveMonitor.startMonitoring(M.target,M.pointerId,M.buttons,B=>F(B.pageY,B.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(M){const N=this._domNode.domNode.getBoundingClientRect().top,P=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(M.pageY-N);this._model.setScrollTop(P)}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 y(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 P;return(P=this._lastRenderData)===null||P===void 0||P.onLinesDeleted(M,N),!0}onLinesInserted(M,N){var P;return(P=this._lastRenderData)===null||P===void 0||P.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 P=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(P.sliderNeeded?"block":"none"),this._slider.setTop(P.sliderTop),this._slider.setHeight(P.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(P.sliderHeight),this.renderDecorations(P),this._lastRenderData=this.renderLines(P)}renderDecorations(M){if(this._renderDecorations){this._renderDecorations=!1;const N=this._model.getSelections();N.sort(s.Range.compareRangesUsingStarts);const P=this._model.getMinimapDecorationsInViewport(M.startLineNumber,M.endLineNumber);P.sort((le,ne)=>(le.options.zIndex||0)-(ne.options.zIndex||0));const{canvasInnerWidth:x,canvasInnerHeight:F}=this._model.options,B=this._model.options.minimapLineHeight,V=this._model.options.minimapCharWidth,K=this._model.getOptions().tabSize,A=this._decorationsCanvas.domNode.getContext("2d");A.clearRect(0,0,x,F);const Y=new O(M.startLineNumber,M.endLineNumber,!1);this._renderSelectionLineHighlights(A,N,Y,M,B),this._renderDecorationsLineHighlights(A,P,Y,M,B);const ie=new O(M.startLineNumber,M.endLineNumber,null);this._renderSelectionsHighlights(A,N,ie,M,B,K,V,x),this._renderDecorationsHighlights(A,P,ie,M,B,K,V,x)}}_renderSelectionLineHighlights(M,N,P,x,F){if(!this._selectionColor||this._selectionColor.isTransparent())return;M.fillStyle=this._selectionColor.transparent(.5).toString();let B=0,V=0;for(const K of N){const A=x.intersectWithViewport(K);if(!A)continue;const[Y,ie]=A;for(let se=Y;se<=ie;se++)P.set(se,!0);const le=x.getYForLineNumber(Y,F),ne=x.getYForLineNumber(ie,F);V>=le||(V>B&&M.fillRect(m.MINIMAP_GUTTER_WIDTH,B,M.canvas.width,V-B),B=le),V=ne}V>B&&M.fillRect(m.MINIMAP_GUTTER_WIDTH,B,M.canvas.width,V-B)}_renderDecorationsLineHighlights(M,N,P,x,F){const B=new Map;for(let V=N.length-1;V>=0;V--){const K=N[V],A=K.options.minimap;if(!A||A.position!==c.MinimapPosition.Inline)continue;const Y=x.intersectWithViewport(K.range);if(!Y)continue;const[ie,le]=Y,ne=A.getColor(this._theme.value);if(!ne||ne.isTransparent())continue;let se=B.get(ne.toString());se||(se=ne.transparent(.5).toString(),B.set(ne.toString(),se)),M.fillStyle=se;for(let H=ie;H<=le;H++){if(P.has(H))continue;P.set(H,!0);const W=x.getYForLineNumber(ie,F);M.fillRect(m.MINIMAP_GUTTER_WIDTH,W,M.canvas.width,F)}}}_renderSelectionsHighlights(M,N,P,x,F,B,V,K){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const A of N){const Y=x.intersectWithViewport(A);if(!Y)continue;const[ie,le]=Y;for(let ne=ie;ne<=le;ne++)this.renderDecorationOnLine(M,P,A,this._selectionColor,x,ne,F,F,B,V,K)}}_renderDecorationsHighlights(M,N,P,x,F,B,V,K){for(const A of N){const Y=A.options.minimap;if(!Y)continue;const ie=x.intersectWithViewport(A.range);if(!ie)continue;const[le,ne]=ie,se=Y.getColor(this._theme.value);if(!(!se||se.isTransparent()))for(let H=le;H<=ne;H++)switch(Y.position){case c.MinimapPosition.Inline:this.renderDecorationOnLine(M,P,A.range,se,x,H,F,F,B,V,K);continue;case c.MinimapPosition.Gutter:{const W=x.getYForLineNumber(H,F),$=2;this.renderDecoration(M,se,$,W,u,F);continue}}}}renderDecorationOnLine(M,N,P,x,F,B,V,K,A,Y,ie){const le=F.getYForLineNumber(B,K);if(le+V<0||le>this._model.options.canvasInnerHeight)return;const{startLineNumber:ne,endLineNumber:se}=P,H=ne===B?P.startColumn:1,W=se===B?P.endColumn:this._model.getLineMaxColumn(B),$=this.getXOffsetForPosition(N,B,H,A,Y,ie),Z=this.getXOffsetForPosition(N,B,W,A,Y,ie);this.renderDecoration(M,x,$,le,Z-$,V)}getXOffsetForPosition(M,N,P,x,F,B){if(P===1)return m.MINIMAP_GUTTER_WIDTH;if((P-1)*F>=B)return B;let K=M.get(N);if(!K){const A=this._model.getLineContent(N);K=[m.MINIMAP_GUTTER_WIDTH];let Y=m.MINIMAP_GUTTER_WIDTH;for(let ie=1;ie<A.length+1;ie++){const le=A.charCodeAt(ie-1),ne=le===9?x*F:b.isFullWidthCharacter(le)?2*F:F,se=Y+ne;if(se>=B){K[ie]=B;break}K[ie]=se,Y=se}M.set(N,K)}return P-1<K.length?K[P-1]:B}renderDecoration(M,N,P,x,F,B){M.fillStyle=N&&N.toString()||"",M.fillRect(P,x,F,B)}renderLines(M){const N=M.startLineNumber,P=M.endLineNumber,x=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(M)){const ae=this._lastRenderData._get();return new C(M,ae.imageData,ae.lines)}const F=this._getBuffer();if(!F)return null;const[B,V,K]=T._renderUntouchedLines(F,M.topPaddingLineCount,N,P,x,this._lastRenderData),A=this._model.getMinimapLinesRenderingData(N,P,K),Y=this._model.getOptions().tabSize,ie=this._model.options.defaultBackgroundColor,le=this._model.options.backgroundColor,ne=this._model.options.foregroundAlpha,se=this._model.tokensColorTracker,H=se.backgroundIsLight(),W=this._model.options.renderMinimap,$=this._model.options.charRenderer(),Z=this._model.options.fontScale,Q=this._model.options.minimapCharWidth,ce=(W===1?2:2+1)*Z,he=x>ce?Math.floor((x-ce)/2):0,de=le.a/255,ue=new t.RGBA8(Math.round((le.r-ie.r)*de+ie.r),Math.round((le.g-ie.g)*de+ie.g),Math.round((le.b-ie.b)*de+ie.b),255);let q=M.topPaddingLineCount*x;const z=[];for(let ae=0,fe=P-N+1;ae<fe;ae++)K[ae]&&T._renderLine(F,ue,le.a,H,W,Q,se,ne,$,q,he,Y,A[ae],Z,x),z[ae]=new p(q),q+=x;const U=B===-1?0:B,te=(V===-1?F.height:V)-U;return this._canvas.domNode.getContext("2d").putImageData(F,0,0,0,U,F.width,te),new C(M,F,z)}static _renderUntouchedLines(M,N,P,x,F,B){const V=[];if(!B){for(let q=0,z=x-P+1;q<z;q++)V[q]=!0;return[-1,-1,V]}const K=B._get(),A=K.imageData.data,Y=K.rendLineNumberStart,ie=K.lines,le=ie.length,ne=M.width,se=M.data,H=(x-P+1)*F*ne*4;let W=-1,$=-1,Z=-1,Q=-1,re=-1,ce=-1,he=N*F;for(let q=P;q<=x;q++){const z=q-P,U=q-Y,X=U>=0&&U<le?ie[U].dy:-1;if(X===-1){V[z]=!0,he+=F;continue}const te=X*ne*4,G=(X+F)*ne*4,ae=he*ne*4,fe=(he+F)*ne*4;Q===te&&ce===ae?(Q=G,ce=fe):(Z!==-1&&(se.set(A.subarray(Z,Q),re),W===-1&&Z===0&&Z===re&&(W=Q),$===-1&&Q===H&&Z===re&&($=Z)),Z=te,Q=G,re=ae,ce=fe),V[z]=!1,he+=F}Z!==-1&&(se.set(A.subarray(Z,Q),re),W===-1&&Z===0&&Z===re&&(W=Q),$===-1&&Q===H&&Z===re&&($=Z));const de=W===-1?-1:W/(ne*4),ue=$===-1?-1:$/(ne*4);return[de,ue,V]}static _renderLine(M,N,P,x,F,B,V,K,A,Y,ie,le,ne,se,H){const W=ne.content,$=ne.tokens,Z=M.width-B,Q=H===1;let re=m.MINIMAP_GUTTER_WIDTH,ce=0,he=0;for(let de=0,ue=$.getCount();de<ue;de++){const q=$.getEndOffset(de),z=$.getForeground(de),U=V.getColor(z);for(;ce<q;ce++){if(re>Z)return;const X=W.charCodeAt(ce);if(X===9){const te=le-(ce+he)%le;he+=te-1,re+=te*B}else if(X===32)re+=B;else{const te=b.isFullWidthCharacter(X)?2:1;for(let G=0;G<te;G++)if(F===2?A.blockRenderChar(M,re,Y+ie,U,K,N,P,Q):A.renderChar(M,re,Y+ie,X,U,K,N,P,se,x,Q),re+=B,re>Z)return}}}}}class O{constructor(M,N,P){this._startLineNumber=M,this._endLineNumber=N,this._defaultValue=P,this._values=[];for(let x=0,F=this._endLineNumber-this._startLineNumber+1;x<F;x++)this._values[x]=P}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[241],ee([1,0,678,33,448]),function(j,e,_,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,_.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,_.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,k.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,_.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,_.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,_.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,k.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,_.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,k.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,_.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,k.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,_.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,k.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,_.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,k.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,_.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,_.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,_.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,k.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,_.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,k.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,_.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,_.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,_.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,k.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.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,_.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,k.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,_.localize)(32,null))}),define(J[794],ee([1,0,26,108,615,166,241]),function(j,e,_,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMenuItems=void 0;const D=Object.freeze({kind:k.CodeActionKind.Empty,title:(0,L.localize)(0,null)}),w=Object.freeze([{kind:k.CodeActionKind.QuickFix,title:(0,L.localize)(1,null)},{kind:k.CodeActionKind.RefactorExtract,title:(0,L.localize)(2,null),icon:_.Codicon.wrench},{kind:k.CodeActionKind.RefactorInline,title:(0,L.localize)(3,null),icon:_.Codicon.wrench},{kind:k.CodeActionKind.RefactorRewrite,title:(0,L.localize)(4,null),icon:_.Codicon.wrench},{kind:k.CodeActionKind.RefactorMove,title:(0,L.localize)(5,null),icon:_.Codicon.wrench},{kind:k.CodeActionKind.SurroundWith,title:(0,L.localize)(6,null),icon:_.Codicon.symbolSnippet},{kind:k.CodeActionKind.Source,title:(0,L.localize)(7,null),icon:_.Codicon.symbolFile},D]);function b(S,g,m){if(!g)return S.map(i=>({kind:"action",item:i,group:D,disabled:!!i.action.disabled,label:i.action.disabled||i.action.title}));const s=w.map(i=>({group:i,actions:[]}));for(const i of S){const n=i.action.kind?new k.CodeActionKind(i.action.kind):k.CodeActionKind.None;for(const r of s)if(r.group.kind.contains(n)){r.actions.push(i);break}}const t=[];for(const i of s)if(i.actions.length){t.push({kind:"header",group:i.group});for(const n of i.actions)t.push({kind:"action",item:n,group:i.group,label:n.action.title,disabled:!!n.action.disabled,keybinding:m(n.action)})}return t}e.toMenuItems=b}),define(J[100],ee([1,0,33,36]),function(j,e,_,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 L(w,b){const S=Object.assign({},b);for(const g in w){const m=w[g];S[g]=m!==void 0?(0,_.asCssVariable)(m):void 0}return S}e.defaultKeybindingLabelStyles={keybindingLabelBackground:(0,_.asCssVariable)(_.keybindingLabelBackground),keybindingLabelForeground:(0,_.asCssVariable)(_.keybindingLabelForeground),keybindingLabelBorder:(0,_.asCssVariable)(_.keybindingLabelBorder),keybindingLabelBottomBorder:(0,_.asCssVariable)(_.keybindingLabelBottomBorder),keybindingLabelShadow:(0,_.asCssVariable)(_.widgetShadow)},e.defaultButtonStyles={buttonForeground:(0,_.asCssVariable)(_.buttonForeground),buttonSeparator:(0,_.asCssVariable)(_.buttonSeparator),buttonBackground:(0,_.asCssVariable)(_.buttonBackground),buttonHoverBackground:(0,_.asCssVariable)(_.buttonHoverBackground),buttonSecondaryForeground:(0,_.asCssVariable)(_.buttonSecondaryForeground),buttonSecondaryBackground:(0,_.asCssVariable)(_.buttonSecondaryBackground),buttonSecondaryHoverBackground:(0,_.asCssVariable)(_.buttonSecondaryHoverBackground),buttonBorder:(0,_.asCssVariable)(_.buttonBorder)},e.defaultProgressBarStyles={progressBarBackground:(0,_.asCssVariable)(_.progressBarBackground)},e.defaultToggleStyles={inputActiveOptionBorder:(0,_.asCssVariable)(_.inputActiveOptionBorder),inputActiveOptionForeground:(0,_.asCssVariable)(_.inputActiveOptionForeground),inputActiveOptionBackground:(0,_.asCssVariable)(_.inputActiveOptionBackground)},e.defaultCheckboxStyles={checkboxBackground:(0,_.asCssVariable)(_.checkboxBackground),checkboxBorder:(0,_.asCssVariable)(_.checkboxBorder),checkboxForeground:(0,_.asCssVariable)(_.checkboxForeground)},e.defaultDialogStyles={dialogBackground:(0,_.asCssVariable)(_.editorWidgetBackground),dialogForeground:(0,_.asCssVariable)(_.editorWidgetForeground),dialogShadow:(0,_.asCssVariable)(_.widgetShadow),dialogBorder:(0,_.asCssVariable)(_.contrastBorder),errorIconForeground:(0,_.asCssVariable)(_.problemsErrorIconForeground),warningIconForeground:(0,_.asCssVariable)(_.problemsWarningIconForeground),infoIconForeground:(0,_.asCssVariable)(_.problemsInfoIconForeground),textLinkForeground:(0,_.asCssVariable)(_.textLinkForeground)},e.defaultInputBoxStyles={inputBackground:(0,_.asCssVariable)(_.inputBackground),inputForeground:(0,_.asCssVariable)(_.inputForeground),inputBorder:(0,_.asCssVariable)(_.inputBorder),inputValidationInfoBorder:(0,_.asCssVariable)(_.inputValidationInfoBorder),inputValidationInfoBackground:(0,_.asCssVariable)(_.inputValidationInfoBackground),inputValidationInfoForeground:(0,_.asCssVariable)(_.inputValidationInfoForeground),inputValidationWarningBorder:(0,_.asCssVariable)(_.inputValidationWarningBorder),inputValidationWarningBackground:(0,_.asCssVariable)(_.inputValidationWarningBackground),inputValidationWarningForeground:(0,_.asCssVariable)(_.inputValidationWarningForeground),inputValidationErrorBorder:(0,_.asCssVariable)(_.inputValidationErrorBorder),inputValidationErrorBackground:(0,_.asCssVariable)(_.inputValidationErrorBackground),inputValidationErrorForeground:(0,_.asCssVariable)(_.inputValidationErrorForeground)},e.defaultFindWidgetStyles={listFilterWidgetBackground:(0,_.asCssVariable)(_.listFilterWidgetBackground),listFilterWidgetOutline:(0,_.asCssVariable)(_.listFilterWidgetOutline),listFilterWidgetNoMatchesOutline:(0,_.asCssVariable)(_.listFilterWidgetNoMatchesOutline),listFilterWidgetShadow:(0,_.asCssVariable)(_.listFilterWidgetShadow),inputBoxStyles:e.defaultInputBoxStyles,toggleStyles:e.defaultToggleStyles},e.defaultCountBadgeStyles={badgeBackground:(0,_.asCssVariable)(_.badgeBackground),badgeForeground:(0,_.asCssVariable)(_.badgeForeground),badgeBorder:(0,_.asCssVariable)(_.contrastBorder)},e.defaultBreadcrumbsWidgetStyles={breadcrumbsBackground:(0,_.asCssVariable)(_.breadcrumbsBackground),breadcrumbsForeground:(0,_.asCssVariable)(_.breadcrumbsForeground),breadcrumbsHoverForeground:(0,_.asCssVariable)(_.breadcrumbsFocusForeground),breadcrumbsFocusForeground:(0,_.asCssVariable)(_.breadcrumbsFocusForeground),breadcrumbsFocusAndSelectionForeground:(0,_.asCssVariable)(_.breadcrumbsActiveSelectionForeground)},e.defaultListStyles={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,_.asCssVariable)(_.listFocusBackground),listFocusForeground:(0,_.asCssVariable)(_.listFocusForeground),listFocusOutline:(0,_.asCssVariable)(_.listFocusOutline),listActiveSelectionBackground:(0,_.asCssVariable)(_.listActiveSelectionBackground),listActiveSelectionForeground:(0,_.asCssVariable)(_.listActiveSelectionForeground),listActiveSelectionIconForeground:(0,_.asCssVariable)(_.listActiveSelectionIconForeground),listFocusAndSelectionOutline:(0,_.asCssVariable)(_.listFocusAndSelectionOutline),listFocusAndSelectionBackground:(0,_.asCssVariable)(_.listActiveSelectionBackground),listFocusAndSelectionForeground:(0,_.asCssVariable)(_.listActiveSelectionForeground),listInactiveSelectionBackground:(0,_.asCssVariable)(_.listInactiveSelectionBackground),listInactiveSelectionIconForeground:(0,_.asCssVariable)(_.listInactiveSelectionIconForeground),listInactiveSelectionForeground:(0,_.asCssVariable)(_.listInactiveSelectionForeground),listInactiveFocusBackground:(0,_.asCssVariable)(_.listInactiveFocusBackground),listInactiveFocusOutline:(0,_.asCssVariable)(_.listInactiveFocusOutline),listHoverBackground:(0,_.asCssVariable)(_.listHoverBackground),listHoverForeground:(0,_.asCssVariable)(_.listHoverForeground),listDropBackground:(0,_.asCssVariable)(_.listDropBackground),listSelectionOutline:(0,_.asCssVariable)(_.activeContrastBorder),listHoverOutline:(0,_.asCssVariable)(_.activeContrastBorder),treeIndentGuidesStroke:(0,_.asCssVariable)(_.treeIndentGuidesStroke),treeInactiveIndentGuidesStroke:(0,_.asCssVariable)(_.treeInactiveIndentGuidesStroke),tableColumnsBorder:(0,_.asCssVariable)(_.tableColumnsBorder),tableOddRowsBackgroundColor:(0,_.asCssVariable)(_.tableOddRowsBackgroundColor)};function D(w){return L(w,e.defaultListStyles)}e.getListStyles=D,e.defaultSelectBoxStyles={selectBackground:(0,_.asCssVariable)(_.selectBackground),selectListBackground:(0,_.asCssVariable)(_.selectListBackground),selectForeground:(0,_.asCssVariable)(_.selectForeground),decoratorRightForeground:(0,_.asCssVariable)(_.pickerGroupForeground),selectBorder:(0,_.asCssVariable)(_.selectBorder),focusBorder:(0,_.asCssVariable)(_.focusBorder),listFocusBackground:(0,_.asCssVariable)(_.quickInputListFocusBackground),listInactiveSelectionIconForeground:(0,_.asCssVariable)(_.quickInputListFocusIconForeground),listFocusForeground:(0,_.asCssVariable)(_.quickInputListFocusForeground),listFocusOutline:(0,_.asCssVariableWithDefault)(_.activeContrastBorder,k.Color.transparent.toString()),listHoverBackground:(0,_.asCssVariable)(_.listHoverBackground),listHoverForeground:(0,_.asCssVariable)(_.listHoverForeground),listHoverOutline:(0,_.asCssVariable)(_.activeContrastBorder),selectListBorder:(0,_.asCssVariable)(_.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,_.asCssVariable)(_.widgetShadow),borderColor:(0,_.asCssVariable)(_.menuBorder),foregroundColor:(0,_.asCssVariable)(_.menuForeground),backgroundColor:(0,_.asCssVariable)(_.menuBackground),selectionForegroundColor:(0,_.asCssVariable)(_.menuSelectionForeground),selectionBackgroundColor:(0,_.asCssVariable)(_.menuSelectionBackground),selectionBorderColor:(0,_.asCssVariable)(_.menuSelectionBorder),separatorColor:(0,_.asCssVariable)(_.menuSeparatorBackground),scrollbarShadow:(0,_.asCssVariable)(_.scrollbarShadow),scrollbarSliderBackground:(0,_.asCssVariable)(_.scrollbarSliderBackground),scrollbarSliderHoverBackground:(0,_.asCssVariable)(_.scrollbarSliderHoverBackground),scrollbarSliderActiveBackground:(0,_.asCssVariable)(_.scrollbarSliderActiveBackground)}}),define(J[795],ee([1,0,7,294,295,218,64,2,42,62,640,8,34,155,100,153]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,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 d=e.DataSource=class{constructor(C){this._resolverService=C}hasChildren(C){return C instanceof r.ReferencesModel||C instanceof r.FileReferences}getChildren(C){if(C instanceof r.ReferencesModel)return C.groups;if(C instanceof r.FileReferences)return C.resolve(this._resolverService).then(y=>y.children);throw new Error("bad tree")}};e.DataSource=d=Te([ge(0,g.ITextModelService)],d);class h{getHeight(){return 23}getTemplateId(C){return C instanceof r.FileReferences?l.id:v.id}}e.Delegate=h;let o=e.StringRepresentationProvider=class{constructor(C){this._keybindingService=C}getKeyboardNavigationLabel(C){var y;if(C instanceof r.OneReference){const E=(y=C.parent.getPreview(C))===null||y===void 0?void 0:y.preview(C.range);if(E)return E.value}return(0,S.basename)(C.uri)}};e.StringRepresentationProvider=o=Te([ge(0,t.IKeybindingService)],o);class c{getId(C){return C instanceof r.OneReference?C.id:C.uri}}e.IdentityProvider=c;let a=class extends b.Disposable{constructor(C,y){super(),this._labelService=y;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(_.append(E,_.$(".count")),{},n.defaultCountBadgeStyles),C.appendChild(E)}set(C,y){const E=(0,S.dirname)(C.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(C.uri),this._labelService.getUriLabel(E,{relative:!0}),{title:this._labelService.getUriLabel(C.uri),matches:y});const I=C.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=Te([ge(1,i.ILabelService)],a);let l=e.FileReferencesRenderer=class Hi{constructor(C){this._instantiationService=C,this.templateId=Hi.id}renderTemplate(C){return this._instantiationService.createInstance(a,C)}renderElement(C,y,E){E.set(C.element,(0,w.createMatches)(C.filterData))}disposeTemplate(C){C.dispose()}};l.id="FileReferencesRenderer",e.FileReferencesRenderer=l=Te([ge(0,s.IInstantiationService)],l);class u{constructor(C){this.label=new L.HighlightedLabel(C)}set(C,y){var E;const I=(E=C.parent.getPreview(C))===null||E===void 0?void 0:E.preview(C.range);if(!I||!I.value)this.label.set(`${(0,S.basename)(C.uri)}:${C.range.startLineNumber+1}:${C.range.startColumn+1}`);else{const{value:T,highlight:O}=I;y&&!w.FuzzyScore.isDefault(y)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(T,(0,w.createMatches)(y))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(T,[O]))}}}class v{constructor(){this.templateId=v.id}renderTemplate(C){return new u(C)}renderElement(C,y,E){E.set(C.element,C.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=v,v.id="OneReferenceRenderer";class f{getWidgetAriaLabel(){return(0,m.localize)(2,null)}getAriaLabel(C){return C.ariaMessage}}e.AccessibilityProvider=f}),define(J[796],ee([1,0,7,214,109,26,2,17,31,687,55,34,100,33,259]),function(j,e,_,k,L,D,w,b,S,g,m,s,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 n{get templateId(){return"header"}renderTemplate(l){l.classList.add("group-header");const u=document.createElement("span");return l.append(u),{container:l,text:u}}renderElement(l,u,v){var f,p;v.text.textContent=(p=(f=l.group)===null||f===void 0?void 0:f.title)!==null&&p!==void 0?p:""}disposeTemplate(l){}}let r=class{get templateId(){return"action"}constructor(l,u){this._supportsPreview=l,this._keybindingService=u}renderTemplate(l){l.classList.add(this.templateId);const u=document.createElement("div");u.className="icon",l.append(u);const v=document.createElement("span");v.className="title",l.append(v);const f=new k.KeybindingLabel(l,b.OS);return{container:l,icon:u,text:v,keybinding:f}}renderElement(l,u,v){var f,p,C;if(!((f=l.group)===null||f===void 0)&&f.icon?(v.icon.className=S.ThemeIcon.asClassName(l.group.icon),l.group.icon.color&&(v.icon.style.color=(0,i.asCssVariable)(l.group.icon.color.id))):(v.icon.className=S.ThemeIcon.asClassName(D.Codicon.lightBulb),v.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!l.item||!l.label)return;v.text.textContent=c(l.label),v.keybinding.set(l.keybinding),_.setVisibility(!!l.keybinding,v.keybinding.element);const y=(p=this._keybindingService.lookupKeybinding(e.acceptSelectedActionCommand))===null||p===void 0?void 0:p.getLabel(),E=(C=this._keybindingService.lookupKeybinding(e.previewSelectedActionCommand))===null||C===void 0?void 0:C.getLabel();v.container.classList.toggle("option-disabled",l.disabled),l.disabled?v.container.title=l.label:y&&E?this._supportsPreview?v.container.title=(0,g.localize)(0,null,y,E):v.container.title=(0,g.localize)(1,null,y):v.container.title=""}disposeTemplate(l){}};r=Te([ge(1,s.IKeybindingService)],r);class d extends UIEvent{constructor(){super("acceptSelectedAction")}}class h extends UIEvent{constructor(){super("previewSelectedAction")}}let o=e.ActionList=class extends w.Disposable{constructor(l,u,v,f,p,C){super(),this._delegate=f,this._contextViewService=p,this._keybindingService=C,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const y={getHeight:E=>E.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:E=>E.kind};this._list=this._register(new L.List(l,this.domNode,y,[new r(u,this._keybindingService),new n],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:E=>{if(E.kind==="action"){let I=E.label?c(E?.label):"";return E.disabled&&(I=(0,g.localize)(2,null,I,E.disabled)),I}return null},getWidgetAriaLabel:()=>(0,g.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=v,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(l){return!l.disabled&&l.kind==="action"}hide(l){this._delegate.onHide(l),this._contextViewService.hideContextView()}layout(l){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 p=this._allMenuItems.map((I,T)=>{const O=document.getElementById(this._list.getElementID(T));if(O){O.style.width="auto";const R=O.getBoundingClientRect().width;return O.style.width="",R}return 0}),C=Math.max(...p,l),y=.7,E=Math.min(f,document.body.clientHeight*y);return this._list.layout(E,C),this.domNode.style.height=`${E}px`,this._list.domFocus(),C}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(l){const u=this._list.getFocus();if(u.length===0)return;const v=u[0],f=this._list.element(v);if(!this.focusCondition(f))return;const p=l?new h:new d;this._list.setSelection([v],p)}onListSelection(l){if(!l.elements.length)return;const u=l.elements[0];u.item&&this.focusCondition(u)?this._delegate.onSelect(u.item,l.browserEvent instanceof h):this._list.setSelection([])}onListHover(l){this._list.setFocus(typeof l.index=="number"?[l.index]:[])}onListClick(l){l.element&&this.focusCondition(l.element)&&this._list.setFocus([])}};e.ActionList=o=Te([ge(4,m.IContextViewService),ge(5,s.IKeybindingService)],o);function c(a){return a.replace(/\\r\\n|\\r|\\n/g," ")}}),define(J[797],ee([1,0,7,69,2,688,796,30,13,55,49,8,259]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IActionWidgetService=void 0;const t={Visible:new S.RawContextKey("codeActionMenuVisible",!1,(0,D.localize)(0,null))};e.IActionWidgetService=(0,s.createDecorator)("actionWidgetService");let i=class extends L.Disposable{get isVisible(){return t.Visible.getValue(this._contextKeyService)||!1}constructor(d,h,o){super(),this._contextViewService=d,this._contextKeyService=h,this._instantiationService=o,this._list=this._register(new L.MutableDisposable)}show(d,h,o,c,a,l,u){const v=t.Visible.bindTo(this._contextKeyService),f=this._instantiationService.createInstance(w.ActionList,d,h,o,c);this._contextViewService.showContextView({getAnchor:()=>a,render:p=>(v.set(!0),this._renderWidget(p,f,u??[])),onHide:p=>{v.reset(),this._onWidgetClosed(p)}},l,!1)}acceptSelected(d){var h;(h=this._list.value)===null||h===void 0||h.acceptSelected(d)}focusPrevious(){var d,h;(h=(d=this._list)===null||d===void 0?void 0:d.value)===null||h===void 0||h.focusPrevious()}focusNext(){var d,h;(h=(d=this._list)===null||d===void 0?void 0:d.value)===null||h===void 0||h.focusNext()}hide(){var d;(d=this._list.value)===null||d===void 0||d.hide(),this._list.clear()}_renderWidget(d,h,o){var c;const a=document.createElement("div");if(a.classList.add("action-widget"),d.appendChild(a),this._list.value=h,this._list.value)a.appendChild(this._list.value.domNode);else throw new Error("List has no value");const l=new L.DisposableStore,u=document.createElement("div"),v=d.appendChild(u);v.classList.add("context-view-block"),l.add(_.addDisposableListener(v,_.EventType.MOUSE_DOWN,I=>I.stopPropagation()));const f=document.createElement("div"),p=d.appendChild(f);p.classList.add("context-view-pointerBlock"),l.add(_.addDisposableListener(p,_.EventType.POINTER_MOVE,()=>p.remove())),l.add(_.addDisposableListener(p,_.EventType.MOUSE_DOWN,()=>p.remove()));let C=0;if(o.length){const I=this._createActionBar(".action-widget-action-bar",o);I&&(a.appendChild(I.getContainer().parentElement),l.add(I),C=I.getContainer().offsetWidth)}const y=(c=this._list.value)===null||c===void 0?void 0:c.layout(C);a.style.width=`${y}px`;const E=l.add(_.trackFocus(d));return l.add(E.onDidBlur(()=>this.hide())),l}_createActionBar(d,h){if(!h.length)return;const o=_.$(d),c=new k.ActionBar(o);return c.push(h,{icon:!1,label:!0}),c}_onWidgetClosed(d){var h;(h=this._list.value)===null||h===void 0||h.hide(d)}};i=Te([ge(0,g.IContextViewService),ge(1,S.IContextKeyService),ge(2,s.IInstantiationService)],i),(0,m.registerSingleton)(e.IActionWidgetService,i,1);const n=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:n,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:n,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(r){const d=r.get(e.IActionWidgetService);d instanceof i&&d.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:n,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(r){const d=r.get(e.IActionWidgetService);d instanceof i&&d.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:n,primary:3,secondary:[2137]}})}run(r){const d=r.get(e.IActionWidgetService);d instanceof i&&d.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:n,primary:2051}})}run(r){const d=r.get(e.IActionWidgetService);d instanceof i&&d.acceptSelected(!0)}})});var oi=this&&this.__classPrivateFieldSet||function(j,e,_,k,L){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!L)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?j!==e||!L:!e.has(j))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?L.call(j,_):L?L.value=_:e.set(j,_),_},xt=this&&this.__classPrivateFieldGet||function(j,e,_,k){if(_==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?j!==e||!k:!e.has(j))throw new TypeError("Cannot read private member from an object whose class did not declare it");return _==="m"?k:_==="a"?k.call(j):k?k.value:e.get(j)};define(J[242],ee([1,0,7,11,102,2,12,19,131,772,794,338,185,614,797,25,28,13,8,92,80,108,337]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionController=void 0;let f=e.CodeActionController=class Ui extends D.Disposable{static get(C){return C.getContribution(Ui.ID)}constructor(C,y,E,I,T,O,R,M,N,P){super(),this._commandService=R,this._configurationService=M,this._actionWidgetService=N,this._instantiationService=P,this._activeCodeActions=this._register(new D.MutableDisposable),this._showDisabled=!1,v.set(this,!1),this._editor=C,this._model=this._register(new u.CodeActionModel(this._editor,T.codeActionProvider,y,E,O)),this._register(this._model.onDidChangeState(x=>this.update(x))),this._lightBulbWidget=new L.Lazy(()=>{const x=this._editor.getContribution(s.LightBulbWidget.ID);return x&&this._register(x.onClick(F=>this.showCodeActionList(F.actions,F,{includeDisabledActions:!1,fromLightbulb:!0}))),x}),this._resolver=I.createInstance(g.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){oi(this,v,!0,"f"),super.dispose()}showCodeActions(C,y,E){return this.showCodeActionList(y,E,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(C,y,E,I){var T;if(!this._editor.hasModel())return;(T=t.MessageController.get(this._editor))===null||T===void 0||T.closeMessage();const O=this._editor.getPosition();this._trigger({type:1,triggerAction:y,filter:E,autoApply:I,context:{notAvailableMessage:C,position:O}})}_trigger(C){return this._model.trigger(C)}_applyCodeAction(C,y,E){return we(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(S.applyCodeAction,C,S.ApplyCodeActionReason.FromCodeActions,{preview:E,editor:this._editor})}finally{y&&this._trigger({type:2,triggerAction:l.CodeActionTriggerSource.QuickFix,filter:{}})}})}update(C){var y,E,I,T,O,R,M;return we(this,void 0,void 0,function*(){if(C.type!==1){(y=this._lightBulbWidget.rawValue)===null||y===void 0||y.hide();return}let N;try{N=yield C.actions}catch(P){(0,k.onUnexpectedError)(P);return}if(!xt(this,v,"f"))if((E=this._lightBulbWidget.value)===null||E===void 0||E.update(N,C.trigger,C.position),C.trigger.type===1){if(!((I=C.trigger.filter)===null||I===void 0)&&I.include){const x=this.tryGetValidActionToApply(C.trigger,N);if(x){try{(T=this._lightBulbWidget.value)===null||T===void 0||T.hide(),yield this._applyCodeAction(x,!1,!1)}finally{N.dispose()}return}if(C.trigger.context){const F=this.getInvalidActionThatWouldHaveBeenApplied(C.trigger,N);if(F&&F.action.disabled){(O=t.MessageController.get(this._editor))===null||O===void 0||O.showMessage(F.action.disabled,C.trigger.context.position),N.dispose();return}}}const P=!!(!((R=C.trigger.filter)===null||R===void 0)&&R.include);if(C.trigger.context&&(!N.allActions.length||!P&&!N.validActions.length)){(M=t.MessageController.get(this._editor))===null||M===void 0||M.showMessage(C.trigger.context.notAvailableMessage,C.trigger.context.position),this._activeCodeActions.value=N,N.dispose();return}this._activeCodeActions.value=N,this.showCodeActionList(N,this.toCoords(C.position),{includeDisabledActions:P,fromLightbulb:!1})}else this._actionWidgetService.isVisible?N.dispose():this._activeCodeActions.value=N})}getInvalidActionThatWouldHaveBeenApplied(C,y){if(y.allActions.length&&(C.autoApply==="first"&&y.validActions.length===0||C.autoApply==="ifSingle"&&y.allActions.length===1))return y.allActions.find(({action:E})=>E.disabled)}tryGetValidActionToApply(C,y){if(y.validActions.length&&(C.autoApply==="first"&&y.validActions.length>0||C.autoApply==="ifSingle"&&y.validActions.length===1))return y.validActions[0]}showCodeActionList(C,y,E){return we(this,void 0,void 0,function*(){const I=this._editor.getDomNode();if(!I)return;const T=E.includeDisabledActions&&(this._showDisabled||C.validActions.length===0)?C.allActions:C.validActions;if(!T.length)return;const O=w.Position.isIPosition(y)?this.toCoords(y):y,R={onSelect:(M,N)=>we(this,void 0,void 0,function*(){this._applyCodeAction(M,!0,!!N),this._actionWidgetService.hide()}),onHide:()=>{var M;(M=this._editor)===null||M===void 0||M.focus()}};this._actionWidgetService.show("codeActionWidget",!0,(0,m.toMenuItems)(T,this._shouldShowHeaders(),this._resolver.getResolver()),R,O,I,this._getActionBarActions(C,y,E))})}toCoords(C){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(C,1),this._editor.render();const y=this._editor.getScrolledVisiblePosition(C),E=(0,_.getDomNodePagePosition)(this._editor.getDomNode()),I=E.left+y.left,T=E.top+y.top+y.height;return{x:I,y:T}}_shouldShowHeaders(){var C;const y=(C=this._editor)===null||C===void 0?void 0:C.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:y?.uri})}_getActionBarActions(C,y,E){if(E.fromLightbulb)return[];const I=C.documentation.map(T=>{var O;return{id:T.id,label:T.title,tooltip:(O=T.tooltip)!==null&&O!==void 0?O:"",class:void 0,enabled:!0,run:()=>{var R;return this._commandService.executeCommand(T.id,...(R=T.arguments)!==null&&R!==void 0?R:[])}}});return E.includeDisabledActions&&C.validActions.length>0&&C.allActions.length!==C.validActions.length&&I.push(this._showDisabled?{id:"hideMoreActions",label:(0,i.localize)(0,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(C,y,E))}:{id:"showMoreActions",label:(0,i.localize)(1,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(C,y,E))}),I}};v=new WeakMap,f.ID="editor.contrib.codeActionController",e.CodeActionController=f=Te([ge(1,c.IMarkerService),ge(2,h.IContextKeyService),ge(3,o.IInstantiationService),ge(4,b.ILanguageFeaturesService),ge(5,a.IEditorProgressService),ge(6,r.ICommandService),ge(7,d.IConfigurationService),ge(8,n.IActionWidgetService),ge(9,o.IInstantiationService)],f)}),define(J[798],ee([1,0,9,15,22,131,612,13,108,242,337]),function(j,e,_,k,L,D,w,b,S,g,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 s(l){return b.ContextKeyExpr.regex(m.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\\\s|^)"+(0,_.escapeRegExpCharacters)(l.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(l,u,v,f,p=S.CodeActionTriggerSource.Default){if(l.hasModel()){const C=g.CodeActionController.get(l);C?.manualTriggerAtCurrentPosition(u,p,v,f)}}class n extends k.EditorAction{constructor(){super({id:D.quickFixCommandId,label:w.localize(6,null),alias:"Quick Fix...",precondition:b.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:2137,weight:100}})}run(u,v){return i(v,w.localize(7,null),void 0,void 0,S.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=n;class r extends k.EditorCommand{constructor(){super({id:D.codeActionCommandId,precondition:b.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:t}]}})}runEditorCommand(u,v,f){const p=S.CodeActionCommandArgs.fromUser(f,{kind:S.CodeActionKind.Empty,apply:"ifSingle"});return i(v,typeof f?.kind=="string"?p.preferred?w.localize(8,null,f.kind):w.localize(9,null,f.kind):p.preferred?w.localize(10,null):w.localize(11,null),{include:p.kind,includeSourceActions:!0,onlyIncludePreferredActions:p.preferred},p.apply)}}e.CodeActionCommand=r;class d extends k.EditorAction{constructor(){super({id:D.refactorCommandId,label:w.localize(12,null),alias:"Refactor...",precondition:b.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:b.ContextKeyExpr.and(L.EditorContextKeys.writable,s(S.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:t}]}})}run(u,v,f){const p=S.CodeActionCommandArgs.fromUser(f,{kind:S.CodeActionKind.Refactor,apply:"never"});return i(v,typeof f?.kind=="string"?p.preferred?w.localize(13,null,f.kind):w.localize(14,null,f.kind):p.preferred?w.localize(15,null):w.localize(16,null),{include:S.CodeActionKind.Refactor.contains(p.kind)?p.kind:S.CodeActionKind.None,onlyIncludePreferredActions:p.preferred},p.apply,S.CodeActionTriggerSource.Refactor)}}e.RefactorAction=d;class h extends k.EditorAction{constructor(){super({id:D.sourceActionCommandId,label:w.localize(17,null),alias:"Source Action...",precondition:b.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:b.ContextKeyExpr.and(L.EditorContextKeys.writable,s(S.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:t}]}})}run(u,v,f){const p=S.CodeActionCommandArgs.fromUser(f,{kind:S.CodeActionKind.Source,apply:"never"});return i(v,typeof f?.kind=="string"?p.preferred?w.localize(18,null,f.kind):w.localize(19,null,f.kind):p.preferred?w.localize(20,null):w.localize(21,null),{include:S.CodeActionKind.Source.contains(p.kind)?p.kind:S.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:p.preferred},p.apply,S.CodeActionTriggerSource.SourceAction)}}e.SourceAction=h;class o extends k.EditorAction{constructor(){super({id:D.organizeImportsCommandId,label:w.localize(22,null),alias:"Organize Imports",precondition:b.ContextKeyExpr.and(L.EditorContextKeys.writable,s(S.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:1581,weight:100}})}run(u,v){return i(v,w.localize(23,null),{include:S.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",S.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=o;class c extends k.EditorAction{constructor(){super({id:D.fixAllCommandId,label:w.localize(24,null),alias:"Fix All",precondition:b.ContextKeyExpr.and(L.EditorContextKeys.writable,s(S.CodeActionKind.SourceFixAll))})}run(u,v){return i(v,w.localize(25,null),{include:S.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",S.CodeActionTriggerSource.FixAll)}}e.FixAllAction=c;class a extends k.EditorAction{constructor(){super({id:D.autoFixCommandId,label:w.localize(26,null),alias:"Auto Fix...",precondition:b.ContextKeyExpr.and(L.EditorContextKeys.writable,s(S.CodeActionKind.QuickFix)),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(u,v){return i(v,w.localize(27,null),{include:S.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",S.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=a}),define(J[799],ee([1,0,15,329,798,242,338,613,98,37]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(D.CodeActionController.ID,D.CodeActionController,3),(0,_.registerEditorContribution)(w.LightBulbWidget.ID,w.LightBulbWidget,4),(0,_.registerEditorAction)(L.QuickFixAction),(0,_.registerEditorAction)(L.RefactorAction),(0,_.registerEditorAction)(L.SourceAction),(0,_.registerEditorAction)(L.OrganizeImportsAction),(0,_.registerEditorAction)(L.AutoFixAction),(0,_.registerEditorAction)(L.FixAllAction),(0,_.registerEditorCommand)(new L.CodeActionCommand),g.Registry.as(S.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[800],ee([1,0,7,67,563,40,11,2,100]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class g{constructor(s,t,i,n){this.contextViewService=s,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(s){this.options=s}showContextMenu(s){const t=s.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i;const n=(0,_.isHTMLElement)(s.domForShadowRoot)?s.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>s.getAnchor(),canRelayout:!1,anchorAlignment:s.anchorAlignment,anchorAxisAlignment:s.anchorAxisAlignment,render:r=>{var d;this.lastContainer=r;const h=s.getMenuClassName?s.getMenuClassName():"";h&&(r.className+=" "+h),this.options.blockMouse&&(this.block=r.appendChild((0,_.$)(".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",(d=this.blockDisposable)===null||d===void 0||d.dispose(),this.blockDisposable=(0,_.addDisposableListener)(this.block,_.EventType.MOUSE_DOWN,a=>a.stopPropagation()));const o=new b.DisposableStore,c=s.actionRunner||new D.ActionRunner;return c.onWillRun(a=>this.onActionRun(a,!s.skipTelemetry),this,o),c.onDidRun(this.onDidActionRun,this,o),i=new L.Menu(r,t,{actionViewItemProvider:s.getActionViewItem,context:s.getActionsContext?s.getActionsContext():null,actionRunner:c,getKeyBinding:s.getKeyBinding?s.getKeyBinding:a=>this.keybindingService.lookupKeybinding(a.id)},S.defaultMenuStyles),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,o),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,o),o.add((0,_.addDisposableListener)(window,_.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),o.add((0,_.addDisposableListener)(window,_.EventType.MOUSE_DOWN,a=>{if(a.defaultPrevented)return;const l=new k.StandardMouseEvent(a);let u=l.target;if(!l.rightButton){for(;u;){if(u===r)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),(0,b.combinedDisposable)(o,i)},focus:()=>{i?.focus(!!s.autoSelectFirstItem)},onHide:r=>{var d,h,o;(d=s.onHide)===null||d===void 0||d.call(s,!!r),this.block&&(this.block.remove(),this.block=null),(h=this.blockDisposable)===null||h===void 0||h.dispose(),this.blockDisposable=null,this.lastContainer&&((0,_.getActiveElement)()===this.lastContainer||(0,_.isAncestor)((0,_.getActiveElement)(),this.lastContainer))&&((o=this.focusToReturn)===null||o===void 0||o.focus()),this.lastContainer=null}},n,!!n)}onActionRun(s,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:s.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(s){s.error&&!(0,w.isCancellationError)(s.error)&&this.notificationService.error(s.error)}}e.ContextMenuHandler=g}),define(J[186],ee([1,0,7,558,109,559,178,566,565,304,6,2,700,28,98,13,321,55,8,34,37,100]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l){"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 s.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(G){var ae,fe;G!==this._lastFocusedWidget&&((ae=this._lastFocusedWidget)===null||ae===void 0||ae.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=G,(fe=this._lastFocusedWidget)===null||fe===void 0||fe.getHTMLElement().classList.add("last-focused"))}register(G,ae){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new L.DefaultStyleController((0,_.createStyleSheet)(),"").style(l.defaultListStyles)),this.lists.some(Ce=>Ce.widget===G))throw new Error("Cannot register the same widget multiple times");const fe={widget:G,extraContextKeys:ae};return this.lists.push(fe),G.getHTMLElement()===document.activeElement&&this.setLastFocusedList(G),(0,s.combinedDisposable)(G.onDidFocus(()=>this.setLastFocusedList(G)),(0,s.toDisposable)(()=>this.lists.splice(this.lists.indexOf(fe),1)),G.onDidDispose(()=>{this.lists=this.lists.filter(Ce=>Ce!==fe),this._lastFocusedWidget===G&&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(d.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 v="listTypeNavigationMode",f="listAutomaticKeyboardNavigation";function p(te,G){const ae=te.createScoped(G.getHTMLElement());return e.RawWorkbenchListFocusContextKey.bindTo(ae),ae}const C="workbench.list.multiSelectModifier",y="workbench.list.openMode",E="workbench.list.horizontalScrolling",I="workbench.list.defaultFindMode",T="workbench.list.typeNavigationMode",O="workbench.list.keyboardNavigation",R="workbench.list.scrollByPage",M="workbench.list.defaultFindMatchType",N="workbench.tree.indent",P="workbench.tree.renderIndentGuides",x="workbench.list.smoothScrolling",F="workbench.list.mouseWheelScrollSensitivity",B="workbench.list.fastScrollSensitivity",V="workbench.tree.expandMode";function K(te){return te.getValue(C)==="alt"}class A extends s.Disposable{constructor(G){super(),this.configurationService=G,this.useAltAsMultipleSelectionModifier=K(G),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(G=>{G.affectsConfiguration(C)&&(this.useAltAsMultipleSelectionModifier=K(this.configurationService))}))}isSelectionSingleChangeEvent(G){return this.useAltAsMultipleSelectionModifier?G.browserEvent.altKey:(0,L.isSelectionSingleChangeEvent)(G)}isSelectionRangeChangeEvent(G){return(0,L.isSelectionRangeChangeEvent)(G)}}function Y(te,G){var ae;const fe=te.get(i.IConfigurationService),Ce=te.get(c.IKeybindingService),Se=new s.DisposableStore;return[Object.assign(Object.assign({},G),{keyboardNavigationDelegate:{mightProducePrintableCharacter(Ie){return Ce.mightProducePrintableCharacter(Ie)}},smoothScrolling:!!fe.getValue(x),mouseWheelScrollSensitivity:fe.getValue(F),fastScrollSensitivity:fe.getValue(B),multipleSelectionController:(ae=G.multipleSelectionController)!==null&&ae!==void 0?ae:Se.add(new A(fe)),keyboardNavigationEventFilter:Z(Ce),scrollByPage:!!fe.getValue(R)}),Se]}let ie=e.WorkbenchList=class extends L.List{constructor(G,ae,fe,Ce,Se,ye,Ie,Ee,ke){const Ae=typeof Se.horizontalScrolling<"u"?Se.horizontalScrolling:!!Ee.getValue(E),[Pe,_e]=ke.invokeFunction(Y,Se);super(G,ae,fe,Ce,Object.assign(Object.assign({keyboardSupport:!1},Pe),{horizontalScrolling:Ae})),this.disposables.add(_e),this.contextKeyService=p(ye,this),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Se.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!Se.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=Se.horizontalScrolling,this._useAltAsMultipleSelectionModifier=K(Ee),this.disposables.add(this.contextKeyService),this.disposables.add(Ie.register(this)),this.updateStyles(Se.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const oe=this.getSelection(),pe=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(oe.length>0||pe.length>0),this.listMultiSelection.set(oe.length>1),this.listDoubleSelection.set(oe.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const oe=this.getSelection(),pe=this.getFocus();this.listHasSelectionOrFocus.set(oe.length>0||pe.length>0)})),this.disposables.add(Ee.onDidChangeConfiguration(oe=>{oe.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=K(Ee));let pe={};if(oe.affectsConfiguration(E)&&this.horizontalScrolling===void 0){const Le=!!Ee.getValue(E);pe=Object.assign(Object.assign({},pe),{horizontalScrolling:Le})}if(oe.affectsConfiguration(R)){const Le=!!Ee.getValue(R);pe=Object.assign(Object.assign({},pe),{scrollByPage:Le})}if(oe.affectsConfiguration(x)){const Le=!!Ee.getValue(x);pe=Object.assign(Object.assign({},pe),{smoothScrolling:Le})}if(oe.affectsConfiguration(F)){const Le=Ee.getValue(F);pe=Object.assign(Object.assign({},pe),{mouseWheelScrollSensitivity:Le})}if(oe.affectsConfiguration(B)){const Le=Ee.getValue(B);pe=Object.assign(Object.assign({},pe),{fastScrollSensitivity:Le})}Object.keys(pe).length>0&&this.updateOptions(pe)})),this.navigator=new H(this,Object.assign({configurationService:Ee},Se)),this.disposables.add(this.navigator)}updateOptions(G){super.updateOptions(G),G.overrideStyles!==void 0&&this.updateStyles(G.overrideStyles),G.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!G.multipleSelectionSupport)}updateStyles(G){this.style(G?(0,l.getListStyles)(G):l.defaultListStyles)}};e.WorkbenchList=ie=Te([ge(5,r.IContextKeyService),ge(6,e.IListService),ge(7,i.IConfigurationService),ge(8,o.IInstantiationService)],ie);let le=e.WorkbenchPagedList=class extends k.PagedList{constructor(G,ae,fe,Ce,Se,ye,Ie,Ee,ke){const Ae=typeof Se.horizontalScrolling<"u"?Se.horizontalScrolling:!!Ee.getValue(E),[Pe,_e]=ke.invokeFunction(Y,Se);super(G,ae,fe,Ce,Object.assign(Object.assign({keyboardSupport:!1},Pe),{horizontalScrolling:Ae})),this.disposables=new s.DisposableStore,this.disposables.add(_e),this.contextKeyService=p(ye,this),this.horizontalScrolling=Se.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Se.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!Se.selectionNavigation),this._useAltAsMultipleSelectionModifier=K(Ee),this.disposables.add(this.contextKeyService),this.disposables.add(Ie.register(this)),this.updateStyles(Se.overrideStyles),this.disposables.add(Ee.onDidChangeConfiguration(oe=>{oe.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=K(Ee));let pe={};if(oe.affectsConfiguration(E)&&this.horizontalScrolling===void 0){const Le=!!Ee.getValue(E);pe=Object.assign(Object.assign({},pe),{horizontalScrolling:Le})}if(oe.affectsConfiguration(R)){const Le=!!Ee.getValue(R);pe=Object.assign(Object.assign({},pe),{scrollByPage:Le})}if(oe.affectsConfiguration(x)){const Le=!!Ee.getValue(x);pe=Object.assign(Object.assign({},pe),{smoothScrolling:Le})}if(oe.affectsConfiguration(F)){const Le=Ee.getValue(F);pe=Object.assign(Object.assign({},pe),{mouseWheelScrollSensitivity:Le})}if(oe.affectsConfiguration(B)){const Le=Ee.getValue(B);pe=Object.assign(Object.assign({},pe),{fastScrollSensitivity:Le})}Object.keys(pe).length>0&&this.updateOptions(pe)})),this.navigator=new H(this,Object.assign({configurationService:Ee},Se)),this.disposables.add(this.navigator)}updateOptions(G){super.updateOptions(G),G.overrideStyles!==void 0&&this.updateStyles(G.overrideStyles),G.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!G.multipleSelectionSupport)}updateStyles(G){this.style(G?(0,l.getListStyles)(G):l.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchPagedList=le=Te([ge(5,r.IContextKeyService),ge(6,e.IListService),ge(7,i.IConfigurationService),ge(8,o.IInstantiationService)],le);let ne=e.WorkbenchTable=class extends D.Table{constructor(G,ae,fe,Ce,Se,ye,Ie,Ee,ke,Ae){const Pe=typeof ye.horizontalScrolling<"u"?ye.horizontalScrolling:!!ke.getValue(E),[_e,me]=Ae.invokeFunction(Y,ye);super(G,ae,fe,Ce,Se,Object.assign(Object.assign({keyboardSupport:!1},_e),{horizontalScrolling:Pe})),this.disposables.add(me),this.contextKeyService=p(Ie,this),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ye.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!ye.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=ye.horizontalScrolling,this._useAltAsMultipleSelectionModifier=K(ke),this.disposables.add(this.contextKeyService),this.disposables.add(Ee.register(this)),this.updateStyles(ye.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const pe=this.getSelection(),Le=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(pe.length>0||Le.length>0),this.listMultiSelection.set(pe.length>1),this.listDoubleSelection.set(pe.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const pe=this.getSelection(),Le=this.getFocus();this.listHasSelectionOrFocus.set(pe.length>0||Le.length>0)})),this.disposables.add(ke.onDidChangeConfiguration(pe=>{pe.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=K(ke));let Le={};if(pe.affectsConfiguration(E)&&this.horizontalScrolling===void 0){const ve=!!ke.getValue(E);Le=Object.assign(Object.assign({},Le),{horizontalScrolling:ve})}if(pe.affectsConfiguration(R)){const ve=!!ke.getValue(R);Le=Object.assign(Object.assign({},Le),{scrollByPage:ve})}if(pe.affectsConfiguration(x)){const ve=!!ke.getValue(x);Le=Object.assign(Object.assign({},Le),{smoothScrolling:ve})}if(pe.affectsConfiguration(F)){const ve=ke.getValue(F);Le=Object.assign(Object.assign({},Le),{mouseWheelScrollSensitivity:ve})}if(pe.affectsConfiguration(B)){const ve=ke.getValue(B);Le=Object.assign(Object.assign({},Le),{fastScrollSensitivity:ve})}Object.keys(Le).length>0&&this.updateOptions(Le)})),this.navigator=new W(this,Object.assign({configurationService:ke},ye)),this.disposables.add(this.navigator)}updateOptions(G){super.updateOptions(G),G.overrideStyles!==void 0&&this.updateStyles(G.overrideStyles),G.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!G.multipleSelectionSupport)}updateStyles(G){this.style(G?(0,l.getListStyles)(G):l.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchTable=ne=Te([ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,i.IConfigurationService),ge(9,o.IInstantiationService)],ne);class se extends s.Disposable{constructor(G,ae){var fe;super(),this.widget=G,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 ae?.openOnSingleClick!="boolean"&&ae?.configurationService?(this.openOnSingleClick=ae?.configurationService.getValue(y)!=="doubleClick",this._register(ae?.configurationService.onDidChangeConfiguration(Ce=>{Ce.affectsConfiguration(y)&&(this.openOnSingleClick=ae?.configurationService.getValue(y)!=="doubleClick")}))):this.openOnSingleClick=(fe=ae?.openOnSingleClick)!==null&&fe!==void 0?fe:!0}onSelectionFromKeyboard(G){if(G.elements.length!==1)return;const ae=G.browserEvent,fe=typeof ae.preserveFocus=="boolean"?ae.preserveFocus:!0,Ce=typeof ae.pinned=="boolean"?ae.pinned:!fe,Se=!1;this._open(this.getSelectedElement(),fe,Ce,Se,G.browserEvent)}onPointer(G,ae){if(!this.openOnSingleClick||ae.detail===2)return;const Ce=ae.button===1,Se=!0,ye=Ce,Ie=ae.ctrlKey||ae.metaKey||ae.altKey;this._open(G,Se,ye,Ie,ae)}onMouseDblClick(G,ae){if(!ae)return;const fe=ae.target;if(fe.classList.contains("monaco-tl-twistie")||fe.classList.contains("monaco-icon-label")&&fe.classList.contains("folder-icon")&&ae.offsetX<16)return;const Se=!1,ye=!0,Ie=ae.ctrlKey||ae.metaKey||ae.altKey;this._open(G,Se,ye,Ie,ae)}_open(G,ae,fe,Ce,Se){G&&this._onDidOpen.fire({editorOptions:{preserveFocus:ae,pinned:fe,revealIfVisible:!0},sideBySide:Ce,element:G,browserEvent:Se})}}class H extends se{constructor(G,ae){super(G,ae),this.widget=G}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class W extends se{constructor(G,ae){super(G,ae)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class $ extends se{constructor(G,ae){super(G,ae)}getSelectedElement(){var G;return(G=this.widget.getSelection()[0])!==null&&G!==void 0?G:void 0}}function Z(te){let G=!1;return ae=>{if(ae.toKeyCodeChord().isModifierKey())return!1;if(G)return G=!1,!1;const fe=te.softDispatch(ae,ae.target);return fe.kind===1?(G=!0,!1):(G=!1,fe.kind===0)}}let Q=e.WorkbenchObjectTree=class extends g.ObjectTree{constructor(G,ae,fe,Ce,Se,ye,Ie,Ee,ke){const{options:Ae,getTypeNavigationMode:Pe,disposable:_e}=ye.invokeFunction(z,Se);super(G,ae,fe,Ce,Ae),this.disposables.add(_e),this.internals=new U(this,Se,Pe,Se.overrideStyles,Ie,Ee,ke),this.disposables.add(this.internals)}updateOptions(G){super.updateOptions(G),this.internals.updateOptions(G)}};e.WorkbenchObjectTree=Q=Te([ge(5,o.IInstantiationService),ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,i.IConfigurationService)],Q);let re=e.WorkbenchCompressibleObjectTree=class extends g.CompressibleObjectTree{constructor(G,ae,fe,Ce,Se,ye,Ie,Ee,ke){const{options:Ae,getTypeNavigationMode:Pe,disposable:_e}=ye.invokeFunction(z,Se);super(G,ae,fe,Ce,Ae),this.disposables.add(_e),this.internals=new U(this,Se,Pe,Se.overrideStyles,Ie,Ee,ke),this.disposables.add(this.internals)}updateOptions(G={}){super.updateOptions(G),G.overrideStyles&&this.internals.updateStyleOverrides(G.overrideStyles),this.internals.updateOptions(G)}};e.WorkbenchCompressibleObjectTree=re=Te([ge(5,o.IInstantiationService),ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,i.IConfigurationService)],re);let ce=e.WorkbenchDataTree=class extends S.DataTree{constructor(G,ae,fe,Ce,Se,ye,Ie,Ee,ke,Ae){const{options:Pe,getTypeNavigationMode:_e,disposable:me}=Ie.invokeFunction(z,ye);super(G,ae,fe,Ce,Se,Pe),this.disposables.add(me),this.internals=new U(this,ye,_e,ye.overrideStyles,Ee,ke,Ae),this.disposables.add(this.internals)}updateOptions(G={}){super.updateOptions(G),G.overrideStyles!==void 0&&this.internals.updateStyleOverrides(G.overrideStyles),this.internals.updateOptions(G)}};e.WorkbenchDataTree=ce=Te([ge(6,o.IInstantiationService),ge(7,r.IContextKeyService),ge(8,e.IListService),ge(9,i.IConfigurationService)],ce);let he=e.WorkbenchAsyncDataTree=class extends b.AsyncDataTree{get onDidOpen(){return this.internals.onDidOpen}constructor(G,ae,fe,Ce,Se,ye,Ie,Ee,ke,Ae){const{options:Pe,getTypeNavigationMode:_e,disposable:me}=Ie.invokeFunction(z,ye);super(G,ae,fe,Ce,Se,Pe),this.disposables.add(me),this.internals=new U(this,ye,_e,ye.overrideStyles,Ee,ke,Ae),this.disposables.add(this.internals)}updateOptions(G={}){super.updateOptions(G),G.overrideStyles&&this.internals.updateStyleOverrides(G.overrideStyles),this.internals.updateOptions(G)}};e.WorkbenchAsyncDataTree=he=Te([ge(6,o.IInstantiationService),ge(7,r.IContextKeyService),ge(8,e.IListService),ge(9,i.IConfigurationService)],he);let de=e.WorkbenchCompressibleAsyncDataTree=class extends b.CompressibleAsyncDataTree{constructor(G,ae,fe,Ce,Se,ye,Ie,Ee,ke,Ae,Pe){const{options:_e,getTypeNavigationMode:me,disposable:oe}=Ee.invokeFunction(z,Ie);super(G,ae,fe,Ce,Se,ye,_e),this.disposables.add(oe),this.internals=new U(this,Ie,me,Ie.overrideStyles,ke,Ae,Pe),this.disposables.add(this.internals)}updateOptions(G){super.updateOptions(G),this.internals.updateOptions(G)}};e.WorkbenchCompressibleAsyncDataTree=de=Te([ge(7,o.IInstantiationService),ge(8,r.IContextKeyService),ge(9,e.IListService),ge(10,i.IConfigurationService)],de);function ue(te){const G=te.getValue(I);if(G==="highlight")return w.TreeFindMode.Highlight;if(G==="filter")return w.TreeFindMode.Filter;const ae=te.getValue(O);if(ae==="simple"||ae==="highlight")return w.TreeFindMode.Highlight;if(ae==="filter")return w.TreeFindMode.Filter}function q(te){const G=te.getValue(M);if(G==="fuzzy")return w.TreeFindMatchType.Fuzzy;if(G==="contiguous")return w.TreeFindMatchType.Contiguous}function z(te,G){var ae;const fe=te.get(i.IConfigurationService),Ce=te.get(h.IContextViewService),Se=te.get(r.IContextKeyService),ye=te.get(o.IInstantiationService),Ie=()=>{const me=Se.getContextKeyValue(v);if(me==="automatic")return L.TypeNavigationMode.Automatic;if(me==="trigger"||Se.getContextKeyValue(f)===!1)return L.TypeNavigationMode.Trigger;const pe=fe.getValue(T);if(pe==="automatic")return L.TypeNavigationMode.Automatic;if(pe==="trigger")return L.TypeNavigationMode.Trigger},Ee=G.horizontalScrolling!==void 0?G.horizontalScrolling:!!fe.getValue(E),[ke,Ae]=ye.invokeFunction(Y,G),Pe=G.additionalScrollHeight,_e=G.renderIndentGuides!==void 0?G.renderIndentGuides:fe.getValue(P);return{getTypeNavigationMode:Ie,disposable:Ae,options:Object.assign(Object.assign({keyboardSupport:!1},ke),{indent:typeof fe.getValue(N)=="number"?fe.getValue(N):void 0,renderIndentGuides:_e,smoothScrolling:!!fe.getValue(x),defaultFindMode:ue(fe),defaultFindMatchType:q(fe),horizontalScrolling:Ee,scrollByPage:!!fe.getValue(R),additionalScrollHeight:Pe,hideTwistiesOfChildlessElements:G.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(ae=G.expandOnlyOnTwistieClick)!==null&&ae!==void 0?ae:fe.getValue(V)==="doubleClick",contextViewProvider:Ce,findWidgetStyles:l.defaultFindWidgetStyles})}}let U=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(G,ae,fe,Ce,Se,ye,Ie){var Ee;this.tree=G,this.disposables=[],this.contextKeyService=p(Se,G),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ae.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!ae.selectionNavigation),this.listSupportFindWidget=e.WorkbenchListSupportsFind.bindTo(this.contextKeyService),this.listSupportFindWidget.set((Ee=ae.findWidgetEnabled)!==null&&Ee!==void 0?Ee:!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=K(Ie),this.updateStyleOverrides(Ce);const Ae=()=>{const _e=G.getFocus()[0];if(!_e)return;const me=G.getNode(_e);this.treeElementCanCollapse.set(me.collapsible&&!me.collapsed),this.treeElementHasParent.set(!!G.getParentElement(_e)),this.treeElementCanExpand.set(me.collapsible&&me.collapsed),this.treeElementHasChild.set(!!G.getFirstElementChild(_e))},Pe=new Set;Pe.add(v),Pe.add(f),this.disposables.push(this.contextKeyService,ye.register(G),G.onDidChangeSelection(()=>{const _e=G.getSelection(),me=G.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(_e.length>0||me.length>0),this.hasMultiSelection.set(_e.length>1),this.hasDoubleSelection.set(_e.length===2)})}),G.onDidChangeFocus(()=>{const _e=G.getSelection(),me=G.getFocus();this.hasSelectionOrFocus.set(_e.length>0||me.length>0),Ae()}),G.onDidChangeCollapseState(Ae),G.onDidChangeModel(Ae),G.onDidChangeFindOpenState(_e=>this.treeFindOpen.set(_e)),Ie.onDidChangeConfiguration(_e=>{let me={};if(_e.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=K(Ie)),_e.affectsConfiguration(N)){const oe=Ie.getValue(N);me=Object.assign(Object.assign({},me),{indent:oe})}if(_e.affectsConfiguration(P)&&ae.renderIndentGuides===void 0){const oe=Ie.getValue(P);me=Object.assign(Object.assign({},me),{renderIndentGuides:oe})}if(_e.affectsConfiguration(x)){const oe=!!Ie.getValue(x);me=Object.assign(Object.assign({},me),{smoothScrolling:oe})}if(_e.affectsConfiguration(I)||_e.affectsConfiguration(O)){const oe=ue(Ie);me=Object.assign(Object.assign({},me),{defaultFindMode:oe})}if(_e.affectsConfiguration(T)||_e.affectsConfiguration(O)){const oe=fe();me=Object.assign(Object.assign({},me),{typeNavigationMode:oe})}if(_e.affectsConfiguration(M)){const oe=q(Ie);me=Object.assign(Object.assign({},me),{defaultFindMatchType:oe})}if(_e.affectsConfiguration(E)&&ae.horizontalScrolling===void 0){const oe=!!Ie.getValue(E);me=Object.assign(Object.assign({},me),{horizontalScrolling:oe})}if(_e.affectsConfiguration(R)){const oe=!!Ie.getValue(R);me=Object.assign(Object.assign({},me),{scrollByPage:oe})}if(_e.affectsConfiguration(V)&&ae.expandOnlyOnTwistieClick===void 0&&(me=Object.assign(Object.assign({},me),{expandOnlyOnTwistieClick:Ie.getValue(V)==="doubleClick"})),_e.affectsConfiguration(F)){const oe=Ie.getValue(F);me=Object.assign(Object.assign({},me),{mouseWheelScrollSensitivity:oe})}if(_e.affectsConfiguration(B)){const oe=Ie.getValue(B);me=Object.assign(Object.assign({},me),{fastScrollSensitivity:oe})}Object.keys(me).length>0&&G.updateOptions(me)}),this.contextKeyService.onDidChangeContext(_e=>{_e.affectsSome(Pe)&&G.updateOptions({typeNavigationMode:fe()})})),this.navigator=new $(G,Object.assign({configurationService:Ie},ae)),this.disposables.push(this.navigator)}updateOptions(G){G.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!G.multipleSelectionSupport)}updateStyleOverrides(G){this.tree.style(G?(0,l.getListStyles)(G):l.defaultListStyles)}dispose(){this.disposables=(0,s.dispose)(this.disposables)}};U=Te([ge(4,r.IContextKeyService),ge(5,e.IListService),ge(6,i.IConfigurationService)],U),a.Registry.as(n.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,t.localize)(0,null),type:"object",properties:{[C]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,t.localize)(1,null),(0,t.localize)(2,null)],default:"ctrlCmd",description:(0,t.localize)(3,null)},[y]:{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)},[P]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,t.localize)(8,null)},[x]:{type:"boolean",default:!1,description:(0,t.localize)(9,null)},[F]:{type:"number",default:1,markdownDescription:(0,t.localize)(10,null)},[B]:{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)},[O]:{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)},[V]:{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[74],ee([1,0,14,26,31,6,18,21,708,233,37]),function(j,e,_,k,L,D,w,b,S,g,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 s;(function(a){function l(u,v){let f=u.defaults;for(;L.ThemeIcon.isThemeIcon(f);){const p=n.getIcon(f.id);if(!p)return;f=p.defaults}return f}a.getDefinition=l})(s||(e.IconContribution=s={}));var t;(function(a){function l(v){return{weight:v.weight,style:v.style,src:v.src.map(f=>({format:f.format,location:f.location.toString()}))}}a.toJSONObject=l;function u(v){const f=p=>(0,w.isString)(p)?p:void 0;if(v&&Array.isArray(v.src)&&v.src.every(p=>(0,w.isString)(p.format)&&(0,w.isString)(p.location)))return{weight:f(v.weight),style:f(v.style),src:v.src.map(p=>({format:p.format,location:b.URI.parse(p.location)}))}}a.fromJSONObject=u})(t||(e.IconFontDefinition=t={}));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,S.localize)(0,null)},fontCharacter:{type:"string",description:(0,S.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${L.ThemeIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(l,u,v,f){const p=this.iconsById[l];if(p){if(v&&!p.description){p.description=v,this.iconSchema.properties[l].markdownDescription=`${v} $(${l})`;const E=this.iconReferenceSchema.enum.indexOf(l);E!==-1&&(this.iconReferenceSchema.enumDescriptions[E]=v),this._onDidChange.fire()}return p}const C={id:l,description:v,defaults:u,deprecationMessage:f};this.iconsById[l]=C;const y={$ref:"#/definitions/icons"};return f&&(y.deprecationMessage=f),v&&(y.markdownDescription=`${v}: $(${l})`),this.iconSchema.properties[l]=y,this.iconReferenceSchema.enum.push(l),this.iconReferenceSchema.enumDescriptions.push(v||""),this._onDidChange.fire(),{id:l}}getIcons(){return Object.keys(this.iconsById).map(l=>this.iconsById[l])}getIcon(l){return this.iconsById[l]}getIconSchema(){return this.iconSchema}toString(){const l=(p,C)=>p.id.localeCompare(C.id),u=p=>{for(;L.ThemeIcon.isThemeIcon(p.defaults);)p=this.iconsById[p.defaults.id];return`codicon codicon-${p?p.id:""}`},v=[];v.push("| preview | identifier | default codicon ID | description"),v.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const f=Object.keys(this.iconsById).map(p=>this.iconsById[p]);for(const p of f.filter(C=>!!C.description).sort(l))v.push(`|<i class="${u(p)}"></i>|${p.id}|${L.ThemeIcon.isThemeIcon(p.defaults)?p.defaults.id:p.id}|${p.description||""}|`);v.push("| preview | identifier "),v.push("| ----------- | --------------------------------- |");for(const p of f.filter(C=>!L.ThemeIcon.isThemeIcon(C.defaults)).sort(l))v.push(`|<i class="${u(p)}"></i>|${p.id}|`);return v.join(`\n`)}}const n=new i;m.Registry.add(e.Extensions.IconContribution,n);function r(a,l,u,v){return n.registerIcon(a,l,u,v)}e.registerIcon=r;function d(){return n}e.getIconRegistry=d;function h(){const a=(0,k.getCodiconFontCharacters)();for(const l in a){const u="\\\\"+a[l].toString(16);n.registerIcon(l,{fontCharacter:u})}}h(),e.iconsSchemaId="vscode://schemas/icons";const o=m.Registry.as(g.Extensions.JSONContribution);o.registerSchema(e.iconsSchemaId,n.getIconSchema());const c=new _.RunOnceScheduler(()=>o.notifySchemaChanged(e.iconsSchemaId),200);n.onDidChange(()=>{c.isScheduled()||c.schedule()}),e.widgetClose=r("widget-close",k.Codicon.close,(0,S.localize)(2,null)),e.gotoPreviousLocation=r("goto-previous-location",k.Codicon.arrowUp,(0,S.localize)(3,null)),e.gotoNextLocation=r("goto-next-location",k.Codicon.arrowDown,(0,S.localize)(4,null)),e.syncing=L.ThemeIcon.modify(k.Codicon.sync,"spin"),e.spinningLoading=L.ThemeIcon.modify(k.Codicon.loading,"spin")}),define(J[801],ee([1,0,7,35,86,69,79,40,26,2,31,76,15,32,41,12,39,89,110,83,594,181,28,13,74,419]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const p=3;class C{constructor(x,F,B,V){this.originalLineStart=x,this.originalLineEnd=F,this.modifiedLineStart=B,this.modifiedLineEnd=V}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class y{constructor(x){this.entries=x}}const E=(0,f.registerIcon)("diff-review-insert",S.Codicon.add,a.localize(0,null)),I=(0,f.registerIcon)("diff-review-remove",S.Codicon.remove,a.localize(1,null)),T=(0,f.registerIcon)("diff-review-close",S.Codicon.close,a.localize(2,null));let O=e.DiffReview=class Mt extends g.Disposable{constructor(x,F,B,V){super(),this._languageService=F,this._audioCueService=B,this._configurationService=V,this._width=0,this._diffEditor=x,this._isVisible=!1,this.shadow=(0,k.createFastDomNode)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,k.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",a.localize(3,null),"close-diff-review "+m.ThemeIcon.asClassName(T),!0,()=>we(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=(0,k.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,k.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(x.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(x.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(_.addStandardDisposableListener(this.domNode.domNode,"click",K=>{K.preventDefault();const A=_.findParentWithClass(K.target,"diff-review-row");A&&this._goToRow(A)})),this._register(_.addStandardDisposableListener(this.domNode.domNode,"keydown",K=>{(K.equals(18)||K.equals(2066)||K.equals(530))&&(K.preventDefault(),this._goToRow(this._getNextRow(),"next")),(K.equals(16)||K.equals(2064)||K.equals(528))&&(K.preventDefault(),this._goToRow(this._getPrevRow(),"previous")),(K.equals(9)||K.equals(2057)||K.equals(521)||K.equals(1033)||K.equals(10)||K.equals(3))&&(K.preventDefault(),this.accept())})),this._register(this._configurationService.onDidChangeConfiguration(K=>{K.affectsConfiguration("accessibility.verbosity.diffEditor")&&this._diffEditor.updateOptions({accessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.diffEditor")})})),this._diffs=[],this._currentDiff=null}prev(){let x=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let B=-1;for(let V=0,K=this._diffs.length;V<K;V++)if(this._diffs[V]===this._currentDiff){B=V;break}x=this._diffs.length+B-1}else x=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;x=x%this._diffs.length;const F=this._diffs[x].entries;this._diffEditor.setPosition(new r.Position(F[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:F[0].modifiedLineStart,endColumn:1073741824,endLineNumber:F[F.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getPrevRow(),"previous")}next(){let x=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let B=-1;for(let V=0,K=this._diffs.length;V<K;V++)if(this._diffs[V]===this._currentDiff){B=V;break}x=B+1}else x=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;x=x%this._diffs.length;const F=this._diffs[x].entries;this._diffEditor.setPosition(new r.Position(F[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:F[0].modifiedLineStart,endColumn:1073741824,endLineNumber:F[F.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow(),"next")}accept(){let x=-1;const F=this._getCurrentFocusedRow();if(F){const B=parseInt(F.getAttribute("data-line"),10);isNaN(B)||(x=B)}this.hide(),x!==-1&&(this._diffEditor.setPosition(new r.Position(x,1)),this._diffEditor.revealPosition(new r.Position(x,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const x=this._getCurrentFocusedRow();return x?x.previousElementSibling?x.previousElementSibling:x:this._getFirstRow()}_getNextRow(){const x=this._getCurrentFocusedRow();return x?x.nextElementSibling?x.nextElementSibling:x:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const x=document.activeElement;return x&&/diff-review-row/.test(x.className)?x:null}_goToRow(x,F){const B=this._getCurrentFocusedRow();x.tabIndex=0,x.focus(),B&&B!==x&&(B.tabIndex=-1);const V=F?F==="next"?B?.nextElementSibling:B?.previousElementSibling:B;V?.classList.contains("line-insert")?this._audioCueService.playAudioCue(l.AudioCue.diffLineInserted,!0):V?.classList.contains("line-delete")&&this._audioCueService.playAudioCue(l.AudioCue.diffLineDeleted,!0),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(x,F,B){this._width=F,this.shadow.setTop(x-6),this.shadow.setWidth(F),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(x),this.domNode.setWidth(F),this.domNode.setHeight(B),this._content.setHeight(B),this._content.setWidth(F),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const x=this._diffEditor.getLineChanges();if(!x||x.length===0)return[];const F=this._diffEditor.getOriginalEditor().getModel(),B=this._diffEditor.getModifiedEditor().getModel();return!F||!B?[]:Mt._mergeAdjacent(x,F.getLineCount(),B.getLineCount())}static _mergeAdjacent(x,F,B){if(!x||x.length===0)return[];const V=[];let K=0;for(let le=0,ne=x.length;le<ne;le++){const se=x[le],H=se.originalStartLineNumber,W=se.originalEndLineNumber,$=se.modifiedStartLineNumber,Z=se.modifiedEndLineNumber,Q=[];let re=0;{const ce=W===0?H:H-1,he=Z===0?$:$-1;let de=1,ue=1;if(le>0){const U=x[le-1];U.originalEndLineNumber===0?de=U.originalStartLineNumber+1:de=U.originalEndLineNumber+1,U.modifiedEndLineNumber===0?ue=U.modifiedStartLineNumber+1:ue=U.modifiedEndLineNumber+1}let q=ce-p+1,z=he-p+1;if(q<de){const U=de-q;q=q+U,z=z+U}if(z<ue){const U=ue-z;q=q+U,z=z+U}Q[re++]=new C(q,ce,z,he)}W!==0&&(Q[re++]=new C(H,W,0,0)),Z!==0&&(Q[re++]=new C(0,0,$,Z));{const ce=W===0?H+1:W+1,he=Z===0?$+1:Z+1;let de=F,ue=B;if(le+1<ne){const U=x[le+1];U.originalEndLineNumber===0?de=U.originalStartLineNumber:de=U.originalStartLineNumber-1,U.modifiedEndLineNumber===0?ue=U.modifiedStartLineNumber:ue=U.modifiedStartLineNumber-1}let q=ce+p-1,z=he+p-1;if(q>de){const U=de-q;q=q+U,z=z+U}if(z>ue){const U=ue-z;q=q+U,z=z+U}Q[re++]=new C(ce,q,he,z)}V[K++]=new y(Q)}let A=V[0].entries;const Y=[];let ie=0;for(let le=1,ne=V.length;le<ne;le++){const se=V[le].entries,H=A[A.length-1],W=se[0];if(H.getType()===0&&W.getType()===0&&W.originalLineStart<=H.originalLineEnd){A[A.length-1]=new C(H.originalLineStart,W.originalLineEnd,H.modifiedLineStart,W.modifiedLineEnd),A=A.concat(se.slice(1));continue}Y[ie++]=new y(A),A=se}return Y[ie++]=new y(A),Y}_findDiffIndex(x){const F=x.lineNumber;for(let B=0,V=this._diffs.length;B<V;B++){const K=this._diffs[B].entries,A=K[K.length-1].modifiedLineEnd;if(F<=A)return B}return 0}_render(){const x=this._diffEditor.getOriginalEditor().getOptions(),F=this._diffEditor.getModifiedEditor().getOptions(),B=this._diffEditor.getOriginalEditor().getModel(),V=this._diffEditor.getModifiedEditor().getModel(),K=B.getOptions(),A=V.getOptions();if(!this._isVisible||!B||!V){_.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const Y=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[Y]===this._currentDiff)return;this._currentDiff=this._diffs[Y];const ie=this._diffs[Y].entries,le=document.createElement("div");le.className="diff-review-table",le.setAttribute("role","list"),le.setAttribute("aria-label",\'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands\'),(0,s.applyFontInfo)(le,F.get(48));let ne=0,se=0,H=0,W=0;for(let z=0,U=ie.length;z<U;z++){const X=ie[z],te=X.originalLineStart,G=X.originalLineEnd,ae=X.modifiedLineStart,fe=X.modifiedLineEnd;te!==0&&(ne===0||te<ne)&&(ne=te),G!==0&&(se===0||G>se)&&(se=G),ae!==0&&(H===0||ae<H)&&(H=ae),fe!==0&&(W===0||fe>W)&&(W=fe)}const $=document.createElement("div");$.className="diff-review-row";const Z=document.createElement("div");Z.className="diff-review-cell diff-review-summary";const Q=se-ne+1,re=W-H+1;Z.appendChild(document.createTextNode(`${Y+1}/${this._diffs.length}: @@ -${ne},${Q} +${H},${re} @@`)),$.setAttribute("data-line",String(H));const ce=z=>z===0?a.localize(4,null):z===1?a.localize(5,null):a.localize(6,null,z),he=ce(Q),de=ce(re);$.setAttribute("aria-label",a.localize(7,null,Y+1,this._diffs.length,ne,he,H,de)),$.appendChild(Z),$.setAttribute("role","listitem"),le.appendChild($);const ue=F.get(64);let q=H;for(let z=0,U=ie.length;z<U;z++){const X=ie[z];Mt._renderSection(le,X,q,ue,this._width,x,B,K,F,V,A,this._languageService.languageIdCodec),X.modifiedLineStart!==0&&(q=X.modifiedLineEnd)}_.clearNode(this._content.domNode),this._content.domNode.appendChild(le),this.scrollbar.scanDomNode()}static _renderSection(x,F,B,V,K,A,Y,ie,le,ne,se,H){const W=F.getType();let $="diff-review-row",Z="";const Q="diff-review-spacer";let re=null;switch(W){case 1:$="diff-review-row line-insert",Z=" char-insert",re=E;break;case 2:$="diff-review-row line-delete",Z=" char-delete",re=I;break}const ce=F.originalLineStart,he=F.originalLineEnd,de=F.modifiedLineStart,ue=F.modifiedLineEnd,q=Math.max(ue-de,he-ce),z=A.get(140),U=z.glyphMarginWidth+z.lineNumbersWidth,X=le.get(140),te=10+X.glyphMarginWidth+X.lineNumbersWidth;for(let G=0;G<=q;G++){const ae=ce===0?0:ce+G,fe=de===0?0:de+G,Ce=document.createElement("div");Ce.style.minWidth=K+"px",Ce.className=$,Ce.setAttribute("role","listitem"),fe!==0&&(B=fe),Ce.setAttribute("data-line",String(B));const Se=document.createElement("div");Se.className="diff-review-cell",Se.style.height=`${V}px`,Ce.appendChild(Se);const ye=document.createElement("span");ye.style.width=U+"px",ye.style.minWidth=U+"px",ye.className="diff-review-line-number"+Z,ae!==0?ye.appendChild(document.createTextNode(String(ae))):ye.innerText="\\xA0",Se.appendChild(ye);const Ie=document.createElement("span");Ie.style.width=te+"px",Ie.style.minWidth=te+"px",Ie.style.paddingRight="10px",Ie.className="diff-review-line-number"+Z,fe!==0?Ie.appendChild(document.createTextNode(String(fe))):Ie.innerText="\\xA0",Se.appendChild(Ie);const Ee=document.createElement("span");if(Ee.className=Q,re){const Pe=document.createElement("span");Pe.className=m.ThemeIcon.asClassName(re),Pe.innerText="\\xA0\\xA0",Ee.appendChild(Pe)}else Ee.innerText="\\xA0\\xA0";Se.appendChild(Ee);let ke;if(fe!==0){let Pe=this._renderLine(ne,le,se.tabSize,fe,H);Mt._ttPolicy&&(Pe=Mt._ttPolicy.createHTML(Pe)),Se.insertAdjacentHTML("beforeend",Pe),ke=ne.getLineContent(fe)}else{let Pe=this._renderLine(Y,A,ie.tabSize,ae,H);Mt._ttPolicy&&(Pe=Mt._ttPolicy.createHTML(Pe)),Se.insertAdjacentHTML("beforeend",Pe),ke=Y.getLineContent(ae)}ke.length===0&&(ke=a.localize(8,null));let Ae="";switch(W){case 0:ae===fe?Ae=a.localize(9,null,ke,ae):Ae=a.localize(10,null,ke,ae,fe);break;case 1:Ae=a.localize(11,null,ke,fe);break;case 2:Ae=a.localize(12,null,ke,ae);break}Ce.setAttribute("aria-label",Ae),x.appendChild(Ce)}}static _renderLine(x,F,B,V,K){const A=x.getLineContent(V),Y=F.get(48),ie=h.LineTokens.createEmpty(A,K),le=c.ViewLineRenderingData.isBasicASCII(A,x.mightContainNonBasicASCII()),ne=c.ViewLineRenderingData.containsRTL(A,le,x.mightContainRTL());return(0,o.renderViewLine2)(new o.RenderLineInput(Y.isMonospace&&!F.get(31),Y.canUseHalfwidthRightwardsArrow,A,!1,le,ne,0,ie,[],B,0,Y.spaceWidth,Y.middotWidth,Y.wsmiddotWidth,F.get(113),F.get(95),F.get(90),F.get(49)!==n.EditorFontLigatures.OFF,null)).html}};O._ttPolicy=(0,L.createTrustedTypesPolicy)("diffReview",{createHTML:P=>P}),e.DiffReview=O=Te([ge(1,d.ILanguageService),ge(2,l.IAudioCueService),ge(3,u.IConfigurationService)],O);class R extends t.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:a.localize(13,null),alias:"Go to Next Difference",precondition:v.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(x,F){const B=N(x);B?.diffReviewNext()}}class M extends t.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:a.localize(14,null),alias:"Go to Previous Difference",precondition:v.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(x,F){const B=N(x);B?.diffReviewPrev()}}function N(P){var x;const F=P.get(i.ICodeEditorService),B=F.listDiffEditors(),V=(x=F.getFocusedCodeEditor())!==null&&x!==void 0?x:F.getActiveCodeEditor();if(!V)return null;for(let K=0,A=B.length;K<A;K++){const Y=B[K];if(Y.getModifiedEditor().getId()===V.getId()||Y.getOriginalEditor().getId()===V.getId())return Y}return null}(0,t.registerEditorAction)(R),(0,t.registerEditorAction)(M)}),define(J[802],ee([1,0,47,7,146,68,26,36,6,2,31,618,33,74,193]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.InsertButton=e.ColorPickerBody=e.ColorPickerHeader=void 0;const n=k.$;class r extends g.Disposable{constructor(p,C,y,E=!1){super(),this.model=C,this.showingStandaloneColorPicker=E,this._closeButton=null,this._domNode=n(".colorpicker-header"),k.append(p,this._domNode),this._pickedColorNode=k.append(this._domNode,n(".picked-color"));const I=(0,s.localize)(0,null);this._pickedColorNode.setAttribute("title",I),this._originalColorNode=k.append(this._domNode,n(".original-color")),this._originalColorNode.style.backgroundColor=b.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=y.getColorTheme().getColor(t.editorHoverBackground)||b.Color.white,this._register(y.onDidColorThemeChange(T=>{this.backgroundColor=T.getColor(t.editorHoverBackground)||b.Color.white})),this._register(k.addDisposableListener(this._pickedColorNode,k.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(k.addDisposableListener(this._originalColorNode,k.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(C.onDidChangeColor(this.onDidChangeColor,this)),this._register(C.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=b.Color.Format.CSS.format(C.color)||"",this._pickedColorNode.classList.toggle("light",C.color.rgba.a<.5?this.backgroundColor.isLighter():C.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new d(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(p){this._pickedColorNode.style.backgroundColor=b.Color.Format.CSS.format(p)||"",this._pickedColorNode.classList.toggle("light",p.rgba.a<.5?this.backgroundColor.isLighter():p.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this._pickedColorNode.prepend(n(".codicon.codicon-color-mode"))}}e.ColorPickerHeader=r;class d extends g.Disposable{constructor(p){super(),this._onClicked=this._register(new S.Emitter),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),k.append(p,this._button);const C=document.createElement("div");C.classList.add("close-button-inner-div"),k.append(this._button,C),k.append(C,n(".button"+m.ThemeIcon.asCSSSelector((0,i.registerIcon)("color-picker-close",w.Codicon.close,(0,s.localize)(1,null))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class h extends g.Disposable{constructor(p,C,y,E=!1){super(),this.model=C,this.pixelRatio=y,this._insertButton=null,this._domNode=n(".colorpicker-body"),k.append(p,this._domNode),this._saturationBox=new o(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 a(this._domNode,this.model,E),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new l(this._domNode,this.model,E),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),E&&(this._insertButton=this._register(new u(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:p,v:C}){const y=this.model.color.hsva;this.model.color=new b.Color(new b.HSVA(y.h,p,C,y.a))}onDidOpacityChange(p){const C=this.model.color.hsva;this.model.color=new b.Color(new b.HSVA(C.h,C.s,C.v,p))}onDidHueChange(p){const C=this.model.color.hsva,y=(1-p)*360;this.model.color=new b.Color(new b.HSVA(y===360?0:y,C.s,C.v,C.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}e.ColorPickerBody=h;class o extends g.Disposable{constructor(p,C,y){super(),this.model=C,this.pixelRatio=y,this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new S.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._domNode=n(".saturation-wrap"),k.append(p,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,E=>this.onPointerDown(E))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(p){if(!p.target||!(p.target instanceof Element))return;this.monitor=this._register(new L.GlobalPointerMoveMonitor);const C=k.getDomNodePagePosition(this._domNode);p.target!==this.selection&&this.onDidChangePosition(p.offsetX,p.offsetY),this.monitor.startMonitoring(p.target,p.pointerId,p.buttons,E=>this.onDidChangePosition(E.pageX-C.left,E.pageY-C.top),()=>null);const y=k.addDisposableListener(document,k.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),y.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(p,C){const y=Math.max(0,Math.min(1,p/this.width)),E=Math.max(0,Math.min(1,1-C/this.height));this.paintSelection(y,E),this._onDidChange.fire({s:y,v:E})}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 p=this.model.color.hsva;this.paintSelection(p.s,p.v)}paint(){const p=this.model.color.hsva,C=new b.Color(new b.HSVA(p.h,1,1,1)),y=this._canvas.getContext("2d"),E=y.createLinearGradient(0,0,this._canvas.width,0);E.addColorStop(0,"rgba(255, 255, 255, 1)"),E.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),E.addColorStop(1,"rgba(255, 255, 255, 0)");const I=y.createLinearGradient(0,0,0,this._canvas.height);I.addColorStop(0,"rgba(0, 0, 0, 0)"),I.addColorStop(1,"rgba(0, 0, 0, 1)"),y.rect(0,0,this._canvas.width,this._canvas.height),y.fillStyle=b.Color.Format.CSS.format(C),y.fill(),y.fillStyle=E,y.fill(),y.fillStyle=I,y.fill()}paintSelection(p,C){this.selection.style.left=`${p*this.width}px`,this.selection.style.top=`${this.height-C*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class c extends g.Disposable{constructor(p,C,y=!1){super(),this.model=C,this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new S.Emitter,this.onColorFlushed=this._onColorFlushed.event,y?(this.domNode=k.append(p,n(".standalone-strip")),this.overlay=k.append(this.domNode,n(".standalone-overlay"))):(this.domNode=k.append(p,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,E=>this.onPointerDown(E))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const p=this.getValue(this.model.color);this.updateSliderPosition(p)}onPointerDown(p){if(!p.target||!(p.target instanceof Element))return;const C=this._register(new L.GlobalPointerMoveMonitor),y=k.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),p.target!==this.slider&&this.onDidChangeTop(p.offsetY),C.startMonitoring(p.target,p.pointerId,p.buttons,I=>this.onDidChangeTop(I.pageY-y.top),()=>null);const E=k.addDisposableListener(document,k.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),E.dispose(),C.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(p){const C=Math.max(0,Math.min(1,1-p/this.height));this.updateSliderPosition(C),this._onDidChange.fire(C)}updateSliderPosition(p){this.slider.style.top=`${(1-p)*this.height}px`}}class a extends c{constructor(p,C,y=!1){super(p,C,y),this.domNode.classList.add("opacity-strip"),this._register(C.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(p){const{r:C,g:y,b:E}=p.rgba,I=new b.Color(new b.RGBA(C,y,E,1)),T=new b.Color(new b.RGBA(C,y,E,0));this.overlay.style.background=`linear-gradient(to bottom, ${I} 0%, ${T} 100%)`}getValue(p){return p.hsva.a}}class l extends c{constructor(p,C,y=!1){super(p,C,y),this.domNode.classList.add("hue-strip")}getValue(p){return 1-p.hsva.h/360}}class u extends g.Disposable{constructor(p){super(),this._onClicked=this._register(new S.Emitter),this.onClicked=this._onClicked.event,this._button=k.append(p,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=C=>{this._onClicked.fire()}}get button(){return this._button}}e.InsertButton=u;class v extends D.Widget{constructor(p,C,y,E,I=!1){super(),this.model=C,this.pixelRatio=y,this._register(_.PixelRatio.onDidChange(()=>this.layout()));const T=n(".colorpicker-widget");p.appendChild(T),this.header=this._register(new r(T,this.model,E,I)),this.body=this._register(new h(T,this.model,this.pixelRatio,I))}layout(){this.body.layout()}}e.ColorPickerWidget=v}),define(J[803],ee([1,0,7,48,79,26,6,2,9,18,39,128,231,661,13,52,33,74,31,442]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsWidget=void 0;const c=_.$,a=(0,h.registerIcon)("parameter-hints-next",D.Codicon.chevronDown,i.localize(0,null)),l=(0,h.registerIcon)("parameter-hints-previous",D.Codicon.chevronUp,i.localize(1,null));let u=e.ParameterHintsWidget=class Ki extends b.Disposable{constructor(f,p,C,y,E){super(),this.editor=f,this.model=p,this.renderDisposeables=this._register(new b.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new s.MarkdownRenderer({editor:f},E,y)),this.keyVisible=t.Context.Visible.bindTo(C),this.keyMultipleSignatures=t.Context.MultipleSignatures.bindTo(C)}createParameterHintDOMNodes(){const f=c(".editor-widget.parameter-hints-widget"),p=_.append(f,c(".phwrapper"));p.tabIndex=-1;const C=_.append(p,c(".controls")),y=_.append(C,c(".button"+o.ThemeIcon.asCSSSelector(l))),E=_.append(C,c(".overloads")),I=_.append(C,c(".button"+o.ThemeIcon.asCSSSelector(a)));this._register(_.addDisposableListener(y,"click",P=>{_.EventHelper.stop(P),this.previous()})),this._register(_.addDisposableListener(I,"click",P=>{_.EventHelper.stop(P),this.next()}));const T=c(".body"),O=new L.DomScrollableElement(T,{alwaysConsumeMouseWheel:!0});this._register(O),p.appendChild(O.getDomNode());const R=_.append(T,c(".signature")),M=_.append(T,c(".docs"));f.style.userSelect="text",this.domNodes={element:f,signature:R,overloads:E,docs:M,scrollbar:O},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(P=>{this.visible&&this.editor.layoutContentWidget(this)}));const N=()=>{if(!this.domNodes)return;const P=this.editor.getOption(48);this.domNodes.element.style.fontSize=`${P.fontSize}px`,this.domNodes.element.style.lineHeight=`${P.lineHeight/P.fontSize}`};N(),this._register(w.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(P=>P.hasChanged(48)).on(N,null)),this._register(this.editor.onDidLayoutChange(P=>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 p;if(this.renderDisposeables.clear(),!this.domNodes)return;const C=f.signatures.length>1;this.domNodes.element.classList.toggle("multiple",C),this.keyMultipleSignatures.set(C),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const y=f.signatures[f.activeSignature];if(!y)return;const E=_.append(this.domNodes.signature,c(".code")),I=this.editor.getOption(48);E.style.fontSize=`${I.fontSize}px`,E.style.fontFamily=I.fontFamily;const T=y.parameters.length>0,O=(p=y.activeParameter)!==null&&p!==void 0?p:f.activeParameter;if(T)this.renderParameters(E,y,O);else{const N=_.append(E,c("span"));N.textContent=y.label}const R=y.parameters[O];if(R?.documentation){const N=c("span.documentation");if(typeof R.documentation=="string")N.textContent=R.documentation;else{const P=this.renderMarkdownDocs(R.documentation);N.appendChild(P.element)}_.append(this.domNodes.docs,c("p",{},N))}if(y.documentation!==void 0)if(typeof y.documentation=="string")_.append(this.domNodes.docs,c("p",{},y.documentation));else{const N=this.renderMarkdownDocs(y.documentation);_.append(this.domNodes.docs,N.element)}const M=this.hasDocs(y,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 P=y.parameters[O];Array.isArray(P.label)?N=y.label.substring(P.label[0],P.label[1]):N=P.label,P.documentation&&(N+=typeof P.documentation=="string"?`, ${P.documentation}`:`, ${P.documentation.value}`),y.documentation&&(N+=typeof y.documentation=="string"?`, ${y.documentation}`:`, ${y.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 p=this.renderDisposeables.add(this.markdownRenderer.render(f,{asyncRenderCallback:()=>{var C;(C=this.domNodes)===null||C===void 0||C.scrollbar.scanDomNode()}}));return p.element.classList.add("markdown-docs"),p}hasDocs(f,p){return!!(p&&typeof p.documentation=="string"&&(0,g.assertIsDefined)(p.documentation).length>0||p&&typeof p.documentation=="object"&&(0,g.assertIsDefined)(p.documentation).value.length>0||f.documentation&&typeof f.documentation=="string"&&(0,g.assertIsDefined)(f.documentation).length>0||f.documentation&&typeof f.documentation=="object"&&(0,g.assertIsDefined)(f.documentation.value).length>0)}renderParameters(f,p,C){const[y,E]=this.getParameterLabelOffsets(p,C),I=document.createElement("span");I.textContent=p.label.substring(0,y);const T=document.createElement("span");T.textContent=p.label.substring(y,E),T.className="parameter active";const O=document.createElement("span");O.textContent=p.label.substring(E),_.append(f,I,T,O)}getParameterLabelOffsets(f,p){const C=f.parameters[p];if(C){if(Array.isArray(C.label))return C.label;if(C.label.length){const y=new RegExp(`(\\\\W|^)${(0,S.escapeRegExpCharacters)(C.label)}(?=\\\\W|$)`,"g");y.test(f.label);const E=y.lastIndex-C.label.length;return E>=0?[E,y.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 Ki.ID}updateMaxHeight(){if(!this.domNodes)return;const p=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=p;const C=this.domNodes.element.getElementsByClassName("phwrapper");C.length&&(C[0].style.maxHeight=p)}};u.ID="editor.widget.parameterHintsWidget",e.ParameterHintsWidget=u=Te([ge(2,n.IContextKeyService),ge(3,r.IOpenerService),ge(4,m.ILanguageService)],u),(0,d.registerColor)("editorHoverWidget.highlightForeground",{dark:d.listHighlightForeground,light:d.listHighlightForeground,hcDark:d.listHighlightForeground,hcLight:d.listHighlightForeground},i.localize(3,null))}),define(J[804],ee([1,0,102,2,15,22,27,19,724,231,660,13,8,803]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=void 0;let n=class ji extends k.Disposable{static get(c){return c.getContribution(ji.ID)}constructor(c,a,l){super(),this.editor=c,this.model=this._register(new S.ParameterHintsModel(c,l.signatureHelpProvider)),this._register(this.model.onChangedHints(u=>{var v;u?(this.widget.value.show(),this.widget.value.render(u)):(v=this.widget.rawValue)===null||v===void 0||v.hide()})),this.widget=new _.Lazy(()=>this._register(a.createInstance(i.ParameterHintsWidget,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var c;(c=this.widget.rawValue)===null||c===void 0||c.previous()}next(){var c;(c=this.widget.rawValue)===null||c===void 0||c.next()}trigger(c){this.model.trigger(c,0)}};n.ID="editor.controller.parameterHints",n=Te([ge(1,t.IInstantiationService),ge(2,b.ILanguageFeaturesService)],n);class r extends L.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(c,a){const l=n.get(a);l?.trigger({triggerKind:w.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=r,(0,L.registerEditorContribution)(n.ID,n,2),(0,L.registerEditorAction)(r);const d=100+75,h=L.EditorCommand.bindToContribution(n.get);(0,L.registerEditorCommand)(new h({id:"closeParameterHints",precondition:g.Context.Visible,handler:o=>o.cancel(),kbOpts:{weight:d,kbExpr:D.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,L.registerEditorCommand)(new h({id:"showPrevParameterHint",precondition:s.ContextKeyExpr.and(g.Context.Visible,g.Context.MultipleSignatures),handler:o=>o.previous(),kbOpts:{weight:d,kbExpr:D.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,L.registerEditorCommand)(new h({id:"showNextParameterHint",precondition:s.ContextKeyExpr.and(g.Context.Visible,g.Context.MultipleSignatures),handler:o=>o.next(),kbOpts:{weight:d,kbExpr:D.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(J[805],ee([1,0,7,69,40,2,128,8,741,74,31,449]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const s=26;let t=e.BannerController=class extends D.Disposable{constructor(r,d){super(),this._editor=r,this.instantiationService=d,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 d;this.hide(),(d=r.onClose)===null||d===void 0||d.call(r)}})),this._editor.setBanner(this.banner.element,s)}};e.BannerController=t=Te([ge(1,b.IInstantiationService)],t);let i=class extends D.Disposable{constructor(r){super(),this.instantiationService=r,this.markdownRenderer=this.instantiationService.createInstance(w.MarkdownRenderer,{}),this.element=(0,_.$)("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 d=(0,_.$)("span");return d.innerText=r,d}return this.markdownRenderer.render(r).element}clear(){(0,_.clearNode)(this.element)}show(r){(0,_.clearNode)(this.element);const d=this.getAriaLabel(r);d&&this.element.setAttribute("aria-label",d);const h=(0,_.append)(this.element,(0,_.$)("div.icon-container"));h.setAttribute("aria-hidden","true"),r.icon&&h.appendChild((0,_.$)(`div${m.ThemeIcon.asCSSSelector(r.icon)}`));const o=(0,_.append)(this.element,(0,_.$)("div.message-container"));if(o.setAttribute("aria-hidden","true"),o.appendChild(this.getBannerMessage(r.message)),this.messageActionsContainer=(0,_.append)(this.element,(0,_.$)("div.message-actions-container")),r.actions)for(const a of r.actions)this._register(this.instantiationService.createInstance(S.Link,this.messageActionsContainer,Object.assign(Object.assign({},a),{tabIndex:-1}),{}));const c=(0,_.append)(this.element,(0,_.$)("div.action-container"));this.actionBar=this._register(new k.ActionBar(c)),this.actionBar.push(this._register(new L.Action("banner.close","Close Banner",m.ThemeIcon.asClassName(g.widgetClose),!0,()=>{typeof r.onClose=="function"&&r.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};i=Te([ge(0,b.IInstantiationService)],i)}),define(J[806],ee([1,0,7,6,31,74]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function w(S){const g=new k.Emitter,m=(0,D.getIconRegistry)();return m.onDidChange(()=>g.fire()),S?.onDidProductIconThemeChange(()=>g.fire()),{onDidChange:g.event,getCSS(){const s=S?S.getProductIconTheme():new b,t={},i=r=>{const d=s.getIcon(r);if(!d)return;const h=d.font;return h?(t[h.id]=h.definition,`.codicon-${r.id}:before { content: \'${d.fontCharacter}\'; font-family: ${(0,_.asCSSPropertyValue)(h.id)}; }`):`.codicon-${r.id}:before { content: \'${d.fontCharacter}\'; }`},n=[];for(const r of m.getIcons()){const d=i(r);d&&n.push(d)}for(const r in t){const d=t[r],h=d.weight?`font-weight: ${d.weight};`:"",o=d.style?`font-style: ${d.style};`:"",c=d.src.map(a=>`${(0,_.asCSSUrl)(a.location)} format(\'${a.format}\')`).join(", ");n.push(`@font-face { src: ${c}; font-family: ${(0,_.asCSSPropertyValue)(r)};${h}${o} font-display: block; }`)}return n.join(`\n`)}}}e.getIconsStyleSheet=w;class b{getIcon(g){const m=(0,D.getIconRegistry)();let s=g.defaults;for(;L.ThemeIcon.isThemeIcon(s);){const t=m.getIcon(s.id);if(!t)return;s=t.defaults}return s}}e.UnthemedProductIconTheme=b}),define(J[93],ee([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var _;(function(D){D.DARK="dark",D.LIGHT="light",D.HIGH_CONTRAST_DARK="hcDark",D.HIGH_CONTRAST_LIGHT="hcLight"})(_||(e.ColorScheme=_={}));function k(D){return D===_.HIGH_CONTRAST_DARK||D===_.HIGH_CONTRAST_LIGHT}e.isHighContrast=k;function L(D){return D===_.DARK||D===_.HIGH_CONTRAST_DARK}e.isDark=L}),define(J[342],ee([1,0,47,35,17,464,138,144,110,93,41]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLine=e.ViewLineOptions=void 0;const s=function(){return L.isNative?!0:!(L.isLinux||_.isFirefox||_.isSafari)}();let t=!0;class i{constructor(u,v){this.themeType=v;const f=u.options,p=f.get(48);f.get(36)==="off"?this.renderWhitespace=f.get(95):this.renderWhitespace="none",this.renderControlCharacters=f.get(90),this.spaceWidth=p.spaceWidth,this.middotWidth=p.middotWidth,this.wsmiddotWidth=p.wsmiddotWidth,this.useMonospaceOptimizations=p.isMonospace&&!f.get(31),this.canUseHalfwidthRightwardsArrow=p.canUseHalfwidthRightwardsArrow,this.lineHeight=f.get(64),this.stopRenderingLineAfter=f.get(113),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 n{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,g.isHighContrast)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(u,v,f,p){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const C=f.getViewLineRenderingData(u),y=this._options,E=b.LineDecoration.filter(C.inlineDecorations,u,C.minColumn,C.maxColumn);let I=null;if((0,g.isHighContrast)(y.themeType)||this._options.renderWhitespace==="selection"){const M=f.selections;for(const N of M){if(N.endLineNumber<u||N.startLineNumber>u)continue;const P=N.startLineNumber===u?N.startColumn:C.minColumn,x=N.endLineNumber===u?N.endColumn:C.maxColumn;P<x&&((0,g.isHighContrast)(y.themeType)&&E.push(new b.LineDecoration(P,x,"inline-selected-text",0)),this._options.renderWhitespace==="selection"&&(I||(I=[]),I.push(new S.LineRange(P-1,x-1))))}}const T=new S.RenderLineInput(y.useMonospaceOptimizations,y.canUseHalfwidthRightwardsArrow,C.content,C.continuesWithWrappedLine,C.isBasicASCII,C.containsRTL,C.minColumn-1,C.tokens,E,C.tabSize,C.startVisibleColumn,y.spaceWidth,y.middotWidth,y.wsmiddotWidth,y.stopRenderingLineAfter,y.renderWhitespace,y.renderControlCharacters,y.fontLigatures!==m.EditorFontLigatures.OFF,I);if(this._renderedViewLine&&this._renderedViewLine.input.equals(T))return!1;p.appendString(\'<div style="top:\'),p.appendString(String(v)),p.appendString("px;height:"),p.appendString(String(this._options.lineHeight)),p.appendString(\'px;" class="\'),p.appendString(n.CLASS_NAME),p.appendString(\'">\');const O=(0,S.renderViewLine)(T,p);p.appendString("</div>");let R=null;return t&&s&&C.isBasicASCII&&y.useMonospaceOptimizations&&O.containsForeignElements===0&&(R=new r(this._renderedViewLine?this._renderedViewLine.domNode:null,T,O.characterMapping)),R||(R=o(this._renderedViewLine?this._renderedViewLine.domNode:null,T,O.characterMapping,O.containsRTL,O.containsForeignElements)),this._renderedViewLine=R,!0}layoutLine(u,v){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(v),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,v,f,p){if(!this._renderedViewLine)return null;v=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,v)),f=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,f));const C=this._renderedViewLine.input.stopRenderingLineAfter;if(C!==-1&&v>C+1&&f>C+1)return new w.VisibleRanges(!0,[new w.FloatHorizontalRange(this.getWidth(p),0)]);C!==-1&&v>C+1&&(v=C+1),C!==-1&&f>C+1&&(f=C+1);const y=this._renderedViewLine.getVisibleRangesForRange(u,v,f,p);return y&&y.length>0?new w.VisibleRanges(!1,y):null}getColumnOfNodeOffset(u,v,f){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(u,v,f):1}}e.ViewLine=n,n.CLASS_NAME="view-line";class r{constructor(u,v,f){this._cachedWidth=-1,this.domNode=u,this.input=v;const p=Math.floor(v.lineContent.length/300);if(p>0){this._keyColumnPixelOffsetCache=new Float32Array(p);for(let C=0;C<p;C++)this._keyColumnPixelOffsetCache[C]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=f,this._charWidth=v.spaceWidth}getWidth(u){if(!this.domNode||this.input.lineContent.length<300){const v=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*v)}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),v=this.domNode.domNode.firstChild.offsetWidth;Math.abs(u-v)>=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,v,f,p){const C=this._getColumnPixelOffset(u,v,p),y=this._getColumnPixelOffset(u,f,p);return[new w.FloatHorizontalRange(C,y-C)]}_getColumnPixelOffset(u,v,f){if(v<=300){const T=this._characterMapping.getHorizontalOffset(v);return this._charWidth*T}const p=Math.floor((v-1)/300)-1,C=(p+1)*300+1;let y=-1;if(this._keyColumnPixelOffsetCache&&(y=this._keyColumnPixelOffsetCache[p],y===-1&&(y=this._actualReadPixelOffset(u,C,f),this._keyColumnPixelOffsetCache[p]=y)),y===-1){const T=this._characterMapping.getHorizontalOffset(v);return this._charWidth*T}const E=this._characterMapping.getHorizontalOffset(C),I=this._characterMapping.getHorizontalOffset(v);return y+this._charWidth*(I-E)}_getReadingTarget(u){return u.domNode.firstChild}_actualReadPixelOffset(u,v,f){if(!this.domNode)return-1;const p=this._characterMapping.getDomPosition(v),C=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(this.domNode),p.partIndex,p.charIndex,p.partIndex,p.charIndex,f);return!C||C.length===0?-1:C[0].left}getColumnOfNodeOffset(u,v,f){const p=v.textContent.length;let C=-1;for(;v;)v=v.previousSibling,C++;return this._characterMapping.getColumn(new S.DomPosition(C,f),p)}}class d{constructor(u,v,f,p,C){if(this.domNode=u,this.input=v,this._characterMapping=f,this._isWhitespaceOnly=/^\\s*$/.test(v.lineContent),this._containsForeignElements=C,this._cachedWidth=-1,this._pixelOffsetCache=null,!p||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let y=0,E=this._characterMapping.length;y<=E;y++)this._pixelOffsetCache[y]=-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,v,f,p){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const C=this._readPixelOffset(this.domNode,u,v,p);if(C===-1)return null;const y=this._readPixelOffset(this.domNode,u,f,p);return y===-1?null:[new w.FloatHorizontalRange(C,y-C)]}return this._readVisibleRangesForRange(this.domNode,u,v,f,p)}_readVisibleRangesForRange(u,v,f,p,C){if(f===p){const y=this._readPixelOffset(u,v,f,C);return y===-1?null:[new w.FloatHorizontalRange(y,0)]}else return this._readRawVisibleRangesForRange(u,f,p,C)}_readPixelOffset(u,v,f,p){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(p);const C=this._getReadingTarget(u);return C.firstChild?(p.markDidDomLayout(),C.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const C=this._pixelOffsetCache[f];if(C!==-1)return C;const y=this._actualReadPixelOffset(u,v,f,p);return this._pixelOffsetCache[f]=y,y}return this._actualReadPixelOffset(u,v,f,p)}_actualReadPixelOffset(u,v,f,p){if(this._characterMapping.length===0){const I=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),0,0,0,0,p);return!I||I.length===0?-1:I[0].left}if(f===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(p);const C=this._characterMapping.getDomPosition(f),y=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),C.partIndex,C.charIndex,C.partIndex,C.charIndex,p);if(!y||y.length===0)return-1;const E=y[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,v,f,p){if(v===1&&f===this._characterMapping.length)return[new w.FloatHorizontalRange(0,this.getWidth(p))];const C=this._characterMapping.getDomPosition(v),y=this._characterMapping.getDomPosition(f);return D.RangeUtil.readHorizontalRanges(this._getReadingTarget(u),C.partIndex,C.charIndex,y.partIndex,y.charIndex,p)}getColumnOfNodeOffset(u,v,f){const p=v.textContent.length;let C=-1;for(;v;)v=v.previousSibling,C++;return this._characterMapping.getColumn(new S.DomPosition(C,f),p)}}class h extends d{_readVisibleRangesForRange(u,v,f,p,C){const y=super._readVisibleRangesForRange(u,v,f,p,C);if(!y||y.length===0||f===p||f===1&&p===this._characterMapping.length)return y;if(!this.input.containsRTL){const E=this._readPixelOffset(u,v,p,C);if(E!==-1){const I=y[y.length-1];I.left<E&&(I.width=E-I.left)}}return y}}const o=function(){return _.isWebKit?c:a}();function c(l,u,v,f,p){return new h(l,u,v,f,p)}function a(l,u,v,f,p){return new d(l,u,v,f,p)}}),define(J[343],ee([1,0,156,54,342,12,5,77,7,264]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;class m{constructor(p=null){this.hitTarget=p,this.type=0}}class s{constructor(p,C,y){this.position=p,this.spanNode=C,this.injectedText=y,this.type=1}}var t;(function(f){function p(C,y,E){const I=C.getPositionFromDOMInfo(y,E);return I?new s(I,y,null):new m(y)}f.createFromDOMInfo=p})(t||(t={}));class i{constructor(p,C){this.lastViewCursorsRenderData=p,this.lastTextareaPosition=C}}e.PointerHandlerLastRenderData=i;class n{static _deduceRage(p,C=null){return!C&&p?new w.Range(p.lineNumber,p.column,p.lineNumber,p.column):C??null}static createUnknown(p,C,y){return{type:0,element:p,mouseColumn:C,position:y,range:this._deduceRage(y)}}static createTextarea(p,C){return{type:1,element:p,mouseColumn:C,position:null,range:null}}static createMargin(p,C,y,E,I,T){return{type:p,element:C,mouseColumn:y,position:E,range:I,detail:T}}static createViewZone(p,C,y,E,I){return{type:p,element:C,mouseColumn:y,position:E,range:this._deduceRage(E),detail:I}}static createContentText(p,C,y,E,I){return{type:6,element:p,mouseColumn:C,position:y,range:this._deduceRage(y,E),detail:I}}static createContentEmpty(p,C,y,E){return{type:7,element:p,mouseColumn:C,position:y,range:this._deduceRage(y),detail:E}}static createContentWidget(p,C,y){return{type:9,element:p,mouseColumn:C,position:null,range:null,detail:y}}static createScrollbar(p,C,y){return{type:11,element:p,mouseColumn:C,position:y,range:this._deduceRage(y)}}static createOverlayWidget(p,C,y){return{type:12,element:p,mouseColumn:C,position:null,range:null,detail:y}}static createOutsideEditor(p,C,y,E){return{type:13,element:null,mouseColumn:p,position:C,range:this._deduceRage(C),outsidePosition:y,outsideDistance:E}}static _typeToString(p){return p===1?"TEXTAREA":p===2?"GUTTER_GLYPH_MARGIN":p===3?"GUTTER_LINE_NUMBERS":p===4?"GUTTER_LINE_DECORATIONS":p===5?"GUTTER_VIEW_ZONE":p===6?"CONTENT_TEXT":p===7?"CONTENT_EMPTY":p===8?"CONTENT_VIEW_ZONE":p===9?"CONTENT_WIDGET":p===10?"OVERVIEW_RULER":p===11?"SCROLLBAR":p===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(p){return this._typeToString(p.type)+": "+p.position+" - "+p.range+" - "+JSON.stringify(p.detail)}}e.MouseTarget=n;class r{static isTextArea(p){return p.length===2&&p[0]===3&&p[1]===6}static isChildOfViewLines(p){return p.length>=4&&p[0]===3&&p[3]===7}static isStrictChildOfViewLines(p){return p.length>4&&p[0]===3&&p[3]===7}static isChildOfScrollableElement(p){return p.length>=2&&p[0]===3&&p[1]===5}static isChildOfMinimap(p){return p.length>=2&&p[0]===3&&p[1]===8}static isChildOfContentWidgets(p){return p.length>=4&&p[0]===3&&p[3]===1}static isChildOfOverflowingContentWidgets(p){return p.length>=1&&p[0]===2}static isChildOfOverlayWidgets(p){return p.length>=2&&p[0]===3&&p[1]===4}}class d{constructor(p,C,y){this.viewModel=p.viewModel;const E=p.configuration.options;this.layoutInfo=E.get(140),this.viewDomNode=C.viewDomNode,this.lineHeight=E.get(64),this.stickyTabStops=E.get(112),this.typicalHalfwidthCharacterWidth=E.get(48).typicalHalfwidthCharacterWidth,this.lastRenderData=y,this._context=p,this._viewHelper=C}getZoneAtCoord(p){return d.getZoneAtCoord(this._context,p)}static getZoneAtCoord(p,C){const y=p.viewLayout.getWhitespaceAtVerticalOffset(C);if(y){const E=y.verticalOffset+y.height/2,I=p.viewModel.getLineCount();let T=null,O,R=null;return y.afterLineNumber!==I&&(R=new D.Position(y.afterLineNumber+1,1)),y.afterLineNumber>0&&(T=new D.Position(y.afterLineNumber,p.viewModel.getLineMaxColumn(y.afterLineNumber))),R===null?O=T:T===null?O=R:C<E?O=T:O=R,{viewZoneId:y.id,afterLineNumber:y.afterLineNumber,positionBefore:T,positionAfter:R,position:O}}return null}getFullLineRangeAtCoord(p){if(this._context.viewLayout.isAfterLines(p)){const E=this._context.viewModel.getLineCount(),I=this._context.viewModel.getLineMaxColumn(E);return{range:new w.Range(E,I,E,I),isAfterLines:!0}}const C=this._context.viewLayout.getLineNumberAtVerticalOffset(p),y=this._context.viewModel.getLineMaxColumn(C);return{range:new w.Range(C,1,C,y),isAfterLines:!1}}getLineNumberAtVerticalOffset(p){return this._context.viewLayout.getLineNumberAtVerticalOffset(p)}isAfterLines(p){return this._context.viewLayout.isAfterLines(p)}isInTopPadding(p){return this._context.viewLayout.isInTopPadding(p)}isInBottomPadding(p){return this._context.viewLayout.isInBottomPadding(p)}getVerticalOffsetForLineNumber(p){return this._context.viewLayout.getVerticalOffsetForLineNumber(p)}findAttribute(p,C){return d._findAttribute(p,C,this._viewHelper.viewDomNode)}static _findAttribute(p,C,y){for(;p&&p!==document.body;){if(p.hasAttribute&&p.hasAttribute(C))return p.getAttribute(C);if(p===y)return null;p=p.parentNode}return null}getLineWidth(p){return this._viewHelper.getLineWidth(p)}visibleRangeForPosition(p,C){return this._viewHelper.visibleRangeForPosition(p,C)}getPositionFromDOMInfo(p,C){return this._viewHelper.getPositionFromDOMInfo(p,C)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=d;class h{constructor(p,C,y,E){this.editorPos=C,this.pos=y,this.relativePos=E,this.mouseVerticalOffset=Math.max(0,p.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=p.getCurrentScrollLeft()+this.relativePos.x-p.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<p.layoutInfo.contentLeft&&this.relativePos.x>=p.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,l._getMouseColumn(this.mouseContentHorizontalOffset,p.typicalHalfwidthCharacterWidth))}}class o extends h{constructor(p,C,y,E,I){super(p,C,y,E),this._ctx=p,I?(this.target=I,this.targetPath=k.PartFingerprints.collect(I,p.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(p=null){return p&&p.column<this._ctx.viewModel.getLineMaxColumn(p.lineNumber)?b.CursorColumns.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(p.lineNumber),p.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(p=null){return n.createUnknown(this.target,this._getMouseColumn(p),p)}fulfillTextarea(){return n.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(p,C,y,E){return n.createMargin(p,this.target,this._getMouseColumn(C),C,y,E)}fulfillViewZone(p,C,y){return n.createViewZone(p,this.target,this._getMouseColumn(C),C,y)}fulfillContentText(p,C,y){return n.createContentText(this.target,this._getMouseColumn(p),p,C,y)}fulfillContentEmpty(p,C){return n.createContentEmpty(this.target,this._getMouseColumn(p),p,C)}fulfillContentWidget(p){return n.createContentWidget(this.target,this._getMouseColumn(),p)}fulfillScrollbar(p){return n.createScrollbar(this.target,this._getMouseColumn(p),p)}fulfillOverlayWidget(p){return n.createOverlayWidget(this.target,this._getMouseColumn(),p)}withTarget(p){return new o(this._ctx,this.editorPos,this.pos,this.relativePos,p)}}const c={isAfterLines:!0};function a(f){return{isAfterLines:!1,horizontalDistanceToText:f}}class l{constructor(p,C){this._context=p,this._viewHelper=C}mouseTargetIsWidget(p){const C=p.target,y=k.PartFingerprints.collect(C,this._viewHelper.viewDomNode);return!!(r.isChildOfContentWidgets(y)||r.isChildOfOverflowingContentWidgets(y)||r.isChildOfOverlayWidgets(y))}createMouseTarget(p,C,y,E,I){const T=new d(this._context,this._viewHelper,p),O=new o(T,C,y,E,I);try{const R=l._createMouseTarget(T,O,!1);if(R.type===6&&T.stickyTabStops&&R.position!==null){const M=l._snapToSoftTabBoundary(R.position,T.viewModel),N=w.Range.fromPositions(M,M).plusRange(R.range);return O.fulfillContentText(M,N,R.detail)}return R}catch{return O.fulfillUnknown()}}static _createMouseTarget(p,C,y){if(C.target===null){if(y)return C.fulfillUnknown();const T=l._doHitTest(p,C);return T.type===1?l.createMouseTargetFromHitTestPosition(p,C,T.spanNode,T.position,T.injectedText):this._createMouseTarget(p,C.withTarget(T.hitTarget),!0)}const E=C;let I=null;return I=I||l._hitTestContentWidget(p,E),I=I||l._hitTestOverlayWidget(p,E),I=I||l._hitTestMinimap(p,E),I=I||l._hitTestScrollbarSlider(p,E),I=I||l._hitTestViewZone(p,E),I=I||l._hitTestMargin(p,E),I=I||l._hitTestViewCursor(p,E),I=I||l._hitTestTextArea(p,E),I=I||l._hitTestViewLines(p,E,y),I=I||l._hitTestScrollbar(p,E),I||C.fulfillUnknown()}static _hitTestContentWidget(p,C){if(r.isChildOfContentWidgets(C.targetPath)||r.isChildOfOverflowingContentWidgets(C.targetPath)){const y=p.findAttribute(C.target,"widgetId");return y?C.fulfillContentWidget(y):C.fulfillUnknown()}return null}static _hitTestOverlayWidget(p,C){if(r.isChildOfOverlayWidgets(C.targetPath)){const y=p.findAttribute(C.target,"widgetId");return y?C.fulfillOverlayWidget(y):C.fulfillUnknown()}return null}static _hitTestViewCursor(p,C){if(C.target){const y=p.lastRenderData.lastViewCursorsRenderData;for(const E of y)if(C.target===E.domNode)return C.fulfillContentText(E.position,null,{mightBeForeignElement:!1,injectedText:null})}if(C.isInContentArea){const y=p.lastRenderData.lastViewCursorsRenderData,E=C.mouseContentHorizontalOffset,I=C.mouseVerticalOffset;for(const T of y){if(E<T.contentLeft||E>T.contentLeft+T.width)continue;const O=p.getVerticalOffsetForLineNumber(T.position.lineNumber);if(O<=I&&I<=O+T.height)return C.fulfillContentText(T.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(p,C){const y=p.getZoneAtCoord(C.mouseVerticalOffset);if(y){const E=C.isInContentArea?8:5;return C.fulfillViewZone(E,y.position,y)}return null}static _hitTestTextArea(p,C){return r.isTextArea(C.targetPath)?p.lastRenderData.lastTextareaPosition?C.fulfillContentText(p.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):C.fulfillTextarea():null}static _hitTestMargin(p,C){if(C.isInMarginArea){const y=p.getFullLineRangeAtCoord(C.mouseVerticalOffset),E=y.range.getStartPosition();let I=Math.abs(C.relativePos.x);const T={isAfterLines:y.isAfterLines,glyphMarginLeft:p.layoutInfo.glyphMarginLeft,glyphMarginWidth:p.layoutInfo.glyphMarginWidth,lineNumbersWidth:p.layoutInfo.lineNumbersWidth,offsetX:I};return I-=p.layoutInfo.glyphMarginLeft,I<=p.layoutInfo.glyphMarginWidth?C.fulfillMargin(2,E,y.range,T):(I-=p.layoutInfo.glyphMarginWidth,I<=p.layoutInfo.lineNumbersWidth?C.fulfillMargin(3,E,y.range,T):(I-=p.layoutInfo.lineNumbersWidth,C.fulfillMargin(4,E,y.range,T)))}return null}static _hitTestViewLines(p,C,y){if(!r.isChildOfViewLines(C.targetPath))return null;if(p.isInTopPadding(C.mouseVerticalOffset))return C.fulfillContentEmpty(new D.Position(1,1),c);if(p.isAfterLines(C.mouseVerticalOffset)||p.isInBottomPadding(C.mouseVerticalOffset)){const I=p.viewModel.getLineCount(),T=p.viewModel.getLineMaxColumn(I);return C.fulfillContentEmpty(new D.Position(I,T),c)}if(y){if(r.isStrictChildOfViewLines(C.targetPath)){const I=p.getLineNumberAtVerticalOffset(C.mouseVerticalOffset);if(p.viewModel.getLineLength(I)===0){const O=p.getLineWidth(I),R=a(C.mouseContentHorizontalOffset-O);return C.fulfillContentEmpty(new D.Position(I,1),R)}const T=p.getLineWidth(I);if(C.mouseContentHorizontalOffset>=T){const O=a(C.mouseContentHorizontalOffset-T),R=new D.Position(I,p.viewModel.getLineMaxColumn(I));return C.fulfillContentEmpty(R,O)}}return C.fulfillUnknown()}const E=l._doHitTest(p,C);return E.type===1?l.createMouseTargetFromHitTestPosition(p,C,E.spanNode,E.position,E.injectedText):this._createMouseTarget(p,C.withTarget(E.hitTarget),!0)}static _hitTestMinimap(p,C){if(r.isChildOfMinimap(C.targetPath)){const y=p.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),E=p.viewModel.getLineMaxColumn(y);return C.fulfillScrollbar(new D.Position(y,E))}return null}static _hitTestScrollbarSlider(p,C){if(r.isChildOfScrollableElement(C.targetPath)&&C.target&&C.target.nodeType===1){const y=C.target.className;if(y&&/\\b(slider|scrollbar)\\b/.test(y)){const E=p.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),I=p.viewModel.getLineMaxColumn(E);return C.fulfillScrollbar(new D.Position(E,I))}}return null}static _hitTestScrollbar(p,C){if(r.isChildOfScrollableElement(C.targetPath)){const y=p.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),E=p.viewModel.getLineMaxColumn(y);return C.fulfillScrollbar(new D.Position(y,E))}return null}getMouseColumn(p){const C=this._context.configuration.options,y=C.get(140),E=this._context.viewLayout.getCurrentScrollLeft()+p.x-y.contentLeft;return l._getMouseColumn(E,C.get(48).typicalHalfwidthCharacterWidth)}static _getMouseColumn(p,C){return p<0?1:Math.round(p/C)+1}static createMouseTargetFromHitTestPosition(p,C,y,E,I){const T=E.lineNumber,O=E.column,R=p.getLineWidth(T);if(C.mouseContentHorizontalOffset>R){const A=a(C.mouseContentHorizontalOffset-R);return C.fulfillContentEmpty(E,A)}const M=p.visibleRangeForPosition(T,O);if(!M)return C.fulfillUnknown(E);const N=M.left;if(Math.abs(C.mouseContentHorizontalOffset-N)<1)return C.fulfillContentText(E,null,{mightBeForeignElement:!!I,injectedText:I});const P=[];if(P.push({offset:M.left,column:O}),O>1){const A=p.visibleRangeForPosition(T,O-1);A&&P.push({offset:A.left,column:O-1})}const x=p.viewModel.getLineMaxColumn(T);if(O<x){const A=p.visibleRangeForPosition(T,O+1);A&&P.push({offset:A.left,column:O+1})}P.sort((A,Y)=>A.offset-Y.offset);const F=C.pos.toClientCoordinates(),B=y.getBoundingClientRect(),V=B.left<=F.clientX&&F.clientX<=B.right;let K=null;for(let A=1;A<P.length;A++){const Y=P[A-1],ie=P[A];if(Y.offset<=C.mouseContentHorizontalOffset&&C.mouseContentHorizontalOffset<=ie.offset){K=new w.Range(T,Y.column,T,ie.column);const le=Math.abs(Y.offset-C.mouseContentHorizontalOffset),ne=Math.abs(ie.offset-C.mouseContentHorizontalOffset);E=le<ne?new D.Position(T,Y.column):new D.Position(T,ie.column);break}}return C.fulfillContentText(E,K,{mightBeForeignElement:!V||!!I,injectedText:I})}static _doHitTestWithCaretRangeFromPoint(p,C){const y=p.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),E=p.getVerticalOffsetForLineNumber(y),I=E+p.lineHeight;if(!(y===p.viewModel.getLineCount()&&C.mouseVerticalOffset>I)){const O=Math.floor((E+I)/2);let R=C.pos.y+(O-C.mouseVerticalOffset);R<=C.editorPos.y&&(R=C.editorPos.y+1),R>=C.editorPos.y+C.editorPos.height&&(R=C.editorPos.y+C.editorPos.height-1);const M=new _.PageCoordinates(C.pos.x,R),N=this._actualDoHitTestWithCaretRangeFromPoint(p,M.toClientCoordinates());if(N.type===1)return N}return this._actualDoHitTestWithCaretRangeFromPoint(p,C.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(p,C){const y=S.getShadowRoot(p.viewDomNode);let E;if(y?typeof y.caretRangeFromPoint>"u"?E=u(y,C.clientX,C.clientY):E=y.caretRangeFromPoint(C.clientX,C.clientY):E=document.caretRangeFromPoint(C.clientX,C.clientY),!E||!E.startContainer)return new m;const I=E.startContainer;if(I.nodeType===I.TEXT_NODE){const T=I.parentNode,O=T?T.parentNode:null,R=O?O.parentNode:null;return(R&&R.nodeType===R.ELEMENT_NODE?R.className:null)===L.ViewLine.CLASS_NAME?t.createFromDOMInfo(p,T,E.startOffset):new m(I.parentNode)}else if(I.nodeType===I.ELEMENT_NODE){const T=I.parentNode,O=T?T.parentNode:null;return(O&&O.nodeType===O.ELEMENT_NODE?O.className:null)===L.ViewLine.CLASS_NAME?t.createFromDOMInfo(p,I,I.textContent.length):new m(I)}return new m}static _doHitTestWithCaretPositionFromPoint(p,C){const y=document.caretPositionFromPoint(C.clientX,C.clientY);if(y.offsetNode.nodeType===y.offsetNode.TEXT_NODE){const E=y.offsetNode.parentNode,I=E?E.parentNode:null,T=I?I.parentNode:null;return(T&&T.nodeType===T.ELEMENT_NODE?T.className:null)===L.ViewLine.CLASS_NAME?t.createFromDOMInfo(p,y.offsetNode.parentNode,y.offset):new m(y.offsetNode.parentNode)}if(y.offsetNode.nodeType===y.offsetNode.ELEMENT_NODE){const E=y.offsetNode.parentNode,I=E&&E.nodeType===E.ELEMENT_NODE?E.className:null,T=E?E.parentNode:null,O=T&&T.nodeType===T.ELEMENT_NODE?T.className:null;if(I===L.ViewLine.CLASS_NAME){const R=y.offsetNode.childNodes[Math.min(y.offset,y.offsetNode.childNodes.length-1)];if(R)return t.createFromDOMInfo(p,R,0)}else if(O===L.ViewLine.CLASS_NAME)return t.createFromDOMInfo(p,y.offsetNode,0)}return new m(y.offsetNode)}static _snapToSoftTabBoundary(p,C){const y=C.getLineContent(p.lineNumber),{tabSize:E}=C.model.getOptions(),I=g.AtomicTabMoveOperations.atomicPosition(y,p.column-1,E,2);return I!==-1?new D.Position(p.lineNumber,I+1):p}static _doHitTest(p,C){let y=new m;if(typeof document.caretRangeFromPoint=="function"?y=this._doHitTestWithCaretRangeFromPoint(p,C):document.caretPositionFromPoint&&(y=this._doHitTestWithCaretPositionFromPoint(p,C.pos.toClientCoordinates())),y.type===1){const E=p.viewModel.getInjectedTextAt(y.position),I=p.viewModel.normalizePosition(y.position,2);(E||!I.equals(y.position))&&(y=new s(I,y.spanNode,E))}return y}}e.MouseTargetFactory=l;function u(f,p,C){const y=document.createRange();let E=f.elementFromPoint(p,C);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"),O=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"),P=window.getComputedStyle(E,null).getPropertyValue("font-family"),x=`${T} ${O} ${R} ${M}/${N} ${P}`,F=E.innerText;let B=I.left,V=0,K;if(p>I.left+I.width)V=F.length;else{const A=v.getInstance();for(let Y=0;Y<F.length+1;Y++){if(K=A.getCharWidth(F.charAt(Y),x)/2,B+=K,p<B){V=Y;break}B+=K}}y.setStart(E.firstChild,V),y.setEnd(E.firstChild,V)}return y}class v{static getInstance(){return v._INSTANCE||(v._INSTANCE=new v),v._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(p,C){const y=p+C;if(this._cache[y])return this._cache[y];const E=this._canvas.getContext("2d");E.font=C;const T=E.measureText(p).width;return this._cache[y]=T,T}}v._INSTANCE=null}),define(J[807],ee([1,0,7,67,2,17,343,156,151,12,24,143,79]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=void 0;class i extends s.ViewEventHandler{constructor(c,a,l){super(),this._mouseLeaveMonitor=null,this._context=c,this.viewController=a,this.viewHelper=l,this.mouseTargetFactory=new w.MouseTargetFactory(this._context,l),this._mouseDownOperation=this._register(new n(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(f,p)=>this._createMouseTarget(f,p),f=>this._getMouseColumn(f))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(140).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=_.addDisposableListener(document,"mousemove",p=>{this.viewHelper.viewDomNode.contains(p.target)||this._onMouseLeave(new b.EditorMouseEvent(p,!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 v=0;this._register(u.onPointerDown(this.viewHelper.viewDomNode,(f,p)=>{v=p})),this._register(_.addDisposableListener(this.viewHelper.viewDomNode,_.EventType.POINTER_UP,f=>{this._mouseDownOperation.onPointerUp()})),this._register(u.onMouseDown(this.viewHelper.viewDomNode,f=>this._onMouseDown(f,v))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const c=t.MouseWheelClassifier.INSTANCE;let a=0,l=S.EditorZoom.getZoomLevel(),u=!1,v=0;const f=C=>{if(this.viewController.emitMouseWheel(C),!this._context.configuration.options.get(73))return;const y=new k.StandardWheelEvent(C);if(c.acceptStandardWheelEvent(y),c.isPhysicalMouseWheel()){if(p(C)){const E=S.EditorZoom.getZoomLevel(),I=y.deltaY>0?1:-1;S.EditorZoom.setZoomLevel(E+I),y.preventDefault(),y.stopPropagation()}}else Date.now()-a>50&&(l=S.EditorZoom.getZoomLevel(),u=p(C),v=0),a=Date.now(),v+=y.deltaY,u&&(S.EditorZoom.setZoomLevel(l+v/5),y.preventDefault(),y.stopPropagation())};this._register(_.addDisposableListener(this.viewHelper.viewDomNode,_.EventType.MOUSE_WHEEL,f,{capture:!0,passive:!1}));function p(C){return D.isMacintosh?(C.metaKey||C.ctrlKey)&&!C.shiftKey&&!C.altKey:C.ctrlKey&&!C.metaKey&&!C.shiftKey&&!C.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(c){if(c.hasChanged(140)){const a=this._context.configuration.options.get(140).height;this._height!==a&&(this._height=a,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(c){return this._mouseDownOperation.onCursorStateChanged(c),!1}onFocusChanged(c){return!1}getTargetAtClientPoint(c,a){const u=new b.ClientCoordinates(c,a).toPageCoordinates(),v=(0,b.createEditorPagePosition)(this.viewHelper.viewDomNode);if(u.y<v.y||u.y>v.y+v.height||u.x<v.x||u.x>v.x+v.width)return null;const f=(0,b.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,v,u);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),v,u,f,null)}_createMouseTarget(c,a){let l=c.target;if(!this.viewHelper.viewDomNode.contains(l)){const u=_.getShadowRoot(this.viewHelper.viewDomNode);u&&(l=u.elementsFromPoint(c.posx,c.posy).find(v=>this.viewHelper.viewDomNode.contains(v)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),c.editorPos,c.pos,c.relativePos,a?l:null)}_getMouseColumn(c){return this.mouseTargetFactory.getMouseColumn(c.relativePos)}_onContextMenu(c,a){this.viewController.emitContextMenu({event:c,target:this._createMouseTarget(c,a)})}_onMouseMove(c){this.mouseTargetFactory.mouseTargetIsWidget(c)||c.preventDefault(),!(this._mouseDownOperation.isActive()||c.timestamp<this.lastMouseLeaveTime)&&this.viewController.emitMouseMove({event:c,target:this._createMouseTarget(c,!0)})}_onMouseLeave(c){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:c,target:null})}_onMouseUp(c){this.viewController.emitMouseUp({event:c,target:this._createMouseTarget(c,!0)})}_onMouseDown(c,a){const l=this._createMouseTarget(c,!0),u=l.type===6||l.type===7,v=l.type===2||l.type===3||l.type===4,f=l.type===3,p=this._context.configuration.options.get(105),C=l.type===8||l.type===5,y=l.type===9;let E=c.leftButton||c.middleButton;D.isMacintosh&&c.leftButton&&c.ctrlKey&&(E=!1);const I=()=>{c.preventDefault(),this.viewHelper.focusTextArea()};if(E&&(u||f&&p))I(),this._mouseDownOperation.start(l.type,c,a);else if(v)c.preventDefault();else if(C){const T=l.detail;E&&this.viewHelper.shouldSuppressMouseDownOnViewZone(T.viewZoneId)&&(I(),this._mouseDownOperation.start(l.type,c,a),c.preventDefault())}else y&&this.viewHelper.shouldSuppressMouseDownOnWidget(l.detail)&&(I(),c.preventDefault());this.viewController.emitMouseDown({event:c,target:l})}}e.MouseHandler=i;class n extends L.Disposable{constructor(c,a,l,u,v,f){super(),this._context=c,this._viewController=a,this._viewHelper=l,this._mouseTargetFactory=u,this._createMouseTarget=v,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,(p,C,y)=>this._dispatchMouse(p,C,y))),this._mouseState=new h,this._currentSelection=new m.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(c){this._lastMouseEvent=c,this._mouseState.setModifiers(c);const a=this._findMousePosition(c,!1);a&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:c,target:a}):a.type===13&&(a.outsidePosition==="above"||a.outsidePosition==="below")?this._topBottomDragScrolling.start(a,c):(this._topBottomDragScrolling.stop(),this._dispatchMouse(a,!0,1)))}start(c,a,l){this._lastMouseEvent=a,this._mouseState.setStartedOnLineNumbers(c===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 v=this._context.configuration.options;if(!v.get(88)&&v.get(33)&&!v.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,l,a.buttons,f=>this._onMouseDownThenMove(f),f=>{const p=this._findMousePosition(this._lastMouseEvent,!1);f&&f instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:p?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,l,a.buttons,f=>this._onMouseDownThenMove(f),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(c){this._currentSelection=c.selections[0]}_getPositionOutsideEditor(c){const a=c.editorPos,l=this._context.viewModel,u=this._context.viewLayout,v=this._getMouseColumn(c);if(c.posy<a.y){const p=a.y-c.posy,C=Math.max(u.getCurrentScrollTop()-p,0),y=w.HitTestContext.getZoneAtCoord(this._context,C);if(y){const I=this._helpPositionJumpOverViewZone(y);if(I)return w.MouseTarget.createOutsideEditor(v,I,"above",p)}const E=u.getLineNumberAtVerticalOffset(C);return w.MouseTarget.createOutsideEditor(v,new g.Position(E,1),"above",p)}if(c.posy>a.y+a.height){const p=c.posy-a.y-a.height,C=u.getCurrentScrollTop()+c.relativePos.y,y=w.HitTestContext.getZoneAtCoord(this._context,C);if(y){const I=this._helpPositionJumpOverViewZone(y);if(I)return w.MouseTarget.createOutsideEditor(v,I,"below",p)}const E=u.getLineNumberAtVerticalOffset(C);return w.MouseTarget.createOutsideEditor(v,new g.Position(E,l.getLineMaxColumn(E)),"below",p)}const f=u.getLineNumberAtVerticalOffset(u.getCurrentScrollTop()+c.relativePos.y);if(c.posx<a.x){const p=a.x-c.posx;return w.MouseTarget.createOutsideEditor(v,new g.Position(f,1),"left",p)}if(c.posx>a.x+a.width){const p=c.posx-a.x-a.width;return w.MouseTarget.createOutsideEditor(v,new g.Position(f,l.getLineMaxColumn(f)),"right",p)}return null}_findMousePosition(c,a){const l=this._getPositionOutsideEditor(c);if(l)return l;const u=this._createMouseTarget(c,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(c){const a=new g.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),l=c.positionBefore,u=c.positionAfter;return l&&u?l.isBefore(a)?l:u:null}_dispatchMouse(c,a,l){c.position&&this._viewController.dispatchMouse({position:c.position,mouseColumn:c.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:l,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:c.type===6&&c.detail.injectedText!==null})}}class r extends L.Disposable{constructor(c,a,l,u){super(),this._context=c,this._viewHelper=a,this._mouseTargetFactory=l,this._dispatchMouse=u,this._operation=null}dispose(){super.dispose(),this.stop()}start(c,a){this._operation?this._operation.setPosition(c,a):this._operation=new d(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,c,a)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class d extends L.Disposable{constructor(c,a,l,u,v,f){super(),this._context=c,this._viewHelper=a,this._mouseTargetFactory=l,this._dispatchMouse=u,this._position=v,this._mouseEvent=f,this._lastTime=Date.now(),this._animationFrameDisposable=_.scheduleAtNextAnimationFrame(()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(c,a){this._position=c,this._mouseEvent=a}_tick(){const c=Date.now(),a=c-this._lastTime;return this._lastTime=c,a}_getScrollSpeed(){const c=this._context.configuration.options.get(64),a=this._context.configuration.options.get(140).height/c,l=this._position.outsideDistance/c;return l<=1.5?Math.max(30,a*(1+l)):l<=3?Math.max(60,a*(2+l)):Math.max(200,a*(7+l))}_execute(){const c=this._context.configuration.options.get(64),a=this._getScrollSpeed(),l=this._tick(),u=a*(l/1e3)*c,v=this._position.outsidePosition==="above"?-u:u;this._context.viewModel.viewLayout.deltaScrollNow(0,v),this._viewHelper.renderNow();const f=this._context.viewLayout.getLinesViewportData(),p=this._position.outsidePosition==="above"?f.startLineNumber:f.endLineNumber;let C;{const y=(0,b.createEditorPagePosition)(this._viewHelper.viewDomNode),E=this._context.configuration.options.get(140).horizontalScrollbarHeight,I=new b.PageCoordinates(this._mouseEvent.pos.x,y.y+y.height-E-.1),T=(0,b.createCoordinatesRelativeToEditor)(this._viewHelper.viewDomNode,y,I);C=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),y,I,T,null)}(!C.position||C.position.lineNumber!==p)&&(this._position.outsidePosition==="above"?C=w.MouseTarget.createOutsideEditor(this._position.mouseColumn,new g.Position(p,1),"above",this._position.outsideDistance):C=w.MouseTarget.createOutsideEditor(this._position.mouseColumn,new g.Position(p,this._context.viewModel.getLineMaxColumn(p)),"below",this._position.outsideDistance)),this._dispatchMouse(C,!0,2),this._animationFrameDisposable=_.scheduleAtNextAnimationFrame(()=>this._execute())}}class h{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(c){this._altKey=c.altKey,this._ctrlKey=c.ctrlKey,this._metaKey=c.metaKey,this._shiftKey=c.shiftKey}setStartButtons(c){this._leftButton=c.leftButton,this._middleButton=c.middleButton}setStartedOnLineNumbers(c){this._startedOnLineNumbers=c}trySetCount(c,a){const l=new Date().getTime();l-this._lastSetMouseDownCountTime>h.CLEAR_MOUSE_DOWN_COUNT_TIME&&(c=1),this._lastSetMouseDownCountTime=l,c>this._lastMouseDownCount+1&&(c=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(a)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=a,this._lastMouseDownCount=Math.min(c,this._lastMouseDownPositionEqualCount)}}h.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(J[808],ee([1,0,7,17,57,2,807,156,210,222]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class m extends w.MouseHandler{constructor(n,r,d){super(n,r,d),this._register(L.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,L.EventType.Tap,o=>this.onTap(o))),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,L.EventType.Change,o=>this.onChange(o))),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,L.EventType.Contextmenu,o=>this._onContextMenu(new b.EditorMouseEvent(o,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",o=>{const c=o.pointerType;if(c==="mouse"){this._lastPointerType="mouse";return}else c==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const h=new b.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(h.onPointerMove(this.viewHelper.viewDomNode,o=>this._onMouseMove(o))),this._register(h.onPointerUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(h.onPointerLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(h.onPointerDown(this.viewHelper.viewDomNode,(o,c)=>this._onMouseDown(o,c)))}onTap(n){if(!n.initialTarget||!this.viewHelper.linesContentDomNode.contains(n.initialTarget))return;n.preventDefault(),this.viewHelper.focusTextArea();const r=this._createMouseTarget(new b.EditorMouseEvent(n,!1,this.viewHelper.viewDomNode),!1);r.position&&this.viewController.dispatchMouse({position:r.position,mouseColumn:r.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:n.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:r.type===6&&r.detail.injectedText!==null})}onChange(n){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-n.translationX,-n.translationY)}_onMouseDown(n,r){n.browserEvent.pointerType!=="touch"&&super._onMouseDown(n,r)}}e.PointerEventHandler=m;class s extends w.MouseHandler{constructor(n,r,d){super(n,r,d),this._register(L.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,L.EventType.Tap,h=>this.onTap(h))),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,L.EventType.Change,h=>this.onChange(h))),this._register(_.addDisposableListener(this.viewHelper.linesContentDomNode,L.EventType.Contextmenu,h=>this._onContextMenu(new b.EditorMouseEvent(h,!1,this.viewHelper.viewDomNode),!1)))}onTap(n){n.preventDefault(),this.viewHelper.focusTextArea();const r=this._createMouseTarget(new b.EditorMouseEvent(n,!1,this.viewHelper.viewDomNode),!1);if(r.position){const d=document.createEvent("CustomEvent");d.initEvent(g.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(d),this.viewController.moveTo(r.position,1)}}onChange(n){this._context.viewModel.viewLayout.deltaScrollNow(-n.translationX,-n.translationY)}}class t extends D.Disposable{constructor(n,r,d){super(),k.isIOS&&S.BrowserFeatures.pointerEvents?this.handler=this._register(new m(n,r,d)):window.TouchEvent?this.handler=this._register(new s(n,r,d)):this.handler=this._register(new w.MouseHandler(n,r,d))}getTargetAtClientPoint(n,r){return this.handler.getTargetAtClientPoint(n,r)}}e.PointerHandler=t}),define(J[809],ee([1,0,17,14,76,223,54,342,12,5,138,167,463,407]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class i{constructor(){this._currentVisibleRange=new g.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(o){this._currentVisibleRange=o}}class n{constructor(o,c,a,l,u,v,f){this.minimalReveal=o,this.lineNumber=c,this.startColumn=a,this.endColumn=l,this.startScrollTop=u,this.stopScrollTop=v,this.scrollType=f,this.type="range",this.minLineNumber=c,this.maxLineNumber=c}}class r{constructor(o,c,a,l,u){this.minimalReveal=o,this.selections=c,this.startScrollTop=a,this.stopScrollTop=l,this.scrollType=u,this.type="selections";let v=c[0].startLineNumber,f=c[0].endLineNumber;for(let p=1,C=c.length;p<C;p++){const y=c[p];v=Math.min(v,y.startLineNumber),f=Math.max(f,y.endLineNumber)}this.minLineNumber=v,this.maxLineNumber=f}}class d extends w.ViewPart{constructor(o,c){super(o),this._linesContent=c,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new D.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const a=this._context.configuration,l=this._context.configuration.options,u=l.get(48),v=l.get(141);this._lineHeight=l.get(64),this._typicalHalfwidthCharacterWidth=u.typicalHalfwidthCharacterWidth,this._isViewportWrapping=v.isViewportWrapping,this._revealHorizontalRightPadding=l.get(96),this._cursorSurroundingLines=l.get(27),this._cursorSurroundingLinesStyle=l.get(28),this._canUseLayerHinting=!l.get(30),this._viewLineOptions=new b.ViewLineOptions(a,this._context.theme.type),w.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${s.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),(0,L.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=l.get(111).enabled,this._maxNumberStickyLines=l.get(111).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(141)&&(this._maxLineWidth=0);const c=this._context.configuration.options,a=c.get(48),l=c.get(141);return this._lineHeight=c.get(64),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._isViewportWrapping=l.isViewportWrapping,this._revealHorizontalRightPadding=c.get(96),this._cursorSurroundingLines=c.get(27),this._cursorSurroundingLinesStyle=c.get(28),this._canUseLayerHinting=!c.get(30),this._stickyScrollEnabled=c.get(111).enabled,this._maxNumberStickyLines=c.get(111).maxLineCount,(0,L.applyFontInfo)(this.domNode,a),this._onOptionsMaybeChanged(),o.hasChanged(140)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const o=this._context.configuration,c=new b.ViewLineOptions(o,this._context.theme.type);if(!this._viewLineOptions.equals(c)){this._viewLineOptions=c;const a=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let u=a;u<=l;u++)this._visibleLines.getVisibleLine(u).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(o){const c=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let l=!1;for(let u=c;u<=a;u++)l=this._visibleLines.getVisibleLine(u).onSelectionChanged()||l;return l}onDecorationsChanged(o){{const c=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let l=c;l<=a;l++)this._visibleLines.getVisibleLine(l).onDecorationsChanged()}return!0}onFlushed(o){const c=this._visibleLines.onFlushed(o);return this._maxLineWidth=0,c}onLinesChanged(o){return this._visibleLines.onLinesChanged(o)}onLinesDeleted(o){return this._visibleLines.onLinesDeleted(o)}onLinesInserted(o){return this._visibleLines.onLinesInserted(o)}onRevealRangeRequest(o){const c=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),o.source,o.minimalReveal,o.range,o.selections,o.verticalType);if(c===-1)return!1;let a=this._context.viewLayout.validateScrollPosition({scrollTop:c});o.revealHorizontal?o.range&&o.range.startLineNumber!==o.range.endLineNumber?a={scrollTop:a.scrollTop,scrollLeft:0}:o.range?this._horizontalRevealRequest=new n(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 c=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),a=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(o.scrollTop<c||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,c){const a=this._getViewLineDomNode(o);if(a===null)return null;const l=this._getLineNumberFor(a);if(l===-1||l<1||l>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(l)===1)return new S.Position(l,1);const u=this._visibleLines.getStartLineNumber(),v=this._visibleLines.getEndLineNumber();if(l<u||l>v)return null;let f=this._visibleLines.getVisibleLine(l).getColumnOfNodeOffset(l,o,c);const p=this._context.viewModel.getLineMinColumn(l);return f<p&&(f=p),new S.Position(l,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 c=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let l=c;l<=a;l++){const u=this._visibleLines.getVisibleLine(l);if(o===u.getDomNode())return l}return-1}getLineWidth(o){const c=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();if(o<c||o>a)return-1;const l=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),u=this._visibleLines.getVisibleLine(o).getWidth(l);return this._updateLineWidthsSlowIfDomDidLayout(l),u}linesVisibleRangesForRange(o,c){if(this.shouldRender())return null;const a=o.endLineNumber,l=g.Range.intersectRanges(o,this._lastRenderedData.getCurrentVisibleRange());if(!l)return null;const u=[];let v=0;const f=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let p=0;c&&(p=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(l.startLineNumber,1)).lineNumber);const C=this._visibleLines.getStartLineNumber(),y=this._visibleLines.getEndLineNumber();for(let E=l.startLineNumber;E<=l.endLineNumber;E++){if(E<C||E>y)continue;const I=E===l.startLineNumber?l.startColumn:1,T=E===l.endLineNumber?l.endColumn:this._context.viewModel.getLineMaxColumn(E),O=this._visibleLines.getVisibleLine(E).getVisibleRangesForRange(E,I,T,f);if(O){if(c&&E<a){const R=p;p=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(E+1,1)).lineNumber,R!==p&&(O.ranges[O.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}u[v++]=new m.LineVisibleRanges(O.outsideRenderedLine,E,m.HorizontalRange.from(O.ranges))}}return this._updateLineWidthsSlowIfDomDidLayout(f),v===0?null:u}_visibleRangesForLineRange(o,c,a){if(this.shouldRender()||o<this._visibleLines.getStartLineNumber()||o>this._visibleLines.getEndLineNumber())return null;const l=new t.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),u=this._visibleLines.getVisibleLine(o).getVisibleRangesForRange(o,c,a,l);return this._updateLineWidthsSlowIfDomDidLayout(l),u}visibleRangeForPosition(o){const c=this._visibleRangesForLineRange(o.lineNumber,o.column,o.column);return c?new m.HorizontalPosition(c.outsideRenderedLine,c.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 c=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let l=1,u=!0;for(let v=c;v<=a;v++){const f=this._visibleLines.getVisibleLine(v);if(o&&!f.getWidthIsFast()){u=!1;continue}l=Math.max(l,f.getWidth(null))}return u&&c===1&&a===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(l),u}_checkMonospaceFontAssumptions(){let o=-1,c=-1;const a=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let u=a;u<=l;u++){const v=this._visibleLines.getVisibleLine(u);if(v.needsMonospaceFontCheck()){const f=v.getWidth(null);f>c&&(c=f,o=u)}}if(o!==-1&&!this._visibleLines.getVisibleLine(o).monospaceAssumptionsAreValid())for(let u=a;u<=l;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 l=this._computeScrollLeftToReveal(a);l&&(this._isViewportWrapping||this._ensureMaxLineWidth(l.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:l.scrollLeft},a.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),_.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const a=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let u=a;u<=l;u++)if(this._visibleLines.getVisibleLine(u).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const c=this._context.viewLayout.getCurrentScrollTop()-o.bigNumbersDelta;this._linesContent.setTop(-c),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(o){const c=Math.ceil(o);this._maxLineWidth<c&&(this._maxLineWidth=c,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(o,c,a,l,u,v){const f=o.top,p=o.height,C=f+p;let y,E,I;if(u&&u.length>0){let N=u[0].startLineNumber,P=u[0].endLineNumber;for(let x=1,F=u.length;x<F;x++){const B=u[x];N=Math.min(N,B.startLineNumber),P=Math.max(P,B.endLineNumber)}y=!1,E=this._context.viewLayout.getVerticalOffsetForLineNumber(N),I=this._context.viewLayout.getVerticalOffsetForLineNumber(P)+this._lineHeight}else if(l)y=!0,E=this._context.viewLayout.getVerticalOffsetForLineNumber(l.startLineNumber),I=this._context.viewLayout.getVerticalOffsetForLineNumber(l.endLineNumber)+this._lineHeight;else return-1;const T=(c==="mouse"||a)&&this._cursorSurroundingLinesStyle==="default";let O=0,R=0;if(T)a||(O=this._lineHeight);else{const N=Math.min(p/this._lineHeight/2,this._cursorSurroundingLines);this._stickyScrollEnabled?O=Math.max(N,this._maxNumberStickyLines)*this._lineHeight:O=N*this._lineHeight,R=Math.max(0,N-1)*this._lineHeight}a||(v===0||v===4)&&(R+=this._lineHeight),E-=O,I+=R;let M;if(I-E>p){if(!y)return-1;M=E}else if(v===5||v===6)if(v===6&&f<=E&&I<=C)M=f;else{const N=Math.max(5*this._lineHeight,p*.2),P=E-N,x=I-p;M=Math.max(x,P)}else if(v===1||v===2)if(v===2&&f<=E&&I<=C)M=f;else{const N=(E+I)/2;M=Math.max(0,N-p/2)}else M=this._computeMinimumScrolling(f,C,E,I,v===3,v===4);return M}_computeScrollLeftToReveal(o){const c=this._context.viewLayout.getCurrentViewport(),a=this._context.configuration.options.get(140),l=c.left,u=l+c.width-a.verticalScrollbarWidth;let v=1073741824,f=0;if(o.type==="range"){const C=this._visibleRangesForLineRange(o.lineNumber,o.startColumn,o.endColumn);if(!C)return null;for(const y of C.ranges)v=Math.min(v,Math.round(y.left)),f=Math.max(f,Math.round(y.left+y.width))}else for(const C of o.selections){if(C.startLineNumber!==C.endLineNumber)return null;const y=this._visibleRangesForLineRange(C.startLineNumber,C.startColumn,C.endColumn);if(!y)return null;for(const E of y.ranges)v=Math.min(v,Math.round(E.left)),f=Math.max(f,Math.round(E.left+E.width))}return o.minimalReveal||(v=Math.max(0,v-d.HORIZONTAL_EXTRA_PX),f+=this._revealHorizontalRightPadding),o.type==="selections"&&f-v>c.width?null:{scrollLeft:this._computeMinimumScrolling(l,u,v,f),maxHorizontalOffset:f}}_computeMinimumScrolling(o,c,a,l,u,v){o=o|0,c=c|0,a=a|0,l=l|0,u=!!u,v=!!v;const f=c-o;if(l-a<f){if(u)return a;if(v)return Math.max(0,l-f);if(a<o)return a;if(l>c)return Math.max(0,l-f)}else return a;return o}}e.ViewLines=d,d.HORIZONTAL_EXTRA_PX=30}),define(J[23],ee([1,0,6,2,8,37,93]),function(j,e,_,k,L,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,L.createDecorator)("themeService");function b(i){return{id:i}}e.themeColorFromId=b;function S(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=S,e.Extensions={ThemingContribution:"base.contributions.theming"};class g{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new _.Emitter}onColorThemeChange(n){return this.themingParticipants.push(n),this.onThemingParticipantAddedEmitter.fire(n),(0,k.toDisposable)(()=>{const r=this.themingParticipants.indexOf(n);this.themingParticipants.splice(r,1)})}getThemingParticipants(){return this.themingParticipants}}const m=new g;D.Registry.add(e.Extensions.ThemingContribution,m);function s(i){return m.onColorThemeChange(i)}e.registerThemingParticipant=s;class t extends k.Disposable{constructor(n){super(),this.themeService=n,this.theme=n.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(r=>this.onThemeChange(r)))}onThemeChange(n){this.theme=n,this.updateStyles()}updateStyles(){}}e.Themable=t}),define(J[810],ee([1,0,6,2,59,23]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStyleSheet=e.AbstractCodeEditorService=void 0;let w=e.AbstractCodeEditorService=class extends k.Disposable{constructor(g){super(),this._themeService=g,this._onWillCreateCodeEditor=this._register(new _.Emitter),this._onCodeEditorAdd=this._register(new _.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new _.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new _.Emitter),this._onDiffEditorAdd=this._register(new _.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new _.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new L.LinkedList,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(g){this._codeEditors[g.getId()]=g,this._onCodeEditorAdd.fire(g)}removeCodeEditor(g){delete this._codeEditors[g.getId()]&&this._onCodeEditorRemove.fire(g)}listCodeEditors(){return Object.keys(this._codeEditors).map(g=>this._codeEditors[g])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(g){this._diffEditors[g.getId()]=g,this._onDiffEditorAdd.fire(g)}removeDiffEditor(g){delete this._diffEditors[g.getId()]&&this._onDiffEditorRemove.fire(g)}listDiffEditors(){return Object.keys(this._diffEditors).map(g=>this._diffEditors[g])}getFocusedCodeEditor(){let g=null;const m=this.listCodeEditors();for(const s of m){if(s.hasTextFocus())return s;s.hasWidgetFocus()&&(g=s)}return g}removeDecorationType(g){const m=this._decorationOptionProviders.get(g);m&&(m.refCount--,m.refCount<=0&&(this._decorationOptionProviders.delete(g),m.dispose(),this.listCodeEditors().forEach(s=>s.removeDecorationsByType(g))))}setModelProperty(g,m,s){const t=g.toString();let i;this._modelProperties.has(t)?i=this._modelProperties.get(t):(i=new Map,this._modelProperties.set(t,i)),i.set(m,s)}getModelProperty(g,m){const s=g.toString();if(this._modelProperties.has(s))return this._modelProperties.get(s).get(m)}openCodeEditor(g,m,s){return we(this,void 0,void 0,function*(){for(const t of this._codeEditorOpenHandlers){const i=yield t(g,m,s);if(i!==null)return i}return null})}registerCodeEditorOpenHandler(g){const m=this._codeEditorOpenHandlers.unshift(g);return(0,k.toDisposable)(m)}};e.AbstractCodeEditorService=w=Te([ge(0,D.IThemeService)],w);class b{constructor(g){this._styleSheet=g}}e.GlobalStyleSheet=b}),define(J[811],ee([1,0,7,35,79,54,23]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class b extends D.ViewPart{constructor(g,m,s,t){super(g);const i=this._context.configuration.options,n=i.get(99),r=i.get(72),d=i.get(38),h=i.get(102),o={listenOnDomNode:s.domNode,className:"editor-scrollable "+(0,w.getThemeTypeSelector)(g.theme.type),useShadows:!1,lazyRender:!0,vertical:n.vertical,horizontal:n.horizontal,verticalHasArrows:n.verticalHasArrows,horizontalHasArrows:n.horizontalHasArrows,verticalScrollbarSize:n.verticalScrollbarSize,verticalSliderSize:n.verticalSliderSize,horizontalScrollbarSize:n.horizontalScrollbarSize,horizontalSliderSize:n.horizontalSliderSize,handleMouseWheel:n.handleMouseWheel,alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel,arrowSize:n.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:d,scrollPredominantAxis:h,scrollByPage:n.scrollByPage};this.scrollbar=this._register(new L.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 c=(a,l,u)=>{const v={};if(l){const f=a.scrollTop;f&&(v.scrollTop=this._context.viewLayout.getCurrentScrollTop()+f,a.scrollTop=0)}if(u){const f=a.scrollLeft;f&&(v.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+f,a.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(v,1)};this._register(_.addDisposableListener(s.domNode,"scroll",a=>c(s.domNode,!0,!0))),this._register(_.addDisposableListener(m.domNode,"scroll",a=>c(m.domNode,!0,!1))),this._register(_.addDisposableListener(t.domNode,"scroll",a=>c(t.domNode,!0,!1))),this._register(_.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",a=>c(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const g=this._context.configuration.options,m=g.get(140);this.scrollbarDomNode.setLeft(m.contentLeft),g.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(g){this.scrollbar.delegateVerticalScrollbarPointerDown(g)}delegateScrollFromMouseWheelEvent(g){this.scrollbar.delegateScrollFromMouseWheelEvent(g)}onConfigurationChanged(g){if(g.hasChanged(99)||g.hasChanged(72)||g.hasChanged(38)){const m=this._context.configuration.options,s=m.get(99),t=m.get(72),i=m.get(38),n=m.get(102),r={vertical:s.vertical,horizontal:s.horizontal,verticalScrollbarSize:s.verticalScrollbarSize,horizontalScrollbarSize:s.horizontalScrollbarSize,scrollByPage:s.scrollByPage,handleMouseWheel:s.handleMouseWheel,mouseWheelScrollSensitivity:t,fastScrollSensitivity:i,scrollPredominantAxis:n};this.scrollbar.updateOptions(r)}return g.hasChanged(140)&&this._setLayout(),!0}onScrollChanged(g){return!0}onThemeChanged(g){return this.scrollbar.updateClassName("editor-scrollable "+(0,w.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(g){}render(g){this.scrollbar.renderNow()}}e.EditorScrollbar=b}),define(J[812],ee([1,0,107,33,23,415]),function(j,e,_,k,L){"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(s){return new D(s)}function S(s){return new w(s.lineNumber,s.ranges.map(b))}class g extends _.DynamicViewOverlay{constructor(t){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=t;const i=this._context.configuration.options;this._lineHeight=i.get(64),this._roundedSelection=i.get(97),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(97),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,n=t.length;i<n;i++)if(t[i].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(t,i,n){const r=this._typicalHalfwidthCharacterWidth/4;let d=null,h=null;if(n&&n.length>0&&i.length>0){const o=i[0].lineNumber;if(o===t.startLineNumber)for(let a=0;!d&&a<n.length;a++)n[a].lineNumber===o&&(d=n[a].ranges[0]);const c=i[i.length-1].lineNumber;if(c===t.endLineNumber)for(let a=n.length-1;!h&&a>=0;a--)n[a].lineNumber===c&&(h=n[a].ranges[0]);d&&!d.startStyle&&(d=null),h&&!h.startStyle&&(h=null)}for(let o=0,c=i.length;o<c;o++){const a=i[o].ranges[0],l=a.left,u=a.left+a.width,v={top:0,bottom:0},f={top:0,bottom:0};if(o>0){const p=i[o-1].ranges[0].left,C=i[o-1].ranges[0].left+i[o-1].ranges[0].width;m(l-p)<r?v.top=2:l>p&&(v.top=1),m(u-C)<r?f.top=2:p<u&&u<C&&(f.top=1)}else d&&(v.top=d.startStyle.top,f.top=d.endStyle.top);if(o+1<c){const p=i[o+1].ranges[0].left,C=i[o+1].ranges[0].left+i[o+1].ranges[0].width;m(l-p)<r?v.bottom=2:p<l&&l<C&&(v.bottom=1),m(u-C)<r?f.bottom=2:u<C&&(f.bottom=1)}else h&&(v.bottom=h.startStyle.bottom,f.bottom=h.endStyle.bottom);a.startStyle=v,a.endStyle=f}}_getVisibleRangesWithStyle(t,i,n){const d=(i.linesVisibleRangesForRange(t,!0)||[]).map(S);return!this._visibleRangesHaveGaps(d)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(i.visibleRange,d,n),d}_createSelectionPiece(t,i,n,r,d){return\'<div class="cslr \'+n+\'" style="top:\'+t.toString()+"px;left:"+r.toString()+"px;width:"+d.toString()+"px;height:"+i+\'px;"></div>\'}_actualRenderOneSelection(t,i,n,r){if(r.length===0)return;const d=!!r[0].ranges[0].startStyle,h=this._lineHeight.toString(),o=(this._lineHeight-1).toString(),c=r[0].lineNumber,a=r[r.length-1].lineNumber;for(let l=0,u=r.length;l<u;l++){const v=r[l],f=v.lineNumber,p=f-i,C=n&&(f===a||f===c)?o:h,y=n&&f===c?1:0;let E="",I="";for(let T=0,O=v.ranges.length;T<O;T++){const R=v.ranges[T];if(d){const N=R.startStyle,P=R.endStyle;if(N.top===1||N.bottom===1){E+=this._createSelectionPiece(y,C,g.SELECTION_CLASS_NAME,R.left-g.ROUNDED_PIECE_WIDTH,g.ROUNDED_PIECE_WIDTH);let x=g.EDITOR_BACKGROUND_CLASS_NAME;N.top===1&&(x+=" "+g.SELECTION_TOP_RIGHT),N.bottom===1&&(x+=" "+g.SELECTION_BOTTOM_RIGHT),E+=this._createSelectionPiece(y,C,x,R.left-g.ROUNDED_PIECE_WIDTH,g.ROUNDED_PIECE_WIDTH)}if(P.top===1||P.bottom===1){E+=this._createSelectionPiece(y,C,g.SELECTION_CLASS_NAME,R.left+R.width,g.ROUNDED_PIECE_WIDTH);let x=g.EDITOR_BACKGROUND_CLASS_NAME;P.top===1&&(x+=" "+g.SELECTION_TOP_LEFT),P.bottom===1&&(x+=" "+g.SELECTION_BOTTOM_LEFT),E+=this._createSelectionPiece(y,C,x,R.left+R.width,g.ROUNDED_PIECE_WIDTH)}}let M=g.SELECTION_CLASS_NAME;if(d){const N=R.startStyle,P=R.endStyle;N.top===0&&(M+=" "+g.SELECTION_TOP_LEFT),N.bottom===0&&(M+=" "+g.SELECTION_BOTTOM_LEFT),P.top===0&&(M+=" "+g.SELECTION_TOP_RIGHT),P.bottom===0&&(M+=" "+g.SELECTION_BOTTOM_RIGHT)}I+=this._createSelectionPiece(y,C,M,R.left,R.width)}t[p][0]+=E,t[p][1]+=I}}prepareRender(t){const i=[],n=t.visibleRange.startLineNumber,r=t.visibleRange.endLineNumber;for(let h=n;h<=r;h++){const o=h-n;i[o]=["",""]}const d=[];for(let h=0,o=this._selections.length;h<o;h++){const c=this._selections[h];if(c.isEmpty()){d[h]=null;continue}const a=this._getVisibleRangesWithStyle(c,t,this._previousFrameVisibleRangesWithStyle[h]);d[h]=a,this._actualRenderOneSelection(i,n,this._selections.length>1,a)}this._previousFrameVisibleRangesWithStyle=d,this._renderResult=i.map(([h,o])=>h+o)}render(t,i){if(!this._renderResult)return"";const n=i-t;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}e.SelectionsOverlay=g,g.SELECTION_CLASS_NAME="selected-text",g.SELECTION_TOP_LEFT="top-left-radius",g.SELECTION_BOTTOM_LEFT="bottom-left-radius",g.SELECTION_TOP_RIGHT="top-right-radius",g.SELECTION_BOTTOM_RIGHT="bottom-right-radius",g.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",g.ROUNDED_PIECE_WIDTH=10,(0,L.registerThemingParticipant)((s,t)=>{const i=s.getColor(k.editorSelectionForeground);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)});function m(s){return s<0?-s:s}}),define(J[75],ee([1,0,600,36,33,23]),function(j,e,_,k,L,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,L.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(0,null)),e.editorLineHighlightBorder=(0,L.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:L.contrastBorder},_.localize(1,null)),e.editorRangeHighlight=(0,L.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},_.localize(2,null),!0),e.editorRangeHighlightBorder=(0,L.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:L.activeContrastBorder,hcLight:L.activeContrastBorder},_.localize(3,null),!0),e.editorSymbolHighlight=(0,L.registerColor)("editor.symbolHighlightBackground",{dark:L.editorFindMatchHighlight,light:L.editorFindMatchHighlight,hcDark:null,hcLight:null},_.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,L.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:L.activeContrastBorder,hcLight:L.activeContrastBorder},_.localize(5,null),!0),e.editorCursorForeground=(0,L.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:k.Color.black,hcDark:k.Color.white,hcLight:"#0F4A85"},_.localize(6,null)),e.editorCursorBackground=(0,L.registerColor)("editorCursor.background",null,_.localize(7,null)),e.editorWhitespaces=(0,L.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},_.localize(8,null)),e.editorIndentGuides=(0,L.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},_.localize(9,null)),e.editorActiveIndentGuides=(0,L.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},_.localize(10,null)),e.editorLineNumbers=(0,L.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:k.Color.white,hcLight:"#292929"},_.localize(11,null));const w=(0,L.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:L.activeContrastBorder,hcLight:L.activeContrastBorder},_.localize(12,null),!1,_.localize(13,null));e.editorActiveLineNumber=(0,L.registerColor)("editorLineNumber.activeForeground",{dark:w,light:w,hcDark:w,hcLight:w},_.localize(14,null)),e.editorDimmedLineNumber=(0,L.registerColor)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(15,null)),e.editorRuler=(0,L.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:k.Color.lightgrey,hcDark:k.Color.white,hcLight:"#292929"},_.localize(16,null)),e.editorCodeLensForeground=(0,L.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},_.localize(17,null)),e.editorBracketMatchBackground=(0,L.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},_.localize(18,null)),e.editorBracketMatchBorder=(0,L.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:L.contrastBorder,hcLight:L.contrastBorder},_.localize(19,null)),e.editorOverviewRulerBorder=(0,L.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},_.localize(20,null)),e.editorOverviewRulerBackground=(0,L.registerColor)("editorOverviewRuler.background",null,_.localize(21,null)),e.editorGutter=(0,L.registerColor)("editorGutter.background",{dark:L.editorBackground,light:L.editorBackground,hcDark:L.editorBackground,hcLight:L.editorBackground},_.localize(22,null)),e.editorUnnecessaryCodeBorder=(0,L.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:k.Color.fromHex("#fff").transparent(.8),hcLight:L.contrastBorder},_.localize(23,null)),e.editorUnnecessaryCodeOpacity=(0,L.registerColor)("editorUnnecessaryCode.opacity",{dark:k.Color.fromHex("#000a"),light:k.Color.fromHex("#0007"),hcDark:null,hcLight:null},_.localize(24,null)),e.ghostTextBorder=(0,L.registerColor)("editorGhostText.border",{dark:null,light:null,hcDark:k.Color.fromHex("#fff").transparent(.8),hcLight:k.Color.fromHex("#292929").transparent(.8)},_.localize(25,null)),e.ghostTextForeground=(0,L.registerColor)("editorGhostText.foreground",{dark:k.Color.fromHex("#ffffff56"),light:k.Color.fromHex("#0007"),hcDark:null,hcLight:null},_.localize(26,null)),e.ghostTextBackground=(0,L.registerColor)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(27,null));const b=new k.Color(new k.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,L.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:b,light:b,hcDark:b,hcLight:b},_.localize(28,null),!0),e.overviewRulerError=(0,L.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"},_.localize(29,null)),e.overviewRulerWarning=(0,L.registerColor)("editorOverviewRuler.warningForeground",{dark:L.editorWarningForeground,light:L.editorWarningForeground,hcDark:L.editorWarningBorder,hcLight:L.editorWarningBorder},_.localize(30,null)),e.overviewRulerInfo=(0,L.registerColor)("editorOverviewRuler.infoForeground",{dark:L.editorInfoForeground,light:L.editorInfoForeground,hcDark:L.editorInfoBorder,hcLight:L.editorInfoBorder},_.localize(31,null)),e.editorBracketHighlightingForeground1=(0,L.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},_.localize(32,null)),e.editorBracketHighlightingForeground2=(0,L.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},_.localize(33,null)),e.editorBracketHighlightingForeground3=(0,L.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},_.localize(34,null)),e.editorBracketHighlightingForeground4=(0,L.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(35,null)),e.editorBracketHighlightingForeground5=(0,L.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(36,null)),e.editorBracketHighlightingForeground6=(0,L.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(37,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,L.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:""},_.localize(38,null)),e.editorBracketPairGuideBackground1=(0,L.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(39,null)),e.editorBracketPairGuideBackground2=(0,L.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(40,null)),e.editorBracketPairGuideBackground3=(0,L.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(41,null)),e.editorBracketPairGuideBackground4=(0,L.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(42,null)),e.editorBracketPairGuideBackground5=(0,L.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(43,null)),e.editorBracketPairGuideBackground6=(0,L.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(44,null)),e.editorBracketPairGuideActiveBackground1=(0,L.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(45,null)),e.editorBracketPairGuideActiveBackground2=(0,L.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(46,null)),e.editorBracketPairGuideActiveBackground3=(0,L.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(47,null)),e.editorBracketPairGuideActiveBackground4=(0,L.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(48,null)),e.editorBracketPairGuideActiveBackground5=(0,L.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(49,null)),e.editorBracketPairGuideActiveBackground6=(0,L.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},_.localize(50,null)),e.editorUnicodeHighlightBorder=(0,L.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},_.localize(51,null)),e.editorUnicodeHighlightBackground=(0,L.registerColor)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},_.localize(52,null)),(0,D.registerThemingParticipant)((S,g)=>{const m=S.getColor(L.editorBackground),s=S.getColor(e.editorLineHighlight),t=s&&!s.isTransparent()?s:m;t&&g.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${t}; }`)})}),define(J[813],ee([1,0,107,75,16,23,24,93,402]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class S extends _.DynamicViewOverlay{constructor(t){super(),this._context=t;const i=this._context.configuration.options,n=i.get(140);this._lineHeight=i.get(64),this._renderLineHighlight=i.get(92),this._renderLineHighlightOnlyWhenFocus=i.get(93),this._contentLeft=n.contentLeft,this._contentWidth=n.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,d)=>r-d),L.equals(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,t=!0);const n=this._selections.every(r=>r.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,t=!0),t}onThemeChanged(t){return this._readFromSelections()}onConfigurationChanged(t){const i=this._context.configuration.options,n=i.get(140);return this._lineHeight=i.get(64),this._renderLineHighlight=i.get(92),this._renderLineHighlightOnlyWhenFocus=i.get(93),this._contentLeft=n.contentLeft,this._contentWidth=n.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),n=t.visibleRange.startLineNumber,r=t.visibleRange.endLineNumber,d=this._cursorLineNumbers.length;let h=0;const o=[];for(let c=n;c<=r;c++){const a=c-n;for(;h<d&&this._cursorLineNumbers[h]<c;)h++;h<d&&this._cursorLineNumbers[h]===c?o[a]=i:o[a]=""}this._renderData=o}render(t,i){if(!this._renderData)return"";const n=i-t;return n>=this._renderData.length?"":this._renderData[n]}_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=S;class g extends S{_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=g;class m extends S{_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)((s,t)=>{const i=s.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()||s.defines(k.editorLineHighlightBorder)){const n=s.getColor(k.editorLineHighlightBorder);n&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${n}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${n}; }`),(0,b.isHighContrast)(s.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[814],ee([1,0,107,75,23,12,16,18,274,202,405]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class m extends _.DynamicViewOverlay{constructor(i){super(),this._context=i,this._primaryPosition=null;const n=this._context.configuration.options,r=n.get(141),d=n.get(48);this._lineHeight=n.get(64),this._spaceWidth=d.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.wrappingColumn*d.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=n.get(14),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(i){const n=this._context.configuration.options,r=n.get(141),d=n.get(48);return this._lineHeight=n.get(64),this._spaceWidth=d.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.wrappingColumn*d.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=n.get(14),!0}onCursorStateChanged(i){var n;const d=i.selections[0].getPosition();return!((n=this._primaryPosition)===null||n===void 0)&&n.equals(d)?!1:(this._primaryPosition=d,!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 n,r,d,h;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const o=i.visibleRange.startLineNumber,c=i.visibleRange.endLineNumber,a=i.scrollWidth,l=this._lineHeight,u=this._primaryPosition,v=this.getGuidesByLine(o,Math.min(c+1,this._context.viewModel.getLineCount()),u),f=[];for(let p=o;p<=c;p++){const C=p-o,y=v[C];let E="";const I=(r=(n=i.visibleRangeForPosition(new D.Position(p,1)))===null||n===void 0?void 0:n.left)!==null&&r!==void 0?r:0;for(const T of y){const O=T.column===-1?I+(T.visibleColumn-1)*this._spaceWidth:i.visibleRangeForPosition(new D.Position(p,T.column)).left;if(O>a||this._maxIndentLeft>0&&O>this._maxIndentLeft)break;const R=T.horizontalLine?T.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",M=T.horizontalLine?((h=(d=i.visibleRangeForPosition(new D.Position(p,T.horizontalLine.endColumn)))===null||d===void 0?void 0:d.left)!==null&&h!==void 0?h:O+this._spaceWidth)-O:this._spaceWidth;E+=`<div class="core-guide ${T.className} ${R}" style="left:${O}px;height:${l}px;width:${M}px"></div>`}f[C]=E}this._renderResult=f}getGuidesByLine(i,n,r){const d=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(i,n,r,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?g.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?g.HorizontalGuidesState.EnabledForActive:g.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,h=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(i,n):null;let o=0,c=0,a=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&r){const v=this._context.viewModel.getActiveIndentGuide(r.lineNumber,i,n);o=v.startLineNumber,c=v.endLineNumber,a=v.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),u=[];for(let v=i;v<=n;v++){const f=new Array;u.push(f);const p=d?d[v-i]:[],C=new w.ArrayQueue(p),y=h?h[v-i]:0;for(let E=1;E<=y;E++){const I=(E-1)*l+1,T=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||p.length===0)&&o<=v&&v<=c&&E===a;f.push(...C.takeWhile(R=>R.visibleColumn<I)||[]);const O=C.peek();(!O||O.visibleColumn!==I||O.horizontalLine)&&f.push(new g.IndentGuide(I,-1,T?"core-guide-indent-active":"core-guide-indent",null,-1,-1))}f.push(...C.takeWhile(E=>!0)||[])}return u}render(i,n){if(!this._renderResult)return"";const r=n-i;return r<0||r>=this._renderResult.length?"":this._renderResult[r]}}e.IndentGuidesOverlay=m;function s(t){if(!(t&&t.isTransparent()))return t}(0,L.registerThemingParticipant)((t,i)=>{const n=[{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 S.BracketPairGuidesClassNames,d=n.map(h=>{var o,c;const a=t.getColor(h.bracketColor),l=t.getColor(h.guideColor),u=t.getColor(h.guideColorActive),v=s((o=s(l))!==null&&o!==void 0?o:a?.transparent(.3)),f=s((c=s(u))!==null&&c!==void 0?c:a);if(!(!v||!f))return{guideColor:v,guideColorActive:f}}).filter(b.isDefined);if(d.length>0){for(let h=0;h<30;h++){const o=d[h%d.length];i.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(h).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[344],ee([1,0,17,107,12,23,75,406]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class b extends k.DynamicViewOverlay{constructor(g){super(),this._context=g,this._readConfig(),this._lastCursorModelPosition=new L.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const g=this._context.configuration.options;this._lineHeight=g.get(64);const m=g.get(65);this._renderLineNumbers=m.renderType,this._renderCustomLineNumbers=m.renderFn,this._renderFinalNewline=g.get(91);const s=g.get(140);this._lineNumbersLeft=s.lineNumbersLeft,this._lineNumbersWidth=s.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(g){return this._readConfig(),!0}onCursorStateChanged(g){const m=g.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(m);let s=!1;return this._activeLineNumber!==m.lineNumber&&(this._activeLineNumber=m.lineNumber,s=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(s=!0),s}onFlushed(g){return!0}onLinesChanged(g){return!0}onLinesDeleted(g){return!0}onLinesInserted(g){return!0}onScrollChanged(g){return g.scrollTopChanged}onZonesChanged(g){return!0}_getLineRenderLineNumber(g){const m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new L.Position(g,1));if(m.column!==1)return"";const s=m.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(s);if(this._renderLineNumbers===2){const t=Math.abs(this._lastCursorModelPosition.lineNumber-s);return t===0?\'<span class="relative-current-line-number">\'+s+"</span>":String(t)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===s||s%10===0?String(s):"":String(s)}prepareRender(g){if(this._renderLineNumbers===0){this._renderResult=null;return}const m=_.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",s=g.visibleRange.startLineNumber,t=g.visibleRange.endLineNumber,i=this._context.viewModel.getLineCount(),n=[];for(let r=s;r<=t;r++){const d=r-s,h=this._getLineRenderLineNumber(r);if(!h){n[d]="";continue}let o="";if(r===i&&this._context.viewModel.getLineLength(r)===0){if(this._renderFinalNewline==="off"){n[d]="";continue}this._renderFinalNewline==="dimmed"&&(o=" dimmed-line-number")}r===this._activeLineNumber&&(o=" active-line-number"),n[d]=`<div class="${b.CLASS_NAME}${m}${o}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${h}</div>`}this._renderResult=n}render(g,m){if(!this._renderResult)return"";const s=m-g;return s<0||s>=this._renderResult.length?"":this._renderResult[s]}}e.LineNumbersOverlay=b,b.CLASS_NAME="line-numbers",(0,D.registerThemingParticipant)((S,g)=>{const m=S.getColor(w.editorLineNumbers),s=S.getColor(w.editorDimmedLineNumber);s?g.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${s}; }`):m&&g.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${m.transparent(.4)}; }`)})}),define(J[815],ee([1,0,589,47,35,17,9,76,222,262,54,344,276,41,139,12,5,24,167,27,36,290,400]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class u{constructor(y,E,I,T,O){this._context=y,this.modelLineNumber=E,this.distanceToModelLineStart=I,this.widthOfHiddenLineTextBefore=T,this.distanceToModelLineEnd=O,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(y){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=y.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=y.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(y){return this._previousPresentation||(y?this._previousPresentation=y:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const v=k.isFirefox;class f extends m.ViewPart{constructor(y,E,I){super(y),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,O=T.get(140);this._setAccessibilityOptions(T),this._contentLeft=O.contentLeft,this._contentWidth=O.contentWidth,this._contentHeight=O.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 h.Selection(1,1,1,1)],this._modelSelections=[new h.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,L.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(120))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",_.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,L.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const M={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:x=>this._context.viewModel.getLineMaxColumn(x),getValueInRange:(x,F)=>this._context.viewModel.getValueInRange(x,F),getValueLengthInRange:(x,F)=>this._context.viewModel.getValueLengthInRange(x,F),modifyPosition:(x,F)=>this._context.viewModel.modifyPosition(x,F)},N={getDataToCopy:()=>{const x=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,D.isWindows),F=this._context.viewModel.model.getEOL(),B=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),V=Array.isArray(x)?x:null,K=Array.isArray(x)?x.join(F):x;let A,Y=null;if(S.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&K.length<65536){const ie=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);ie&&(A=ie.html,Y=ie.mode)}return{isFromEmptySelection:B,multicursorText:V,text:K,html:A,mode:Y}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const x=this._selections[0];if(D.isMacintosh&&x.isEmpty()){const B=x.getStartPosition();let V=this._getWordBeforePosition(B);if(V.length===0&&(V=this._getCharacterBeforePosition(B)),V.length>0)return new g.TextAreaState(V,V.length,V.length,d.Range.fromPositions(B),0)}const F=500;if(D.isMacintosh&&!x.isEmpty()&&M.getValueLengthInRange(x,0)<F){const B=M.getValueInRange(x,0);return new g.TextAreaState(B,0,B.length,x,0)}if(k.isSafari&&!x.isEmpty()){const B="vscode-placeholder";return new g.TextAreaState(B,0,B.length,null,void 0)}return g.TextAreaState.EMPTY}if(k.isAndroid){const x=this._selections[0];if(x.isEmpty()){const F=x.getStartPosition(),[B,V]=this._getAndroidWordAtPosition(F);if(B.length>0)return new g.TextAreaState(B,V,V,d.Range.fromPositions(F),0)}return g.TextAreaState.EMPTY}return g.PagedScreenReaderStrategy.fromEditorSelection(M,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(x,F,B)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(x,F,B)},P=this._register(new S.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(new S.TextAreaInput(N,P,D.OS,k)),this._register(this._textAreaInput.onKeyDown(x=>{this._viewController.emitKeyDown(x)})),this._register(this._textAreaInput.onKeyUp(x=>{this._viewController.emitKeyUp(x)})),this._register(this._textAreaInput.onPaste(x=>{let F=!1,B=null,V=null;x.metadata&&(F=this._emptySelectionClipboard&&!!x.metadata.isFromEmptySelection,B=typeof x.metadata.multicursorText<"u"?x.metadata.multicursorText:null,V=x.metadata.mode),this._viewController.paste(x.text,F,B,V)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(x=>{x.replacePrevCharCnt||x.replaceNextCharCnt||x.positionDelta?(g._debugComposition&&console.log(` => compositionType: <<${x.text}>>, ${x.replacePrevCharCnt}, ${x.replaceNextCharCnt}, ${x.positionDelta}`),this._viewController.compositionType(x.text,x.replacePrevCharCnt,x.replaceNextCharCnt,x.positionDelta)):(g._debugComposition&&console.log(` => type: <<${x.text}>>`),this._viewController.type(x.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(x=>{this._viewController.setSelection(x)})),this._register(this._textAreaInput.onCompositionStart(x=>{const F=this.textArea.domNode,B=this._modelSelections[0],{distanceToModelLineStart:V,widthOfHiddenTextBefore:K}=(()=>{const Y=F.value.substring(0,Math.min(F.selectionStart,F.selectionEnd)),ie=Y.lastIndexOf(`\n`),le=Y.substring(ie+1),ne=le.lastIndexOf("\t"),se=le.length-ne-1,H=B.getStartPosition(),W=Math.min(H.column-1,se),$=H.column-1-W,Z=le.substring(0,le.length-W),{tabSize:Q}=this._context.viewModel.model.getOptions(),re=p(Z,this._fontInfo,Q);return{distanceToModelLineStart:$,widthOfHiddenTextBefore:re}})(),{distanceToModelLineEnd:A}=(()=>{const Y=F.value.substring(Math.max(F.selectionStart,F.selectionEnd)),ie=Y.indexOf(`\n`),le=ie===-1?Y:Y.substring(0,ie),ne=le.indexOf("\t"),se=ne===-1?le.length:le.length-ne-1,H=B.getEndPosition(),W=Math.min(this._context.viewModel.model.getLineMaxColumn(H.lineNumber)-H.column,se);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(H.lineNumber)-H.column-W}})();this._context.viewModel.revealRange("keyboard",!0,d.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new u(this._context,B.startLineNumber,V,K,A),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(x=>{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(l.IME.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(y){this._textAreaInput.writeScreenReaderContent(y)}dispose(){super.dispose()}_getAndroidWordAtPosition(y){const E=\'`~!@#$%^&*()-=+[{]}\\\\|;:",.<>/?\',I=this._context.viewModel.getLineContent(y.lineNumber),T=(0,n.getMapForWordSeparators)(E);let O=!0,R=y.column,M=!0,N=y.column,P=0;for(;P<50&&(O||M);){if(O&&R<=1&&(O=!1),O){const x=I.charCodeAt(R-2);T.get(x)!==0?O=!1:R--}if(M&&N>I.length&&(M=!1),M){const x=I.charCodeAt(N-1);T.get(x)!==0?M=!1:N++}P++}return[I.substring(R-1,N-1),y.column-R]}_getWordBeforePosition(y){const E=this._context.viewModel.getLineContent(y.lineNumber),I=(0,n.getMapForWordSeparators)(this._context.configuration.options.get(126));let T=y.column,O=0;for(;T>1;){const R=E.charCodeAt(T-2);if(I.get(R)!==0||O>50)return E.substring(T-1,y.column-1);O++,T--}return E.substring(0,y.column-1)}_getCharacterBeforePosition(y){if(y.column>1){const I=this._context.viewModel.getLineContent(y.lineNumber).charAt(y.column-2);if(!w.isHighSurrogate(I.charCodeAt(0)))return I}return""}_getAriaLabel(y){return y.get(2)===1?_.localize(1,null,D.isLinux?"Shift+Alt+F1":"Alt+F1"):y.get(4)}_setAccessibilityOptions(y){this._accessibilitySupport=y.get(2);const E=y.get(3);this._accessibilitySupport===2&&E===i.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=E;const T=y.get(140).wrappingColumn;if(T!==-1&&this._accessibilitySupport!==1){const O=y.get(48);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(T*O.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=v?0:1}onConfigurationChanged(y){const E=this._context.configuration.options,I=E.get(140);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(120))),(y.hasChanged(32)||y.hasChanged(88))&&this._ensureReadOnlyAttribute(),y.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(y){return this._selections=y.selections.slice(0),this._modelSelections=y.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(y){return!0}onFlushed(y){return!0}onLinesChanged(y){return!0}onLinesDeleted(y){return!0}onLinesInserted(y){return!0}onScrollChanged(y){return this._scrollLeft=y.scrollLeft,this._scrollTop=y.scrollTop,!0}onZonesChanged(y){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(y){y.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",y.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),y.role&&this.textArea.setAttribute("role",y.role)}_ensureReadOnlyAttribute(){const y=this._context.configuration.options;!l.IME.enabled||y.get(32)&&y.get(88)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(y){var E;this._primaryCursorPosition=new r.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=y.visibleRangeForPosition(this._primaryCursorPosition),(E=this._visibleTextArea)===null||E===void 0||E.prepareRender(y)}render(y){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var y;if(this._visibleTextArea){const T=this._visibleTextArea.visibleTextareaStart,O=this._visibleTextArea.visibleTextareaEnd,R=this._visibleTextArea.startPosition,M=this._visibleTextArea.endPosition;if(R&&M&&T&&O&&O.left>=this._scrollLeft&&T.left<=this._scrollLeft+this._contentWidth){const N=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,P=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let x=this._visibleTextArea.widthOfHiddenLineTextBefore,F=this._contentLeft+T.left-this._scrollLeft,B=O.left-T.left+1;if(F<this._contentLeft){const le=this._contentLeft-F;F+=le,x+=le,B-=le}B>this._contentWidth&&(B=this._contentWidth);const V=this._context.viewModel.getViewLineData(R.lineNumber),K=V.tokens.findTokenIndexAtOffset(R.column-1),A=V.tokens.findTokenIndexAtOffset(M.column-1),Y=K===A,ie=this._visibleTextArea.definePresentation(Y?V.tokens.getPresentation(K):null);this.textArea.domNode.scrollTop=P*this._lineHeight,this.textArea.domNode.scrollLeft=x,this._doRender({lastRenderPosition:null,top:N,left:F,width:B,height:this._lineHeight,useCover:!1,color:(c.TokenizationRegistry.getColorMap()||[])[ie.foreground],italic:ie.italic,bold:ie.bold,underline:ie.underline,strikethrough:ie.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=(y=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&y!==void 0?y: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:v?0:1,useCover:!1})}_newlinecount(y){let E=0,I=-1;do{if(I=y.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:v?0:1,useCover:!0})}_doRender(y){this._lastRenderPosition=y.lastRenderPosition;const E=this.textArea,I=this.textAreaCover;(0,b.applyFontInfo)(E,this._fontInfo),E.setTop(y.top),E.setLeft(y.left),E.setWidth(y.width),E.setHeight(y.height),E.setColor(y.color?a.Color.Format.CSS.formatHex(y.color):""),E.setFontStyle(y.italic?"italic":""),y.bold&&E.setFontWeight("bold"),E.setTextDecoration(`${y.underline?" underline":""}${y.strikethrough?" line-through":""}`),I.setTop(y.useCover?y.top:0),I.setLeft(y.useCover?y.left:0),I.setWidth(y.useCover?y.width:0),I.setHeight(y.useCover?y.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 "+s.LineNumbersOverlay.CLASS_NAME):I.setClassName("monaco-editor-background textAreaCover")}}e.TextAreaHandler=f;function p(C,y,E){if(C.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,y),T.style.whiteSpace="pre",T.style.tabSize=`${E*y.spaceWidth}px`,T.append(C),I.appendChild(T),document.body.appendChild(I);const O=T.offsetWidth;return document.body.removeChild(I),O}}),define(J[816],ee([1,0,35,36,54,12,27,75,83]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class g{constructor(t,i){const n=t.options;this.lineHeight=n.get(64),this.pixelRatio=n.get(138),this.overviewRulerLanes=n.get(80),this.renderBorder=n.get(79);const r=i.getColor(b.editorOverviewRulerBorder);this.borderColor=r?r.toString():null,this.hideCursor=n.get(57);const d=i.getColor(b.editorCursorForeground);this.cursorColor=d?d.transparent(.7).toString():null,this.themeType=i.type;const h=n.get(70),o=h.enabled,c=h.side,a=i.getColor(b.editorOverviewRulerBackground),l=w.TokenizationRegistry.getDefaultBackground();a?this.backgroundColor=a:o&&c==="right"?this.backgroundColor=l:this.backgroundColor=null;const v=n.get(140).overviewRuler;this.top=v.top,this.right=v.right,this.domWidth=v.width,this.domHeight=v.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,p]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=f,this.w=p}_initLanes(t,i,n){const r=i-t;if(n>=3){const d=Math.floor(r/3),h=Math.floor(r/3),o=r-d-h,c=t,a=c+d,l=c+d+o;return[[0,c,a,c,l,c,a,c],[0,d,o,d+o,h,d+o+h,o+h,d+o+h]]}else if(n===2){const d=Math.floor(r/2),h=r-d,o=t,c=o+d;return[[0,o,o,o,c,o,o,o],[0,d,d,d,h,d+h,d+h,d+h]]}else{const d=t,h=r;return[[0,d,d,d,d,d,d,d],[0,h,h,h,h,h,h,h]]}}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 L.ViewPart{constructor(t){super(t),this._domNode=(0,_.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 g(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,n=t.selections.length;i<n;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,n=this._settings.canvasHeight,r=this._settings.lineHeight,d=this._context.viewLayout,h=this._context.viewLayout.getScrollHeight(),o=n/h,c=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,l=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,n)):(u.clearRect(0,0,i,n),u.fillStyle=k.Color.Format.CSS.formatHexA(t),u.fillRect(0,0,i,n)):u.clearRect(0,0,i,n);const v=this._settings.x,f=this._settings.w;c.sort(S.OverviewRulerDecorationsGroup.cmp);for(const p of c){const C=p.color,y=p.data;u.fillStyle=C;let E=0,I=0,T=0;for(let O=0,R=y.length/3;O<R;O++){const M=y[3*O],N=y[3*O+1],P=y[3*O+2];let x=d.getVerticalOffsetForLineNumber(N)*o|0,F=(d.getVerticalOffsetForLineNumber(P)+r)*o|0;if(F-x<a){let V=(x+F)/2|0;V<l?V=l:V+l>n&&(V=n-l),x=V-l,F=V+l}x>T+1||M!==E?(O!==0&&u.fillRect(v[E],I,f[E],T-I),E=M,I=x,T=F):F>T&&(T=F)}u.fillRect(v[E],I,f[E],T-I)}if(!this._settings.hideCursor&&this._settings.cursorColor){const p=2*this._settings.pixelRatio|0,C=p/2|0,y=this._settings.x[7],E=this._settings.w[7];u.fillStyle=this._settings.cursorColor;let I=-100,T=-100;for(let O=0,R=this._cursorPositions.length;O<R;O++){const M=this._cursorPositions[O];let N=d.getVerticalOffsetForLineNumber(M.lineNumber)*o|0;N<C?N=C:N+C>n&&(N=n-C);const P=N-C,x=P+p;P>T+1?(O!==0&&u.fillRect(y,I,E,T-I),I=P,T=x):x>T&&(T=x)}u.fillRect(y,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,n),u.stroke(),u.moveTo(0,0),u.lineTo(i,0),u.stroke())}}e.DecorationsOverviewRuler=m}),define(J[817],ee([1,0,35,14,54,599,41,75,23,93,416]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class m extends L.ViewPart{constructor(t){super(t);const i=this._context.configuration.options;this._readOnly=i.get(88),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,_.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(88),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 n=0,r=this._secondaryCursors.length;n<r;n++)this._secondaryCursors[n].onConfigurationChanged(t);return!0}_onCursorPositionChanged(t,i,n){const r=this._secondaryCursors.length!==i.length||this._cursorSmoothCaretAnimation==="explicit"&&n!==3;if(this._primaryCursor.onCursorPositionChanged(t,r),this._updateBlinking(),this._secondaryCursors.length<i.length){const d=i.length-this._secondaryCursors.length;for(let h=0;h<d;h++){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 d=this._secondaryCursors.length-i.length;for(let h=0;h<d;h++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let d=0;d<i.length;d++)this._secondaryCursors[d].onCursorPositionChanged(i[d],r)}onCursorStateChanged(t){const i=[];for(let r=0,d=t.selections.length;r<d;r++)i[r]=t.selections[r].getPosition();this._onCursorPositionChanged(i[0],i.slice(1),t.reason);const n=t.selections[0].isEmpty();return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,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=n=>{for(let r=0,d=t.ranges.length;r<d;r++)if(t.ranges[r].fromLineNumber<=n.lineNumber&&n.lineNumber<=t.ranges[r].toLineNumber)return!0;return!1};if(i(this._primaryCursor.getPosition()))return!0;for(const n of this._secondaryCursors)if(i(n.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,n=t===5;i?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!i&&!n&&(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,n=this._secondaryCursors.length;i<n;i++)this._secondaryCursors[i].prepareRender(t)}render(t){const i=[];let n=0;const r=this._primaryCursor.render(t);r&&(i[n++]=r);for(let d=0,h=this._secondaryCursors.length;d<h;d++){const o=this._secondaryCursors[d].render(t);o&&(i[n++]=o)}this._renderData=i}getLastRenderData(){return this._renderData}}e.ViewCursors=m,m.BLINK_INTERVAL=500,(0,S.registerThemingParticipant)((s,t)=>{const i=s.getColor(b.editorCursorForeground);if(i){let n=s.getColor(b.editorCursorBackground);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),(0,g.isHighContrast)(s.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}})}),define(J[818],ee([1,0,107,9,110,12,75,417]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WhitespaceOverlay=void 0;class b extends _.DynamicViewOverlay{constructor(m){super(),this._context=m,this._options=new S(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 s=new S(this._context.configuration);return this._options.equals(s)?m.hasChanged(140):(this._options=s,!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 s=m.visibleRange.startLineNumber,i=m.visibleRange.endLineNumber-s+1,n=new Array(i);for(let d=0;d<i;d++)n[d]=!0;const r=this._context.viewModel.getMinimapLinesRenderingData(m.viewportData.startLineNumber,m.viewportData.endLineNumber,n);this._renderResult=[];for(let d=m.viewportData.startLineNumber;d<=m.viewportData.endLineNumber;d++){const h=d-m.viewportData.startLineNumber,o=r.data[h];let c=null;if(this._options.renderWhitespace==="selection"){const a=this._selection;for(const l of a){if(l.endLineNumber<d||l.startLineNumber>d)continue;const u=l.startLineNumber===d?l.startColumn:o.minColumn,v=l.endLineNumber===d?l.endColumn:o.maxColumn;u<v&&(c||(c=[]),c.push(new L.LineRange(u-1,v-1)))}}this._renderResult[h]=this._applyRenderWhitespace(m,d,c,o)}}_applyRenderWhitespace(m,s,t,i){if(this._options.renderWhitespace==="selection"&&!t||this._options.renderWhitespace==="trailing"&&i.continuesWithWrappedLine)return"";const n=this._context.theme.getColor(w.editorWhitespaces),r=this._options.renderWithSVG,d=i.content,h=this._options.stopRenderingLineAfter===-1?d.length:Math.min(this._options.stopRenderingLineAfter,d.length),o=i.continuesWithWrappedLine,c=i.minColumn-1,a=this._options.renderWhitespace==="boundary",l=this._options.renderWhitespace==="trailing",u=this._options.lineHeight,v=this._options.middotWidth,f=this._options.wsmiddotWidth,p=this._options.spaceWidth,C=Math.abs(f-p),y=Math.abs(v-p),E=C<y?11825:183,I=this._options.canUseHalfwidthRightwardsArrow;let T="",O=!1,R=k.firstNonWhitespaceIndex(d),M;R===-1?(O=!0,R=h,M=h):M=k.lastNonWhitespaceIndex(d);let N=0,P=t&&t[N],x=0;for(let F=c;F<h;F++){const B=d.charCodeAt(F);if(P&&F>=P.endOffset&&(N++,P=t&&t[N]),B!==9&&B!==32||l&&!O&&F<=M)continue;if(a&&F>=R&&F<=M&&B===32){const K=F-1>=0?d.charCodeAt(F-1):0,A=F+1<h?d.charCodeAt(F+1):0;if(K!==32&&A!==32)continue}if(a&&o&&F===h-1){const K=F-1>=0?d.charCodeAt(F-1):0;if(B===32&&K!==32&&K!==9)continue}if(t&&(!P||P.startOffset>F||P.endOffset<=F))continue;const V=m.visibleRangeForPosition(new D.Position(s,F+1));V&&(r?(x=Math.max(x,V.left),B===9?T+=this._renderArrow(u,p,V.left):T+=`<circle cx="${(V.left+p/2).toFixed(2)}" cy="${(u/2).toFixed(2)}" r="${(p/7).toFixed(2)}" />`):B===9?T+=`<div class="mwh" style="left:${V.left}px;height:${u}px;">${I?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:T+=`<div class="mwh" style="left:${V.left}px;height:${u}px;">${String.fromCharCode(E)}</div>`)}return r?(x=Math.round(x+p),`<svg style="position:absolute;width:${x}px;height:${u}px" viewBox="0 0 ${x} ${u}" xmlns="http://www.w3.org/2000/svg" fill="${n}">`+T+"</svg>"):T}_renderArrow(m,s,t){const i=s/7,n=s,r=m/2,d=t,h={x:0,y:i/2},o={x:100/125*n,y:h.y},c={x:o.x-.2*o.x,y:o.y+.2*o.x},a={x:c.x+.1*o.x,y:c.y+.1*o.x},l={x:a.x+.35*o.x,y:a.y-.35*o.x},u={x:l.x,y:-l.y},v={x:a.x,y:-a.y},f={x:c.x,y:-c.y},p={x:o.x,y:-o.y},C={x:h.x,y:-h.y};return`<path d="M ${[h,o,c,a,l,u,v,f,p,C].map(I=>`${(d+I.x).toFixed(2)} ${(r+I.y).toFixed(2)}`).join(" L ")}" />`}render(m,s){if(!this._renderResult)return"";const t=s-m;return t<0||t>=this._renderResult.length?"":this._renderResult[t]}}e.WhitespaceOverlay=b;class S{constructor(m){const s=m.options,t=s.get(48),i=s.get(36);i==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):i==="svg"?(this.renderWhitespace=s.get(95),this.renderWithSVG=!0):(this.renderWhitespace=s.get(95),this.renderWithSVG=!1),this.spaceWidth=t.spaceWidth,this.middotWidth=t.middotWidth,this.wsmiddotWidth=t.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=t.canUseHalfwidthRightwardsArrow,this.lineHeight=s.get(64),this.stopRenderingLineAfter=s.get(113)}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[819],ee([1,0,7,24,35,11,808,815,763,261,572,54,569,813,506,811,203,814,344,809,507,276,508,793,509,816,518,510,511,812,817,512,12,138,519,515,143,23,343,505,249,818]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T,O,R,M,N,P,x,F,B,V,K,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;class Y extends x.ViewEventHandler{constructor(ne,se,H,W,$,Z){super(),this._selections=[new k.Selection(1,1,1,1)],this._renderAnimationFrame=null;const Q=new S.ViewController(se,W,$,ne);this._context=new N.ViewContext(se,H,W),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new b.TextAreaHandler(this._context,Q,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,L.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,L.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,L.createFastDomNode)(document.createElement("div")),s.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 c.ViewLines(this._context,this._linesContent),this._viewZones=new O.ViewZones(this._context),this._viewParts.push(this._viewZones);const re=new p.DecorationsOverviewRuler(this._context);this._viewParts.push(re);const ce=new E.ScrollDecorationViewPart(this._context);this._viewParts.push(ce);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 h.IndentGuidesOverlay(this._context)),he.addDynamicOverlay(new n.DecorationsOverlay(this._context)),he.addDynamicOverlay(new A.WhitespaceOverlay(this._context));const de=new m.MarginViewOverlays(this._context);this._viewParts.push(de),de.addDynamicOverlay(new i.CurrentLineMarginHighlightOverlay(this._context)),de.addDynamicOverlay(new d.GlyphMarginOverlay(this._context)),de.addDynamicOverlay(new u.MarginViewLineDecorationsOverlay(this._context)),de.addDynamicOverlay(new a.LinesDecorationsOverlay(this._context)),de.addDynamicOverlay(new o.LineNumbersOverlay(this._context));const ue=new l.Margin(this._context);ue.getDomNode().appendChild(this._viewZones.marginDomNode),ue.getDomNode().appendChild(de.getDomNode()),this._viewParts.push(ue),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 q=new y.Rulers(this._context);this._viewParts.push(q);const z=new V.BlockDecorations(this._context);this._viewParts.push(z);const U=new v.Minimap(this._context);if(this._viewParts.push(U),re){const X=this._scrollbar.getOverviewRulerLayoutInfo();X.parent.insertBefore(re.getDomNode(),X.insertBefore)}this._linesContent.appendChild(he.getDomNode()),this._linesContent.appendChild(q.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(ue.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(ce.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(U.getDomNode()),this._overflowGuardContainer.appendChild(z.domNode),this.domNode.appendChild(this._overflowGuardContainer),Z?Z.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new w.PointerHandler(this._context,Q,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){K.inputLatency.onRenderStart(),this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:ne=>{this._textAreaHandler.textArea.domNode.dispatchEvent(ne)},getLastRenderData:()=>{const ne=this._viewCursors.getLastRenderData()||[],se=this._textAreaHandler.getLastRenderData();return new B.PointerHandlerLastRenderData(ne,se)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:ne=>this._viewZones.shouldSuppressMouseDownOnViewZone(ne),shouldSuppressMouseDownOnWidget:ne=>this._contentWidgets.shouldSuppressMouseDownOnWidget(ne),getPositionFromDOMInfo:(ne,se)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(ne,se)),visibleRangeForPosition:(ne,se)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new R.Position(ne,se))),getLineWidth:ne=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(ne))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:ne=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(ne))}}_applyLayout(){const se=this._context.configuration.options.get(140);this.domNode.setWidth(se.width),this.domNode.setHeight(se.height),this._overflowGuardContainer.setWidth(se.width),this._overflowGuardContainer.setHeight(se.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const ne=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(137)+" "+(0,F.getThemeTypeSelector)(this._context.theme.type)+ne}handleEvents(ne){super.handleEvents(ne),this._scheduleRender()}onConfigurationChanged(ne){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(ne){return this._selections=ne.selections,!1}onFocusChanged(ne){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(ne){return this._context.theme.update(ne.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 ne of this._viewParts)ne.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=_.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){ie(()=>this._actualRender())}_getViewPartsToRender(){const ne=[];let se=0;for(const H of this._viewParts)H.shouldRender()&&(ne[se++]=H);return ne}_actualRender(){if(!_.isInDOM(this.domNode.domNode))return;let ne=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&ne.length===0)return;const se=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(se.startLineNumber,se.endLineNumber,se.centeredLineNumber);const H=new P.ViewportData(this._selections,se,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(H),this._viewLines.shouldRender()&&(this._viewLines.renderText(H),this._viewLines.onDidRender(),ne=this._getViewPartsToRender());const W=new M.RenderingContext(this._context.viewLayout,H,this._viewLines);for(const $ of ne)$.prepareRender(W);for(const $ of ne)$.render(W),$.onDidRender()}delegateVerticalScrollbarPointerDown(ne){this._scrollbar.delegateVerticalScrollbarPointerDown(ne)}delegateScrollFromMouseWheelEvent(ne){this._scrollbar.delegateScrollFromMouseWheelEvent(ne)}restoreState(ne){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:ne.scrollTop,scrollLeft:ne.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(ne,se){const H=this._context.viewModel.model.validatePosition({lineNumber:ne,column:se}),W=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(H);this._flushAccumulatedAndRenderNow();const $=this._viewLines.visibleRangeForPosition(new R.Position(W.lineNumber,W.column));return $?$.left:-1}getTargetAtClientPoint(ne,se){const H=this._pointerHandler.getTargetAtClientPoint(ne,se);return H?g.ViewUserInputEvents.convertViewToModelMouseTarget(H,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(ne){return new C.OverviewRuler(this._context,ne)}change(ne){this._viewZones.changeViewZones(ne),this._scheduleRender()}render(ne,se){if(se){this._viewLines.forceShouldRender();for(const H of this._viewParts)H.forceShouldRender()}ne?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(ne){this._textAreaHandler.writeScreenReaderContent(ne)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(ne){this._textAreaHandler.setAriaOptions(ne)}addContentWidget(ne){this._contentWidgets.addWidget(ne.widget),this.layoutContentWidget(ne),this._scheduleRender()}layoutContentWidget(ne){var se,H,W,$,Z,Q,re,ce;this._contentWidgets.setWidgetPosition(ne.widget,(H=(se=ne.position)===null||se===void 0?void 0:se.position)!==null&&H!==void 0?H:null,($=(W=ne.position)===null||W===void 0?void 0:W.secondaryPosition)!==null&&$!==void 0?$:null,(Q=(Z=ne.position)===null||Z===void 0?void 0:Z.preference)!==null&&Q!==void 0?Q:null,(ce=(re=ne.position)===null||re===void 0?void 0:re.positionAffinity)!==null&&ce!==void 0?ce:null),this._scheduleRender()}removeContentWidget(ne){this._contentWidgets.removeWidget(ne.widget),this._scheduleRender()}addOverlayWidget(ne){this._overlayWidgets.addWidget(ne.widget),this.layoutOverlayWidget(ne),this._scheduleRender()}layoutOverlayWidget(ne){const se=ne.position?ne.position.preference:null;this._overlayWidgets.setWidgetPosition(ne.widget,se)&&this._scheduleRender()}removeOverlayWidget(ne){this._overlayWidgets.removeWidget(ne.widget),this._scheduleRender()}}e.View=Y;function ie(le){try{return le()}catch(ne){(0,D.onUnexpectedError)(ne)}}}),define(J[820],ee([1,0,6,2,5,75,23]),function(j,e,_,k,L,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 S,this.onDidChangeEmitter=new _.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=m.getOptions().bracketPairColorizationOptions,this._register(m.bracketPairs.onDidChange(s=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(m){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(m,s,t,i){return i?[]:s===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,s){return m===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new L.Range(1,1,this.textModel.getLineCount(),1),m,s):[]}}e.ColorizedBracketPairsDecorationProvider=b;class S{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(m,s){return m.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(s?m.nestingLevelOfEqualBracketType:m.nestingLevel)}getInlineClassNameOfLevel(m){return`bracket-highlighting-${m%30}`}}(0,w.registerThemingParticipant)((g,m)=>{const s=[D.editorBracketHighlightingForeground1,D.editorBracketHighlightingForeground2,D.editorBracketHighlightingForeground3,D.editorBracketHighlightingForeground4,D.editorBracketHighlightingForeground5,D.editorBracketHighlightingForeground6],t=new S;m.addRule(`.monaco-editor .${t.unexpectedClosingBracketClassName} { color: ${g.getColor(D.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const i=s.map(n=>g.getColor(n)).filter(n=>!!n).filter(n=>!n.isTransparent());for(let n=0;n<30;n++){const r=i[n%i.length];m.addRule(`.monaco-editor .${t.getInlineClassNameOfLevel(n)} { color: ${r}; }`)}})}),define(J[821],ee([1,0,92,2,46,23,75,50,5,51,6,33,60]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;class i extends k.Disposable{constructor(d){super(),this.model=d,this._markersData=new Map,this._register((0,k.toDisposable)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(d,h){const o=[...this._markersData.keys()];this._markersData.clear();const c=this.model.deltaDecorations(o,h);for(let a=0;a<c.length;a++)this._markersData.set(c[a],d[a]);return o.length!==0||c.length!==0}getMarker(d){return this._markersData.get(d.id)}}let n=e.MarkerDecorationsService=class extends k.Disposable{constructor(d,h){super(),this._markerService=h,this._onDidChangeMarker=this._register(new m.Emitter),this._markerDecorations=new t.ResourceMap,d.getModels().forEach(o=>this._onModelAdded(o)),this._register(d.onModelAdded(this._onModelAdded,this)),this._register(d.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(d=>d.dispose()),this._markerDecorations.clear()}getMarker(d,h){const o=this._markerDecorations.get(d);return o&&o.getMarker(h)||null}_handleMarkerChange(d){d.forEach(h=>{const o=this._markerDecorations.get(h);o&&this._updateDecorations(o)})}_onModelAdded(d){const h=new i(d);this._markerDecorations.set(d.uri,h),this._updateDecorations(h)}_onModelRemoved(d){var h;const o=this._markerDecorations.get(d.uri);o&&(o.dispose(),this._markerDecorations.delete(d.uri)),(d.uri.scheme===g.Schemas.inMemory||d.uri.scheme===g.Schemas.internal||d.uri.scheme===g.Schemas.vscode)&&((h=this._markerService)===null||h===void 0||h.read({resource:d.uri}).map(c=>c.owner).forEach(c=>this._markerService.remove(c,[d.uri])))}_updateDecorations(d){const h=this._markerService.read({resource:d.model.uri,take:500}),o=h.map(c=>({range:this._createDecorationRange(d.model,c),options:this._createDecorationOption(c)}));d.update(h,o)&&this._onDidChangeMarker.fire(d.model)}_createDecorationRange(d,h){let o=S.Range.lift(h);if(h.severity===_.MarkerSeverity.Hint&&!this._hasMarkerTag(h,1)&&!this._hasMarkerTag(h,2)&&(o=o.setEndPosition(o.startLineNumber,o.startColumn+2)),o=d.validateRange(o),o.isEmpty()){const c=d.getLineLastNonWhitespaceColumn(o.startLineNumber)||d.getLineMaxColumn(o.startLineNumber);if(c===1||o.endColumn>=c)return o;const a=d.getWordAtPosition(o.getStartPosition());a&&(o=new S.Range(o.startLineNumber,a.startColumn,o.endLineNumber,a.endColumn))}else if(h.endColumn===Number.MAX_VALUE&&h.startColumn===1&&o.startLineNumber===o.endLineNumber){const c=d.getLineFirstNonWhitespaceColumn(h.startLineNumber);c<o.endColumn&&(o=new S.Range(o.startLineNumber,c,o.endLineNumber,o.endColumn),h.startColumn=c)}return o}_createDecorationOption(d){let h,o,c,a,l;switch(d.severity){case _.MarkerSeverity.Hint:this._hasMarkerTag(d,2)?h=void 0:this._hasMarkerTag(d,1)?h="squiggly-unnecessary":h="squiggly-hint",c=0;break;case _.MarkerSeverity.Warning:h="squiggly-warning",o=(0,D.themeColorFromId)(w.overviewRulerWarning),c=20,l={color:(0,D.themeColorFromId)(s.minimapWarning),position:L.MinimapPosition.Inline};break;case _.MarkerSeverity.Info:h="squiggly-info",o=(0,D.themeColorFromId)(w.overviewRulerInfo),c=10;break;case _.MarkerSeverity.Error:default:h="squiggly-error",o=(0,D.themeColorFromId)(w.overviewRulerError),c=30,l={color:(0,D.themeColorFromId)(s.minimapError),position:L.MinimapPosition.Inline};break}return d.tags&&(d.tags.indexOf(1)!==-1&&(a="squiggly-inline-unnecessary"),d.tags.indexOf(2)!==-1&&(a="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:h,showIfCollapsed:!0,overviewRuler:{color:o,position:L.OverviewRulerLane.Right},minimap:l,zIndex:c,inlineClassName:a}}_hasMarkerTag(d,h){return d.tags?d.tags.indexOf(h)>=0:!1}};e.MarkerDecorationsService=n=Te([ge(0,b.IModelService),ge(1,_.IMarkerService)],n)}),define(J[243],ee([1,0,121,23,63,503,39]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;let b=e.SemanticTokensProviderStyling=class{constructor(t,i,n,r){this._legend=t,this._themeService=i,this._languageService=n,this._logService=r,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new m}getMetadata(t,i,n){const r=this._languageService.languageIdCodec.encodeLanguageId(n),d=this._hashTable.get(t,i,r);let h;if(d)h=d.metadata,this._logService.getLevel()===L.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${t} / ${i}: foreground ${_.TokenMetadata.getForeground(h)}, fontStyle ${_.TokenMetadata.getFontStyle(h).toString(2)}`);else{let o=this._legend.tokenTypes[t];const c=[];if(o){let a=i;for(let u=0;a>0&&u<this._legend.tokenModifiers.length;u++)a&1&&c.push(this._legend.tokenModifiers[u]),a=a>>1;a>0&&this._logService.getLevel()===L.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${i.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),c.push("not-in-legend"));const l=this._themeService.getColorTheme().getTokenStyleMetadata(o,c,n);if(typeof l>"u")h=2147483647;else{if(h=0,typeof l.italic<"u"){const u=(l.italic?1:0)<<11;h|=u|1}if(typeof l.bold<"u"){const u=(l.bold?2:0)<<11;h|=u|2}if(typeof l.underline<"u"){const u=(l.underline?4:0)<<11;h|=u|4}if(typeof l.strikethrough<"u"){const u=(l.strikethrough?8:0)<<11;h|=u|8}if(l.foreground){const u=l.foreground<<15;h|=u|16}h===0&&(h=2147483647)}}else this._logService.getLevel()===L.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${t} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),h=2147483647,o="not-in-legend";this._hashTable.add(t,i,r,h),this._logService.getLevel()===L.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${t} (${o}) / ${i} (${c.join(" ")}): foreground ${_.TokenMetadata.getForeground(h)}, fontStyle ${_.TokenMetadata.getFontStyle(h).toString(2)}`)}return h}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,n,r,d){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${t}, resultId: ${i}) at edit #${n}: The provided start offset ${r} is outside the previous data (length ${d}).`))}};e.SemanticTokensProviderStyling=b=Te([ge(1,k.IThemeService),ge(2,w.ILanguageService),ge(3,L.ILogService)],b);function S(s,t,i){const n=s.data,r=s.data.length/5|0,d=Math.max(Math.ceil(r/1024),400),h=[];let o=0,c=1,a=0;for(;o<r;){const l=o;let u=Math.min(l+d,r);if(u<r){let I=u;for(;I-1>l&&n[5*I]===0;)I--;if(I-1===l){let T=u;for(;T+1<r&&n[5*T]===0;)T++;u=T}else u=I}let v=new Uint32Array((u-l)*4),f=0,p=0,C=0,y=0;for(;o<u;){const I=5*o,T=n[I],O=n[I+1],R=c+T|0,M=T===0?a+O|0:O,N=n[I+2],P=M+N|0,x=n[I+3],F=n[I+4];if(P<=M)t.warnInvalidLengthSemanticTokens(R,M+1);else if(C===R&&y>M)t.warnOverlappingSemanticTokens(R,M+1);else{const B=t.getMetadata(x,F,i);B!==2147483647&&(p===0&&(p=R),v[f]=R-p,v[f+1]=M,v[f+2]=P,v[f+3]=B,f+=4,C=R,y=P)}c=R,a=M,o++}f!==v.length&&(v=v.subarray(0,f));const E=D.SparseMultilineTokens.create(p,v);h.push(E)}return h}e.toMultilineTokens2=S;class g{constructor(t,i,n,r){this.tokenTypeIndex=t,this.tokenModifierSet=i,this.languageId=n,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 n=0;n<i;n++)t[n]=null}_hash2(t,i){return(t<<5)-t+i|0}_hashFunc(t,i,n){return this._hash2(this._hash2(t,i),n)%this._currentLength}get(t,i,n){const r=this._hashFunc(t,i,n);let d=this._elements[r];for(;d;){if(d.tokenTypeIndex===t&&d.tokenModifierSet===i&&d.languageId===n)return d;d=d.next}return null}add(t,i,n,r){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const d=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 h of d){let o=h;for(;o;){const c=o.next;o.next=null,this._add(o),o=c}}}this._add(new g(t,i,n,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[822],ee([1,0,2,39,23,63,243,229,49]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensStylingService=void 0;let g=e.SemanticTokensStylingService=class extends _.Disposable{constructor(s,t,i){super(),this._themeService=s,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(s){return this._caches.has(s)||this._caches.set(s,new w.SemanticTokensProviderStyling(s.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(s)}};e.SemanticTokensStylingService=g=Te([ge(0,L.IThemeService),ge(1,D.ILogService),ge(2,k.ILanguageService)],g),(0,S.registerSingleton)(b.ISemanticTokensStylingService,g,1)}),define(J[345],ee([1,0,94,2,18,172,46,75,23,48]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class m{constructor(t){this.options=t,this.rangeHighlightDecorationId=void 0}provide(t,i){var n;const r=new k.DisposableStore;t.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),t.matchOnLabel=t.matchOnDescription=t.matchOnDetail=t.sortByLabel=!1;const d=r.add(new k.MutableDisposable);return d.value=this.doProvide(t,i),r.add(this.onDidActiveTextEditorControlChange(()=>{d.value=void 0,d.value=this.doProvide(t,i)})),r}doProvide(t,i){const n=new k.DisposableStore,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const d={editor:r},h=(0,D.getCodeEditor)(r);if(h){let o=(0,L.withNullAsUndefined)(r.saveViewState());n.add(h.onDidChangeCursorPosition(()=>{o=(0,L.withNullAsUndefined)(r.saveViewState())})),d.restoreViewState=()=>{o&&r===this.activeTextEditorControl&&r.restoreViewState(o)},n.add((0,_.once)(i.onCancellationRequested)(()=>{var c;return(c=d.restoreViewState)===null||c===void 0?void 0:c.call(d)}))}n.add((0,k.toDisposable)(()=>this.clearDecorations(r))),n.add(this.provideWithTextEditor(d,t,i))}else n.add(this.provideWithoutTextEditor(t,i));return n}canProvideWithTextEditor(t){return!0}gotoLocation({editor:t},i){t.setSelection(i.range),t.revealRangeInCenter(i.range,0),i.preserveFocus||t.focus();const n=t.getModel();n&&"getLineContent"in n&&(0,g.alert)(`${n.getLineContent(i.range.startLineNumber)}`)}getModel(t){var i;return(0,D.isDiffEditor)(t)?(i=t.getModel())===null||i===void 0?void 0:i.modified:t.getModel()}addDecorations(t,i){t.changeDecorations(n=>{const r=[];this.rangeHighlightDecorationId&&(r.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const d=[{range:i,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:i,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,S.themeColorFromId)(b.overviewRulerRangeHighlight),position:w.OverviewRulerLane.Full}}}],[h,o]=n.deltaDecorations(r,d);this.rangeHighlightDecorationId={rangeHighlightId:h,overviewRulerDecorationId:o}})}clearDecorations(t){const i=this.rangeHighlightDecorationId;i&&(t.changeDecorations(n=>{n.deltaDecorations([i.overviewRulerDecorationId,i.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=m}),define(J[823],ee([1,0,2,172,345,663]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class w extends L.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(S){const g=(0,D.localize)(0,null);return S.items=[{label:g}],S.ariaLabel=g,_.Disposable.None}provideWithTextEditor(S,g,m){const s=S.editor,t=new _.DisposableStore;t.add(g.onDidAccept(r=>{const[d]=g.selectedItems;if(d){if(!this.isValidLineNumber(s,d.lineNumber))return;this.gotoLocation(S,{range:this.toRange(d.lineNumber,d.column),keyMods:g.keyMods,preserveFocus:r.inBackground}),r.inBackground||g.hide()}}));const i=()=>{const r=this.parsePosition(s,g.value.trim().substr(w.PREFIX.length)),d=this.getPickLabel(s,r.lineNumber,r.column);if(g.items=[{lineNumber:r.lineNumber,column:r.column,label:d}],g.ariaLabel=d,!this.isValidLineNumber(s,r.lineNumber)){this.clearDecorations(s);return}const h=this.toRange(r.lineNumber,r.column);s.revealRangeInCenter(h,0),this.addDecorations(s,h)};i(),t.add(g.onDidChangeValue(()=>i()));const n=(0,k.getCodeEditor)(s);return n&&n.getOptions().get(65).renderType===2&&(n.updateOptions({lineNumbers:"on"}),t.add((0,_.toDisposable)(()=>n.updateOptions({lineNumbers:"relative"})))),t}toRange(S=1,g=1){return{startLineNumber:S,startColumn:g,endLineNumber:S,endColumn:g}}parsePosition(S,g){const m=g.split(/,|:|#/).map(t=>parseInt(t,10)).filter(t=>!isNaN(t)),s=this.lineCount(S)+1;return{lineNumber:m[0]>0?m[0]:s+m[0],column:m[1]}}getPickLabel(S,g,m){if(this.isValidLineNumber(S,g))return this.isValidColumn(S,g,m)?(0,D.localize)(1,null,g,m):(0,D.localize)(2,null,g);const s=S.getPosition()||{lineNumber:1,column:1},t=this.lineCount(S);return t>1?(0,D.localize)(3,null,s.lineNumber,s.column,t):(0,D.localize)(4,null,s.lineNumber,s.column)}isValidLineNumber(S,g){return!g||typeof g!="number"?!1:g>0&&g<=this.lineCount(S)}isValidColumn(S,g,m){if(!m||typeof m!="number")return!1;const s=this.getModel(S);if(!s)return!1;const t={lineNumber:g,column:m};return s.validatePosition(t).equals(t)}lineCount(S){var g,m;return(m=(g=this.getModel(S))===null||g===void 0?void 0:g.getLineCount())!==null&&m!==void 0?m:0}}e.AbstractGotoLineQuickAccessProvider=w,w.PREFIX=":"}),define(J[824],ee([1,0,14,20,26,31,548,2,9,5,27,183,345,664,19,16]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let d=e.AbstractGotoSymbolQuickAccessProvider=class ui extends t.AbstractEditorNavigationQuickAccessProvider{constructor(a,l,u=Object.create(null)){super(u),this._languageFeaturesService=a,this._outlineModelService=l,this.options=u,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(a){return this.provideLabelPick(a,(0,i.localize)(0,null)),b.Disposable.None}provideWithTextEditor(a,l,u){const v=a.editor,f=this.getModel(v);return f?this._languageFeaturesService.documentSymbolProvider.has(f)?this.doProvideWithEditorSymbols(a,f,l,u):this.doProvideWithoutEditorSymbols(a,f,l,u):b.Disposable.None}doProvideWithoutEditorSymbols(a,l,u,v){const f=new b.DisposableStore;return this.provideLabelPick(u,(0,i.localize)(1,null)),we(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(l,f))||v.isCancellationRequested||f.add(this.doProvideWithEditorSymbols(a,l,u,v))}),f}provideLabelPick(a,l){a.items=[{label:l,index:0,kind:14}],a.ariaLabel=l}waitForLanguageSymbolRegistry(a,l){return we(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(a))return!0;const u=new _.DeferredPromise,v=l.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(a)&&(v.dispose(),u.complete(!0))}));return l.add((0,b.toDisposable)(()=>u.complete(!1))),u.p})}doProvideWithEditorSymbols(a,l,u,v){var f;const p=a.editor,C=new b.DisposableStore;C.add(u.onDidAccept(T=>{const[O]=u.selectedItems;O&&O.range&&(this.gotoLocation(a,{range:O.range.selection,keyMods:u.keyMods,preserveFocus:T.inBackground}),T.inBackground||u.hide())})),C.add(u.onDidTriggerItemButton(({item:T})=>{T&&T.range&&(this.gotoLocation(a,{range:T.range.selection,keyMods:u.keyMods,forceSideBySide:!0}),u.hide())}));const y=this.getDocumentSymbols(l,v);let E;const I=T=>we(this,void 0,void 0,function*(){E?.dispose(!0),u.busy=!1,E=new k.CancellationTokenSource(v),u.busy=!0;try{const O=(0,w.prepareQuery)(u.value.substr(ui.PREFIX.length).trim()),R=yield this.doGetSymbolPicks(y,O,void 0,E.token);if(v.isCancellationRequested)return;if(R.length>0){if(u.items=R,T&&O.original.length===0){const M=(0,r.findLast)(R,N=>!!(N.type!=="separator"&&N.range&&g.Range.containsPosition(N.range.decoration,T)));M&&(u.activeItems=[M])}}else O.original.length>0?this.provideLabelPick(u,(0,i.localize)(2,null)):this.provideLabelPick(u,(0,i.localize)(3,null))}finally{v.isCancellationRequested||(u.busy=!1)}});return C.add(u.onDidChangeValue(()=>I(void 0))),I((f=p.getSelection())===null||f===void 0?void 0:f.getPosition()),C.add(u.onDidChangeActive(()=>{const[T]=u.activeItems;T&&T.range&&(p.revealRangeInCenter(T.range.selection,0),this.addDecorations(p,T.range.decoration))})),C}doGetSymbolPicks(a,l,u,v){var f,p;return we(this,void 0,void 0,function*(){const C=yield a;if(v.isCancellationRequested)return[];const y=l.original.indexOf(ui.SCOPE_PREFIX)===0,E=y?1:0;let I,T;l.values&&l.values.length>1?(I=(0,w.pieceToQuery)(l.values[0]),T=(0,w.pieceToQuery)(l.values.slice(1))):I=l;let O;const R=(p=(f=this.options)===null||f===void 0?void 0:f.openSideBySideDirection)===null||p===void 0?void 0:p.call(f);R&&(O=[{iconClass:R==="right"?D.ThemeIcon.asClassName(L.Codicon.splitHorizontal):D.ThemeIcon.asClassName(L.Codicon.splitVertical),tooltip:R==="right"?(0,i.localize)(4,null):(0,i.localize)(5,null)}]);const M=[];for(let x=0;x<C.length;x++){const F=C[x],B=(0,S.trim)(F.name),V=`$(${m.SymbolKinds.toIcon(F.kind).id}) ${B}`,K=V.length-B.length;let A=F.containerName;u?.extraContainerLabel&&(A?A=`${u.extraContainerLabel} \\u2022 ${A}`:A=u.extraContainerLabel);let Y,ie,le,ne;if(l.original.length>E){let H=!1;if(I!==l&&([Y,ie]=(0,w.scoreFuzzy2)(V,Object.assign(Object.assign({},l),{values:void 0}),E,K),typeof Y=="number"&&(H=!0)),typeof Y!="number"&&([Y,ie]=(0,w.scoreFuzzy2)(V,I,E,K),typeof Y!="number"))continue;if(!H&&T){if(A&&T.original.length>0&&([le,ne]=(0,w.scoreFuzzy2)(A,T)),typeof le!="number")continue;typeof Y=="number"&&(Y+=le)}}const se=F.tags&&F.tags.indexOf(1)>=0;M.push({index:x,kind:F.kind,score:Y,label:V,ariaLabel:B,description:A,highlights:se?void 0:{label:ie,description:ne},range:{selection:g.Range.collapseToStart(F.selectionRange),decoration:F.range},strikethrough:se,buttons:O})}const N=M.sort((x,F)=>y?this.compareByKindAndScore(x,F):this.compareByScore(x,F));let P=[];if(y){let V=function(){F&&typeof x=="number"&&B>0&&(F.label=(0,S.format)(o[x]||h,B))},x,F,B=0;for(const K of N)x!==K.kind?(V(),x=K.kind,B=1,F={type:"separator"},P.push(F)):B++,P.push(K);V()}else N.length>0&&(P=[{label:(0,i.localize)(6,null,M.length),type:"separator"},...N]);return P})}compareByScore(a,l){if(typeof a.score!="number"&&typeof l.score=="number")return 1;if(typeof a.score=="number"&&typeof l.score!="number")return-1;if(typeof a.score=="number"&&typeof l.score=="number"){if(a.score>l.score)return-1;if(a.score<l.score)return 1}return a.index<l.index?-1:a.index>l.index?1:0}compareByKindAndScore(a,l){const u=o[a.kind]||h,v=o[l.kind]||h,f=u.localeCompare(v);return f===0?this.compareByScore(a,l):f}getDocumentSymbols(a,l){return we(this,void 0,void 0,function*(){const u=yield this._outlineModelService.getOrCreate(a,l);return l.isCancellationRequested?[]:u.asListOfDocumentSymbols()})}};d.PREFIX="@",d.SCOPE_PREFIX=":",d.PREFIX_BY_CATEGORY=`${d.PREFIX}${d.SCOPE_PREFIX}`,e.AbstractGotoSymbolQuickAccessProvider=d=Te([ge(0,n.ILanguageFeaturesService),ge(1,s.IOutlineModelService)],d);const h=(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[825],ee([1,0,2,12,667,13,34,33,23,444]),function(j,e,_,k,L,D,w,b,S){"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,L.localize)(0,null));let g=e.RenameInputField=class{constructor(s,t,i,n,r){this._editor=s,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new _.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(r),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(d=>{d.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,L.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(s){var t,i,n,r;if(!this._input||!this._domNode)return;const d=s.getColor(b.widgetShadow),h=s.getColor(b.widgetBorder);this._domNode.style.backgroundColor=String((t=s.getColor(b.editorWidgetBackground))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=d?` 0 0 8px 2px ${d}`:"",this._domNode.style.border=h?`1px solid ${h}`:"",this._domNode.style.color=String((i=s.getColor(b.inputForeground))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((n=s.getColor(b.inputBackground))!==null&&n!==void 0?n:"");const o=s.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 s=this._editor.getOption(48);this._input.style.fontFamily=s.fontFamily,this._input.style.fontWeight=s.fontWeight,this._input.style.fontSize=`${s.fontSize}px`,this._label.style.fontSize=`${s.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var s,t;const[i,n]=this._acceptKeybindings;return this._label.innerText=(0,L.localize)(2,null,(s=this._keybindingService.lookupKeybinding(i))===null||s===void 0?void 0:s.getLabel(),(t=this._keybindingService.lookupKeybinding(n))===null||t===void 0?void 0:t.getLabel()),null}afterRender(s){s||this.cancelInput(!0)}acceptInput(s){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,s)}cancelInput(s){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,s)}getInput(s,t,i,n,r,d){this._domNode.classList.toggle("preview",r),this._position=new k.Position(s.startLineNumber,s.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max((s.endColumn-s.startColumn)*1.1,20);const h=new _.DisposableStore;return new Promise(o=>{this._currentCancelInput=c=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,o(c),!0),this._currentAcceptInput=c=>{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&&c})},h.add(d.onCancellationRequested(()=>this.cancelInput(!0))),h.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!document.hasFocus()))),this._show()}).finally(()=>{h.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)}};e.RenameInputField=g=Te([ge(2,S.IThemeService),ge(3,w.IKeybindingService),ge(4,D.IContextKeyService)],g)}),define(J[826],ee([1,0,48,14,20,11,2,18,21,99,15,125,32,12,5,22,180,185,666,98,13,8,63,43,80,37,825,19]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class E{constructor(N,P,x){this.model=N,this.position=P,this._providerRenameIdx=0,this._providers=x.ordered(N)}hasProvider(){return this._providers.length>0}resolveRenameLocation(N){return we(this,void 0,void 0,function*(){const P=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const F=this._providers[this._providerRenameIdx];if(!F.resolveRenameLocation)break;const B=yield F.resolveRenameLocation(this.model,this.position,N);if(B){if(B.rejectReason){P.push(B.rejectReason);continue}return B}}const x=this.model.getWordAtPosition(this.position);return x?{range:new n.Range(this.position.lineNumber,x.startColumn,this.position.lineNumber,x.endColumn),text:x.word,rejectReason:P.length>0?P.join(`\n`):void 0}:{range:n.Range.fromPositions(this.position),text:"",rejectReason:P.length>0?P.join(`\n`):void 0}})}provideRenameEdits(N,P){return we(this,void 0,void 0,function*(){return this._provideRenameEdits(N,this._providerRenameIdx,[],P)})}_provideRenameEdits(N,P,x,F){return we(this,void 0,void 0,function*(){const B=this._providers[P];if(!B)return{edits:[],rejectReason:x.join(`\n`)};const V=yield B.provideRenameEdits(this.model,this.position,N,F);if(V){if(V.rejectReason)return this._provideRenameEdits(N,P+1,x.concat(V.rejectReason),F)}else return this._provideRenameEdits(N,P+1,x.concat(o.localize(0,null)),F);return V})}}function I(M,N,P,x){return we(this,void 0,void 0,function*(){const F=new E(N,P,M),B=yield F.resolveRenameLocation(L.CancellationToken.None);return B?.rejectReason?{edits:[],rejectReason:B.rejectReason}:F.provideRenameEdits(x,L.CancellationToken.None)})}e.rename=I;let T=class qi{static get(N){return N.getContribution(qi.ID)}constructor(N,P,x,F,B,V,K,A){this.editor=N,this._instaService=P,this._notificationService=x,this._bulkEditService=F,this._progressService=B,this._logService=V,this._configService=K,this._languageFeaturesService=A,this._disposableStore=new w.DisposableStore,this._cts=new L.CancellationTokenSource,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(C.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var N,P;return we(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new L.CancellationTokenSource,!this.editor.hasModel())return;const x=this.editor.getPosition(),F=new E(this.editor.getModel(),x,this._languageFeaturesService.renameProvider);if(!F.hasProvider())return;const B=new g.EditorStateCancellationTokenSource(this.editor,5,void 0,this._cts.token);let V;try{const H=F.resolveRenameLocation(B.token);this._progressService.showWhile(H,250),V=yield H}catch(H){(N=h.MessageController.get(this.editor))===null||N===void 0||N.showMessage(H||o.localize(1,null),x);return}finally{B.dispose()}if(!V)return;if(V.rejectReason){(P=h.MessageController.get(this.editor))===null||P===void 0||P.showMessage(V.rejectReason,x);return}if(B.token.isCancellationRequested)return;const K=new g.EditorStateCancellationTokenSource(this.editor,5,V.range,this._cts.token),A=this.editor.getSelection();let Y=0,ie=V.text.length;!n.Range.isEmpty(A)&&!n.Range.spansMultipleLines(A)&&n.Range.containsRange(V.range,A)&&(Y=Math.max(0,A.startColumn-V.range.startColumn),ie=Math.min(V.range.endColumn,A.endColumn)-V.range.startColumn);const le=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),ne=yield this._renameInputField.getInput(V.range,V.text,Y,ie,le,K.token);if(typeof ne=="boolean"){ne&&this.editor.focus(),K.dispose();return}this.editor.focus();const se=(0,k.raceCancellation)(F.provideRenameEdits(ne.newName,K.token),K.token).then(H=>we(this,void 0,void 0,function*(){if(!(!H||!this.editor.hasModel())){if(H.rejectReason){this._notificationService.info(H.rejectReason);return}this.editor.setSelection(n.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(H,{editor:this.editor,showPreview:ne.wantsPreview,label:o.localize(2,null,V?.text,ne.newName),code:"undoredo.rename",quotableLabel:o.localize(3,null,V?.text,ne.newName),respectAutoSaveConfig:!0}).then(W=>{W.ariaSummary&&(0,_.alert)(o.localize(4,null,V.text,ne.newName,W.ariaSummary))}).catch(W=>{this._notificationService.error(o.localize(5,null)),this._logService.error(W)})}}),H=>{this._notificationService.error(o.localize(6,null)),this._logService.error(H)}).finally(()=>{K.dispose()});return this._progressService.showWhile(se,250),se})}acceptRenameInput(N){this._renameInputField.acceptInput(N)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};T.ID="editor.contrib.renameController",T=Te([ge(1,l.IInstantiationService),ge(2,v.INotificationService),ge(3,s.IBulkEditService),ge(4,f.IEditorProgressService),ge(5,u.ILogService),ge(6,d.ITextResourceConfigurationService),ge(7,y.ILanguageFeaturesService)],T);class O 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,P){const x=N.get(t.ICodeEditorService),[F,B]=Array.isArray(P)&&P||[void 0,void 0];return S.URI.isUri(F)&&i.Position.isIPosition(B)?x.openCodeEditor({resource:F},x.getActiveCodeEditor()).then(V=>{V&&(V.setPosition(B),V.invokeWithinContext(K=>(this.reportTelemetry(K,V),this.run(K,V))))},D.onUnexpectedError):super.runCommand(N,P)}run(N,P){const x=T.get(P);return x?x.run():Promise.resolve()}}e.RenameAction=O,(0,m.registerEditorContribution)(T.ID,T,4),(0,m.registerEditorAction)(O);const R=m.EditorCommand.bindToContribution(T.get);(0,m.registerEditorCommand)(new R({id:"acceptRenameInput",precondition:C.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(C.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:C.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,P,...x){const[F]=x;(0,b.assertType)(typeof F=="string");const{renameProvider:B}=M.get(y.ILanguageFeaturesService);return I(B,N,P,F)}),(0,m.registerModelAndPositionCommand)("_executePrepareRename",function(M,N,P){return we(this,void 0,void 0,function*(){const{renameProvider:x}=M.get(y.ILanguageFeaturesService),B=yield new E(N,P,x).resolveRenameLocation(L.CancellationToken.None);if(B?.rejectReason)throw new Error(B.rejectReason);return B})}),p.Registry.as(c.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:o.localize(8,null),default:!0,type:"boolean"}}})}),define(J[827],ee([1,0,2,11,50,28,14,20,23,243,319,70,56,19,229,142,284]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSemanticTokensFeature=void 0;let h=e.DocumentSemanticTokensFeature=class extends _.Disposable{constructor(l,u,v,f,p,C){super(),this._watchers=Object.create(null);const y=T=>{this._watchers[T.uri.toString()]=new o(T,l,v,p,C)},E=(T,O)=>{O.dispose(),delete this._watchers[T.uri.toString()]},I=()=>{for(const T of u.getModels()){const O=this._watchers[T.uri.toString()];(0,d.isSemanticColoringEnabled)(T,v,f)?O||y(T):O&&E(T,O)}};this._register(u.onModelAdded(T=>{(0,d.isSemanticColoringEnabled)(T,v,f)&&y(T)})),this._register(u.onModelRemoved(T=>{const O=this._watchers[T.uri.toString()];O&&E(T,O)})),this._register(f.onDidChangeConfiguration(T=>{T.affectsConfiguration(d.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&I()})),this._register(v.onDidColorThemeChange(I))}dispose(){for(const l of Object.values(this._watchers))l.dispose();super.dispose()}};e.DocumentSemanticTokensFeature=h=Te([ge(0,n.ISemanticTokensStylingService),ge(1,L.IModelService),ge(2,S.IThemeService),ge(3,D.IConfigurationService),ge(4,s.ILanguageFeatureDebounceService),ge(5,i.ILanguageFeaturesService)],h);let o=class At extends _.Disposable{constructor(l,u,v,f,p){super(),this._semanticTokensStylingService=u,this._isDisposed=!1,this._model=l,this._provider=p.documentSemanticTokensProvider,this._debounceInformation=f.for(this._provider,"DocumentSemanticTokens",{min:At.REQUEST_MIN_DELAY,max:At.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new w.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),At.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.onDidChangeAttached(()=>{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 C=()=>{(0,_.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const y of this._provider.all(l))typeof y.onDidChange=="function"&&this._documentProvidersChangeListeners.push(y.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};C(),this._register(this._provider.onDidChange(()=>{C(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(v.onDidColorThemeChange(y=>{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}if(!this._model.isAttachedToEditor())return;const l=new b.CancellationTokenSource,u=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,v=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,f=(0,m.getDocumentSemanticTokens)(this._provider,this._model,u,v,l.token);this._currentDocumentRequestCancellationTokenSource=l,this._providersChangedDuringRequest=!1;const p=[],C=this._model.onDidChangeContent(E=>{p.push(E)}),y=new t.StopWatch(!1);f.then(E=>{if(this._debounceInformation.update(this._model,y.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,C.dispose(),!E)this._setDocumentSemanticTokens(null,null,null,p);else{const{provider:I,tokens:T}=E,O=this._semanticTokensStylingService.getStyling(I);this._setDocumentSemanticTokens(I,T||null,O,p)}},E=>{E&&(k.isCancellationError(E)||typeof E.message=="string"&&E.message.indexOf("busy")!==-1)||k.onUnexpectedError(E),this._currentDocumentRequestCancellationTokenSource=null,C.dispose(),(p.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(l,u,v,f,p){p=Math.min(p,v.length-f,l.length-u);for(let C=0;C<p;C++)v[f+C]=l[u+C]}_setDocumentSemanticTokens(l,u,v,f){const p=this._currentDocumentResponse,C=()=>{(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){l&&u&&l.releaseDocumentSemanticTokens(u.resultId);return}if(!l||!v){this._model.tokenization.setSemanticTokens(null,!1);return}if(!u){this._model.tokenization.setSemanticTokens(null,!0),C();return}if((0,m.isSemanticTokensEdits)(u)){if(!p){this._model.tokenization.setSemanticTokens(null,!0);return}if(u.edits.length===0)u={resultId:u.resultId,data:p.data};else{let y=0;for(const R of u.edits)y+=(R.data?R.data.length:0)-R.deleteCount;const E=p.data,I=new Uint32Array(E.length+y);let T=E.length,O=I.length;for(let R=u.edits.length-1;R>=0;R--){const M=u.edits[R];if(M.start>E.length){v.warnInvalidEditStart(p.resultId,u.resultId,R,M.start,E.length),this._model.tokenization.setSemanticTokens(null,!0);return}const N=T-(M.start+M.deleteCount);N>0&&(At._copy(E,T-N,I,O-N,N),O-=N),M.data&&(At._copy(M.data,0,I,O-M.data.length,M.data.length),O-=M.data.length),T=M.start}T>0&&At._copy(E,0,I,0,T),u={resultId:u.resultId,data:I}}}if((0,m.isSemanticTokens)(u)){this._currentDocumentResponse=new c(l,u.resultId,u.data);const y=(0,g.toMultilineTokens2)(u,v,this._model.getLanguageId());if(f.length>0)for(const E of f)for(const I of y)for(const T of E.changes)I.applyEdit(T.range,T.text);this._model.tokenization.setSemanticTokens(y,!0)}else this._model.tokenization.setSemanticTokens(null,!0);C()}};o.REQUEST_MIN_DELAY=300,o.REQUEST_MAX_DELAY=2e3,o=Te([ge(1,n.ISemanticTokensStylingService),ge(2,S.IThemeService),ge(3,s.ILanguageFeatureDebounceService),ge(4,i.ILanguageFeaturesService)],o);class c{constructor(l,u,v){this.provider=l,this.resultId=u,this.data=v}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,r.registerEditorFeature)(h)}),define(J[828],ee([1,0,14,2,15,319,284,243,28,23,70,56,19,229]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportSemanticTokensContribution=void 0;let n=e.ViewportSemanticTokensContribution=class extends k.Disposable{constructor(d,h,o,c,a,l){super(),this._semanticTokensStylingService=h,this._themeService=o,this._configurationService=c,this._editor=d,this._provider=l.documentRangeSemanticTokensProvider,this._debounceInformation=a.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new _.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(v=>{this._cancelAll(),u()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),u()})),this._register(this._configurationService.onDidChangeConfiguration(v=>{v.affectsConfiguration(w.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),u())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),u()})),u()}_cancelAll(){for(const d of this._outstandingRequests)d.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(d){for(let h=0,o=this._outstandingRequests.length;h<o;h++)if(this._outstandingRequests[h]===d){this._outstandingRequests.splice(h,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const d=this._editor.getModel();if(d.tokenization.hasCompleteSemanticTokens())return;if(!(0,w.isSemanticColoringEnabled)(d,this._themeService,this._configurationService)){d.tokenization.hasSomeSemanticTokens()&&d.tokenization.setSemanticTokens(null,!1);return}if(!(0,D.hasDocumentRangeSemanticTokensProvider)(this._provider,d)){d.tokenization.hasSomeSemanticTokens()&&d.tokenization.setSemanticTokens(null,!1);return}const h=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(h.map(o=>this._requestRange(d,o)))}_requestRange(d,h){const o=d.getVersionId(),c=(0,_.createCancelablePromise)(l=>Promise.resolve((0,D.getDocumentRangeSemanticTokens)(this._provider,d,h,l))),a=new s.StopWatch(!1);return c.then(l=>{if(this._debounceInformation.update(d,a.elapsed()),!l||!l.tokens||d.isDisposed()||d.getVersionId()!==o)return;const{provider:u,tokens:v}=l,f=this._semanticTokensStylingService.getStyling(u);d.tokenization.setPartialSemanticTokens(h,(0,b.toMultilineTokens2)(v,f,d.getLanguageId()))}).then(()=>this._removeOutstandingRequest(c),()=>this._removeOutstandingRequest(c)),c}};n.ID="editor.contrib.viewportSemanticTokens",e.ViewportSemanticTokensContribution=n=Te([ge(1,i.ISemanticTokensStylingService),ge(2,g.IThemeService),ge(3,S.IConfigurationService),ge(4,m.ILanguageFeatureDebounceService),ge(5,t.ILanguageFeaturesService)],n),(0,L.registerEditorContribution)(n.ID,n,1)}),define(J[829],ee([1,0,7,218,26,31,6,64,2,21,27,748,50,39,676,317,74,23,332]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.getAriaId=void 0;function a(p){return`suggest-aria-id:${p}`}e.getAriaId=a;const l=(0,d.registerIcon)("suggest-more-info",L.Codicon.chevronRight,n.localize(0,null)),u=new(c=class Qt{extract(C,y){if(C.textLabel.match(Qt._regexStrict))return y[0]=C.textLabel,!0;if(C.completion.detail&&C.completion.detail.match(Qt._regexStrict))return y[0]=C.completion.detail,!0;if(typeof C.completion.documentation=="string"){const E=Qt._regexRelaxed.exec(C.completion.documentation);if(E&&(E.index===0||E.index+E[0].length===C.completion.documentation.length))return y[0]=E[0],!0}return!1}},c._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*\\))/,c._regexStrict=new RegExp(`^${c._regexRelaxed.source}$`,"i"),c);let v=e.ItemRenderer=class{constructor(C,y,E,I){this._editor=C,this._modelService=y,this._languageService=E,this._themeService=I,this._onDidToggleDetails=new w.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(C){const y=new S.DisposableStore,E=C;E.classList.add("show-file-icons");const I=(0,_.append)(C,(0,_.$)(".icon")),T=(0,_.append)(I,(0,_.$)("span.colorspan")),O=(0,_.append)(C,(0,_.$)(".contents")),R=(0,_.append)(O,(0,_.$)(".main")),M=(0,_.append)(R,(0,_.$)(".icon-label.codicon")),N=(0,_.append)(R,(0,_.$)("span.left")),P=(0,_.append)(R,(0,_.$)("span.right")),x=new k.IconLabel(N,{supportHighlights:!0,supportIcons:!0});y.add(x);const F=(0,_.append)(N,(0,_.$)("span.signature-label")),B=(0,_.append)(N,(0,_.$)("span.qualifier-label")),V=(0,_.append)(P,(0,_.$)("span.details-label")),K=(0,_.append)(P,(0,_.$)("span.readMore"+D.ThemeIcon.asCSSSelector(l)));K.title=n.localize(1,null);const A=()=>{const Y=this._editor.getOptions(),ie=Y.get(48),le=ie.getMassagedFontFamily(),ne=ie.fontFeatureSettings,se=Y.get(115)||ie.fontSize,H=Y.get(116)||ie.lineHeight,W=ie.fontWeight,$=ie.letterSpacing,Z=`${se}px`,Q=`${H}px`,re=`${$}px`;E.style.fontSize=Z,E.style.fontWeight=W,E.style.letterSpacing=re,R.style.fontFamily=le,R.style.fontFeatureSettings=ne,R.style.lineHeight=Q,I.style.height=Q,I.style.width=Q,K.style.height=Q,K.style.width=Q};return A(),y.add(this._editor.onDidChangeConfiguration(Y=>{(Y.hasChanged(48)||Y.hasChanged(115)||Y.hasChanged(116))&&A()})),{root:E,left:N,right:P,icon:I,colorspan:T,iconLabel:x,iconContainer:M,parametersLabel:F,qualifierLabel:B,detailsLabel:V,readMore:K,disposables:y}}renderElement(C,y,E){const{completion:I}=C;E.root.id=a(y),E.colorspan.style.backgroundColor="";const T={labelEscapeNewLines:!0,matches:(0,b.createMatches)(C.score)},O=[];if(I.kind===19&&u.extract(C,O))E.icon.className="icon customcolor",E.iconContainer.className="icon hide",E.colorspan.style.backgroundColor=O[0];else if(I.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){E.icon.className="icon hide",E.iconContainer.className="icon hide";const R=(0,s.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:C.textLabel}),r.FileKind.FILE),M=(0,s.getIconClasses)(this._modelService,this._languageService,g.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,s.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:C.textLabel}),r.FileKind.FOLDER),(0,s.getIconClasses)(this._modelService,this._languageService,g.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(C.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(114).showInlineDetails?(0,_.show)(E.detailsLabel):(0,_.hide)(E.detailsLabel),(0,o.canExpandCompletionItem)(C)?(E.right.classList.add("can-expand-details"),(0,_.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,_.hide)(E.readMore),E.readMore.onmousedown=null,E.readMore.onclick=null)}disposeTemplate(C){C.disposables.dispose()}};e.ItemRenderer=v=Te([ge(1,t.IModelService),ge(2,i.ILanguageService),ge(3,h.IThemeService)],v);function f(p){return p.replace(/\\r\\n|\\r|\\n/g,"")}}),define(J[830],ee([1,0,823,37,130,32,18,84,6,15,22,71]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoLineQuickAccessProvider=void 0;let t=e.StandaloneGotoLineQuickAccessProvider=class extends _.AbstractGotoLineQuickAccessProvider{constructor(r){super(),this.editorService=r,this.onDidActiveTextEditorControlChange=S.Event.None}get activeTextEditorControl(){return(0,w.withNullAsUndefined)(this.editorService.getFocusedCodeEditor())}};e.StandaloneGotoLineQuickAccessProvider=t=Te([ge(0,D.ICodeEditorService)],t);class i extends g.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(s.IQuickInputService).quickAccess.show(t.PREFIX)}}e.GotoLineAction=i,i.ID="editor.action.gotoLine",(0,g.registerEditorAction)(i),k.Registry.as(L.Extensions.Quickaccess).registerQuickAccessProvider({ctor:t,prefix:t.PREFIX,helpEntries:[{description:b.GoToLineNLS.gotoLineActionLabel,commandId:i.ID}]})}),define(J[831],ee([1,0,824,37,130,32,18,84,6,15,22,71,183,19,166,241]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoSymbolAction=e.StandaloneGotoSymbolQuickAccessProvider=void 0;let n=e.StandaloneGotoSymbolQuickAccessProvider=class extends _.AbstractGotoSymbolQuickAccessProvider{constructor(h,o,c){super(o,c),this.editorService=h,this.onDidActiveTextEditorControlChange=S.Event.None}get activeTextEditorControl(){return(0,w.withNullAsUndefined)(this.editorService.getFocusedCodeEditor())}};e.StandaloneGotoSymbolQuickAccessProvider=n=Te([ge(0,D.ICodeEditorService),ge(1,i.ILanguageFeaturesService),ge(2,t.IOutlineModelService)],n);class r extends g.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(h){h.get(s.IQuickInputService).quickAccess.show(_.AbstractGotoSymbolQuickAccessProvider.PREFIX,{itemActivation:s.ItemActivation.NONE})}}e.GotoSymbolAction=r,r.ID="editor.action.quickOutline",(0,g.registerEditorAction)(r),k.Registry.as(L.Extensions.Quickaccess).registerQuickAccessProvider({ctor:n,prefix:_.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:b.QuickOutlineNLS.quickOutlineActionLabel,prefix:_.AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:r.ID},{description:b.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:_.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]})}),define(J[346],ee([1,0,7,51,810,32,13,49,23]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorService=void 0;let g=e.StandaloneCodeEditorService=class extends L.AbstractCodeEditorService{constructor(s,t){super(t),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=s.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler((i,n,r)=>we(this,void 0,void 0,function*(){return n?this.doOpenEditor(n,i):null}))}_checkContextKey(){let s=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){s=!0;break}this._editorIsOpen.set(s)}setActiveCodeEditor(s){this._activeCodeEditor=s}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(s,t){if(!this.findModel(s,t.resource)){if(t.resource){const r=t.resource.scheme;if(r===k.Schemas.http||r===k.Schemas.https)return(0,_.windowOpenNoOpener)(t.resource.toString()),s}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")s.setSelection(n),s.revealRangeInCenter(n,1);else{const r={lineNumber:n.startLineNumber,column:n.startColumn};s.setPosition(r),s.revealPositionInCenter(r,1)}return s}findModel(s,t){const i=s.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};e.StandaloneCodeEditorService=g=Te([ge(0,w.IContextKeyService),ge(1,S.IThemeService)],g),(0,b.registerSingleton)(D.ICodeEditorService,g,0)}),define(J[832],ee([1,0,75,33]),function(j,e,_,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",[_.editorIndentGuides]:"#D3D3D3",[_.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",[_.editorIndentGuides]:"#404040",[_.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",[_.editorIndentGuides]:"#FFFFFF",[_.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",[_.editorIndentGuides]:"#292929",[_.editorActiveIndentGuides]:"#292929"}}}),define(J[347],ee([1,0,7,47,36,6,27,121,489,832,37,33,23,2,93,806]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,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 d=m.Registry.as(s.Extensions.ColorContribution),h=m.Registry.as(t.Extensions.ThemingContribution);class o{constructor(f,p){this.semanticHighlighting=!1,this.themeData=p;const C=p.base;f.length>0?(c(f)?this.id=f:this.id=C+" "+f,this.themeName=f):(this.id=C,this.themeName=C),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 p in this.themeData.colors)f.set(p,L.Color.fromHex(this.themeData.colors[p]));if(this.themeData.inherit){const p=a(this.themeData.base);for(const C in p.colors)f.has(C)||f.set(C,L.Color.fromHex(p.colors[C]))}this.colors=f}return this.colors}getColor(f,p){const C=this.getColors().get(f);if(C)return C;if(p!==!1)return this.getDefault(f)}getDefault(f){let p=this.defaultColors[f];return p||(p=d.resolveDefaultColor(f,this),this.defaultColors[f]=p,p)}defines(f){return this.getColors().has(f)}get type(){switch(this.base){case e.VS_LIGHT_THEME_NAME:return n.ColorScheme.LIGHT;case e.HC_BLACK_THEME_NAME:return n.ColorScheme.HIGH_CONTRAST_DARK;case e.HC_LIGHT_THEME_NAME:return n.ColorScheme.HIGH_CONTRAST_LIGHT;default:return n.ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let f=[],p=[];if(this.themeData.inherit){const E=a(this.themeData.base);f=E.rules,E.encodedTokensColors&&(p=E.encodedTokensColors)}const C=this.themeData.colors["editor.foreground"],y=this.themeData.colors["editor.background"];if(C||y){const E={token:""};C&&(E.foreground=C),y&&(E.background=y),f.push(E)}f=f.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(p=this.themeData.encodedTokensColors),this._tokenTheme=S.TokenTheme.createFromRawTokenTheme(f,p)}return this._tokenTheme}getTokenStyleMetadata(f,p,C){const E=this.tokenTheme._match([f].concat(p).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 c(v){return v===e.VS_LIGHT_THEME_NAME||v===e.VS_DARK_THEME_NAME||v===e.HC_BLACK_THEME_NAME||v===e.HC_LIGHT_THEME_NAME}function a(v){switch(v){case e.VS_LIGHT_THEME_NAME:return g.vs;case e.VS_DARK_THEME_NAME:return g.vs_dark;case e.HC_BLACK_THEME_NAME:return g.hc_black;case e.HC_LIGHT_THEME_NAME:return g.hc_light}}function l(v){const f=a(v);return new o(v,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,l(e.VS_LIGHT_THEME_NAME)),this._knownThemes.set(e.VS_DARK_THEME_NAME,l(e.VS_DARK_THEME_NAME)),this._knownThemes.set(e.HC_BLACK_THEME_NAME,l(e.HC_BLACK_THEME_NAME)),this._knownThemes.set(e.HC_LIGHT_THEME_NAME,l(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 _.isInShadowDOM(f)?this._registerShadowDomContainer(f):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=_.createStyleSheet(void 0,f=>{f.className="monaco-colors",f.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),i.Disposable.None}_registerShadowDomContainer(f){const p=_.createStyleSheet(f,C=>{C.className="monaco-colors",C.textContent=this._allCSS});return this._styleElements.push(p),{dispose:()=>{for(let C=0;C<this._styleElements.length;C++)if(this._styleElements[C]===p){this._styleElements.splice(C,1);return}}}}defineTheme(f,p){if(!/^[a-z0-9\\-]+$/i.test(f))throw new Error("Illegal theme name!");if(!c(p.base)&&!c(f))throw new Error("Illegal theme base!");this._knownThemes.set(f,new o(f,p)),c(f)&&this._knownThemes.forEach(C=>{C.base===f&&C.notifyBaseUpdated()}),this._theme.themeName===f&&this.setTheme(f)}getColorTheme(){return this._theme}setColorMapOverride(f){this._colorMapOverride=f,this._updateThemeOrColorMap()}setTheme(f){let p;this._knownThemes.has(f)?p=this._knownThemes.get(f):p=this._knownThemes.get(e.VS_LIGHT_THEME_NAME),this._updateActualTheme(p)}_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,n.isHighContrast)(this._theme.type)){let p;(0,n.isDark)(this._theme.type)?p=f?e.HC_BLACK_THEME_NAME:e.VS_DARK_THEME_NAME:p=f?e.HC_LIGHT_THEME_NAME:e.VS_LIGHT_THEME_NAME,this._updateActualTheme(this._knownThemes.get(p))}}}setAutoDetectHighContrast(f){this._autoDetectHighContrast=f,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const f=[],p={},C={addRule:I=>{p[I]||(f.push(I),p[I]=!0)}};h.getThemingParticipants().forEach(I=>I(this._theme,C,this._environment));const y=[];for(const I of d.getColors()){const T=this._theme.getColor(I.id,!0);T&&y.push(`${(0,s.asCssVariableName)(I.id)}: ${T.toString()};`)}C.addRule(`.monaco-editor { ${y.join(`\n`)} }`);const E=this._colorMapOverride||this._theme.tokenTheme.getColorMap();C.addRule((0,S.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[833],ee([1,0,15,126,84,93,347]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class b extends _.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:L.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(g,m){const s=g.get(k.IStandaloneThemeService),t=s.getColorTheme();(0,D.isHighContrast)(t.type)?(s.setTheme(this._originalThemeName||((0,D.isDark)(t.type)?w.VS_DARK_THEME_NAME:w.VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(s.setTheme((0,D.isDark)(t.type)?w.HC_BLACK_THEME_NAME:w.HC_LIGHT_THEME_NAME),this._originalThemeName=t.themeName)}}(0,_.registerEditorAction)(b)}),define(J[157],ee([1,0,7,44,150,303,40,208,2,17,689,30,711,13,55,8,34,43,85,23,31,93,18,33,100,458]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.DropdownWithDefaultActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=e.createAndFillInContextMenuActions=void 0;function p(M,N,P,x){const F=M.getActions(N),B=_.ModifierKeyEmitter.getInstance(),V=B.keyStatus.altKey||(g.isWindows||g.isLinux)&&B.keyStatus.shiftKey;y(F,P,V,x?K=>K===x:K=>K==="navigation")}e.createAndFillInContextMenuActions=p;function C(M,N,P,x,F,B){const V=M.getActions(N);y(V,P,!1,typeof x=="string"?A=>A===x:x,F,B)}e.createAndFillInActionBarActions=C;function y(M,N,P,x=V=>V==="navigation",F=()=>!1,B=!1){let V,K;Array.isArray(N)?(V=N,K=N):(V=N.primary,K=N.secondary);const A=new Set;for(const[Y,ie]of M){let le;x(Y)?(le=V,le.length>0&&B&&le.push(new w.Separator)):(le=K,le.length>0&&le.push(new w.Separator));for(let ne of ie){P&&(ne=ne instanceof s.MenuItemAction&&ne.alt?ne.alt:ne);const se=le.push(ne);ne instanceof w.SubmenuAction&&A.add({group:Y,action:ne,index:se-1})}}for(const{group:Y,action:ie,index:le}of A){const ne=x(Y)?V:K,se=ie.actions;se.length<=1&&F(ie,Y,ne.length)&&ne.splice(le,1,...se)}}let E=e.MenuEntryActionViewItem=class extends L.ActionViewItem{constructor(N,P,x,F,B,V,K){super(void 0,N,{icon:!!(N.class||N.item.icon),label:!N.class&&!N.item.icon,draggable:P?.draggable,keybinding:P?.keybinding,hoverDelegate:P?.hoverDelegate}),this._keybindingService=x,this._notificationService=F,this._contextKeyService=B,this._themeService=V,this._contextMenuService=K,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new S.MutableDisposable),this._altKey=_.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(N){return we(this,void 0,void 0,function*(){N.preventDefault(),N.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(P){this._notificationService.error(P)}})}render(N){super.render(N),N.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item);let P=!1,x=this._altKey.keyStatus.altKey||(g.isWindows||g.isLinux)&&this._altKey.keyStatus.shiftKey;const F=()=>{var B;const V=P&&x&&!!(!((B=this._commandAction.alt)===null||B===void 0)&&B.enabled);V!==this._wantsAltCommand&&(this._wantsAltCommand=V,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(B=>{x=B.altKey||(g.isWindows||g.isLinux)&&B.shiftKey,F()})),this._register((0,_.addDisposableListener)(N,"mouseleave",B=>{P=!1,F()})),this._register((0,_.addDisposableListener)(N,"mouseenter",B=>{P=!0,F()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var N;const P=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),x=P&&P.getLabel(),F=this._commandAction.tooltip||this._commandAction.label;let B=x?(0,m.localize)(0,null,F,x):F;if(!this._wantsAltCommand&&(!((N=this._menuItemAction.alt)===null||N===void 0)&&N.enabled)){const V=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,K=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),A=K&&K.getLabel(),Y=A?(0,m.localize)(1,null,V,A):V;B=(0,m.localize)(2,null,B,b.UILabelProvider.modifierLabels[g.OS].altKey,Y)}return B}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:P,label:x}=this;if(!P||!x)return;const F=this._commandAction.checked&&(0,t.isICommandActionToggleInfo)(N.toggled)&&N.toggled.icon?N.toggled.icon:N.icon;if(F)if(a.ThemeIcon.isThemeIcon(F)){const B=a.ThemeIcon.asClassNameArray(F);x.classList.add(...B),this._itemClassDispose.value=(0,S.toDisposable)(()=>{x.classList.remove(...B)})}else x.style.backgroundImage=(0,l.isDark)(this._themeService.getColorTheme().type)?(0,_.asCSSUrl)(F.dark):(0,_.asCSSUrl)(F.light),x.classList.add("icon"),this._itemClassDispose.value=(0,S.combinedDisposable)((0,S.toDisposable)(()=>{x.style.backgroundImage="",x.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};e.MenuEntryActionViewItem=E=Te([ge(2,d.IKeybindingService),ge(3,h.INotificationService),ge(4,i.IContextKeyService),ge(5,c.IThemeService),ge(6,n.IContextMenuService)],E);let I=e.SubmenuEntryActionViewItem=class extends D.DropdownMenuActionViewItem{constructor(N,P,x,F,B){var V,K,A;const Y=Object.assign(Object.assign({},P),{menuAsChild:(V=P?.menuAsChild)!==null&&V!==void 0?V:!1,classNames:(K=P?.classNames)!==null&&K!==void 0?K:a.ThemeIcon.isThemeIcon(N.item.icon)?a.ThemeIcon.asClassName(N.item.icon):void 0,keybindingProvider:(A=P?.keybindingProvider)!==null&&A!==void 0?A:ie=>x.lookupKeybinding(ie.id)});super(N,{getActions:()=>N.actions},F,Y),this._keybindingService=x,this._contextMenuService=F,this._themeService=B}render(N){super.render(N),(0,u.assertType)(this.element),N.classList.add("menu-entry");const P=this._action,{icon:x}=P.item;if(x&&!a.ThemeIcon.isThemeIcon(x)){this.element.classList.add("icon");const F=()=>{this.element&&(this.element.style.backgroundImage=(0,l.isDark)(this._themeService.getColorTheme().type)?(0,_.asCSSUrl)(x.dark):(0,_.asCSSUrl)(x.light))};F(),this._register(this._themeService.onDidColorThemeChange(()=>{F()}))}}};e.SubmenuEntryActionViewItem=I=Te([ge(2,d.IKeybindingService),ge(3,n.IContextMenuService),ge(4,c.IThemeService)],I);let T=e.DropdownWithDefaultActionViewItem=class extends L.BaseActionViewItem{constructor(N,P,x,F,B,V,K,A){var Y,ie,le;super(null,N),this._keybindingService=x,this._notificationService=F,this._contextMenuService=B,this._menuService=V,this._instaService=K,this._storageService=A,this._container=null,this._options=P,this._storageKey=`${N.item.submenu.id}_lastActionId`;let ne;const se=P?.persistLastActionId?A.get(this._storageKey,1):void 0;se&&(ne=N.actions.find(W=>se===W.id)),ne||(ne=N.actions[0]),this._defaultAction=this._instaService.createInstance(E,ne,{keybinding:this._getDefaultActionKeybindingLabel(ne)});const H=Object.assign(Object.assign({keybindingProvider:W=>this._keybindingService.lookupKeybinding(W.id)},P),{menuAsChild:(Y=P?.menuAsChild)!==null&&Y!==void 0?Y:!0,classNames:(ie=P?.classNames)!==null&&ie!==void 0?ie:["codicon","codicon-chevron-down"],actionRunner:(le=P?.actionRunner)!==null&&le!==void 0?le:new w.ActionRunner});this._dropdown=new D.DropdownMenuActionViewItem(N,N.actions,this._contextMenuService,H),this._dropdown.actionRunner.onDidRun(W=>{W.action instanceof s.MenuItemAction&&this.update(W.action)})}update(N){var P;!((P=this._options)===null||P===void 0)&&P.persistLastActionId&&this._storageService.store(this._storageKey,N.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(E,N,{keybinding:this._getDefaultActionKeybindingLabel(N)}),this._defaultAction.actionRunner=new class extends w.ActionRunner{runAction(x,F){return we(this,void 0,void 0,function*(){yield x.run(void 0)})}},this._container&&this._defaultAction.render((0,_.prepend)(this._container,(0,_.$)(".action-container")))}_getDefaultActionKeybindingLabel(N){var P;let x;if(!((P=this._options)===null||P===void 0)&&P.renderKeybindingWithDefaultActionLabel){const F=this._keybindingService.lookupKeybinding(N.id);F&&(x=`(${F.getLabel()})`)}return x}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 P=(0,_.$)(".action-container");this._defaultAction.render((0,_.append)(this._container,P)),this._register((0,_.addDisposableListener)(P,_.EventType.KEY_DOWN,F=>{const B=new k.StandardKeyboardEvent(F);B.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),B.stopPropagation())}));const x=(0,_.$)(".dropdown-action-container");this._dropdown.render((0,_.append)(this._container,x)),this._register((0,_.addDisposableListener)(x,_.EventType.KEY_DOWN,F=>{var B;const V=new k.StandardKeyboardEvent(F);V.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(B=this._defaultAction.element)===null||B===void 0||B.focus(),V.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()}};e.DropdownWithDefaultActionViewItem=T=Te([ge(2,d.IKeybindingService),ge(3,h.INotificationService),ge(4,n.IContextMenuService),ge(5,s.IMenuService),ge(6,r.IInstantiationService),ge(7,o.IStorageService)],T);let O=class extends L.SelectActionViewItem{constructor(N,P){super(null,N,N.actions.map(x=>({text:x.id===w.Separator.ID?"\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500":x.label,isDisabled:!x.enabled})),0,P,f.defaultSelectBoxStyles,{ariaLabel:N.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,N.actions.findIndex(x=>x.checked)))}render(N){super.render(N),N.style.borderColor=(0,v.asCssVariable)(v.selectBorder)}runAction(N,P){const x=this.action.actions[P];x&&this.actionRunner.run(x)}};O=Te([ge(1,n.IContextViewService)],O);function R(M,N,P){return N instanceof s.MenuItemAction?M.createInstance(E,N,P):N instanceof s.SubmenuItemAction?N.item.isSelection?M.createInstance(O,N):N.item.rememberDefaultAction?M.createInstance(T,N,Object.assign(Object.assign({},P),{persistLastActionId:!0})):M.createInstance(I,N,P):void 0}e.createActionViewItem=R}),define(J[244],ee([1,0,7,69,214,40,16,14,26,2,82,252,17,31,12,27,205,653,157,789,30,25,13,55,8,34,73,74,436]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomizedMenuWorkbenchToolBar=e.InlineSuggestionHintsContentWidget=e.InlineCompletionsHintsWidget=void 0;let E=e.InlineCompletionsHintsWidget=class extends g.Disposable{constructor(P,x,F){super(),this.editor=P,this.model=x,this.instantiationService=F,this.alwaysShowToolbar=(0,m.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).showToolbar==="always"),this.sessionPosition=void 0,this.position=(0,m.derived)("position",B=>{var V,K,A;const Y=(V=this.model.read(B))===null||V===void 0?void 0:V.ghostText.read(B);if(!this.alwaysShowToolbar.read(B)||!Y||Y.parts.length===0)return this.sessionPosition=void 0,null;const ie=Y.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==Y.lineNumber&&(this.sessionPosition=void 0);const le=new n.Position(Y.lineNumber,Math.min(ie,(A=(K=this.sessionPosition)===null||K===void 0?void 0:K.column)!==null&&A!==void 0?A:Number.MAX_SAFE_INTEGER));return this.sessionPosition=le,le}),this._register((0,s.autorunWithStore2)("setup content widget",(B,V)=>{const K=this.model.read(B);if(!K||!this.alwaysShowToolbar.read(B))return;const A=V.add(this.instantiationService.createInstance(O,this.editor,!0,this.position,K.selectedInlineCompletionIndex,K.inlineCompletionsCount,K.selectedInlineCompletion.map(Y=>{var ie;return(ie=Y?.inlineCompletion.source.inlineCompletions.commands)!==null&&ie!==void 0?ie:[]})));P.addContentWidget(A),V.add((0,g.toDisposable)(()=>P.removeContentWidget(A))),V.add((0,m.autorun)("request explicit",Y=>{this.position.read(Y)&&K.lastTriggerKind.read(Y)!==r.InlineCompletionTriggerKind.Explicit&&K.triggerExplicitly()}))}))}};e.InlineCompletionsHintsWidget=E=Te([ge(2,f.IInstantiationService)],E);const I=(0,y.registerIcon)("inline-suggestion-hints-next",S.Codicon.chevronRight,(0,h.localize)(0,null)),T=(0,y.registerIcon)("inline-suggestion-hints-previous",S.Codicon.chevronLeft,(0,h.localize)(1,null));let O=e.InlineSuggestionHintsContentWidget=class hi extends g.Disposable{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(P,x,F){const B=new D.Action(P,x,F,!0,()=>this._commandService.executeCommand(P)),V=this.keybindingService.lookupKeybinding(P,this._contextKeyService);let K=x;return V&&(K=(0,h.localize)(2,null,x,V.getLabel())),B.tooltip=K,B}constructor(P,x,F,B,V,K,A,Y,ie,le,ne){super(),this.editor=P,this.withBorder=x,this._position=F,this._currentSuggestionIdx=B,this._suggestionCount=V,this._extraCommands=K,this._commandService=A,this.keybindingService=ie,this._contextKeyService=le,this._menuService=ne,this.id=`InlineSuggestionHintsContentWidget${hi.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,_.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,_.h)("div",{style:{display:"flex"}},[(0,_.h)("div@actionBar",{className:"custom-actions"}),(0,_.h)("div@toolBar")])]),this.previousAction=this.createCommandAction(d.showPreviousInlineSuggestionActionId,(0,h.localize)(3,null),i.ThemeIcon.asClassName(T)),this.availableSuggestionCountAction=new D.Action("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(d.showNextInlineSuggestionActionId,(0,h.localize)(4,null),i.ThemeIcon.asClassName(I)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(a.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.lastCommands=[];const se=this._register(new k.ActionBar(this.nodes.actionBar));se.push(this.previousAction,{icon:!0,label:!1}),se.push(this.availableSuggestionCountAction),se.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(Y.createInstance(M,this.nodes.toolBar,a.MenuId.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:H=>H.startsWith("primary")},actionViewItemProvider:(H,W)=>H instanceof a.MenuItemAction?Y.createInstance(R,H,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(H=>{hi._dropDownVisible=H})),this._register((0,m.autorun)("update position",H=>{this._position.read(H),this.editor.layoutContentWidget(this)})),this._register((0,m.autorun)("counts",H=>{const W=this._suggestionCount.read(H),$=this._currentSuggestionIdx.read(H);W!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${$+1}/${W}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),W!==void 0&&W>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register((0,m.autorun)("extra commands",H=>{const W=this._extraCommands.read(H);if((0,w.equals)(this.lastCommands,W))return;this.lastCommands=W;const $=W.map(Z=>({class:void 0,id:Z.id,enabled:!0,tooltip:Z.tooltip||"",label:Z.title,run:Q=>this._commandService.executeCommand(Z.id)}));for(const[Z,Q]of this.inlineCompletionsActionsMenus.getActions())for(const re of Q)re instanceof a.MenuItemAction&&$.push(re);$.length>0&&$.unshift(new D.Separator),this.toolBar.setAdditionalSecondaryActions($)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};O._dropDownVisible=!1,O.id=0,e.InlineSuggestionHintsContentWidget=O=Te([ge(6,l.ICommandService),ge(7,f.IInstantiationService),ge(8,p.IKeybindingService),ge(9,u.IContextKeyService),ge(10,a.IMenuService)],O);class R extends o.MenuEntryActionViewItem{updateLabel(){const P=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!P)return super.updateLabel();if(this.label){const x=(0,_.h)("div.keybinding").root;new L.KeybindingLabel(x,t.OS,Object.assign({disableTitle:!0},L.unthemedKeybindingLabelOptions)).set(P),this.label.textContent=this._action.label,this.label.appendChild(x),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let M=e.CustomizedMenuWorkbenchToolBar=class extends c.WorkbenchToolBar{constructor(P,x,F,B,V,K,A,Y){super(P,Object.assign({resetMenu:x},F),B,V,K,A,Y),this.menuId=x,this.options2=F,this.menuService=B,this.contextKeyService=V,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 P,x,F,B,V,K,A;const Y=[],ie=[];(0,o.createAndFillInActionBarActions)(this.menu,(P=this.options2)===null||P===void 0?void 0:P.menuOptions,{primary:Y,secondary:ie},(F=(x=this.options2)===null||x===void 0?void 0:x.toolbarOptions)===null||F===void 0?void 0:F.primaryGroup,(V=(B=this.options2)===null||B===void 0?void 0:B.toolbarOptions)===null||V===void 0?void 0:V.shouldInlineSubmenu,(A=(K=this.options2)===null||K===void 0?void 0:K.toolbarOptions)===null||A===void 0?void 0:A.useSeparatorsInPrimaryActions),ie.push(...this.additionalActions),this.setActions(Y,ie)}setAdditionalSecondaryActions(P){(0,w.equals)(this.additionalActions,P,(x,F)=>x===F)||(this.additionalActions=P,this.updateToolbar())}};e.CustomizedMenuWorkbenchToolBar=M=Te([ge(3,a.IMenuService),ge(4,u.IContextKeyService),ge(5,v.IContextMenuService),ge(6,p.IKeybindingService),ge(7,C.ITelemetryService)],M)}),define(J[834],ee([1,0,7,69,2,677,157,30,13,8]),function(j,e,_,k,L,D,w,b,S,g){"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 n;return(n=i.getLabel())===null||n===void 0?void 0:n.replace(/\\benter\\b/gi,"\\u23CE")}}let s=e.SuggestWidgetStatus=class{constructor(i,n,r,d,h){this._menuId=n,this._menuService=d,this._contextKeyService=h,this._menuDisposables=new L.DisposableStore,this.element=_.append(i,_.$(".suggest-status-bar"));const o=c=>c instanceof b.MenuItemAction?r.createInstance(m,c,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),n=()=>{const r=[],d=[];for(const[h,o]of i.getActions())h==="left"?r.push(...o):d.push(...o);this._leftActions.clear(),this._leftActions.push(r),this._rightActions.clear(),this._rightActions.push(d)};this._menuDisposables.add(i.onDidChange(()=>n())),this._menuDisposables.add(i)}hide(){this._menuDisposables.clear()}};e.SuggestWidgetStatus=s=Te([ge(2,g.IInstantiationService),ge(3,b.IMenuService),ge(4,S.IContextKeyService)],s)}),define(J[835],ee([1,0,7,40,6,2,157,30,13,34,43,73,800,55]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuMenuDelegate=e.ContextMenuService=void 0;let n=e.ContextMenuService=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(h,o,c,a,l,u){super(),this.telemetryService=h,this.notificationService=o,this.contextViewService=c,this.keybindingService=a,this.menuService=l,this.contextKeyService=u,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new L.Emitter),this._onDidHideContextMenu=this._store.add(new L.Emitter)}configure(h){this.contextMenuHandler.configure(h)}showContextMenu(h){h=r.transform(h,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},h),{onHide:o=>{var c;(c=h.onHide)===null||c===void 0||c.call(h,o),this._onDidHideContextMenu.fire()}})),_.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};e.ContextMenuService=n=Te([ge(0,s.ITelemetryService),ge(1,m.INotificationService),ge(2,i.IContextViewService),ge(3,g.IKeybindingService),ge(4,b.IMenuService),ge(5,S.IContextKeyService)],n);var r;(function(d){function h(c){return c&&c.menuId instanceof b.MenuId}function o(c,a,l){if(!h(c))return c;const{menuId:u,menuActionOptions:v,contextKeyService:f}=c;return Object.assign(Object.assign({},c),{getActions:()=>{const p=[];if(u){const C=a.createMenu(u,f??l);(0,w.createAndFillInContextMenuActions)(C,v,p),C.dispose()}return c.getActions?k.Separator.join(c.getActions(),p):p}})}d.transform=o})(r||(e.ContextMenuMenuDelegate=r={}))}),define(J[836],ee([1,0,20,6,13,8,127,186,52,758,100,33,23,745]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let n=e.QuickInputService=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(g.QuickAccessController))),this._quickAccess}constructor(d,h,o,c){super(o),this.instantiationService=d,this.contextKeyService=h,this.layoutService=c,this._onShow=this._register(new k.Emitter),this._onHide=this._register(new k.Emitter),this.contexts=new Map}createController(d=this.layoutService,h){const o={idPrefix:"quickInput_",container:d.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:a=>this.setContextKey(a),linkOpenerDelegate:a=>{this.instantiationService.invokeFunction(l=>{l.get(S.IOpenerService).open(a,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>d.focus(),createList:(a,l,u,v,f)=>this.instantiationService.createInstance(b.WorkbenchList,a,l,u,v,f),hoverDelegate:{showHover(a,l){},delay:200},styles:this.computeStyles()},c=this._register(new i.QuickInputController(Object.assign(Object.assign({},o),h)));return c.layout(d.dimension,d.offset.quickPickTop),this._register(d.onDidLayout(a=>c.layout(a,d.offset.quickPickTop))),this._register(c.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(c.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),c}setContextKey(d){let h;d&&(h=this.contexts.get(d),h||(h=new L.RawContextKey(d,!1).bindTo(this.contextKeyService),this.contexts.set(d,h))),!(h&&h.get())&&(this.resetContextKeys(),h?.set(!0))}resetContextKeys(){this.contexts.forEach(d=>{d.get()&&d.reset()})}pick(d,h={},o=_.CancellationToken.None){return this.controller.pick(d,h,o)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,s.asCssVariable)(s.quickInputBackground),quickInputForeground:(0,s.asCssVariable)(s.quickInputForeground),quickInputTitleBackground:(0,s.asCssVariable)(s.quickInputTitleBackground),widgetBorder:(0,s.asCssVariable)(s.widgetBorder),widgetShadow:(0,s.asCssVariable)(s.widgetShadow)},inputBox:m.defaultInputBoxStyles,toggle:m.defaultToggleStyles,countBadge:m.defaultCountBadgeStyles,button:m.defaultButtonStyles,progressBar:m.defaultProgressBarStyles,keybindingLabel:m.defaultKeybindingLabelStyles,list:(0,m.getListStyles)({listBackground:s.quickInputBackground,listFocusBackground:s.quickInputListFocusBackground,listFocusForeground:s.quickInputListFocusForeground,listInactiveFocusForeground:s.quickInputListFocusForeground,listInactiveSelectionIconForeground:s.quickInputListFocusIconForeground,listInactiveFocusBackground:s.quickInputListFocusBackground,listFocusOutline:s.activeContrastBorder,listInactiveFocusOutline:s.activeContrastBorder}),pickerGroup:{pickerGroupBorder:(0,s.asCssVariable)(s.pickerGroupBorder),pickerGroupForeground:(0,s.asCssVariable)(s.pickerGroupForeground)}}}};e.QuickInputService=n=Te([ge(0,D.IInstantiationService),ge(1,L.IContextKeyService),ge(2,t.IThemeService),ge(3,w.ILayoutService)],n)}),define(J[837],ee([1,0,15,23,20,8,13,325,32,836,94,456]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputService=void 0;let s=class extends g.QuickInputService{constructor(d,h,o,c,a){super(h,o,c,new b.EditorScopedLayoutService(d.getContainerDomNode(),a)),this.host=void 0;const l=i.get(d);if(l){const u=l.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return u.getDomNode()},get dimension(){return d.getLayoutInfo()},get onDidLayout(){return d.onDidLayoutChange},focus:()=>d.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};s=Te([ge(1,D.IInstantiationService),ge(2,w.IContextKeyService),ge(3,k.IThemeService),ge(4,S.ICodeEditorService)],s);let t=e.StandaloneQuickInputService=class{get activeService(){const d=this.codeEditorService.getFocusedCodeEditor();if(!d)throw new Error("Quick input service needs a focused editor to work.");let h=this.mapEditorToService.get(d);if(!h){const o=h=this.instantiationService.createInstance(s,d);this.mapEditorToService.set(d,h),(0,m.once)(d.onDidDispose)(()=>{o.dispose(),this.mapEditorToService.delete(d)})}return h}get quickAccess(){return this.activeService.quickAccess}constructor(d,h){this.instantiationService=d,this.codeEditorService=h,this.mapEditorToService=new Map}pick(d,h={},o=L.CancellationToken.None){return this.activeService.pick(d,h,o)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};e.StandaloneQuickInputService=t=Te([ge(0,D.IInstantiationService),ge(1,S.ICodeEditorService)],t);class i{static get(d){return d.getContribution(i.ID)}constructor(d){this.editor=d,this.widget=new n(this.editor)}dispose(){this.widget.dispose()}}e.QuickInputEditorContribution=i,i.ID="editor.controller.quickInput";class n{constructor(d){this.codeEditor=d,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return n.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}e.QuickInputEditorWidget=n,n.ID="editor.contrib.quickInputWidget",(0,_.registerEditorContribution)(i.ID,i,4)}),define(J[187],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.IUndoRedoService=void 0,e.IUndoRedoService=(0,_.createDecorator)("undoRedoService");class k{constructor(b,S){this.resource=b,this.elements=S}}e.ResourceEditStackSnapshot=k;class L{constructor(){this.id=L._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoGroup=L,L._ID=0,L.None=new L;class D{constructor(){this.id=D._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoSource=D,D._ID=0,D.None=new D}),define(J[38],ee([1,0,16,36,11,6,2,9,21,118,194,12,5,24,169,39,29,46,577,820,316,274,495,496,308,578,175,582,106,187,87]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AttachedViews=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationGlyphMarginOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.createTextBuffer=e.createTextBufferFactoryFromSnapshot=e.createTextBufferFactory=void 0;function O(q){const z=new p.PieceTreeTextBufferBuilder;return z.acceptChunk(q),z.finish()}e.createTextBufferFactory=O;function R(q){const z=new p.PieceTreeTextBufferBuilder;let U;for(;typeof(U=q.read())=="string";)z.acceptChunk(U);return z.finish()}e.createTextBufferFactoryFromSnapshot=R;function M(q,z){let U;return typeof q=="string"?U=O(q):h.isITextSnapshot(q)?U=R(q):U=q,U.create(z)}e.createTextBuffer=M;let N=0;const P=999,x=1e4;class F{constructor(z){this._source=z,this._eos=!1}read(){if(this._eos)return null;const z=[];let U=0,X=0;do{const te=this._source.read();if(te===null)return this._eos=!0,U===0?null:z.join("");if(te.length>0&&(z[U++]=te,X+=te.length),X>=64*1024)return z.join("")}while(!0)}}const B=()=>{throw new Error("Invalid change accessor")};let V=e.TextModel=class Wt extends w.Disposable{static resolveOptions(z,U){if(U.detectIndentation){const X=(0,u.guessIndentation)(z,U.tabSize,U.insertSpaces);return new h.TextModelResolvedOptions({tabSize:X.tabSize,indentSize:"tabSize",insertSpaces:X.insertSpaces,trimAutoWhitespace:U.trimAutoWhitespace,defaultEOL:U.defaultEOL,bracketPairColorizationOptions:U.bracketPairColorizationOptions})}return new h.TextModelResolvedOptions(U)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(z){return this._eventEmitter.slowEvent(U=>z(U.contentChangedEvent))}onDidChangeContentOrInjectedText(z){return(0,w.combinedDisposable)(this._eventEmitter.fastEvent(U=>z(U)),this._onDidChangeInjectedText.event(U=>z(U)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(z,U,X,te=null,G,ae,fe){super(),this._undoRedoService=G,this._languageService=ae,this._languageConfigurationService=fe,this._onWillDispose=this._register(new D.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new ce(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 he),this._languageSelectionListener=this._register(new w.MutableDisposable),this._deltaDecorationCallCnt=0,this._attachedViews=new de,N++,this.id="$model"+N,this.isForSimpleWidget=X.isForSimpleWidget,typeof te>"u"||te===null?this._associatedResource=S.URI.parse("inmemory://model/"+N):this._associatedResource=te,this._attachedEditorCount=0;const{textBuffer:Ce,disposable:Se}=M(z,X.defaultEOL);this._buffer=Ce,this._bufferDisposable=Se,this._options=Wt.resolveOptions(this._buffer,X);const ye=typeof U=="string"?U:U.languageId;typeof U!="string"&&(this._languageSelectionListener.value=U.onDidChange(()=>this._setLanguage(U.languageId))),this._bracketPairs=this._register(new o.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new l.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new c.ColorizedBracketPairsDecorationProvider(this)),this._tokenizationTextModelPart=new y.TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,ye,this._attachedViews);const Ie=this._buffer.getLineCount(),Ee=this._buffer.getValueLengthInRange(new t.Range(1,1,Ie,this._buffer.getLineLength(Ie)+1),0);X.largeFileOptimizations?this._isTooLargeForTokenization=Ee>Wt.LARGE_FILE_SIZE_THRESHOLD||Ie>Wt.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=Ee>Wt._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 ie,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(ye)}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,U){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(U),this._bracketPairs.handleDidChangeContent(U),this._eventEmitter.fire(new E.InternalModelContentChangeEvent(z,U)))}setValue(z){if(this._assertNotDisposed(),z==null)throw(0,L.illegalArgument)();const{textBuffer:U,disposable:X}=M(z,this._options.defaultEOL);this._setValueFromTextBuffer(U,X)}_createContentChanged2(z,U,X,te,G,ae,fe,Ce){return{changes:[{range:z,rangeOffset:U,rangeLength:X,text:te}],eol:this._buffer.getEOL(),isEolChange:Ce,versionId:this.getVersionId(),isUndoing:G,isRedoing:ae,isFlush:fe}}_setValueFromTextBuffer(z,U){this._assertNotDisposed();const X=this.getFullModelRange(),te=this.getValueLengthInRange(X),G=this.getLineCount(),ae=this.getLineMaxColumn(G);this._buffer=z,this._bufferDisposable.dispose(),this._bufferDisposable=U,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new ie,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,G,ae),0,te,this.getValue(),!1,!1,!0,!1))}setEOL(z){this._assertNotDisposed();const U=z===1?`\\r\n`:`\n`;if(this._buffer.getEOL()===U)return;const X=this.getFullModelRange(),te=this.getValueLengthInRange(X),G=this.getLineCount(),ae=this.getLineMaxColumn(G);this._onBeforeEOLChange(),this._buffer.setEOL(U),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new E.ModelRawContentChangedEvent([new E.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new t.Range(1,1,G,ae),0,te,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const z=this.getVersionId(),U=this._decorationsTree.collectNodesPostOrder();for(let X=0,te=U.length;X<te;X++){const G=U[X],ae=G.range,fe=G.cachedAbsoluteStart-G.start,Ce=this._buffer.getOffsetAt(ae.startLineNumber,ae.startColumn),Se=this._buffer.getOffsetAt(ae.endLineNumber,ae.endColumn);G.cachedAbsoluteStart=Ce,G.cachedAbsoluteEnd=Se,G.cachedVersionId=z,G.start=Ce-fe,G.end=Se-fe,(0,v.recomputeMaxEnd)(G)}}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,U=0;const X=this._buffer.getLineCount();for(let te=1;te<=X;te++){const G=this._buffer.getLineLength(te);G>=x?U+=G:z+=G}return U>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 U=typeof z.tabSize<"u"?z.tabSize:this._options.tabSize,X=typeof z.indentSize<"u"?z.indentSize:this._options.originalIndentSize,te=typeof z.insertSpaces<"u"?z.insertSpaces:this._options.insertSpaces,G=typeof z.trimAutoWhitespace<"u"?z.trimAutoWhitespace:this._options.trimAutoWhitespace,ae=typeof z.bracketColorizationOptions<"u"?z.bracketColorizationOptions:this._options.bracketPairColorizationOptions,fe=new h.TextModelResolvedOptions({tabSize:U,indentSize:X,insertSpaces:te,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:G,bracketPairColorizationOptions:ae});if(this._options.equals(fe))return;const Ce=this._options.createChangeEvent(fe);this._options=fe,this._bracketPairs.handleDidChangeOptions(Ce),this._decorationProvider.handleDidChangeOptions(Ce),this._onDidChangeOptions.fire(Ce)}detectIndentation(z,U){this._assertNotDisposed();const X=(0,u.guessIndentation)(this._buffer,U,z);this.updateOptions({insertSpaces:X.insertSpaces,tabSize:X.tabSize,indentSize:X.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 U=this.findMatches(b.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(z,U.map(X=>({range:X.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 U=this._validatePosition(z.lineNumber,z.column,0);return this._buffer.getOffsetAt(U.lineNumber,U.column)}getPositionAt(z){this._assertNotDisposed();const U=Math.min(this._buffer.getLength(),Math.max(0,z));return this._buffer.getPositionAt(U)}_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,U=!1){this._assertNotDisposed();const X=this.getFullModelRange(),te=this.getValueInRange(X,z);return U?this._buffer.getBOM()+te:te}createSnapshot(z=!1){return new F(this._buffer.createSnapshot(z))}getValueLength(z,U=!1){this._assertNotDisposed();const X=this.getFullModelRange(),te=this.getValueLengthInRange(X,z);return U?this._buffer.getBOM().length+te:te}getValueInRange(z,U=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(z),U)}getValueLengthInRange(z,U=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(z),U)}getCharacterCountInRange(z,U=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(z),U)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new L.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineContent(z)}getLineLength(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new L.BugIndicatingError("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 L.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(z)+1}getLineFirstNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new L.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(z)}getLineLastNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new L.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(z)}_validateRangeRelaxedNoAllocations(z){const U=this._buffer.getLineCount(),X=z.startLineNumber,te=z.startColumn;let G=Math.floor(typeof X=="number"&&!isNaN(X)?X:1),ae=Math.floor(typeof te=="number"&&!isNaN(te)?te:1);if(G<1)G=1,ae=1;else if(G>U)G=U,ae=this.getLineMaxColumn(G);else if(ae<=1)ae=1;else{const Ie=this.getLineMaxColumn(G);ae>=Ie&&(ae=Ie)}const fe=z.endLineNumber,Ce=z.endColumn;let Se=Math.floor(typeof fe=="number"&&!isNaN(fe)?fe:1),ye=Math.floor(typeof Ce=="number"&&!isNaN(Ce)?Ce:1);if(Se<1)Se=1,ye=1;else if(Se>U)Se=U,ye=this.getLineMaxColumn(Se);else if(ye<=1)ye=1;else{const Ie=this.getLineMaxColumn(Se);ye>=Ie&&(ye=Ie)}return X===G&&te===ae&&fe===Se&&Ce===ye&&z instanceof t.Range&&!(z instanceof i.Selection)?z:new t.Range(G,ae,Se,ye)}_isValidPosition(z,U,X){if(typeof z!="number"||typeof U!="number"||isNaN(z)||isNaN(U)||z<1||U<1||(z|0)!==z||(U|0)!==U)return!1;const te=this._buffer.getLineCount();if(z>te)return!1;if(U===1)return!0;const G=this.getLineMaxColumn(z);if(U>G)return!1;if(X===1){const ae=this._buffer.getLineCharCode(z,U-2);if(b.isHighSurrogate(ae))return!1}return!0}_validatePosition(z,U,X){const te=Math.floor(typeof z=="number"&&!isNaN(z)?z:1),G=Math.floor(typeof U=="number"&&!isNaN(U)?U:1),ae=this._buffer.getLineCount();if(te<1)return new s.Position(1,1);if(te>ae)return new s.Position(ae,this.getLineMaxColumn(ae));if(G<=1)return new s.Position(te,1);const fe=this.getLineMaxColumn(te);if(G>=fe)return new s.Position(te,fe);if(X===1){const Ce=this._buffer.getLineCharCode(te,G-2);if(b.isHighSurrogate(Ce))return new s.Position(te,G-1)}return new s.Position(te,G)}validatePosition(z){return this._assertNotDisposed(),z instanceof s.Position&&this._isValidPosition(z.lineNumber,z.column,1)?z:this._validatePosition(z.lineNumber,z.column,1)}_isValidRange(z,U){const X=z.startLineNumber,te=z.startColumn,G=z.endLineNumber,ae=z.endColumn;if(!this._isValidPosition(X,te,0)||!this._isValidPosition(G,ae,0))return!1;if(U===1){const fe=te>1?this._buffer.getLineCharCode(X,te-2):0,Ce=ae>1&&ae<=this._buffer.getLineLength(G)?this._buffer.getLineCharCode(G,ae-2):0,Se=b.isHighSurrogate(fe),ye=b.isHighSurrogate(Ce);return!Se&&!ye}return!0}validateRange(z){if(this._assertNotDisposed(),z instanceof t.Range&&!(z instanceof i.Selection)&&this._isValidRange(z,1))return z;const X=this._validatePosition(z.startLineNumber,z.startColumn,0),te=this._validatePosition(z.endLineNumber,z.endColumn,0),G=X.lineNumber,ae=X.column,fe=te.lineNumber,Ce=te.column;{const Se=ae>1?this._buffer.getLineCharCode(G,ae-2):0,ye=Ce>1&&Ce<=this._buffer.getLineLength(fe)?this._buffer.getLineCharCode(fe,Ce-2):0,Ie=b.isHighSurrogate(Se),Ee=b.isHighSurrogate(ye);return!Ie&&!Ee?new t.Range(G,ae,fe,Ce):G===fe&&ae===Ce?new t.Range(G,ae-1,fe,Ce-1):Ie&&Ee?new t.Range(G,ae-1,fe,Ce+1):Ie?new t.Range(G,ae-1,fe,Ce):new t.Range(G,ae,fe,Ce+1)}return new t.Range(G,ae,fe,Ce)}modifyPosition(z,U){this._assertNotDisposed();const X=this.getOffsetAt(z)+U;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,X)))}getFullModelRange(){this._assertNotDisposed();const z=this.getLineCount();return new t.Range(1,1,z,this.getLineMaxColumn(z))}findMatchesLineByLine(z,U,X,te){return this._buffer.findMatchesLineByLine(z,U,X,te)}findMatches(z,U,X,te,G,ae,fe=P){this._assertNotDisposed();let Ce=null;U!==null&&(Array.isArray(U)||(U=[U]),U.every(Ie=>t.Range.isIRange(Ie))&&(Ce=U.map(Ie=>this.validateRange(Ie)))),Ce===null&&(Ce=[this.getFullModelRange()]),Ce=Ce.sort((Ie,Ee)=>Ie.startLineNumber-Ee.startLineNumber||Ie.startColumn-Ee.startColumn);const Se=[];Se.push(Ce.reduce((Ie,Ee)=>t.Range.areIntersecting(Ie,Ee)?Ie.plusRange(Ee):(Se.push(Ie),Ee)));let ye;if(!X&&z.indexOf(`\n`)<0){const Ee=new C.SearchParams(z,X,te,G).parseSearchRequest();if(!Ee)return[];ye=ke=>this.findMatchesLineByLine(ke,Ee,ae,fe)}else ye=Ie=>C.TextModelSearch.findMatches(this,new C.SearchParams(z,X,te,G),Ie,ae,fe);return Se.map(ye).reduce((Ie,Ee)=>Ie.concat(Ee),[])}findNextMatch(z,U,X,te,G,ae){this._assertNotDisposed();const fe=this.validatePosition(U);if(!X&&z.indexOf(`\n`)<0){const Se=new C.SearchParams(z,X,te,G).parseSearchRequest();if(!Se)return null;const ye=this.getLineCount();let Ie=new t.Range(fe.lineNumber,fe.column,ye,this.getLineMaxColumn(ye)),Ee=this.findMatchesLineByLine(Ie,Se,ae,1);return C.TextModelSearch.findNextMatch(this,new C.SearchParams(z,X,te,G),fe,ae),Ee.length>0||(Ie=new t.Range(1,1,fe.lineNumber,this.getLineMaxColumn(fe.lineNumber)),Ee=this.findMatchesLineByLine(Ie,Se,ae,1),Ee.length>0)?Ee[0]:null}return C.TextModelSearch.findNextMatch(this,new C.SearchParams(z,X,te,G),fe,ae)}findPreviousMatch(z,U,X,te,G,ae){this._assertNotDisposed();const fe=this.validatePosition(U);return C.TextModelSearch.findPreviousMatch(this,new C.SearchParams(z,X,te,G),fe,ae)}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 h.ValidAnnotatedEditOperation?z:new h.ValidAnnotatedEditOperation(z.identifier||null,this.validateRange(z.range),z.text,z.forceMoveMarkers||!1,z.isAutoWhitespaceEdit||!1,z._isTracked||!1)}_validateEditOperations(z){const U=[];for(let X=0,te=z.length;X<te;X++)U[X]=this._validateEditOperation(z[X]);return U}pushEditOperations(z,U,X,te){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(z,this._validateEditOperations(U),X,te)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(z,U,X,te){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const G=U.map(fe=>({range:this.validateRange(fe.range),text:fe.text}));let ae=!0;if(z)for(let fe=0,Ce=z.length;fe<Ce;fe++){const Se=z[fe];let ye=!1;for(let Ie=0,Ee=G.length;Ie<Ee;Ie++){const ke=G[Ie].range,Ae=ke.startLineNumber>Se.endLineNumber,Pe=Se.startLineNumber>ke.endLineNumber;if(!Ae&&!Pe){ye=!0;break}}if(!ye){ae=!1;break}}if(ae)for(let fe=0,Ce=this._trimAutoWhitespaceLines.length;fe<Ce;fe++){const Se=this._trimAutoWhitespaceLines[fe],ye=this.getLineMaxColumn(Se);let Ie=!0;for(let Ee=0,ke=G.length;Ee<ke;Ee++){const Ae=G[Ee].range,Pe=G[Ee].text;if(!(Se<Ae.startLineNumber||Se>Ae.endLineNumber)&&!(Se===Ae.startLineNumber&&Ae.startColumn===ye&&Ae.isEmpty()&&Pe&&Pe.length>0&&Pe.charAt(0)===`\n`)&&!(Se===Ae.startLineNumber&&Ae.startColumn===1&&Ae.isEmpty()&&Pe&&Pe.length>0&&Pe.charAt(Pe.length-1)===`\n`)){Ie=!1;break}}if(Ie){const Ee=new t.Range(Se,1,Se,ye);U.push(new h.ValidAnnotatedEditOperation(null,Ee,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(z,U,X,te)}_applyUndo(z,U,X,te){const G=z.map(ae=>{const fe=this.getPositionAt(ae.newPosition),Ce=this.getPositionAt(ae.newEnd);return{range:new t.Range(fe.lineNumber,fe.column,Ce.lineNumber,Ce.column),text:ae.oldText}});this._applyUndoRedoEdits(G,U,!0,!1,X,te)}_applyRedo(z,U,X,te){const G=z.map(ae=>{const fe=this.getPositionAt(ae.oldPosition),Ce=this.getPositionAt(ae.oldEnd);return{range:new t.Range(fe.lineNumber,fe.column,Ce.lineNumber,Ce.column),text:ae.newText}});this._applyUndoRedoEdits(G,U,!1,!0,X,te)}_applyUndoRedoEdits(z,U,X,te,G,ae){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=X,this._isRedoing=te,this.applyEdits(z,!1),this.setEOL(U),this._overwriteAlternativeVersionId(G)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(ae),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(z,U=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const X=this._validateEditOperations(z);return this._doApplyEdits(X,U)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(z,U){const X=this._buffer.getLineCount(),te=this._buffer.applyEdits(z,this._options.trimAutoWhitespace,U),G=this._buffer.getLineCount(),ae=te.changes;if(this._trimAutoWhitespaceLines=te.trimAutoWhitespaceLineNumbers,ae.length!==0){for(let Se=0,ye=ae.length;Se<ye;Se++){const Ie=ae[Se];this._decorationsTree.acceptReplace(Ie.rangeOffset,Ie.rangeLength,Ie.text.length,Ie.forceMoveMarkers)}const fe=[];this._increaseVersionId();let Ce=X;for(let Se=0,ye=ae.length;Se<ye;Se++){const Ie=ae[Se],[Ee]=(0,g.countEOL)(Ie.text);this._onDidChangeDecorations.fire();const ke=Ie.range.startLineNumber,Ae=Ie.range.endLineNumber,Pe=Ae-ke,_e=Ee,me=Math.min(Pe,_e),oe=_e-Pe,pe=G-Ce-oe+ke,Le=pe,ve=pe+_e,be=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new s.Position(Le,1)),this.getOffsetAt(new s.Position(ve,this.getLineMaxColumn(ve))),0),De=E.LineInjectedText.fromDecorations(be),Me=new _.ArrayQueue(De);for(let Oe=me;Oe>=0;Oe--){const xe=ke+Oe,Fe=pe+Oe;Me.takeFromEndWhile(Be=>Be.lineNumber>Fe);const Ue=Me.takeFromEndWhile(Be=>Be.lineNumber===Fe);fe.push(new E.ModelRawLineChanged(xe,this.getLineContent(Fe),Ue))}if(me<Pe){const Oe=ke+me;fe.push(new E.ModelRawLinesDeleted(Oe+1,Ae))}if(me<_e){const Oe=new _.ArrayQueue(De),xe=ke+me,Fe=_e-me,Ue=G-Ce-Fe+xe+1,Be=[],Ke=[];for(let Ye=0;Ye<Fe;Ye++){const He=Ue+Ye;Ke[Ye]=this.getLineContent(He),Oe.takeWhile(Ne=>Ne.lineNumber<He),Be[Ye]=Oe.takeWhile(Ne=>Ne.lineNumber===He)}fe.push(new E.ModelRawLinesInserted(xe+1,ke+_e,Ke,Be))}Ce+=oe}this._emitContentChangedEvent(new E.ModelRawContentChangedEvent(fe,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:ae,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return te.reverseEdits===null?void 0:te.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 X=Array.from(z).map(te=>new E.ModelRawLineChanged(te,this.getLineContent(te),this._getInjectedTextInLine(te)));this._onDidChangeInjectedText.fire(new E.ModelInjectedTextChangedEvent(X))}changeDecorations(z,U=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(U,z)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(z,U){const X={addDecoration:(G,ae)=>this._deltaDecorationsImpl(z,[],[{range:G,options:ae}])[0],changeDecoration:(G,ae)=>{this._changeDecorationImpl(G,ae)},changeDecorationOptions:(G,ae)=>{this._changeDecorationOptionsImpl(G,re(ae))},removeDecoration:G=>{this._deltaDecorationsImpl(z,[G],[])},deltaDecorations:(G,ae)=>G.length===0&&ae.length===0?[]:this._deltaDecorationsImpl(z,G,ae)};let te=null;try{te=U(X)}catch(G){(0,L.onUnexpectedError)(G)}return X.addDecoration=B,X.changeDecoration=B,X.changeDecorationOptions=B,X.removeDecoration=B,X.deltaDecorations=B,te}deltaDecorations(z,U,X=0){if(this._assertNotDisposed(),z||(z=[]),z.length===0&&U.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,L.onUnexpectedError)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(X,z,U)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(z){return this.getDecorationRange(z)}_setTrackedRange(z,U,X){const te=z?this._decorations[z]:null;if(!te)return U?this._deltaDecorationsImpl(0,[],[{range:U,options:Q[X]}],!0)[0]:null;if(!U)return this._decorationsTree.delete(te),delete this._decorations[te.id],null;const G=this._validateRangeRelaxedNoAllocations(U),ae=this._buffer.getOffsetAt(G.startLineNumber,G.startColumn),fe=this._buffer.getOffsetAt(G.endLineNumber,G.endColumn);return this._decorationsTree.delete(te),te.reset(this.getVersionId(),ae,fe,G),te.setOptions(Q[X]),this._decorationsTree.insert(te),te.id}removeAllDecorationsWithOwnerId(z){if(this._isDisposed)return;const U=this._decorationsTree.collectNodesFromOwner(z);for(let X=0,te=U.length;X<te;X++){const G=U[X];this._decorationsTree.delete(G),delete this._decorations[G.id]}}getDecorationOptions(z){const U=this._decorations[z];return U?U.options:null}getDecorationRange(z){const U=this._decorations[z];return U?this._decorationsTree.getNodeRange(this,U):null}getLineDecorations(z,U=0,X=!1){return z<1||z>this.getLineCount()?[]:this.getLinesDecorations(z,z,U,X)}getLinesDecorations(z,U,X=0,te=!1,G=!1){const ae=this.getLineCount(),fe=Math.min(ae,Math.max(1,z)),Ce=Math.min(ae,Math.max(1,U)),Se=this.getLineMaxColumn(Ce),ye=new t.Range(fe,1,Ce,Se),Ie=this._getDecorationsInRange(ye,X,te,G);return(0,_.pushMany)(Ie,this._decorationProvider.getDecorationsInRange(ye,X,te)),Ie}getDecorationsInRange(z,U=0,X=!1,te=!1,G=!1){const ae=this.validateRange(z),fe=this._getDecorationsInRange(ae,U,X,G);return(0,_.pushMany)(fe,this._decorationProvider.getDecorationsInRange(ae,U,X,te)),fe}getOverviewRulerDecorations(z=0,U=!1){return this._decorationsTree.getAll(this,z,U,!0,!1)}getInjectedTextDecorations(z=0){return this._decorationsTree.getAllInjectedText(this,z)}_getInjectedTextInLine(z){const U=this._buffer.getOffsetAt(z,1),X=U+this._buffer.getLineLength(z),te=this._decorationsTree.getInjectedTextInInterval(this,U,X,0);return E.LineInjectedText.fromDecorations(te).filter(G=>G.lineNumber===z)}getAllDecorations(z=0,U=!1){let X=this._decorationsTree.getAll(this,z,U,!1,!1);return X=X.concat(this._decorationProvider.getAllDecorations(z,U)),X}getAllMarginDecorations(z=0){return this._decorationsTree.getAll(this,z,!1,!1,!0)}_getDecorationsInRange(z,U,X,te){const G=this._buffer.getOffsetAt(z.startLineNumber,z.startColumn),ae=this._buffer.getOffsetAt(z.endLineNumber,z.endColumn);return this._decorationsTree.getAllInInterval(this,G,ae,U,X,te)}getRangeAt(z,U){return this._buffer.getRangeAt(z,U-z)}_changeDecorationImpl(z,U){const X=this._decorations[z];if(!X)return;if(X.options.after){const fe=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(fe.endLineNumber)}if(X.options.before){const fe=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(fe.startLineNumber)}const te=this._validateRangeRelaxedNoAllocations(U),G=this._buffer.getOffsetAt(te.startLineNumber,te.startColumn),ae=this._buffer.getOffsetAt(te.endLineNumber,te.endColumn);this._decorationsTree.delete(X),X.reset(this.getVersionId(),G,ae,te),this._decorationsTree.insert(X),this._onDidChangeDecorations.checkAffectedAndFire(X.options),X.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(te.endLineNumber),X.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(te.startLineNumber)}_changeDecorationOptionsImpl(z,U){const X=this._decorations[z];if(!X)return;const te=!!(X.options.overviewRuler&&X.options.overviewRuler.color),G=!!(U.overviewRuler&&U.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(X.options),this._onDidChangeDecorations.checkAffectedAndFire(U),X.options.after||U.after){const ae=this._decorationsTree.getNodeRange(this,X);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ae.endLineNumber)}if(X.options.before||U.before){const ae=this._decorationsTree.getNodeRange(this,X);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ae.startLineNumber)}te!==G?(this._decorationsTree.delete(X),X.setOptions(U),this._decorationsTree.insert(X)):X.setOptions(U)}_deltaDecorationsImpl(z,U,X,te=!1){const G=this.getVersionId(),ae=U.length;let fe=0;const Ce=X.length;let Se=0;this._onDidChangeDecorations.beginDeferredEmit();try{const ye=new Array(Ce);for(;fe<ae||Se<Ce;){let Ie=null;if(fe<ae){do Ie=this._decorations[U[fe++]];while(!Ie&&fe<ae);if(Ie){if(Ie.options.after){const Ee=this._decorationsTree.getNodeRange(this,Ie);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ee.endLineNumber)}if(Ie.options.before){const Ee=this._decorationsTree.getNodeRange(this,Ie);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ee.startLineNumber)}this._decorationsTree.delete(Ie),te||this._onDidChangeDecorations.checkAffectedAndFire(Ie.options)}}if(Se<Ce){if(!Ie){const me=++this._lastDecorationId,oe=`${this._instanceId};${me}`;Ie=new v.IntervalNode(oe,0,0),this._decorations[oe]=Ie}const Ee=X[Se],ke=this._validateRangeRelaxedNoAllocations(Ee.range),Ae=re(Ee.options),Pe=this._buffer.getOffsetAt(ke.startLineNumber,ke.startColumn),_e=this._buffer.getOffsetAt(ke.endLineNumber,ke.endColumn);Ie.ownerId=z,Ie.reset(G,Pe,_e,ke),Ie.setOptions(Ae),Ie.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ke.endLineNumber),Ie.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ke.startLineNumber),te||this._onDidChangeDecorations.checkAffectedAndFire(Ae),this._decorationsTree.insert(Ie),ye[Se]=Ie.id,Se++}else Ie&&delete this._decorations[Ie.id]}return ye}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setLanguage(z,U){typeof z=="string"?(this._languageSelectionListener.clear(),this._setLanguage(z,U)):(this._languageSelectionListener.value=z.onDidChange(()=>this._setLanguage(z.languageId,U)),this._setLanguage(z.languageId,U))}_setLanguage(z,U){this.tokenization.setLanguageId(z,U),this._languageService.requestRichLanguageFeatures(z)}getLanguageIdAtPosition(z,U){return this.tokenization.getLanguageIdAtPosition(z,U)}getWordAtPosition(z){return this._tokenizationTextModelPart.getWordAtPosition(z)}getWordUntilPosition(z){return this._tokenizationTextModelPart.getWordUntilPosition(z)}normalizePosition(z,U){return z}getLineIndentColumn(z){return K(this.getLineContent(z))+1}};V._MODEL_SYNC_LIMIT=50*1024*1024,V.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,V.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,V.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:n.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:n.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:n.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:n.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:n.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:n.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},e.TextModel=V=Te([ge(4,I.IUndoRedoService),ge(5,r.ILanguageService),ge(6,d.ILanguageConfigurationService)],V);function K(q){let z=0;for(const U of q)if(U===" "||U==="\t")z++;else break;return z}function A(q){return!!(q.options.overviewRuler&&q.options.overviewRuler.color)}function Y(q){return!!q.options.after||!!q.options.before}class ie{constructor(){this._decorationsTree0=new v.IntervalTree,this._decorationsTree1=new v.IntervalTree,this._injectedTextDecorationsTree=new v.IntervalTree}ensureAllNodesHaveRanges(z){this.getAll(z,0,!1,!1,!1)}_ensureNodesHaveRanges(z,U){for(const X of U)X.range===null&&(X.range=z.getRangeAt(X.cachedAbsoluteStart,X.cachedAbsoluteEnd));return U}getAllInInterval(z,U,X,te,G,ae){const fe=z.getVersionId(),Ce=this._intervalSearch(U,X,te,G,fe,ae);return this._ensureNodesHaveRanges(z,Ce)}_intervalSearch(z,U,X,te,G,ae){const fe=this._decorationsTree0.intervalSearch(z,U,X,te,G,ae),Ce=this._decorationsTree1.intervalSearch(z,U,X,te,G,ae),Se=this._injectedTextDecorationsTree.intervalSearch(z,U,X,te,G,ae);return fe.concat(Ce).concat(Se)}getInjectedTextInInterval(z,U,X,te){const G=z.getVersionId(),ae=this._injectedTextDecorationsTree.intervalSearch(U,X,te,!1,G,!1);return this._ensureNodesHaveRanges(z,ae).filter(fe=>fe.options.showIfCollapsed||!fe.range.isEmpty())}getAllInjectedText(z,U){const X=z.getVersionId(),te=this._injectedTextDecorationsTree.search(U,!1,X,!1);return this._ensureNodesHaveRanges(z,te).filter(G=>G.options.showIfCollapsed||!G.range.isEmpty())}getAll(z,U,X,te,G){const ae=z.getVersionId(),fe=this._search(U,X,te,ae,G);return this._ensureNodesHaveRanges(z,fe)}_search(z,U,X,te,G){if(X)return this._decorationsTree1.search(z,U,te,G);{const ae=this._decorationsTree0.search(z,U,te,G),fe=this._decorationsTree1.search(z,U,te,G),Ce=this._injectedTextDecorationsTree.search(z,U,te,G);return ae.concat(fe).concat(Ce)}}collectNodesFromOwner(z){const U=this._decorationsTree0.collectNodesFromOwner(z),X=this._decorationsTree1.collectNodesFromOwner(z),te=this._injectedTextDecorationsTree.collectNodesFromOwner(z);return U.concat(X).concat(te)}collectNodesPostOrder(){const z=this._decorationsTree0.collectNodesPostOrder(),U=this._decorationsTree1.collectNodesPostOrder(),X=this._injectedTextDecorationsTree.collectNodesPostOrder();return z.concat(U).concat(X)}insert(z){Y(z)?this._injectedTextDecorationsTree.insert(z):A(z)?this._decorationsTree1.insert(z):this._decorationsTree0.insert(z)}delete(z){Y(z)?this._injectedTextDecorationsTree.delete(z):A(z)?this._decorationsTree1.delete(z):this._decorationsTree0.delete(z)}getNodeRange(z,U){const X=z.getVersionId();return U.cachedVersionId!==X&&this._resolveNode(U,X),U.range===null&&(U.range=z.getRangeAt(U.cachedAbsoluteStart,U.cachedAbsoluteEnd)),U.range}_resolveNode(z,U){Y(z)?this._injectedTextDecorationsTree.resolveNode(z,U):A(z)?this._decorationsTree1.resolveNode(z,U):this._decorationsTree0.resolveNode(z,U)}acceptReplace(z,U,X,te){this._decorationsTree0.acceptReplace(z,U,X,te),this._decorationsTree1.acceptReplace(z,U,X,te),this._injectedTextDecorationsTree.acceptReplace(z,U,X,te)}}function le(q){return q.replace(/[^a-z0-9\\-_]/gi," ")}class ne{constructor(z){this.color=z.color||"",this.darkColor=z.darkColor||""}}class se extends ne{constructor(z){super(z),this._resolvedColor=null,this.position=typeof z.position=="number"?z.position:h.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,U){if(typeof z=="string")return z;const X=z?U.getColor(z.id):null;return X?X.toString():""}}e.ModelDecorationOverviewRulerOptions=se;class H{constructor(z){var U;this.position=(U=z?.position)!==null&&U!==void 0?U:h.GlyphMarginLane.Left}}e.ModelDecorationGlyphMarginOptions=H;class W extends ne{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,U){return typeof z=="string"?k.Color.fromHex(z):U.getColor(z.id)}}e.ModelDecorationMinimapOptions=W;class ${static from(z){return z instanceof $?z:new $(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=$;class Z{static register(z){return new Z(z)}static createDynamic(z){return new Z(z)}constructor(z){var U,X,te,G,ae;this.description=z.description,this.blockClassName=z.blockClassName?le(z.blockClassName):null,this.blockDoesNotCollapse=(U=z.blockDoesNotCollapse)!==null&&U!==void 0?U:null,this.blockIsAfterEnd=(X=z.blockIsAfterEnd)!==null&&X!==void 0?X:null,this.blockPadding=(te=z.blockPadding)!==null&&te!==void 0?te: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 se(z.overviewRuler):null,this.minimap=z.minimap?new W(z.minimap):null,this.glyphMargin=z.glyphMarginClassName?new H(z.glyphMargin):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?$.from(z.after):null,this.before=z.before?$.from(z.before):null,this.hideInCommentTokens=(G=z.hideInCommentTokens)!==null&&G!==void 0?G:!1,this.hideInStringTokens=(ae=z.hideInStringTokens)!==null&&ae!==void 0?ae:!1}}e.ModelDecorationOptions=Z,Z.EMPTY=Z.register({description:"empty"});const Q=[Z.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Z.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Z.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Z.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function re(q){return q instanceof Z?q:Z.createDynamic(q)}class ce 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,this._affectsGlyphMargin=!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._affectsGlyphMargin||(this._affectsGlyphMargin=!!z.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!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,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(z)}}class he 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 U=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(U),this._slowEmitter.fire(U)}}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 de{constructor(){this._onDidChangeVisibleRanges=new D.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const z=new ue(U=>{this._onDidChangeVisibleRanges.fire({view:z,state:U})});return this._views.add(z),z}detachView(z){this._views.delete(z),this._onDidChangeVisibleRanges.fire({view:z,state:void 0})}}e.AttachedViews=de;class ue{constructor(z){this.handleStateChange=z}setVisibleLines(z,U){const X=z.map(te=>new T.LineRange(te.startLineNumber,te.endLineNumber+1));this.handleStateChange({visibleLineRanges:X,stabilized:U})}}}),define(J[838],ee([1,0,6,2,17,38,169,72,39,180,28,187,137,316,51,45,29]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelService=void 0;function h(v){return v.toString()}function o(v){const f=new t.StringSHA1,p=v.createSnapshot();let C;for(;C=p.read();)f.update(C);return f.digest()}class c{constructor(f,p,C){this.model=f,this._modelEventListeners=new k.DisposableStore,this.model=f,this._modelEventListeners.add(f.onWillDispose(()=>p(f))),this._modelEventListeners.add(f.onDidChangeLanguage(y=>C(f,y)))}dispose(){this._modelEventListeners.dispose()}}const a=L.isLinux||L.isMacintosh?1:2;class l{constructor(f,p,C,y,E,I,T,O){this.uri=f,this.initialUndoRedoSnapshot=p,this.time=C,this.sharesUndoRedoStack=y,this.heapSize=E,this.sha1=I,this.versionId=T,this.alternativeVersionId=O}}let u=e.ModelService=class zt extends k.Disposable{constructor(f,p,C,y,E){super(),this._configurationService=f,this._resourcePropertiesService=p,this._undoRedoService=C,this._languageService=y,this._languageConfigurationService=E,this._onModelAdded=this._register(new _.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new _.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new _.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,p){var C;let y=w.EDITOR_MODEL_DEFAULTS.tabSize;if(f.editor&&typeof f.editor.tabSize<"u"){const x=parseInt(f.editor.tabSize,10);isNaN(x)||(y=x),y<1&&(y=1)}let E="tabSize";if(f.editor&&typeof f.editor.indentSize<"u"&&f.editor.indentSize!=="tabSize"){const x=parseInt(f.editor.indentSize,10);isNaN(x)||(E=Math.max(x,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 O=f.eol;O===`\\r\n`?T=2:O===`\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 P=w.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return!((C=f.editor)===null||C===void 0)&&C.bracketPairColorization&&typeof f.editor.bracketPairColorization=="object"&&(P={enabled:!!f.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!f.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:p,tabSize:y,indentSize:E,insertSpaces:I,detectIndentation:M,defaultEOL:T,trimAutoWhitespace:R,largeFileOptimizations:N,bracketPairColorizationOptions:P}}_getEOL(f,p){if(f)return this._resourcePropertiesService.getEOL(f,p);const C=this._configurationService.getValue("files.eol",{overrideIdentifier:p});return C&&typeof C=="string"&&C!=="auto"?C:L.OS===3||L.OS===2?`\n`:`\\r\n`}_shouldRestoreUndoStack(){const f=this._configurationService.getValue("files.restoreUndoStack");return typeof f=="boolean"?f:!0}getCreationOptions(f,p,C){const y=typeof f=="string"?f:f.languageId;let E=this._modelCreationOptionsByLanguageAndResource[y+p];if(!E){const I=this._configurationService.getValue("editor",{overrideIdentifier:y,resource:p}),T=this._getEOL(p,y);E=zt._readModelOptions({editor:I,eol:T},C),this._modelCreationOptionsByLanguageAndResource[y+p]=E}return E}_updateModelOptions(f){const p=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const C=Object.keys(this._models);for(let y=0,E=C.length;y<E;y++){const I=C[y],T=this._models[I],O=T.model.getLanguageId(),R=T.model.uri;if(f&&!f.affectsConfiguration("editor",{overrideIdentifier:O,resource:R})&&!f.affectsConfiguration("files.eol",{overrideIdentifier:O,resource:R}))continue;const M=p[O+R],N=this.getCreationOptions(O,R,T.model.isForSimpleWidget);zt._setModelOptionsForModel(T.model,N,M)}}static _setModelOptionsForModel(f,p,C){C&&C.defaultEOL!==p.defaultEOL&&f.getLineCount()===1&&f.setEOL(p.defaultEOL===1?0:1),!(C&&C.detectIndentation===p.detectIndentation&&C.insertSpaces===p.insertSpaces&&C.tabSize===p.tabSize&&C.indentSize===p.indentSize&&C.trimAutoWhitespace===p.trimAutoWhitespace&&(0,r.equals)(C.bracketPairColorizationOptions,p.bracketPairColorizationOptions))&&(p.detectIndentation?(f.detectIndentation(p.insertSpaces,p.tabSize),f.updateOptions({trimAutoWhitespace:p.trimAutoWhitespace,bracketColorizationOptions:p.bracketPairColorizationOptions})):f.updateOptions({insertSpaces:p.insertSpaces,tabSize:p.tabSize,indentSize:p.indentSize,trimAutoWhitespace:p.trimAutoWhitespace,bracketColorizationOptions:p.bracketPairColorizationOptions}))}_insertDisposedModel(f){this._disposedModels.set(h(f.uri),f),this._disposedModelsHeapSize+=f.heapSize}_removeDisposedModel(f){const p=this._disposedModels.get(h(f));return p&&(this._disposedModelsHeapSize-=p.heapSize),this._disposedModels.delete(h(f)),p}_ensureDisposedModelsHeapSize(f){if(this._disposedModelsHeapSize>f){const p=[];for(this._disposedModels.forEach(C=>{C.sharesUndoRedoStack||p.push(C)}),p.sort((C,y)=>C.time-y.time);p.length>0&&this._disposedModelsHeapSize>f;){const C=p.shift();this._removeDisposedModel(C.uri),C.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(C.initialUndoRedoSnapshot)}}}_createModelData(f,p,C,y){const E=this.getCreationOptions(p,C,y),I=new D.TextModel(f,p,E,C,this._undoRedoService,this._languageService,this._languageConfigurationService);if(C&&this._disposedModels.has(h(C))){const R=this._removeDisposedModel(C),M=this._undoRedoService.getElements(C),N=o(I)===R.sha1;if(N||R.sharesUndoRedoStack){for(const P of M.past)(0,i.isEditStackElement)(P)&&P.matchesResource(C)&&P.setModel(I);for(const P of M.future)(0,i.isEditStackElement)(P)&&P.matchesResource(C)&&P.setModel(I);this._undoRedoService.setElementsValidFlag(C,!0,P=>(0,i.isEditStackElement)(P)&&P.matchesResource(C)),N&&(I._overwriteVersionId(R.versionId),I._overwriteAlternativeVersionId(R.alternativeVersionId),I._overwriteInitialUndoRedoSnapshot(R.initialUndoRedoSnapshot))}else R.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(R.initialUndoRedoSnapshot)}const T=h(I.uri);if(this._models[T])throw new Error("ModelService: Cannot add model because it already exists!");const O=new c(I,R=>this._onWillDispose(R),(R,M)=>this._onDidChangeLanguage(R,M));return this._models[T]=O,O}createModel(f,p,C,y=!1){let E;return p?E=this._createModelData(f,p,C,y):E=this._createModelData(f,b.PLAINTEXT_LANGUAGE_ID,C,y),this._onModelAdded.fire(E.model),E.model}getModels(){const f=[],p=Object.keys(this._models);for(let C=0,y=p.length;C<y;C++){const E=p[C];f.push(this._models[E].model)}return f}getModel(f){const p=h(f),C=this._models[p];return C?C.model:null}_schemaShouldMaintainUndoRedoElements(f){return f.scheme===n.Schemas.file||f.scheme===n.Schemas.vscodeRemote||f.scheme===n.Schemas.vscodeUserData||f.scheme===n.Schemas.vscodeNotebookCell||f.scheme==="fake-fs"}_onWillDispose(f){const p=h(f.uri),C=this._models[p],y=this._undoRedoService.getUriComparisonKey(f.uri)!==f.uri.toString();let E=!1,I=0;if(y||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(f.uri)){const O=this._undoRedoService.getElements(f.uri);if(O.past.length>0||O.future.length>0){for(const R of O.past)(0,i.isEditStackElement)(R)&&R.matchesResource(f.uri)&&(E=!0,I+=R.heapSize(f.uri),R.setModel(f.uri));for(const R of O.future)(0,i.isEditStackElement)(R)&&R.matchesResource(f.uri)&&(E=!0,I+=R.heapSize(f.uri),R.setModel(f.uri))}}const T=zt.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(E)if(!y&&I>T){const O=C.model.getInitialUndoRedoSnapshot();O!==null&&this._undoRedoService.restoreSnapshot(O)}else this._ensureDisposedModelsHeapSize(T-I),this._undoRedoService.setElementsValidFlag(f.uri,!1,O=>(0,i.isEditStackElement)(O)&&O.matchesResource(f.uri)),this._insertDisposedModel(new l(f.uri,C.model.getInitialUndoRedoSnapshot(),Date.now(),y,I,o(f),f.getVersionId(),f.getAlternativeVersionId()));else if(!y){const O=C.model.getInitialUndoRedoSnapshot();O!==null&&this._undoRedoService.restoreSnapshot(O)}delete this._models[p],C.dispose(),delete this._modelCreationOptionsByLanguageAndResource[f.getLanguageId()+f.uri],this._onModelRemoved.fire(f)}_onDidChangeLanguage(f,p){const C=p.oldLanguage,y=f.getLanguageId(),E=this.getCreationOptions(C,f.uri,f.isForSimpleWidget),I=this.getCreationOptions(y,f.uri,f.isForSimpleWidget);zt._setModelOptionsForModel(f,I,E),this._onModelModeChanged.fire({model:f,oldLanguageId:C})}};u.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,e.ModelService=u=Te([ge(0,m.IConfigurationService),ge(1,g.ITextResourcePropertiesService),ge(2,s.IUndoRedoService),ge(3,S.ILanguageService),ge(4,d.ILanguageConfigurationService)],u)}),define(J[839],ee([1,0,16,12,5,202,38,106,204,516,268,83]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class t{constructor(a,l,u,v,f,p,C,y,E,I){this._editorId=a,this.model=l,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=u,this._monospaceLineBreaksComputerFactory=v,this.fontInfo=f,this.tabSize=p,this.wrappingStrategy=C,this.wrappingColumn=y,this.wrappingIndent=E,this.wordBreak=I,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new d(this)}_constructLines(a,l){this.modelLineProjections=[],a&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const u=this.model.getLinesContent(),v=this.model.getInjectedTextDecorations(this._editorId),f=u.length,p=this.createLineBreaksComputer(),C=new _.ArrayQueue(b.LineInjectedText.fromDecorations(v));for(let N=0;N<f;N++){const P=C.takeWhile(x=>x.lineNumber===N+1);p.addRequest(u[N],P,l?l[N]:null)}const y=p.finalize(),E=[],I=this.hiddenAreasDecorationIds.map(N=>this.model.getDecorationRange(N)).sort(L.Range.compareRangesUsingStarts);let T=1,O=0,R=-1,M=R+1<I.length?O+1:f+2;for(let N=0;N<f;N++){const P=N+1;P===M&&(R++,T=I[R].startLineNumber,O=I[R].endLineNumber,M=R+1<I.length?O+1:f+2);const x=P>=T&&P<=O,F=(0,g.createModelLineProjection)(y[N],!x);E[N]=F.getViewLineCount(),this.modelLineProjections[N]=F}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new m.ConstantTimePrefixSumComputer(E)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(a=>this.model.getDecorationRange(a))}setHiddenAreas(a){const l=a.map(O=>this.model.validateRange(O)),u=i(l),v=this.hiddenAreasDecorationIds.map(O=>this.model.getDecorationRange(O)).sort(L.Range.compareRangesUsingStarts);if(u.length===v.length){let O=!1;for(let R=0;R<u.length;R++)if(!u[R].equalsRange(v[R])){O=!0;break}if(!O)return!1}const f=u.map(O=>({range:O,options:w.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,f);const p=u;let C=1,y=0,E=-1,I=E+1<p.length?y+1:this.modelLineProjections.length+2,T=!1;for(let O=0;O<this.modelLineProjections.length;O++){const R=O+1;R===I&&(E++,C=p[E].startLineNumber,y=p[E].endLineNumber,I=E+1<p.length?y+1:this.modelLineProjections.length+2);let M=!1;if(R>=C&&R<=y?this.modelLineProjections[O].isVisible()&&(this.modelLineProjections[O]=this.modelLineProjections[O].setVisible(!1),M=!0):(T=!0,this.modelLineProjections[O].isVisible()||(this.modelLineProjections[O]=this.modelLineProjections[O].setVisible(!0),M=!0)),M){const N=this.modelLineProjections[O].getViewLineCount();this.projectedModelLineLineCounts.setValue(O,N)}}return T||this.setHiddenAreas([]),!0}modelPositionIsVisible(a,l){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,l,u,v,f){const p=this.fontInfo.equals(a),C=this.wrappingStrategy===l,y=this.wrappingColumn===u,E=this.wrappingIndent===v,I=this.wordBreak===f;if(p&&C&&y&&E&&I)return!1;const T=p&&C&&!y&&E&&I;this.fontInfo=a,this.wrappingStrategy=l,this.wrappingColumn=u,this.wrappingIndent=v,this.wordBreak=f;let O=null;if(T){O=[];for(let R=0,M=this.modelLineProjections.length;R<M;R++)O[R]=this.modelLineProjections[R].getProjectionData()}return this._constructLines(!1,O),!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,l,u){if(!a||a<=this._validModelVersionId)return null;const v=l===1?1:this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,f=this.projectedModelLineLineCounts.getPrefixSum(u);return this.modelLineProjections.splice(l-1,u-l+1),this.projectedModelLineLineCounts.removeValues(l-1,u-l+1),new S.ViewLinesDeletedEvent(v,f)}onModelLinesInserted(a,l,u,v){if(!a||a<=this._validModelVersionId)return null;const f=l>2&&!this.modelLineProjections[l-2].isVisible(),p=l===1?1:this.projectedModelLineLineCounts.getPrefixSum(l-1)+1;let C=0;const y=[],E=[];for(let I=0,T=v.length;I<T;I++){const O=(0,g.createModelLineProjection)(v[I],!f);y.push(O);const R=O.getViewLineCount();C+=R,E[I]=R}return this.modelLineProjections=this.modelLineProjections.slice(0,l-1).concat(y).concat(this.modelLineProjections.slice(l-1)),this.projectedModelLineLineCounts.insertValues(l-1,E),new S.ViewLinesInsertedEvent(p,p+C-1)}onModelLineChanged(a,l,u){if(a!==null&&a<=this._validModelVersionId)return[!1,null,null,null];const v=l-1,f=this.modelLineProjections[v].getViewLineCount(),p=this.modelLineProjections[v].isVisible(),C=(0,g.createModelLineProjection)(u,p);this.modelLineProjections[v]=C;const y=this.modelLineProjections[v].getViewLineCount();let E=!1,I=0,T=-1,O=0,R=-1,M=0,N=-1;f>y?(I=this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,T=I+y-1,M=T+1,N=M+(f-y)-1,E=!0):f<y?(I=this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,T=I+f-1,O=T+1,R=O+(y-f)-1,E=!0):(I=this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,T=I+y-1),this.projectedModelLineLineCounts.setValue(v,y);const P=I<=T?new S.ViewLinesChangedEvent(I,T-I+1):null,x=O<=R?new S.ViewLinesInsertedEvent(O,R):null,F=M<=N?new S.ViewLinesDeletedEvent(M,N):null;return[E,P,x,F]}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 l=this.getViewLineCount();return a>l?l:a|0}getActiveIndentGuide(a,l,u){a=this._toValidViewLineNumber(a),l=this._toValidViewLineNumber(l),u=this._toValidViewLineNumber(u);const v=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),f=this.convertViewPositionToModelPosition(l,this.getViewLineMinColumn(l)),p=this.convertViewPositionToModelPosition(u,this.getViewLineMinColumn(u)),C=this.model.guides.getActiveIndentGuide(v.lineNumber,f.lineNumber,p.lineNumber),y=this.convertModelPositionToViewPosition(C.startLineNumber,1),E=this.convertModelPositionToViewPosition(C.endLineNumber,this.model.getLineMaxColumn(C.endLineNumber));return{startLineNumber:y.lineNumber,endLineNumber:E.lineNumber,indent:C.indent}}getViewLineInfo(a){a=this._toValidViewLineNumber(a);const l=this.projectedModelLineLineCounts.getIndexOf(a-1),u=l.index,v=l.remainder;return new n(u+1,v)}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 l=this.modelLineProjections[a.modelLineNumber-1],u=l.getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx),v=l.getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,u);return new k.Position(a.modelLineNumber,v)}getModelEndPositionOfViewLine(a){const l=this.modelLineProjections[a.modelLineNumber-1],u=l.getViewLineMaxColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx),v=l.getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,u);return new k.Position(a.modelLineNumber,v)}getViewLineInfosGroupedByModelRanges(a,l){const u=this.getViewLineInfo(a),v=this.getViewLineInfo(l),f=new Array;let p=this.getModelStartPositionOfViewLine(u),C=new Array;for(let y=u.modelLineNumber;y<=v.modelLineNumber;y++){const E=this.modelLineProjections[y-1];if(E.isVisible()){const I=y===u.modelLineNumber?u.modelLineWrappedLineIdx:0,T=y===v.modelLineNumber?v.modelLineWrappedLineIdx+1:E.getViewLineCount();for(let O=I;O<T;O++)C.push(new n(y,O))}if(!E.isVisible()&&p){const I=new k.Position(y-1,this.model.getLineMaxColumn(y-1)+1),T=L.Range.fromPositions(p,I);f.push(new r(T,C)),C=[],p=null}else E.isVisible()&&!p&&(p=new k.Position(y,1))}if(p){const y=L.Range.fromPositions(p,this.getModelEndPositionOfViewLine(v));f.push(new r(y,C))}return f}getViewLinesBracketGuides(a,l,u,v){const f=u?this.convertViewPositionToModelPosition(u.lineNumber,u.column):null,p=[];for(const C of this.getViewLineInfosGroupedByModelRanges(a,l)){const y=C.modelRange.startLineNumber,E=this.model.guides.getLinesBracketGuides(y,C.modelRange.endLineNumber,f,v);for(const I of C.viewLines){const O=E[I.modelLineNumber-y].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 x=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.column);if(x.lineNumber===I.modelLineWrappedLineIdx)M=x.column;else if(x.lineNumber<I.modelLineWrappedLineIdx)M=this.getMinColumnOfViewLine(I);else if(x.lineNumber>I.modelLineWrappedLineIdx)return}const N=this.convertModelPositionToViewPosition(I.modelLineNumber,R.horizontalLine.endColumn),P=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,R.horizontalLine.endColumn);return P.lineNumber===I.modelLineWrappedLineIdx?new D.IndentGuide(R.visibleColumn,M,R.className,new D.IndentGuideHorizontalLine(R.horizontalLine.top,N.column),-1,-1):P.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)});p.push(O.filter(R=>!!R))}}return p}getViewLinesIndentGuides(a,l){a=this._toValidViewLineNumber(a),l=this._toValidViewLineNumber(l);const u=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),v=this.convertViewPositionToModelPosition(l,this.getViewLineMaxColumn(l));let f=[];const p=[],C=[],y=u.lineNumber-1,E=v.lineNumber-1;let I=null;for(let M=y;M<=E;M++){const N=this.modelLineProjections[M];if(N.isVisible()){const P=N.getViewLineNumberOfModelPosition(0,M===y?u.column:1),x=N.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(M+1)),F=x-P+1;let B=0;F>1&&N.getViewLineMinColumn(this.model,M+1,x)===1&&(B=P===0?1:2),p.push(F),C.push(B),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,v.lineNumber)),I=null);const T=l-a+1,O=new Array(T);let R=0;for(let M=0,N=f.length;M<N;M++){let P=f[M];const x=Math.min(T-R,p[M]),F=C[M];let B;F===2?B=0:F===1?B=1:B=x;for(let V=0;V<x;V++)V===B&&(P=0),O[R++]=P}return O}getViewLineContent(a){const l=this.getViewLineInfo(a);return this.modelLineProjections[l.modelLineNumber-1].getViewLineContent(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLineLength(a){const l=this.getViewLineInfo(a);return this.modelLineProjections[l.modelLineNumber-1].getViewLineLength(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLineMinColumn(a){const l=this.getViewLineInfo(a);return this.modelLineProjections[l.modelLineNumber-1].getViewLineMinColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLineMaxColumn(a){const l=this.getViewLineInfo(a);return this.modelLineProjections[l.modelLineNumber-1].getViewLineMaxColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLineData(a){const l=this.getViewLineInfo(a);return this.modelLineProjections[l.modelLineNumber-1].getViewLineData(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLinesData(a,l,u){a=this._toValidViewLineNumber(a),l=this._toValidViewLineNumber(l);const v=this.projectedModelLineLineCounts.getIndexOf(a-1);let f=a;const p=v.index,C=v.remainder,y=[];for(let E=p,I=this.model.getLineCount();E<I;E++){const T=this.modelLineProjections[E];if(!T.isVisible())continue;const O=E===p?C:0;let R=T.getViewLineCount()-O,M=!1;if(f+R>l&&(M=!0,R=l-f+1),T.getViewLinesData(this.model,E+1,O,R,f-a,u,y),f+=R,M)break}return y}validateViewPosition(a,l,u){a=this._toValidViewLineNumber(a);const v=this.projectedModelLineLineCounts.getIndexOf(a-1),f=v.index,p=v.remainder,C=this.modelLineProjections[f],y=C.getViewLineMinColumn(this.model,f+1,p),E=C.getViewLineMaxColumn(this.model,f+1,p);l<y&&(l=y),l>E&&(l=E);const I=C.getModelColumnOfViewPosition(p,l);return this.model.validatePosition(new k.Position(f+1,I)).equals(u)?new k.Position(a,l):this.convertModelPositionToViewPosition(u.lineNumber,u.column)}validateViewRange(a,l){const u=this.validateViewPosition(a.startLineNumber,a.startColumn,l.getStartPosition()),v=this.validateViewPosition(a.endLineNumber,a.endColumn,l.getEndPosition());return new L.Range(u.lineNumber,u.column,v.lineNumber,v.column)}convertViewPositionToModelPosition(a,l){const u=this.getViewLineInfo(a),v=this.modelLineProjections[u.modelLineNumber-1].getModelColumnOfViewPosition(u.modelLineWrappedLineIdx,l);return this.model.validatePosition(new k.Position(u.modelLineNumber,v))}convertViewRangeToModelRange(a){const l=this.convertViewPositionToModelPosition(a.startLineNumber,a.startColumn),u=this.convertViewPositionToModelPosition(a.endLineNumber,a.endColumn);return new L.Range(l.lineNumber,l.column,u.lineNumber,u.column)}convertModelPositionToViewPosition(a,l,u=2){const v=this.model.validatePosition(new k.Position(a,l)),f=v.lineNumber,p=v.column;let C=f-1,y=!1;for(;C>0&&!this.modelLineProjections[C].isVisible();)C--,y=!0;if(C===0&&!this.modelLineProjections[C].isVisible())return new k.Position(1,1);const E=1+this.projectedModelLineLineCounts.getPrefixSum(C);let I;return y?I=this.modelLineProjections[C].getViewPositionOfModelPosition(E,this.model.getLineMaxColumn(C+1),u):I=this.modelLineProjections[f-1].getViewPositionOfModelPosition(E,p,u),I}convertModelRangeToViewRange(a,l=0){if(a.isEmpty()){const u=this.convertModelPositionToViewPosition(a.startLineNumber,a.startColumn,l);return L.Range.fromPositions(u)}else{const u=this.convertModelPositionToViewPosition(a.startLineNumber,a.startColumn,1),v=this.convertModelPositionToViewPosition(a.endLineNumber,a.endColumn,0);return new L.Range(u.lineNumber,u.column,v.lineNumber,v.column)}}getViewLineNumberOfModelPosition(a,l){let u=a-1;if(this.modelLineProjections[u].isVisible()){const f=1+this.projectedModelLineLineCounts.getPrefixSum(u);return this.modelLineProjections[u].getViewLineNumberOfModelPosition(f,l)}for(;u>0&&!this.modelLineProjections[u].isVisible();)u--;if(u===0&&!this.modelLineProjections[u].isVisible())return 1;const v=1+this.projectedModelLineLineCounts.getPrefixSum(u);return this.modelLineProjections[u].getViewLineNumberOfModelPosition(v,this.model.getLineMaxColumn(u+1))}getDecorationsInRange(a,l,u,v,f){const p=this.convertViewPositionToModelPosition(a.startLineNumber,a.startColumn),C=this.convertViewPositionToModelPosition(a.endLineNumber,a.endColumn);if(C.lineNumber-p.lineNumber<=a.endLineNumber-a.startLineNumber)return this.model.getDecorationsInRange(new L.Range(p.lineNumber,1,C.lineNumber,C.column),l,u,v,f);let y=[];const E=p.lineNumber-1,I=C.lineNumber-1;let T=null;for(let N=E;N<=I;N++)if(this.modelLineProjections[N].isVisible())T===null&&(T=new k.Position(N+1,N===E?p.column:1));else if(T!==null){const x=this.model.getLineMaxColumn(N);y=y.concat(this.model.getDecorationsInRange(new L.Range(T.lineNumber,T.column,N,x),l,u,v)),T=null}T!==null&&(y=y.concat(this.model.getDecorationsInRange(new L.Range(T.lineNumber,T.column,C.lineNumber,C.column),l,u,v)),T=null),y.sort((N,P)=>{const x=L.Range.compareRangesUsingStarts(N.range,P.range);return x===0?N.id<P.id?-1:N.id>P.id?1:0:x});const O=[];let R=0,M=null;for(const N of y){const P=N.id;M!==P&&(M=P,O[R++]=N)}return O}getInjectedTextAt(a){const l=this.getViewLineInfo(a.lineNumber);return this.modelLineProjections[l.modelLineNumber-1].getInjectedTextAt(l.modelLineWrappedLineIdx,a.column)}normalizePosition(a,l){const u=this.getViewLineInfo(a.lineNumber);return this.modelLineProjections[u.modelLineNumber-1].normalizePosition(u.modelLineWrappedLineIdx,a,l)}getLineIndentColumn(a){const l=this.getViewLineInfo(a);return l.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(l.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=t;function i(c){if(c.length===0)return[];const a=c.slice();a.sort(L.Range.compareRangesUsingStarts);const l=[];let u=a[0].startLineNumber,v=a[0].endLineNumber;for(let f=1,p=a.length;f<p;f++){const C=a[f];C.startLineNumber>v+1?(l.push(new L.Range(u,1,v,1)),u=C.startLineNumber,v=C.endLineNumber):C.endLineNumber>v&&(v=C.endLineNumber)}return l.push(new L.Range(u,1,v,1)),l}class n{constructor(a,l){this.modelLineNumber=a,this.modelLineWrappedLineIdx=l}}class r{constructor(a,l){this.modelRange=a,this.viewLines=l}}class d{constructor(a){this._lines=a}convertViewPositionToModelPosition(a){return this._lines.convertViewPositionToModelPosition(a.lineNumber,a.column)}convertViewRangeToModelRange(a){return this._lines.convertViewRangeToModelRange(a)}validateViewPosition(a,l){return this._lines.validateViewPosition(a.lineNumber,a.column,l)}validateViewRange(a,l){return this._lines.validateViewRange(a,l)}convertModelPositionToViewPosition(a,l){return this._lines.convertModelPositionToViewPosition(a.lineNumber,a.column,l)}convertModelRangeToViewRange(a,l){return this._lines.convertModelRangeToViewRange(a,l)}modelPositionIsVisible(a){return this._lines.modelPositionIsVisible(a.lineNumber,a.column)}getModelLineViewLineCount(a){return this._lines.getModelLineViewLineCount(a)}getViewLineNumberOfModelPosition(a,l){return this._lines.getViewLineNumberOfModelPosition(a,l)}}class h{constructor(a){this.model=a}dispose(){}createCoordinatesConverter(){return new o(this)}getHiddenAreas(){return[]}setHiddenAreas(a){return!1}setTabSize(a){return!1}setWrappingSettings(a,l,u,v){return!1}createLineBreaksComputer(){const a=[];return{addRequest:(l,u,v)=>{a.push(null)},finalize:()=>a}}onModelFlushed(){}onModelLinesDeleted(a,l,u){return new S.ViewLinesDeletedEvent(l,u)}onModelLinesInserted(a,l,u,v){return new S.ViewLinesInsertedEvent(l,u)}onModelLineChanged(a,l,u){return[!1,new S.ViewLinesChangedEvent(l,1),null,null]}acceptVersionId(a){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(a,l,u){return{startLineNumber:a,endLineNumber:a,indent:0}}getViewLinesBracketGuides(a,l,u){return new Array(l-a+1).fill([])}getViewLinesIndentGuides(a,l){const u=l-a+1,v=new Array(u);for(let f=0;f<u;f++)v[f]=0;return v}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 l=this.model.tokenization.getLineTokens(a),u=l.getLineContent();return new s.ViewLineData(u,!1,1,u.length+1,0,l.inflate(),null)}getViewLinesData(a,l,u){const v=this.model.getLineCount();a=Math.min(Math.max(1,a),v),l=Math.min(Math.max(1,l),v);const f=[];for(let p=a;p<=l;p++){const C=p-a;f[C]=u[C]?this.getViewLineData(p):null}return f}getDecorationsInRange(a,l,u,v,f){return this.model.getDecorationsInRange(a,l,u,v,f)}normalizePosition(a,l){return this.model.normalizePosition(a,l)}getLineIndentColumn(a){return this.model.getLineIndentColumn(a)}getInjectedTextAt(a){return null}}e.ViewModelLinesFromModelAsIs=h;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,l){return this._validPosition(l)}validateViewRange(a,l){return this._validRange(l)}convertModelPositionToViewPosition(a){return this._validPosition(a)}convertModelRangeToViewRange(a){return this._validRange(a)}modelPositionIsVisible(a){const l=this._lines.model.getLineCount();return!(a.lineNumber<1||a.lineNumber>l)}getModelLineViewLineCount(a){return 1}getViewLineNumberOfModelPosition(a,l){return a}}}),define(J[840],ee([1,0,16,14,36,2,17,9,41,747,66,12,5,46,106,27,72,309,204,584,311,83,315,225,839]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const p=!0;class C extends D.Disposable{constructor(N,P,x,F,B,V,K,A,Y){if(super(),this.languageConfigurationService=K,this._themeService=A,this._attachedView=Y,this.hiddenAreasModel=new I,this.previousHiddenAreas=[],this._editorId=N,this._configuration=P,this.model=x,this._eventDispatcher=new v.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=y.create(this.model),p&&this.model.isTooLargeForTokenization())this._lines=new f.ViewModelLinesFromModelAsIs(this.model);else{const ie=this._configuration.options,le=ie.get(48),ne=ie.get(134),se=ie.get(141),H=ie.get(133),W=ie.get(125);this._lines=new f.ViewModelLinesFromProjectedModel(this._editorId,this.model,F,B,le,this.model.getOptions().tabSize,ne,se.wrappingColumn,H,W)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new g.CursorsController(x,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new c.ViewLayout(this._configuration,this.getLineCount(),V)),this._register(this.viewLayout.onDidScroll(ie=>{ie.scrollTopChanged&&this._handleVisibleLinesChanged(),ie.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new o.ViewScrollChangedEvent(ie)),this._eventDispatcher.emitOutgoingEvent(new v.ScrollChangedEvent(ie.oldScrollWidth,ie.oldScrollLeft,ie.oldScrollHeight,ie.oldScrollTop,ie.scrollWidth,ie.scrollLeft,ie.scrollHeight,ie.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(ie=>{this._eventDispatcher.emitOutgoingEvent(ie)})),this._decorations=new u.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(ie=>{try{const le=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(le,ie)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(a.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new o.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(ie=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new o.ViewThemeChangedEvent(ie))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(N){this._eventDispatcher.addViewEventHandler(N)}removeViewEventHandler(N){this._eventDispatcher.removeViewEventHandler(N)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const N=this.viewLayout.getLinesViewportData(),P=new t.Range(N.startLineNumber,this.getLineMinColumn(N.startLineNumber),N.endLineNumber,this.getLineMaxColumn(N.endLineNumber));return this._toModelVisibleRanges(P)}visibleLinesStabilized(){const N=this.getModelVisibleRanges();this._attachedView.setVisibleLines(N,!0)}_handleVisibleLinesChanged(){const N=this.getModelVisibleRanges();this._attachedView.setVisibleLines(N,!1)}setHasFocus(N){this._hasFocus=N,this._cursor.setHasFocus(N),this._eventDispatcher.emitSingleViewEvent(new o.ViewFocusChangedEvent(N)),this._eventDispatcher.emitOutgoingEvent(new v.FocusChangedEvent(!N,N))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new o.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new o.ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const N=new s.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),P=this.coordinatesConverter.convertViewPositionToModelPosition(N);return new R(P,this._viewportStart.startLineDelta)}return new R(null,0)}_onConfigurationChanged(N,P){const x=this._captureStableViewport(),F=this._configuration.options,B=F.get(48),V=F.get(134),K=F.get(141),A=F.get(133),Y=F.get(125);this._lines.setWrappingSettings(B,V,K.wrappingColumn,A,Y)&&(N.emitViewEvent(new o.ViewFlushedEvent),N.emitViewEvent(new o.ViewLineMappingChangedEvent),N.emitViewEvent(new o.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),P.hasChanged(88)&&(this._decorations.reset(),N.emitViewEvent(new o.ViewDecorationsChangedEvent(null))),N.emitViewEvent(new o.ViewConfigurationChangedEvent(P)),this.viewLayout.onConfigurationChanged(P),x.recoverViewportStart(this.coordinatesConverter,this.viewLayout),m.CursorConfiguration.shouldRecreate(P)&&(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(N=>{try{const x=this._eventDispatcher.beginEmitViewEvents();let F=!1,B=!1;const V=N instanceof n.InternalModelContentChangeEvent?N.rawContentChangedEvent.changes:N.changes,K=N instanceof n.InternalModelContentChangeEvent?N.rawContentChangedEvent.versionId:null,A=this._lines.createLineBreaksComputer();for(const le of V)switch(le.changeType){case 4:{for(let ne=0;ne<le.detail.length;ne++){const se=le.detail[ne];let H=le.injectedTexts[ne];H&&(H=H.filter(W=>!W.ownerId||W.ownerId===this._editorId)),A.addRequest(se,H,null)}break}case 2:{let ne=null;le.injectedText&&(ne=le.injectedText.filter(se=>!se.ownerId||se.ownerId===this._editorId)),A.addRequest(le.detail,ne,null);break}}const Y=A.finalize(),ie=new _.ArrayQueue(Y);for(const le of V)switch(le.changeType){case 1:{this._lines.onModelFlushed(),x.emitViewEvent(new o.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),F=!0;break}case 3:{const ne=this._lines.onModelLinesDeleted(K,le.fromLineNumber,le.toLineNumber);ne!==null&&(x.emitViewEvent(ne),this.viewLayout.onLinesDeleted(ne.fromLineNumber,ne.toLineNumber)),F=!0;break}case 4:{const ne=ie.takeCount(le.detail.length),se=this._lines.onModelLinesInserted(K,le.fromLineNumber,le.toLineNumber,ne);se!==null&&(x.emitViewEvent(se),this.viewLayout.onLinesInserted(se.fromLineNumber,se.toLineNumber)),F=!0;break}case 2:{const ne=ie.dequeue(),[se,H,W,$]=this._lines.onModelLineChanged(K,le.lineNumber,ne);B=se,H&&x.emitViewEvent(H),W&&(x.emitViewEvent(W),this.viewLayout.onLinesInserted(W.fromLineNumber,W.toLineNumber)),$&&(x.emitViewEvent($),this.viewLayout.onLinesDeleted($.fromLineNumber,$.toLineNumber));break}case 5:break}K!==null&&this._lines.acceptVersionId(K),this.viewLayout.onHeightMaybeChanged(),!F&&B&&(x.emitViewEvent(new o.ViewLineMappingChangedEvent),x.emitViewEvent(new o.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(x),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const P=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&P){const x=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(x){const F=this.coordinatesConverter.convertModelPositionToViewPosition(x.getStartPosition()),B=this.viewLayout.getVerticalOffsetForLineNumber(F.lineNumber);this.viewLayout.setScrollPosition({scrollTop:B+this._viewportStart.startLineDelta},1)}}try{const x=this._eventDispatcher.beginEmitViewEvents();N instanceof n.InternalModelContentChangeEvent&&x.emitOutgoingEvent(new v.ModelContentChangedEvent(N.contentChangedEvent)),this._cursor.onModelContentChanged(x,N)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(N=>{const P=[];for(let x=0,F=N.ranges.length;x<F;x++){const B=N.ranges[x],V=this.coordinatesConverter.convertModelPositionToViewPosition(new s.Position(B.fromLineNumber,1)).lineNumber,K=this.coordinatesConverter.convertModelPositionToViewPosition(new s.Position(B.toLineNumber,this.model.getLineMaxColumn(B.toLineNumber))).lineNumber;P[x]={fromLineNumber:V,toLineNumber:K}}this._eventDispatcher.emitSingleViewEvent(new o.ViewTokensChangedEvent(P)),this._eventDispatcher.emitOutgoingEvent(new v.ModelTokensChangedEvent(N))})),this._register(this.model.onDidChangeLanguageConfiguration(N=>{this._eventDispatcher.emitSingleViewEvent(new o.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 v.ModelLanguageConfigurationChangedEvent(N))})),this._register(this.model.onDidChangeLanguage(N=>{this.cursorConfig=new m.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new v.ModelLanguageChangedEvent(N))})),this._register(this.model.onDidChangeOptions(N=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const P=this._eventDispatcher.beginEmitViewEvents();P.emitViewEvent(new o.ViewFlushedEvent),P.emitViewEvent(new o.ViewLineMappingChangedEvent),P.emitViewEvent(new o.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(P),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 v.ModelOptionsChangedEvent(N))})),this._register(this.model.onDidChangeDecorations(N=>{var P,x;if(this._decorations.onModelDecorationsChanged(),N.affectsGlyphMargin){const F=this.model.getAllMarginDecorations();let B=!1;F.sort((A,Y)=>t.Range.compareRangesUsingStarts(A.range,Y.range));let V=null,K=null;for(const A of F){const Y=(x=(P=A.options.glyphMargin)===null||P===void 0?void 0:P.position)!==null&&x!==void 0?x:i.GlyphMarginLane.Left;if(Y===i.GlyphMarginLane.Left&&(!V||t.Range.compareRangesUsingEnds(V,A.range)<0)&&(V=A.range),Y===i.GlyphMarginLane.Right&&(!K||t.Range.compareRangesUsingEnds(K,A.range)<0)&&(K=A.range),V&&K){if(V.endLineNumber<K.startLineNumber){V=null;continue}if(K.endLineNumber<V.startLineNumber){K=null;continue}B=!0;break}}this._configuration.setGlyphMarginDecorationLaneCount(B?2:1)}this._eventDispatcher.emitSingleViewEvent(new o.ViewDecorationsChangedEvent(N)),this._eventDispatcher.emitOutgoingEvent(new v.ModelDecorationsChangedEvent(N))}))}setHiddenAreas(N,P){this.hiddenAreasModel.setHiddenAreas(P,N);const x=this.hiddenAreasModel.getMergedRanges();if(x===this.previousHiddenAreas)return;this.previousHiddenAreas=x;const F=this._captureStableViewport();let B=!1;try{const V=this._eventDispatcher.beginEmitViewEvents();B=this._lines.setHiddenAreas(x),B&&(V.emitViewEvent(new o.ViewFlushedEvent),V.emitViewEvent(new o.ViewLineMappingChangedEvent),V.emitViewEvent(new o.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(V),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),F.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),B&&this._eventDispatcher.emitOutgoingEvent(new v.HiddenAreasChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const N=this._configuration.options.get(140),P=this._configuration.options.get(64),x=Math.max(20,Math.round(N.height/P)),F=this.viewLayout.getLinesViewportData(),B=Math.max(1,F.completelyVisibleStartLineNumber-x),V=Math.min(this.getLineCount(),F.completelyVisibleEndLineNumber+x);return this._toModelVisibleRanges(new t.Range(B,this.getLineMinColumn(B),V,this.getLineMaxColumn(V)))}getVisibleRanges(){const N=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(N)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(N){const P=this.coordinatesConverter.convertViewRangeToModelRange(N),x=this._lines.getHiddenAreas();if(x.length===0)return[P];const F=[];let B=0,V=P.startLineNumber,K=P.startColumn;const A=P.endLineNumber,Y=P.endColumn;for(let ie=0,le=x.length;ie<le;ie++){const ne=x[ie].startLineNumber,se=x[ie].endLineNumber;se<V||ne>A||(V<ne&&(F[B++]=new t.Range(V,K,ne-1,this.model.getLineMaxColumn(ne-1))),V=se+1,K=1)}return(V<A||V===A&&K<Y)&&(F[B++]=new t.Range(V,K,A,Y)),F}getCompletelyVisibleViewRange(){const N=this.viewLayout.getLinesViewportData(),P=N.completelyVisibleStartLineNumber,x=N.completelyVisibleEndLineNumber;return new t.Range(P,this.getLineMinColumn(P),x,this.getLineMaxColumn(x))}getCompletelyVisibleViewRangeAtScrollTop(N){const P=this.viewLayout.getLinesViewportDataAtScrollTop(N),x=P.completelyVisibleStartLineNumber,F=P.completelyVisibleEndLineNumber;return new t.Range(x,this.getLineMinColumn(x),F,this.getLineMaxColumn(F))}saveState(){const N=this.viewLayout.saveState(),P=N.scrollTop,x=this.viewLayout.getLineNumberAtVerticalOffset(P),F=this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(x,this.getLineMinColumn(x))),B=this.viewLayout.getVerticalOffsetForLineNumber(x)-P;return{scrollLeft:N.scrollLeft,firstPosition:F,firstPositionDeltaTop:B}}reduceRestoreState(N){if(typeof N.firstPosition>"u")return this._reduceRestoreStateCompatibility(N);const P=this.model.validatePosition(N.firstPosition),x=this.coordinatesConverter.convertModelPositionToViewPosition(P),F=this.viewLayout.getVerticalOffsetForLineNumber(x.lineNumber)-N.firstPositionDeltaTop;return{scrollLeft:N.scrollLeft,scrollTop:F}}_reduceRestoreStateCompatibility(N){return{scrollLeft:N.scrollLeft,scrollTop:N.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(N,P,x){this._viewportStart.update(this,N)}getActiveIndentGuide(N,P,x){return this._lines.getActiveIndentGuide(N,P,x)}getLinesIndentGuides(N,P){return this._lines.getViewLinesIndentGuides(N,P)}getBracketGuidesInRangeByLine(N,P,x,F){return this._lines.getViewLinesBracketGuides(N,P,x,F)}getLineContent(N){return this._lines.getViewLineContent(N)}getLineLength(N){return this._lines.getViewLineLength(N)}getLineMinColumn(N){return this._lines.getViewLineMinColumn(N)}getLineMaxColumn(N){return this._lines.getViewLineMaxColumn(N)}getLineFirstNonWhitespaceColumn(N){const P=b.firstNonWhitespaceIndex(this.getLineContent(N));return P===-1?0:P+1}getLineLastNonWhitespaceColumn(N){const P=b.lastNonWhitespaceIndex(this.getLineContent(N));return P===-1?0:P+2}getMinimapDecorationsInRange(N){return this._decorations.getMinimapDecorationsInRange(N)}getDecorationsInViewport(N){return this._decorations.getDecorationsViewportData(N).decorations}getInjectedTextAt(N){return this._lines.getInjectedTextAt(N)}getViewportViewLineRenderingData(N,P){const F=this._decorations.getDecorationsViewportData(N).inlineDecorations[P-N.startLineNumber];return this._getViewLineRenderingData(P,F)}getViewLineRenderingData(N){const P=this._decorations.getInlineDecorationsOnLine(N);return this._getViewLineRenderingData(N,P)}_getViewLineRenderingData(N,P){const x=this.model.mightContainRTL(),F=this.model.mightContainNonBasicASCII(),B=this.getTabSize(),V=this._lines.getViewLineData(N);return V.inlineDecorations&&(P=[...P,...V.inlineDecorations.map(K=>K.toInlineDecoration(N))]),new l.ViewLineRenderingData(V.minColumn,V.maxColumn,V.content,V.continuesWithWrappedLine,x,F,V.tokens,P,B,V.startVisibleColumn)}getViewLineData(N){return this._lines.getViewLineData(N)}getMinimapLinesRenderingData(N,P,x){const F=this._lines.getViewLinesData(N,P,x);return new l.MinimapLinesRenderingData(this.getTabSize(),F)}getAllOverviewRulerDecorations(N){const P=this.model.getOverviewRulerDecorations(this._editorId,(0,S.filterValidationDecorations)(this._configuration.options)),x=new E;for(const F of P){const B=F.options,V=B.overviewRuler;if(!V)continue;const K=V.position;if(K===0)continue;const A=V.getColor(N.value),Y=this.coordinatesConverter.getViewLineNumberOfModelPosition(F.range.startLineNumber,F.range.startColumn),ie=this.coordinatesConverter.getViewLineNumberOfModelPosition(F.range.endLineNumber,F.range.endColumn);x.accept(A,B.zIndex,Y,ie,K)}return x.asArray}_invalidateDecorationsColorCache(){const N=this.model.getOverviewRulerDecorations();for(const P of N){const x=P.options.overviewRuler;x?.invalidateCachedColor();const F=P.options.minimap;F?.invalidateCachedColor()}}getValueInRange(N,P){const x=this.coordinatesConverter.convertViewRangeToModelRange(N);return this.model.getValueInRange(x,P)}getValueLengthInRange(N,P){const x=this.coordinatesConverter.convertViewRangeToModelRange(N);return this.model.getValueLengthInRange(x,P)}modifyPosition(N,P){const x=this.coordinatesConverter.convertViewPositionToModelPosition(N);return this.model.modifyPosition(x,P)}deduceModelPositionRelativeToViewPosition(N,P,x){const F=this.coordinatesConverter.convertViewPositionToModelPosition(N);this.model.getEOL().length===2&&(P<0?P-=x:P+=x);const V=this.model.getOffsetAt(F)+P;return this.model.getPositionAt(V)}getPlainTextToCopy(N,P,x){const F=x?`\\r\n`:this.model.getEOL();N=N.slice(0),N.sort(t.Range.compareRangesUsingStarts);let B=!1,V=!1;for(const A of N)A.isEmpty()?B=!0:V=!0;if(!V){if(!P)return"";const A=N.map(ie=>ie.startLineNumber);let Y="";for(let ie=0;ie<A.length;ie++)ie>0&&A[ie-1]===A[ie]||(Y+=this.model.getLineContent(A[ie])+F);return Y}if(B&&P){const A=[];let Y=0;for(const ie of N){const le=ie.startLineNumber;ie.isEmpty()?le!==Y&&A.push(this.model.getLineContent(le)):A.push(this.model.getValueInRange(ie,x?2:0)),Y=le}return A.length===1?A[0]:A}const K=[];for(const A of N)A.isEmpty()||K.push(this.model.getValueInRange(A,x?2:0));return K.length===1?K[0]:K}getRichTextToCopy(N,P){const x=this.model.getLanguageId();if(x===d.PLAINTEXT_LANGUAGE_ID||N.length!==1)return null;let F=N[0];if(F.isEmpty()){if(!P)return null;const ie=F.startLineNumber;F=new t.Range(ie,this.model.getLineMinColumn(ie),ie,this.model.getLineMaxColumn(ie))}const B=this._configuration.options.get(48),V=this._getColorMap(),A=/[:;\\\\\\/<>]/.test(B.fontFamily)||B.fontFamily===S.EDITOR_FONT_DEFAULTS.fontFamily;let Y;return A?Y=S.EDITOR_FONT_DEFAULTS.fontFamily:(Y=B.fontFamily,Y=Y.replace(/"/g,"\'"),/[,\']/.test(Y)||/[+ ]/.test(Y)&&(Y=`\'${Y}\'`),Y=`${Y}, ${S.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:x,html:`<div style="color: ${V[1]};background-color: ${V[2]};font-family: ${Y};font-weight: ${B.fontWeight};font-size: ${B.fontSize}px;line-height: ${B.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(F,V)+"</div>"}}_getHTMLToCopy(N,P){const x=N.startLineNumber,F=N.startColumn,B=N.endLineNumber,V=N.endColumn,K=this.getTabSize();let A="";for(let Y=x;Y<=B;Y++){const ie=this.model.tokenization.getLineTokens(Y),le=ie.getLineContent(),ne=Y===x?F-1:0,se=Y===B?V-1:le.length;le===""?A+="<br>":A+=(0,h.tokenizeLineToHTML)(le,ie.inflate(),P,ne,se,K,w.isWindows)}return A}_getColorMap(){const N=r.TokenizationRegistry.getColorMap(),P=["#000000"];if(N)for(let x=1,F=N.length;x<F;x++)P[x]=L.Color.Format.CSS.formatHex(N[x]);return P}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(N,P,x){return this._withViewEventsCollector(F=>this._cursor.setStates(F,N,P,x))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(N){this._cursor.setCursorColumnSelectData(N)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(N){this._cursor.setPrevEditOperationType(N)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(N,P,x=0){this._withViewEventsCollector(F=>this._cursor.setSelections(F,N,P,x))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(N){this._withViewEventsCollector(P=>this._cursor.restoreState(P,N))}_executeCursorEdit(N){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new v.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(N)}executeEdits(N,P,x){this._executeCursorEdit(F=>this._cursor.executeEdits(F,N,P,x))}startComposition(){this._executeCursorEdit(N=>this._cursor.startComposition(N))}endComposition(N){this._executeCursorEdit(P=>this._cursor.endComposition(P,N))}type(N,P){this._executeCursorEdit(x=>this._cursor.type(x,N,P))}compositionType(N,P,x,F,B){this._executeCursorEdit(V=>this._cursor.compositionType(V,N,P,x,F,B))}paste(N,P,x,F){this._executeCursorEdit(B=>this._cursor.paste(B,N,P,x,F))}cut(N){this._executeCursorEdit(P=>this._cursor.cut(P,N))}executeCommand(N,P){this._executeCursorEdit(x=>this._cursor.executeCommand(x,N,P))}executeCommands(N,P){this._executeCursorEdit(x=>this._cursor.executeCommands(x,N,P))}revealPrimaryCursor(N,P,x=!1){this._withViewEventsCollector(F=>this._cursor.revealPrimary(F,N,x,0,P,0))}revealTopMostCursor(N){const P=this._cursor.getTopMostViewPosition(),x=new t.Range(P.lineNumber,P.column,P.lineNumber,P.column);this._withViewEventsCollector(F=>F.emitViewEvent(new o.ViewRevealRangeRequestEvent(N,!1,x,null,0,!0,0)))}revealBottomMostCursor(N){const P=this._cursor.getBottomMostViewPosition(),x=new t.Range(P.lineNumber,P.column,P.lineNumber,P.column);this._withViewEventsCollector(F=>F.emitViewEvent(new o.ViewRevealRangeRequestEvent(N,!1,x,null,0,!0,0)))}revealRange(N,P,x,F,B){this._withViewEventsCollector(V=>V.emitViewEvent(new o.ViewRevealRangeRequestEvent(N,!1,x,null,F,P,B)))}changeWhitespace(N){this.viewLayout.changeWhitespace(N)&&(this._eventDispatcher.emitSingleViewEvent(new o.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new v.ViewZonesChangedEvent))}_withViewEventsCollector(N){try{const P=this._eventDispatcher.beginEmitViewEvents();return N(P)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(N,P){return this._lines.normalizePosition(N,P)}getLineIndentColumn(N){return this._lines.getLineIndentColumn(N)}}e.ViewModel=C;class y{static create(N){const P=N._setTrackedRange(null,new t.Range(1,1,1,1),1);return new y(N,1,!1,P,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(N,P,x,F,B){this._model=N,this._viewLineNumber=P,this._isValid=x,this._modelTrackedRange=F,this._startLineDelta=B}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(N,P){const x=N.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(P,N.getLineMinColumn(P))),F=N.model._setTrackedRange(this._modelTrackedRange,new t.Range(x.lineNumber,x.column,x.lineNumber,x.column),1),B=N.viewLayout.getVerticalOffsetForLineNumber(P),V=N.viewLayout.getCurrentScrollTop();this._viewLineNumber=P,this._isValid=!0,this._modelTrackedRange=F,this._startLineDelta=V-B}invalidate(){this._isValid=!1}}class E{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(N,P,x,F,B){const V=this._asMap[N];if(V){const K=V.data,A=K[K.length-3],Y=K[K.length-1];if(A===B&&Y+1>=x){F>Y&&(K[K.length-1]=F);return}K.push(B,x,F)}else{const K=new l.OverviewRulerDecorationsGroup(N,P,[B,x,F]);this._asMap[N]=K,this.asArray.push(K)}}}class I{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(N,P){const x=this.hiddenAreas.get(N);x&&O(x,P)||(this.hiddenAreas.set(N,P),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const N=Array.from(this.hiddenAreas.values()).reduce((P,x)=>T(P,x),[]);return O(this.ranges,N)?this.ranges:(this.ranges=N,this.ranges)}}function T(M,N){const P=[];let x=0,F=0;for(;x<M.length&&F<N.length;){const B=M[x],V=N[F];if(B.endLineNumber<V.startLineNumber-1)P.push(M[x++]);else if(V.endLineNumber<B.startLineNumber-1)P.push(N[F++]);else{const K=Math.min(B.startLineNumber,V.startLineNumber),A=Math.max(B.endLineNumber,V.endLineNumber);P.push(new t.Range(K,1,A,1)),x++,F++}}for(;x<M.length;)P.push(M[x++]);for(;F<N.length;)P.push(N[F++]);return P}function O(M,N){if(M.length!==N.length)return!1;for(let P=0;P<M.length;P++)if(!M[P].equalsRange(N[P]))return!1;return!0}class R{constructor(N,P){this.viewportStartModelPosition=N,this.startLineDelta=P}recoverViewportStart(N,P){if(!this.viewportStartModelPosition)return;const x=N.convertModelPositionToViewPosition(this.viewportStartModelPosition),F=P.getVerticalOffsetForLineNumber(x.lineNumber);P.setScrollPosition({scrollTop:F+this.startLineDelta},1)}}}),define(J[188],ee([1,0,592,7,11,6,2,51,727,15,32,819,261,41,77,12,5,24,265,171,22,38,75,33,840,25,13,8,182,43,23,91,18,517,571,173,29,76,19,570,221,762,420]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T,O,R,M,N,P,x,F,B,V,K){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let A=0;class Y{constructor(q,z,U,X,te,G){this.model=q,this.viewModel=z,this.view=U,this.hasRealView=X,this.listenersToRemove=te,this.attachedView=G}dispose(){(0,w.dispose)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let ie=e.CodeEditorWidget=class Rt extends w.Disposable{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(q,z,U,X,te,G,ae,fe,Ce,Se,ye,Ie){super(),this.languageConfigurationService=ye,this._deliveryQueue=new D.EventDeliveryQueue,this._contributions=this._register(new V.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 ne(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 ne(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new ne(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new ne(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new ne(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new ne(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new ne(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new ne(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new ne(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new ne(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new ne(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new ne(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new ne(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new ne(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new ne(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new ne(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new ne(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new ne(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(),te.willCreateCodeEditor();const Ee=Object.assign({},z);this._domElement=q,this._overflowWidgetsDomNode=Ee.overflowWidgetsDomNode,delete Ee.overflowWidgetsDomNode,this._id=++A,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=U.telemetryData,this._configuration=this._register(this._createConfiguration(U.isSimpleWidget||!1,Ee,Se)),this._register(this._configuration.onDidChange(Pe=>{this._onDidChangeConfiguration.fire(Pe);const _e=this._configuration.options;if(Pe.hasChanged(140)){const me=_e.get(140);this._onDidLayoutChange.fire(me)}})),this._contextKeyService=this._register(ae.createScoped(this._domElement)),this._notificationService=Ce,this._codeEditorService=te,this._commandService=G,this._themeService=fe,this._register(new se(this,this._contextKeyService)),this._register(new H(this,this._contextKeyService,Ie)),this._instantiationService=X.createChild(new E.ServiceCollection([C.IContextKeyService,this._contextKeyService])),this._modelData=null,this._focusTracker=new W(q),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let ke;Array.isArray(U.contributions)?ke=U.contributions:ke=g.EditorExtensionsRegistry.getEditorContributions(),this._contributions.initialize(this,ke,this._instantiationService);for(const Pe of g.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(Pe.id)){(0,L.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${Pe.id}`));continue}const _e=new o.InternalEditorAction(Pe.id,Pe.label,Pe.alias,(0,R.withNullAsUndefined)(Pe.precondition),()=>this._instantiationService.invokeFunction(me=>Promise.resolve(Pe.runEditorCommand(me,this,null))),this._contextKeyService);this._actions.set(_e.id,_e)}const Ae=()=>!this._configuration.options.get(88)&&this._configuration.options.get(34).enabled;this._register(new k.DragAndDropObserver(this._domElement,{onDragEnter:()=>{},onDragOver:Pe=>{if(!Ae())return;const _e=this.getTargetAtClientPoint(Pe.clientX,Pe.clientY);_e?.position&&this.showDropIndicatorAt(_e.position)},onDrop:Pe=>we(this,void 0,void 0,function*(){if(!Ae()||(this.removeDropIndicator(),!Pe.dataTransfer))return;const _e=this.getTargetAtClientPoint(Pe.clientX,Pe.clientY);_e?.position&&this._onDropIntoEditor.fire({position:_e.position,event:Pe})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(q){var z;(z=this._modelData)===null||z===void 0||z.view.writeScreenReaderContent(q)}_createConfiguration(q,z,U){return new S.EditorConfiguration(q,z,this._domElement,U)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return c.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(q){return this._instantiationService.invokeFunction(q)}updateOptions(q){this._configuration.updateOptions(q||{})}getOptions(){return this._configuration.options}getOption(q){return this._configuration.options.get(q)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(q){return this._modelData?P.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(126),q):null}getValue(q=null){if(!this._modelData)return"";const z=!!(q&&q.preserveBOM);let U=0;return q&&q.lineEnding&&q.lineEnding===`\n`?U=1:q&&q.lineEnding&&q.lineEnding===`\\r\n`&&(U=2),this._modelData.model.getValue(U,z)}setValue(q){this._modelData&&this._modelData.model.setValue(q)}getModel(){return this._modelData?this._modelData.model:null}setModel(q=null){const z=q;if(this._modelData===null&&z===null||this._modelData&&this._modelData.model===z)return;const U=this.hasTextFocus(),X=this._detachModel();this._attachModel(z),U&&this.hasModel()&&this.focus();const te={oldModelUrl:X?X.uri:null,newModelUrl:z?z.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(te),this._postDetachModelCleanup(X),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const q in this._decorationTypeSubtypes){const z=this._decorationTypeSubtypes[q];for(const U in z)this._removeDecorationType(q+"-"+U)}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(q,z,U,X){const te=q.model.validatePosition({lineNumber:z,column:U}),G=q.viewModel.coordinatesConverter.convertModelPositionToViewPosition(te);return q.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(G.lineNumber,X)}getTopForLineNumber(q,z=!1){return this._modelData?Rt._getVerticalOffsetForPosition(this._modelData,q,1,z):-1}getTopForPosition(q,z){return this._modelData?Rt._getVerticalOffsetForPosition(this._modelData,q,z,!1):-1}static _getVerticalOffsetForPosition(q,z,U,X=!1){const te=q.model.validatePosition({lineNumber:z,column:U}),G=q.viewModel.coordinatesConverter.convertModelPositionToViewPosition(te);return q.viewModel.viewLayout.getVerticalOffsetForLineNumber(G.lineNumber,X)}getBottomForLineNumber(q,z=!1){return this._modelData?Rt._getVerticalOffsetAfterPosition(this._modelData,q,1,z):-1}setHiddenAreas(q,z){var U;(U=this._modelData)===null||U===void 0||U.viewModel.setHiddenAreas(q.map(X=>d.Range.lift(X)),z)}getVisibleColumnFromPosition(q){if(!this._modelData)return q.column;const z=this._modelData.model.validatePosition(q),U=this._modelData.model.getOptions().tabSize;return n.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(z.lineNumber),z.column,U)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(q,z="api"){if(this._modelData){if(!r.Position.isIPosition(q))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(z,[{selectionStartLineNumber:q.lineNumber,selectionStartColumn:q.column,positionLineNumber:q.lineNumber,positionColumn:q.column}])}}_sendRevealRange(q,z,U,X){if(!this._modelData)return;if(!d.Range.isIRange(q))throw new Error("Invalid arguments");const te=this._modelData.model.validateRange(q),G=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(te);this._modelData.viewModel.revealRange("api",U,G,z,X)}revealLine(q,z=0){this._revealLine(q,0,z)}revealLineInCenter(q,z=0){this._revealLine(q,1,z)}revealLineInCenterIfOutsideViewport(q,z=0){this._revealLine(q,2,z)}revealLineNearTop(q,z=0){this._revealLine(q,5,z)}_revealLine(q,z,U){if(typeof q!="number")throw new Error("Invalid arguments");this._sendRevealRange(new d.Range(q,1,q,1),z,!1,U)}revealPosition(q,z=0){this._revealPosition(q,0,!0,z)}revealPositionInCenter(q,z=0){this._revealPosition(q,1,!0,z)}revealPositionInCenterIfOutsideViewport(q,z=0){this._revealPosition(q,2,!0,z)}revealPositionNearTop(q,z=0){this._revealPosition(q,5,!0,z)}_revealPosition(q,z,U,X){if(!r.Position.isIPosition(q))throw new Error("Invalid arguments");this._sendRevealRange(new d.Range(q.lineNumber,q.column,q.lineNumber,q.column),z,U,X)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(q,z="api"){const U=h.Selection.isISelection(q),X=d.Range.isIRange(q);if(!U&&!X)throw new Error("Invalid arguments");if(U)this._setSelectionImpl(q,z);else if(X){const te={selectionStartLineNumber:q.startLineNumber,selectionStartColumn:q.startColumn,positionLineNumber:q.endLineNumber,positionColumn:q.endColumn};this._setSelectionImpl(te,z)}}_setSelectionImpl(q,z){if(!this._modelData)return;const U=new h.Selection(q.selectionStartLineNumber,q.selectionStartColumn,q.positionLineNumber,q.positionColumn);this._modelData.viewModel.setSelections(z,[U])}revealLines(q,z,U=0){this._revealLines(q,z,0,U)}revealLinesInCenter(q,z,U=0){this._revealLines(q,z,1,U)}revealLinesInCenterIfOutsideViewport(q,z,U=0){this._revealLines(q,z,2,U)}revealLinesNearTop(q,z,U=0){this._revealLines(q,z,5,U)}_revealLines(q,z,U,X){if(typeof q!="number"||typeof z!="number")throw new Error("Invalid arguments");this._sendRevealRange(new d.Range(q,1,z,1),U,!1,X)}revealRange(q,z=0,U=!1,X=!0){this._revealRange(q,U?1:0,X,z)}revealRangeInCenter(q,z=0){this._revealRange(q,1,!0,z)}revealRangeInCenterIfOutsideViewport(q,z=0){this._revealRange(q,2,!0,z)}revealRangeNearTop(q,z=0){this._revealRange(q,5,!0,z)}revealRangeNearTopIfOutsideViewport(q,z=0){this._revealRange(q,6,!0,z)}revealRangeAtTop(q,z=0){this._revealRange(q,3,!0,z)}_revealRange(q,z,U,X){if(!d.Range.isIRange(q))throw new Error("Invalid arguments");this._sendRevealRange(d.Range.lift(q),z,U,X)}setSelections(q,z="api",U=0){if(this._modelData){if(!q||q.length===0)throw new Error("Invalid arguments");for(let X=0,te=q.length;X<te;X++)if(!h.Selection.isISelection(q[X]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(z,q,U)}}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(q,z=1){if(this._modelData){if(typeof q!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:q},z)}}setScrollTop(q,z=1){if(this._modelData){if(typeof q!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:q},z)}}setScrollPosition(q,z=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(q,z)}hasPendingScrollAnimation(){return this._modelData?this._modelData.viewModel.viewLayout.hasPendingScrollAnimation():!1}saveViewState(){if(!this._modelData)return null;const q=this._contributions.saveViewState(),z=this._modelData.viewModel.saveCursorState(),U=this._modelData.viewModel.saveState();return{cursorState:z,viewState:U,contributionsState:q}}restoreViewState(q){if(!this._modelData||!this._modelData.hasRealView)return;const z=q;if(z&&z.cursorState&&z.viewState){const U=z.cursorState;Array.isArray(U)?U.length>0&&this._modelData.viewModel.restoreCursorState(U):this._modelData.viewModel.restoreCursorState([U]),this._contributions.restoreViewState(z.contributionsState||{});const X=this._modelData.viewModel.reduceRestoreState(z.viewState);this._modelData.view.restoreState(X)}}getContribution(q){return this._contributions.get(q)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let q=this.getActions();return q=q.filter(z=>z.isSupported()),q}getAction(q){return this._actions.get(q)||null}trigger(q,z,U){switch(U=U||{},z){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(q);return;case"type":{const te=U;this._type(q,te.text||"");return}case"replacePreviousChar":{const te=U;this._compositionType(q,te.text||"",te.replaceCharCnt||0,0,0);return}case"compositionType":{const te=U;this._compositionType(q,te.text||"",te.replacePrevCharCnt||0,te.replaceNextCharCnt||0,te.positionDelta||0);return}case"paste":{const te=U;this._paste(q,te.text||"",te.pasteOnNewLine||!1,te.multicursorText||null,te.mode||null);return}case"cut":this._cut(q);return}const X=this.getAction(z);if(X){Promise.resolve(X.run(U)).then(void 0,L.onUnexpectedError);return}this._modelData&&(this._triggerEditorCommand(q,z,U)||this._triggerCommand(z,U))}_triggerCommand(q,z){this._commandService.executeCommand(q,z)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(q){this._modelData&&(this._modelData.viewModel.endComposition(q),this._onDidCompositionEnd.fire())}_type(q,z){!this._modelData||z.length===0||(q==="keyboard"&&this._onWillType.fire(z),this._modelData.viewModel.type(z,q),q==="keyboard"&&this._onDidType.fire(z))}_compositionType(q,z,U,X,te){this._modelData&&this._modelData.viewModel.compositionType(z,U,X,te,q)}_paste(q,z,U,X,te){if(!this._modelData||z.length===0)return;const G=this._modelData.viewModel,ae=G.getSelection().getStartPosition();G.paste(z,U,X,q);const fe=G.getSelection().getStartPosition();q==="keyboard"&&this._onDidPaste.fire({range:new d.Range(ae.lineNumber,ae.column,fe.lineNumber,fe.column),languageId:te})}_cut(q){this._modelData&&this._modelData.viewModel.cut(q)}_triggerEditorCommand(q,z,U){const X=g.EditorExtensionsRegistry.getEditorCommand(z);return X?(U=U||{},U.source=q,this._instantiationService.invokeFunction(te=>{Promise.resolve(X.runEditorCommand(te,this,U)).then(void 0,L.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(88)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(88)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(q,z,U){if(!this._modelData||this._configuration.options.get(88))return!1;let X;return U?Array.isArray(U)?X=()=>U:X=U:X=()=>null,this._modelData.viewModel.executeEdits(q,z,X),!0}executeCommand(q,z){this._modelData&&this._modelData.viewModel.executeCommand(z,q)}executeCommands(q,z){this._modelData&&this._modelData.viewModel.executeCommands(z,q)}createDecorationsCollection(q){return new $(this,q)}changeDecorations(q){return this._modelData?this._modelData.model.changeDecorations(q,this._id):null}getLineDecorations(q){return this._modelData?this._modelData.model.getLineDecorations(q,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(q){return this._modelData?this._modelData.model.getDecorationsInRange(q,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(q,z){return this._modelData?q.length===0&&z.length===0?q:this._modelData.model.deltaDecorations(q,z,this._id):[]}removeDecorations(q){!this._modelData||q.length===0||this._modelData.model.changeDecorations(z=>{z.deltaDecorations(q,[])})}removeDecorationsByType(q){const z=this._decorationTypeKeysToIds[q];z&&this.deltaDecorations(z,[]),this._decorationTypeKeysToIds.hasOwnProperty(q)&&delete this._decorationTypeKeysToIds[q],this._decorationTypeSubtypes.hasOwnProperty(q)&&delete this._decorationTypeSubtypes[q]}getLayoutInfo(){return this._configuration.options.get(140)}createOverviewRuler(q){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(q)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(q){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(q)}delegateScrollFromMouseWheelEvent(q){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(q)}layout(q){this._configuration.observeContainer(q),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(q){const z={widget:q,position:q.getPosition()};this._contentWidgets.hasOwnProperty(q.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[q.getId()]=z,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(z)}layoutContentWidget(q){const z=q.getId();if(this._contentWidgets.hasOwnProperty(z)){const U=this._contentWidgets[z];U.position=q.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(U)}}removeContentWidget(q){const z=q.getId();if(this._contentWidgets.hasOwnProperty(z)){const U=this._contentWidgets[z];delete this._contentWidgets[z],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(U)}}addOverlayWidget(q){const z={widget:q,position:q.getPosition()};this._overlayWidgets.hasOwnProperty(q.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[q.getId()]=z,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(z)}layoutOverlayWidget(q){const z=q.getId();if(this._overlayWidgets.hasOwnProperty(z)){const U=this._overlayWidgets[z];U.position=q.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(U)}}removeOverlayWidget(q){const z=q.getId();if(this._overlayWidgets.hasOwnProperty(z)){const U=this._overlayWidgets[z];delete this._overlayWidgets[z],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(U)}}changeViewZones(q){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(q)}getTargetAtClientPoint(q,z){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(q,z)}getScrolledVisiblePosition(q){if(!this._modelData||!this._modelData.hasRealView)return null;const z=this._modelData.model.validatePosition(q),U=this._configuration.options,X=U.get(140),te=Rt._getVerticalOffsetForPosition(this._modelData,z.lineNumber,z.column)-this.getScrollTop(),G=this._modelData.view.getOffsetForColumn(z.lineNumber,z.column)+X.glyphMarginWidth+X.lineNumbersWidth+X.decorationsWidth-this.getScrollLeft();return{top:te,left:G,height:U.get(64)}}getOffsetForColumn(q,z){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(q,z)}render(q=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,q)}setAriaOptions(q){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(q)}applyFontInfo(q){(0,F.applyFontInfo)(q,this._configuration.options.get(48))}setBanner(q,z){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=q,this._configuration.setReservedHeight(q?z:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(q){if(!q){this._modelData=null;return}const z=[];this._domElement.setAttribute("data-mode-id",q.getLanguageId()),this._configuration.setIsDominatedByLongLines(q.isDominatedByLongLines()),this._configuration.setModelLineCount(q.getLineCount());const U=q.onBeforeAttached(),X=new f.ViewModel(this._id,this._configuration,q,N.DOMLineBreaksComputerFactory.create(),M.MonospaceLineBreaksComputerFactory.create(this._configuration.options),ae=>k.scheduleAtNextAnimationFrame(ae),this.languageConfigurationService,this._themeService,U);z.push(q.onWillDispose(()=>this.setModel(null))),z.push(X.onEvent(ae=>{switch(ae.kind){case 0:this._onDidContentSizeChange.fire(ae);break;case 1:this._editorTextFocus.setValue(ae.hasFocus);break;case 2:this._onDidScrollChange.fire(ae);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(ae.reachedMaxCursorCount){const ye=this.getOption(77),Ie=_.localize(0,null,ye);this._notificationService.prompt(I.Severity.Warning,Ie,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:_.localize(1,null),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const fe=[];for(let ye=0,Ie=ae.selections.length;ye<Ie;ye++)fe[ye]=ae.selections[ye].getPosition();const Ce={position:fe[0],secondaryPositions:fe.slice(1),reason:ae.reason,source:ae.source};this._onDidChangeCursorPosition.fire(Ce);const Se={selection:ae.selections[0],secondarySelections:ae.selections.slice(1),modelVersionId:ae.modelVersionId,oldSelections:ae.oldSelections,oldModelVersionId:ae.oldModelVersionId,source:ae.source,reason:ae.reason};this._onDidChangeCursorSelection.fire(Se);break}case 7:this._onDidChangeModelDecorations.fire(ae.event);break;case 8:this._domElement.setAttribute("data-mode-id",q.getLanguageId()),this._onDidChangeModelLanguage.fire(ae.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(ae.event);break;case 10:this._onDidChangeModelContent.fire(ae.event);break;case 11:this._onDidChangeModelOptions.fire(ae.event);break;case 12:this._onDidChangeModelTokens.fire(ae.event);break}}));const[te,G]=this._createView(X);if(G){this._domElement.appendChild(te.domNode.domNode);let ae=Object.keys(this._contentWidgets);for(let fe=0,Ce=ae.length;fe<Ce;fe++){const Se=ae[fe];te.addContentWidget(this._contentWidgets[Se])}ae=Object.keys(this._overlayWidgets);for(let fe=0,Ce=ae.length;fe<Ce;fe++){const Se=ae[fe];te.addOverlayWidget(this._overlayWidgets[Se])}te.render(!1,!0),te.domNode.domNode.setAttribute("data-uri",q.uri.toString())}this._modelData=new Y(q,X,te,G,z,U)}_createView(q){let z;this.isSimpleWidget?z={paste:(te,G,ae,fe)=>{this._paste("keyboard",te,G,ae,fe)},type:te=>{this._type("keyboard",te)},compositionType:(te,G,ae,fe)=>{this._compositionType("keyboard",te,G,ae,fe)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:z={paste:(te,G,ae,fe)=>{const Ce={text:te,pasteOnNewLine:G,multicursorText:ae,mode:fe};this._commandService.executeCommand("paste",Ce)},type:te=>{const G={text:te};this._commandService.executeCommand("type",G)},compositionType:(te,G,ae,fe)=>{if(ae||fe){const Ce={text:te,replacePrevCharCnt:G,replaceNextCharCnt:ae,positionDelta:fe};this._commandService.executeCommand("compositionType",Ce)}else{const Ce={text:te,replaceCharCnt:G};this._commandService.executeCommand("replacePreviousChar",Ce)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const U=new t.ViewUserInputEvents(q.coordinatesConverter);return U.onKeyDown=te=>this._onKeyDown.fire(te),U.onKeyUp=te=>this._onKeyUp.fire(te),U.onContextMenu=te=>this._onContextMenu.fire(te),U.onMouseMove=te=>this._onMouseMove.fire(te),U.onMouseLeave=te=>this._onMouseLeave.fire(te),U.onMouseDown=te=>this._onMouseDown.fire(te),U.onMouseUp=te=>this._onMouseUp.fire(te),U.onMouseDrag=te=>this._onMouseDrag.fire(te),U.onMouseDrop=te=>this._onMouseDrop.fire(te),U.onMouseDropCanceled=te=>this._onMouseDropCanceled.fire(te),U.onMouseWheel=te=>this._onMouseWheel.fire(te),[new s.View(z,this._configuration,this._themeService.getColorTheme(),q,U,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(q){q?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const q=this._modelData.model,z=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),z&&this._domElement.contains(z)&&this._domElement.removeChild(z),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),q}_removeDecorationType(q){this._codeEditorService.removeDecorationType(q)}hasModel(){return this._modelData!==null}showDropIndicatorAt(q){const z=[{range:new d.Range(q.lineNumber,q.column,q.lineNumber,q.column),options:Rt.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(z),this.revealPosition(q,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}};ie.dropIntoEditorDecorationOptions=l.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"}),e.CodeEditorWidget=ie=Te([ge(3,y.IInstantiationService),ge(4,m.ICodeEditorService),ge(5,p.ICommandService),ge(6,C.IContextKeyService),ge(7,T.IThemeService),ge(8,I.INotificationService),ge(9,O.IAccessibilityService),ge(10,x.ILanguageConfigurationService),ge(11,B.ILanguageFeaturesService)],ie);class le extends w.Disposable{constructor(q){super(),this._emitterOptions=q,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(q){const z=q?2:1;this._value!==z&&(this._value=z,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=le;class ne extends D.Emitter{constructor(q,z){super({deliveryQueue:z}),this._contributions=q}fire(q){this._contributions.onBeforeInteractionEvent(),super.fire(q)}}class se extends w.Disposable{constructor(q,z){super(),this._editor=q,z.createKey("editorId",q.getId()),this._editorSimpleInput=a.EditorContextKeys.editorSimpleInput.bindTo(z),this._editorFocus=a.EditorContextKeys.focus.bindTo(z),this._textInputFocus=a.EditorContextKeys.textInputFocus.bindTo(z),this._editorTextFocus=a.EditorContextKeys.editorTextFocus.bindTo(z),this._editorTabMovesFocus=a.EditorContextKeys.tabMovesFocus.bindTo(z),this._editorReadonly=a.EditorContextKeys.readOnly.bindTo(z),this._inDiffEditor=a.EditorContextKeys.inDiffEditor.bindTo(z),this._editorColumnSelection=a.EditorContextKeys.columnSelection.bindTo(z),this._hasMultipleSelections=a.EditorContextKeys.hasMultipleSelections.bindTo(z),this._hasNonEmptySelection=a.EditorContextKeys.hasNonEmptySelection.bindTo(z),this._canUndo=a.EditorContextKeys.canUndo.bindTo(z),this._canRedo=a.EditorContextKeys.canRedo.bindTo(z),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(K.TabFocus.onDidChangeTabFocus(()=>this._editorTabMovesFocus.set(K.TabFocus.getTabFocusMode("editorFocus")))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const q=this._editor.getOptions();this._editorTabMovesFocus.set(K.TabFocus.getTabFocusMode("editorFocus")),this._editorReadonly.set(q.get(88)),this._inDiffEditor.set(q.get(59)),this._editorColumnSelection.set(q.get(20))}_updateFromSelection(){const q=this._editor.getSelections();q?(this._hasMultipleSelections.set(q.length>1),this._hasNonEmptySelection.set(q.some(z=>!z.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 q=this._editor.getModel();this._canUndo.set(!!(q&&q.canUndo())),this._canRedo.set(!!(q&&q.canRedo()))}}class H extends w.Disposable{constructor(q,z,U){super(),this._editor=q,this._contextKeyService=z,this._languageFeaturesService=U,this._langId=a.EditorContextKeys.languageId.bindTo(z),this._hasCompletionItemProvider=a.EditorContextKeys.hasCompletionItemProvider.bindTo(z),this._hasCodeActionsProvider=a.EditorContextKeys.hasCodeActionsProvider.bindTo(z),this._hasCodeLensProvider=a.EditorContextKeys.hasCodeLensProvider.bindTo(z),this._hasDefinitionProvider=a.EditorContextKeys.hasDefinitionProvider.bindTo(z),this._hasDeclarationProvider=a.EditorContextKeys.hasDeclarationProvider.bindTo(z),this._hasImplementationProvider=a.EditorContextKeys.hasImplementationProvider.bindTo(z),this._hasTypeDefinitionProvider=a.EditorContextKeys.hasTypeDefinitionProvider.bindTo(z),this._hasHoverProvider=a.EditorContextKeys.hasHoverProvider.bindTo(z),this._hasDocumentHighlightProvider=a.EditorContextKeys.hasDocumentHighlightProvider.bindTo(z),this._hasDocumentSymbolProvider=a.EditorContextKeys.hasDocumentSymbolProvider.bindTo(z),this._hasReferenceProvider=a.EditorContextKeys.hasReferenceProvider.bindTo(z),this._hasRenameProvider=a.EditorContextKeys.hasRenameProvider.bindTo(z),this._hasSignatureHelpProvider=a.EditorContextKeys.hasSignatureHelpProvider.bindTo(z),this._hasInlayHintsProvider=a.EditorContextKeys.hasInlayHintsProvider.bindTo(z),this._hasDocumentFormattingProvider=a.EditorContextKeys.hasDocumentFormattingProvider.bindTo(z),this._hasDocumentSelectionFormattingProvider=a.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(z),this._hasMultipleDocumentFormattingProvider=a.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(z),this._hasMultipleDocumentSelectionFormattingProvider=a.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(z),this._isInWalkThrough=a.EditorContextKeys.isInWalkThroughSnippet.bindTo(z);const X=()=>this._update();this._register(q.onDidChangeModel(X)),this._register(q.onDidChangeModelLanguage(X)),this._register(U.completionProvider.onDidChange(X)),this._register(U.codeActionProvider.onDidChange(X)),this._register(U.codeLensProvider.onDidChange(X)),this._register(U.definitionProvider.onDidChange(X)),this._register(U.declarationProvider.onDidChange(X)),this._register(U.implementationProvider.onDidChange(X)),this._register(U.typeDefinitionProvider.onDidChange(X)),this._register(U.hoverProvider.onDidChange(X)),this._register(U.documentHighlightProvider.onDidChange(X)),this._register(U.documentSymbolProvider.onDidChange(X)),this._register(U.referenceProvider.onDidChange(X)),this._register(U.renameProvider.onDidChange(X)),this._register(U.documentFormattingEditProvider.onDidChange(X)),this._register(U.documentRangeFormattingEditProvider.onDidChange(X)),this._register(U.signatureHelpProvider.onDidChange(X)),this._register(U.inlayHintsProvider.onDidChange(X)),X()}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 q=this._editor.getModel();if(!q){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(q.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(q)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(q)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(q)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(q)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(q)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(q)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(q)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(q)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(q)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(q)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(q)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(q)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(q)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(q)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(q)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(q)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(q)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(q).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(q).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(q).length>1),this._isInWalkThrough.set(q.uri.scheme===b.Schemas.walkThroughSnippet)})}}e.EditorModeContext=H;class W extends w.Disposable{constructor(q){super(),this._onChange=this._register(new D.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(k.trackFocus(q)),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 ${get length(){return this._decorationIds.length}constructor(q,z){this._editor=q,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(z)&&z.length>0&&this.set(z)}onDidChange(q,z,U){return this._editor.onDidChangeModelDecorations(X=>{this._isChangingDecorations||q.call(z,X)},U)}getRange(q){return!this._editor.hasModel()||q>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[q])}getRanges(){if(!this._editor.hasModel())return[];const q=this._editor.getModel(),z=[];for(const U of this._decorationIds){const X=q.getDecorationRange(U);X&&z.push(X)}return z}has(q){return this._decorationIds.includes(q.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(q){try{this._isChangingDecorations=!0,this._editor.changeDecorations(z=>{this._decorationIds=z.deltaDecorations(this._decorationIds,q)})}finally{this._isChangingDecorations=!1}return this._decorationIds}}const Z=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=\'"),Q=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 re(ue){return Z+encodeURIComponent(ue.toString())+Q}const ce=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 de(ue){return ce+encodeURIComponent(ue.toString())+he}(0,T.registerThemingParticipant)((ue,q)=>{const z=ue.getColor(v.editorErrorForeground);z&&q.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${re(z)}") repeat-x bottom left; }`);const U=ue.getColor(v.editorWarningForeground);U&&q.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${re(U)}") repeat-x bottom left; }`);const X=ue.getColor(v.editorInfoForeground);X&&q.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${re(X)}") repeat-x bottom left; }`);const te=ue.getColor(v.editorHintForeground);te&&q.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${de(te)}") no-repeat bottom left; }`);const G=ue.getColor(u.editorUnnecessaryCodeOpacity);G&&q.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${G.rgba.a}; }`)})}),define(J[348],ee([1,0,7,35,86,167,148,81,14,26,11,6,61,2,31,76,306,15,32,116,188,232,801,596,764,41,12,5,96,171,22,38,144,110,83,277,593,97,13,55,8,182,43,80,33,74,23,418]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T,O,R,M,N,P,x,F,B,V,K,A,Y,ie,le,ne,se){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;class H{constructor(me,oe){this._contextMenuService=me,this._clipboardService=oe,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(me){return me.filter(oe=>!this._zonesMap[String(oe.id)])}clean(me){this._zones.length>0&&me.changeViewZones(oe=>{for(const pe of this._zones)oe.removeZone(pe)}),this._zones=[],this._zonesMap={},me.changeDecorations(oe=>{this._decorations=oe.deltaDecorations(this._decorations,[])})}apply(me,oe,pe,Le){const ve=Le?c.StableEditorScrollState.capture(me):null;me.changeViewZones(be=>{var De;for(const Me of this._zones)be.removeZone(Me);for(const Me of this._inlineDiffMargins)Me.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let Me=0,Oe=pe.zones.length;Me<Oe;Me++){const xe=pe.zones[Me];xe.suppressMouseDown=!0;const Fe=be.addZone(xe);this._zones.push(Fe),this._zonesMap[String(Fe)]=!0,pe.zones[Me].diff&&xe.marginDomNode&&(xe.suppressMouseDown=!1,((De=pe.zones[Me].diff)===null||De===void 0?void 0:De.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new v.InlineDiffMargin(Fe,xe.marginDomNode,me,pe.zones[Me].diff,this._contextMenuService,this._clipboardService)))}}),ve?.restore(me),me.changeDecorations(be=>{this._decorations=be.deltaDecorations(this._decorations,pe.decorations)}),oe?.setZones(pe.overviewZones)}}let W=0;const $=(0,ne.registerIcon)("diff-insert",g.Codicon.add,x.localize(0,null)),Z=(0,ne.registerIcon)("diff-remove",g.Codicon.remove,x.localize(1,null)),Q=(0,L.createTrustedTypesPolicy)("diffEditorWidget",{createHTML:_e=>_e}),re=x.localize(2,null);let ce=e.DiffEditorWidget=class gt extends i.Disposable{constructor(me,oe,pe,Le,ve,be,De,Me,Oe,xe,Fe){super(),this._editorProgressService=Fe,this._onDidDispose=this._register(new s.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModel=this._register(new s.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidUpdateDiff=this._register(new s.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new s.Emitter),this._lastOriginalWarning=null,this._lastModifiedWarning=null,De.willCreateDiffEditor(),this._documentDiffProvider=this._register(be.createInstance(f.WorkerBasedDocumentDiffProvider,oe)),this._register(this._documentDiffProvider.onDidChange(Be=>this._beginUpdateDecorationsSoon())),this._codeEditorService=De,this._contextKeyService=this._register(ve.createScoped(me)),this._instantiationService=be.createChild(new A.ServiceCollection([B.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=Me,this._notificationService=Oe,this._id=++W,this._state=0,this._updatingDiffProgress=null,this._domElement=me,oe=oe||{},this._options=Ae(oe,{enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{collapseUnchangedRegions:!1}}),this.isEmbeddedDiffEditorKey=T.EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService),this.isEmbeddedDiffEditorKey.set(typeof oe.isInEmbeddedEditor<"u"?oe.isInEmbeddedEditor:!1),this._updateDecorationsRunner=this._register(new S.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=gt._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(_.addStandardDisposableListener(this._overviewDomElement,_.EventType.POINTER_DOWN,Be=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(Be)})),this._register(_.addDisposableListener(this._overviewDomElement,_.EventType.MOUSE_WHEEL,Be=>{this._modifiedEditor.delegateScrollFromMouseWheelEvent(Be)},{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 H(xe,Le),this._modifiedEditorState=new H(xe,Le),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new d.ElementSizeObserver(this._containerDomElement,oe.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),oe.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(oe,pe.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(oe,pe.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=be.createInstance(u.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 U(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio)):this._setStrategy(new te(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(Me.onDidColorThemeChange(Be=>{this._strategy&&this._strategy.applyColors(Be)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=gt._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const Ue=h.EditorExtensionsRegistry.getDiffEditorContributions();for(const Be of Ue)try{this._register(be.createInstance(Be.ctor,this))}catch(Ke){(0,m.onUnexpectedError)(Ke)}this._codeEditorService.addDiffEditor(this)}_setState(me){this._state!==me&&(this._state=me,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(me,oe){let pe="monaco-diff-editor monaco-editor-background ";return oe&&(pe+="side-by-side "),pe+=(0,se.getThemeTypeSelector)(me.type),pe}_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&&(b.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(me,oe){const pe=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(me),oe);this._register(pe.onDidScrollChange(ve=>{this._isHandlingScrollEvent||!ve.scrollTopChanged&&!ve.scrollLeftChanged&&!ve.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:ve.scrollLeft,scrollTop:ve.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(pe.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(pe.onDidChangeConfiguration(ve=>{pe.getModel()&&(ve.hasChanged(48)&&this._updateDecorationsRunner.schedule(),ve.hasChanged(141)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(pe.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(pe.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const Le=this._contextKeyService.createKey("isInDiffLeftEditor",pe.hasWidgetFocus());return this._register(pe.onDidFocusEditorWidget(()=>Le.set(!0))),this._register(pe.onDidBlurEditorWidget(()=>Le.set(!1))),this._register(pe.onDidContentSizeChange(ve=>{const be=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+gt.ONE_OVERVIEW_WIDTH,De=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:De,contentWidth:be,contentHeightChanged:ve.contentHeightChanged,contentWidthChanged:ve.contentWidthChanged})})),pe}_createRightHandSideEditor(me,oe){const pe=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(me),oe);this._register(pe.onDidScrollChange(ve=>{this._isHandlingScrollEvent||!ve.scrollTopChanged&&!ve.scrollLeftChanged&&!ve.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:ve.scrollLeft,scrollTop:ve.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(pe.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(pe.onDidChangeConfiguration(ve=>{pe.getModel()&&(ve.hasChanged(48)&&this._updateDecorationsRunner.schedule(),ve.hasChanged(141)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(pe.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(pe.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(pe.onDidChangeModelOptions(ve=>{ve.tabSize&&this._updateDecorationsRunner.schedule()}));const Le=this._contextKeyService.createKey("isInDiffRightEditor",pe.hasWidgetFocus());return this._register(pe.onDidFocusEditorWidget(()=>Le.set(!0))),this._register(pe.onDidBlurEditorWidget(()=>Le.set(!1))),this._register(pe.onDidContentSizeChange(ve=>{const be=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+gt.ONE_OVERVIEW_WIDTH,De=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:De,contentWidth:be,contentHeightChanged:ve.contentHeightChanged,contentWidthChanged:ve.contentWidthChanged})})),this._register(pe.onMouseDown(ve=>{var be,De;if(!ve.event.rightButton&&ve.target.position&&(!((be=ve.target.element)===null||be===void 0)&&be.className.includes("arrow-revert-change"))){const Me=ve.target.position.lineNumber,Oe=ve.target,xe=(De=this._diffComputationResult)===null||De===void 0?void 0:De.changes.find(Fe=>Oe?.detail.afterLineNumber===Fe.modifiedStartLineNumber||Fe.modifiedEndLineNumber>0&&Fe.modifiedStartLineNumber===Me);xe&&this.revertChange(xe),ve.event.stopPropagation(),this._updateDecorations();return}})),pe}revertChange(me){const oe=this._modifiedEditor,pe=this._originalEditor.getModel(),Le=this._modifiedEditor.getModel();if(!pe||!Le||!oe)return;const ve=me.originalEndLineNumber>0?new y.Range(me.originalStartLineNumber,1,me.originalEndLineNumber,pe.getLineMaxColumn(me.originalEndLineNumber)):null,be=ve?pe.getValueInRange(ve):null,De=me.modifiedEndLineNumber>0?new y.Range(me.modifiedStartLineNumber,1,me.modifiedEndLineNumber,Le.getLineMaxColumn(me.modifiedEndLineNumber)):null,Me=Le.getEOL();if(me.originalEndLineNumber===0&&De){let Oe=De;me.modifiedStartLineNumber>1?Oe=De.setStartPosition(me.modifiedStartLineNumber-1,Le.getLineMaxColumn(me.modifiedStartLineNumber-1)):me.modifiedEndLineNumber<Le.getLineCount()&&(Oe=De.setEndPosition(me.modifiedEndLineNumber+1,1)),oe.executeEdits("diffEditor",[{range:Oe,text:""}])}else if(me.modifiedEndLineNumber===0&&be!==null){const Oe=me.modifiedStartLineNumber<Le.getLineCount()?new C.Position(me.modifiedStartLineNumber+1,1):new C.Position(me.modifiedStartLineNumber,Le.getLineMaxColumn(me.modifiedStartLineNumber));oe.executeEdits("diffEditor",[{range:y.Range.fromPositions(Oe,Oe),text:me.modifiedStartLineNumber<Le.getLineCount()?be+Me:Me+be}])}else De&&be!==null&&oe.executeEdits("diffEditor",[{range:De,text:be}])}_createInnerEditor(me,oe,pe,Le){return me.createInstance(a.CodeEditorWidget,oe,pe,Le)}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 I.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(me){const oe=Ae(me,this._options),pe=Pe(this._options,oe);this._options=oe,this.isEmbeddedDiffEditorKey.set(typeof me.isInEmbeddedEditor<"u"?me.isInEmbeddedEditor:!1);const Le=pe.ignoreTrimWhitespace||pe.renderIndicators||pe.renderMarginRevertIcon,ve=this._isVisible&&(pe.maxComputationTime||pe.maxFileSize);this._documentDiffProvider.setOptions(oe),Le?this._beginUpdateDecorations():ve&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(me)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(me)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio),pe.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new U(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio)):this._setStrategy(new te(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=gt._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),pe.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(me){if(me&&(!me.original||!me.modified))throw new Error(me.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._disposeOverviewRulers(),this._originalEditor.setModel(me?me.original:null),this._modifiedEditor.setModel(me?me.modified:null),this._updateDecorationsRunner.cancel(),me&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),me&&(this._createOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport(),this._onDidChangeModel.fire(),this._diffNavigator=this._register(this._instantiationService.createInstance(l.DiffNavigator,this,{alwaysRevealFirst:!1,findResultLoop:this.getModifiedEditor().getOption(39).loop}))}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(me){return this._modifiedEditor.getVisibleColumnFromPosition(me)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(me,oe="api"){this._modifiedEditor.setPosition(me,oe)}revealLine(me,oe=0){this._modifiedEditor.revealLine(me,oe)}revealLineInCenter(me,oe=0){this._modifiedEditor.revealLineInCenter(me,oe)}revealLineInCenterIfOutsideViewport(me,oe=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(me,oe)}revealLineNearTop(me,oe=0){this._modifiedEditor.revealLineNearTop(me,oe)}revealPosition(me,oe=0){this._modifiedEditor.revealPosition(me,oe)}revealPositionInCenter(me,oe=0){this._modifiedEditor.revealPositionInCenter(me,oe)}revealPositionInCenterIfOutsideViewport(me,oe=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(me,oe)}revealPositionNearTop(me,oe=0){this._modifiedEditor.revealPositionNearTop(me,oe)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(me,oe="api"){this._modifiedEditor.setSelection(me,oe)}setSelections(me,oe="api"){this._modifiedEditor.setSelections(me,oe)}revealLines(me,oe,pe=0){this._modifiedEditor.revealLines(me,oe,pe)}revealLinesInCenter(me,oe,pe=0){this._modifiedEditor.revealLinesInCenter(me,oe,pe)}revealLinesInCenterIfOutsideViewport(me,oe,pe=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(me,oe,pe)}revealLinesNearTop(me,oe,pe=0){this._modifiedEditor.revealLinesNearTop(me,oe,pe)}revealRange(me,oe=0,pe=!1,Le=!0){this._modifiedEditor.revealRange(me,oe,pe,Le)}revealRangeInCenter(me,oe=0){this._modifiedEditor.revealRangeInCenter(me,oe)}revealRangeInCenterIfOutsideViewport(me,oe=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(me,oe)}revealRangeNearTop(me,oe=0){this._modifiedEditor.revealRangeNearTop(me,oe)}revealRangeNearTopIfOutsideViewport(me,oe=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(me,oe)}revealRangeAtTop(me,oe=0){this._modifiedEditor.revealRangeAtTop(me,oe)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}focus(){this._modifiedEditor.focus()}trigger(me,oe,pe){this._modifiedEditor.trigger(me,oe,pe)}createDecorationsCollection(me){return this._modifiedEditor.createDecorationsCollection(me)}changeDecorations(me){return this._modifiedEditor.changeDecorations(me)}saveViewState(){const me=this._originalEditor.saveViewState(),oe=this._modifiedEditor.saveViewState();return{original:me,modified:oe}}restoreViewState(me){if(me&&me.original&&me.modified){const oe=me;this._originalEditor.restoreViewState(oe.original),this._modifiedEditor.restoreViewState(oe.modified)}}layout(me){this._elementSizeObserver.observe(me)}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const me=this._elementSizeObserver.getHeight(),oe=this._getReviewHeight(),pe=gt.ENTIRE_DIFF_OVERVIEW_WIDTH-2*gt.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:gt.ONE_OVERVIEW_WIDTH,right:pe+gt.ONE_OVERVIEW_WIDTH,height:me-oe}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:gt.ONE_OVERVIEW_WIDTH,height:me-oe}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),gt.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(me,oe){return!me&&!oe?!0:!me||!oe?!1:me.toString()===oe.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1);const me=this._originalEditor.getModel(),oe=this._modifiedEditor.getModel();if(!me||!oe)return;this._diffComputationToken++;const pe=this._diffComputationToken,Le=this._options.maxFileSize*1024*1024,ve=be=>{const De=be.getValueLength();return Le===0||De<=Le};if(!ve(me)||!ve(oe)){(!gt._equals(me.uri,this._lastOriginalWarning)||!gt._equals(oe.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=me.uri,this._lastModifiedWarning=oe.uri,this._notificationService.warn(x.localize(3,null)));return}this._setState(1),this._documentDiffProvider.computeDiff(me,oe,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace,maxComputationTimeMs:this._options.maxComputationTime}).then(be=>{pe===this._diffComputationToken&&me===this._originalEditor.getModel()&&oe===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult={identical:be.identical,quitEarly:be.quitEarly,changes2:be.changes,changes:be.changes.map(De=>{let Me,Oe,xe,Fe,Ue=De.innerChanges;return De.originalRange.isEmpty?(Me=De.originalRange.startLineNumber-1,Oe=0,Ue=void 0):(Me=De.originalRange.startLineNumber,Oe=De.originalRange.endLineNumberExclusive-1),De.modifiedRange.isEmpty?(xe=De.modifiedRange.startLineNumber-1,Fe=0,Ue=void 0):(xe=De.modifiedRange.startLineNumber,Fe=De.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:Me,originalEndLineNumber:Oe,modifiedStartLineNumber:xe,modifiedEndLineNumber:Fe,charChanges:Ue?.map(Be=>({originalStartLineNumber:Be.originalRange.startLineNumber,originalStartColumn:Be.originalRange.startColumn,originalEndLineNumber:Be.originalRange.endLineNumber,originalEndColumn:Be.originalRange.endColumn,modifiedStartLineNumber:Be.modifiedRange.startLineNumber,modifiedStartColumn:Be.modifiedRange.startColumn,modifiedEndLineNumber:Be.modifiedRange.endLineNumber,modifiedEndColumn:Be.modifiedRange.endColumn}))}})},this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},be=>{pe===this._diffComputationToken&&me===this._originalEditor.getModel()&&oe===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 me=this._diffComputationResult?this._diffComputationResult.changes:[],oe=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),pe=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),Le=this._options.renderMarginRevertIcon&&!this._modifiedEditor.getOption(88),ve=this._strategy.getEditorsDiffDecorations(me,this._options.ignoreTrimWhitespace,this._options.renderIndicators,Le,oe,pe);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,ve.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,ve.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(me){const oe=Object.assign({},me);return oe.inDiffEditor=!0,oe.automaticLayout=!1,oe.scrollbar=Object.assign({},oe.scrollbar||{}),oe.scrollbar.vertical="visible",oe.folding=!1,oe.codeLens=this._options.diffCodeLens,oe.fixedOverflowWidgets=!0,oe.minimap=Object.assign({},oe.minimap||{}),oe.minimap.enabled=!1,oe}_adjustOptionsForLeftHandSide(me){const oe=this._adjustOptionsForSubEditor(me);return this._options.renderSideBySide?oe.wordWrapOverride1=this._options.diffWordWrap:(oe.wordWrapOverride1="off",oe.wordWrapOverride2="off"),me.originalAriaLabel&&(oe.ariaLabel=me.originalAriaLabel),this._updateAriaLabel(oe),oe.readOnly=!this._options.originalEditable,oe.dropIntoEditor={enabled:!oe.readOnly},oe.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},oe),{dimension:{height:0,width:0}})}_updateAriaLabel(me){var oe;let pe=(oe=me.ariaLabel)!==null&&oe!==void 0?oe:"";this._options.accessibilityVerbose?pe+=re:pe&&(pe=pe.replaceAll(re,"")),me.ariaLabel=pe}_adjustOptionsForRightHandSide(me){const oe=this._adjustOptionsForSubEditor(me);return me.modifiedAriaLabel&&(oe.ariaLabel=me.modifiedAriaLabel),this._updateAriaLabel(oe),oe.wordWrapOverride1=this._options.diffWordWrap,oe.revealHorizontalRightPadding=p.EditorOptions.revealHorizontalRightPadding.defaultValue+gt.ENTIRE_DIFF_OVERVIEW_WIDTH,oe.scrollbar.verticalHasArrows=!1,oe.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},oe),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const me=this._elementSizeObserver.getWidth(),oe=this._elementSizeObserver.getHeight(),pe=this._getReviewHeight(),Le=this._strategy.layout();this._originalDomNode.style.width=Le+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=me-Le+"px",this._modifiedDomNode.style.left=Le+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=oe-pe+"px",this._overviewDomElement.style.width=gt.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=me-gt.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(gt.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:Le,height:oe-pe}),this._modifiedEditor.layout({width:me-Le-(this._options.renderOverviewRuler?gt.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:oe-pe}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(oe-pe,me,pe),this._layoutOverviewViewport()}_layoutOverviewViewport(){const me=this._computeOverviewViewport();me?(this._overviewViewportDomElement.setTop(me.top),this._overviewViewportDomElement.setHeight(me.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const me=this._modifiedEditor.getLayoutInfo();if(!me)return null;const oe=this._modifiedEditor.getScrollTop(),pe=this._modifiedEditor.getScrollHeight(),Le=Math.max(0,me.height),ve=Math.max(0,Le-2*0),be=pe>0?ve/pe:0,De=Math.max(0,Math.floor(me.height*be)),Me=Math.floor(oe*be);return{height:De,top:Me}}_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(me){var oe;(oe=this._strategy)===null||oe===void 0||oe.dispose(),this._strategy=me,this._boundarySashes&&me.setBoundarySashes(this._boundarySashes),me.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(me,oe){const pe=this._diffComputationResult?this._diffComputationResult.changes:[];if(pe.length===0||me<oe(pe[0]))return null;let Le=0,ve=pe.length-1;for(;Le<ve;){const be=Math.floor((Le+ve)/2),De=oe(pe[be]),Me=be+1<=ve?oe(pe[be+1]):1073741824;me<De?ve=be-1:me>=Me?Le=be+1:(Le=be,ve=be)}return pe[Le]}_getEquivalentLineForOriginalLineNumber(me){const oe=this._getLineChangeAtOrBeforeLineNumber(me,Me=>Me.originalStartLineNumber);if(!oe)return me;const pe=oe.originalStartLineNumber+(oe.originalEndLineNumber>0?-1:0),Le=oe.modifiedStartLineNumber+(oe.modifiedEndLineNumber>0?-1:0),ve=oe.originalEndLineNumber>0?oe.originalEndLineNumber-oe.originalStartLineNumber+1:0,be=oe.modifiedEndLineNumber>0?oe.modifiedEndLineNumber-oe.modifiedStartLineNumber+1:0,De=me-pe;return De<=ve?Le+Math.min(De,be):Le+be-ve+De}_getEquivalentLineForModifiedLineNumber(me){const oe=this._getLineChangeAtOrBeforeLineNumber(me,Me=>Me.modifiedStartLineNumber);if(!oe)return me;const pe=oe.originalStartLineNumber+(oe.originalEndLineNumber>0?-1:0),Le=oe.modifiedStartLineNumber+(oe.modifiedEndLineNumber>0?-1:0),ve=oe.originalEndLineNumber>0?oe.originalEndLineNumber-oe.originalStartLineNumber+1:0,be=oe.modifiedEndLineNumber>0?oe.modifiedEndLineNumber-oe.modifiedStartLineNumber+1:0,De=me-Le;return De<=be?pe+Math.min(De,ve):pe+ve-be+De}getDiffLineInformationForOriginal(me){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(me)}:null}getDiffLineInformationForModified(me){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(me)}:null}};ce.ONE_OVERVIEW_WIDTH=15,ce.ENTIRE_DIFF_OVERVIEW_WIDTH=30,ce.UPDATE_DIFF_DECORATIONS_DELAY=200,e.DiffEditorWidget=ce=Te([ge(3,F.IClipboardService),ge(4,B.IContextKeyService),ge(5,K.IInstantiationService),ge(6,o.ICodeEditorService),ge(7,se.IThemeService),ge(8,Y.INotificationService),ge(9,V.IContextMenuService),ge(10,ie.IEditorProgressService)],ce);class he extends i.Disposable{constructor(me){super(),this._dataSource=me,this._insertColor=null,this._removeColor=null}applyColors(me){const oe=me.getColor(le.diffOverviewRulerInserted)||(me.getColor(le.diffInserted)||le.defaultInsertColor).transparent(2),pe=me.getColor(le.diffOverviewRulerRemoved)||(me.getColor(le.diffRemoved)||le.defaultRemoveColor).transparent(2),Le=!oe.equals(this._insertColor)||!pe.equals(this._removeColor);return this._insertColor=oe,this._removeColor=pe,Le}getEditorsDiffDecorations(me,oe,pe,Le,ve,be){be=be.sort((xe,Fe)=>xe.afterLineNumber-Fe.afterLineNumber),ve=ve.sort((xe,Fe)=>xe.afterLineNumber-Fe.afterLineNumber);const De=this._getViewZones(me,ve,be,pe),Me=this._getOriginalEditorDecorations(De,me,oe,pe),Oe=this._getModifiedEditorDecorations(De,me,oe,pe,Le);return{original:{decorations:Me.decorations,overviewZones:Me.overviewZones,zones:De.original},modified:{decorations:Oe.decorations,overviewZones:Oe.overviewZones,zones:De.modified}}}setBoundarySashes(me){}}class de{constructor(me){this._source=me,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 ue{constructor(me,oe,pe,Le,ve){this._lineChanges=me,this._originalForeignVZ=oe,this._modifiedForeignVZ=pe,this._originalEditor=Le,this._modifiedEditor=ve}static _getViewLineCount(me,oe,pe){const Le=me.getModel(),ve=me._getViewModel();if(Le&&ve){const be=ke(Le,ve,oe,pe);return be.endLineNumber-be.startLineNumber+1}return pe-oe+1}getViewZones(){const me=this._originalEditor.getOption(64),oe=this._modifiedEditor.getOption(64),pe=this._originalEditor.getOption(141).wrappingColumn!==-1,Le=this._modifiedEditor.getOption(141).wrappingColumn!==-1,ve=pe||Le,be=this._originalEditor.getModel(),De=this._originalEditor._getViewModel().coordinatesConverter,Me=this._modifiedEditor._getViewModel().coordinatesConverter,Oe={original:[],modified:[]};let xe=0,Fe=0,Ue=0,Be=0,Ke=0,Ye=0;const He=(Je,et)=>Je.afterLineNumber-et.afterLineNumber,Ne=(Je,et)=>{if(et.domNode===null&&Je.length>0){const $e=Je[Je.length-1];if($e.afterLineNumber===et.afterLineNumber&&$e.domNode===null){$e.heightInLines+=et.heightInLines;return}}Je.push(et)},ze=new de(this._modifiedForeignVZ),Ve=new de(this._originalForeignVZ);let Ze=1,tt=1;for(let Je=0,et=this._lineChanges.length;Je<=et;Je++){const $e=Je<et?this._lineChanges[Je]:null;$e!==null?(Ue=$e.originalStartLineNumber+($e.originalEndLineNumber>0?-1:0),Be=$e.modifiedStartLineNumber+($e.modifiedEndLineNumber>0?-1:0),Fe=$e.originalEndLineNumber>0?ue._getViewLineCount(this._originalEditor,$e.originalStartLineNumber,$e.originalEndLineNumber):0,xe=$e.modifiedEndLineNumber>0?ue._getViewLineCount(this._modifiedEditor,$e.modifiedStartLineNumber,$e.modifiedEndLineNumber):0,Ke=Math.max($e.originalStartLineNumber,$e.originalEndLineNumber),Ye=Math.max($e.modifiedStartLineNumber,$e.modifiedEndLineNumber)):(Ue+=1e7+Fe,Be+=1e7+xe,Ke=Ue,Ye=Be);let dt=[],at=[];if(ve){let Xe;$e?$e.originalEndLineNumber>0?Xe=$e.originalStartLineNumber-Ze:Xe=$e.modifiedStartLineNumber-tt:Xe=be.getLineCount()-Ze+1;for(let Ge=0;Ge<Xe;Ge++){const Re=Ze+Ge,We=tt+Ge,je=De.getModelLineViewLineCount(Re),qe=Me.getModelLineViewLineCount(We);je<qe?dt.push({afterLineNumber:Re,heightInLines:qe-je,domNode:null,marginDomNode:null}):je>qe&&at.push({afterLineNumber:We,heightInLines:je-qe,domNode:null,marginDomNode:null})}$e&&(Ze=($e.originalEndLineNumber>0?$e.originalEndLineNumber:$e.originalStartLineNumber)+1,tt=($e.modifiedEndLineNumber>0?$e.modifiedEndLineNumber:$e.modifiedStartLineNumber)+1)}for(;ze.current&&ze.current.afterLineNumber<=Ye;){let Xe;ze.current.afterLineNumber<=Be?Xe=Ue-Be+ze.current.afterLineNumber:Xe=Ke;let Ge=null;$e&&$e.modifiedStartLineNumber<=ze.current.afterLineNumber&&ze.current.afterLineNumber<=$e.modifiedEndLineNumber&&(Ge=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),dt.push({afterLineNumber:Xe,heightInLines:ze.current.height/oe,domNode:null,marginDomNode:Ge}),ze.advance()}for(;Ve.current&&Ve.current.afterLineNumber<=Ke;){let Xe;Ve.current.afterLineNumber<=Ue?Xe=Be-Ue+Ve.current.afterLineNumber:Xe=Ye,at.push({afterLineNumber:Xe,heightInLines:Ve.current.height/me,domNode:null}),Ve.advance()}if($e!==null&&fe($e)){const Xe=this._produceOriginalFromDiff($e,Fe,xe);Xe&&dt.push(Xe)}if($e!==null&&Ce($e)){const Xe=this._produceModifiedFromDiff($e,Fe,xe);Xe&&at.push(Xe)}let rt=0,ht=0;for(dt=dt.sort(He),at=at.sort(He);rt<dt.length&&ht<at.length;){const Xe=dt[rt],Ge=at[ht],Re=Xe.afterLineNumber-Ue,We=Ge.afterLineNumber-Be;Re<We?(Ne(Oe.original,Xe),rt++):We<Re?(Ne(Oe.modified,Ge),ht++):Xe.shouldNotShrink?(Ne(Oe.original,Xe),rt++):Ge.shouldNotShrink?(Ne(Oe.modified,Ge),ht++):Xe.heightInLines>=Ge.heightInLines?(Xe.heightInLines-=Ge.heightInLines,ht++):(Ge.heightInLines-=Xe.heightInLines,rt++)}for(;rt<dt.length;)Ne(Oe.original,dt[rt]),rt++;for(;ht<at.length;)Ne(Oe.modified,at[ht]),ht++}return{original:ue._ensureDomNodes(Oe.original),modified:ue._ensureDomNodes(Oe.modified)}}static _ensureDomNodes(me){return me.map(oe=>(oe.domNode||(oe.domNode=Ie()),oe))}}function q(_e,me,oe,pe,Le){return{range:new y.Range(_e,me,oe,pe),options:Le}}const z={arrowRevertChange:O.ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new t.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(x.localize(4,null)),glyphMarginClassName:"arrow-revert-change "+n.ThemeIcon.asClassName(g.Codicon.arrowRight),zIndex:10001}),charDelete:O.ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:O.ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:O.ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:O.ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:O.ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:O.ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+n.ThemeIcon.asClassName($),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:O.ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:O.ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+n.ThemeIcon.asClassName(Z),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:O.ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class U extends he{constructor(me,oe,pe){super(me),this._disableSash=oe===!1,this._defaultRatio=pe,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new w.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(Le=>this._onSashDrag(Le)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(me,oe){this._defaultRatio=oe;const pe=me===!1;this._disableSash!==pe&&(this._disableSash=pe,this._sash.state=this._disableSash?0:3)}layout(me=this._sashRatio||this._defaultRatio){const pe=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?ce.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let Le=Math.floor((me||this._defaultRatio)*pe);const ve=Math.floor(this._defaultRatio*pe);return Le=this._disableSash?ve:Le||ve,pe>U.MINIMUM_EDITOR_WIDTH*2?(Le<U.MINIMUM_EDITOR_WIDTH&&(Le=U.MINIMUM_EDITOR_WIDTH),Le>pe-U.MINIMUM_EDITOR_WIDTH&&(Le=pe-U.MINIMUM_EDITOR_WIDTH)):Le=ve,this._sashPosition!==Le&&(this._sashPosition=Le),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(me){const pe=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?ce.ENTIRE_DIFF_OVERVIEW_WIDTH:0),Le=this.layout((this._startSashPosition+(me.currentX-me.startX))/pe);this._sashRatio=Le/pe,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=this._defaultRatio,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(me){return 0}getVerticalSashLeft(me){return this._sashPosition}getVerticalSashHeight(me){return this._dataSource.getHeight()}setBoundarySashes(me){this._sash.orthogonalEndSash=me.bottom}_getViewZones(me,oe,pe){const Le=this._dataSource.getOriginalEditor(),ve=this._dataSource.getModifiedEditor();return new X(me,oe,pe,Le,ve).getViewZones()}_getOriginalEditorDecorations(me,oe,pe,Le){const ve=this._dataSource.getOriginalEditor(),be=String(this._removeColor),De={decorations:[],overviewZones:[]},Me=ve.getModel(),Oe=ve._getViewModel();for(const xe of oe)if(Ce(xe)){De.decorations.push({range:new y.Range(xe.originalStartLineNumber,1,xe.originalEndLineNumber,1073741824),options:Le?z.lineDeleteWithSign:z.lineDelete}),(!fe(xe)||!xe.charChanges)&&De.decorations.push(q(xe.originalStartLineNumber,1,xe.originalEndLineNumber,1073741824,z.charDeleteWholeLine));const Fe=ke(Me,Oe,xe.originalStartLineNumber,xe.originalEndLineNumber);if(De.overviewZones.push(new P.OverviewRulerZone(Fe.startLineNumber,Fe.endLineNumber,0,be)),xe.charChanges){for(const Ue of xe.charChanges)if(ye(Ue))if(pe)for(let Be=Ue.originalStartLineNumber;Be<=Ue.originalEndLineNumber;Be++){let Ke,Ye;Be===Ue.originalStartLineNumber?Ke=Ue.originalStartColumn:Ke=Me.getLineFirstNonWhitespaceColumn(Be),Be===Ue.originalEndLineNumber?Ye=Ue.originalEndColumn:Ye=Me.getLineLastNonWhitespaceColumn(Be),De.decorations.push(q(Be,Ke,Be,Ye,z.charDelete))}else De.decorations.push(q(Ue.originalStartLineNumber,Ue.originalStartColumn,Ue.originalEndLineNumber,Ue.originalEndColumn,z.charDelete))}}return De}_getModifiedEditorDecorations(me,oe,pe,Le,ve){const be=this._dataSource.getModifiedEditor(),De=String(this._insertColor),Me={decorations:[],overviewZones:[]},Oe=be.getModel(),xe=be._getViewModel();for(const Fe of oe){if(ve)if(Fe.modifiedEndLineNumber>0)Me.decorations.push({range:new y.Range(Fe.modifiedStartLineNumber,1,Fe.modifiedStartLineNumber,1),options:z.arrowRevertChange});else{const Ue=me.modified.find(Be=>Be.afterLineNumber===Fe.modifiedStartLineNumber);Ue&&(Ue.marginDomNode=Ee())}if(fe(Fe)){Me.decorations.push({range:new y.Range(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824),options:Le?z.lineInsertWithSign:z.lineInsert}),(!Ce(Fe)||!Fe.charChanges)&&Me.decorations.push(q(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824,z.charInsertWholeLine));const Ue=ke(Oe,xe,Fe.modifiedStartLineNumber,Fe.modifiedEndLineNumber);if(Me.overviewZones.push(new P.OverviewRulerZone(Ue.startLineNumber,Ue.endLineNumber,0,De)),Fe.charChanges){for(const Be of Fe.charChanges)if(Se(Be))if(pe)for(let Ke=Be.modifiedStartLineNumber;Ke<=Be.modifiedEndLineNumber;Ke++){let Ye,He;Ke===Be.modifiedStartLineNumber?Ye=Be.modifiedStartColumn:Ye=Oe.getLineFirstNonWhitespaceColumn(Ke),Ke===Be.modifiedEndLineNumber?He=Be.modifiedEndColumn:He=Oe.getLineLastNonWhitespaceColumn(Ke),Me.decorations.push(q(Ke,Ye,Ke,He,z.charInsert))}else Me.decorations.push(q(Be.modifiedStartLineNumber,Be.modifiedStartColumn,Be.modifiedEndLineNumber,Be.modifiedEndColumn,z.charInsert))}}}return Me}}U.MINIMUM_EDITOR_WIDTH=100;class X extends ue{constructor(me,oe,pe,Le,ve){super(me,oe,pe,Le,ve)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(me,oe,pe){return pe>oe?{afterLineNumber:Math.max(me.originalStartLineNumber,me.originalEndLineNumber),heightInLines:pe-oe,domNode:null}:null}_produceModifiedFromDiff(me,oe,pe){return oe>pe?{afterLineNumber:Math.max(me.modifiedStartLineNumber,me.modifiedEndLineNumber),heightInLines:oe-pe,domNode:null}:null}}class te extends he{constructor(me,oe){super(me),this._decorationsLeft=me.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(me.getOriginalEditor().onDidLayoutChange(pe=>{this._decorationsLeft!==pe.decorationsLeft&&(this._decorationsLeft=pe.decorationsLeft,me.relayoutEditors())}))}setEnableSplitViewResizing(me){}_getViewZones(me,oe,pe,Le){const ve=this._dataSource.getOriginalEditor(),be=this._dataSource.getModifiedEditor();return new G(me,oe,pe,ve,be,Le).getViewZones()}_getOriginalEditorDecorations(me,oe,pe,Le){const ve=String(this._removeColor),be={decorations:[],overviewZones:[]},De=this._dataSource.getOriginalEditor(),Me=De.getModel(),Oe=De._getViewModel();let xe=0;for(const Fe of oe)if(Ce(Fe)){for(be.decorations.push({range:new y.Range(Fe.originalStartLineNumber,1,Fe.originalEndLineNumber,1073741824),options:z.lineDeleteMargin});xe<me.modified.length;){const Ke=me.modified[xe];if(Ke.diff&&Ke.diff.originalStartLineNumber>=Fe.originalStartLineNumber)break;xe++}let Ue=0;if(xe<me.modified.length){const Ke=me.modified[xe];Ke.diff&&Ke.diff.originalStartLineNumber===Fe.originalStartLineNumber&&Ke.diff.originalEndLineNumber===Fe.originalEndLineNumber&&Ke.diff.modifiedStartLineNumber===Fe.modifiedStartLineNumber&&Ke.diff.modifiedEndLineNumber===Fe.modifiedEndLineNumber&&(Ue=Ke.heightInLines)}const Be=ke(Me,Oe,Fe.originalStartLineNumber,Fe.originalEndLineNumber);be.overviewZones.push(new P.OverviewRulerZone(Be.startLineNumber,Be.endLineNumber,Ue,ve))}return be}_getModifiedEditorDecorations(me,oe,pe,Le,ve){const be=this._dataSource.getModifiedEditor(),De=String(this._insertColor),Me={decorations:[],overviewZones:[]},Oe=be.getModel(),xe=be._getViewModel();for(const Fe of oe)if(fe(Fe)){Me.decorations.push({range:new y.Range(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824),options:Le?z.lineInsertWithSign:z.lineInsert});const Ue=ke(Oe,xe,Fe.modifiedStartLineNumber,Fe.modifiedEndLineNumber);if(Me.overviewZones.push(new P.OverviewRulerZone(Ue.startLineNumber,Ue.endLineNumber,0,De)),Fe.charChanges){for(const Be of Fe.charChanges)if(Se(Be))if(pe)for(let Ke=Be.modifiedStartLineNumber;Ke<=Be.modifiedEndLineNumber;Ke++){let Ye,He;Ke===Be.modifiedStartLineNumber?Ye=Be.modifiedStartColumn:Ye=Oe.getLineFirstNonWhitespaceColumn(Ke),Ke===Be.modifiedEndLineNumber?He=Be.modifiedEndColumn:He=Oe.getLineLastNonWhitespaceColumn(Ke),Me.decorations.push(q(Ke,Ye,Ke,He,z.charInsert))}else Me.decorations.push(q(Be.modifiedStartLineNumber,Be.modifiedStartColumn,Be.modifiedEndLineNumber,Be.modifiedEndColumn,z.charInsert))}else Me.decorations.push(q(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824,z.charInsertWholeLine))}return Me}layout(){return Math.max(5,this._decorationsLeft)}}class G extends ue{constructor(me,oe,pe,Le,ve,be){super(me,oe,pe,Le,ve),this._originalModel=Le.getModel(),this._renderIndicators=be,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const me=super.getViewZones();return this._finalize(me),me}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const me=document.createElement("div");return me.className="inline-added-margin-view-zone",me}_produceOriginalFromDiff(me,oe,pe){const Le=document.createElement("div");return Le.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(me.originalStartLineNumber,me.originalEndLineNumber),heightInLines:pe,domNode:document.createElement("div"),marginDomNode:Le}}_produceModifiedFromDiff(me,oe,pe){const Le=document.createElement("div");Le.className=`view-lines line-delete ${D.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const ve=document.createElement("div");ve.className="inline-deleted-margin-view-zone";const be={shouldNotShrink:!0,afterLineNumber:me.modifiedEndLineNumber===0?me.modifiedStartLineNumber:me.modifiedStartLineNumber-1,heightInLines:oe,minWidthInPx:0,domNode:Le,marginDomNode:ve,diff:{originalStartLineNumber:me.originalStartLineNumber,originalEndLineNumber:me.originalEndLineNumber,modifiedStartLineNumber:me.modifiedStartLineNumber,modifiedEndLineNumber:me.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let De=me.originalStartLineNumber;De<=me.originalEndLineNumber;De++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(De),null,null);return this._pendingLineChange.push(me),this._pendingViewZones.push(be),be}_finalize(me){const oe=this._modifiedEditor.getOptions(),pe=this._modifiedEditor.getModel().getOptions().tabSize,Le=oe.get(48),ve=oe.get(31),be=Le.typicalHalfwidthCharacterWidth,De=oe.get(100),Me=this._originalModel.mightContainNonBasicASCII(),Oe=this._originalModel.mightContainRTL(),xe=oe.get(64),Ue=oe.get(140).decorationsWidth,Be=oe.get(113),Ke=oe.get(95),Ye=oe.get(90),He=oe.get(49),Ne=this._lineBreaksComputer.finalize();let ze=0;for(let Ve=0;Ve<this._pendingLineChange.length;Ve++){const Ze=this._pendingLineChange[Ve],tt=this._pendingViewZones[Ve],Je=tt.domNode;(0,r.applyFontInfo)(Je,Le);const et=tt.marginDomNode;(0,r.applyFontInfo)(et,Le);const $e=[];if(Ze.charChanges)for(const We of Ze.charChanges)ye(We)&&$e.push(new N.InlineDecoration(new y.Range(We.originalStartLineNumber,We.originalStartColumn,We.originalEndLineNumber,We.originalEndColumn),"char-delete",0));const dt=$e.length>0,at=new E.StringBuilder(1e4);let rt=0,ht=0,Xe=null;for(let We=Ze.originalStartLineNumber;We<=Ze.originalEndLineNumber;We++){const je=We-Ze.originalStartLineNumber,qe=this._originalModel.tokenization.getLineTokens(We),nt=qe.getLineContent(),Qe=Ne[ze++],st=R.LineDecoration.filter($e,We,1,nt.length+1);if(Qe){let ot=0;for(const pt of Qe.breakOffsets){const ft=qe.sliceAndInflate(ot,pt,0),_t=nt.substring(ot,pt);rt=Math.max(rt,this._renderOriginalLine(ht++,_t,ft,R.LineDecoration.extractWrapped(st,ot,pt),dt,Me,Oe,Le,ve,xe,Ue,Be,Ke,Ye,He,pe,at,et)),ot=pt}for(Xe||(Xe=[]);Xe.length<je;)Xe[Xe.length]=1;Xe[je]=Qe.breakOffsets.length,tt.heightInLines+=Qe.breakOffsets.length-1;const lt=document.createElement("div");lt.className="gutter-delete",me.original.push({afterLineNumber:We,afterColumn:0,heightInLines:Qe.breakOffsets.length-1,domNode:Ie(),marginDomNode:lt})}else rt=Math.max(rt,this._renderOriginalLine(ht++,nt,qe,st,dt,Me,Oe,Le,ve,xe,Ue,Be,Ke,Ye,He,pe,at,et))}rt+=De;const Ge=at.build(),Re=Q?Q.createHTML(Ge):Ge;if(Je.innerHTML=Re,tt.minWidthInPx=rt*be,Xe){const We=Ze.originalEndLineNumber-Ze.originalStartLineNumber;for(;Xe.length<=We;)Xe[Xe.length]=1}tt.diff.viewLineCounts=Xe}me.original.sort((Ve,Ze)=>Ve.afterLineNumber-Ze.afterLineNumber)}_renderOriginalLine(me,oe,pe,Le,ve,be,De,Me,Oe,xe,Fe,Ue,Be,Ke,Ye,He,Ne,ze){Ne.appendString(\'<div class="view-line\'),ve||Ne.appendString(" char-delete"),Ne.appendString(\'" style="top:\'),Ne.appendString(String(me*xe)),Ne.appendString(\'px;width:1000000px;">\');const Ve=N.ViewLineRenderingData.isBasicASCII(oe,be),Ze=N.ViewLineRenderingData.containsRTL(oe,Ve,De),tt=(0,M.renderViewLine)(new M.RenderLineInput(Me.isMonospace&&!Oe,Me.canUseHalfwidthRightwardsArrow,oe,!1,Ve,Ze,0,pe,Le,He,0,Me.spaceWidth,Me.middotWidth,Me.wsmiddotWidth,Ue,Be,Ke,Ye!==p.EditorFontLigatures.OFF,null),Ne);if(Ne.appendString("</div>"),this._renderIndicators){const Je=document.createElement("div");Je.className=`delete-sign ${n.ThemeIcon.asClassName(Z)}`,Je.setAttribute("style",`position:absolute;top:${me*xe}px;width:${Fe}px;height:${xe}px;right:0;`),ze.appendChild(Je)}return tt.characterMapping.getHorizontalOffset(tt.characterMapping.length)}}function ae(_e,me){return(0,p.stringSet)(_e,me,["off","on","inherit"])}function fe(_e){return _e.modifiedEndLineNumber>0}function Ce(_e){return _e.originalEndLineNumber>0}function Se(_e){return _e.modifiedStartLineNumber===_e.modifiedEndLineNumber?_e.modifiedEndColumn-_e.modifiedStartColumn>0:_e.modifiedEndLineNumber-_e.modifiedStartLineNumber>0}function ye(_e){return _e.originalStartLineNumber===_e.originalEndLineNumber?_e.originalEndColumn-_e.originalStartColumn>0:_e.originalEndLineNumber-_e.originalStartLineNumber>0}function Ie(){const _e=document.createElement("div");return _e.className="diagonal-fill",_e}function Ee(){const _e=document.createElement("div");return _e.className="arrow-revert-change "+n.ThemeIcon.asClassName(g.Codicon.arrowRight),_.$("div",{},_e)}function ke(_e,me,oe,pe){const Le=_e.getLineCount();return oe=Math.min(Le,Math.max(1,oe)),pe=Math.min(Le,Math.max(1,pe)),me.coordinatesConverter.convertModelRangeToViewRange(new y.Range(oe,_e.getLineMinColumn(oe),pe,_e.getLineMaxColumn(pe)))}function Ae(_e,me){return{enableSplitViewResizing:(0,p.boolean)(_e.enableSplitViewResizing,me.enableSplitViewResizing),splitViewDefaultRatio:(0,p.clampedFloat)(_e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,p.boolean)(_e.renderSideBySide,me.renderSideBySide),renderMarginRevertIcon:(0,p.boolean)(_e.renderMarginRevertIcon,me.renderMarginRevertIcon),maxComputationTime:(0,p.clampedInt)(_e.maxComputationTime,me.maxComputationTime,0,1073741824),maxFileSize:(0,p.clampedInt)(_e.maxFileSize,me.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,p.boolean)(_e.ignoreTrimWhitespace,me.ignoreTrimWhitespace),renderIndicators:(0,p.boolean)(_e.renderIndicators,me.renderIndicators),originalEditable:(0,p.boolean)(_e.originalEditable,me.originalEditable),diffCodeLens:(0,p.boolean)(_e.diffCodeLens,me.diffCodeLens),renderOverviewRuler:(0,p.boolean)(_e.renderOverviewRuler,me.renderOverviewRuler),diffWordWrap:ae(_e.diffWordWrap,me.diffWordWrap),diffAlgorithm:(0,p.stringSet)(_e.diffAlgorithm,me.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,p.boolean)(_e.accessibilityVerbose,me.accessibilityVerbose),experimental:{collapseUnchangedRegions:!1}}}function Pe(_e,me){return{enableSplitViewResizing:_e.enableSplitViewResizing!==me.enableSplitViewResizing,renderSideBySide:_e.renderSideBySide!==me.renderSideBySide,renderMarginRevertIcon:_e.renderMarginRevertIcon!==me.renderMarginRevertIcon,maxComputationTime:_e.maxComputationTime!==me.maxComputationTime,maxFileSize:_e.maxFileSize!==me.maxFileSize,ignoreTrimWhitespace:_e.ignoreTrimWhitespace!==me.ignoreTrimWhitespace,renderIndicators:_e.renderIndicators!==me.renderIndicators,originalEditable:_e.originalEditable!==me.originalEditable,diffCodeLens:_e.diffCodeLens!==me.diffCodeLens,renderOverviewRuler:_e.renderOverviewRuler!==me.renderOverviewRuler,diffWordWrap:_e.diffWordWrap!==me.diffWordWrap,diffAlgorithm:_e.diffAlgorithm!==me.diffAlgorithm,accessibilityVerbose:_e.accessibilityVerbose!==me.accessibilityVerbose}}(0,se.registerThemingParticipant)((_e,me)=>{const oe=_e.getColor(le.diffDiagonalFill);me.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${oe} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${oe} 50%, ${oe} 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[158],ee([1,0,45,32,188,25,13,8,43,23,91,29,19]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let i=e.EmbeddedCodeEditorWidget=class extends L.CodeEditorWidget{constructor(r,d,h,o,c,a,l,u,v,f,p,C,y){super(r,Object.assign(Object.assign({},o.getRawOptions()),{overflowWidgetsDomNode:o.getOverflowWidgetsDomNode()}),h,c,a,l,u,v,f,p,C,y),this._parentEditor=o,this._overwriteOptions=d,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){_.mixin(this._overwriteOptions,r,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedCodeEditorWidget=i=Te([ge(4,b.IInstantiationService),ge(5,k.ICodeEditorService),ge(6,D.ICommandService),ge(7,w.IContextKeyService),ge(8,g.IThemeService),ge(9,S.INotificationService),ge(10,m.IAccessibilityService),ge(11,s.ILanguageConfigurationService),ge(12,t.ILanguageFeaturesService)],i)}),define(J[841],ee([1,0,14,2,15,12,5,24,22,46,38,607,30,33,23,422]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n){"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"},s.localize(0,null));class d extends L.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:s.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:3165,weight:100}})}run(u,v){var f;(f=a.get(v))===null||f===void 0||f.jumpToBracket()}}class h extends L.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:s.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,v,f){var p;let C=!0;f&&f.selectBrackets===!1&&(C=!1),(p=a.get(v))===null||p===void 0||p.selectToBracket(C)}}class o extends L.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:s.localize(3,null),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(u,v){var f;(f=a.get(v))===null||f===void 0||f.removeBrackets(this.id)}}class c{constructor(u,v,f){this.position=u,this.brackets=v,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 _.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(u.onDidChangeCursorPosition(v=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(u.onDidChangeModelContent(v=>{this._updateBracketsSoon.schedule()})),this._register(u.onDidChangeModel(v=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(u.onDidChangeModelLanguageConfiguration(v=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(u.onDidChangeConfiguration(v=>{v.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(),v=this._editor.getSelections().map(f=>{const p=f.getStartPosition(),C=u.bracketPairs.matchBracket(p);let y=null;if(C)C[0].containsPosition(p)&&!C[1].containsPosition(p)?y=C[1].getStartPosition():C[1].containsPosition(p)&&(y=C[0].getStartPosition());else{const E=u.bracketPairs.findEnclosingBrackets(p);if(E)y=E[1].getStartPosition();else{const I=u.bracketPairs.findNextBracket(p);I&&I.range&&(y=I.range.getStartPosition())}}return y?new b.Selection(y.lineNumber,y.column,y.lineNumber,y.column):new b.Selection(p.lineNumber,p.column,p.lineNumber,p.column)});this._editor.setSelections(v),this._editor.revealRange(v[0])}selectToBracket(u){if(!this._editor.hasModel())return;const v=this._editor.getModel(),f=[];this._editor.getSelections().forEach(p=>{const C=p.getStartPosition();let y=v.bracketPairs.matchBracket(C);if(!y&&(y=v.bracketPairs.findEnclosingBrackets(C),!y)){const T=v.bracketPairs.findNextBracket(C);T&&T.range&&(y=v.bracketPairs.matchBracket(T.range.getStartPosition()))}let E=null,I=null;if(y){y.sort(w.Range.compareRangesUsingStarts);const[T,O]=y;if(E=u?T.getStartPosition():T.getEndPosition(),I=u?O.getEndPosition():O.getStartPosition(),O.containsPosition(C)){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 v=this._editor.getModel();this._editor.getSelections().forEach(f=>{const p=f.getPosition();let C=v.bracketPairs.matchBracket(p);C||(C=v.bracketPairs.findEnclosingBrackets(p)),C&&(this._editor.pushUndoStop(),this._editor.executeEdits(u,[{range:C[0],text:""},{range:C[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const u=[];let v=0;for(const f of this._lastBracketsData){const p=f.brackets;p&&(u[v++]={range:p[0],options:f.options},u[v++]={range:p[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 v=this._editor.getModel(),f=v.getVersionId();let p=[];this._lastVersionId===f&&(p=this._lastBracketsData);const C=[];let y=0;for(let R=0,M=u.length;R<M;R++){const N=u[R];N.isEmpty()&&(C[y++]=N.getStartPosition())}C.length>1&&C.sort(D.Position.compare);const E=[];let I=0,T=0;const O=p.length;for(let R=0,M=C.length;R<M;R++){const N=C[R];for(;T<O&&p[T].position.isBefore(N);)T++;if(T<O&&p[T].position.equals(N))E[I++]=p[T];else{let P=v.bracketPairs.matchBracket(N,20),x=a._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!P&&this._matchBrackets==="always"&&(P=v.bracketPairs.findEnclosingBrackets(N,20),x=a._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),E[I++]=new c(N,P,x)}}this._lastBracketsData=E,this._lastVersionId=f}}e.BracketMatchingController=a,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,n.themeColorFromId)(r),position:g.OverviewRulerLane.Center}}),a._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=m.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,L.registerEditorContribution)(a.ID,a,1),(0,L.registerEditorAction)(h),(0,L.registerEditorAction)(d),(0,L.registerEditorAction)(o),t.MenuRegistry.appendMenuItem(t.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:s.localize(4,null)},order:2})}),define(J[842],ee([1,0,7,147,5,38,424]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class w{constructor(t,i,n){this.afterColumn=1073741824,this.afterLineNumber=t,this.heightInPx=i,this._onHeight=n,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 n=[];let r=!1;for(let d=0;d<t.length;d++){const h=t[d];if(h&&(r=!0,h.command)){const o=(0,k.renderLabelWithIcons)(h.command.title.trim());h.command.id?(n.push(_.$("a",{id:String(d),title:h.command.tooltip,role:"button"},...o)),this._commands.set(String(d),h.command)):n.push(_.$("span",{title:h.command.tooltip},...o)),d+1<t.length&&n.push(_.$("span",void 0,"\\xA0|\\xA0"))}}r?(_.reset(this._domNode,...n),this._isEmpty&&i&&this._domNode.classList.add("fadein"),this._isEmpty=!1):_.reset(this._domNode,_.$("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 S{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 n=0,r=i.length;n<r;n++)this._addDecorationsCallbacks[n](i[n])}}e.CodeLensHelper=S;const g=D.ModelDecorationOptions.register({collapseOnReplaceEdit:!0,description:"codelens"});class m{constructor(t,i,n,r,d,h){this._isDisposed=!1,this._editor=i,this._data=t,this._decorationIds=[];let o;const c=[];this._data.forEach((a,l)=>{a.symbol.command&&c.push(a.symbol),n.addDecoration({range:a.symbol.range,options:g},u=>this._decorationIds[l]=u),o?o=L.Range.plusRange(o,a.symbol.range):o=L.Range.lift(a.symbol.range)}),this._viewZone=new w(o.startLineNumber-1,d,h),this._viewZoneId=r.addZone(this._viewZone),c.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(c,!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 n=this._editor.getModel().getDecorationRange(t),r=this._data[i].symbol;return!!(n&&L.Range.isEmpty(r.range)===n.isEmpty())})}updateCodeLensSymbols(t,i){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],this._data=t,this._data.forEach((n,r)=>{i.addDecoration({range:n.symbol.range,options:g},d=>this._decorationIds[r]=d)})}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 n=t.getDecorationRange(this._decorationIds[i]);n&&(this._data[i].symbol.range=n)}return this._data}updateCommands(t){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(t,!0);for(let i=0;i<this._data.length;i++){const n=t[i];if(n){const{symbol:r}=this._data[i];r.command=n.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[843],ee([1,0,14,11,2,116,15,41,22,318,760,842,617,25,43,71,70,19]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let o=e.CodeLensContribution=class{constructor(a,l,u,v,f,p){this._editor=a,this._languageFeaturesService=l,this._commandService=v,this._notificationService=f,this._codeLensCache=p,this._disposables=new L.DisposableStore,this._localToDispose=new L.DisposableStore,this._lenses=[],this._oldCodeLensModels=new L.DisposableStore,this._provideCodeLensDebounce=u.for(l.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=u.for(l.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new _.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(C=>{(C.hasChanged(48)||C.hasChanged(17)||C.hasChanged(16))&&this._updateLensStyle(),C.hasChanged(15)&&this._onModelChange()})),this._disposables.add(l.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 l=this._editor.getOption(17);return(!l||l<5)&&(l=this._editor.getOption(50)*.9|0),{fontSize:l,codeLensHeight:l*a|0}}_updateLensStyle(){const{codeLensHeight:a,fontSize:l}=this._getLayoutInfo(),u=this._editor.getOption(16),v=this._editor.getOption(48),{style:f}=this._editor.getContainerDomNode();f.setProperty("--vscode-editorCodeLens-lineHeight",`${a}px`),f.setProperty("--vscode-editorCodeLens-fontSize",`${l}px`),f.setProperty("--vscode-editorCodeLens-fontFeatureSettings",v.fontFeatureSettings),u&&(f.setProperty("--vscode-editorCodeLens-fontFamily",u),f.setProperty("--vscode-editorCodeLens-fontFamilyDefault",b.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(p=>{for(const C of this._lenses)C.updateHeight(a,p)})}_localDispose(){var a,l,u;(a=this._getCodeLensModelPromise)===null||a===void 0||a.cancel(),this._getCodeLensModelPromise=void 0,(l=this._resolveCodeLensesPromise)===null||l===void 0||l.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 l=this._codeLensCache.get(a);if(l&&this._renderCodeLensSymbols(l),!this._languageFeaturesService.codeLensProvider.has(a)){l&&this._localToDispose.add((0,_.disposableTimeout)(()=>{const v=this._codeLensCache.get(a);l===v&&(this._codeLensCache.delete(a),this._onModelChange())},30*1e3));return}for(const v of this._languageFeaturesService.codeLensProvider.all(a))if(typeof v.onDidChange=="function"){const f=v.onDidChange(()=>u.schedule());this._localToDispose.add(f)}const u=new _.RunOnceScheduler(()=>{var v;const f=Date.now();(v=this._getCodeLensModelPromise)===null||v===void 0||v.cancel(),this._getCodeLensModelPromise=(0,_.createCancelablePromise)(p=>(0,g.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,a,p)),this._getCodeLensModelPromise.then(p=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=p,this._codeLensCache.put(a,p);const C=this._provideCodeLensDebounce.update(a,Date.now()-f);u.delay=C,this._renderCodeLensSymbols(p),this._resolveCodeLensesInViewportSoon()},k.onUnexpectedError)},this._provideCodeLensDebounce.get(a));this._localToDispose.add(u),this._localToDispose.add((0,L.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var v;this._editor.changeDecorations(f=>{this._editor.changeViewZones(p=>{const C=[];let y=-1;this._lenses.forEach(I=>{!I.isValid()||y===I.getLineNumber()?C.push(I):(I.update(p),y=I.getLineNumber())});const E=new s.CodeLensHelper;C.forEach(I=>{I.dispose(E,p),this._lenses.splice(this._lenses.indexOf(I),1)}),E.commit(f)})}),u.schedule(),this._resolveCodeLensesScheduler.cancel(),(v=this._resolveCodeLensesPromise)===null||v===void 0||v.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{u.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(v=>{v.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,L.toDisposable)(()=>{if(this._editor.getModel()){const v=D.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(f=>{this._editor.changeViewZones(p=>{this._disposeAllLenses(f,p)})}),v.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(v=>{if(v.target.type!==9)return;let f=v.target.element;if(f?.tagName==="SPAN"&&(f=f.parentElement),f?.tagName==="A")for(const p of this._lenses){const C=p.getCommand(f);if(C){this._commandService.executeCommand(C.id,...C.arguments||[]).catch(y=>this._notificationService.error(y));break}}})),u.schedule()}_disposeAllLenses(a,l){const u=new s.CodeLensHelper;for(const v of this._lenses)v.dispose(u,l);a&&u.commit(a),this._lenses.length=0}_renderCodeLensSymbols(a){if(!this._editor.hasModel())return;const l=this._editor.getModel().getLineCount(),u=[];let v;for(const C of a.lenses){const y=C.symbol.range.startLineNumber;y<1||y>l||(v&&v[v.length-1].symbol.range.startLineNumber===y?v.push(C):(v=[C],u.push(v)))}if(!u.length&&!this._lenses.length)return;const f=D.StableEditorScrollState.capture(this._editor),p=this._getLayoutInfo();this._editor.changeDecorations(C=>{this._editor.changeViewZones(y=>{const E=new s.CodeLensHelper;let I=0,T=0;for(;T<u.length&&I<this._lenses.length;){const O=u[T][0].symbol.range.startLineNumber,R=this._lenses[I].getLineNumber();R<O?(this._lenses[I].dispose(E,y),this._lenses.splice(I,1)):R===O?(this._lenses[I].updateCodeLensSymbols(u[T],E),T++,I++):(this._lenses.splice(I,0,new s.CodeLensWidget(u[T],this._editor,E,y,p.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),I++,T++)}for(;I<this._lenses.length;)this._lenses[I].dispose(E,y),this._lenses.splice(I,1);for(;T<u.length;)this._lenses.push(new s.CodeLensWidget(u[T],this._editor,E,y,p.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),T++;E.commit(C)})}),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 l=this._editor.getModel();if(!l)return;const u=[],v=[];if(this._lenses.forEach(C=>{const y=C.computeIfNecessary(l);y&&(u.push(y),v.push(C))}),u.length===0)return;const f=Date.now(),p=(0,_.createCancelablePromise)(C=>{const y=u.map((E,I)=>{const T=new Array(E.length),O=E.map((R,M)=>!R.symbol.command&&typeof R.provider.resolveCodeLens=="function"?Promise.resolve(R.provider.resolveCodeLens(l,R.symbol,C)).then(N=>{T[M]=N},k.onUnexpectedExternalError):(T[M]=R.symbol,Promise.resolve(void 0)));return Promise.all(O).then(()=>{!C.isCancellationRequested&&!v[I].isDisposed()&&v[I].updateCommands(T)})});return Promise.all(y)});this._resolveCodeLensesPromise=p,this._resolveCodeLensesPromise.then(()=>{const C=this._resolveCodeLensesDebounce.update(l,Date.now()-f);this._resolveCodeLensesScheduler.delay=C,this._currentCodeLensModel&&this._codeLensCache.put(l,this._currentCodeLensModel),this._oldCodeLensModels.clear(),p===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},C=>{(0,k.onUnexpectedError)(C),p===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};o.ID="css.editor.codeLens",e.CodeLensContribution=o=Te([ge(1,h.ILanguageFeaturesService),ge(2,d.ILanguageFeatureDebounceService),ge(3,i.ICommandService),ge(4,n.INotificationService),ge(5,m.ICodeLensCache)],o),(0,w.registerEditorContribution)(o.ID,o,1),(0,w.registerEditorAction)(class extends w.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:S.EditorContextKeys.hasCodeLensProvider,label:(0,t.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}run(a,l){return we(this,void 0,void 0,function*(){if(!l.hasModel())return;const u=a.get(r.IQuickInputService),v=a.get(i.ICommandService),f=a.get(n.INotificationService),p=l.getSelection().positionLineNumber,C=l.getContribution(o.ID);if(!C)return;const y=C.getModel();if(!y)return;const E=[];for(const T of y.lenses)T.symbol.command&&T.symbol.range.startLineNumber===p&&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(y.isDisposed)return yield v.executeCommand(this.id);try{yield v.executeCommand(I.command.id,...I.command.arguments||[])}catch(T){f.error(T)}}})}})}),define(J[349],ee([1,0,14,36,11,6,2,56,9,156,15,5,38,70,19,331,28]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecoratorLimitReporter=e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});let h=e.ColorDetector=class $i extends w.Disposable{constructor(a,l,u,v){super(),this._editor=a,this._configurationService=l,this._languageFeaturesService=u,this._localToDispose=this._register(new w.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new g.DynamicCssRules(this._editor),this._decoratorLimitReporter=new o,this._colorDecorationClassRefs=this._register(new w.DisposableStore),this._debounceInformation=v.for(u.colorProvider,"Document Colors",{min:$i.RECOMPUTE_TIME}),this._register(a.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(a.onDidChangeModelLanguage(()=>this.updateColors())),this._register(u.colorProvider.onDidChange(()=>this.updateColors())),this._register(a.onDidChangeConfiguration(f=>{const p=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142);const C=p!==this._isColorDecoratorsEnabled||f.hasChanged(19),y=f.hasChanged(142);(C||y)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142),this.updateColors()}isEnabled(){const a=this._editor.getModel();if(!a)return!1;const l=a.getLanguageId(),u=this._configurationService.getValue(l);if(u&&typeof u=="object"){const v=u.colorDecorators;if(v&&v.enable!==void 0&&!v.enable)return v.enable}return this._editor.getOption(18)}static get(a){return a.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const a=this._editor.getModel();!a||!this._languageFeaturesService.colorProvider.has(a)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new _.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(a)))})),this.beginCompute())}beginCompute(){return we(this,void 0,void 0,function*(){this._computePromise=(0,_.createCancelablePromise)(a=>we(this,void 0,void 0,function*(){const l=this._editor.getModel();if(!l)return[];const u=new b.StopWatch(!1),v=yield(0,r.getColors)(this._languageFeaturesService.colorProvider,l,a,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(l,u.elapsed()),v}));try{const a=yield this._computePromise;this.updateDecorations(a),this.updateColorDecorators(a),this._computePromise=null}catch(a){(0,L.onUnexpectedError)(a)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(a){const l=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,l),this._colorDatas=new Map,this._decorationsIds.forEach((v,f)=>this._colorDatas.set(v,a[f]))})}updateColorDecorators(a){this._colorDecorationClassRefs.clear();const l=[],u=this._editor.getOption(19);for(let f=0;f<a.length&&l.length<u;f++){const{red:p,green:C,blue:y,alpha:E}=a[f].colorInfo.color,I=new k.RGBA(Math.round(p*255),Math.round(C*255),Math.round(y*255),E),T=`rgba(${I.r}, ${I.g}, ${I.b}, ${I.a})`,O=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:T}));l.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:S.noBreakWhitespace,inlineClassName:`${O.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}const v=u<a.length?u:!1;this._decoratorLimitReporter.update(a.length,v),this._colorDecoratorIds.set(l)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(a){const l=this._editor.getModel();if(!l)return null;const u=l.getDecorationsInRange(s.Range.fromPositions(a,a)).filter(v=>this._colorDatas.has(v.id));return u.length===0?null:this._colorDatas.get(u[0].id)}isColorDecoration(a){return this._colorDecoratorIds.has(a)}};h.ID="editor.contrib.colorDetector",h.RECOMPUTE_TIME=1e3,e.ColorDetector=h=Te([ge(1,d.IConfigurationService),ge(2,n.ILanguageFeaturesService),ge(3,i.ILanguageFeatureDebounceService)],h);class o{constructor(){this._onDidChange=new D.Emitter,this._computed=0,this._limited=!1}update(a,l){(a!==this._computed||l!==this._limited)&&(this._computed=a,this._limited=l,this._onDidChange.fire())}}e.DecoratorLimitReporter=o,(0,m.registerEditorContribution)(h.ID,h,1)}),define(J[350],ee([1,0,14,20,36,2,5,331,349,585,802,23]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerParticipant=e.StandaloneColorPickerHover=e.ColorHoverParticipant=e.ColorHover=void 0;class t{constructor(l,u,v,f){this.owner=l,this.range=u,this.model=v,this.provider=f,this.forceShowAtRange=!0}isValidForHoverAnchor(l){return l.type===1&&this.range.startColumn<=l.range.startColumn&&this.range.endColumn>=l.range.endColumn}}e.ColorHover=t;let i=e.ColorHoverParticipant=class{constructor(l,u){this._editor=l,this._themeService=u,this.hoverOrdinal=2}computeSync(l,u){return[]}computeAsync(l,u,v){return _.AsyncIterableObject.fromPromise(this._computeAsync(l,u,v))}_computeAsync(l,u,v){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const f=S.ColorDetector.get(this._editor);if(!f)return[];for(const p of u){if(!f.isColorDecoration(p))continue;const C=f.getColorData(p.range.getStartPosition());if(C)return[yield d(this,this._editor.getModel(),C.colorInfo,C.provider)]}return[]})}renderHoverParts(l,u){return h(this,this._editor,this._themeService,u,l)}};e.ColorHoverParticipant=i=Te([ge(1,s.IThemeService)],i);class n{constructor(l,u,v,f){this.owner=l,this.range=u,this.model=v,this.provider=f}}e.StandaloneColorPickerHover=n;let r=e.StandaloneColorPickerParticipant=class{constructor(l,u){this._editor=l,this._themeService=u,this._color=null}createColorHover(l,u,v){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!S.ColorDetector.get(this._editor))return null;const p=yield(0,b.getColors)(v,this._editor.getModel(),k.CancellationToken.None);let C=null,y=null;for(const O of p){const R=O.colorInfo;w.Range.containsRange(R.range,l.range)&&(C=R,y=O.provider)}const E=C??l,I=y??u,T=!!C;return{colorHover:yield d(this,this._editor.getModel(),E,I),foundInEditor:T}})}updateEditorModel(l){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const u=l.model;let v=new w.Range(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn);this._color&&(yield c(this._editor.getModel(),u,this._color,v,l),v=o(this._editor,v,u))})}renderHoverParts(l,u){return h(this,this._editor,this._themeService,u,l)}set color(l){this._color=l}get color(){return this._color}};e.StandaloneColorPickerParticipant=r=Te([ge(1,s.IThemeService)],r);function d(a,l,u,v){return we(this,void 0,void 0,function*(){const f=l.getValueInRange(u.range),{red:p,green:C,blue:y,alpha:E}=u.color,I=new L.RGBA(Math.round(p*255),Math.round(C*255),Math.round(y*255),E),T=new L.Color(I),O=yield(0,b.getColorPresentations)(l,u,v,k.CancellationToken.None),R=new g.ColorPickerModel(T,[],0);return R.colorPresentations=O||[],R.guessColorPresentation(T,f),a instanceof i?new t(a,w.Range.lift(u.range),R,v):new n(a,w.Range.lift(u.range),R,v)})}function h(a,l,u,v,f){if(v.length===0||!l.hasModel())return D.Disposable.None;const p=new D.DisposableStore,C=v[0],y=l.getModel(),E=C.model,I=p.add(new m.ColorPickerWidget(f.fragment,E,l.getOption(138),u,a instanceof r));f.setColorPicker(I);let T=new w.Range(C.range.startLineNumber,C.range.startColumn,C.range.endLineNumber,C.range.endColumn);if(a instanceof r){const O=v[0].model.color;a.color=O,c(y,E,O,T,C),p.add(E.onColorFlushed(R=>{a.color=R}))}else p.add(E.onColorFlushed(O=>we(this,void 0,void 0,function*(){yield c(y,E,O,T,C),T=o(l,T,E,f)})));return p.add(E.onDidChangeColor(O=>{c(y,E,O,T,C)})),p}function o(a,l,u,v){let f,p;if(u.presentation.textEdit){f=[u.presentation.textEdit],p=new w.Range(u.presentation.textEdit.range.startLineNumber,u.presentation.textEdit.range.startColumn,u.presentation.textEdit.range.endLineNumber,u.presentation.textEdit.range.endColumn);const C=a.getModel()._setTrackedRange(null,p,3);a.pushUndoStop(),a.executeEdits("colorpicker",f),p=a.getModel()._getTrackedRange(C)||p}else f=[{range:l,text:u.presentation.label,forceMoveMarkers:!1}],p=l.setEndPosition(l.endLineNumber,l.startColumn+u.presentation.label.length),a.pushUndoStop(),a.executeEdits("colorpicker",f);return u.presentation.additionalTextEdits&&(f=[...u.presentation.additionalTextEdits],a.executeEdits("colorpicker",f),v&&v.hide()),a.pushUndoStop(),p}function c(a,l,u,v,f){return we(this,void 0,void 0,function*(){const p=yield(0,b.getColorPresentations)(a,{range:v,color:{red:u.rgba.r/255,green:u.rgba.g/255,blue:u.rgba.b/255,alpha:u.rgba.a}},f.provider,k.CancellationToken.None);l.colorPresentations=p||[]})}}),define(J[844],ee([1,0,2,17,15,12,5,24,38,522,425]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function m(t){return k.isMacintosh?t.altKey:t.ctrlKey}class s extends _.Disposable{constructor(i){super(),this._editor=i,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._register(this._editor.onMouseDrag(n=>this._onEditorMouseDrag(n))),this._register(this._editor.onMouseDrop(n=>this._onEditorMouseDrop(n))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(n=>this.onEditorKeyDown(n))),this._register(this._editor.onKeyUp(n=>this.onEditorKeyUp(n))),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===s.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 n=i.target;if(this._dragSelection===null){const d=(this._editor.getSelections()||[]).filter(h=>n.position&&h.containsPosition(n.position));if(d.length===1)this._dragSelection=d[0];else return}m(i.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),n.position&&(this._dragSelection.containsPosition(n.position)?this._removeDecoration():this.showAt(n.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 n=new D.Position(i.target.position.lineNumber,i.target.position.column);if(this._dragSelection===null){let r=null;if(i.event.shiftKey){const d=this._editor.getSelection();if(d){const{selectionStartLineNumber:h,selectionStartColumn:o}=d;r=[new b.Selection(h,o,n.lineNumber,n.column)]}}else r=(this._editor.getSelections()||[]).map(d=>d.containsPosition(n)?new b.Selection(n.lineNumber,n.column,n.lineNumber,n.column):d);this._editor.setSelections(r||[],"mouse",3)}else(!this._dragSelection.containsPosition(n)||(m(i.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(n)||this._dragSelection.getStartPosition().equals(n)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(s.ID,new g.DragAndDropCommand(this._dragSelection,n,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:s._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()}}e.DragAndDropController=s,s.ID="editor.contrib.dragAndDrop",s.TRIGGER_KEY_VALUE=k.isMacintosh?6:5,s._DECORATION_OPTIONS=S.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,L.registerEditorContribution)(s.ID,s,2)}),define(J[845],ee([1,0,5,46,38,33,23]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class b{constructor(g){this._editor=g,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.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 g=this._findScopeDecorationIds.map(m=>this._editor.getModel().getDecorationRange(m)).filter(m=>!!m);if(g.length)return g}return null}getStartPosition(){return this._startPosition}setStartPosition(g){this._startPosition=g,this.setCurrentFindMatch(null)}_getDecorationIndex(g){const m=this._decorations.indexOf(g);return m>=0?m+1:1}getDecorationRangeAt(g){const m=g<this._decorations.length?this._decorations[g]:null;return m?this._editor.getModel().getDecorationRange(m):null}getCurrentMatchesPosition(g){const m=this._editor.getModel().getDecorationsInRange(g);for(const s of m){const t=s.options;if(t===b._FIND_MATCH_DECORATION||t===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(s.id)}return 0}setCurrentFindMatch(g){let m=null,s=0;if(g)for(let t=0,i=this._decorations.length;t<i;t++){const n=this._editor.getModel().getDecorationRange(this._decorations[t]);if(g.equalsRange(n)){m=this._decorations[t],s=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 n=i.endLineNumber-1,r=this._editor.getModel().getLineMaxColumn(n);i=new _.Range(i.startLineNumber,i.startColumn,n,r)}this._rangeHighlightDecorationId=t.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}}),s}set(g,m){this._editor.changeDecorations(s=>{let t=b._FIND_MATCH_DECORATION;const i=[];if(g.length>1e3){t=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const r=this._editor.getModel().getLineCount(),h=this._editor.getLayoutInfo().height/r,o=Math.max(2,Math.ceil(3/h));let c=g[0].range.startLineNumber,a=g[0].range.endLineNumber;for(let l=1,u=g.length;l<u;l++){const v=g[l].range;a+o>=v.startLineNumber?v.endLineNumber>a&&(a=v.endLineNumber):(i.push({range:new _.Range(c,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=v.startLineNumber,a=v.endLineNumber)}i.push({range:new _.Range(c,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const n=new Array(g.length);for(let r=0,d=g.length;r<d;r++)n[r]={range:g[r].range,options:t};this._decorations=s.deltaDecorations(this._decorations,n),this._overviewRulerApproximateDecorations=s.deltaDecorations(this._overviewRulerApproximateDecorations,i),this._rangeHighlightDecorationId&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(r=>s.removeDecoration(r)),this._findScopeDecorationIds=[]),m?.length&&(this._findScopeDecorationIds=m.map(r=>s.addDecoration(r,b._FIND_SCOPE_DECORATION)))})}matchBeforePosition(g){if(this._decorations.length===0)return null;for(let m=this._decorations.length-1;m>=0;m--){const s=this._decorations[m],t=this._editor.getModel().getDecorationRange(s);if(!(!t||t.endLineNumber>g.lineNumber)){if(t.endLineNumber<g.lineNumber)return t;if(!(t.endColumn>g.column))return t}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(g){if(this._decorations.length===0)return null;for(let m=0,s=this._decorations.length;m<s;m++){const t=this._decorations[m],i=this._editor.getModel().getDecorationRange(t);if(!(!i||i.startLineNumber<g.lineNumber)){if(i.startLineNumber>g.lineNumber)return i;if(!(i.startColumn<g.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let g=[];return g=g.concat(this._decorations),g=g.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&g.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&g.push(this._rangeHighlightDecorationId),g}}e.FindDecorations=b,b._CURRENT_FIND_MATCH_DECORATION=L.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=L.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=L.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),b._FIND_MATCH_ONLY_OVERVIEW_DECORATION=L.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,w.themeColorFromId)(D.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center}}),b._RANGE_HIGHLIGHT_DECORATION=L.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),b._FIND_SCOPE_DECORATION=L.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}),define(J[189],ee([1,0,16,14,2,120,12,5,24,175,845,523,524,13]),function(j,e,_,k,L,D,w,b,S,g,m,s,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 n=240;class r{constructor(h,o){this._toDispose=new L.DisposableStore,this._editor=h,this._state=o,this._isDisposed=!1,this._startSearchingTimer=new k.TimeoutTimer,this._decorations=new m.FindDecorations(h),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(c=>{(c.reason===3||c.reason===5||c.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(c=>{this._ignoreModelContentChanged||(c.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(c=>this._onStateChanged(c))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,L.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(h){this._isDisposed||this._editor.hasModel()&&(h.searchString||h.isReplaceRevealed||h.isRegex||h.wholeWord||h.matchCase||h.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{h.searchScope?this.research(h.moveCursor,this._state.searchScope):this.research(h.moveCursor)},n)):h.searchScope?this.research(h.moveCursor,this._state.searchScope):this.research(h.moveCursor))}static _getSearchRange(h,o){return o||h.getFullModelRange()}research(h,o){let c=null;typeof o<"u"?o!==null&&(Array.isArray(o)?c=o:c=[o]):c=this._decorations.getFindScopes(),c!==null&&(c=c.map(v=>{if(v.startLineNumber!==v.endLineNumber){let f=v.endLineNumber;return v.endColumn===1&&(f=f-1),new b.Range(v.startLineNumber,1,f,this._editor.getModel().getLineMaxColumn(f))}return v}));const a=this._findMatches(c,!1,e.MATCHES_LIMIT);this._decorations.set(a,c);const l=this._editor.getSelection();let u=this._decorations.getCurrentMatchesPosition(l);if(u===0&&a.length>0){const v=(0,_.findFirstInSorted)(a.map(f=>f.range),f=>b.Range.compareRangesUsingStarts(f,l)>=0);u=v>0?v-1+1:u}this._state.changeMatchInfo(u,this._decorations.getCount(),void 0),h&&this._editor.getOption(39).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const h=this._decorations.getFindScope();return h&&this._editor.revealRangeInCenterIfOutsideViewport(h,0),!0}return!1}_setCurrentFindMatch(h){const o=this._decorations.setCurrentFindMatch(h);this._state.changeMatchInfo(o,this._decorations.getCount(),h),this._editor.setSelection(h),this._editor.revealRangeInCenterIfOutsideViewport(h,0)}_prevSearchPosition(h){const o=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:c,column:a}=h;const l=this._editor.getModel();return o||a===1?(c===1?c=l.getLineCount():c--,a=l.getLineMaxColumn(c)):a--,new w.Position(c,a)}_moveToPrevMatch(h,o=!1){if(!this._state.canNavigateBack()){const C=this._decorations.matchAfterPosition(h);C&&this._setCurrentFindMatch(C);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let C=this._decorations.matchBeforePosition(h);C&&C.isEmpty()&&C.getStartPosition().equals(h)&&(h=this._prevSearchPosition(h),C=this._decorations.matchBeforePosition(h)),C&&this._setCurrentFindMatch(C);return}if(this._cannotFind())return;const c=this._decorations.getFindScope(),a=r._getSearchRange(this._editor.getModel(),c);a.getEndPosition().isBefore(h)&&(h=a.getEndPosition()),h.isBefore(a.getStartPosition())&&(h=a.getEndPosition());const{lineNumber:l,column:u}=h,v=this._editor.getModel();let f=new w.Position(l,u),p=v.findPreviousMatch(this._state.searchString,f,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,!1);if(p&&p.range.isEmpty()&&p.range.getStartPosition().equals(f)&&(f=this._prevSearchPosition(f),p=v.findPreviousMatch(this._state.searchString,f,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,!1)),!!p){if(!o&&!a.containsRange(p.range))return this._moveToPrevMatch(p.range.getStartPosition(),!0);this._setCurrentFindMatch(p.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(h){const o=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:c,column:a}=h;const l=this._editor.getModel();return o||a===l.getLineMaxColumn(c)?(c===l.getLineCount()?c=1:c++,a=1):a++,new w.Position(c,a)}_moveToNextMatch(h){if(!this._state.canNavigateForward()){const c=this._decorations.matchBeforePosition(h);c&&this._setCurrentFindMatch(c);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let c=this._decorations.matchAfterPosition(h);c&&c.isEmpty()&&c.getStartPosition().equals(h)&&(h=this._nextSearchPosition(h),c=this._decorations.matchAfterPosition(h)),c&&this._setCurrentFindMatch(c);return}const o=this._getNextMatch(h,!1,!0);o&&this._setCurrentFindMatch(o.range)}_getNextMatch(h,o,c,a=!1){if(this._cannotFind())return null;const l=this._decorations.getFindScope(),u=r._getSearchRange(this._editor.getModel(),l);u.getEndPosition().isBefore(h)&&(h=u.getStartPosition()),h.isBefore(u.getStartPosition())&&(h=u.getStartPosition());const{lineNumber:v,column:f}=h,p=this._editor.getModel();let C=new w.Position(v,f),y=p.findNextMatch(this._state.searchString,C,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,o);return c&&y&&y.range.isEmpty()&&y.range.getStartPosition().equals(C)&&(C=this._nextSearchPosition(C),y=p.findNextMatch(this._state.searchString,C,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,o)),y?!a&&!u.containsRange(y.range)?this._getNextMatch(y.range.getEndPosition(),o,c,!0):y:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(h){const o=this._decorations.getDecorationRangeAt(h);o&&this._setCurrentFindMatch(o)}moveToMatch(h){this._moveToMatch(h)}_getReplacePattern(){return this._state.isRegex?(0,t.parseReplaceString)(this._state.replaceString):t.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const h=this._getReplacePattern(),o=this._editor.getSelection(),c=this._getNextMatch(o.getStartPosition(),!0,!1);if(c)if(o.equalsRange(c.range)){const a=h.buildReplaceString(c.matches,this._state.preserveCase),l=new D.ReplaceCommand(o,a);this._executeEditorCommand("replace",l),this._decorations.setStartPosition(new w.Position(o.startLineNumber,o.startColumn+a.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(c.range)}_findMatches(h,o,c){const a=(h||[null]).map(l=>r._getSearchRange(this._editor.getModel(),l));return this._editor.getModel().findMatches(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,o,c)}replaceAll(){if(!this._hasMatches())return;const h=this._decorations.getFindScopes();h===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(h),this.research(!1)}_largeReplaceAll(){const o=new g.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null).parseSearchRequest();if(!o)return;let c=o.regex;if(!c.multiline){let y="mu";c.ignoreCase&&(y+="i"),c.global&&(y+="g"),c=new RegExp(c.source,y)}const a=this._editor.getModel(),l=a.getValue(1),u=a.getFullModelRange(),v=this._getReplacePattern();let f;const p=this._state.preserveCase;v.hasReplacementPatterns||p?f=l.replace(c,function(){return v.buildReplaceString(arguments,p)}):f=l.replace(c,v.buildReplaceString(null,p));const C=new D.ReplaceCommandThatPreservesSelection(u,f,this._editor.getSelection());this._executeEditorCommand("replaceAll",C)}_regularReplaceAll(h){const o=this._getReplacePattern(),c=this._findMatches(h,o.hasReplacementPatterns||this._state.preserveCase,1073741824),a=[];for(let u=0,v=c.length;u<v;u++)a[u]=o.buildReplaceString(c[u].matches,this._state.preserveCase);const l=new s.ReplaceAllCommand(this._editor.getSelection(),c.map(u=>u.range),a);this._executeEditorCommand("replaceAll",l)}selectAllMatches(){if(!this._hasMatches())return;const h=this._decorations.getFindScopes();let c=this._findMatches(h,!1,1073741824).map(l=>new S.Selection(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn));const a=this._editor.getSelection();for(let l=0,u=c.length;l<u;l++)if(c[l].equalsRange(a)){c=[a].concat(c.slice(0,l)).concat(c.slice(l+1));break}this._editor.setSelections(c)}_executeEditorCommand(h,o){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(h,o),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=r}),define(J[846],ee([1,0,7,300,68,14,189,33,427]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class S extends L.Widget{constructor(m,s,t){super(),this._hideSoon=this._register(new D.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=m,this._state=s,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(n=>{let r=!1;n.isRegex&&(this.regex.checked=this._state.isRegex,r=!0),n.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,r=!0),n.matchCase&&(this.caseSensitive.checked=this._state.matchCase,r=!0),!this._state.isRevealed&&r&&this._revealTemporarily()})),this._register(_.addDisposableListener(this._domNode,_.EventType.MOUSE_LEAVE,n=>this._onMouseLeave())),this._register(_.addDisposableListener(this._domNode,"mouseover",n=>this._onMouseOver()))}_keybindingLabelFor(m){const s=this._keybindingService.lookupKeybinding(m);return s?` (${s.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return S.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")}}e.FindOptionsWidget=S,S.ID="editor.contrib.findOptionsWidget"}),define(J[847],ee([1,0,6,2,5,189]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function w(S,g){return S===1?!0:S===2?!1:g}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 _.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(g,m,s){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&&(g=0),g>m&&(g=m),this._matchesPosition!==g&&(this._matchesPosition=g,t.matchesPosition=!0,i=!0),this._matchesCount!==m&&(this._matchesCount=m,t.matchesCount=!0,i=!0),typeof s<"u"&&(L.Range.equalsRange(this._currentMatch,s)||(this._currentMatch=s,t.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(t)}change(g,m,s=!0){var t;const i={moveCursor:m,updateHistory:s,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 n=!1;const r=this.isRegex,d=this.wholeWord,h=this.matchCase,o=this.preserveCase;typeof g.searchString<"u"&&this._searchString!==g.searchString&&(this._searchString=g.searchString,i.searchString=!0,n=!0),typeof g.replaceString<"u"&&this._replaceString!==g.replaceString&&(this._replaceString=g.replaceString,i.replaceString=!0,n=!0),typeof g.isRevealed<"u"&&this._isRevealed!==g.isRevealed&&(this._isRevealed=g.isRevealed,i.isRevealed=!0,n=!0),typeof g.isReplaceRevealed<"u"&&this._isReplaceRevealed!==g.isReplaceRevealed&&(this._isReplaceRevealed=g.isReplaceRevealed,i.isReplaceRevealed=!0,n=!0),typeof g.isRegex<"u"&&(this._isRegex=g.isRegex),typeof g.wholeWord<"u"&&(this._wholeWord=g.wholeWord),typeof g.matchCase<"u"&&(this._matchCase=g.matchCase),typeof g.preserveCase<"u"&&(this._preserveCase=g.preserveCase),typeof g.searchScope<"u"&&(!((t=g.searchScope)===null||t===void 0)&&t.every(c=>{var a;return(a=this._searchScope)===null||a===void 0?void 0:a.some(l=>!L.Range.equalsRange(l,c))})||(this._searchScope=g.searchScope,i.searchScope=!0,n=!0)),typeof g.loop<"u"&&this._loop!==g.loop&&(this._loop=g.loop,i.loop=!0,n=!0),typeof g.isSearching<"u"&&this._isSearching!==g.isSearching&&(this._isSearching=g.isSearching,i.isSearching=!0,n=!0),typeof g.filters<"u"&&(this._filters?this._filters.update(g.filters):this._filters=g.filters,i.filters=!0,n=!0),this._isRegexOverride=typeof g.isRegexOverride<"u"?g.isRegexOverride:0,this._wholeWordOverride=typeof g.wholeWordOverride<"u"?g.wholeWordOverride:0,this._matchCaseOverride=typeof g.matchCaseOverride<"u"?g.matchCaseOverride:0,this._preserveCaseOverride=typeof g.preserveCaseOverride<"u"?g.preserveCaseOverride:0,r!==this.isRegex&&(n=!0,i.isRegex=!0),d!==this.wholeWord&&(n=!0,i.wholeWord=!0),h!==this.matchCase&&(n=!0,i.matchCase=!0),o!==this.preserveCase&&(n=!0,i.preserveCase=!0),n&&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[848],ee([1,0,7,48,149,148,68,14,26,11,2,17,9,5,189,629,335,716,33,74,23,31,93,18,100,428]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,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 p=(0,c.registerIcon)("find-selection",S.Codicon.selection,r.localize(0,null)),C=(0,c.registerIcon)("find-collapsed",S.Codicon.chevronRight,r.localize(1,null)),y=(0,c.registerIcon)("find-expanded",S.Codicon.chevronDown,r.localize(2,null));e.findReplaceIcon=(0,c.registerIcon)("find-replace",S.Codicon.replace,r.localize(3,null)),e.findReplaceAllIcon=(0,c.registerIcon)("find-replace-all",S.Codicon.replaceAll,r.localize(4,null)),e.findPreviousMatchIcon=(0,c.registerIcon)("find-previous-match",S.Codicon.arrowUp,r.localize(5,null)),e.findNextMatchIcon=(0,c.registerIcon)("find-next-match",S.Codicon.arrowDown,r.localize(6,null));const E=r.localize(7,null),I=r.localize(8,null),T=r.localize(9,null),O=r.localize(10,null),R=r.localize(11,null),M=r.localize(12,null),N=r.localize(13,null),P=r.localize(14,null),x=r.localize(15,null),F=r.localize(16,null),B=r.localize(17,null),V=r.localize(18,null,n.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=r.localize(19,null),e.NLS_NO_RESULTS=r.localize(20,null);const K=419,Y=275-54;let ie=69;const le=33,ne="ctrlEnterReplaceAll.windows.donotask",se=s.isMacintosh?256:2048;class H{constructor(ce){this.afterLineNumber=ce,this.heightInPx=le,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=H;function W(re,ce,he){const de=!!ce.match(/\\n/);if(he&&de&&he.selectionStart>0){re.stopPropagation();return}}function $(re,ce,he){const de=!!ce.match(/\\n/);if(he&&de&&he.selectionEnd<he.value.length){re.stopPropagation();return}}class Z extends w.Widget{constructor(ce,he,de,ue,q,z,U,X,te){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=ce,this._controller=he,this._state=de,this._contextViewProvider=ue,this._keybindingService=q,this._contextKeyService=z,this._storageService=X,this._notificationService=te,this._ctrlEnterReplaceAllWarningPrompted=!!X.getBoolean(ne,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(G=>this._onStateChanged(G))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(G=>{if(G.hasChanged(88)&&(this._codeEditor.getOption(88)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),G.hasChanged(140)&&this._tryUpdateWidgetWidth(),G.hasChanged(2)&&this.updateAccessibilitySupport(),G.hasChanged(39)){const ae=this._codeEditor.getOption(39).loop;this._state.change({loop:ae},!1);const fe=this._codeEditor.getOption(39).addExtraSpaceOnTop;fe&&!this._viewZone&&(this._viewZone=new H(0),this._showViewZone()),!fe&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>we(this,void 0,void 0,function*(){if(this._isVisible){const G=yield this._controller.getGlobalBufferTerm();G&&G!==this._state.searchString&&(this._state.change({searchString:G},!1),this._findInput.select())}}))),this._findInputFocused=n.CONTEXT_FIND_INPUT_FOCUSED.bindTo(z),this._findFocusTracker=this._register(_.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=n.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(z),this._replaceFocusTracker=this._register(_.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(G=>{if(G.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return Z.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(ce){if(ce.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(ce.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),ce.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),ce.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(88)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=_.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(ce.isRevealed||ce.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),ce.isRegex&&this._findInput.setRegex(this._state.isRegex),ce.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),ce.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),ce.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),ce.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),ce.searchString||ce.matchesCount||ce.matchesPosition){const he=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",he),this._updateMatchesCount(),this._updateButtons()}(ce.searchString||ce.currentMatch)&&this._layoutViewZone(),ce.updateHistory&&this._delayedUpdateHistory(),ce.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,g.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=ie+"px",this._state.matchesCount>=n.MATCHES_LIMIT?this._matchesCount.title=V:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let ce;if(this._state.matchesCount>0){let he=String(this._state.matchesCount);this._state.matchesCount>=n.MATCHES_LIMIT&&(he+="+");let de=String(this._state.matchesPosition);de==="0"&&(de="?"),ce=t.format(e.NLS_MATCHES_LOCATION,de,he)}else ce=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(ce)),(0,k.alert)(this._getAriaLabel(ce,this._state.currentMatch,this._state.searchString)),ie=Math.max(ie,this._matchesCount.clientWidth)}_getAriaLabel(ce,he,de){if(ce===e.NLS_NO_RESULTS)return de===""?r.localize(21,null,ce):r.localize(22,null,ce,de);if(he){const ue=r.localize(23,null,ce,de,he.startLineNumber+":"+he.startColumn),q=this._codeEditor.getModel();return q&&he.startLineNumber<=q.getLineCount()&&he.startLineNumber>=1?`${q.getLineContent(he.startLineNumber)}, ${ue}`:ue}return r.localize(24,null,ce,de)}_updateToggleSelectionFindButton(){const ce=this._codeEditor.getSelection(),he=ce?ce.startLineNumber!==ce.endLineNumber||ce.startColumn!==ce.endColumn:!1,de=this._toggleSelectionFind.checked;this._isVisible&&(de||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 ce=this._state.searchString.length>0,he=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&ce&&he&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&ce&&he&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&ce),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&ce),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const de=!this._codeEditor.getOption(88);this._toggleReplaceBtn.setEnabled(this._isVisible&&de)}_reveal(){if(this._revealTimeouts.forEach(ce=>{clearTimeout(ce)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const ce=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 de=!!ce&&ce.startLineNumber!==ce.endLineNumber;this._toggleSelectionFind.checked=de;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&&ce){const de=this._codeEditor.getDomNode();if(de){const ue=_.getDomNodePagePosition(de),q=this._codeEditor.getScrolledVisiblePosition(ce.getStartPosition()),z=ue.left+(q?q.left:0),U=q?q.top:0;if(this._viewZone&&U<this._viewZone.heightInPx){ce.endLineNumber>ce.startLineNumber&&(he=!1);const X=_.getTopLeftOffset(this._domNode).left;z>X&&(he=!1);const te=this._codeEditor.getScrolledVisiblePosition(ce.getEndPosition());ue.left+(te?te.left:0)>X&&(he=!1)}}}this._showViewZone(he)}}_hide(ce){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(),ce&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(ce){if(!this._codeEditor.getOption(39).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const de=this._viewZone;this._viewZoneId!==void 0||!de||this._codeEditor.changeViewZones(ue=>{de.heightInPx=this._getHeight(),this._viewZoneId=ue.addZone(de),this._codeEditor.setScrollTop(ce||this._codeEditor.getScrollTop()+de.heightInPx)})}_showViewZone(ce=!0){if(!this._isVisible||!this._codeEditor.getOption(39).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new H(0));const de=this._viewZone;this._codeEditor.changeViewZones(ue=>{if(this._viewZoneId!==void 0){const q=this._getHeight();if(q===de.heightInPx)return;const z=q-de.heightInPx;de.heightInPx=q,ue.layoutZone(this._viewZoneId),ce&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+z);return}else{let q=this._getHeight();if(q-=this._codeEditor.getOption(81).top,q<=0)return;de.heightInPx=q,this._viewZoneId=ue.addZone(de),ce&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+q)}})}_removeViewZone(){this._codeEditor.changeViewZones(ce=>{this._viewZoneId!==void 0&&(ce.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||!_.isInDOM(this._domNode))return;const ce=this._codeEditor.getLayoutInfo();if(ce.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const de=ce.width,ue=ce.minimap.minimapWidth;let q=!1,z=!1,U=!1;if(this._resized&&_.getTotalWidth(this._domNode)>K){this._domNode.style.maxWidth=`${de-28-ue-15}px`,this._replaceInput.width=_.getTotalWidth(this._findInput.domNode);return}if(K+28+ue>=de&&(z=!0),K+28+ue-ie>=de&&(U=!0),K+28+ue-ie>=de+50&&(q=!0),this._domNode.classList.toggle("collapsed-find-widget",q),this._domNode.classList.toggle("narrow-find-widget",U),this._domNode.classList.toggle("reduced-find-widget",z),!U&&!q&&(this._domNode.style.maxWidth=`${de-28-ue-15}px`),this._findInput.layout({collapsedFindWidget:q,narrowFindWidget:U,reducedFindWidget:z}),this._resized){const X=this._findInput.inputBox.element.clientWidth;X>0&&(this._replaceInput.width=X)}else this._isReplaceVisible&&(this._replaceInput.width=_.getTotalWidth(this._findInput.domNode))}_getHeight(){let ce=0;return ce+=4,ce+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(ce+=4,ce+=this._replaceInput.inputBox.height+2),ce+=4,ce}_tryUpdateHeight(){const ce=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===ce?!1:(this._cachedHeight=ce,this._domNode.style.height=`${ce}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 ce=this._codeEditor.getSelections();ce.map(he=>{he.endColumn===1&&he.endLineNumber>he.startLineNumber&&(he=he.setEndPosition(he.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(he.endLineNumber-1)));const de=this._state.currentMatch;return he.startLineNumber!==he.endLineNumber&&!i.Range.equalsRange(he,de)?he:null}).filter(he=>!!he),ce.length&&this._state.change({searchScope:ce},!0)}}_onFindInputMouseDown(ce){ce.middleButton&&ce.stopPropagation()}_onFindInputKeyDown(ce){if(ce.equals(se|3))if(this._keybindingService.dispatchEvent(ce,ce.target)){ce.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`\n`),ce.preventDefault();return}if(ce.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),ce.preventDefault();return}if(ce.equals(2066)){this._codeEditor.focus(),ce.preventDefault();return}if(ce.equals(16))return W(ce,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(ce.equals(18))return $(ce,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(ce){if(ce.equals(se|3))if(this._keybindingService.dispatchEvent(ce,ce.target)){ce.preventDefault();return}else{s.isWindows&&s.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(r.localize(25,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ne,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`\n`),ce.preventDefault();return}if(ce.equals(2)){this._findInput.focusOnCaseSensitive(),ce.preventDefault();return}if(ce.equals(1026)){this._findInput.focus(),ce.preventDefault();return}if(ce.equals(2066)){this._codeEditor.focus(),ce.preventDefault();return}if(ce.equals(16))return W(ce,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(ce.equals(18))return $(ce,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(ce){return 0}_keybindingLabelFor(ce){const he=this._keybindingService.lookupKeybinding(ce);return he?` (${he.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new d.ContextScopedFindInput(null,this._contextViewProvider,{width:Y,label:E,placeholder:I,appendCaseSensitiveLabel:this._keybindingLabelFor(n.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(n.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(n.FIND_IDS.ToggleRegexCommand),validation:X=>{if(X.length===0||!this._findInput.getRegex())return null;try{return new RegExp(X,"gu"),null}catch(te){return{content:te.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>(0,h.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(X=>this._onFindInputKeyDown(X))),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(X=>{X.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),X.preventDefault())})),this._register(this._findInput.onRegexKeyDown(X=>{X.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),X.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(X=>{this._tryUpdateHeight()&&this._showViewZone()})),s.isLinux&&this._register(this._findInput.onMouseDown(X=>this._onFindInputMouseDown(X))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Q({label:T+this._keybindingLabelFor(n.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{(0,v.assertIsDefined)(this._codeEditor.getAction(n.FIND_IDS.PreviousMatchFindAction)).run().then(void 0,g.onUnexpectedError)}})),this._nextBtn=this._register(new Q({label:O+this._keybindingLabelFor(n.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{(0,v.assertIsDefined)(this._codeEditor.getAction(n.FIND_IDS.NextMatchFindAction)).run().then(void 0,g.onUnexpectedError)}}));const de=document.createElement("div");de.className="find-part",de.appendChild(this._findInput.domNode);const ue=document.createElement("div");ue.className="find-actions",de.appendChild(ue),ue.appendChild(this._matchesCount),ue.appendChild(this._prevBtn.domNode),ue.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new L.Toggle({icon:p,title:R+this._keybindingLabelFor(n.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 X=this._codeEditor.getSelections();X.map(te=>(te.endColumn===1&&te.endLineNumber>te.startLineNumber&&(te=te.setEndPosition(te.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(te.endLineNumber-1))),te.isEmpty()?null:te)).filter(te=>!!te),X.length&&this._state.change({searchScope:X},!0)}}else this._state.change({searchScope:null},!0)})),ue.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Q({label:M+this._keybindingLabelFor(n.FIND_IDS.CloseFindWidgetCommand),icon:c.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:X=>{X.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),X.preventDefault())}})),ue.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new d.ContextScopedReplaceInput(null,void 0,{label:N,placeholder:P,appendPreserveCaseLabel:this._keybindingLabelFor(n.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>(0,h.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:f.defaultInputBoxStyles,toggleStyles:f.defaultToggleStyles},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(X=>this._onReplaceInputKeyDown(X))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(X=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(X=>{X.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(),X.preventDefault())})),this._replaceBtn=this._register(new Q({label:x+this._keybindingLabelFor(n.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:X=>{X.equals(1026)&&(this._closeBtn.focus(),X.preventDefault())}})),this._replaceAllBtn=this._register(new Q({label:F+this._keybindingLabelFor(n.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));const q=document.createElement("div");q.className="replace-part",q.appendChild(this._replaceInput.domNode);const z=document.createElement("div");z.className="replace-actions",q.appendChild(z),z.appendChild(this._replaceBtn.domNode),z.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Q({label:B,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=_.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=`${K}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(de),this._domNode.appendChild(q),this._resizeSash=new D.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let U=K;this._register(this._resizeSash.onDidStart(()=>{U=_.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(X=>{this._resized=!0;const te=U+X.startX-X.currentX;if(te<K)return;const G=parseFloat(_.getComputedStyle(this._domNode).maxWidth)||0;te>G||(this._domNode.style.width=`${te}px`,this._isReplaceVisible&&(this._replaceInput.width=_.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const X=_.getTotalWidth(this._domNode);if(X<K)return;let te=K;if(!this._resized||X===K){const G=this._codeEditor.getLayoutInfo();te=G.width-28-G.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${te}px`,this._isReplaceVisible&&(this._replaceInput.width=_.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const ce=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(ce!==2)}}e.FindWidget=Z,Z.ID="editor.contrib.findWidget";class Q extends w.Widget{constructor(ce){super(),this._opts=ce;let he="button";this._opts.className&&(he=he+" "+this._opts.className),this._opts.icon&&(he=he+" "+l.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,de=>{this._opts.onTrigger(),de.preventDefault()}),this.onkeydown(this._domNode,de=>{var ue,q;if(de.equals(10)||de.equals(3)){this._opts.onTrigger(),de.preventDefault();return}(q=(ue=this._opts).onKeyDown)===null||q===void 0||q.call(ue,de)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(ce){this._domNode.classList.toggle("disabled",!ce),this._domNode.setAttribute("aria-disabled",String(!ce)),this._domNode.tabIndex=ce?0:-1}setExpanded(ce){this._domNode.setAttribute("aria-expanded",String(!!ce)),ce?(this._domNode.classList.remove(...l.ThemeIcon.asClassNameArray(C)),this._domNode.classList.add(...l.ThemeIcon.asClassNameArray(y))):(this._domNode.classList.remove(...l.ThemeIcon.asClassNameArray(y)),this._domNode.classList.add(...l.ThemeIcon.asClassNameArray(C)))}}e.SimpleButton=Q,(0,a.registerThemingParticipant)((re,ce)=>{const he=(ye,Ie)=>{Ie&&ce.addRule(`.monaco-editor ${ye} { background-color: ${Ie}; }`)};he(".findMatch",re.getColor(o.editorFindMatchHighlight)),he(".currentFindMatch",re.getColor(o.editorFindMatch)),he(".findScope",re.getColor(o.editorFindRangeHighlight));const de=re.getColor(o.editorWidgetBackground);he(".find-widget",de);const ue=re.getColor(o.widgetShadow);ue&&ce.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${ue}; }`);const q=re.getColor(o.widgetBorder);q&&ce.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${q}; border-right: 1px solid ${q}; border-bottom: 1px solid ${q}; }`);const z=re.getColor(o.editorFindMatchHighlightBorder);z&&ce.addRule(`.monaco-editor .findMatch { border: 1px ${(0,u.isHighContrast)(re.type)?"dotted":"solid"} ${z}; box-sizing: border-box; }`);const U=re.getColor(o.editorFindMatchBorder);U&&ce.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${U}; padding: 1px; box-sizing: border-box; }`);const X=re.getColor(o.editorFindRangeHighlightBorder);X&&ce.addRule(`.monaco-editor .findScope { border: 1px ${(0,u.isHighContrast)(re.type)?"dashed":"solid"} ${X}; }`);const te=re.getColor(o.contrastBorder);te&&ce.addRule(`.monaco-editor .find-widget { border: 1px solid ${te}; }`);const G=re.getColor(o.editorWidgetForeground);G&&ce.addRule(`.monaco-editor .find-widget { color: ${G}; }`);const ae=re.getColor(o.errorForeground);ae&&ce.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${ae}; }`);const fe=re.getColor(o.editorWidgetResizeBorder);if(fe)ce.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${fe}; }`);else{const ye=re.getColor(o.editorWidgetBorder);ye&&ce.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${ye}; }`)}const Ce=re.getColor(o.toolbarHoverBackground);Ce&&ce.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 Se=re.getColor(o.focusBorder);Se&&ce.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${Se}; }`)})}),define(J[351],ee([1,0,14,2,9,15,75,22,46,189,846,847,848,628,30,97,13,55,34,43,71,85,23]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,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 v=524288;function f(B,V="single",K=!1){if(!B.hasModel())return null;const A=B.getSelection();if(V==="single"&&A.startLineNumber===A.endLineNumber||V==="multiple"){if(A.isEmpty()){const Y=B.getConfiguredWordAtPosition(A.getStartPosition());if(Y&&K===!1)return Y.word}else if(B.getModel().getValueLengthInRange(A)<v)return B.getModel().getValueInRange(A)}return null}e.getSelectionSearchString=f;let p=e.CommonFindController=class Gi extends k.Disposable{get editor(){return this._editor}static get(V){return V.getContribution(Gi.ID)}constructor(V,K,A,Y){super(),this._editor=V,this._findWidgetVisible=g.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(K),this._contextKeyService=K,this._storageService=A,this._clipboardService=Y,this._updateHistoryDelayer=new _.Delayer(500),this._state=this._register(new s.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(ie=>this._onStateChanged(ie))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const ie=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),ie&&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(V){this.saveQueryState(V),V.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),V.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(V){V.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),V.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),V.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),V.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}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!!g.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 V=this._editor.getSelections();V.map(K=>(K.endColumn===1&&K.endLineNumber>K.startLineNumber&&(K=K.setEndPosition(K.endLineNumber-1,this._editor.getModel().getLineMaxColumn(K.endLineNumber-1))),K.isEmpty()?null:K)).filter(K=>!!K),V.length&&this._state.change({searchScope:V},!0)}}setSearchString(V){this._state.isRegex&&(V=L.escapeRegExpCharacters(V)),this._state.change({searchString:V},!1)}highlightFindOptions(V=!1){}_start(V,K){return we(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const A=Object.assign(Object.assign({},K),{isRevealed:!0});if(V.seedSearchStringFromSelection==="single"){const Y=f(this._editor,V.seedSearchStringFromSelection,V.seedSearchStringFromNonEmptySelection);Y&&(this._state.isRegex?A.searchString=L.escapeRegExpCharacters(Y):A.searchString=Y)}else if(V.seedSearchStringFromSelection==="multiple"&&!V.updateSearchScope){const Y=f(this._editor,V.seedSearchStringFromSelection);Y&&(A.searchString=Y)}if(!A.searchString&&V.seedSearchStringFromGlobalClipboard){const Y=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;Y&&(A.searchString=Y)}if(V.forceRevealReplace||A.isReplaceRevealed?A.isReplaceRevealed=!0:this._findWidgetVisible.get()||(A.isReplaceRevealed=!1),V.updateSearchScope){const Y=this._editor.getSelections();Y.some(ie=>!ie.isEmpty())&&(A.searchScope=Y)}A.loop=V.loop,this._state.change(A,!1),this._model||(this._model=new g.FindModelBoundToEditorModel(this._editor,this._state))})}start(V,K){return this._start(V,K)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(V){return this._model?(this._model.moveToMatch(V),!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 we(this,void 0,void 0,function*(){return this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(V){this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(V)}};p.ID="editor.contrib.findController",e.CommonFindController=p=Te([ge(1,d.IContextKeyService),ge(2,l.IStorageService),ge(3,r.IClipboardService)],p);let C=e.FindController=class extends p{constructor(V,K,A,Y,ie,le,ne,se){super(V,A,ne,se),this._contextViewService=K,this._keybindingService=Y,this._themeService=ie,this._notificationService=le,this._widget=null,this._findOptionsWidget=null}_start(V,K){const A=Object.create(null,{_start:{get:()=>super._start}});return we(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const Y=this._editor.getSelection();let ie=!1;switch(this._editor.getOption(39).autoFindInSelection){case"always":ie=!0;break;case"never":ie=!1;break;case"multiline":{ie=!!Y&&Y.startLineNumber!==Y.endLineNumber;break}default:break}V.updateSearchScope=V.updateSearchScope||ie,yield A._start.call(this,V,K),this._widget&&(V.shouldFocus===2?this._widget.focusReplaceInput():V.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(V=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!V?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))}};e.FindController=C=Te([ge(1,h.IContextViewService),ge(2,d.IContextKeyService),ge(3,o.IKeybindingService),ge(4,u.IThemeService),ge(5,c.INotificationService),ge(6,l.IStorageService),ge(7,r.IClipboardService)],C),e.StartFindAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:g.FIND_IDS.StartFindAction,label:i.localize(0,null),alias:"Find",precondition:d.ContextKeyExpr.or(b.EditorContextKeys.focus,d.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:n.MenuId.MenubarEditMenu,group:"3_find",title:i.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(B,V,K)=>{const A=p.get(V);return A?A.start({forceRevealReplace:!1,seedSearchStringFromSelection:V.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:V.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:V.getOption(39).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:V.getOption(39).loop}):!1});const y={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:g.FIND_IDS.StartFindWithArgs,label:i.localize(6,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:y})}run(V,K,A){return we(this,void 0,void 0,function*(){const Y=p.get(K);if(Y){const ie=A?{searchString:A.searchString,replaceString:A.replaceString,isReplaceRevealed:A.replaceString!==void 0,isRegex:A.isRegex,wholeWord:A.matchWholeWord,matchCase:A.isCaseSensitive,preserveCase:A.preserveCase}:{};yield Y.start({forceRevealReplace:!1,seedSearchStringFromSelection:Y.getState().searchString.length===0&&K.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:K.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:A?.findInSelection||!1,loop:K.getOption(39).loop},ie),Y.setGlobalBufferTerm(Y.getState().searchString)}})}}e.StartFindWithArgsAction=E;class I extends D.EditorAction{constructor(){super({id:g.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(V,K){return we(this,void 0,void 0,function*(){const A=p.get(K);A&&(yield A.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(39).loop}),A.setGlobalBufferTerm(A.getState().searchString))})}}e.StartFindWithSelectionAction=I;class T extends D.EditorAction{run(V,K){return we(this,void 0,void 0,function*(){const A=p.get(K);A&&!this._run(A)&&(yield A.start({forceRevealReplace:!1,seedSearchStringFromSelection:A.getState().searchString.length===0&&K.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:K.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(39).loop}),this._run(A))})}}e.MatchFindAction=T;class O extends T{constructor(){super({id:g.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:d.ContextKeyExpr.and(b.EditorContextKeys.focus,g.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(V){return V.moveToNextMatch()?(V.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=O;class R extends T{constructor(){super({id:g.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:d.ContextKeyExpr.and(b.EditorContextKeys.focus,g.CONTEXT_FIND_INPUT_FOCUSED),primary:1027,weight:100}]})}_run(V){return V.moveToPrevMatch()}}e.PreviousMatchFindAction=R;class M extends D.EditorAction{constructor(){super({id:g.FIND_IDS.GoToMatchFindAction,label:i.localize(10,null),alias:"Go to Match...",precondition:g.CONTEXT_FIND_WIDGET_VISIBLE}),this._highlightDecorations=[]}run(V,K,A){const Y=p.get(K);if(!Y)return;const ie=Y.getState().matchesCount;if(ie<1){V.get(c.INotificationService).notify({severity:c.Severity.Warning,message:i.localize(11,null)});return}const ne=V.get(a.IQuickInputService).createInputBox();ne.placeholder=i.localize(12,null,ie);const se=W=>{const $=parseInt(W);if(isNaN($))return;const Z=Y.getState().matchesCount;if($>0&&$<=Z)return $-1;if($<0&&$>=-Z)return Z+$},H=W=>{const $=se(W);if(typeof $=="number"){ne.validationMessage=void 0,Y.goToMatch($);const Z=Y.getState().currentMatch;Z&&this.addDecorations(K,Z)}else ne.validationMessage=i.localize(13,null,Y.getState().matchesCount),this.clearDecorations(K)};ne.onDidChangeValue(W=>{H(W)}),ne.onDidAccept(()=>{const W=se(ne.value);typeof W=="number"?(Y.goToMatch(W),ne.hide()):ne.validationMessage=i.localize(14,null,Y.getState().matchesCount)}),ne.onDidHide(()=>{this.clearDecorations(K),ne.dispose()}),ne.show()}clearDecorations(V){V.changeDecorations(K=>{this._highlightDecorations=K.deltaDecorations(this._highlightDecorations,[])})}addDecorations(V,K){V.changeDecorations(A=>{this._highlightDecorations=A.deltaDecorations(this._highlightDecorations,[{range:K,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:K,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,u.themeColorFromId)(w.overviewRulerRangeHighlight),position:S.OverviewRulerLane.Full}}}])})}}e.MoveToMatchFindAction=M;class N extends D.EditorAction{run(V,K){return we(this,void 0,void 0,function*(){const A=p.get(K);if(!A)return;const Y=f(K,"single",!1);Y&&A.setSearchString(Y),this._run(A)||(yield A.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(39).loop}),this._run(A))})}}e.SelectionMatchFindAction=N;class P extends N{constructor(){super({id:g.FIND_IDS.NextSelectionMatchFindAction,label:i.localize(15,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:2109,weight:100}})}_run(V){return V.moveToNextMatch()}}e.NextSelectionMatchFindAction=P;class x extends N{constructor(){super({id:g.FIND_IDS.PreviousSelectionMatchFindAction,label:i.localize(16,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:3133,weight:100}})}_run(V){return V.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=x,e.StartFindReplaceAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:g.FIND_IDS.StartFindReplaceAction,label:i.localize(17,null),alias:"Replace",precondition:d.ContextKeyExpr.or(b.EditorContextKeys.focus,d.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:n.MenuId.MenubarEditMenu,group:"3_find",title:i.localize(18,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(B,V,K)=>{if(!V.hasModel()||V.getOption(88))return!1;const A=p.get(V);if(!A)return!1;const Y=V.getSelection(),ie=A.isFindInputFocused(),le=!Y.isEmpty()&&Y.startLineNumber===Y.endLineNumber&&V.getOption(39).seedSearchStringFromSelection!=="never"&&!ie,ne=ie||le?2:1;return A.start({forceRevealReplace:!0,seedSearchStringFromSelection:le?"single":"none",seedSearchStringFromNonEmptySelection:V.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:V.getOption(39).seedSearchStringFromSelection!=="never",shouldFocus:ne,shouldAnimate:!0,updateSearchScope:!1,loop:V.getOption(39).loop})}),(0,D.registerEditorContribution)(p.ID,C,0),(0,D.registerEditorAction)(E),(0,D.registerEditorAction)(I),(0,D.registerEditorAction)(O),(0,D.registerEditorAction)(R),(0,D.registerEditorAction)(M),(0,D.registerEditorAction)(P),(0,D.registerEditorAction)(x);const F=D.EditorCommand.bindToContribution(p.get);(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.CloseFindWidgetCommand,precondition:g.CONTEXT_FIND_WIDGET_VISIBLE,handler:B=>B.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:d.ContextKeyExpr.and(b.EditorContextKeys.focus,d.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1033]}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:B=>B.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:g.ToggleCaseSensitiveKeybinding.primary,mac:g.ToggleCaseSensitiveKeybinding.mac,win:g.ToggleCaseSensitiveKeybinding.win,linux:g.ToggleCaseSensitiveKeybinding.linux}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:B=>B.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:g.ToggleWholeWordKeybinding.primary,mac:g.ToggleWholeWordKeybinding.mac,win:g.ToggleWholeWordKeybinding.win,linux:g.ToggleWholeWordKeybinding.linux}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:B=>B.toggleRegex(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:g.ToggleRegexKeybinding.primary,mac:g.ToggleRegexKeybinding.mac,win:g.ToggleRegexKeybinding.win,linux:g.ToggleRegexKeybinding.linux}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:B=>B.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:g.ToggleSearchScopeKeybinding.primary,mac:g.ToggleSearchScopeKeybinding.mac,win:g.ToggleSearchScopeKeybinding.win,linux:g.ToggleSearchScopeKeybinding.linux}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:B=>B.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:g.TogglePreserveCaseKeybinding.primary,mac:g.TogglePreserveCaseKeybinding.mac,win:g.TogglePreserveCaseKeybinding.win,linux:g.TogglePreserveCaseKeybinding.linux}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.ReplaceOneAction,precondition:g.CONTEXT_FIND_WIDGET_VISIBLE,handler:B=>B.replace(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:3094}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.ReplaceOneAction,precondition:g.CONTEXT_FIND_WIDGET_VISIBLE,handler:B=>B.replace(),kbOpts:{weight:100+5,kbExpr:d.ContextKeyExpr.and(b.EditorContextKeys.focus,g.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.ReplaceAllAction,precondition:g.CONTEXT_FIND_WIDGET_VISIBLE,handler:B=>B.replaceAll(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:2563}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.ReplaceAllAction,precondition:g.CONTEXT_FIND_WIDGET_VISIBLE,handler:B=>B.replaceAll(),kbOpts:{weight:100+5,kbExpr:d.ContextKeyExpr.and(b.EditorContextKeys.focus,g.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2051}}})),(0,D.registerEditorCommand)(new F({id:g.FIND_IDS.SelectAllMatchesAction,precondition:g.CONTEXT_FIND_WIDGET_VISIBLE,handler:B=>B.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:b.EditorContextKeys.focus,primary:515}}))}),define(J[849],ee([1,0,26,46,38,631,33,74,23,31]),function(j,e,_,k,L,D,w,b,S,g){"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",_.Codicon.chevronDown,(0,D.localize)(2,null)),e.foldingCollapsedIcon=(0,b.registerIcon)("folding-collapsed",_.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 s={color:(0,S.themeColorFromId)(m),position:k.MinimapPosition.Inline};class t{constructor(n){this.editor=n,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(n,r,d){return r?t.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?n?this.showFoldingHighlights?t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:t.NO_CONTROLS_EXPANDED_RANGE_DECORATION:n?d?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"?d?t.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:t.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:d?t.MANUALLY_EXPANDED_VISUAL_DECORATION:t.EXPANDED_VISUAL_DECORATION}changeDecorations(n){return this.editor.changeDecorations(n)}removeDecorations(n){this.editor.removeDecorations(n)}}e.FoldingDecorationProvider=t,t.COLLAPSED_VISUAL_DECORATION=L.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),t.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=L.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:s,isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),t.MANUALLY_COLLAPSED_VISUAL_DECORATION=L.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),t.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=L.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:s,isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=L.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=L.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:s,isWholeLine:!0}),t.EXPANDED_VISUAL_DECORATION=L.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+g.ThemeIcon.asClassName(e.foldingExpandedIcon)}),t.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=L.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingExpandedIcon)}),t.MANUALLY_EXPANDED_VISUAL_DECORATION=L.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+g.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),t.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=L.ModelDecorationOptions.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:g.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),t.NO_CONTROLS_EXPANDED_RANGE_DECORATION=L.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),t.HIDDEN_RANGE_DECORATION=L.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(J[352],ee([1,0,14,20,11,58,2,9,18,116,15,22,27,29,586,587,279,630,13,849,176,280,43,70,56,19,6,25,21,50,28,429]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangesLimitReporter=e.FoldingController=void 0;const O=new o.RawContextKey("foldingEnabled",!1);let R=e.FoldingController=class Vt extends w.Disposable{static get(de){return de.getContribution(Vt.ID)}static getFoldingRangeProviders(de,ue){var q,z;const U=de.foldingRangeProvider.ordered(ue);return(z=(q=Vt._foldingRangeSelector)===null||q===void 0?void 0:q.call(Vt,U,ue))!==null&&z!==void 0?z:U}constructor(de,ue,q,z,U,X){super(),this.contextKeyService=ue,this.languageConfigurationService=q,this.languageFeaturesService=X,this.localToDispose=this._register(new w.DisposableStore),this.editor=de,this._foldingLimitReporter=new M(de);const te=this.editor.getOptions();this._isEnabled=te.get(41),this._useFoldingProviders=te.get(42)!=="indentation",this._unfoldOnClickAfterEndOfLine=te.get(46),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=te.get(44),this.updateDebounceInfo=U.for(X.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 c.FoldingDecorationProvider(de),this.foldingDecorationProvider.showFoldingControls=te.get(106),this.foldingDecorationProvider.showFoldingHighlights=te.get(43),this.foldingEnabled=O.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(G=>{if(G.hasChanged(41)&&(this._isEnabled=this.editor.getOptions().get(41),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),G.hasChanged(45)&&this.onModelChanged(),G.hasChanged(106)||G.hasChanged(43)){const ae=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=ae.get(106),this.foldingDecorationProvider.showFoldingHighlights=ae.get(43),this.triggerFoldingModelChanged()}G.hasChanged(42)&&(this._useFoldingProviders=this.editor.getOptions().get(42)!=="indentation",this.onFoldingStrategyChanged()),G.hasChanged(46)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(46)),G.hasChanged(44)&&(this._foldingImportsByDefault=this.editor.getOptions().get(44))})),this.onModelChanged()}saveViewState(){const de=this.editor.getModel();if(!de||!this._isEnabled||de.isTooLargeForTokenization())return{};if(this.foldingModel){const ue=this.foldingModel.getMemento(),q=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:ue,lineCount:de.getLineCount(),provider:q,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(de){const ue=this.editor.getModel();if(!(!ue||!this._isEnabled||ue.isTooLargeForTokenization()||!this.hiddenRangeModel)&&de&&(this._currentModelHasFoldedImports=!!de.foldedImports,de.collapsedRegions&&de.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(de.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const de=this.editor.getModel();!this._isEnabled||!de||de.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new n.FoldingModel(de,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(ue=>this.onHiddenRangesChanges(ue))),this.updateScheduler=new _.Delayer(this.updateDebounceInfo.get(de)),this.cursorChangedScheduler=new _.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(ue=>this.onDidChangeModelContent(ue))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(ue=>this.onEditorMouseDown(ue))),this.localToDispose.add(this.editor.onMouseUp(ue=>this.onEditorMouseUp(ue))),this.localToDispose.add({dispose:()=>{var ue,q;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(ue=this.updateScheduler)===null||ue===void 0||ue.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(q=this.rangeProvider)===null||q===void 0||q.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var de;(de=this.rangeProvider)===null||de===void 0||de.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(de){if(this.rangeProvider)return this.rangeProvider;const ue=new d.IndentRangeProvider(de,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=ue,this._useFoldingProviders&&this.foldingModel){const q=Vt.getFoldingRangeProviders(this.languageFeaturesService,de);q.length>0&&(this.rangeProvider=new l.SyntaxRangeProvider(de,q,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,ue))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(de){var ue;(ue=this.hiddenRangeModel)===null||ue===void 0||ue.notifyChangeModelContent(de),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const de=this.foldingModel;if(!de)return null;const ue=new f.StopWatch(!0),q=this.getRangeProvider(de.textModel),z=this.foldingRegionPromise=(0,_.createCancelablePromise)(U=>q.compute(U));return z.then(U=>{if(U&&z===this.foldingRegionPromise){let X;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const fe=U.setCollapsedAllOfType(t.FoldingRangeKind.Imports.value,!0);fe&&(X=g.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=fe)}const te=this.editor.getSelections(),G=te?te.map(fe=>fe.startLineNumber):[];de.update(U,G),X?.restore(this.editor);const ae=this.updateDebounceInfo.update(de.textModel,ue.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=ae)}return de})}).then(void 0,de=>((0,L.onUnexpectedError)(de),null)))}onHiddenRangesChanges(de){if(this.hiddenRangeModel&&de.length&&!this._restoringViewState){const ue=this.editor.getSelections();ue&&this.hiddenRangeModel.adjustSelections(ue)&&this.editor.setSelections(ue)}this.editor.setHiddenAreas(de,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const de=this.getFoldingModel();de&&de.then(ue=>{if(ue){const q=this.editor.getSelections();if(q&&q.length>0){const z=[];for(const U of q){const X=U.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(X)&&z.push(...ue.getAllRegionsAtLine(X,te=>te.isCollapsed&&X>te.startLineNumber))}z.length&&(ue.toggleCollapseState(z),this.reveal(q[0].getPosition()))}}}).then(void 0,L.onUnexpectedError)}onEditorMouseDown(de){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!de.target||!de.target.range||!de.event.leftButton&&!de.event.middleButton)return;const ue=de.target.range;let q=!1;switch(de.target.type){case 4:{const z=de.target.detail,U=de.target.element.offsetLeft;if(z.offsetX-U<5)return;q=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!de.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const z=this.editor.getModel();if(z&&ue.startColumn===z.getLineMaxColumn(ue.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:ue.startLineNumber,iconClicked:q}}onEditorMouseUp(de){const ue=this.foldingModel;if(!ue||!this.mouseDownInfo||!de.target)return;const q=this.mouseDownInfo.lineNumber,z=this.mouseDownInfo.iconClicked,U=de.target.range;if(!U||U.startLineNumber!==q)return;if(z){if(de.target.type!==4)return}else{const te=this.editor.getModel();if(!te||U.startColumn!==te.getLineMaxColumn(q))return}const X=ue.getRegionAtLine(q);if(X&&X.startLineNumber===q){const te=X.isCollapsed;if(z||te){const G=de.event.altKey;let ae=[];if(G){const fe=Se=>!Se.containedBy(X)&&!X.containedBy(Se),Ce=ue.getRegionsInside(null,fe);for(const Se of Ce)Se.isCollapsed&&ae.push(Se);ae.length===0&&(ae=Ce)}else{const fe=de.event.middleButton||de.event.shiftKey;if(fe)for(const Ce of ue.getRegionsInside(X))Ce.isCollapsed===te&&ae.push(Ce);(te||!fe||ae.length===0)&&ae.push(X)}ue.toggleCollapseState(ae),this.reveal({lineNumber:q,column:1})}}}reveal(de){this.editor.revealPositionInCenterIfOutsideViewport(de,0)}};R.ID="editor.contrib.folding",e.FoldingController=R=Te([ge(1,o.IContextKeyService),ge(2,i.ILanguageConfigurationService),ge(3,u.INotificationService),ge(4,v.ILanguageFeatureDebounceService),ge(5,p.ILanguageFeaturesService)],R);class M{constructor(de){this.editor=de,this._onDidChange=new C.Emitter,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(45)}update(de,ue){(de!==this._computed||ue!==this._limited)&&(this._computed=de,this._limited=ue,this._onDidChange.fire())}}e.RangesLimitReporter=M;class N extends m.EditorAction{runEditorCommand(de,ue,q){const z=de.get(i.ILanguageConfigurationService),U=R.get(ue);if(!U)return;const X=U.getFoldingModel();if(X)return this.reportTelemetry(de,ue),X.then(te=>{if(te){this.invoke(U,te,ue,q,z);const G=ue.getSelection();G&&U.reveal(G.getStartPosition())}})}getSelectedLines(de){const ue=de.getSelections();return ue?ue.map(q=>q.startLineNumber):[]}getLineNumbers(de,ue){return de&&de.selectionLines?de.selectionLines.map(q=>q+1):this.getSelectedLines(ue)}run(de,ue){}}function P(he){if(!S.isUndefined(he)){if(!S.isObject(he))return!1;const de=he;if(!S.isUndefined(de.levels)&&!S.isNumber(de.levels)||!S.isUndefined(de.direction)&&!S.isString(de.direction)||!S.isUndefined(de.selectionLines)&&(!Array.isArray(de.selectionLines)||!de.selectionLines.every(S.isNumber)))return!1}return!0}class x extends N{constructor(){super({id:"editor.unfold",label:h.localize(0,null),alias:"Unfold",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:3166,mac:{primary:2654},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:P,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(de,ue,q,z){const U=z&&z.levels||1,X=this.getLineNumbers(z,q);z&&z.direction==="up"?(0,n.setCollapseStateLevelsUp)(ue,!1,U,X):(0,n.setCollapseStateLevelsDown)(ue,!1,U,X)}}class F extends N{constructor(){super({id:"editor.unfoldRecursively",label:h.localize(1,null),alias:"Unfold Recursively",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2142),weight:100}})}invoke(de,ue,q,z){(0,n.setCollapseStateLevelsDown)(ue,!1,Number.MAX_VALUE,this.getSelectedLines(q))}}class B extends N{constructor(){super({id:"editor.fold",label:h.localize(2,null),alias:"Fold",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:3164,mac:{primary:2652},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:P,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(de,ue,q,z){const U=this.getLineNumbers(z,q),X=z&&z.levels,te=z&&z.direction;typeof X!="number"&&typeof te!="string"?(0,n.setCollapseStateUp)(ue,!0,U):te==="up"?(0,n.setCollapseStateLevelsUp)(ue,!0,X||1,U):(0,n.setCollapseStateLevelsDown)(ue,!0,X||1,U)}}class V extends N{constructor(){super({id:"editor.toggleFold",label:h.localize(3,null),alias:"Toggle Fold",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2090),weight:100}})}invoke(de,ue,q){const z=this.getSelectedLines(q);(0,n.toggleCollapseState)(ue,1,z)}}class K extends N{constructor(){super({id:"editor.foldRecursively",label:h.localize(4,null),alias:"Fold Recursively",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2140),weight:100}})}invoke(de,ue,q){const z=this.getSelectedLines(q);(0,n.setCollapseStateLevelsDown)(ue,!0,Number.MAX_VALUE,z)}}class A extends N{constructor(){super({id:"editor.foldAllBlockComments",label:h.localize(5,null),alias:"Fold All Block Comments",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2138),weight:100}})}invoke(de,ue,q,z,U){if(ue.regions.hasTypes())(0,n.setCollapseStateForType)(ue,t.FoldingRangeKind.Comment.value,!0);else{const X=q.getModel();if(!X)return;const te=U.getLanguageConfiguration(X.getLanguageId()).comments;if(te&&te.blockCommentStartToken){const G=new RegExp("^\\\\s*"+(0,b.escapeRegExpCharacters)(te.blockCommentStartToken));(0,n.setCollapseStateForMatchingLines)(ue,G,!0)}}}}class Y extends N{constructor(){super({id:"editor.foldAllMarkerRegions",label:h.localize(6,null),alias:"Fold All Regions",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2077),weight:100}})}invoke(de,ue,q,z,U){if(ue.regions.hasTypes())(0,n.setCollapseStateForType)(ue,t.FoldingRangeKind.Region.value,!0);else{const X=q.getModel();if(!X)return;const te=U.getLanguageConfiguration(X.getLanguageId()).foldingRules;if(te&&te.markers&&te.markers.start){const G=new RegExp(te.markers.start);(0,n.setCollapseStateForMatchingLines)(ue,G,!0)}}}}class ie extends N{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:h.localize(7,null),alias:"Unfold All Regions",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2078),weight:100}})}invoke(de,ue,q,z,U){if(ue.regions.hasTypes())(0,n.setCollapseStateForType)(ue,t.FoldingRangeKind.Region.value,!1);else{const X=q.getModel();if(!X)return;const te=U.getLanguageConfiguration(X.getLanguageId()).foldingRules;if(te&&te.markers&&te.markers.start){const G=new RegExp(te.markers.start);(0,n.setCollapseStateForMatchingLines)(ue,G,!1)}}}}class le extends N{constructor(){super({id:"editor.foldAllExcept",label:h.localize(8,null),alias:"Fold All Regions Except Selected",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2136),weight:100}})}invoke(de,ue,q){const z=this.getSelectedLines(q);(0,n.setCollapseStateForRest)(ue,!0,z)}}class ne extends N{constructor(){super({id:"editor.unfoldAllExcept",label:h.localize(9,null),alias:"Unfold All Regions Except Selected",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2134),weight:100}})}invoke(de,ue,q){const z=this.getSelectedLines(q);(0,n.setCollapseStateForRest)(ue,!1,z)}}class se extends N{constructor(){super({id:"editor.foldAll",label:h.localize(10,null),alias:"Fold All",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2069),weight:100}})}invoke(de,ue,q){(0,n.setCollapseStateLevelsDown)(ue,!0)}}class H extends N{constructor(){super({id:"editor.unfoldAll",label:h.localize(11,null),alias:"Unfold All",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2088),weight:100}})}invoke(de,ue,q){(0,n.setCollapseStateLevelsDown)(ue,!1)}}class W extends N{getFoldingLevel(){return parseInt(this.id.substr(W.ID_PREFIX.length))}invoke(de,ue,q){(0,n.setCollapseStateAtLevel)(ue,this.getFoldingLevel(),!0,this.getSelectedLines(q))}}W.ID_PREFIX="editor.foldLevel",W.ID=he=>W.ID_PREFIX+he;class $ extends N{constructor(){super({id:"editor.gotoParentFold",label:h.localize(12,null),alias:"Go to Parent Fold",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,weight:100}})}invoke(de,ue,q){const z=this.getSelectedLines(q);if(z.length>0){const U=(0,n.getParentFoldLine)(z[0],ue);U!==null&&q.setSelection({startLineNumber:U,startColumn:1,endLineNumber:U,endColumn:1})}}}class Z extends N{constructor(){super({id:"editor.gotoPreviousFold",label:h.localize(13,null),alias:"Go to Previous Folding Range",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,weight:100}})}invoke(de,ue,q){const z=this.getSelectedLines(q);if(z.length>0){const U=(0,n.getPreviousFoldLine)(z[0],ue);U!==null&&q.setSelection({startLineNumber:U,startColumn:1,endLineNumber:U,endColumn:1})}}}class Q extends N{constructor(){super({id:"editor.gotoNextFold",label:h.localize(14,null),alias:"Go to Next Folding Range",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,weight:100}})}invoke(de,ue,q){const z=this.getSelectedLines(q);if(z.length>0){const U=(0,n.getNextFoldLine)(z[0],ue);U!==null&&q.setSelection({startLineNumber:U,startColumn:1,endLineNumber:U,endColumn:1})}}}class re extends N{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:h.localize(15,null),alias:"Create Folding Range from Selection",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2135),weight:100}})}invoke(de,ue,q){var z;const U=[],X=q.getSelections();if(X){for(const te of X){let G=te.endLineNumber;te.endColumn===1&&--G,G>te.startLineNumber&&(U.push({startLineNumber:te.startLineNumber,endLineNumber:G,type:void 0,isCollapsed:!0,source:1}),q.setSelection({startLineNumber:te.startLineNumber,startColumn:1,endLineNumber:te.startLineNumber,endColumn:1}))}if(U.length>0){U.sort((G,ae)=>G.startLineNumber-ae.startLineNumber);const te=a.FoldingRegions.sanitizeAndMerge(ue.regions,U,(z=q.getModel())===null||z===void 0?void 0:z.getLineCount());ue.updatePost(a.FoldingRegions.fromFoldRanges(te))}}}}class ce extends N{constructor(){super({id:"editor.removeManualFoldingRanges",label:h.localize(16,null),alias:"Remove Manual Folding Ranges",precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2137),weight:100}})}invoke(de,ue,q){const z=q.getSelections();if(z){const U=[];for(const X of z){const{startLineNumber:te,endLineNumber:G}=X;U.push(G>=te?{startLineNumber:te,endLineNumber:G}:{endLineNumber:G,startLineNumber:te})}ue.removeManualRanges(U),de.triggerFoldingModelChanged()}}}(0,m.registerEditorContribution)(R.ID,R,0),(0,m.registerEditorAction)(x),(0,m.registerEditorAction)(F),(0,m.registerEditorAction)(B),(0,m.registerEditorAction)(K),(0,m.registerEditorAction)(se),(0,m.registerEditorAction)(H),(0,m.registerEditorAction)(A),(0,m.registerEditorAction)(Y),(0,m.registerEditorAction)(ie),(0,m.registerEditorAction)(le),(0,m.registerEditorAction)(ne),(0,m.registerEditorAction)(V),(0,m.registerEditorAction)($),(0,m.registerEditorAction)(Z),(0,m.registerEditorAction)(Q),(0,m.registerEditorAction)(re),(0,m.registerEditorAction)(ce);for(let he=1;he<=7;he++)(0,m.registerInstantiatedEditorAction)(new W({id:W.ID(he),label:h.localize(17,null,he),alias:`Fold Level ${he}`,precondition:O,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2048|21+he),weight:100}}));y.CommandsRegistry.registerCommand("_executeFoldingRangeProvider",function(he,...de){return we(this,void 0,void 0,function*(){const[ue]=de;if(!(ue instanceof E.URI))throw(0,L.illegalArgument)();const q=he.get(p.ILanguageFeaturesService),z=he.get(I.IModelService).getModel(ue);if(!z)throw(0,L.illegalArgument)();const U=he.get(T.IConfigurationService);if(!U.getValue("editor.folding",{resource:ue}))return[];const X=he.get(i.ILanguageConfigurationService),te=U.getValue("editor.foldingStrategy",{resource:ue}),G={get limit(){return U.getValue("editor.foldingMaximumRegions",{resource:ue})},update:(ye,Ie)=>{}},ae=new d.IndentRangeProvider(z,X,G);let fe=ae;if(te!=="indentation"){const ye=R.getFoldingRangeProviders(q,z);ye.length&&(fe=new l.SyntaxRangeProvider(z,ye,()=>{},G,ae))}const Ce=yield fe.compute(k.CancellationToken.None),Se=[];try{if(Ce)for(let ye=0;ye<Ce.length;ye++){const Ie=Ce.getType(ye);Se.push({start:Ce.getStartLineNumber(ye),end:Ce.getEndLineNumber(ye),kind:Ie?t.FoldingRangeKind.fromValue(Ie):void 0})}return Se}finally{fe.dispose()}})})}),define(J[353],ee([1,0,7,298,16,2,12,5,38,27,312,95,13,8,34,129,14,22]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorHoverStatusBar=e.ContentHoverWidget=e.ContentHoverController=void 0;const o=_.$;let c=e.ContentHoverController=class gi extends D.Disposable{constructor(E,I,T){super(),this._editor=E,this._instantiationService=I,this._keybindingService=T,this._widget=this._register(this._instantiationService.createInstance(v,this._editor)),this._currentResult=null,this._participants=[];for(const O of s.HoverParticipantRegistry.getAll())this._participants.push(this._instantiationService.createInstance(O,this._editor));this._participants.sort((O,R)=>O.hoverOrdinal-R.hoverOrdinal),this._computer=new p(this._editor,this._participants),this._hoverOperation=this._register(new m.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(O=>{if(!this._computer.anchor)return;const R=O.hasLoadingMessage?this._addLoadingMessage(O.value):O.value;this._withResult(new a(this._computer.anchor,R,O.isComplete))})),this._register(_.addStandardDisposableListener(this._widget.getDomNode(),"keydown",O=>{O.equals(9)&&this.hide()})),this._register(g.TokenizationRegistry.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(E){const I=[];for(const O of this._participants)if(O.suggestHoverAnchor){const R=O.suggestHoverAnchor(E);R&&I.push(R)}const T=E.target;if(T.type===6&&I.push(new s.HoverRangeAnchor(0,T.range,E.event.posx,E.event.posy)),T.type===7){const O=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!T.detail.isAfterLines&&typeof T.detail.horizontalDistanceToText=="number"&&T.detail.horizontalDistanceToText<O&&I.push(new s.HoverRangeAnchor(0,T.range,E.event.posx,E.event.posy))}return I.length===0?this._startShowingOrUpdateHover(null,0,0,!1,E):(I.sort((O,R)=>R.priority-O.priority),this._startShowingOrUpdateHover(I[0],0,0,!1,E))}startShowingAtRange(E,I,T,O){this._startShowingOrUpdateHover(new s.HoverRangeAnchor(0,E,void 0,void 0),I,T,O,null)}_startShowingOrUpdateHover(E,I,T,O,R){return!this._widget.position||!this._currentResult?E?(this._startHoverOperationIfNecessary(E,I,T,O,!1),!0):!1:this._editor.getOption(58).sticky&&R&&this._widget.isMouseGettingCloser(R.event.posx,R.event.posy)?(E&&this._startHoverOperationIfNecessary(E,I,T,O,!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,O,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(E,I,T,O,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(E,I,T,O,R){this._computer.anchor&&this._computer.anchor.equals(E)||(this._hoverOperation.cancel(),this._computer.anchor=E,this._computer.shouldFocus=O,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 E?this._widget.getDomNode().contains(E):!1}_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:O,highlightRange:R}=gi.computeHoverRanges(this._editor,E.range,I),M=new D.DisposableStore,N=M.add(new f(this._keybindingService)),P=document.createDocumentFragment();let x=null;const F={fragment:P,statusBar:N,setColorPicker:V=>x=V,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const V of this._participants){const K=I.filter(A=>A.owner===V);K.length>0&&M.add(V.renderHoverParts(F,K))}const B=I.some(V=>V.isBeforeContent);if(N.hasContent&&P.appendChild(N.hoverElement),P.hasChildNodes()){if(R){const V=this._editor.createDecorationsCollection();V.set([{range:R,options:gi._DECORATION_OPTIONS}]),M.add((0,D.toDisposable)(()=>{V.clear()}))}this._widget.showAt(P,new u(x,T,O,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,B,E.initialMousePosX,E.initialMousePosY,M))}else M.dispose()}static computeHoverRanges(E,I,T){let O=1;if(E.hasModel()){const x=E._getViewModel(),F=x.coordinatesConverter,B=F.convertModelRangeToViewRange(I),V=new w.Position(B.startLineNumber,x.getLineMinColumn(B.startLineNumber));O=F.convertViewPositionToModelPosition(V).column}const R=I.startLineNumber;let M=I.startColumn,N=T[0].range,P=null;for(const x of T)N=b.Range.plusRange(N,x.range),x.range.startLineNumber===R&&x.range.endLineNumber===R&&(M=Math.max(Math.min(M,x.range.startColumn),O)),x.forceShowAtRange&&(P=x.range);return{showAtPosition:P?P.getStartPosition():new w.Position(R,I.startColumn),showAtSecondaryPosition:P?P.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()}};c._DECORATION_OPTIONS=S.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),e.ContentHoverController=c=Te([ge(1,i.IInstantiationService),ge(2,n.IKeybindingService)],c);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 l(this,this.anchor,I,this.isComplete)}}class l extends a{constructor(E,I,T,O){super(I,T,O),this.original=E}filter(E){return this.original.filter(E)}}class u{constructor(E,I,T,O,R,M,N,P,x,F){this.colorPicker=E,this.showAtPosition=I,this.showAtSecondaryPosition=T,this.preferAbove=O,this.stoleFocus=R,this.source=M,this.isBeforeContent=N,this.initialMousePosX=P,this.initialMousePosY=x,this.disposables=F,this.closestMouseDistance=void 0}}let v=e.ContentHoverWidget=class Zi 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=h.EditorContextKeys.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=h.EditorContextKeys.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new k.HoverWidget),this._focusTracker=this._register(_.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 Zi.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=_.getDomNodePagePosition(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=C(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,T.left,T.top,T.width,T.height));const O=C(E,I,T.left,T.top,T.width,T.height);return O>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,O),!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._hoverFocusedKey.set(!1),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()}};v.ID="editor.contrib.contentHoverWidget",e.ContentHoverWidget=v=Te([ge(1,t.IContextKeyService)],v);let f=e.EditorHoverStatusBar=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=_.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=_.append(this.actionsElement,E);return this._hasContent=!0,I}};e.EditorHoverStatusBar=f=Te([ge(0,n.IKeybindingService)],f);class p{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(),O=I.range.startLineNumber;if(O>T.getLineCount())return[];const R=T.getLineMaxColumn(O);return E.getLineDecorations(O).filter(M=>{if(M.options.isWholeLine)return!0;const N=M.range.startLineNumber===O?M.range.startColumn:1,P=M.range.endLineNumber===O?M.range.endColumn:R;if(M.options.showIfCollapsed){if(N>I.range.startColumn+1||I.range.endColumn-1>P)return!1}else if(N>I.range.startColumn||I.range.endColumn>P)return!1;return!0})}computeAsync(E){const I=this._anchor;if(!this._editor.hasModel()||!I)return d.AsyncIterableObject.EMPTY;const T=p._getLineDecorations(this._editor,I);return d.AsyncIterableObject.merge(this._participants.map(O=>O.computeAsync?O.computeAsync(I,T,E):d.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const E=p._getLineDecorations(this._editor,this._anchor);let I=[];for(const T of this._participants)I=I.concat(T.computeSync(this._anchor,E));return(0,L.coalesce)(I)}}function C(y,E,I,T,O,R){const M=I+O/2,N=T+R/2,P=Math.max(Math.abs(y-M)-O/2,0),x=Math.max(Math.abs(E-N)-R/2,0);return Math.sqrt(P*P+x*x)}}),define(J[850],ee([1,0,2,350,8,353,34,6,19,15,22,13,50,29,330,7,193]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerWidget=e.StandaloneColorPickerController=void 0;let d=e.StandaloneColorPickerController=class Yi extends _.Disposable{constructor(u,v,f,p,C,y,E){super(),this._editor=u,this._modelService=f,this._keybindingService=p,this._instantiationService=C,this._languageFeatureService=y,this._languageConfigurationService=E,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=m.EditorContextKeys.standaloneColorPickerVisible.bindTo(v),this._standaloneColorPickerFocused=m.EditorContextKeys.standaloneColorPickerFocused.bindTo(v)}showOrFocus(){var u;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(u=this._standaloneColorPickerWidget)===null||u===void 0||u.focus():this._standaloneColorPickerWidget=new c(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var u;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(u=this._standaloneColorPickerWidget)===null||u===void 0||u.hide(),this._editor.focus()}insertColor(){var u;(u=this._standaloneColorPickerWidget)===null||u===void 0||u.updateEditor(),this.hide()}static get(u){return u.getContribution(Yi.ID)}};d.ID="editor.contrib.standaloneColorPickerController",e.StandaloneColorPickerController=d=Te([ge(1,s.IContextKeyService),ge(2,t.IModelService),ge(3,w.IKeybindingService),ge(4,L.IInstantiationService),ge(5,S.ILanguageFeaturesService),ge(6,i.ILanguageConfigurationService)],d),(0,g.registerEditorContribution)(d.ID,d,1);const h=8,o=22;let c=e.StandaloneColorPickerWidget=class Qi extends _.Disposable{constructor(u,v,f,p,C,y,E,I){var T;super(),this._editor=u,this._standaloneColorPickerVisible=v,this._standaloneColorPickerFocused=f,this._modelService=C,this._keybindingService=y,this._languageFeaturesService=E,this._languageConfigurationService=I,this.body=document.createElement("div"),this._position=void 0,this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new b.Emitter),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=p.createInstance(k.StandaloneColorPickerParticipant,this._editor),this._position=(T=this._editor._getViewModel())===null||T===void 0?void 0:T.getPrimaryCursorState().viewState.position;const O=this._editor.getSelection(),R=O?{startLineNumber:O.startLineNumber,startColumn:O.startColumn,endLineNumber:O.endLineNumber,endColumn:O.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},M=this._register(r.trackFocus(this.body));this._register(M.onDidBlur(N=>{this.hide()})),this._register(M.onDidFocus(N=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(N=>{var P;const x=(P=N.target.element)===null||P===void 0?void 0:P.classList;x&&x.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(N=>{this._render(N.value,N.foundInEditor)})),this._start(R),this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return Qi.ID}getDomNode(){return this.body}getPosition(){if(!this._position)return null;const u=this._editor.getOption(58).above;return{position:this._position,secondaryPosition:this._position,preference:u?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this.body.focus()}_start(u){return we(this,void 0,void 0,function*(){const v=yield this._computeAsync(u);v&&this._onResult.fire(new a(v.result,v.foundInEditor))})}_computeAsync(u){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const v={range:u,color:{red:0,green:0,blue:0,alpha:1}},f=yield this._standaloneColorPickerParticipant.createColorHover(v,new n.DefaultDocumentColorProvider(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return f?{result:f.colorHover,foundInEditor:f.foundInEditor}:null})}_render(u,v){const f=document.createDocumentFragment(),p=this._register(new D.EditorHoverStatusBar(this._keybindingService));let C;const y={fragment:f,statusBar:p,setColorPicker:x=>C=x,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=u,this._register(this._standaloneColorPickerParticipant.renderHoverParts(y,[u])),C===void 0)return;this.body.classList.add("standalone-colorpicker-body"),this.body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this.body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this.body.tabIndex=0,this.body.appendChild(f),C.layout();const E=C.body,I=E.saturationBox.domNode.clientWidth,T=E.domNode.clientWidth-I-o-h,O=C.body.enterButton;O?.onClicked(()=>{this.updateEditor(),this.hide()});const R=C.header,M=R.pickedColorNode;M.style.width=I+h+"px";const N=R.originalColorNode;N.style.width=T+"px";const P=C.header.closeButton;P?.onClicked(()=>{this.hide()}),v&&(O&&(O.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(u.range)),this._editor.layoutContentWidget(this)}};c.ID="editor.contrib.standaloneColorPickerWidget",e.StandaloneColorPickerWidget=c=Te([ge(3,L.IInstantiationService),ge(4,t.IModelService),ge(5,w.IKeybindingService),ge(6,S.ILanguageFeaturesService),ge(7,i.ILanguageConfigurationService)],c);class a{constructor(u,v){this.value=u,this.foundInEditor=v}}}),define(J[851],ee([1,0,15,619,850,22,30,193]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowOrFocusStandaloneColorPicker=void 0;class b extends _.EditorAction2{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:(0,k.localize)(0,null),mnemonicTitle:(0,k.localize)(1,null),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:w.MenuId.CommandPalette}]})}runEditorCommand(s,t){var i;(i=L.StandaloneColorPickerController.get(t))===null||i===void 0||i.showOrFocus()}}e.ShowOrFocusStandaloneColorPicker=b;class S extends _.EditorAction{constructor(){super({id:"editor.action.hideColorPicker",label:(0,k.localize)(2,null),alias:"Hide the Color Picker",precondition:D.EditorContextKeys.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(s,t){var i;(i=L.StandaloneColorPickerController.get(t))===null||i===void 0||i.hide()}}class g extends _.EditorAction{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,k.localize)(3,null),alias:"Insert Color with Standalone Color Picker",precondition:D.EditorContextKeys.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(s,t){var i;(i=L.StandaloneColorPickerController.get(t))===null||i===void 0||i.insertColor()}}(0,_.registerEditorAction)(S),(0,_.registerEditorAction)(g),(0,w.registerAction2)(b)}),define(J[852],ee([1,0,14,11,99,15,5,24,22,38,111,647,525,434]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let i=class fi{static get(h){return h.getContribution(fi.ID)}constructor(h,o){this.editor=h,this.editorWorkerService=o,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(h,o){var c;(c=this.currentRequest)===null||c===void 0||c.cancel();const a=this.editor.getSelection(),l=this.editor.getModel();if(!l||!a)return;let u=a;if(u.startLineNumber!==u.endLineNumber)return;const v=new L.EditorState(this.editor,5),f=l.uri;return this.editorWorkerService.canNavigateValueSet(f)?(this.currentRequest=(0,_.createCancelablePromise)(p=>this.editorWorkerService.navigateValueSet(f,u,o)),this.currentRequest.then(p=>{var C;if(!p||!p.range||!p.value||!v.validate(this.editor))return;const y=w.Range.lift(p.range);let E=p.range;const I=p.value.length-(u.endColumn-u.startColumn);E={startLineNumber:E.startLineNumber,startColumn:E.startColumn,endLineNumber:E.endLineNumber,endColumn:E.startColumn+p.value.length},I>1&&(u=new b.Selection(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn+I-1));const T=new t.InPlaceReplaceCommand(y,u,p.value);this.editor.pushUndoStop(),this.editor.executeCommand(h,T),this.editor.pushUndoStop(),this.decorations.set([{range:E,options:fi.DECORATION}]),(C=this.decorationRemover)===null||C===void 0||C.cancel(),this.decorationRemover=(0,_.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=g.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),i=Te([ge(1,m.IEditorWorkerService)],i);class n extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:s.localize(0,null),alias:"Replace with Previous Value",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:3159,weight:100}})}run(h,o){const c=i.get(o);return c?c.run(this.id,!1):Promise.resolve(void 0)}}class r extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:s.localize(1,null),alias:"Replace with Next Value",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:3161,weight:100}})}run(h,o){const c=i.get(o);return c?c.run(this.id,!0):Promise.resolve(void 0)}}(0,D.registerEditorContribution)(i.ID,i,4),(0,D.registerEditorAction)(n),(0,D.registerEditorAction)(r)}),define(J[245],ee([1,0,7,14,26,2,9,31,5,38,8,437]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineProgressManager=void 0;const s=g.ModelDecorationOptions.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:w.noBreakWhitespace,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class t extends D.Disposable{constructor(r,d,h,o,c){super(),this.typeId=r,this.editor=d,this.range=h,this.delegate=c,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(o),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(r){this.domNode=_.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=r;const d=_.$("span.icon");this.domNode.append(d),d.classList.add(...b.ThemeIcon.asClassNameArray(L.Codicon.loading),"codicon-modifier-spin");const h=()=>{const o=this.editor.getOption(64);this.domNode.style.height=`${o}px`,this.domNode.style.width=`${Math.ceil(.8*o)}px`};h(),this._register(this.editor.onDidChangeConfiguration(o=>{(o.hasChanged(50)||o.hasChanged(64))&&h()})),this._register(_.addDisposableListener(this.domNode,_.EventType.CLICK,o=>{this.delegate.cancel()}))}getId(){return t.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}t.baseId="editor.widget.inlineProgressWidget";let i=e.InlineProgressManager=class extends D.Disposable{constructor(r,d,h){super(),this.id=r,this._editor=d,this._instantiationService=h,this._showDelay=500,this._showPromise=this._register(new D.MutableDisposable),this._currentWidget=new D.MutableDisposable,this._operationIdPool=0,this._currentDecorations=d.createDecorationsCollection()}showWhile(r,d,h){return we(this,void 0,void 0,function*(){const o=this._operationIdPool++;this._currentOperation=o,this.clear(),this._showPromise.value=(0,k.disposableTimeout)(()=>{const c=S.Range.fromPositions(r);this._currentDecorations.set([{range:c,options:s}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(t,this.id,this._editor,c,d,h))},this._showDelay);try{return yield h}finally{this._currentOperation===o&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};e.InlineProgressManager=i=Te([ge(2,m.IInstantiationService)],i)}),define(J[853],ee([1,0,7,16,14,165,2,103,17,164,328,125,5,19,720,99,245,624,97,13,8,80,71,322]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyPasteController=e.pasteWidgetVisibleCtx=e.changePasteTypeCommandId=void 0,e.changePasteTypeCommandId="editor.changePasteType",e.pasteWidgetVisibleCtx=new c.RawContextKey("pasteWidgetVisible",!1,(0,h.localize)(0,null));const f="application/vnd.code.copyMetadata";let p=e.CopyPasteController=class Xi extends w.Disposable{static get(E){return E.getContribution(Xi.ID)}constructor(E,I,T,O,R,M,N){super(),this._bulkEditService=T,this._clipboardService=O,this._languageFeaturesService=R,this._quickInputService=M,this._progressService=N,this._editor=E;const P=E.getContainerDomNode();this._register((0,_.addDisposableListener)(P,"copy",x=>this.handleCopy(x))),this._register((0,_.addDisposableListener)(P,"cut",x=>this.handleCopy(x))),this._register((0,_.addDisposableListener)(P,"paste",x=>this.handlePaste(x),!0)),this._pasteProgressManager=this._register(new d.InlineProgressManager("pasteIntoEditor",E,I)),this._postPasteWidgetManager=this._register(I.createInstance(v.PostEditWidgetManager,"pasteIntoEditor",E,e.pasteWidgetVisibleCtx,{id:e.changePasteTypeCommandId,label:(0,h.localize)(1,null)}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(E){this._editor.focus();try{this._pasteAsActionContext={preferredId:E},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(82).enabled&&!this._editor.getOption(88)}handleCopy(E){var I,T;if(!E.clipboardData||!this._editor.hasTextFocus()||!this.isPasteAsEnabled())return;const O=this._editor.getModel(),R=this._editor.getSelections();if(!O||!R?.length)return;const M=this._editor.getOption(35);let N=R;const P=R.length===1&&R[0].isEmpty();if(P){if(!M)return;N=[new t.Range(N[0].startLineNumber,1,N[0].startLineNumber,1+O.getLineLength(N[0].startLineNumber))]}const x=(I=this._editor._getViewModel())===null||I===void 0?void 0:I.getPlainTextToCopy(R,M,S.isWindows),B={multicursorText:Array.isArray(x)?x:null,pasteOnNewLine:P,mode:null},V=this._languageFeaturesService.documentPasteEditProvider.ordered(O).filter(le=>!!le.prepareDocumentPaste);if(!V.length){this.setCopyMetadata(E.clipboardData,{defaultPastePayload:B});return}const K=(0,m.toVSDataTransfer)(E.clipboardData),A=V.flatMap(le=>{var ne;return(ne=le.copyMimeTypes)!==null&&ne!==void 0?ne:[]}),Y=(0,g.generateUuid)();this.setCopyMetadata(E.clipboardData,{id:Y,providerCopyMimeTypes:A,defaultPastePayload:B});const ie=(0,L.createCancelablePromise)(le=>we(this,void 0,void 0,function*(){const ne=(0,k.coalesce)(yield Promise.all(V.map(se=>we(this,void 0,void 0,function*(){try{return yield se.prepareDocumentPaste(O,N,K,le)}catch(H){console.error(H);return}}))));ne.reverse();for(const se of ne)for(const[H,W]of se)K.replace(H,W);return K}));(T=this._currentCopyOperation)===null||T===void 0||T.dataTransferPromise.cancel(),this._currentCopyOperation={handle:Y,dataTransferPromise:ie}}handlePaste(E){var I,T;return we(this,void 0,void 0,function*(){if(!E.clipboardData||!this._editor.hasTextFocus())return;(I=this._currentPasteOperation)===null||I===void 0||I.cancel(),this._currentPasteOperation=void 0;const O=this._editor.getModel(),R=this._editor.getSelections();if(!R?.length||!O||!this.isPasteAsEnabled())return;const M=this.fetchCopyMetadata(E.clipboardData),N=(0,m.toExternalVSDataTransfer)(E.clipboardData);N.delete(f);const P=[...E.clipboardData.types,...(T=M?.providerCopyMimeTypes)!==null&&T!==void 0?T:[],b.Mimes.uriList],x=this._languageFeaturesService.documentPasteEditProvider.ordered(O).filter(F=>{var B;return(B=F.pasteMimeTypes)===null||B===void 0?void 0:B.some(V=>(0,D.matchesMimeType)(V,P))});x.length&&(E.preventDefault(),E.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,x,R,N,M):this.doPasteInline(x,R,N,M))})}doPasteInline(E,I,T,O){const R=(0,L.createCancelablePromise)(M=>we(this,void 0,void 0,function*(){const N=this._editor;if(!N.hasModel())return;const P=N.getModel(),x=new r.EditorStateCancellationTokenSource(N,3,void 0,M);try{if(yield this.mergeInDataFromCopy(T,O,x.token),x.token.isCancellationRequested)return;const F=E.filter(V=>C(V,T));if(!F.length||F.length===1&&F[0].id==="text"){yield this.applyDefaultPasteHandler(T,O,x.token);return}const B=yield this.getPasteEdits(F,T,P,I,x.token);if(x.token.isCancellationRequested)return;if(B.length){const V=N.getOption(82).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(I,{activeEditIndex:0,allEdits:B},V,x.token)}yield this.applyDefaultPasteHandler(T,O,x.token)}finally{x.dispose(),this._currentPasteOperation===R&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(I[0].getEndPosition(),(0,h.localize)(2,null),R),this._currentPasteOperation=R}showPasteAsPick(E,I,T,O,R){const M=(0,L.createCancelablePromise)(N=>we(this,void 0,void 0,function*(){const P=this._editor;if(!P.hasModel())return;const x=P.getModel(),F=new r.EditorStateCancellationTokenSource(P,3,void 0,N);try{if(yield this.mergeInDataFromCopy(O,R,F.token),F.token.isCancellationRequested)return;const B=I.filter(Y=>C(Y,O)),V=yield this.getPasteEdits(B,O,x,T,F.token);if(F.token.isCancellationRequested||!V.length)return;let K;if(typeof E=="string")K=V.find(Y=>Y.id===E);else{const Y=yield this._quickInputService.pick(V.map(ie=>({label:ie.label,description:ie.id,detail:ie.detail,edit:ie})),{placeHolder:(0,h.localize)(3,null)});K=Y?.edit}if(!K)return;const A=(0,n.createCombinedWorkspaceEdit)(x.uri,T,K);yield this._bulkEditService.apply(A,{editor:this._editor})}finally{F.dispose(),this._currentPasteOperation===M&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:(0,h.localize)(4,null)},()=>M)}setCopyMetadata(E,I){E.setData(f,JSON.stringify(I))}fetchCopyMetadata(E){const I=E.getData(f);if(I)try{return JSON.parse(I)}catch{return}}mergeInDataFromCopy(E,I,T){var O;return we(this,void 0,void 0,function*(){if(I?.id&&((O=this._currentCopyOperation)===null||O===void 0?void 0:O.handle)===I.id){const R=yield this._currentCopyOperation.dataTransferPromise;if(T.isCancellationRequested)return;for(const[M,N]of R)E.replace(M,N)}if(!E.has(b.Mimes.uriList)){const R=yield this._clipboardService.readResources();if(T.isCancellationRequested)return;R.length&&E.append(b.Mimes.uriList,(0,D.createStringDataTransferItem)(D.UriList.create(R)))}})}getPasteEdits(E,I,T,O,R){return we(this,void 0,void 0,function*(){const M=yield(0,L.raceCancellation)(Promise.all(E.map(N=>{var P;try{return(P=N.provideDocumentPasteEdits)===null||P===void 0?void 0:P.call(N,T,O,I,R)}catch(x){console.error(x);return}})).then(k.coalesce),R);return M?.sort((N,P)=>P.priority-N.priority),M??[]})}applyDefaultPasteHandler(E,I,T){var O,R,M;return we(this,void 0,void 0,function*(){const N=(O=E.get(b.Mimes.text))!==null&&O!==void 0?O:E.get("text");if(!N)return;const P=yield N.asString();if(T.isCancellationRequested)return;const x={text:P,pasteOnNewLine:(R=I?.defaultPastePayload.pasteOnNewLine)!==null&&R!==void 0?R:!1,multicursorText:(M=I?.defaultPastePayload.multicursorText)!==null&&M!==void 0?M:null,mode:null};this._editor.trigger("keyboard","paste",x)})}};p.ID="editor.contrib.copyPasteActionController",e.CopyPasteController=p=Te([ge(1,a.IInstantiationService),ge(2,s.IBulkEditService),ge(3,o.IClipboardService),ge(4,i.ILanguageFeaturesService),ge(5,u.IQuickInputService),ge(6,l.IProgressService)],p);function C(y,E){var I;return!!(!((I=y.pasteMimeTypes)===null||I===void 0)&&I.some(T=>E.matches(T)))}}),define(J[854],ee([1,0,16,14,165,2,328,5,19,272,719,99,245,626,13,327,8,322]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropIntoEditorController=e.dropWidgetVisibleCtx=e.changeDropTypeCommandId=void 0,e.changeDropTypeCommandId="editor.changeDropType",e.dropWidgetVisibleCtx=new n.RawContextKey("dropWidgetVisible",!1,(0,i.localize)(0,null));let o=e.DropIntoEditorController=class Ji extends D.Disposable{static get(a){return a.getContribution(Ji.ID)}constructor(a,l,u,v){super(),this._languageFeaturesService=u,this._treeViewsDragAndDropService=v,this.treeItemsTransfer=r.LocalSelectionTransfer.getInstance(),this._dropProgressManager=this._register(l.createInstance(t.InlineProgressManager,"dropIntoEditor",a)),this._postDropWidgetManager=this._register(l.createInstance(h.PostEditWidgetManager,"dropIntoEditor",a,e.dropWidgetVisibleCtx,{id:e.changeDropTypeCommandId,label:(0,i.localize)(1,null)})),this._register(a.onDropIntoEditor(f=>this.onDropIntoEditor(a,f.position,f.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(a,l,u){var v;return we(this,void 0,void 0,function*(){if(!u.dataTransfer||!a.hasModel())return;(v=this._currentOperation)===null||v===void 0||v.cancel(),a.focus(),a.setPosition(l);const f=(0,k.createCancelablePromise)(p=>we(this,void 0,void 0,function*(){const C=new s.EditorStateCancellationTokenSource(a,1,void 0,p);try{const y=yield this.extractDataTransferData(u);if(y.size===0||C.token.isCancellationRequested)return;const E=a.getModel();if(!E)return;const I=this._languageFeaturesService.documentOnDropEditProvider.ordered(E).filter(O=>O.dropMimeTypes?O.dropMimeTypes.some(R=>y.matches(R)):!0),T=yield this.getDropEdits(I,E,l,y,C);if(C.token.isCancellationRequested)return;if(T.length){const O=a.getOption(34).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([b.Range.fromPositions(l)],{activeEditIndex:0,allEdits:T},O,p)}}finally{C.dispose(),this._currentOperation===f&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(l,(0,i.localize)(2,null),f),this._currentOperation=f})}getDropEdits(a,l,u,v,f){return we(this,void 0,void 0,function*(){const p=yield(0,k.raceCancellation)(Promise.all(a.map(y=>y.provideDocumentOnDropEdits(l,u,v,f.token))),f.token),C=(0,_.coalesce)(p??[]);return C.sort((y,E)=>E.priority-y.priority),C})}extractDataTransferData(a){return we(this,void 0,void 0,function*(){if(!a.dataTransfer)return new L.VSDataTransfer;const l=(0,w.toExternalVSDataTransfer)(a.dataTransfer);if(this.treeItemsTransfer.hasData(g.DraggedTreeItemsIdentifier.prototype)){const u=this.treeItemsTransfer.getData(g.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(u))for(const v of u){const f=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(v.identifier);if(f)for(const[p,C]of f)l.replace(p,C)}}return l})}};o.ID="editor.contrib.dropIntoEditorController",e.DropIntoEditorController=o=Te([ge(1,d.IInstantiationService),ge(2,S.ILanguageFeaturesService),ge(3,m.ITreeViewsDnDService)],o)}),define(J[855],ee([1,0,16,14,20,36,11,6,2,9,21,15,32,12,5,22,38,29,656,13,19,33,70,56,438]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v){"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 c.RawContextKey("LinkedEditingInputVisible",!1);const f="linked-editing-decoration";let p=e.LinkedEditingContribution=class mi extends S.Disposable{static get(T){return T.getContribution(mi.ID)}constructor(T,O,R,M,N){super(),this.languageConfigurationService=M,this._syncRangesToken=0,this._localToDispose=this._register(new S.DisposableStore),this._editor=T,this._providers=R.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(O),this._debounceInformation=N.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new S.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(P=>{(P.hasChanged(67)||P.hasChanged(89))&&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 O=this._editor.getModel(),R=O!==null&&(this._editor.getOption(67)||this._editor.getOption(89))&&this._providers.has(O);if(R===this._enabled&&!T||(this._enabled=R,this.clearRanges(),this._localToDispose.clear(),!R||O===null))return;this._localToDispose.add(b.Event.runAndSubscribe(O.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(O.getLanguageId()).getWordDefinition()}));const M=new k.Delayer(this._debounceInformation.get(O)),N=()=>{var F;this._rangeUpdateTriggerPromise=M.trigger(()=>this.updateRanges(),(F=this._debounceDuration)!==null&&F!==void 0?F:this._debounceInformation.get(O))},P=new k.Delayer(0),x=F=>{this._rangeSyncTriggerPromise=P.trigger(()=>this._syncRanges(F))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{N()})),this._localToDispose.add(this._editor.onDidChangeModelContent(F=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const B=this._currentDecorations.getRange(0);if(B&&F.changes.every(V=>B.intersectRanges(V.range))){x(this._syncRangesToken);return}}N()})),this._localToDispose.add({dispose:()=>{M.dispose(),P.dispose()}}),this.updateRanges()}_syncRanges(T){if(!this._editor.hasModel()||T!==this._syncRangesToken||this._currentDecorations.length===0)return;const O=this._editor.getModel(),R=this._currentDecorations.getRange(0);if(!R||R.startLineNumber!==R.endLineNumber)return this.clearRanges();const M=O.getValueInRange(R);if(this._currentWordPattern){const P=M.match(this._currentWordPattern);if((P?P[0].length:0)!==M.length)return this.clearRanges()}const N=[];for(let P=1,x=this._currentDecorations.length;P<x;P++){const F=this._currentDecorations.getRange(P);if(F)if(F.startLineNumber!==F.endLineNumber)N.push({range:F,text:M});else{let B=O.getValueInRange(F),V=M,K=F.startColumn,A=F.endColumn;const Y=g.commonPrefixLength(B,V);K+=Y,B=B.substr(Y),V=V.substr(Y);const ie=g.commonSuffixLength(B,V);A-=ie,B=B.substr(0,B.length-ie),V=V.substr(0,V.length-ie),(K!==A||V.length!==0)&&N.push({range:new n.Range(F.startLineNumber,K,F.endLineNumber,A),text:V})}}if(N.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const P=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",N),this._editor._getViewModel().setPrevEditOperationType(P)}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 we(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const O=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(O.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const P=this._currentDecorations.getRange(0);if(P&&P.containsPosition(O))return}}this.clearRanges(),this._currentRequestPosition=O,this._currentRequestModelVersion=M;const N=(0,k.createCancelablePromise)(P=>we(this,void 0,void 0,function*(){try{const x=new v.StopWatch(!1),F=yield E(this._providers,R,O,P);if(this._debounceInformation.update(R,x.elapsed()),N!==this._currentRequest||(this._currentRequest=null,M!==R.getVersionId()))return;let B=[];F?.ranges&&(B=F.ranges),this._currentWordPattern=F?.wordPattern||this._languageWordPattern;let V=!1;for(let A=0,Y=B.length;A<Y;A++)if(n.Range.containsPosition(B[A],O)){if(V=!0,A!==0){const ie=B[A];B.splice(A,1),B.unshift(ie)}break}if(!V){this.clearRanges();return}const K=B.map(A=>({range:A,options:mi.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(K),this._syncRangesToken++}catch(x){(0,w.isCancellationError)(x)||(0,w.onUnexpectedError)(x),(this._currentRequest===N||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=N,N})}};p.ID="editor.contrib.linkedEditing",p.DECORATION=d.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:f}),e.LinkedEditingContribution=p=Te([ge(1,c.IContextKeyService),ge(2,a.ILanguageFeaturesService),ge(3,h.ILanguageConfigurationService),ge(4,u.ILanguageFeatureDebounceService)],p);class C extends s.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:o.localize(0,null),alias:"Start Linked Editing",precondition:c.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(T,O){const R=T.get(t.ICodeEditorService),[M,N]=Array.isArray(O)&&O||[void 0,void 0];return m.URI.isUri(M)&&i.Position.isIPosition(N)?R.openCodeEditor({resource:M},R.getActiveCodeEditor()).then(P=>{P&&(P.setPosition(N),P.invokeWithinContext(x=>(this.reportTelemetry(x,P),this.run(x,P))))},w.onUnexpectedError):super.runCommand(T,O)}run(T,O){const R=p.get(O);return R?Promise.resolve(R.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=C;const y=s.EditorCommand.bindToContribution(p.get);(0,s.registerEditorCommand)(new y({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,O,R){const M=I.ordered(T);return(0,k.first)(M.map(N=>()=>we(this,void 0,void 0,function*(){try{return yield N.provideLinkedEditingRanges(T,O,R)}catch(P){(0,w.onUnexpectedExternalError)(P);return}})),N=>!!N&&_.isNonEmptyArray(N?.ranges))}e.editorLinkedEditingBackground=(0,l.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,s.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(I,T,O)=>{const{linkedEditingRangeProvider:R}=I.get(a.ILanguageFeaturesService);return E(R,T,O,L.CancellationToken.None)}),(0,s.registerEditorContribution)(p.ID,p,1),(0,s.registerEditorAction)(C)}),define(J[856],ee([1,0,14,20,11,61,2,51,17,42,56,21,15,38,70,19,179,722,657,43,52,439]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let l=e.LinkDetector=class en extends w.Disposable{static get(y){return y.getContribution(en.ID)}constructor(y,E,I,T,O){super(),this.editor=y,this.openerService=E,this.notificationService=I,this.languageFeaturesService=T,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=O.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new _.RunOnceScheduler(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const R=this._register(new d.ClickLinkGesture(y));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(y.onDidChangeConfiguration(M=>{M.hasChanged(68)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(y.onDidChangeModelContent(M=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(y.onDidChangeModel(M=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(y.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 we(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(68))return;const y=this.editor.getModel();if(this.providers.has(y)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,_.createCancelablePromise)(E=>(0,h.getLinks)(this.providers,y,E));try{const E=new m.StopWatch(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(y,E.elapsed()),y.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(E){(0,L.onUnexpectedError)(E)}finally{this.computePromise=null}}})}updateDecorations(y){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 O=[];if(y)for(const R of y)O.push(v.decoration(R,E));this.editor.changeDecorations(R=>{const M=R.deltaDecorations(I,O);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let N=0,P=M.length;N<P;N++){const x=new v(y[N],M[N]);this.currentOccurrences[x.decorationId]=x}})}_onEditorMouseMove(y,E){const I=this.editor.getOption(75)==="altKey";if(this.isEnabled(y,E)){this.cleanUpActiveLinkDecoration();const T=this.getLinkOccurrence(y.target.position);T&&this.editor.changeDecorations(O=>{T.activate(O,I),this.activeLinkDecorationId=T.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const y=this.editor.getOption(75)==="altKey";if(this.activeLinkDecorationId){const E=this.currentOccurrences[this.activeLinkDecorationId];E&&this.editor.changeDecorations(I=>{E.deactivate(I,y)}),this.activeLinkDecorationId=null}}onEditorMouseUp(y){if(!this.isEnabled(y))return;const E=this.getLinkOccurrence(y.target.position);E&&this.openLinkOccurrence(E,y.hasSideBySideModifier,!0)}openLinkOccurrence(y,E,I=!1){if(!this.openerService)return;const{link:T}=y;T.resolve(k.CancellationToken.None).then(O=>{if(typeof O=="string"&&this.editor.hasModel()){const R=this.editor.getModel().uri;if(R.scheme===b.Schemas.file&&O.startsWith(`${b.Schemas.file}:`)){const M=s.URI.parse(O);if(M.scheme===b.Schemas.file){const N=g.originalFSPath(M);let P=null;N.startsWith("/./")?P=`.${N.substr(1)}`:N.startsWith("//./")&&(P=`.${N.substr(2)}`),P&&(O=g.joinPath(R,P))}}}return this.openerService.open(O,{openToSide:E,fromUserGesture:I,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},O=>{const R=O instanceof Error?O.message:O;R==="invalid"?this.notificationService.warn(o.localize(0,null,T.url.toString())):R==="missing"?this.notificationService.warn(o.localize(1,null)):(0,L.onUnexpectedError)(O)})}getLinkOccurrence(y){if(!this.editor.hasModel()||!y)return null;const E=this.editor.getModel().getDecorationsInRange({startLineNumber:y.lineNumber,startColumn:y.column,endLineNumber:y.lineNumber,endColumn:y.column},0,!0);for(const I of E){const T=this.currentOccurrences[I.id];if(T)return T}return null}isEnabled(y,E){return!!(y.target.type===6&&(y.hasTriggerModifier||E&&E.keyCodeIsTriggerKey))}stop(){var y;this.computeLinks.cancel(),this.activeLinksList&&((y=this.activeLinksList)===null||y===void 0||y.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};l.ID="editor.linkDetector",e.LinkDetector=l=Te([ge(1,a.IOpenerService),ge(2,c.INotificationService),ge(3,r.ILanguageFeaturesService),ge(4,n.ILanguageFeatureDebounceService)],l);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 v{static decoration(y,E){return{range:y.range,options:v._getOptions(y,E,!1)}}static _getOptions(y,E,I){const T=Object.assign({},I?u.active:u.general);return T.hoverMessage=f(y,E),T}constructor(y,E){this.link=y,this.decorationId=E}activate(y,E){y.changeDecorationOptions(this.decorationId,v._getOptions(this.link,E,!0))}deactivate(y,E){y.changeDecorationOptions(this.decorationId,v._getOptions(this.link,E,!1))}}function f(C,y){const E=C.url&&/^command:/i.test(C.url.toString()),I=C.tooltip?C.tooltip:E?o.localize(2,null):o.localize(3,null),T=y?S.isMacintosh?o.localize(4,null):o.localize(5,null):S.isMacintosh?o.localize(6,null):o.localize(7,null);if(C.url){let O="";if(/^command:/i.test(C.url.toString())){const M=C.url.toString().match(/^command:([^?#]+)/);if(M){const N=M[1];O=o.localize(8,null,N)}}return new D.MarkdownString("",!0).appendLink(C.url.toString(!0).replace(/ /g,"%20"),I,O).appendMarkdown(` (${T})`)}else return new D.MarkdownString().appendText(`${I} (${T})`)}class p extends t.EditorAction{constructor(){super({id:"editor.action.openLink",label:o.localize(9,null),alias:"Open Link",precondition:void 0})}run(y,E){const I=l.get(E);if(!I||!E.hasModel())return;const T=E.getSelections();for(const O of T){const R=I.getLinkOccurrence(O.getEndPosition());R&&I.openLinkOccurrence(R,!1)}}}(0,t.registerEditorContribution)(l.ID,l,1),(0,t.registerEditorAction)(p)}),define(J[857],ee([1,0,2,19,183,14,352,280,279,29,11,207,53]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModelProvider=void 0;var i;(function(l){l.OUTLINE_MODEL="outlineModel",l.FOLDING_PROVIDER_MODEL="foldingProviderModel",l.INDENTATION_MODEL="indentationModel"})(i||(i={}));var n;(function(l){l[l.VALID=0]="VALID",l[l.INVALID=1]="INVALID",l[l.CANCELED=2]="CANCELED"})(n||(n={}));let r=e.StickyModelProvider=class{constructor(u,v,f,p){this._editor=u,this._languageConfigurationService=v,this._languageFeaturesService=f,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=new D.Delayer(300);const C=new h(f),y=new a(this._editor,f),E=new c(this._editor,v);switch(p){case i.OUTLINE_MODEL:this._modelProviders.push(C),this._modelProviders.push(y),this._modelProviders.push(E);break;case i.FOLDING_PROVIDER_MODEL:this._modelProviders.push(y),this._modelProviders.push(E);break;case i.INDENTATION_MODEL:this._modelProviders.push(E);break}this._store=new _.DisposableStore}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(u,v,f){return we(this,void 0,void 0,function*(){return this._store.clear(),this._store.add({dispose:()=>{var p;this._cancelModelPromise(),(p=this._updateScheduler)===null||p===void 0||p.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>we(this,void 0,void 0,function*(){for(const p of this._modelProviders){const{statusPromise:C,modelPromise:y}=p.computeStickyModel(u,v,f);this._modelPromise=y;const E=yield C;if(this._modelPromise!==y)return null;switch(E){case n.CANCELED:return this._store.clear(),null;case n.VALID:return p.stickyModel}}return null}))})}};e.StickyModelProvider=r=Te([ge(1,g.ILanguageConfigurationService),ge(2,k.ILanguageFeaturesService)],r);class d{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,n.INVALID}computeStickyModel(u,v,f){if(f.isCancellationRequested||!this.isProviderValid(u))return{statusPromise:this._invalid(),modelPromise:null};const p=(0,D.createCancelablePromise)(C=>this.createModelFromProvider(u,v,C));return{statusPromise:p.then(C=>this.isModelValid(C)?f.isCancellationRequested?n.CANCELED:(this._stickyModel=this.createStickyModel(u,v,f,C),n.VALID):this._invalid()).then(void 0,C=>((0,m.onUnexpectedError)(C),n.CANCELED)),modelPromise:p}}isModelValid(u){return!0}isProviderValid(u){return!0}}let h=class extends d{constructor(u){super(),this._languageFeaturesService=u}createModelFromProvider(u,v,f){return L.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,u,f)}createStickyModel(u,v,f,p){var C;const{stickyOutlineElement:y,providerID:E}=this._stickyModelFromOutlineModel(p,(C=this._stickyModel)===null||C===void 0?void 0:C.outlineProviderId);return new s.StickyModel(u.uri,v,y,E)}isModelValid(u){return u&&u.children.size>0}_stickyModelFromOutlineModel(u,v){let f;if(t.Iterable.first(u.children.values())instanceof L.OutlineGroup){const E=t.Iterable.find(u.children.values(),I=>I.id===v);if(E)f=E.children;else{let I="",T=-1,O;for(const[R,M]of u.children.entries()){const N=this._findSumOfRangesOfGroup(M);N>T&&(O=M,T=N,I=M.id)}v=I,f=O.children}}else f=u.children;const p=[],C=Array.from(f.values()).sort((E,I)=>{const T=new s.StickyRange(E.symbol.range.startLineNumber,E.symbol.range.endLineNumber),O=new s.StickyRange(I.symbol.range.startLineNumber,I.symbol.range.endLineNumber);return this._comparator(T,O)});for(const E of C)p.push(this._stickyModelFromOutlineElement(E,E.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new s.StickyElement(void 0,p,void 0),providerID:v}}_stickyModelFromOutlineElement(u,v){const f=[];for(const C of u.children.values())if(C.symbol.selectionRange.startLineNumber!==C.symbol.range.endLineNumber)if(C.symbol.selectionRange.startLineNumber!==v)f.push(this._stickyModelFromOutlineElement(C,C.symbol.selectionRange.startLineNumber));else for(const y of C.children.values())f.push(this._stickyModelFromOutlineElement(y,C.symbol.selectionRange.startLineNumber));f.sort((C,y)=>this._comparator(C.range,y.range));const p=new s.StickyRange(u.symbol.selectionRange.startLineNumber,u.symbol.range.endLineNumber);return new s.StickyElement(p,f,void 0)}_comparator(u,v){return u.startLineNumber!==v.startLineNumber?u.startLineNumber-v.startLineNumber:v.endLineNumber-u.endLineNumber}_findSumOfRangesOfGroup(u){let v=0;for(const f of u.children.values())v+=this._findSumOfRangesOfGroup(f);return u instanceof L.OutlineElement?v+u.symbol.range.endLineNumber-u.symbol.selectionRange.startLineNumber:v}};h=Te([ge(0,k.ILanguageFeaturesService)],h);class o extends d{constructor(u){super(),this._foldingLimitReporter=new w.RangesLimitReporter(u)}createStickyModel(u,v,f,p){const C=this._fromFoldingRegions(p);return new s.StickyModel(u.uri,v,C,void 0)}isModelValid(u){return u!==null}_fromFoldingRegions(u){const v=u.length,f=[],p=new s.StickyElement(void 0,[],void 0);for(let C=0;C<v;C++){const y=u.getParentIndex(C);let E;y!==-1?E=f[y]:E=p;const I=new s.StickyElement(new s.StickyRange(u.getStartLineNumber(C),u.getEndLineNumber(C)+1),[],E);E.children.push(I),f.push(I)}return p}}let c=class extends o{constructor(u,v){super(u),this._languageConfigurationService=v}createModelFromProvider(u,v,f){return new S.IndentRangeProvider(u,this._languageConfigurationService,this._foldingLimitReporter).compute(f)}};c=Te([ge(1,g.ILanguageConfigurationService)],c);let a=class extends o{constructor(u,v){super(u),this._languageFeaturesService=v}isProviderValid(u){return w.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,u).length>0}createModelFromProvider(u,v,f){const p=w.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,u);return new b.SyntaxRangeProvider(u,p,()=>this.createModelFromProvider(u,v,f),this._foldingLimitReporter,void 0).compute(f)}};a=Te([ge(1,k.ILanguageFeaturesService)],a)}),define(J[858],ee([1,0,2,19,20,14,16,42,6,29,857,207]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyLineCandidateProvider=e.StickyLineCandidate=void 0;class t{constructor(r,d,h){this.startLineNumber=r,this.endLineNumber=d,this.nestingDepth=h}}e.StickyLineCandidate=t;let i=e.StickyLineCandidateProvider=class extends _.Disposable{constructor(r,d,h){super(),this._languageFeaturesService=d,this._languageConfigurationService=h,this._onDidChangeStickyScroll=this._store.add(new S.Emitter),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=r,this._sessionStore=new _.DisposableStore,this._updateSoon=this._register(new D.RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(111)&&this.readConfiguration()})),this.readConfiguration()}dispose(){super.dispose(),this._sessionStore.dispose()}readConfiguration(){if(this._options=this._editor.getOption(111),!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 we(this,void 0,void 0,function*(){(r=this._cts)===null||r===void 0||r.dispose(!0),this._cts=new L.CancellationTokenSource,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(r){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider)return;const d=this._editor.getModel(),h=d.getVersionId(),c=(this._model?!(0,b.isEqual)(this._model.uri,d.uri):!1)?setTimeout(()=>{r.isCancellationRequested||(this._model=new s.StickyModel(d.uri,d.getVersionId(),void 0,void 0),this._onDidChangeStickyScroll.fire())},75):void 0;this._model=yield this._stickyModelProvider.update(d,h,r),clearTimeout(c)})}updateIndex(r){return r===-1?r=0:r<0&&(r=-r-2),r}getCandidateStickyLinesIntersectingFromStickyModel(r,d,h,o,c){if(d.children.length===0)return;let a=c;const l=[];for(let f=0;f<d.children.length;f++){const p=d.children[f];p.range&&l.push(p.range.startLineNumber)}const u=this.updateIndex((0,w.binarySearch)(l,r.startLineNumber,(f,p)=>f-p)),v=this.updateIndex((0,w.binarySearch)(l,r.startLineNumber+o,(f,p)=>f-p));for(let f=u;f<=v;f++){const p=d.children[f];if(!p)return;if(p.range){const C=p.range.startLineNumber,y=p.range.endLineNumber;r.startLineNumber<=y+1&&C-1<=r.endLineNumber&&C!==a&&(a=C,h.push(new t(C,y-1,o+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(r,p,h,o+1,C))}else this.getCandidateStickyLinesIntersectingFromStickyModel(r,p,h,o,c)}}getCandidateStickyLinesIntersecting(r){var d,h;if(!(!((d=this._model)===null||d===void 0)&&d.element))return[];let o=[];this.getCandidateStickyLinesIntersectingFromStickyModel(r,this._model.element,o,0,-1);const c=(h=this._editor._getViewModel())===null||h===void 0?void 0:h.getHiddenAreas();if(c)for(const a of c)o=o.filter(l=>!(l.startLineNumber>=a.startLineNumber&&l.endLineNumber<=a.endLineNumber+1));return o}};e.StickyLineCandidateProvider=i=Te([ge(1,k.ILanguageFeaturesService),ge(2,g.ILanguageConfigurationService)],i)}),define(J[859],ee([1,0,7,67,86,2,158,12,96,144,110,446]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollWidget=e.StickyScrollWidgetState=void 0;class s{constructor(r,d){this.lineNumbers=r,this.lastLineRelativePosition=d}}e.StickyScrollWidgetState=s;const t=(0,L.createTrustedTypesPolicy)("stickyScrollViewLayer",{createHTML:n=>n});class i extends D.Disposable{constructor(r){super(),this._editor=r,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new D.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 w.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){_.clearNode(this._rootDomNode),this._disposableStore.clear(),this._lineNumbers.length=0;const d=this._editor.getOption(64);r.lineNumbers.length*d+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,c]of this._lineNumbers.entries()){const a=this._renderChildNode(o,c);this._rootDomNode.appendChild(a)}const r=this._editor.getOption(64),d=this._lineNumbers.length*r+this._lastLineRelativePosition;this._rootDomNode.style.display=d>0?"block":"none",this._rootDomNode.style.height=d.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,d){const h=document.createElement("div"),o=this._editor._getViewModel(),c=o.coordinatesConverter.convertModelPositionToViewPosition(new b.Position(d,1)).lineNumber,a=o.getViewLineRenderingData(c),l=this._editor.getLayoutInfo(),u=l.width-l.minimap.minimapCanvasOuterWidth-l.verticalScrollbarWidth,v=this._editor.getOption(70).side,f=this._editor.getOption(64),p=this._editor.getOption(65);let C;try{C=g.LineDecoration.filter(a.inlineDecorations,c,a.minColumn,a.maxColumn)}catch{C=[]}const y=new m.RenderLineInput(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,C,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),E=new S.StringBuilder(2e3);(0,m.renderViewLine)(y,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${d}`),T.style.lineHeight=`${f}px`,T.innerHTML=I;const O=document.createElement("span");O.className="sticky-line",O.style.lineHeight=`${f}px`,v==="left"?O.style.width=`${l.contentLeft-l.minimap.minimapCanvasOuterWidth}px`:v==="right"&&(O.style.width=`${l.contentLeft}px`);const R=document.createElement("span");return p.renderType===1||p.renderType===3&&d%10===0?R.innerText=d.toString():p.renderType===2&&(R.innerText=Math.abs(d-this._editor.getPosition().lineNumber).toString()),R.className="sticky-line-number",R.style.lineHeight=`${f}px`,R.style.width=`${l.lineNumbersWidth}px`,v==="left"?R.style.paddingLeft=`${l.lineNumbersLeft-l.minimap.minimapCanvasOuterWidth}px`:v==="right"&&(R.style.paddingLeft=`${l.lineNumbersLeft}px`),O.appendChild(R),this._editor.applyFontInfo(T),this._editor.applyFontInfo(R),h.appendChild(O),h.appendChild(T),h.className="sticky-line-root",h.setAttribute("role","listitem"),h.tabIndex=0,h.style.lineHeight=`${f}px`,h.style.width=`${u}px`,h.style.height=`${f}px`,h.style.zIndex="0",r===this._lineNumbers.length-1&&(h.style.position="relative",h.style.zIndex="-1",h.style.top=this._lastLineRelativePosition+"px"),this._disposableStore.add(_.addDisposableListener(h,"mouseover",M=>{if(this._editor.hasModel()){const P=new k.StandardMouseEvent(M).target.innerText;this._hoverOnLine=d,this._hoverOnColumn=this._editor.getModel().getLineContent(d).indexOf(P)+1||-1}})),h}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}}e.StickyScrollWidget=i}),define(J[860],ee([1,0,7,109,14,11,6,2,135,9,158,834,674,13,8,85,33,93,23,296,129,332,829,100,166,447,241]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetSelectedBackground=void 0,(0,d.registerColor)("editorSuggestWidget.background",{dark:d.editorWidgetBackground,light:d.editorWidgetBackground,hcDark:d.editorWidgetBackground,hcLight:d.editorWidgetBackground},t.localize(0,null)),(0,d.registerColor)("editorSuggestWidget.border",{dark:d.editorWidgetBorder,light:d.editorWidgetBorder,hcDark:d.editorWidgetBorder,hcLight:d.editorWidgetBorder},t.localize(1,null));const f=(0,d.registerColor)("editorSuggestWidget.foreground",{dark:d.editorForeground,light:d.editorForeground,hcDark:d.editorForeground,hcLight:d.editorForeground},t.localize(2,null));(0,d.registerColor)("editorSuggestWidget.selectedForeground",{dark:d.quickInputListFocusForeground,light:d.quickInputListFocusForeground,hcDark:d.quickInputListFocusForeground,hcLight:d.quickInputListFocusForeground},t.localize(3,null)),(0,d.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:d.quickInputListFocusIconForeground,light:d.quickInputListFocusIconForeground,hcDark:d.quickInputListFocusIconForeground,hcLight:d.quickInputListFocusIconForeground},t.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,d.registerColor)("editorSuggestWidget.selectedBackground",{dark:d.quickInputListFocusBackground,light:d.quickInputListFocusBackground,hcDark:d.quickInputListFocusBackground,hcLight:d.quickInputListFocusBackground},t.localize(5,null)),(0,d.registerColor)("editorSuggestWidget.highlightForeground",{dark:d.listHighlightForeground,light:d.listHighlightForeground,hcDark:d.listHighlightForeground,hcLight:d.listHighlightForeground},t.localize(6,null)),(0,d.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:d.listFocusHighlightForeground,light:d.listFocusHighlightForeground,hcDark:d.listFocusHighlightForeground,hcLight:d.listFocusHighlightForeground},t.localize(7,null)),(0,d.registerColor)("editorSuggestWidgetStatus.foreground",{dark:(0,d.transparent)(f,.5),light:(0,d.transparent)(f,.5),hcDark:(0,d.transparent)(f,.5),hcLight:(0,d.transparent)(f,.5)},t.localize(8,null));class p{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 O=JSON.parse(T);if(_.Dimension.is(O))return _.Dimension.lift(O)}catch{}}store(I){this._service.store(this._key,JSON.stringify(I),0,1)}reset(){this._service.remove(this._key,0)}}let C=e.SuggestWidget=class pi{constructor(I,T,O,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 L.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 c.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new y(this,I),this._persistedSize=new p(T,I);class N{constructor(A,Y,ie=!1,le=!1){this.persistedSize=A,this.currentSize=Y,this.persistHeight=ie,this.persistWidth=le}}let P;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),P=new N(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(K=>{var A,Y,ie,le;if(this._resize(K.dimension.width,K.dimension.height),P&&(P.persistHeight=P.persistHeight||!!K.north||!!K.south,P.persistWidth=P.persistWidth||!!K.east||!!K.west),!!K.done){if(P){const{itemHeight:ne,defaultSize:se}=this.getLayoutInfo(),H=Math.round(ne/2);let{width:W,height:$}=this.element.size;(!P.persistHeight||Math.abs(P.currentSize.height-$)<=H)&&($=(Y=(A=P.persistedSize)===null||A===void 0?void 0:A.height)!==null&&Y!==void 0?Y:se.height),(!P.persistWidth||Math.abs(P.currentSize.width-W)<=H)&&(W=(le=(ie=P.persistedSize)===null||ie===void 0?void 0:ie.width)!==null&&le!==void 0?le:se.width),this._persistedSize.store(new _.Dimension(W,$))}this._contentWidget.unlockPreference(),P=void 0}})),this._messageElement=_.append(this.element.domNode,_.$(".message")),this._listElement=_.append(this.element.domNode,_.$(".tree"));const x=M.createInstance(l.SuggestDetailsWidget,this.editor);x.onDidClose(this.toggleDetails,this,this._disposables),this._details=new l.SuggestDetailsOverlay(x,this.editor);const F=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(114).showIcons);F();const B=M.createInstance(u.ItemRenderer,this.editor);this._disposables.add(B),this._disposables.add(B.onDidToggleDetails(()=>this.toggleDetails())),this._list=new k.List("SuggestWidget",this._listElement,{getHeight:K=>this.getLayoutInfo().itemHeight,getTemplateId:K=>"suggestion"},[B],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>t.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:K=>{let A=K.textLabel;if(typeof K.completion.label!="string"){const{detail:ne,description:se}=K.completion.label;ne&&se?A=t.localize(12,null,A,ne,se):ne?A=t.localize(13,null,A,ne):se&&(A=t.localize(14,null,A,se))}if(!K.isResolved||!this._isDetailsVisible())return A;const{documentation:Y,detail:ie}=K.completion,le=g.format("{0}{1}",ie||"",Y?typeof Y=="string"?Y:Y.value:"");return t.localize(15,null,A,le)}}}),this._list.style((0,v.getListStyles)({listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:d.activeContrastBorder})),this._status=M.createInstance(s.SuggestWidgetStatus,this.element.domNode,a.suggestWidgetStatusbarMenu);const V=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(114).showStatusBar);V(),this._disposables.add(R.onDidColorThemeChange(K=>this._onThemeChange(K))),this._onThemeChange(R.getColorTheme()),this._disposables.add(this._list.onMouseDown(K=>this._onListMouseDownOrTap(K))),this._disposables.add(this._list.onTap(K=>this._onListMouseDownOrTap(K))),this._disposables.add(this._list.onDidChangeSelection(K=>this._onListSelection(K))),this._disposables.add(this._list.onDidChangeFocus(K=>this._onListFocus(K))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(K=>{K.hasChanged(114)&&(V(),F())})),this._ctxSuggestWidgetVisible=a.Context.Visible.bindTo(O),this._ctxSuggestWidgetDetailsVisible=a.Context.DetailsVisible.bindTo(O),this._ctxSuggestWidgetMultipleSuggestions=a.Context.MultipleSuggestions.bindTo(O),this._ctxSuggestWidgetHasFocusedSuggestion=a.Context.HasFocusedSuggestion.bindTo(O),this._disposables.add(_.addStandardDisposableListener(this._details.widget.domNode,"keydown",K=>{this._onDetailsKeydown.fire(K)})),this._disposables.add(this.editor.onMouseDown(K=>this._onEditorMouseDown(K)))}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 O=this._completionModel;O&&(this._onDidSelect.fire({item:I,index:T,model:O}),this.editor.focus())}_onThemeChange(I){this._details.widget.borderWidth=(0,h.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 O=I.elements[0],R=I.indexes[0];O!==this._focusedItem&&((T=this._currentSuggestionDetails)===null||T===void 0||T.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=O,this._list.reveal(R),this._currentSuggestionDetails=(0,L.createCancelablePromise)(M=>we(this,void 0,void 0,function*(){const N=(0,L.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),P=M.onCancellationRequested(()=>N.dispose()),x=yield O.resolve(M);return N.dispose(),P.dispose(),x})),this._currentSuggestionDetails.then(()=>{R>=this._list.length||O!==this._list.element(R)||(this._ignoreFocusEvents=!0,this._list.splice(R,1,[O]),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:O,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:_.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=pi.LOADING_MESSAGE,_.hide(this._listElement,this._status.element),_.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=pi.NO_SUGGESTIONS_MESSAGE,_.hide(this._listElement,this._status.element),_.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:_.hide(this._messageElement),_.show(this._listElement,this._status.element),this._show();break;case 4:_.hide(this._messageElement),_.show(this._listElement,this._status.element),this._show();break;case 5:_.hide(this._messageElement),_.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,L.disposableTimeout)(()=>this._setState(1),T)))}showSuggestions(I,T,O,R,M){var N,P;if(this._contentWidget.setPosition(this.editor.getPosition()),(N=this._loadingTimeout)===null||N===void 0||N.dispose(),(P=this._currentSuggestionDetails)===null||P===void 0||P.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==I&&(this._completionModel=I),O&&this._state!==2&&this._state!==0){this._setState(4);return}const x=this._completionModel.items.length,F=x===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(x>1),F){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(O?4:3),this._list.reveal(T,0),this._list.setFocus(M?[]:[T])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=_.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,l.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=_.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(),O=Math.ceil(this.getLayoutInfo().itemHeight*4.3);T&&T.height<O&&this._persistedSize.store(T.with(void 0,O))}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,O,R;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const M=_.getClientArea(document.body),N=this.getLayoutInfo();I||(I=N.defaultSize);let P=I.height,x=I.width;if(this._status.element.style.height=`${N.itemHeight}px`,this._state===2||this._state===1)P=N.itemHeight+N.borderHeight,x=N.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new _.Dimension(x,P),this._contentWidget.setPreference(2);else{const F=M.width-N.borderHeight-2*N.horizontalPadding;x>F&&(x=F);const B=this._completionModel?this._completionModel.stats.pLabelLen*N.typicalHalfwidthCharacterWidth:x,V=N.statusBarHeight+this._list.contentHeight+N.borderHeight,K=N.itemHeight+N.statusBarHeight,A=_.getDomNodePagePosition(this.editor.getDomNode()),Y=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),ie=A.top+Y.top+Y.height,le=Math.min(M.height-ie-N.verticalPadding,V),ne=A.top+Y.top-N.verticalPadding,se=Math.min(ne,V);let H=Math.min(Math.max(se,le)+N.borderHeight,V);P===((T=this._cappedHeight)===null||T===void 0?void 0:T.capped)&&(P=this._cappedHeight.wanted),P<K&&(P=K),P>H&&(P=H);const W=150;P>le||this._forceRenderingAbove&&ne>W?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),H=se):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),H=le),this.element.preferredSize=new _.Dimension(B,N.defaultSize.height),this.element.maxSize=new _.Dimension(F,H),this.element.minSize=new _.Dimension(220,K),this._cappedHeight=P===V?{wanted:(R=(O=this._cappedHeight)===null||O===void 0?void 0:O.wanted)!==null&&R!==void 0?R:I.height,capped:P}:void 0}this._resize(x,P)}_resize(I,T){const{width:O,height:R}=this.element.maxSize;I=Math.min(O,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,S.clamp)(this.editor.getOption(116)||I.lineHeight,8,1e3),O=!this.editor.getOption(114).showStatusBar||this._state===2||this._state===1?0:T,R=this._details.widget.borderWidth,M=2*R;return{itemHeight:T,statusBarHeight:O,borderWidth:R,borderHeight:M,typicalHalfwidthCharacterWidth:I.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new _.Dimension(430,O+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}};C.LOADING_MESSAGE=t.localize(9,null),C.NO_SUGGESTIONS_MESSAGE=t.localize(10,null),e.SuggestWidget=C=Te([ge(1,r.IStorageService),ge(2,i.IContextKeyService),ge(3,o.IThemeService),ge(4,n.IInstantiationService)],C);class y{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:O,horizontalPadding:R}=this._widget.getLayoutInfo();return new _.Dimension(T+2*O+R,I+2*O)}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=y}),define(J[354],ee([1,0,46,38,27,683,33,23,451]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSelectionHighlightDecorationOptions=e.getHighlightDecorationOptions=void 0;const S=(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:S,dark:S,hcDark:S,hcLight:S},D.localize(2,null),!0);const g=(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:g,dark:g,hcDark:g,hcLight:g},D.localize(5,null));const m=(0,w.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},D.localize(6,null),!0),s=(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)(s),position:_.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:_.MinimapPosition.Inline}}),n=k.ModelDecorationOptions.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,b.themeColorFromId)(t),position:_.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:_.MinimapPosition.Inline}}),r=k.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,b.themeColorFromId)(w.overviewRulerSelectionHighlightForeground),position:_.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:_.MinimapPosition.Inline}}),d=k.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),h=k.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,b.themeColorFromId)(m),position:_.OverviewRulerLane.Center},minimap:{color:(0,b.themeColorFromId)(w.minimapSelectionOccurrenceHighlight),position:_.MinimapPosition.Inline}});function o(a){return a===L.DocumentHighlightKind.Write?i:a===L.DocumentHighlightKind.Text?n:h}e.getHighlightDecorationOptions=o;function c(a){return a?d:r}e.getSelectionHighlightDecorationOptions=c,(0,b.registerThemingParticipant)((a,l)=>{const u=a.getColor(w.editorSelectionHighlight);u&&l.addRule(`.monaco-editor .selectionHighlight { background-color: ${u.transparent(.5)}; }`)})}),define(J[861],ee([1,0,48,14,58,2,15,197,5,24,22,351,659,30,13,19,354,8]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h){"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(K,A){const Y=A.filter(ie=>!K.find(le=>le.equals(ie)));if(Y.length>=1){const ie=Y.map(ne=>`line ${ne.viewState.position.lineNumber} column ${ne.viewState.position.column}`).join(", "),le=Y.length===1?t.localize(0,null,ie):t.localize(1,null,ie);(0,_.status)(le)}}class c 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(A,Y,ie){if(!Y.hasModel())return;let le=!0;ie&&ie.logicalLine===!1&&(le=!1);const ne=Y._getViewModel();if(ne.cursorConfig.readOnly)return;ne.model.pushStackElement();const se=ne.getCursorStates();ne.setCursorStates(ie.source,3,b.CursorMoveCommands.addCursorUp(ne,se,le)),ne.revealTopMostCursor(ie.source),o(se,ne.getCursorStates())}}e.InsertCursorAbove=c;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(A,Y,ie){if(!Y.hasModel())return;let le=!0;ie&&ie.logicalLine===!1&&(le=!1);const ne=Y._getViewModel();if(ne.cursorConfig.readOnly)return;ne.model.pushStackElement();const se=ne.getCursorStates();ne.setCursorStates(ie.source,3,b.CursorMoveCommands.addCursorDown(ne,se,le)),ne.revealBottomMostCursor(ie.source),o(se,ne.getCursorStates())}}e.InsertCursorBelow=a;class l 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(A,Y,ie){if(!A.isEmpty()){for(let le=A.startLineNumber;le<A.endLineNumber;le++){const ne=Y.getLineMaxColumn(le);ie.push(new g.Selection(le,ne,le,ne))}A.endColumn>1&&ie.push(new g.Selection(A.endLineNumber,A.endColumn,A.endLineNumber,A.endColumn))}}run(A,Y){if(!Y.hasModel())return;const ie=Y.getModel(),le=Y.getSelections(),ne=Y._getViewModel(),se=ne.getCursorStates(),H=[];le.forEach(W=>this.getCursorsForSelection(W,ie,H)),H.length>0&&Y.setSelections(H),o(se,ne.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(A,Y){if(!Y.hasModel())return;const ie=Y.getSelections(),le=Y.getModel().getLineCount(),ne=[];for(let W=ie[0].startLineNumber;W<=le;W++)ne.push(new g.Selection(W,ie[0].startColumn,W,ie[0].endColumn));const se=Y._getViewModel(),H=se.getCursorStates();ne.length>0&&Y.setSelections(ne),o(H,se.getCursorStates())}}class v extends w.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:t.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(A,Y){if(!Y.hasModel())return;const ie=Y.getSelections(),le=[];for(let H=ie[0].startLineNumber;H>=1;H--)le.push(new g.Selection(H,ie[0].startColumn,H,ie[0].endColumn));const ne=Y._getViewModel(),se=ne.getCursorStates();le.length>0&&Y.setSelections(le),o(se,ne.getCursorStates())}}class f{constructor(A,Y,ie){this.selections=A,this.revealRange=Y,this.revealScrollType=ie}}e.MultiCursorSessionResult=f;class p{static create(A,Y){if(!A.hasModel())return null;const ie=Y.getState();if(!A.hasTextFocus()&&ie.isRevealed&&ie.searchString.length>0)return new p(A,Y,!1,ie.searchString,ie.wholeWord,ie.matchCase,null);let le=!1,ne,se;const H=A.getSelections();H.length===1&&H[0].isEmpty()?(le=!0,ne=!0,se=!0):(ne=ie.wholeWord,se=ie.matchCase);const W=A.getSelection();let $,Z=null;if(W.isEmpty()){const Q=A.getConfiguredWordAtPosition(W.getStartPosition());if(!Q)return null;$=Q.word,Z=new g.Selection(W.startLineNumber,Q.startColumn,W.startLineNumber,Q.endColumn)}else $=A.getModel().getValueInRange(W).replace(/\\r\\n/g,`\n`);return new p(A,Y,le,$,ne,se,Z)}constructor(A,Y,ie,le,ne,se,H){this._editor=A,this.findController=Y,this.isDisconnectedFromFindController=ie,this.searchText=le,this.wholeWord=ne,this.matchCase=se,this.currentMatch=H}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const A=this._getNextMatch();if(!A)return null;const Y=this._editor.getSelections();return new f(Y.concat(A),A,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const A=this._getNextMatch();if(!A)return null;const Y=this._editor.getSelections();return new f(Y.slice(0,Y.length-1).concat(A),A,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const le=this.currentMatch;return this.currentMatch=null,le}this.findController.highlightFindOptions();const A=this._editor.getSelections(),Y=A[A.length-1],ie=this._editor.getModel().findNextMatch(this.searchText,Y.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1);return ie?new g.Selection(ie.range.startLineNumber,ie.range.startColumn,ie.range.endLineNumber,ie.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const A=this._getPreviousMatch();if(!A)return null;const Y=this._editor.getSelections();return new f(Y.concat(A),A,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const A=this._getPreviousMatch();if(!A)return null;const Y=this._editor.getSelections();return new f(Y.slice(0,Y.length-1).concat(A),A,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const le=this.currentMatch;return this.currentMatch=null,le}this.findController.highlightFindOptions();const A=this._editor.getSelections(),Y=A[A.length-1],ie=this._editor.getModel().findPreviousMatch(this.searchText,Y.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1);return ie?new g.Selection(ie.range.startLineNumber,ie.range.startColumn,ie.range.endLineNumber,ie.range.endColumn):null}selectAll(A){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const Y=this._editor.getModel();return A?Y.findMatches(this.searchText,A,!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1,1073741824):Y.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1,1073741824)}}e.MultiCursorSession=p;class C extends D.Disposable{static get(A){return A.getContribution(C.ID)}constructor(A){super(),this._sessionDispose=this._register(new D.DisposableStore),this._editor=A,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(A){if(!this._session){const Y=p.create(this._editor,A);if(!Y)return;this._session=Y;const ie={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(ie.wholeWordOverride=1,ie.matchCaseOverride=1,ie.isRegexOverride=2),A.getState().change(ie,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(le=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(A.getState().onFindReplaceStateChange(le=>{(le.matchCase||le.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const A={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(A,!1)}this._session=null}_setSelections(A){this._ignoreSelectionChange=!0,this._editor.setSelections(A),this._ignoreSelectionChange=!1}_expandEmptyToWord(A,Y){if(!Y.isEmpty())return Y;const ie=this._editor.getConfiguredWordAtPosition(Y.getStartPosition());return ie?new g.Selection(Y.startLineNumber,ie.startColumn,Y.startLineNumber,ie.endColumn):Y}_applySessionResult(A){A&&(this._setSelections(A.selections),A.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(A.revealRange,A.revealScrollType))}getSession(A){return this._session}addSelectionToNextFindMatch(A){if(this._editor.hasModel()){if(!this._session){const Y=this._editor.getSelections();if(Y.length>1){const le=A.getState().matchCase;if(!x(this._editor.getModel(),Y,le)){const se=this._editor.getModel(),H=[];for(let W=0,$=Y.length;W<$;W++)H[W]=this._expandEmptyToWord(se,Y[W]);this._editor.setSelections(H);return}}}this._beginSessionIfNeeded(A),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(A){this._beginSessionIfNeeded(A),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(A){this._beginSessionIfNeeded(A),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(A){this._beginSessionIfNeeded(A),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(A){if(!this._editor.hasModel())return;let Y=null;const ie=A.getState();if(ie.isRevealed&&ie.searchString.length>0&&ie.isRegex){const le=this._editor.getModel();ie.searchScope?Y=le.findMatches(ie.searchString,ie.searchScope,ie.isRegex,ie.matchCase,ie.wholeWord?this._editor.getOption(126):null,!1,1073741824):Y=le.findMatches(ie.searchString,!0,ie.isRegex,ie.matchCase,ie.wholeWord?this._editor.getOption(126):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(A),!this._session)return;Y=this._session.selectAll(ie.searchScope)}if(Y.length>0){const le=this._editor.getSelection();for(let ne=0,se=Y.length;ne<se;ne++){const H=Y[ne];if(H.range.intersectRanges(le)){Y[ne]=Y[0],Y[0]=H;break}}this._setSelections(Y.map(ne=>new g.Selection(ne.range.startLineNumber,ne.range.startColumn,ne.range.endLineNumber,ne.range.endColumn)))}}}e.MultiCursorSelectionController=C,C.ID="editor.contrib.multiCursorController";class y extends w.EditorAction{run(A,Y){const ie=C.get(Y);if(!ie)return;const le=Y._getViewModel();if(le){const ne=le.getCursorStates(),se=s.CommonFindController.get(Y);if(se)this._run(ie,se);else{const H=A.get(h.IInstantiationService).createInstance(s.CommonFindController,Y);this._run(ie,H),H.dispose()}o(ne,le.getCursorStates())}}}e.MultiCursorSelectionControllerAction=y;class E extends y{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(A,Y){A.addSelectionToNextFindMatch(Y)}}e.AddSelectionToNextFindMatchAction=E;class I extends y{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(A,Y){A.addSelectionToPreviousFindMatch(Y)}}e.AddSelectionToPreviousFindMatchAction=I;class T extends y{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,L.KeyChord)(2089,2082),weight:100}})}_run(A,Y){A.moveSelectionToNextFindMatch(Y)}}e.MoveSelectionToNextFindMatchAction=T;class O extends y{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:t.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(A,Y){A.moveSelectionToPreviousFindMatch(Y)}}e.MoveSelectionToPreviousFindMatchAction=O;class R extends y{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(A,Y){A.selectAll(Y)}}e.SelectHighlightsAction=R;class M extends y{constructor(){super({id:"editor.action.changeAll",label:t.localize(18,null),alias:"Change All Occurrences",precondition:n.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(A,Y){A.selectAll(Y)}}e.CompatChangeAll=M;class N{constructor(A,Y,ie,le,ne){this._model=A,this._searchText=Y,this._matchCase=ie,this._wordSeparators=le,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,ne&&this._model===ne._model&&this._searchText===ne._searchText&&this._matchCase===ne._matchCase&&this._wordSeparators===ne._wordSeparators&&this._modelVersionId===ne._modelVersionId&&(this._cachedFindMatches=ne._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(A=>A.range),this._cachedFindMatches.sort(S.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let P=e.SelectionHighlighter=class tn extends D.Disposable{constructor(A,Y){super(),this._languageFeaturesService=Y,this.editor=A,this._isEnabled=A.getOption(104),this._decorations=A.createDecorationsCollection(),this.updateSoon=this._register(new k.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(A.onDidChangeConfiguration(le=>{this._isEnabled=A.getOption(104)})),this._register(A.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(A.onDidChangeModel(le=>{this._setState(null)})),this._register(A.onDidChangeModelContent(le=>{this._isEnabled&&this.updateSoon.schedule()}));const ie=s.CommonFindController.get(A);ie&&this._register(ie.getState().onFindReplaceStateChange(le=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(tn._createState(this.state,this._isEnabled,this.editor))}static _createState(A,Y,ie){if(!Y||!ie.hasModel())return null;const le=ie.getSelection();if(le.startLineNumber!==le.endLineNumber)return null;const ne=C.get(ie);if(!ne)return null;const se=s.CommonFindController.get(ie);if(!se)return null;let H=ne.getSession(se);if(!H){const Z=ie.getSelections();if(Z.length>1){const re=se.getState().matchCase;if(!x(ie.getModel(),Z,re))return null}H=p.create(ie,se)}if(!H||H.currentMatch||/^[ \\t]+$/.test(H.searchText)||H.searchText.length>200)return null;const W=se.getState(),$=W.matchCase;if(W.isRevealed){let Z=W.searchString;$||(Z=Z.toLowerCase());let Q=H.searchText;if($||(Q=Q.toLowerCase()),Z===Q&&H.matchCase===W.matchCase&&H.wholeWord===W.wholeWord&&!W.isRegex)return null}return new N(ie.getModel(),H.searchText,H.matchCase,H.wholeWord?ie.getOption(126):null,A)}_setState(A){if(this.state=A,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const Y=this.editor.getModel();if(Y.isTooLargeForTokenization())return;const ie=this.state.findMatches(),le=this.editor.getSelections();le.sort(S.Range.compareRangesUsingStarts);const ne=[];for(let W=0,$=0,Z=ie.length,Q=le.length;W<Z;){const re=ie[W];if($>=Q)ne.push(re),W++;else{const ce=S.Range.compareRangesUsingStarts(re,le[$]);ce<0?((le[$].isEmpty()||!S.Range.areIntersecting(re,le[$]))&&ne.push(re),W++):(ce>0||W++,$++)}}const se=this._languageFeaturesService.documentHighlightProvider.has(Y)&&this.editor.getOption(78),H=ne.map(W=>({range:W,options:(0,d.getSelectionHighlightDecorationOptions)(se)}));this._decorations.set(H)}dispose(){this._setState(null),super.dispose()}};P.ID="editor.contrib.selectionHighlighter",e.SelectionHighlighter=P=Te([ge(1,r.ILanguageFeaturesService)],P);function x(K,A,Y){const ie=F(K,A[0],!Y);for(let le=1,ne=A.length;le<ne;le++){const se=A[le];if(se.isEmpty())return!1;const H=F(K,se,!Y);if(ie!==H)return!1}return!0}function F(K,A,Y){const ie=K.getValueInRange(A);return Y?ie.toLowerCase():ie}class B 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(A,Y,ie){if(!Y.hasModel())return;const le=Y._getViewModel();if(le.cursorConfig.readOnly)return;le.model.pushStackElement();const ne=Array.from(le.getCursorStates()),se=ne.shift();se&&(ne.push(se),le.setCursorStates(ie.source,3,ne),le.revealPrimaryCursor(ie.source,!0),o(ne,le.getCursorStates()))}}e.FocusNextCursor=B;class V 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(A,Y,ie){if(!Y.hasModel())return;const le=Y._getViewModel();if(le.cursorConfig.readOnly)return;le.model.pushStackElement();const ne=Array.from(le.getCursorStates()),se=ne.pop();se&&(ne.unshift(se),le.setCursorStates(ie.source,3,ne),le.revealPrimaryCursor(ie.source,!0),o(ne,le.getCursorStates()))}}e.FocusPreviousCursor=V,(0,w.registerEditorContribution)(C.ID,C,4),(0,w.registerEditorContribution)(P.ID,P,1),(0,w.registerEditorAction)(c),(0,w.registerEditorAction)(a),(0,w.registerEditorAction)(l),(0,w.registerEditorAction)(E),(0,w.registerEditorAction)(I),(0,w.registerEditorAction)(T),(0,w.registerEditorAction)(O),(0,w.registerEditorAction)(R),(0,w.registerEditorAction)(M),(0,w.registerEditorAction)(u),(0,w.registerEditorAction)(v),(0,w.registerEditorAction)(B),(0,w.registerEditorAction)(V)}),define(J[862],ee([1,0,48,16,14,20,11,2,15,5,22,27,684,13,19,354]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordHighlighterContribution=e.getOccurrencesAtPosition=void 0;const d=new i.RawContextKey("hasWordHighlights",!1);function h(E,I,T,O){const R=E.ordered(I);return(0,L.first)(R.map(M=>()=>Promise.resolve(M.provideDocumentHighlights(I,T,O)).then(void 0,w.onUnexpectedExternalError)),k.isNonEmptyArray)}e.getOccurrencesAtPosition=h;class o{constructor(I,T,O){this._model=I,this._selection=T,this._wordSeparators=O,this._wordRange=this._getCurrentWordRange(I,T),this._result=null}get result(){return this._result||(this._result=(0,L.createCancelablePromise)(I=>this._compute(this._model,this._selection,this._wordSeparators,I))),this._result}_getCurrentWordRange(I,T){const O=I.getWordAtPosition(T.getPosition());return O?new g.Range(T.startLineNumber,O.startColumn,T.startLineNumber,O.endColumn):null}isValid(I,T,O){const R=T.startLineNumber,M=T.startColumn,N=T.endColumn,P=this._getCurrentWordRange(I,T);let x=!!(this._wordRange&&this._wordRange.equalsRange(P));for(let F=0,B=O.length;!x&&F<B;F++){const V=O.getRange(F);V&&V.startLineNumber===R&&V.startColumn<=M&&V.endColumn>=N&&(x=!0)}return x}cancel(){this.result.cancel()}}class c extends o{constructor(I,T,O,R){super(I,T,O),this._providers=R}_compute(I,T,O,R){return h(this._providers,I,T.getPosition(),R).then(M=>M||[])}}class a extends o{constructor(I,T,O){super(I,T,O),this._selectionIsEmpty=T.isEmpty()}_compute(I,T,O,R){return(0,L.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,O,!1).map(P=>({range:P.range,kind:s.DocumentHighlightKind.Text}))})}isValid(I,T,O){const R=T.isEmpty();return this._selectionIsEmpty!==R?!1:super.isValid(I,T,O)}}function l(E,I,T,O){return E.has(I)?new c(I,T,O,E):new a(I,T,O)}(0,S.registerModelAndPositionCommand)("_executeDocumentHighlights",(E,I,T)=>{const O=E.get(n.ILanguageFeaturesService);return h(O.documentHighlightProvider,I,T,D.CancellationToken.None)});class u{constructor(I,T,O){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=d.bindTo(O),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(g.Range.compareRangesUsingStarts)}moveNext(){const I=this._getSortedHighlights(),O=(I.findIndex(M=>M.containsPosition(this.editor.getPosition()))+1)%I.length,R=I[O];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,_.alert)(`${N}, ${O+1} of ${I.length} for \'${M.word}\'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const I=this._getSortedHighlights(),O=(I.findIndex(M=>M.containsPosition(this.editor.getPosition()))-1+I.length)%I.length,R=I[O];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,_.alert)(`${N}, ${O+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,O=I.startColumn;return this.model.getWordAtPosition({lineNumber:T,column:O})}_run(){const I=this.editor.getSelection();if(I.startLineNumber!==I.endLineNumber){this._stopAll();return}const T=I.startColumn,O=I.endColumn,R=this._getWord();if(!R||R.startColumn>T||R.endColumn<O){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=l(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(126)),this.workerRequest.result.then(P=>{N===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=P||[],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 v=e.WordHighlighterContribution=class nn extends b.Disposable{static get(I){return I.getContribution(nn.ID)}constructor(I,T,O){super(),this.wordHighlighter=null;const R=()=>{I.hasModel()&&(this.wordHighlighter=new u(I,O.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()}};v.ID="editor.contrib.wordHighlighter",e.WordHighlighterContribution=v=Te([ge(1,i.IContextKeyService),ge(2,n.ILanguageFeaturesService)],v);class f extends S.EditorAction{constructor(I,T){super(T),this._isNext=I}run(I,T){const O=v.get(T);O&&(this._isNext?O.moveNext():O.moveBack())}}class p extends f{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:t.localize(0,null),alias:"Go to Next Symbol Highlight",precondition:d,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class C extends f{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:t.localize(1,null),alias:"Go to Previous Symbol Highlight",precondition:d,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class y extends S.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:t.localize(2,null),alias:"Trigger Symbol Highlight",precondition:d.toNegated(),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(I,T,O){const R=v.get(T);R&&R.restoreViewState(!0)}}(0,S.registerEditorContribution)(v.ID,v,0),(0,S.registerEditorAction)(p),(0,S.registerEditorAction)(C),(0,S.registerEditorAction)(y)}),define(J[863],ee([1,0,7,148,36,160,2,45,5,38,452]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=void 0;const m=new L.Color(new L.RGBA(0,122,204)),s={showArrow:!0,showFrame:!0,className:"",frameColor:m,arrowColor:m,keepEditorSelection:!1},t="vs.editor.contrib.zoneWidget";class i{constructor(o,c,a,l,u,v,f,p){this.id="",this.domNode=o,this.afterLineNumber=c,this.afterColumn=a,this.heightInLines=l,this.showInHiddenAreas=f,this.ordinal=p,this._onDomNodeTop=u,this._onComputedHeight=v}onDomNodeTop(o){this._onDomNodeTop(o)}onComputedHeight(o){this._onComputedHeight(o)}}class n{constructor(o,c){this._id=o,this._domNode=c}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=n;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(),_.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(){_.removeCSSRulesContainingSelector(this._ruleName),_.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:S.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 d{constructor(o,c={}){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(c),b.mixin(this.options,s,!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 l=this._getWidth(a);this.domNode.style.width=l+"px",this.domNode.style.left=this._getLeft(a)+"px",this._onWidth(l)}))}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 c;if(this.domNode.style.height=`${o}px`,this.container){const a=o-this._decoratingElementsHeight();this.container.style.height=`${a}px`;const l=this.editor.getLayoutInfo();this._doLayout(a,this._getWidth(l))}(c=this._resizeSash)===null||c===void 0||c.layout()}get position(){const o=this._positionMarkerId.getRange(0);if(o)return o.getStartPosition()}show(o,c){const a=S.Range.isIRange(o)?S.Range.lift(o):S.Range.fromPositions(o);this._isShowing=!0,this._showImpl(a,c),this._isShowing=!1,this._positionMarkerId.set([{range:a,options:g.ModelDecorationOptions.EMPTY}])}hide(){var o;this._viewZone&&(this.editor.changeViewZones(c=>{this._viewZone&&c.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(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const o=this.editor.getOption(64);let c=0;if(this.options.showArrow){const a=Math.round(o/3);c+=2*a}if(this.options.showFrame){const a=Math.round(o/9);c+=2*a}return c}_showImpl(o,c){const a=o.getStartPosition(),l=this.editor.getLayoutInfo(),u=this._getWidth(l);this.domNode.style.width=`${u}px`,this.domNode.style.left=this._getLeft(l)+"px";const v=document.createElement("div");v.style.overflow="hidden";const f=this.editor.getOption(64);if(!this.options.allowUnlimitedHeight){const I=Math.max(12,this.editor.getLayoutInfo().height/f*.8);c=Math.min(c,I)}let p=0,C=0;if(this._arrow&&this.options.showArrow&&(p=Math.round(f/3),this._arrow.height=p,this._arrow.show(a)),this.options.showFrame&&(C=Math.round(f/9)),this.editor.changeViewZones(I=>{this._viewZone&&I.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new i(v,a.lineNumber,a.column,c,T=>this._onViewZoneTop(T),T=>this._onViewZoneHeight(T),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=I.addZone(this._viewZone),this._overlayWidget=new n(t+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const I=this.options.frameWidth?this.options.frameWidth:C;this.container.style.borderTopWidth=I+"px",this.container.style.borderBottomWidth=I+"px"}const y=c*f-this._decoratingElementsHeight();this.container&&(this.container.style.top=p+"px",this.container.style.height=y+"px",this.container.style.overflow="hidden"),this._doLayout(y,u),this.options.keepEditorSelection||this.editor.setSelection(o);const E=this.editor.getModel();if(E){const I=E.validateRange(new S.Range(o.startLineNumber,1,o.endLineNumber+1,1));this.revealRange(I,I.startLineNumber===E.getLineCount())}}revealRange(o,c){c?this.editor.revealLineNearTop(o.endLineNumber,0):this.editor.revealRange(o,0)}setCssClass(o,c){this.container&&(c&&this.container.classList.remove(c),this.container.classList.add(o))}_onWidth(o){}_doLayout(o,c){}_relayout(o){this._viewZone&&this._viewZone.heightInLines!==o&&this.editor.changeViewZones(c=>{this._viewZone&&(this._viewZone.heightInLines=o,c.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(c=>{this._viewZone&&(o={startY:c.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{o=void 0})),this._disposables.add(this._resizeSash.onDidChange(c=>{if(o){const a=(c.currentY-o.startY)/this.editor.getOption(64),l=a<0?Math.ceil(a):Math.floor(a),u=o.heightInLines+l;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=d}),define(J[132],ee([1,0,7,69,40,26,31,36,6,45,15,32,158,863,662,157,13,49,8,33,443]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c){"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,h.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(p,C){const y=this._widgets.get(p);y&&(y.listener.dispose(),y.widget.dispose());const E=()=>{const I=this._widgets.get(p);I&&I.widget===C&&(I.listener.dispose(),this._widgets.delete(p))};this._widgets.set(p,{widget:C,listener:C.onDidClose(E)})}},1);var a;(function(p){p.inPeekEditor=new d.RawContextKey("inReferenceSearchEditor",!0,n.localize(0,null)),p.notInPeekEditor=p.inPeekEditor.toNegated()})(a||(e.PeekContext=a={}));let l=class{constructor(C,y){C instanceof t.EmbeddedCodeEditorWidget&&a.inPeekEditor.bindTo(y)}dispose(){}};l.ID="editor.contrib.referenceController",l=Te([ge(1,d.IContextKeyService)],l),(0,m.registerEditorContribution)(l.ID,l,0);function u(p){const C=p.get(s.ICodeEditorService).getFocusedCodeEditor();return C instanceof t.EmbeddedCodeEditorWidget?C.getParentEditor():C}e.getOuterEditor=u;const v={headerBackgroundColor:b.Color.white,primaryHeadingColor:b.Color.fromHex("#333333"),secondaryHeadingColor:b.Color.fromHex("#6c6c6cb3")};let f=e.PeekViewWidget=class extends i.ZoneWidget{constructor(C,y,E){super(C,y),this.instantiationService=E,this._onDidClose=new S.Emitter,this.onDidClose=this._onDidClose.event,g.mixin(this.options,v,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(C){const y=this.options;C.headerBackgroundColor&&(y.headerBackgroundColor=C.headerBackgroundColor),C.primaryHeadingColor&&(y.primaryHeadingColor=C.primaryHeadingColor),C.secondaryHeadingColor&&(y.secondaryHeadingColor=C.secondaryHeadingColor),super.style(C)}_applyStyles(){super._applyStyles();const C=this.options;this._headElement&&C.headerBackgroundColor&&(this._headElement.style.backgroundColor=C.headerBackgroundColor.toString()),this._primaryHeading&&C.primaryHeadingColor&&(this._primaryHeading.style.color=C.primaryHeadingColor.toString()),this._secondaryHeading&&C.secondaryHeadingColor&&(this._secondaryHeading.style.color=C.secondaryHeadingColor.toString()),this._bodyElement&&C.frameColor&&(this._bodyElement.style.borderColor=C.frameColor.toString())}_fillContainer(C){this.setCssClass("peekview-widget"),this._headElement=_.$(".head"),this._bodyElement=_.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),C.appendChild(this._headElement),C.appendChild(this._bodyElement)}_fillHead(C,y){this._titleElement=_.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),_.addStandardDisposableListener(this._titleElement,"click",T=>this._onTitleClick(T))),_.append(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=_.$("span.filename"),this._secondaryHeading=_.$("span.dirname"),this._metaHeading=_.$("span.meta"),_.append(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const E=_.$(".peekview-actions");_.append(this._headElement,E);const I=this._getActionBarOptions();this._actionbarWidget=new k.ActionBar(E,I),this._disposables.add(this._actionbarWidget),y||this._actionbarWidget.push(new L.Action("peekview.close",n.localize(1,null),w.ThemeIcon.asClassName(D.Codicon.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(C){}_getActionBarOptions(){return{actionViewItemProvider:r.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(C){}setTitle(C,y){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=C,this._primaryHeading.setAttribute("title",C),y?this._secondaryHeading.innerText=y:_.clearNode(this._secondaryHeading))}setMetaTitle(C){this._metaHeading&&(C?(this._metaHeading.innerText=C,_.show(this._metaHeading)):_.hide(this._metaHeading))}_doLayout(C,y){if(!this._isShowing&&C<0){this.dispose();return}const E=Math.ceil(this.editor.getOption(64)*1.2),I=Math.round(C-(E+2));this._doLayoutHead(E,y),this._doLayoutBody(I,y)}_doLayoutHead(C,y){this._headElement&&(this._headElement.style.height=`${C}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(C,y){this._bodyElement&&(this._bodyElement.style.height=`${C}px`)}};e.PeekViewWidget=f=Te([ge(2,o.IInstantiationService)],f),e.peekViewTitleBackground=(0,c.registerColor)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:b.Color.black,hcLight:b.Color.white},n.localize(2,null)),e.peekViewTitleForeground=(0,c.registerColor)("peekViewTitleLabel.foreground",{dark:b.Color.white,light:b.Color.black,hcDark:b.Color.white,hcLight:c.editorForeground},n.localize(3,null)),e.peekViewTitleInfoForeground=(0,c.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},n.localize(4,null)),e.peekViewBorder=(0,c.registerColor)("peekView.border",{dark:c.editorInfoForeground,light:c.editorInfoForeground,hcDark:c.contrastBorder,hcLight:c.contrastBorder},n.localize(5,null)),e.peekViewResultsBackground=(0,c.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:b.Color.black,hcLight:b.Color.white},n.localize(6,null)),e.peekViewResultsMatchForeground=(0,c.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:b.Color.white,hcLight:c.editorForeground},n.localize(7,null)),e.peekViewResultsFileForeground=(0,c.registerColor)("peekViewResult.fileForeground",{dark:b.Color.white,light:"#1E1E1E",hcDark:b.Color.white,hcLight:c.editorForeground},n.localize(8,null)),e.peekViewResultsSelectionBackground=(0,c.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},n.localize(9,null)),e.peekViewResultsSelectionForeground=(0,c.registerColor)("peekViewResult.selectionForeground",{dark:b.Color.white,light:"#6C6C6C",hcDark:b.Color.white,hcLight:c.editorForeground},n.localize(10,null)),e.peekViewEditorBackground=(0,c.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:b.Color.black,hcLight:b.Color.white},n.localize(11,null)),e.peekViewEditorGutterBackground=(0,c.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},n.localize(12,null)),e.peekViewEditorStickyScrollBackground=(0,c.registerColor)("peekViewEditorStickyScroll.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},n.localize(13,null)),e.peekViewResultsMatchHighlight=(0,c.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},n.localize(14,null)),e.peekViewEditorMatchHighlight=(0,c.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},n.localize(15,null)),e.peekViewEditorMatchHighlightBorder=(0,c.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:c.activeContrastBorder,hcLight:c.activeContrastBorder},n.localize(16,null))}),define(J[864],ee([1,0,7,79,16,36,6,2,42,9,5,132,636,157,30,13,8,155,92,52,759,33,23,430]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNavigationWidget=void 0;class v{constructor(x,F,B,V,K){this._openerService=V,this._labelService=K,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new b.DisposableStore,this._editor=F;const A=document.createElement("div");A.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),A.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),A.appendChild(this._relatedBlock),this._disposables.add(_.addStandardDisposableListener(this._relatedBlock,"click",Y=>{Y.preventDefault();const ie=this._relatedDiagnostics.get(Y.target);ie&&B(ie)})),this._scrollable=new k.ScrollableElement(A,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),x.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(Y=>{A.style.left=`-${Y.scrollLeft}px`,A.style.top=`-${Y.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,b.dispose)(this._disposables)}update(x){const{source:F,message:B,relatedInformation:V,code:K}=x;let A=(F?.length||0)+2;K&&(typeof K=="string"?A+=K.length:A+=K.value.length);const Y=(0,g.splitLines)(B);this._lines=Y.length,this._longestLineLength=0;for(const H of Y)this._longestLineLength=Math.max(H.length+A,this._longestLineLength);_.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(x)),this._editor.applyFontInfo(this._messageBlock);let ie=this._messageBlock;for(const H of Y)ie=document.createElement("div"),ie.innerText=H,H===""&&(ie.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(ie);if(F||K){const H=document.createElement("span");if(H.classList.add("details"),ie.appendChild(H),F){const W=document.createElement("span");W.innerText=F,W.classList.add("source"),H.appendChild(W)}if(K)if(typeof K=="string"){const W=document.createElement("span");W.innerText=`(${K})`,W.classList.add("code"),H.appendChild(W)}else{this._codeLink=_.$("a.code-link"),this._codeLink.setAttribute("href",`${K.target.toString()}`),this._codeLink.onclick=$=>{this._openerService.open(K.target,{allowCommands:!0}),$.preventDefault(),$.stopPropagation()};const W=_.append(this._codeLink,_.$("span"));W.innerText=K.value,H.appendChild(this._codeLink)}}if(_.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,L.isNonEmptyArray)(V)){const H=this._relatedBlock.appendChild(document.createElement("div"));H.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(const W of V){const $=document.createElement("div"),Z=document.createElement("a");Z.classList.add("filename"),Z.innerText=`${this._labelService.getUriBasenameLabel(W.resource)}(${W.startLineNumber}, ${W.startColumn}): `,Z.title=this._labelService.getUriLabel(W.resource),this._relatedDiagnostics.set(Z,W);const Q=document.createElement("span");Q.innerText=W.message,$.appendChild(Z),$.appendChild(Q),this._lines+=1,H.appendChild($)}}const le=this._editor.getOption(48),ne=Math.ceil(le.typicalFullwidthCharacterWidth*this._longestLineLength*.75),se=le.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:ne,scrollHeight:se})}layout(x,F){this._scrollable.getDomNode().style.height=`${x}px`,this._scrollable.getDomNode().style.width=`${F}px`,this._scrollable.setScrollDimensions({width:F,height:x})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(x){let F="";switch(x.severity){case o.MarkerSeverity.Error:F=t.localize(0,null);break;case o.MarkerSeverity.Warning:F=t.localize(1,null);break;case o.MarkerSeverity.Info:F=t.localize(2,null);break;case o.MarkerSeverity.Hint:F=t.localize(3,null);break}let B=t.localize(4,null,F,x.startLineNumber+":"+x.startColumn);const V=this._editor.getModel();return V&&x.startLineNumber<=V.getLineCount()&&x.startLineNumber>=1&&(B=`${V.getLineContent(x.startLineNumber)}, ${B}`),B}}let f=e.MarkerNavigationWidget=class sn extends s.PeekViewWidget{constructor(x,F,B,V,K,A,Y){super(x,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},K),this._themeService=F,this._openerService=B,this._menuService=V,this._contextKeyService=A,this._labelService=Y,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(F.getColorTheme()),this._callOnDispose.add(F.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(x){this._backgroundColor=x.getColor(N);let F=E,B=I;this._severity===o.MarkerSeverity.Warning?(F=T,B=O):this._severity===o.MarkerSeverity.Info&&(F=R,B=M);const V=x.getColor(F),K=x.getColor(B);this.style({arrowColor:V,frameColor:V,headerBackgroundColor:K,primaryHeadingColor:x.getColor(s.peekViewTitleForeground),secondaryHeadingColor:x.getColor(s.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(x){super._fillHead(x),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(V=>this.editor.focus()));const F=[],B=this._menuService.createMenu(sn.TitleMenu,this._contextKeyService);(0,i.createAndFillInActionBarActions)(B,void 0,F),this._actionbarWidget.push(F,{label:!1,icon:!0,index:0}),B.dispose()}_fillTitleIcon(x){this._icon=_.append(x,_.$(""))}_fillBody(x){this._parentContainer=x,x.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),x.appendChild(this._container),this._message=new v(this._container,this.editor,F=>this._onDidSelectRelatedInformation.fire(F),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(x,F,B){this._container.classList.remove("stale"),this._message.update(x),this._severity=x.severity,this._applyTheme(this._themeService.getColorTheme());const V=m.Range.lift(x),K=this.editor.getPosition(),A=K&&V.containsPosition(K)?K:V.getStartPosition();super.show(A,this.computeRequiredHeight());const Y=this.editor.getModel();if(Y){const ie=B>1?t.localize(5,null,F,B):t.localize(6,null,F,B);this.setTitle((0,S.basename)(Y.uri),ie)}this._icon.className=`codicon ${a.SeverityIcon.className(o.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(A,0),this.editor.focus()}updateMarker(x){this._container.classList.remove("stale"),this._message.update(x)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(x,F){super._doLayoutBody(x,F),this._heightInPixel=x,this._message.layout(x,F),this._container.style.height=`${x}px`}_onWidth(x){this._message.layout(this._heightInPixel,x)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};f.TitleMenu=new n.MenuId("gotoErrorTitleMenu"),e.MarkerNavigationWidget=f=Te([ge(1,u.IThemeService),ge(2,c.IOpenerService),ge(3,n.IMenuService),ge(4,d.IInstantiationService),ge(5,r.IContextKeyService),ge(6,h.ILabelService)],f);const p=(0,l.oneOf)(l.editorErrorForeground,l.editorErrorBorder),C=(0,l.oneOf)(l.editorWarningForeground,l.editorWarningBorder),y=(0,l.oneOf)(l.editorInfoForeground,l.editorInfoBorder),E=(0,l.registerColor)("editorMarkerNavigationError.background",{dark:p,light:p,hcDark:l.contrastBorder,hcLight:l.contrastBorder},t.localize(7,null)),I=(0,l.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,l.transparent)(E,.1),light:(0,l.transparent)(E,.1),hcDark:null,hcLight:null},t.localize(8,null)),T=(0,l.registerColor)("editorMarkerNavigationWarning.background",{dark:C,light:C,hcDark:l.contrastBorder,hcLight:l.contrastBorder},t.localize(9,null)),O=(0,l.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,l.transparent)(T,.1),light:(0,l.transparent)(T,.1),hcDark:"#0C141F",hcLight:(0,l.transparent)(T,.2)},t.localize(10,null)),R=(0,l.registerColor)("editorMarkerNavigationInfo.background",{dark:y,light:y,hcDark:l.contrastBorder,hcLight:l.contrastBorder},t.localize(11,null)),M=(0,l.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,l.transparent)(R,.1),light:(0,l.transparent)(R,.1),hcDark:null,hcLight:null},t.localize(12,null)),N=(0,l.registerColor)("editorMarkerNavigation.background",{dark:l.editorBackground,light:l.editorBackground,hcDark:l.editorBackground,hcLight:l.editorBackground},t.localize(13,null))}),define(J[355],ee([1,0,26,2,15,32,12,5,22,737,635,30,13,8,74,864]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let d=e.MarkerController=class Xt{static get(p){return p.getContribution(Xt.ID)}constructor(p,C,y,E,I){this._markerNavigationService=C,this._contextKeyService=y,this._editorService=E,this._instantiationService=I,this._sessionDispoables=new k.DisposableStore,this._editor=p,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(p){if(this._model&&this._model.matches(p))return this._model;let C=!1;return this._model&&(C=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(p),C&&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(y=>{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,y.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 y=this._model.find(this._editor.getModel().uri,this._widget.position);y?this._widget.updateMarker(y.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(y=>{this._editorService.openCodeEditor({resource:y.resource,options:{pinned:!0,revealIfOpened:!0,selection:b.Range.lift(y).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(p=!0){this._cleanUp(),p&&this._editor.focus()}showAtMarker(p){if(this._editor.hasModel()){const C=this._getOrCreateModel(this._editor.getModel().uri);C.resetIndex(),C.move(!0,this._editor.getModel(),new w.Position(p.startLineNumber,p.startColumn)),C.selected&&this._widget.showAtMarker(C.selected.marker,C.selected.index,C.selected.total)}}nagivate(p,C){var y,E;return we(this,void 0,void 0,function*(){if(this._editor.hasModel()){const I=this._getOrCreateModel(C?void 0:this._editor.getModel().uri);if(I.move(p,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&&((y=Xt.get(T))===null||y===void 0||y.close(),(E=Xt.get(T))===null||E===void 0||E.nagivate(p,C))}else this._widget.showAtMarker(I.selected.marker,I.selected.index,I.selected.total)}})}};d.ID="editor.contrib.markerController",e.MarkerController=d=Te([ge(1,g.IMarkerNavigationService),ge(2,t.IContextKeyService),ge(3,D.ICodeEditorService),ge(4,i.IInstantiationService)],d);class h extends L.EditorAction{constructor(p,C,y){super(y),this._next=p,this._multiFile=C}run(p,C){var y;return we(this,void 0,void 0,function*(){C.hasModel()&&((y=d.get(C))===null||y===void 0||y.nagivate(this._next,this._multiFile))})}}class o extends h{constructor(){super(!0,!1,{id:o.ID,label:o.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{menuId:r.MarkerNavigationWidget.TitleMenu,title:o.LABEL,icon:(0,n.registerIcon)("marker-navigation-next",_.Codicon.arrowDown,m.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=o,o.ID="editor.action.marker.next",o.LABEL=m.localize(0,null);class c extends h{constructor(){super(!1,!1,{id:c.ID,label:c.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:r.MarkerNavigationWidget.TitleMenu,title:c.LABEL,icon:(0,n.registerIcon)("marker-navigation-previous",_.Codicon.arrowUp,m.localize(3,null)),group:"navigation",order:2}})}}c.ID="editor.action.marker.prev",c.LABEL=m.localize(2,null);class a extends h{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:S.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:s.MenuId.MenubarGoMenu,title:m.localize(5,null),group:"6_problem_nav",order:1}})}}class l extends h{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:S.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:s.MenuId.MenubarGoMenu,title:m.localize(7,null),group:"6_problem_nav",order:2}})}}(0,L.registerEditorContribution)(d.ID,d,4),(0,L.registerEditorAction)(o),(0,L.registerEditorAction)(c),(0,L.registerEditorAction)(a),(0,L.registerEditorAction)(l);const u=new t.RawContextKey("markersNavigationVisible",!1),v=L.EditorCommand.bindToContribution(d.get);(0,L.registerEditorCommand)(new v({id:"closeMarkersNavigation",precondition:u,handler:f=>f.close(),kbOpts:{weight:100+50,kbExpr:S.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(J[865],ee([1,0,7,299,36,6,2,51,42,158,5,38,29,72,39,62,795,132,641,8,34,155,186,23,187,153,432]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class C{constructor(O,R){this._editor=O,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 O=this._editor.getModel();if(O){for(const R of this._model.references)if(R.uri.toString()===O.uri.toString()){this._addDecorations(R.parent);return}}}_addDecorations(O){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const R=[],M=[];for(let N=0,P=O.children.length;N<P;N++){const x=O.children[N];this._decorationIgnoreSet.has(x.id)||x.uri.toString()===this._editor.getModel().uri.toString()&&(R.push({range:x.range,options:C.DecorationOptions}),M.push(N))}this._editor.changeDecorations(N=>{const P=N.deltaDecorations([],R);for(let x=0;x<P.length;x++)this._decorations.set(P[x],O.children[M[x]])})}_onDecorationChanged(){const O=[],R=this._editor.getModel();if(R){for(const[M,N]of this._decorations){const P=R.getDecorationRange(M);if(!P)continue;let x=!1;if(!m.Range.equalsRange(P,N.range)){if(m.Range.spansMultipleLines(P))x=!0;else{const F=N.range.endColumn-N.range.startColumn,B=P.endColumn-P.startColumn;F!==B&&(x=!0)}x?(this._decorationIgnoreSet.add(N.id),O.push(M)):N.range=P}}for(let M=0,N=O.length;M<N;M++)this._decorations.delete(O[M]);this._editor.removeDecorations(O)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}C.DecorationOptions=s.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class y{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(O){let R,M;try{const N=JSON.parse(O);R=N.ratio,M=N.heightInLines}catch{}return{ratio:R||.7,heightInLines:M||18}}}e.LayoutData=y;class E extends u.WorkbenchAsyncDataTree{}let I=e.ReferenceWidget=class extends h.PeekViewWidget{constructor(O,R,M,N,P,x,F,B,V,K,A,Y){super(O,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},x),this._defaultTreeKeyboardSupport=R,this.layoutData=M,this._textModelResolverService=P,this._instantiationService=x,this._peekViewService=F,this._uriLabel=B,this._undoRedoService=V,this._keybindingService=K,this._languageService=A,this._languageConfigurationService=Y,this._disposeOnNewModel=new w.DisposableStore,this._callOnDispose=new w.DisposableStore,this._onDidSelectReference=new D.Emitter,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new _.Dimension(0,0),this._applyTheme(N.getColorTheme()),this._callOnDispose.add(N.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(O,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(O){const R=O.getColor(h.peekViewBorder)||L.Color.transparent;this.style({arrowColor:R,frameColor:R,headerBackgroundColor:O.getColor(h.peekViewTitleBackground)||L.Color.transparent,primaryHeadingColor:O.getColor(h.peekViewTitleForeground),secondaryHeadingColor:O.getColor(h.peekViewTitleInfoForeground)})}show(O){super.show(O,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(O){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:O.ctrlKey||O.metaKey||O.altKey?"side":"open",source:"title"})}_fillBody(O){this.setCssClass("reference-zone-widget"),this._messageContainer=_.append(O,_.$("div.messages")),_.hide(this._messageContainer),this._splitView=new k.SplitView(O,{orientation:1}),this._previewContainer=_.append(O,_.$("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(g.EmbeddedCodeEditorWidget,this._previewContainer,R,{},this.editor),_.hide(this._previewContainer),this._previewNotAvailableMessage=new s.TextModel(o.localize(0,null),i.PLAINTEXT_LANGUAGE_ID,s.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=_.append(O,_.$("div.ref-tree.inline"));const M={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new d.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(d.StringRepresentationProvider),identityProvider:new d.IdentityProvider,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:h.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(_.addStandardDisposableListener(this._treeContainer,"keydown",P=>{P.equals(9)&&(this._keybindingService.dispatchEvent(P,P.target),P.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(E,"ReferencesWidget",this._treeContainer,new d.Delegate,[this._instantiationService.createInstance(d.FileReferencesRenderer),this._instantiationService.createInstance(d.OneReferenceRenderer)],this._instantiationService.createInstance(d.DataSource),M),this._splitView.addView({onDidChange:D.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:P=>{this._preview.layout({height:this._dim.height,width:P})}},k.Sizing.Distribute),this._splitView.addView({onDidChange:D.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:P=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${P}px`,this._tree.layout(this._dim.height,P)}},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=(P,x)=>{P instanceof p.OneReference&&(x==="show"&&this._revealReference(P,!1),this._onDidSelectReference.fire({element:P,kind:x,source:"tree"}))};this._tree.onDidOpen(P=>{P.sideBySide?N(P.element,"side"):P.editorOptions.pinned?N(P.element,"goto"):N(P.element,"show")}),_.hide(this._treeContainer)}_onWidth(O){this._dim&&this._doLayoutBody(this._dim.height,O)}_doLayoutBody(O,R){super._doLayoutBody(O,R),this._dim=new _.Dimension(R,O),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(R),this._splitView.resizeView(0,R*this.layoutData.ratio)}setSelection(O){return this._revealReference(O,!0).then(()=>{this._model&&(this._tree.setSelection([O]),this._tree.setFocus([O]))})}setModel(O){return this._disposeOnNewModel.clear(),this._model=O,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=o.localize(1,null),_.show(this._messageContainer),Promise.resolve(void 0)):(_.hide(this._messageContainer),this._decorationsManager=new C(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(O=>this._tree.rerender(O))),this._disposeOnNewModel.add(this._preview.onMouseDown(O=>{const{event:R,target:M}=O;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"),_.show(this._treeContainer),_.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[O]=this._tree.getFocus();if(O instanceof p.OneReference)return O;if(O instanceof p.FileReferences&&O.children.length>0)return O.children[0]}revealReference(O){return we(this,void 0,void 0,function*(){yield this._revealReference(O,!1),this._onDidSelectReference.fire({element:O,kind:"goto",source:"tree"})})}_revealReference(O,R){return we(this,void 0,void 0,function*(){if(this._revealedReference===O)return;this._revealedReference=O,O.uri.scheme!==b.Schemas.inMemory?this.setTitle((0,S.basenameOrAuthority)(O.uri),this._uriLabel.getUriLabel((0,S.dirname)(O.uri))):this.setTitle(o.localize(2,null));const M=this._textModelResolverService.createModelReference(O.uri);this._tree.getInput()===O.parent?this._tree.reveal(O):(R&&this._tree.reveal(O.parent),yield this._tree.expand(O.parent),this._tree.reveal(O));const N=yield M;if(!this._model){N.dispose();return}(0,w.dispose)(this._previewModelReference);const P=N.object;if(P){const x=this._preview.getModel()===P.textEditorModel?0:1,F=m.Range.lift(O.range).collapseToStart();this._previewModelReference=N,this._preview.setModel(P.textEditorModel),this._preview.setSelection(F),this._preview.revealRangeInCenter(F,x)}else this._preview.setModel(this._previewNotAvailableMessage),N.dispose()})}};e.ReferenceWidget=I=Te([ge(3,v.IThemeService),ge(4,r.ITextModelService),ge(5,c.IInstantiationService),ge(6,h.IPeekViewService),ge(7,l.ILabelService),ge(8,f.IUndoRedoService),ge(9,a.IKeybindingService),ge(10,n.ILanguageService),ge(11,t.ILanguageConfigurationService)],I)}),define(J[356],ee([1,0,14,11,58,2,32,12,5,132,639,25,28,13,8,112,186,43,85,153,865]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,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 l=e.ReferencesController=class vi{static get(f){return f.getContribution(vi.ID)}constructor(f,p,C,y,E,I,T,O){this._defaultTreeKeyboardSupport=f,this._editor=p,this._editorService=y,this._notificationService=E,this._instantiationService=I,this._storageService=T,this._configurationService=O,this._disposables=new D.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(C)}dispose(){var f,p;this._referenceSearchVisible.reset(),this._disposables.dispose(),(f=this._widget)===null||f===void 0||f.dispose(),(p=this._model)===null||p===void 0||p.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(f,p,C){let y;if(this._widget&&(y=this._widget.position),this.closeWidget(),y&&f.containsPosition(y))return;this._peekMode=C,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(()=>{p.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(O=>{const{element:R,kind:M}=O;if(R)switch(M){case"open":(O.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(R,!1,!1);break;case"side":this.openReference(R,!0,!1);break;case"goto":C?this._gotoReference(R,!0):this.openReference(R,!1,!0);break}}));const T=++this._requestIdPool;p.then(O=>{var R;if(T!==this._requestIdPool||!this._widget){O.dispose();return}return(R=this._model)===null||R===void 0||R.dispose(),this._model=O,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),P=this._model.nearestReference(M,N);if(P)return this._widget.setSelection(P).then(()=>{this._widget&&this._editor.getOption(84)==="editor"&&this._widget.focusOnPreviewEditor()})}})},O=>{this._notificationService.error(O)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(f){return we(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const p=this._widget.position;if(!p)return;const C=this._model.nearestReference(this._editor.getModel().uri,p);if(!C)return;const y=this._model.nextOrPreviousReference(C,f),E=this._editor.hasTextFocus(),I=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(y),yield this._gotoReference(y,!1),E?this._editor.focus():this._widget&&I&&this._widget.focusOnPreviewEditor()})}revealReference(f){return we(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(f))})}closeWidget(f=!0){var p,C;(p=this._widget)===null||p===void 0||p.dispose(),(C=this._model)===null||C===void 0||C.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,f&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(f,p){var C;(C=this._widget)===null||C===void 0||C.hide(),this._ignoreModelChangeEvent=!0;const y=S.Range.lift(f.range).collapseToStart();return this._editorService.openCodeEditor({resource:f.uri,options:{selection:y,selectionSource:"code.jump",pinned:p}},this._editor).then(E=>{var I;if(this._ignoreModelChangeEvent=!1,!E||!this._widget){this.closeWidget();return}if(this._editor===E)this._widget.show(y),this._widget.focusOnReferenceTree();else{const T=vi.get(E),O=this._model.clone();this.closeWidget(),E.focus(),T?.toggleWidget(y,(0,_.createCancelablePromise)(R=>Promise.resolve(O)),(I=this._peekMode)!==null&&I!==void 0?I:!1)}},E=>{this._ignoreModelChangeEvent=!1,(0,k.onUnexpectedError)(E)})}openReference(f,p,C){p||this.closeWidget();const{uri:y,range:E}=f;this._editorService.openCodeEditor({resource:y,options:{selection:E,selectionSource:"code.jump",pinned:C}},this._editor,p)}};l.ID="editor.contrib.referencesController",e.ReferencesController=l=Te([ge(2,i.IContextKeyService),ge(3,w.ICodeEditorService),ge(4,h.INotificationService),ge(5,n.IInstantiationService),ge(6,o.IStorageService),ge(7,t.IConfigurationService)],l);function u(v,f){const p=(0,g.getOuterEditor)(v);if(!p)return;const C=l.get(p);C&&f(C)}r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,L.KeyChord)(2089,60),when:i.ContextKeyExpr.or(e.ctxReferenceSearchVisible,g.PeekContext.inPeekEditor),handler(v){u(v,f=>{f.changeFocusBetweenPreviewAndReferences()})}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:i.ContextKeyExpr.or(e.ctxReferenceSearchVisible,g.PeekContext.inPeekEditor),handler(v){u(v,f=>{f.goToNextOrPreviousReference(!0)})}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:i.ContextKeyExpr.or(e.ctxReferenceSearchVisible,g.PeekContext.inPeekEditor),handler(v){u(v,f=>{f.goToNextOrPreviousReference(!1)})}}),s.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),s.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),s.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),s.CommandsRegistry.registerCommand("closeReferenceSearch",v=>u(v,f=>f.closeWidget())),r.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:i.ContextKeyExpr.and(g.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,d.WorkbenchListFocusContextKey,d.WorkbenchTreeElementCanCollapse.negate(),d.WorkbenchTreeElementCanExpand.negate()),handler(v){var f;const C=(f=v.get(d.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(C)&&C[0]instanceof c.OneReference&&u(v,y=>y.revealReference(C[0]))}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:i.ContextKeyExpr.and(e.ctxReferenceSearchVisible,d.WorkbenchListFocusContextKey,d.WorkbenchTreeElementCanCollapse.negate(),d.WorkbenchTreeElementCanExpand.negate()),handler(v){var f;const C=(f=v.get(d.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(C)&&C[0]instanceof c.OneReference&&u(v,y=>y.openReference(C[0],!0,!0))}}),s.CommandsRegistry.registerCommand("openReference",v=>{var f;const C=(f=v.get(d.IListService).lastFocusedList)===null||f===void 0?void 0:f.getFocus();Array.isArray(C)&&C[0]instanceof c.OneReference&&u(v,y=>y.openReference(C[0],!1,!0))})}),define(J[246],ee([1,0,47,48,14,58,17,18,21,99,172,15,32,158,12,5,22,27,356,153,775,185,132,637,30,25,13,8,43,80,239,19,53]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T,O,R){"use strict";var M,N,P,x,F,B,V,K;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:v.localize(0,null),group:"navigation",order:100});class A{static is(Q){return!Q||typeof Q!="object"?!1:!!(Q instanceof A||n.Position.isIPosition(Q.position)&&Q.model)}constructor(Q,re){this.model=Q,this.position=re}}e.SymbolNavigationAnchor=A;class Y extends s.EditorAction2{static all(){return Y._allSymbolNavigationCommands.values()}static _patchConfig(Q){const re=Object.assign(Object.assign({},Q),{f1:!0});if(re.menu)for(const ce of R.Iterable.wrap(re.menu))(ce.id===f.MenuId.EditorContext||ce.id===f.MenuId.EditorContextPeek)&&(ce.when=C.ContextKeyExpr.and(Q.precondition,ce.when));return re}constructor(Q,re){super(Y._patchConfig(re)),this.configuration=Q,Y._allSymbolNavigationCommands.set(re.id,this)}runEditorCommand(Q,re,ce,he){if(!re.hasModel())return Promise.resolve(void 0);const de=Q.get(E.INotificationService),ue=Q.get(t.ICodeEditorService),q=Q.get(I.IEditorProgressService),z=Q.get(a.ISymbolNavigationService),U=Q.get(O.ILanguageFeaturesService),X=Q.get(y.IInstantiationService),te=re.getModel(),G=re.getPosition(),ae=A.is(ce)?ce:new A(te,G),fe=new g.EditorStateCancellationTokenSource(re,5),Ce=(0,L.raceCancellation)(this._getLocationModel(U,ae.model,ae.position,fe.token),fe.token).then(Se=>we(this,void 0,void 0,function*(){var ye;if(!Se||fe.token.isCancellationRequested)return;(0,k.alert)(Se.ariaMessage);let Ie;if(Se.referenceAt(te.uri,G)){const ke=this._getAlternativeCommand(re);!Y._activeAlternativeCommands.has(ke)&&Y._allSymbolNavigationCommands.has(ke)&&(Ie=Y._allSymbolNavigationCommands.get(ke))}const Ee=Se.references.length;if(Ee===0){if(!this.configuration.muteMessage){const ke=te.getWordAtPosition(G);(ye=l.MessageController.get(re))===null||ye===void 0||ye.showMessage(this._getNoResultFoundMessage(ke),G)}}else if(Ee===1&&Ie)Y._activeAlternativeCommands.add(this.desc.id),X.invokeFunction(ke=>Ie.runEditorCommand(ke,re,ce,he).finally(()=>{Y._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(ue,z,re,Se,he)}),Se=>{de.error(Se)}).finally(()=>{fe.dispose()});return q.showWhile(Ce,250),Ce}_onResult(Q,re,ce,he,de){return we(this,void 0,void 0,function*(){const ue=this._getGoToPreference(ce);if(!(ce instanceof i.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||ue==="peek"&&he.references.length>1))this._openInPeek(ce,he,de);else{const q=he.firstReference(),z=he.references.length>1&&ue==="gotoAndPeek",U=yield this._openReference(ce,Q,q,this.configuration.openToSide,!z);z&&U?this._openInPeek(U,he,de):he.dispose(),ue==="goto"&&re.put(q)}})}_openReference(Q,re,ce,he,de){return we(this,void 0,void 0,function*(){let ue;if((0,h.isLocationLink)(ce)&&(ue=ce.targetSelectionRange),ue||(ue=ce.range),!ue)return;const q=yield re.openCodeEditor({resource:ce.uri,options:{selection:r.Range.collapseToStart(ue),selectionRevealType:3,selectionSource:"code.jump"}},Q,he);if(q){if(de){const z=q.getModel(),U=q.createDecorationsCollection([{range:ue,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{q.getModel()===z&&U.clear()},350)}return q}})}_openInPeek(Q,re,ce){const he=o.ReferencesController.get(Q);he&&Q.hasModel()?he.toggleWidget(ce??Q.getSelection(),(0,L.createCancelablePromise)(de=>Promise.resolve(re)),this.configuration.openInPeek):re.dispose()}}e.SymbolNavigationAction=Y,Y._allSymbolNavigationCommands=new Map,Y._activeAlternativeCommands=new Set;class ie extends Y{_getLocationModel(Q,re,ce,he){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getDefinitionsAtPosition)(Q.definitionProvider,re,ce,he),v.localize(1,null))})}_getNoResultFoundMessage(Q){return Q&&Q.word?v.localize(2,null,Q.word):v.localize(3,null)}_getAlternativeCommand(Q){return Q.getOption(56).alternativeDefinitionCommand}_getGoToPreference(Q){return Q.getOption(56).multipleDefinitions}}e.DefinitionAction=ie;const le=w.isWeb&&!(0,_.isStandalone)()?2118:70;(0,f.registerAction2)((M=class Ci extends ie{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Ci.id,title:{value:v.localize(4,null),original:"Go to Definition",mnemonicTitle:v.localize(5,null)},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasDefinitionProvider,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:d.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}]}),p.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",Ci.id)}},M.id="editor.action.revealDefinition",M)),(0,f.registerAction2)((N=class bi extends ie{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:bi.id,title:{value:v.localize(6,null),original:"Open Definition to the Side"},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasDefinitionProvider,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:d.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,le),weight:100}}),p.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",bi.id)}},N.id="editor.action.revealDefinitionAside",N)),(0,f.registerAction2)((P=class _i extends ie{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:_i.id,title:{value:v.localize(7,null),original:"Peek Definition"},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasDefinitionProvider,u.PeekContext.notInPeekEditor,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:d.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:2}}),p.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",_i.id)}},P.id="editor.action.peekDefinition",P));class ne extends Y{_getLocationModel(Q,re,ce,he){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getDeclarationsAtPosition)(Q.declarationProvider,re,ce,he),v.localize(8,null))})}_getNoResultFoundMessage(Q){return Q&&Q.word?v.localize(9,null,Q.word):v.localize(10,null)}_getAlternativeCommand(Q){return Q.getOption(56).alternativeDeclarationCommand}_getGoToPreference(Q){return Q.getOption(56).multipleDeclarations}}(0,f.registerAction2)((x=class on extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:on.id,title:{value:v.localize(11,null),original:"Go to Declaration",mnemonicTitle:v.localize(12,null)},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasDeclarationProvider,d.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(Q){return Q&&Q.word?v.localize(13,null,Q.word):v.localize(14,null)}},x.id="editor.action.revealDeclaration",x)),(0,f.registerAction2)(class extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v.localize(15,null),original:"Peek Declaration"},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasDeclarationProvider,u.PeekContext.notInPeekEditor,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:3}})}});class se extends Y{_getLocationModel(Q,re,ce,he){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getTypeDefinitionsAtPosition)(Q.typeDefinitionProvider,re,ce,he),v.localize(16,null))})}_getNoResultFoundMessage(Q){return Q&&Q.word?v.localize(17,null,Q.word):v.localize(18,null)}_getAlternativeCommand(Q){return Q.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(Q){return Q.getOption(56).multipleTypeDefinitions}}(0,f.registerAction2)((F=class rn extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:rn.ID,title:{value:v.localize(19,null),original:"Go to Type Definition",mnemonicTitle:v.localize(20,null)},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasTypeDefinitionProvider,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:d.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}]})}},F.ID="editor.action.goToTypeDefinition",F)),(0,f.registerAction2)((B=class an extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:an.ID,title:{value:v.localize(21,null),original:"Peek Type Definition"},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasTypeDefinitionProvider,u.PeekContext.notInPeekEditor,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:4}})}},B.ID="editor.action.peekTypeDefinition",B));class H extends Y{_getLocationModel(Q,re,ce,he){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getImplementationsAtPosition)(Q.implementationProvider,re,ce,he),v.localize(22,null))})}_getNoResultFoundMessage(Q){return Q&&Q.word?v.localize(23,null,Q.word):v.localize(24,null)}_getAlternativeCommand(Q){return Q.getOption(56).alternativeImplementationCommand}_getGoToPreference(Q){return Q.getOption(56).multipleImplementations}}(0,f.registerAction2)((V=class ln extends H{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:ln.ID,title:{value:v.localize(25,null),original:"Go to Implementations",mnemonicTitle:v.localize(26,null)},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasImplementationProvider,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:d.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}]})}},V.ID="editor.action.goToImplementation",V)),(0,f.registerAction2)((K=class dn extends H{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:dn.ID,title:{value:v.localize(27,null),original:"Peek Implementations"},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasImplementationProvider,u.PeekContext.notInPeekEditor,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:d.EditorContextKeys.editorTextFocus,primary:3142,weight:100},menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:5}})}},K.ID="editor.action.peekImplementation",K));class W extends Y{_getNoResultFoundMessage(Q){return Q?v.localize(28,null,Q.word):v.localize(29,null)}_getAlternativeCommand(Q){return Q.getOption(56).alternativeReferenceCommand}_getGoToPreference(Q){return Q.getOption(56).multipleReferences}}(0,f.registerAction2)(class extends W{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v.localize(30,null),original:"Go to References",mnemonicTitle:v.localize(31,null)},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasReferenceProvider,u.PeekContext.notInPeekEditor,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:d.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(Q,re,ce,he){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getReferencesAtPosition)(Q.referenceProvider,re,ce,!0,he),v.localize(32,null))})}}),(0,f.registerAction2)(class extends W{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v.localize(33,null),original:"Peek References"},precondition:C.ContextKeyExpr.and(d.EditorContextKeys.hasReferenceProvider,u.PeekContext.notInPeekEditor,d.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:f.MenuId.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(Q,re,ce,he){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(yield(0,T.getReferencesAtPosition)(Q.referenceProvider,re,ce,!1,he),v.localize(34,null))})}});class $ extends Y{constructor(Q,re,ce){super(Q,{id:"editor.action.goToLocation",title:{value:v.localize(35,null),original:"Go to Any Symbol"},precondition:C.ContextKeyExpr.and(u.PeekContext.notInPeekEditor,d.EditorContextKeys.isInWalkThroughSnippet.toNegated())}),this._references=re,this._gotoMultipleBehaviour=ce}_getLocationModel(Q,re,ce,he){return we(this,void 0,void 0,function*(){return new c.ReferencesModel(this._references,v.localize(36,null))})}_getNoResultFoundMessage(Q){return Q&&v.localize(37,null,Q.word)||""}_getGoToPreference(Q){var re;return(re=this._gotoMultipleBehaviour)!==null&&re!==void 0?re:Q.getOption(56).multipleReferences}_getAlternativeCommand(){return""}}p.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:S.URI},{name:"position",description:"The position at which to start",constraint:n.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(Z,Q,re,ce,he,de,ue)=>we(void 0,void 0,void 0,function*(){(0,b.assertType)(S.URI.isUri(Q)),(0,b.assertType)(n.Position.isIPosition(re)),(0,b.assertType)(Array.isArray(ce)),(0,b.assertType)(typeof he>"u"||typeof he=="string"),(0,b.assertType)(typeof ue>"u"||typeof ue=="boolean");const q=Z.get(t.ICodeEditorService),z=yield q.openCodeEditor({resource:Q},q.getFocusedCodeEditor());if((0,m.isCodeEditor)(z))return z.setPosition(re),z.revealPositionInCenterIfOutsideViewport(re,0),z.invokeWithinContext(U=>{const X=new class extends ${_getNoResultFoundMessage(te){return de||super._getNoResultFoundMessage(te)}}({muteMessage:!de,openInPeek:!!ue,openToSide:!1},ce,he);U.get(y.IInstantiationService).invokeFunction(X.run.bind(X),z)})})}),p.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:S.URI},{name:"position",description:"The position at which to start",constraint:n.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(Z,Q,re,ce,he)=>we(void 0,void 0,void 0,function*(){Z.get(p.ICommandService).executeCommand("editor.action.goToLocations",Q,re,ce,he,void 0,!0)})}),p.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(Z,Q,re)=>{(0,b.assertType)(S.URI.isUri(Q)),(0,b.assertType)(n.Position.isIPosition(re));const ce=Z.get(O.ILanguageFeaturesService),he=Z.get(t.ICodeEditorService);return he.openCodeEditor({resource:Q},he.getFocusedCodeEditor()).then(de=>{if(!(0,m.isCodeEditor)(de)||!de.hasModel())return;const ue=o.ReferencesController.get(de);if(!ue)return;const q=(0,L.createCancelablePromise)(U=>(0,T.getReferencesAtPosition)(ce.referenceProvider,de.getModel(),n.Position.lift(re),!1,U).then(X=>new c.ReferencesModel(X,v.localize(38,null)))),z=new r.Range(re.lineNumber,re.column,re.lineNumber,re.column);return Promise.resolve(ue.toggleWidget(z,q,!1))})}}),p.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(J[357],ee([1,0,14,11,61,2,18,99,15,5,39,62,179,132,638,13,246,239,19,38,431]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let a=e.GotoDefinitionAtPositionEditorContribution=class Jt{constructor(u,v,f,p){this.textModelResolverService=v,this.languageService=f,this.languageFeaturesService=p,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 C=new t.ClickLinkGesture(u);this.toUnhook.add(C),this.toUnhook.add(C.onMouseMoveOrRelevantKeyDown(([y,E])=>{this.startFindDefinitionFromMouse(y,(0,w.withNullAsUndefined)(E))})),this.toUnhook.add(C.onExecute(y=>{this.isEnabled(y)&&this.gotoDefinition(y.target.position,y.hasSideBySideModifier).catch(E=>{(0,k.onUnexpectedError)(E)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(C.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(u){return u.getContribution(Jt.ID)}startFindDefinitionFromCursor(u){return we(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(v=>{v&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(u,v){if(u.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(u,v)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const f=u.target.position;this.startFindDefinition(f)}startFindDefinition(u){var v;return we(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const f=u?(v=this.editor.getModel())===null||v===void 0?void 0:v.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 p=new b.EditorState(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,_.createCancelablePromise)(E=>this.findDefinition(u,E));let C;try{C=yield this.previousPromise}catch(E){(0,k.onUnexpectedError)(E);return}if(!C||!C.length||!p.validate(this.editor)){this.removeLinkDecorations();return}const y=C[0].originSelectionRange?g.Range.lift(C[0].originSelectionRange):new g.Range(u.lineNumber,f.startColumn,u.lineNumber,f.endColumn);if(C.length>1){let E=y;for(const{originSelectionRange:I}of C)I&&(E=g.Range.plusRange(E,I));this.addDecoration(E,new L.MarkdownString().appendText(n.localize(0,null,C.length)))}else{const E=C[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:O}=E.range;if(O<1||O>T.getLineCount()){I.dispose();return}const R=this.getPreviewValue(T,O,E),M=this.languageService.guessLanguageIdByFilepathOrFirstLine(T.uri);this.addDecoration(y,R?new L.MarkdownString().appendCodeblock(M||"",R):void 0),I.dispose()})}})}getPreviewValue(u,v,f){let p=f.range;return p.endLineNumber-p.startLineNumber>=Jt.MAX_SOURCE_PREVIEW_LINES&&(p=this.getPreviewRangeBasedOnIndentation(u,v)),this.stripIndentationFromPreviewRange(u,v,p)}stripIndentationFromPreviewRange(u,v,f){let C=u.getLineFirstNonWhitespaceColumn(v);for(let E=v+1;E<f.endLineNumber;E++){const I=u.getLineFirstNonWhitespaceColumn(E);C=Math.min(C,I)}return u.getValueInRange(f).replace(new RegExp(`^\\\\s{${C-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(u,v){const f=u.getLineFirstNonWhitespaceColumn(v),p=Math.min(u.getLineCount(),v+Jt.MAX_SOURCE_PREVIEW_LINES);let C=v+1;for(;C<p;C++){const y=u.getLineFirstNonWhitespaceColumn(C);if(f===y)break}return new g.Range(v,1,C+1,1)}addDecoration(u,v){const f={range:u,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:v}};this.linkDecorations.set([f])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(u,v){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 c.ModelDecorationInjectedTextOptions)&&(u.hasTriggerModifier||(v?v.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(u,v){const f=this.editor.getModel();return f?(0,h.getDefinitionsAtPosition)(this.languageFeaturesService.definitionProvider,f,u,v):Promise.resolve(null)}gotoDefinition(u,v){return this.editor.setPosition(u),this.editor.invokeWithinContext(f=>{const p=!v&&this.editor.getOption(85)&&!this.isInPeekEditor(f);return new d.DefinitionAction({openToSide:v,openInPeek:p,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(f)})}isInPeekEditor(u){const v=u.get(r.IContextKeyService);return i.PeekContext.inPeekEditor.getValue(v)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};a.ID="editor.contrib.gotodefinitionatposition",a.MAX_SOURCE_PREVIEW_LINES=8,e.GotoDefinitionAtPositionEditorContribution=a=Te([ge(1,s.ITextModelService),ge(2,m.ILanguageService),ge(3,o.ILanguageFeaturesService)],a),(0,S.registerEditorContribution)(a.ID,a,2)}),define(J[866],ee([1,0,7,16,14,11,2,42,5,19,228,131,242,108,355,646,92,52,80]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const c=_.$;class a{constructor(f,p,C){this.owner=f,this.range=p,this.marker=C}isValidForHoverAnchor(f){return f.type===1&&this.range.startColumn<=f.range.startColumn&&this.range.endColumn>=f.range.endColumn}}e.MarkerHover=a;const l={type:1,filter:{include:i.CodeActionKind.QuickFix},triggerAction:i.CodeActionTriggerSource.QuickFixHover};let u=e.MarkerHoverParticipant=class{constructor(f,p,C,y){this._editor=f,this._markerDecorationsService=p,this._openerService=C,this._languageFeaturesService=y,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(f,p){if(!this._editor.hasModel()||f.type!==1&&!f.supportsMarkerHover)return[];const C=this._editor.getModel(),y=f.range.startLineNumber,E=C.getLineMaxColumn(y),I=[];for(const T of p){const O=T.range.startLineNumber===y?T.range.startColumn:1,R=T.range.endLineNumber===y?T.range.endColumn:E,M=this._markerDecorationsService.getMarker(C.uri,T);if(!M)continue;const N=new S.Range(f.range.startLineNumber,O,f.range.startLineNumber,R);I.push(new a(this,N,M))}return I}renderHoverParts(f,p){if(!p.length)return w.Disposable.None;const C=new w.DisposableStore;p.forEach(E=>f.fragment.appendChild(this.renderMarkerHover(E,C)));const y=p.length===1?p[0]:p.sort((E,I)=>d.MarkerSeverity.compare(E.marker.severity,I.marker.severity))[0];return this.renderMarkerStatusbar(f,y,C),C}renderMarkerHover(f,p){const C=c("div.hover-row"),y=_.append(C,c("div.marker.hover-contents")),{source:E,message:I,code:T,relatedInformation:O}=f.marker;this._editor.applyFontInfo(y);const R=_.append(y,c("span"));if(R.style.whiteSpace="pre-wrap",R.innerText=I,E||T)if(T&&typeof T!="string"){const M=c("span");if(E){const F=_.append(M,c("span"));F.innerText=E}const N=_.append(M,c("a.code-link"));N.setAttribute("href",T.target.toString()),p.add(_.addDisposableListener(N,"click",F=>{this._openerService.open(T.target,{allowCommands:!0}),F.preventDefault(),F.stopPropagation()}));const P=_.append(N,c("span"));P.innerText=T.value;const x=_.append(y,M);x.style.opacity="0.6",x.style.paddingLeft="6px"}else{const M=_.append(y,c("span"));M.style.opacity="0.6",M.style.paddingLeft="6px",M.innerText=E&&T?`${E}(${T})`:E||`(${T})`}if((0,k.isNonEmptyArray)(O))for(const{message:M,resource:N,startLineNumber:P,startColumn:x}of O){const F=_.append(y,c("div"));F.style.marginTop="8px";const B=_.append(F,c("a"));B.innerText=`${(0,b.basename)(N)}(${P}, ${x}): `,B.style.cursor="pointer",p.add(_.addDisposableListener(B,"click",K=>{K.stopPropagation(),K.preventDefault(),this._openerService&&this._openerService.open(N,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:P,startColumn:x}}}).catch(D.onUnexpectedError)}));const V=_.append(F,c("span"));V.innerText=M,this._editor.applyFontInfo(V)}return C}renderMarkerStatusbar(f,p,C){if((p.marker.severity===d.MarkerSeverity.Error||p.marker.severity===d.MarkerSeverity.Warning||p.marker.severity===d.MarkerSeverity.Info)&&f.statusBar.addAction({label:r.localize(0,null),commandId:n.NextMarkerAction.ID,run:()=>{var y;f.hide(),(y=n.MarkerController.get(this._editor))===null||y===void 0||y.showAtMarker(p.marker),this._editor.focus()}}),!this._editor.getOption(88)){const y=f.statusBar.append(c("div"));this.recentMarkerCodeActionsInfo&&(d.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===d.IMarkerData.makeKey(p.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(y.textContent=r.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const E=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?w.Disposable.None:C.add((0,L.disposableTimeout)(()=>y.textContent=r.localize(2,null),200));y.textContent||(y.textContent=String.fromCharCode(160));const I=this.getCodeActions(p.marker);C.add((0,w.toDisposable)(()=>I.cancel())),I.then(T=>{if(E.dispose(),this.recentMarkerCodeActionsInfo={marker:p.marker,hasCodeActions:T.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){T.dispose(),y.textContent=r.localize(3,null);return}y.style.display="none";let O=!1;C.add((0,w.toDisposable)(()=>{O||T.dispose()})),f.statusBar.addAction({label:r.localize(4,null),commandId:s.quickFixCommandId,run:R=>{O=!0;const M=t.CodeActionController.get(this._editor),N=_.getDomNodePagePosition(R);f.hide(),M?.showCodeActions(l,T,{x:N.left,y:N.top,width:N.width,height:N.height})}})},D.onUnexpectedError)}}getCodeActions(f){return(0,L.createCancelablePromise)(p=>(0,s.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new S.Range(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn),l,o.Progress.None,p))}};e.MarkerHoverParticipant=u=Te([ge(1,m.IMarkerDecorationsService),ge(2,h.IOpenerService),ge(3,g.ILanguageFeaturesService)],u)}),define(J[358],ee([1,0,58,2,15,5,22,39,357,353,754,644,8,52,33,23,95,240,866,244,34,433]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;let l=e.ModesHoverController=class cn{static get(N){return N.getContribution(cn.ID)}constructor(N,P,x,F,B){this._editor=N,this._instantiationService=P,this._openerService=x,this._languageService=F,this._keybindingService=B,this._toUnhook=new k.DisposableStore,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(V=>{V.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const N=()=>this._hideWidgets(),P=this._editor.getOption(58);this._isHoverEnabled=P.enabled,this._isHoverSticky=P.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(x=>this._onEditorMouseDown(x))),this._toUnhook.add(this._editor.onMouseUp(x=>this._onEditorMouseUp(x))),this._toUnhook.add(this._editor.onMouseMove(x=>this._onEditorMouseMove(x))),this._toUnhook.add(this._editor.onKeyDown(x=>this._onKeyDown(x)))):(this._toUnhook.add(this._editor.onMouseMove(x=>this._onEditorMouseMove(x))),this._toUnhook.add(this._editor.onKeyDown(x=>this._onKeyDown(x)))),this._toUnhook.add(this._editor.onMouseLeave(x=>this._onEditorMouseLeave(x))),this._toUnhook.add(this._editor.onDidChangeModel(N)),this._toUnhook.add(this._editor.onDidScrollChange(x=>this._onEditorScrollChanged(x)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(N){(N.scrollTopChanged||N.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(N){this._isMouseDown=!0;const P=N.target;if(P.type===9&&P.detail===g.ContentHoverWidget.ID){this._hoverClicked=!0;return}P.type===12&&P.detail===m.MarginHoverWidget.ID||(P.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(N){this._isMouseDown=!1}_onEditorMouseLeave(N){var P;const x=N.event.browserEvent.relatedTarget;!((P=this._contentWidget)===null||P===void 0)&&P.containsNode(x)||this._hideWidgets()}_onEditorMouseMove(N){var P,x,F,B,V,K,A,Y;const ie=N.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&ie.type===9&&ie.detail===g.ContentHoverWidget.ID||this._isHoverSticky&&(!((P=this._contentWidget)===null||P===void 0)&&P.containsNode((x=N.event.browserEvent.view)===null||x===void 0?void 0:x.document.activeElement))&&!(!((B=(F=N.event.browserEvent.view)===null||F===void 0?void 0:F.getSelection())===null||B===void 0)&&B.isCollapsed)||!this._isHoverSticky&&ie.type===9&&ie.detail===g.ContentHoverWidget.ID&&(!((V=this._contentWidget)===null||V===void 0)&&V.isColorPickerVisible())||this._isHoverSticky&&ie.type===12&&ie.detail===m.MarginHoverWidget.ID||this._isHoverSticky&&(!((K=this._contentWidget)===null||K===void 0)&&K.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(N)){(A=this._glyphWidget)===null||A===void 0||A.hide();return}if(ie.type===2&&ie.position){(Y=this._contentWidget)===null||Y===void 0||Y.hide(),this._glyphWidget||(this._glyphWidget=new m.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(ie.position.lineNumber);return}this._hideWidgets()}_onKeyDown(N){var P;if(!this._editor.hasModel())return;const x=this._keybindingService.softDispatch(N,this._editor.getDomNode()),F=x.kind===1||x.kind===2&&x.commandId==="editor.action.showHover"&&((P=this._contentWidget)===null||P===void 0?void 0:P.isVisible());N.keyCode!==5&&N.keyCode!==6&&N.keyCode!==57&&N.keyCode!==4&&!F&&this._hideWidgets()}_hideWidgets(){var N,P,x;this._isMouseDown&&this._hoverClicked&&(!((N=this._contentWidget)===null||N===void 0)&&N.isColorPickerVisible())||c.InlineSuggestionHintsContentWidget.dropDownVisible||(this._hoverClicked=!1,(P=this._glyphWidget)===null||P===void 0||P.hide(),(x=this._contentWidget)===null||x===void 0||x.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(g.ContentHoverController,this._editor)),this._contentWidget}isColorPickerVisible(){var N;return((N=this._contentWidget)===null||N===void 0?void 0:N.isColorPickerVisible())||!1}showContentHover(N,P,x,F){this._getOrCreateContentWidget().startShowingAtRange(N,P,x,F)}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,P;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(N=this._glyphWidget)===null||N===void 0||N.dispose(),(P=this._contentWidget)===null||P===void 0||P.dispose()}};l.ID="editor.contrib.hover",e.ModesHoverController=l=Te([ge(1,t.IInstantiationService),ge(2,i.IOpenerService),ge(3,b.ILanguageService),ge(4,a.IKeybindingService)],l);class u extends L.EditorAction{constructor(){super({id:"editor.action.showHover",label:s.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,_.KeyChord)(2089,2087),weight:100}})}run(N,P,x){if(!P.hasModel())return;const F=l.get(P);if(!F)return;const B=P.getPosition(),V=new D.Range(B.lineNumber,B.column,B.lineNumber,B.column),K=P.getOption(2)===2||!!x?.focus;F.isHoverVisible()?F.focus():F.showContentHover(V,1,1,K)}}class v extends L.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:s.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(N,P){const x=l.get(P);if(!x)return;const F=P.getPosition();if(!F)return;const B=new D.Range(F.lineNumber,F.column,F.lineNumber,F.column),V=S.GotoDefinitionAtPositionEditorContribution.get(P);if(!V)return;V.startFindDefinitionFromCursor(F).then(()=>{x.showContentHover(B,1,1,!0)})}}class f extends L.EditorAction{constructor(){super({id:"editor.action.scrollUpHover",label:s.localize(2,null),alias:"Scroll Up Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:16,weight:100}})}run(N,P){const x=l.get(P);x&&x.scrollUp()}}class p extends L.EditorAction{constructor(){super({id:"editor.action.scrollDownHover",label:s.localize(3,null),alias:"Scroll Down Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:18,weight:100}})}run(N,P){const x=l.get(P);x&&x.scrollDown()}}class C extends L.EditorAction{constructor(){super({id:"editor.action.scrollLeftHover",label:s.localize(4,null),alias:"Scroll Left Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:15,weight:100}})}run(N,P){const x=l.get(P);x&&x.scrollLeft()}}class y extends L.EditorAction{constructor(){super({id:"editor.action.scrollRightHover",label:s.localize(5,null),alias:"Scroll Right Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:17,weight:100}})}run(N,P){const x=l.get(P);x&&x.scrollRight()}}class E extends L.EditorAction{constructor(){super({id:"editor.action.pageUpHover",label:s.localize(6,null),alias:"Page Up Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:11,secondary:[528],weight:100}})}run(N,P){const x=l.get(P);x&&x.pageUp()}}class I extends L.EditorAction{constructor(){super({id:"editor.action.pageDownHover",label:s.localize(7,null),alias:"Page Down Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:12,secondary:[530],weight:100}})}run(N,P){const x=l.get(P);x&&x.pageDown()}}class T extends L.EditorAction{constructor(){super({id:"editor.action.goToTopHover",label:s.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,P){const x=l.get(P);x&&x.goToTop()}}class O extends L.EditorAction{constructor(){super({id:"editor.action.goToBottomHover",label:s.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,P){const x=l.get(P);x&&x.goToBottom()}}class R extends L.EditorAction{constructor(){super({id:"editor.action.escapeFocusHover",label:s.localize(10,null),alias:"Escape Focus Hover",precondition:w.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:w.EditorContextKeys.hoverFocused,primary:9,weight:100}})}run(N,P){const x=l.get(P);x&&x.escape()}}(0,L.registerEditorContribution)(l.ID,l,2),(0,L.registerEditorAction)(u),(0,L.registerEditorAction)(v),(0,L.registerEditorAction)(f),(0,L.registerEditorAction)(p),(0,L.registerEditorAction)(C),(0,L.registerEditorAction)(y),(0,L.registerEditorAction)(E),(0,L.registerEditorAction)(I),(0,L.registerEditorAction)(T),(0,L.registerEditorAction)(O),(0,L.registerEditorAction)(R),d.HoverParticipantRegistry.register(h.MarkdownHoverParticipant),d.HoverParticipantRegistry.register(o.MarkerHoverParticipant),(0,r.registerThemingParticipant)((M,N)=>{const P=M.getColor(n.editorHoverBorder);P&&(N.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${P.transparent(.5)}; }`),N.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${P.transparent(.5)}; }`),N.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${P.transparent(.5)}; }`))})}),define(J[867],ee([1,0,2,15,5,349,350,358,95]),function(j,e,_,k,L,D,w,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class g extends _.Disposable{constructor(s){super(),this._editor=s,this._register(s.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(s){const t=s.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 n=new L.Range(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(n,1,0,!1)}}}e.ColorContribution=g,g.ID="editor.contrib.colorContribution",(0,k.registerEditorContribution)(g.ID,g,2),S.HoverParticipantRegistry.register(w.ColorHoverParticipant)}),define(J[359],ee([1,0,7,40,20,164,5,62,246,132,30,25,13,55,8,43]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;function d(o,c,a,l){var u;return we(this,void 0,void 0,function*(){const v=o.get(b.ITextModelService),f=o.get(i.IContextMenuService),p=o.get(s.ICommandService),C=o.get(n.IInstantiationService),y=o.get(r.INotificationService);if(yield l.item.resolve(L.CancellationToken.None),!l.part.location)return;const E=l.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 S.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,()=>we(this,void 0,void 0,function*(){const M=yield v.createModelReference(E.uri);try{const N=new S.SymbolNavigationAnchor(M.object.textEditorModel,w.Range.getStartPosition(E.range)),P=l.item.anchor.range;yield C.invokeFunction(R.runEditorCommand.bind(R),c,N,P)}finally{M.dispose()}})));if(l.part.command){const{command:R}=l.part;I.push(new k.Separator),I.push(new k.Action(R.id,R.title,void 0,!0,()=>we(this,void 0,void 0,function*(){var M;try{yield p.executeCommand(R.id,...(M=R.arguments)!==null&&M!==void 0?M:[])}catch(N){y.notify({severity:r.Severity.Error,source:l.item.provider.displayName,message:N})}})))}const O=c.getOption(123);f.showContextMenu({domForShadowRoot:O&&(u=c.getDomNode())!==null&&u!==void 0?u:void 0,getAnchor:()=>{const R=_.getDomNodePagePosition(a);return{x:R.left,y:R.top+R.height+8}},getActions:()=>I,onHide:()=>{c.focus()},autoSelectFirstItem:!0})})}e.showGoToContextMenu=d;function h(o,c,a,l){return we(this,void 0,void 0,function*(){const v=yield o.get(b.ITextModelService).createModelReference(l.uri);yield a.invokeWithinContext(f=>we(this,void 0,void 0,function*(){const p=c.hasSideBySideModifier,C=f.get(t.IContextKeyService),y=g.PeekContext.inPeekEditor.getValue(C),E=!p&&a.getOption(85)&&!y;return new S.DefinitionAction({openToSide:p,openInPeek:E,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(f,new S.SymbolNavigationAnchor(v.object.textEditorModel,w.Range.getStartPosition(l.range)),w.Range.lift(l.range))})),v.dispose()})}e.goToDefinitionWithLocation=h}),define(J[360],ee([1,0,7,16,14,20,11,2,60,18,21,156,116,41,65,5,27,46,38,70,19,62,179,313,359,25,49,8,43,33,23]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class O{constructor(){this._entries=new S.LRUCache(50)}get(B){const V=O._key(B);return this._entries.get(V)}set(B,V){const K=O._key(B);this._entries.set(K,V)}static _key(B){return`${B.uri.toString()}/${B.getVersionId()}`}}const R=(0,y.createDecorator)("IInlayHintsCache");(0,C.registerSingleton)(R,O,1);class M{constructor(B,V){this.item=B,this.index=V}get part(){const B=this.item.hint.label;return typeof B=="string"?{label:B}:B[this.index]}}e.RenderedInlayHintLabelPart=M;class N{constructor(B,V){this.part=B,this.hasTriggerModifier=V}}let P=e.InlayHintsController=class Si{static get(B){var V;return(V=B.getContribution(Si.ID))!==null&&V!==void 0?V:void 0}constructor(B,V,K,A,Y,ie,le){this._editor=B,this._languageFeaturesService=V,this._inlayHintsCache=A,this._commandService=Y,this._notificationService=ie,this._instaService=le,this._disposables=new b.DisposableStore,this._sessionDisposables=new b.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new s.DynamicCssRules(this._editor),this._activeRenderMode=0,this._debounceInfo=K.for(V.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(V.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(B.onDidChangeModel(()=>this._update())),this._disposables.add(B.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(B.onDidChangeConfiguration(ne=>{ne.hasChanged(136)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const B=this._editor.getOption(136);if(B.enabled==="off")return;const V=this._editor.getModel();if(!V||!this._languageFeaturesService.inlayHintsProvider.has(V))return;const K=this._inlayHintsCache.get(V);K&&this._updateHintsDecorators([V.getFullModelRange()],K),this._sessionDisposables.add((0,b.toDisposable)(()=>{V.isDisposed()||this._cacheHintsForFastRestore(V)}));let A;const Y=new Set,ie=new L.RunOnceScheduler(()=>we(this,void 0,void 0,function*(){const le=Date.now();A?.dispose(!0),A=new D.CancellationTokenSource;const ne=V.onWillDispose(()=>A?.cancel());try{const se=A.token,H=yield v.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,V,this._getHintsRanges(),se);if(ie.delay=this._debounceInfo.update(V,Date.now()-le),se.isCancellationRequested){H.dispose();return}for(const W of H.provider)typeof W.onDidChangeInlayHints=="function"&&!Y.has(W)&&(Y.add(W),this._sessionDisposables.add(W.onDidChangeInlayHints(()=>{ie.isScheduled()||ie.schedule()})));this._sessionDisposables.add(H),this._updateHintsDecorators(H.ranges,H.items),this._cacheHintsForFastRestore(V)}catch(se){(0,w.onUnexpectedError)(se)}finally{A.dispose(),ne.dispose()}}),this._debounceInfo.get(V));if(this._sessionDisposables.add(ie),this._sessionDisposables.add((0,b.toDisposable)(()=>A?.dispose(!0))),ie.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(le=>{(le.scrollTopChanged||!ie.isScheduled())&&ie.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(le=>{const ne=Math.max(ie.delay,1250);ie.schedule(ne)})),B.enabled==="on")this._activeRenderMode=0;else{let le,ne;B.enabled==="onUnlessPressed"?(le=0,ne=1):(le=1,ne=0),this._activeRenderMode=le,this._sessionDisposables.add(_.ModifierKeyEmitter.getInstance().event(se=>{if(!this._editor.hasModel())return;const H=se.altKey&&se.ctrlKey&&!(se.shiftKey||se.metaKey)?ne:le;if(H!==this._activeRenderMode){this._activeRenderMode=H;const W=this._editor.getModel(),$=this._copyInlayHintsWithCurrentAnchor(W);this._updateHintsDecorators([W.getFullModelRange()],$),ie.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>ie.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const B=new b.DisposableStore,V=B.add(new u.ClickLinkGesture(this._editor)),K=new b.DisposableStore;return B.add(K),B.add(V.onMouseMoveOrRelevantKeyDown(A=>{const[Y]=A,ie=this._getInlayHintLabelPart(Y),le=this._editor.getModel();if(!ie||!le){K.clear();return}const ne=new D.CancellationTokenSource;K.add((0,b.toDisposable)(()=>ne.dispose(!0))),ie.item.resolve(ne.token),this._activeInlayHintPart=ie.part.command||ie.part.location?new N(ie,Y.hasTriggerModifier):void 0;const se=le.validatePosition(ie.item.hint.position).lineNumber,H=new r.Range(se,1,se,le.getLineMaxColumn(se)),W=this._getInlineHintsForRange(H);this._updateHintsDecorators([H],W),K.add((0,b.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([H],W)}))})),B.add(V.onCancel(()=>K.clear())),B.add(V.onExecute(A=>we(this,void 0,void 0,function*(){const Y=this._getInlayHintLabelPart(A);if(Y){const ie=Y.part;ie.location?this._instaService.invokeFunction(f.goToDefinitionWithLocation,A,this._editor,ie.location):d.Command.is(ie.command)&&(yield this._invokeCommand(ie.command,Y.item))}}))),B}_getInlineHintsForRange(B){const V=new Set;for(const K of this._decorationsMetadata.values())B.containsRange(K.item.anchor.range)&&V.add(K.item);return Array.from(V)}_installDblClickGesture(B){return this._editor.onMouseUp(V=>we(this,void 0,void 0,function*(){if(V.event.detail!==2)return;const K=this._getInlayHintLabelPart(V);if(K&&(V.event.preventDefault(),yield K.item.resolve(D.CancellationToken.None),(0,k.isNonEmptyArray)(K.item.hint.textEdits))){const A=K.item.hint.textEdits.map(Y=>n.EditOperation.replace(r.Range.lift(Y.range),Y.text));this._editor.executeEdits("inlayHint.default",A),B()}}))}_installContextMenu(){return this._editor.onContextMenu(B=>we(this,void 0,void 0,function*(){if(!(B.event.target instanceof HTMLElement))return;const V=this._getInlayHintLabelPart(B);V&&(yield this._instaService.invokeFunction(f.showGoToContextMenu,this._editor,B.event.target,V))}))}_getInlayHintLabelPart(B){var V;if(B.target.type!==6)return;const K=(V=B.target.detail.injectedText)===null||V===void 0?void 0:V.options;if(K instanceof o.ModelDecorationInjectedTextOptions&&K?.attachedData instanceof M)return K.attachedData}_invokeCommand(B,V){var K;return we(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(B.id,...(K=B.arguments)!==null&&K!==void 0?K:[])}catch(A){this._notificationService.notify({severity:E.Severity.Error,source:V.provider.displayName,message:A})}})}_cacheHintsForFastRestore(B){const V=this._copyInlayHintsWithCurrentAnchor(B);this._inlayHintsCache.set(B,V)}_copyInlayHintsWithCurrentAnchor(B){const V=new Map;for(const[K,A]of this._decorationsMetadata){if(V.has(A.item))continue;const Y=B.getDecorationRange(K);if(Y){const ie=new v.InlayHintAnchor(Y,A.item.anchor.direction),le=A.item.with({anchor:ie});V.set(A.item,le)}}return Array.from(V.values())}_getHintsRanges(){const V=this._editor.getModel(),K=this._editor.getVisibleRangesPlusViewportAboveBelow(),A=[];for(const Y of K.sort(r.Range.compareRangesUsingStarts)){const ie=V.validateRange(new r.Range(Y.startLineNumber-30,Y.startColumn,Y.endLineNumber+30,Y.endColumn));A.length===0||!r.Range.areIntersectingOrTouching(A[A.length-1],ie)?A.push(ie):A[A.length-1]=r.Range.plusRange(A[A.length-1],ie)}return A}_updateHintsDecorators(B,V){var K,A;const Y=[],ie=(re,ce,he,de,ue)=>{const q={content:he,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:ce.className,cursorStops:de,attachedData:ue};Y.push({item:re,classNameRef:ce,decoration:{range:re.anchor.range,options:{description:"InlayHint",showIfCollapsed:re.anchor.range.isEmpty(),collapseOnReplaceEdit:!re.anchor.range.isEmpty(),stickiness:0,[re.anchor.direction]:this._activeRenderMode===0?q:void 0}}})},le=(re,ce)=>{const he=this._ruleFactory.createClassNameRef({width:`${ne/3|0}px`,display:"inline-block"});ie(re,he,"\\u200A",ce?h.InjectedTextCursorStops.Right:h.InjectedTextCursorStops.None)},{fontSize:ne,fontFamily:se,padding:H,isUniform:W}=this._getLayoutInfo(),$="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty($,se);for(const re of V){re.hint.paddingLeft&&le(re,!1);const ce=typeof re.hint.label=="string"?[{label:re.hint.label}]:re.hint.label;for(let he=0;he<ce.length;he++){const de=ce[he],ue=he===0,q=he===ce.length-1,z={fontSize:`${ne}px`,fontFamily:`var(${$}), ${i.EDITOR_FONT_DEFAULTS.fontFamily}`,verticalAlign:W?"baseline":"middle",unicodeBidi:"isolate"};(0,k.isNonEmptyArray)(re.hint.textEdits)&&(z.cursor="default"),this._fillInColors(z,re.hint),(de.command||de.location)&&((K=this._activeInlayHintPart)===null||K===void 0?void 0:K.part.item)===re&&this._activeInlayHintPart.part.index===he&&(z.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(z.color=(0,T.themeColorFromId)(I.editorActiveLinkForeground),z.cursor="pointer")),H&&(ue&&q?(z.padding=`1px ${Math.max(1,ne/4)|0}px`,z.borderRadius=`${ne/4|0}px`):ue?(z.padding=`1px 0 1px ${Math.max(1,ne/4)|0}px`,z.borderRadius=`${ne/4|0}px 0 0 ${ne/4|0}px`):q?(z.padding=`1px ${Math.max(1,ne/4)|0}px 1px 0`,z.borderRadius=`0 ${ne/4|0}px ${ne/4|0}px 0`):z.padding="1px 0 1px 0"),ie(re,this._ruleFactory.createClassNameRef(z),x(de.label),q&&!re.hint.paddingRight?h.InjectedTextCursorStops.Right:h.InjectedTextCursorStops.None,new M(re,he))}if(re.hint.paddingRight&&le(re,!0),Y.length>Si._MAX_DECORATORS)break}const Z=[];for(const re of B)for(const{id:ce}of(A=this._editor.getDecorationsInRange(re))!==null&&A!==void 0?A:[]){const he=this._decorationsMetadata.get(ce);he&&(Z.push(ce),he.classNameRef.dispose(),this._decorationsMetadata.delete(ce))}const Q=t.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(re=>{const ce=re.deltaDecorations(Z,Y.map(he=>he.decoration));for(let he=0;he<ce.length;he++){const de=Y[he];this._decorationsMetadata.set(ce[he],de)}}),Q.restore(this._editor)}_fillInColors(B,V){V.kind===d.InlayHintKind.Parameter?(B.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintParameterBackground),B.color=(0,T.themeColorFromId)(I.editorInlayHintParameterForeground)):V.kind===d.InlayHintKind.Type?(B.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintTypeBackground),B.color=(0,T.themeColorFromId)(I.editorInlayHintTypeForeground)):(B.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintBackground),B.color=(0,T.themeColorFromId)(I.editorInlayHintForeground))}_getLayoutInfo(){const B=this._editor.getOption(136),V=B.padding,K=this._editor.getOption(50),A=this._editor.getOption(47);let Y=B.fontSize;(!Y||Y<5||Y>K)&&(Y=K);const ie=B.fontFamily||A;return{fontSize:Y,fontFamily:ie,padding:V,isUniform:!V&&ie===A&&Y===K}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const B of this._decorationsMetadata.values())B.classNameRef.dispose();this._decorationsMetadata.clear()}};P.ID="editor.contrib.InlayHints",P._MAX_DECORATORS=1500,e.InlayHintsController=P=Te([ge(1,a.ILanguageFeaturesService),ge(2,c.ILanguageFeatureDebounceService),ge(3,R),ge(4,p.ICommandService),ge(5,E.INotificationService),ge(6,y.IInstantiationService)],P);function x(F){const B="\\xA0";return F.replace(/[ \\t]/g,B)}p.CommandsRegistry.registerCommand("_executeInlayHintProvider",(F,...B)=>we(void 0,void 0,void 0,function*(){const[V,K]=B;(0,g.assertType)(m.URI.isUri(V)),(0,g.assertType)(r.Range.isIRange(K));const{inlayHintsProvider:A}=F.get(a.ILanguageFeaturesService),Y=yield F.get(l.ITextModelService).createModelReference(V);try{const ie=yield v.InlayHintsFragments.create(A,Y.object.textEditorModel,[r.Range.lift(K)],D.CancellationToken.None),le=ie.items.map(ne=>ne.hint);return setTimeout(()=>ie.dispose(),0),le}finally{Y.dispose()}}))});var Lt=this&&this.__asyncValues||function(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=j[Symbol.asyncIterator],_;return e?e.call(j):(j=typeof __values=="function"?__values(j):j[Symbol.iterator](),_={},k("next"),k("throw"),k("return"),_[Symbol.asyncIterator]=function(){return this},_);function k(D){_[D]=j[D]&&function(w){return new Promise(function(b,S){w=j[D](w),L(b,S,w.done,w.value)})}}function L(D,w,b,S){Promise.resolve(S).then(function(g){D({value:g,done:b})},w)}};define(J[868],ee([1,0,14,61,12,38,95,39,62,340,240,360,28,52,19,649,17,313,16]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class c extends w.HoverForeignElementAnchor{constructor(u,v,f,p){super(10,v,u.item.anchor.range,f,p,!0),this.part=u}}let a=e.InlayHintsHover=class extends m.MarkdownHoverParticipant{constructor(u,v,f,p,C,y){super(u,v,f,p,y),this._resolverService=C,this.hoverOrdinal=6}suggestHoverAnchor(u){var v;if(!s.InlayHintsController.get(this._editor)||u.target.type!==6)return null;const p=(v=u.target.detail.injectedText)===null||v===void 0?void 0:v.options;return p instanceof D.ModelDecorationInjectedTextOptions&&p.attachedData instanceof s.RenderedInlayHintLabelPart?new c(p.attachedData,this,u.event.posx,u.event.posy):null}computeSync(){return[]}computeAsync(u,v,f){return u instanceof c?new _.AsyncIterableObject(p=>we(this,void 0,void 0,function*(){var C,y,E,I;const{part:T}=u;if(yield T.item.resolve(f),f.isCancellationRequested)return;let O;typeof T.item.hint.tooltip=="string"?O=new k.MarkdownString().appendText(T.item.hint.tooltip):T.item.hint.tooltip&&(O=T.item.hint.tooltip),O&&p.emitOne(new m.MarkdownHover(this,u.range,[O],!1,0)),(0,o.isNonEmptyArray)(T.item.hint.textEdits)&&p.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&&p.emitOne(new m.MarkdownHover(this,u.range,[R],!1,1)),T.part.location||T.part.command){let F;const V=this._editor.getOption(75)==="altKey"?d.isMacintosh?(0,r.localize)(1,null):(0,r.localize)(2,null):d.isMacintosh?(0,r.localize)(3,null):(0,r.localize)(4,null);T.part.location&&T.part.command?F=new k.MarkdownString().appendText((0,r.localize)(5,null,V)):T.part.location?F=new k.MarkdownString().appendText((0,r.localize)(6,null,V)):T.part.command&&(F=new k.MarkdownString(`[${(0,r.localize)(7,null)}](${(0,h.asCommandLink)(T.part.command)} "${T.part.command.title}") (${V})`,{isTrusted:!0})),F&&p.emitOne(new m.MarkdownHover(this,u.range,[F],!1,1e4))}const M=yield this._resolveInlayHintLabelPartHover(T,f);try{for(var N=!0,P=Lt(M),x;x=yield P.next(),C=x.done,!C;N=!0){I=x.value,N=!1;const F=I;p.emitOne(F)}}catch(F){y={error:F}}finally{try{!N&&!C&&(E=P.return)&&(yield E.call(P))}finally{if(y)throw y.error}}})):_.AsyncIterableObject.EMPTY}_resolveInlayHintLabelPartHover(u,v){return we(this,void 0,void 0,function*(){if(!u.part.location)return _.AsyncIterableObject.EMPTY;const{uri:f,range:p}=u.part.location,C=yield this._resolverService.createModelReference(f);try{const y=C.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(y)?(0,g.getHover)(this._languageFeaturesService.hoverProvider,y,new L.Position(p.startLineNumber,p.startColumn),v).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)):_.AsyncIterableObject.EMPTY}finally{C.dispose()}})}};e.InlayHintsHover=a=Te([ge(1,b.ILanguageService),ge(2,i.IOpenerService),ge(3,t.IConfigurationService),ge(4,S.ITextModelService),ge(5,n.ILanguageFeaturesService)],a)}),define(J[869],ee([1,0,15,95,360,868]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(L.InlayHintsController.ID,L.InlayHintsController,1),k.HoverParticipantRegistry.register(D.InlayHintsHover)}),define(J[361],ee([1,0,2,19,859,858,8,55,30,13,22,179,5,239,359,12,20,29,70,7,207]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollController=void 0;let l=e.StickyScrollController=class un extends _.Disposable{constructor(v,f,p,C,y,E,I){super(),this._editor=v,this._contextMenuService=f,this._languageFeaturesService=p,this._instaService=C,this._contextKeyService=I,this._sessionStore=new _.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 L.StickyScrollWidget(this._editor),this._stickyLineCandidateProvider=new D.StickyLineCandidateProvider(this._editor,p,y),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new L.StickyScrollWidgetState([],0),this._readConfiguration(),this._register(this._editor.onDidChangeConfiguration(O=>{O.hasChanged(111)&&this._readConfiguration()})),this._register(c.addDisposableListener(this._stickyScrollWidget.getDomNode(),c.EventType.CONTEXT_MENU,O=>we(this,void 0,void 0,function*(){this._onContextMenu(O)}))),this._stickyScrollFocusedContextKey=m.EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=m.EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);const T=this._register(c.trackFocus(this._stickyScrollWidget.getDomNode()));this._register(T.onDidBlur(O=>{const R=this._stickyScrollWidget.getDomNode().clientHeight;this._positionRevealed===!1&&R===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(T.onDidFocus(O=>{this.focus()})),this._register(this._createClickLinkGesture()),this._register(c.addDisposableListener(this._stickyScrollWidget.getDomNode(),c.EventType.MOUSE_DOWN,O=>{this._onMouseDown=!0}))}static get(v){return v.getContribution(un.ID)}_disposeFocusStickyScrollStore(){var v;this._stickyScrollFocusedContextKey.set(!1),(v=this._focusDisposableStore)===null||v===void 0||v.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 _.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(v){this._focusedStickyElementIndex=v?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyElements.item(this._focusedStickyElementIndex).focus()}goToFocused(){const v=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:v[this._focusedStickyElementIndex],column:1})}_revealPosition(v){this._positionRevealed=!0,this._editor.revealPosition(v),this._editor.setSelection(t.Range.fromPositions(v)),this._editor.focus()}_createClickLinkGesture(){const v=new _.DisposableStore,f=new _.DisposableStore;v.add(f);const p=new s.ClickLinkGesture(this._editor,!0);return v.add(p),v.add(p.onMouseMoveOrRelevantKeyDown(([C,y])=>{if(!this._editor.hasModel()||!C.hasTriggerModifier){f.clear();return}const E=C.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,O=this._stickyScrollWidget.hoverOnColumn,R=new t.Range(T,O,T,O+I.length);if(!R.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=R,f.clear();else if(E.element.style.textDecoration==="underline")return;const M=new d.CancellationTokenSource;f.add((0,_.toDisposable)(()=>M.dispose(!0)));let N;(0,i.getDefinitionsAtPosition)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new r.Position(T,O+1),M.token).then(P=>{if(!M.token.isCancellationRequested)if(P.length!==0){this._candidateDefinitionsLength=P.length;const x=E.element;N!==x?(f.clear(),N=x,N.style.textDecoration="underline",f.add((0,_.toDisposable)(()=>{N.style.textDecoration="none"}))):N||(N=x,N.style.textDecoration="underline",f.add((0,_.toDisposable)(()=>{N.style.textDecoration="none"})))}else f.clear()})}else f.clear()})),v.add(p.onCancel(()=>{f.clear()})),v.add(p.onExecute(C=>we(this,void 0,void 0,function*(){C.target.detail===this._stickyScrollWidget.getId()&&(C.hasTriggerModifier?(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:1})),this._instaService.invokeFunction(n.goToDefinitionWithLocation,C,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})):C.isRightClick||(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:this._stickyScrollWidget.hoverOnColumn})))}))),v}_onContextMenu(v){this._contextMenuService.showContextMenu({menuId:S.MenuId.StickyScrollContext,getAnchor:()=>v})}_readConfiguration(){const v=this._editor.getOption(111);if(v.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else v.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(p=>this._onTokensChange(p))),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(v){const f=this._stickyScrollWidget.getCurrentLines();for(const p of f)for(const C of v.ranges)if(p>=C.fromLineNumber&&p<=C.toLineNumber)return!0;return!1}_onTokensChange(v){this._needsUpdate(v)&&this._renderStickyScroll()}_onDidResize(){const v=this._editor.getLayoutInfo(),f=v.width-v.minimap.minimapCanvasOuterWidth-v.verticalScrollbarWidth;this._stickyScrollWidget.getDomNode().style.width=`${f}px`;const p=v.height/this._editor.getOption(64);this._maxStickyLines=Math.round(p*.25)}_renderStickyScroll(){if(!this._editor.hasModel())return;const v=this._editor.getModel(),f=this._stickyLineCandidateProvider.getVersionId();if(f===void 0||f===v.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 p=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyElements.length===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(p)||(this._focusedStickyElementIndex=this._stickyElements.length-1),this._stickyElements.item(this._focusedStickyElementIndex).focus())}}findScrollWidgetState(){const v=this._editor.getOption(64),f=Math.min(this._maxStickyLines,this._editor.getOption(111).maxLineCount),p=this._editor.getScrollTop();let C=0;const y=[],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 O of T){const R=O.startLineNumber,M=O.endLineNumber,N=O.nestingDepth;if(M-R>0){const P=(N-1)*v,x=N*v,F=this._editor.getBottomForLineNumber(R)-p,B=this._editor.getTopForLineNumber(M)-p,V=this._editor.getBottomForLineNumber(M)-p;if(P>B&&P<=V){y.push(R),C=V-x;break}else x>F&&x<=V&&y.push(R);if(y.length===f)break}}}return new L.StickyScrollWidgetState(y,C)}dispose(){super.dispose(),this._sessionStore.dispose()}};l.ID="store.contrib.stickyScrollController",e.StickyScrollController=l=Te([ge(1,b.IContextMenuService),ge(2,k.ILanguageFeaturesService),ge(3,w.IInstantiationService),ge(4,h.ILanguageConfigurationService),ge(5,o.ILanguageFeatureDebounceService),ge(6,g.IContextKeyService)],l)}),define(J[870],ee([1,0,15,671,712,30,28,13,22,361]),function(j,e,_,k,L,D,w,b,S,g){"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:L.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 we(this,void 0,void 0,function*(){const c=o.get(w.IConfigurationService),a=!c.getValue("editor.stickyScroll.enabled");return c.updateValue("editor.stickyScroll.enabled",a)})}}e.ToggleStickyScroll=m;const s=100;class t extends _.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"),S.EditorContextKeys.stickyScrollVisible),menu:[{id:D.MenuId.CommandPalette}]})}runEditorCommand(o,c){var a;(a=g.StickyScrollController.get(c))===null||a===void 0||a.focus()}}e.FocusStickyScroll=t;class i extends _.EditorAction2{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:(0,k.localize)(6,null),original:"Select next sticky scroll line"},precondition:S.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:s,primary:18}})}runEditorCommand(o,c){var a;(a=g.StickyScrollController.get(c))===null||a===void 0||a.focusNext()}}e.SelectNextStickyScrollLine=i;class n extends _.EditorAction2{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:(0,k.localize)(7,null),original:"Select previous sticky scroll line"},precondition:S.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:s,primary:16}})}runEditorCommand(o,c){var a;(a=g.StickyScrollController.get(c))===null||a===void 0||a.focusPrevious()}}e.SelectPreviousStickyScrollLine=n;class r extends _.EditorAction2{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:(0,k.localize)(8,null),original:"Go to focused sticky scroll line"},precondition:S.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:s,primary:3}})}runEditorCommand(o,c){var a;(a=g.StickyScrollController.get(c))===null||a===void 0||a.goToFocused()}}e.GoToStickyScrollLine=r;class d extends _.EditorAction2{constructor(){super({id:"editor.action.selectEditor",title:{value:(0,k.localize)(9,null),original:"Select Editor"},precondition:S.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:s,primary:9}})}runEditorCommand(o,c){var a;(a=g.StickyScrollController.get(c))===null||a===void 0||a.selectEditor()}}e.SelectEditor=d}),define(J[871],ee([1,0,15,870,361,30]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(L.StickyScrollController.ID,L.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[872],ee([1,0,15,32,356,28,13,8,43,85]),function(j,e,_,k,L,D,w,b,S,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let m=e.StandaloneReferencesController=class extends L.ReferencesController{constructor(t,i,n,r,d,h,o){super(!0,t,i,n,r,d,h,o)}};e.StandaloneReferencesController=m=Te([ge(1,w.IContextKeyService),ge(2,k.ICodeEditorService),ge(3,S.INotificationService),ge(4,b.IInstantiationService),ge(5,g.IStorageService),ge(6,D.IConfigurationService)],m),(0,_.registerEditorContribution)(L.ReferencesController.ID,m,4)}),define(J[873],ee([1,0,11,2,51,104,709,154,49,43,187]),function(j,e,_,k,L,D,w,b,S,g,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const s=!1;function t(v){return v.scheme===L.Schemas.file?v.fsPath:v.path}let i=0;class n{constructor(f,p,C,y,E,I,T){this.id=++i,this.type=0,this.actual=f,this.label=f.label,this.confirmBeforeUndo=f.confirmBeforeUndo||!1,this.resourceLabel=p,this.strResource=C,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=y,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,p){this.resourceLabel=f,this.reason=p}}class d{constructor(){this.elements=new Map}createMessage(){const f=[],p=[];for(const[,y]of this.elements)(y.reason===0?f:p).push(y.resourceLabel);const C=[];return f.length>0&&C.push(w.localize(0,null,f.join(", "))),p.length>0&&C.push(w.localize(1,null,p.join(", "))),C.join(`\n`)}get size(){return this.elements.size}has(f){return this.elements.has(f)}set(f,p){this.elements.set(f,p)}delete(f){return this.elements.delete(f)}}class h{constructor(f,p,C,y,E,I,T){this.id=++i,this.type=1,this.actual=f,this.label=f.label,this.confirmBeforeUndo=f.confirmBeforeUndo||!1,this.resourceLabels=p,this.strResources=C,this.groupId=y,this.groupOrder=E,this.sourceId=I,this.sourceOrder=T,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(f,p,C){this.removedResources||(this.removedResources=new d),this.removedResources.has(p)||this.removedResources.set(p,new r(f,C))}setValid(f,p,C){C?this.invalidatedResources&&(this.invalidatedResources.delete(p),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new d),this.invalidatedResources.has(p)||this.invalidatedResources.set(p,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,p){this.resourceLabel=f,this.strResource=p,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 p=0;p<this._past.length;p++)f.push(` * [UNDO] ${this._past[p]}`);for(let p=this._future.length-1;p>=0;p--)f.push(` * [REDO] ${this._future[p]}`);return f.join(`\n`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(f,p){f.type===1?f.setValid(this.resourceLabel,this.strResource,p):f.setValid(p)}setElementsValidFlag(f,p){for(const C of this._past)p(C.actual)&&this._setElementValidFlag(C,f);for(const C of this._future)p(C.actual)&&this._setElementValidFlag(C,f)}pushElement(f){for(const p of this._future)p.type===1&&p.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(f),this.versionId++}createSnapshot(f){const p=[];for(let C=0,y=this._past.length;C<y;C++)p.push(this._past[C].id);for(let C=this._future.length-1;C>=0;C--)p.push(this._future[C].id);return new m.ResourceEditStackSnapshot(f,p)}restoreSnapshot(f){const p=f.elements.length;let C=!0,y=0,E=-1;for(let T=0,O=this._past.length;T<O;T++,y++){const R=this._past[T];C&&(y>=p||R.id!==f.elements[y])&&(C=!1,E=0),!C&&R.type===1&&R.removeResource(this.resourceLabel,this.strResource,0)}let I=-1;for(let T=this._future.length-1;T>=0;T--,y++){const O=this._future[T];C&&(y>=p||O.id!==f.elements[y])&&(C=!1,I=T),!C&&O.type===1&&O.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=[],p=[];for(const C of this._past)f.push(C.actual);for(const C of this._future)p.push(C.actual);return{past:f,future:p}}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,p){for(let C=this._past.length-1;C>=0;C--)if(this._past[C]===f){p.has(this.strResource)?this._past[C]=p.get(this.strResource):this._past.splice(C,1);break}this.versionId++}splitFutureWorkspaceElement(f,p){for(let C=this._future.length-1;C>=0;C--)if(this._future[C]===f){p.has(this.strResource)?this._future[C]=p.get(this.strResource):this._future.splice(C,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 c{constructor(f){this.editStacks=f,this._versionIds=[];for(let p=0,C=this.editStacks.length;p<C;p++)this._versionIds[p]=this.editStacks[p].versionId}isValid(){for(let f=0,p=this.editStacks.length;f<p;f++)if(this._versionIds[f]!==this.editStacks[f].versionId)return!1;return!0}}const a=new o("","");a.locked=!0;let l=e.UndoRedoService=class{constructor(f,p){this._dialogService=f,this._notificationService=p,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(f){for(const p of this._uriComparisonKeyComputers)if(p[0]===f.scheme)return p[1].getComparisonKey(f);return f.toString()}_print(f){console.log("------------------------------------"),console.log(`AFTER ${f}: `);const p=[];for(const C of this._editStacks)p.push(C[1].toString());console.log(p.join(`\n`))}pushElement(f,p=m.UndoRedoGroup.None,C=m.UndoRedoSource.None){if(f.type===0){const y=t(f.resource),E=this.getUriComparisonKey(f.resource);this._pushElement(new n(f,y,E,p.id,p.nextOrder(),C.id,C.nextOrder()))}else{const y=new Set,E=[],I=[];for(const T of f.resources){const O=t(T),R=this.getUriComparisonKey(T);y.has(R)||(y.add(R),E.push(O),I.push(R))}E.length===1?this._pushElement(new n(f,E[0],I[0],p.id,p.nextOrder(),C.id,C.nextOrder())):this._pushElement(new h(f,E,I,p.id,p.nextOrder(),C.id,C.nextOrder()))}s&&this._print("pushElement")}_pushElement(f){for(let p=0,C=f.strResources.length;p<C;p++){const y=f.resourceLabels[p],E=f.strResources[p];let I;this._editStacks.has(E)?I=this._editStacks.get(E):(I=new o(y,E),this._editStacks.set(E,I)),I.pushElement(f)}}getLastElement(f){const p=this.getUriComparisonKey(f);if(this._editStacks.has(p)){const C=this._editStacks.get(p);if(C.hasFutureElements())return null;const y=C.getClosestPastElement();return y?y.actual:null}return null}_splitPastWorkspaceElement(f,p){const C=f.actual.split(),y=new Map;for(const E of C){const I=t(E.resource),T=this.getUriComparisonKey(E.resource),O=new n(E,I,T,0,0,0,0);y.set(O.strResource,O)}for(const E of f.strResources){if(p&&p.has(E))continue;this._editStacks.get(E).splitPastWorkspaceElement(f,y)}}_splitFutureWorkspaceElement(f,p){const C=f.actual.split(),y=new Map;for(const E of C){const I=t(E.resource),T=this.getUriComparisonKey(E.resource),O=new n(E,I,T,0,0,0,0);y.set(O.strResource,O)}for(const E of f.strResources){if(p&&p.has(E))continue;this._editStacks.get(E).splitFutureWorkspaceElement(f,y)}}removeElements(f){const p=typeof f=="string"?f:this.getUriComparisonKey(f);this._editStacks.has(p)&&(this._editStacks.get(p).dispose(),this._editStacks.delete(p)),s&&this._print("removeElements")}setElementsValidFlag(f,p,C){const y=this.getUriComparisonKey(f);this._editStacks.has(y)&&this._editStacks.get(y).setElementsValidFlag(p,C),s&&this._print("setElementsValidFlag")}createSnapshot(f){const p=this.getUriComparisonKey(f);return this._editStacks.has(p)?this._editStacks.get(p).createSnapshot(f):new m.ResourceEditStackSnapshot(f,[])}restoreSnapshot(f){const p=this.getUriComparisonKey(f.resource);if(this._editStacks.has(p)){const C=this._editStacks.get(p);C.restoreSnapshot(f),!C.hasPastElements()&&!C.hasFutureElements()&&(C.dispose(),this._editStacks.delete(p))}s&&this._print("restoreSnapshot")}getElements(f){const p=this.getUriComparisonKey(f);return this._editStacks.has(p)?this._editStacks.get(p).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(f){if(!f)return[null,null];let p=null,C=null;for(const[y,E]of this._editStacks){const I=E.getClosestPastElement();I&&I.sourceId===f&&(!p||I.sourceOrder>p.sourceOrder)&&(p=I,C=y)}return[p,C]}canUndo(f){if(f instanceof m.UndoRedoSource){const[,C]=this._findClosestUndoElementWithSource(f.id);return!!C}const p=this.getUriComparisonKey(f);return this._editStacks.has(p)?this._editStacks.get(p).hasPastElements():!1}_onError(f,p){(0,_.onUnexpectedError)(f);for(const C of p.strResources)this.removeElements(C);this._notificationService.error(f)}_acquireLocks(f){for(const p of f.editStacks)if(p.locked)throw new Error("Cannot acquire edit stack lock");for(const p of f.editStacks)p.locked=!0;return()=>{for(const p of f.editStacks)p.locked=!1}}_safeInvokeWithLocks(f,p,C,y,E){const I=this._acquireLocks(C);let T;try{T=p()}catch(O){return I(),y.dispose(),this._onError(O,f)}return T?T.then(()=>(I(),y.dispose(),E()),O=>(I(),y.dispose(),this._onError(O,f))):(I(),y.dispose(),E())}_invokeWorkspacePrepare(f){return we(this,void 0,void 0,function*(){if(typeof f.actual.prepareUndoRedo>"u")return k.Disposable.None;const p=f.actual.prepareUndoRedo();return typeof p>"u"?k.Disposable.None:p})}_invokeResourcePrepare(f,p){if(f.actual.type!==1||typeof f.actual.prepareUndoRedo>"u")return p(k.Disposable.None);const C=f.actual.prepareUndoRedo();return C?(0,k.isDisposable)(C)?p(C):C.then(y=>p(y)):p(k.Disposable.None)}_getAffectedEditStacks(f){const p=[];for(const C of f.strResources)p.push(this._editStacks.get(C)||a);return new c(p)}_tryToSplitAndUndo(f,p,C,y){if(p.canSplit())return this._splitPastWorkspaceElement(p,C),this._notificationService.warn(y),new u(this._undo(f,0,!0));for(const E of p.strResources)this.removeElements(E);return this._notificationService.warn(y),new u}_checkWorkspaceUndo(f,p,C,y){if(p.removedResources)return this._tryToSplitAndUndo(f,p,p.removedResources,w.localize(2,null,p.label,p.removedResources.createMessage()));if(y&&p.invalidatedResources)return this._tryToSplitAndUndo(f,p,p.invalidatedResources,w.localize(3,null,p.label,p.invalidatedResources.createMessage()));const E=[];for(const T of C.editStacks)T.getClosestPastElement()!==p&&E.push(T.resourceLabel);if(E.length>0)return this._tryToSplitAndUndo(f,p,null,w.localize(4,null,p.label,E.join(", ")));const I=[];for(const T of C.editStacks)T.locked&&I.push(T.resourceLabel);return I.length>0?this._tryToSplitAndUndo(f,p,null,w.localize(5,null,p.label,I.join(", "))):C.isValid()?null:this._tryToSplitAndUndo(f,p,null,w.localize(6,null,p.label))}_workspaceUndo(f,p,C){const y=this._getAffectedEditStacks(p),E=this._checkWorkspaceUndo(f,p,y,!1);return E?E.returnValue:this._confirmAndExecuteWorkspaceUndo(f,p,y,C)}_isPartOfUndoGroup(f){if(!f.groupId)return!1;for(const[,p]of this._editStacks){const C=p.getClosestPastElement();if(C){if(C===f){const y=p.getSecondClosestPastElement();if(y&&y.groupId===f.groupId)return!0}if(C.groupId===f.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(f,p,C,y){return we(this,void 0,void 0,function*(){if(p.canSplit()&&!this._isPartOfUndoGroup(p)){let T;(function(M){M[M.All=0]="All",M[M.This=1]="This",M[M.Cancel=2]="Cancel"})(T||(T={}));const{result:O}=yield this._dialogService.prompt({type:D.default.Info,message:w.localize(7,null,p.label),buttons:[{label:w.localize(8,null,C.editStacks.length),run:()=>T.All},{label:w.localize(9,null),run:()=>T.This}],cancelButton:{run:()=>T.Cancel}});if(O===T.Cancel)return;if(O===T.This)return this._splitPastWorkspaceElement(p,null),this._undo(f,0,!0);const R=this._checkWorkspaceUndo(f,p,C,!1);if(R)return R.returnValue;y=!0}let E;try{E=yield this._invokeWorkspacePrepare(p)}catch(T){return this._onError(T,p)}const I=this._checkWorkspaceUndo(f,p,C,!0);if(I)return E.dispose(),I.returnValue;for(const T of C.editStacks)T.moveBackward(p);return this._safeInvokeWithLocks(p,()=>p.actual.undo(),C,E,()=>this._continueUndoInGroup(p.groupId,y))})}_resourceUndo(f,p,C){if(!p.isValid){f.flushAllElements();return}if(f.locked){const y=w.localize(10,null,p.label);this._notificationService.warn(y);return}return this._invokeResourcePrepare(p,y=>(f.moveBackward(p),this._safeInvokeWithLocks(p,()=>p.actual.undo(),new c([f]),y,()=>this._continueUndoInGroup(p.groupId,C))))}_findClosestUndoElementInGroup(f){if(!f)return[null,null];let p=null,C=null;for(const[y,E]of this._editStacks){const I=E.getClosestPastElement();I&&I.groupId===f&&(!p||I.groupOrder>p.groupOrder)&&(p=I,C=y)}return[p,C]}_continueUndoInGroup(f,p){if(!f)return;const[,C]=this._findClosestUndoElementInGroup(f);if(C)return this._undo(C,0,p)}undo(f){if(f instanceof m.UndoRedoSource){const[,p]=this._findClosestUndoElementWithSource(f.id);return p?this._undo(p,f.id,!1):void 0}return typeof f=="string"?this._undo(f,0,!1):this._undo(this.getUriComparisonKey(f),0,!1)}_undo(f,p=0,C){if(!this._editStacks.has(f))return;const y=this._editStacks.get(f),E=y.getClosestPastElement();if(!E)return;if(E.groupId){const[T,O]=this._findClosestUndoElementInGroup(E.groupId);if(E!==T&&O)return this._undo(O,p,C)}if((E.sourceId!==p||E.confirmBeforeUndo)&&!C)return this._confirmAndContinueUndo(f,p,E);try{return E.type===1?this._workspaceUndo(f,E,C):this._resourceUndo(y,E,C)}finally{s&&this._print("undo")}}_confirmAndContinueUndo(f,p,C){return we(this,void 0,void 0,function*(){if((yield this._dialogService.confirm({message:w.localize(11,null,C.label),primaryButton:w.localize(12,null),cancelButton:w.localize(13,null)})).confirmed)return this._undo(f,p,!0)})}_findClosestRedoElementWithSource(f){if(!f)return[null,null];let p=null,C=null;for(const[y,E]of this._editStacks){const I=E.getClosestFutureElement();I&&I.sourceId===f&&(!p||I.sourceOrder<p.sourceOrder)&&(p=I,C=y)}return[p,C]}canRedo(f){if(f instanceof m.UndoRedoSource){const[,C]=this._findClosestRedoElementWithSource(f.id);return!!C}const p=this.getUriComparisonKey(f);return this._editStacks.has(p)?this._editStacks.get(p).hasFutureElements():!1}_tryToSplitAndRedo(f,p,C,y){if(p.canSplit())return this._splitFutureWorkspaceElement(p,C),this._notificationService.warn(y),new u(this._redo(f));for(const E of p.strResources)this.removeElements(E);return this._notificationService.warn(y),new u}_checkWorkspaceRedo(f,p,C,y){if(p.removedResources)return this._tryToSplitAndRedo(f,p,p.removedResources,w.localize(14,null,p.label,p.removedResources.createMessage()));if(y&&p.invalidatedResources)return this._tryToSplitAndRedo(f,p,p.invalidatedResources,w.localize(15,null,p.label,p.invalidatedResources.createMessage()));const E=[];for(const T of C.editStacks)T.getClosestFutureElement()!==p&&E.push(T.resourceLabel);if(E.length>0)return this._tryToSplitAndRedo(f,p,null,w.localize(16,null,p.label,E.join(", ")));const I=[];for(const T of C.editStacks)T.locked&&I.push(T.resourceLabel);return I.length>0?this._tryToSplitAndRedo(f,p,null,w.localize(17,null,p.label,I.join(", "))):C.isValid()?null:this._tryToSplitAndRedo(f,p,null,w.localize(18,null,p.label))}_workspaceRedo(f,p){const C=this._getAffectedEditStacks(p),y=this._checkWorkspaceRedo(f,p,C,!1);return y?y.returnValue:this._executeWorkspaceRedo(f,p,C)}_executeWorkspaceRedo(f,p,C){return we(this,void 0,void 0,function*(){let y;try{y=yield this._invokeWorkspacePrepare(p)}catch(I){return this._onError(I,p)}const E=this._checkWorkspaceRedo(f,p,C,!0);if(E)return y.dispose(),E.returnValue;for(const I of C.editStacks)I.moveForward(p);return this._safeInvokeWithLocks(p,()=>p.actual.redo(),C,y,()=>this._continueRedoInGroup(p.groupId))})}_resourceRedo(f,p){if(!p.isValid){f.flushAllElements();return}if(f.locked){const C=w.localize(19,null,p.label);this._notificationService.warn(C);return}return this._invokeResourcePrepare(p,C=>(f.moveForward(p),this._safeInvokeWithLocks(p,()=>p.actual.redo(),new c([f]),C,()=>this._continueRedoInGroup(p.groupId))))}_findClosestRedoElementInGroup(f){if(!f)return[null,null];let p=null,C=null;for(const[y,E]of this._editStacks){const I=E.getClosestFutureElement();I&&I.groupId===f&&(!p||I.groupOrder<p.groupOrder)&&(p=I,C=y)}return[p,C]}_continueRedoInGroup(f){if(!f)return;const[,p]=this._findClosestRedoElementInGroup(f);if(p)return this._redo(p)}redo(f){if(f instanceof m.UndoRedoSource){const[,p]=this._findClosestRedoElementWithSource(f.id);return p?this._redo(p):void 0}return typeof f=="string"?this._redo(f):this._redo(this.getUriComparisonKey(f))}_redo(f){if(!this._editStacks.has(f))return;const p=this._editStacks.get(f),C=p.getClosestFutureElement();if(C){if(C.groupId){const[y,E]=this._findClosestRedoElementInGroup(C.groupId);if(C!==y&&E)return this._redo(E)}try{return C.type===1?this._workspaceRedo(f,C):this._resourceRedo(p,C)}finally{s&&this._print("redo")}}}};e.UndoRedoService=l=Te([ge(0,b.IDialogService),ge(1,g.INotificationService)],l);class u{constructor(f){this.returnValue=f}}(0,S.registerSingleton)(m.IUndoRedoService,l,1)}),define(J[159],ee([1,0,710,90,192,21,8]),function(j,e,_,k,L,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(n){const r=n;return typeof r?.id=="string"&&D.URI.isUri(r.uri)}e.isSingleFolderWorkspaceIdentifier=b;function S(n){const r=n;return typeof r?.id=="string"&&!b(n)&&!m(n)}e.isEmptyWorkspaceIdentifier=S,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"},e.UNKNOWN_EMPTY_WINDOW_WORKSPACE={id:"empty-window"};function g(n,r){if(typeof n=="string"||typeof n>"u")return typeof n=="string"?{id:(0,k.basename)(n)}:r?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:e.UNKNOWN_EMPTY_WINDOW_WORKSPACE;const d=n;return d.configuration?{id:d.id,configPath:d.configuration}:d.folders.length===1?{id:d.id,uri:d.folders[0].uri}:{id:d.id}}e.toWorkspaceIdentifier=g;function m(n){const r=n;return typeof r?.id=="string"&&D.URI.isUri(r.configPath)}e.isWorkspaceIdentifier=m;class s{constructor(r,d,h,o,c){this._id=r,this._transient=h,this._configuration=o,this._ignorePathCasing=c,this._foldersMap=L.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=d}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=L.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=s;class t{constructor(r,d){this.raw=d,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,_.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.STANDALONE_EDITOR_WORKSPACE_ID="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function i(n){return n.id===e.STANDALONE_EDITOR_WORKSPACE_ID}e.isStandaloneEditorWorkspace=i}),define(J[874],ee([1,0,7,150,40,2,17,15,22,621,30,13,55,34,28,159]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let d=e.ContextMenuController=class hn{static get(c){return c.getContribution(hn.ID)}constructor(c,a,l,u,v,f,p,C){this._contextMenuService=a,this._contextViewService=l,this._contextKeyService=u,this._keybindingService=v,this._menuService=f,this._configurationService=p,this._workspaceContextService=C,this._toDispose=new D.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=c,this._toDispose.add(this._editor.onContextMenu(y=>this._onContextMenu(y))),this._toDispose.add(this._editor.onMouseWheel(y=>{if(this._contextMenuIsBeingShownCount>0){const E=this._contextViewService.getContextViewElement(),I=y.srcElement;I.shadowRoot&&_.getShadowRoot(E)===I.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(y=>{this._editor.getOption(22)&&y.keyCode===58&&(y.preventDefault(),y.stopPropagation(),this.showContextMenu())}))}_onContextMenu(c){if(!this._editor.hasModel())return;if(!this._editor.getOption(22)){this._editor.focus(),c.target.position&&!this._editor.getSelection().containsPosition(c.target.position)&&this._editor.setPosition(c.target.position);return}if(c.target.type===12||c.target.type===6&&c.target.detail.injectedText)return;if(c.event.preventDefault(),c.event.stopPropagation(),c.target.type===11)return this._showScrollbarContextMenu({x:c.event.posx-1,width:2,y:c.event.posy-1,height:2});if(c.target.type!==6&&c.target.type!==7&&c.target.type!==1)return;if(this._editor.focus(),c.target.position){let l=!1;for(const u of this._editor.getSelections())if(u.containsPosition(c.target.position)){l=!0;break}l||this._editor.setPosition(c.target.position)}let a=null;c.target.type!==1&&(a={x:c.event.posx-1,width:2,y:c.event.posy-1,height:2}),this.showContextMenu(a)}showContextMenu(c){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,c)}_getMenuActions(c,a){const l=[],u=this._menuService.createMenu(a,this._contextKeyService),v=u.getActions({arg:c.uri});u.dispose();for(const f of v){const[,p]=f;let C=0;for(const y of p)if(y instanceof m.SubmenuItemAction){const E=this._getMenuActions(c,y.item.submenu);E.length>0&&(l.push(new L.SubmenuAction(y.id,y.label,E)),C++)}else l.push(y),C++;C&&l.push(new L.Separator)}return l.length&&l.pop(),l}_doShowContextMenu(c,a=null){if(!this._editor.hasModel())return;const l=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!a){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const v=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),f=_.getDomNodePagePosition(this._editor.getDomNode()),p=f.left+v.left,C=f.top+v.top+v.height;a={x:p,y:C}}const u=this._editor.getOption(123)&&!w.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:u?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>c,getActionViewItem:v=>{const f=this._keybindingFor(v);if(f)return new k.ActionViewItem(v,v,{label:!0,keybinding:f.getLabel(),isMenu:!0});const p=v;return typeof p.getActionViewItem=="function"?p.getActionViewItem():new k.ActionViewItem(v,v,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:v=>this._keybindingFor(v),onHide:v=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:l})}})}_showScrollbarContextMenu(c){if(!this._editor.hasModel()||(0,r.isStandaloneEditorWorkspace)(this._workspaceContextService.getWorkspace()))return;const a=this._editor.getOption(70);let l=0;const u=y=>({id:`menu-action-${++l}`,label:y.label,tooltip:"",class:void 0,enabled:typeof y.enabled>"u"?!0:y.enabled,checked:y.checked,run:y.run}),v=(y,E)=>new L.SubmenuAction(`menu-action-${++l}`,y,E,void 0),f=(y,E,I,T,O)=>{if(!E)return u({label:y,enabled:E,run:()=>{}});const R=N=>()=>{this._configurationService.updateValue(I,N)},M=[];for(const N of O)M.push(u({label:N.label,checked:T===N.value,run:R(N.value)}));return v(y,M)},p=[];p.push(u({label:g.localize(0,null),checked:a.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!a.enabled)}})),p.push(new L.Separator),p.push(u({label:g.localize(1,null),enabled:a.enabled,checked:a.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!a.renderCharacters)}})),p.push(f(g.localize(2,null),a.enabled,"editor.minimap.size",a.size,[{label:g.localize(3,null),value:"proportional"},{label:g.localize(4,null),value:"fill"},{label:g.localize(5,null),value:"fit"}])),p.push(f(g.localize(6,null),a.enabled,"editor.minimap.showSlider",a.showSlider,[{label:g.localize(7,null),value:"mouseover"},{label:g.localize(8,null),value:"always"}]));const C=this._editor.getOption(123)&&!w.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:C?this._editor.getDomNode():void 0,getAnchor:()=>c,getActions:()=>p,onHide:y=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(c){return this._keybindingService.lookupKeybinding(c.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};d.ID="editor.contrib.contextmenu",e.ContextMenuController=d=Te([ge(1,t.IContextMenuService),ge(2,t.IContextViewService),ge(3,s.IContextKeyService),ge(4,i.IKeybindingService),ge(5,m.IMenuService),ge(6,n.IConfigurationService),ge(7,r.IWorkspaceContextService)],d);class h extends b.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:g.localize(9,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(c,a){var l;(l=d.get(a))===null||l===void 0||l.showContextMenu()}}(0,b.registerEditorContribution)(d.ID,d,2),(0,b.registerEditorAction)(h)}),define(J[362],ee([1,0,16,165,2,103,51,42,21,19,625,159]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultPasteProvidersFeature=e.DefaultDropProvidersFeature=void 0;const t=(0,m.localize)(0,null);class i{provideDocumentPasteEdits(l,u,v,f){return we(this,void 0,void 0,function*(){const p=yield this.getEdit(v,f);return p?{id:this.id,insertText:p.insertText,label:p.label,detail:p.detail,priority:p.priority}:void 0})}provideDocumentOnDropEdits(l,u,v,f){return we(this,void 0,void 0,function*(){const p=yield this.getEdit(v,f);return p?{id:this.id,insertText:p.insertText,label:p.label,priority:p.priority}:void 0})}}class n extends i{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[D.Mimes.text],this.pasteMimeTypes=[D.Mimes.text]}getEdit(l,u){return we(this,void 0,void 0,function*(){const v=l.get(D.Mimes.text);if(!v||l.has(D.Mimes.uriList))return;const f=yield v.asString();return{id:this.id,priority:0,label:(0,m.localize)(1,null),detail:t,insertText:f}})}}class r extends i{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[D.Mimes.uriList],this.pasteMimeTypes=[D.Mimes.uriList]}getEdit(l,u){return we(this,void 0,void 0,function*(){const v=yield h(l);if(!v.length||u.isCancellationRequested)return;let f=0;const p=v.map(({uri:y,originalText:E})=>y.scheme===w.Schemas.file?y.fsPath:(f++,E)).join(" ");let C;return f>0?C=v.length>1?(0,m.localize)(2,null):(0,m.localize)(3,null):C=v.length>1?(0,m.localize)(4,null):(0,m.localize)(5,null),{id:this.id,priority:0,insertText:p,label:C,detail:t}})}}let d=class extends i{constructor(l){super(),this._workspaceContextService=l,this.id="relativePath",this.dropMimeTypes=[D.Mimes.uriList],this.pasteMimeTypes=[D.Mimes.uriList]}getEdit(l,u){return we(this,void 0,void 0,function*(){const v=yield h(l);if(!v.length||u.isCancellationRequested)return;const f=(0,_.coalesce)(v.map(({uri:p})=>{const C=this._workspaceContextService.getWorkspaceFolder(p);return C?(0,b.relativePath)(C.uri,p):void 0}));if(f.length)return{id:this.id,priority:0,insertText:f.join(" "),label:v.length>1?(0,m.localize)(6,null):(0,m.localize)(7,null),detail:t}})}};d=Te([ge(0,s.IWorkspaceContextService)],d);function h(a){return we(this,void 0,void 0,function*(){const l=a.get(D.Mimes.uriList);if(!l)return[];const u=yield l.asString(),v=[];for(const f of k.UriList.parse(u))try{v.push({uri:S.URI.parse(f),originalText:f})}catch{}return v})}let o=e.DefaultDropProvidersFeature=class extends L.Disposable{constructor(l,u){super(),this._register(l.documentOnDropEditProvider.register("*",new n)),this._register(l.documentOnDropEditProvider.register("*",new r)),this._register(l.documentOnDropEditProvider.register("*",new d(u)))}};e.DefaultDropProvidersFeature=o=Te([ge(0,g.ILanguageFeaturesService),ge(1,s.IWorkspaceContextService)],o);let c=e.DefaultPasteProvidersFeature=class extends L.Disposable{constructor(l,u){super(),this._register(l.documentPasteEditProvider.register("*",new n)),this._register(l.documentPasteEditProvider.register("*",new r)),this._register(l.documentPasteEditProvider.register("*",new d(u)))}};e.DefaultPasteProvidersFeature=c=Te([ge(0,g.ILanguageFeaturesService),ge(1,s.IWorkspaceContextService)],c)}),define(J[875],ee([1,0,15,142,853,362,623]),function(j,e,_,k,L,D,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(L.CopyPasteController.ID,L.CopyPasteController,0),(0,k.registerEditorFeature)(D.DefaultPasteProvidersFeature),(0,_.registerEditorCommand)(new class extends _.EditorCommand{constructor(){super({id:L.changePasteTypeCommandId,precondition:L.pasteWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(b,S,g){var m;return(m=L.CopyPasteController.get(S))===null||m===void 0?void 0:m.changePasteType()}}),(0,_.registerEditorAction)(class extends _.EditorAction{constructor(){super({id:"editor.action.pasteAs",label:w.localize(0,null),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:w.localize(1,null)}}}}]}})}run(b,S,g){var m;const s=typeof g?.id=="string"?g.id:void 0;return(m=L.CopyPasteController.get(S))===null||m===void 0?void 0:m.pasteAs(s)}})}),define(J[876],ee([1,0,15,142,362,854]),function(j,e,_,k,L,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(D.DropIntoEditorController.ID,D.DropIntoEditorController,2),(0,_.registerEditorCommand)(new class extends _.EditorCommand{constructor(){super({id:D.changeDropTypeCommandId,precondition:D.dropWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(w,b,S){var g;(g=D.DropIntoEditorController.get(b))===null||g===void 0||g.changeDropType()}}),(0,k.registerEditorFeature)(L.DefaultDropProvidersFeature)}),define(J[877],ee([1,0,549,90,42,9,164,29,124,670,159]),function(j,e,_,k,L,D,w,b,S,g,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,CURRENT_TIMEZONE_OFFSET:!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 s{constructor(a){this._delegates=a}resolve(a){for(const l of this._delegates){const u=l.resolve(a);if(u!==void 0)return u}}}e.CompositeSnippetVariableResolver=s;class t{constructor(a,l,u,v){this._model=a,this._selection=l,this._selectionIdx=u,this._overtypingCapturer=v}resolve(a){const{name:l}=a;if(l==="SELECTION"||l==="TM_SELECTED_TEXT"){let u=this._model.getValueInRange(this._selection)||void 0,v=this._selection.startLineNumber!==this._selection.endLineNumber;if(!u&&this._overtypingCapturer){const f=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);f&&(u=f.value,v=f.multiline)}if(u&&v&&a.snippet){const f=this._model.getLineContent(this._selection.startLineNumber),p=(0,D.getLeadingWhitespace)(f,0,this._selection.startColumn-1);let C=p;a.snippet.walk(E=>E===a?!1:(E instanceof S.Text&&(C=(0,D.getLeadingWhitespace)((0,D.splitLines)(E.value).pop())),!0));const y=(0,D.commonPrefixLength)(C,p);u=u.replace(/(\\r\\n|\\r|\\n)(.*)/g,(E,I,T)=>`${I}${C.substr(y)}${T}`)}return u}else{if(l==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(l==="TM_CURRENT_WORD"){const u=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return u&&u.word||void 0}else{if(l==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(l==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(l==="CURSOR_INDEX")return String(this._selectionIdx);if(l==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}e.SelectionBasedVariableResolver=t;class i{constructor(a,l){this._labelService=a,this._model=l}resolve(a){const{name:l}=a;if(l==="TM_FILENAME")return k.basename(this._model.uri.fsPath);if(l==="TM_FILENAME_BASE"){const u=k.basename(this._model.uri.fsPath),v=u.lastIndexOf(".");return v<=0?u:u.slice(0,v)}else{if(l==="TM_DIRECTORY")return k.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,L.dirname)(this._model.uri));if(l==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(l==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=i;class n{constructor(a,l,u,v){this._readClipboardText=a,this._selectionIdx=l,this._selectionCount=u,this._spread=v}resolve(a){if(a.name!=="CLIPBOARD")return;const l=this._readClipboardText();if(l){if(this._spread){const u=l.split(/\\r\\n|\\n|\\r/).filter(v=>!(0,D.isFalsyOrWhitespace)(v));if(u.length===this._selectionCount)return u[this._selectionIdx]}return l}}}e.ClipboardBasedVariableResolver=n;let r=e.CommentBasedVariableResolver=class{constructor(a,l,u){this._model=a,this._selection=l,this._languageConfigurationService=u}resolve(a){const{name:l}=a,u=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),v=this._languageConfigurationService.getLanguageConfiguration(u).comments;if(v){if(l==="LINE_COMMENT")return v.lineCommentToken||void 0;if(l==="BLOCK_COMMENT_START")return v.blockCommentStartToken||void 0;if(l==="BLOCK_COMMENT_END")return v.blockCommentEndToken||void 0}}};e.CommentBasedVariableResolver=r=Te([ge(2,b.ILanguageConfigurationService)],r);class d{constructor(){this._date=new Date}resolve(a){const{name:l}=a;if(l==="CURRENT_YEAR")return String(this._date.getFullYear());if(l==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(l==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(l==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(l==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(l==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(l==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(l==="CURRENT_DAY_NAME")return d.dayNames[this._date.getDay()];if(l==="CURRENT_DAY_NAME_SHORT")return d.dayNamesShort[this._date.getDay()];if(l==="CURRENT_MONTH_NAME")return d.monthNames[this._date.getMonth()];if(l==="CURRENT_MONTH_NAME_SHORT")return d.monthNamesShort[this._date.getMonth()];if(l==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(l==="CURRENT_TIMEZONE_OFFSET"){const u=this._date.getTimezoneOffset(),v=u>0?"-":"+",f=Math.trunc(Math.abs(u/60)),p=f<10?"0"+f:f,C=Math.abs(u)-f*60,y=C<10?"0"+C:C;return v+p+":"+y}}}e.TimeBasedVariableResolver=d,d.dayNames=[g.localize(0,null),g.localize(1,null),g.localize(2,null),g.localize(3,null),g.localize(4,null),g.localize(5,null),g.localize(6,null)],d.dayNamesShort=[g.localize(7,null),g.localize(8,null),g.localize(9,null),g.localize(10,null),g.localize(11,null),g.localize(12,null),g.localize(13,null)],d.monthNames=[g.localize(14,null),g.localize(15,null),g.localize(16,null),g.localize(17,null),g.localize(18,null),g.localize(19,null),g.localize(20,null),g.localize(21,null),g.localize(22,null),g.localize(23,null),g.localize(24,null),g.localize(25,null)],d.monthNamesShort=[g.localize(26,null),g.localize(27,null),g.localize(28,null),g.localize(29,null),g.localize(30,null),g.localize(31,null),g.localize(32,null),g.localize(33,null),g.localize(34,null),g.localize(35,null),g.localize(36,null),g.localize(37,null)];class h{constructor(a){this._workspaceService=a}resolve(a){if(!this._workspaceService)return;const l=(0,m.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!(0,m.isEmptyWorkspaceIdentifier)(l)){if(a.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(l);if(a.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(l)}}_resolveWorkspaceName(a){if((0,m.isSingleFolderWorkspaceIdentifier)(a))return k.basename(a.uri.path);let l=k.basename(a.configPath.path);return l.endsWith(m.WORKSPACE_EXTENSION)&&(l=l.substr(0,l.length-m.WORKSPACE_EXTENSION.length-1)),l}_resoveWorkspacePath(a){if((0,m.isSingleFolderWorkspaceIdentifier)(a))return(0,_.normalizeDriveLetter)(a.uri.fsPath);const l=k.basename(a.configPath.path);let u=a.configPath.fsPath;return u.endsWith(l)&&(u=u.substr(0,u.length-l.length-1)),u?(0,_.normalizeDriveLetter)(u):"/"}}e.WorkspaceBasedVariableResolver=h;class o{resolve(a){const{name:l}=a;if(l==="RANDOM")return Math.random().toString().slice(-6);if(l==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(l==="UUID")return(0,w.generateUuid)()}}e.RandomBasedVariableResolver=o}),define(J[363],ee([1,0,16,2,9,65,5,24,29,38,155,159,124,877,445]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class n{constructor(o,c,a){this._editor=o,this._snippet=c,this._snippetLineLeadingWhitespace=a,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,_.groupBy)(c.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(c=>{for(const a of this._snippet.placeholders){const l=this._snippet.offset(a),u=this._snippet.fullLen(a),v=w.Range.fromPositions(o.getPositionAt(this._offset+l),o.getPositionAt(this._offset+l+u)),f=a.isFinalTabstop?n._decor.inactiveFinal:n._decor.inactive,p=c.addDecoration(v,f);this._placeholderDecorations.set(a,p)}})}move(o){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const l=[];for(const u of this._placeholderGroups[this._placeholderGroupsIdx])if(u.transform){const v=this._placeholderDecorations.get(u),f=this._editor.getModel().getDecorationRange(v),p=this._editor.getModel().getValueInRange(f),C=u.transform.resolve(p).split(/\\r\\n|\\r|\\n/);for(let y=1;y<C.length;y++)C[y]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+C[y]);l.push(D.EditOperation.replace(f,C.join(this._editor.getModel().getEOL())))}l.length>0&&this._editor.executeEdits("snippet.placeholderTransform",l)}let c=!1;o===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,c=!0):o===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,c=!0);const a=this._editor.getModel().changeDecorations(l=>{const u=new Set,v=[];for(const f of this._placeholderGroups[this._placeholderGroupsIdx]){const p=this._placeholderDecorations.get(f),C=this._editor.getModel().getDecorationRange(p);v.push(new b.Selection(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn)),c=c&&this._hasPlaceholderBeenCollapsed(f),l.changeDecorationOptions(p,f.isFinalTabstop?n._decor.activeFinal:n._decor.active),u.add(f);for(const y of this._snippet.enclosingPlaceholders(f)){const E=this._placeholderDecorations.get(y);l.changeDecorationOptions(E,y.isFinalTabstop?n._decor.activeFinal:n._decor.active),u.add(y)}}for(const[f,p]of this._placeholderDecorations)u.has(f)||l.changeDecorationOptions(p,f.isFinalTabstop?n._decor.inactiveFinal:n._decor.inactive);return v});return c?this.move(o):a??[]}_hasPlaceholderBeenCollapsed(o){let c=o;for(;c;){if(c instanceof t.Placeholder){const a=this._placeholderDecorations.get(c);if(this._editor.getModel().getDecorationRange(a).isEmpty()&&c.toString().length>0)return!0}c=c.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 c of this._placeholderGroups){let a;for(const l of c){if(l.isFinalTabstop)break;a||(a=[],o.set(l.index,a));const u=this._placeholderDecorations.get(l),v=this._editor.getModel().getDecorationRange(u);if(!v){o.delete(l.index);break}a.push(v)}}return o}get activeChoice(){if(!this._placeholderDecorations)return;const o=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!o?.choice)return;const c=this._placeholderDecorations.get(o);if(!c)return;const a=this._editor.getModel().getDecorationRange(c);if(a)return{range:a,choice:o.choice}}get hasChoice(){let o=!1;return this._snippet.walk(c=>(o=c instanceof t.Choice,!o)),o}merge(o){const c=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(a=>{for(const l of this._placeholderGroups[this._placeholderGroupsIdx]){const u=o.shift();console.assert(u._offset!==-1),console.assert(!u._placeholderDecorations);const v=u._snippet.placeholderInfo.last.index;for(const p of u._snippet.placeholderInfo.all)p.isFinalTabstop?p.index=l.index+(v+1)/this._nestingLevel:p.index=l.index+p.index/this._nestingLevel;this._snippet.replace(l,u._snippet.children);const f=this._placeholderDecorations.get(l);a.removeDecoration(f),this._placeholderDecorations.delete(l);for(const p of u._snippet.placeholders){const C=u._snippet.offset(p),y=u._snippet.fullLen(p),E=w.Range.fromPositions(c.getPositionAt(u._offset+C),c.getPositionAt(u._offset+C+y)),I=a.addDecoration(E,n._decor.inactive);this._placeholderDecorations.set(p,I)}}this._placeholderGroups=(0,_.groupBy)(this._snippet.placeholders,t.Placeholder.compareByIndex)})}}e.OneSnippet=n,n._decor={active:g.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:g.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:g.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:g.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const r={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let d=e.SnippetSession=class St{static adjustWhitespace(o,c,a,l,u){const v=o.getLineContent(c.lineNumber),f=(0,L.getLeadingWhitespace)(v,0,c.column-1);let p;return l.walk(C=>{if(!(C instanceof t.Text)||C.parent instanceof t.Choice||u&&!u.has(C))return!0;const y=C.value.split(/\\r\\n|\\r|\\n/);if(a){const I=l.offset(C);if(I===0)y[0]=o.normalizeIndentation(y[0]);else{p=p??l.toString();const T=p.charCodeAt(I-1);(T===10||T===13)&&(y[0]=o.normalizeIndentation(f+y[0]))}for(let T=1;T<y.length;T++)y[T]=o.normalizeIndentation(f+y[T])}const E=y.join(o.getEOL());return E!==C.value&&(C.parent.replace(C,[new t.Text(E)]),p=void 0),!0}),f}static adjustSelection(o,c,a,l){if(a!==0||l!==0){const{positionLineNumber:u,positionColumn:v}=c,f=v-a,p=v+l,C=o.validateRange({startLineNumber:u,startColumn:f,endLineNumber:u,endColumn:p});c=b.Selection.createWithDirection(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn,c.getDirection())}return c}static createEditsAndSnippetsFromSelections(o,c,a,l,u,v,f,p,C){const y=[],E=[];if(!o.hasModel())return{edits:y,snippets:E};const I=o.getModel(),T=o.invokeWithinContext(F=>F.get(s.IWorkspaceContextService)),O=o.invokeWithinContext(F=>new i.ModelBasedVariableResolver(F.get(m.ILabelService),I)),R=()=>f,M=I.getValueInRange(St.adjustSelection(I,o.getSelection(),a,0)),N=I.getValueInRange(St.adjustSelection(I,o.getSelection(),0,l)),P=I.getLineFirstNonWhitespaceColumn(o.getSelection().positionLineNumber),x=o.getSelections().map((F,B)=>({selection:F,idx:B})).sort((F,B)=>w.Range.compareRangesUsingStarts(F.selection,B.selection));for(const{selection:F,idx:B}of x){let V=St.adjustSelection(I,F,a,0),K=St.adjustSelection(I,F,0,l);M!==I.getValueInRange(V)&&(V=F),N!==I.getValueInRange(K)&&(K=F);const A=F.setStartPosition(V.startLineNumber,V.startColumn).setEndPosition(K.endLineNumber,K.endColumn),Y=new t.SnippetParser().parse(c,!0,u),ie=A.getStartPosition(),le=St.adjustWhitespace(I,ie,v||B>0&&P!==I.getLineFirstNonWhitespaceColumn(F.positionLineNumber),Y);Y.resolveVariables(new i.CompositeSnippetVariableResolver([O,new i.ClipboardBasedVariableResolver(R,B,x.length,o.getOption(76)==="spread"),new i.SelectionBasedVariableResolver(I,F,B,p),new i.CommentBasedVariableResolver(I,F,C),new i.TimeBasedVariableResolver,new i.WorkspaceBasedVariableResolver(T),new i.RandomBasedVariableResolver])),y[B]=D.EditOperation.replace(A,Y.toString()),y[B].identifier={major:B,minor:0},y[B]._isTracked=!0,E[B]=new n(o,Y,le)}return{edits:y,snippets:E}}static createEditsAndSnippetsFromEdits(o,c,a,l,u,v,f){if(!o.hasModel()||c.length===0)return{edits:[],snippets:[]};const p=[],C=o.getModel(),y=new t.SnippetParser,E=new t.TextmateSnippet,I=new i.CompositeSnippetVariableResolver([o.invokeWithinContext(O=>new i.ModelBasedVariableResolver(O.get(m.ILabelService),C)),new i.ClipboardBasedVariableResolver(()=>u,0,o.getSelections().length,o.getOption(76)==="spread"),new i.SelectionBasedVariableResolver(C,o.getSelection(),0,v),new i.CommentBasedVariableResolver(C,o.getSelection(),f),new i.TimeBasedVariableResolver,new i.WorkspaceBasedVariableResolver(o.invokeWithinContext(O=>O.get(s.IWorkspaceContextService))),new i.RandomBasedVariableResolver]);c=c.sort((O,R)=>w.Range.compareRangesUsingStarts(O.range,R.range));let T=0;for(let O=0;O<c.length;O++){const{range:R,template:M}=c[O];if(O>0){const B=c[O-1].range,V=w.Range.fromPositions(B.getEndPosition(),R.getStartPosition()),K=new t.Text(C.getValueInRange(V));E.appendChild(K),T+=K.value.length}const N=y.parseFragment(M,E);St.adjustWhitespace(C,R.getStartPosition(),!0,E,new Set(N)),E.resolveVariables(I);const P=E.toString(),x=P.slice(T);T=P.length;const F=D.EditOperation.replace(R,x);F.identifier={major:O,minor:0},F._isTracked=!0,p.push(F)}return y.ensureFinalTabstop(E,a,!0),{edits:p,snippets:[new n(o,E,"")]}}constructor(o,c,a=r,l){this._editor=o,this._template=c,this._options=a,this._languageConfigurationService=l,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:c}=typeof this._template=="string"?St.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):St.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=c,this._editor.executeEdits("snippet",o,a=>{const l=a.filter(u=>!!u.identifier);for(let u=0;u<c.length;u++)c[u].initialize(l[u].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):l.map(u=>b.Selection.fromPositions(u.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(o,c=r){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,o]);const{edits:a,snippets:l}=St.createEditsAndSnippetsFromSelections(this._editor,o,c.overwriteBefore,c.overwriteAfter,!0,c.adjustWhitespace,c.clipboardText,c.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",a,u=>{const v=u.filter(p=>!!p.identifier);for(let p=0;p<l.length;p++)l[p].initialize(v[p].textChange);const f=l[0].isTrivialSnippet;if(!f){for(const p of this._snippets)p.merge(l);console.assert(l.length===0)}return this._snippets[0].hasPlaceholder&&!f?this._move(void 0):v.map(p=>b.Selection.fromPositions(p.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 c=[];for(const a of this._snippets){const l=a.move(o);c.push(...l)}return c}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 c=new Map;for(const a of this._snippets){const l=a.computePossibleSelections();if(c.size===0)for(const[u,v]of l){v.sort(w.Range.compareRangesUsingStarts);for(const f of o)if(v[0].containsRange(f)){c.set(u,[]);break}}if(c.size===0)return!1;c.forEach((u,v)=>{u.push(...l.get(v))})}o.sort(w.Range.compareRangesUsingStarts);for(const[a,l]of c){if(l.length!==o.length){c.delete(a);continue}l.sort(w.Range.compareRangesUsingStarts);for(let u=0;u<l.length;u++)if(!l[u].containsRange(o[u])){c.delete(a);continue}}return c.size>0}};e.SnippetSession=d=Te([ge(3,S.ILanguageConfigurationService)],d)}),define(J[190],ee([1,0,2,18,15,12,22,29,19,129,669,13,63,363]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const n={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let r=e.SnippetController2=class Ht{static get(o){return o.getContribution(Ht.ID)}constructor(o,c,a,l,u){this._editor=o,this._logService=c,this._languageFeaturesService=a,this._languageConfigurationService=u,this._snippetListener=new _.DisposableStore,this._modelVersionId=-1,this._inSnippet=Ht.InSnippetMode.bindTo(l),this._hasNextTabstop=Ht.HasNextTabstop.bindTo(l),this._hasPrevTabstop=Ht.HasPrevTabstop.bindTo(l)}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,c){try{this._doInsert(o,typeof c>"u"?n:Object.assign(Object.assign({},n),c))}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,c){var a;if(this._editor.hasModel()){if(this._snippetListener.clear(),c.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof o!="string"&&this.cancel(),this._session?((0,k.assertType)(typeof o=="string"),this._session.merge(o,c)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new i.SnippetSession(this._editor,o,c,this._languageConfigurationService),this._session.insert()),c.undoStopAfter&&this._editor.getModel().pushStackElement(),!((a=this._session)===null||a===void 0)&&a.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(u,v)=>{if(!this._session||u!==this._editor.getModel()||!D.Position.equals(this._editor.getPosition(),v))return;const{activeChoice:f}=this._session;if(!f||f.choice.options.length===0)return;const p=u.getValueInRange(f.range),C=!!f.choice.options.find(E=>E.value===p),y=[];for(let E=0;E<f.choice.options.length;E++){const I=f.choice.options[E];y.push({kind:13,label:I.value,insertText:I.value,sortText:"a".repeat(E+1),range:f.range,filterText:C?`${p}_${I.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,m.localize)(3,null)}})}return{suggestions:y}}};const l=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(l)}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(l=>l.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,g.showSimpleSuggestions)(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(o=!1){var c;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(c=this._session)===null||c===void 0||c.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 s.RawContextKey("inSnippetMode",!1,(0,m.localize)(0,null)),r.HasNextTabstop=new s.RawContextKey("hasNextTabstop",!1,(0,m.localize)(1,null)),r.HasPrevTabstop=new s.RawContextKey("hasPrevTabstop",!1,(0,m.localize)(2,null)),e.SnippetController2=r=Te([ge(1,t.ILogService),ge(2,S.ILanguageFeaturesService),ge(3,s.IContextKeyService),ge(4,b.ILanguageConfigurationService)],r),(0,L.registerEditorContribution)(r.ID,r,4);const d=L.EditorCommand.bindToContribution(r.get);(0,L.registerEditorCommand)(new d({id:"jumpToNextSnippetPlaceholder",precondition:s.ContextKeyExpr.and(r.InSnippetMode,r.HasNextTabstop),handler:h=>h.next(),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:2}})),(0,L.registerEditorCommand)(new d({id:"jumpToPrevSnippetPlaceholder",precondition:s.ContextKeyExpr.and(r.InSnippetMode,r.HasPrevTabstop),handler:h=>h.prev(),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:1026}})),(0,L.registerEditorCommand)(new d({id:"leaveSnippet",precondition:r.InSnippetMode,handler:h=>h.cancel(!0),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),(0,L.registerEditorCommand)(new d({id:"acceptSnippet",precondition:r.InSnippetMode,handler:h=>h.finish()}))}),define(J[878],ee([1,0,16,11,2,82,114,253,18,65,12,5,27,29,206,752,145,190,25,8]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsModel=e.VersionIdChangeReason=void 0;var a;(function(u){u[u.Undo=0]="Undo",u[u.Redo=1]="Redo",u[u.AcceptWord=2]="AcceptWord",u[u.Other=3]="Other"})(a||(e.VersionIdChangeReason=a={}));let l=e.InlineCompletionsModel=class extends L.Disposable{get isAcceptingPartially(){return this._isAcceptingPartially}get isNavigatingCurrentInlineCompletion(){return this._isNavigatingCurrentInlineCompletion}constructor(v,f,p,C,y,E,I,T,O,R,M,N){super(),this.textModel=v,this.selectedSuggestItem=f,this.cursorPosition=p,this.textModelVersionId=C,this._debounceValue=y,this._suggestPreviewEnabled=E,this._suggestPreviewMode=I,this._inlineSuggestMode=T,this._enabled=O,this._instantiationService=R,this._commandService=M,this._languageConfigurationService=N,this._source=this._register(this._instantiationService.createInstance(r.InlineCompletionsSource,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=(0,D.observableValue)("isActive",!1),this._forceUpdate=(0,D.observableSignal)("forceUpdate"),this._selectedInlineCompletionId=(0,D.observableValue)("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._isNavigatingCurrentInlineCompletion=!1,this._preserveCurrentCompletionReasons=new Set([a.Redo,a.Undo,a.AcceptWord]),this._fetchInlineCompletions=(0,b.derivedHandleChanges)("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:t.InlineCompletionTriggerKind.Automatic}),handleChange:(x,F)=>(x.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(x.change)?F.preserveCurrentCompletion=!0:x.didChange(this._forceUpdate)&&(F.inlineCompletionTriggerKind=x.change),!0)},(x,F)=>{if(this._forceUpdate.read(x),!(this._enabled.read(x)&&this.selectedSuggestItem.read(x)||this._isActive.read(x))){this._source.cancelUpdate();return}this.textModelVersionId.read(x);const V=this.selectedInlineCompletion.get(),K=F.preserveCurrentCompletion||V?.forwardStable?V:void 0,A=this._source.suggestWidgetInlineCompletions.get(),Y=this.selectedSuggestItem.read(x);if(A&&!Y){const ne=this._source.inlineCompletions.get();(0,D.transaction)(se=>{ne&&A.request.versionId>ne.request.versionId&&this._source.inlineCompletions.set(A.clone(),se),this._source.clearSuggestWidgetInlineCompletions(se)})}const ie=this.cursorPosition.read(x),le={triggerKind:F.inlineCompletionTriggerKind,selectedSuggestionInfo:Y?.toSelectedSuggestionInfo()};return this._source.fetch(ie,le,K)}),this._filteredInlineCompletionItems=(0,D.derived)("filteredInlineCompletionItems",x=>{const F=this._source.inlineCompletions.read(x);if(!F)return[];const B=this.cursorPosition.read(x);return F.inlineCompletions.filter(K=>K.isVisible(this.textModel,B,x))}),this.selectedInlineCompletionIndex=(0,D.derived)("selectedCachedCompletionIndex",x=>{const F=this._selectedInlineCompletionId.read(x),B=this._filteredInlineCompletionItems.read(x),V=this._selectedInlineCompletionId===void 0?-1:B.findIndex(K=>K.semanticId===F);return V===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):V}),this.selectedInlineCompletion=(0,D.derived)("selectedCachedCompletion",x=>{const F=this._filteredInlineCompletionItems.read(x),B=this.selectedInlineCompletionIndex.read(x);return F[B]}),this.lastTriggerKind=this._source.inlineCompletions.map(x=>x?.request.context.triggerKind),this.inlineCompletionsCount=(0,D.derived)("selectedInlineCompletionsCount",x=>{if(this.lastTriggerKind.read(x)===t.InlineCompletionTriggerKind.Explicit)return this._filteredInlineCompletionItems.read(x).length}),this.state=(0,D.derived)("ghostTextAndCompletion",x=>{var F;const B=this.textModel,V=this.selectedSuggestItem.read(x);if(V){const K=this._source.suggestWidgetInlineCompletions.read(x),A=K?K.inlineCompletions:[this.selectedInlineCompletion.read(x)].filter(S.isDefined),Y=V.toSingleTextEdit().removeCommonPrefix(B),ie=(0,_.mapFind)(A,Q=>{let re=Q.toSingleTextEdit(x);return re=re.removeCommonPrefix(B,s.Range.fromPositions(re.range.getStartPosition(),V.range.getEndPosition())),re.augments(Y)?{edit:re,completion:Q}:void 0});if(!this._suggestPreviewEnabled.read(x)&&!ie)return;const ne=(F=ie?.edit)!==null&&F!==void 0?F:Y,se=ie?ie.edit.text.length-Y.text.length:0,H=this._suggestPreviewMode.read(x),W=this.cursorPosition.read(x),$=ne.computeGhostText(B,H,W,se);return{ghostText:$??new n.GhostText(ne.range.endLineNumber,[]),completion:ie?.completion,suggestItem:V}}else{if(!this._isActive.read(x))return;const K=this.selectedInlineCompletion.read(x);if(!K)return;const A=K.toSingleTextEdit(x),Y=this._inlineSuggestMode.read(x),ie=this.cursorPosition.read(x),le=A.computeGhostText(B,Y,ie);return le?{ghostText:le,completion:K,suggestItem:void 0}:void 0}}),this.ghostText=(0,D.derived)("ghostText",x=>{const F=this.state.read(x);if(F)return F.ghostText}),this._register((0,D.keepAlive)(this._fetchInlineCompletions,!0));let P;this._register((0,D.autorun)("call handleItemDidShow",x=>{var F,B;const V=this.state.read(x),K=V?.completion;if(K?.semanticId!==P?.semanticId&&(P=K,K)){const A=K.inlineCompletion,Y=A.source;(B=(F=Y.provider).handleItemDidShow)===null||B===void 0||B.call(F,Y.inlineCompletions,A.sourceInlineCompletion,A.insertText)}}))}trigger(v){return we(this,void 0,void 0,function*(){this._isActive.set(!0,v),yield this._fetchInlineCompletions.get()})}triggerExplicitly(v){return we(this,void 0,void 0,function*(){(0,w.subtransaction)(v,f=>{this._isActive.set(!0,f),this._forceUpdate.trigger(f,t.InlineCompletionTriggerKind.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(v){(0,w.subtransaction)(v,f=>{this._isActive.set(!1,f),this._source.clear(f)})}_deltaSelectedInlineCompletionIndex(v){return we(this,void 0,void 0,function*(){yield this.triggerExplicitly(),this._isNavigatingCurrentInlineCompletion=!0;try{const f=this._filteredInlineCompletionItems.get()||[];if(f.length>0){const p=(this.selectedInlineCompletionIndex.get()+v+f.length)%f.length;this._selectedInlineCompletionId.set(f[p].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}finally{this._isNavigatingCurrentInlineCompletion=!1}})}next(){return we(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return we(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(v){var f,p;return we(this,void 0,void 0,function*(){if(v.getModel()!==this.textModel)throw new k.BugIndicatingError;const C=this.ghostText.get(),y=(f=this.selectedInlineCompletion.get())===null||f===void 0?void 0:f.toInlineCompletion(void 0);!C||!y||(v.pushUndoStop(),y.snippetInfo?(v.executeEdits("inlineSuggestion.accept",[g.EditOperation.replaceMove(y.range,""),...y.additionalTextEdits]),v.setPosition(y.snippetInfo.range.getStartPosition()),(p=h.SnippetController2.get(v))===null||p===void 0||p.insert(y.snippetInfo.snippet,{undoStopBefore:!1})):v.executeEdits("inlineSuggestion.accept",[g.EditOperation.replaceMove(y.range,y.insertText),...y.additionalTextEdits]),y.command&&(yield this._commandService.executeCommand(y.command.id,...y.command.arguments||[]).then(void 0,k.onUnexpectedExternalError)),(0,D.transaction)(E=>{this._source.clear(E),this._isActive.set(!1,E)}))})}acceptNextWord(v){this._acceptNext(v,(f,p)=>{const C=this.textModel.getLanguageIdAtPosition(f.lineNumber,f.column),y=this._languageConfigurationService.getLanguageConfiguration(C),E=new RegExp(y.wordDefinition.source,y.wordDefinition.flags.replace("g","")),I=p.match(E);let T=0;I&&I.index!==void 0?I.index===0?T=I[0].length:T=I.index:T=p.length;const R=/\\s+/g.exec(p);return R&&R.index!==void 0&&R.index+R[0].length<T&&(T=R.index+R[0].length),T})}acceptNextLine(v){this._acceptNext(v,(f,p)=>{const C=p.match(/\\n/);return C&&C.index!==void 0?C.index+1:p.length})}_acceptNext(v,f){var p;if(v.getModel()!==this.textModel)throw new k.BugIndicatingError;const C=this.ghostText.get(),y=(p=this.selectedInlineCompletion.get())===null||p===void 0?void 0:p.toInlineCompletion(void 0);if(!C||!y)return;if(y.snippetInfo||y.filterText!==y.insertText){this.accept(v);return}if(C.parts.length===0)return;const E=C.parts[0],I=new m.Position(C.lineNumber,E.column),T=E.lines.join(`\n`),O=f(I,T);if(O===T.length&&C.parts.length===1){this.accept(v);return}const R=T.substring(0,O);this._isAcceptingPartially=!0;try{v.pushUndoStop(),v.executeEdits("inlineSuggestion.accept",[g.EditOperation.replace(s.Range.fromPositions(I),R)]);const M=(0,d.lengthOfText)(R);v.setPosition((0,d.addPositions)(I,M))}finally{this._isAcceptingPartially=!1}if(y.source.provider.handlePartialAccept){const M=s.Range.fromPositions(y.range.getStartPosition(),(0,d.addPositions)(I,(0,d.lengthOfText)(R))),N=v.getModel().getValueInRange(M,1);y.source.provider.handlePartialAccept(y.source.inlineCompletions,y.sourceInlineCompletion,N.length)}}};e.InlineCompletionsModel=l=Te([ge(9,c.IInstantiationService),ge(10,o.ICommandService),ge(11,i.ILanguageConfigurationService)],l)}),define(J[879],ee([1,0,14,20,11,6,2,9,24,111,287,97,28,13,63,73,286,129,19,64,18,230,190]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class v{static shouldAutoTrigger(E){if(!E.hasModel())return!1;const I=E.getModel(),T=E.getPosition();I.tokenization.tokenizeIfCheap(T.lineNumber);const O=I.getWordAtPosition(T);return!(!O||O.endColumn!==T.column&&O.startColumn+1!==T.column||!isNaN(Number(O.word)))}constructor(E,I,T){this.leadingLineContent=E.getLineContent(I.lineNumber).substr(0,I.column-1),this.leadingWord=E.getWordUntilPosition(I),this.lineNumber=I.lineNumber,this.column=I.column,this.triggerOptions=T}}e.LineContext=v;function f(y,E,I){if(!E.getContextKeyValue(l.InlineCompletionContextKeys.inlineSuggestionVisible.key))return!0;const T=E.getContextKeyValue(l.InlineCompletionContextKeys.suppressSuggestions.key);return T!==void 0?!T:!y.getOption(60).suppressSuggestions}function p(y,E,I){if(!E.getContextKeyValue("inlineSuggestionVisible"))return!0;const T=E.getContextKeyValue(l.InlineCompletionContextKeys.suppressSuggestions.key);return T!==void 0?!T:!y.getOption(60).suppressSuggestions}let C=e.SuggestModel=class gn{constructor(E,I,T,O,R,M,N,P){this._editor=E,this._editorWorkerService=I,this._clipboardService=T,this._telemetryService=O,this._logService=R,this._contextKeyService=M,this._configurationService=N,this._languageFeaturesService=P,this._toDispose=new w.DisposableStore,this._triggerCharacterListener=new w.DisposableStore,this._triggerQuickSuggest=new _.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 S.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let x=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{x=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{x=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(F=>{x||this._onCursorChange(F)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!x&&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(88)||!this._editor.hasModel()||!this._editor.getOption(117))return;const E=new Map;for(const T of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const O of T.triggerCharacters||[]){let R=E.get(O);R||(R=new Set,R.add((0,h.getSnippetSuggestSupport)()),E.set(O,R)),R.add(T)}const I=T=>{var O;if(!p(this._editor,this._contextKeyService,this._configurationService)||v.shouldAutoTrigger(this._editor))return;if(!T){const N=this._editor.getPosition();T=this._editor.getModel().getLineContent(N.lineNumber).substr(0,N.column-1)}let R="";(0,b.isLowSurrogate)(T.charCodeAt(T.length-1))?(0,b.isHighSurrogate)(T.charCodeAt(T.length-2))&&(R=T.substr(T.length-2)):R=T.charAt(T.length-1);const M=E.get(R);if(M){const N=new Map;if(this._completionModel)for(const[P,x]of this._completionModel.getItemsByProvider())M.has(P)||N.set(P,x);this.trigger({auto:!0,triggerKind:1,triggerCharacter:R,retrigger:!!this._completionModel,clipboardText:(O=this._completionModel)===null||O===void 0?void 0:O.clipboardText,completionOptions:{providerFilter:M,providerItemsToReuse:N}})}};this._triggerCharacterListener.add(this._editor.onDidType(I)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>I()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(E=!1){var I;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(I=this._requestToken)===null||I===void 0||I.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:E}))}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(E){if(!this._editor.hasModel())return;const I=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!E.selection.isEmpty()||E.reason!==0&&E.reason!==3||E.source!=="keyboard"&&E.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&E.reason===0?(I.containsRange(this._currentSelection)||I.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&E.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var E;h.QuickSuggestionsOptions.isAllOff(this._editor.getOption(86))||this._editor.getOption(114).snippetsPreventQuickSuggestions&&(!((E=u.SnippetController2.get(this._editor))===null||E===void 0)&&E.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!v.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const I=this._editor.getModel(),T=this._editor.getPosition(),O=this._editor.getOption(86);if(!h.QuickSuggestionsOptions.isAllOff(O)){if(!h.QuickSuggestionsOptions.isAllOn(O)){I.tokenization.tokenizeIfCheap(T.lineNumber);const R=I.tokenization.getLineTokens(T.lineNumber),M=R.getStandardTokenType(R.findTokenIndexAtOffset(Math.max(T.column-1-1,0)));if(h.QuickSuggestionsOptions.valueFor(O,M)!=="on")return}f(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(I)&&this.trigger({auto:!0})}},this._editor.getOption(87)))}_refilterCompletionItems(){(0,a.assertType)(this._editor.hasModel()),(0,a.assertType)(this._triggerState!==void 0);const E=this._editor.getModel(),I=this._editor.getPosition(),T=new v(E,I,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(T)}trigger(E){var I,T,O,R,M,N;if(!this._editor.hasModel())return;const P=this._editor.getModel(),x=new v(P,this._editor.getPosition(),E);this.cancel(E.retrigger),this._triggerState=E,this._onDidTrigger.fire({auto:E.auto,shy:(I=E.shy)!==null&&I!==void 0?I:!1,position:this._editor.getPosition()}),this._context=x;let F={triggerKind:(T=E.triggerKind)!==null&&T!==void 0?T:0};E.triggerCharacter&&(F={triggerKind:1,triggerCharacter:E.triggerCharacter}),this._requestToken=new k.CancellationTokenSource;const B=this._editor.getOption(108);let V=1;switch(B){case"top":V=0;break;case"bottom":V=2;break}const{itemKind:K,showDeprecated:A}=gn._createSuggestFilter(this._editor),Y=new h.CompletionOptions(V,(R=(O=E.completionOptions)===null||O===void 0?void 0:O.kindFilter)!==null&&R!==void 0?R:K,(M=E.completionOptions)===null||M===void 0?void 0:M.providerFilter,(N=E.completionOptions)===null||N===void 0?void 0:N.providerItemsToReuse,A),ie=m.WordDistance.create(this._editorWorkerService,this._editor),le=(0,h.provideSuggestionItems)(this._languageFeaturesService.completionProvider,P,this._editor.getPosition(),Y,F,this._requestToken.token);Promise.all([le,ie]).then(([ne,se])=>we(this,void 0,void 0,function*(){var H;if((H=this._requestToken)===null||H===void 0||H.dispose(),!this._editor.hasModel())return;let W=E?.clipboardText;if(!W&&ne.needsClipboard&&(W=yield this._clipboardService.readText()),this._triggerState===void 0)return;const $=this._editor.getModel(),Z=new v($,this._editor.getPosition(),E),Q=Object.assign(Object.assign({},c.FuzzyScoreOptions.default),{firstMatchCanBeWeak:!this._editor.getOption(114).matchOnWordStartOnly});this._completionModel=new d.CompletionModel(ne.items,this._context.column,{leadingLineContent:Z.leadingLineContent,characterCountDelta:Z.column-this._context.column},se,this._editor.getOption(114),this._editor.getOption(108),Q,W),this._completionDisposables.add(ne.disposable),this._onNewContext(Z),this._reportDurationsTelemetry(ne.durations)})).catch(L.onUnexpectedError)}_reportDurationsTelemetry(E){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(E)}),this._logService.debug("suggest.durations.json",E)})}static _createSuggestFilter(E){const I=new Set;E.getOption(108)==="none"&&I.add(27);const O=E.getOption(114);return O.showMethods||I.add(0),O.showFunctions||I.add(1),O.showConstructors||I.add(2),O.showFields||I.add(3),O.showVariables||I.add(4),O.showClasses||I.add(5),O.showStructs||I.add(6),O.showInterfaces||I.add(7),O.showModules||I.add(8),O.showProperties||I.add(9),O.showEvents||I.add(10),O.showOperators||I.add(11),O.showUnits||I.add(12),O.showValues||I.add(13),O.showConstants||I.add(14),O.showEnums||I.add(15),O.showEnumMembers||I.add(16),O.showKeywords||I.add(17),O.showWords||I.add(18),O.showColors||I.add(19),O.showFiles||I.add(20),O.showReferences||I.add(21),O.showColors||I.add(22),O.showFolders||I.add(23),O.showTypeParameters||I.add(24),O.showSnippets||I.add(27),O.showUsers||I.add(25),O.showIssues||I.add(26),{itemKind:I,showDeprecated:O.showDeprecated}}_onNewContext(E){if(this._context){if(E.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,b.getLeadingWhitespace)(E.leadingLineContent)!==(0,b.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(E.column<this._context.column){E.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(E.leadingWord.word.length!==0&&E.leadingWord.startColumn>this._context.leadingWord.startColumn){if(v.shouldAutoTrigger(this._editor)&&this._context){const T=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:T}})}return}if(E.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&E.leadingWord.word.length!==0){const I=new Map,T=new Set;for(const[O,R]of this._completionModel.getItemsByProvider())R.length>0&&R[0].container.incomplete?T.add(O):I.set(O,R);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:T,providerItemsToReuse:I}})}else{const I=this._completionModel.lineContext;let T=!1;if(this._completionModel.lineContext={leadingLineContent:E.leadingLineContent,characterCountDelta:E.column-this._context.column},this._completionModel.items.length===0){const O=v.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(O&&this._context.leadingWord.endColumn<E.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=I,T=this._completionModel.items.length>0,T&&E.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:E.triggerOptions,isFrozen:T})}}}}};e.SuggestModel=C=Te([ge(1,g.IEditorWorkerService),ge(2,s.IClipboardService),ge(3,r.ITelemetryService),ge(4,n.ILogService),ge(5,i.IContextKeyService),ge(6,t.IConfigurationService),ge(7,o.ILanguageFeaturesService)],C)}),define(J[364],ee([1,0,48,16,14,20,11,6,113,2,17,56,18,116,15,65,12,5,22,190,124,336,726,673,25,13,8,63,129,725,529,879,530,860,73,42,137]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T,O,R,M,N,P,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;const F=!1;class B{constructor(ne,se){if(this._model=ne,this._position=se,ne.getLineMaxColumn(se.lineNumber)!==se.column){const W=ne.getOffsetAt(se),$=ne.getPositionAt(W+1);this._marker=ne.deltaDecorations([],[{range:h.Range.fromPositions(se,$),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(ne){if(this._model.isDisposed()||this._position.lineNumber!==ne.lineNumber)return 0;if(this._marker){const se=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(se.getStartPosition())-this._model.getOffsetAt(ne)}else return this._model.getLineMaxColumn(ne.lineNumber)-ne.column}}let V=e.SuggestController=class fn{static get(ne){return ne.getContribution(fn.ID)}constructor(ne,se,H,W,$,Z,Q){this._memoryService=se,this._commandService=H,this._contextKeyService=W,this._instantiationService=$,this._logService=Z,this._telemetryService=Q,this._lineSuffix=new g.MutableDisposable,this._toDispose=new g.DisposableStore,this._selectors=new K(de=>de.priority),this._telemetryGate=0,this.editor=ne,this.model=$.createInstance(O.SuggestModel,this.editor),this._selectors.register({priority:0,select:(de,ue,q)=>this._memoryService.select(de,ue,q)});const re=E.Context.InsertMode.bindTo(W);re.set(ne.getOption(114).insertMode),this.model.onDidTrigger(()=>re.set(ne.getOption(114).insertMode)),this.widget=this._toDispose.add(new L.IdleValue(()=>{const de=this._instantiationService.createInstance(M.SuggestWidget,this.editor);this._toDispose.add(de),this._toDispose.add(de.onDidSelect(X=>this._insertSuggestion(X,0),this));const ue=new T.CommitCharacterController(this.editor,de,this.model,X=>this._insertSuggestion(X,2));this._toDispose.add(ue);const q=E.Context.MakesTextEdit.bindTo(this._contextKeyService),z=E.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),U=E.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,g.toDisposable)(()=>{q.reset(),z.reset(),U.reset()})),this._toDispose.add(de.onDidFocus(({item:X})=>{const te=this.editor.getPosition(),G=X.editStart.column,ae=te.column;let fe=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!X.completion.additionalTextEdits&&!(X.completion.insertTextRules&4)&&ae-G===X.completion.insertText.length&&(fe=this.editor.getModel().getValueInRange({startLineNumber:te.lineNumber,startColumn:G,endLineNumber:te.lineNumber,endColumn:ae})!==X.completion.insertText),q.set(fe),z.set(!d.Position.equals(X.editInsertEnd,X.editReplaceEnd)),U.set(!!X.provider.resolveCompletionItem||!!X.completion.documentation||X.completion.detail!==X.completion.label)})),this._toDispose.add(de.onDetailsKeyDown(X=>{if(X.toKeyCodeChord().equals(new S.KeyCodeChord(!0,!1,!1,!1,33))||m.isMacintosh&&X.toKeyCodeChord().equals(new S.KeyCodeChord(!1,!1,!1,!0,33))){X.stopPropagation();return}X.toKeyCodeChord().isModifierKey()||this.editor.focus()})),de})),this._overtypingCapturer=this._toDispose.add(new L.IdleValue(()=>this._toDispose.add(new R.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new L.IdleValue(()=>this._toDispose.add(new I.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add($.createInstance(u.WordContextKey,ne)),this._toDispose.add(this.model.onDidTrigger(de=>{this.widget.value.showTriggered(de.auto,de.shy?250:50),this._lineSuffix.value=new B(this.editor.getModel(),de.position)})),this._toDispose.add(this.model.onDidSuggest(de=>{if(de.triggerOptions.shy)return;let ue=-1;for(const z of this._selectors.itemsOrderedByPriorityDesc)if(ue=z.select(this.editor.getModel(),this.editor.getPosition(),de.completionModel.items),ue!==-1)break;ue===-1&&(ue=0);let q=!1;if(de.triggerOptions.auto){const z=this.editor.getOption(114);z.selectionMode==="never"||z.selectionMode==="always"?q=z.selectionMode==="never":z.selectionMode==="whenTriggerCharacter"?q=de.triggerOptions.triggerKind!==1:z.selectionMode==="whenQuickSuggestion"&&(q=de.triggerOptions.triggerKind===1&&!de.triggerOptions.refilter)}this.widget.value.showSuggestions(de.completionModel,ue,de.isFrozen,de.triggerOptions.auto,q)})),this._toDispose.add(this.model.onDidCancel(de=>{de.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{F||(this.model.cancel(),this.model.clear())}));const ce=E.Context.AcceptSuggestionsOnEnter.bindTo(W),he=()=>{const de=this.editor.getOption(1);ce.set(de==="on"||de==="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(ne,se){if(!ne||!ne.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const H=c.SnippetController2.get(this.editor);if(!H)return;const W=this.editor.getModel(),$=W.getAlternativeVersionId(),{item:Z}=ne,Q=[],re=new D.CancellationTokenSource;se&1||this.editor.pushUndoStop();const ce=this.getOverwriteInfo(Z,!!(se&8));if(this._memoryService.memorize(W,this.editor.getPosition(),Z),Array.isArray(Z.completion.additionalTextEdits)){this.model.cancel();const de=i.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",Z.completion.additionalTextEdits.map(ue=>r.EditOperation.replaceMove(h.Range.lift(ue.range),ue.text))),de.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!Z.isResolved){const de=new s.StopWatch(!0);let ue;const q=W.onDidChangeContent(te=>{if(te.isFlush){re.cancel(),q.dispose();return}for(const G of te.changes){const ae=h.Range.getEndPosition(G.range);(!ue||d.Position.isBefore(ae,ue))&&(ue=ae)}}),z=se;se|=2;let U=!1;const X=this.editor.onWillType(()=>{X.dispose(),U=!0,z&2||this.editor.pushUndoStop()});Q.push(Z.resolve(re.token).then(()=>{if(!Z.completion.additionalTextEdits||re.token.isCancellationRequested||ue&&Z.completion.additionalTextEdits.some(G=>d.Position.isBefore(ue,h.Range.getStartPosition(G.range))))return!1;U&&this.editor.pushUndoStop();const te=i.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",Z.completion.additionalTextEdits.map(G=>r.EditOperation.replaceMove(h.Range.lift(G.range),G.text))),te.restoreRelativeVerticalPositionOfCursor(this.editor),(U||!(z&2))&&this.editor.pushUndoStop(),!0}).then(te=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",de.elapsed(),te),q.dispose(),X.dispose()}))}let{insertText:he}=Z.completion;Z.completion.insertTextRules&4||(he=a.SnippetParser.escape(he)),this.model.cancel(),H.insert(he,{overwriteBefore:ce.overwriteBefore,overwriteAfter:ce.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(Z.completion.insertTextRules&1),clipboardText:ne.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),se&2||this.editor.pushUndoStop(),Z.completion.command&&(Z.completion.command.id===A.id?this.model.trigger({auto:!0,retrigger:!0}):Q.push(this._commandService.executeCommand(Z.completion.command.id,...Z.completion.command.arguments?[...Z.completion.command.arguments]:[]).catch(de=>{Z.completion.extensionId?(0,w.onUnexpectedExternalError)(de):(0,w.onUnexpectedError)(de)}))),se&4&&this._alternatives.value.set(ne,de=>{for(re.cancel();W.canUndo();){$!==W.getAlternativeVersionId()&&W.undo(),this._insertSuggestion(de,3|(se&8?8:0));break}}),this._alertCompletionItem(Z),Promise.all(Q).finally(()=>{this._reportSuggestionAcceptedTelemetry(Z,W,ne),this.model.clear(),re.dispose()})}_reportSuggestionAcceptedTelemetry(ne,se,H){var W;if(this._telemetryGate++%100!==0)return;const $=ne.extensionId?ne.extensionId.value:((W=H.item.provider._debugDisplayName)!==null&&W!==void 0?W:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:$,kind:ne.completion.kind,basenameHash:(0,x.hash)((0,P.basename)(se.uri)).toString(16),languageId:se.getLanguageId(),fileExtension:(0,P.extname)(se.uri)})}getOverwriteInfo(ne,se){(0,t.assertType)(this.editor.hasModel());let H=this.editor.getOption(114).insertMode==="replace";se&&(H=!H);const W=ne.position.column-ne.editStart.column,$=(H?ne.editReplaceEnd.column:ne.editInsertEnd.column)-ne.position.column,Z=this.editor.getPosition().column-ne.position.column,Q=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:W+Z,overwriteAfter:$+Q}}_alertCompletionItem(ne){if((0,k.isNonEmptyArray)(ne.completion.additionalTextEdits)){const se=v.localize(0,null,ne.textLabel,ne.completion.additionalTextEdits.length);(0,_.alert)(se)}}triggerSuggest(ne,se,H){this.editor.hasModel()&&(this.model.trigger({auto:se??!1,completionOptions:{providerFilter:ne,kindFilter:H?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(ne){if(!this.editor.hasModel())return;const se=this.editor.getPosition(),H=()=>{se.equals(this.editor.getPosition())&&this._commandService.executeCommand(ne.fallback)},W=$=>{if($.completion.insertTextRules&4||$.completion.additionalTextEdits)return!0;const Z=this.editor.getPosition(),Q=$.editStart.column,re=Z.column;return re-Q!==$.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:Z.lineNumber,startColumn:Q,endLineNumber:Z.lineNumber,endColumn:re})!==$.completion.insertText};b.Event.once(this.model.onDidTrigger)($=>{const Z=[];b.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,g.dispose)(Z),H()},void 0,Z),this.model.onDidSuggest(({completionModel:Q})=>{if((0,g.dispose)(Z),Q.items.length===0){H();return}const re=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),Q.items),ce=Q.items[re];if(!W(ce)){H();return}this.editor.pushUndoStop(),this._insertSuggestion({index:re,item:ce,model:Q},7)},void 0,Z)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(se,0),this.editor.focus()}acceptSelectedSuggestion(ne,se){const H=this.widget.value.getFocusedItem();let W=0;ne&&(W|=4),se&&(W|=8),this._insertSuggestion(H,W)}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(ne){return this._selectors.register(ne)}};V.ID="editor.contrib.suggestController",e.SuggestController=V=Te([ge(1,l.ISuggestMemoryService),ge(2,f.ICommandService),ge(3,p.IContextKeyService),ge(4,C.IInstantiationService),ge(5,y.ILogService),ge(6,N.ITelemetryService)],V);class K{constructor(ne){this.prioritySelector=ne,this._items=new Array}register(ne){if(this._items.indexOf(ne)!==-1)throw new Error("Value is already registered");return this._items.push(ne),this._items.sort((se,H)=>this.prioritySelector(H)-this.prioritySelector(se)),{dispose:()=>{const se=this._items.indexOf(ne);se>=0&&this._items.splice(se,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class A extends n.EditorAction{constructor(){super({id:A.id,label:v.localize(1,null),alias:"Trigger Suggest",precondition:p.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(ne,se,H){const W=V.get(se);if(!W)return;let $;H&&typeof H=="object"&&H.auto===!0&&($=!0),W.triggerSuggest(void 0,$,void 0)}}e.TriggerSuggestAction=A,A.id="editor.action.triggerSuggest",(0,n.registerEditorContribution)(V.ID,V,2),(0,n.registerEditorAction)(A);const Y=100+90,ie=n.EditorCommand.bindToContribution(V.get);(0,n.registerEditorCommand)(new ie({id:"acceptSelectedSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion),handler(le){le.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:p.ContextKeyExpr.and(E.Context.Visible,o.EditorContextKeys.textInputFocus),weight:Y},{primary:3,kbExpr:p.ContextKeyExpr.and(E.Context.Visible,o.EditorContextKeys.textInputFocus,E.Context.AcceptSuggestionsOnEnter,E.Context.MakesTextEdit),weight:Y}],menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,title:v.localize(2,null),group:"left",order:1,when:E.Context.HasInsertAndReplaceRange.toNegated()},{menuId:E.suggestWidgetStatusbarMenu,title:v.localize(3,null),group:"left",order:1,when:p.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("insert"))},{menuId:E.suggestWidgetStatusbarMenu,title:v.localize(4,null),group:"left",order:1,when:p.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("replace"))}]})),(0,n.registerEditorCommand)(new ie({id:"acceptAlternativeSelectedSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,o.EditorContextKeys.textInputFocus,E.Context.HasFocusedSuggestion),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(le){le.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,group:"left",order:2,when:p.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("insert")),title:v.localize(5,null)},{menuId:E.suggestWidgetStatusbarMenu,group:"left",order:2,when:p.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("replace")),title:v.localize(6,null)}]})),f.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,n.registerEditorCommand)(new ie({id:"hideSuggestWidget",precondition:E.Context.Visible,handler:le=>le.cancelSuggestWidget(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),(0,n.registerEditorCommand)(new ie({id:"selectNextSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectNextSuggestion(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,n.registerEditorCommand)(new ie({id:"selectNextPageSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectNextPageSuggestion(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),(0,n.registerEditorCommand)(new ie({id:"selectLastSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectLastSuggestion()})),(0,n.registerEditorCommand)(new ie({id:"selectPrevSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectPrevSuggestion(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,n.registerEditorCommand)(new ie({id:"selectPrevPageSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectPrevPageSuggestion(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),(0,n.registerEditorCommand)(new ie({id:"selectFirstSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectFirstSuggestion()})),(0,n.registerEditorCommand)(new ie({id:"focusSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion.negate()),handler:le=>le.focusSuggestion(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,n.registerEditorCommand)(new ie({id:"focusAndAcceptSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion.negate()),handler:le=>{le.focusSuggestion(),le.acceptSelectedSuggestion(!0,!1)}})),(0,n.registerEditorCommand)(new ie({id:"toggleSuggestionDetails",precondition:p.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion),handler:le=>le.toggleSuggestionDetails(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,group:"right",order:1,when:p.ContextKeyExpr.and(E.Context.DetailsVisible,E.Context.CanResolve),title:v.localize(7,null)},{menuId:E.suggestWidgetStatusbarMenu,group:"right",order:1,when:p.ContextKeyExpr.and(E.Context.DetailsVisible.toNegated(),E.Context.CanResolve),title:v.localize(8,null)}]})),(0,n.registerEditorCommand)(new ie({id:"toggleExplainMode",precondition:E.Context.Visible,handler:le=>le.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,n.registerEditorCommand)(new ie({id:"toggleSuggestionFocus",precondition:E.Context.Visible,handler:le=>le.toggleSuggestionFocus(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),(0,n.registerEditorCommand)(new ie({id:"insertBestCompletion",precondition:p.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,p.ContextKeyExpr.equals("config.editor.tabCompletion","on"),u.WordContextKey.AtEnd,E.Context.Visible.toNegated(),I.SuggestAlternatives.OtherSuggestions.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:(le,ne)=>{le.triggerSuggestAndAcceptBest((0,t.isObject)(ne)?Object.assign({fallback:"tab"},ne):{fallback:"tab"})},kbOpts:{weight:Y,primary:2}})),(0,n.registerEditorCommand)(new ie({id:"insertNextSuggestion",precondition:p.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,p.ContextKeyExpr.equals("config.editor.tabCompletion","on"),I.SuggestAlternatives.OtherSuggestions,E.Context.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:le=>le.acceptNextSuggestion(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:2}})),(0,n.registerEditorCommand)(new ie({id:"insertPrevSuggestion",precondition:p.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,p.ContextKeyExpr.equals("config.editor.tabCompletion","on"),I.SuggestAlternatives.OtherSuggestions,E.Context.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:le=>le.acceptPrevSuggestion(),kbOpts:{weight:Y,kbExpr:o.EditorContextKeys.textInputFocus,primary:1026}})),(0,n.registerEditorAction)(class extends n.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:v.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(le,ne){var se;(se=V.get(ne))===null||se===void 0||se.resetWidgetSize()}})}),define(J[880],ee([1,0,6,2,12,5,27,124,363,364,82,283,16]),function(j,e,_,k,L,D,w,b,S,g,m,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestItemInfo=e.SuggestWidgetAdaptor=void 0;class i extends k.Disposable{get selectedItem(){return this._selectedItem}constructor(h,o,c){super(),this.editor=h,this.suggestControllerPreselector=o,this.checkModelVersion=c,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=(0,m.observableValue)("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(h.onKeyDown(l=>{l.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(h.onKeyUp(l=>{l.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const a=g.SuggestController.get(this.editor);if(a){this._register(a.registerSelector({priority:100,select:(v,f,p)=>{var C;(0,m.transaction)(R=>this.checkModelVersion(R));const y=this.editor.getModel();if(!y)return-1;const E=(C=this.suggestControllerPreselector())===null||C===void 0?void 0:C.removeCommonPrefix(y);if(!E)return-1;const I=L.Position.lift(f),T=p.map((R,M)=>{const P=n.fromSuggestion(a,y,I,R,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(y),x=E.augments(P);return{index:M,valid:x,prefixLength:P.text.length,suggestItem:R}}).filter(R=>R&&R.valid&&R.prefixLength>0),O=(0,t.findMaxBy)(T,(0,t.compareBy)(R=>R.prefixLength,t.numberComparator));return O?O.index:-1}}));let l=!1;const u=()=>{l||(l=!0,this._register(a.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(a.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(a.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(_.Event.once(a.model.onDidTrigger)(v=>{u()}))}this.update(this._isActive)}update(h){const o=this.getSuggestItemInfo();(this._isActive!==h||!r(this._currentSuggestItemInfo,o))&&(this._isActive=h,this._currentSuggestItemInfo=o,(0,m.transaction)(c=>{this.checkModelVersion(c),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,c)}))}getSuggestItemInfo(){const h=g.SuggestController.get(this.editor);if(!h||!this.isSuggestWidgetVisible)return;const o=h.widget.value.getFocusedItem(),c=this.editor.getPosition(),a=this.editor.getModel();if(!(!o||!c||!a))return n.fromSuggestion(h,a,c,o.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const h=g.SuggestController.get(this.editor);h?.stopForceRenderingAbove()}forceRenderingAbove(){const h=g.SuggestController.get(this.editor);h?.forceRenderingAbove()}}e.SuggestWidgetAdaptor=i;class n{static fromSuggestion(h,o,c,a,l){let{insertText:u}=a.completion,v=!1;if(a.completion.insertTextRules&4){const p=new b.SnippetParser().parse(u);p.children.length<100&&S.SnippetSession.adjustWhitespace(o,c,!0,p),u=p.toString(),v=!0}const f=h.getOverwriteInfo(a,l);return new n(D.Range.fromPositions(c.delta(0,-f.overwriteBefore),c.delta(0,Math.max(f.overwriteAfter,0))),u,a.completion.kind,v)}constructor(h,o,c,a){this.range=h,this.insertText=o,this.completionItemKind=c,this.isSnippetText=a}equals(h){return this.range.equalsRange(h.range)&&this.insertText===h.insertText&&this.completionItemKind===h.completionItemKind&&this.isSnippetText===h.isSnippetText}toSelectedSuggestionInfo(){return new w.SelectedSuggestionInfo(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new s.SingleTextEdit(this.range,this.insertText)}}e.SuggestItemInfo=n;function r(d,h){return d===h?!0:!d||!h?!1:d.equals(h)}}),define(J[247],ee([1,0,48,6,2,82,114,184,12,70,19,205,721,230,244,878,880,181,25,28,13,8]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsController=void 0;let u=e.InlineCompletionsController=class mn extends L.Disposable{static get(f){return f.getContribution(mn.ID)}constructor(f,p,C,y,E,I,T,O){super(),this.editor=f,this.instantiationService=p,this.contextKeyService=C,this.configurationService=y,this.commandService=E,this.debounceService=I,this.languageFeaturesService=T,this.audioCueService=O,this.model=(0,w.disposableObservableValue)("inlineCompletionModel",void 0),this.textModelVersionId=(0,D.observableValue)("textModelVersionId",-1),this.cursorPosition=(0,D.observableValue)("cursorPosition",new S.Position(1,1)),this.suggestWidgetAdaptor=this._register(new d.SuggestWidgetAdaptor(this.editor,()=>{var N,P;return(P=(N=this.model.get())===null||N===void 0?void 0:N.selectedInlineCompletion.get())===null||P===void 0?void 0:P.toSingleTextEdit(void 0)},N=>this.updateObservables(N,r.VersionIdChangeReason.Other))),this._enabled=(0,D.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(t.GhostTextWidget,this.editor,{ghostText:this.model.map((N,P)=>N?.ghostText.read(P)),minReservedLineCount:(0,D.constObservable)(0),targetTextModel:this.model.map(N=>N?.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new i.InlineCompletionContextKeys(this.contextKeyService,this.model)),this._register(k.Event.runAndSubscribe(f.onDidChangeModel,()=>(0,w.transaction)(N=>{this.model.set(void 0,N),this.updateObservables(N,r.VersionIdChangeReason.Other);const P=f.getModel();if(P){const x=p.createInstance(r.InlineCompletionsModel,P,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,(0,D.observableFromEvent)(f.onDidChangeConfiguration,()=>f.getOption(114).preview),(0,D.observableFromEvent)(f.onDidChangeConfiguration,()=>f.getOption(114).previewMode),(0,D.observableFromEvent)(f.onDidChangeConfiguration,()=>f.getOption(60).mode),this._enabled);this.model.set(x,N)}})));const R=N=>{var P;return N.isUndoing?r.VersionIdChangeReason.Undo:N.isRedoing?r.VersionIdChangeReason.Redo:!((P=this.model.get())===null||P===void 0)&&P.isAcceptingPartially?r.VersionIdChangeReason.AcceptWord:r.VersionIdChangeReason.Other};this._register(f.onDidChangeModelContent(N=>(0,w.transaction)(P=>this.updateObservables(P,R(N))))),this._register(f.onDidChangeCursorPosition(N=>(0,w.transaction)(P=>{var x;this.updateObservables(P,r.VersionIdChangeReason.Other),N.reason===3&&((x=this.model.get())===null||x===void 0||x.stop(P))}))),this._register(f.onDidType(()=>(0,w.transaction)(N=>{var P;this.updateObservables(N,r.VersionIdChangeReason.Other),this._enabled.get()&&((P=this.model.get())===null||P===void 0||P.trigger(N))}))),this._register(this.commandService.onDidExecuteCommand(N=>{new Set([b.CoreEditingCommands.Tab.id,b.CoreEditingCommands.DeleteLeft.id,b.CoreEditingCommands.DeleteRight.id,s.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(N.commandId)&&f.hasTextFocus()&&this._enabled.get()&&(0,w.transaction)(x=>{var F;(F=this.model.get())===null||F===void 0||F.trigger(x)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||f.getOption(60).keepOnBlur||n.InlineSuggestionHintsContentWidget.dropDownVisible||(0,w.transaction)(N=>{var P;(P=this.model.get())===null||P===void 0||P.stop(N)})})),this._register((0,D.autorun)("forceRenderingAbove",N=>{var P;const x=(P=this.model.read(N))===null||P===void 0?void 0:P.state.read(N);x?.suggestItem?x.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register((0,L.toDisposable)(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let M;this._register((0,D.autorun)("play audio cue & read suggestion",N=>{const P=this.model.read(N),x=P?.state.read(N);if(!P||!x||!x.completion){M=void 0;return}if(x.completion.semanticId!==M){if(M=x.completion.semanticId,P.isNavigatingCurrentInlineCompletion)return;this.audioCueService.playAudioCue(h.AudioCue.inlineSuggestion).then(()=>{if(this.editor.getOption(6)){const F=P.textModel.getLineContent(x.ghostText.lineNumber);(0,_.alert)(x.ghostText.renderForScreenReader(F))}})}})),this._register(new n.InlineCompletionsHintsWidget(this.editor,this.model,this.instantiationService))}updateObservables(f,p){var C,y;const E=this.editor.getModel();this.textModelVersionId.set((C=E?.getVersionId())!==null&&C!==void 0?C:-1,f,p),this.cursorPosition.set((y=this.editor.getPosition())!==null&&y!==void 0?y:new S.Position(1,1),f)}shouldShowHoverAt(f){var p;const C=(p=this.model.get())===null||p===void 0?void 0:p.ghostText.get();return C?C.parts.some(y=>f.containsPosition(new S.Position(C.lineNumber,y.column))):!1}shouldShowHoverAtViewZone(f){return this.ghostTextWidget.ownsViewZone(f)}};u.ID="editor.contrib.inlineCompletionsController",e.InlineCompletionsController=u=Te([ge(1,l.IInstantiationService),ge(2,a.IContextKeyService),ge(3,c.IConfigurationService),ge(4,o.ICommandService),ge(5,g.ILanguageFeatureDebounceService),ge(6,m.ILanguageFeaturesService),ge(7,h.IAudioCueService)],u)}),define(J[881],ee([1,0,82,15,22,205,230,247,650,30,28,13]),function(j,e,_,k,L,D,w,b,S,g,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleAlwaysShowInlineSuggestionToolbar=e.HideInlineCompletion=e.AcceptInlineCompletion=e.AcceptNextLineOfInlineCompletion=e.AcceptNextWordOfInlineCompletion=e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=void 0;class t extends k.EditorAction{constructor(){super({id:t.ID,label:S.localize(0,null),alias:"Show Next Inline Suggestion",precondition:s.ContextKeyExpr.and(L.EditorContextKeys.writable,w.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(l,u){var v;return we(this,void 0,void 0,function*(){const f=b.InlineCompletionsController.get(u);(v=f?.model.get())===null||v===void 0||v.next()})}}e.ShowNextInlineSuggestionAction=t,t.ID=D.showNextInlineSuggestionActionId;class i extends k.EditorAction{constructor(){super({id:i.ID,label:S.localize(1,null),alias:"Show Previous Inline Suggestion",precondition:s.ContextKeyExpr.and(L.EditorContextKeys.writable,w.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(l,u){var v;return we(this,void 0,void 0,function*(){const f=b.InlineCompletionsController.get(u);(v=f?.model.get())===null||v===void 0||v.previous()})}}e.ShowPreviousInlineSuggestionAction=i,i.ID=D.showPreviousInlineSuggestionActionId;class n extends k.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:S.localize(2,null),alias:"Trigger Inline Suggestion",precondition:L.EditorContextKeys.writable})}run(l,u){var v;return we(this,void 0,void 0,function*(){const f=b.InlineCompletionsController.get(u);(v=f?.model.get())===null||v===void 0||v.triggerExplicitly()})}}e.TriggerInlineSuggestionAction=n;class r extends k.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:S.localize(3,null),alias:"Accept Next Word Of Inline Suggestion",precondition:s.ContextKeyExpr.and(L.EditorContextKeys.writable,w.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065},menuOpts:[{menuId:g.MenuId.InlineSuggestionToolbar,title:S.localize(4,null),group:"primary",order:2}]})}run(l,u){var v;return we(this,void 0,void 0,function*(){const f=b.InlineCompletionsController.get(u);(v=f?.model.get())===null||v===void 0||v.acceptNextWord(f.editor)})}}e.AcceptNextWordOfInlineCompletion=r;class d extends k.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:S.localize(5,null),alias:"Accept Next Line Of Inline Suggestion",precondition:s.ContextKeyExpr.and(L.EditorContextKeys.writable,w.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:g.MenuId.InlineSuggestionToolbar,title:S.localize(6,null),group:"secondary",order:2}]})}run(l,u){var v;return we(this,void 0,void 0,function*(){const f=b.InlineCompletionsController.get(u);(v=f?.model.get())===null||v===void 0||v.acceptNextLine(f.editor)})}}e.AcceptNextLineOfInlineCompletion=d;class h extends k.EditorAction{constructor(){super({id:D.inlineSuggestCommitId,label:S.localize(7,null),alias:"Accept Inline Suggestion",precondition:w.InlineCompletionContextKeys.inlineSuggestionVisible,menuOpts:[{menuId:g.MenuId.InlineSuggestionToolbar,title:S.localize(8,null),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:s.ContextKeyExpr.and(w.InlineCompletionContextKeys.inlineSuggestionVisible,L.EditorContextKeys.tabMovesFocus.toNegated(),w.InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize)}})}run(l,u){var v;return we(this,void 0,void 0,function*(){const f=b.InlineCompletionsController.get(u);f&&((v=f.model.get())===null||v===void 0||v.accept(f.editor),f.editor.focus())})}}e.AcceptInlineCompletion=h;class o extends k.EditorAction{constructor(){super({id:o.ID,label:S.localize(9,null),alias:"Hide Inline Suggestion",precondition:w.InlineCompletionContextKeys.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(l,u){return we(this,void 0,void 0,function*(){const v=b.InlineCompletionsController.get(u);(0,_.transaction)(f=>{var p;(p=v?.model.get())===null||p===void 0||p.stop(f)})})}}e.HideInlineCompletion=o,o.ID="editor.action.inlineSuggest.hide";class c extends g.Action2{constructor(){super({id:c.ID,title:S.localize(10,null),f1:!1,precondition:void 0,menu:[{id:g.MenuId.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:s.ContextKeyExpr.equals("config.editor.inlineSuggest.showToolbar","always")})}run(l,u){return we(this,void 0,void 0,function*(){const v=l.get(m.IConfigurationService),p=v.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";v.updateValue("editor.inlineSuggest.showToolbar",p)})}}e.ToggleAlwaysShowInlineSuggestionToolbar=c,c.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}),define(J[882],ee([1,0,7,61,2,82,5,39,95,247,244,128,651,91,8,52,73]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class h{constructor(a,l,u){this.owner=a,this.range=l,this.controller=u}isValidForHoverAnchor(a){return a.type===1&&this.range.startColumn<=a.range.startColumn&&this.range.endColumn>=a.range.endColumn}}e.InlineCompletionsHover=h;let o=e.InlineCompletionsHoverParticipant=class{constructor(a,l,u,v,f,p){this._editor=a,this._languageService=l,this._openerService=u,this.accessibilityService=v,this._instantiationService=f,this._telemetryService=p,this.hoverOrdinal=4}suggestHoverAnchor(a){const l=g.InlineCompletionsController.get(this._editor);if(!l)return null;const u=a.target;if(u.type===8){const v=u.detail;if(l.shouldShowHoverAtViewZone(v.viewZoneId))return new S.HoverForeignElementAnchor(1e3,this,w.Range.fromPositions(this._editor.getModel().validatePosition(v.positionBefore||v.position)),a.event.posx,a.event.posy,!1)}return u.type===7&&l.shouldShowHoverAt(u.range)?new S.HoverForeignElementAnchor(1e3,this,u.range,a.event.posx,a.event.posy,!1):u.type===6&&u.detail.mightBeForeignElement&&l.shouldShowHoverAt(u.range)?new S.HoverForeignElementAnchor(1e3,this,u.range,a.event.posx,a.event.posy,!1):null}computeSync(a,l){if(this._editor.getOption(60).showToolbar==="always")return[];const u=g.InlineCompletionsController.get(this._editor);return u&&u.shouldShowHoverAt(a.range)?[new h(this,a.range,u)]:[]}renderHoverParts(a,l){const u=new L.DisposableStore,v=l[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(a,v,u);const f=v.controller.model.get(),p=this._instantiationService.createInstance(m.InlineSuggestionHintsContentWidget,this._editor,!1,(0,D.constObservable)(null),f.selectedInlineCompletionIndex,f.inlineCompletionsCount,f.selectedInlineCompletion.map(C=>{var y;return(y=C?.inlineCompletion.source.inlineCompletions.commands)!==null&&y!==void 0?y:[]}));return a.fragment.appendChild(p.getDomNode()),f.triggerExplicitly(),u.add(p),u}renderScreenReaderText(a,l,u){const v=_.$,f=v("div.hover-row.markdown-hover"),p=_.append(f,v("div.hover-contents",{["aria-live"]:"assertive"})),C=u.add(new s.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),y=E=>{u.add(C.onDidRenderAsync(()=>{p.className="hover-contents code-hover-contents",a.onContentsChanged()}));const I=t.localize(0,null),T=u.add(C.render(new k.MarkdownString().appendText(I).appendCodeblock("text",E)));p.replaceChildren(T.element)};u.add((0,D.autorun)("update hover",E=>{var I;const T=(I=l.controller.model.read(E))===null||I===void 0?void 0:I.ghostText.read(E);if(T){const O=this._editor.getModel().getLineContent(T.lineNumber);y(T.renderForScreenReader(O))}else _.reset(p)})),a.fragment.appendChild(f)}};e.InlineCompletionsHoverParticipant=o=Te([ge(1,b.ILanguageService),ge(2,r.IOpenerService),ge(3,i.IAccessibilityService),ge(4,n.IInstantiationService),ge(5,d.ITelemetryService)],o)}),define(J[883],ee([1,0,15,95,881,882,247,30]),function(j,e,_,k,L,D,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerEditorContribution)(w.InlineCompletionsController.ID,w.InlineCompletionsController,3),(0,_.registerEditorAction)(L.TriggerInlineSuggestionAction),(0,_.registerEditorAction)(L.ShowNextInlineSuggestionAction),(0,_.registerEditorAction)(L.ShowPreviousInlineSuggestionAction),(0,_.registerEditorAction)(L.AcceptNextWordOfInlineCompletion),(0,_.registerEditorAction)(L.AcceptNextLineOfInlineCompletion),(0,_.registerEditorAction)(L.AcceptInlineCompletion),(0,_.registerEditorAction)(L.HideInlineCompletion),(0,b.registerAction2)(L.ToggleAlwaysShowInlineSuggestionToolbar),k.HoverParticipantRegistry.register(D.InlineCompletionsHoverParticipant)}),define(J[365],ee([1,0,8]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustManagementService=void 0,e.IWorkspaceTrustManagementService=(0,_.createDecorator)("workspaceTrustManagementService")}),define(J[884],ee([1,0,14,26,61,2,17,9,15,41,38,273,111,39,315,95,240,805,681,28,8,52,71,74,365,450]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,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,v.registerIcon)("extensions-warning-message",k.Codicon.warning,o.localize(0,null));let p=e.UnicodeHighlighter=class extends D.Disposable{constructor(ne,se,H,W){super(),this._editor=ne,this._editorWorkerService=se,this._workspaceTrustService=H,this._highlighter=null,this._bannerClosed=!1,this._updateState=$=>{if($&&$.hasMore){if(this._bannerClosed)return;const Z=Math.max($.ambiguousCharacterCount,$.nonBasicAsciiCharacterCount,$.invisibleCharacterCount);let Q;if($.nonBasicAsciiCharacterCount>=Z)Q={message:o.localize(1,null),command:new V};else if($.ambiguousCharacterCount>=Z)Q={message:o.localize(2,null),command:new F};else if($.invisibleCharacterCount>=Z)Q={message:o.localize(3,null),command:new B};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:Q.message,icon:e.warningIcon,actions:[{label:Q.command.shortLabel,href:`command:${Q.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(W.createInstance(h.BannerController,ne)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=ne.getOption(121),this._register(H.onDidChangeTrust($=>{this._updateHighlighter()})),this._register(ne.onDidChangeConfiguration($=>{$.hasChanged(121)&&(this._options=ne.getOption(121),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 ne=C(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([ne.nonBasicASCII,ne.ambiguousCharacters,ne.invisibleCharacters].every(H=>H===!1))return;const se={nonBasicASCII:ne.nonBasicASCII,ambiguousCharacters:ne.ambiguousCharacters,invisibleCharacters:ne.invisibleCharacters,includeComments:ne.includeComments,includeStrings:ne.includeStrings,allowedCodePoints:Object.keys(ne.allowedCharacters).map(H=>H.codePointAt(0)),allowedLocales:Object.keys(ne.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 y(this._editor,se,this._updateState,this._editorWorkerService):this._highlighter=new E(this._editor,se,this._updateState)}getDecorationInfo(ne){return this._highlighter?this._highlighter.getDecorationInfo(ne):null}};p.ID="editor.contrib.unicodeHighlighter",e.UnicodeHighlighter=p=Te([ge(1,t.IEditorWorkerService),ge(2,f.IWorkspaceTrustManagementService),ge(3,a.IInstantiationService)],p);function C(le,ne){return{nonBasicASCII:ne.nonBasicASCII===g.inUntrustedWorkspace?!le:ne.nonBasicASCII,ambiguousCharacters:ne.ambiguousCharacters,invisibleCharacters:ne.invisibleCharacters,includeComments:ne.includeComments===g.inUntrustedWorkspace?!le:ne.includeComments,includeStrings:ne.includeStrings===g.inUntrustedWorkspace?!le:ne.includeStrings,allowedCharacters:ne.allowedCharacters,allowedLocales:ne.allowedLocales}}let y=class extends D.Disposable{constructor(ne,se,H,W){super(),this._editor=ne,this._options=se,this._updateState=H,this._editorWorkerService=W,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new _.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 ne=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(se=>{if(this._model.isDisposed()||this._model.getVersionId()!==ne)return;this._updateState(se);const H=[];if(!se.hasMore)for(const W of se.ranges)H.push({range:W,options:N.instance.getDecorationFromOptions(this._options)});this._decorations.set(H)})}getDecorationInfo(ne){if(!this._decorations.has(ne))return null;const se=this._editor.getModel();if(!(0,n.isModelDecorationVisible)(se,ne))return null;const H=se.getValueInRange(ne.range);return{reason:M(H,this._options),inComment:(0,n.isModelDecorationInComment)(se,ne),inString:(0,n.isModelDecorationInString)(se,ne)}}};y=Te([ge(3,t.IEditorWorkerService)],y);class E extends D.Disposable{constructor(ne,se,H){super(),this._editor=ne,this._options=se,this._updateState=H,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new _.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 ne=this._editor.getVisibleRanges(),se=[],H={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const W of ne){const $=s.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,W);for(const Z of $.ranges)H.ranges.push(Z);H.ambiguousCharacterCount+=H.ambiguousCharacterCount,H.invisibleCharacterCount+=H.invisibleCharacterCount,H.nonBasicAsciiCharacterCount+=H.nonBasicAsciiCharacterCount,H.hasMore=H.hasMore||$.hasMore}if(!H.hasMore)for(const W of H.ranges)se.push({range:W,options:N.instance.getDecorationFromOptions(this._options)});this._updateState(H),this._decorations.set(se)}getDecorationInfo(ne){if(!this._decorations.has(ne))return null;const se=this._editor.getModel(),H=se.getValueInRange(ne.range);return(0,n.isModelDecorationVisible)(se,ne)?{reason:M(H,this._options),inComment:(0,n.isModelDecorationInComment)(se,ne),inString:(0,n.isModelDecorationInString)(se,ne)}:null}}let I=e.UnicodeHighlighterHoverParticipant=class{constructor(ne,se,H){this._editor=ne,this._languageService=se,this._openerService=H,this.hoverOrdinal=5}computeSync(ne,se){if(!this._editor.hasModel()||ne.type!==1)return[];const H=this._editor.getModel(),W=this._editor.getContribution(p.ID);if(!W)return[];const $=[];let Z=300;for(const Q of se){const re=W.getDecorationInfo(Q);if(!re)continue;const he=H.getValueInRange(Q.range).codePointAt(0),de=O(he);let ue;switch(re.reason.kind){case 0:{(0,b.isBasicASCII)(re.reason.confusableWith)?ue=o.localize(4,null,de,O(re.reason.confusableWith.codePointAt(0))):ue=o.localize(5,null,de,O(re.reason.confusableWith.codePointAt(0)));break}case 1:ue=o.localize(6,null,de);break;case 2:ue=o.localize(7,null,de);break}const q={codePoint:he,reason:re.reason,inComment:re.inComment,inString:re.inString},z=o.localize(8,null),U=`command:${K.ID}?${encodeURIComponent(JSON.stringify(q))}`,X=new L.MarkdownString("",!0).appendMarkdown(ue).appendText(" ").appendLink(U,z);$.push(new d.MarkdownHover(this,Q.range,[X],!1,Z++))}return $}renderHoverParts(ne,se){return(0,d.renderMarkdownHovers)(ne,se,this._editor,this._languageService,this._openerService)}};e.UnicodeHighlighterHoverParticipant=I=Te([ge(1,i.ILanguageService),ge(2,l.IOpenerService)],I);function T(le){return`U+${le.toString(16).padStart(4,"0")}`}function O(le){let ne=`\\`${T(le)}\\``;return b.InvisibleCharacters.isInvisibleCharacter(le)||(ne+=` "${`${R(le)}`}"`),ne}function R(le){return le===96?"`` ` ``":"`"+String.fromCodePoint(le)+"`"}function M(le,ne){return s.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(le,ne)}class N{constructor(){this.map=new Map}getDecorationFromOptions(ne){return this.getDecoration(!ne.includeComments,!ne.includeStrings)}getDecoration(ne,se){const H=`${ne}${se}`;let W=this.map.get(H);return W||(W=m.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:ne,hideInStringTokens:se}),this.map.set(H,W)),W}}N.instance=new N;class P extends S.EditorAction{constructor(){super({id:F.ID,label:o.localize(10,null),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=o.localize(9,null)}run(ne,se,H){return we(this,void 0,void 0,function*(){const W=ne?.get(c.IConfigurationService);W&&this.runAction(W)})}runAction(ne){return we(this,void 0,void 0,function*(){yield ne.updateValue(g.unicodeHighlightConfigKeys.includeComments,!1,2)})}}e.DisableHighlightingInCommentsAction=P;class x extends S.EditorAction{constructor(){super({id:F.ID,label:o.localize(12,null),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=o.localize(11,null)}run(ne,se,H){return we(this,void 0,void 0,function*(){const W=ne?.get(c.IConfigurationService);W&&this.runAction(W)})}runAction(ne){return we(this,void 0,void 0,function*(){yield ne.updateValue(g.unicodeHighlightConfigKeys.includeStrings,!1,2)})}}e.DisableHighlightingInStringsAction=x;class F extends S.EditorAction{constructor(){super({id:F.ID,label:o.localize(14,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=o.localize(13,null)}run(ne,se,H){return we(this,void 0,void 0,function*(){const W=ne?.get(c.IConfigurationService);W&&this.runAction(W)})}runAction(ne){return we(this,void 0,void 0,function*(){yield ne.updateValue(g.unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)})}}e.DisableHighlightingOfAmbiguousCharactersAction=F,F.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class B extends S.EditorAction{constructor(){super({id:B.ID,label:o.localize(16,null),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=o.localize(15,null)}run(ne,se,H){return we(this,void 0,void 0,function*(){const W=ne?.get(c.IConfigurationService);W&&this.runAction(W)})}runAction(ne){return we(this,void 0,void 0,function*(){yield ne.updateValue(g.unicodeHighlightConfigKeys.invisibleCharacters,!1,2)})}}e.DisableHighlightingOfInvisibleCharactersAction=B,B.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class V extends S.EditorAction{constructor(){super({id:V.ID,label:o.localize(18,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=o.localize(17,null)}run(ne,se,H){return we(this,void 0,void 0,function*(){const W=ne?.get(c.IConfigurationService);W&&this.runAction(W)})}runAction(ne){return we(this,void 0,void 0,function*(){yield ne.updateValue(g.unicodeHighlightConfigKeys.nonBasicASCII,!1,2)})}}e.DisableHighlightingOfNonBasicAsciiCharactersAction=V,V.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class K extends S.EditorAction{constructor(){super({id:K.ID,label:o.localize(19,null),alias:"Show Exclude Options",precondition:void 0})}run(ne,se,H){return we(this,void 0,void 0,function*(){const{codePoint:W,reason:$,inString:Z,inComment:Q}=H,re=String.fromCodePoint(W),ce=ne.get(u.IQuickInputService),he=ne.get(c.IConfigurationService);function de(z){return b.InvisibleCharacters.isInvisibleCharacter(z)?o.localize(20,null,T(z)):o.localize(21,null,`${T(z)} "${re}"`)}const ue=[];if($.kind===0)for(const z of $.notAmbiguousInLocales)ue.push({label:o.localize(22,null,z),run:()=>we(this,void 0,void 0,function*(){Y(he,[z])})});if(ue.push({label:de(W),run:()=>A(he,[W])}),Q){const z=new P;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(he)})})}else if(Z){const z=new x;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(he)})})}if($.kind===0){const z=new F;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(he)})})}else if($.kind===1){const z=new B;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(he)})})}else if($.kind===2){const z=new V;ue.push({label:z.label,run:()=>we(this,void 0,void 0,function*(){return z.runAction(he)})})}else ie($);const q=yield ce.pick(ue,{title:o.localize(23,null)});q&&(yield q.run())})}}e.ShowExcludeOptions=K,K.ID="editor.action.unicodeHighlight.showExcludeOptions";function A(le,ne){return we(this,void 0,void 0,function*(){const se=le.getValue(g.unicodeHighlightConfigKeys.allowedCharacters);let H;typeof se=="object"&&se?H=se:H={};for(const W of ne)H[String.fromCodePoint(W)]=!0;yield le.updateValue(g.unicodeHighlightConfigKeys.allowedCharacters,H,2)})}function Y(le,ne){var se;return we(this,void 0,void 0,function*(){const H=(se=le.inspect(g.unicodeHighlightConfigKeys.allowedLocales).user)===null||se===void 0?void 0:se.value;let W;typeof H=="object"&&H?W=Object.assign({},H):W={};for(const $ of ne)W[$]=!0;yield le.updateValue(g.unicodeHighlightConfigKeys.allowedLocales,W,2)})}function ie(le){throw new Error(`Unexpected value: ${le}`)}(0,S.registerEditorAction)(F),(0,S.registerEditorAction)(B),(0,S.registerEditorAction)(V),(0,S.registerEditorAction)(K),(0,S.registerEditorContribution)(p.ID,p,1),r.HoverParticipantRegistry.register(I)}),define(J[885],ee([1,0,184,188,348,232,765,841,766,767,768,799,843,867,851,769,874,770,844,875,876,351,352,773,774,740,883,245,246,357,355,358,776,869,852,777,778,855,856,779,861,804,826,827,828,781,190,871,364,782,783,334,884,784,862,341,785,780,84,166]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(J[248],ee([1,0,9,7,44,6,113,2,17,104,21,125,329,65,12,5,50,62,180,25,28,333,13,154,8,731,34,323,112,324,732,155,43,80,73,159,127,84,42,32,63,365,55,734,751,835,49,739,111,234,39,821,228,838,837,347,126,733,91,30,761,735,97,728,227,729,182,186,92,738,52,71,85,755,181,736,142,11,29,346,325,873,70,822,718]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T,O,R,M,N,P,x,F,B,V,K,A,Y,ie,le,ne,se,H,W,$,Z,Q,re,ce,he,de,ue,q,z,U,X,te,G,ae,fe,Ce,Se,ye,Ie,Ee,ke,Ae,Pe,_e,me,oe,pe,Le){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.updateConfigurationService=e.StandaloneConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.StandaloneNotificationService=void 0;class ve{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 be=class{constructor(Re){this.modelService=Re}createModelReference(Re){const We=this.modelService.getModel(Re);return We?Promise.resolve(new b.ImmortalReference(new ve(We))):Promise.reject(new Error("Model not found"))}};be=Te([ge(0,d.IModelService)],be);class De{show(){return De.NULL_PROGRESS_RUNNER}showWhile(Re,We){return we(this,void 0,void 0,function*(){yield Re})}}De.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Me{withProgress(Re,We,je){return We({report:()=>{}})}}class Oe{confirm(Re){return we(this,void 0,void 0,function*(){return{confirmed:this.doConfirm(Re.message,Re.detail),checkboxChecked:!1}})}doConfirm(Re,We){let je=Re;return We&&(je=je+`\n\n`+We),window.confirm(je)}prompt(Re){var We,je;return we(this,void 0,void 0,function*(){let qe;if(this.doConfirm(Re.message,Re.detail)){const Qe=[...(We=Re.buttons)!==null&&We!==void 0?We:[]];Re.cancelButton&&typeof Re.cancelButton!="string"&&typeof Re.cancelButton!="boolean"&&Qe.push(Re.cancelButton),qe=yield(je=Qe[0])===null||je===void 0?void 0:je.run({checkboxChecked:!1})}return{result:qe}})}error(Re,We){return we(this,void 0,void 0,function*(){yield this.prompt({type:g.default.Error,message:Re,detail:We})})}}class xe{info(Re){return this.notify({severity:g.default.Info,message:Re})}warn(Re){return this.notify({severity:g.default.Warning,message:Re})}error(Re){return this.notify({severity:g.default.Error,message:Re})}notify(Re){switch(Re.severity){case g.default.Error:console.error(Re.message);break;case g.default.Warning:console.warn(Re.message);break;default:console.log(Re.message);break}return xe.NO_OP}prompt(Re,We,je,qe){return xe.NO_OP}status(Re,We){return b.Disposable.None}}e.StandaloneNotificationService=xe,xe.NO_OP=new R.NoOpNotification;let Fe=e.StandaloneCommandService=class{constructor(Re){this._onWillExecuteCommand=new D.Emitter,this._onDidExecuteCommand=new D.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=Re}executeCommand(Re,...We){const je=c.CommandsRegistry.getCommand(Re);if(!je)return Promise.reject(new Error(`command \'${Re}\' not found`));try{this._onWillExecuteCommand.fire({commandId:Re,args:We});const qe=this._instantiationService.invokeFunction.apply(this._instantiationService,[je.handler,...We]);return this._onDidExecuteCommand.fire({commandId:Re,args:We}),Promise.resolve(qe)}catch(qe){return Promise.reject(qe)}}};e.StandaloneCommandService=Fe=Te([ge(0,f.IInstantiationService)],Fe);let Ue=e.StandaloneKeybindingService=class extends p.AbstractKeybindingService{constructor(Re,We,je,qe,nt,Qe){super(Re,We,je,qe,nt),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const st=ct=>{const Ct=new b.DisposableStore;Ct.add(k.addDisposableListener(ct,k.EventType.KEY_DOWN,Dt=>{const It=new L.StandardKeyboardEvent(Dt);this._dispatch(It,It.target)&&(It.preventDefault(),It.stopPropagation())})),Ct.add(k.addDisposableListener(ct,k.EventType.KEY_UP,Dt=>{const It=new L.StandardKeyboardEvent(Dt);this._singleModifierDispatch(It,It.target)&&It.preventDefault()})),this._domNodeListeners.push(new Be(ct,Ct))},ot=ct=>{for(let Ct=0;Ct<this._domNodeListeners.length;Ct++){const Dt=this._domNodeListeners[Ct];Dt.domNode===ct&&(this._domNodeListeners.splice(Ct,1),Dt.dispose())}},lt=ct=>{ct.getOption(59)||st(ct.getContainerDomNode())},pt=ct=>{ct.getOption(59)||ot(ct.getContainerDomNode())};this._register(Qe.onCodeEditorAdd(lt)),this._register(Qe.onCodeEditorRemove(pt)),Qe.listCodeEditors().forEach(lt);const ft=ct=>{st(ct.getContainerDomNode())},_t=ct=>{ot(ct.getContainerDomNode())};this._register(Qe.onDiffEditorAdd(ft)),this._register(Qe.onDiffEditorRemove(_t)),Qe.listDiffEditors().forEach(ft)}addDynamicKeybinding(Re,We,je,qe){return(0,b.combinedDisposable)(c.CommandsRegistry.registerCommand(Re,je),this.addDynamicKeybindings([{keybinding:We,command:Re,when:qe}]))}addDynamicKeybindings(Re){const We=Re.map(je=>{var qe;return{keybinding:(0,w.decodeKeybinding)(je.keybinding,S.OS),command:(qe=je.command)!==null&&qe!==void 0?qe:null,commandArgs:je.commandArgs,when:je.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(We),this.updateResolver(),(0,b.toDisposable)(()=>{for(let je=0;je<this._dynamicKeybindings.length;je++)if(this._dynamicKeybindings[je]===We[0]){this._dynamicKeybindings.splice(je,We.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const Re=this._toNormalizedKeybindingItems(E.KeybindingsRegistry.getDefaultKeybindings(),!0),We=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new y.KeybindingResolver(Re,We,je=>this._log(je))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(Re,We){const je=[];let qe=0;for(const nt of Re){const Qe=nt.when||void 0,st=nt.keybinding;if(!st)je[qe++]=new I.ResolvedKeybindingItem(void 0,nt.command,nt.commandArgs,Qe,We,null,!1);else{const ot=T.USLayoutResolvedKeybinding.resolveKeybinding(st,S.OS);for(const lt of ot)je[qe++]=new I.ResolvedKeybindingItem(lt,nt.command,nt.commandArgs,Qe,We,null,!1)}}return je}resolveKeyboardEvent(Re){const We=new w.KeyCodeChord(Re.ctrlKey,Re.shiftKey,Re.altKey,Re.metaKey,Re.keyCode);return new T.USLayoutResolvedKeybinding([We],S.OS)}};e.StandaloneKeybindingService=Ue=Te([ge(0,u.IContextKeyService),ge(1,c.ICommandService),ge(2,N.ITelemetryService),ge(3,R.INotificationService),ge(4,K.ILogService),ge(5,V.ICodeEditorService)],Ue);class Be extends b.Disposable{constructor(Re,We){super(),this.domNode=Re,this._register(We)}}function Ke(Ge){return Ge&&typeof Ge=="object"&&(!Ge.overrideIdentifier||typeof Ge.overrideIdentifier=="string")&&(!Ge.resource||Ge.resource instanceof m.URI)}class Ye{constructor(){this._onDidChangeConfiguration=new D.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const Re=new _e.DefaultConfiguration;this._configuration=new l.Configuration(Re.reload(),new l.ConfigurationModel,new l.ConfigurationModel,new l.ConfigurationModel),Re.dispose()}getValue(Re,We){const je=typeof Re=="string"?Re:void 0,qe=Ke(Re)?Re:Ke(We)?We:{};return this._configuration.getValue(je,qe,void 0)}updateValues(Re){const We={data:this._configuration.toData()},je=[];for(const qe of Re){const[nt,Qe]=qe;this.getValue(nt)!==Qe&&(this._configuration.updateValue(nt,Qe),je.push(nt))}if(je.length>0){const qe=new l.ConfigurationChangeEvent({keys:je,overrides:[]},We,this._configuration);qe.source=8,qe.sourceConfig=null,this._onDidChangeConfiguration.fire(qe)}return Promise.resolve()}updateValue(Re,We,je,qe){return this.updateValues([[Re,We]])}inspect(Re,We={}){return this._configuration.inspect(Re,We,void 0)}}e.StandaloneConfigurationService=Ye;let He=class{constructor(Re,We,je){this.configurationService=Re,this.modelService=We,this.languageService=je,this._onDidChangeConfiguration=new D.Emitter,this.configurationService.onDidChangeConfiguration(qe=>{this._onDidChangeConfiguration.fire({affectedKeys:qe.affectedKeys,affectsConfiguration:(nt,Qe)=>qe.affectsConfiguration(Qe)})})}getValue(Re,We,je){const qe=n.Position.isIPosition(We)?We:null,nt=qe?typeof je=="string"?je:void 0:typeof We=="string"?We:void 0,Qe=Re?this.getLanguage(Re,qe):void 0;return typeof nt>"u"?this.configurationService.getValue({resource:Re,overrideIdentifier:Qe}):this.configurationService.getValue(nt,{resource:Re,overrideIdentifier:Qe})}getLanguage(Re,We){const je=this.modelService.getModel(Re);return je?We?je.getLanguageIdAtPosition(We.lineNumber,We.column):je.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(Re)}};He=Te([ge(0,a.IConfigurationService),ge(1,d.IModelService),ge(2,Z.ILanguageService)],He);let Ne=class{constructor(Re){this.configurationService=Re}getEOL(Re,We){const je=this.configurationService.getValue("files.eol",{overrideIdentifier:We,resource:Re});return je&&typeof je=="string"&&je!=="auto"?je:S.isLinux||S.isMacintosh?`\n`:`\\r\n`}};Ne=Te([ge(0,a.IConfigurationService)],Ne);class ze{publicLog2(){}}class Ve{constructor(){const Re=m.URI.from({scheme:Ve.SCHEME,authority:"model",path:"/"});this.workspace={id:P.STANDALONE_EDITOR_WORKSPACE_ID,folders:[new P.WorkspaceFolder({uri:Re,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(Re){return Re&&Re.scheme===Ve.SCHEME?this.workspace.folders[0]:null}}Ve.SCHEME="inmemory";function Ze(Ge,Re,We){if(!Re||!(Ge instanceof Ye))return;const je=[];Object.keys(Re).forEach(qe=>{(0,t.isEditorConfigurationKey)(qe)&&je.push([`editor.${qe}`,Re[qe]]),We&&(0,t.isDiffEditorConfigurationKey)(qe)&&je.push([`diffEditor.${qe}`,Re[qe]])}),je.length>0&&Ge.updateValues(je)}e.updateConfigurationService=Ze;let tt=class{constructor(Re){this._modelService=Re}hasPreviewHandler(){return!1}apply(Re,We){return we(this,void 0,void 0,function*(){const je=Array.isArray(Re)?Re:s.ResourceEdit.convert(Re),qe=new Map;for(const st of je){if(!(st instanceof s.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const ot=this._modelService.getModel(st.resource);if(!ot)throw new Error("bad edit - model not found");if(typeof st.versionId=="number"&&ot.getVersionId()!==st.versionId)throw new Error("bad state - model changed in the meantime");let lt=qe.get(ot);lt||(lt=[],qe.set(ot,lt)),lt.push(i.EditOperation.replaceMove(r.Range.lift(st.textEdit.range),st.textEdit.text))}let nt=0,Qe=0;for(const[st,ot]of qe)st.pushStackElement(),st.pushEditOperations([],ot,()=>[]),st.pushStackElement(),Qe+=1,nt+=ot.length;return{ariaSummary:_.format(F.StandaloneServicesNLS.bulkEditServiceSummary,nt,Qe),isApplied:nt>0}})}};tt=Te([ge(0,d.IModelService)],tt);class Je{getUriLabel(Re,We){return Re.scheme==="file"?Re.fsPath:Re.path}getUriBasenameLabel(Re){return(0,B.basename)(Re)}}let et=class extends ie.ContextViewService{constructor(Re,We){super(Re),this._codeEditorService=We}showContextView(Re,We,je){if(!We){const qe=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();qe&&(We=qe.getContainerDomNode())}return super.showContextView(Re,We,je)}};et=Te([ge(0,x.ILayoutService),ge(1,V.ICodeEditorService)],et);class $e{constructor(){this._neverEmitter=new D.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class dt extends le.LanguageService{constructor(){super()}}class at extends oe.LogService{constructor(){super(new K.ConsoleLogger)}}let rt=class extends ne.ContextMenuService{constructor(Re,We,je,qe,nt,Qe){super(Re,We,je,qe,nt,Qe),this.configure({blockMouse:!1})}};rt=Te([ge(0,N.ITelemetryService),ge(1,R.INotificationService),ge(2,Y.IContextViewService),ge(3,C.IKeybindingService),ge(4,U.IMenuService),ge(5,u.IContextKeyService)],rt);class ht{playAudioCue(Re,We){return we(this,void 0,void 0,function*(){})}}(0,se.registerSingleton)(a.IConfigurationService,Ye,0),(0,se.registerSingleton)(o.ITextResourceConfigurationService,He,0),(0,se.registerSingleton)(o.ITextResourcePropertiesService,Ne,0),(0,se.registerSingleton)(P.IWorkspaceContextService,Ve,0),(0,se.registerSingleton)(O.ILabelService,Je,0),(0,se.registerSingleton)(N.ITelemetryService,ze,0),(0,se.registerSingleton)(v.IDialogService,Oe,0),(0,se.registerSingleton)(R.INotificationService,xe,0),(0,se.registerSingleton)(Ie.IMarkerService,Ee.MarkerService,0),(0,se.registerSingleton)(Z.ILanguageService,dt,0),(0,se.registerSingleton)(ue.IStandaloneThemeService,de.StandaloneThemeService,0),(0,se.registerSingleton)(K.ILogService,at,0),(0,se.registerSingleton)(d.IModelService,ce.ModelService,0),(0,se.registerSingleton)(re.IMarkerDecorationsService,Q.MarkerDecorationsService,0),(0,se.registerSingleton)(u.IContextKeyService,ae.ContextKeyService,0),(0,se.registerSingleton)(M.IProgressService,Me,0),(0,se.registerSingleton)(M.IEditorProgressService,De,0),(0,se.registerSingleton)(Pe.IStorageService,Pe.InMemoryStorageService,0),(0,se.registerSingleton)(W.IEditorWorkerService,$.EditorWorkerService,0),(0,se.registerSingleton)(s.IBulkEditService,tt,0),(0,se.registerSingleton)(A.IWorkspaceTrustManagementService,$e,0),(0,se.registerSingleton)(h.ITextModelService,be,0),(0,se.registerSingleton)(z.IAccessibilityService,q.AccessibilityService,0),(0,se.registerSingleton)(ye.IListService,ye.ListService,0),(0,se.registerSingleton)(c.ICommandService,Fe,0),(0,se.registerSingleton)(C.IKeybindingService,Ue,0),(0,se.registerSingleton)(Ae.IQuickInputService,he.StandaloneQuickInputService,0),(0,se.registerSingleton)(Y.IContextViewService,et,0),(0,se.registerSingleton)(ke.IOpenerService,H.OpenerService,0),(0,se.registerSingleton)(G.IClipboardService,te.BrowserClipboardService,0),(0,se.registerSingleton)(Y.IContextMenuService,rt,0),(0,se.registerSingleton)(U.IMenuService,X.MenuService,0),(0,se.registerSingleton)(me.IAudioCueService,ht,0);var Xe;(function(Ge){const Re=new Se.ServiceCollection;for(const[Qe,st]of(0,se.getSingletonServiceDescriptors)())Re.set(Qe,st);const We=new Ce.InstantiationService(Re,!0);Re.set(f.IInstantiationService,We);function je(Qe){const st=Re.get(Qe);if(!st)throw new Error("Missing service "+Qe);return st instanceof fe.SyncDescriptor?We.invokeFunction(ot=>ot.get(Qe)):st}Ge.get=je;let qe=!1;function nt(Qe){if(qe)return We;qe=!0;for(const[ot,lt]of(0,se.getSingletonServiceDescriptors)())Re.get(ot)||Re.set(ot,lt);for(const ot in Qe)if(Qe.hasOwnProperty(ot)){const lt=(0,f.createDecorator)(ot);Re.get(lt)instanceof fe.SyncDescriptor&&Re.set(lt,Qe[ot])}const st=(0,pe.getEditorFeatures)();for(const ot of st)try{We.createInstance(ot)}catch(lt){(0,Le.onUnexpectedError)(lt)}return We}Ge.initialize=nt})(Xe||(e.StandaloneServices=Xe={}))}),define(J[886],ee([1,0,48,2,32,188,348,265,248,126,30,25,28,13,55,8,34,43,23,91,84,97,80,50,39,346,72,29,19]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,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 O(F){if(!F){if(T)return;T=!0}_.setARIAContainer(F||document.body)}let R=e.StandaloneCodeEditor=class extends D.CodeEditorWidget{constructor(B,V,K,A,Y,ie,le,ne,se,H,W,$){const Z=Object.assign({},V);Z.ariaLabel=Z.ariaLabel||a.StandaloneCodeEditorNLS.editorViewAccessibleLabel,Z.ariaLabel=Z.ariaLabel+";"+a.StandaloneCodeEditorNLS.accessibilityHelpMessage,super(B,Z,{},K,A,Y,ie,ne,se,H,W,$),le instanceof S.StandaloneKeybindingService?this._standaloneKeybindingService=le:this._standaloneKeybindingService=null,O(Z.ariaContainerElement)}addCommand(B,V,K){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const A="DYNAMIC_"+ ++I,Y=i.ContextKeyExpr.deserialize(K);return this._standaloneKeybindingService.addDynamicKeybinding(A,B,V,Y),A}createContextKey(B,V){return this._contextKeyService.createKey(B,V)}addAction(B){if(typeof B.id!="string"||typeof B.label!="string"||typeof B.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 V=B.id,K=B.label,A=i.ContextKeyExpr.and(i.ContextKeyExpr.equals("editorId",this.getId()),i.ContextKeyExpr.deserialize(B.precondition)),Y=B.keybindings,ie=i.ContextKeyExpr.and(A,i.ContextKeyExpr.deserialize(B.keybindingContext)),le=B.contextMenuGroupId||null,ne=B.contextMenuOrder||0,se=(Z,...Q)=>Promise.resolve(B.run(this,...Q)),H=new k.DisposableStore,W=this.getId()+":"+V;if(H.add(s.CommandsRegistry.registerCommand(W,se)),le){const Z={command:{id:W,title:K},when:A,group:le,order:ne};H.add(m.MenuRegistry.appendMenuItem(m.MenuId.EditorContext,Z))}if(Array.isArray(Y))for(const Z of Y)H.add(this._standaloneKeybindingService.addDynamicKeybinding(W,Z,se,ie));const $=new b.InternalEditorAction(W,K,K,A,(...Z)=>Promise.resolve(B.run(this,...Z)),this._contextKeyService);return this._actions.set(V,$),H.add((0,k.toDisposable)(()=>{this._actions.delete(V)})),H}_triggerCommand(B,V){if(this._codeEditorService instanceof p.StandaloneCodeEditorService)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(B,V)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(B,V)}};e.StandaloneCodeEditor=R=Te([ge(2,r.IInstantiationService),ge(3,L.ICodeEditorService),ge(4,s.ICommandService),ge(5,i.IContextKeyService),ge(6,d.IKeybindingService),ge(7,o.IThemeService),ge(8,h.INotificationService),ge(9,c.IAccessibilityService),ge(10,y.ILanguageConfigurationService),ge(11,E.ILanguageFeaturesService)],R);let M=e.StandaloneEditor=class extends R{constructor(B,V,K,A,Y,ie,le,ne,se,H,W,$,Z,Q,re){const ce=Object.assign({},V);(0,S.updateConfigurationService)(H,ce,!1);const he=ne.registerEditorContainer(B);typeof ce.theme=="string"&&ne.setTheme(ce.theme),typeof ce.autoDetectHighContrast<"u"&&ne.setAutoDetectHighContrast(!!ce.autoDetectHighContrast);const de=ce.model;delete ce.model,super(B,ce,K,A,Y,ie,le,ne,se,W,Q,re),this._configurationService=H,this._standaloneThemeService=ne,this._register(he);let ue;if(typeof de>"u"){const q=Z.getLanguageIdByMimeType(ce.language)||ce.language||C.PLAINTEXT_LANGUAGE_ID;ue=P($,Z,ce.value||"",q,void 0),this._ownsModel=!0}else ue=de,this._ownsModel=!1;if(this._attachModel(ue),ue){const q={oldModelUrl:null,newModelUrl:ue.uri};this._onDidChangeModel.fire(q)}}dispose(){super.dispose()}updateOptions(B){(0,S.updateConfigurationService)(this._configurationService,B,!1),typeof B.theme=="string"&&this._standaloneThemeService.setTheme(B.theme),typeof B.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!B.autoDetectHighContrast),super.updateOptions(B)}_postDetachModelCleanup(B){super._postDetachModelCleanup(B),B&&this._ownsModel&&(B.dispose(),this._ownsModel=!1)}};e.StandaloneEditor=M=Te([ge(2,r.IInstantiationService),ge(3,L.ICodeEditorService),ge(4,s.ICommandService),ge(5,i.IContextKeyService),ge(6,d.IKeybindingService),ge(7,g.IStandaloneThemeService),ge(8,h.INotificationService),ge(9,t.IConfigurationService),ge(10,c.IAccessibilityService),ge(11,v.IModelService),ge(12,f.ILanguageService),ge(13,y.ILanguageConfigurationService),ge(14,E.ILanguageFeaturesService)],M);let N=e.StandaloneDiffEditor=class extends w.DiffEditorWidget{constructor(B,V,K,A,Y,ie,le,ne,se,H,W){const $=Object.assign({},V);(0,S.updateConfigurationService)(ne,$,!0);const Z=ie.registerEditorContainer(B);typeof $.theme=="string"&&ie.setTheme($.theme),typeof $.autoDetectHighContrast<"u"&&ie.setAutoDetectHighContrast(!!$.autoDetectHighContrast),super(B,$,{},W,A,K,Y,ie,le,se,H),this._configurationService=ne,this._standaloneThemeService=ie,this._register(Z)}dispose(){super.dispose()}updateOptions(B){(0,S.updateConfigurationService)(this._configurationService,B,!0),typeof B.theme=="string"&&this._standaloneThemeService.setTheme(B.theme),typeof B.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!B.autoDetectHighContrast),super.updateOptions(B)}_createInnerEditor(B,V,K){return B.createInstance(R,V,K)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(B,V,K){return this.getModifiedEditor().addCommand(B,V,K)}createContextKey(B,V){return this.getModifiedEditor().createContextKey(B,V)}addAction(B){return this.getModifiedEditor().addAction(B)}};e.StandaloneDiffEditor=N=Te([ge(2,r.IInstantiationService),ge(3,i.IContextKeyService),ge(4,L.ICodeEditorService),ge(5,g.IStandaloneThemeService),ge(6,h.INotificationService),ge(7,t.IConfigurationService),ge(8,n.IContextMenuService),ge(9,u.IEditorProgressService),ge(10,l.IClipboardService)],N);function P(F,B,V,K,A){if(V=V||"",!K){const Y=V.indexOf(`\n`);let ie=V;return Y!==-1&&(ie=V.substring(0,Y)),x(F,V,B.createByFilepathOrFirstLine(A||null,ie),A)}return x(F,V,B.createById(K),A)}e.createTextModel=P;function x(F,B,V,K){return F.createModel(B,V,K)}}),define(J[887],ee([1,0,2,9,21,314,32,232,41,226,171,46,27,29,152,39,50,746,201,723,886,248,126,25,92,34,15,30,13,72,141,87,151,52,457]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,r,d,h,o,c,a,l,u,v,f,p,C,y,E,I,T,O,R,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoEditorAPI=e.registerEditorOpener=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(Ee,ke,Ae){return l.StandaloneServices.initialize(Ae||{}).createInstance(a.StandaloneEditor,Ee,ke)}e.create=N;function P(Ee){return l.StandaloneServices.get(w.ICodeEditorService).onCodeEditorAdd(Ae=>{Ee(Ae)})}e.onDidCreateEditor=P;function x(Ee){return l.StandaloneServices.get(w.ICodeEditorService).onDiffEditorAdd(Ae=>{Ee(Ae)})}e.onDidCreateDiffEditor=x;function F(){return l.StandaloneServices.get(w.ICodeEditorService).listCodeEditors()}e.getEditors=F;function B(){return l.StandaloneServices.get(w.ICodeEditorService).listDiffEditors()}e.getDiffEditors=B;function V(Ee,ke,Ae){return l.StandaloneServices.initialize(Ae||{}).createInstance(a.StandaloneDiffEditor,Ee,ke)}e.createDiffEditor=V;function K(Ee,ke){return l.StandaloneServices.initialize({}).createInstance(b.DiffNavigator,Ee,ke)}e.createDiffNavigator=K;function A(Ee){if(typeof Ee.id!="string"||typeof Ee.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return v.CommandsRegistry.registerCommand(Ee.id,Ee.run)}e.addCommand=A;function Y(Ee){if(typeof Ee.id!="string"||typeof Ee.label!="string"||typeof Ee.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const ke=E.ContextKeyExpr.deserialize(Ee.precondition),Ae=(_e,...me)=>C.EditorCommand.runEditorCommand(_e,me,ke,(oe,pe,Le)=>Promise.resolve(Ee.run(pe,...Le))),Pe=new _.DisposableStore;if(Pe.add(v.CommandsRegistry.registerCommand(Ee.id,Ae)),Ee.contextMenuGroupId){const _e={command:{id:Ee.id,title:Ee.label},when:ke,group:Ee.contextMenuGroupId,order:Ee.contextMenuOrder||0};Pe.add(y.MenuRegistry.appendMenuItem(y.MenuId.EditorContext,_e))}if(Array.isArray(Ee.keybindings)){const _e=l.StandaloneServices.get(p.IKeybindingService);if(!(_e instanceof l.StandaloneKeybindingService))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const me=E.ContextKeyExpr.and(ke,E.ContextKeyExpr.deserialize(Ee.keybindingContext));Pe.add(_e.addDynamicKeybindings(Ee.keybindings.map(oe=>({keybinding:oe,command:Ee.id,when:me}))))}}return Pe}e.addEditorAction=Y;function ie(Ee){return le([Ee])}e.addKeybindingRule=ie;function le(Ee){const ke=l.StandaloneServices.get(p.IKeybindingService);return ke instanceof l.StandaloneKeybindingService?ke.addDynamicKeybindings(Ee.map(Ae=>({keybinding:Ae.keybinding,command:Ae.command,commandArgs:Ae.commandArgs,when:E.ContextKeyExpr.deserialize(Ae.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),_.Disposable.None)}e.addKeybindingRules=le;function ne(Ee,ke,Ae){const Pe=l.StandaloneServices.get(r.ILanguageService),_e=Pe.getLanguageIdByMimeType(ke)||ke;return(0,a.createTextModel)(l.StandaloneServices.get(d.IModelService),Pe,Ee,_e,Ae)}e.createModel=ne;function se(Ee,ke){const Ae=l.StandaloneServices.get(r.ILanguageService),Pe=Ae.getLanguageIdByMimeType(ke)||ke||I.PLAINTEXT_LANGUAGE_ID;Ee.setLanguage(Ae.createById(Pe))}e.setModelLanguage=se;function H(Ee,ke,Ae){Ee&&l.StandaloneServices.get(f.IMarkerService).changeOne(ke,Ee.uri,Ae)}e.setModelMarkers=H;function W(Ee){l.StandaloneServices.get(f.IMarkerService).changeAll(Ee,[])}e.removeAllMarkers=W;function $(Ee){return l.StandaloneServices.get(f.IMarkerService).read(Ee)}e.getModelMarkers=$;function Z(Ee){return l.StandaloneServices.get(f.IMarkerService).onMarkerChanged(Ee)}e.onDidChangeMarkers=Z;function Q(Ee){return l.StandaloneServices.get(d.IModelService).getModel(Ee)}e.getModel=Q;function re(){return l.StandaloneServices.get(d.IModelService).getModels()}e.getModels=re;function ce(Ee){return l.StandaloneServices.get(d.IModelService).onModelAdded(Ee)}e.onDidCreateModel=ce;function he(Ee){return l.StandaloneServices.get(d.IModelService).onModelRemoved(Ee)}e.onWillDisposeModel=he;function de(Ee){return l.StandaloneServices.get(d.IModelService).onModelLanguageChanged(Ae=>{Ee({model:Ae.model,oldLanguage:Ae.oldLanguageId})})}e.onDidChangeModelLanguage=de;function ue(Ee){return(0,h.createWebWorker)(l.StandaloneServices.get(d.IModelService),l.StandaloneServices.get(i.ILanguageConfigurationService),Ee)}e.createWebWorker=ue;function q(Ee,ke){const Ae=l.StandaloneServices.get(r.ILanguageService),Pe=l.StandaloneServices.get(u.IStandaloneThemeService);return Pe.registerEditorContainer(Ee),c.Colorizer.colorizeElement(Pe,Ae,Ee,ke)}e.colorizeElement=q;function z(Ee,ke,Ae){const Pe=l.StandaloneServices.get(r.ILanguageService);return l.StandaloneServices.get(u.IStandaloneThemeService).registerEditorContainer(document.body),c.Colorizer.colorize(Pe,Ee,ke,Ae)}e.colorize=z;function U(Ee,ke,Ae=4){return l.StandaloneServices.get(u.IStandaloneThemeService).registerEditorContainer(document.body),c.Colorizer.colorizeModelLine(Ee,ke,Ae)}e.colorizeModelLine=U;function X(Ee){const ke=t.TokenizationRegistry.get(Ee);return ke||{getInitialState:()=>n.NullState,tokenize:(Ae,Pe,_e)=>(0,n.nullTokenize)(Ee,_e)}}function te(Ee,ke){t.TokenizationRegistry.getOrCreate(ke);const Ae=X(ke),Pe=(0,k.splitLines)(Ee),_e=[];let me=Ae.getInitialState();for(let oe=0,pe=Pe.length;oe<pe;oe++){const Le=Pe[oe],ve=Ae.tokenize(Le,!0,me);_e[oe]=ve.tokens,me=ve.endState}return _e}e.tokenize=te;function G(Ee,ke){l.StandaloneServices.get(u.IStandaloneThemeService).defineTheme(Ee,ke)}e.defineTheme=G;function ae(Ee){l.StandaloneServices.get(u.IStandaloneThemeService).setTheme(Ee)}e.setTheme=ae;function fe(){D.FontMeasurements.clearAllFontInfos()}e.remeasureFonts=fe;function Ce(Ee,ke){return v.CommandsRegistry.registerCommand({id:Ee,handler:ke})}e.registerCommand=Ce;function Se(Ee){return l.StandaloneServices.get(M.IOpenerService).registerOpener({open(Ae){return we(this,void 0,void 0,function*(){return typeof Ae=="string"&&(Ae=L.URI.parse(Ae)),Ee.open(Ae)})}})}e.registerLinkOpener=Se;function ye(Ee){return l.StandaloneServices.get(w.ICodeEditorService).registerCodeEditorOpenHandler((Ae,Pe,_e)=>we(this,void 0,void 0,function*(){var me;if(!Pe)return null;const oe=(me=Ae.options)===null||me===void 0?void 0:me.selection;let pe;return oe&&typeof oe.endLineNumber=="number"&&typeof oe.endColumn=="number"?pe=oe:oe&&(pe={lineNumber:oe.startLineNumber,column:oe.startColumn}),(yield Ee.openCodeEditor(Pe,Ae.resource,pe))?Pe:null}))}e.registerEditorOpener=ye;function Ie(){return{create:N,getEditors:F,getDiffEditors:B,onDidCreateEditor:P,onDidCreateDiffEditor:x,createDiffEditor:V,createDiffNavigator:K,addCommand:A,addEditorAction:Y,addKeybindingRule:ie,addKeybindingRules:le,createModel:ne,setModelLanguage:se,setModelMarkers:H,getModelMarkers:$,removeAllMarkers:W,onDidChangeMarkers:Z,getModels:re,getModel:Q,onDidCreateModel:ce,onWillDisposeModel:he,onDidChangeModelLanguage:de,createWebWorker:ue,colorizeElement:q,colorize:z,colorizeModelLine:U,tokenize:te,defineTheme:G,setTheme:ae,remeasureFonts:fe,registerCommand:Ce,registerLinkOpener:Se,registerEditorOpener:ye,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,GlyphMarginLane:o.GlyphMarginLane,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:S.ConfigurationChangedEvent,BareFontInfo:g.BareFontInfo,FontInfo:g.FontInfo,TextModelResolvedOptions:s.TextModelResolvedOptions,FindMatch:s.FindMatch,ApplyUpdateResult:S.ApplyUpdateResult,LineRange:O.LineRange,LineRangeMapping:T.LineRangeMapping,RangeMapping:T.RangeMapping,EditorZoom:R.EditorZoom,EditorType:m.EditorType,EditorOptions:S.EditorOptions}}e.createMonacoEditorAPI=Ie}),define(J[888],ee([1,0,36,5,27,29,72,39,201,248,531,320,126,92,19,28]),function(j,e,_,k,L,D,w,b,S,g,m,s,t,i,n,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 d(z){w.ModesRegistry.registerLanguage(z)}e.register=d;function h(){let z=[];return z=z.concat(w.ModesRegistry.getLanguages()),z}e.getLanguages=h;function o(z){return g.StandaloneServices.get(b.ILanguageService).languageIdCodec.encodeLanguageId(z)}e.getEncodedLanguageId=o;function c(z,U){const te=g.StandaloneServices.get(b.ILanguageService).onDidRequestRichLanguageFeatures(G=>{G===z&&(te.dispose(),U())});return te}e.onLanguage=c;function a(z,U){const te=g.StandaloneServices.get(b.ILanguageService).onDidRequestBasicLanguageFeatures(G=>{G===z&&(te.dispose(),U())});return te}e.onLanguageEncountered=a;function l(z,U){if(!g.StandaloneServices.get(b.ILanguageService).isRegisteredLanguageId(z))throw new Error(`Cannot set configuration for unknown language ${z}`);return g.StandaloneServices.get(D.ILanguageConfigurationService).register(z,U,100)}e.setLanguageConfiguration=l;class u{constructor(U,X){this._languageId=U,this._actual=X}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(U,X,te){if(typeof this._actual.tokenize=="function")return v.adaptTokenize(this._languageId,this._actual,U,te);throw new Error("Not supported!")}tokenizeEncoded(U,X,te){const G=this._actual.tokenizeEncoded(U,te);return new L.EncodedTokenizationResult(G.tokens,G.endState)}}e.EncodedTokenizationSupportAdapter=u;class v{constructor(U,X,te,G){this._languageId=U,this._actual=X,this._languageService=te,this._standaloneThemeService=G}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(U,X){const te=[];let G=0;for(let ae=0,fe=U.length;ae<fe;ae++){const Ce=U[ae];let Se=Ce.startIndex;ae===0?Se=0:Se<G&&(Se=G),te[ae]=new L.Token(Se,Ce.scopes,X),G=Se}return te}static adaptTokenize(U,X,te,G){const ae=X.tokenize(te,G),fe=v._toClassicTokens(ae.tokens,U);let Ce;return ae.endState.equals(G)?Ce=G:Ce=ae.endState,new L.TokenizationResult(fe,Ce)}tokenize(U,X,te){return v.adaptTokenize(this._languageId,this._actual,U,te)}_toBinaryTokens(U,X){const te=U.encodeLanguageId(this._languageId),G=this._standaloneThemeService.getColorTheme().tokenTheme,ae=[];let fe=0,Ce=0;for(let ye=0,Ie=X.length;ye<Ie;ye++){const Ee=X[ye],ke=G.match(te,Ee.scopes)|1024;if(fe>0&&ae[fe-1]===ke)continue;let Ae=Ee.startIndex;ye===0?Ae=0:Ae<Ce&&(Ae=Ce),ae[fe++]=Ae,ae[fe++]=ke,Ce=Ae}const Se=new Uint32Array(fe);for(let ye=0;ye<fe;ye++)Se[ye]=ae[ye];return Se}tokenizeEncoded(U,X,te){const G=this._actual.tokenize(U,te),ae=this._toBinaryTokens(this._languageService.languageIdCodec,G.tokens);let fe;return G.endState.equals(te)?fe=te:fe=G.endState,new L.EncodedTokenizationResult(ae,fe)}}e.TokenizationSupportAdapter=v;function f(z){return typeof z.getInitialState=="function"}function p(z){return"tokenizeEncoded"in z}function C(z){return z&&typeof z.then=="function"}function y(z){const U=g.StandaloneServices.get(t.IStandaloneThemeService);if(z){const X=[null];for(let te=1,G=z.length;te<G;te++)X[te]=_.Color.fromHex(z[te]);U.setColorMapOverride(X)}else U.setColorMapOverride(null)}e.setColorMap=y;function E(z,U){return p(U)?new u(z,U):new v(z,U,g.StandaloneServices.get(b.ILanguageService),g.StandaloneServices.get(t.IStandaloneThemeService))}function I(z,U){const X=new L.LazyTokenizationSupport(()=>we(this,void 0,void 0,function*(){const te=yield Promise.resolve(U.create());return te?f(te)?E(z,te):new s.MonarchTokenizer(g.StandaloneServices.get(b.ILanguageService),g.StandaloneServices.get(t.IStandaloneThemeService),z,(0,m.compile)(z,te),g.StandaloneServices.get(r.IConfigurationService)):null}));return L.TokenizationRegistry.registerFactory(z,X)}e.registerTokensProviderFactory=I;function T(z,U){if(!g.StandaloneServices.get(b.ILanguageService).isRegisteredLanguageId(z))throw new Error(`Cannot set tokens provider for unknown language ${z}`);return C(U)?I(z,{create:()=>U}):L.TokenizationRegistry.register(z,E(z,U))}e.setTokensProvider=T;function O(z,U){const X=te=>new s.MonarchTokenizer(g.StandaloneServices.get(b.ILanguageService),g.StandaloneServices.get(t.IStandaloneThemeService),z,(0,m.compile)(z,te),g.StandaloneServices.get(r.IConfigurationService));return C(U)?I(z,{create:()=>U}):L.TokenizationRegistry.register(z,X(U))}e.setMonarchTokensProvider=O;function R(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).referenceProvider.register(z,U)}e.registerReferenceProvider=R;function M(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).renameProvider.register(z,U)}e.registerRenameProvider=M;function N(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).signatureHelpProvider.register(z,U)}e.registerSignatureHelpProvider=N;function P(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).hoverProvider.register(z,{provideHover:(te,G,ae)=>{const fe=te.getWordAtPosition(G);return Promise.resolve(U.provideHover(te,G,ae)).then(Ce=>{if(Ce)return!Ce.range&&fe&&(Ce.range=new k.Range(G.lineNumber,fe.startColumn,G.lineNumber,fe.endColumn)),Ce.range||(Ce.range=new k.Range(G.lineNumber,G.column,G.lineNumber,G.column)),Ce})}})}e.registerHoverProvider=P;function x(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).documentSymbolProvider.register(z,U)}e.registerDocumentSymbolProvider=x;function F(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).documentHighlightProvider.register(z,U)}e.registerDocumentHighlightProvider=F;function B(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).linkedEditingRangeProvider.register(z,U)}e.registerLinkedEditingRangeProvider=B;function V(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).definitionProvider.register(z,U)}e.registerDefinitionProvider=V;function K(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).implementationProvider.register(z,U)}e.registerImplementationProvider=K;function A(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).typeDefinitionProvider.register(z,U)}e.registerTypeDefinitionProvider=A;function Y(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).codeLensProvider.register(z,U)}e.registerCodeLensProvider=Y;function ie(z,U,X){return g.StandaloneServices.get(n.ILanguageFeaturesService).codeActionProvider.register(z,{providedCodeActionKinds:X?.providedCodeActionKinds,documentation:X?.documentation,provideCodeActions:(G,ae,fe,Ce)=>{const ye=g.StandaloneServices.get(i.IMarkerService).read({resource:G.uri}).filter(Ie=>k.Range.areIntersectingOrTouching(Ie,ae));return U.provideCodeActions(G,ae,{markers:ye,only:fe.only,trigger:fe.trigger},Ce)},resolveCodeAction:U.resolveCodeAction})}e.registerCodeActionProvider=ie;function le(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).documentFormattingEditProvider.register(z,U)}e.registerDocumentFormattingEditProvider=le;function ne(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).documentRangeFormattingEditProvider.register(z,U)}e.registerDocumentRangeFormattingEditProvider=ne;function se(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).onTypeFormattingEditProvider.register(z,U)}e.registerOnTypeFormattingEditProvider=se;function H(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).linkProvider.register(z,U)}e.registerLinkProvider=H;function W(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).completionProvider.register(z,U)}e.registerCompletionItemProvider=W;function $(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).colorProvider.register(z,U)}e.registerColorProvider=$;function Z(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).foldingRangeProvider.register(z,U)}e.registerFoldingRangeProvider=Z;function Q(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).declarationProvider.register(z,U)}e.registerDeclarationProvider=Q;function re(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).selectionRangeProvider.register(z,U)}e.registerSelectionRangeProvider=re;function ce(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).documentSemanticTokensProvider.register(z,U)}e.registerDocumentSemanticTokensProvider=ce;function he(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).documentRangeSemanticTokensProvider.register(z,U)}e.registerDocumentRangeSemanticTokensProvider=he;function de(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).inlineCompletionsProvider.register(z,U)}e.registerInlineCompletionsProvider=de;function ue(z,U){return g.StandaloneServices.get(n.ILanguageFeaturesService).inlayHintsProvider.register(z,U)}e.registerInlayHintsProvider=ue;function q(){return{register:d,getLanguages:h,onLanguage:c,onLanguageEncountered:a,getEncodedLanguageId:o,setLanguageConfiguration:l,setColorMap:y,registerTokensProviderFactory:I,setTokensProvider:T,setMonarchTokensProvider:O,registerReferenceProvider:R,registerRenameProvider:M,registerCompletionItemProvider:W,registerSignatureHelpProvider:N,registerHoverProvider:P,registerDocumentSymbolProvider:x,registerDocumentHighlightProvider:F,registerLinkedEditingRangeProvider:B,registerDefinitionProvider:V,registerImplementationProvider:K,registerTypeDefinitionProvider:A,registerCodeLensProvider:Y,registerCodeActionProvider:ie,registerDocumentFormattingEditProvider:le,registerDocumentRangeFormattingEditProvider:ne,registerOnTypeFormattingEditProvider:se,registerLinkProvider:H,registerColorProvider:$,registerFoldingRangeProvider:Z,registerDeclarationProvider:Q,registerSelectionRangeProvider:re,registerDocumentSemanticTokensProvider:ce,registerDocumentRangeSemanticTokensProvider:he,registerInlineCompletionsProvider:de,registerInlayHintsProvider:ue,DocumentHighlightKind:S.DocumentHighlightKind,CompletionItemKind:S.CompletionItemKind,CompletionItemTag:S.CompletionItemTag,CompletionItemInsertTextRule:S.CompletionItemInsertTextRule,SymbolKind:S.SymbolKind,SymbolTag:S.SymbolTag,IndentAction:S.IndentAction,CompletionTriggerKind:S.CompletionTriggerKind,SignatureHelpTriggerKind:S.SignatureHelpTriggerKind,InlayHintKind:S.InlayHintKind,InlineCompletionTriggerKind:S.InlineCompletionTriggerKind,CodeActionTriggerType:S.CodeActionTriggerType,FoldingRangeKind:L.FoldingRangeKind,SelectedSuggestionInfo:L.SelectedSuggestionInfo}}e.createMonacoLanguagesAPI=q}),define(J[889],ee([1,0,41,310,887,888,339]),function(j,e,_,k,L,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,_.EditorOptions.wrappingIndent.defaultValue=0,_.EditorOptions.glyphMargin.defaultValue=!1,_.EditorOptions.autoIndent.defaultValue=3,_.EditorOptions.overviewRulerLanes.defaultValue=2,w.FormattingConflicts.setFormatterSelector((g,m,s)=>Promise.resolve(g[0]));const b=(0,k.createMonacoBaseAPI)();b.editor=(0,L.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 S=globalThis.MonacoEnvironment;(S?.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 ri=this&&this.__createBinding||(Object.create?function(j,e,_,k){k===void 0&&(k=_);var L=Object.getOwnPropertyDescriptor(e,_);(!L||("get"in L?!e.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return e[_]}}),Object.defineProperty(j,k,L)}:function(j,e,_,k){k===void 0&&(k=_),j[k]=e[_]}),ai=this&&this.__exportStar||function(j,e){for(var _ in j)_!=="default"&&!Object.prototype.hasOwnProperty.call(e,_)&&ri(e,j,_)};define(J[891],ee([1,0,889,885,786,787,788,757,830,831,792,872,833]),function(j,e,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),ai(_,e)})}).call(this);\n\n\n"use strict";/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)\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.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)\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.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)\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.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)\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.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)\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.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)\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","Cleared Input"],"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.","Click to revert change"],"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 legacy diffing algorithm.","Uses the advanced diffing algorithm.","Controls whether the diff editor shows unchanged regions. Only works when \'diffEditor.experimental.useVersion2\' is set.","Controls whether the diff editor uses the new or the old implementation."],"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 if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped.","Show the drop selector widget after a file is dropped into the editor.","Never show the drop selector widget. Instead the default drop provider is always used.","Controls whether you can paste content in different ways.","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted.","Show the paste selector widget after content is pasted into the editor.","Never show the paste selector widget. Instead the default pasting behavior is always used.","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.","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 inline color decorations should be shown using the default document color provider","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 the context is an embedded 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 standalone color picker is visible","Whether the standalone color picker is focused","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","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/codeActionController":["Hide Disabled","Show Disabled"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["More Actions...","Quick Fix...","Extract...","Inline...","Rewrite...","Move...","Surround With...","Source Action..."],"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)","Icon to close the color picker"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["Show or Focus Standalone Color Picker","&&Show or Focus Standalone Color Picker","Hide the Color Picker","Insert Color with Standalone Color Picker"],"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/cursorUndo/browser/cursorUndo":["Cursor Undo","Cursor Redo"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["Paste As...","The id of the paste edit to try applying. If not provided, the editor will show a picker."],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["Whether the paste widget is showing","Show paste options...","Running paste handlers. Click to cancel","Select Paste Action","Running paste handlers"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["Built-in","Insert Plain Text","Insert Uris","Insert Uri","Insert Paths","Insert Path","Insert Relative Paths","Insert Relative Path"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["Whether the drop widget is showing","Show drop options...","Running drop handlers. Click to cancel"],"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...","No matches. Try searching for something else.","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":["in {0} on line {1} at column {2}","{0} in {1} on line {2} at column {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/commands":["Show Next Inline Suggestion","Show Previous Inline Suggestion","Trigger Inline Suggestion","Accept Next Word Of Inline Suggestion","Accept Word","Accept Next Line Of Inline Suggestion","Accept Line","Accept Inline Suggestion","Accept","Hide Inline Suggestion","Always Show Toolbar"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["Suggestion:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["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 suggestions should be suppressed for the current suggestion"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["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":["recently used","commonly used","other commands","{0}, {1}","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.","If set, color of double underlines for errors 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.","If set, color of double underlines for warnings 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.","If set, color of double underlines for infos in the editor.","Foreground color of hint squigglies in the editor.","If set, color of double underlines for hints 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.","The color of unchanged blocks in diff editor.","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.","Shadow 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.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)\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 |